From 64c8349613addc3da2242c5cd6b99d64e3fb5f8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org> Date: Tue, 27 Oct 2009 17:24:18 +0000 Subject: [PATCH] Huge script change, see http://forum.mxchange.org/topic-458.html for details: - There are tons of changes and improvements, please read at our forum on URL http://forum.mxchange.org/topic-458.html for further details. --- .gitattributes | 89 +- .gitignore | 7 +- .htaccess | 8 +- DOCS/Doxyfile | 1525 +++++++++++ DOCS/TODOs.txt | 513 ++-- DOCS/en/rewrite/.htaccess | 10 +- DOCS/final-checker.sh | 4 +- DOCS/prop-set.sh | 0 DOCS/todo-builder.sh | 20 +- DOCS/tpl-validator.php | 40 +- DOCS/validator.sh | 4 +- admin.php | 10 +- agb.php | 8 +- beg.php | 102 +- birthday_confirm.php | 50 +- click.php | 14 +- confirm.php | 30 +- css.php | 4 +- debug.php | 26 +- doubler.php | 173 +- img.php | 24 +- inc/.secret/.htaccess | 2 +- inc/autopurge.php | 55 +- inc/autopurge/purge- | 7 +- inc/autopurge/purge-general.php | 66 +- inc/autopurge/purge-inact.php | 53 +- inc/autopurge/purge-mails.php | 67 +- inc/autopurge/purge-tsks.php | 18 +- inc/autopurge/purge-unconfirmed.php | 28 +- inc/check-reset.php | 55 +- inc/classes/.htaccess | 1 + inc/classes/cachesystem.class.php | 482 ++++ inc/classes/rdf.class.php | 1398 ++++++++++ inc/code-functions.php | 7 +- inc/config-functions.php | 232 +- inc/config-global.php | 33 +- inc/config-local.php.dist | 18 +- inc/databases.php | 17 +- inc/db/lib-mysql3.php | 209 +- inc/db/lib.php | 13 +- inc/debug/request_ | 5 +- inc/doubler_send.php | 177 +- inc/extensions-functions.php | 1574 ++++++++++++ inc/extensions.php | 1275 +-------- inc/extensions/ext- | 75 +- inc/extensions/ext-active.php | 71 +- inc/extensions/ext-admins.php | 193 +- inc/extensions/ext-admintheme1.php | 49 +- inc/extensions/ext-admintheme_default.php | 49 +- inc/extensions/ext-autopurge.php | 153 +- inc/extensions/ext-autoreg.php | 93 + inc/extensions/ext-bank.php | 125 +- inc/extensions/ext-beg.php | 193 +- inc/extensions/ext-birthday.php | 108 +- inc/extensions/ext-bonus.php | 377 +-- inc/extensions/ext-booking.php | 73 +- inc/extensions/ext-cache.php | 186 +- inc/extensions/ext-country.php | 72 +- inc/extensions/ext-debug.php | 120 +- inc/extensions/ext-demo.php | 47 +- inc/extensions/ext-doubler.php | 151 +- inc/extensions/ext-events.php | 43 +- inc/extensions/ext-holiday.php | 132 +- inc/extensions/ext-html_mail.php | 138 +- inc/extensions/ext-imprint.php | 123 +- inc/extensions/ext-iso3166.php | 51 +- inc/extensions/ext-jackpot.php | 93 + inc/extensions/ext-lead.php | 43 +- inc/extensions/ext-logs.php | 43 +- inc/extensions/ext-mailid.php | 107 +- inc/extensions/ext-maintenance.php | 60 +- inc/extensions/ext-mediadata.php | 111 +- inc/extensions/ext-menu.php | 71 +- inc/extensions/ext-mods.php | 60 +- inc/extensions/ext-mydata.php | 77 +- inc/extensions/ext-network.php | 41 +- inc/extensions/ext-newsletter.php | 185 +- inc/extensions/ext-nickname.php | 109 +- inc/extensions/ext-online.php | 94 +- inc/extensions/ext-optimize.php | 68 +- inc/extensions/ext-order.php | 168 +- inc/extensions/ext-other.php | 110 +- inc/extensions/ext-payout.php | 146 +- inc/extensions/ext-primera.php | 80 +- inc/extensions/ext-profile.php | 62 +- inc/extensions/ext-rallye.php | 257 +- inc/extensions/ext-refback.php | 74 +- inc/extensions/ext-register.php | 187 +- inc/extensions/ext-removeip.php | 62 +- inc/extensions/ext-repair.php | 73 +- inc/extensions/ext-rewrite.php | 97 +- inc/extensions/ext-safe.php | 37 +- inc/extensions/ext-seo.php | 73 +- inc/extensions/ext-sponsor.php | 386 +-- inc/extensions/ext-sql_patches.php | 620 +++-- inc/extensions/ext-support.php | 67 +- inc/extensions/ext-surfbar.php | 230 +- inc/extensions/ext-task.php | 118 +- inc/extensions/ext-theme.php | 96 +- inc/extensions/ext-top10.php | 69 +- inc/extensions/ext-transfer.php | 169 +- inc/extensions/ext-uberwach.php | 73 +- inc/extensions/ext-usage.php | 43 +- inc/extensions/ext-user.php | 208 +- inc/extensions/ext-wernis.php | 118 +- inc/extensions/ext-yoomedia.php | 97 +- inc/fatal_errors.php | 103 +- inc/filter-functions.php | 293 +++ inc/filters.php | 668 ++--- inc/fix_filters.php | 27 +- inc/fix_menu.php | 103 + inc/footer.php | 38 +- inc/functions.php | 1790 ++++++------- inc/gen_mediadata.php | 33 +- inc/gen_refback.php | 23 +- inc/gen_sql_patches.php | 9 +- inc/handler.php | 5 +- inc/header.php | 109 +- inc/hooks.php | 5 +- inc/inc-functions.php | 121 +- inc/install-functions.php | 105 + inc/install-inc.php | 235 +- inc/js/js- | 45 + inc/js/js-order_send.php | 48 + inc/js/js-surfbar_member_book.php | 48 + inc/js/js-surfbar_member_edit.php | 54 + inc/js/js-surfbar_stopped.php | 54 + inc/js/js-uberwach.php | 10 +- inc/language-functions.php | 141 +- inc/language/_de.php | 11 +- inc/language/active_de.php | 23 +- inc/language/admins_de.php | 139 +- inc/language/autopurge_de.php | 79 +- inc/language/bank_de.php | 79 +- inc/language/beg_de.php | 195 +- inc/language/birthday_de.php | 31 +- inc/language/bonus_de.php | 190 +- inc/language/booking_de.php | 13 +- inc/language/cache_de.php | 54 +- inc/language/country_de.php | 51 +- inc/language/de.php | 2271 +++++++++-------- inc/language/debug_de.php | 11 +- inc/language/doubler_de.php | 212 +- inc/language/en.php | 513 ++-- inc/language/holiday_de.php | 97 +- inc/language/html_mail_de.php | 27 +- inc/language/imprint_de.php | 54 + inc/language/install_de.php | 115 +- inc/language/logs_de.php | 17 +- inc/language/mailid_de.php | 39 +- inc/language/maintenance_de.php | 23 +- inc/language/mediadata_de.php | 93 +- inc/language/menu_de.php | 52 + inc/language/mods_de.php | 35 +- inc/language/newsletter_de.php | 61 +- inc/language/nickname_de.php | 43 +- inc/language/online_de.php | 13 +- inc/language/optimize_de.php | 39 +- inc/language/order_de.php | 75 +- inc/language/other_de.php | 102 +- inc/language/payout_de.php | 209 +- inc/language/primera_de.php | 145 +- inc/language/rallye_de.php | 221 +- inc/language/refback_de.php | 85 +- inc/language/register_de.php | 41 +- inc/language/removeip_de.php | 47 +- inc/language/repair_de.php | 17 +- inc/language/rewrite_de.php | 21 +- inc/language/sponsor_de.php | 502 ++-- inc/language/support_de.php | 29 +- inc/language/surfbar_de.php | 361 +-- inc/language/task_de.php | 173 +- inc/language/theme_de.php | 23 +- inc/language/top10_de.php | 15 +- inc/language/transfer_de.php | 111 +- inc/language/usage_de.php | 13 +- inc/language/user_de.php | 31 +- inc/language/wernis_de.php | 173 +- inc/language/yoomedia_de.php | 99 +- inc/libs/active_functions.php | 19 +- inc/libs/admins_functions.php | 255 +- inc/libs/autopurge_functions.php | 49 +- inc/libs/beg_functions.php | 18 +- inc/libs/bonus_functions.php | 118 +- inc/libs/booking_functions.php | 22 +- inc/libs/cache_functions.php | 459 +--- inc/libs/country_functions.php | 28 +- inc/libs/debug_functions.php | 5 +- inc/libs/doubler_functions.php | 49 +- inc/libs/events_functions.php | 5 +- inc/libs/holiday_functions.php | 23 +- inc/libs/html_mail_functions.php | 21 +- inc/libs/jackpot_functions.php | 103 + inc/libs/mediadata_functions.php | 33 +- inc/libs/newsletter_functions.php | 52 +- inc/libs/nickname_functions.php | 37 +- inc/libs/online_functions.php | 40 +- inc/libs/optimize_functions.php | 13 +- inc/libs/order_functions.php | 12 +- inc/libs/other_functions.php | 69 + inc/libs/payout_functions.php | 41 +- inc/libs/primera_functions.php | 63 +- inc/libs/rallye_functions.php | 422 +-- inc/libs/refback_functions.php | 196 +- inc/libs/register_functions.php | 94 +- inc/libs/removeip_functions.php | 60 +- inc/libs/rewrite_functions.php | 26 +- inc/libs/security_functions.php | 215 +- inc/libs/sponsor_functions.php | 184 +- inc/libs/surfbar_functions.php | 338 +-- inc/libs/task_functions.php | 429 ++-- inc/libs/theme_functions.php | 53 +- inc/libs/transfer_functions.php | 19 +- inc/libs/uberwach_functions.php | 7 +- inc/libs/user_functions.php | 207 +- inc/libs/wernis_functions.php | 51 +- inc/libs/yoomedia_functions.php | 71 +- inc/load_cache.php | 34 +- inc/load_config.php | 23 +- inc/load_extensions.php | 315 +-- inc/loader/load_cache- | 74 + inc/loader/load_cache-admin.php | 50 +- inc/loader/load_cache-config.php | 34 +- inc/loader/load_cache-extension.php | 188 ++ inc/loader/load_cache-filter.php | 32 +- inc/loader/load_cache-impressum.php | 77 + inc/loader/load_cache-modreg.php | 103 +- inc/loader/load_cache-modules.php | 103 + inc/loader/load_cache-refdepths.php | 19 +- inc/loader/load_cache-refsystem.php | 19 +- inc/loader/load_cache-revision.php | 22 +- inc/loader/load_cache-them.php | 31 +- inc/mails/_mails.php | 11 +- inc/mails/beg_mails.php | 53 +- inc/mails/birthday_mails.php | 113 +- inc/mails/bonus_mails.php | 31 +- inc/mails/doubler_mails.php | 183 ++ inc/modules/admin.php | 202 +- inc/modules/admin/action- | 21 +- inc/modules/admin/action-admins.php | 17 +- inc/modules/admin/action-bank.php | 17 +- inc/modules/admin/action-country.php | 17 +- inc/modules/admin/action-doubler.php | 17 +- inc/modules/admin/action-email.php | 17 +- inc/modules/admin/action-holiday.php | 17 +- inc/modules/admin/action-login.php | 17 +- inc/modules/admin/action-logout.php | 17 +- inc/modules/admin/action-menu.php | 17 +- inc/modules/admin/action-misc.php | 15 +- inc/modules/admin/action-mods.php | 19 +- inc/modules/admin/action-newsletter.php | 19 +- inc/modules/admin/action-payouts.php | 17 +- inc/modules/admin/action-primera.php | 17 +- inc/modules/admin/action-rallye.php | 17 +- inc/modules/admin/action-repair.php | 17 +- inc/modules/admin/action-setup.php | 17 +- inc/modules/admin/action-sponsor.php | 18 +- inc/modules/admin/action-stats.php | 17 +- inc/modules/admin/action-surfbar.php | 17 +- inc/modules/admin/action-task.php | 27 +- inc/modules/admin/action-theme.php | 17 +- inc/modules/admin/action-transfer.php | 17 +- inc/modules/admin/action-user.php | 19 +- inc/modules/admin/action-wernis.php | 15 +- inc/modules/admin/admin-inc.php | 551 ++-- inc/modules/admin/overview-inc.php | 336 +-- inc/modules/admin/what- | 11 +- inc/modules/admin/what-add_bank_package.php | 15 +- inc/modules/admin/what-add_guestnl_cat.php | 16 +- inc/modules/admin/what-add_points.php | 86 +- inc/modules/admin/what-add_rallye.php | 79 +- inc/modules/admin/what-add_sponsor.php | 18 +- inc/modules/admin/what-add_surfbar_url.php | 25 +- inc/modules/admin/what-admin_add.php | 71 +- inc/modules/admin/what-adminedit.php | 207 +- inc/modules/admin/what-admins_add.php | 23 +- inc/modules/admin/what-admins_contct.php | 40 +- inc/modules/admin/what-admins_edit.php | 37 +- inc/modules/admin/what-admins_mails.php | 73 +- inc/modules/admin/what-bonus.php | 13 +- inc/modules/admin/what-cache_stats.php | 37 +- inc/modules/admin/what-chk_regs.php | 31 +- inc/modules/admin/what-config_ | 56 + inc/modules/admin/what-config_active.php | 20 +- inc/modules/admin/what-config_admin.php | 32 +- inc/modules/admin/what-config_admins.php | 145 +- inc/modules/admin/what-config_autopurge.php | 60 +- inc/modules/admin/what-config_beg.php | 144 +- inc/modules/admin/what-config_birthday.php | 50 +- inc/modules/admin/what-config_bonus.php | 214 +- inc/modules/admin/what-config_cache.php | 221 +- inc/modules/admin/what-config_cats.php | 102 +- inc/modules/admin/what-config_doubler.php | 116 +- inc/modules/admin/what-config_email.php | 88 +- inc/modules/admin/what-config_extensions.php | 25 +- inc/modules/admin/what-config_holiday.php | 35 +- inc/modules/admin/what-config_home.php | 54 +- inc/modules/admin/what-config_imprint.php | 81 + inc/modules/admin/what-config_mediadata.php | 46 +- inc/modules/admin/what-config_menu.php | 63 + inc/modules/admin/what-config_mods.php | 75 +- inc/modules/admin/what-config_newsletter.php | 24 +- inc/modules/admin/what-config_nickname.php | 15 +- inc/modules/admin/what-config_order.php | 105 +- inc/modules/admin/what-config_other.php | 184 +- inc/modules/admin/what-config_payouts.php | 121 +- inc/modules/admin/what-config_points.php | 217 +- inc/modules/admin/what-config_primera.php | 36 +- inc/modules/admin/what-config_proxy.php | 17 +- .../admin/what-config_rallye_prices.php | 127 +- inc/modules/admin/what-config_refback.php | 15 +- inc/modules/admin/what-config_refid.php | 62 +- inc/modules/admin/what-config_register.php | 27 +- inc/modules/admin/what-config_register2.php | 30 +- inc/modules/admin/what-config_removeip.php | 148 +- inc/modules/admin/what-config_rewrite.php | 28 +- inc/modules/admin/what-config_secure.php | 26 +- inc/modules/admin/what-config_session.php | 19 +- inc/modules/admin/what-config_sponsor.php | 21 +- inc/modules/admin/what-config_stats.php | 42 +- inc/modules/admin/what-config_surfbar.php | 120 +- inc/modules/admin/what-config_title.php | 26 +- inc/modules/admin/what-config_top10.php | 19 +- inc/modules/admin/what-config_transfer.php | 48 +- inc/modules/admin/what-config_user.php | 19 +- inc/modules/admin/what-config_wernis.php | 68 +- inc/modules/admin/what-config_yoomedia.php | 67 +- inc/modules/admin/what-del_email.php | 141 +- inc/modules/admin/what-del_holiday.php | 54 +- inc/modules/admin/what-del_sponsor.php | 61 +- inc/modules/admin/what-del_task.php | 21 +- inc/modules/admin/what-del_transfer.php | 53 +- inc/modules/admin/what-del_user.php | 49 +- inc/modules/admin/what-edit_emails.php | 75 +- inc/modules/admin/what-edit_sponsor.php | 148 +- inc/modules/admin/what-edit_user.php | 124 +- inc/modules/admin/what-email_archiv.php | 91 +- inc/modules/admin/what-email_details.php | 76 +- inc/modules/admin/what-email_stats.php | 15 +- inc/modules/admin/what-extensions.php | 291 ++- inc/modules/admin/what-guest_add.php | 60 +- inc/modules/admin/what-guestedit.php | 216 +- inc/modules/admin/what-holiday_list.php | 14 +- inc/modules/admin/what-holiday_remove.php | 11 +- inc/modules/admin/what-list_autopurge.php | 54 +- inc/modules/admin/what-list_bank_package.php | 46 +- inc/modules/admin/what-list_beg.php | 55 +- inc/modules/admin/what-list_bonus.php | 54 +- inc/modules/admin/what-list_cats.php | 55 +- inc/modules/admin/what-list_country.php | 110 +- inc/modules/admin/what-list_doubler.php | 135 +- inc/modules/admin/what-list_holiday.php | 28 +- inc/modules/admin/what-list_links.php | 85 +- inc/modules/admin/what-list_newsletter.php | 68 +- inc/modules/admin/what-list_notifications.php | 39 +- inc/modules/admin/what-list_payouts.php | 116 +- inc/modules/admin/what-list_primera.php | 33 +- inc/modules/admin/what-list_rallyes.php | 256 +- inc/modules/admin/what-list_refs.php | 75 +- inc/modules/admin/what-list_sponsor.php | 109 +- inc/modules/admin/what-list_sponsor_pay.php | 117 +- inc/modules/admin/what-list_sponsor_pays.php | 19 +- .../admin/what-list_surfbar_actions.php | 15 +- inc/modules/admin/what-list_surfbar_urls.php | 89 +- inc/modules/admin/what-list_task.php | 135 +- inc/modules/admin/what-list_transfer.php | 36 +- inc/modules/admin/what-list_unconfirmed.php | 92 +- inc/modules/admin/what-list_user.php | 296 +-- inc/modules/admin/what-list_wernis.php | 41 +- inc/modules/admin/what-list_yoomedia_tm.php | 51 +- inc/modules/admin/what-lock_sponsor.php | 68 +- inc/modules/admin/what-lock_user.php | 108 +- inc/modules/admin/what-logs.php | 27 +- inc/modules/admin/what-maintenance.php | 26 +- inc/modules/admin/what-mem_add.php | 60 +- inc/modules/admin/what-memedit.php | 192 +- inc/modules/admin/what-optimize.php | 54 +- inc/modules/admin/what-overview.php | 31 +- inc/modules/admin/what-payments.php | 70 +- inc/modules/admin/what-refbanner.php | 74 +- inc/modules/admin/what-repair_amnu.php | 30 +- inc/modules/admin/what-repair_cats.php | 19 +- inc/modules/admin/what-repair_gmnu.php | 28 +- inc/modules/admin/what-repair_mmnu.php | 25 +- inc/modules/admin/what-send_bonus.php | 53 +- inc/modules/admin/what-send_newsletter.php | 38 +- inc/modules/admin/what-stats_mods.php | 39 +- inc/modules/admin/what-sub_points.php | 67 +- inc/modules/admin/what-surfbar_stats.php | 43 +- inc/modules/admin/what-theme_check.php | 104 +- inc/modules/admin/what-theme_edit.php | 67 +- inc/modules/admin/what-theme_import.php | 64 +- inc/modules/admin/what-unlock_emails.php | 117 +- inc/modules/admin/what-unlock_sponsor.php | 66 +- .../admin/what-unlock_surfbar_urls.php | 47 +- inc/modules/admin/what-updates.php | 65 +- inc/modules/admin/what-usage.php | 38 +- inc/modules/admin/what-user_contct.php | 33 +- inc/modules/admin/what-usr_online.php | 58 +- inc/modules/chk_login.php | 33 +- inc/modules/frametester.php | 39 +- inc/modules/guest/action- | 29 +- inc/modules/guest/action-admin.php | 11 +- inc/modules/guest/action-main.php | 13 +- inc/modules/guest/action-members.php | 13 +- inc/modules/guest/action-online.php | 19 +- inc/modules/guest/action-sponsor.php | 16 +- inc/modules/guest/action-themes.php | 35 +- inc/modules/guest/what- | 11 +- inc/modules/guest/what-active.php | 60 +- inc/modules/guest/what-admin.php | 9 +- inc/modules/guest/what-agb.php | 13 +- inc/modules/guest/what-beg.php | 37 +- inc/modules/guest/what-confirm.php | 114 +- inc/modules/guest/what-doubler.php | 54 +- inc/modules/guest/what-impressum.php | 11 +- inc/modules/guest/what-infos.php | 13 +- inc/modules/guest/what-login.php | 115 +- inc/modules/guest/what-mediadata.php | 250 +- inc/modules/guest/what-rallyes.php | 72 +- inc/modules/guest/what-register.php | 360 ++- inc/modules/guest/what-sponsor_agb.php | 24 +- inc/modules/guest/what-sponsor_infos.php | 46 +- inc/modules/guest/what-sponsor_login.php | 130 +- inc/modules/guest/what-sponsor_reg.php | 268 +- inc/modules/guest/what-stats.php | 192 +- inc/modules/guest/what-top10.php | 151 +- inc/modules/guest/what-welcome.php | 13 +- inc/modules/guest/what-wernis_portal.php | 29 +- inc/modules/index.php | 40 +- inc/modules/loader.php | 19 +- inc/modules/login.php | 42 +- inc/modules/member/action- | 29 +- inc/modules/member/action-account.php | 19 +- inc/modules/member/action-bank.php | 27 +- inc/modules/member/action-extras.php | 19 +- inc/modules/member/action-logout.php | 19 +- inc/modules/member/action-main.php | 19 +- inc/modules/member/action-order.php | 27 +- inc/modules/member/action-rals.php | 19 +- inc/modules/member/action-stats.php | 19 +- inc/modules/member/action-surfbar.php | 27 +- inc/modules/member/action-themes.php | 39 +- inc/modules/member/what- | 13 +- inc/modules/member/what-bank_create.php | 23 +- inc/modules/member/what-bank_deposit.php | 23 +- inc/modules/member/what-bank_infos.php | 23 +- inc/modules/member/what-bank_output.php | 23 +- inc/modules/member/what-bank_withdraw.php | 23 +- inc/modules/member/what-beg.php | 56 +- inc/modules/member/what-beg2.php | 39 +- inc/modules/member/what-bonus.php | 41 +- inc/modules/member/what-categories.php | 50 +- inc/modules/member/what-doubler.php | 81 +- inc/modules/member/what-guest.php | 16 +- inc/modules/member/what-holiday.php | 135 +- inc/modules/member/what-html_mail.php | 39 +- inc/modules/member/what-logout.php | 15 +- inc/modules/member/what-mydata.php | 250 +- inc/modules/member/what-newsletter.php | 72 +- inc/modules/member/what-nickname.php | 42 +- inc/modules/member/what-order.php | 423 ++- inc/modules/member/what-payout.php | 150 +- inc/modules/member/what-points.php | 153 +- inc/modules/member/what-primera.php | 97 +- inc/modules/member/what-rallyes.php | 73 +- inc/modules/member/what-refback.php | 55 +- inc/modules/member/what-reflinks.php | 37 +- inc/modules/member/what-reflist.php | 21 +- inc/modules/member/what-sponsor.php | 28 +- inc/modules/member/what-stats.php | 42 +- inc/modules/member/what-support.php | 39 +- inc/modules/member/what-surfbar_book.php | 33 +- inc/modules/member/what-surfbar_list.php | 39 +- inc/modules/member/what-surfbar_start.php | 26 +- inc/modules/member/what-surfbar_stats.php | 21 +- inc/modules/member/what-themes.php | 50 +- inc/modules/member/what-transfer.php | 452 ++-- inc/modules/member/what-unconfirmed.php | 87 +- inc/modules/member/what-welcome.php | 31 +- inc/modules/member/what-wernis.php | 126 +- inc/modules/order.php | 39 +- inc/modules/sponsor.php | 27 +- inc/modules/sponsor/.php | 18 +- inc/modules/sponsor/account.php | 80 +- inc/modules/sponsor/settings.php | 83 +- inc/modules/sponsor/welcome.php | 36 +- inc/modules/welcome.php | 45 +- inc/monthly/monthly_ | 10 +- inc/monthly/monthly_beg.php | 29 +- inc/monthly/monthly_bonus.php | 19 +- inc/monthly/monthly_newsletter.php | 37 +- inc/monthly/monthly_surfbar.php | 9 +- inc/mysql-connect.php | 165 +- inc/mysql-manager.php | 1122 ++++---- inc/patch-system.php | 53 +- inc/pool-update.php | 64 +- inc/pool/pool- | 54 + inc/pool/pool-bonus.php | 68 +- inc/pool/pool-user.php | 207 +- inc/profile-updte.php | 92 +- inc/rdf.class.php | 1382 +--------- inc/request-functions.php | 74 +- inc/reset/reset_ | 11 +- inc/reset/reset_100_bonus.php | 90 + inc/reset/reset_autopurge.php | 60 + inc/reset/reset_beg.php | 17 +- inc/reset/reset_birthday.php | 120 + inc/reset/reset_bonus.php | 17 +- inc/reset/reset_daily.php | 45 +- inc/reset/reset_doubler.php | 54 + inc/reset/reset_engine.php | 13 +- inc/reset/reset_holiday.php | 27 +- inc/reset/reset_profile.php | 98 + inc/reset/reset_surfbar.php | 13 +- inc/reset/reset_yoomedia.php | 12 +- inc/security.php | 70 +- inc/session-functions.php | 39 +- inc/session.php | 22 +- inc/sql-functions.php | 128 + inc/sql_error.php | 45 +- inc/stats-functions.php | 121 + inc/stats_bonus.php | 84 +- inc/stylesheet.php | 54 +- inc/versions.php | 7 +- inc/weekly/weekly_ | 7 +- inc/weekly/weekly_surfbar.php | 9 +- inc/wrapper-functions.php | 270 +- index.php | 19 +- install.php | 32 +- install/menu-de.sql | 171 +- install/menu-en.sql | 171 +- install/tables.sql | 234 +- js.php | 16 +- lead-confirm.php | 26 +- login.php | 10 +- mailid.php | 75 +- mailid_top.php | 169 +- modules.php | 41 +- ref.php | 34 +- robots.txt | 32 +- show_bonus.php | 45 +- sponsor_confirm.php | 21 +- sponsor_ref.php | 12 +- surfbar.php | 68 +- templates/.htaccess | 2 +- templates/de/.htaccess | 2 +- templates/de/emails/add-points.tpl | 2 +- templates/de/emails/admin-del_links.tpl | 4 +- .../admin/admin_autopurge_del_mails.tpl | 4 +- .../emails/admin/admin_autopurge_delete.tpl | 4 +- .../emails/admin/admin_autopurge_inactive.tpl | 4 +- .../emails/admin/admin_autopurge_points.tpl | 2 +- .../de/emails/admin/admin_autopurge_tsks.tpl | 4 +- .../de/emails/admin/admin_autopurge_turbo.tpl | 4 +- .../admin/admin_autopurge_unconfirmed.tpl | 4 +- .../emails/admin/admin_del_surfbar_urls.tpl | 2 +- .../emails/admin/admin_edit_surfbar_urls.tpl | 10 +- .../de/emails/admin/admin_ext_deactivated.tpl | 2 +- .../admin/admin_holiday_deactivated.tpl | 8 +- .../de/emails/admin/admin_holiday_request.tpl | 10 +- .../de/emails/admin/admin_holiday_unlock.tpl | 2 +- .../admin/admin_lock_active_surfbar_urls.tpl | 2 +- .../admin/admin_lock_locked_surfbar_urls.tpl | 2 +- .../de/emails/admin/admin_mydata_notify.tpl | 20 +- .../emails/admin/admin_newsletter_request.tpl | 23 +- .../emails/admin/admin_newsletter_reset.tpl | 4 +- .../de/emails/admin/admin_payout_request.tpl | 6 +- .../admin/admin_payout_request_banner.tpl | 6 +- .../de/emails/admin/admin_rallye_expired.tpl | 2 +- .../emails/admin/admin_rallye_expired_no.tpl | 2 +- .../emails/admin/admin_rallye_no_notify.tpl | 4 +- .../de/emails/admin/admin_rallye_notify.tpl | 4 +- .../de/emails/admin/admin_rallye_purged.tpl | 12 +- templates/de/emails/admin/admin_refback.tpl | 2 +- .../de/emails/admin/admin_reset_password.tpl | 2 +- .../admin/admin_sponsor_change_data.tpl | 28 +- .../admin/admin_sponsor_change_email.tpl | 28 +- .../de/emails/admin/admin_sponsor_edit.tpl | 4 +- .../de/emails/admin/admin_sponsor_pending.tpl | 4 +- .../de/emails/admin/admin_sponsor_reg.tpl | 18 +- .../emails/admin/admin_sponsor_settings.tpl | 6 +- .../de/emails/admin/admin_support-ordr.tpl | 4 +- .../de/emails/admin/admin_support-reflink.tpl | 4 +- .../admin/admin_support-unconfirmed.tpl | 4 +- .../admin_surfbar_url_active_deleted.tpl | 2 +- .../admin_surfbar_url_active_pending.tpl | 2 +- .../admin_surfbar_url_active_stopped.tpl | 2 +- .../admin/admin_surfbar_url_confirmed.tpl | 4 +- .../admin/admin_surfbar_url_depleted.tpl | 4 +- .../admin_surfbar_url_locked_deleted.tpl | 2 +- .../admin_surfbar_url_locked_pending.tpl | 2 +- .../admin/admin_surfbar_url_migrate.tpl | 6 +- .../admin_surfbar_url_migrated_deleted.tpl | 2 +- .../admin_surfbar_url_migrated_migrated.tpl | 2 +- .../admin_surfbar_url_migrated_pending.tpl | 2 +- .../admin/admin_surfbar_url_pending.tpl | 4 +- .../admin_surfbar_url_pending_deleted.tpl | 2 +- .../de/emails/admin/admin_surfbar_url_reg.tpl | 6 +- .../admin/admin_surfbar_url_rejected.tpl | 4 +- .../admin_surfbar_url_stopped_continued.tpl | 2 +- .../admin_surfbar_url_stopped_deleted.tpl | 2 +- .../admin_surfbar_url_stopped_pending.tpl | 2 +- .../emails/admin/admin_surfbar_url_unlock.tpl | 2 +- .../de/emails/admin/admin_transfer_ap.tpl | 2 +- .../de/emails/admin/admin_transfer_points.tpl | 24 +- .../admin_undelete_active_surfbar_urls.tpl | 2 +- .../de/emails/admin/admin_wernis_request.tpl | 2 +- .../admins/admins_mail_contct_admin.tpl | 2 +- .../emails/admins/admins_msg_contct_admin.tpl | 2 +- templates/de/emails/back-admin.tpl | 4 +- templates/de/emails/back-member.tpl | 2 +- templates/de/emails/beg/beg_di_notify.tpl | 2 +- templates/de/emails/beg/beg_en_notify.tpl | 14 +- .../de/emails/beg/beg_en_notify_body.tpl | 10 +- templates/de/emails/bonus-mail.tpl | 6 +- templates/de/emails/bonus/bonus_di_notify.tpl | 2 +- templates/de/emails/bonus/bonus_en_notify.tpl | 2 +- templates/de/emails/confirm-member.tpl | 6 +- templates/de/emails/confirm-referral.tpl | 6 +- templates/de/emails/del-user.tpl | 2 +- templates/de/emails/del_sponsor.tpl | 6 +- templates/de/emails/done-admin.tpl | 4 +- templates/de/emails/done-member.tpl | 4 +- .../de/emails/guest/guest_request_confirm.tpl | 4 +- templates/de/emails/lock-user.tpl | 2 +- templates/de/emails/lock_sponsor.tpl | 8 +- .../member/member_autopurge_inactive.tpl | 10 +- .../emails/member/member_autopurge_points.tpl | 2 +- .../member/member_autopurge_unconfirmed.tpl | 6 +- templates/de/emails/member/member_beg.tpl | 2 +- .../de/emails/member/member_birthday.tpl | 2 +- .../emails/member/member_birthday_confirm.tpl | 4 +- templates/de/emails/member/member_bonus.tpl | 2 +- templates/de/emails/member/member_contct.tpl | 4 +- .../emails/member/member_del_surfbar_urls.tpl | 2 +- templates/de/emails/member/member_doubler.tpl | 2 +- .../member/member_edit_surfbar_urls.tpl | 12 +- .../member/member_holiday_activated.tpl | 2 +- .../emails/member/member_holiday_removed.tpl | 2 +- .../emails/member/member_holiday_request.tpl | 8 +- .../emails/member/member_holiday_unlock.tpl | 2 +- .../member_lock_active_surfbar_urls.tpl | 2 +- .../member_lock_locked_surfbar_urls.tpl | 2 +- .../de/emails/member/member_mydata_notify.tpl | 22 +- .../emails/member/member_newsletter_done.tpl | 21 +- .../member/member_newsletter_request.tpl | 27 +- .../emails/member/member_newsletter_reset.tpl | 19 +- .../emails/member/member_payout_accepted.tpl | 2 +- .../emails/member/member_payout_rejected.tpl | 2 +- .../emails/member/member_payout_request.tpl | 6 +- .../member/member_payout_request_banner.tpl | 6 +- .../emails/member/member_rallye_expired.tpl | 2 +- .../member/member_rallye_expired_bronce.tpl | 2 +- .../member/member_rallye_expired_gold.tpl | 2 +- .../member/member_rallye_expired_silver.tpl | 2 +- .../de/emails/member/member_rallye_notify.tpl | 2 +- templates/de/emails/member/member_refback.tpl | 2 +- .../de/emails/member/member_stats_bonus.tpl | 4 +- .../de/emails/member/member_support-ordr.tpl | 2 +- .../emails/member/member_support-reflink.tpl | 2 +- .../member/member_support-unconfirmed.tpl | 4 +- .../member/member_surfbar_low_points.tpl | 4 +- .../member_surfbar_url_active_deleted.tpl | 2 +- .../member_surfbar_url_active_pending.tpl | 2 +- .../member_surfbar_url_active_stopped.tpl | 2 +- .../member/member_surfbar_url_confirmed.tpl | 4 +- .../member/member_surfbar_url_depleted.tpl | 4 +- .../member_surfbar_url_locked_deleted.tpl | 2 +- .../member_surfbar_url_locked_pending.tpl | 2 +- .../member/member_surfbar_url_migrate.tpl | 4 +- .../member_surfbar_url_migrated_deleted.tpl | 2 +- .../member_surfbar_url_migrated_migrated.tpl | 2 +- .../member_surfbar_url_migrated_pending.tpl | 2 +- .../member/member_surfbar_url_pending.tpl | 4 +- .../member_surfbar_url_pending_deleted.tpl | 2 +- .../emails/member/member_surfbar_url_reg.tpl | 4 +- .../member/member_surfbar_url_rejected.tpl | 4 +- .../member_surfbar_url_stopped_continued.tpl | 2 +- .../member_surfbar_url_stopped_deleted.tpl | 2 +- .../member_surfbar_url_stopped_pending.tpl | 2 +- .../member/member_surfbar_url_unlock.tpl | 4 +- .../member/member_transfer_recipient.tpl | 14 +- .../emails/member/member_transfer_sender.tpl | 12 +- .../member_undelete_active_surfbar_urls.tpl | 2 +- .../emails/member/member_wernis_accepted.tpl | 2 +- .../emails/member/member_wernis_rejected.tpl | 2 +- .../emails/member/member_wernis_request.tpl | 2 +- templates/de/emails/new-pass.tpl | 4 +- templates/de/emails/newsletter.tpl | 4 +- templates/de/emails/newsletter_html.tpl | 4 +- templates/de/emails/normal-mail.tpl | 8 +- templates/de/emails/order-accept.tpl | 4 +- templates/de/emails/order-admin.tpl | 4 +- templates/de/emails/order-deleted.tpl | 2 +- templates/de/emails/order-member.tpl | 4 +- templates/de/emails/order-reject.tpl | 2 +- templates/de/emails/profile-updte.tpl | 12 +- templates/de/emails/register-admin.tpl | 2 +- templates/de/emails/register-member.tpl | 6 +- .../de/emails/sponsor/sponsor_activate.tpl | 2 +- .../de/emails/sponsor/sponsor_add_points.tpl | 8 +- .../de/emails/sponsor/sponsor_change_data.tpl | 2 +- .../emails/sponsor/sponsor_change_email.tpl | 2 +- .../de/emails/sponsor/sponsor_confirm.tpl | 16 +- templates/de/emails/sponsor/sponsor_email.tpl | 10 +- templates/de/emails/sponsor/sponsor_lost.tpl | 2 +- .../de/emails/sponsor/sponsor_pending.tpl | 4 +- .../de/emails/sponsor/sponsor_ref_notify.tpl | 2 +- .../de/emails/sponsor/sponsor_settings.tpl | 2 +- .../de/emails/sponsor/sponsor_sub_points.tpl | 8 +- .../de/emails/sponsor/sponsor_unlock.tpl | 2 +- .../de/emails/sponsor/sponsor_unlocked.tpl | 4 +- templates/de/emails/sponsor_add_points.tpl | 14 +- templates/de/emails/sponsor_confirm.tpl | 36 +- templates/de/emails/sponsor_pending.tpl | 58 +- templates/de/emails/sponsor_sub_points.tpl | 14 +- templates/de/emails/sponsor_unlocked.tpl | 20 +- templates/de/emails/sub-points.tpl | 2 +- templates/de/emails/unlock-user.tpl | 2 +- templates/de/html/.htaccess | 2 +- templates/de/html/admin/.htaccess | 2 +- .../de/html/admin/admin_add_bank_package.tpl | 104 +- templates/de/html/admin/admin_add_banner.tpl | 2 +- templates/de/html/admin/admin_add_cat.tpl | 13 +- templates/de/html/admin/admin_add_country.tpl | 2 +- templates/de/html/admin/admin_add_max.tpl | 2 +- templates/de/html/admin/admin_add_payment.tpl | 6 +- templates/de/html/admin/admin_add_points.tpl | 27 +- .../de/html/admin/admin_add_points_all.tpl | 2 +- templates/de/html/admin/admin_add_rallye.tpl | 45 +- .../de/html/admin/admin_add_rallye_prices.tpl | 2 +- .../de/html/admin/admin_add_reflevel.tpl | 43 + templates/de/html/admin/admin_add_reflvl.tpl | 44 +- templates/de/html/admin/admin_add_sponsor.tpl | 16 +- .../html/admin/admin_add_sponsor_already.tpl | 6 +- .../html/admin/admin_add_sponsor_paytype.tpl | 4 +- .../de/html/admin/admin_add_surfbar_url.tpl | 2 +- templates/de/html/admin/admin_admin_add.tpl | 34 +- templates/de/html/admin/admin_admins_add.tpl | 2 +- .../de/html/admin/admin_admins_add_acl.tpl | 36 +- .../html/admin/admin_admins_contct_form.tpl | 15 +- .../html/admin/admin_admins_contct_select.tpl | 12 +- .../de/html/admin/admin_admins_mails_edit.tpl | 4 +- .../de/html/admin/admin_admins_mails_list.tpl | 4 +- .../de/html/admin/admin_amenu_delete.tpl | 20 +- templates/de/html/admin/admin_amenu_edit.tpl | 6 +- .../de/html/admin/admin_amenu_edit_form.tpl | 25 +- templates/de/html/admin/admin_cache_stats.tpl | 23 +- .../de/html/admin/admin_config_active.tpl | 16 +- .../de/html/admin/admin_config_admin.tpl | 23 +- .../de/html/admin/admin_config_admins.tpl | 4 +- .../de/html/admin/admin_config_admins_del.tpl | 4 +- .../html/admin/admin_config_admins_edit.tpl | 4 +- .../de/html/admin/admin_config_autopurge.tpl | 67 +- templates/de/html/admin/admin_config_beg.tpl | 30 +- .../de/html/admin/admin_config_birthday.tpl | 8 +- .../de/html/admin/admin_config_bonus.tpl | 225 +- .../de/html/admin/admin_config_cache.tpl | 138 +- templates/de/html/admin/admin_config_cats.tpl | 4 +- .../de/html/admin/admin_config_cats_row.tpl | 2 +- .../de/html/admin/admin_config_doubler.tpl | 150 +- .../de/html/admin/admin_config_email.tpl | 4 +- .../de/html/admin/admin_config_email_del.tpl | 4 +- .../de/html/admin/admin_config_email_edit.tpl | 4 +- .../de/html/admin/admin_config_email_row.tpl | 2 +- .../de/html/admin/admin_config_extensions.tpl | 24 +- .../de/html/admin/admin_config_holiday.tpl | 22 +- templates/de/html/admin/admin_config_home.tpl | 2 +- .../de/html/admin/admin_config_home_row.tpl | 4 +- .../html/admin/admin_config_home_settings.tpl | 51 +- .../admin/admin_config_home_settings_pro.tpl | 45 +- .../de/html/admin/admin_config_mediadata.tpl | 6 +- templates/de/html/admin/admin_config_menu.tpl | 36 + .../de/html/admin/admin_config_newsletter.tpl | 26 +- .../de/html/admin/admin_config_nickname.tpl | 2 +- .../de/html/admin/admin_config_order.tpl | 99 +- .../de/html/admin/admin_config_order_form.tpl | 8 +- .../de/html/admin/admin_config_other.tpl | 232 +- .../de/html/admin/admin_config_payouts.tpl | 4 +- .../html/admin/admin_config_payouts_del.tpl | 6 +- .../html/admin/admin_config_payouts_edit.tpl | 4 +- .../admin/admin_config_point_settings.tpl | 12 +- .../de/html/admin/admin_config_primera.tpl | 12 +- .../de/html/admin/admin_config_proxy.tpl | 2 +- .../de/html/admin/admin_config_rallye_del.tpl | 22 +- .../html/admin/admin_config_rallye_edit.tpl | 32 +- .../html/admin/admin_config_rallye_prices.tpl | 25 +- .../de/html/admin/admin_config_refback.tpl | 2 +- .../de/html/admin/admin_config_refid.tpl | 14 +- .../de/html/admin/admin_config_reg_pro.tpl | 54 +- .../de/html/admin/admin_config_register.tpl | 4 +- .../de/html/admin/admin_config_register2.tpl | 29 +- .../de/html/admin/admin_config_removeip.tpl | 40 +- .../de/html/admin/admin_config_rewrite.tpl | 4 +- .../de/html/admin/admin_config_secure.tpl | 6 +- .../de/html/admin/admin_config_session.tpl | 2 +- .../de/html/admin/admin_config_sponsor.tpl | 6 +- .../de/html/admin/admin_config_stats.tpl | 45 +- .../de/html/admin/admin_config_sub_points.tpl | 24 +- .../de/html/admin/admin_config_surfbar.tpl | 40 +- .../de/html/admin/admin_config_title.tpl | 31 +- .../de/html/admin/admin_config_top10.tpl | 4 +- .../de/html/admin/admin_config_transfer.tpl | 50 +- templates/de/html/admin/admin_config_user.tpl | 25 +- .../de/html/admin/admin_config_wernis.tpl | 57 +- .../de/html/admin/admin_config_yoomedia.tpl | 22 +- .../de/html/admin/admin_contct_user_form.tpl | 2 +- templates/de/html/admin/admin_del_admins.tpl | 4 +- .../de/html/admin/admin_del_bank_packages.tpl | 2 +- templates/de/html/admin/admin_del_cats.tpl | 15 +- .../de/html/admin/admin_del_email_bonus.tpl | 10 +- .../de/html/admin/admin_del_email_normal.tpl | 10 +- .../de/html/admin/admin_del_email_notify.tpl | 10 +- .../de/html/admin/admin_del_payments.tpl | 4 +- templates/de/html/admin/admin_del_sponsor.tpl | 10 +- .../de/html/admin/admin_del_surfbar_urls.tpl | 2 +- .../html/admin/admin_del_surfbar_urls_row.tpl | 2 +- .../de/html/admin/admin_del_transfer_row.tpl | 6 +- templates/de/html/admin/admin_del_user.tpl | 2 +- templates/de/html/admin/admin_edit_admins.tpl | 4 +- .../html/admin/admin_edit_bank_packages.tpl | 2 +- .../admin/admin_edit_bank_packages_row.tpl | 6 +- templates/de/html/admin/admin_edit_cats.tpl | 4 +- templates/de/html/admin/admin_edit_email.tpl | 26 +- .../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 | 27 +- .../de/html/admin/admin_edit_rallyes.tpl | 12 +- .../admin/admin_edit_sponsor_add_points.tpl | 6 +- .../de/html/admin/admin_edit_sponsor_edit.tpl | 47 +- .../admin/admin_edit_sponsor_sub_points.tpl | 6 +- .../de/html/admin/admin_edit_surfbar_urls.tpl | 2 +- .../admin/admin_edit_surfbar_urls_row.tpl | 2 +- templates/de/html/admin/admin_edit_user.tpl | 79 +- .../de/html/admin/admin_email_archiv.tpl | 4 +- .../de/html/admin/admin_email_archiv_row.tpl | 4 +- .../de/html/admin/admin_email_nav_row.tpl | 8 +- .../de/html/admin/admin_ext_reg_form.tpl | 2 +- .../de/html/admin/admin_ext_sql_table.tpl | 2 +- templates/de/html/admin/admin_extensions.tpl | 4 +- .../de/html/admin/admin_extensions_delete.tpl | 4 +- .../admin/admin_extensions_delete_row_404.tpl | 8 + .../de/html/admin/admin_extensions_edit.tpl | 6 +- .../de/html/admin/admin_extensions_list.tpl | 23 +- .../de/html/admin/admin_gmenu_delete.tpl | 20 +- templates/de/html/admin/admin_gmenu_edit.tpl | 6 +- .../de/html/admin/admin_gmenu_edit_form.tpl | 22 +- .../de/html/admin/admin_gmenu_status.tpl | 21 +- templates/de/html/admin/admin_guest_add.tpl | 51 +- templates/de/html/admin/admin_list_admins.tpl | 4 +- .../de/html/admin/admin_list_autopurge.tpl | 4 +- .../html/admin/admin_list_autopurge_row.tpl | 8 +- .../de/html/admin/admin_list_bank_package.tpl | 4 +- templates/de/html/admin/admin_list_beg.tpl | 31 +- .../de/html/admin/admin_list_beg_form.tpl | 2 +- .../de/html/admin/admin_list_beg_rows.tpl | 8 +- templates/de/html/admin/admin_list_bonus.tpl | 33 +- .../admin/admin_list_bonus_emails_row.tpl | 2 +- .../de/html/admin/admin_list_bonus_form.tpl | 2 +- .../de/html/admin/admin_list_bonus_rows.tpl | 4 +- templates/de/html/admin/admin_list_cats.tpl | 11 +- .../de/html/admin/admin_list_cats_404.tpl | 10 +- .../de/html/admin/admin_list_country.tpl | 24 +- .../de/html/admin/admin_list_country_form.tpl | 10 +- .../de/html/admin/admin_list_country_row.tpl | 4 +- .../html/admin/admin_list_doubler_already.tpl | 2 +- .../admin/admin_list_doubler_overview.tpl | 36 +- .../html/admin/admin_list_doubler_waiting.tpl | 18 +- .../de/html/admin/admin_list_extensions.tpl | 23 +- .../html/admin/admin_list_extensions_row.tpl | 14 +- .../de/html/admin/admin_list_holiday.tpl | 4 +- .../de/html/admin/admin_list_holiday_row.tpl | 4 +- .../de/html/admin/admin_list_imprint.tpl | 27 + .../de/html/admin/admin_list_imprint_row.tpl | 11 + .../admin/admin_list_imprint_row_none.tpl | 5 + templates/de/html/admin/admin_list_links.tpl | 8 +- templates/de/html/admin/admin_list_mods.tpl | 24 + .../de/html/admin/admin_list_mods_row.tpl | 23 + .../admin/admin_list_notify_emails_row.tpl | 2 +- templates/de/html/admin/admin_list_online.tpl | 32 + .../de/html/admin/admin_list_online_row.tpl | 10 + .../de/html/admin/admin_list_payments.tpl | 14 +- .../de/html/admin/admin_list_payouts.tpl | 8 +- .../html/admin/admin_list_rallye_prices.tpl | 13 +- .../de/html/admin/admin_list_rallye_usr.tpl | 4 +- .../html/admin/admin_list_rallye_usr_row.tpl | 2 +- .../de/html/admin/admin_list_rallyes.tpl | 13 +- .../de/html/admin/admin_list_rallyes_row2.tpl | 2 +- templates/de/html/admin/admin_list_refs.tpl | 4 +- templates/de/html/admin/admin_list_refs2.tpl | 2 +- .../de/html/admin/admin_list_refs_level.tpl | 2 +- .../de/html/admin/admin_list_refs_norefs.tpl | 2 +- .../de/html/admin/admin_list_refs_row.tpl | 2 +- .../de/html/admin/admin_list_sponsor.tpl | 4 +- .../html/admin/admin_list_sponsor_details.tpl | 76 +- .../de/html/admin/admin_list_sponsor_pay.tpl | 4 +- .../html/admin/admin_list_sponsor_pay_del.tpl | 4 +- .../admin/admin_list_sponsor_pay_edit.tpl | 4 +- .../de/html/admin/admin_list_sponsor_row.tpl | 4 +- .../html/admin/admin_list_surfbar_actions.tpl | 2 +- .../admin/admin_list_surfbar_actions_row.tpl | 2 +- .../de/html/admin/admin_list_surfbar_urls.tpl | 2 +- .../admin/admin_list_surfbar_urls_row.tpl | 2 +- .../html/admin/admin_list_task_ext_rows.tpl | 4 +- .../de/html/admin/admin_list_task_rows.tpl | 4 +- templates/de/html/admin/admin_list_theme.tpl | 23 + .../de/html/admin/admin_list_theme_row.tpl | 13 + .../de/html/admin/admin_list_transfer.tpl | 8 +- .../de/html/admin/admin_list_transfer_row.tpl | 2 +- .../de/html/admin/admin_list_unconfirmed.tpl | 2 +- .../admin/admin_list_unconfirmed_list.tpl | 8 +- .../html/admin/admin_list_unconfirmed_row.tpl | 2 +- templates/de/html/admin/admin_list_user.tpl | 7 +- .../de/html/admin/admin_list_user_alpha.tpl | 2 +- .../de/html/admin/admin_list_user_pagenav.tpl | 2 +- .../de/html/admin/admin_list_user_row.tpl | 12 +- .../de/html/admin/admin_list_user_sort.tpl | 3 +- .../html/admin/admin_list_user_sort_form.tpl | 2 +- .../admin/admin_list_yoomedia_tm_already.tpl | 8 +- .../html/admin/admin_list_yoomedia_tm_row.tpl | 2 +- .../de/html/admin/admin_lock_sponsor.tpl | 8 +- .../de/html/admin/admin_lock_surfbar_urls.tpl | 2 +- .../admin/admin_lock_surfbar_urls_row.tpl | 2 +- templates/de/html/admin/admin_lock_user.tpl | 13 +- templates/de/html/admin/admin_login_form.tpl | 10 +- templates/de/html/admin/admin_logout_form.tpl | 2 +- .../de/html/admin/admin_maintenance_form.tpl | 18 +- templates/de/html/admin/admin_member_add.tpl | 51 +- .../html/admin/admin_member_selection_box.tpl | 8 +- .../de/html/admin/admin_menu_overview_row.tpl | 2 +- .../de/html/admin/admin_menu_unknown_okay.tpl | 7 +- templates/de/html/admin/admin_mini_online.tpl | 9 +- .../de/html/admin/admin_mmenu_delete.tpl | 23 +- templates/de/html/admin/admin_mmenu_edit.tpl | 22 +- .../de/html/admin/admin_mmenu_overview.tpl | 6 +- .../de/html/admin/admin_mmenu_status.tpl | 21 +- templates/de/html/admin/admin_mods_edit.tpl | 4 +- templates/de/html/admin/admin_mods_list.tpl | 25 +- .../de/html/admin/admin_mods_list_row.tpl | 24 +- templates/de/html/admin/admin_mods_stats.tpl | 2 +- templates/de/html/admin/admin_mods_stats2.tpl | 2 +- templates/de/html/admin/admin_newsletter.tpl | 18 +- .../de/html/admin/admin_newsletter_nohtml.tpl | 6 +- .../de/html/admin/admin_newsletter_tsk.tpl | 6 +- .../de/html/admin/admin_online_footer.tpl | 5 +- .../de/html/admin/admin_online_header.tpl | 29 +- templates/de/html/admin/admin_online_list.tpl | 1 + templates/de/html/admin/admin_online_row.tpl | 1 + templates/de/html/admin/admin_optimize.tpl | 26 +- templates/de/html/admin/admin_other_sqls.tpl | 8 + .../de/html/admin/admin_other_sqls_row.tpl | 7 + .../de/html/admin/admin_overview_footer.tpl | 12 + .../html/admin/admin_overview_header_task.tpl | 2 +- .../de/html/admin/admin_overview_list.tpl | 2 +- .../admin/admin_overview_list_ext_rows.tpl | 8 +- .../html/admin/admin_overview_list_rows.tpl | 8 +- .../de/html/admin/admin_overview_row.tpl | 3 +- .../de/html/admin/admin_overview_table.tpl | 2 +- .../de/html/admin/admin_overview_task.tpl | 65 +- .../html/admin/admin_overview_task_rows.tpl | 14 +- templates/de/html/admin/admin_patches.tpl | 33 +- templates/de/html/admin/admin_patches_row.tpl | 15 +- .../de/html/admin/admin_payments_list_row.tpl | 2 +- .../html/admin/admin_payout_accept_form.tpl | 20 +- .../de/html/admin/admin_payout_add_new.tpl | 2 +- .../html/admin/admin_payout_overview_form.tpl | 4 +- .../html/admin/admin_payout_reject_form.tpl | 21 +- templates/de/html/admin/admin_points.tpl | 4 +- templates/de/html/admin/admin_points_del.tpl | 10 +- .../de/html/admin/admin_points_del_row.tpl | 6 +- templates/de/html/admin/admin_points_edit.tpl | 15 +- .../de/html/admin/admin_points_edit_row.tpl | 6 +- templates/de/html/admin/admin_points_row.tpl | 6 +- templates/de/html/admin/admin_refbanner.tpl | 4 +- .../de/html/admin/admin_refbanner_edit.tpl | 4 +- .../de/html/admin/admin_refbanner_row.tpl | 2 +- templates/de/html/admin/admin_reg.tpl | 7 +- templates/de/html/admin/admin_reg_form.tpl | 10 +- templates/de/html/admin/admin_reg_row.tpl | 4 +- .../de/html/admin/admin_reset_password.tpl | 2 +- .../html/admin/admin_reset_password_form.tpl | 2 +- .../de/html/admin/admin_send_bonus_form.tpl | 52 +- .../de/html/admin/admin_send_bonus_select.tpl | 8 +- .../de/html/admin/admin_send_reset_link.tpl | 2 +- .../de/html/admin/admin_send_yoomedia.tpl | 4 +- .../de/html/admin/admin_sponsor_paytypes.tpl | 4 +- templates/de/html/admin/admin_sub_points.tpl | 28 +- .../de/html/admin/admin_sub_points_all.tpl | 2 +- .../admin/admin_surfbar_url_stats_row.tpl | 2 +- .../de/html/admin/admin_task_holiday.tpl | 2 +- templates/de/html/admin/admin_theme_edit.tpl | 4 +- .../de/html/admin/admin_theme_import.tpl | 2 +- .../de/html/admin/admin_theme_import_form.tpl | 2 +- templates/de/html/admin/admin_theme_list.tpl | 24 +- .../admin/admin_undelete_surfbar_urls.tpl | 2 +- .../admin/admin_undelete_surfbar_urls_row.tpl | 2 +- .../de/html/admin/admin_unlock_emails.tpl | 23 +- .../html/admin/admin_unlock_emails_redir.tpl | 4 +- .../de/html/admin/admin_unlock_sponsor.tpl | 10 +- .../html/admin/admin_unlock_surfbar_urls.tpl | 2 +- .../admin/admin_unlock_surfbar_urls_row.tpl | 2 +- .../de/html/admin/admin_update_download.tpl | 4 +- .../de/html/admin/admin_user_details.tpl | 138 +- .../admin/admin_validate_reset_hash_form.tpl | 2 +- templates/de/html/agb.tpl | 6 +- templates/de/html/beg/.htaccess | 2 +- templates/de/html/beg/beg_done.tpl | 4 +- templates/de/html/beg/beg_failed.tpl | 4 +- templates/de/html/beg/beg_link.tpl | 17 +- templates/de/html/beg/beg_login.tpl | 4 +- templates/de/html/beg/beg_pay_mode_both.tpl | 2 +- templates/de/html/birthday/.htaccess | 2 +- .../de/html/birthday/birthday_confirm.tpl | 2 +- templates/de/html/css_inline.tpl | 5 + templates/de/html/doubler/.htaccess | 2 +- templates/de/html/doubler/doubler_index.tpl | 38 +- templates/de/html/ext/.htaccess | 2 +- templates/de/html/ext/ext_autoreg.tpl | 28 + templates/de/html/ext/ext_bonus.tpl | 2 +- templates/de/html/ext/ext_cache.tpl | 2 +- templates/de/html/ext/ext_country.tpl | 2 +- templates/de/html/ext/ext_debug.tpl | 16 +- templates/de/html/ext/ext_demo.tpl | 2 +- templates/de/html/ext/ext_imprint.tpl | 2 +- templates/de/html/ext/ext_iso3166.tpl | 2 + templates/de/html/ext/ext_jackpot.tpl | 3 + templates/de/html/ext/ext_lead.tpl | 4 +- templates/de/html/ext/ext_maintenance.tpl | 2 +- templates/de/html/ext/ext_menu.tpl | 2 +- templates/de/html/ext/ext_mydata.tpl | 2 +- templates/de/html/ext/ext_newsletter.tpl | 40 +- templates/de/html/ext/ext_other.tpl | 2 +- templates/de/html/ext/ext_primera.tpl | 2 +- templates/de/html/ext/ext_register.tpl | 2 +- templates/de/html/ext/ext_removeip.tpl | 4 +- templates/de/html/ext/ext_rewrite.tpl | 15 +- templates/de/html/ext/ext_safe.tpl | 2 +- templates/de/html/ext/ext_sponsor.tpl | 6 +- templates/de/html/ext/ext_transfer.tpl | 4 +- templates/de/html/ext/ext_wernis.tpl | 2 +- templates/de/html/ext/ext_yoomedia.tpl | 3 +- templates/de/html/fatal_errors.tpl | 7 + templates/de/html/fatal_footer.tpl | 4 +- templates/de/html/fatal_header.tpl | 2 +- templates/de/html/guest/.htaccess | 2 +- templates/de/html/guest/guest_active_row.tpl | 4 +- .../de/html/guest/guest_active_table.tpl | 2 +- templates/de/html/guest/guest_beg.tpl | 8 +- templates/de/html/guest/guest_cat_table.tpl | 2 +- .../de/html/guest/guest_confirm_link.tpl | 18 +- .../de/html/guest/guest_confirm_table.tpl | 4 +- templates/de/html/guest/guest_doubler.tpl | 74 +- .../de/html/guest/guest_doubler_list_rows.tpl | 2 +- templates/de/html/guest/guest_frametester.tpl | 8 +- templates/de/html/guest/guest_login.tpl | 6 +- .../de/html/guest/guest_nickname_login.tpl | 11 +- .../de/html/guest/guest_rallye_footer.tpl | 4 +- templates/de/html/guest/guest_rallye_show.tpl | 36 +- .../de/html/guest/guest_receive_table.tpl | 2 +- templates/de/html/guest/guest_register.tpl | 101 +- .../de/html/guest/guest_sponsor_activate.tpl | 2 +- .../guest/guest_sponsor_infos_none_row.tpl | 2 +- .../de/html/guest/guest_sponsor_login.tpl | 4 +- .../de/html/guest/guest_sponsor_lost.tpl | 7 +- templates/de/html/guest/guest_sponsor_reg.tpl | 61 +- .../de/html/guest/guest_stats_header.tpl | 3 + .../de/html/guest/guest_stats_member.tpl | 40 +- templates/de/html/guest/guest_stats_row.tpl | 4 + templates/de/html/guest/guest_stats_table.tpl | 11 + templates/de/html/guest/guest_top10.tpl | 12 +- .../de/html/guest/guest_top10_empty4.tpl | 3 +- .../de/html/guest/guest_top10_empty5.tpl | 3 +- .../de/html/guest/guest_top10_row_earner.tpl | 4 +- .../de/html/guest/guest_top10_row_login.tpl | 9 +- .../de/html/guest/guest_top10_row_refs.tpl | 4 +- templates/de/html/index.tpl | 16 +- templates/de/html/index_forward.tpl | 11 +- templates/de/html/install/.htaccess | 2 +- .../de/html/install/install_fatal_errors.tpl | 12 +- .../de/html/install/install_finished.tpl | 2 +- templates/de/html/install/install_footer.tpl | 2 +- templates/de/html/install/install_header.tpl | 6 +- templates/de/html/install/install_main.tpl | 7 + templates/de/html/install/install_page1.tpl | 4 +- templates/de/html/install/install_page2.tpl | 20 +- templates/de/html/install/install_page3.tpl | 34 +- templates/de/html/install/install_page5.tpl | 24 +- templates/de/html/install/install_welcome.tpl | 10 +- templates/de/html/js/.htaccess | 2 +- templates/de/html/js/js_order_send.tpl | 24 + .../de/html/js/js_surfbar_member_book.tpl | 40 + .../de/html/js/js_surfbar_member_edit.tpl | 44 + templates/de/html/js/js_surfbar_stopped.tpl | 33 + templates/de/html/js/js_uberwach.tpl | 6 +- templates/de/html/lead_code.tpl | 2 +- templates/de/html/loader.tpl | 17 +- templates/de/html/login_failed_js.tpl | 10 +- templates/de/html/login_failtures.tpl | 10 +- templates/de/html/login_failures.tpl | 9 + templates/de/html/mailid/.htaccess | 2 +- .../de/html/mailid/mailid_confirm_buttom.tpl | 4 +- .../de/html/mailid/mailid_enter_code.tpl | 4 +- templates/de/html/mailid/mailid_frames.tpl | 2 +- .../de/html/mailid/mailid_points_done2.tpl | 23 +- .../de/html/mailid/mailid_points_lcoked2.tpl | 2 +- .../de/html/mailid/mailid_points_locked2.tpl | 21 +- templates/de/html/mailid/mailid_timer.tpl | 20 +- templates/de/html/mediadata.tpl | 70 +- templates/de/html/member/.htaccess | 2 +- templates/de/html/member/member_beg.tpl | 10 +- templates/de/html/member/member_bonus.tpl | 4 +- templates/de/html/member/member_bonus_row.tpl | 4 +- templates/de/html/member/member_cat_row.tpl | 2 +- .../de/html/member/member_cats_header.tpl | 10 +- templates/de/html/member/member_doubler.tpl | 35 +- .../html/member/member_doubler_list_rows.tpl | 2 +- .../html/member/member_holiday_deactivate.tpl | 8 +- .../de/html/member/member_holiday_form.tpl | 8 +- .../html/member/member_html_mail_settings.tpl | 2 +- templates/de/html/member/member_list_beg.tpl | 6 +- .../de/html/member/member_list_beg_row.tpl | 4 +- templates/de/html/member/member_login_js.tpl | 2 +- .../html/member/member_mail_bonus_deleted.tpl | 1 - .../de/html/member/member_mail_bonus_send.tpl | 2 +- .../html/member/member_mail_normal_send.tpl | 2 +- .../de/html/member/member_mydata_button.tpl | 2 +- .../de/html/member/member_mydata_edit.tpl | 39 +- .../de/html/member/member_mydata_locked.tpl | 5 +- .../de/html/member/member_mydata_overview.tpl | 33 +- .../de/html/member/member_newsletter.tpl | 24 +- .../de/html/member/member_newsletter_note.tpl | 18 +- .../de/html/member/member_nickname_form.tpl | 2 +- .../de/html/member/member_order-back.tpl | 2 +- .../de/html/member/member_order_back.tpl | 2 +- .../html/member/member_order_frametester.tpl | 6 +- .../de/html/member/member_order_page1.tpl | 13 +- .../de/html/member/member_order_page2.tpl | 47 +- .../de/html/member/member_order_points.tpl | 15 +- .../de/html/member/member_order_send.tpl | 33 +- templates/de/html/member/member_payout.tpl | 6 +- .../de/html/member/member_payout_form.tpl | 51 +- .../html/member/member_payout_form_banner.tpl | 44 +- templates/de/html/member/member_points.tpl | 58 +- .../member/member_points_bonus_disabled.tpl | 5 +- .../html/member/member_points_bonus_rows.tpl | 28 +- .../de/html/member/member_points_row.tpl | 5 +- .../de/html/member/member_points_upgrade.tpl | 4 +- templates/de/html/member/member_primera.tpl | 18 +- .../html/member/member_primera_mode_pay.tpl | 11 +- .../de/html/member/member_receive_table.tpl | 2 +- .../de/html/member/member_refback_edit.tpl | 2 +- .../html/member/member_refback_list_row.tpl | 2 +- .../member_refback_list_row_deleted.tpl | 2 +- .../de/html/member/member_reflinks_table.tpl | 7 +- .../de/html/member/member_support_form.tpl | 6 +- .../member/member_surfbar_book_dynamic.tpl | 54 +- .../html/member/member_surfbar_book_static.tp | 63 - .../member/member_surfbar_book_static.tpl | 50 +- .../member_surfbar_delete_action_form.tpl | 2 +- .../member_surfbar_edit_action_form.tpl | 61 +- .../html/member/member_surfbar_list_form.tpl | 2 +- templates/de/html/member/member_themes.tpl | 12 +- .../de/html/member/member_transfer_list.tpl | 28 +- .../de/html/member/member_transfer_new.tpl | 52 +- .../html/member/member_transfer_overview.tpl | 20 +- .../de/html/member/member_transfer_row.tpl | 2 +- .../de/html/member/member_transfer_row2.tpl | 2 +- .../html/member/member_transfer_settings.tpl | 21 +- .../de/html/member/member_unconfirmed_row.tpl | 2 +- .../member_unconfirmed_row_nopoints.tpl | 2 +- .../html/member/member_unconfirmed_table.tpl | 4 +- .../member_unconfirmed_table_nopoints.tpl | 2 +- templates/de/html/member/member_wernis.tpl | 18 +- .../html/member/member_wernis_mode_payout.tpl | 2 +- .../member/member_wernis_mode_withdraw.tpl | 2 +- .../de/html/member/member_wernis_row.tpl | 7 +- templates/de/html/menu/.htaccess | 1 + .../de/html/menu/menu_guest_advert_end.tpl | 6 + .../de/html/menu/menu_guest_advert_main.tpl | 6 + .../html/menu/menu_guest_advert_members.tpl | 6 + .../de/html/menu/menu_guest_advert_online.tpl | 6 + .../html/menu/menu_member_advert_account.tpl | 6 + .../de/html/menu/menu_member_advert_bank.tpl | 6 + .../de/html/menu/menu_member_advert_end.tpl | 6 + .../html/menu/menu_member_advert_extras.tpl | 6 + .../de/html/menu/menu_member_advert_main.tpl | 6 + .../de/html/menu/menu_member_advert_order.tpl | 6 + .../de/html/menu/menu_member_advert_rals.tpl | 6 + .../de/html/menu/menu_member_advert_stats.tpl | 6 + .../html/menu/menu_member_advert_surfbar.tpl | 6 + .../html/menu/menu_member_advert_themes.tpl | 6 + templates/de/html/menu/menu_seperator.tpl | 1 + templates/de/html/menu/menu_table.tpl | 3 + templates/de/html/menu/menu_what_begin.tpl | 2 + templates/de/html/menu/menu_what_end.tpl | 2 + templates/de/html/page_header.tpl | 2 +- templates/de/html/profile-update.tpl | 6 +- templates/de/html/rallye/.htaccess | 2 +- templates/de/html/redirect_url.tpl | 2 +- templates/de/html/register_header.tpl | 2 +- templates/de/html/removeip_level.tpl | 2 +- templates/de/html/show_bonus.tpl | 2 +- templates/de/html/show_bonus_msg.tpl | 6 +- templates/de/html/show_bonus_yr.tpl | 9 +- templates/de/html/show_timings.tpl | 7 +- .../de/html/sponsor/sponsor_account_form.tpl | 8 +- .../de/html/sponsor/sponsor_fillup_form.tpl | 2 +- templates/de/html/sponsor/sponsor_main.tpl | 10 +- .../de/html/sponsor/sponsor_settings_form.tpl | 20 +- templates/de/html/sponsor/sponsor_welcome.tpl | 4 +- templates/de/html/surfbar/.htaccess | 2 +- .../de/html/surfbar/surfbar_frame_stats.tpl | 2 +- .../html/surfbar/surfbar_frame_textlinks.tpl | 13 +- .../de/html/surfbar/surfbar_frame_top.tpl | 5 +- .../de/html/surfbar/surfbar_frameset.tpl | 2 +- .../de/html/surfbar/surfbar_login_form.tpl | 2 +- templates/de/html/surfbar/surfbar_stopped.tpl | 40 +- templates/de/html/task/.htaccess | 2 +- .../de/html/task/task_ext_deactivated.tpl | 2 +- templates/de/html/theme/.htaccess | 2 +- templates/de/html/theme/theme_one.tpl | 2 +- templates/de/html/theme/theme_select_form.tpl | 2 +- templates/de/html/uberwach/.htaccess | 2 +- .../de/html/uberwach/uberwach_snippet.tpl | 2 +- templates/de/html/welcome.tpl | 26 +- templates/en/html/admin/admin_welcome.tpl | 2 +- templates/en/html/mailid/.htaccess | 2 +- theme/business/css/active.css | 4 +- theme/business/css/beg.css | 2 +- theme/business/css/bonus.css | 2 +- theme/business/css/doubler.css | 2 +- theme/business/css/general.css | 70 +- theme/business/css/imprint.css | 20 + theme/business/css/install.css | 8 +- theme/business/css/register.css | 2 +- theme/business/css/sponsor.css | 4 +- theme/business/css/surfbar.css | 2 +- theme/business/css/top10.css | 6 +- theme/business/css/transfer.css | 6 +- theme/business/theme.php | 15 +- theme/default/css/active.css | 4 +- theme/default/css/beg.css | 2 +- theme/default/css/bonus.css | 2 +- theme/default/css/doubler.css | 2 +- theme/default/css/general.css | 74 +- theme/default/css/imprint.css | 20 + theme/default/css/install.css | 2 +- theme/default/css/register.css | 2 +- theme/default/css/sponsor.css | 4 +- theme/default/css/surfbar.css | 2 +- theme/default/css/top10.css | 6 +- theme/default/css/transfer.css | 6 +- theme/default/theme.php | 15 +- theme/desert/css/active.css | 2 +- theme/desert/css/general.css | 82 +- theme/desert/css/imprint.css | 20 + theme/desert/css/install.css | 4 +- theme/desert/css/paidlinks.css | 1 - theme/desert/css/sponsor.css | 2 +- theme/desert/css/top10.css | 4 +- theme/desert/css/transfer.css | 4 +- theme/desert/theme.php | 15 +- view.php | 14 +- 1265 files changed, 32964 insertions(+), 30778 deletions(-) create mode 100644 DOCS/Doxyfile mode change 100644 => 100755 DOCS/final-checker.sh mode change 100644 => 100755 DOCS/prop-set.sh mode change 100644 => 100755 DOCS/todo-builder.sh mode change 100644 => 100755 DOCS/validator.sh create mode 100644 inc/classes/.htaccess create mode 100644 inc/classes/cachesystem.class.php create mode 100644 inc/classes/rdf.class.php create mode 100644 inc/extensions-functions.php create mode 100644 inc/extensions/ext-autoreg.php create mode 100644 inc/extensions/ext-jackpot.php create mode 100644 inc/filter-functions.php create mode 100644 inc/fix_menu.php create mode 100644 inc/install-functions.php create mode 100644 inc/js/js- create mode 100644 inc/js/js-order_send.php create mode 100644 inc/js/js-surfbar_member_book.php create mode 100644 inc/js/js-surfbar_member_edit.php create mode 100644 inc/js/js-surfbar_stopped.php create mode 100644 inc/language/imprint_de.php create mode 100644 inc/language/menu_de.php create mode 100644 inc/libs/jackpot_functions.php create mode 100644 inc/libs/other_functions.php create mode 100644 inc/loader/load_cache- create mode 100644 inc/loader/load_cache-extension.php create mode 100644 inc/loader/load_cache-impressum.php create mode 100644 inc/loader/load_cache-modules.php create mode 100644 inc/mails/doubler_mails.php create mode 100644 inc/modules/admin/what-config_ create mode 100644 inc/modules/admin/what-config_imprint.php create mode 100644 inc/modules/admin/what-config_menu.php create mode 100644 inc/pool/pool- create mode 100644 inc/reset/reset_100_bonus.php create mode 100644 inc/reset/reset_autopurge.php create mode 100644 inc/reset/reset_birthday.php create mode 100644 inc/reset/reset_doubler.php create mode 100644 inc/reset/reset_profile.php create mode 100644 inc/sql-functions.php create mode 100644 inc/stats-functions.php create mode 100644 templates/de/html/admin/admin_add_reflevel.tpl create mode 100644 templates/de/html/admin/admin_config_menu.tpl create mode 100644 templates/de/html/admin/admin_extensions_delete_row_404.tpl create mode 100644 templates/de/html/admin/admin_list_imprint.tpl create mode 100644 templates/de/html/admin/admin_list_imprint_row.tpl create mode 100644 templates/de/html/admin/admin_list_imprint_row_none.tpl create mode 100644 templates/de/html/admin/admin_list_mods.tpl create mode 100644 templates/de/html/admin/admin_list_mods_row.tpl create mode 100644 templates/de/html/admin/admin_list_online.tpl create mode 100644 templates/de/html/admin/admin_list_online_row.tpl create mode 100644 templates/de/html/admin/admin_list_theme.tpl create mode 100644 templates/de/html/admin/admin_list_theme_row.tpl create mode 100644 templates/de/html/admin/admin_online_list.tpl create mode 100644 templates/de/html/admin/admin_online_row.tpl create mode 100644 templates/de/html/admin/admin_other_sqls.tpl create mode 100644 templates/de/html/admin/admin_other_sqls_row.tpl create mode 100644 templates/de/html/admin/admin_overview_footer.tpl create mode 100644 templates/de/html/css_inline.tpl create mode 100644 templates/de/html/ext/ext_autoreg.tpl create mode 100644 templates/de/html/ext/ext_iso3166.tpl create mode 100644 templates/de/html/ext/ext_jackpot.tpl create mode 100644 templates/de/html/fatal_errors.tpl create mode 100644 templates/de/html/guest/guest_stats_header.tpl create mode 100644 templates/de/html/guest/guest_stats_row.tpl create mode 100644 templates/de/html/guest/guest_stats_table.tpl create mode 100644 templates/de/html/install/install_main.tpl create mode 100644 templates/de/html/js/js_order_send.tpl create mode 100644 templates/de/html/js/js_surfbar_member_book.tpl create mode 100644 templates/de/html/js/js_surfbar_member_edit.tpl create mode 100644 templates/de/html/js/js_surfbar_stopped.tpl create mode 100644 templates/de/html/login_failures.tpl delete mode 100644 templates/de/html/member/member_surfbar_book_static.tp create mode 100644 templates/de/html/menu/.htaccess create mode 100644 templates/de/html/menu/menu_guest_advert_end.tpl create mode 100644 templates/de/html/menu/menu_guest_advert_main.tpl create mode 100644 templates/de/html/menu/menu_guest_advert_members.tpl create mode 100644 templates/de/html/menu/menu_guest_advert_online.tpl create mode 100644 templates/de/html/menu/menu_member_advert_account.tpl create mode 100644 templates/de/html/menu/menu_member_advert_bank.tpl create mode 100644 templates/de/html/menu/menu_member_advert_end.tpl create mode 100644 templates/de/html/menu/menu_member_advert_extras.tpl create mode 100644 templates/de/html/menu/menu_member_advert_main.tpl create mode 100644 templates/de/html/menu/menu_member_advert_order.tpl create mode 100644 templates/de/html/menu/menu_member_advert_rals.tpl create mode 100644 templates/de/html/menu/menu_member_advert_stats.tpl create mode 100644 templates/de/html/menu/menu_member_advert_surfbar.tpl create mode 100644 templates/de/html/menu/menu_member_advert_themes.tpl create mode 100644 templates/de/html/menu/menu_seperator.tpl create mode 100644 templates/de/html/menu/menu_table.tpl create mode 100644 templates/de/html/menu/menu_what_begin.tpl create mode 100644 templates/de/html/menu/menu_what_end.tpl create mode 100644 theme/business/css/imprint.css create mode 100644 theme/default/css/imprint.css create mode 100644 theme/desert/css/imprint.css diff --git a/.gitattributes b/.gitattributes index 341f3964cb..0321e55566 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ * text=auto !eol /.htaccess -text +DOCS/Doxyfile -text DOCS/INSTALL.txt -text DOCS/LICENSE.txt -text DOCS/README -text @@ -92,6 +93,9 @@ inc/autopurge/purge-tsks.php -text inc/autopurge/purge-unconfirmed.php -text inc/cache/.htaccess -text inc/check-reset.php -text +inc/classes/.htaccess -text +inc/classes/cachesystem.class.php -text +inc/classes/rdf.class.php -text inc/config-functions.php -text inc/config-global.php -text inc/config-local.php.dist -text @@ -105,6 +109,7 @@ inc/debug/relay/.htaccess -text inc/debug/request_ -text inc/debug/server/.htaccess -text inc/doubler_send.php -text +inc/extensions-functions.php -text inc/extensions.php -text inc/extensions/.htaccess -text inc/extensions/ext- -text @@ -113,6 +118,7 @@ inc/extensions/ext-admins.php -text inc/extensions/ext-admintheme1.php -text inc/extensions/ext-admintheme_default.php -text inc/extensions/ext-autopurge.php -text +inc/extensions/ext-autoreg.php -text inc/extensions/ext-bank.php -text inc/extensions/ext-beg.php -text inc/extensions/ext-birthday.php -text @@ -128,6 +134,7 @@ inc/extensions/ext-holiday.php -text inc/extensions/ext-html_mail.php -text inc/extensions/ext-imprint.php -text inc/extensions/ext-iso3166.php -text +inc/extensions/ext-jackpot.php -text inc/extensions/ext-lead.php -text inc/extensions/ext-logs.php -text inc/extensions/ext-mailid.php -text @@ -168,8 +175,10 @@ inc/extensions/ext-user.php -text inc/extensions/ext-wernis.php -text inc/extensions/ext-yoomedia.php -text inc/fatal_errors.php -text +inc/filter-functions.php -text inc/filters.php -text inc/fix_filters.php -text +inc/fix_menu.php -text inc/footer.php -text inc/functions.php -text inc/gen_mediadata.php -text @@ -179,8 +188,14 @@ inc/handler.php -text inc/header.php -text inc/hooks.php -text inc/img/.htaccess -text +inc/install-functions.php -text inc/install-inc.php -text inc/js/.htaccess -text +inc/js/js- -text +inc/js/js-order_send.php -text +inc/js/js-surfbar_member_book.php -text +inc/js/js-surfbar_member_edit.php -text +inc/js/js-surfbar_stopped.php -text inc/js/js-uberwach.php -text inc/language-functions.php -text inc/language/.htaccess -text @@ -201,11 +216,13 @@ inc/language/doubler_de.php -text inc/language/en.php -text inc/language/holiday_de.php -text inc/language/html_mail_de.php -text +inc/language/imprint_de.php -text inc/language/install_de.php -text inc/language/logs_de.php -text inc/language/mailid_de.php -text inc/language/maintenance_de.php -text inc/language/mediadata_de.php -text +inc/language/menu_de.php -text inc/language/mods_de.php -text inc/language/newsletter_de.php -text inc/language/nickname_de.php -text @@ -246,12 +263,14 @@ inc/libs/doubler_functions.php -text inc/libs/events_functions.php -text inc/libs/holiday_functions.php -text inc/libs/html_mail_functions.php -text +inc/libs/jackpot_functions.php -text inc/libs/mediadata_functions.php -text inc/libs/newsletter_functions.php -text inc/libs/nickname_functions.php -text inc/libs/online_functions.php -text inc/libs/optimize_functions.php -text inc/libs/order_functions.php -text +inc/libs/other_functions.php -text inc/libs/payout_functions.php -text inc/libs/primera_functions.php -text inc/libs/rallye_functions.php -text @@ -273,10 +292,14 @@ inc/load_cache.php -text inc/load_config.php -text inc/load_extensions.php -text inc/loader/.htaccess -text +inc/loader/load_cache- -text inc/loader/load_cache-admin.php -text inc/loader/load_cache-config.php -text +inc/loader/load_cache-extension.php -text inc/loader/load_cache-filter.php -text +inc/loader/load_cache-impressum.php -text inc/loader/load_cache-modreg.php -text +inc/loader/load_cache-modules.php -text inc/loader/load_cache-refdepths.php -text inc/loader/load_cache-refsystem.php -text inc/loader/load_cache-them.php -text @@ -285,6 +308,7 @@ inc/mails/_mails.php -text inc/mails/beg_mails.php -text inc/mails/birthday_mails.php -text inc/mails/bonus_mails.php -text +inc/mails/doubler_mails.php -text inc/modules/.htaccess -text inc/modules/admin.php -text inc/modules/admin/.htaccess -text @@ -332,6 +356,7 @@ inc/modules/admin/what-admins_mails.php -text inc/modules/admin/what-bonus.php -text inc/modules/admin/what-cache_stats.php -text inc/modules/admin/what-chk_regs.php -text +inc/modules/admin/what-config_ -text inc/modules/admin/what-config_active.php -text inc/modules/admin/what-config_admin.php -text inc/modules/admin/what-config_admins.php -text @@ -346,7 +371,9 @@ inc/modules/admin/what-config_email.php -text inc/modules/admin/what-config_extensions.php -text inc/modules/admin/what-config_holiday.php -text inc/modules/admin/what-config_home.php -text +inc/modules/admin/what-config_imprint.php -text inc/modules/admin/what-config_mediadata.php -text +inc/modules/admin/what-config_menu.php -text inc/modules/admin/what-config_mods.php -text inc/modules/admin/what-config_newsletter.php -text inc/modules/admin/what-config_nickname.php -text @@ -612,6 +639,7 @@ inc/phpmailer/test/phpunit.php -text inc/phpmailer/test/test.png -text inc/pool-update.php -text inc/pool/.htaccess -text +inc/pool/pool- -text inc/pool/pool-bonus.php -text inc/pool/pool-user.php -text inc/profile-updte.php -text @@ -619,17 +647,24 @@ inc/rdf.class.php -text inc/request-functions.php -text inc/reset/.htaccess -text inc/reset/reset_ -text +inc/reset/reset_100_bonus.php -text +inc/reset/reset_autopurge.php -text inc/reset/reset_beg.php -text +inc/reset/reset_birthday.php -text inc/reset/reset_bonus.php -text inc/reset/reset_daily.php -text +inc/reset/reset_doubler.php -text inc/reset/reset_engine.php -text inc/reset/reset_holiday.php -text +inc/reset/reset_profile.php -text inc/reset/reset_surfbar.php -text inc/reset/reset_yoomedia.php -text inc/security.php -text inc/session-functions.php -text inc/session.php -text +inc/sql-functions.php -text inc/sql_error.php -text +inc/stats-functions.php -text inc/stats_bonus.php -text inc/stylesheet.php -text inc/weekly/.htaccess -text @@ -853,6 +888,7 @@ templates/de/html/admin/admin_add_points.tpl -text templates/de/html/admin/admin_add_points_all.tpl -text templates/de/html/admin/admin_add_rallye.tpl -text templates/de/html/admin/admin_add_rallye_prices.tpl -text +templates/de/html/admin/admin_add_reflevel.tpl -text templates/de/html/admin/admin_add_reflvl.tpl -text templates/de/html/admin/admin_add_sponsor.tpl -text templates/de/html/admin/admin_add_sponsor_already.tpl -text @@ -905,6 +941,7 @@ templates/de/html/admin/admin_config_home_row.tpl -text templates/de/html/admin/admin_config_home_settings.tpl -text templates/de/html/admin/admin_config_home_settings_pro.tpl -text templates/de/html/admin/admin_config_mediadata.tpl -text +templates/de/html/admin/admin_config_menu.tpl -text templates/de/html/admin/admin_config_newsletter.tpl -text templates/de/html/admin/admin_config_nickname.tpl -text templates/de/html/admin/admin_config_order.tpl -text @@ -992,6 +1029,7 @@ templates/de/html/admin/admin_ext_sql_table.tpl -text templates/de/html/admin/admin_extensions.tpl -text templates/de/html/admin/admin_extensions_delete.tpl -text templates/de/html/admin/admin_extensions_delete_row.tpl -text +templates/de/html/admin/admin_extensions_delete_row_404.tpl -text templates/de/html/admin/admin_extensions_edit.tpl -text templates/de/html/admin/admin_extensions_edit_row.tpl -text templates/de/html/admin/admin_extensions_installed.tpl -text @@ -1038,11 +1076,18 @@ templates/de/html/admin/admin_list_extensions.tpl -text templates/de/html/admin/admin_list_extensions_row.tpl -text templates/de/html/admin/admin_list_holiday.tpl -text templates/de/html/admin/admin_list_holiday_row.tpl -text +templates/de/html/admin/admin_list_imprint.tpl -text +templates/de/html/admin/admin_list_imprint_row.tpl -text +templates/de/html/admin/admin_list_imprint_row_none.tpl -text templates/de/html/admin/admin_list_links.tpl -text templates/de/html/admin/admin_list_links_problem.tpl -text templates/de/html/admin/admin_list_links_row.tpl -text +templates/de/html/admin/admin_list_mods.tpl -text +templates/de/html/admin/admin_list_mods_row.tpl -text templates/de/html/admin/admin_list_notify_emails.tpl -text templates/de/html/admin/admin_list_notify_emails_row.tpl -text +templates/de/html/admin/admin_list_online.tpl -text +templates/de/html/admin/admin_list_online_row.tpl -text templates/de/html/admin/admin_list_payments.tpl -text templates/de/html/admin/admin_list_payouts.tpl -text templates/de/html/admin/admin_list_payouts_banner.tpl -text @@ -1079,6 +1124,8 @@ templates/de/html/admin/admin_list_surfbar_urls.tpl -text templates/de/html/admin/admin_list_surfbar_urls_row.tpl -text templates/de/html/admin/admin_list_task_ext_rows.tpl -text templates/de/html/admin/admin_list_task_rows.tpl -text +templates/de/html/admin/admin_list_theme.tpl -text +templates/de/html/admin/admin_list_theme_row.tpl -text templates/de/html/admin/admin_list_transfer.tpl -text templates/de/html/admin/admin_list_transfer_row.tpl -text templates/de/html/admin/admin_list_unconfirmed.tpl -text @@ -1138,8 +1185,13 @@ templates/de/html/admin/admin_newsletter_tsk.tpl -text templates/de/html/admin/admin_next_link.tpl -text templates/de/html/admin/admin_online_footer.tpl -text templates/de/html/admin/admin_online_header.tpl -text +templates/de/html/admin/admin_online_list.tpl -text +templates/de/html/admin/admin_online_row.tpl -text templates/de/html/admin/admin_optimize.tpl -text templates/de/html/admin/admin_optimize_row.tpl -text +templates/de/html/admin/admin_other_sqls.tpl -text +templates/de/html/admin/admin_other_sqls_row.tpl -text +templates/de/html/admin/admin_overview_footer.tpl -text templates/de/html/admin/admin_overview_footer_task.tpl -text templates/de/html/admin/admin_overview_header_task.tpl -text templates/de/html/admin/admin_overview_list.tpl -text @@ -1226,6 +1278,7 @@ templates/de/html/birthday/birthday_header.tpl -text templates/de/html/birthday/birthday_msg.tpl -text templates/de/html/copyright.tpl -text templates/de/html/copyright_backlink.tpl -text +templates/de/html/css_inline.tpl -text templates/de/html/doubler/.htaccess -text templates/de/html/doubler/doubler_footer.tpl -text templates/de/html/doubler/doubler_header.tpl -text @@ -1237,6 +1290,7 @@ templates/de/html/ext/ext_admins.tpl -text templates/de/html/ext/ext_admintheme1.tpl -text templates/de/html/ext/ext_admintheme_default.tpl -text templates/de/html/ext/ext_autopurge.tpl -text +templates/de/html/ext/ext_autoreg.tpl -text templates/de/html/ext/ext_bank.tpl -text templates/de/html/ext/ext_beg.tpl -text templates/de/html/ext/ext_birthday.tpl -text @@ -1251,6 +1305,8 @@ templates/de/html/ext/ext_events.tpl -text templates/de/html/ext/ext_holiday.tpl -text templates/de/html/ext/ext_html_mail.tpl -text templates/de/html/ext/ext_imprint.tpl -text +templates/de/html/ext/ext_iso3166.tpl -text +templates/de/html/ext/ext_jackpot.tpl -text templates/de/html/ext/ext_lead.tpl -text templates/de/html/ext/ext_logs.tpl -text templates/de/html/ext/ext_mailid.tpl -text @@ -1290,6 +1346,7 @@ templates/de/html/ext/ext_usage.tpl -text templates/de/html/ext/ext_user.tpl -text templates/de/html/ext/ext_wernis.tpl -text templates/de/html/ext/ext_yoomedia.tpl -text +templates/de/html/fatal_errors.tpl -text templates/de/html/fatal_footer.tpl -text templates/de/html/fatal_header.tpl -text templates/de/html/guest/.htaccess -text @@ -1339,8 +1396,11 @@ templates/de/html/guest/guest_sponsor_pay_row.tpl -text templates/de/html/guest/guest_sponsor_payment_row.tpl -text templates/de/html/guest/guest_sponsor_reg.tpl -text templates/de/html/guest/guest_stats_cats_row.tpl -text +templates/de/html/guest/guest_stats_header.tpl -text templates/de/html/guest/guest_stats_member.tpl -text templates/de/html/guest/guest_stats_month_row.tpl -text +templates/de/html/guest/guest_stats_row.tpl -text +templates/de/html/guest/guest_stats_table.tpl -text templates/de/html/guest/guest_top10.tpl -text templates/de/html/guest/guest_top10_empty4.tpl -text templates/de/html/guest/guest_top10_empty5.tpl -text @@ -1359,17 +1419,23 @@ templates/de/html/install/install_fatal_table.tpl -text templates/de/html/install/install_finished.tpl -text templates/de/html/install/install_footer.tpl -text templates/de/html/install/install_header.tpl -text +templates/de/html/install/install_main.tpl -text templates/de/html/install/install_page1.tpl -text templates/de/html/install/install_page2.tpl -text templates/de/html/install/install_page3.tpl -text templates/de/html/install/install_page5.tpl -text templates/de/html/install/install_welcome.tpl -text templates/de/html/js/.htaccess -text +templates/de/html/js/js_order_send.tpl -text +templates/de/html/js/js_surfbar_member_book.tpl -text +templates/de/html/js/js_surfbar_member_edit.tpl -text +templates/de/html/js/js_surfbar_stopped.tpl -text templates/de/html/js/js_uberwach.tpl -text templates/de/html/lead_code.tpl -text templates/de/html/loader.tpl -text templates/de/html/login_failed_js.tpl -text templates/de/html/login_failtures.tpl -text +templates/de/html/login_failures.tpl -text templates/de/html/mailid/.htaccess -text templates/de/html/mailid/mailid_banner.tpl -text templates/de/html/mailid/mailid_confirm_buttom.tpl -text @@ -1474,7 +1540,6 @@ templates/de/html/member/member_stats_table.tpl -text templates/de/html/member/member_support_contcted.tpl -text templates/de/html/member/member_support_form.tpl -text templates/de/html/member/member_surfbar_book_dynamic.tpl -text -templates/de/html/member/member_surfbar_book_static.tp -text templates/de/html/member/member_surfbar_book_static.tpl -text templates/de/html/member/member_surfbar_delete_action_form.tpl -text templates/de/html/member/member_surfbar_edit_action_form.tpl -text @@ -1507,6 +1572,25 @@ templates/de/html/member/member_wernis_mode_list_row.tpl -text templates/de/html/member/member_wernis_mode_payout.tpl -text templates/de/html/member/member_wernis_mode_withdraw.tpl -text templates/de/html/member/member_wernis_row.tpl -text +templates/de/html/menu/.htaccess -text +templates/de/html/menu/menu_guest_advert_end.tpl -text +templates/de/html/menu/menu_guest_advert_main.tpl -text +templates/de/html/menu/menu_guest_advert_members.tpl -text +templates/de/html/menu/menu_guest_advert_online.tpl -text +templates/de/html/menu/menu_member_advert_account.tpl -text +templates/de/html/menu/menu_member_advert_bank.tpl -text +templates/de/html/menu/menu_member_advert_end.tpl -text +templates/de/html/menu/menu_member_advert_extras.tpl -text +templates/de/html/menu/menu_member_advert_main.tpl -text +templates/de/html/menu/menu_member_advert_order.tpl -text +templates/de/html/menu/menu_member_advert_rals.tpl -text +templates/de/html/menu/menu_member_advert_stats.tpl -text +templates/de/html/menu/menu_member_advert_surfbar.tpl -text +templates/de/html/menu/menu_member_advert_themes.tpl -text +templates/de/html/menu/menu_seperator.tpl -text +templates/de/html/menu/menu_table.tpl -text +templates/de/html/menu/menu_what_begin.tpl -text +templates/de/html/menu/menu_what_end.tpl -text templates/de/html/message.tpl -text templates/de/html/metadata.tpl -text templates/de/html/online_now.tpl -text @@ -1565,6 +1649,7 @@ theme/business/css/beg.css -text theme/business/css/bonus.css -text theme/business/css/doubler.css -text theme/business/css/general.css -text +theme/business/css/imprint.css -text theme/business/css/install.css -text theme/business/css/register.css -text theme/business/css/sponsor.css -text @@ -1580,6 +1665,7 @@ theme/default/css/beg.css -text theme/default/css/bonus.css -text theme/default/css/doubler.css -text theme/default/css/general.css -text +theme/default/css/imprint.css -text theme/default/css/install.css -text theme/default/css/register.css -text theme/default/css/sponsor.css -text @@ -1596,6 +1682,7 @@ theme/desert/css/bonus.css -text theme/desert/css/doubler.css -text theme/desert/css/general.css -text theme/desert/css/help.css -text +theme/desert/css/imprint.css -text theme/desert/css/install.css -text theme/desert/css/paidlinks.css -text theme/desert/css/register.css -text diff --git a/.gitignore b/.gitignore index 9df491e110..9cdc52a564 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,14 @@ /.cache /.project /.settings +DOCS/doxygen/*.tmp +DOCS/doxygen/html +DOCS/template-warnings.log +DOCS/warn.log inc/.secret/.* inc/.secret/dummy.php inc/cache/*.cache -inc/cache/*.log inc/cache/.revision inc/cache/config-local.php +inc/cache/debug.log +inc/cache/sess_* diff --git a/.htaccess b/.htaccess index 201c43da67..4601287271 100644 --- a/.htaccess +++ b/.htaccess @@ -3,7 +3,9 @@ DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine On - RewriteRule ^cms/(.*)/wht/(.*)$ modules.php?module=$1&what=$2 [L] - RewriteRule ^cms/(.*)/act/(.*)$ modules.php?module=$1&action=$2 [L] - RewriteRule ^cms/(.*)$ modules.php?module=$1 [L] + RewriteRule ^cms/(.*)/wht/(.*)$ modules.php?module=$1&what=$2 [L] + RewriteRule ^cms/(.*)/act/(.*)$ modules.php?module=$1&action=$2 [L] + RewriteRule ^cms/(.*)$ modules.php?module=$1 [L] + RewriteRule ^cms/index/wht/impressum$ modules.php?module=index&what=imprint [L] + RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L] </IfModule> diff --git a/DOCS/Doxyfile b/DOCS/Doxyfile new file mode 100644 index 0000000000..e553c8b9e6 --- /dev/null +++ b/DOCS/Doxyfile @@ -0,0 +1,1525 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = MXChangeMail-Exchange + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 0.2.1-FINAL + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = /home/quix0r/MyProjects/mailer/branches/0.2.1-FINAL/DOCS/doxygen/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = /home/quix0r/MyProjects/mailer/branches/0.2.1-FINAL/ + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = YES + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = YES + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = YES + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = YES + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = /home/quix0r/MyProjects/mailer/branches/0.2.1-FINAL/DOCS/warn.log + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = /home/quix0r/MyProjects/mailer/branches/0.2.1-FINAL/ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.php + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = */docs/* \ + */ship-simu.org/* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 3 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = YES + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = YES + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = YES + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = NO + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index dbf058a363..2ed25fa905 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -1,245 +1,290 @@ -### WARNING: THIS FILE IS AUTO-GENERATED BY ./DOCS/todo-builder.sh (1000/quix0r) ### +### WARNING: THIS FILE IS AUTO-GENERATED BY ./DOCS/todo-builder.sh (uid=1000/user=quix0r) ### ### DO NOT EDIT THIS FILE. ### -./beg.php:195: // @TODO Opps, what is missing here??? -./doubler.php:269:// @TODO Rewrite all constants -./inc/cache/config-local.php:120:// @TODO Rewrite the following three constants, somehow... -./inc/config-functions.php:178: // @TODO Make this all better... :-/ -./inc/config-functions.php:203: // @TODO Rewrite these all to config entries, if somehow possible -./inc/config-functions.php:332: // @TODO Find a way for updating configuration here -./inc/config-functions.php:356: // @TODO Find a way for updating configuration here -./inc/extensions/ext-sql_patches.php:714: // @TODO Rewrite this to a filter! -./inc/extensions/ext-sql_patches.php:752: // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N'); -./inc/extensions/ext-sql_patches.php:92: /* @TODO SQL_ALTER_TABLE() should work now properly -./inc/extensions/ext-surfbar.php:238: // @TODO Set some constants we need??? -./inc/extensions.php:345:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) -./inc/extensions.php:427: // @TODO Extension is loaded, what next? -./inc/fix_filters.php:71: // @TODO Why does this happen? In installation phase of sql_patches? -./inc/footer.php:50: // @TODO Rewrite these all into filters -./inc/functions.php:1316: // @TODO Remove this if() block if all is working fine -./inc/functions.php:1616: // @TODO This can be, somehow, rewritten -./inc/functions.php:218: // @TODO Remove this sanity-check if all is fine -./inc/functions.php:2418: // @TODO The status should never be empty -./inc/functions.php:2509: // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')? -./inc/functions.php:2572:// @TODO Please describe this function -./inc/functions.php:2590: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); -./inc/functions.php:259: // @TODO Find all templates which are using these direct variables and rewrite them. -./inc/functions.php:260: // @TODO After this step is done, this else-block is history -./inc/functions.php:2673: // @TODO Add a little more infos here -./inc/functions.php:2684: // @TODO This cannot be rewritten to app_die(), try to find a solution for this. -./inc/functions.php:2842: // @TODO Are these convertions still required? -./inc/functions.php:2860:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:405: // @TODO Extension 'msg' does not exist -./inc/functions.php:484:// @TODO Rewrite this to an extension 'smtp' -./inc/install-inc.php:20: * @TODO Rewrite all constants in this include file * -./inc/install-inc.php:263: // @TODO DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", REQUEST_POST('omode'), 0); -./inc/language/de.php:1160:// @TODO Rewrite these two constants -./inc/language/de.php:1176:// @TODO Rewrite these five constants -./inc/language/de.php:757:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used. -./inc/language/de.php:856:// @TODO Are these constants still used? -./inc/language/de.php:867:// @TODO Are these constants longer used? +./beg.php:191: // @TODO Opps, what is missing here??? +./birthday_confirm.php:93: // @TODO Try to rewrite the following unset() +./inc/cache/config-local.php:122:// @TODO Rewrite the following three constants, somehow... +./inc/classes/cachesystem.class.php:426: // @TODO Add support for more types which break in last else-block +./inc/config-functions.php:156: // @TODO Make this all better... :-/ +./inc/config-functions.php:331: // @TODO Find a way for updating configuration here +./inc/extensions/ext-html_mail.php:140: // @TODO Move these arrays into config +./inc/extensions/ext-newsletter.php:215: // @TODO Move these into configuration +./inc/extensions/ext-rallye.php:329: // @TODO Move this code into rallye_functions.php +./inc/extensions/ext-sql_patches.php:725: // @TODO Rewrite this to a filter! +./inc/extensions/ext-sql_patches.php:94: /* @TODO SQL_ALTER_TABLE() should work now properly +./inc/extensions/ext-yoomedia.php:122: // @TODO Can this be moved into a database table? +./inc/extensions/ext-yoomedia.php:55:// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y'); +./inc/extensions-functions.php:370:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) +./inc/extensions-functions.php:481: // @TODO Extension is loaded, what next? +./inc/footer.php:47: // @TODO Rewrite these all into filters +./inc/functions.php:1326: // @TODO Remove this if() block if all is working fine +./inc/functions.php:214: // @TODO Remove this sanity-check if all is fine +./inc/functions.php:217: // @TODO Try to rewrite all $DATA to $content +./inc/functions.php:2323:// @TODO Try to move this to inc/libs/theme_functions.php +./inc/functions.php:2362: // @TODO The status should never be empty +./inc/functions.php:2494:// @TODO Please describe this function +./inc/functions.php:2512: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); +./inc/functions.php:256: // @TODO Find all templates which are using these direct variables and rewrite them. +./inc/functions.php:257: // @TODO After this step is done, this else-block is history +./inc/functions.php:2597: // @TODO Add a little more infos here +./inc/functions.php:2608: // @TODO This cannot be rewritten to app_die(), try to find a solution for this. +./inc/functions.php:2690: // @TODO Rewrite this old lost code to a template +./inc/functions.php:2809: // @TODO Are these convertions still required? +./inc/functions.php:2827:// @TODO Rewrite this function to use readFromFile() and writeToFile() +./inc/functions.php:568: // @TODO Extension 'msg' does not exist +./inc/functions.php:645:// @TODO Rewrite this to an extension 'smtp' +./inc/install-functions.php:62: // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); +./inc/language/de.php:1139:// @TODO Rewrite these two constants +./inc/language/de.php:1155:// @TODO Rewrite these five constants +./inc/language/de.php:733:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used. +./inc/language/de.php:832:// @TODO Are these constants still used? +./inc/language/de.php:843:// @TODO Are these constants longer used? ./inc/language-functions.php:45:// @TODO Rewrite all language constants to this function. ./inc/language/holiday_de.php:49:// @TODO Rewrite these two constants to one ./inc/language/rallye_de.php:110:// @TODO Rewrite following two lines to one -./inc/language/refback_de.php:46:// @TODO Rewrite these constants to one +./inc/language/refback_de.php:45:// @TODO Rewrite these constants to one ./inc/language/sponsor_de.php:118:// @TODO Rewrite these four constants to one and use sprintf() -./inc/libs/cache_functions.php:412: // @TODO Add support for more types which break in last else-block -./inc/libs/doubler_functions.php:46:// @TODO Lame description -./inc/libs/rallye_functions.php:628: $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value... -./inc/libs/rallye_functions.php:693: // @TODO Rewrite this to our API function -./inc/libs/register_functions.php:53: // @TODO Rewrite these constants -./inc/libs/register_functions.php:62: // @TODO Rewrite these constants, too -./inc/libs/register_functions.php:97:// @TODO This function is no longer used??? -./inc/libs/surfbar_functions.php:1499: // @TODO This can be somehow rewritten -./inc/libs/surfbar_functions.php:955: // @TODO Invalid salt should be refused -./inc/libs/task_functions.php:261: // @TODO These can be rewritten to filter -./inc/libs/task_functions.php:53:// @TODO Move all extension-dependent queries into filters -./inc/libs/user_functions.php:315: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); -./inc/libs/user_functions.php:340: // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); -./inc/libs/user_functions.php:381: // @TODO Can this query be merged with above query? -./inc/libs/yoomedia_functions.php:65: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script -./inc/load_config.php:77: // @TODO Rewrite them to avoid this else block -./inc/load_extensions.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php * -./inc/mails/birthday_mails.php:85: // @TODO 4 is hard-coded here, should we move it out in config? -./inc/modules/admin/admin-inc.php:342: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:347: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:389: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:395: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:503: // @TODO Rewrite these both constants -./inc/modules/admin/admin-inc.php:529: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query -./inc/modules/admin/overview-inc.php:147: // @TODO Rewrite this to a filter -./inc/modules/admin/overview-inc.php:157: // @TODO Can this SQL be encapsulated in a function, so all similar queries can be rewritten? -./inc/modules/admin/overview-inc.php:193: // @TODO Should we init sql_notes here or inside REGISTER_EXTENSION()? -./inc/modules/admin/overview-inc.php:256: // @TODO Rewrite this to something with include files -./inc/modules/admin/overview-inc.php:294: // @TODO This may also be rewritten to include files -./inc/modules/admin/overview-inc.php:296: default: // @TODO Unknown support mode -./inc/modules/admin/overview-inc.php:428: // @TODO Try to move this in includes -./inc/modules/admin/overview-inc.php:447: // @TODO Rewritings: admin->assigned_admin,uid->userid,type->task_type_msg in template -./inc/modules/admin.php:257: // @TODO Rewrite all these constants -./inc/modules/admin.php:95: // @TODO Why is this set to 'done'? -./inc/modules/admin/what-add_points.php:119: // @TODO Rewrite these both constants -./inc/modules/admin/what-add_points.php:54: // @TODO Rewrite this constant -./inc/modules/admin/what-add_surfbar_url.php:57: // @TODO Find all convertSelectionsToTimestamp() calls and rewrite REQUEST_POST() calls to $POST -./inc/modules/admin/what-admin_add.php:121: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-admin_add.php:62: // @TODO Cant this be rewritten? -./inc/modules/admin/what-admin_add.php:78: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-adminedit.php:238: // @TODO Rewrite this constant -./inc/modules/admin/what-adminedit.php:62: // @TODO Kill all constants in this file -./inc/modules/admin/what-admins_mails.php:100: // @TODO Rewrite this constant -./inc/modules/admin/what-admins_mails.php:173: // @TODO Rewrite this constant -./inc/modules/admin/what-admins_mails.php:61: // @TODO Can this be rewritten??? -./inc/modules/admin/what-chk_regs.php:66: // @TODO Rewritings: sname->surname,fname->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template -./inc/modules/admin/what-chk_regs.php:85: // @TODO Rewrite this constant -./inc/modules/admin/what-config_admins.php:154: // @TODO Rewrite this to filter 'run_sqls' -./inc/modules/admin/what-config_admins.php:164: // @TODO This causes the whole (!) menu cache being rebuild -./inc/modules/admin/what-config_cache.php:94: // @TODO Rewrite all constants -./inc/modules/admin/what-config_cats.php:192: // @TODO Rewrite this constant -./inc/modules/admin/what-config_cats.php:199: // @TODO Rewrite this constant -./inc/modules/admin/what-config_mods.php:139: // @TODO Rewritings: mod->module in template -./inc/modules/admin/what-config_mods.php:161: // @TODO Rewrite this constant -./inc/modules/admin/what-config_payouts.php:146: // @TODO Rewrite this constant -./inc/modules/admin/what-config_payouts.php:237: // @TODO Rewrite this constant -./inc/modules/admin/what-config_points.php:262: // @TODO Rewritings: lvl->level, per->percents in template -./inc/modules/admin/what-config_rallye_prices.php:203: // @TODO Rewritings: level->price_level, infos->info in template -./inc/modules/admin/what-config_rallye_prices.php:220: // @TODO Rewrite these two constants -./inc/modules/admin/what-config_rallye_prices.php:255: // @TODO Rewritings: aid->admin_id, alogin->login in template -./inc/modules/admin/what-config_register.php:68: // @TODO Move this HTML code into a template -./inc/modules/admin/what-config_register.php:85:// @TODO Rewrite this constant -./inc/modules/admin/what-config_rewrite.php:97: // @TODO Rewrite this constant -./inc/modules/admin/what-del_sponsor.php:58: // @TODO Rewrite these constants -./inc/modules/admin/what-del_sponsor.php:86: // @TODO Rewrite these constants -./inc/modules/admin/what-del_transfer.php:106:// @TODO Rewrite all these constants -./inc/modules/admin/what-del_transfer.php:76: // @TODO Rewritings: idx->trans_id in template -./inc/modules/admin/what-edit_emails.php:113: // @TODO Yet another constant to rewrite -./inc/modules/admin/what-edit_emails.php:60: // @TODO More constants to rewrite -./inc/modules/admin/what-edit_emails.php:95: // @TODO Rewritings: subj->subject in template -./inc/modules/admin/what-extensions.php:159: // @TODO Rewrite this constant -./inc/modules/admin/what-extensions.php:335: // @TODO Rewrite this to a filter -./inc/modules/admin/what-guest_add.php:123: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-guest_add.php:62: // @TODO Cant this be rewritten? -./inc/modules/admin/what-guest_add.php:78: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-guestedit.php:277: // @TODO Rewrite this constant -./inc/modules/admin/what-list_autopurge.php:105: // @TODO Rewrite this constant -./inc/modules/admin/what-list_autopurge.php:55:// @TODO Rewrite those lines to filter -./inc/modules/admin/what-list_autopurge.php:85: // @TODO Rewritings: sname->surname,fname->family in templates -./inc/modules/admin/what-list_beg.php:85: // @TODO Rewrite templates so s/fname will be replaced by surname/family -./inc/modules/admin/what-list_beg.php:86: // @TODO to shorten this block. Please also do so with uid->userid -./inc/modules/admin/what-list_cats.php:92: // @TODO Rewrite this constant -./inc/modules/admin/what-list_country.php:181: // @TODO Rewritings: name->descr,status->is_active in template -./inc/modules/admin/what-list_doubler.php:59:// @TODO Try to rewrite this into include files -./inc/modules/admin/what-list_doubler.php:73: // @TODO Rewrite all these constants -./inc/modules/admin/what-list_holiday.php:82: // @TODO Rewrite this constant -./inc/modules/admin/what-list_links.php:105: // @TODO Rewrite this to includes/filter -./inc/modules/admin/what-list_links.php:96: // @TODO Find a way to rewrite this. See some lines above for different queries -./inc/modules/admin/what-list_newsletter.php:64: // @TODO Currently under construction! -./inc/modules/admin/what-list_rallyes.php:231: // @TODO Rewrite this constant -./inc/modules/admin/what-list_rallyes.php:255: // @TODO Rewritings: uid->userid,opoints->curr_points,old->refs in template -./inc/modules/admin/what-list_rallyes.php:309: // @TODO Rewritings: aid->admin_id in template -./inc/modules/admin/what-list_sponsor.php:168: // @TODO Rewritings: sname->surname,fname->family,ip->remote_addr in template -./inc/modules/admin/what-list_sponsor.php:191: // @TODO Rewrite this constant -./inc/modules/admin/what-list_sponsor.php:73: // @TODO Rewrite this huge amount of constants -./inc/modules/admin/what-list_task.php:129: // @TODO Rewrite these templates to one and add $OUT -./inc/modules/admin/what-list_task.php:164: // @TODO Rewritings: admin->assigned_admin,uid->userid,type->task_type_msg in template -./inc/modules/admin/what-list_task.php:176: // @TODO Rewrite this to $OUT .= ..., true, ... -./inc/modules/admin/what-list_task.php:180: // @TODO Rewrite this to $OUT .= ..., true, ... -./inc/modules/admin/what-list_transfer.php:83:// @TODO Rewrite these constants -./inc/modules/admin/what-list_unconfirmed.php:128: // @TODO Rewritings: uid->userid -./inc/modules/admin/what-list_unconfirmed.php:75: // @TODO This constant might be unused? +./inc/libs/admins_functions.php:418: // @TODO This can be, somehow, rewritten +./inc/libs/beg_functions.php:57: // @TODO Try to rewrite the following unset() +./inc/libs/bonus_functions.php:187: // @TODO Try to find a way for rewriting this constant +./inc/libs/doubler_functions.php:45:// @TODO Lame description +./inc/libs/rallye_functions.php:699: $EXPIRE = 3; // @TODO The hard-coded value... +./inc/libs/rallye_functions.php:763: // @TODO Rewrite this to our API function +./inc/libs/refback_functions.php:60: // @TODO Try to rewrite the following unset() +./inc/libs/register_functions.php:153: // @TODO Rewrite these constants +./inc/libs/surfbar_functions.php:1501: // @TODO This can be somehow rewritten +./inc/libs/surfbar_functions.php:954: // @TODO Invalid salt should be refused +./inc/libs/task_functions.php:244: // @TODO These can be rewritten to filter +./inc/libs/task_functions.php:52:// @TODO Move all extension-dependent queries into filters +./inc/libs/user_functions.php:137: // @TODO These two constants are no longer used, maybe we reactivate this code? +./inc/libs/user_functions.php:317: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); +./inc/libs/user_functions.php:342: // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); +./inc/libs/user_functions.php:383: // @TODO Can this query be merged with above query? +./inc/libs/yoomedia_functions.php:64: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script +./inc/load_config.php:76: // @TODO Rewrite them to avoid this else block +./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php * +./inc/modules/admin/admin-inc.php:335: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:340: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:392: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:398: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:500:// @TODO Try to rewrite this to adminAddMenuSelectionBox() +./inc/modules/admin/admin-inc.php:513: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query +./inc/modules/admin/overview-inc.php:160: // @TODO Rewrite this to a filter +./inc/modules/admin/overview-inc.php:170: // @TODO Can this SQL be encapsulated in a function, so all similar queries can be rewritten? +./inc/modules/admin/overview-inc.php:275: // @TODO Rewrite this to something with include files +./inc/modules/admin/overview-inc.php:313: // @TODO This may also be rewritten to include files +./inc/modules/admin/overview-inc.php:315: default: // @TODO Unknown support mode +./inc/modules/admin/overview-inc.php:430: // @TODO Try to move this in includes +./inc/modules/admin/overview-inc.php:44:// @TODO This function does also check for uncompleted tasks +./inc/modules/admin.php:94: // @TODO Why is this set to 'done'? +./inc/modules/admin/what-add_guestnl_cat.php:48: // @TODO Check if category does already exist +./inc/modules/admin/what-add_surfbar_url.php:56: // @TODO Find all convertSelectionsToTimestamp() calls and rewrite postRequestElement() calls to $postData +./inc/modules/admin/what-admin_add.php:119: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-admin_add.php:60: // @TODO Cant this be rewritten? +./inc/modules/admin/what-admin_add.php:76: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-adminedit.php:61: // @TODO Kill all constants in this file +./inc/modules/admin/what-admins_mails.php:60: // @TODO Can this be rewritten??? +./inc/modules/admin/what-bonus.php:47:// @TODO Unused at the moment +./inc/modules/admin/what-chk_regs.php:65: // @TODO Rewritings: surname->surname,family->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template +./inc/modules/admin/what-config_admins.php:148: // @TODO Rewrite this to filter 'run_sqls' +./inc/modules/admin/what-config_mods.php:137: // @TODO Rewritings: mod->module in template +./inc/modules/admin/what-config_payouts.php:215: // @TODO Rewrite in template: mpoi->min_points,from->from_account +./inc/modules/admin/what-config_rallye_prices.php:202: // @TODO Rewritings: level->price_level, infos->info in template +./inc/modules/admin/what-config_rallye_prices.php:219: // @TODO Rewrite these two constants +./inc/modules/admin/what-config_rallye_prices.php:254: // @TODO Rewritings: admin_id->admin_id, alogin->login in template +./inc/modules/admin/what-config_register.php:67: // @TODO Move this HTML code into a template +./inc/modules/admin/what-edit_emails.php:99: // @TODO Rewritings: subj->subject in template +./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country * +./inc/modules/admin/what-email_archiv.php:91: // @TODO Rewrite to SQL_FETCHARRAY() +./inc/modules/admin/what-email_stats.php:47:// @TODO Unused at the moment +./inc/modules/admin/what-extensions.php:351: // @TODO Rewrite this to a filter +./inc/modules/admin/what-guest_add.php:122: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-guest_add.php:61: // @TODO Cant this be rewritten? +./inc/modules/admin/what-guest_add.php:77: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-holiday_list.php:47:// @TODO Unused at the moment +./inc/modules/admin/what-list_autopurge.php:54:// @TODO Rewrite those lines to filter +./inc/modules/admin/what-list_autopurge.php:84: // @TODO Rewritings: surname->surname,family->family in templates +./inc/modules/admin/what-list_beg.php:85: // @TODO Rewrite templates so s/family will be replaced by surname/family +./inc/modules/admin/what-list_beg.php:86: // @TODO to shorten this block. Please also do so with userid->userid +./inc/modules/admin/what-list_cats.php:57: // @TODO No longer needed? define('__CATS_BASE' , "<a href=\"{?URL?}/modules.php?module=admin&userid="); +./inc/modules/admin/what-list_links.php:104: // @TODO Rewrite this to includes/filter +./inc/modules/admin/what-list_links.php:95: // @TODO Find a way to rewrite this. See some lines above for different queries +./inc/modules/admin/what-list_payouts.php:118: // @TODO Do we need this time-consuming eval() here? +./inc/modules/admin/what-list_rallyes.php:250: // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template +./inc/modules/admin/what-list_rallyes.php:303: // @TODO Rewritings: admin_id->admin_id in template +./inc/modules/admin/what-list_sponsor.php:148: // @TODO Rewritings: surname->surname,family->family,ip->remote_addr in template +./inc/modules/admin/what-list_task.php:148: // @TODO Rewrite these templates to one and add $OUT +./inc/modules/admin/what-list_task.php:182: // @TODO Rewritings: admin->assigned_admin,userid->userid,type->task_type_msg in template +./inc/modules/admin/what-list_task.php:194: // @TODO Rewrite this to $OUT .= ..., true, ... +./inc/modules/admin/what-list_task.php:198: // @TODO Rewrite this to $OUT .= ..., true, ... +./inc/modules/admin/what-list_unconfirmed.php:129: // @TODO Rewritings: userid->userid +./inc/modules/admin/what-list_unconfirmed.php:76: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS')); ./inc/modules/admin/what-list_unconfirmed.php:87: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus -./inc/modules/admin/what-list_unconfirmed.php:97: // @TODO Rewrite this to $content = SQL_FETCHARRAY(), look some lines above for two differrent queries -./inc/modules/admin/what-list_user.php:160: // @TODO Rewrite these to filters -./inc/modules/admin/what-list_user.php:289: // @TODO Rewrite this into a filter -./inc/modules/admin/what-list_user.php:346: // @TODO Rewrite this into a filter -./inc/modules/admin/what-lock_user.php:139: // @TODO Rewrite these all constants -./inc/modules/admin/what-logs.php:69: // @TODO Fix content-type here -./inc/modules/admin/what-logs.php:72: // @TODO Fix content-type here -./inc/modules/admin/what-mem_add.php:126: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-mem_add.php:65: // @TODO Cant this be rewritten? -./inc/modules/admin/what-mem_add.php:81: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-memedit.php:262: // @TODO Rewrite this constant -./inc/modules/admin/what-memedit.php:298: // @TODO Rewrite this constant -./inc/modules/admin/what-payments.php:154: // @TODO Rewritings: title->mail_title, pay->payment in template -./inc/modules/admin/what-refbanner.php:127: // @TODO Rewrite this constant -./inc/modules/admin/what-refbanner.php:150: // @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template -./inc/modules/admin/what-refbanner.php:169: // @TODO Rewrite this constant -./inc/modules/admin/what-repair_amnu.php:85:// @TODO This causes the whole (!) menu cache being rebuilded -./inc/modules/admin/what-send_newsletter.php:90: // @TODO Rewrite this constant -./inc/modules/admin/what-sub_points.php:105: // @TODO Rewrite these constants -./inc/modules/admin/what-sub_points.php:53: // @TODO Rewrite this constant -./inc/modules/admin/what-theme_check.php:126: // @TODO Move this HTML code to a template "admin_theme_row" -./inc/modules/admin/what-unlock_sponsor.php:188: // @TODO Rewritings: remote->remote_addr, created->sponsor_created in template -./inc/modules/admin/what-usage.php:88: // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php -./inc/modules/admin/what-usr_online.php:107: // @TODO Rewrite this constant -./inc/modules/admin/what-usr_online.php:51: // @TODO Rewrite these constants -./inc/modules/admin/what-usr_online.php:52: // @TODO Add a filter for sponsor -./inc/modules/guest/what-mediadata.php:181:// @TODO Rewrite these all if-blocks to filters -./inc/modules/guest/what-mediadata.php:49:// @TODO Rewrite all constants +./inc/modules/admin/what-list_unconfirmed.php:99: // @TODO Rewrite this to $content = SQL_FETCHARRAY(), look some lines above for two differrent queries +./inc/modules/admin/what-list_user.php:159: // @TODO Rewrite these to filters +./inc/modules/admin/what-list_user.php:286: // @TODO Rewrite this into a filter +./inc/modules/admin/what-list_user.php:340: // @TODO Rewrite this into a filter +./inc/modules/admin/what-list_user.php:58:// @TODO Rewrite these if-blocks in a filter +./inc/modules/admin/what-lock_user.php:138: // @TODO Rewrite these all constants +./inc/modules/admin/what-logs.php:68: // @TODO Fix content-type here +./inc/modules/admin/what-logs.php:71: // @TODO Fix content-type here +./inc/modules/admin/what-mem_add.php:125: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-mem_add.php:64: // @TODO Cant this be rewritten? +./inc/modules/admin/what-mem_add.php:80: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-payments.php:151: // @TODO Rewritings: title->mail_title, pay->payment in template +./inc/modules/admin/what-refbanner.php:145: // @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template +./inc/modules/admin/what-unlock_emails.php:101: // @TODO Rewrite these if-blocks to a filter +./inc/modules/admin/what-unlock_emails.php:211: // @TODO Rewrite in template: subj->subject,ordered->timestamp,tsend->target_send +./inc/modules/admin/what-unlock_sponsor.php:191: // @TODO Rewritings: remote->remote_addr, created->sponsor_created in template +./inc/modules/admin/what-usage.php:87: // @TODO This code is double, see LOAD_TEMPLATE and loadEmailTemplate in functions.php +./inc/modules/admin/what-usage.php:98: // @TODO Disabled due to too much trouble +./inc/modules/admin/what-usr_online.php:50: // @TODO Add a filter for sponsor +./inc/modules/guest/what-beg.php:59:// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout'))); +./inc/modules/guest/what-confirm.php:102: // @TODO Try to rewrite the following unset() +./inc/modules/guest/what-login.php:107: // @TODO Move this HTML code into a template +./inc/modules/guest/what-mediadata.php:182:// @TODO Rewrite all these if-blocks to filters ./inc/modules/guest/what-mediadata.php:69: // @TODO Find a better formular than this one -./inc/modules/guest/what-register.php:208: // @TODO Rewrite these all to a single filter -./inc/modules/guest/what-register.php:286: // @TODO Rewrite this to a filter -./inc/modules/guest/what-register.php:60: * @TODO Commented out, do we need this ugly code? -./inc/modules/guest/what-sponsor_infos.php:67: // @TODO Rewritings: conv->conv_rate,name->conv_name in template -./inc/modules/guest/what-sponsor_infos.php:87: // @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency -./inc/modules/guest/what-sponsor_reg.php:284: // @TODO Swap this HTML code to templates -./inc/modules/guest/what-sponsor_reg.php:298: // @TODO Rewrite this constant -./inc/modules/guest/what-sponsor_reg.php:304: // @TODO Rewrite these constants -./inc/modules/guest/what-stats.php:110: // @TODO This can be somehow rewritten -./inc/modules/guest/what-stats.php:123: // @TODO Rewrite all these constants -./inc/modules/guest/what-stats.php:192: // @TODO Rewrite this to one template and $OUT .= .... -./inc/modules/guest/what-top10.php:107:// @TODO Rewrite this constant -./inc/modules/guest/what-top10.php:145: // @TODO Rewritings: nick->nickname,uid->userid in template -./inc/modules/guest/what-top10.php:177:// @TODO Rewrite this constant -./inc/modules/guest/what-top10.php:215: // @TODO Rewritings: nick->nickname,uid->userid in template -./inc/modules/guest/what-top10.php:248:// @TODO Rewrite this constant -./inc/modules/guest/what-top10.php:255:// @TODO Rewrite this constant -./inc/modules/guest/what-top10.php:74: // @TODO Rewritings: uid->userid,nick->nickname,logins->total_logins in template -./inc/modules/member/what-bonus.php:55: // @TODO Rewrite this to a filter +./inc/modules/guest/what-rallyes.php:90: // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$adminId."\">".$login."</a>"; +./inc/modules/guest/what-register.php:196: // @TODO Rewrite these all to a single filter +./inc/modules/guest/what-register.php:274: // @TODO Rewrite this to a filter +./inc/modules/guest/what-register.php:290: // @TODO Rewrite this to addPointsDirectly() +./inc/modules/guest/what-sponsor_infos.php:69: // @TODO Rewritings: conv->conv_rate,name->conv_name in template +./inc/modules/guest/what-sponsor_infos.php:89: // @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency +./inc/modules/guest/what-sponsor_reg.php:286: // @TODO Swap this HTML code to templates +./inc/modules/guest/what-stats.php:115: // @TODO This can be somehow rewritten +./inc/modules/guest/what-stats.php:75:// @TODO This can be rewritten in a dynamic include +./inc/modules/member/what-beg.php:89:// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout'))); +./inc/modules/member/what-bonus.php:56: // @TODO Rewrite this to a filter ./inc/modules/member/what-categories.php:112: // @TODO Rewrite this to use $OUT .= ... -./inc/modules/member/what-doubler.php:54:// @TODO Rewrite these all constants -./inc/modules/member/what-mydata.php:53:// @TODO Try to rewrite this constant -./inc/modules/member/what-order.php:444: // @TODO Rewrite this to a filter -./inc/modules/member/what-order.php:543: // @TODO Rewrite this old lost code to a template -./inc/modules/member/what-payout.php:132: // @TODO Rewritings: acc->target_account,bank->target_bank in templates -./inc/modules/member/what-payout.php:148: // @TODO Rewrite this constant -./inc/modules/member/what-payout.php:182: // @TODO Rewrite these constants -./inc/modules/member/what-payout.php:190: // @TODO Rewrite this constant -./inc/modules/member/what-payout.php:235: // @TODO Rewrite this to a filter +./inc/modules/member/what-order.php:441: // @TODO Rewrite this to a filter +./inc/modules/member/what-payout.php:133: // @TODO Rewritings: acc->target_account,bank->target_bank in templates +./inc/modules/member/what-payout.php:229: // @TODO Rewrite this to a filter ./inc/modules/member/what-points.php:54:// @TODO Should we rewrite this to a filter? -./inc/modules/member/what-transfer.php:115: // @TODO Rewrite all these constants to array elements -./inc/modules/member/what-transfer.php:246: // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries -./inc/modules/member/what-transfer.php:308: // @TODO Rewrite these constants -./inc/modules/member/what-transfer.php:316: // @TODO Rewrite these constants -./inc/modules/member/what-transfer.php:328: // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries -./inc/modules/member/what-transfer.php:363: // @TODO Rewrite these constants -./inc/modules/member/what-transfer.php:450: // @TODO Rewrite all these constants -./inc/modules/member/what-unconfirmed.php:134: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/order.php:76: // @TODO Unused: 2,4 -./inc/monthly/monthly_bonus.php:71: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1575: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:1785: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1799:// @TODO Can this be rewritten to a filter? -./inc/mysql-manager.php:1864: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:212: // @TODO Nothing helped??? -./inc/mysql-manager.php:2180: // @TODO This can be somehow rewritten -./inc/mysql-manager.php:247: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:538: // @TODO Try to rewrite this to one or more functions -./inc/mysql-manager.php:567: // @TODO Try to rewrite this to one or more functions -./inc/mysql-manager.php:973: // @TODO Why does this lead into an endless loop but we still need it??? -./inc/mysql-manager.php:974: // @TODO Commented out redirectToUrl('admin.php'); -./inc/wrapper-functions.php:152:// @TODO Implement $compress -./inc/wrapper-functions.php:159:// @TODO Implement $decompress -./inc/wrapper-functions.php:389:// @TODO Do some more sanity check here -./mailid.php:140: // @TODO Rewrite this to a filter -./mailid.php:221: // @TODO Rewrite this to a filter -./mailid.php:96: // @TODO Rewrite this to a filter -./mailid_top.php:136: // @TODO Rewrite this to a filter -./mailid_top.php:183: // @TODO Rewrite this to a filter -./mailid_top.php:190: // @TODO Rewrite this to a filter -./mailid_top.php:227: // @TODO Rewrite these blocks to filter -./mailid_top.php:89: // @TODO Rewrite this to a filter -./show_bonus.php:108: // @TODO Rewrite this constant +./inc/modules/member/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$content['admin_id']."\">".$content['login']."</a>"; +./inc/modules/member/what-stats.php:115: // @TODO Rewrite in template: stamp->timestamp_ordered,recs->max_rec,clix->clicks,perc->percents +./inc/modules/member/what-stats.php:68: // @TODO Rewrite in template subj->subject,stamp->timestamp,recs->target_send +./inc/modules/member/what-transfer.php:101: // @TODO Rewrite this to a filter +./inc/modules/member/what-transfer.php:143: // @TODO Rewrite this to a filter +./inc/modules/member/what-transfer.php:233: // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries +./inc/modules/member/what-transfer.php:318: // @TODO This should be somehow rewritten to $row = SQL_FETCHARRAY(), see switch() block above for SQL queries +./inc/modules/member/what-transfer.php:324: // @TODO Rewrite: tid->trans_id,stamp->time_trans +./inc/modules/member/what-unconfirmed.php:132: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/order.php:75: // @TODO Unused: 2,4 +./inc/monthly/monthly_bonus.php:70: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1000: // @TODO Commented out redirectToUrl('admin.php'); +./inc/mysql-manager.php:1600: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:1808: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:2124: // @TODO This can be somehow rewritten +./inc/mysql-manager.php:220: // @TODO Nothing helped??? +./inc/mysql-manager.php:255: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:576: // @TODO Try to rewrite this to one or more functions +./inc/mysql-manager.php:605: // @TODO Try to rewrite this to one or more functions +./inc/mysql-manager.php:93:// @TODO Can we cache this? +./inc/mysql-manager.php:999: // @TODO Why does this lead into an endless loop but we still need it??? +./inc/reset/reset_birthday.php:91: // @TODO 4 is hard-coded here, should we move it out in config? +./inc/wrapper-functions.php:127:// @TODO Implement $compress +./inc/wrapper-functions.php:134:// @TODO Implement $decompress +./inc/wrapper-functions.php:396:// @TODO Do some more sanity check here +./mailid.php:135: // @TODO Rewrite this to a filter +./mailid.php:216: // @TODO Rewrite this to a dynamic include or so +./mailid.php:94: // @TODO Rewrite this to a filter +./mailid_top.php:134: // @TODO Rewrite this to a filter +./mailid_top.php:181: // @TODO Rewrite this to a filter +./mailid_top.php:188: // @TODO Rewrite this to a filter +./mailid_top.php:224: // @TODO Rewrite these blocks to filter +./mailid_top.php:259: // @TODO Try to rewrite the following unset() +./mailid_top.php:87: // @TODO Rewrite this to a filter ./view.php:72: // @TODO No banner found, output some default banner ### ### DEPRECATION FOLLOWS: ### ### -./inc/functions.php:244: // @DEPRECATED Try to rewrite the if() condition -./inc/functions.php:258: // @DEPRECATED -./inc/language-functions.php:55: // @DEPRECATED Language array element found in BIG_LETTERS -./inc/language-functions.php:58: // @DEPRECATED Deprecated constant found +./inc/autopurge.php:2:// @DEPRECATED +./inc/check-reset.php:2:// @DEPRECATED +./inc/doubler_send.php:2:// @DEPRECATED +./inc/extensions.php:2:// @DEPRECATED +./inc/fatal_errors.php:2:// @DEPRECATED +./inc/functions.php:241: // @DEPRECATED Try to rewrite the if() condition +./inc/functions.php:255: // @DEPRECATED +./inc/loader/load_cache-modreg.php:2:// @DEPRECATED +./inc/load_extensions.php:2:// @DEPRECATED +./inc/mails/birthday_mails.php:2:// @DEPRECATED +./inc/modules/admin/admin-inc.php:501:// @DEPRECATED +./inc/modules/admin/what-config_cache.php:2:// @DEPRECATED +./inc/modules/admin/what-list_newsletter.php:2:// @DEPRECATED +./inc/modules/welcome.php:2:// @DEPRECATED +./inc/patch-system.php:2:// @DEPRECATED +./inc/pool-update.php:2:// @DEPRECATED +./inc/profile-updte.php:2:// @DEPRECATED +./inc/rdf.class.php:2:// @DEPRECATED +./inc/security.php:2:// @DEPRECATED +./inc/sql_error.php:2:// @DEPRECATED +./inc/stats_bonus.php:2:// @DEPRECATED +./templates/de/emails/admin/admin_newsletter_request.tpl:1:@DEPRECATED +./templates/de/emails/member/member_newsletter_done.tpl:1:@DEPRECATED +./templates/de/emails/member/member_newsletter_request.tpl:1:@DEPRECATED +./templates/de/emails/member/member_newsletter_reset.tpl:1:@DEPRECATED +./templates/de/emails/sponsor_add_points.tpl:1:<!-- @DEPRECATED //--> +./templates/de/emails/sponsor_confirm.tpl:1:<!-- @DEPRECATED //--> +./templates/de/emails/sponsor_pending.tpl:1:<!-- @DEPRECATED //--> +./templates/de/emails/sponsor_sub_points.tpl:1:<!-- @DEPRECATED //--> +./templates/de/emails/sponsor_unlocked.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_add_reflvl.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_config_cache.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_config_home_settings_pro.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_config_reg_pro.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_extensions_list.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_list_extensions_row.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_list_extensions.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_mods_list_row.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_mods_list.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_newsletter_tsk.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_online_footer.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_online_header.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_online_list.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_online_row.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_patches_row.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_patches.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/admin/admin_theme_list.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/fatal_footer.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/fatal_header.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/guest/guest_confirm_table.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/install/install_footer.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/install/install_header.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/login_failtures.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/mailid/mailid_points_lcoked2.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/member/member_newsletter_note.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/member/member_primera.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/member/member_wernis_row.tpl:1:<!-- @DEPRECATED //--> +./templates/de/html/member/member_wernis.tpl:1:<!-- @DEPRECATED //--> +### ### template-warnings.log follows: ### ### +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_cats_footer.tpl, line: 7 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : form in templates/de/html/member/member_cats_footer.tpl, line: 8 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/member/member_content_right.tpl, line: 1 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/member/member_content_right.tpl, line: 5 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/member/member_welcome_footer.tpl, line: 1 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/member/member_welcome_footer.tpl, line: 2 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_welcome_footer.tpl, line: 3 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_footer.tpl, line: 6 in +Warning: DOMDocument::loadHTMLFile(): Document is empty in templates/de/html/header.tpl, line: 1 in /home +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu_what_end.tpl, line: 1 in /home +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu_what_end.tpl, line: 2 in /home +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/page_footer.tpl, line: 1 in /home +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : body in templates/de/html/page_footer.tpl, line: 2 in /home +Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_member_edit.tpl. +Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_stopped.tpl. +Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl. +Warning: Not parsing JavaScript templates/de/html/js/js_uberwach.tpl. +Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_member_book.tpl. +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_overview_footer.tpl, line: 10 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/admin/admin_overview_footer.tpl, line: 11 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : form in templates/de/html/admin/admin_overview_footer.tpl, line: 12 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_overview_footer_task.tpl, line: 10 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : form in templates/de/html/admin/admin_overview_footer_task.tpl, line: 11 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/admin/admin_main_footer.tpl, line: 1 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/admin/admin_main_footer.tpl, line: 2 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_main_footer.tpl, line: 12 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/guest/guest_rallye_expired_footer.tpl, line: 6 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/guest/guest_rallye_expired_footer.tpl, line: 7 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/guest/guest_footer.tpl, line: 6 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/guest/guest_content_footer.tpl, line: 1 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/guest/guest_content_footer.tpl, line: 5 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/guest/guest_doubler.tpl, line: 52 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/guest/guest_rallye_footer.tpl, line: 11 in +Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/guest/guest_menu_content.tpl, line: 2 in diff --git a/DOCS/en/rewrite/.htaccess b/DOCS/en/rewrite/.htaccess index 114ce6623f..cfee8318d6 100644 --- a/DOCS/en/rewrite/.htaccess +++ b/DOCS/en/rewrite/.htaccess @@ -1,5 +1,5 @@ -RewriteEngine On - -RewriteRule ^cms/(.*)/wht/(.*)$ modules.php?module=$1&what=$2 [L] -RewriteRule ^cms/(.*)/act/(.*)$ modules.php?module=$1&action=$2 [L] -RewriteRule ^cms/(.*)$ modules.php?module=$1 [L] +RewriteEngine On + +RewriteRule ^cms/(.*)/wht/(.*)$ modules.php?module=$1&what=$2 [L] +RewriteRule ^cms/(.*)/act/(.*)$ modules.php?module=$1&action=$2 [L] +RewriteRule ^cms/(.*)$ modules.php?module=$1 [L] diff --git a/DOCS/final-checker.sh b/DOCS/final-checker.sh old mode 100644 new mode 100755 index 4f2f2fa765..4f3acbaa9a --- a/DOCS/final-checker.sh +++ b/DOCS/final-checker.sh @@ -16,12 +16,12 @@ DEPRECATED_PHP=`find -type f -name "*.php" -exec grep "@DEPRECATED" {} \; | grep echo " - DEPRECATED TPL..." DEPRECATED_TPL=`find -type f -name "*.tpl" -exec grep "@DEPRECATED" {} \; | grep "@" --count` echo " - global statements..." -GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "phpmailer" | grep -v "/language/" | grep -v "EXT_" --count` +GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "phpmailer" --count` echo "$0: Result..." echo "--------------------------------------" echo " - Open TODOs: ${TODOS}" echo " - Open DEPRECATED (PHP/TPL): ${DEPRECATED_PHP}/${DEPRECATED_TPL}" -echo " - Global statements: ${GLOBALS}" +echo " - global statements: ${GLOBALS}" echo "--------------------------------------" echo "$0: Thanks for waiting for the final release 0.2.1-FINAL! :-)" echo diff --git a/DOCS/prop-set.sh b/DOCS/prop-set.sh old mode 100644 new mode 100755 diff --git a/DOCS/todo-builder.sh b/DOCS/todo-builder.sh old mode 100644 new mode 100755 index 3f238d7ae1..1bcf8c1aa4 --- a/DOCS/todo-builder.sh +++ b/DOCS/todo-builder.sh @@ -8,13 +8,23 @@ if ! test -e "modules.php"; then exit 1 fi +TODO=`dirname $0`/TODOs.txt + echo "$0: Generating TODOs.txt ..." -echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 ($UID/$USER) ###" > DOCS/TODOs.txt -echo "### DO NOT EDIT THIS FILE. ###" >> DOCS/TODOs.txt +echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=$UID/user=$USER) ###" > $TODO +echo "### DO NOT EDIT THIS FILE. ###" >> $TODO echo "$0: Searching for @TODO ..." -find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> DOCS/TODOs.txt -echo "### ### DEPRECATION FOLLOWS: ### ###" >> DOCS/TODOs.txt +find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> $TODO +echo "### ### DEPRECATION FOLLOWS: ### ###" >> $TODO echo "$0: Searching for @DEPRECATED ..." -find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> DOCS/TODOs.txt +find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> $TODO +find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> $TODO +echo "$0: Checking for template-warnings.log ..." +LOG=`dirname $0`/template-warnings.log +if test -e "$LOG"; then + echo "$0: Found a template-warnings.log, adding it..." + echo "### ### template-warnings.log follows: ### ###" >> $TODO + cat $LOG >> $TODO +fi echo "$0: Done." exit 0 diff --git a/DOCS/tpl-validator.php b/DOCS/tpl-validator.php index 147af4910e..132a3c01fb 100644 --- a/DOCS/tpl-validator.php +++ b/DOCS/tpl-validator.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,33 +37,49 @@ ************************************************************************/ if ($_SERVER['argc'] < 2) { - echo "Usage: ".basename(__FILE__)." <template> [--write]\n\n"; - echo "Validates a template against the DOM model. Use --write with caution!\n"; + print "Usage: ".basename(__FILE__)." <template> [--write]\n\n"; + print "Validates a template against the DOM model. Use --write with caution!\n"; + exit; +} elseif (strpos($_SERVER['argv'][1], '/js/') > 0) { + // Not parsing JavaScript templates! + print "Warning: Not parsing JavaScript ".$_SERVER['argv'][1].".\n"; exit; } +print "Validating template ".$_SERVER['argv'][1]."...\n"; + $doc = new DOMDocument(); $doc->formatOutput = true; $doc->preserveWhiteSpace = false; -$doc->encoding = "utf-8"; -$doc->xmlVersion = "1.1"; +$doc->encoding = 'utf-8'; +$doc->xmlVersion = '1.1'; $doc->loadHTMLFile($_SERVER['argv'][1]); $data = $doc->saveHTML(); -$data = str_replace("<br>", "<br />\n", $data); -$data = str_replace("\n\n", "\n", $data); +$newData = str_replace("<br>", "<br />\n", $data); +$newData = str_replace("\n\n", "\n", $newData); -$array = explode("\n", $data); +$array = explode("\n", $newData); array_shift($array); array_shift($array); unset($array[count($array) - 1]); unset($array[count($array) - 1]); -$data = implode("\n", $array)."\n"; +$newData = implode("\n", $array)."\n"; -if (strtolower($_SERVER['arv'][2]) == "--write") { - echo "Writing document...\n"; - file_put_contents($_SERVER['argv'][1], $data); +// Has a template changed? +if ($data != $newData) { + // Has changed + print "Template ".$_SERVER['argv'][1]." has maybe issues.\n"; +} else { + // Has not changed + print "Template ".$_SERVER['argv'][1]." might be issue-free.\n"; } +if (strtolower($_SERVER['arv'][2]) == '--write') { + print "Writing document...\n"; + file_put_contents($_SERVER['argv'][1], $data); +} // END - if + +// [EOF] ?> diff --git a/DOCS/validator.sh b/DOCS/validator.sh old mode 100644 new mode 100755 index 95539002a0..931964e3fa --- a/DOCS/validator.sh +++ b/DOCS/validator.sh @@ -1,3 +1,5 @@ #!/bin/sh -find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; | grep Warning | cut -d "/" -f 1-5 | grep -v "error parsing attribute name">warnings.log +echo "$0: Validating all templates..." +find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; | grep Warning | cut -d "/" -f 1-5 | grep -v "error parsing attribute name" > `dirname $0`/template-warnings.log +echo "$0: done." diff --git a/admin.php b/admin.php index 410750546d..ffafc01937 100644 --- a/admin.php +++ b/admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,14 +46,8 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Is the admin logged-in and no sql_patches installed? -if ((IS_ADMIN()) && (!EXT_IS_ACTIVE('sql_patches'))) { +if ((isAdmin()) && (!isExtensionActive('sql_patches'))) { // Extension 'sql_patches' is missing! redirectToUrl('modules.php?module=admin&sql_patches=1'); } else { diff --git a/agb.php b/agb.php index 19947b5efa..bbb5da499d 100644 --- a/agb.php +++ b/agb.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,12 +46,6 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Simply redirect... :-) redirectToUrl('modules.php?module=index&what=agb'); diff --git a/beg.php b/beg.php index 29ed819466..c411b85b9e 100644 --- a/beg.php +++ b/beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,26 +44,22 @@ $GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'beg'; -$GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = -1; $errorCode = null; // Load the required file(s) require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Is the 'beg' extension active? REDIRCT_ON_UNINSTALLED_EXTENSION('beg'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Check for userid -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // Init variables - $uid = 0; + $userid = 0; $result = false; $points = 0; @@ -71,20 +67,20 @@ if (REQUEST_ISSET_GET('uid')) { $pay = false; // Validate if it is not a number - if (''.(REQUEST_GET('uid') + 0).'' !== ''.REQUEST_GET('uid').'') { - if (EXT_IS_ACTIVE('nickname')) { + if (''.(getRequestElement('userid') + 0).'' !== ''.getRequestElement('userid').'') { + if (isExtensionActive('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", - array(REQUEST_GET('uid')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `beg_clicks`, `ref_payout`, `status`, `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' LIMIT 1", + array(getRequestElement('userid')), __FILE__, __LINE__); } else { // Nickname entered but nickname is not active $errorCode = getCode('EXTENSION_PROBLEM'); - $uid = -1; + $userid = -1; } } 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", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $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(getRequestElement('userid'))), __FILE__, __LINE__); } // Check if locked in so don't pay points @@ -93,12 +89,12 @@ if (REQUEST_ISSET_GET('uid')) { // Check if account was found if (SQL_NUMROWS($result) == 1) { // Found an ID so we simply set it - list($uid, $clicks, $ref_payout, $status, $last) = SQL_FETCHROW($result); + list($userid, $clicks, $ref_payout, $status, $last) = SQL_FETCHROW($result); // Account confirmed? if ($status == 'CONFIRMED') { // Secure userid - $uid = bigintval($uid); + $userid = bigintval($userid); // Multiply configured values with 100000 and divide with 100000 so we can also handle small values // If we need more number behind the decimal dot then we just need to increase all these three @@ -106,13 +102,13 @@ if (REQUEST_ISSET_GET('uid')) { $points = mt_rand((getConfig('beg_points') * 100000), (getConfig('beg_points_max') * 100000)) / 100000; // Set nickname / userid for the template(s - define('__BEG_UID' , REQUEST_GET('uid')); - define('__BEG_CLICKS', ($clicks + 1)); - define('__BEG_BANNER', LOAD_TEMPLATE('beg_banner', true)); - define('__BEG_POINTS', translateComma($points)); + $content['userid'] = getRequestElement('userid'); + $content['clicks'] = ($clicks + 1); + $content['banner'] = loadTemplate('beg_banner', true); + $content['points'] = translateComma($points); } else { // Other status - $uid = 0; + $userid = 0; } } // END - if @@ -120,25 +116,25 @@ if (REQUEST_ISSET_GET('uid')) { SQL_FREERESULT($result); // User id valid and not webmaster's id? - if (($uid > 0) && (getConfig('beg_uid') != $uid)) { + if (($userid > 0) && (getConfig('beg_userid') != $userid)) { // Update counter - 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__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_clicks`=`beg_clicks`+1 WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array($userid), __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", - array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_userid_timeout').") AND `userid`=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1", + array($userid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? - if (((SQL_NUMROWS($result) == 0) || (IS_ADMIN())) && ($points > 0) && (!IS_MEMBER()) && (getConfig('beg_pay_mode') == 'NONE')) { + if (((SQL_NUMROWS($result) == 0) || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) { // Admin is testing? - if (!IS_ADMIN()) { + if (!isAdmin()) { // 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())", - array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_beg_ips` (`userid`, `remote_ip`,`sid`, `timeout`) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())", + array($userid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Was is successfull? $pay (SQL_AFFECTEDROWS() == 1); @@ -150,34 +146,34 @@ if (REQUEST_ISSET_GET('uid')) { // Pay points? if ($pay === true) { // Add points to user or begging rallye account - if (BEG_ADD_POINTS($uid, $points)) { + if (addPointsBeg($userid, $points)) { // Set 'done' message - $content['msg'] = LOAD_TEMPLATE('beg_done', true); + $content['message'] = loadTemplate('beg_done', true); } else { // Error! - $content['msg'] = LOAD_TEMPLATE('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true); } } else { // Error! - $content['msg'] = LOAD_TEMPLATE('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true); } - } elseif (IS_MEMBER()) { + } elseif (isMember()) { // Logged in user found! - $content['msg'] = LOAD_TEMPLATE('beg_login', true); + $content['message'] = loadTemplate('beg_login', true); } elseif (getConfig('beg_pay_mode') != 'NONE') { // Other pay-mode active! // Prepare content for template $content = array( - 'clicks' => constant('__BEG_CLICKS'), - 'points' => constant('__BEG_POINTS'), - 'uid' => constant('__BEG_UID') + 'clicks' => $content['clicks'], + 'points' => $content['points'], + 'userid' => $content['userid'] ); // Load message template depending on pay-mode - $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content); + $content['message'] = loadTemplate('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content); $pay = true; } else { // Clicked received while reload lock is active - $content['msg'] = LOAD_TEMPLATE('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true); } // Free memory @@ -187,7 +183,7 @@ if (REQUEST_ISSET_GET('uid')) { loadIncludeOnce('inc/header.php'); // Load final template - LOAD_TEMPLATE('beg_link', false, $content); + loadTemplate('beg_link', false, $content); // Tracker code enabled? (We don't track users here! if ((getConfig('beg_pay_mode') != 'NONE') && ($pay === true)) { @@ -197,10 +193,10 @@ if (REQUEST_ISSET_GET('uid')) { ); // Include config-depending template - LOAD_TEMPLATE('beg_pay_code_'.strtolower(getConfig('beg_pay_mode')), false, $content); - } elseif ((!$pay) && (!isset($content['msg']))) { + loadTemplate('beg_pay_code_'.strtolower(getConfig('beg_pay_mode')), false, $content); + } elseif (($pay === false) && (!isset($content['message']))) { // Cannot pay! :-( - $content['msg'] = LOAD_TEMPLATE('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true); } // Include footer @@ -208,10 +204,10 @@ if (REQUEST_ISSET_GET('uid')) { } elseif (($status != 'CONFIRMED') && ($status != 'failed')) { // Maybe locked/unconfirmed account? $errorCode = generateErrorCodeFromUserStatus($status); - } elseif (($uid == '0') || ($status == 'failed')) { + } elseif (($userid == '0') || ($status == 'failed')) { // Inalid or locked account, so let's find out - $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", - array(REQUEST_GET('uid')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_data` WHERE nickname='%s' LIMIT 1", + array(getRequestElement('userid')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Locked account $errorCode = getCode('ACCOUNT_LOCKED'); @@ -222,13 +218,13 @@ if (REQUEST_ISSET_GET('uid')) { // Free memory SQL_FREERESULT($result); - } elseif ($uid == getConfig('beg_uid')) { + } elseif ($userid == getConfig('beg_userid')) { // Webmaster's ID cannot beg for points! $errorCode = getCode('BEG_SAME_AS_OWN'); } // Reload to index module - if ((!empty($errorCode)) && (!empty($errorCode))) redirectToUrl('modules.php?module=index&msg=' . $errorCode . '&ext=beg'); + if ((!empty($errorCode)) && (!empty($errorCode))) redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=beg'); } else { // No userid entered redirectToUrl('modules.php?module=index'); diff --git a/birthday_confirm.php b/birthday_confirm.php index f72b7a7195..68738e58d9 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Birthday bonus confirmation link * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Geburtstagsgutschrift bestaetigen * + * Kurzbeschreibung : Geburtstagsgutschrift bestätigen * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,34 +49,31 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Is the 'birthday' extension active? redirectOnUninstalledExtension('birthday'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Script is installed so let's check for his confirmation link... -$uid = bigintval(REQUEST_GET('uid')); +$userid = bigintval(getRequestElement('userid')); // Only allow numbers here... -$chk = bigintval(REQUEST_GET('check'), false); +$chk = bigintval(getRequestElement('check'), false); // 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 + `{?_MYSQL_PREFIX?}_user_birthday` AS b INNER JOIN - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_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__); -//* DEBUG: */ OUTPUT_HTML("uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")<br />"); + array($userid, $chk), __FILE__, __LINE__); +//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestElement('check')).'/'.SQL_NUMROWS($result).")<br />"); // Prepare content $content = array(); @@ -93,32 +90,27 @@ if (SQL_NUMROWS($result) == 1) { if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != 'Y')) $locked = true; // Add points to account + // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM('birthday_confirm', $uid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode'))); - - // Update mediadata if version is 0.0.4 or newer - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { - // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $data['points']); - } // END - if + addPointsThroughReferalSystem('birthday_confirm', $userid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode'))); // Remove entry from table - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE `userid`=%s AND `chk_value`='%s' LIMIT 1", - array($uid, $chk), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_birthday` WHERE `userid`=%s AND `chk_value`='%s' LIMIT 1", + array($userid, $chk), __FILE__, __LINE__); // "Translate" some data $data['gender'] = translateGender($data['gender']); $data['points'] = translateComma($data['points']); // Load message from template - $content['msg'] = LOAD_TEMPLATE('birthday_msg', true, $data); + $content['message'] = loadTemplate('birthday_msg', true, $data); } else { // Unconfirmed / locked accounts cannot get points - $content['msg'] = sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), translateUserStatus($data['status'])); + $content['message'] = sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), translateUserStatus($data['status'])); } } else { // Cannot load data! - $content['msg'] = getMessage('BIRTHDAY_CANNOT_LOAD_DATA'); + $content['message'] = getMessage('BIRTHDAY_CANNOT_LOAD_DATA'); } // Free memory @@ -131,13 +123,13 @@ $GLOBALS['module'] = 'birthday_confirm'; loadIncludeOnce('inc/header.php'); // Load birthday header template (for your banners, e.g.?) -$content['header'] = LOAD_TEMPLATE('birthday_header', true); +$content['header'] = loadTemplate('birthday_header', true); // Load birthday footer template (for your banners, e.g.?) -$content['footer'] = LOAD_TEMPLATE('birthday_footer', true); +$content['footer'] = loadTemplate('birthday_footer', true); // Load final template and output it -LOAD_TEMPLATE('birthday_confirm', false, $content); +loadTemplate('birthday_confirm', false, $content); // Include footer loadIncludeOnce('inc/footer.php'); diff --git a/click.php b/click.php index 6a17401d26..83c4381cb5 100644 --- a/click.php +++ b/click.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,14 +46,14 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -if (((REQUEST_ISSET_GET('user')) || (REQUEST_ISSET_GET('reseller'))) && (REQUEST_ISSET_GET('banner'))) { +if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) && (isGetRequestElementSet('banner'))) { // Update clicks counter... - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET clicks=clicks+1 WHERE `id`=%s LIMIT 1", array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET clicks=clicks+1 WHERE `id`=%s LIMIT 1", array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { - if (REQUEST_ISSET_GET('user')) { - redirectToUrl('ref.php?refid=' . bigintval(REQUEST_GET('user'))); - } elseif (REQUEST_ISSET_GET('reseller')) { - redirectToUrl('shop_reseller.php?reseller=' . bigintval(REQUEST_GET('reseller'))); + if (isGetRequestElementSet('user')) { + redirectToUrl('ref.php?refid=' . bigintval(getRequestElement('user'))); + } elseif (isGetRequestElementSet('reseller')) { + redirectToUrl('shop_reseller.php?reseller=' . bigintval(getRequestElement('reseller'))); } } // END - if } // END - if diff --git a/confirm.php b/confirm.php index 53446c5325..fd8105ac78 100644 --- a/confirm.php +++ b/confirm.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,27 +46,17 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -// Is the script installed? -if ((isInstalled()) && (isAdminRegistered())) { - // Base URL for redirection - $URL = 'modules.php?module=index&what=confirm&hash='; - if (!REQUEST_ISSET_GET('hash')) { - // No refid and we add our refid (don't forget to set $def_refid!) - $URL = 'modules.php?module=index'; - } else { - // We have an refid here. So we simply add it - $URL .= REQUEST_GET('hash'); - } +// No hash provided by default +$URL = 'modules.php?module=index'; - // Load the URL - redirectToUrl($URL); -} else { - // You have to install first! - redirectToUrl('install.php'); -} +// Is the hash there? +if (isGetRequestElementSet('hash')) { + // We have an refid here. So we simply add it + $URL = 'modules.php?module=index&what=confirm&hash=' . getRequestElement('hash'); +} // END - if -// Really all done here... ;-) -shutdown(); +// Load the URL +redirectToUrl($URL); // [EOF] ?> diff --git a/css.php b/css.php index 608c11e387..e271b11eca 100644 --- a/css.php +++ b/css.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ $GLOBALS['module'] = 'css'; require('inc/config-global.php'); // Set header -sendHeader('Content-type: text/css'); +setContentType('text/css'); // Load header loadIncludeOnce('inc/header.php'); diff --git a/debug.php b/debug.php index 4bf0774391..6768e95cc0 100644 --- a/debug.php +++ b/debug.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,34 +47,28 @@ $GLOBALS['output_mode'] = -1; require('inc/config-global.php'); // Redirect only to registration page when this script is installed -if ((isInstalled()) && (getTotalFatalErrors() == 0)) { - // Is the extension installed? - if (!EXT_IS_ACTIVE('debug')) { - // Then abort here - shutdown(); - } // END - if - +if ((isExtensionActive('debug')) && (getTotalFatalErrors() == 0)) { // Is the request parameter set? - if (REQUEST_ISSET_POST('request')) { + if (isPostRequestElementSet('request')) { // Handle the request - if (DEBUG_HANDLE_REQUEST(REQUEST_POST('request'))) { + if (DEBUG_HANDLE_REQUEST(postRequestElement('request'))) { // Construct FQFN for the module - $INC = sprintf("inc/debug/%s/request_%s", + $inc = sprintf("inc/debug/%s/request_%s", getConfig('debug_mode'), - SQL_ESCAPE(REQUEST_POST('request')) + SQL_ESCAPE(postRequestElement('request')) ); // Is the module there? Else we log it! - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // Load the request module - loadInclude($INC); + loadInclude($inc); } else { // Missing request file, may happen while development - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', REQUEST_POST('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', postRequestElement('request')); } } else { // Unhandled request detected - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', REQUEST_POST('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', postRequestElement('request')); } } else { // Empty request diff --git a/doubler.php b/doubler.php index 4704569275..9b6745a31d 100644 --- a/doubler.php +++ b/doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,35 +44,31 @@ $GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'doubler'; -$GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = 0; // Load the required file(s) require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Is the 'doubler' extension active? redirectOnUninstalledExtension('doubler'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Probe for referal ID -if (REQUEST_ISSET_GET('refid')) $GLOBALS['refid'] = REQUEST_GET('refid'); +if (isGetRequestElementSet('refid')) $GLOBALS['refid'] = getRequestElement('refid'); // Only check this if refid is provided! -if ($GLOBALS['refid'] > 0) { +if (determineReferalId() > 0) { // Do we have nickname or userid set? - if (isNicknameUsed($GLOBALS['refid'])) { + if (isNicknameUsed(determineReferalId())) { // Nickname in URL, so load the ID - $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `nickname`='%s' LIMIT 1", - array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' LIMIT 1", + array(determineReferalId()), __FILE__, __LINE__); } else { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(determineReferalId()), __FILE__, __LINE__); } // Load data @@ -84,7 +80,7 @@ if ($GLOBALS['refid'] > 0) { } // END - if // Init userid -$uid = 0; +$userid = 0; // If no account was found set default refid and status to CONFIRMED if (empty($GLOBALS['refid'])) { @@ -92,67 +88,72 @@ if (empty($GLOBALS['refid'])) { $status = 'CONFIRMED'; } // END - if +// Init content array +$content = array( + 'message' => '', +); + // Begin with doubler script... if (isFormSent()) { // Secure points (so only integer/double values are allowed - REQUEST_SET_POST('points', bigintval(REQUEST_POST('points'))); + setRequestPostElement('points', bigintval(postRequestElement('points'))); // Begin with doubling process - if ((REQUEST_ISSET_POST('userid')) && (REQUEST_ISSET_POST('pass')) && (REQUEST_ISSET_POST('points'))) { + if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('pass')) && (isPostRequestElementSet('points'))) { // Probe for nickname extension and if a nickname was entered - if (isNickNameUsed(REQUEST_POST('userid'))) { + if (isNickNameUsed(postRequestElement('userid'))) { // 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", - array(REQUEST_POST('userid')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status`, `password` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' LIMIT 1", + array(postRequestElement('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", - array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status, `password` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(postRequestElement('userid'))), __FILE__, __LINE__); } // Load data - list($uid, $status, $password) = SQL_FETCHROW($result); - $uid = bigintval($uid); + list($userid, $status, $password) = SQL_FETCHROW($result); + $userid = bigintval($userid); // Free result SQL_FREERESULT($result); // Remove any dots and unwanted chars from the points - REQUEST_SET_POST('points', bigintval(round(convertCommaToDot(REQUEST_POST('points'))))); + setRequestPostElement('points', bigintval(round(convertCommaToDot(postRequestElement('points'))))); // Probe for enough points - $probe_points = ((REQUEST_POST('points') >= getConfig('doubler_min')) && (REQUEST_POST('points') <= getConfig('doubler_max'))); + $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max'))); // Check all together - if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == 'CONFIRMED') && ($probe_points)) { + if ((!empty($userid)) && ($password == generateHash(postRequestElement('pass'), substr($password, 0, -40))) && ($status == 'CONFIRMED') && ($probe_points)) { // Nickname resolved to a unique userid or direct userid entered by the member - $GLOBALS['doubler_uid'] = $uid; + $GLOBALS['doubler_userid'] = $userid; // Calulcate points - $points = GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points'); + $points = countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points'); // So let's continue with probing his points amount - if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0) { + if (($points - getConfig('doubler_left') - postRequestElement('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','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')", - array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')", + array($userid, determineReferalId(), bigintval(postRequestElement('points') * 2)), __FILE__, __LINE__); // Subtract entered points - SUB_POINTS('doubler', $uid, REQUEST_POST('points')); + subtractPoints('doubler', $userid, postRequestElement('points')); // Add points to "total payed" including charge - $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge'); + $points = postRequestElement('points') - postRequestElement('points') * getConfig('doubler_charge'); updateConfiguration('doubler_points', $points, '+'); incrementConfigEntry('doubler_points', $points); - // Add second line for the referal but only when uid != refid - if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) { + // Add second line for the referal but only when userid != refid + if ((determineReferalId() > 0) && (determineReferalId() != $userid)) { // 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','".detectRemoteAddr()."',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','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')", array( - bigintval($GLOBALS['refid']), - bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref')) + determineReferalId(), + bigintval(postRequestElement('points') * 2 * getConfig('doubler_ref')) ), __FILE__, __LINE__); // And that's why we don't want to you more than one referal level of doubler-points. ^^^ @@ -162,112 +163,96 @@ if (isFormSent()) { updateConfiguration('doubler_counter', 1, '+'); // Set constant - define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid'))); + $content['message'] = loadTemplate('doubler_reflink', true, postRequestElement('userid')); } else { // Not enougth points left - define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT')); + $content['message'] = getMessage('DOUBLER_FORM_NO_POINTS_LEFT'); } } elseif ($status == 'CONFIRMED') { // Account is unconfirmed! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS')); + $content['message'] = getMessage('DOUBLER_FORM_WRONG_PASS'); } elseif ($status == 'UNCONFIRMED') { // Account is unconfirmed! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED')); + $content['message'] = getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'); } elseif ($status == 'LOCKED') { // Account is locked by admin / holiday! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED')); - } elseif (REQUEST_POST('points') < getConfig('doubler_min')) { + $content['message'] = getMessage('DOUBLER_FORM_STATUS_LOCKED'); + } elseif (postRequestElement('points') < getConfig('doubler_min')) { // Not enougth points entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN')); - } elseif (REQUEST_POST('points') > getConfig('doubler_max')) { + $content['message'] = getMessage('DOUBLER_FORM_POINTS_MIN'); + } elseif (postRequestElement('points') > getConfig('doubler_max')) { // Too much points entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX')); - } elseif (isNickNameUsed(REQUEST_POST('userid'))) { + $content['message'] = getMessage('DOUBLER_FORM_POINTS_MAX'); + } elseif (isNickNameUsed(postRequestElement('userid'))) { // Cannot resolv nickname -> userid - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME')); + $content['message'] = getMessage('DOUBLER_FORM_404_NICKNAME'); } else { // Wrong password or account not found - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER')); + $content['message'] = getMessage('DOUBLER_FORM_404_MEMBER'); } - } elseif (!REQUEST_ISSET_POST('userid')) { + } elseif (!isPostRequestElementSet('userid')) { // Login not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN')); - } elseif (!REQUEST_ISSET_POST('pass')) { + $content['message'] = getMessage('DOUBLER_FORM_404_LOGIN'); + } elseif (!isPostRequestElementSet('pass')) { // Password not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD')); - } elseif (!REQUEST_ISSET_POST('points')) { + $content['message'] = getMessage('DOUBLER_FORM_404_PASSWORD'); + } elseif (!isPostRequestElementSet('points')) { // points not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS')); + $content['message'] = getMessage('DOUBLER_FORM_404_POINTS'); } } -// Set messages to nothing -if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', ''); -if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , ''); - // Shall I check for points immediately? -if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php'); +if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/mails/doubler_mails.php'); // Output header loadIncludeOnce('inc/header.php'); // Banner in text -define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true)); +$content['banner'] = loadTemplate('doubler_banner', true); // Load header/footer templates -define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true)); -define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true)); +$content['header'] = loadTemplate('doubler_header', true); +$content['footer'] = loadTemplate('doubler_footer', true); -if (!empty($uid)) { +if (!empty($userid)) { // Transfer userid/nickname to constant - define('__REFID', $uid); + $content['refid'] = $userid; } else { // Transfer userid/nickname to constant - define('__REFID', $GLOBALS['refid']); + $content['refid'] = determineReferalId(); } // Percent values etc. -define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100)); -define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100)); -define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points'))); -define('__MIN_VALUE' , translateComma(getConfig('doubler_min'))); -define('__MAX_VALUE' , translateComma(getConfig('doubler_max'))); +$content['charge'] = translateComma(getConfig('doubler_charge') * 100); +$content['ref'] = translateComma(getConfig('doubler_ref') * 100); +$content['total'] = translateComma(getConfig('doubler_points')); +$content['min'] = translateComma(getConfig('doubler_min')); +$content['max'] = translateComma(getConfig('doubler_max')); // Text "Enter login" -if (EXT_IS_ACTIVE('nickname')) { +if (isExtensionActive('nickname')) { // Choose login/nickname - define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME')); + $content['enter_login'] = getMessage('GUEST_ENTER_LOGIN_NICKNAME'); } else { // Simple login ID - define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN')); + $content['enter_login'] = getMessage('GUEST_ENTER_LOGIN'); } // Which mail-send-mode did the admin setup? -switch (getConfig('doubler_send_mode')) { - case 'DIRECT': - define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT')); - break; - - case 'RESET': - define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET')); - break; -} +$content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode')); // Generate table with already payed out doubles -define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC')); +$content['payout_history'] = generateDoublerTable('0', 'Y', 'N', 'DESC'); // Generate timemark -define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout'))); - -// Usage counter -define('__DOUBLER_COUNTER', getConfig('doubler_counter')); +$content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout')); // Points left to doubler -define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT())); +$content['left'] = translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()); // Output neccessary form for this -// @TODO Rewrite all constants -LOAD_TEMPLATE('doubler_index'); +loadTemplate('doubler_index', false, $content); // Output footer loadIncludeOnce('inc/footer.php'); diff --git a/img.php b/img.php index fb384e8a44..6004fe0c53 100644 --- a/img.php +++ b/img.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,29 +46,23 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -// Script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Load header loadIncludeOnce('inc/header.php'); // Code set? -if (REQUEST_ISSET_GET('code')) { +if (isGetRequestElementSet('code')) { // Generate image - GENERATE_IMAGE(bigintval(REQUEST_GET('code'))); -} elseif (REQUEST_ISSET_GET('tag')) { - // Tag set so create the IFN (Include-FileName) - $INC = sprintf("inc/img/tag-%s.php", - REQUEST_GET('tag') + generateImageOrCode(bigintval(getRequestElement('code'))); +} elseif (isGetRequestElementSet('img')) { + // 'img' set so create the IFN (Include-FileName) + $inc = sprintf("inc/img/tag-%s.php", + getRequestElement('img') ); // Include is readable? - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // Include it - loadInclude($INC); + loadInclude($inc); } // END - if } diff --git a/inc/.secret/.htaccess b/inc/.secret/.htaccess index 14249c50bd..3a42882788 100644 --- a/inc/.secret/.htaccess +++ b/inc/.secret/.htaccess @@ -1 +1 @@ -Deny from all \ No newline at end of file +Deny from all diff --git a/inc/autopurge.php b/inc/autopurge.php index 5f2af6265f..f551ef47b7 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -1,56 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 05/29/2004 * - * =============== Last change: 11/26/2004 * - * * - * -------------------------------------------------------------------- * - * File : autopurge.php * - * -------------------------------------------------------------------- * - * Short description : Automatical purging of outdated mail links * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} // END - if - -// Init & set the include pool -INIT_INC_POOL(); -SET_INC_POOL(getArrayFromDirectory('inc/autopurge/', 'purge-')); - -// Run the filter -runFilterChain('load_includes'); - -// Run filters for extra autopurge -runFilterChain('extra_autopurge'); - -// +// @DEPRECATED ?> diff --git a/inc/autopurge/purge- b/inc/autopurge/purge- index 85bf8951a9..4cf502e0ca 100644 --- a/inc/autopurge/purge- +++ b/inc/autopurge/purge- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') == 'N')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index 4cf845baf0..c1e0ffa31f 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,19 +39,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } if ((getConfig('auto_purge_active') == 'Y') && (getConfig('auto_purge') > 0)) { // Init SQLs - INIT_SQLS(); + initSqls(); // First calculate the timestamp $PURGE = getConfig('auto_purge'); @@ -60,61 +59,68 @@ if ((getConfig('auto_purge_active') == 'Y') && (getConfig('auto_purge') > 0)) { $admin_points = 0; // Then check for outdated mail order. We don't delete them just the confirmation links will be deleted. - $result = SQL_QUERY_ESC("SELECT s.id, s.userid, s.pool_id, t.price -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__); + $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 +ON + s.payment_id=t.id +WHERE + s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) +ORDER BY + s.userid ASC", + array(bigintval($PURGE)), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start deleting procedure - $uid = 0; $points = 0; + $userid = 0; $points = 0; while ($content = SQL_FETCHARRAY($result)) { // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `stats_id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__); + $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s LIMIT 1", + array(bigintval($content['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) == 1) { // Free memory SQL_FREERESULT($result_links); // At least one link was found, enougth to pay back the points - if (($uid != $content['userid']) && ($uid > 0) && ($points > 0)) { + if (($userid != $content['userid']) && ($userid > 0) && ($points > 0)) { // Directly add points back to senders account - AUTOPURGE_ADD_POINTS($uid, $points); + addPointsAutoPurge($userid, $points); $points = 0; } // END - if // Add points - $uid = $content['userid']; $points += $content['price']; $admin_points += $content['price']; + $userid = $content['userid']; $points += $content['price']; $admin_points += $content['price']; // Remove confirmation links from queue - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `stats_id`=%s", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s", + array(bigintval($content['id'])), __FILE__, __LINE__, false)); // Update status of order - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1", - array(bigintval($content['pool_id'])), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1", + array(bigintval($content['pool_id'])), __FILE__, __LINE__, false)); } // END - if } // END - while // Add last points to last user account - if ($points > 0) AUTOPURGE_ADD_POINTS($uid, $points); + if ($points > 0) addPointsAutoPurge($userid, $points); } // END - if // Free memory SQL_FREERESULT($result); // Is the 'bonus' extension installed and activated? - if (EXT_IS_ACTIVE('bonus', true)) { + if (isExtensionActive('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 ($content = SQL_FETCHARRAY($result)) { // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `bonus_id`=%s", + $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", array(bigintval($content['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) > 0) { // At least one link was found, enougth to pay back the points @@ -124,17 +130,17 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", SQL_FREERESULT($result_links); // Remove confirmation links from queue - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `bonus_id`=%s", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", + array(bigintval($content['id'])), __FILE__, __LINE__, false)); // Update status of order - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1", + array(bigintval($content['id'])), __FILE__, __LINE__, false)); } // END - if } // END - while // Add points to jackpot - ADD_JACKPOT($points); + if (isExtensionActive('jackpot')) addPointsToJackpot($points); // Add points for the admin $admin_points += $points; diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index 4145d9a3e6..93dcb5b2b6 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if @@ -51,7 +50,7 @@ if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Shall I look for inactive accounts and autopurge inactive accounts? if (getConfig('autopurge_inactive') == 'Y') { // Init SQLs - INIT_SQLS(); + initSqls(); // Init exclusion list $EXCLUDE_LIST = ''; @@ -60,23 +59,29 @@ if (getConfig('autopurge_inactive') == 'Y') { } // END - if // Check for more extensions - if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; - if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; - if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; + if (isExtensionActive('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid').""; + if (isExtensionActive('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid').""; + if (isExtensionActive('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid').""; // Check for new holiday extension - if (GET_EXT_VERSION('holiday') >= '0.1.3') { + if (getExtensionVersion('holiday') >= '0.1.3') { // Include only users with no active holiday $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; } // END - if // 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 -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(, + $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online +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 ASC", + array( getConfig('ap_inactive_since'), getConfig('ap_inactive_since'), getConfig('ap_inactive_since') @@ -85,8 +90,8 @@ ORDER BY d.userid", if (SQL_NUMROWS($result_inactive) > 0) { // Prepare variables and constants... $UIDs = ''; - define('__INACTIVE_SINCE', (getConfig('ap_inactive_since') / 60 / 60)); - define('__INACTIVE_TIME' , (getConfig('ap_in_time') / 60 / 60)); + $content['since'] = (getConfig('ap_inactive_since') / 60 / 60); + $content['time'] = (getConfig('ap_inactive_time') / 60 / 60); // Mark found accounts as inactive and send an email while ($content = SQL_FETCHARRAY($result_inactive)) { @@ -97,16 +102,16 @@ ORDER BY d.userid", $content['last_online'] = generateDateTime($content['last_online'], '0'); // Load mail template - $message = LOAD_EMAIL_TEMPLATE("member_autopurge_inactive", $content['last_online'], bigintval($content['userid'])); + $message = loadEmailTemplate('member_autopurge_inactive', $content, bigintval($content['userid'])); sendEmail($content['email'], getMessage('AUTOPURGE_MEMBER_INACTIVE_SUBJECT'), $message); // Update this account - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `ap_notified`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1", + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ap_notified`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__, false)); } // END - while // Remove last comma - $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); + $UIDs = str_replace(', ', "\n", substr($UIDs, 0, -2)); // Send mail notification to admin sendAdminNotification(getMessage('AUTOPURGE_ADMIN_INACTIVE_SUBJECT'), 'admin_autopurge_inactive', $UIDs, ''); @@ -118,14 +123,14 @@ ORDER BY d.userid", // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list // here for e.g. excluding holiday users $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` ASC", array( getConfig('ap_inactive_since'), getConfig('ap_inactive_since'), - getConfig('ap_in_time') + getConfig('ap_inactive_time') ), __FILE__, __LINE__); if (SQL_NUMROWS($result_inactive) > 0) { @@ -141,7 +146,7 @@ ORDER BY `userid` ASC", $content['last_online'] = generateDateTime($content['last_online'], '0'); // Finnaly delete this inactive account - deleteUserAccount($content['userid'], LOAD_EMAIL_TEMPLATE('member_autopurge_delete', $content['last_online'], '')); + deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_delete', $content['last_online'], '')); } // END - while // Remove last comma @@ -160,5 +165,5 @@ ORDER BY `userid` ASC", runFilterChain('run_sqls'); } // END - if -// +// [EOF] ?> diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index a6ab6e20e7..1528fc2ebe 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if @@ -51,11 +50,14 @@ if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Search for mails from deleted members? if (getConfig('ap_del_mails') == 'Y') { // Okay, let's check for them... - $result_mails = SQL_QUERY_ESC("SELECT `sender` -FROM `{!_MYSQL_PREFIX!}_pool` -WHERE `data_type`='DELETED' AND `timestamp` <= (UNIX_TIMESTAMP() - %s) -ORDER BY `sender` ASC", - array(getConfig('ap_dm_timeout')), __FILE__, __LINE__); + $result_mails = SQL_QUERY("SELECT + `sender` +FROM + `{?_MYSQL_PREFIX?}_pool` +WHERE + `data_type`='DELETED' AND `timestamp` <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) +ORDER BY + `sender` ASC", __FILE__, __LINE__); // Reset counter... $DELETED = 0; @@ -65,20 +67,23 @@ ORDER BY `sender` ASC", // Okay, check for their sender's while ($content = SQL_FETCHARRAY($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($content['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($content['sender'])), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ...; - $result_mails = SQL_QUERY_ESC("SELECT `sender` -FROM `{!_MYSQL_PREFIX!}_pool` -WHERE `data_type`='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s) -ORDER BY `sender` ASC", - array(getConfig('ap_dm_timeout')), __FILE__, __LINE__); + $result_mails = SQL_QUERY("SELECT + `sender` +FROM + `{?_MYSQL_PREFIX?}_pool` +WHERE + `data_type`='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) +ORDER BY + `sender` ASC", __FILE__, __LINE__); } } } @@ -87,31 +92,37 @@ ORDER BY `sender` ASC", SQL_FREERESULT($result_mails); // Now let's check for stats entries as well; - $result_mails = SQL_QUERY_ESC("SELECT `sender` -FROM `{!_MYSQL_PREFIX!}_user_stats` -WHERE `data_type`='DELETED' AND `timestamp_send` <= (UNIX_TIMESTAMP() - %s) -ORDER BY `sender` ASC", - array(getConfig('ap_dm_timeout')), __FILE__, __LINE__); + $result_mails = SQL_QUERY("SELECT + `sender` +FROM + `{?_MYSQL_PREFIX?}_user_stats` +WHERE + `data_type`='DELETED' AND `timestamp_send` <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) +ORDER BY + `sender` ASC", __FILE__, __LINE__); // Do we have "purged" mails? if (SQL_NUMROWS($result_mails) > 0) { // Okay, check for their sender's while ($content = SQL_FETCHARRAY($result_mails)) { // Check now... - $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", + $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($content['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", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `sender`=%s", array(bigintval($content['sender'])), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... - $result_mails = SQL_QUERY_ESC("SELECT `sender` -FROM `{!_MYSQL_PREFIX!}_user_stats` -WHERE `data_type`='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s) -ORDER BY `sender` ASC", - array(getConfig('ap_dm_timeout')), __FILE__, __LINE__); + $result_mails = SQL_QUERY("SELECT + `sender` +FROM + `{?_MYSQL_PREFIX?}_user_stats` +WHERE + `data_type`='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) +ORDER BY + `sender` ASC", __FILE__, __LINE__); } } } diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index 51d7c36f42..da854441c1 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if // Check version (must be > 0.0) -if ((GET_EXT_VERSION('task') > '0.0') && (getConfig('ap_tasks') == 'Y')) { +if ((getExtensionVersion('task') > '0.0') && (getConfig('autopurge_tasks') == 'Y')) { // Purge deleted tasks (no notification to admin) - SQL_QUERY_ESC("DELETE LOW_PRIORITY -FROM `{!_MYSQL_PREFIX!}_task_system` -WHERE `status`='DELETED' AND `task_created` <= (UNIX_TIMESTAMP() - %s)", - array(getConfig('ap_tasks_time')), __FILE__, __LINE__); + SQL_QUERY("DELETE LOW_PRIORITY +FROM + `{?_MYSQL_PREFIX?}_task_system` +WHERE + `status`='DELETED' AND `task_created` <= (UNIX_TIMESTAMP() - {?ap_tasks_time?})", __FILE__, __LINE__); // Get deleted rows $DELETED = SQL_AFFECTEDROWS(); diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 617a5903a7..1b566c7a77 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { +if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if @@ -51,15 +50,18 @@ if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Shall I auto-purge unconfirmed accounts? if (getConfig('autopurge_unconfirmed') == 'Y') { // Init variables and find unconfirmed accounts which I shall auto-purge; - $result_uncon = SQL_QUERY_ESC("SELECT `userid`, `email`, `joined` -FROM `{!_MYSQL_PREFIX!}_user_data` -WHERE `status`='UNCONFIRMED' AND `joined` < (UNIX_TIMESTAMP() - %s) -ORDER BY `userid` ASC", - array(getConfig('ap_un_time')), __FILE__, __LINE__); + $result_uncon = SQL_QUERY("SELECT + `userid`, `email`, `joined` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `status`='UNCONFIRMED' AND `joined` < (UNIX_TIMESTAMP() - {?ap_unconfirmed_time?}) +ORDER BY + `userid` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... $UIDs = ''; - define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60)); + $content['time'] = (getConfig('ap_unconfirmed_time') / 60 / 60); // Delete inactive accounts while ($content = SQL_FETCHARRAY($result_uncon)) { @@ -70,7 +72,7 @@ ORDER BY `userid` ASC", $content['joined'] = generateDateTime($content['joined'], '0'); // Finnaly delete this inactive account - deleteUserAccount($content['userid'], LOAD_EMAIL_TEMPLATE('member_autopurge_unconfirmed', $content['joined'], '')); + deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, '')); } // END - while // Remove last comma @@ -84,7 +86,7 @@ ORDER BY `userid` ASC", // Free memory SQL_FREERESULT($result_uncon); -} +} // END - if -// +// [EOF] ?> diff --git a/inc/check-reset.php b/inc/check-reset.php index 909332b6ca..f551ef47b7 100644 --- a/inc/check-reset.php +++ b/inc/check-reset.php @@ -1,56 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 09/12/2008 * - * =============== Last change: 09/12/2008 * - * * - * -------------------------------------------------------------------- * - * File : check-reset.php * - * -------------------------------------------------------------------- * - * Short description : Checks for if reset shall be executed * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Prueft ob Reset laufen soll * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D -// 01 2 3 32 2 3321 1 221 1 221 1 221 1 2 21 1 22 10 -if ((date('d', getConfig('last_update')) != date('d', time())) && (!isInstalling()) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET('register')) && (getOutputMode() != 1)) { - // Tell every module we are in reset-mode! - enableResetMode(); - - // Run all includes - runResetIncludes(); -} // END - if - -// +// @DEPRECATED ?> diff --git a/inc/classes/.htaccess b/inc/classes/.htaccess new file mode 100644 index 0000000000..14249c50bd --- /dev/null +++ b/inc/classes/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php new file mode 100644 index 0000000000..61a6fe3145 --- /dev/null +++ b/inc/classes/cachesystem.class.php @@ -0,0 +1,482 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/22/2009 * + * =============== Last change: 10/22/2009 * + * * + * -------------------------------------------------------------------- * + * File : cachesystem.class.php * + * -------------------------------------------------------------------- * + * Short description : CacheSystem class * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : CacheSystem-Klasse * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Caching class +class CacheSystem { + // Define variables + var $ret = 'init'; + var $fqfn = ''; + var $pointer = false; + var $data = array(); + var $version = array(); + var $name = ''; + var $rebuilt = array(); + var $extension = '.cache'; + var $statusDone = 'done'; + var $status = array(); + var $readable = array(); + + // Constructor + function CacheSystem () { + // Failed is the default + $this->ret = 'failed'; + + // Remeber path + + // Check if path exists + if (isDirectory(getConfig('CACHE_PATH'))) { + // Make FQFN for dummy file + $FQFN = getConfig('CACHE_PATH') . 'dummy.tmp'; + + // Check if we can create a file inside the path + touch($FQFN, 'w'); + + // Is the file there? + if (isFileReadable($FQFN)) { + // Yes, we can do. So let's remove it + removeFile($FQFN); + + // Is there a .htaccess file? + if (isFileReadable(getConfig('CACHE_PATH') . '.htaccess')) { + // All done! + $this->ret = $this->statusDone; + } else { + // Stop! Set a .htaccess file first + $this->ret = 'htaccess'; + } + } // END - if + } // END - if + } + + // Checks validity of cache file and if content is given + function loadCacheFile ($cacheName) { + // Remember cache file + $this->name = $cacheName; + + // Construct FQFN (full qualified file name) + $this->fqfn = getConfig('CACHE_PATH') . $cacheName . $this->extension; + + // Check if file exists and if version matches + if (!isset($this->status[$cacheName])) { + // Pre-fetch cache here if found + if ($this->isCacheReadable()) $this->getArrayFromCache(); + + //* DEBUG: */ print($cacheName.'='.intval($this->isCacheReadable()).'/'.(is_writeable($this->fqfn)).'/'.($this->extensionVersionMatches('cache')).'<br />'); + $this->status[$cacheName] = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches('cache'))); + } // END - if + //* DEBUG: */ print($cacheName.'='.intval($this->status[$cacheName]).'<br />'); + + // Return status + return $this->status[$cacheName]; + } + + // Initializes the cache file + function init () { + // This will destory an existing cache file! + if ($this->ret == $this->statusDone) { + // Mark it as no longer readable + unset($this->readable[$this->name]); + unset($GLOBALS['file_readable'][$this->fqfn]); + + // Create file + if ($this->isCacheReadable()) changeMode($this->fqfn, 0666); + $this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !"); + + // Add open PHP tag + fwrite($this->pointer, "<?php\n"); + } else { + // Cannot create file + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + function addRow ($data) { + // Is the pointe rvalid? + if (is_resource($this->pointer)) { + // Write every array element to cache file + foreach ($data as $k => $v) { + // Write global cache array for immediate access + if ((substr($k, 0, 4) == 'ext_') && (isset($data['ext_name'])) && (isset($data['ext_id']))) { + if ($k == 'ext_name') { + $GLOBALS['cache_array']['extension'][$k][$data['ext_id']] = $v; + } else { + $GLOBALS['cache_array']['extension'][$k][$data['ext_name']] = $v; + } + if (($k == 'ext_keep') && ($v == 'Y')) { + $GLOBALS['cache_array']['active_extensions'][$data['ext_name']] = $v; + } // END - if + } elseif (is_array($v)) { + // Serialize and BASE64-encode the array + $v = base64_encode(serialize($v)); + } + + // Write cache line to file + fwrite($this->pointer, $this->rewriteEntry($k, $v)); + } + } else { + // Cannot create file + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + function finalize () { + // Quit function when no pointer is set + if (is_resource($this->pointer)) { + // Add default depency + $this->storeExtensionVersion('cache'); + + // Write footer + fwrite($this->pointer, "?>\n"); + + // Close file add destroy handler + fclose($this->pointer); + + // Set rights + if ($this->isCacheReadable()) changeMode($this->fqfn, 0666); + + // Remove pointer and status + unset($this->status[$this->name]); + $this->pointer = false; + //* DEBUG: */ outputHtml(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - FINALIZED!<br />"); + } // END - if + } + + function getArrayFromCache () { + // Is the cache already loaded? + if (isset($this->data[$this->name])) { + // Return it's content! + return $this->data[$this->name]; + } // END - if + + // Is the cache file there? + if ($this->isCacheReadable()) { + // Load cache file + require($this->fqfn); + + // Is there an array? + if (isset($this->data[$this->name])) { + // Cache version found? + if (isset($this->version[$this->name])) { + // Check it here if cache matches ext-cache version + if (!$this->extensionVersionMatches('cache')) { + // Invalid + logDebugMessage(__METHOD__, __LINE__, 'Invalid cache data ' . $this->name . ' detected.'); + $this->removeCacheFile(); + } // END - if + } // END - if + + // Return cache if detected + if (isset($this->data[$this->name])) { + return $this->data[$this->name]; + } else { + // Damaged! + logDebugMessage(__METHOD__, __LINE__, 'Possible damaged cache ' . $this->name . ' detected.'); + $this->removeCacheFile(); + } + } // END - if + } else { + // Cache file not found or not readable + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_LOAD'), $this->fqfn)); + } + } + + // Destroy an existing cache file + function removeCacheFile ($removeArray = false, $force = false) { + // Debug message + /* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("%s should be removed.", $this->name)); + + // Is the cache file not yet rebuilt? + if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) { + // Only run in regular output mode + if ((getOutputMode() != 0) && ($force === false)) { + // Debug message if allowed + if (isDebugModeEnabled()) { + // Debug message + debug_report_bug('Not removing cache ' . $this->name . ' in output_mode=' . getOutputMode()); + } // END - if + + // Abort here + return; + } // END - if + + // Close cache + $this->finalize(); + + // Debug-mode enabled? + if (isDebugModeEnabled()) { + // Log removal of cache + logDebugMessage(__METHOD__, __LINE__, 'removing cache: ' . $this->name); + } // END - if + + // Remove cache file from system + removeFile($this->fqfn); + + // No longer readable! + unset($this->readable[$this->name]); + + // Shall we remove the array from memory? + if ($removeArray === true) { + // Debug message if allowed + if (isDebugModeEnabled()) { + // Debug message + logDebugMessage(__METHOD__, __LINE__, 'removing array!'); + } // END - if + + // Remove it from memory + unset($GLOBALS['cache_array'][$this->name]); + } // END - if + + // Is the file there? + if (!$this->isCacheReadable()) { + // The cache does no longer exist so kill the content + unset($this->data[$this->name]); + unset($this->version[$this->name]); + $this->rebuilt[$this->name] = true; + } else { + // Not removed! + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_UNLINK'), $this->fqfn)); + } + } // END - if + } + + // Unused method: + function removeEntry ($search, $data, $array) { + if ($this->status[$this->name] == $this->statusDone) { + // Load cache into dummy array + $dummy = $this->getArrayFromCache(); + + // Search for key in array + $key = array_search($data, $dummy[$search]); + if (!empty($key)) { + // Key (hopefully) found? + foreach ($array as $a) { + // So we can remove all elements as requested + unset($dummy[$a][$key]); + } // END - foreach + + // Flush array to cache file + $this->init(); + + // Write array out + $this->writeArray($dummy); + + // Close cache file + $this->finalize(); + } + } else { + // Cannot write to cache! + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + function writeArray ($array) { + if (is_resource($this->pointer)) { + foreach ($array as $k => $v) { + if (is_array($v)) { + // Multi line(s) found + $LINE = ''; + foreach($v as $k2 => $v2) { + // Put every array element in a row... + $LINE .= $this->rewriteEntry($k, $v2); + } + } else { + // Single line found + $LINE = $this->rewriteEntry($k, $v); + } + + // Write line(s) + fwrite($this->pointer, $LINE); + } // END - foreach + } else { + // Cannot write array! + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + // Unused method + function replaceEntry ($search, $replace, $search_key, $array) { + if ($this->status[$this->name] == $this->statusDone) { + // Load cache into dummy array + $dummy = $this->getArrayFromCache(); + + // Check if $dummy is valid (prevents some errors) + if ((is_array($dummy)) && (isset($dummy[$search])) && (is_array($dummy[$search]))) { + // Search for key in array + $key_found = array_key_exists($search_key, $dummy[$search]); + if ($key_found == true) { + $key = $search_key; + // Key (hopefully) found? + foreach ($dummy as $a => $v) { + // So we can update all entries + if ($a == $search) { + // Update now... + $dummy[$a][$search_key] = $replace; + } // END - if + } // END - foreach + + // Flush array to cache file + $this->init(); + + // Write array out + $this->writeArray($dummy); + + // Close cache file + $this->finalize(); + } // END - if + } // END - if + } else { + // Cannot write to cache! + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + // Writes the version of given extension to the cache file + function storeExtensionVersion ($ext_name) { + // Valid cache pointer? + if (is_resource($this->pointer)) { + // Write only if extension is installed + if (isExtensionInstalled($ext_name)) { + // Get extension version + $ext_ver = getExtensionVersion($ext_name); + + // Write cache line to file + fwrite($this->pointer, $this->rewriteEntry($ext_name, $ext_ver, 'version', true)); + + // Add the extension version to object (DO NOT REMOVE IT! Endless loop...) + $this->version[$this->name][$ext_name] = $ext_ver; + } // END - if + //* DEBUG: */ outputHtml(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />"); + } else { + // Cannot create file + addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); + } + } + + // Checks wether versions from cache and extension matches + function extensionVersionMatches ($ext_name) { + // Default is not matching + $matches = false; + + // Compare only if installed + if (isExtensionInstalled($ext_name)) { + // Get extension version + $ext_ver = getExtensionVersion($ext_name); + + // Debug messages + if (isset($this->version[$this->name][$ext_name])) { + // Does it match? + $matches = ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver)); + } elseif ($this->isCacheReadable()) { + // No cache version found! + logDebugMessage(__METHOD__, __LINE__, "Cache {$this->name} has missing version entry for extension {$ext_name}! Purging cache..."); + + // Remove the cache file + $this->removeCacheFile(false, true); + } + } else { + // Not installed, does always match + $matches = true; + } + + // Compare both + return $matches; + } + + // Rewrit the entry so it can be stored in cache file + // @TODO Add support for more types which break in last else-block + function rewriteEntry ($key, $value, $prefix = 'data', $single = false) { + // Default is not single entry + $extender = '[]'; + + // Add only for single array entry? + if ($single === true) $extender = ''; + + // Init line + $line = ''; + + // String or non-string? ;-) + if (is_string($value)) { + // String... + $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = '" . smartAddSlashes($value) . "';\n"; + } elseif (is_null($value)) { + // Null + $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = null;\n"; + } elseif (is_bool($value)) { + // Boolean value + if ($value === true) { + // True + $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = true;\n"; + } else { + // False + $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = false;\n"; + } + } else { + // Non-string + $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = " . $value . ";\n"; + } + + // Return line + return $line; + } + + // Getter for cache status + function getStatus () { + return $this->ret; + } + + // Checks wether the current cache file is readable + function isCacheReadable () { + // Array entry found? + if (!isset($this->readable[$this->name])) { + // Not found, so create it + $this->readable[$this->name] = isFileReadable($this->fqfn); + } // END - if + + // Return result + return $this->readable[$this->name]; + } + +} // END - class + +// [EOF] +?> diff --git a/inc/classes/rdf.class.php b/inc/classes/rdf.class.php new file mode 100644 index 0000000000..7ab88f773e --- /dev/null +++ b/inc/classes/rdf.class.php @@ -0,0 +1,1398 @@ +<?php +/* $Id$ */ + +// +// +----------------------------------------------------------------------+ +// | rss Parser | +// | Copyright (c) 2001 Stefan Saasen | +// +----------------------------------------------------------------------+ +// | The contents of this file are subject to the Mozilla Public License | +// | Version 1.1 (the "License"); you may not use this file except in | +// | compliance with the License. You may obtain a copy of the License at | +// | http://www.mozilla.org/MPL/ | +// | | +// | Software distributed under the License is distributed on an "AS IS" | +// | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | +// | the License for the specific language governing rights and | +// | limitations under the License. | +// +----------------------------------------------------------------------+ +// | | +// | Maintainer and initial developer: | +// | Stefan Saasen <s@fase4.com> | +// | | +// | Proxy and authentication methods added by: | +// | Marco Kraus <marco.kraus@siemens.com> | +// | | +// | Decoding of data by htmlentities or utf8_decode added by: | +// | Roland Haeder <webmaster@mxchange.org> | +// | | +// +----------------------------------------------------------------------+ +// | Ref: | +// | @link http://www.fase4.com/rdf/ Latest release | +// +----------------------------------------------------------------------+ + +/** + * Class RSS Parser + * + * This class offers methods to parse RSS Files + * + * @link http://www.fase4.com/rdf/ Latest release of this class + * @package rss + * @copyright Copyright (c) 2001 fase4.com. All rights reserved. + * @author Stefan Saasen <s@fase4.com> + * @author Roland Haeder <webmaster@mxchange.org> + * @version 1.7 ($Date$Revision: 856 $ + * @access public + */ + +class fase4_rdf { + + /** + * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br! + * + * @access private + * @var integer + */ + var $_word_wrap = 0; + + /** + * Wether to recode \n -> <br /> or not in description + * + * @access private + * @var boolean + */ + var $_use_nl2br = true; + + /** + * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!) + * + * "htmlentities" - Use the function htmlentities() + * "utf8_decode" - Use the function ut8_decode() when you have UTF8 encoded text + * + * @access private + * @var string + */ + var $_decoding_mode = 'utf8_decode'; + + /** + * If $_link_target is set a target='xxx' attribute in each <a /> and <form accept-charset="utf-8" /> html tag will be added + * + * Possible values are "_blank", "_content", "_parent", "_self", "_top" + * + * @access private + * @var string + */ + var $_link_target = '_blank'; + + /** + * vars for proxy settings - Prox Host + * + * @access private + * @var string + */ + var $_phost = ''; + + /** + * vars for proxy settings - Prox Port + * + * @access private + * @var string + */ + var $_pport = ''; + + /** + * vars for proxy settings - Prox Username + * + * @access private + * @var string + */ + var $_pname = ''; + + /** + * vars for proxy settings - Prox Password + * + * @access private + * @var string + */ + var $_ppasswd = ''; + + /** + * just a flag for checking if proxy-support should be enabled + * set default to false (will be enabled if set_proxy is called) + * + * @access private + * @see set_proxy() + * @var bool + */ + var $_use_proxy = false; + + /** + * just a flag for checking if proxy-support with authentication + * should be enabled + * set default to false (will be enabled if set_proxy is called) + * + * @access private + * @see set_proxy() + * @var boolean + */ + var $_use_proxy_auth = false; + + /** + * The time the Files will be cached (in seconds). + * + * @access private + * @var int + */ + var $_refresh = 60; // int + + /** + * The Name of the cached File. + * + * @access private + * @var string + */ + var $_cached_file = ''; // String + + /** + * Indicates whether the cached or the remote file was used. + * + * @access private + * @var boolean + */ + var $_use_cached_file = true; + + /** + * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast' + * + * @access private + * @var string + */ + var $_cache_type = 'fast'; + + /** + * The Name of the Remote File. + * + * @access private + * @var string + */ + var $_remote_file = ''; + + /** + * Path to the Cache Directory. + * + * @access private + * @var string + */ + var $_cache_dir = 'cache/'; // String + + /** + * Indicates whether the Creating of the Cache Directory needs to be done or not. + * + * @access private + * @var boolean + */ + var $_cache_dir_ok = false; + + /** + * Type of the file to be parsed (RSS or RDF). + * + * The Type depends on the root node + * + * @access private + * @var string + */ + var $_type = 'rss'; // string (rss or rdf) + + /** + * Array of Display Settings. + * + * Specific Parameters can be set to hidden. These are: + * image, channel and textinput. If set to "hidden" those elements won't be displayed. + * + * @access private + * @var array + */ + var $_display_opt = array( + 'build' => '', + 'image' => '', + 'channel' => '', + 'textinput' => '', + 'cache_update' => '', + 'sitelink' => '', + 'refid' => '', + 'reflink' => '', + ); + + /** + * Defines the width attribute in the table that holds the rdf/rss representation + * + * @access private + * @var int + * @see see_table_width() + */ + var $_table_width = '100%'; + + /** + * Indicates whether or not to use dynamic Display Settings + * + * @access private + * @var array + */ + var $_use_dynamic_display = false; + + /** + * <item> count + * + * @access private + * @var int + */ + var $_item_count = 0; + + /** + * No of max <item>s + * + * @access private + * @var boolean + */ + var $_max_count = false; + + /** + * Array containing the content of <channel /> + * + * @access private + * @var array + */ + var $_array_channel = array(); + + /** + * Array containing the content of each <item /> + * + * @access private + * @var array + */ + var $_array_item = array(); + + /** + * Array containing the content of <textinput /> + * + * @access private + * @var array + */ + var $_array_textinput = array(); + + /** + * Array containing the content of <image /> + * + * @access private + * @var array + */ + var $_array_image = array(); + + /** + * Array containing the Channel content. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_citem = array(); + + /** + * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_cdepth = array(); + + /** + * Array containing the Channel tags. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_ctags = array( 'x' ); + + /** + * Array containing the Channel content. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_item = array(); // Array + + /** + * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_depth = array(); // Array + + /** + * Array containing the tags. Just For internal XML Parser Purposes. + * + * @access private + * @var array + */ + var $_tags = array( 'x' ); // Array + + /** + * Garbage collection: probability in percent + * + * @var integer 0 => never + * @access public + */ + var $gc_probability = 1; + + /** + * HTML Output + * + * @var string + * @access private + */ + var $_output = ''; + + /** + * @var string + */ + var $_parse_mode = ''; + + // Output variable + var $out = ''; + + // Salt for hashing + var $salt = ''; + + /** + * Constructor of our Class + * + * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path. + * Additionally the Refresh Time is set to a default Value of 1200s (20 min). + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @see _refresh + */ + function fase4_rdf() + { + // default Value, to be overwritten in set_refresh() + $this->_refresh = (time() - 1200); + $this->_clear_cItems(); + $this->_clear_Items(); + } + + /** + * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @return string Displays RDF Content ( using _display() ) + * @see _remote_file, cache() + */ + function parse_RDF( $rdf ) + { + unset($this->_array_item); + $this->_remote_file = $rdf; + $this->out .= "<!-- http://www.fase4.com/rdf/ -->"; + $this->out .= "<table width=\"".$this->_table_width."\">"; + $this->out .= $this->cache(); + $this->out .= "</table>"; + $this->_output = ''; + $this->_item_count = 0; + return true; + } + + /** + * This Method is called when all parsing is finished to use the garbage collection + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @return string Displays RDF Content ( using _display() ) + * @see _remote_file, cache() + */ + function finish($return = false) + { + if (!$return) { + echo $this->out; + } else { + return $this->out; + } + flush(); + $this->_garbage_collection(); + } + + /** + * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache. + * + * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored. + * In this case you can not modify the display settings. + * processing time: ( 1.4792) --> remote file + * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on. + * processing time: ( 0.0019) --> using 'fast cache' + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @return string Displays RDF Content ( using _display() ) + * @see _remote_file, cache() + */ + function use_dynamic_display( $bool ) + { + $this->_use_dynamic_display = $bool; + return true; + } + + /** + * This Method avtually parses the XML data. + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param string $data RDF File XML Data + * @see _clear_Items() + */ + function _parse_xRDF( $data ) + { + $this->_clear_Items(); + $xml_parser = xml_parser_create(); + xml_set_object($xml_parser,$this); + xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0); + xml_set_element_handler($xml_parser, '_startElement', '_endElement'); + xml_set_character_data_handler($xml_parser, '_parseData'); + if (!xml_parse($xml_parser, trim($data))) { + $this->_throw_exception(sprintf("XML error: %s at line %d", + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser)).'<br /><br />Exception in function parse_RDF().'); + } + xml_parser_free($xml_parser); + } + + + /** + * This Methods allows you to set the Refresh Time + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param int $seconds time files will be cached (in seconds). + * @return boolean + * @see _refresh + */ + function set_refresh( $seconds ) + { + $this->_refresh = (time() - $seconds); + return true; + } + + function set_salt( $saltPara ) + { + $this->salt = $saltPara; + return true; + } + + /** + * This Methods allows you to set the No. of <item>s to display + * + * @access public + * @param int $int No of max <item>s + * @author Stefan Saasen <s@fase4.com> + * @return boolean + * @see _max_count, _endElement() + */ + function set_max_item( $int ) + { + $this->_max_count = $int; + return true; + } + + /** + * This Methods allows you to set the Cache Directory + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $dir Path to Directory. + * @return boolean + * @see _cache_dir + */ + function set_CacheDir( $dir ) + { + if(substr($dir, -1) != '/') { + $dir = $dir.'/'; + } + $this->_cache_dir = $dir; + } + + /** + * This Method displays Error Messages and terminates the Execution of the Script + * + * @access private + * @param string $msg Message to display on failure + * @author Stefan Saasen <s@fase4.com> + */ + function _throw_exception( $msg ) + { + $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>"; + return true; + } + + /** + * This Method clears the Array containig the Items. + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @see _item + */ + function _clear_Items( ) { + $this->_item = array( + 'title' => '', + 'link' => '', + 'description' => '', + 'url' => '', + 'language' => '', + 'pubDate' => '', + 'lastBuildDate' => '', + 'width' => '', + 'height' => '' + ); + } + /** + * This Method clears the Array containig the Channel Items. + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @see _item + */ + function _clear_cItems( ) { + $this->_citem = array( + 'title' => '', + 'link' => '', + 'description' => '', + 'url' => '', + 'language' => '', + 'copyright' => '', + 'managingEditor' => '', + 'webMaster' => '', + 'pubDate' => '', + 'lastBuildDate' => '', + 'category' => '', + 'generator' => '', + 'docs' => '', + 'cloud' => '', + 'ttl' => '', + 'image' => '', + 'textinput' => '', + 'skipHours' => '', + 'skipDays' => '', + 'sitelink' => '', + 'refid' => '', + 'reflink' => '', + ); + } + + /** + * XML Parser Start Element Handler + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param mixed $parser a reference to the XML parser calling the handler. + * @param string $name contains the name of the element for which this handler is called. + * @param string $attrs contains an associative array with the element's attributes (if any). + * @see _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags + */ + function _startElement($parser, $name, $attrs) { + // We have to determine, which type of xml data we have to parse + if($name == 'rss') { + $this->_type = 'rss'; + } elseif($name == 'rdf:RDF' OR $name == 'rdf') { + $this->_type = 'rdf'; + } + + + if ( $name == 'channel' AND $this->_type != 'rdf' ) { + $this->_parse_mode = 'channel'; + } elseif ( ($name=='item') + ||($name=='image') + ||($name=='textinput') + ||(($name=='channel') && ($this->_type != 'rss')) ) { + if($this->_parse_mode=='channel') { + $this->_get_ChannelData( $parser ); + } + $this->_parse_mode = 'all'; + } + + if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) { + $this->_depth[$this->get_parser_id($parser)] = 0; + } + $this->_depth[$this->get_parser_id($parser)]++; + array_push($this->_tags, $name); + + if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) { + $this->_cdepth[$this->get_parser_id($parser)] = 0; + } + $this->_cdepth[$this->get_parser_id($parser)]++; + array_push($this->_ctags, $name); + } // END _startElement() + + /** + * Retrives the Channel Data in <rss> File + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param mixed $parser a reference to the XML parser calling the handler. + * @see _output, _display_opt, _citem + */ + function _get_ChannelData( $parser ) + { + $this->_citem['link'] = trim($this->_citem['link']); + if (($this->_display_opt['sitelink'] == $this->_citem['link']) && (!empty($this->_display_opt['reflink'])) && (!empty($this->_display_opt['refid']))) + { + $this->_citem['link'] .= $this->_display_opt['reflink'].$this->_display_opt['refid']; + } + + if( empty($this->_display_opt['channel']) OR + $this->_display_opt['channel'] != 'hidden') { + $this->_output .= "<tr><td>\n"; + $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n"; + $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem['title'])."</div></td></tr>\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem['description'], '<a>, <img>')."</td></tr>\n"; + $this->_output .= "<tr><td> </td></tr>\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; + if(isset($this->_display_opt['build']) && $this->_display_opt['build'] != 'hidden') { + if($this->_citem['lastBuildDate']){$this->_output .= 'build: '. $this->_citem['lastBuildDate'].'<br />';} + } + if(isset($this->_display_opt['cache_update']) && $this->_display_opt['cache_update'] != 'hidden' && ( $_update = $this->get_cache_update_time()) ) { + $this->_output .= 'cache update: '.$_update."<br />\n"; + } + $this->_output .= "<a href=\"".$this->_citem['link']."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= ">".$this->_cut_string($this->_citem['link'])."</a>"; + $this->_output .= "</td></tr>\n"; + $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n"; + $this->_output .= "</table></td></tr>"; + } + $this->_array_channel = array( + 'title' => $this->_citem['title'], + 'link' => $this->_citem['link'], + 'description' => $this->_citem['description'], + 'lastBuildDate' => $this->_citem['lastBuildDate']); + } + + /** + * XML Parser End Element Handler + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param mixed $parser a reference to the XML parser calling the handler. + * @param string $name contains the name of the element for which this handler is called. + * @see _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt + */ + function _endElement($parser, $name) { + array_pop($this->_tags); + $this->_depth[$this->get_parser_id($parser)]--; + array_pop($this->_ctags); + $this->_cdepth[$this->get_parser_id($parser)]--; + $this->_item['link'] = trim($this->_item['link']); + if ((!empty($this->_display_opt['refid'])) && (!empty($this->_item['link']))) + { + if (!ereg('refid=', $this->_item['link'])) $this->_item['link'] .= '?refid=' . $this->_display_opt['refid']; + } + switch ($name) { + case 'item': + if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) { + if($this->_item['title'] != $this->_item['description'] + AND $this->_item['description']) { + + // word-wrapping added by Roland Haeder <webmaster@mxchange.org> + if (($this->_word_wrap > 0) && (strlen($this->_item['description']) > $this->_word_wrap)) + { + // Switch off _use_nl2br + $this->_use_nl2br = false; + // First remove all \n + $this->_item['description'] = str_replace('\n', ' ', $this->_item['description']); + // Wrap with <br />\n + $this->_item['description'] = wordwrap($this->_item['description'], $this->_word_wrap, "*<br>\n"); + } + elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br)) + { + // Strip tags out instead when word-wrap is disabled + $this->_item['description'] = strip_tags($this->_item['description'], '<a>, <img>'); + } + + // nl2br added by Roland Haeder <webmaster@mxchange.org> + if ($this->_use_nl2br) $this->_item['description'] = nl2br($this->_item['description']); + + $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item['link']."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= ">".strip_tags($this->_item['title'], '<a>, <img>').'</a> ('.$this->_item['pubDate'].")</div></td></tr>\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item['description']."</td></tr>\n"; + // we just display the <hr> if there is a description + $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n"; + } else { + $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; + $this->_output .= "<a href=\"".$this->_item["link"]."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n"; + } + + $this->_array_item[] = array( + 'title' => $this->_item['title'], + 'link' => $this->_item['link'], + 'description' => $this->_item['description'] + ); + + ++$this->_item_count; + } + $this->_clear_Items(); + break; + + case 'image': + if(isset($this->_display_opt['image']) && ($this->_display_opt['image'] != 'hidden') && $this->_item['url']) { + $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; + $this->_output .= "<a href=\"".$this->_item['link']."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= "><img src=\"".$this->_item['url']."\""; + if(isset($this->_item['width']) && isset($this->_item['height'])) { + $this->_output .= " width=\"".$this->_item['width']."\" height=\"".$this->_item['height']."\""; + } + $this->_output .= " alt=\"".$this->_item['title']."\" border=\"0\" /></a></td></tr>\n"; + + $this->_array_image[] = array( + 'url' => $this->_item['url'], + 'link' => $this->_item['link'], + 'width' => $this->_item['width'], + 'height' => $this->_item['height'] + ); + $this->_clear_Items(); + } elseif( isset($this->_display_opt['image'] ) && ($this->_display_opt['image'] == 'hidden') ) { + $this->_clear_Items(); + } + + break; + + case 'channel': + if(isset($this->_display_opt['channel']) AND $this->_display_opt['channel'] != 'hidden' AND $this->_item['title'] != '') { + $this->_output .= "<tr><td>\n"; + $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item['title'])."</div></td></tr>\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item['description'], '<a>, <img>')."</td></tr>\n"; + $this->_output .= "<tr><td> </td></tr>\n"; + $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; + if($this->_display_opt['build'] != 'hidden') { + if($this->_item['lastBuildDate']){$this->_output .= 'build: '. $this->_item['lastBuildDate'].'<br />';} + } + if($this->_display_opt['cache_update'] != 'hidden' && ( $_update = $this->get_cache_update_time()) ) { + $this->_output .= 'cache update: '.$_update."<br />\n"; + } + $this->_output .= "<a href=\"".$this->_item['link']."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= ">".$this->_cut_string($this->_item['link'])."</a>\n"; + $this->_output .= "</td></tr>\n"; + $this->_output .= "</table></td></tr>\n"; + } + $this->_array_channel = array( + 'title' => $this->_item['title'], + 'link' => $this->_item['link'], + 'description' => $this->_item['description'], + 'lastBuildDate' => $this->_item['lastBuildDate'] + ); + $this->_clear_Items(); + $this->_clear_cItems(); + break; + + case 'textinput': + if(isset($this->_display_opt['textinput']) && ($this->_display_opt['textinput'] != 'hidden') && $this->_item['name'] && $this->_item['link']) { + $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; + $this->_output .= "<form accept-charset=\"utf-8\" action=\"".$this->_item['link']."\" "; + if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } + $this->_output .= "method=\"get\">\n"; + $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item['title']."</div>"; + $this->_output .= strip_tags($this->_item['description'], '<a>, <img>')."<br><br>\n"; + $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item['name']."\"> \n"; + $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">"; + $this->_output .= "</form>\n"; + $this->_output .= "</td></tr>\n"; + $this->_array_textinput = array( + 'title' => $this->_item['title'], + 'name' => $this->_item['name'], + 'link' => $this->_item['link'], + 'description' => $this->_item['description'] + ); + $this->_clear_Items(); + } elseif( isset($this->_display_opt['textinput']) && ($this->_display_opt['textinput'] == 'hidden') ) { + $this->_clear_Items(); + } + + break; + } + } + + /** + * This Method returns the data from the <channel /> paragraph. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array + * @see _array_channel + */ + function get_array_channel( ) + { + return $this->_array_channel; + } + + /** + * This Method returns the data from each <item /> paragraph. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array + * @see _array_item + */ + function get_array_item( ) + { + return $this->_array_item; + } + + /** + * This Method returns the data from <textinput />. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array + * @see _array_textinput + */ + function get_array_textinput( ) + { + return $this->_array_textinput; + } + + /** + * Getter for parser id from resource + * + * @access private + * @author Roland Haeder <webmaster@mxchange.org> + * @return int + */ + function get_parser_id ($parser) { + // Default is zero + $id = 0; + + // Is it a resource? + if (is_resource($parser)) { + // Cast the resource into id + $id = (int) $parser; + } // END - if + + // Return the id + return $id; + } + + /** + * This Method returns the data from <image />. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array + * @see _array_image + */ + function get_array_image( ) + { + return $this->_array_image; + } + + /** + * XML Parser Data Handler + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param mixed $parser a reference to the XML parser calling the handler. + * @param string $text contains the character data as a string. + * @see _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth + */ + function _parseData($parser, $text) + { + // Deocing mode added by Roland Haeder <webmaster@mxchange.org> + switch ($this->_decoding_mode) + { + case 'utf8_decode': + $text = utf8_decode($text); + break; + + case 'htmlentities': + $text = htmlentities($text); + break; + } + + $clean = preg_replace("/\s/", "", $text); + if ($clean) { + $text = preg_replace("/^\s+/", "", $text)."\n"; + if($this->_parse_mode == 'all') { + if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) && + $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) { + $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text; + } else { + $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text; + } + } elseif (isset($this->_parse_mode) && $this->_parse_mode == 'channel') { + if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) { + $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text; + } else { + $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text; + } + } + } + } + + /** + * This Method allows you to choose if specific Parameters are displayed or not. These are: + * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param array $options + * @see _display_opt + */ + function set_Options( $options = '' ) + { + if(is_array( $options )) { + $this->_display_opt = $options; + return true; + } else { + unset($this->_display_opt); + return false; + } + } + + /** + * This Method allows you to define the width of the table that holds the representation of the rdf/rss file. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param int $width attribute width in tag <table> + * @see _table_width + */ + function set_table_width( $width = 400 ) + { + $this->_table_width = $width; + return true; + } + + /** + * This Method returns an assocative Array with available Options. + * + * The Keys are the Name of the Options to be set. + * The Values are short Description of available Options. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array $options + * @see _display_opt + */ + function get_Options() { + $options = array( + 'image' => "If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.", + 'channel' => "If 'channel' is set to \"hidden\" the Channel Meta Data (i.e the Title and the short description regarding the RDF Publisher will not be displayed", + 'textinput' => "If set to \"hidden\" no Input Form will be displayed", + 'build' => "If set to \"hidden\" the Build Date (if provided) of the RDF File will not be displayed", + 'cache_update' => "If set to \"hidden\" the Update Date/Time of the cached Rdf File will not be displayed" + ); + return $options; + } + + /** + * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @return string XML Presentation of parsed RDF File + * @see _cached_file, _remote_file, _cache_dir, _refresh, _update_cache() + */ + function cache() + { + // checks if the cache directory already exists + // if not, the cache directory will be created + if(!$this->_cache_dir_ok) { + $this->_create_cache_dir(); + } + if($this->_use_dynamic_display == true) { + $this->_cached_file = md5('dynamic'.$this->salt.$this->_remote_file) . '.cache'; + $this->_cache_type = 'normal'; + } else { + $this->_cached_file = md5($this->salt.$this->_remote_file) . '.cache'; + $this->_cache_type = 'fast'; + } + + $_cache_f = $this->_cache_dir.$this->_cached_file; + + if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) { + // We have to parse the remote file + $this->_use_cached_file = false; + // --> we want to provide proper Information for Use in + // get_cache_update_time() + clearstatcache(); + if($this->_use_dynamic_display == true) { + $_rdf = @implode(' ', $this->_rdf_data()); // -> proxy + if(!$_rdf) { + $this->_throw_exception( $this->_remote_file.' is not available' ); + } + $this->_parse_xRDF( $_rdf ); + $this->_update_cache( $_rdf ); + $data = $this->_output; + } else { + $_rdf = @implode(' ', $this->_rdf_data()); // -> proxy + if(!$_rdf) { + $this->_throw_exception( $this->_remote_file.' is not available' ); + } + $this->_parse_xRDF( $_rdf ); + $this->_update_cache( $this->_output ); + $data = $this->_output; + } + } else { + // we can use the cached file + $this->_use_cached_file = true; + if($this->_use_dynamic_display == true) { + $this->_parse_xRDF( implode(' ', file($_cache_f)) ); + $data = $this->_output; + } else { + $data = @implode(' ', file($_cache_f)); + } + } + return trim($data); + } // END cache() + + /** + * This Methods creates the Cache Directory if the specified Directory does not exist. + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param string $dir Path to Directory. + * @return boolean + * @see _cache_dir, _cache_dir_ok + */ + function _create_cache_dir() + { + $path = ''; + if(!@is_dir($this->_cache_dir)) { + $arr = explode('/', $this->_cache_dir); + $c = count($arr); + if($arr[0]=='') { + $path = '/'; + } + for($i = 0;$i<$c;$i++) + { + if($arr[$i]!='') { + $path .= $arr[$i].'/'; + if(!@is_dir($path)) { + if(!@mkdir($path, 0777)) { + $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__); + return false; + } + } + } + } + $this->_cache_dir_ok = true; + return true; + } else { + $this->_cache_dir_ok = true; + return true; + } + } // END _create_cache_dir() + + /** + * This Method updates the cached RDF Files and synchronises them with their remote Counterparts. + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @see _cache_dir, _cached_file, _throw_exception() + */ + function _update_cache( $content = '' ) + { + $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' ); + if(!$_local) { + $this->_throw_exception( 'Cannot open '.$this->_cached_file.'<br /><br />Exception at Line: '.__LINE__ ); + return false; + } + if (fwrite( $_local, $content) === false) { + $this->_throw_exception( 'Cannot write to '.$this->_cached_file.'<br /<br />Exeception at Line: '.__LINE__); + return false; + } + fclose( $_local ); + @chmod( $this->_cache_dir.$this->_cached_file, 0666); + return true; + } // END _update_cache() + + /** + * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File. + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return string Date/Time of last Update + * @see _cache_dir, _cached_file + */ + function get_cache_update_time() + { + return (file_exists($this->_cache_dir.$this->_cached_file))?date('d.m.Y H:i:s', filemtime($this->_cache_dir.$this->_cached_file)):'Cachemiss'; + } // END get_cache_update_time() + + /** + * This Method returns the Type of Cache that was used ('normal' or 'fast') + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @param string $rdf RDF File (Location) + * @return string Displays RDF Content ( using _display() ) + * @see _remote_file, cache() + */ + function get_CacheType() + { + return $this->_cache_type; + } + + /** + * Returns true if cached file was used, otherwise false + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @return array $options + * @see _use_cached_file + */ + function is_cachedFile() + { + return $this->_use_cached_file; + } + + /** + * This Method deletes all the cached Files. + * + * Please keep in mind to use this method just as a 'manual garbage collection' + * You should cache the rss/rdf files locally to avoid unnecessary traffic. + * (Both for your visitors and the Publisher) + * + * @access public + * @author Stefan Saasen <s@fase4.com> + * @see _cache_dir + */ + function clear_cache() + { + $dir = dir($this->_cache_dir); + while($file=$dir->read()) { + // Exclude directories + if (is_file($dir->path.$file) && substr($file, -6, 6) != '.cache' && substr($file, -4, 4) != '.log') { + if(!@unlink($dir->path.$file)) { + $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ ); + return false; + } // END - if + } // END - if + } // END - while + $dir->close(); + return true; + } // END clear_cache() + + /** + * Cuts the String $string after $str_len and adds '... ' + * + * @access private + * @param string $string String to be shortened + * @param int $str_len length of the returned String (overall length including '... ') + * @return string Cut String + */ + function _cut_string( $string, $str_len = '30' ) + { + if(strlen(trim($string))>$str_len) { + $string = substr( trim($string) , 0, $str_len - 4); + $string .= ' ...'; + } + return $string; + } // END _cut_string() + + /** + * this Method implements simple Garbage Collection + * + * @access private + * @author Stefan Saasen <s@fase4.com> + * @see _cache_dir, gc_probability, gc_maxlifetime + */ + function _garbage_collection() + { + srand((double) microtime() * 1000000); + if (mt_rand(1, 100) <= $this->gc_probability) { + $dir = dir($this->_cache_dir); + while($file=$dir->read()) { + if (is_file($dir->path.$file) && substr($file, -6, 6) != '.cache' && substr($file, -4, 4) != '.log' && filemtime($dir->path.$file) <= time() - $this->_refresh ) { + @unlink($dir->path.$file); + } // END - if + } + $dir->close(); + } // END if + } + + /* ==== Proxy/Auth methods ==== */ + + /** + * this method sets a proxy server + * + * @access public + * @param string $phost Proxy Host + * @param string $pport Prox Port + * @author Marco Kraus <marco.kraus@siemens.com> + */ + function set_proxy($phost, $pport) + { + $this->_use_proxy = true; + + if ($phost != '') + $this->_phost = $phost; + + if ($pport != '') + $this->_pport = $pport; + } + + /** + * this method sets a proxy server authentification + * + * @access public + * @param string $pname Username + * @param string $ppaswd Password + * @author Marco Kraus <marco.kraus@siemens.com> + */ + function set_proxy_auth( $pname, $ppasswd ) + { + $this->_use_proxy_auth = true; + + if ($pname != '') + $this->_pname = $pname; + + if ($ppasswd != '') + $this->_ppasswd = $ppasswd; + } + + + /** + * gets _remote_file into an array + * + * needed, cause if you use a proxy, you have to open + * a raw-tcp-socket to get the data + * + * @access private + * @author Marco Kraus <Marco.Kraus@siemens.com> + * @return array + * @see _use_proxy, cache() + */ + function _rdf_data() + { + if ( $this->_use_proxy == true ) + { + // we need a raw socket here to connect to proxy + $fp = fsockopen($this->_phost,$this->_pport); + + if (!$fp) { + $this->_throw_exception( $this->_remote_file.' is not available with proxy' ); + } else { + if ( $this->_use_proxy_auth == true ) { + fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n"); + } else { + fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n"); + } + } + + + for ( $i = 0; !feof ($fp) ; $i++) + { + $usable_data[$i] = ""; + $usable_data[$i] = fgets($fp,4096); + + // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank + + // strstr did not fit (ask Rasmus why), so we compare each character + if ( ($usable_data[$i][0] == '<' ) && + ($usable_data[$i][1] == '?' ) && + ($usable_data[$i][2] == 'x' ) && + ($usable_data[$i][3] == 'm' ) && + ($usable_data[$i][4] == 'l' ) ) { + $usable_data[0] = $usable_data[$i]; // save current field + $i = 1; // just reset array to start + } + + // there seems to be proxystuff after the <?xml....we delete this + if ( ( + ($usable_data[$i][0] == '<' ) && + ($usable_data[$i][1] == 'r' ) && + ($usable_data[$i][2] == 'd' ) && + ($usable_data[$i][3] == 'f' ) && + ($usable_data[$i][4] == ':' ) + ) + || + ( + ($usable_data[$i][0] == '<' ) && + ($usable_data[$i][1] == 'r' ) && + ($usable_data[$i][2] == 's' ) && + ($usable_data[$i][3] == 's' ) + ) + ) { + + $usable_data[1] = $usable_data[$i]; // save current field + $usable_data[2] = "\n"; + $i = 2; // just reset array to start + } + } + + fclose($fp); + return $usable_data; + } else { + if (substr($this->_remote_file, 0, 7) != 'http://') { + $this->_throw_exception( 'Cannot find http:// in '.$this->_remote_file.'!' ); + return ''; + } else { + // Extract host information + $host = substr($this->_remote_file, 7); + // Extract the GET part + $get = '/'; + if (strpos($host, '/') > 0) { + $get = substr($host, strpos($host, '/')); + $host = substr($host, 0, strpos($host, '/')); + } + // Extract port + $port = '80'; + if (strpos($host, ':') > 0) { + $port = substr($host, (strpos($host, ':') + 1)); + $host = substr($host, 0, (strpos($host, ':') - 1)); + } + + // Start connection to server + $fp = fsockopen($host, $port); + if (!$fp) { + $this->_throw_exception( $this->_remote_file.' is maybe not available.' ); + return ''; + } + // Repare request line + $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host); + // Send request out + fputs($fp, $request); + $reply = ''; $isContent = false; $dummy = ''; + // Read reply + $i=0; + while ( !feof($fp) ) { + $read = trim(fgets($fp, 4096)); + if (substr($read, 0, 5) == '<?xml' || $isContent) { + // Add content + $reply[] = $read; + $isContent = true; + } else { + // Put in dummy + $dummy[] = $read; + } + $i++; + } + if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) { + // Transfer content from dummy + $reply = $content; + } + fclose($fp); + //die(htmlentities($reply)); + return $reply; + } + } + } // END _rdf_data() +} // END class +?> diff --git a/inc/code-functions.php b/inc/code-functions.php index 95f1ea7a87..a39ec947b8 100644 --- a/inc/code-functions.php +++ b/inc/code-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Adds a code key/value pair to $GLOBALS @@ -52,7 +51,7 @@ function getCode ($key) { // Is the key set? if (!isCodeSet($key)) { // Abort here - trigger_error(sprintf("%s[%s:] Code %s is not set.", + debug_report_bug(sprintf("%s[%s:] Code %s is not set.", __FUNCTION__, __LINE__, $key diff --git a/inc/config-functions.php b/inc/config-functions.php index a3a07e62ae..d7c27d8171 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,33 +38,49 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Init the config array function initConfig () { // Init not if already found - if ((isset($GLOBALS['config'])) && (count($GLOBALS['config']) >= 3)) { + if (isConfigLoaded()) { // Already initialized - trigger_error(sprintf("[%s:%s] Configuration is already initialized.", __FUNCTION__, __LINE__)); + debug_report_bug(sprintf("[%s:%s] Configuration is already initialized.", __FUNCTION__, __LINE__)); } // END - if - // Set a minimum of configuration, required to by-pass some errors triggers in getConfig() + // Set a minimum of configuration, required to by-pass some error triggers in getConfig() $GLOBALS['config'] = array( - 'code_length' => 0, - 'patch_level' => 0, - 'last_update' => time(), - 'DEFAULT_LANG' => 'de', - 'DEBUG_MODE' => 'N', - 'DEBUG_RESET' => 'N', - 'DEBUG_MONTHLY' => 'N', - 'DEBUG_WEEKLY' => 'N', - 'DEBUG_REGEX' => 'N', - 'ADMIN_REGISTERED' => 'N', - 'sql_count' => 0, - 'num_templates' => 0, - 'default_theme' => 'default', + 'code_length' => 0, + 'patch_level' => 0, + 'last_update' => time(), + 'activate_xchange' => 100, + 'enable_mod_title' => 'Y', + 'update_filter_usage' => 'N', + 'ADMIN_REGISTERED' => 'N', + 'MXCHANGE_INSTALLED' => 'N', + 'DEFAULT_LANG' => 'de', + 'DEBUG_MODE' => 'N', + 'DEBUG_RESET' => 'N', + 'DEBUG_MONTHLY' => 'N', + 'DEBUG_WEEKLY' => 'N', + 'DEBUG_REGEX' => 'N', + 'ADMIN_REGISTERED' => 'N', + 'sql_count' => 0, + 'sql_time' => 0, + 'num_templates' => 0, + 'default_theme' => 'default', + 'verbose_sql' => 'Y', + 'def_refid' => 0, + 'ENABLE_BACKLINK' => 'Y', + 'display_debug_sqls' => 'N', + // Keep session_save_path to fall-back to php.ini setting + 'session_save_path' => '', + // For installation phase: + 'SMTP_HOSTNAME' => '', + 'SMTP_USER' => '', + 'SMTP_PASSWORD' => '', + 'MT_WORD' => '{--DEFAULT_MT_WORD--}', ); } @@ -74,9 +90,13 @@ function getConfig ($configEntry) { $value = null; // Is the entry there? - if (!isConfigEntrySet($configEntry)) { + if (!isset($GLOBALS['config'][$configEntry])) { // Raise an error of missing entries - trigger_error(sprintf("[%s:%s] Configuration entry <em>%s</em> is missing.", __FUNCTION__, __LINE__, $configEntry)); + debug_report_bug(sprintf("[%s:%s] Configuration entry <em>%s</em> is missing.", + __FUNCTION__, + __LINE__, + $configEntry + )); } // END - if // Return it @@ -85,16 +105,7 @@ function getConfig ($configEntry) { // Setter for $GLOBALS['config'] entries function setConfigEntry ($configEntry, $value) { - // Secure the entry name - if (function_exists('SQL_ESCAPE')) { - // Use our secure function - $configEntry = SQL_ESCAPE($configEntry); - } else { - // Use maybe insecure function - $configEntry = smartAddSlashes($configEntry); - } - - // And set it + // Just set it (unsecured won't hurt?) $GLOBALS['config'][$configEntry] = $value; } @@ -124,39 +135,6 @@ function isConfigLoaded () { return ((isset($GLOBALS['config'])) && (is_array($GLOBALS['config'])) && (count($GLOBALS['config']) > 0)); } -// Load configuration and return it as an arry -function loadConfiguration ($no = '0') { - // Check for cache extension, cache-array and if the requested configuration is in cache - if ((isset($GLOBALS['cache_array'])) && (is_array($GLOBALS['cache_array'])) && (isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) { - // Load config from cache - //* DEBUG: */ OUTPUT_HTML(gettype($GLOBALS['cache_array']['config'][$no])."<br />"); - foreach ($GLOBALS['cache_array']['config'][$no] as $key => $value) { - setConfigEntry($key, $value); - } // END - foreach - - // Count cache hits if exists - if ((isConfigEntrySet('cache_hits')) && (EXT_IS_ACTIVE('cache'))) { - incrementConfigEntry('cache_hits'); - } // END - if - } elseif ((!EXT_IS_ACTIVE('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) { - // Load config from DB - $result_config = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_config` WHERE config=%d LIMIT 1", - array(bigintval($no)), __FUNCTION__, __LINE__); - - // Is the config there? - if (SQL_NUMROWS($result_config) == 1) { - // Get config from database - mergeConfig(SQL_FETCHARRAY($result_config)); - } // END - if - - // Free result - SQL_FREERESULT($result_config); - - // Remember this config in the array - $GLOBALS['cache_array']['config'][$no] = getConfigArray(); - } -} - // Getter for whole $GLOBALS['config'] array function getConfigArray () { // Default is null @@ -177,32 +155,33 @@ function updateOldConfigFile () { // Watch out for these lines and execute them as single command // @TODO Make this all better... :-/ $watchLines = array( - "define('SITE_KEY'," => 'SITE_KEY', - "define('DEFAULT_LANG'," => 'DEFAULT_LANG', - "define('warn_no_pass'," => 'WARN_NO_PASS', - "define('WRITE_FOOTER'," => 'WRITE_FOOTER', - "define('OUTPUT_MODE'," => 'OUTPUT_MODE', - "define('MAIN_TITLE'," => 'MAIN_TITLE', - "define('SLOGAN'," => 'SLOGAN', - "define('WEBMASTER'," => 'WEBMASTER', - "define('mxchange_installed'," => 'MXCHANGE_INSTALLED', - "define('admin_registered'," => 'ADMIN_REGISTERED', - "define('_MYSQL_PREFIX'," => '_MYSQL_PREFIX', - "define('_TABLE_TYPE'," => '_TABLE_TYPE', - "define('_DB_TYPE'," => '_DB_TYPE', - "define('SMTP_HOSTNAME'," => 'SMTP_HOSTNAME', - "define('SMTP_USER'" => 'SMTP_USER', - "define('SMTP_PASSWORD'," => 'SMTP_PASSWORD', - "define('ENABLE_BACKLINK'," => 'ENABLE_BACKLINK', + 'SITE_KEY' => 'SITE_KEY', + 'DEFAULT_LANG' => 'DEFAULT_LANG', + 'warn_no_pass' => 'WARN_NO_PASS', + 'WRITE_FOOTER' => 'WRITE_FOOTER', + 'OUTPUT_MODE' => 'OUTPUT_MODE', + 'MAIN_TITLE' => 'MAIN_TITLE', + 'SLOGAN' => 'SLOGAN', + 'WEBMASTER' => 'WEBMASTER', + 'mxchange_installed' => 'MXCHANGE_INSTALLED', + 'admin_registered' => 'ADMIN_REGISTERED', + '_MYSQL_PREFIX' => '_MYSQL_PREFIX', + '_TABLE_TYPE' => '_TABLE_TYPE', + '_DB_TYPE' => '_DB_TYPE', + 'SMTP_HOSTNAME' => 'SMTP_HOSTNAME', + 'SMTP_USER' => 'SMTP_USER', + 'SMTP_PASSWORD' => 'SMTP_PASSWORD', + 'ENABLE_BACKLINK' => 'ENABLE_BACKLINK', + 'MAIN_TITLE' => 'MAIN_TITLE', + 'SLOGAN' => 'SLOGAN', + 'WEBMASTER' => 'WEBMASTER', + 'PATH' => 'PATH', + 'URL' => 'URL', ); // Make these lower-case! (damn stupid code...) $lowerCase = array('WARN_NO_PASS', 'MXCHANGE_INSTALLED', 'ADMIN_REGISTERED'); - // These are still constants... - // @TODO Rewrite these all to config entries, if somehow possible - $constants = array('MAIN_TITLE', 'SLOGAN', 'WEBMASTER'); - // Special comments... $comments = array( 'WARN_NO_PASS' => 'NULLPASS-WARNING', @@ -219,7 +198,7 @@ function updateOldConfigFile () { ); // Copy template to new file destionation - copyFileVerified(getConfig('PATH') . 'inc/config-local.php.dist', getConfig('PATH') . 'inc/cache/config-local.php', 0644); + copyFileVerified(getConfig('PATH') . 'inc/config-local.php.dist', getConfig('CACHE_PATH') . 'config-local.php', 0644); // First of all, load the old one! $oldConfig = explode("\n", readFromFile(getConfig('PATH') . 'inc/config.php')); @@ -229,10 +208,13 @@ function updateOldConfigFile () { foreach ($oldConfig as $line) { // Check all watch lines foreach ($watchLines as $old => $new) { + // Add define() command around old one + $old = "define('" . $old . "',"; + // Is the line found? if ((substr($line, 0, strlen($old)) == $old) && (!isset($done[$old]))) { // Entry found! - //* DEBUG: */ OUTPUT_HTML(htmlentities($line) . " - FOUND!<br />"); + //* DEBUG: */ outputHtml(htmlentities($line) . " - FOUND!<br />"); // Eval the line... eval($line); @@ -240,12 +222,6 @@ function updateOldConfigFile () { // Setting config entry is new default behaviour! $function = 'setConfigEntry'; - // Still some old constants left? - if (in_array($new, $constants)) { - // Then switch over... - $function = 'define'; - } // END - if - // Default comment $comment = str_replace('_', '-', $new); @@ -263,9 +239,9 @@ function updateOldConfigFile () { } // END - if /// ... and write it to the new config - //* DEBUG: */ OUTPUT_HTML('function=' . $function . ',new=' . $new . ',comment=' . $comment . "<br />"); - changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', $comment, $function . "('" . $oldNew . "', \"", "\");", constant($new), 0); - //* DEBUG: */ OUTPUT_HTML("CHANGED!<br />"); + //* DEBUG: */ outputHtml('function=' . $function . ',new=' . $new . ',comment=' . $comment . "<br />"); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', $comment, $function . "('" . $oldNew . "', \"", "\");", constant($new), 0); + //* DEBUG: */ outputHtml("CHANGED!<br />"); // Mark it as done $done[$old] = 1; @@ -296,14 +272,14 @@ function updateOldConfigFile () { } // Debug output only - //* DEBUG: */ OUTPUT_HTML(htmlentities($line) . " - MySQL!<br />"); + //* DEBUG: */ outputHtml(htmlentities($line) . " - MySQL!<br />"); // Split parts so we can check them and prepare them $parts = explode('=>', $line); $key = substr(trim($parts[0]), 1, -1); $value = substr(trim($parts[1]), 1, -2); // We can now save the right part in new config file - changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', $comments[$key], " '".$key."' => \"", "\",", $value, 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', $comments[$key], " '".$key."' => \"", "\",", $value, 0); } } // END - foreach @@ -311,13 +287,13 @@ function updateOldConfigFile () { removeFile(getConfig('PATH') . 'inc/config.php'); // Redirect to same URL to reload our new config - redirectToUrl($_SERVER['REQUEST_URI']); + redirectToUrl(getRequestUri()); } // Update config entries function updateConfiguration ($entries, $values, $updateMode='') { // Do not update config in CSS mode - if ((getOutputMode() == '1') || (getOutputMode() == -1)) { + if ((getOutputMode() == '1') || (getOutputMode() == -1) || (isInstallationPhase())) { return; } // END - if @@ -329,8 +305,7 @@ function updateConfiguration ($entries, $values, $updateMode='') { // Update mode set? if (!empty($updateMode)) { // Update entry - // @TODO Find a way for updating configuration here - $all .= sprintf("`%s`=%s%s%s,", $entry, $entry, $updateMode, (float)$values[$idx]); + $all .= sprintf("`%s`=`%s`%s%s,", $entry, $entry, $updateMode, (float)$values[$idx]); } else { // Check if string or number if (($values[$idx] + 0) === $values[$idx]) { @@ -343,10 +318,10 @@ function updateConfiguration ($entries, $values, $updateMode='') { // String detected $all .= sprintf("`%s`='%s',", $entry, SQL_ESCAPE($values[$idx])); } - } - // Set it in config as well - setConfigEntry($entry, $values[$idx]); + // Set it in config as well + setConfigEntry($entry, $values[$idx]); + } } // END - foreach // Remove last comma @@ -364,15 +339,46 @@ function updateConfiguration ($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", __FUNCTION__, __LINE__); - - // Get affected rows - $affectedRows = SQL_AFFECTEDROWS(); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}"); + SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=0 LIMIT 1", __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />"); // Rebuild cache - rebuildCacheFiles('config', 'config'); + rebuildCacheFile('config', 'config'); +} + +// Filter for loading configuration +function FILTER_LOAD_CONFIGURATION ($no = '0') { + // Check for cache extension, cache-array and if the requested configuration is in cache + if ((isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) { + // Load config from cache + //* DEBUG: */ outputHtml(gettype($GLOBALS['cache_array']['config'][$no])."<br />"); + mergeConfig($GLOBALS['cache_array']['config'][$no]); + //foreach ($GLOBALS['cache_array']['config'][$no] as $key => $value) { + // setConfigEntry($key, $value); + //} // END - foreach + + // Count cache hits if exists + if ((isStatsEntrySet('cache_hits')) && (isExtensionActive('cache'))) { + incrementStatsEntry('cache_hits'); + } // END - if + } elseif ((!isExtensionActive('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) { + // Load config from DB + $result_config = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE config=%d LIMIT 1", + array(bigintval($no)), __FUNCTION__, __LINE__); + + // Is the config there? + if (SQL_NUMROWS($result_config) == 1) { + // Get config from database + mergeConfig(SQL_FETCHARRAY($result_config)); + } // END - if + + // Free result + SQL_FREERESULT($result_config); + + // Remember this config in the array + $GLOBALS['cache_array']['config'][$no] = getConfigArray(); + } } // [EOF] diff --git a/inc/config-global.php b/inc/config-global.php index 9ffed08a50..cc8d5e1110 100644 --- a/inc/config-global.php +++ b/inc/config-global.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if /************************************************************************ @@ -61,23 +60,22 @@ error_reporting(E_ALL | E_STRICT); $PATH = str_replace("\\", '/', substr(dirname(__FILE__), 0, -3)); // Configuration include file -require($PATH . 'inc/config-functions.php'); - -// Wrapper include file -require($PATH . 'inc/wrapper-functions.php'); - -// Initialize the configuration -initConfig(); +foreach (array('config','wrapper','inc','stats') as $inc) { + require($PATH . 'inc/' . $inc . '-functions.php'); +} // END - foreach // Auto-detection... (patched by "Stelzi" aka. profi-concept, thanks again!) $URL = 'http://' . getenv('SERVER_NAME') . str_replace("\\", '/', dirname($_SERVER['PHP_SELF'])); while (substr($URL, -1, 1) == '/') { $URL = substr($URL, 0, -1); } +// Initialize the configuration +initConfig(); + // CFG: HOST-URL (without trailing '/' !) setConfigEntry('URL', $URL); // CFG: SERVER-PATH -setConfigEntry('PATH', str_replace("\\", '/', substr(dirname(__FILE__), 0, -3))); +setConfigEntry('PATH', $PATH); // CFG: VERSION setConfigEntry('VERSION', 'v0.2.1'); @@ -89,10 +87,19 @@ setConfigEntry('AUTHOR' , 'Roland Häder'); setConfigEntry('TITLE', 'MXChange - Mail Exchange'); // CFG: COPY -setConfigEntry('COPY', 'Copyright © 2003 - 2008, by Roland Häder'); +setConfigEntry('COPY', 'Copyright © 2003 - 2009, by Roland Häder'); + +// CFG: CACHE-PATH +setConfigEntry('CACHE_PATH', getConfig('PATH') . 'inc/cache/'); + +// CFG: STATS-ENABLED (performance impact, we use files now) +setConfigEntry('STATS_ENABLED', 'N'); // Connect to the MySQL database... loadIncludeOnce('inc/mysql-connect.php'); -// +// Init stats system +initStatsSystem(); + +// [EOF] ?> diff --git a/inc/config-local.php.dist b/inc/config-local.php.dist index 6f4e9d0cb5..f56fc506c9 100644 --- a/inc/config-local.php.dist +++ b/inc/config-local.php.dist @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if /************************************************************************ @@ -79,21 +78,24 @@ setConfigEntry('_TABLE_TYPE', 'MyISAM'); // CFG: DATABASE-TYPE setConfigEntry('_DB_TYPE', 'mysql3'); +// CFG: BACKLINK (Enable backlink to mxchange.org in footer? rel=external is set!) +setConfigEntry('ENABLE_BACKLINK', 'Y'); + // CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!) setConfigEntry('DEBUG_MODE', 'Y'); -// CFG: BACKLINK (Enable backlink to mxchange.org in footer? rel=external is set!) -setConfigEntry('ENABLE_BACKLINK', 'Y'); +// CFG: DEBUG-SQL (Logs all queries to inc/cache/mysql.log) +//setConfigEntry('DEBUG_SQL', 'Y'); // CFG: DEBUG-RESET (comment in to test daily reset, comment out to not test) //setConfigEntry('DEBUG_RESET', 'Y'); -// CFG: DEBUG-MONTHLY (comment in to test monthly reset, comment out to not test) -//setConfigEntry('DEBUG_MONTHLY', 'Y'); - // CFG: DEBUG-WEEKLY (comment in to test weekly reset, comment out to not test) //setConfigEntry('DEBUG_WEEKLY', 'Y'); +// CFG: DEBUG-MONTHLY (comment in to test monthly reset, comment out to not test) +//setConfigEntry('DEBUG_MONTHLY', 'Y'); + // CFG: DEBUG-REGEX (comment in to debug regular expressions) //setConfigEntry('DEBUG_REGEX', 'Y'); @@ -127,5 +129,5 @@ setConfigEntry('SLOGAN', 'Your cool slogan here'); // CFG: WEBMASTER setConfigEntry('WEBMASTER', 'you@some-hoster.tld.invalid'); -// +// [EOF] ?> diff --git a/inc/databases.php b/inc/databases.php index 7fe969cbae..ef12560a0a 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // System-wide return codes @@ -84,17 +83,20 @@ setConfigEntry('SERVER_URL', 'http://www.mxchange.org'); // Replacement strings $GLOBALS['replacer'] = array( - 'userid' => '%uid%', // User-ID + 'userid' => '%userid%', // User-ID 'surname' => '%vorname%', // Surname 'family' => '%nachname%', // Family name 'gender' => '%anrede%', // Gender ); // One day -setConfigEntry('one_day', (60*60*24)); +setConfigEntry('ONE_DAY', (60*60*24)); + +// Current date +setConfigEntry('CURRENT_DATE', generateDateTime(time(), '3')); // Timestamp for yesterday, today ... all at 00:00 am -setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('one_day'))); +setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('ONE_DAY'))); setConfigEntry('START_TDAY', makeTime(0, 0, 0, time())); // Take a prime number which is long (if you know a longer one please try it out!) @@ -103,9 +105,6 @@ setConfigEntry('_PRIME', 591623); // Calculate "entropy" with the prime number (for code generation) setConfigEntry('_ADD', (getConfig('_PRIME') * getConfig('_PRIME') / (pi() * getConfig('code_length') + 1))); -// Random number for e.g. the "cache-buster" used in OpenX script -setConfigEntry('CACHE_BUSTER', mt_rand(1000000, 9999999)); - // HTTP-EOL setConfigEntry('HTTP_EOL', "\r\n"); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index eab5b18ab6..44f5fd4366 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,44 +38,52 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // SQL queries -function SQL_QUERY ($sql_string, $F, $L) { +function SQL_QUERY ($sqlString, $F, $L) { + // Trim SQL string + $sqlString = trim($sqlString); + // Link is up? if (!SQL_IS_LINK_UP()) { // We should not quietly ignore this! - trigger_error(sprintf("Cannot query database: sql_string=%s,file=%s,line=%s", - $sql_string, + debug_report_bug(sprintf("Cannot query database: sqlString=%s,file=%s,line=%s", + $sqlString, basename($F), $L )); // Return 'false' because it has failed return false; - } // END - if + } elseif (empty($sqlString)) { + // Empty SQL string! + debug_report_bug(sprintf("SQL string is empty. Please fix this. file=%s, line=%s", + basename($F), + $L + )); - // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard - $sql_string = str_replace("\t", " ", str_replace("\n", " ", str_replace("\r", " ", $sql_string))); + // This is invalid, of course + return false; + } - // Replace {!_MYSQL_PREFIX!} with constant, closes #84. Thanks to profi-concept - $sql_string = str_replace("{!_MYSQL_PREFIX!}", getConfig('_MYSQL_PREFIX'), $sql_string); + // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard + $sqlString = str_replace("\t", ' ', str_replace("\n", ' ', str_replace("\r", ' ', $sqlString))); - // Replace {!_TABLE_TYPE!} with constant - $sql_string = str_replace("{!_TABLE_TYPE!}", getConfig('_TABLE_TYPE'), $sql_string); + // Compile config out + $sqlString = FILTER_COMPILE_CONFIG($sqlString); // Starting time $querytimeBefore = array_sum(explode(' ', microtime())); // Run SQL command - //* DEBUG: */ OUTPUT_HTML($sql_string."<br />"); - $result = mysql_query($sql_string, SQL_GET_LINK()) - or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br /> + //* DEBUG: */ outputHtml($sqlString."<br />"); + $result = mysql_query($sqlString, SQL_GET_LINK()) + or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error() . '<br /> Query string:<br /> -".$sql_string); - //* DEBUG: */ OUTPUT_HTML(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "<br />"); +' . $sqlString); + //* DEBUG: */ outputHtml(__LINE__ . ': numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS() . "<br />"); // Ending time $querytimeAfter = array_sum(explode(' ', microtime())); @@ -83,35 +91,40 @@ Query string:<br /> // Calculate query time $queryTime = $querytimeAfter - $querytimeBefore; + // Add this query to array including timing + addSqlToDebug($result, $sqlString, $queryTime, $F, $L); + // Save last successfull query - setConfigEntry('db_last_query', $sql_string); + setConfigEntry('db_last_query', $sqlString); + + // Count all query times + incrementConfigEntry('sql_time', $queryTime); // Count this query incrementConfigEntry('sql_count'); // Debug output - //* DEBUG: */ OUTPUT_HTML("Query=<pre>".$sql_string."</pre>, affected=<strong>".SQL_AFFECTEDROWS()."</strong>, numrows=<strong>".SQL_NUMROWS($result)."</strong><br />"); - if ((getOutputMode() != '1') && (getOutputMode() != '-1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) { + if ((getOutputMode() != '1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) { // // Debugging stuff... // - $fp = fopen(getConfig('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!"); + $fp = fopen(getConfig('CACHE_PATH') . 'mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!"); if (!isset($GLOBALS['sql_first_entry'])) { // Write first entry fwrite($fp, 'Module=' . getModule() . "\n"); $GLOBALS['sql_first_entry'] = true; } // END - if - fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace("\r", '', str_replace("\n", " ", $sql_string))."\n"); + fwrite($fp, $F . '(LINE=' . $L . '|NUM=' . SQL_NUMROWS($result) . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $sqlString)) . "\n"); fclose($fp); } // END - if // Count DB hits - if (!isConfigEntrySet('db_hits_run')) { + if (!isStatsEntrySet('db_hits_run')) { // Count in dummy variable - setConfigEntry('db_hits_run', 1); + setStatsEntry('db_hits_run', 1); } else { // Count to config array - incrementConfigEntry('db_hits_run'); + incrementStatsEntry('db_hits_run'); } // Return the result @@ -120,6 +133,9 @@ Query string:<br /> // SQL num rows function SQL_NUMROWS ($result) { + // Link is not up, no rows by default + $lines = false; + // Is the result a valid resource? if (is_resource($result)) { // Get the count of rows from database @@ -127,10 +143,12 @@ function SQL_NUMROWS ($result) { // Is the result empty? Then we have an error! if (empty($lines)) $lines = 0; - } else { + } elseif (SQL_IS_LINK_UP()) { // No resource given, no lines found! $lines = 0; } + + // Return lines return $lines; } @@ -149,16 +167,16 @@ function SQL_AFFECTEDROWS() { // SQL fetch row function SQL_FETCHROW ($result) { // Is a result resource set? - if (!is_resource($result)) return false; + if ((!is_resource($result)) || (!SQL_IS_LINK_UP())) return false; // Fetch the data and return it return mysql_fetch_row($result); } // SQL fetch array -function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) { +function SQL_FETCHARRAY ($res, $nr=0, $remove_numerical=true) { // Is a result resource set? - if (!is_resource($res)) return false; + if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false; // Initialize array $row = array(); @@ -189,7 +207,7 @@ function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) { // SQL result function SQL_RESULT ($res, $row, $field = 0) { // Is $res valid? - if (!is_resource($res)) return false; + if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false; // Run the result command and return the result $result = mysql_result($res, $row, $field); @@ -203,6 +221,9 @@ function SQL_CONNECT ($host, $login, $password, $F, $L) { // Set the link resource SQL_SET_LINK($connect); + + // Destroy cache + unset($GLOBALS['sql_link_res']); } // SQL select database @@ -221,16 +242,6 @@ function SQL_CLOSE ($F, $L) { return false; } // END - if - // Do we need to update cache/db counter? - //* DEBUG: */ OUTPUT_HTML("DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."<br />"); - if ((GET_EXT_VERSION('cache') >= '0.0.7') && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) { - // Add new hits - incrementConfigEntry('db_hits', getConfig('db_hits_run')); - - // Update counter for db/cache - updateConfiguration(array('db_hits', 'cache_hits'), array(getConfig('db_hits'), getConfig('cache_hits'))); - } // END - if - // Close database link and forget the link $close = mysql_close(SQL_GET_LINK()) or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):'.mysql_error()); @@ -238,13 +249,19 @@ function SQL_CLOSE ($F, $L) { // Close link SQL_SET_LINK(null); + // Destroy cache + unset($GLOBALS['sql_link_res']); + + // Move stats + incrementStatsEntry('db_hits', getStatsEntry('db_hits_run')); + // Return the result return $close; } // SQL free result function SQL_FREERESULT ($result) { - if (!is_resource($result)) { + if ((!is_resource($result)) || (!SQL_IS_LINK_UP())) { // Abort here return false; } // END - if @@ -256,8 +273,19 @@ function SQL_FREERESULT ($result) { // SQL string escaping function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true, $secure=true) { // Link is there? - if (!SQL_IS_LINK_UP()) return false; + if ((!SQL_IS_LINK_UP()) || (!is_array($data))) return false; + /* Other way */ + // Escape all data + $dataSecured['__sql_string'] = $qstring; + foreach ($data as $key => $value) { + $dataSecured[$key] = SQL_ESCAPE($value, $secure, $strip); + } // END - foreach + + // Generate query + $query = call_user_func_array('sprintf', $dataSecured); + /* + /* Old eval() way... * // Init variable $query = 'failed'; @@ -273,23 +301,25 @@ function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true, $secure $secure = 'false'; } - $eval = "\$query = sprintf(\"".$qstring."\""; + $eval = "\$query = sprintf(\"" . $qstring . "\""; foreach ($data as $var) { if ((!empty($var)) || ($var === 0)) { - $eval .= ", SQL_ESCAPE(\"".$var."\", ".$secure.", ".$strip.")"; + $eval .= ", SQL_ESCAPE('" . $var . "', " . $secure . ', ' . $strip . ')'; } else { $eval .= ", ''"; } } // END - foreach - $eval .= ");"; + $eval .= ');'; + **/ // Debugging // - //* DEBUG: */ $fp = fopen(getConfig('PATH')."inc/cache/escape_debug.log", 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!"); + //* DEBUG: */ $fp = fopen(getConfig('CACHE_PATH') . 'escape_debug.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!"); //* DEBUG: */ fwrite($fp, $F.'('.$L."): ".str_replace("\r", '', str_replace("\n", " ", $eval))."\n"); //* DEBUG: */ fclose($fp); // Run the code + /** eval($eval); // Was the eval() command fine? @@ -297,6 +327,7 @@ function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true, $secure // Something went wrong? debug_report_bug('eval=' . $eval); } // END - if + **/ if ($run === true) { // Run SQL query (default) @@ -315,26 +346,38 @@ function SQL_INSERTID () { // Escape a string for the database function SQL_ESCAPE ($str, $secureString=true, $strip=true) { + // Do we have cache? + if (isset($GLOBALS['sql_escapes'][$str])) { + // Then use it instead + return $GLOBALS['sql_escapes'][$str]; + } // END - if + // Secure string first? (which is the default behaviour!) - if ($secureString) { + if ($secureString === true) { // Then do it here $str = secureString($str, $strip); } // END - if if (!SQL_IS_LINK_UP()) { // Fall-back to smartAddSlashes() when there is no link - return smartAddSlashes($str); + $ret = smartAddSlashes($str); } elseif (function_exists('mysql_real_escape_string')) { // The new and improved version - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):str={$str}<br />"); - return mysql_real_escape_string($str, SQL_GET_LINK()); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):str={$str}<br />"); + $ret = mysql_real_escape_string($str, SQL_GET_LINK()); } elseif (function_exists('mysql_escape_string')) { // The obsolete function - return mysql_escape_string($str, SQL_GET_LINK()); + $ret = mysql_escape_string($str, SQL_GET_LINK()); } else { - // If nothing else works, fall back to smartAddSlashes() - return smartAddSlashes($str); + // If nothing else works, fall back to smartAddSlashes() again + $ret = smartAddSlashes($str); } + + // Cache result + $GLOBALS['sql_escapes'][$str] = $ret; + + // Return it + return $ret; } // SELECT query string from table, columns and so on... ;-) @@ -342,11 +385,18 @@ 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))); + debug_report_bug(sprintf("columns is not an array. %s != array, file=%s, line=%s", + gettype($columns), + basename($F), + $L + )); + + // Abort here with 'false' + return false; } // END - if // Prepare the SQL statement - $sql = "SELECT `".implode("`,`", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s' LIMIT 1"; + $sql = "SELECT `".implode("`,`", $columns)."` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s' LIMIT 1"; // Return the result return SQL_QUERY_ESC($sql, @@ -360,6 +410,9 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { // ALTER TABLE wrapper function function SQL_ALTER_TABLE ($sql, $F, $L) { + // Abort if link is down + if (!SQL_IS_LINK_UP()) return false; + // This is the default result... $result = false; @@ -391,13 +444,13 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321 if (((SQL_NUMROWS($result) == 0) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) { // Do the query - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$sql."<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$sql."<br />"); $result = SQL_QUERY($sql, $F, $L, false); } // END - if } elseif ((getConfig('_TABLE_TYPE') == 'InnoDB') && (strpos($sql, 'FULLTEXT') !== false)) { // Skip this query silently - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Skipped FULLTEXT: sql=%s,file=%s,line=%s", $sql, $F, $L)); - } elseif (!$noIndex) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Skipped FULLTEXT: sql=%s,file=%s,line=%s", $sql, $F, $L)); + } elseif ($noIndex === false) { // And column name as well $columnName = str_replace('`', '', $tableArray[4]); @@ -408,11 +461,11 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { while (strpos($columnName, ',') !== false) { // Use last $columnName = str_replace('`', '', $tableArray[count($tableArray) - $begin]); - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$columnName."----------------".$begin."<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$columnName."----------------".$begin."<br />"); // Remove brackes $columnName = str_replace('(', '', str_replace(')', '', $columnName)); - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$columnName."----------------".$begin."<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$columnName."----------------".$begin."<br />"); // Continue $begin++; @@ -427,10 +480,10 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { $skip = false; while ($content = SQL_FETCHARRAY($result)) { // Is it found? - //* DEBUG: */ OUTPUT_HTML("<pre>".print_r($content, true)."</pre>"); + //* DEBUG: */ outputHtml("<pre>".print_r($content, true)."</pre>"); if (($content['Column_name'] == $columnName) || ($content['Key_name'] == $columnName)) { // Skip this query! - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Skiped: %s", $sql)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Skiped: %s", $sql)); $skip = true; break; } // END - if @@ -440,14 +493,14 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { SQL_FREERESULT($result); // Shall we run it? - if (!$skip) { + if ($skip === false) { // Send it to the SQL_QUERY() function - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$sql."<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$sql."<br />"); $result = SQL_QUERY($sql, $F, $L, false); } // END - if } else { // Other ALTER TABLE query - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$sql."<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$sql."<br />"); $result = SQL_QUERY($sql, $F, $L, false); } @@ -475,7 +528,7 @@ function SQL_SET_LINK ($link) { // Is this a resource or null? if ((!is_resource($link)) && (!is_null($link))) { // This should never happen! - trigger_error(sprintf("link is not resource or null. Type: %s", gettype($link))); + debug_report_bug(sprintf("link is not resource or null. Type: %s", gettype($link))); } // END - if // Set it @@ -484,12 +537,24 @@ function SQL_SET_LINK ($link) { // Checks if the link is up function SQL_IS_LINK_UP () { - // Get the link - $link = SQL_GET_LINK(); + // Default is not up + $linkUp = false; + + // Do we have cached this? + if (isset($GLOBALS['sql_link_res'])) { + // Then use this + $linkUp = $GLOBALS['sql_link_res']; + } else { + // Get it + $linkUp = is_resource(SQL_GET_LINK()); + + // And cache it + $GLOBALS['sql_link_res'] = $linkUp; + } // Return the result - return (is_resource($link)); + return $linkUp; } -// +// [EOF] ?> diff --git a/inc/db/lib.php b/inc/db/lib.php index 217d7681b0..a751023953 100644 --- a/inc/db/lib.php +++ b/inc/db/lib.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Is it not set? if (!isConfigEntrySet('_DB_TYPE')) setConfigEntry('_DB_TYPE', 'mysql3'); // Create include file name -$INC = sprintf("inc/db/lib-%s.php", getConfig('_DB_TYPE')); +$inc = sprintf("inc/db/lib-%s.php", getConfig('_DB_TYPE')); -if (isIncludeReadable($INC)) { +if (isIncludeReadable($inc)) { // Include abstraction layer - loadIncludeOnce($INC); + loadIncludeOnce($inc); } else { // Bye, bye... die('Cannot load database abstraction layer <u>' . getConfig('_DB_TYPE') . '</u> -> R.I.P.'); } -// +// [EOF] ?> diff --git a/inc/debug/request_ b/inc/debug/request_ index 770425294d..7c6db49d22 100644 --- a/inc/debug/request_ +++ b/inc/debug/request_ @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // diff --git a/inc/doubler_send.php b/inc/doubler_send.php index 7e40aaa6d5..f551ef47b7 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -1,178 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 02/16/2005 * - * =============== Last change: 01/21/2006 * - * * - * -------------------------------------------------------------------- * - * File : doubler_send.php * - * -------------------------------------------------------------------- * - * Short description : Send's out mails for doubled points * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Sendet Mails bei vergueteter Verdoppelung aus * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Initialize variables -$jackpot = 0; $user = 0; - -// Get total points of the doubler itself -$DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT(); -if ($DOUBLER_POINTS == 0) { - // Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...) - return; -} // END - if - -// If not currently doubled set it to zero -REQUEST_UNSET_GET('DOUBLER_UID'); -REQUEST_UNSET_POST('DOUBLER_UID'); -setSession('DOUBLER_UID', ''); -if (empty($GLOBALS['doubler_uid'])) $GLOBALS['doubler_uid'] = 0; - -// Check for doubles which we can pay out -$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 -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, - getConfig(('doubler_min') * 2) - ), __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 -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 -LIMIT %d", - array( - $DOUBLER_POINTS, - getConfig(('doubler_min') * 2), - getConfig('doubler_max_sent') - ), __FILE__, __LINE__); - -// Do we have entries found? -if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != 'Y'))) { - // Switch to matching SQL resource - $result_load = $result_main; - if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) $result_load = $result_total; - - // At least one account was found - while ($content = SQL_FETCHARRAY($result_load)) { - // Only double when points are enougth! - if ($DOUBLER_POINTS >= $content['points']) { - // Check for his ref points - $ref = GET_TOTAL_DATA($content['userid'], 'doubler', 'points', 'refid', false, " AND `completed`='N' AND `is_ref`='Y'"); - - // Zero refid when empty (might be helpful!) - if (empty($ref)) $ref = 0; - - if (($ref > 0) && ($GLOBALS['doubler_uid'] == $content['userid']) && (!empty($ref))) { - // Referal points found so add them and set line(s) to completed='Y' - $content['points'] += $ref; - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET `completed`='Y' WHERE `refid`=%s AND `completed`='N' AND `is_ref`='Y'", - array(bigintval($content['userid'])), __FILE__, __LINE__); - } else { - // No referal points found - $ref = 0; - } - - // Exclude webmaster from doubling... - if ($content['userid'] != getConfig('doubler_uid')) { - // Add points - ADD_POINTS_REFSYSTEM_DIRECT(sprintf("doubler_%s", strtolower(getConfig('doubler_send_mode'))), $content['userid'], $content['points']); - } // END - if - - // Set entry as "payed" - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET `completed`='Y' WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__); - - $okay = false; - - // Check for jackpot inclusion in doubling process - if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) { - // Subtract points from jackpot - SUB_JACKPOT($content['points']); - $jackpot -= $content['points']; - - // Okay, done! - $okay = true; - } // END - if - - // Exclude also webmaster's ID in taking points from webmaster's account - if (($user > 0) && ($user >= $content['points']) && ($okay === false) && (getConfig('doubler_uid') > 0) && ($content['userid'] != getConfig('doubler_uid'))) { - // Add points to used points - SUB_POINTS('doubler_payout', getConfig('doubler_uid'), $content['points']); - - // Okay, done! - $okay = true; - } // END - if - - // Update doubler's account only when others are not updated - if ($okay === false) { - // Add points to used doubler points - updateConfiguration('doubler_used', $content['points'], '+'); - } // END - if - - // Update variables to prevent errors - incrementConfigEntry('doubler_used', $content['points']); - $DOUBLER_POINTS -= $content['points']; - - // Prepare array - $content = array( - // Doubler transmission ID - 'id' => $content['id'], - // Doubled points - 'points' => translateComma($content['points']), - // Timemark - 'when' => generateDateTime($content['timemark'], '2'), - // IP number when the member submitted the doubling form - 'ip' => $content['remote_ip'], - ); - - // Load mail template and send mail away... - $message = LOAD_EMAIL_TEMPLATE('member_doubler', $content, $content['userid']); - sendEmail($content['userid'], getMessage('DOUBLER_MEMBER_SUBJECT'), $message); - } // END - if - } // END - while -} // END - if - -// Free memory -SQL_FREERESULT($result_total); -SQL_FREERESULT($result_main); - -// +// @DEPRECATED ?> diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php new file mode 100644 index 0000000000..359b09fe45 --- /dev/null +++ b/inc/extensions-functions.php @@ -0,0 +1,1574 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * =============== Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : extensions-functions.php * + * -------------------------------------------------------------------- * + * Short description : Extension management * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Erweiterungen-Management * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Load the extension and maybe found language and function files. +function loadExtension ($ext_name, $ext_mode = 'init', $ext_ver = '', $dry_run = false) { + // Set current extension name + setCurrentExtensionName($ext_name); + + // Set current extension version + setCurrentExtensionVersion($ext_ver); + + // Set extension mode + setExtensionMode($ext_mode); + + // Set dry-run + enableExtensionDryRun($dry_run); + + // Init array + initIncludePool('extension'); + + // Init EXT_UPDATE_DEPENDS + initExtensionUpdateDependencies(); + + // Init current extension name list + initExtensionSqls(); + + // Is the extension already loaded? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Loading extension {$ext_name}, mode=".getExtensionMode().", ver=".getCurrentExtensionVersion().""); + if ((isset($GLOBALS['ext_loaded']['ext'][$ext_name])) && (getExtensionMode() == 'init')) { + // Debug message + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name)); + + // Abort here + return false; + } // END - if + + // Is the extension file NOT there? + if (!isExtensionNameValid($ext_name)) { + // Debug message + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable.", $ext_name)); + + // Abort here + return false; + } // END - if + + // Load extension's own language file if not in test mode + if ((getExtensionMode() != 'test') && (ifExtensionHasLanguageFile($ext_name))) { + // Load it + loadLanguageFile($ext_name); + } // END - if + + // Do we have cache? + if (isExtensionFunctionFileReadable($ext_name)) { + // Not yet loaded? + if (($GLOBALS['cache_array']['extension']['ext_func'][$ext_name] == 'Y') && (!isset($GLOBALS['ext_loaded']['funcs'][$ext_name]))) { + // Construct FQFN for functions file + $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name); + + // Mark it as loaded + $GLOBALS['ext_loaded']['funcs'][$ext_name] = true; + + // Download functions file + loadIncludeOnce($funcsInclude); + } // END - if + } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) { + // No functions file is not so good... + logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it. mode=%s", + $ext_name, + getExtensionMode() + )); + } + + // Extensions are not deprecated by default + setExtensionDeprecated('N'); + + // Extensions are not always active by default + setExtensionAlwaysActive('N'); + + // Extension update notes + setExtensionUpdateNotes(''); + + // Include the extension file + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Extension loaded."); + loadExtensionInclude(); + + // Is this extension deprecated? + if (isExtensionDeprecated()) { + // Deactivate the extension + doDeactivateExtension($ext_name); + + // Abort here + return false; + } // END - if + + // Mark it as loaded in normal mode + if (getExtensionMode() == '') { + // Mark it now... + $GLOBALS['ext_loaded']['ext'][$ext_name] = true; + } // END - if + + // All fine! + return true; +} + +// Registeres an extension and possible update depencies +function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = true) { + // Set current extension name + setCurrentExtensionName($ext_name); + + // Enable dry-run + enableExtensionDryRun($dry_run); + + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()." - ENTERED!"); + // This shall never do a non-admin user or if the extension is active (already installed) + if ((!isAdmin()) || (isExtensionInstalled($ext_name))) { + return false; + } // END - if + + // When this extension is already in install/update phase, all is fine + if (isExtensionRegisterRunning($ext_name)) { + // Then abort here which is fine + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()." - ALREADY!"); + return true; + } // END - if + + // This registration is running + addExtensionRunningRegistration($ext_name); + + // Init EXT_UPDATE_DEPENDS + initExtensionUpdateDependencies(); + + // Is the task id zero? Then we need to auto-fix it here + if ($task_id == 0) { + // Try to find the task + $task_id = determineExtensionTaskId(getCurrentExtensionName()); + + // Still zero and not in dry-run? + if (($task_id == 0) && (!getExtensionDryRun())) { + // Then request a bug report + debug_report_bug(sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)", + __FUNCTION__, + getCurrentExtensionName() + )); + } // END - if + } // END - if + + // Init queries and notes + initExtensionSqls(); + initExtensionNotes(); + + // Init variables + $ret = false; + $test = false; + initIncludePool('extension'); + + // By default we have no failures + setExtensionReportsFailure(false); + + // Does this extension exists? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().""); + if (loadExtension(getCurrentExtensionName(), 'register', '', getExtensionDryRun())) { + // Set current extension name again + setCurrentExtensionName($ext_name); + + // And run possible updates + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "".getCurrentExtensionName()); + $history = getExtensionVersionHistory(); + foreach ($history as $ver) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".getCurrentExtensionName().", ext_ver={$ver}"); + // Load extension in update mode + loadExtension(getCurrentExtensionName(), 'update', $ver, getExtensionDryRun()); + + // Add update notes to our output + addExtensionNotes($ver); + } // END - foreach + + // Does this extension depends on an outstanding update of another update? + for ($dmy = getExtensionUpdateIterator(); getExtensionUpdateIterator() < countExtensionUpdateDependencies();) { + // Get next update + $ext_update = getExtensionUpdateDependenciesIterator(); + + // Increment here to avoid endless loop + incrementExtensionUpdateIterator(); + + // Check for required file + if (loadExtension($ext_update, 'register', '', getExtensionDryRun())) { + // Set current extension name again + setCurrentExtensionName($ext_name); + + // If versions mismatch update extension first + $ext_ver = ''; + if (isExtensionInstalled($ext_update)) { + // Get version only if installed + $ext_ver = getExtensionVersion($ext_update); + } // END - if + + // Extension version set? If empty the extension is not registered + if (empty($ext_ver)) { + // Extension not registered so far so first load task's ID... + $task = determineExtensionTaskId($ext_update); + + // Entry found? + if ($task > 0) { + // Try to register the extension + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().":ext_update=".$ext_update.",taskId=".$task.""); + $test = registerExtension($ext_update, $task, getExtensionDryRun(), false); + + // Reset extension name + setCurrentExtensionName($ext_name); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); print getCurrentExtensionName().':<pre>'.print_r($test); + } // END - if + } elseif ($ext_ver != getCurrentExtensionVersion()) { + // Ok, update this extension now + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().",ext_update=".$ext_update.",ext_ver=".$ext_ver."/".getCurrentExtensionVersion().""); + $GLOBALS['ext_backup'][$ext_update][$ext_ver] = getCurrentExtensionName(); + updateExtension($ext_update, $ext_ver, getExtensionDryRun()); + setCurrentExtensionName($GLOBALS['ext_backup'][$ext_update][$ext_ver]); + unset($GLOBALS['ext_backup'][$ext_update][$ext_ver]); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().""); + + // All okay! + $test = true; + } else { + // Nothing to register / update before... + $test = true; + } + } else { + // Required file for update does not exists! + $test = true; + // But this is fine for the first time... + } + + // Restore the current extension name + setCurrentExtensionName($ext_name); + } // END - for + + // Is there no update? + if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) { + // Then test is passed! + $test = true; + } // END - if + + // Switch back to register mode + setExtensionMode('register'); + + // Remains true if extension registration reports no failures + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); print getCurrentExtensionName().':<pre>'.print_r($test, true).'</pre>'; + $test = (($test === true) && (getExtensionReportsFailure() === false)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); print getCurrentExtensionName().':<pre>'.print_r($test, true).'</pre>'; + + // Does everthing before wents ok? + if ($test === true) { + // "Dry-run-mode" activated? + if ((getExtensionDryRun() === false) && (!isExtensionOnRemovalList())) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".getCurrentExtensionName()); + // Init SQLs and transfer ext->generic + initSqls(); + setSqlsArray(getExtensionSqls()); + + // Run installation pre-installation filters + runFilterChain('pre_extension_installed', array('dry_run' => getExtensionDryRun())); + + // Register extension + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "insert=".getCurrentExtensionName().'/'.getCurrentExtensionVersion()." - INSERT!"); + if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) { + // New way, with CSS + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_extensions` (`ext_name`, `ext_active`, `ext_version`,`ext_has_css`) VALUES ('%s','%s','%s','%s')", + array(getCurrentExtensionName(), getExtensionAlwaysActive(), getCurrentExtensionVersion(), getExtensionHasCss()), __FUNCTION__, __LINE__); + } else { + // Old way, no CSS + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_extensions` (`ext_name`, `ext_active`, `ext_version`) VALUES ('%s','%s','%s')", + array(getCurrentExtensionName(), getExtensionAlwaysActive(), getCurrentExtensionVersion()), __FUNCTION__, __LINE__); + } + + // Remove cache file(s) if extension is active + runFilterChain('post_extension_installed', array( + 'pool' => 'extension', + 'ext_name' => getCurrentExtensionName(), + 'task_id' => $task_id + )); + + // Remove all SQL commands + unsetSqls(); + + // In normal mode return a true on success + $ret = true; + } elseif (getExtensionDryRun() === true) { + // In "dry-run" mode return array with all SQL commands + $ret = getExtensionSqls(); + + // Remove all SQL commands + unsetSqls(); + } else { + // Extension has been removed for updates, so all is fine! + $ret = true; + } + } else { + // No, an error occurs while registering extension :-( + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "".getCurrentExtensionName()); + $ret = false; + } + } elseif (($task_id > 0) && (getCurrentExtensionName() != '')) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().""); + // 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", + array(bigintval($task_id)), __FUNCTION__, __LINE__); + } + + // Is this the sql_patches? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ':'.getCurrentExtensionName()."/".getExtensionMode().""); + if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!getExtensionDryRun()) && ($test)) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": LOAD!"); + if ($logout === true) { + // Then redirect to logout + redirectToUrl('modules.php?module=admin&logout=1&' . getExtensionMode() . '=sql_patches'); + } else { + // Add temporary filter + registerFilter('shutdown', 'REDIRECT_TO_LOGOUT_SQL_PATCHES', true, true); + $GLOBALS['ext_load_mode'] = getExtensionMode(); + } + } // END - if + + // Return status code + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()." - LEFT!"); + //* DEBUG: */ print getCurrentExtensionName().':<pre>'.print_r($ret, true).'</pre>'; + return $ret; +} + +// Run SQL queries for given extension id +// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) +function doExtensionSqls ($ext_id, $load_mode) { + // This shall never do a non-admin user! + if (!isAdmin()) return false; + + // Get extension's name + $ext_name = getExtensionName($ext_id); + + // Set current SQL name + setCurrentExtensionName($ext_name); + + // Init EXT_UPDATE_DEPENDS + initExtensionUpdateDependencies(); + + // Init array + initExtensionSqls(); + + // By default no SQL has been executed + $sqlRan = false; + + // Load extension in detected mode + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]=".getCurrentExtensionName().""); + loadExtension(getCurrentExtensionName(), $load_mode, '', false); + + // Init these SQLs + initSqls(); + setSqlsArray(getExtensionSqls()); + + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ":SQLs::count=".countSqls().""); + if (isSqlsValid()) { + // Run SQL commands... + runFilterChain('run_sqls'); + } // END - if + + // Run any filters depending on the action here + runFilterChain('extension_' . $load_mode); + + // Remove cache file(s) if extension is active + if (((isExtensionActive('cache')) && ((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate'))) { + // Run filters + runFilterChain('post_extension_run_sql', getCurrentExtensionName()); + } // END - if + + // Is this the sql_patches? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": id=".$ext_id.",currName=".getCurrentExtensionName().",loadMode=".$load_mode); + if ((getCurrentExtensionName() == 'sql_patches') && (($load_mode == 'register') || ($load_mode == 'remove'))) { + // Then redirect to logout + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": LOAD!"); + redirectToUrl('modules.php?module=admin&logout=1&' . $load_mode . '=sql_patches'); + } // END - if +} + +// Check wether the given extension is installed +function isExtensionInstalled ($ext_name) { + // We don't like empty extension names here + if (empty($ext_name)) { + // Please fix them all + debug_report_bug(__FUNCTION__.': ext_name is empty.'); + } // END - if + + // By default non is installed + $isInstalled = false; + + // Check if there is a cache entry + if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) { + // Found! + $isInstalled = true; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } elseif ((isInstallationPhase())) { + // Extensions are all inactive/not installed during installation + } else { + // Look in database + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1", + array($ext_name), __FILE__, __LINE__); + + // Do we have a record? + $isInstalled = (SQL_NUMROWS($result) == 1); + + // Is it installed, then cache the entry + if ($isInstalled === true) { + // Dummy call + getExtensionId($ext_name, true); + } // END - if + + // Free result + SQL_FREERESULT($result); + } + + // Return status + return $isInstalled; +} + +// Check if given extension is active +function isExtensionActive ($ext_name) { + // Extensions are all inactive during installation + if ((isInstallationPhase()) || (empty($ext_name))) return false; + + // Not active is the default + $active = 'N'; + + // Check cache + if (isset($GLOBALS['cache_array']['extension']['ext_active'][$ext_name])) { + // Load from cache + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "CACHE! ext_name={$ext_name}"); + $active = $GLOBALS['cache_array']['extension']['ext_active'][$ext_name]; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } elseif (isset($GLOBALS['ext_loaded'][$ext_name])) { + // @TODO Extension is loaded, what next? + app_die(__FUNCTION__, __LINE__, "LOADED:$ext_name"); + } elseif (($ext_name == 'cache') || (!isExtensionInstalled('cache'))) { + //* DEBUG: */ logDebugMessage(__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", + array($ext_name), __FUNCTION__, __LINE__); + + // Entry found? + if (SQL_NUMROWS($result) == 1) { + // Load entry + list($active) = SQL_FETCHROW($result); + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Write cache array + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name."[DB]: {$active}"); + $GLOBALS['cache_array']['extension']['ext_active'][$ext_name] = $active; + } else { + // Extension not active! + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name.": Not active!"); + $GLOBALS['cache_array']['extension']['ext_active'][$ext_name] = 'N'; + } + + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name={$ext_name},active={$active}"); + + // Is this extension activated? (For admins we always have active extensions...) + return ($active == 'Y'); +} + +// Get version from extensions +function getExtensionVersion ($ext_name) { + // By default no extension is found + $ext_ver = 'invalid'; + + // Empty extension name should be fixed! + if (empty($ext_name)) { + // Please report this bug! + debug_report_bug(__FUNCTION__ . ': ext_name is empty which is not allowed here.'); + } // END - if + + // Extensions are all inactive during installation + if (isInstallationPhase()) return ''; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ext_name={$ext_name}"); + + // Is the cache written? + if (isset($GLOBALS['cache_array']['extension']['ext_version'][$ext_name])) { + // Load data from cache + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": CACHE!"); + $ext_ver = $GLOBALS['cache_array']['extension']['ext_version'][$ext_name]; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } elseif ((!isCacheInstanceValid()) || (isset($GLOBALS['cache_array']['extension'])) || (getOutputMode() != '0')) { + // Load from database + $result = SQL_QUERY_ESC("SELECT `ext_version` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1", + array($ext_name), __FUNCTION__, __LINE__); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": DB - ".SQL_NUMROWS($result).""); + + // Is the extension there? + if (SQL_NUMROWS($result) == 1) { + // Load entry + list($ext_ver) = SQL_FETCHROW($result); + } elseif (isDebugModeEnabled()) { + // Not found! + logDebugMessage(__FUNCTION__, __LINE__, sprintf(": Cannot find extension %s in database!", $ext_name)); + } + + // Free result + SQL_FREERESULT($result); + + // Set cache + $GLOBALS['cache_array']['extension']['ext_version'][$ext_name] = $ext_ver; + } + + // Extension version should not be invalid + if ($ext_ver == 'invalid') { + // Please report this trouble + debug_report_bug(sprintf("Extension <strong>%s</strong> has empty version!", $ext_name)); + } // END - if + + // Return result + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ret={$ext_ver}"); + return $ext_ver; +} + +// Updates a given extension with current extension version to latest version +function updateExtension ($ext_name, $ext_ver, $dry_run = false) { + // Only admins are allowed to update extensions + if ((!isAdmin()) || (empty($ext_name))) return false; + + // Set current SQL name + setCurrentExtensionName($ext_name); + + // Init arrays + initExtensionSqls(); + initExtensionNotes(); + initIncludePool('extension'); + + // Load extension in test mode + loadExtension($ext_name, 'test', $ext_ver, getExtensionDryRun()); + + // Save version history + $history = getExtensionVersionHistory(); + + // Remove old SQLs array to prevent possible bugs + initExtensionSqls(); + + // Check if version is updated + //* DEBUG: */ print getCurrentExtensionName().'/'.$ext_name.':'.getThisExtensionVersion().'/'.$ext_ver.'/'.intval(is_array($history)).'<br />'; + if (((getThisExtensionVersion() != $ext_ver) || (getExtensionDryRun())) && (is_array($history))) { + // Search for starting point + $start = array_search($ext_ver, $history); + + // And load SQL queries in order of version history + for ($idx = ($start + 1); $idx < count($history); $idx++) { + // Set extension version + $GLOBALS['update_ver'][getCurrentExtensionName()] = $history[$idx]; + + // Load again... + loadExtension(getCurrentExtensionName(), 'update', $GLOBALS['update_ver'][getCurrentExtensionName()], getExtensionDryRun()); + + // Get all depencies + $depencies = getExtensionUpdateDependencies(); + + // Nothing to apply? + if (count($depencies) > 0) { + // Apply all extension depencies + foreach ($depencies as $ext_depend) { + // Set it as current + setCurrentExtensionName($ext_depend); + + // Is the extension there? + if (isExtensionInstalled()) { + // Update another extension first! + $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun()); + } else { + // Register new extension + $test = registerExtension($ext_depend, 0, getExtensionDryRun(), false); + } + } // END - foreach + + // Set name back + setCurrentExtensionName($ext_name); + } // END - if + + // Add notes + addExtensionNotes($history[$idx]); + } // END - for + + // In real-mode execute any existing includes + if (getExtensionDryRun() === false) { + $GLOBALS['ext_inc_pool'][getCurrentExtensionName()] = getIncludePool('extension'); + runFilterChain('load_includes', 'extension'); + setIncludePool('extension', $GLOBALS['ext_inc_pool'][getCurrentExtensionName()]); + unset($GLOBALS['ext_inc_pool'][getCurrentExtensionName()]); + } // END - if + + // Init these SQLs + initSqls(); + setSqlsArray(getExtensionSqls()); + + // Run SQLs + runFilterChain('run_sqls', array('dry_run' => getExtensionDryRun())); + + if (getExtensionDryRun() === false) { + // Run filters on success extension update + runFilterChain('extension_update', getCurrentExtensionName()); + } // END - if + } // END - if +} + +// Output verbose SQL table for extension +function addExtensionVerboseSqlTable ($title = '', $dashed = '', $switch = false, $width = '100%') { + // Empty title? + if (empty($title)) { + // Then fix it to default + $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REMOVAL'); + } // END - if + + // Init variables + $OUT = ''; + + // Do we have queries? + if ((getExtensionVersion('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { + // Init switch color + $SW = 2; + + // Get all SQLs + foreach (getExtensionSqls() as $idx => $sqls) { + // New array format is recursive + foreach ($sqls as $sql) { + // Trim out spaces + $sql = trim($sql); + + // Output command if set + if (!empty($sql)) { + // Prepare output for template + $content = array( + 'sw' => $SW, + 'i' => ($idx+1), + 'sql' => $sql + ); + + // Load row template + $OUT .= loadTemplate('admin_ext_sql_row', true, $content); + + // Switch color + $SW = 3 - $SW; + } // END - if + } // END - foreach + } // END - foreach + + // Prepare content for template + $content = array( + 'width' => $width, + 'dashed' => $dashed, + 'title' => $title, + 'rows' => $OUT + ); + + // Load main template + $OUT = loadTemplate('admin_ext_sql_table', true, $content); + } elseif ((getExtensionVersion('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { + // No addional SQL commands to run + $OUT = loadTemplate('admin_settings_saved', true, getMessage('ADMIN_NO_ADDITIONAL_SQLS')); + } // END - if + + // Return output + return $OUT; +} + +// Get extension name from id +function getExtensionName ($ext_id) { + // Init extension name + $ret = ''; + + // Is cache there? + if (isset($GLOBALS['cache_array']['extension']['ext_name'][$ext_id])) { + // Load from cache + $ret = $GLOBALS['cache_array']['extension']['ext_name'][$ext_id]; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { + // Load from database + $result = SQL_QUERY_ESC("SELECT `ext_name` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1", + array(bigintval($ext_id)), __FUNCTION__, __LINE__); + + // Is the entry there? + if (SQL_NUMROWS($result) == 1) { + // Get the extension's name from database + list($ret) = SQL_FETCHROW($result); + } // END - if + + // Free result + SQL_FREERESULT($result); + } + + // Did we find some extension? + if (empty($ret)) { + // We should fix these all! + debug_report_bug(__FUNCTION__ . ': ext_name is empty. ext_id=' . $ext_id); + } // END - if + + // Return the extension name + return $ret; +} + +// Get extension id from name +function getExtensionId ($ext_name, $forceDb = false) { + // Init ID number + $ret = 0; + + if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) { + // Load from cache + $ret = $GLOBALS['cache_array']['extension']['ext_id'][$ext_name]; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } elseif (($forceDb === true) || (!isExtensionActive('cache'))) { + // Load from database + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1", + array($ext_name), __FUNCTION__, __LINE__); + + // Is the entry there? + if (SQL_NUMROWS($result) == 1) { + // Get the extension's id from database + list($ret) = SQL_FETCHROW($result); + + // Cache it + $GLOBALS['cache_array']['extension']['ext_id'][$ext_name] = $ret; + } // END - if + + // Free result + SQL_FREERESULT($result); + } + + if ($ret == 0) { + // We should fix these all! + debug_report_bug(__FUNCTION__ . ': Invalid extension name found. ext_name=' . $ext_name); + } // END - if + + // Return value + return $ret; +} + +// Determines wether the given extension name is valid +function isExtensionNameValid ($ext_name) { + // Do we have cache? + if (!isset($GLOBALS['ext_name_valid'][$ext_name])) { + // Generate include file name + $INC = sprintf("inc/extensions/ext-%s.php", $ext_name); + + // Is there a file in inc/extensions/ ? + $GLOBALS['ext_name_valid'][$ext_name] = isIncludeReadable($INC); + } // END - if + + // Return result + return $GLOBALS['ext_name_valid'][$ext_name]; +} + +// Determines wether the given extension id is valid +function isExtensionIdValid ($ext_id) { + // Default is nothing valid + $isValid = false; + + // Check in cache then in database + if (isset($GLOBALS['cache_array']['extension']['ext_name'][$ext_id])) { + // Valid! + $isValid = true; + + // Count cache hits + incrementStatsEntry('cache_hits'); + } else { + // Query database + $isValid = (countSumTotalData($ext_id, 'extensions', 'id', 'id', true) == 1); + } + + // Return result + return $isValid; +} + +// Activate given extension +function doActivateExtension ($ext_name) { + // Activate the extension + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='Y' WHERE `ext_name`='%s' LIMIT 1", + array($ext_name), __FUNCTION__, __LINE__); + + // Extension has been activated? + if (SQL_AFFECTEDROWS() == 1) { + // Then run all queries + doExtensionSqls(getExtensionId($ext_name), 'activate'); + } // END - if +} + +// Deactivate given extension +function doDeactivateExtension($ext_name) { + // Activate the extension + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='N' WHERE `ext_name`='%s' LIMIT 1", + array($ext_name), __FUNCTION__, __LINE__); + + // Extension has been activated? + if (SQL_AFFECTEDROWS() == 1) { + // Then run all queries + doExtensionSqls(getExtensionId($ext_name), 'deactivate'); + + // Create new task + createExtensionDeactivationTask($ext_name); + + // Notify the admin + sendAdminNotification( + getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'), + 'admin_ext_deactivated', + array('ext_name' => $ext_name) + ); + } // END - if +} + +// Checks wether the extension is older than given +function isExtensionOlder ($ext_name, $ext_ver) { + // Get current extension version + $currVersion = getExtensionVersion($ext_name); + + // Remove all dots from both versions + $currVersion = str_replace('.', '', $currVersion); + $ext_ver = str_replace('.', '', $ext_ver); + + // Now compare both and return the result + return ($currVersion < $ext_ver); +} + +// Creates a new task for updated extension +function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) { + // Create subject line + $subject = '[UPDATE-' . $ext_name . '-' . $ext_ver . ':] {--ADMIN_UPDATE_EXT_SUBJ--}'; + + // Is the extension there? + if (isExtensionInstalled($ext_name)) { + // Check if task is not there + if (determineTaskIdBySubject($subject) == 0) { + // Create extension update-task + createNewTask($subject, $notes, 'EXTENSION_UPDATE', 0, $adminId); + } // END - if + } else { + // Extension not there! :-( + debug_report_bug(sprintf("Extension <strong>%s</strong> not found but should be updated?", $ext_name)); + } +} + +// Creates a new task for newly installed extension +function createNewExtensionTask ($adminId, $subject, $ext) { + // Not installed and do we have created a task for the admin? + if ((determineTaskIdBySubject($subject) == 0) && (!isExtensionInstalled($ext))) { + // Set default message if ext-foo is missing + $message = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext); + + // Template file + $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl", + getConfig('PATH'), + getLanguage(), + $ext + ); + + // Load text for task if found + if (isFileReadable($tpl)) { + // Load extension's own text template (HTML!) + $message = loadTemplate('ext_' . $ext, true); + } else { + // Write this in debug.log as well + logDebugMessage(__FUNCTION__, __LINE__, $message); + } + + // Task not created so it's a brand-new extension which we need to register and create a task for! + createNewTask($subject, $message, 'EXTENSION', 0, $adminId, false); + } // END - if +} + +// Creates a task for automatically deactivated (deprecated) extension +function createExtensionDeactivationTask ($ext) { + // Create subject line + $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED')); + + // Not installed and do we have created a task for the admin? + if ((determineTaskIdBySubject($subject) == 0) && (getExtensionVersion($ext) != '')) { + // Task not created so add it + createNewTask($subject, SQL_ESCAPE(loadTemplate('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION'); + } // END - if +} + +// Checks if the module has a menu +function ifModuleHasMenu ($mod, $forceDb = false) { + // All is false by default + $ret = false; + + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "mod={$mod},cache=".getExtensionVersion('cache')); + if (isExtensionInstalledAndNewer('cache', '0.1.2')) { + // Cache version is okay, so let's check the cache! + if (isset($GLOBALS['cache_array']['modules']['has_menu'][$mod])) { + // Check module cache and count hit + $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == 'Y'); + incrementStatsEntry('cache_hits'); + } elseif (isset($GLOBALS['cache_array']['extension']['ext_menu'][$mod])) { + // Check cache and count hit + $ret = ($GLOBALS['cache_array']['extension']['ext_menu'][$mod] == 'Y'); + incrementStatsEntry('cache_hits'); + } elseif ($mod == 'admin') { + // Admin module has always a menu! + $ret = true; + } + } elseif ((isExtensionInstalled('sql_patches')) && (getExtensionVersion('sql_patches') >= '0.3.6') && ((!isExtensionActive('cache')) || ($forceDb === true))) { + // Check database for entry + $result = SQL_QUERY_ESC("SELECT `has_menu` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", + array($mod), __FUNCTION__, __LINE__); + + // Entry found? + if (SQL_NUMROWS($result) == 1) { + // Load "has_menu" column + list($has_menu) = SQL_FETCHROW($result); + + // Fake cache... ;-) + $GLOBALS['cache_array']['extension']['ext_menu'][$mod] = $has_menu; + + // Does it have a menu? + $ret = ($has_menu == 'Y'); + } // END - if + + // Free memory + SQL_FREERESULT($result); + } elseif (!isExtensionInstalled('sql_patches')) { + // No sql_patches installed, so maybe in admin area or no admin registered? + $ret = (((isAdmin()) || (!isAdminRegistered())) && ($mod == 'admin')); // Then there is a menu! + } + + // Return status + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().intval($ret)); + return $ret; +} + +// Determines the task id for given extension +function determineExtensionTaskId ($ext_name) { + // Default is not found + $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", + array($ext_name), __FUNCTION__, __LINE__); + + // Entry found? + if (SQL_NUMROWS($result) == 1) { + // Task found so load task's ID and register extension... + list($task_id) = SQL_FETCHROW($result); + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Return it + return $task_id; +} + +// Determines the task id for given subject +function determineTaskIdBySubject ($subject) { + // Default is not found + $task_id = 0; + + // Search for task id + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1", + array($subject), __FUNCTION__, __LINE__); + + // Entry found? + if (SQL_NUMROWS($result) == 1) { + // Task found so load task's ID and register extension... + list($task_id) = SQL_FETCHROW($result); + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Return it + return $task_id; +} + +// Add updates notes for given version +function addExtensionNotes ($ver) { + // Init notes/content + $out = ''; $content = array(); + + // Is do we have verbose output enabled? + if ((getConfig('verbose_sql') == 'Y') || (!isExtensionActive('sql_patches'))) { + // Update notes found? + if (getExtensionUpdateNotes($ver) != '') { + // Update notes found + $content = array( + 'ver' => $ver, + 'notes' => getExtensionUpdateNotes($ver) + ); + + // Reset them + setExtensionUpdateNotes('', $ver); + } elseif (($ver == '0.0') || ($ver == '0.0.0')) { + // Initial release + $content = array( + 'ver' => $ver, + 'notes' => getMessage('INITIAL_RELEASE') + ); + } else { + // No update notes found! + $content = array( + 'ver' => $ver, + 'notes' => getMessage('NO_UPDATE_NOTES') + ); + } + + // Load template + $out = loadTemplate('admin_ext_notes', true, $content); + } // END - if + + // Add the notes + appendExtensionNotes($out); +} + +// Getter for CSS files array +function getExtensionCssFiles () { + // By default no additional CSS files are found + $cssFiles = array(); + + // Is the array there? + if (isset($GLOBALS['css_files'])) { + // Then use it + $cssFiles = $GLOBALS['css_files']; + } // END - if + + // Return array + return $cssFiles; +} + +// Init CSS files array +function initExtensionCssFiles () { + // Simply init it + $GLOBALS['css_files'] = array(); +} + +// Add new entry +function addExtensionCssFile ($file) { + // Is the array there? + if (!isset($GLOBALS['css_files'])) { + // Then auto-init them + initExtensionCssFiles(); + } // END - if + + // Add the entry + $GLOBALS['css_files'][] = $file; +} + +// Setter for EXT_ALWAYS_ACTIVE flag +function setExtensionAlwaysActive ($active) { + $GLOBALS['ext_always_active'][getCurrentExtensionName()] = (string) $active; +} + +// Getter for EXT_ALWAYS_ACTIVE flag +function getExtensionAlwaysActive () { + return $GLOBALS['ext_always_active'][getCurrentExtensionName()]; +} + +// Setter for EXT_VERSION flag +function setThisExtensionVersion ($version) { + $GLOBALS['ext_version'][getCurrentExtensionName()] = (string) $version; +} + +// Getter for EXT_VERSION flag +function getThisExtensionVersion () { + return $GLOBALS['ext_version'][getCurrentExtensionName()]; +} + +// Setter for EXT_DEPRECATED flag +function setExtensionDeprecated ($deprecated) { + $GLOBALS['ext_deprecated'][getCurrentExtensionName()] = (string) $deprecated; +} + +// Getter for EXT_DEPRECATED flag +function isExtensionDeprecated () { + return ($GLOBALS['ext_deprecated'][getCurrentExtensionName()] == 'Y'); +} + +// Setter for EXT_UPDATE_DEPENDS flag +function addExtensionUpdateDependency ($updateDepends) { + // Is the update depency empty? (NEED TO BE FIXED!) + if (empty($updateDepends)) { + // Please report this bug! + debug_report_bug("updateDepends is left empty!"); + } // END - if + + // Is it not yet added? + if (!in_array($updateDepends, $GLOBALS['ext_running_updates'])) { + //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().'/'.$updateDepends); + // Add it to the list of extension update depencies map + $GLOBALS['ext_update_depends'][getCurrentExtensionName()][] = (string) $updateDepends; + + // Remember it in the list of running updates + $GLOBALS['ext_running_updates'][] = $updateDepends; + } // END - if +} + +// Checks wether the given extension registration is in progress +function isExtensionRegisterRunning ($ext_name) { + return ((isset($GLOBALS['ext_register_running'])) && (in_array($ext_name, $GLOBALS['ext_register_running']))); +} + +// Init EXT_UPDATE_DEPENDS flag +function initExtensionUpdateDependencies () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + + // Init update depency map automatically if not found + if (!isExtensionUpdateDependenciesInitialized()) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()." - INIT!"); + $GLOBALS['ext_update_depends'][getCurrentExtensionName()] = array(); + } // END - if + + // Init running updates array + initExtensionRuningUpdates(); +} + +// Adds an extension as "registration in progress" +function addExtensionRunningRegistration ($ext_name) { + // Is it running? + if (!isExtensionRegisterRunning($ext_name)) { + // Then add it! + $GLOBALS['ext_register_running'][] = $ext_name; + } // END - if +} + +// Checks wether EXT_UPDATE_DEPENDS is initialized +function isExtensionUpdateDependenciesInitialized () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + return (isset($GLOBALS['ext_update_depends'][getCurrentExtensionName()])); +} + +// Initializes the list of running updates +function initExtensionRuningUpdates () { + // Auto-init ext_running_updates + if (!isset($GLOBALS['ext_running_updates'])) { + $GLOBALS['ext_running_updates'] = array(); + $GLOBALS['ext_register_running'] = array(); + } // END - if +} + +// Getter for EXT_UPDATE_DEPENDS flag +function getExtensionUpdateDependencies () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + return $GLOBALS['ext_update_depends'][getCurrentExtensionName()]; +} + +// Getter for next iterator depency +function getExtensionUpdateDependenciesIterator () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + return ($GLOBALS['ext_update_depends'][getCurrentExtensionName()][getExtensionUpdateIterator()]); +} + +// Counter for extension update depencies +function countExtensionUpdateDependencies () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + return count($GLOBALS['ext_update_depends'][getCurrentExtensionName()]); +} + +// Removes given extension from update denpency list +function removeExtensionUpdateDependency ($ext_name) { + // Look it up + $key = array_search($ext_name, getExtensionUpdateDependencies()); + + // Is it valid? + if ($key !== false) { + // Then remove it + unset($GLOBALS['ext_update_depends'][getCurrentExtensionName()][$key]); + + // And sort the array + ksort($GLOBALS['ext_update_depends'][getCurrentExtensionName()]); + } // END - if +} + +// Init iterator for update depencies +function initExtensionUpdateIterator () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = 0; +} + +// Getter for depency iterator +function getExtensionUpdateIterator () { + // Auto-init iterator + if (!isset($GLOBALS['ext_depend_iterator'][getCurrentExtensionName()])) initExtensionUpdateIterator(); + + // Return it + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().'/'.$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]); + return $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]; +} + +// Increments the update iterator +function incrementExtensionUpdateIterator () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName()); + $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]++; +} + +// Setter for EXT_REPORTS_FAILURE flag +function setExtensionReportsFailure ($reportsFailure) { + $GLOBALS['ext_reports_failure'] = (bool) $reportsFailure; +} + +// Getter for EXT_REPORTS_FAILURE flag +function getExtensionReportsFailure () { + return $GLOBALS['ext_reports_failure']; +} + +// Setter for EXT_VER_HISTORY flag +function setExtensionVersionHistory ($verHistory) { + $GLOBALS['ext_ver_history'][getCurrentExtensionName()] = (array) $verHistory; +} + +// Getter for EXT_VER_HISTORY array +function getExtensionVersionHistory () { + return $GLOBALS['ext_ver_history'][getCurrentExtensionName()]; +} + +// Setter for EXT_UPDATE_NOTES +function setExtensionUpdateNotes ($updateNotes, $ver='') { + //* DEBUG: */ print __FUNCTION__.':'.getCurrentExtensionName().'/'.getCurrentExtensionVersion().'/'.$ver.'='.$updateNotes.'<br />'; + if (empty($ver)) { + $GLOBALS['ext_update_notes'][getCurrentExtensionName()][getCurrentExtensionVersion()] = (string) $updateNotes; + } else { + $GLOBALS['ext_update_notes'][getCurrentExtensionName()][$ver] = (string) $updateNotes; + } +} + +// Getter for EXT_UPDATE_NOTES +function getExtensionUpdateNotes ($ver) { + return $GLOBALS['ext_update_notes'][getCurrentExtensionName()][$ver]; +} + +// Init extension notice +function initExtensionNotes () { + $GLOBALS['ext_notes'][getCurrentExtensionName()] = ''; +} + +// Append extension notice +function appendExtensionNotes ($notes) { + $GLOBALS['ext_notes'][getCurrentExtensionName()] .= (string) trim($notes); +} + +// Getter for extension notes +function getExtensionNotes () { + return $GLOBALS['ext_notes'][getCurrentExtensionName()]; +} + +// Setter for current extension name +function setCurrentExtensionName ($ext_name) { + $GLOBALS['curr_ext_name'] = (string) trim($ext_name); +} + +// Getter for current extension name +function getCurrentExtensionName () { + if (isset($GLOBALS['curr_ext_name'])) { + return $GLOBALS['curr_ext_name']; + } // END - if + + // Not set! + debug_report_bug(__FUNCTION__.": curr_ext_name not initialized. Please execute initExtensionSqls() before calling this function."); +} + +// Init SQLs array for current extension +function initExtensionSqls () { + // Auto-init the array now... + if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { + $GLOBALS['ext_sqls'][getCurrentExtensionName()] = array(); + } // END - if +} + +// Adds SQLs to the SQLs array but "assigns" it with current extension name +function addExtensionSql ($sql) { + // Add it + $GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()][] = $sql; +} + +// Getter for SQLs array for current extension +function getExtensionSqls () { + // Output debug backtrace if not found (SHOULD NOT HAPPEN!) + if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { + // Not found, should not happen + debug_report_bug(sprintf("ext_sqls is empty, current extension: %s", + getCurrentExtensionName() + )); + } // END - if + + // Return the array + return $GLOBALS['ext_sqls'][getCurrentExtensionName()]; +} + +// Removes SQLs for current extension +function unsetExtensionSqls () { + unset($GLOBALS['ext_sqls'][getCurrentExtensionName()]); +} + +// Auto-initializes the removal list +function initExtensionRemovalList () { + // Is the remove list there? + if (!isset($GLOBALS['ext_update_remove'])) { + // Then create it + $GLOBALS['ext_update_remove'] = array(); + } // END - if +} + +// Checks wether the current extension is on the removal list +function isExtensionOnRemovalList () { + // Init removal list + initExtensionRemovalList(); + + // Is it there? + return (in_array(getCurrentExtensionName(), $GLOBALS['ext_update_remove'])); +} + +// Adds the current extension to the removal list +function addCurrentExtensionToRemovalList () { + // Simply add it + $GLOBALS['ext_update_remove'][] = getCurrentExtensionName(); +} + +// Getter for removal list +function getExtensionRemovalList () { + // Return the removal list + return $GLOBALS['ext_update_remove']; +} + +// Redirects if the provided extension is not installed +function redirectOnUninstalledExtension ($ext_name) { + // So is the extension there? + if ((!isExtensionInstalled($ext_name)) || (!isExtensionActive($ext_name))) { + // Redirect to index + redirectToUrl('modules.php?module=index&code=' . getCode('EXTENSION_PROBLEM') . '&ext=' . $ext_name); + } // END - if +} + +// Filter for initialization of all extensions by loading them in 'init' mode +function FILTER_INIT_EXTENSIONS () { + // Do we have some entries? + //* DEBUG */ print __FUNCTION__.': ENTRY!<br />'; + if (isset($GLOBALS['cache_array']['extension']['ext_name'])) { + //* DEBUG */ print __FUNCTION__.': CACHE - START!<br />'; + // Load all found extensions if found + foreach ($GLOBALS['cache_array']['extension']['ext_name'] as $key=>$ext_name) { + // Load it + //* DEBUG */ print __FUNCTION__.': '.$ext_name.' - START<br />'; + loadExtension($ext_name, 'init'); + //* DEBUG */ print __FUNCTION__.': '.$ext_name.' - END<br />'; + } // END - foreach + //* DEBUG */ print __FUNCTION__.': CACHE - END!<br />'; + } // END - if + //* DEBUG */ print __FUNCTION__.': EXIT!<br />'; +} + +// Setter for extension mode +function setExtensionMode ($ext_mode) { + $GLOBALS['ext_mode'] = (string) $ext_mode; +} + +// Getter for extension mode +function getExtensionMode () { + return $GLOBALS['ext_mode']; +} + +// Setter for dry-run +function enableExtensionDryRun ($dry_run = true) { + //* DEBUG: */ print __FUNCTION__.': '.getCurrentExtensionName().'='.intval($dry_run).'<br />'; + $GLOBALS['ext_dry_run'] = (bool) $dry_run; +} + +// Getter for dry-run +function getExtensionDryRun () { + return $GLOBALS['ext_dry_run']; +} + +// Setter for current extension version +function setCurrentExtensionVersion ($ext_ver) { + if (empty($ext_ver)) { + // 0.0 is okay here + $GLOBALS['ext_current_version'] = '0.0'; + } else { + // Add version + $GLOBALS['ext_current_version'] = (string) $ext_ver; + } +} + +// Getter for current extension version +function getCurrentExtensionVersion () { + return $GLOBALS['ext_current_version']; +} + +// Remove the extension from global cache array +function removeExtensionFromArray () { + // "Cache" this name + $ext_name = getCurrentExtensionName(); + + // Now loop through the whole cache + foreach ($GLOBALS['cache_array']['extension'] as $cacheName=>$cacheArray) { + // Is it an element? + if (isset($cacheArray[$ext_name])) { + // Array element + unset($cacheArray[$ext_name]); + $GLOBALS['cache_array']['extension'][$cacheName] = $cacheArray; + } else { + // Maybe in array? + $key = array_search($ext_name, $cacheArray); + + // Is it there? + if ($key !== false) { + // Found, so remove it + unset($cacheArray[$key]); + $GLOBALS['cache_array']['extension'][$cacheName] = $cacheArray; + } // END - if + } + } // END - foreach +} + +// "Getter" for 'extension has a CSS file' (with same name, of course) +function getExtensionHasCss () { + // Default is no CSS + $hasCss = 'N'; + + // Construct FQFN for check + $FQFN = sprintf("%stheme/%s/css/%s.css", + getConfig('PATH'), + getCurrentTheme(), + getCurrentExtensionName() + ); + + // Is it there? + if (isFileReadable($FQFN)) { + // Readable, so it is there... + $hasCss = 'Y'; + } // END - if + + // Return it + return $hasCss; +} + +// Checks wether the given extension has a language file +function ifExtensionHasLanguageFile ($ext_name) { + // Default is no language file + $hasLanguage = false; + + // Do we have cache? + if (isset($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name])) { + // Then use it + $hasLanguage = ($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name] == 'Y'); + + // Count cache hits + incrementStatsEntry('cache_hits'); + } else { + // Not readable is default + $readable = 'N'; + + // Is the language file readable for this extension? + if (isLanguageIncludeReadable($ext_name)) { + // Readable + $readable = 'Y'; + } // END - if + + // Put it in cache + $GLOBALS['cache_array']['extension']['ext_lang'][$ext_name] = 'Y'; + } + + // Return result + return ($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name] == 'Y'); +} + +// Load an extension's include file +function loadExtensionInclude () { + // Is it readable? + if (!isExtensionIncludeReadable()) { + // Not readable + debug_report_bug('Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.'); + } // END - if + + // Generate INC name + $INC = sprintf("inc/extensions/ext-%s.php", getCurrentExtensionName()); + + // Load it + loadInclude($INC); +} + +// Checks wether an extension is readable +function isExtensionIncludeReadable ($ext_name = '') { + // If empty, use current + if (empty($ext_name)) $ext_name = getCurrentExtensionName(); + + // Array found? + if (!isset($GLOBALS['ext_inc_readable'][$ext_name])) { + // Generate INC name + $INC = sprintf("inc/extensions/ext-%s.php", getCurrentExtensionName()); + + // Is it readable? + $GLOBALS['ext_inc_readable'][$ext_name] = isIncludeReadable($INC); + } // END - if + + // Return result + //* DEBUG: */ print __FUNCTION__.': '.$ext_name.'='.intval($GLOBALS['ext_inc_readable'][$ext_name]).'<br />'; + return $GLOBALS['ext_inc_readable'][$ext_name]; +} + +// Checks if an extension's function file is readable +function isExtensionFunctionFileReadable ($ext_name) { + if (isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) { + // Just count cache hits + incrementStatsEntry('cache_hits'); + } else { + // Construct FQFN for functions file + $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name); + + // Is this include there? + if ((isFileReadable($funcsInclude)) && (!isset($GLOBALS['ext_loaded']['funcs'][$ext_name])) && (getExtensionMode() == 'test')) { + // Cache it! + $GLOBALS['cache_array']['extension']['ext_func'][$ext_name] = 'Y'; + } else { + // Cache it! + $GLOBALS['cache_array']['extension']['ext_func'][$ext_name] = 'N'; + } + } + + // Return result + return ($GLOBALS['cache_array']['extension']['ext_func'][$ext_name] == 'Y'); +} + +// [EOF] +?> diff --git a/inc/extensions.php b/inc/extensions.php index 149750d9d9..f551ef47b7 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -1,1276 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 03/25/2004 * - * =============== Last change: 09/29/2004 * - * * - * -------------------------------------------------------------------- * - * File : extensions.php * - * -------------------------------------------------------------------- * - * Short description : Extension management * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Erweiterungen-Management * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Load the extension and maybe found language and function files. -function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run = false) { - // Set current extension name - EXT_SET_CURR_NAME($ext_name); - - // Init array - INIT_INC_POOL(); - - // Init EXT_UPDATE_DEPENDS - EXT_INIT_UPDATE_DEPENDS(); - - // Init current extension name list - INIT_EXT_SQLS(); - - // Is the extension already loaded? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Loading extension {$ext_name}, mode={$EXT_LOAD_MODE}, ver={$EXT_VER}."); - if ((isset($GLOBALS['ext_loaded']['ext'][$ext_name])) && (empty($EXT_LOAD_MODE))) { - // Debug message - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name)); - - // Abort here - return false; - } // END - if - - // Construct include filename and FQFN for extension file - $INC = sprintf("inc/extensions/ext-%s.php", $ext_name); - $FQFN = getConfig('PATH') . $INC; - - // Is the extension file NOT there? - if (!isIncludeReadable($INC)) { - // Debug message - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable.", $ext_name)); - - // Abort here - return false; - } // END - if - - // Load extension's own language file - loadLanguageFile($ext_name); - - // Construct FQFN for functions file - $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name); - - // Is this include there? - if ((isFileReadable($funcsInclude)) && (!isset($GLOBALS['ext_loaded']['funcs'][$ext_name]))) { - // Then load it - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Functions loaded."); - $GLOBALS['ext_loaded']['funcs'][$ext_name] = true; - loadIncludeOnce($funcsInclude); - } elseif ((isDebugModeEnabled()) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) { - // No functions file is not so good... - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it.", - $ext_name - )); - } // END - if - - // Extensions are not deprecated by default - EXT_SET_DEPRECATED('N'); - - // Extensions are not always active by default - EXT_SET_ALWAYS_ACTIVE('N'); - - // Extension update notes - EXT_SET_UPDATE_NOTES(''); - - // Include the extension file - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded."); - require($FQFN); - - // Is this extension deprecated? - if (EXT_GET_DEPRECATED() == 'Y') { - // Deactivate the extension - DEACTIVATE_EXTENSION($ext_name); - - // Abort here - return false; - } // END - if - - // Mark it as loaded in normal mode - if (empty($EXT_LOAD_MODE)) { - // Mark it now... - $GLOBALS['ext_loaded']['ext'][$ext_name] = true; - } // END - if - - // All fine! - return true; -} - -// Registeres an extension and possible update depencies -function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = true) { - // Set current extension name - EXT_SET_CURR_NAME($ext_name); - - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()." - ENTERED!<br />"); - // This shall never do a non-admin user or if the extension is active (already installed) - if ((!IS_ADMIN()) || (EXT_IS_ACTIVE($ext_name))) { - return false; - } // END - if - - // When this extension is already in install/update phase, all is fine - if (EXT_IS_REGISTER_RUNNING($ext_name)) { - // Then abort here which is fine - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()." - ALREADY!<br />"); - return true; - } // END - if - - // This registration is running - EXT_ADD_RUNNING_REGISTRATION($ext_name); - - // Init EXT_UPDATE_DEPENDS - EXT_INIT_UPDATE_DEPENDS(); - - // Is the task id zero? Then we need to auto-fix it here - if ($task_id == 0) { - // Try to find the task - $task_id = DETERMINE_EXTENSION_TASK_ID(EXT_GET_CURR_NAME()); - - // Still zero and not in dry-run? - if (($task_id == 0) && (!$dry_run)) { - // Then request a bug report - debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)", - __FUNCTION__, - EXT_GET_CURR_NAME() - )); - } // END - if - } // END - if - - // Init queries and notes - INIT_EXT_SQLS(); - EXT_INIT_NOTES(); - - // Init variables - $ret = false; - $test = false; - INIT_INC_POOL(); - - // By default we have no failures - EXT_SET_REPORTS_FAILURE(false); - - // Does this extension exists? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME().""); - if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'register', '', $dry_run)) { - // Set current extension name again - EXT_SET_CURR_NAME($ext_name); - - // And run possible updates - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "".EXT_GET_CURR_NAME()); - $history = EXT_GET_VER_HISTORY(); - foreach ($history as $ver) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".EXT_GET_CURR_NAME().", ext_ver={$ver}"); - // Load extension in update mode - LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $ver, $dry_run); - - // Add update notes to our output - ADD_EXTENSION_NOTES($ver); - } // END - foreach - - // Does this extension depends on an outstanding update of another update? - for ($dmy = EXT_GET_UPDATE_ITERATOR(); EXT_GET_UPDATE_ITERATOR() < EXT_COUNT_UPDATE_DEPENDS();) { - // Get next update - $ext_update = EXT_GET_ITERATOR_UPDATE_DEPENDS(); - - // Increment here to avoid endless loop - EXT_INCREMENT_UPDATE_INTERATOR(); - - // Check for required file - if (LOAD_EXTENSION($ext_update, 'register', '', $dry_run)) { - // Set current extension name again - EXT_SET_CURR_NAME($ext_name); - - // If versions mismatch update extension first - $ext_ver = GET_EXT_VERSION($ext_update); - - // Extension version set? If empty the extension is not registered - if (empty($ext_ver)) { - // Extension not registered so far so first load task's ID... - $task = DETERMINE_EXTENSION_TASK_ID($ext_update); - - // Entry found? - if ($task > 0) { - // Try to register the extension - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().":ext_update=".$ext_update.",taskId=".$task."<br />"); - $test = REGISTER_EXTENSION($ext_update, $task, $dry_run, false); - - // Reset extension name - EXT_SET_CURR_NAME($ext_name); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().':'); var_dump($test); - } // END - if - } elseif ($ext_ver != EXT_GET_VERSION()) { - // Ok, update this extension now - EXTENSION_UPDATE($ext_update, $ext_ver, $dry_run); - - // All okay! - $test = true; - } else { - // Nothing to register / update before... - $test = true; - } - } else { - // Required file for update does not exists! - $test = true; - // But this is fine for the first time... - } - - // Restore the current extension name - EXT_SET_CURR_NAME($ext_name); - } // END - for - - // Is there no update? - if (EXT_COUNT_UPDATE_DEPENDS(EXT_GET_CURR_NAME()) == 0) { - // Then test is passed! - $test = true; - } // END - if - - // Switch back to register mode - $EXT_LOAD_MODE = 'register'; - - // Remains true if extension registration reports no failures - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().':'); var_dump($test); - $test = (($test === true) && (EXT_GET_REPORTS_FAILURE() === false)); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().':'); var_dump($test); - - // Does everthing before wents ok? - if ($test === true) { - // "Dry-run-mode" activated? - if ((!$dry_run) && (!EXT_IS_ON_REMOVAL_LIST())) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".EXT_GET_CURR_NAME()); - // Init SQLs and transfer ext->generic - INIT_SQLS(); - SET_SQLS(GET_EXT_SQLS()); - - // Run installation pre-installation filters - runFilterChain('pre_extension_installed', array('dry_run' => $dry_run)); - - // Register extension - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:insert=".EXT_GET_CURR_NAME().'/'.EXT_GET_VERSION()." - INSERT!<br />"); - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')", - array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__); - - // Remove cache file(s) if extension is active - runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id)); - - // Remove all SQL commands - UNSET_SQLS(); - - // In normal mode return a true on success - $ret = true; - } elseif ($dry_run) { - // Init SQLs and transfer ext->generic - INIT_SQLS(); - SET_SQLS(GET_EXT_SQLS()); - - // Rewrite SQL command to keep { and } inside for dry-run - foreach (GET_SQLS() as $key => $sql) { - $sql = str_replace('{', "{", str_replace('}', "}", $sql)); - SET_SQL_KEY($key, $sql); - } // END - foreach - - // In "dry-run" mode return array with all SQL commands - $ret = GET_SQLS(); - - // Remove all SQL commands - UNSET_SQLS(); - } else { - // Extension has been removed for updates, so all is fine! - $ret = true; - } - } else { - // No, an error occurs while registering extension :-( - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "".EXT_GET_CURR_NAME()); - $ret = false; - } - } elseif (($task_id > 0) && (EXT_GET_CURR_NAME() != '')) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()."<br />"); - // 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", - array(bigintval($task_id)), __FUNCTION__, __LINE__); - } - - // Is this the sql_patches? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ':'.EXT_GET_CURR_NAME()."/{$EXT_LOAD_MODE}"); - if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($EXT_LOAD_MODE == 'register') || ($EXT_LOAD_MODE == 'remove')) && (!$dry_run) && ($test)) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!"); - if ($logout === true) { - // Then redirect to logout - redirectToUrl('modules.php?module=admin&logout=1&' . $EXT_LOAD_MODE . '=sql_patches'); - } else { - // Add temporary filter - registerFilter('shutdown', 'REDIRECT_TO_LOGOUT_SQL_PATCHES', true, true); - $GLOBALS['ext_load_mode'] = $EXT_LOAD_MODE; - } - } // END - if - - // Return status code - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()." - LEFT!<br />"); - //* DEBUG: */ var_dump($ret); - return $ret; -} - -// Run SQL queries for given extension id -// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) -function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { - // This shall never do a non-admin user! - if (!IS_ADMIN()) return false; - - // Get extension's name - $ext_name = GET_EXT_NAME($ext_id); - - // If it is not set then maybe there is no extension for that ID number - if (empty($ext_name)) { - // We should fix these all! - debug_report_bug(__FUNCTION__ . ': ext_name is empty. ext_id=' . $ext_id); - } // END - if - - // Set current SQL name - EXT_SET_CURR_NAME($ext_name); - - // Init EXT_UPDATE_DEPENDS - EXT_INIT_UPDATE_DEPENDS(); - - // Init array - INIT_EXT_SQLS(); - - // By default no SQL has been executed - $sqlRan = false; - - // Load extension in detected mode - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]=".EXT_GET_CURR_NAME().""); - LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, '', false); - - // Init these SQLs - INIT_SQLS(); - SET_SQLS(GET_EXT_SQLS()); - - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":SQLs::count=".COUNT_SQLS().""); - if ((IS_SQLS_VALID() && (COUNT_SQLS() > 0))) { - // Run any filters depending on the action here - runFilterChain('extension_' . $load_mode, $ext_name); - - // Run SQL commands... - runFilterChain('run_sqls'); - - // 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", - array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); - } // END - if - } // END - if - - // Remove cache file(s) if extension is active - if (((EXT_IS_ACTIVE('cache')) || (GET_EXT_VERSION('cache') != '')) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate'))) { - // Run filters - runFilterChain('post_extension_run_sql', EXT_GET_CURR_NAME()); - } // END - if - - // Is this the sql_patches? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": id=".$ext_id.",currName=".EXT_GET_CURR_NAME().",loadMode=".$load_mode); - if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($load_mode == 'register') || ($load_mode == 'remove'))) { - // Then redirect to logout - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!"); - redirectToUrl('modules.php?module=admin&logout=1&' . $load_mode . '=sql_patches'); - } // END - if -} - -// Check if given extension is active -function EXT_IS_ACTIVE ($ext_name) { - // Extensions are all inactive during installation - if ((!isInstalled()) || (isInstalling()) || (empty($ext_name))) return false; - - // Not active is the default - $active = 'N'; - - // Check cache - if (isset($GLOBALS['cache_array']['extensions']['ext_active'][$ext_name])) { - // Load from cache - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "CACHE! ext_name={$ext_name}"); - $active = $GLOBALS['cache_array']['extensions']['ext_active'][$ext_name]; - - // Count cache hits - incrementConfigEntry('cache_hits'); - } elseif (isset($GLOBALS['ext_loaded'][$ext_name])) { - // @TODO Extension is loaded, what next? - app_die(__FUNCTION__, __LINE__, "LOADED:$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", - array($ext_name), __FUNCTION__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Load entry - list($active) = SQL_FETCHROW($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Write cache array - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".$ext_name."[DB]: {$active}"); - $GLOBALS['cache_array']['extensions']['ext_active'][$ext_name] = $active; - } else { - // Extension not active! - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".$ext_name.": Not active!"); - $GLOBALS['cache_array']['extensions']['ext_active'][$ext_name] = 'N'; - } - - // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name={$ext_name},active={$active}"); - - // Is this extension activated? (For admins we always have active extensions...) - return ($active == 'Y'); -} -// Get version from extensions -function GET_EXT_VERSION ($ext_name) { - // By default no extension is found - $ext_ver = false; - - // Empty extension name should be fixed! - if (empty($ext_name)) { - // Please report this bug! - debug_report_bug(__FUNCTION__ . ': ext_name is empty which is not allowed here.'); - } // END - if - - // Extensions are all inactive during installation - if ((!isInstalled()) || (isInstalling())) return ""; - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": ext_name={$ext_name}"); - - // Is the cache written? - if (isset($GLOBALS['cache_array']['extensions']['ext_version'][$ext_name])) { - // Load data from cache - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": CACHE!"); - $ext_ver = $GLOBALS['cache_array']['extensions']['ext_version'][$ext_name]; - - // Count cache hits - incrementConfigEntry('cache_hits'); - } elseif (!isCacheInstanceValid()) { - // Load from database - $result = SQL_QUERY_ESC("SELECT `ext_version` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1", - array($ext_name), __FUNCTION__, __LINE__); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": DB - ".SQL_NUMROWS($result).""); - - // Is the extension there? - if (SQL_NUMROWS($result) == 1) { - // Load entry - list($ext_ver) = SQL_FETCHROW($result); - } elseif (isDebugModeEnabled()) { - // Not found! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf(": Cannot find extension %s in database!", $ext_name)); - } - - // Free result - SQL_FREERESULT($result); - - // Set cache - $GLOBALS['cache_array']['extensions']['ext_version'][$ext_name] = $ext_ver; - } - - // Return result - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": ret={$ext_ver}"); - return $ext_ver; -} - -// Updates a given extension with current extension version to latest version -function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { - // Only admins are allowed to update extensions - if ((!IS_ADMIN()) || (empty($ext_name))) return false; - - // Set current SQL name - EXT_SET_CURR_NAME($ext_name); - - // Init arrays - INIT_EXT_SQLS(); - EXT_INIT_NOTES(); - INIT_INC_POOL(); - - // Load extension in test mode - LOAD_EXTENSION($ext_name, 'test', $ext_ver, $dry_run); - - // Save version history - $history = EXT_GET_VER_HISTORY(); - - // Remove old SQLs array to prevent possible bugs - INIT_EXT_SQLS(); - - // Check if version is updated - if (((EXT_GET_VERSION() != $ext_ver) || ($dry_run)) && (is_array($history))) { - // Search for starting point - $start = array_search($ext_ver, $history); - - // And load SQL queries in order of version history - for ($idx = ($start + 1); $idx < count($history); $idx++) { - // Set current extension name - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__.'['.__LINE__.':] ext_name='.$ext_name."<br />"); - EXT_SET_CURR_NAME($ext_name); - - // Set extension version - $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()] = $history[$idx]; - - // Load again... - LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run); - - // Get all depencies - $depencies = EXT_GET_UPDATE_DEPENDS(); - - // Nothing to apply? - if (count($depencies) > 0) { - // Apply all extension depencies - foreach ($depencies as $ext_depend) { - // Set it as current - EXT_SET_CURR_NAME($ext_depend); - - // Is the extension there? - if (GET_EXT_VERSION($ext_depend) != '') { - // Update another extension first! - $test = EXTENSION_UPDATE($ext_depend, GET_EXT_VERSION($ext_depend), $dry_run); - } else { - // Register new extension - $test = REGISTER_EXTENSION($ext_depend, 0, $dry_run, false); - } - } // END - foreach - - // Set name back - EXT_SET_CURR_NAME($ext_name); - } // END - if - - // Add notes - ADD_EXTENSION_NOTES($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()]); - } // END - for - - // In real-mode execute any existing includes - if (!$dry_run) { - $GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()] = GET_INC_POOL(); - runFilterChain('load_includes'); - SET_INC_POOL($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]); - unset($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]); - } // END - if - - // Init these SQLs - INIT_SQLS(); - SET_SQLS(GET_EXT_SQLS()); - - // Run SQLs - runFilterChain('run_sqls', array('dry_run' => $dry_run)); - - if (!$dry_run) { - // Create task - CREATE_EXTENSION_UPDATE_TASK(getCurrentAdminId(), EXT_GET_CURR_NAME(), $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], SQL_ESCAPE(EXT_GET_NOTES(EXT_GET_NOTES()))); - - // Update extension's version - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_version`='%s' WHERE `ext_name`='%s' LIMIT 1", - array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); - - // Remove arrays - UNSET_SQLS(); - unset($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()]); - - // Run filters on success extension update - runFilterChain('extension_update', EXT_GET_CURR_NAME()); - } // END - if - } // END - if -} - -// Output verbose SQL table for extension -function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = '', $dashed = '', $switch = false, $width = '100%') { - // Empty title? - if (empty($title)) { - // Then fix it to default - $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REMOVAL'); - } // END - if - - // Are there some queries in $queries? - if (count($queries) > 0) { - // Then use them instead! - SET_SQLS($queries); - } // END - if - - // Init variables - $SW = 2; $i = 1; - $OUT = ''; - - // Do we have queries? - if ((IS_SQLS_VALID()) && (GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { - foreach (GET_SQLS() as $idx => $sql) { - // Trim out spaces - $sql = trim($sql); - - // Output command if set - if (!empty($sql)) { - // Prepare output for template - $content = array( - 'sw' => $SW, - 'i' => $i, - 'sql' => $sql - ); - - // Load row template - $OUT .= LOAD_TEMPLATE("admin_ext_sql_row", true, $content); - - // Switch color and count up - $SW = 3 - $SW; - $i++; - } // END - if - } // END - foreach - - // Prepare content for template - $content = array( - 'width' => $width, - 'dashed' => $dashed, - 'title' => $title, - 'out' => $OUT - ); - - // Load main template - $OUT = LOAD_TEMPLATE("admin_ext_sql_table", true, $content); - } elseif ((GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { - // No addional SQL commands to run - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_ADDITIONAL_SQLS')); - } // END - if - - // Return output - return $OUT; -} - -// Get extension name from id -function GET_EXT_NAME ($ext_id) { - // Init extension name - $ret = ''; - - // Is cache there? - if (isset($GLOBALS['cache_array']['extensions']['ext_name'][$ext_id])) { - // Load from cache - $ret = $GLOBALS['cache_array']['extensions']['ext_name'][$ext_id]; - - // Count cache hits - 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", - array(bigintval($ext_id)), __FUNCTION__, __LINE__); - list($ret) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - - // Return the extension name - return $ret; -} - -// Get extension id from name -function GET_EXT_ID ($ext_name) { - // Init ID number - $ret = 0; - if (isset($GLOBALS['cache_array']['extensions']['ext_id'][$ext_name])) { - // Load from cache - $ret = $GLOBALS['cache_array']['extensions']['ext_id'][$ext_name]; - - // Count cache hits - 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", - array($ext_name), __FUNCTION__, __LINE__); - list($ret) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - - // Return value - return $ret; -} - -// 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", - array($ext_name), __FUNCTION__, __LINE__); - - // Extension has been activated? - if (SQL_AFFECTEDROWS() == 1) { - // Then run all queries - EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'activate'); - } // END - if -} - -// 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", - array($ext_name), __FUNCTION__, __LINE__); - - // Extension has been activated? - if (SQL_AFFECTEDROWS() == 1) { - // Then run all queries - EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'deactivate'); - - // Create new task - CREATE_EXTENSION_DEACTIVATION_TASK($ext_name); - - // Notify the admin - sendAdminNotification( - getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'), - 'admin_ext_deactivated', - array('ext_name' => $ext_name) - ); - } // END - if -} - -// Checks wether the extension is older than given -function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) { - // Get current extension version - $currVersion = GET_EXT_VERSION($ext_name); - - // Remove all dots from both versions - $currVersion = str_replace('.', '', $currVersion); - $ext_ver = str_replace('.', '', $ext_ver); - - // Now compare both and return the result - return ($currVersion < $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--}'; - - // 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! - createNewTask($subject, $notes, 'EXTENSION_UPDATE', 0, $admin_id); - } // END - if - } // END - if -} - -// Creates a new task for newly installed extension -function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $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) == '')) { - // Set default message if ext-foo is missing - $message = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext); - - // Template file - $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl", - getConfig('PATH'), - getLanguage(), - $ext - ); - - // Load text for task if found - if (isFileReadable($tpl)) { - // Load extension's own text template (HTML!) - $message = LOAD_TEMPLATE('ext_' . $ext, true); - } else { - // Write this in debug.log as well - DEBUG_LOG(__FUNCTION__, __LINE__, $message); - } - - // Task not created so it's a brand-new extension which we need to register and create a task for! - createNewTask($subject, $message, 'EXTENSION_UPDATE', 0, $admin_id, false); - } // END - if -} - -// Creates a task for automatically deactivated (deprecated) extension -function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) { - // Create subject line - $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED')); - - // 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 - createNewTask($subject, SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION'); - } // END - if -} - -// Checks if the module has a menu -function MODULE_HAS_MENU ($mod, $forceDb = false) { - // All is false by default - $ret = false; - - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "mod={$mod},cache=".GET_EXT_VERSION('cache')); - if (GET_EXT_VERSION('cache') >= '0.1.2') { - // Cache version is okay, so let's check the cache! - if (isset($GLOBALS['cache_array']['modules']['has_menu'][$mod])) { - // Check module cache and count hit - $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == 'Y'); - incrementConfigEntry('cache_hits'); - } elseif (isset($GLOBALS['cache_array']['extensions']['ext_menu'][$mod])) { - // Check cache and count hit - $ret = ($GLOBALS['cache_array']['extensions']['ext_menu'][$mod] == 'Y'); - incrementConfigEntry('cache_hits'); - } elseif ((IS_ADMIN()) && ($mod == 'admin')) { - // Admin module has always a menu! - $ret = true; - } - } 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", - array($mod), __FUNCTION__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Load "has_menu" column - list($has_menu) = SQL_FETCHROW($result); - - // Fake cache... ;-) - $GLOBALS['cache_array']['extensions']['ext_menu'][$mod] = $has_menu; - - // Does it have a menu? - $ret = ($has_menu == 'Y'); - } // END - if - - // Free memory - SQL_FREERESULT($result); - } elseif (GET_EXT_VERSION('sql_patches') == '') { - // No sql_patches installed, so maybe in admin area or no admin registered? - $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == 'admin')); // Then there is a menu! - } - - // Return status - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().':'; var_dump($ret)); - return $ret; -} - -// Determines the task id for given extension -function DETERMINE_EXTENSION_TASK_ID ($ext_name) { - // Default is not found - $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", - array($ext_name), __FUNCTION__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Task found so load task's ID and register extension... - list($task_id) = SQL_FETCHROW($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return it - return $task_id; -} - -// Determines the task id for given subject -function DETERMINE_TASK_ID_BY_SUBJECT ($subject) { - // Default is not found - $task_id = 0; - - // Search for task id - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1", - array($subject), __FUNCTION__, __LINE__); - - // Entry found? - if (SQL_NUMROWS($result) == 1) { - // Task found so load task's ID and register extension... - list($task_id) = SQL_FETCHROW($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return it - return $task_id; -} - -// Add updates notes for given version -function ADD_EXTENSION_NOTES ($ver) { - // Init notes/content - $out = ''; $content = array(); - - // Is do we have verbose output enabled? - if ((getConfig('verbose_sql') == 'Y') || (!EXT_IS_ACTIVE('sql_patches'))) { - // Update notes found? - if (EXT_GET_UPDATE_NOTES() != '') { - // Update notes found - $content = array( - 'ver' => $ver, - 'notes' => EXT_GET_UPDATE_NOTES() - ); - - // Reset them - EXT_SET_UPDATE_NOTES(''); - } elseif (($ver == '0.0') || ($ver == '0.0.0')) { - // Initial release - $content = array( - 'ver' => $ver, - 'notes' => getMessage('INITIAL_RELEASE') - ); - } else { - // No update notes found! - $content = array( - 'ver' => $ver, - 'notes' => getMessage('NO_UPDATE_NOTES') - ); - } - - // Load template - $out = LOAD_TEMPLATE('admin_ext_notes', true, $content); - } // END - if - - // Add the notes - EXT_APPEND_NOTES($out); -} - -// Getter for CSS files array -function EXT_GET_CSS_FILES () { - // By default no additional CSS files are found - $cssFiles = array(); - - // Is the array there? - if (isset($GLOBALS['css_files'])) { - // Then use it - $cssFiles = $GLOBALS['css_files']; - } // END - if - - // Return array - return $cssFiles; -} - -// Init CSS files array -function EXT_INIT_CSS_FILES () { - // Simply init it - $GLOBALS['css_files'] = array(); -} - -// Add new entry -function EXT_ADD_CSS_FILE ($file) { - // Is the array there? - if (!isset($GLOBALS['css_files'])) { - // Then auto-init them - EXT_INIT_CSS_FILES(); - } // END - if - - // Add the entry - $GLOBALS['css_files'][] = $file; -} - -// Setter for EXT_ALWAYS_ACTIVE flag -function EXT_SET_ALWAYS_ACTIVE ($active) { - $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()] = (string) $active; -} - -// Getter for EXT_ALWAYS_ACTIVE flag -function EXT_GET_ALWAYS_ACTIVE () { - return $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()]; -} - -// Setter for EXT_VERSION flag -function EXT_SET_VERSION ($version) { - $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (string) $version; -} - -// Getter for EXT_VERSION flag -function EXT_GET_VERSION () { - return $GLOBALS['ext_version'][EXT_GET_CURR_NAME()]; -} - -// Setter for EXT_DEPRECATED flag -function EXT_SET_DEPRECATED ($deprecated) { - $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()] = (string) $deprecated; -} - -// Getter for EXT_DEPRECATED flag -function EXT_GET_DEPRECATED () { - return $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()]; -} - -// Setter for EXT_UPDATE_DEPENDS flag -function EXT_ADD_UPDATE_DEPENDS ($updateDepends) { - // Is the update depency empty? (NEED TO BE FIXED!) - if (empty($updateDepends)) { - // Please report this bug! - debug_report_bug("updateDepends is left empty!"); - } // END - if - - // Is it not yet added? - if (!in_array($updateDepends, $GLOBALS['ext_running_updates'])) { - //* DEBUG */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME().'/'.$updateDepends); - // Add it to the list of extension update depencies map - $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][] = (string) $updateDepends; - - // Remember it in the list of running updates - $GLOBALS['ext_running_updates'][] = $updateDepends; - } // END - if -} - -// Checks wether the given extension registration is in progress -function EXT_IS_REGISTER_RUNNING ($ext_name) { - return ((isset($GLOBALS['ext_register_running'])) && (in_array($ext_name, $GLOBALS['ext_register_running']))); -} - -// Init EXT_UPDATE_DEPENDS flag -function EXT_INIT_UPDATE_DEPENDS () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - - // Init update depency map automatically if not found - if (!EXT_IS_UPDATE_DEPENDS_INIT()) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()." - INIT!"); - $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()] = array(); - } // END - if - - // Init running updates array - EXT_INIT_RUNNING_UPDATES(); -} - -// Adds an extension as "registration in progress" -function EXT_ADD_RUNNING_REGISTRATION ($ext_name) { - // Is it running? - if (!EXT_IS_REGISTER_RUNNING($ext_name)) { - // Then add it! - $GLOBALS['ext_register_running'][] = $ext_name; - } // END - if -} - -// Checks wether EXT_UPDATE_DEPENDS is initialized -function EXT_IS_UPDATE_DEPENDS_INIT () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - return (isset($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()])); -} - -// Initializes the list of running updates -function EXT_INIT_RUNNING_UPDATES () { - // Auto-init ext_running_updates - if (!isset($GLOBALS['ext_running_updates'])) { - $GLOBALS['ext_running_updates'] = array(); - $GLOBALS['ext_register_running'] = array(); - } // END - if -} - -// Getter for EXT_UPDATE_DEPENDS flag -function EXT_GET_UPDATE_DEPENDS () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - return $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]; -} - -// Getter for next iterator depency -function EXT_GET_ITERATOR_UPDATE_DEPENDS () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - return ($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][EXT_GET_UPDATE_ITERATOR()]); -} - -// Counter for extension update depencies -function EXT_COUNT_UPDATE_DEPENDS () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - return count($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]); -} - -// Removes given extension from update denpency list -function EXT_REMOVE_UPDATE_DEPENDS ($ext_name) { - // Look it up - $key = array_search($ext_name, EXT_GET_UPDATE_DEPENDS()); - - // Is it valid? - if ($key !== false) { - // Then remove it - unset($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][$key]); - - // And sort the array - ksort($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]); - } // END - if -} - -// Init iterator for update depencies -function EXT_INIT_UPDATE_ITERATOR () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()] = 0; -} - -// Getter for depency iterator -function EXT_GET_UPDATE_ITERATOR () { - // Auto-init iterator - if (!isset($GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()])) EXT_INIT_UPDATE_ITERATOR(); - - // Return it - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME().'/'.$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]); - return $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]; -} - -// Increments the update iterator -function EXT_INCREMENT_UPDATE_INTERATOR () { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()); - $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]++; -} - -// Setter for EXT_REPORTS_FAILURE flag -function EXT_SET_REPORTS_FAILURE ($reportsFailure) { - $GLOBALS['ext_reports_failure'] = (bool) $reportsFailure; -} - -// Getter for EXT_REPORTS_FAILURE flag -function EXT_GET_REPORTS_FAILURE () { - return $GLOBALS['ext_reports_failure']; -} - -// Setter for EXT_VER_HISTORY flag -function EXT_SET_VER_HISTORY ($verHistory) { - $GLOBALS['ext_ver_history'] = (array) $verHistory; -} - -// Getter for EXT_VER_HISTORY array -function EXT_GET_VER_HISTORY () { - return $GLOBALS['ext_ver_history']; -} - -// Setter for EXT_UPDATE_NOTES flag -function EXT_SET_UPDATE_NOTES ($updateNotes) { - $GLOBALS['ext_update_notes'] = (string) $updateNotes; -} - -// Getter for EXT_UPDATE_NOTES flag -function EXT_GET_UPDATE_NOTES () { - return $GLOBALS['ext_update_notes']; -} - -// Init extension notice -function EXT_INIT_NOTES () { - $GLOBALS['ext_notes'] = ''; -} - -// Append extension notice -function EXT_APPEND_NOTES ($notes) { - $GLOBALS['ext_notes'] .= (string) $notes; -} - -// Getter for extension notes -function EXT_GET_NOTES () { - return $GLOBALS['ext_notes']; -} - -// Setter for current extension name -function EXT_SET_CURR_NAME ($ext_name) { - $GLOBALS['curr_ext_name'] = (string) $ext_name; -} - -// Getter for current extension name -function EXT_GET_CURR_NAME () { - if (isset($GLOBALS['curr_ext_name'])) { - return $GLOBALS['curr_ext_name']; - } // END - if - - // Not set! - debug_report_bug(__FUNCTION__.": curr_ext_name not initialized. Please execute INIT_EXT_SQLS() before calling this function."); -} - -// Init SQLs array for current extension -function INIT_EXT_SQLS () { - // Auto-init the array now... - if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) { - $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array(); - } // END - if -} - -// Adds SQLs to the SQLs array but "assigns" it with current extension name -function ADD_EXT_SQL ($sql) { - $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()][] = $sql; -} - -// Getter for SQLs array for current extension -function GET_EXT_SQLS () { - // Output debug backtrace if not found (SHOULD NOT HAPPEN!) - if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) { - // Not found, should not happen - debug_report_bug(sprintf("ext_sqls is empty, current extension: %s", - EXT_GET_CURR_NAME() - )); - } // END - if - - // Return the array - return $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()]; -} - -// Removes SQLs for current extension -function UNSET_EXT_SQLS () { - unset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()]); -} - -// Auto-initializes the removal list -function EXT_INIT_REMOVAL_LIST () { - // Is the remove list there? - if (!isset($GLOBALS['ext_update_remove'])) { - // Then create it - $GLOBALS['ext_update_remove'] = array(); - } // END - if -} - -// Checks wether the current extension is on the removal list -function EXT_IS_ON_REMOVAL_LIST () { - // Init removal list - EXT_INIT_REMOVAL_LIST(); - - // Is it there? - return (in_array(EXT_GET_CURR_NAME(), $GLOBALS['ext_update_remove'])); -} - -// Adds the current extension to the removal list -function EXT_ADD_CURRENT_TO_REMOVAL_LIST () { - // Simply add it - $GLOBALS['ext_update_remove'][] = EXT_GET_CURR_NAME(); -} - -// Getter for removal list -function EXT_GET_REMOVAL_LIST () { - // Return the removal list - return $GLOBALS['ext_update_remove']; -} - -// Redirects if the provided extension is not installed -function redirectOnUninstalledExtension ($ext_name) { - // So is the extension there? - if ((!isExtensionInstalled($ext_name)) || (!EXT_IS_ACTIVE($ext_name))) { - // Redirect to index - redirectToUrl('modules.php?module=index&msg=' . getCode('EXTENSION_PROBLEM') . '&ext=' . $ext_name); - } // END - if -} - -// Determines wether the given extension is installed -function isExtensionInstalled ($ext_name) { - // Default is not installed - $isInstalled = false; - - // Check cache ext_version - $isInstalled = isset($GLOBALS['cache_array']['extensions']['ext_version'][$ext_name]); - - // Return status - return $isInstalled; -} - -// +// @DEPRECATED ?> diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 4dd9d45115..e857f8f1d5 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,56 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ -case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - // SQL commands to run - break; +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch break; - } - break; -case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; -case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; -default: // Do stuff when extension is loaded - break; -} + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 10bcf31ad9..6904f0aaf1 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,110 +38,111 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.9'); +setThisExtensionVersion('0.0.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='active'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_active'"); // Unregister filter - unregisterFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run); + unregisterFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.5': // SQL queries for v0.0.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar."); + setExtensionUpdateNotes("Aktiven-Liste im Gastbereich ist nun einschränkbar."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.0.9': // SQL queries for v0.0.9 // Make update depending on 'online' - EXT_ADD_UPDATE_DEPENDS('online'); + addExtensionUpdateDependency('online'); // Register filter - registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run); + registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter für den "Wer ist Online" Block hinzugefügt und ist von <strong>online</strong> abhängig."); + setExtensionUpdateNotes("Filter für den "Wer ist Online" Block hinzugefügt und ist von <strong>online</strong> abhängig."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 625d4673af..bfc09b6b4e 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,288 +38,289 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version of this extension -EXT_SET_VERSION('0.7.2'); +setThisExtensionVersion('0.7.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2')); -switch ($EXT_LOAD_MODE) -{ +// Keep this extension always active! +setExtensionAlwaysActive('Y'); + +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')"); - ADD_EXT_SQL("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')"); + addExtensionSql("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')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')"); + addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='admins'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP default_acl"); // Remove filters - unregisterFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run); + unregisterFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.2.0': // SQL queries for v0.2 - ADD_EXT_SQL("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')"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Fügt den Menüpunkt "Admin kontaktieren" hinzu."); + setExtensionUpdateNotes("Fügt den Menüpunkt "Admin kontaktieren" hinzu."); break; case '0.3.0': // SQL queries for v0.3 // Add admin menu - ADD_EXT_SQL("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')"); + addExtensionSql("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? - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); // Default is deny everything - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); // But allow current admin everything (THIS SHALL BE YOU!) - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`"); - ADD_EXT_SQL("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 '', -what_menu VARCHAR(255) NOT NULL DEFAULT '', -access_mode ENUM('deny','allow') NOT NULL DEFAULT 'deny', -KEY (admin_id), -PRIMARY KEY (id) -) TYPE={!_TABLE_TYPE!}"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `default_acl`='allow' WHERE `login`='".getSession('admin_login')."' LIMIT 1"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`"); + addExtensionSql("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 '', +`what_menu` VARCHAR(255) NOT NULL DEFAULT '', +`access_mode` ENUM('deny','allow') NOT NULL DEFAULT 'deny', +KEY (`admin_id`), +PRIMARY KEY (`id`) +) TYPE={?_TABLE_TYPE?}"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugefügt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht."); + setExtensionUpdateNotes("Sogn. ACLs werden hinzugefügt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht. <strong>Nur Sie haben momentan Vollzugriff auf den Adminbereich.</strong>"); break; case '0.3.1': // SQL queries for v0.3.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`"); + addExtensionSql("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={!_TABLE_TYPE!}"); - ADD_EXT_SQL("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')"); +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"); // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template LIKE '% %'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert."); + setExtensionUpdateNotes("Admins-Mails-Tabelle geleert."); case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt."); + setExtensionUpdateNotes("&admin= in &amp;admin= umgewandelt."); break; case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System"); + setExtensionUpdateNotes("Vorbereitet auf Cache-System"); break; case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt."); + setExtensionUpdateNotes("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt."); break; case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt."); + setExtensionUpdateNotes("Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt."); break; case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Cache wird endlich gelöscht, wenn Admin entfernt wird."); + setExtensionUpdateNotes("Cache wird endlich gelöscht, wenn Admin entfernt wird."); break; case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates."); + setExtensionUpdateNotes("Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates."); break; case '0.5.3': // SQL queries for v0.5.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.5.4': // SQL queries for v0.5.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.5.5': // SQL queries for v0.5.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert."); + setExtensionUpdateNotes("Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert."); break; case '0.5.6': // SQL queries for v0.5.6 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>."); + setExtensionUpdateNotes("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>."); break; case '0.5.7': // SQL queries for v0.5.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert."); + setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> geändert."); break; case '0.5.8': // SQL queries for v0.5.8 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update."); + setExtensionUpdateNotes("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update."); break; case '0.5.9': // SQL queries for v0.5.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.6.0': // SQL queries for v0.6.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert."); + setExtensionUpdateNotes("Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert."); break; case '0.6.1': // SQL queries for v0.6.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder."); + setExtensionUpdateNotes("Speichern von Admin-Accounts klappt wieder."); break; case '0.6.2': // SQL queries for v0.6.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {?PATH?}/templates/de/emails/) in den neuen Order admins!"); + setExtensionUpdateNotes("Bitte verschieben Sie die admins-Templates (Ordner: {?PATH?}/templates/de/emails/) in den neuen Order admins!"); break; case '0.6.3': // SQL queries for v0.6.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.6.4': // SQL queries for v0.6.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren."); + setExtensionUpdateNotes("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren."); break; case '0.6.5': // SQL queries for v0.6.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.6.6': // SQL queries for v0.5.6 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>."); + setExtensionUpdateNotes("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>."); break; case '0.6.7': // SQL queries for v0.6.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren."); + setExtensionUpdateNotes("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren."); break; case '0.6.8': // SQL queries for v0.6.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + setExtensionUpdateNotes("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; case '0.6.9': // SQL queries for v0.6.9 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt."); + setExtensionUpdateNotes("Verwaltung nach Management umbenannt."); break; case '0.7.0': // SQL queries for v0.7.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Veraltetes Update."); + setExtensionUpdateNotes("Veraltetes Update."); break; case '0.7.1': // SQL queries for v0.7.1 // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Add filters - registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run); + registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); + setExtensionUpdateNotes("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); break; case '0.7.2': // SQL queries for v0.7.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP `login_failtures`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP `last_failture`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD `login_failures` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD `last_failure` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `login_failtures`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `last_failture`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `login_failures` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Schreibweise korregiert."); + setExtensionUpdateNotes("Schreibweise korregiert."); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index 46ef52ada7..4c860579f9 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,60 +38,61 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Remove all other themes - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE ext_name LIKE 'admintheme%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index a070176425..570410394a 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,60 +38,61 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Remove all other menu themes - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE ext_name LIKE 'admintheme%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 6e9a0e5334..e690984aa2 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,234 +38,231 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.4.0'); +setThisExtensionVersion('0.4.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0')); -switch ($EXT_LOAD_MODE) -{ +// Keep this extension always active! +setExtensionAlwaysActive('Y'); + +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"); - if (EXT_IS_ACTIVE('bonus')) { - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"); + if (isExtensionActive('bonus')) { + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"); - if (EXT_IS_ACTIVE('bonus')) { - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"); + if (isExtensionActive('bonus')) { + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"); } - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP ap_notified"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); - ADD_EXT_SQL("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')"); - ADD_EXT_SQL("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')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_unconfirmed_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); + addExtensionSql("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')"); + addExtensionSql("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')"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."); + setExtensionUpdateNotes("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt."); + setExtensionUpdateNotes("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); + setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert."); + setExtensionUpdateNotes("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.1.9': // SQL queries for v0.1.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>"); + setExtensionUpdateNotes("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>"); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>"); + setExtensionUpdateNotes("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>"); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt."); + setExtensionUpdateNotes("Diverse angebundene Erweiterungen gefixt."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Betreffzeile für gelöschte Aufgaben korregiert."); + setExtensionUpdateNotes("Betreffzeile für gelöschte Aufgaben korregiert."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); + setExtensionUpdateNotes("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({?POINTS?} wurden nicht gutgeschrieben.)"); + setExtensionUpdateNotes("Problem mit Jackpot beseitigt ({?POINTS?} wurden nicht gutgeschrieben.)"); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert."); + setExtensionUpdateNotes("Mailbetreffs korregiert."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Template <u>admin_config_autopurge_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); + setExtensionUpdateNotes("Template <u>admin_config_autopurge_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.3.3': // SQL queries for v0.3.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Von bereits gelöschten Mitgliedern die Mails löschen integriert."); + setExtensionUpdateNotes("Von bereits gelöschten Mitgliedern die Mails löschen integriert."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt."); + setExtensionUpdateNotes("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt."); break; case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt."); + setExtensionUpdateNotes("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt."); break; case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf."); + setExtensionUpdateNotes("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf."); break; case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-Löschung</strong> finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-Löschung</strong> finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt."); break; case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."); + setExtensionUpdateNotes("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // Do we have a daily-reset-run? - if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) { - // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts - ADD_INC_TO_POOL('inc/autopurge.php'); - } - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-autoreg.php b/inc/extensions/ext-autoreg.php new file mode 100644 index 0000000000..fac6f8aac4 --- /dev/null +++ b/inc/extensions/ext-autoreg.php @@ -0,0 +1,93 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * ================ Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : ext-autoreg.php * + * -------------------------------------------------------------------- * + * Short description : A server/client auto-registration extension * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Eine Server-/Client-Autoregistrierung Erw. * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Version number +setThisExtensionVersion('0.0'); + +// Version history array (add more with , '0.1.0' and so on) +setExtensionVersionHistory(array('0.0')); + +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + break; + + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; + + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; + + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; + + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch + +// [EOF] +?> diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 111ec596a7..a1f29851d3 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_accounts` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, locked_reason TINYTEXT, @@ -74,13 +72,13 @@ account_type ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK', overdraft_credit FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (id), UNIQUE KEY (pin), -INDEX `uid_type` (uid, account_type), +INDEX `userid_type` (userid, account_type), INDEX (account_created), INDEX (account_locked), INDEX (last_tan_stamp) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` ( +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`"); + addExtensionSql("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, @@ -91,9 +89,9 @@ transfer_purpose TINYTEXT, PRIMARY KEY (id), INDEX (to_account_id, from_account_id), INDEX (day_bookkeeping, day_available) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` ( +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_packages` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, @@ -111,13 +109,13 @@ free_account_income FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, free_account_stuff TINYTEXT null, tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); // free_account_stuff will be a list of columns of the table _bank_packages // 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. - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`"); + addExtensionSql("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, @@ -125,76 +123,79 @@ tan VARCHAR(50) NOT NULL DEFAULT '', used ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (id), UNIQUE (account_id, tan) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); // Admin menu queries - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='bank'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='bank'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 1d0f6e0142..2110d5bdc8 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,246 +38,247 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.2.6'); +setThisExtensionVersion('0.2.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{?POINTS?} erbetteln!',4,'Y','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` ( + addExtensionSql("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{?POINTS?} erbetteln!',4,'Y','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_userid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`"); + addExtensionSql("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', timeout VARCHAR(10) NOT NULL DEFAULT '', KEY (userid), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='beg'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='beg' OR `what`='beg2'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.3': // SQL queries for v0.0.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {?POINTS?} einstellbar (Standart: 0,1 {?POINTS?})"); + setExtensionUpdateNotes("Maximale Obergrenze an {?POINTS?} einstellbar (Standart: 0,1 {?POINTS?})"); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte <u>beg_points_ma</u>")."); + setExtensionUpdateNotes("Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte <u>beg_points_ma</u>")."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."); + setExtensionUpdateNotes("Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."); break; case '0.0.6': // SQL queries for v0.0.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {?POINTS?} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren."); + setExtensionUpdateNotes("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {?POINTS?} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren."); break; case '0.0.8': // SQL queries for v0.0.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugefügt."); + setExtensionUpdateNotes("Zeitsperre gegen die selbe IP-Nummer hinzugefügt."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order beg!"); + setExtensionUpdateNotes("Bitte verschieben Sie die beg-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order beg!"); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.1.2': // SQL queries for v0.1.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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'; } + if (isExtensionActive('beg')) { $VIS = 'Y'; $LOCKED = 'N'; } - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"); - ADD_EXT_SQL("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')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erbettelte {?POINTS?} werden nach Deaktivierung der Bettel-Rallye gelöscht."); + setExtensionUpdateNotes("Erbettelte {?POINTS?} werden nach Deaktivierung der Bettel-Rallye gelöscht."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!"); + setExtensionUpdateNotes("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!"); break; case '0.1.5': // SQL queries for v0.1.5 - ADD_EXT_SQL("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"); + addExtensionSql("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!) - EXT_SET_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!"); + setExtensionUpdateNotes("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!"); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {?POINTS?} gutgeschrieben."); + setExtensionUpdateNotes("Es wurden immer dem ersten bettelndem Mitglied die {?POINTS?} gutgeschrieben."); break; case '0.1.7': // SQL queries for v0.1.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_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 <strong>Einstellungen --> Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."); + setExtensionUpdateNotes("Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter <strong>Einstellungen --> Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt."); + setExtensionUpdateNotes("Fehler im täglichen Reset beseitigt."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei {?POINTS?}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); + setExtensionUpdateNotes("Bei {?POINTS?}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <strong>unknown column 'uid'</strong> beseitigt."); + setExtensionUpdateNotes("Fehler <strong>unknown column 'userid'</strong> beseitigt."); break; case '0.2.2': // SQL queries for v0.2.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar."); + setExtensionUpdateNotes("Eigene User-ID von Bettel-Rallye ausschliessbar."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."); + setExtensionUpdateNotes("Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."); break; case '0.2.4': // SQL queries for v0.2.4 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.2.6': // SQL queries for v0.2.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."); + setExtensionUpdateNotes("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - 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__); - - // Check for beg rallye is active and send mails out - if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) { - // Include file for sending out mails - ADD_INC_TO_POOL('inc/mails/beg_mails.php'); - } // END - if - break; + case 'init': // When extension is initialized + // Remove old entries + $OLD = getConfig('beg_timeout'); + if (getConfig('beg_userid_timeout') > $OLD) $OLD = getConfig('beg_userid_timeout'); + $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')) { + // Include file for sending out mails + addIncludeToPool('notify', 'inc/mails/beg_mails.php'); + } // END - if + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } // diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index d47995dae3..bb576451e7 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,173 +38,169 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.3.9'); +setThisExtensionVersion('0.3.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0"); + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP birthday_sent"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_birthday'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wenn täglicher Reset war, wird eine benötigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber."); + setExtensionUpdateNotes("Wenn täglicher Reset war, wird eine benötigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber."); break; case '0.2.0': // SQL queries for v0.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` ( + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`"); + addExtensionSql("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, chk_value VARCHAR(255) NOT NULL DEFAULT '', -KEY(userid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); - ADD_EXT_SQL("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)"); +KEY (userid), +PRIMARY KEY (id) +) Type={?_TABLE_TYPE?}"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben."); + setExtensionUpdateNotes("Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erhöht."); + setExtensionUpdateNotes("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erhöht."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php "intelligenter" per Datenfeld und Lade-Schleife in load_extensions.php realisiert."); + setExtensionUpdateNotes("Laden der birthday_mails.php "intelligenter" per Datenfeld und Lade-Schleife in load_extensions.php realisiert."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgeführt."); + setExtensionUpdateNotes("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgeführt."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vergessenes <strong>_OB_CACHING</strong> gesetzt."); + setExtensionUpdateNotes("Vergessenes <strong>_OB_CACHING</strong> gesetzt."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); + setExtensionUpdateNotes("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert."); + setExtensionUpdateNotes("Wort <strong>Punkte</strong> dynamisiert."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order birthday!"); + setExtensionUpdateNotes("Bitte verschieben Sie die birthday-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order birthday!"); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.3.6': // SQL queries for v0.3.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar."); + setExtensionUpdateNotes("Vergütungsmodus des Geburtstagsbonus einstellbar."); break; case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gewöhnliche Leerstelle aussah."); + setExtensionUpdateNotes("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gewöhnliche Leerstelle aussah."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.3.9': // SQL queries for v0.3.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', + addExtensionSql("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"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL."); + setExtensionUpdateNotes("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) { - // Daily reset was run and we shall pay points so we start checking for members who - // has a birthday for today - ADD_INC_TO_POOL('inc/mails/birthday_mails.php'); - } - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index c4b79c11bb..0370e13f6c 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version of this extension -EXT_SET_VERSION('0.8.8'); +setThisExtensionVersion('0.8.8'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8')); +setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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.')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` ( + addExtensionSql("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.')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`"); + addExtensionSql("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 '', @@ -69,79 +67,78 @@ url VARCHAR(255) NOT NULL DEFAULT '', target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -KEY(cat_id), +KEY (cat_id), PRIMARY KEY (id) -)TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)"); +)TYPE={?_TABLE_TYPE?}"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); + if (isExtensionActive('html_mail')) addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='bonus'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='bonus'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` DROP bonus_id"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>."); + setExtensionUpdateNotes("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>."); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"); // Update notes (these will be set as task text!) - EXT_SET_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 <a href=\"{?URL?}/modules.php?module=admin&what=updates\">Updates prüfen</a> herunter."); + setExtensionUpdateNotes("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 <a href=\"{?URL?}/modules.php?module=admin&what=updates\">Updates prüfen</a> herunter."); break; case '0.2.1': // SQL queries for v0.2.1 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1"); - ADD_EXT_SQL("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.')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_bonus' LIMIT 1"); + addExtensionSql("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.')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY').""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); // Use actual month for this update - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert."); + setExtensionUpdateNotes("Login-Bonus und Turbo-Klick-Bonus intergriert."); break; case '0.2.2': // SQL queries for v0.2.2 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`"); + addExtensionSql("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, @@ -149,210 +146,210 @@ bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points FLOAT(20,3) NOT NULL DEFAULT '0.000', timemark VARCHAR(32) NOT NULL DEFAULT 0, -PRIMARY KEY(id), +PRIMARY KEY (id), KEY mail_id (mail_id), KEY bonus_id (bonus_id), KEY userid (userid) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gezählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat."); + setExtensionUpdateNotes("Turbo-Bonus wird in Tabelle gezählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat."); break; case '0.2.3': // SQL queries for v0.2.3 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='bonus' LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt."); + setExtensionUpdateNotes("Aktiv-Rallye mit Klick-Vergütung hinzugefügt."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.2.5': // SQL queries for v0.2.5 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Tabellen <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird."); + setExtensionUpdateNotes("Tabellen <u>{?_MYSQL_PREFIX?}_bonus_urls</u> und <u>{?_MYSQL_PREFIX?}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {?POINTS?} die an die schnellsten Klicker vergütet werden!)"); + setExtensionUpdateNotes("Turbo-Bonus klappt wieder (dies sind {?POINTS?} die an die schnellsten Klicker vergütet werden!)"); break; case '0.2.8': // SQL queries for v0.2.8 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET timestamp='0' WHERE timestamp='0000000000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); + setExtensionUpdateNotes("5 Nachkommastellen implementiert"); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgeführt."); + setExtensionUpdateNotes("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgeführt."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.3.4': // SQL queries for v0.3.4 - ADD_EXT_SQL("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)"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."); + setExtensionUpdateNotes("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."); break; case '0.3.5': // SQL queries for v0.3.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_mode` ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("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."); break; case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt."); + setExtensionUpdateNotes("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt."); break; case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitglieder-Account auwählbar, von dem die {?POINTS?} für den Aktiv- und Login-Bonus abgebucht werden."); + setExtensionUpdateNotes("Mitglieder-Account auwählbar, von dem die {?POINTS?} für den Aktiv- und Login-Bonus abgebucht werden."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); + setExtensionUpdateNotes("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); break; case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt."); + setExtensionUpdateNotes("Fehlende Variablen gefixt."); break; case '0.4.0': // SQL queries for v0.4.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*7).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_lines` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Automatisches Löschen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."); + setExtensionUpdateNotes("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 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vergütung des Aktiv-Bonus repariert."); + setExtensionUpdateNotes("Vergütung des Aktiv-Bonus repariert."); break; case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert."); + setExtensionUpdateNotes("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert."); break; case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von HTML-Bonus-Mails."); + setExtensionUpdateNotes("Verbesserung des Versandes von HTML-Bonus-Mails."); break; case '0.4.4': // SQL queries for v0.4.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bonus-{?POINTS?} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!<br />Eingestellte Bonus-{?POINTS?} für Rank 2 war um eins verschoben."); + setExtensionUpdateNotes("Bonus-{?POINTS?} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!<br />Eingestellte Bonus-{?POINTS?} für Rank 2 war um eins verschoben."); break; case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert."); + setExtensionUpdateNotes("Abzug vom Bonus-Account integriert."); break; case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {?POINTS?} gutgeschrieben."); + setExtensionUpdateNotes("Rank 2 bekommt nun auch seine {?POINTS?} gutgeschrieben."); break; case '0.4.7': // SQL queries for v0.4.7 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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."); break; case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt."); + setExtensionUpdateNotes("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt."); break; case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt."); + setExtensionUpdateNotes("Login-Bonus wird mit angezeigt."); break; case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset beseitigt."); + setExtensionUpdateNotes("Problem mit <strong>is_hundred</strong> beim täglichen Reset beseitigt."); break; case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit <strong>bonus_stats / Zeile 31</strong> beim täglichen Reset beseitigt."); + setExtensionUpdateNotes("Problem mit <strong>bonus_stats / Zeile 31</strong> beim täglichen Reset beseitigt."); break; case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.5.3': // SQL queries for v0.5.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{?POINTS?} für Platz 2 bis <strong>x</strong> korregiert."); + setExtensionUpdateNotes("Speichern der Aktiv-{?POINTS?} für Platz 2 bis <strong>x</strong> korregiert."); break; case '0.5.4': // SQL queries for v0.5.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben."); + setExtensionUpdateNotes("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben."); break; case '0.5.5': // SQL queries for v0.5.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet."); + setExtensionUpdateNotes("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet."); break; case '0.5.6': // SQL queries for v0.5.6 @@ -365,12 +362,12 @@ KEY userid (userid) $mark = mktime(0, 0, 0, $curr, 1, date('Y', time())); // Update accounts which are not active last months - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` + addExtensionSql("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` ASC"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch"."); + setExtensionUpdateNotes("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch"."); break; case '0.5.7': // SQL queries for v0.5.7 @@ -378,197 +375,203 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC"); case '0.5.8': // SQL queries for v0.5.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset endlich beseitigt."); + setExtensionUpdateNotes("Problem mit <strong>is_hundred</strong> beim täglichen Reset endlich beseitigt."); break; case '0.5.9': // SQL queries for v0.5.9 - EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt."); + setExtensionUpdateNotes("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt."); break; case '0.6.0': // SQL queries for v0.6.0 - EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt."); + setExtensionUpdateNotes("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt."); break; case '0.6.1': // SQL queries for v0.6.1 - EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert."); + setExtensionUpdateNotes("Versand von Bonus-Mails repariert."); break; case '0.6.2': // SQL queries for v0.6.2 - EXT_SET_UPDATE_NOTES("Löschen von bereits gelöschten Mails wird nun abgelehnt."); + setExtensionUpdateNotes("Löschen von bereits gelöschten Mails wird nun abgelehnt."); break; case '0.6.3': // SQL queries for v0.6.3 - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.6.4': // SQL queries for v0.6.4 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt."); + setExtensionUpdateNotes("Fehler mit bonus_stats beseitigt."); break; case '0.6.6': // SQL queries for v0.6.6 - EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich."); + setExtensionUpdateNotes("Template-Fehler beseitigt im Admin-Bereich."); break; case '0.6.7': // SQL queries for v0.6.7 - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.6.8': // SQL queries for v0.6.8 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='SEND' WHERE `data_type` != 'SEND' AND `data_type` != 'DELETED' AND `receivers`='' AND `target_send`='0'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND' WHERE `data_type` != 'SEND' AND `data_type` != 'DELETED' AND `receivers`='' AND `target_send`='0'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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!) - EXT_SET_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)."); + setExtensionUpdateNotes("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)."); break; case '0.7.0': // SQL queries for v0.7.0 - EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet."); + setExtensionUpdateNotes("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet."); break; case '0.7.1': // SQL queries for v0.7.1 - EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt."); + setExtensionUpdateNotes("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt."); break; case '0.7.2': // SQL queries for v0.7.2 - EXT_SET_UPDATE_NOTES("Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!"); + setExtensionUpdateNotes("Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!"); break; case '0.7.3': // SQL queries for v0.7.3 - EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{?POINTS?} werden nach Deaktivierung der Aktiv-Rallye gelöscht."); + setExtensionUpdateNotes("Gutgeschriebene Bonus-{?POINTS?} werden nach Deaktivierung der Aktiv-Rallye gelöscht."); break; case '0.7.4': // SQL queries for v0.7.4 - EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)"); + setExtensionUpdateNotes("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)"); break; case '0.7.5': // SQL queries for v0.7.5 - EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!"); + setExtensionUpdateNotes("Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!"); break; case '0.7.6': // SQL queries for v0.7.6 - EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig."); + setExtensionUpdateNotes("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig."); break; case '0.7.7': // SQL queries for v0.7.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."); + setExtensionUpdateNotes("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."); break; case '0.7.8': // SQL queries for v0.7.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt."); + setExtensionUpdateNotes("Fehler im täglichen Reset beseitigt."); break; case '0.7.9': // SQL queries for v0.7.9 - EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39"); + setExtensionUpdateNotes("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39"); break; case '0.8.0': // SQL queries for v0.8.0 - EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; case '0.8.1': // SQL queries for v0.8.1 - EXT_SET_UPDATE_NOTES("Bei {?POINTS?}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); + setExtensionUpdateNotes("Bei {?POINTS?}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); break; case '0.8.2': // SQL queries for v0.8.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."); + setExtensionUpdateNotes("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."); break; case '0.8.3': // SQL queries for v0.8.3 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.8.4': // SQL queries for v0.8.4 - EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt."); + setExtensionUpdateNotes("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt."); break; case '0.8.5': // SQL queries for v0.8.5 - EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates."); + setExtensionUpdateNotes("CSS-Klassenname gefixt in Templates."); break; case '0.8.6': // SQL queries for v0.8.6 - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.8.7': // SQL queries for v0.8.7 - ADD_EXT_SQL("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)"); + addExtensionSql("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 - EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); + setExtensionUpdateNotes("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); break; case '0.8.8': // SQL queries for v0.8.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes - EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); + setExtensionUpdateNotes("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) { + // Daily reset was run so let's check if active rallye is activated + if (getConfig('bonus_active') == 'Y') { + // Run active rallye + addIncludeToPool('reset', 'inc/monthly/monthly_bonus.php'); + } else { + // Reset points + addIncludeToPool('reset', 'inc/reset/reset_bonus.php'); + } + } // END - if + + // Check for bonus rallye is active and send mails out + if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) { + // Include file for sending out mails + addIncludeToPool('notify', 'inc/mails/bonus_mails.php'); + } // END - if + break; - default: // Do stuff when extension is loaded - if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) { - // Daily reset was run so let's check if active rallye is activated - if (getConfig('bonus_active') == 'Y') { - // Run active rallye - if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL('inc/stats_bonus.php'); - ADD_INC_TO_POOL('inc/monthly/monthly_bonus.php'); - } else { - // Reset points - ADD_INC_TO_POOL('inc/reset/reset_bonus.php'); - } - } + case 'init': // Do stuff when extension is initialized + break; - // Check for bonus rallye is active and send mails out - if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) { - // Include file for sending out mails - ADD_INC_TO_POOL('inc/mails/bonus_mails.php'); - } - break; -} + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index dc816ac270..0b27ad8ce3 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,79 +38,88 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Configuration entries - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 3).""); // Drop/create table for user bookings - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`"); + addExtensionSql("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', `mode` ENUM('add','sub') NOT NULL DEFAULT 'add', `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000, INDEX (`userid`), -PRIMARY KEY(`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Member points booking table'"); +PRIMARY KEY (`id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Member points booking table'"); // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"); - ADD_EXT_SQL("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"); + addExtensionSql("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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{?POINTS?}-Kontoauszug',5,'Y','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{?POINTS?}-Kontoauszug',5,'Y','Y')"); + + // Add the filters + registerFilter('add_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); + registerFilter('sub_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); break; case 'remove': // Do stuff when removing extension - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_booking','list_booking')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'"); + + // Remove the filters + unregisterFilter('add_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); + unregisterFilter('sub_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index a3e37ec027..e49f5d77ee 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,214 +39,216 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.2.3'); +setThisExtensionVersion('0.2.5'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); // Which load mode? -switch ($EXT_LOAD_MODE) { +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('cache_stats','config_config')"); // Unregister all filters - unregisterFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - unregisterFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - unregisterFilter('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); - unregisterFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - unregisterFilter('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); - unregisterFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - unregisterFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - unregisterFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - unregisterFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - unregisterFilter('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run); - unregisterFilter('shutdown', 'CACHE_DESTROY_FILTER', true, $dry_run); + unregisterFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); + unregisterFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); + unregisterFilter('extension_remove', 'CACHE_DESTROY_ALL', true, getExtensionDryRun()); + unregisterFilter('shutdown', 'CACHE_DESTROY_FILTER', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension // Which version? - switch ($EXT_VER) { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit berücksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus."); + setExtensionUpdateNotes("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit berücksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Cache-Update repariert."); + setExtensionUpdateNotes("Cache-Update repariert."); break; case '0.0.4': // SQL queries for v0.0.4 // Is the cache extension itself there? - if (EXT_IS_ACTIVE('cache')) { + if (isExtensionActive('cache')) { // Check for cache when extension is already installed - if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."); + setExtensionUpdateNotes("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert"); + setExtensionUpdateNotes("Registrierung der Cache-Erweiterung repariert"); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert."); + setExtensionUpdateNotes("Validierung der Cache-Datei admins.cache integriert."); break; case '0.0.7': // SQL queries for v0.0.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt."); + setExtensionUpdateNotes("Hits auf den Cache werden gezählt."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht."); + setExtensionUpdateNotes("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."); + setExtensionUpdateNotes("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt."); + setExtensionUpdateNotes("Problem mit fehlender admins-Erweiterung beseitigt."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken."); + setExtensionUpdateNotes("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert."); + setExtensionUpdateNotes("Die Tabelen <strong>{?_MYSQL_PREFIX?}_config</strong>, <strong>{?_MYSQL_PREFIX?}_refsystem</strong>, <strong>{?_MYSQL_PREFIX?}_refdepths</strong> und <strong>{?_MYSQL_PREFIX?}_mod_reg</strong> werden nun auch ausgelagert."); break; case '0.1.3': // SQL queries for v0.1.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("Ungültiges Update."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>."); + setExtensionUpdateNotes("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt."); + setExtensionUpdateNotes("Weitere Fehler im System beseitigt."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Probleme während des Installationsvorganges beseitigt."); + setExtensionUpdateNotes("Probleme während des Installationsvorganges beseitigt."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates."); + setExtensionUpdateNotes("CSS-Klassenname gefixt in Templates."); break; case '0.1.8': // SQL queries for v0.1.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht."); + setExtensionUpdateNotes("Daten von installierten Themes werden nun gecacht."); break; case '0.1.9': // SQL queries for v0.1.9 - ADD_EXT_SQL("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!) - EXT_SET_UPDATE_NOTES("Administratormenü experimentell gecacht."); + setExtensionUpdateNotes("Update nicht mehr gültig."); break; case '0.2.0': // SQL queries for v0.2.0 // This update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die Erweiterung hängt nun von der <strong>sql_patches</strong> ab."); + setExtensionUpdateNotes("Die Erweiterung hängt nun von der <strong>sql_patches</strong> ab."); break; case '0.2.1': // SQL queries for v0.2.1 // Register the new filter - registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); - registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); - registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); - registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - registerFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - registerFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - registerFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run); + registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); + registerFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); + registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt."); + setExtensionUpdateNotes("Filter für Erweiterungsmanagement hinzugefügt."); break; case '0.2.2': // SQL queries for v0.2.2 - // Register the new filter - registerFilter('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run); - registerFilter('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Filter hinzugefügt."); + setExtensionUpdateNotes("Update nicht mehr gültig."); break; case '0.2.3': // SQL queries for v0.2.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Cachen von Filtern hinzugefügt."); + setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); // Register a new filter - registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, $dry_run); + registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, getExtensionDryRun()); + break; + + case '0.2.4': // SQL queries for v0.2.4 + // SQL commands to run + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_cache')"); + + // Remove config entries + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_themes`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_admins`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_acls`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_exts`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_config`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_modreg`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_refdepth`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_refsys`"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Der Cache hat keine Konfiguration mehr."); + break; + + case '0.2.5': // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Daten von gefundenen Sprachdateien werden zu den Erweiterungen gecacht."); break; } break; @@ -257,21 +259,13 @@ switch ($EXT_LOAD_MODE) { case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; - default: // Do stuff when extension is loaded - // Create instance on class - if ($GLOBALS['cache_mode'] != 'init') { - // Initialize cache system only when it's needed - $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), 'inc/' . getConfig('cache_path'), getConfig('cache_tested')); - if ($GLOBALS['cache_instance']->getStatus() != 'done') { - // Failed to initialize cache sustem - addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE')); - } // END - if - } // END - if + case 'init': // Do stuff when extension is initialized break; -} -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 9285df742c..e83af64f2e 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,92 +38,94 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0.4'); +setThisExtensionVersion('0.0.4'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`"); + addExtensionSql("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', is_active ENUM('Y','N') NOT NULL DEFAULT 'N', -KEY(code), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); +KEY (code), +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='country'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"); + setExtensionUpdateNotes("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // ?> diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 8c5e4c4702..448816e0bd 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +// Keep this extension always active! +setExtensionAlwaysActive('Y'); + +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Table for debug log entries - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`"); + addExtensionSql("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', @@ -65,11 +66,11 @@ switch ($EXT_LOAD_MODE) `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, INDEX (`sender_id`), PRIMARY KEY (`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Debug log data'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Debug log data'"); // Table against debug log abuse - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`"); + addExtensionSql("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', @@ -77,11 +78,11 @@ PRIMARY KEY (`id`) `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, INDEX (`client_id`), PRIMARY KEY (`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Debug log abuse'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Debug log abuse'"); // Table on relay/server for client exchanges - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`"); + addExtensionSql("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 '', @@ -94,91 +95,92 @@ PRIMARY KEY (`id`) UNIQUE (`key`), UNIQUE (`url`), PRIMARY KEY (`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Debug clients'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Debug clients'"); // Add this exchange as first client - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{?URL?}','{?MAIN_TITLE?}','{?WEBMASTER?}','ACTIVE')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{?URL?}','{?MAIN_TITLE?}','{?WEBMASTER?}','ACTIVE')"); // Table for debug log <-> client connection - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`"); + addExtensionSql("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, INDEX `client_log` (`client_id`,`log_id`), UNIQUE (`log_id`), PRIMARY KEY (`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Debug client <-> log connection'"); // Guest menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"); // Admin menu - ADD_EXT_SQL("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 <strong>inc/cache/</strong> befindet.',10)"); - ADD_EXT_SQL("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 <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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 <strong>{?CACHE_PATH?}/</strong> befindet.',10)"); + addExtensionSql("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 <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{?SERVER_URL?}'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 30).""); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='debug'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='debug'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5"); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index 3cdb6dfc8f..d405148be5 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,57 +38,58 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0.1'); +setThisExtensionVersion('0.0.1'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); +setExtensionVersionHistory(array('0.0', '0.0.1')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 9a21068bbf..e28b7f3b68 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.6'); +setThisExtensionVersion('0.1.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Doubler table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`"); + addExtensionSql("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, @@ -62,193 +60,192 @@ remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', timemark VARCHAR(10) NOT NULL DEFAULT '', completed ENUM('Y','N') NOT NULL DEFAULT 'N', is_ref ENUM('Y','N') NOT NULL DEFAULT 'N', -KEY(refid), -KEY(userid), -PRIMARY KEY(id) +KEY (refid), +KEY (userid), +PRIMARY KEY (id) )TYPE=MYISAM"); // // --- SETTINGS --- // // Minimum points to double - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); // Maximum points to double - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); // Points left on users account after doubling - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); + addExtensionSql("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!) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); // Referal percents - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"); + addExtensionSql("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) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Total payed out points from your doublers - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("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! - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); + addExtensionSql("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) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*7).""); // Number of newest entries to display - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); // Number of entries which are already payed out - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); // Points used by every member - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Counter for usage of the doubler - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // // --- MENU SYSTEMS --- // // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{?POINTS?}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{?POINTS?}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"); + addExtensionSql("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) - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"); // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='doubler'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='doubler'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='doubler'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!"); + setExtensionUpdateNotes("Problem mit User-ID behoben!"); break; case '0.0.2': // SQL queries for v0.0.2 // Total used points - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen."); + setExtensionUpdateNotes("Gebühr wird vom Verdoppler-Pott abgezogen."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt."); + setExtensionUpdateNotes("Drei SQL-Fehler beseitigt."); break; 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) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."); + setExtensionUpdateNotes(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln übrige {?POINTS?} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert."); + setExtensionUpdateNotes("Counter-Stand und noch zum Verdoppeln übrige {?POINTS?} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert."); break; case '0.0.6': // SQL queries for v0.0.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); + setExtensionUpdateNotes("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order doubler!"); + setExtensionUpdateNotes("Bitte verschieben Sie die doubler-Templates (Ordner: {?PATH?}/templates/".getLanguage()."/html/) in den neuen Order doubler!"); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt."); + setExtensionUpdateNotes("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; case '0.1.4': // SQL queries for v0.1.4 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == 'RESET')) { - // So let's check for points - ADD_INC_TO_POOL('inc/doubler_send.php'); - } - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index c4669564e3..33e279e196 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,18 +39,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run break; @@ -68,26 +66,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 4b426590de..e302d77188 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,201 +38,203 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.2.1'); +setThisExtensionVersion('0.2.1'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Create database - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`"); + addExtensionSql("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, holiday_end VARCHAR(10) NOT NULL DEFAULT 0, comments LONGTEXT NOT NULL, KEY (userid), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); // Add default values to config - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); // Add member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"); // Add admin menus - ADD_EXT_SQL("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.')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"); - ADD_EXT_SQL("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!')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')"); + addExtensionSql("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.')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"); + addExtensionSql("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!')"); + addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='holiday' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('0','Urlaub')"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert."); + setExtensionUpdateNotes("Abspeichern der Urlaubsanfrage korregiert."); break; case '0.1.3': // SQL queries for v0.1.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='0' LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"); + setExtensionUpdateNotes("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"); break; case '0.1.4': // SQL queries for v0.1.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt."); + setExtensionUpdateNotes("Fehlende Tabellenspalte hinzugefügt."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); break; case '0.1.8': // SQL queries for v0.1.8 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"); + addExtensionSql("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_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); + setExtensionUpdateNotes("Erweiterung in's neue Menüsystem integriert."); break; case '0.1.9': // SQL queries for v0.1.9 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index fb554c5a60..59753a9d06 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,141 +38,143 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.6'); +setThisExtensionVersion('0.1.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', "0.0.51", "0.0.52", '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.51', '0.0.52', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP html"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` DROP html_msg"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` DROP html_msg"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='html_mail'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt)."); + setExtensionUpdateNotes("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt)."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.1.6': // Dependency is needed for ext-registration!! (want to alter a non existent Table) - EXT_ADD_UPDATE_DEPENDS('bonus'); - EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung <strong>bonus</strong> hinzugefügt."); + addExtensionUpdateDependency('bonus'); + setExtensionUpdateNotes("Abhänigkeit von der Erweiterung <strong>bonus</strong> hinzugefügt."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + // Valid HTML tags (only simple and no attributes!) + // @TODO Move these arrays into config + $GLOBALS['html_tags'] = array( + 'b', + 'i', + 'u', + 'ol', + 'ul', + 'li', + 'strong', + 'center', + 'left', + 'right', + 'br', + ); - default: // Do stuff when extension is loaded - // Valid HTML tags (only simple and no attributes!) - $GLOBALS['html_tags'] = array( - 'b', - 'i', - 'u', - 'ol', - 'ul', - 'li', - 'strong', - 'center', - 'left', - 'right', - 'br', - ); - - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $GLOBALS['url_ends'] = array( - ' ', - "\n", - "\r", - ')', - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $GLOBALS['valid_email_chars'] = array( - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', - 't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', - '2','3','4','5','6','7','8','9' + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // + $GLOBALS['url_ends'] = array( + ' ', + "\n", + "\r", + ')', + ); + + // Valid email chars (without @, or do you want to have another @ inside your email email?) + $GLOBALS['valid_email_chars'] = array( + 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', + 't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L', + 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', + '2','3','4','5','6','7','8','9' ); break; -} -// + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switc + +// [EOF] ?> diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index 3e28b63100..2029e85427 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -1,7 +1,7 @@ <?php /************************************************************************ * MXChange v0.2.1 Start: 06/06/2009 * - * ================ Last change: 06/06/2009 * + * ================ Last change: 10/23/2009 * * * * -------------------------------------------------------------------- * * File : ext-imprint.php * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,90 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); - -switch ($EXT_LOAD_MODE) -{ -case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - // SQL commands to run - break; - -case 'remove': // Do stuff when removing extension - // SQL commands to run - break; - -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); +setExtensionVersionHistory(array('0.0')); + +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='impressum' LIMIT 1"); + + // Extend guest menu + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','imprint','Impressum',4,'N','N')"); + + // Extend admin menu + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_imprint','Impressum','Einstellungen zum Impressum.',8)"); + + // Extend config with with entries + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `imprint_image_url` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `imprint_image_script` VARCHAR(255) NOT NULL DEFAULT ''"); + + // Create imprint data table + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_imprint_data` ( +`imprint_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`imprint_key` VARCHAR(255) NOT NULL DEFAULT '', +`imprint_value` VARCHAR(255) NOT NULL DEFAULT '', +UNIQUE (`imprint_key`), +PRIMARY KEY (`imprint_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Imprint data'"); + + // Init imprint data + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_imprint_data` (`imprint_key`) VALUES ('company'),('surname'),('family'),('street_nr1'),('street_nr2'),('zip'),('city'),('state'),('country'),('phone'),('fax'),('email'),('footer')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_imprint_data` SET `imprint_value`='{?WEBMASTER?}' WHERE `imprint_key`='email' LIMIT 1"); + break; + + case 'remove': // Do stuff when removing extension + // Guest menu + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='imprint' LIMIT 1"); + + // Admin menu + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_imprint' LIMIT 1"); + + // Imprint data + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`"); + break; + + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='N', `visible`='Y' WHERE `what`='imprint' LIMIT 1"); + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='Y', `visible`='N' WHERE `what`='imprint' LIMIT 1"); break; - } - break; -case 'modify': // When the extension got modified - break; + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); -case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; + + case 'modify': // When the extension got modified + break; -default: // Do stuff when extension is loaded - break; -} + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-iso3166.php b/inc/extensions/ext-iso3166.php index c245eef657..225d222c9d 100644 --- a/inc/extensions/ext-iso3166.php +++ b/inc/extensions/ext-iso3166.php @@ -18,7 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2008 by Wolfgang Stelzhammer * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,45 +39,42 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.1'); +setThisExtensionVersion('0.0.1'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); +setExtensionVersionHistory(array('0.0', '0.0.1')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;"); + addExtensionSql("DELETE FROM `{?_MYSQL_PREFIX?}_countries` WHERE provider = 'ext-iso3166';"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_countries` DROP `provider`;"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`) + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (`code`,`descr`,`provider`) VALUES ('AD', 'Andorra', 'ext-iso3166'), ('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'), ('AF', 'Afghanistan', 'ext-iso3166'), @@ -93,7 +90,7 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), ('AT', 'Österreich', 'ext-iso3166'), ('AU', 'Australien', 'ext-iso3166'), ('AW', 'Aruba', 'ext-iso3166'), -('AZ', 'Aserbaidschan', 'ext-iso3166'), +('AZ', 'Aserbadmin_idschan', 'ext-iso3166'), ('BA', 'Bosnien-Herzegowina', 'ext-iso3166'), ('BB', 'Barbados', 'ext-iso3166'), ('BD', 'Bangladesh', 'ext-iso3166'), @@ -323,23 +320,27 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), ('ZW', 'Zimbabwe', 'ext-iso3166');"); // This extension depends on the country extension - EXT_ADD_UPDATE_DEPENDS('country'); + addExtensionUpdateDependency('country'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen."); + setExtensionUpdateNotes("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } // [EOF] diff --git a/inc/extensions/ext-jackpot.php b/inc/extensions/ext-jackpot.php new file mode 100644 index 0000000000..420bcc8812 --- /dev/null +++ b/inc/extensions/ext-jackpot.php @@ -0,0 +1,93 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/23/2009 * + * ================ Last change: 10/23/2009 * + * * + * -------------------------------------------------------------------- * + * File : ext-jackpot.php * + * -------------------------------------------------------------------- * + * Short description : A lot jackpots * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Eine Menge Jackpots * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Version number +setThisExtensionVersion('0.0'); + +// Version history array (add more with , '0.1.0' and so on) +setExtensionVersionHistory(array('0.0')); + +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + break; + + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; + + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; + + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; + + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch + +// [EOF] +?> diff --git a/inc/extensions/ext-lead.php b/inc/extensions/ext-lead.php index 1115388401..00f88d00f3 100644 --- a/inc/extensions/ext-lead.php +++ b/inc/extensions/ext-lead.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run break; @@ -67,26 +65,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 88c5091572..55aeee596f 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,27 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='logs'"); break; case 'activate': // Do stuff when admin activates this extension @@ -70,26 +68,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index e07c73d283..4ea1fcdea8 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Mail confirmation link * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Mailbestaetigungslink * + * Kurzbeschreibung : Mailbestätigungslink * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,212 +38,213 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.3.3'); +setThisExtensionVersion('0.3.3'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Veraltetes Update."); + setExtensionUpdateNotes("Veraltetes Update."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder höher ist."); + setExtensionUpdateNotes("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder höher ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Absicherung der Variablen <em>uid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>."); + setExtensionUpdateNotes("Absicherung der Variablen <em>userid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben."); + setExtensionUpdateNotes("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("register_globals-Problem behoben"); + setExtensionUpdateNotes("register_globals-Problem behoben"); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mailbestätigung klappt wieder."); + setExtensionUpdateNotes("Mailbestätigung klappt wieder."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); + setExtensionUpdateNotes("5 Nachkommastellen implementiert"); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Bestätigung ohne Code auch klappt!"); + setExtensionUpdateNotes("Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Bestätigung ohne Code auch klappt!"); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgeführt."); + setExtensionUpdateNotes("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgeführt."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen."); + setExtensionUpdateNotes("Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt."); + setExtensionUpdateNotes("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); + setExtensionUpdateNotes("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt."); + setExtensionUpdateNotes("Fehlende Variablen gefixt."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Gesamt-{?POINTS?} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !"); + setExtensionUpdateNotes("Gesamt-{?POINTS?} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !"); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden)."); + setExtensionUpdateNotes("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden)."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt."); + setExtensionUpdateNotes("Parser-Fehler beseitigt."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben."); + setExtensionUpdateNotes("Fehler wegen fehlende Datenfeldelementen behoben."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern."); + setExtensionUpdateNotes("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{?POINTS?}-Anzahl in ein Komma umgewandelt."); + setExtensionUpdateNotes("Den Punkte in der Gesamt-{?POINTS?}-Anzahl in ein Komma umgewandelt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wenn die {?POINTS?} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)"); + setExtensionUpdateNotes("Wenn die {?POINTS?} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)"); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben."); + setExtensionUpdateNotes("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin geändert."); + setExtensionUpdateNotes("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin geändert."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugefügt."); + setExtensionUpdateNotes("Fehlende Templates hinzugefügt."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen."); + setExtensionUpdateNotes("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte das Template <em><strong>{?PATH?}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> löschen. Noices fixed."); + setExtensionUpdateNotes("Bitte das Template <em><strong>{?PATH?}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> löschen. Noices fixed."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert."); + setExtensionUpdateNotes("Variablen-Handling scripteweitgeändert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 361203118a..0345a064c7 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,86 +38,88 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0.6'); +setThisExtensionVersion('0.0.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"); - ADD_EXT_SQL("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')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"); + addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='maintenance'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // ?> diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index fec89b9eaa..1fd8d999e4 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,124 +38,129 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0.9'); +setThisExtensionVersion('0.0.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); + + // Add the filters + registerFilter('add_points', 'UPDATE_MEDIDADATA_ENTRY', false, true, getExtensionDryRun()); + registerFilter('sub_points', 'UPDATE_MEDIDADATA_ENTRY', false, true, getExtensionDryRun()); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_mediadata'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'"); + + // Remove the filters + unregisterFilter('add_points', 'UPDATE_MEDIDADATA_ENTRY', false, true, getExtensionDryRun()); + unregisterFilter('sub_points', 'UPDATE_MEDIDADATA_ENTRY', false, true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{?POINTS?} korregiert."); + setExtensionUpdateNotes("Berechnung der Gesamt-{?POINTS?} korregiert."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden."); + setExtensionUpdateNotes("Daten des Scriptes mit eingebunden."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); + setExtensionUpdateNotes("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; case '0.0.4': // SQL queries for v0.0.4 // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` ( -media_key VARCHAR(255) NOT NULL DEFAULT '', -media_value VARCHAR(255) NOT NULL DEFAULT '', -PRIMARY KEY(media_key) -) TYPE={!_TABLE_TYPE!}"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_mediadata` ( +`media_key` VARCHAR(255) NOT NULL DEFAULT '', +`media_value` VARCHAR(255) NOT NULL DEFAULT '', +PRIMARY KEY (media_key) +) TYPE={?_TABLE_TYPE?}"); + + // Add auto-check file + addIncludeToPool('extension', 'inc/gen_mediadata.php'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes berücksichtigen kann und <strong>nicht</strong> bereits gelöschter Mitglieder."); + setExtensionUpdateNotes("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes berücksichtigen kann und <strong>nicht</strong> bereits gelöschter Mitglieder."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden."); + setExtensionUpdateNotes("Mediendaten mussten komplett regeneriert werden."); break; case '0.0.7': // SQL queries for v0.0.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_start` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_stage` BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Start des {?MT_WORD2?} und Anzahl Anmeldungen aufgenommen. (Task #13)<br /> + setExtensionUpdateNotes("Start des {?mt_word2?} und Anzahl Anmeldungen aufgenommen. (Task #13)<br /> Bitte stellen Sie diesen derzeit manuell unter <a href=\"{?URL?}/modules.php?module=admin&what=config_mediadata\">Einstellungen-Medidata</a> selber einstellen."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.0.9': // SQL queries for v0.0.9 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkt wird durch diese Erweiterung generiert."); + setExtensionUpdateNotes("Menüpunkt wird durch diese Erweiterung generiert."); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; - - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'modify': // When the extension got modified + break; - default: // Do stuff when extension is loaded - break; -} + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; -if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) { - if ((!$dry_run) && ($EXT_LOAD_MODE == 'update') && ($EXT_VER == '0.0.4')) { - // Add auto-check file - ADD_INC_TO_POOL('inc/gen_mediadata.php'); - } // END - if -} // END - if + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-menu.php b/inc/extensions/ext-menu.php index 847362f63c..c850289ccf 100644 --- a/inc/extensions/ext-menu.php +++ b/inc/extensions/ext-menu.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,32 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0','0.0.1','0.0.2')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. <strong>Vorsicht!</strong> Löschen Sie nicht das Login-Menü!',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. <strong>Vorsicht!</strong> Löschen Sie nicht das Login-Menü!',2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',6)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='menu'"); break; case 'activate': // Do stuff when admin activates this extension @@ -75,26 +73,41 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `guest_menu_advert_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `member_menu_advert_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Insert menu entry + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','config_menu','Einstellungen','Einstellungen an den Gast- und Mitgliedsmenüs vornehmen.',7)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes("Gast- und Mitgliedsmenüs können nun Werbung zwischen den Menüblöcken einblenden."); break; - } - break; - case 'modify': // When the extension got modified - break; + case '0.0.2': // SQL queries for v0.0.2 + // Load the fix include + loadIncludeOnce('inc/fix_menu.php'); - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Doppelte Menüpunkte bereinigt."); break; + } // END - switch + break; - default: // Do stuff when extension is loaded - break; -} + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-mods.php b/inc/extensions/ext-mods.php index f0339f6a53..509197de14 100644 --- a/inc/extensions/ext-mods.php +++ b/inc/extensions/ext-mods.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,91 +38,93 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.8'); +setThisExtensionVersion('0.0.8'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='mods'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???"); + setExtensionUpdateNotes("Dummy-Release im Internet???"); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.0.8': // SQL queries for v0.0.8 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt."); + setExtensionUpdateNotes("Verwaltung auf Management umgestellt."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php index d582c195e9..b1c69fb263 100644 --- a/inc/extensions/ext-mydata.php +++ b/inc/extensions/ext-mydata.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,142 +38,143 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.8'); +setThisExtensionVersion('0.1.8'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach Änderung kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); + setExtensionUpdateNotes("Sperrung des Mitgliederprofiles nach Änderung kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); + setExtensionUpdateNotes("Anrede "Firma" hinzugefügt."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); + setExtensionUpdateNotes("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{?URL?}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br /> + setExtensionUpdateNotes("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{?URL?}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br /> <br /> <strong>Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".getLanguage()."/html/member/ !) mit hoch!</strong>"); // Depends on 'country'! - EXT_ADD_UPDATE_DEPENDS('country'); + addExtensionUpdateDependency('country'); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); + setExtensionUpdateNotes("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); + setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die Einstellungen können nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden."); + setExtensionUpdateNotes("Die Einstellungen können nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index ae35985c64..7a3f7ba086 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run break; @@ -67,26 +65,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index cacd843cd9..9a65082a83 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,146 +38,201 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.1.2'); +setThisExtensionVersion('0.2.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.2.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='newsletter'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='newsletter'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_topics`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_orders`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, usw.', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Einstellungen am Newsletter vornehmen.', 3)"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `nl_receive` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr."); + setExtensionUpdateNotes("Menüpunkte hinzufügen und Mitgliedereinstellung."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option <em>Immer aktiv</em> für diese Erweiterung deaktiviert."); + setExtensionUpdateNotes("URL im Versendeformular und Option <em>Immer aktiv</em> für diese Erweiterung deaktiviert."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php löschen!"); + setExtensionUpdateNotes("Bitte Script inc/monthly_newsletter.php löschen!"); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist."); + setExtensionUpdateNotes("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden."); + setExtensionUpdateNotes("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden."); + setExtensionUpdateNotes("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden."); break; case '0.1.1': // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Währung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren."); + setExtensionUpdateNotes("Währung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - } - break; - case 'modify': // When the extension got modified - break; + case '0.2.0': // SQL queries for v0.2.0 + // Tables: + // - Main data table + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_data` ( +`nl_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`nl_subject` VARCHAR(255) NOT NULL DEFAULT '{OPEN_CONFIG}nl_default_subject{CLOSE_CONFIG}', +`nl_header_text` MEDIUMTEXT, +`nl_footer_text` MEDIUMTEXT, +`nl_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +`nl_send` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', +`nl_ready` ENUM('Y','N') NOT NULL DEFAULT 'N', +`nl_sent` ENUM('Y','N') NOT NULL DEFAULT 'N', +`nl_expired` ENUM('Y','N') NOT NULL DEFAULT 'N', +`nl_do_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y', +`nl_recipients` BIGINT(20) NOT NULL DEFAULT 0, +`nl_received` BIGINT(20) NOT NULL DEFAULT 0, +`nl_total_clicks` BIGINT(20) NOT NULL DEFAULT 0, +PRIMARY KEY (`nl_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='General newsletter data'"); + + // - Topics data table + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_topics`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_topics` ( +`nl_topic_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`nl_id` BIGINT(20) NOT NULL DEFAULT '0', +`nl_topic_title` VARCHAR(255) NOT NULL DEFAULT '', +`nl_topic_text` MEDIUMTEXT, +INDEX `newsletter_id` (`nl_id`), +PRIMARY KEY (`nl_topic_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Newsletter topics'"); + + // - Sponsor orders data table + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_orders`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_orders` ( +`nl_order_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`nl_sponsor_id` BIGINT(20) NOT NULL DEFAULT 0, +`nl_id` BIGINT(20) NOT NULL DEFAULT 0, +`nl_topic_id` BIGINT(20) NOT NULL DEFAULT 0, +`nl_order_placed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +`nl_order_accepted` ENUM('Y','N') NOT NULL DEFAULT 'N', +UNIQUE KEY `sponsor_nl_topic` (`nl_sponsor_id`,`nl_id`,`nl_topic_id`), +INDEX `topic` (`nl_topic_id`), +PRIMARY KEY (`nl_order_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Newsletter orders'"); + + // Configuration + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 7).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 14).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_subject` VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_header` MEDIUMTEXT"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_footer` MEDIUMTEXT"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Admin menu + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', 'add_newsletter','Neuen erstellen','Legen Sie hier einen neuen Newsletter mit Betreff und Verfallsdatum an.', 1)"); - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Komplettüberarbeitung der Erweiterung, siehe neuer Beschreibungstext."); break; + } // END - switch + break; + + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $GLOBALS['url_ends'] = array( - ' ', - "\n", - "\r", - ')', - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $GLOBALS['valid_email_chars'] = array( - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', - 't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', - '2','3','4','5','6','7','8','9' + case 'init': // Do stuff when extension is initialized + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // @TODO Move these into configuration + $GLOBALS['url_ends'] = array( + ' ', + "\n", + "\r", + ')', ); - if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) { - // Daily reset was run so let's check out for expired newsletter orders - ADD_INC_TO_POOL('inc/monthly/monthly_newsletter.php'); - } + // Valid email chars (without @, or do you want to have another @ inside your email addresses?) + $GLOBALS['valid_email_chars'] = array( + 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', + 't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L', + 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', + '2','3','4','5','6','7','8','9' + ); + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); break; -} +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index 7b6c96c7b7..eec2bddcf1 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,148 +38,145 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.9'); +setThisExtensionVersion('0.1.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nick_userid ENUM ('nick','userid') NOT NULL DEFAULT 'userid'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='nickname'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE what IN ('config_nickname','list_nickname')"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1"); // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden."); + setExtensionUpdateNotes("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.6': // SQL queries for v0.0.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `nickname_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `nickname_pattern` VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `nickname_chars` VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_pattern` VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_chars` VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!"); + setExtensionUpdateNotes("Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!"); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.1': // SQL queries for v0.1.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP nick_userid"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt."); + setExtensionUpdateNotes("Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden."); + setExtensionUpdateNotes("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)"); + setExtensionUpdateNotes("CSS-Datei in general.css verschmolzen (Patch 435!)"); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen."); + setExtensionUpdateNotes("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.1.9': // SQL queries for v0.1.9 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` ( + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_nickname_history` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, nickname VARCHAR(255) NOT NULL DEFAULT '', @@ -187,23 +184,27 @@ added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, last_used TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', INDEX userid (userid), INDEX (last_used DESC), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!} COMMENT='History of used nicknames'"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?} COMMENT='History of used nicknames'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen."); + setExtensionUpdateNotes("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } // diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index 26e0ed743a..87e2208fe6 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,105 +38,107 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.5'); +setThisExtensionVersion('0.0.5'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -sid VARCHAR(32) NOT NULL DEFAULT '', -ip VARCHAR(15) NOT NULL DEFAULT '', -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -module VARCHAR(255) NOT NULL DEFAULT '', -action VARCHAR(255) NOT NULL DEFAULT '', -what VARCHAR(255) NOT NULL DEFAULT '', -is_admin ENUM('Y','N') NOT NULL DEFAULT 'N', -is_member ENUM('Y','N') NOT NULL DEFAULT 'N', -timestamp VARCHAR(10) NOT NULL DEFAULT 0, -PRIMARY KEY(id), -KEY(userid), -KEY(refid), + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_online` ( +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`sid` VARCHAR(32) NOT NULL DEFAULT '', +`ip` VARCHAR(15) NOT NULL DEFAULT '', +`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`module` VARCHAR(255) NOT NULL DEFAULT '', +`action` VARCHAR(255) NOT NULL DEFAULT '', +`what` VARCHAR(255) NOT NULL DEFAULT '', +`is_admin` ENUM('Y','N') NOT NULL DEFAULT 'N', +`is_member` ENUM('Y','N') NOT NULL DEFAULT 'N', +`timestamp` VARCHAR(10) NOT NULL DEFAULT 0, +PRIMARY KEY (`id`), +KEY (`userid`), +KEY (`refid`), KEY `admin_member` (`is_admin`,`is_member`) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)"); +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='usr_online'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='online'"); // Unregister filter - unregisterFilter('init', 'UPDATE_ONLINE_LIST', true, $dry_run); + unregisterFilter('init', 'UPDATE_ONLINE_LIST', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben."); + setExtensionUpdateNotes("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert."); + setExtensionUpdateNotes("Erstellung der Datenbanktabelle `{?_MYSQL_PREFIX?}_online` in diese Erweiterung ausgelagert."); break; case '0.0.5': // SQL queries for v0.0.5 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')"); // Register filter - registerFilter('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run); + registerFilter('init', 'UPDATE_ONLINE_LIST', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); + setExtensionUpdateNotes("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index f9f0461967..34b68946ff 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,91 +38,93 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0.6'); +setThisExtensionVersion('0.0.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`( + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_optimize_gain`( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, gain decimal(10,3) NOT NULL DEFAULT '0.000', - PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')"); + PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='optimize'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 528cabefde..1c802fcd01 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,130 +38,127 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.5.0'); +setThisExtensionVersion('0.5.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); + setExtensionUpdateNotes("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); break; case '0.1.1': // SQL queries for v0.1.1 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."); + setExtensionUpdateNotes("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt)."); + setExtensionUpdateNotes("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt)."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>."); + setExtensionUpdateNotes("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt."); + setExtensionUpdateNotes("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); + setExtensionUpdateNotes("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); break; case '0.2.3': // SQL queries for v0.2.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"); + setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); + setExtensionUpdateNotes("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt."); + setExtensionUpdateNotes("Speicherung der Einstellungen klappt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gewählt und + setExtensionUpdateNotes("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gewählt und nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {?POINTS?} auf dem Konto. Ein Rechenbeispiel: <ol> <li>Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.</li> @@ -176,133 +173,133 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler mit <u>__MIN_VALUE</u> behoben."); + setExtensionUpdateNotes("Fehler mit <u>__MIN_VALUE</u> behoben."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt."); + setExtensionUpdateNotes("Konstantenproblem beseitigt."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt."); + setExtensionUpdateNotes("Problem mit nicht funktionierenden Mailbuchungen beseitigt."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist."); + setExtensionUpdateNotes("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist."); break; case '0.3.1': // SQL queries for v0.3.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet."); + setExtensionUpdateNotes("Beworbene URL wird nun getestet."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgewählt."); + setExtensionUpdateNotes("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgewählt."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben."); + setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben."); break; case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."); + setExtensionUpdateNotes("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."); break; case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet."); + setExtensionUpdateNotes("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet."); break; case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); + setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert."); + setExtensionUpdateNotes("Mailbuchungsseite korregiert."); break; case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben."); + setExtensionUpdateNotes("Erneuten Fehler in Mailbuchungsseite behoben."); break; case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!"); + setExtensionUpdateNotes("{?POINTS?}-Abzug klappt wieder. Danke an Andreman!"); break; case '0.4.1': // SQL queries for v0.4.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert."); + setExtensionUpdateNotes("Neue Urlaubsschaltung mit integriert."); break; case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ein <strong>WHERE `ext_active`='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."); + setExtensionUpdateNotes("Ein <strong>WHERE `ext_active`='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."); break; case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; case '0.4.6': // SQL queries for v0.4.6 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.4.8': // SQL queries for v0.4.8 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."); + setExtensionUpdateNotes("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."); break; case '0.4.9': // SQL queries for v0.4.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen."); + setExtensionUpdateNotes("Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen."); break; case '0.5.0': // SQL queries for v0.5.0 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `url` VARCHAR(255) NOT NULL DEFAULT '', `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -312,25 +309,32 @@ INDEX (`pool_id`) ) TYPE=MYISAM COMMENT='URL blacklist'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Tabelle für URL-Sperrliste angelegt."); + setExtensionUpdateNotes("Tabelle für URL-Sperrliste angelegt."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) { - // Reset mail order values - $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); - } // END - if - break; + case 'init': // Do stuff when extension is initialized + // Do daily reset only when installed and extension version is at least 0.1.1 + if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (getExtensionVersion('order') >= '0.1.1')) { + // Reset mail order values + $result_ext = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); + } // END - if + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 16f0977f3b..cd8ed9f78c 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,91 +38,91 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.2.1'); +setThisExtensionVersion('0.2.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); + setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet."); + setExtensionUpdateNotes("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion adminSaveSettings() verwendet."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.4': // SQL queries for v0.0.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden."); + setExtensionUpdateNotes("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen endlich beseitigt."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!"); + setExtensionUpdateNotes("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!"); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern der Einstellungen repariert."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Folgende Einstellungen können auf 0 gesetzt werden: + setExtensionUpdateNotes("Folgende Einstellungen können auf 0 gesetzt werden: <ol> <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li> <li>Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)</li> @@ -134,83 +134,91 @@ switch ($EXT_LOAD_MODE) case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten."); + setExtensionUpdateNotes("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt."); + setExtensionUpdateNotes("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden."); + setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden."); break; case '0.1.7': // SQL queries for v0.1.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt."); + setExtensionUpdateNotes("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."); + setExtensionUpdateNotes("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."); break; case '0.1.9': // SQL queries for v0.1.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); + setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); + setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); break; case '0.2.1': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar."); + setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar."); + break; + + case '0.2.2': // SQL queries for v0.2.2 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `display_debug_sqls` ENUM('N','Y') NOT NULL DEFAULT 'N'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 942ec53941..85e6ad3861 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version of this extension -EXT_SET_VERSION('0.3.8'); +setThisExtensionVersion('0.3.8'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_payouts` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, payout_total FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', @@ -62,193 +60,197 @@ target_bank VARCHAR(255) NOT NULL DEFAULT '', payout_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, payout_timestamp VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('NEW','ACCEPTED','REJECTED') NOT NULL DEFAULT 'NEW', -KEY(userid), -KEY(payout_id), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` ( +KEY (userid), +KEY (payout_id), +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_payout_types` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, type VARCHAR(255) NOT NULL DEFAULT '', rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='payouts'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='payout'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.1.2': // SQL queries for v0.1.2 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1"); break; case '0.1.3': // SQL queries for v0.1.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'"); break; case '0.1.4': // SQL queries for v0.1.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''"); break; case '0.1.5': // SQL queries for v0.1.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD target_url LONGTEXT NOT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD banner_url LONGTEXT NOT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'"); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>."); + setExtensionUpdateNotes("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert."); + setExtensionUpdateNotes("5 Nachkommastellen implementiert."); break; case '0.2.1': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert"); + setExtensionUpdateNotes("Buttons aus Aufgabenauflisten ausgelagert"); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert."); + setExtensionUpdateNotes("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut."); + setExtensionUpdateNotes("Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet."); + setExtensionUpdateNotes("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist."); + setExtensionUpdateNotes("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anzahl zu überweisende {?POINTS?} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab."); + setExtensionUpdateNotes("Anzahl zu überweisende {?POINTS?} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab."); break; case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.3.7': // SQL queries for v0.3.7 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt."); + setExtensionUpdateNotes("Verwaltung nach Management umgestellt."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index f27b5455f2..bd4473adba 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -12,7 +12,14 @@ * -------------------------------------------------------------------- * * Modified payout extension! See: http://www.mxchange.org for details * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -33,22 +40,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version of this extension -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_primera` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, primera_account VARCHAR(255) NOT NULL DEFAULT '', @@ -57,64 +62,67 @@ primera_timestamp VARCHAR(10) NOT NULL DEFAULT 0, primera_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', primera_api_message TINYTEXT, primera_api_status VARCHAR(255) NULL DEFAULT NULL, -KEY(userid), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +KEY (userid), +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); //Â Confiuration - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''"); // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''"); // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"); // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='primera'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='primera'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } // diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index c9cc6d0a87..befdac57d1 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,102 +38,100 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.9'); +setThisExtensionVersion('0.0.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); -switch ($EXT_LOAD_MODE) +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim tägichen Reset ausgesendet"); + setExtensionUpdateNotes("Benachrichtungsmails werden nur beim tägichen Reset ausgesendet"); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); + setExtensionUpdateNotes("5 Nachkommastellen implementiert"); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm..."); + setExtensionUpdateNotes("Dummy-Release im Intranet??? Hmmm..."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> > 0 sind."); + setExtensionUpdateNotes("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> > 0 sind."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Namenskonflikt gelösst mit Erweiterung <strong>update</strong> (kommt noch raus!)"); + setExtensionUpdateNotes("Namenskonflikt gelösst mit Erweiterung <strong>update</strong> (kommt noch raus!)"); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // Do we have a daily-reset-run? - if (isResetModeEnabled() && (!isDebugModeEnabled()) && (getOutputMode() != 1)) { - // So let's check for profiles which needs an update - ADD_INC_TO_POOL('inc/profile-updte.php'); - } - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 38c9b218ff..2042216856 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.3.5'); +setThisExtensionVersion('0.3.5'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, title VARCHAR(255) NOT NULL DEFAULT '', @@ -69,161 +67,160 @@ send_notify ENUM('Y','N') NOT NULL DEFAULT 'Y', notified ENUM('Y','N') NOT NULL DEFAULT 'N', KEY (admin_id), PRIMARY KEY (id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` ( +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_prices` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, info LONGTEXT NOT NULL, KEY (rallye_id), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` ( +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_users` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, refs BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY (rallye_id), KEY (userid), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')"); // Guest menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); break; case 'remove': // Do stuff when removing extension // Drop tables - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`"); // Remove menus - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='rallye'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='rallyes'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='rallyes'"); // Unregister filter - unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run); + unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert."); + setExtensionUpdateNotes("Ablaufen der Rallyes intergriert."); break; case '0.0.2': // SQL queries for v0.0.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Aktueller {?POINTS?}-Stand wird beachtet."); + setExtensionUpdateNotes("Aktueller {?POINTS?}-Stand wird beachtet."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben."); + setExtensionUpdateNotes("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert"); + setExtensionUpdateNotes("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert"); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt."); break; case '0.1.0': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert."); + setExtensionUpdateNotes("5 Nachkommastellen implementiert."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben."); + setExtensionUpdateNotes("Anzeigefehler im Gast-/Mitgliedsbereich behoben."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Admin-Mails korregiert."); + setExtensionUpdateNotes("Admin-Mails korregiert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)"); + setExtensionUpdateNotes("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)"); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert."); + setExtensionUpdateNotes("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert."); + setExtensionUpdateNotes("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert."); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br /> + setExtensionUpdateNotes("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br /> <ul> <li>$DATA[min_users]</li> <li>$DATA[min_prices]</li> @@ -237,138 +234,156 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert."); + setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> geändert."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkt "Rallyes verwalten" repariert."); + setExtensionUpdateNotes("Menüpunkt "Rallyes verwalten" repariert."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert."); + setExtensionUpdateNotes("Automatisches Starten von Referal-Rallyes repariert."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt."); + setExtensionUpdateNotes("Fatalen Fehler beseitigt."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."); + setExtensionUpdateNotes("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."); break; case '0.3.2': // SQL queries for v0.3.2 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist."); + setExtensionUpdateNotes("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; case '0.3.5': // SQL queries for 0.3.5 // This update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Register filter - registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run); + registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); + setExtensionUpdateNotes("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); break; } break; - case 'modify': // When the extension got modified - break; - - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; - - default: // Do stuff when extension is loaded - // Do stuff only when not in CSS mode - if ((getOutputMode() != '1') && (getOutputMode() != '-1') && ($GLOBALS['cache_mode'] != 'init')) { - // Get total member count - $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true); + case 'modify': // When the extension got modified + break; - // Add more data on higher versions - $ADD1 = ''; $ADD2 = ''; $OR = ''; - if (GET_EXT_VERSION('rallye') >= '0.2.0') { - $ADD1 = ", min_users, min_prices"; - $ADD2 = ", d.min_users, d.min_prices"; - $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)"; - } // END - if + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - // Check for new started but not notified rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1." -FROM `{!_MYSQL_PREFIX!}_rallye_data` -WHERE is_active='Y' AND notified='N' AND expired='N' AND start_time <= UNIX_TIMESTAMP() AND end_time > UNIX_TIMESTAMP() + case 'init': // Do stuff when extension is initialized + // Do stuff only when not in CSS mode + // @TODO Move this code into rallye_functions.php + if (getOutputMode() != '1') { + // Get total member count + $total = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true); + + // Add more data on higher versions + $ADD1 = ''; $ADD2 = ''; $OR = ''; + if (getExtensionVersion('rallye') >= '0.2.0') { + $ADD1 = ", `min_users`, `min_prices`"; + $ADD2 = ", d.min_users, d.min_prices"; + $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)"; + } // END - if + + // Check for new started but not notified rallyes + $result = SQL_QUERY("SELECT SQL_SMALL_RESULT + `id`, `t`itle`, `start_time`, `end_time`, `send_notify`".$ADD1." +FROM + `{?_MYSQL_PREFIX?}_rallye_data` +WHERE + `is_active`='Y' AND + `notified`='N' AND + `expired`='N' AND + `start_time` <= UNIX_TIMESTAMP() AND + `end_time` > UNIX_TIMESTAMP() LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Start rallye - RALLYE_AUTOSTART_RALLYES($result); - } // END - if - - // Free memory - SQL_FREERESULT($result); - - // Check for expired rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2." -FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d -WHERE d.is_active='Y' AND d.notified='Y' AND d.expired='N' AND (d.end_time <= UNIX_TIMESTAMP()".$OR.") + if (SQL_NUMROWS($result) == 1) { + // Start rallye + autostartReferalRallyes($result); + } // END - if + + // Free memory + SQL_FREERESULT($result); + + // Check for expired rallyes + $result = SQL_QUERY("SELECT SQL_SMALL_RESULT + d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2." +FROM + `{?_MYSQL_PREFIX?}_rallye_data` AS d +WHERE + d.is_active='Y' AND + d.notified='Y' AND + d.expired='N' AND + (d.end_time <= UNIX_TIMESTAMP()".$OR.") LIMIT 1", __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) { - // End rallye here... - RALLYE_EXPIRE_RALLYES($result); - } // END - if + if ((SQL_NUMROWS($result) == 1) && (isExtensionActive('autopurge'))) { + // End rallye here... + markReferalRallyesAsExpired($result); + } // END - if + + // Free memory + SQL_FREERESULT($result); + } // END - if + break; - // Free memory - SQL_FREERESULT($result); - } // END - if - break; -} + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index f8240e72db..161c8e6aa7 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.1'); +setThisExtensionVersion('0.0.1'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0','0.0.1')); +setExtensionVersionHistory(array('0.0','0.0.1')); -switch ($EXT_LOAD_MODE) +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_refs` ( `id` BIGINT(20) UNSIGNED NOT NULL auto_increment, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0, @@ -64,60 +63,59 @@ PRIMARY KEY (`id`), UNIQUE `user_refid` (`userid`,`level`,`refid`), KEY (`level`), KEY (`refid`) -) ENGINE={!_TABLE_TYPE!} COMMENT='User Referals With Refback'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')"); +) ENGINE={?_TABLE_TYPE?} COMMENT='User Referals With Refback'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')"); + + // Execute this special file on registration + addIncludeToPool('extension', 'inc/gen_refback.php'); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='refback'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE what IN('config_refback','list_refback')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET level=level-1"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_min_perc` TINYINT(3) NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_max_perc` TINYINT(3) NOT NULL DEFAULT 100"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar."); + setExtensionUpdateNotes("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // When the refback is not installed we cannot load it's configuration... *sigh* - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Shall we include special files? -if ($EXT_LOAD_MODE == 'register') { - // Execute this special file on this update - ADD_INC_TO_POOL('inc/gen_refback.php'); -} // END - if + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index eea13dcb56..3cdd1aff5b 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,297 +38,324 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.5.2'); +setThisExtensionVersion('0.5.4'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_register'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`"); + + // Unregister a filter + unregisterFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_must_register` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, field_name VARCHAR(255) NOT NULL DEFAULT '', field_required ENUM('Y','N') NOT NULL DEFAULT 'Y', -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!) - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('surname','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('family','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('street_nr','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('cntry','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('zip','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('city','Y')"); // Add admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten ändern</strong> ein.', 12)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten ändern</strong> ein.', 12)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt."); + setExtensionUpdateNotes("Einstellbare Pflichtfelder hinzugefügt."); break; case '0.1.1': // SQL queries for v0.1.1 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1"); // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); + setExtensionUpdateNotes("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); break; case '0.1.3': // SQL queries for v0.1.3 // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); + setExtensionUpdateNotes("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template"); + setExtensionUpdateNotes("Konfiguration der Pflichtangaben ausgelagert in Template"); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"); + setExtensionUpdateNotes("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sämtliche Sperren bei eingeloggten Admin deaktiviert."); + setExtensionUpdateNotes("Sämtliche Sperren bei eingeloggten Admin deaktiviert."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Cookie <u>refid</u> aus Anmeldeformular entfernt."); + setExtensionUpdateNotes("Cookie <u>refid</u> aus Anmeldeformular entfernt."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt."); + setExtensionUpdateNotes("Referal-ID wird endlich korrekt gesetzt."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Parse error in <u>what-register.php</u> beseitigt."); + setExtensionUpdateNotes("Parse error in <u>what-register.php</u> beseitigt."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); + setExtensionUpdateNotes("Anrede "Firma" hinzugefügt."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); + setExtensionUpdateNotes("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{?URL?}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br /> + setExtensionUpdateNotes("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{?URL?}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br /> <br /> <strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!</strong>"); // Depends on 'country' - EXT_ADD_UPDATE_DEPENDS('country'); + addExtensionUpdateDependency('country'); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); + setExtensionUpdateNotes("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"); + setExtensionUpdateNotes("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"); break; case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."); + setExtensionUpdateNotes("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."); break; case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt."); + setExtensionUpdateNotes("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt."); break; case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt."); + setExtensionUpdateNotes("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt."); break; case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert."); + setExtensionUpdateNotes("Weitere SQL-Befehle abgesichert."); break; case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.4.1': // SQL queries for v0.4.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); break; case '0.4.2': // SQL queries for v0.4.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig."); + setExtensionUpdateNotes("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig."); break; case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt."); + setExtensionUpdateNotes("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt."); break; case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."); + setExtensionUpdateNotes("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."); break; case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); break; case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Einstellung nach {?POINTS?}-Einstellungen verlagert."); + setExtensionUpdateNotes("Einstellung nach {?POINTS?}-Einstellungen verlagert."); break; case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + setExtensionUpdateNotes("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."); + setExtensionUpdateNotes("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."); break; case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{?PATH?}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt."); + setExtensionUpdateNotes("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{?PATH?}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt."); break; case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> für die Fehlerfindung!"); + setExtensionUpdateNotes("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> für die Fehlerfindung!"); break; case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - } - break; - case 'modify': // When the extension got modified - break; + case '0.5.3': // SQL queries for v0.5.3 + // Register a filter + registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, getExtensionDryRun()); - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + // Run these SQLs + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('email','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('birthday','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('marker','Y')"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter <strong>register_must_fillout</strong> hinzugefügt, weitere Felder in <em>{?_MYSQL_PREFIX?}_must_register</em> eingefügt."); break; - default: // Do stuff when extension is loaded + case '0.5.4': // SQL queries for v0.5.4 + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register2','Anmeldeformular','Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!',8)"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Weiteren Menüpunkt aus <strong>menu-{?DEFAULT_LANG?} heraus geholt."); break; -} -// + } // END - switch + break; + + case 'modify': // When the extension got modified + break; + + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch + +// [EOF] ?> diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index a0badaf25b..10b40389b3 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,37 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.1'); +setThisExtensionVersion('0.0.1'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); +setExtensionVersionHistory(array('0.0', '0.0.1')); -switch ($EXT_LOAD_MODE) +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip'"); // Remove filters - unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run); + unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -81,30 +80,33 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Add filters - registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run); + registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); + setExtensionUpdateNotes("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index 02fc566bb9..c1b6b8f30f 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,96 +38,97 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.6'); +setThisExtensionVersion('0.1.6'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='repair'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu."); + setExtensionUpdateNotes("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm...."); + setExtensionUpdateNotes("Dummy-Release im Intranet??? Hmmmm...."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ungütiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig)."); + setExtensionUpdateNotes("Ungütiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig)."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren"); + setExtensionUpdateNotes("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren"); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index 09c757717f..253e53d227 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,143 +38,144 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.3'); +setThisExtensionVersion('0.1.3'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3')); // This extension is deprecated! -// Only since 'seo' is ready! EXT_SET_DEPRECATED('Y'); +// Only since 'seo' is ready! setExtensionDeprecated('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); + if (!isApacheModuleLoaded('mod_rewrite')) { + setExtensionReportsFailure(true); addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); } // END - if // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_rewrite'"); break; case 'activate': // Do stuff when admin activates this extension // Check if mod_rewrite is loadeded if (!isApacheModuleLoaded('mod_rewrite')) { - SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); - EXT_SET_REPORTS_FAILURE(true); + SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); + setExtensionReportsFailure(true); addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); } // END - if // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset"); + setExtensionUpdateNotes("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset"); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search"); + setExtensionUpdateNotes("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search"); case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({?SERVER_URL?}) sind nun auch wieder gültig."); + setExtensionUpdateNotes("URLs zu MXChange.org ({?SERVER_URL?}) sind nun auch wieder gültig."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home"); + setExtensionUpdateNotes("Folgende Linkvariablen werden nun auch ausgetausch: sub, home"); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend fällt die neue .htaccess-Datei kleiner aus. Bitte anpassen!"); + setExtensionUpdateNotes("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend fällt die neue .htaccess-Datei kleiner aus. Bitte anpassen!"); case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben."); + setExtensionUpdateNotes("Links im Frametester-Modul werden nicht mehr umgeschrieben."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.9': // SQL queries for v0.0.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zu überspringende Module können per Admin-Bereich eingestellt werden."); + setExtensionUpdateNotes("Zu überspringende Module können per Admin-Bereich eingestellt werden."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.3': // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); + if (!isApacheModuleLoaded('mod_rewrite')) { + setExtensionReportsFailure(true); //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); } // END - if - EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."); + setExtensionUpdateNotes("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); - SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); - if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); - } // END - if - break; + case 'init': // Do stuff when extension is initialized + // Check if mod_rewrite is loadeded + if (!isApacheModuleLoaded('mod_rewrite')) { + setExtensionReportsFailure(true); + SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); + if (!isAdmin()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); + } // END - if + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index b72d7f41dc..93006e7cc3 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,18 +39,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run break; @@ -68,26 +66,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-seo.php b/inc/extensions/ext-seo.php index cd16c20149..f4ae90b684 100644 --- a/inc/extensions/ext-seo.php +++ b/inc/extensions/ext-seo.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,56 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ -case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - // SQL commands to run - break; +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + case 'modify': // When the extension got modified break; - } - break; -case 'modify': // When the extension got modified - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; -case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'init': // Do stuff when extension is initialized + break; -default: // Do stuff when extension is loaded - break; -} + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index e5ee8229d9..af8f8e702a 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,30 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // // SQL commands to run // // Try to make it depend on repair - EXT_ADD_UPDATE_DEPENDS('repair'); + addExtensionUpdateDependency('repair'); // // Sponsor data // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, company VARCHAR(255) NOT NULL DEFAULT '', position VARCHAR(255) NOT NULL DEFAULT '', @@ -85,7 +84,7 @@ last_online VARCHAR(10) NOT NULL DEFAULT 0, last_change VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('UNCONFIRMED','PENDING','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED', receive_warnings ENUM('Y','N') NOT NULL DEFAULT 'Y', -warning_interval BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."', +warning_interval BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('ONE_DAY')*7)."', points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, points_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -93,18 +92,18 @@ ref_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, hash VARCHAR(32) NOT NULL DEFAULT '', last_pay FLOAT(7,2) UNSIGNED NOT NULL DEFAULT '0.00', last_curr VARCHAR(255) NOT NULL DEFAULT '€', -KEY(refid), -KEY(email), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (refid), +KEY (email), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Sponsor orders // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_orders` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, regid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, payid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, pay_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -113,39 +112,39 @@ pay_ordered VARCHAR(10) NOT NULL DEFAULT 0, pay_done VARCHAR(10) NOT NULL DEFAULT 0, KEY (payid), KEY (regid), -KEY (aid), +KEY (admin_id), KEY (sponsorid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Pay-types // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_paytypes` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, pay_name VARCHAR(255) NOT NULL DEFAULT '', pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, pay_currency VARCHAR(255) NOT NULL DEFAULT '€', -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Points-to-action converting // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_action_convert` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, conv_name VARCHAR(255) NOT NULL DEFAULT 'Mails', KEY (ext_name), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Sponsor menu system (default) // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_menu` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, action VARCHAR(255) NOT NULL DEFAULT '', what VARCHAR(255) NULL DEFAULT NULL, @@ -154,41 +153,41 @@ active ENUM('Y','N') NOT NULL DEFAULT 'N', sort BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY (action), UNIQUE KEY (what), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Registry for performable actions by your sponsors // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_registry` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', is_active ENUM('Y','N') NOT NULL DEFAULT 'N', stamp_added VARCHAR(10) NOT NULL DEFAULT 0, -KEY(ext_name), -KEY(aid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (ext_name), +KEY (admin_id), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // URLs from the sponsors // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_urls` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', title VARCHAR(255) NOT NULL DEFAULT '', clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', -KEY(sponsorid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (sponsorid), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Banners of any size from the sponsors // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_banner` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', @@ -197,17 +196,17 @@ width INT(7) UNSIGNED NOT NULL DEFAULT 468, height INT(7) UNSIGNED NOT NULL DEFAULT 60, views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', -KEY(sponsorid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (sponsorid), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Campaigns // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaigns` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, campaign_name VARCHAR(255) NOT NULL DEFAULT '', campaign_start VARCHAR(10) NOT NULL DEFAULT 0, campaign_end VARCHAR(10) NOT NULL DEFAULT 0, @@ -218,213 +217,216 @@ campaign_ended VARCHAR(10) NOT NULL DEFAULT 0, locked_reason TINYTEXT, locked_timestamp VARCHAR(10) NOT NULL DEFAULT 0, status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', -KEY(aid), -KEY(sponsorid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (admin_id), +KEY (sponsorid), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Campaigns + URLs + Banner // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, bannerid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, views BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -KEY(bannerid), -KEY(urlid), -KEY(campaignid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (bannerid), +KEY (urlid), +KEY (campaignid), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Allowed data to display (administrative) // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_admin_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, data_row VARCHAR(255) NOT NULL DEFAULT '', display ENUM('Y','N') NOT NULL DEFAULT 'N', -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Allowed data to display (sponsor-side) // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_display_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, data_row VARCHAR(255) NOT NULL DEFAULT '', display ENUM('Y','N') NOT NULL DEFAULT 'N', -KEY(sponsorid), -PRIMARY KEY(id) -)TYPE={!_TABLE_TYPE!}"); +KEY (sponsorid), +PRIMARY KEY (id) +)TYPE={?_TABLE_TYPE?}"); // // Default allowed data to display // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('id','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('position','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('family','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('url','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('password','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('status','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')"); // // Add default entries // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_registry` (ext_name, is_active, admin_id, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')"); // // Admin menu // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {?POINTS?}-Pakete kaufen. Hier können Sie diese verwalten.', 14)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{?POINTS?} umwandeln...','Mit den vom Sponsor gekauften {?POINTS?} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {?POINTS?} nach Sponsoraktionen um. Beispiel: 1 {?POINTS?} = 10 Mails.', 15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {?POINTS?}-Pakete kaufen. Hier können Sie diese verwalten.', 14)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{?POINTS?} umwandeln...','Mit den vom Sponsor gekauften {?POINTS?} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {?POINTS?} nach Sponsoraktionen um. Beispiel: 1 {?POINTS?} = 10 Mails.', 15)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)"); // // Menu system (still admin menu) // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)"); // // Guest menu // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)"); // // Member menu // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)"); // // Add default menus to sponsor menu // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)"); // // General configuration stuff // - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='sponsor'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='sponsor'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET active='Y' WHERE active='N'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET is_active='Y' WHERE is_active='N'"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET active='N' WHERE active='Y'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET is_active='N' WHERE is_active='Y'"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 36e651a4f4..3f7a340e15 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,31 +38,33 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Version number -EXT_SET_VERSION('0.6.4'); +setThisExtensionVersion('0.6.5'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5')); -switch ($EXT_LOAD_MODE) { +// Keep this extension always active! +setExtensionAlwaysActive('Y'); + +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // Drop tables - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_las`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_las_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_stats`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_filters`"); // Delete admin menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_extensions' OR `what`='config_home' OR `what`='list_unconfirmed' OR @@ -75,14 +77,14 @@ switch ($EXT_LOAD_MODE) { `what`='list_filter'"); // Delete/update member menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='stats2' OR `what`='reflist' OR (`action`='stats' AND (`what`='' OR `what` IS NULL)) OR (`action`='extras' AND (`what`='' OR `what` IS NULL)) OR (`action`='rals' AND (`what`='' OR `what` IS NULL)) OR (`action`='account' AND (`what`='' OR `what` IS NULL))"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='main' WHERE `action`='stats' OR `action`='extras' OR `action`='rals' OR @@ -90,212 +92,212 @@ switch ($EXT_LOAD_MODE) { // Drop indexes /* @TODO SQL_ALTER_TABLE() should work now properly - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP UNIQUE KEY `ext_name`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP UNIQUE KEY `login`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refbanner` DROP INDEX `visible`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` DROP UNIQUE KEY `level`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` DROP INDEX `data_type`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` DROP UNIQUE KEY `module`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` DROP INDEX `action`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` DROP INDEX `task_type`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` DROP INDEX `status`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` DROP INDEX `task_created`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` DROP FULLTEXT `subject`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` DROP INDEX `subject`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP INDEX `ext_active`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `action`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `sort`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `visible`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `locked`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP INDEX `sort`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP INDEX `visible`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP INDEX `locked`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_cats` DROP INDEX `visible`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_cats` DROP INDEX `sort`"); */ break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `ext_autopurge` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ext_autopurge` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen."); + setExtensionUpdateNotes("Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen."); break; case '0.0.2': // SQL queries for v0.0.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `auto_purge` `auto_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `auto_purge` `auto_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*14).""); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"); + setExtensionUpdateNotes("In der Tabelle <strong>{?_MYSQL_PREFIX?}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"); break; case '0.0.3': // SQL queries for v0.0.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `points_word` VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `points_word` VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben."); + setExtensionUpdateNotes("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben."); break; case '0.0.4': // SQL queries for v0.0.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `mails_page` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mails_page` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugefügt."); + setExtensionUpdateNotes("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugefügt."); break; case '0.0.5': // SQL queries for v0.0.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `index_home` VARCHAR(255) NOT NULL DEFAULT 'welcome'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_home` VARCHAR(255) NOT NULL DEFAULT 'welcome'"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden."); + setExtensionUpdateNotes("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden."); break; case '0.0.6': // SQL queries for v0.0.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD `ext_has_css` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD `ext_has_css` ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden."); + setExtensionUpdateNotes("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden."); break; case '0.0.7': // SQL queries for v0.0.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `verbose_sql` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `verbose_sql` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."); + setExtensionUpdateNotes("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."); break; case '0.0.8': // SQL queries for v0.0.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `menu_blur_spacer` VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `menu_blur_spacer` VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)"); + setExtensionUpdateNotes("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)"); break; case '0.0.9': // SQL queries for v0.0.9 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."); + setExtensionUpdateNotes("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."); break; case '0.1.0': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `reg_points_mode` ENUM('ref','direct') NOT NULL DEFAULT 'ref'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `reg_points_mode` ENUM('ref','direct') NOT NULL DEFAULT 'ref'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?"); + setExtensionUpdateNotes("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?"); break; case '0.1.1': // SQL queries for v0.1.1 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `index_delay` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `index_cookie` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365).""); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_delay` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_cookie` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*365).""); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sie können nun <a href=\"{?URL?}/modules.php?module=admin&`what`=config_home\">hier</a> die Verzögerungszeit in der <a href=\"{?URL?}/index.php\">Eingangsseite</a> einstellen."); + setExtensionUpdateNotes("Sie können nun <a href=\"{?URL?}/modules.php?module=admin&`what`=config_home\">hier</a> die Verzögerungszeit in der <a href=\"{?URL?}/index.php\">Eingangsseite</a> einstellen."); break; case '0.1.2': // SQL queries for v0.1.2 - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `def_refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `def_refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"); + setExtensionUpdateNotes("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ungültiges Update (nach ext-theme.php verschoben!)."); + setExtensionUpdateNotes("Ungültiges Update (nach ext-theme.php verschoben!)."); break; case '0.1.5': // SQL queries for v0.1.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP ext_has_admin"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht."); + setExtensionUpdateNotes("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{?_MYSQL_PREFIX?}_extensions</u> entfernt, da sie keinen Sinn mehr macht."); break; case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `enable_title_deco` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `title_left` VARCHAR(10) NOT NULL DEFAULT '[--'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `title_middle` VARCHAR(10) NOT NULL DEFAULT '-'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `title_right` VARCHAR(10) NOT NULL DEFAULT '--]'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `enable_mod_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `enable_what_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_title_deco` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_left` VARCHAR(10) NOT NULL DEFAULT '[--'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_middle` VARCHAR(10) NOT NULL DEFAULT '-'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_right` VARCHAR(10) NOT NULL DEFAULT '--]'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_mod_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_what_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugefügt werden."); + setExtensionUpdateNotes("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugefügt werden."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen"); + setExtensionUpdateNotes("mad_count und last_mad werden nun aus der Datenbank geladen"); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.2.0': // SQL queries for v0.2.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE `points` `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_jackpot` CHANGE `points` `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE `payment` `payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE `price` `price` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payments` CHANGE `payment` `payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payments` CHANGE `price` `price` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); + setExtensionUpdateNotes("5 Nachkommastellen implementiert"); break; case '0.2.1': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `css_php` ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `css_php` ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); + setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.2.3': // SQL queries for v0.2.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `guest_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `member_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `youre_here` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `guest_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `member_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `youre_here` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); + setExtensionUpdateNotes("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); break; case '0.2.4': // SQL queries for v0.2.4 @@ -304,30 +306,30 @@ switch ($EXT_LOAD_MODE) { // Switch to JPEG format $auto_type = 'jpg'; } - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `img_type` ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht."); + setExtensionUpdateNotes("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt."); + setExtensionUpdateNotes("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt."); break; case '0.2.6': // SQL queries for v0.2.6 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{?POINTS?} abziehen','Allen oder einem Mitglied {?POINTS?} abziehen.', 8)"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Abzug von {?POINTS?} nun möglich."); + setExtensionUpdateNotes("Abzug von {?POINTS?} nun möglich."); break; case '0.2.7': // SQL queries for v0.2.7 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `stats_limit` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `stats_limit` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<ol> + setExtensionUpdateNotes("<ol> <li>Das Mitglied kann das derzeitige Design in sein Profil abspeichern.</li> <li>Mitgliederstatistik mit Seitennavigation.</li> </ol>"); @@ -335,62 +337,62 @@ switch ($EXT_LOAD_MODE) { case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.2.9': // SQL queries for v0.2.9 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `mt_word` VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `mt_word2` VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `mt_word3` VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word` VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word2` VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word3` VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.3.0': // SQL queries for v0.3.0 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{?POINTS?}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{?POINTS?}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt."); + setExtensionUpdateNotes("Zwei Menüpunkte umbenannt."); break; case '0.3.1': // SQL queries for v0.3.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (`ext_name`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (`login`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (`visible`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (`level`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (`level`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (`data_type`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (`module`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (`action`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (`task_type`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (`status`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (`task_created`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (`subject`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (`subject`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (`ext_active`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (`action`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (`sort`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (`visible`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (`locked`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (`sort`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (`visible`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (`locked`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (`visible`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (`sort`)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD UNIQUE KEY `ext_name` (`ext_name`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD UNIQUE KEY `login` (`login`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refbanner` ADD INDEX `visible` (`visible`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` ADD UNIQUE KEY `level` (`level`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD INDEX `level` (`level`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` ADD INDEX `data_type` (`data_type`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` ADD UNIQUE KEY `module` (`module`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `action` (`action`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `what` (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `task_type` (`task_type`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `status` (`status`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `task_created` (`task_created`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD FULLTEXT `subject` (`subject`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `subject` (`subject`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD INDEX `ext_active` (`ext_active`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD INDEX `action` (`action`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD INDEX `what` (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD INDEX `sort` (`sort`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD INDEX `visible` (`visible`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD INDEX `locked` (`locked`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD INDEX `what` (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD INDEX `sort` (`sort`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD INDEX `visible` (`visible`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD INDEX `locked` (`locked`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_cats` ADD INDEX `visible` (`visible`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_cats` ADD INDEX `sort` (`sort`)"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."); break; case '0.3.2': // SQL queries for v0.3.2 // Connection table between the menu system and the "logical area" system - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_las`"); + addExtensionSql("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 '', @@ -398,11 +400,11 @@ switch ($EXT_LOAD_MODE) { INDEX (`la_id`), INDEX (`la_action`), INDEX (`la_what`), -PRIMARY KEY(`id`) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (`id`) +) TYPE={?_TABLE_TYPE?}"); // All "logical areas" together - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_las_data`"); + addExtensionSql("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 '', @@ -411,274 +413,274 @@ PRIMARY KEY(`id`) UNIQUE KEY (`la_id`), INDEX (`la_posx`), INDEX (`la_posy`), -PRIMARY KEY(`id`) -) TYPE={!_TABLE_TYPE!}"); +PRIMARY KEY (`id`) +) TYPE={?_TABLE_TYPE?}"); // Which menu do you like? - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `admin_menu` ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `admin_menu` ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); // Insert menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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."); break; 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... - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `admin_menu_sorter` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `admin_menu_sorter` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // The statistics table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu_stats`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admin_menu_stats` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`aid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `type` ENUM('la','action','what') NOT NULL DEFAULT 'what', `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -INDEX (`aid`), +INDEX (`admin_id`), PRIMARY KEY (`id`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten."); + setExtensionUpdateNotes("Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten."); break; case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&mode=noref)"); + setExtensionUpdateNotes("Veraltetes Update (what=list_user&mode=noref)"); break; case '0.3.5': // SQL queries for v0.3.5 // List accounts with no referal - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); break; case '0.3.6': // SQL queries for v0.3.6 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `salt_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `pass_scramble` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY `password` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `rand_no` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `file_hash` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `master_salt` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET `rand_no`=(ROUND(RAND() * 99999) + 100000) WHERE `config`=0 LIMIT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD `has_menu` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `has_menu`='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `salt_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `pass_scramble` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` MODIFY `password` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `rand_no` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `file_hash` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `master_salt` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_config` SET `rand_no`=(ROUND(RAND() * 99999) + 100000) WHERE `config`=0 LIMIT 1"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` ADD `has_menu` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"); + setExtensionUpdateNotes("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"); break; case '0.3.7': // SQL queries for v0.3.7 - EXT_SET_UPDATE_NOTES("Problem während des Installationsvorganges behoben."); + setExtensionUpdateNotes("Problem während des Installationsvorganges behoben."); break; case '0.3.8': // SQL queries for v0.3.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `descr` `descr` MEDIUMTEXT NULL"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `descr` `descr` MEDIUMTEXT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` CHANGE `text` `text` LONGTEXT NOT NULL"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); + setExtensionUpdateNotes("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); break; case '0.3.9': // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); + setExtensionUpdateNotes("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); break; case '0.4.0': // SQL queries for v0.4.0 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Email-Management' WHERE `action` = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt."); + setExtensionUpdateNotes("Email-Verwaltung nach Email-Management umbenannt."); break; case '0.4.1': // SQL queries for v0.4.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."); + setExtensionUpdateNotes("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."); break; case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.4.3': // SQL queries for v0.4.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt."); + setExtensionUpdateNotes("Proxy-Einstellungen hinzugefügt."); break; case '0.4.4': // SQL queries for v0.4.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`=NULL WHERE `what`=''"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `what`=NULL WHERE `what`=''"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `what`=NULL WHERE `what`=''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD UNIQUE (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_guest_menu` ADD UNIQUE (`what`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD INDEX `action` (`action`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP INDEX `what`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` ADD UNIQUE (`what`)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."); + setExtensionUpdateNotes("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."); break; case '0.4.5': // SQL queries for v0.4.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `last_month` CHAR(2) NOT NULL DEFAULT '00'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `last_week` CHAR(2) NOT NULL DEFAULT '00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `last_month` CHAR(2) NOT NULL DEFAULT '00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `last_week` CHAR(2) NOT NULL DEFAULT '00'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert."); + setExtensionUpdateNotes("Täglichen/wöchentlichen/monatlichen Reset verbessert."); break; case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Veraltetes Update."); + setExtensionUpdateNotes("Veraltetes Update."); break; case '0.4.8': // SQL queries for v0.4.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (`subject`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX (`subject`)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Index für Betreff eingefügt."); + setExtensionUpdateNotes("Index für Betreff eingefügt."); break; case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.5.0': // SQL queries for v0.5.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."); + setExtensionUpdateNotes("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."); break; case '0.5.1': // SQL queries for v0.5.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP `descr`"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."); + setExtensionUpdateNotes("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."); break; case '0.5.2': // SQL queries for v0.5.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."); + setExtensionUpdateNotes("Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."); break; case '0.5.3': // SQL queries for v0.5.3 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `session_save_path` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `session_save_path` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."); + setExtensionUpdateNotes("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."); break; case '0.5.4': // SQL queries for v0.5.4 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')"); + addExtensionSql("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_ADD_UPDATE_DEPENDS('refback'); + addExtensionUpdateDependency('refback'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung <strong>refback</strong> ab."); + setExtensionUpdateNotes("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung <strong>refback</strong> ab."); break; case '0.5.5': // SQL queries for v0.5.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_points_unconfirmed` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Anzeige der {?POINTS?} unter den unbestätigten Mails kann nun optional abgeschaltet werden."); + setExtensionUpdateNotes("Anzeige der {?POINTS?} unter den unbestätigten Mails kann nun optional abgeschaltet werden."); break; case '0.5.6': // SQL queries for v0.5.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.5.7': // SQL queries for v0.5.7 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_norefs' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben."); + setExtensionUpdateNotes("Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben."); break; case '0.5.8': // SQL queries for v0.5.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP `ext_lang_file`"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten."); + setExtensionUpdateNotes("Sprachdateinamen werden nicht mehr in der Datenbank behalten."); break; case '0.5.9': // SQL queries for v0.5.9 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_filters`"); + addExtensionSql("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', `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +UNIQUE `name_function` (`filter_name` , `filter_function`), PRIMARY KEY (`filter_id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Filter system'"); - ADD_EXT_SQL("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)"); +) TYPE={?_TABLE_TYPE?} COMMENT='Filter system'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt."); + setExtensionUpdateNotes("Tabellen für Filter-System hinzugefügt."); break; case '0.6.0': // SQL queries for v0.6.0 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden."); + setExtensionUpdateNotes("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden."); break; case '0.6.1': // SQL queries for v0.6.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.6.2': // SQL queries for v0.6.2 // Depends on refback extension - EXT_ADD_UPDATE_DEPENDS('user'); + addExtensionUpdateDependency('user'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abhängigkeit von <u>ext-user</u> gesetzt."); + setExtensionUpdateNotes("Abhängigkeit von <u>ext-user</u> gesetzt."); break; case '0.6.3': // SQL queries for v0.6.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter-Tabelle bereinigt um doppelte Einträge und Unique-Key auf <em>filter_name</em> und <em>filter_function</em> zusammen gesetzt."); + setExtensionUpdateNotes("Filter-Tabelle bereinigt um doppelte Einträge und Unique-Key auf <em>filter_name</em> und <em>filter_function</em> zusammen gesetzt."); // Include special filte loadIncludeOnce('inc/fix_filters.php'); @@ -686,13 +688,20 @@ PRIMARY KEY (`filter_id`) case '0.6.4': // SQL queries for v0.6.4 // Update admin menu - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `descr` = REPLACE(`descr`, '!POINTS!', '?POINTS?') WHERE `descr` LIKE '%!POINTS!%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `descr` = REPLACE(`descr`, '!POINTS!', '?POINTS?') WHERE `descr` LIKE '%!POINTS!%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `title` = REPLACE(`title`, '!POINTS!', '?POINTS?') WHERE `title` LIKE '%!POINTS!%'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Datenbank umgestellt auf Konfigurationselemente."); + break; + + case '0.6.5': // SQL queries for v0.6.5 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `css_php` `css_php` ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datenbank umgestellt auf Konfigurationselemente."); + setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); break; } // END - switch break; @@ -703,68 +712,51 @@ PRIMARY KEY (`filter_id`) case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; - default: // Do stuff when extension is loaded - // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION('sql_patches') != '') { - // Init key - setConfigEntry('secret_key', ''); - - // Read key from secret file - if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) { - // Cache instance - // Maybe need setup of secret key! - loadIncludeOnce('inc/gen_sql_patches.php'); - - // @TODO Rewrite this to a filter! - if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) { - // Remove extensions and mod_reg cache file - loadIncludeOnce('inc/libs/cache_functions.php'); - require(sprintf("%sinc/extensions/ext-cache.php", getConfig('PATH'))); - if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - } // END - if + case 'init': // Do stuff when extension is initialized + // Init key + setConfigEntry('secret_key', ''); - // Test again - if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) { - // File hash fas generated so we can also file the secret file... hopefully. - $hashFile = sprintf("%sinc/.secret/.%s", getConfig('PATH'), getConfig('file_hash')); - if (isFileReadable($hashFile)) { - // Read file - setConfigEntry('secret_key', readFromFile($hashFile)); - } else { - // Remove it from database - updateConfiguration('file_hash', ''); - - // Cannot read secret file! - app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload"); - } + // Read key from secret file + if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) { + // Cache instance + // Maybe need setup of secret key! + loadIncludeOnce('inc/gen_sql_patches.php'); + + // @TODO Rewrite this to a filter! + if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isCacheInstanceValid())) { + // Remove extensions and mod_reg cache file + loadIncludeOnce('inc/libs/cache_functions.php'); + + // Destroy some cache files + if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if + } // END - if + + // Test again + if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) { + // File hash fas generated so we can also file the secret file... hopefully. + $hashFile = sprintf("%sinc/.secret/.%s", getConfig('PATH'), getConfig('file_hash')); + if (isFileReadable($hashFile)) { + // Read file + setConfigEntry('secret_key', readFromFile($hashFile)); + } else { + // Remove it from database + updateConfiguration('file_hash', ''); + + // Cannot read secret file! + app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload"); + } + } // END - if + + // Transfer words/numbers to constants + setConfigEntry('POINTS' , getConfig('points_word')); + break; - // Transfer words/numbers to constants - setConfigEntry('POINTS' , getConfig('points_word')); - setConfigEntry('MT_WORD' , getConfig('mt_word')); - setConfigEntry('MT_WORD2', getConfig('mt_word2')); - setConfigEntry('MT_WORD3', getConfig('mt_word3')); - setConfigEntry('_MAX' , getConfig('rand_no')); - } else { - // Set some lame ( ;-) ) default settings - setConfigEntry('def_refid' , 0); - setConfigEntry('enable_title_deco', 'N'); - setConfigEntry('title_mod_show' , 'Y'); - setConfigEntry('title_middle' , '-'); - // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N'); - setConfigEntry('POINTS' , getMessage('DEFAULT_POINTS')); - setConfigEntry('MT_WORD' , getMessage('DEFAULT_MT_WORD')); - setConfigEntry('MT_WORD2', getMessage('DEFAULT_MT_WORD2')); - setConfigEntry('MT_WORD3', getMessage('DEFAULT_MT_WORD3')); - setConfigEntry('_MAX' , 15235); - } + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); break; } // END - switch -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); - // [EOF] ?> diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index a427f489bb..958a7d8ae3 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,107 +38,108 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.2'); +setThisExtensionVersion('0.1.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben."); + setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005."); + setExtensionUpdateNotes("Sicherheitsupdate vom 27.08.2005."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet."); + setExtensionUpdateNotes("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 9a1845f422..e2cd56012c 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run (surfbar URLs) - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`"); + addExtensionSql("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 '', @@ -67,178 +65,180 @@ switch ($EXT_LOAD_MODE) `lock_reason` VARCHAR(255) NOT NULL DEFAULT '', `reject_reason` VARCHAR(255) NOT NULL DEFAULT '', `fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -PRIMARY KEY(`id`), +PRIMARY KEY (`id`), UNIQUE KEY `userid_url` (`userid`,`url`), INDEX `status_userid` (`status`,`userid`) -) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar URLs'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar URLs'"); // Reload locks - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`"); + addExtensionSql("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, `last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY(`id`), +PRIMARY KEY (`id`), UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar reload locks'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar reload locks'"); // Surfbar salts - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`"); + addExtensionSql("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, `last_salt` VARCHAR(255) NOT NULL DEFAULT '', -PRIMARY KEY(`id`), +PRIMARY KEY (`id`), UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar last used salts'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar last used salts'"); // Statistics - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`"); + addExtensionSql("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, `count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`last_online` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +`last_surfed` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Statistics'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar Statistics'"); // Member actions pending on status - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`"); + addExtensionSql("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, `new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `status_action` (`status`,`action`) -) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Member Actions'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar Member Actions'"); // Member actions - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"); // Config entries - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_guest_login_form` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*7).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*3).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY').""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_guest_login_form` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Extend user data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); //Â Member menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"); // Admin menus - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"); + addExtensionSql("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)"); + addExtensionSql("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. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='surfbar'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='surfbar'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; - } + } // END - switch break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // @TODO Set some constants we need??? - define('edit', 'edit'); - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index 41445cbecc..19111376e5 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,121 +38,122 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.3.2'); +setThisExtensionVersion('0.3.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2')); -switch ($EXT_LOAD_MODE) -{ +// Keep this extension always active! +setExtensionAlwaysActive('Y'); + +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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.')"); - ADD_EXT_SQL("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).')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'"); + addExtensionSql("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.')"); + addExtensionSql("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).')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='task'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1"); + addExtensionSql("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_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); + setExtensionUpdateNotes("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); break; case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Unnötige Script-Teile aus what-list_tasks.php herausgelöscht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet."); + setExtensionUpdateNotes("Unnötige Script-Teile aus what-list_tasks.php herausgelöscht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); + setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt."); + setExtensionUpdateNotes("&admin= in &amp;admin= umgewandelt."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erstellung der Extra-Übersichten verbessert."); + setExtensionUpdateNotes("Erstellung der Extra-Übersichten verbessert."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt."); + setExtensionUpdateNotes("Fehler bei Abfrage der payout-Erweiterung beseitigt."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template"); + setExtensionUpdateNotes("Task-Liste ausgelagert als Template"); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert."); + setExtensionUpdateNotes("Links wegen <strong>what=admins_contct</strong> geändert."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br /> + setExtensionUpdateNotes("Weitere Direkt-Links eingebaut:<br /> <ul> <li>Ländercodes</li> <li>Wartende Verdopplungen</li> @@ -164,101 +165,102 @@ switch ($EXT_LOAD_MODE) case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut."); + setExtensionUpdateNotes("Direkt Links zum Sponsorenbereich vorbereitend eingebaut."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt."); + setExtensionUpdateNotes("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)"); + setExtensionUpdateNotes("CSS-Datei in general.css verschmolzen (Patch 435!)"); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet."); + setExtensionUpdateNotes("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit überlanger Textbreite beseitigt."); + setExtensionUpdateNotes("Problem mit überlanger Textbreite beseitigt."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert."); + setExtensionUpdateNotes("Link zum Freischalten von Sponoren-Accounts korregiert."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); + setExtensionUpdateNotes("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder höher:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt."); + setExtensionUpdateNotes("<strong>Nur mit bonus v0.6.9 oder höher:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt."); + setExtensionUpdateNotes("Teilnehmer der Bettel-Rallye werden angezeigt."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert."); + setExtensionUpdateNotes("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-Übersicht aufgelistet."); + setExtensionUpdateNotes("Export-Accounts werden in Task-Übersicht aufgelistet."); break; case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."); + setExtensionUpdateNotes("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."); break; case '0.3.2': // SQL queries for v0.3.2 // This update depends on user update - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hängt nun von <u>ext-user</u> ab."); + setExtensionUpdateNotes("Hängt nun von <u>ext-user</u> ab."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 1f1473afdf..fe5851cda0 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,131 +38,133 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0.8'); +setThisExtensionVersion('0.0.8'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run break; case 'remove': // Do stuff when removing extension // Drop theme table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`"); // Delete admin menu - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='theme'"); // Delete guest menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='themes'"); // Delete member menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='themes' OR `what`='themes'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code für ein Zeilen-Template ausgelagert."); + setExtensionUpdateNotes("HTML-Code für ein Zeilen-Template ausgelagert."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet."); + setExtensionUpdateNotes("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + setExtensionUpdateNotes("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert."); + setExtensionUpdateNotes("Variablen-Handling scripteweit geändert."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ungültiges Update."); + setExtensionUpdateNotes("Ungültiges Update."); break; case '0.0.8': // SQL queries for v0.0.8 // Theme table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); - ADD_EXT_SQL("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 '', -theme_active ENUM('Y','N') NOT NULL DEFAULT 'N', -theme_ver VARCHAR(255) NOT NULL DEFAULT '0.0', + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`"); + addExtensionSql("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 '', +`theme_active` ENUM('Y','N') NOT NULL DEFAULT 'N', +`theme_ver` VARCHAR(255) NOT NULL DEFAULT '0.0', PRIMARY KEY (`id`), UNIQUE KEY (`theme_path`), INDEX (`theme_active`) -) TYPE={!_TABLE_TYPE!} COMMENT='Themes'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Themes'"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"); // Memember menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1"); // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Update von <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)"); + setExtensionUpdateNotes("Update von <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)"); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - swich // ?> diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 8dbf72ed16..a824ccf214 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,114 +38,115 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.1.2'); +setThisExtensionVersion('0.1.2'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"); + addExtensionSql("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='top10'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_top10'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt."); + setExtensionUpdateNotes("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt."); break; case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden."); + setExtensionUpdateNotes("Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt."); + setExtensionUpdateNotes("Rechtschreibefehler beseitigt."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } // diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 2f3069ccbc..af286186f7 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,259 +38,260 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.2.9'); +setThisExtensionVersion('0.2.9'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`"); // Transfer from a member - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` ( + addExtensionSql("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, +from_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), -KEY (from_uid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); +KEY (from_userid), +PRIMARY KEY (id) +) Type={?_TABLE_TYPE?}"); // Transfers to a member - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` ( + addExtensionSql("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, +to_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), -KEY (to_uid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); +KEY (to_userid), +PRIMARY KEY (id) +) Type={?_TABLE_TYPE?}"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{?POINTS?}-Transfer','Y','Y', 5)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{?POINTS?}-Transfer','Y','Y', 5)"); // Add config values - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('ONE_DAY')*28)."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('ONE_DAY')."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); // Add row(s) to user's data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='transfer'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='transfer'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `opt_in`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); + setExtensionUpdateNotes("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227</div> behoben."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."); + setExtensionUpdateNotes("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion adminSaveSettings() erledigt."); break; case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; case '0.0.5': // SQL queries for v0.0.5 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link <em>Auflisten</em> 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!"); + setExtensionUpdateNotes("Link <em>Auflisten</em> 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!"); break; case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt."); + setExtensionUpdateNotes("Problem mit E in Transaktionsnummer beseitigt."); break; case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); break; case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); break; case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); + setExtensionUpdateNotes("Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!"); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert."); + setExtensionUpdateNotes("Wort <strong>Punkte</strong> dynamisiert."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt."); + setExtensionUpdateNotes("Parser-Error im Mitgliedsbereich beseitigt."); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Durchführung des Transfers korregiert."); + setExtensionUpdateNotes("Durchführung des Transfers korregiert."); break; case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.2.3': // SQL queries for v0.2.3 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"); + addExtensionSql("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_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); + setExtensionUpdateNotes("Erweiterung in's neue Menüsystem integriert."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin geändert."); + setExtensionUpdateNotes("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin geändert."); break; case '0.2.5': // SQL queries for v0.2.5 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert."); + setExtensionUpdateNotes("Mitgliedsmenü komplett geändert."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die {?POINTS?} können nun wieder wie gewohnt transferiert werden. Der Grund für <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"); + setExtensionUpdateNotes("Die {?POINTS?} können nun wieder wie gewohnt transferiert werden. Der Grund für <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung <em>Notice: Undefined index: to_uid in {?PATH?}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>."); + setExtensionUpdateNotes("Fehlermeldung <em>Notice: Undefined index: to_userid in {?PATH?}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>."); break; case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) { - // Automatically remove outdated or not displayed transactions - TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); - } - break; + case 'init': // When extension is initialized + if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) { + // Automatically remove outdated or not displayed transactions + autoPurgeTransfers(getConfig('transfer_max'), getConfig('transfer_age')); + } // END - if + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 1392828667..4d25dc9836 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,56 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ -case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - // SQL commands to run - break; +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // SQL commands to run + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.1': // SQL queries for v0.0.1 + addExtensionSql(''); -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(''); + break; + } // END - switch + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + case 'modify': // When the extension got modified break; - } - break; -case 'modify': // When the extension got modified - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; -case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'init': // Do stuff when extension is initialized + break; -default: // Do stuff when extension is loaded - break; -} + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index ff98564ea7..b0b586e1db 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,27 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'"); + addExtensionSql("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)"); + addExtensionSql("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 - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='usage'"); break; case 'activate': // Do stuff when admin activates this extension @@ -70,26 +68,29 @@ switch ($EXT_LOAD_MODE) break; case 'update': // Update an extension - switch ($EXT_VER) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; + case 'init': // Do stuff when extension is initialized + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index d278b7688c..cf212f9060 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,31 +38,32 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Version number -EXT_SET_VERSION('0.3.5'); +setThisExtensionVersion('0.3.5'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); +setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_cats` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`cat_id`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_data` ( `userid` BIGINT(22) NOT NULL AUTO_INCREMENT, `surname` VARCHAR(255) NOT NULL DEFAULT '', `family` VARCHAR(255) NOT NULL DEFAULT '', @@ -100,10 +101,10 @@ PRIMARY KEY (`userid`), UNIQUE (`user_hash`), INDEX (`refid`), INDEX `status_mails` (`status`,`max_mails`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_points` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `userid` BIGINT(22) NOT NULL DEFAULT 0, `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, @@ -111,10 +112,10 @@ INDEX `status_mails` (`status`,`max_mails`) `locked_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (`id`), INDEX (`userid`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_links` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -122,10 +123,10 @@ INDEX (`userid`) PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`stats_id`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -143,212 +144,212 @@ INDEX (`userid`), INDEX (`cat_id`), INDEX (`payment_id`), INDEX (`pool_id`) -) TYPE={!_TABLE_TYPE!}"); +) TYPE={?_TABLE_TYPE?}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`"); + addExtensionSql("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', `stats_data` VARCHAR(255) NOT NULL DEFAULT '', `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY(`id`), +PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`stats_type`) -) TYPE={!_TABLE_TYPE!} COMMENT='Member statistics data'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Member statistics data'"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"); + addExtensionSql("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)"); + addExtensionSql("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)"); + addExtensionSql("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)"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL(''); + addExtensionSql(''); break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun möglich."); + setExtensionUpdateNotes("Seitenweises Anzeigen der User-Liste ist nun möglich."); break; case '0.1.1': // SQL queries for v0.1.1 // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + addExtensionUpdateDependency('sql_patches'); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ungültiges Update."); + setExtensionUpdateNotes("Ungültiges Update."); break; case '0.1.2': // SQL queries for v0.1.2 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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."); break; case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Menüpunkt <u>Online-Liste</u> erweitert."); + setExtensionUpdateNotes("Den Pfad <em>Sie sind hier</em> im Menüpunkt <u>Online-Liste</u> erweitert."); break; case '0.1.4': // SQL queries for v0.1.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?MT_WORD?} haben sollen!</big>"); + setExtensionUpdateNotes("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?mt_word?} haben sollen!</big>"); break; case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); + setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt."); + setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt."); break; case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert."); break; case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."); + setExtensionUpdateNotes("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."); break; case '0.2.1': // SQL queries for v0.2.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("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)"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); + setExtensionUpdateNotes("Anrede "Firma" hinzugefügt."); break; case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); break; case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); + setExtensionUpdateNotes("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar."); break; case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert."); + setExtensionUpdateNotes("SQL-Anweisungen abgesichert."); break; case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); break; case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); + setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt."); break; case '0.2.9': // SQL queries for v0.2.9 - ADD_EXT_SQL("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)"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugefügt."); + setExtensionUpdateNotes("Admin-Kontaktformular hinzugefügt."); break; case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release."); + setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release."); break; case '0.3.1': // SQL queries for v0.3.1 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt"); + setExtensionUpdateNotes("Verwaltung auf Management umgestellt"); break; case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt."); + setExtensionUpdateNotes("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt."); break; case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)"); + setExtensionUpdateNotes("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)"); break; case '0.3.4': // SQL queries for v0.3.4 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` ( + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 30).""); + addExtensionSql("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)"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`"); + addExtensionSql("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 '', @@ -359,27 +360,28 @@ INDEX (`stats_type`) `del_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `del_reason` TINYTEXT, INDEX (`userid`), -PRIMARY KEY(`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'"); +PRIMARY KEY (`id`) +) TYPE={?_TABLE_TYPE?} COMMENT='List of deleted users'"); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); + setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - break; -} + case 'init': // Do stuff when extension is initialized + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} // [EOF] ?> diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 9756c1baa5..41ef42b345 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -6,13 +6,18 @@ * -------------------------------------------------------------------- * * File : ext-wernis.php * * -------------------------------------------------------------------- * - * Short description : Payout extension * + * Short description : Wernis extension * * -------------------------------------------------------------------- * * Kurzbeschreibung : Auszahlung-Erweiterung * * -------------------------------------------------------------------- * - * Modified payout extension! See: http://www.mxchange.org for details * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -33,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Version of this extension -EXT_SET_VERSION('0.0.3'); +setThisExtensionVersion('0.0.3'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3')); -switch ($EXT_LOAD_MODE) { +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`"); + addExtensionSql("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 '', @@ -56,95 +60,99 @@ wernis_timestamp VARCHAR(10) NOT NULL DEFAULT 0, wernis_type ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED', wernis_api_message TINYTEXT, wernis_api_status VARCHAR(255) NULL DEFAULT NULL, -KEY(userid), -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); +KEY (userid), +PRIMARY KEY (id) +) TYPE={?_TABLE_TYPE?}"); // Confiuration - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"); - ADD_EXT_SQL("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)"); + addExtensionSql("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)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"); + addExtensionSql("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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"); // Guest menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)"); + addExtensionSql("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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='wernis'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='wernis'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='wernis_portal'"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1"); + addExtensionSql("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 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1"); break; case 'update': // Update an extension - switch ($EXT_VER) { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_fix` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("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!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_pass_md5` VARCHAR(32) NOT NULL DEFAULT ''"); // Update notes (these will be set as task text!) - EXT_SET_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."); + setExtensionUpdateNotes("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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"); + addExtensionSql("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!) - EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf INT(5) geändert."); + setExtensionUpdateNotes("WDS66-Username muss nun eintragen werden (API-Anpassung)."); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // Init array - $GLOBALS['wernis_data'] = array(); - break; + case 'init': // Do stuff when extension is initialized + // Init array + $GLOBALS['wernis_data'] = array(); + break; + + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; } -// +// [EOF] ?> diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index 48c9832afa..9bb204ab96 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,41 +39,42 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Version number -EXT_SET_VERSION('0.0'); +setThisExtensionVersion('0.0'); // Version history array (add more with , '0.1.0' and so on) -EXT_SET_VER_HISTORY(array('0.0')); +setExtensionVersionHistory(array('0.0')); + +// Keep this extension always active! +setExtensionAlwaysActive('Y'); // This extension is deprecated! -// Only since 'network' is ready! EXT_SET_DEPRECATED('Y'); +// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y'); -switch ($EXT_LOAD_MODE) -{ +switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); // Admin menu - ADD_EXT_SQL("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)"); - ADD_EXT_SQL("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. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"); + addExtensionSql("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)"); + addExtensionSql("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. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"); // Reload lock table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` ( + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); + addExtensionSql("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, @@ -81,13 +82,13 @@ switch ($EXT_LOAD_MODE) `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE `y_type` (`type`,`y_id`) -) TYPE={!_TABLE_TYPE!} COMMENT='Reload lock reminder for Yoo!Media campaigns'"); +) TYPE={?_TABLE_TYPE?} COMMENT='Reload lock reminder for Yoo!Media campaigns'"); break; case 'remove': // Do stuff when removing extension // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`"); break; case 'activate': // Do stuff when admin activates this extension @@ -99,28 +100,29 @@ UNIQUE `y_type` (`type`,`y_id`) break; case 'update': // Update an extension - switch ($EXT_VER) + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(''); + addExtensionSql(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(''); + setExtensionUpdateNotes(''); break; } break; - case 'modify': // When the extension got modified - break; + case 'modify': // When the extension got modified + break; - case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - default: // Do stuff when extension is loaded - // The translation table - $GLOBALS['translation_tables']['yoomedia'] = array( - // Error messages - 'error_codes' => array( + case 'init': // Do stuff when extension is initialized + // The translation table + // @TODO Can this be moved into a database table? + $GLOBALS['translation_tables']['yoomedia'] = array( + // Error messages + 'error_codes' => array( 1 => 'wrong_pass', 2 => 'wrong_sid', 3 => 'website_locked', @@ -128,9 +130,9 @@ UNIQUE `y_type` (`type`,`y_id`) 5 => 'requests_depleted', 6 => 'zero_result', 10 => 'incomplete_request' - ), - // For text mails - 'textmail' => array( + ), + // For text mails + 'textmail' => array( 0 => 'id', 1 => 'name', 2 => 'reload', @@ -138,13 +140,14 @@ UNIQUE `y_type` (`type`,`y_id`) 4 => 'remain', 5 => 'pay', 6 => 'text' - ) - ); - break; -} + ) + ); + break; -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE('Y'); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + break; +} -// +// [EOF] ?> diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php index 3ff6ec562e..f551ef47b7 100644 --- a/inc/fatal_errors.php +++ b/inc/fatal_errors.php @@ -1,104 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 08/29/2003 * - * =============== Last change: 01/16/2008 * - * * - * -------------------------------------------------------------------- * - * File : fatal_errors.php * - * -------------------------------------------------------------------- * - * Short description : Outputs fatal errors * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Gibt fatale Fehler aus * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -if (getTotalFatalErrors() > 0) { - // Load config here - loadIncludeOnce('inc/load_config.php'); - - // Main div container - LOAD_TEMPLATE('fatal_header'); - - // Set unset variable - if (empty($check)) $check = ''; - if ((isInstalling()) || (!isInstalled())) { - // While we are installing ouput other header than while it is installed... :-) - $OUT = ''; - foreach (getFatalArray() as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= LOAD_TEMPLATE('install_fatal_row', true, $content); - } - - // Load main template - LOAD_TEMPLATE('install_fatal_table', false, $OUT); - } elseif (isInstalled()) { - // Display all runtime fatal errors - $OUT = ''; - foreach (getFatalArray() as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= LOAD_TEMPLATE('runtime_fatal_row', true, $content); - } - - // Load main template - LOAD_TEMPLATE('runtime_fatal_table', false, $OUT); - - // Abort here - shutdown(); - } - - // Message to regular users (non-admin) - $CORR = getMessage('FATAL_REPORT_ERRORS'); - - // PHP warnings fixed - if ($check == 'done') { - if (IS_ADMIN()) $CORR = getMessage('FATAL_CORRECT_ERRORS'); - } // END - if - - // Load footer template - LOAD_TEMPLATE('fatal_footer', false, $CORR); -} - -// +// @DEPRECATED ?> diff --git a/inc/filter-functions.php b/inc/filter-functions.php new file mode 100644 index 0000000000..b8f8313e2f --- /dev/null +++ b/inc/filter-functions.php @@ -0,0 +1,293 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/27/2009 * + * =============== Last change: 10/27/2009 * + * * + * -------------------------------------------------------------------- * + * File : filter-functions.php * + * -------------------------------------------------------------------- * + * Short description : Functions for filter system * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Funktionen fuer Filter-System * + * -------------------------------------------------------------------- * + * $Revision:: 1185 $ * + * $Date:: 2009-10-11 04:16:39 +0200 (Sun, 11 Oct 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Init "generic filter system" +function initFilterSystem () { + // Is the filter already initialized? + if (isset($GLOBALS['filters'])) { + // Then abort here + debug_report_bug(getMessage('FILTER_FAILED_ALREADY_INIT')); + } // END - if + + // Init dummy array + $filterArray = array( + 'chains' => array(), + 'loaded' => array(), + 'counter' => array() + ); + + // Load all saved filers if sql_patches is updated + if (isset($GLOBALS['cache_array']['filter']['filter_name'])) { + // Found in cache so rewrite the array + foreach ($GLOBALS['cache_array']['filter']['filter_name'] as $idx => $filterName) { + // Get filter function + $filterFunction = $GLOBALS['cache_array']['filter']['filter_function'][$idx]; + + // Add the element with mapped index + $filterArray['counter'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_counter'][$idx]; + $filterArray['loaded'][$filterName][$filterFunction] = true; + $filterArray['chains'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_active'][$idx]; + } // END - foreach + + // Mark filters as loaded + $GLOBALS['cache_array']['filter'] = true; + + // Remove the cache + $GLOBALS['cache_array']['filter'] = $filterArray; + } elseif (isExtensionInstalledAndNewer('sql_patches', '0.5.9')) { + // Init add + $add = ''; + if (getExtensionVersion('sql_patches') >= '0.6.0') $add = ", `filter_counter`"; + + // Load all active filers + $result = SQL_QUERY("SELECT + `filter_name`,`filter_function`,`filter_active`".$add." +FROM + `{?_MYSQL_PREFIX?}_filters` +ORDER BY + `filter_id` ASC", __FUNCTION__, __LINE__); + + // Are there entries? + if (SQL_NUMROWS($result) > 0) { + // Load all filters + while ($filterArray = SQL_FETCHARRAY($result)) { + // Get filter name and function + $filterName = $filterArray['filter_name']; + $filterFunction = $filterArray['filter_function']; + + // Set counter to default + $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0; + + // Mark this filter as loaded (from database) + $GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction] = true; + + // Set this filter + $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = $filterArray['filter_active']; + + // Is the array element for counter there? + if (isset($filterArray['filter_counter'])) { + // Then use this value! + $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = $filterArray['filter_counter']; + } // END - if + } // END - while + } // END - if + + // Free result + SQL_FREERESULT($result); + } + + // Init filters + registerFilter('init', 'LOAD_CONFIGURATION'); + registerFilter('init', 'INIT_EXTENSIONS'); + registerFilter('init', 'LOAD_RUNTIME_INCLUDES'); + registerFilter('init', 'CHECK_SVN_REVISION'); + registerFilter('init', 'RUN_DAILY_RESET'); + registerFilter('init', 'INIT_RANDOMIZER'); + registerFilter('init', 'TRIGGER_SENDING_POOL'); + registerFilter('init', 'DETERMINE_USERNAME'); + registerFilter('init', 'DETERMINE_WHAT_ACTION'); + registerFilter('init', 'UPDATE_LOGIN_DATA'); + registerFilter('init', 'ACTIVATE_EXCHANGE'); + + // Login failures handler + registerFilter('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); + + // Filters for pre-extension-registration + registerFilter('pre_extension_installed', 'RUN_SQLS'); + + // Filters for post-extension-registration + registerFilter('post_extension_installed', 'AUTO_ACTIVATE_EXTENSION'); + registerFilter('post_extension_installed', 'SOLVE_TASK'); + registerFilter('post_extension_installed', 'LOAD_INCLUDES'); + registerFilter('post_extension_installed', 'REMOVE_UPDATES'); + + // Solving tasks + registerFilter('solve_task', 'SOLVE_TASK'); + + // Loading includes in general + registerFilter('load_includes', 'LOAD_INCLUDES'); + + // Run SQLs + registerFilter('run_sqls', 'RUN_SQLS'); + + // Admin ACL check + registerFilter('check_admin_acl', 'CHECK_ADMIN_ACL'); + + // Register shutdown filters + registerFilter('shutdown', 'FLUSH_FILTERS'); + registerFilter('shutdown', 'FLUSH_STATS'); + registerFilter('shutdown', 'FLUSH_OUTPUT'); + + // Compiling code + registerFilter('compile_code', 'COMPILE_CONFIG'); + registerFilter('compile_code', 'COMPILE_EXTENSION'); + + // Generic extension update filters + registerFilter('extension_update', 'UPDATE_EXTENSION_DATA'); + + // Do reset stuff, keep this entry first in this chain: + registerFilter('reset', 'RUN_RESET_INCLUDES'); + + // Remove extension + registerFilter('extension_remove', 'REMOVE_EXTENSION'); + + // Exclude some users + registerFilter('exclude_users', 'HTML_INCLUDE_USERS'); +} + +// "Registers" a new filter function +function registerFilter ($filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) { + // Extend the filter function name + $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); + + // Is that filter already there? + if ((isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { + // Then abort here + if ($silentAbort === false) { + addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_ALREADY_ADDED'), array($filterFunction, $filterName)); + } // END - if + + // Abort here + return false; + } // END - if + + // Shall we add it? + if ($dry_run === false) { + // Is the function there? + if (!function_exists($filterFunction)) { + // Then abort here + addFatalMessage(__FUNCTION__, __LINE__, sprintf(getMessage('FILTER_FAILED_404'), $filterFunction, $filterName)); + return false; + } // END - if + + // Simply add it to the array + //* DEBUG: */ print 'filterName='.$filterName.',filterFunction='.$filterFunction.'<br />'; + $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A'; + $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0; + } // END - if +} + +// "Unregisters" a filter from the given chain +function unregisterFilter ($filterName, $filterFunction, $force = false, $dry_run = false) { + // Extend the filter function name only if not loaded from database + if (!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) { + $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); + } // END - if + + // Is that filter there? + if ((!isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { + // Not found, so abort here + addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName)); + return false; + } // END - if + + // Shall we remove? (default, not while just showing an extension removal) + if ($dry_run === false) { + // Mark for filter removal + $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R'; + } // END - if +} + +// "Runs" the given filters, data is optional and can be any type of data +function runFilterChain ($filterName, $data = null) { + // Is that filter chain there? + if (!isset($GLOBALS['cache_array']['filter']['chains'][$filterName])) { + // We should find all these non-existing filter chains + if ($filterName != 'sql_admin_extra_data') { + /* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!'); + } + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!'); + + // Abort here and return content + return $data; + } // END - if + + // Default return value + $returnValue = $data; + + // Then run all filters + foreach ($GLOBALS['cache_array']['filter']['chains'][$filterName] as $filterFunction => $active) { + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Running: name={$filterName},func={$filterFunction},active={$active}"); + + // Is the filter active? + if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown','extension_remove','post_extension_run_sql'))) && ($active == 'R'))) { + // Is this filter there? + if (!function_exists($filterFunction)) { + // Unregister it + unregisterFilter($filterName, $filterFunction); + + // Skip this entry + continue; + } // END - if + + // Call the filter chain + //* DEBUG: */ print $filterName.'/'.$filterFunction.',[]='.gettype($returnValue).'<br />'; + $returnValue = call_user_func_array($filterFunction, array($returnValue)); + + // Update usage counter + countFilterUsage($filterName, $filterFunction); + } elseif (isDebugModeEnabled()) { + // Debug message + logDebugMessage(__FUNCTION__, __LINE__, "Skipped: name={$filterName},func={$filterFunction},active={$active}"); + } + } // END - foreach + + // Return the filtered content + return $returnValue; +} + +// Count the filter usage +function countFilterUsage ($filterName, $filterFunction) { + // Is it there? + if (isset($GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction])) { + // Yes, then increase + $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction]++; + } else { + // No, then create + $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 1; + } +} + +// [EOF] +?> diff --git a/inc/filters.php b/inc/filters.php index f3bfe4e281..1d7a500476 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -6,9 +6,9 @@ * -------------------------------------------------------------------- * * File : filters.php * * -------------------------------------------------------------------- * - * Short description : Functions for filter system * + * Short description : Generic filters * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Funktionen fuer Filter-System * + * Kurzbeschreibung : Allgemeine Filter * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,241 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Init "generic filter system" -function initFilterSystem () { - // Is the filter already initialized? - if ((isset($GLOBALS['filters']['chains'])) && (is_array($GLOBALS['filters']['chains']))) { - // Then abort here - debug_report_bug(getMessage('FILTER_FAILED_ALREADY_INIT')); - } // END - if - - // Init the filter system (just some ideas) - $GLOBALS['filters']['chains'] = array( - 'preinit' => array(), // Filters for pre-init phase - 'postinit' => array(), // Filters for post-init phase - 'shutdown' => array() // Filters for shutdown phase - ); - - // Init loaded filters and counter - $GLOBALS['filters']['loaded'] = array(); - $GLOBALS['filters']['counter'] = array(); - - // Load all saved filers if sql_patches is updated - if (isset($GLOBALS['cache_array']['filter']['filter_name'])) { - // Found in cache so rewrite the array - $filterArray = array(); - foreach ($GLOBALS['cache_array']['filter']['filter_name'] as $idx => $filterName) { - // Get filter function - $filterFunction = $GLOBALS['cache_array']['filter']['filter_function'][$idx]; - - // Add the element with mapped index - $filterArray['counter'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_counter'][$idx]; - $filterArray['loaded'][$filterName][$filterFunction] = true; - $filterArray['chains'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_active'][$idx]; - } // END - foreach - - // Set the array - //die('<pre>'.print_r($filterArray, true).'</pre>'); - $GLOBALS['filters'] = $filterArray; - - // Remove the cache - unset($GLOBALS['cache_array']['filter']); - } elseif (GET_EXT_VERSION('sql_patches') >= '0.5.9') { - // Init add - $add = ''; - if (GET_EXT_VERSION('sql_patches') >= '0.6.0') $add = ", `filter_counter`"; - - // Load all active filers - $result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$add." -FROM `{!_MYSQL_PREFIX!}_filters` -ORDER BY `filter_id` ASC", __FUNCTION__, __LINE__); - - // Are there entries? - if (SQL_NUMROWS($result) > 0) { - // Load all filters - while ($filterArray = SQL_FETCHARRAY($result)) { - // Get filter name and function - $filterName = $filterArray['filter_name']; - $filterFunction = $filterArray['filter_function']; - - // Set counter to default - $GLOBALS['filters']['counter'][$filterName][$filterFunction] = 0; - - // Mark this filter as loaded (from database) - $GLOBALS['filters']['loaded'][$filterName][$filterFunction] = true; - - // Set this filter - $GLOBALS['filters']['chains'][$filterName][$filterFunction] = $filterArray['filter_active']; - - // Is the array element for counter there? - if (isset($filterArray['filter_counter'])) { - // Then use this value! - $GLOBALS['filters']['counter'][$filterName][$filterFunction] = $filterArray['filter_counter']; - } // END - if - } // END - while - } // END - if - - // Free result - SQL_FREERESULT($result); - } - - // Init filters - registerFilter('init', 'UPDATE_LOGIN_DATA'); - registerFilter('init', 'INIT_RANDOMIZER'); - registerFilter('init', 'DETERMINE_USERNAME'); - - // Login failures handler - registerFilter('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); - - // Filters for pre-extension-registration - registerFilter('pre_extension_installed', 'RUN_SQLS'); - - // Filters for post-extension-registration - registerFilter('post_extension_installed', 'AUTO_ACTIVATE_EXTENSION'); - registerFilter('post_extension_installed', 'SOLVE_TASK'); - registerFilter('post_extension_installed', 'LOAD_INCLUDES'); - registerFilter('post_extension_installed', 'REMOVE_UPDATES'); - - // Solving tasks - registerFilter('solve_task', 'SOLVE_TASK'); - - // Loading includes in general - registerFilter('load_includes', 'LOAD_INCLUDES'); - - // Run SQLs - registerFilter('run_sqls', 'RUN_SQLS'); - - // Admin ACL check - registerFilter('check_admin_acl', 'CHECK_ADMIN_ACL'); - - // Register shutdown filters - registerFilter('shutdown', 'FLUSH_FILTERS'); -} - -// "Registers" a new filter function -function registerFilter ($filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) { - // Extend the filter function name - $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); - - // Is that filter already there? - if ((isset($GLOBALS['filters']['chains'][$filterName][$filterFunction])) && (!$force)) { - // Then abort here - if ($silentAbort === false) { - addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_ALREADY_ADDED'), array($filterFunction, $filterName)); - } // END - if - - // Abort here - return false; - } // END - if - - // Is the function there? - if (!function_exists($filterFunction)) { - // Then abort here - addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_FOUND'), array($filterFunction, $filterName)); - return false; - } // END - if - - // Shall we add it? - if (!$dry_run) { - // Simply add it to the array - $GLOBALS['filters']['chains'][$filterName][$filterFunction] = 'Y'; - $GLOBALS['filters']['counter'][$filterName][$filterFunction] = 0; - } // END - if -} - -// "Unregisters" a filter from the given chain -function unregisterFilter ($filterName, $filterFunction, $force = false, $dry_run = false) { - // Extend the filter function name only if not loaded from database - if (!isset($GLOBALS['filters']['loaded'][$filterName][$filterFunction])) { - $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); - } // END - if - - // Is that filter there? - if ((!isset($GLOBALS['filters']['chains'][$filterName][$filterFunction])) && (!$force)) { - // Not found, so abort here - addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName)); - return false; - } // END - if - - // Shall we remove? (default, not while just showing an extension removal) - if ($dry_run === false) { - // Mark for filter removal - $GLOBALS['filters']['chains'][$filterName][$filterFunction] = 'R'; - } // END - if -} - -// "Runs" the given filters, data is optional and can be any type of data -function runFilterChain ($filterName, $data = null) { - // Is that filter chain there? - if (!isset($GLOBALS['filters']['chains'][$filterName])) { - // We should find all these non-existing filter chains - DEBUG_LOG(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!'); - - // Abort here - return false; - } // END - if - - // Default return value - $returnValue = $data; - - // Then run all filters - foreach ($GLOBALS['filters']['chains'][$filterName] as $filterFunction => $active) { - // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Running: name={$filterName},func={$filterFunction},active={$active}"); - - // Is the filter active? - if (($active == 'Y') || ((in_array($filterName, array('extension_remove', 'post_extension_run_sql'))) && ($active == 'R'))) { - // Is this filter there? - if (!function_exists($filterFunction)) { - // Unregister it - unregisterFilter($filterName, $filterFunction); - - // Skip this entry - continue; - } // END - if - - // Call the filter chain - $returnValue = call_user_func_array($filterFunction, array($returnValue)); - - // Update usage counter - countFilterUsage($filterName, $filterFunction); - } elseif (isDebugModeEnabled()) { - // Debug message - DEBUG_LOG(__FUNCTION__, __LINE__, "Skipped: name={$filterName},func={$filterFunction},active={$active}"); - } - } // END - foreach - - // Return the filtered content - return $returnValue; -} - -// Count the filter usage -function countFilterUsage ($filterName, $filterFunction) { - // Is it there? - if (isset($GLOBALS['filters']['counter'][$filterName][$filterFunction])) { - // Yes, then increase - $GLOBALS['filters']['counter'][$filterName][$filterFunction]++; - } else { - // No, then create - $GLOBALS['filters']['counter'][$filterName][$filterFunction] = 1; - } -} - -// ----------------------------------------------------------------------------- -// Generic filter functions we always need -// ----------------------------------------------------------------------------- + die(); +} // END - if // Filter for flushing all new filters to the database function FILTER_FLUSH_FILTERS () { // Clear all previous SQL queries - INIT_SQLS(); + initSqls(); // Are we installing? - if ((isInstalling()) || (!isInstalled())) { + if ((isInstallationPhase())) { // Then silently skip this filter return true; } // END - if @@ -285,7 +60,7 @@ function FILTER_FLUSH_FILTERS () { } // END - if // Is the extension sql_patches updated? - if (EXT_VERSION_IS_OLDER('sql_patches', '0.5.9')) { + if ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9'))) { // Abort silently here return false; } // END - if @@ -295,20 +70,23 @@ function FILTER_FLUSH_FILTERS () { $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 ($GLOBALS['filters']['chains'] as $filterName => $filterArray) { + foreach ($GLOBALS['cache_array']['filter']['chains'] as $filterName => $filterArray) { // Walk through all filters foreach ($filterArray as $filterFunction => $active) { // Is this filter loaded? - if (!isset($GLOBALS['filters']['loaded'][$filterName][$filterFunction])) { + //* DEBUG: */ print 'FOUND:'.$filterName.'/'.$filterFunction.'='.$active.'<br />'; + if (((!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) && ($active != 'R')) || ($active == 'A')) { // Add this filter (all filters are active by default) + //* DEBUG: */ print 'ADD:'.$filterName.'/'.$filterFunction.'<br />'; $insertSQL .= sprintf("('%s','%s','Y'),", $filterName, $filterFunction); $inserted++; } elseif ($active == 'R') { // Remove this filter + //* DEBUG: */ print 'REMOVE:'.$filterName.'/'.$filterFunction.'<br />'; $removeSQL .= sprintf(" (`filter_name`='%s' AND `filter_function`='%s') OR", $filterName, $filterFunction); $removed++; } @@ -321,7 +99,7 @@ function FILTER_FLUSH_FILTERS () { $insertSQL = substr($insertSQL, 0, -1); // And run it - ADD_SQL($insertSQL); + addSql($insertSQL); } // END - if // Something has been removed? @@ -330,17 +108,17 @@ function FILTER_FLUSH_FILTERS () { $removeSQL = substr($removeSQL, 0, -2) . 'LIMIT '.$removed; // And run it - ADD_SQL($removeSQL); + addSql($removeSQL); } // END - if // Shall we update usage counters (ONLY FOR DEBUGGING!) if (getConfig('update_filter_usage') == 'Y') { // Update all counters - foreach ($GLOBALS['filters']['counter'] as $filterName => $filterArray) { + foreach ($GLOBALS['cache_array']['filter']['counter'] as $filterName => $filterArray) { // Walk through all filters foreach ($filterArray as $filterFunction => $cnt) { // Construct and add the query - ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1", + addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1", bigintval($cnt), $filterName, $filterFunction @@ -351,6 +129,12 @@ function FILTER_FLUSH_FILTERS () { // Run the run_sqls filter in non-dry mode runFilterChain('run_sqls'); + + // Should we rebuild cache? + if (($inserted > 0) || ($removed > 0)) { + // Destroy cache + rebuildCacheFile('filter', 'filter'); + } // END - if } // Filter for calling the handler for login failures @@ -359,10 +143,10 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) { $content = $data; // Handle failed logins here if not in guest - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},lvl={$data['access_level']}<br />"); - if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},level={$data['access_level']}<br />"); + if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) { // Handle failure - $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']); + $content['content'] .= handleLoginFailtures($data['access_level']); } // END - if // Return the content @@ -381,16 +165,16 @@ function FILTER_REDIRECT_TO_LOGOUT_SQL_PATCHES () { } // END - if // This should not happen! - DEBUG_LOG(__FUNCTION__, __LINE__, 'Cannot auto-logout because no extension load-mode has been set.'); + logDebugMessage(__FUNCTION__, __LINE__, 'Cannot auto-logout because no extension load-mode has been set.'); } // Filter for auto-activation of a extension function FILTER_AUTO_ACTIVATE_EXTENSION ($data) { // Is this extension always activated? - if (EXT_GET_ALWAYS_ACTIVE() == 'Y') { + if (getExtensionAlwaysActive() == 'Y') { // Then activate the extension - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ext_name={$data['ext_name']}<br />"); - ACTIVATE_EXTENSION($data['ext_name']); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ext_name={$data['ext_name']}<br />"); + doActivateExtension($data['ext_name']); } // END - if // Return the data @@ -400,15 +184,18 @@ function FILTER_AUTO_ACTIVATE_EXTENSION ($data) { // Filter for solving task given task function FILTER_SOLVE_TASK ($data) { // Don't solve anything if no admin! - if (!IS_ADMIN()) return $data; + if (!isAdmin()) return $data; // Is this a direct task id or array element task_id is found? if (is_int($data)) { // Then solve it... - ADMIN_SOLVE_TASK($data); + adminSolveTask($data); } elseif ((is_array($data)) && (isset($data['task_id']))) { // Solve it... - ADMIN_SOLVE_TASK($data['task_id']); + adminSolveTask($data['task_id']); + } else { + // Not detectable! + debug_report_bug(sprintf("Cannot resolve task. data[%s]=<pre>%s</pre>", gettype($data), print_r($data, true))); } // Return the data @@ -416,9 +203,24 @@ function FILTER_SOLVE_TASK ($data) { } // Filter to load include files -function FILTER_LOAD_INCLUDES () { - // Default is $data as inclusion list - $data = GET_INC_POOL(); +function FILTER_LOAD_INCLUDES ($pool) { + // Is it null? + if (is_null($pool)) { + // This should not happen! + debug_report_bug('pool is null.'); + } // END - if + + // Is the pool an array and 'pool' set? + if ((is_array($pool)) && (isset($pool['pool']))) { + // Then use it as pool + $realPool = $pool['pool']; + } else { + // Default is $data as inclusion list + $realPool = $pool; + } + + // Get inc pool + $data = getIncludePool($realPool); // Is it an array? if ((!isset($data)) || (!is_array($data))) { @@ -426,81 +228,84 @@ function FILTER_LOAD_INCLUDES () { debug_report_bug(sprintf("INC_POOL is no array! Type: %s", gettype($data))); } elseif (isset($data['inc_pool'])) { // Use this as new inclusion pool! - SET_INC_POOL($data['inc_pool']); + setIncludePool($realPool, $data['inc_pool']); } // Check for added include files - if (COUNT_INC_POOL() > 0) { + if (countIncludePool($realPool) > 0) { // Loads every include file - LOAD_INC_POOL(); + loadIncludePool($realPool); // Reset array - INIT_INC_POOL(); + initIncludePool($realPool); } // END - if // Continue with processing - return $data; + return $pool; } // Filter for running SQL commands function FILTER_RUN_SQLS ($data) { // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "- Entered!"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Entered!"); // Is the array there? - if ((IS_SQLS_VALID()) && ((!isset($data['dry_run'])) || ($data['dry_run'] == false))) { + if ((isSqlsValid()) && ((!isset($data['dry_run'])) || ($data['dry_run'] == false))) { // Run SQL commands - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "- Found ".COUNT_SQLS()." queries to run."); - foreach (GET_SQLS() as $sql) { - // Trim spaces away - $sql = trim($sql); - - // Is there still a query left? - if (!empty($sql)) { - // Do we have an "ALTER TABLE" command? - if (substr(strtolower($sql), 0, 11) == "alter table") { - // Analyse the alteration command - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Alterting table: {$sql}"); - SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__); - } else { - // Run regular SQL command - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Running regular query: {$sql}"); - SQL_QUERY($sql, __FUNCTION__, __LINE__, false); - } - } // END - if + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Found ".countSqls()." queries to run."); + foreach (getSqls() as $sqls) { + // New cache format... + foreach ($sqls as $sql) { + // Trim spaces away + $sql = trim($sql); + + // Is there still a query left? + if (!empty($sql)) { + // Do we have an "ALTER TABLE" command? + if (substr(strtolower($sql), 0, 11) == 'alter table') { + // Analyse the alteration command + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Alterting table: {$sql}"); + SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__); + } else { + // Run regular SQL command + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Running regular query: {$sql}"); + SQL_QUERY($sql, __FUNCTION__, __LINE__, false); + } + } // END - if + } // END - foreach } // END - foreach } // END - if // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "- Left!"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "- Left!"); } // Filter for updating/validating login data function FILTER_UPDATE_LOGIN_DATA () { // Add missing array - if ((!isset($GLOBALS['last'])) || (!is_array($GLOBALS['last']))) $GLOBALS['last'] = array(); + if ((!isset($GLOBALS['last_online'])) || (!is_array($GLOBALS['last_online']))) $GLOBALS['last_online'] = array(); // Recheck if logged in - if (!IS_MEMBER()) return false; + if (!isMember()) return false; // Secure user ID setUserId(getSession('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(getUserId()), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { // Load last module and online time - $DATA = SQL_FETCHARRAY($result); + $content = SQL_FETCHARRAY($result); // Maybe first login time? - if (empty($DATA['last_module'])) $DATA['last_module'] = 'login'; + if (empty($content['last_module'])) $content['last_module'] = 'login'; // This will be displayed on welcome page! :-) - if (empty($GLOBALS['last']['module'])) { - $GLOBALS['last']['module'] = $DATA['last_module']; $GLOBALS['last']['online'] = $DATA['last_online']; + if (empty($GLOBALS['last_online']['module'])) { + $GLOBALS['last_online']['module'] = $content['last_module']; $GLOBALS['last_online']['online'] = $content['last_online']; } // END - if // 'what' not set? @@ -511,7 +316,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( getWhat(), detectRemoteAddr(), @@ -532,7 +337,7 @@ function FILTER_CHECK_ADMIN_ACL () { $ret = true; // Ok, Cookie-Update done - if ((GET_EXT_VERSION('admins') >= '0.3.0') && (EXT_IS_ACTIVE('admins'))) { + if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) { // Check if action GET variable was set $action = getAction(); if (isWhatSet()) { @@ -555,53 +360,54 @@ function FILTER_INIT_RANDOMIZER () { } // Filter for removing updates -function FILTER_REMOVE_UPDATES () { +function FILTER_REMOVE_UPDATES ($data) { // Init removal list - EXT_INIT_REMOVAL_LIST(); + initExtensionRemovalList(); // Add the current extension to it - EXT_ADD_CURRENT_TO_REMOVAL_LIST(); + addCurrentExtensionToRemovalList(); // Simply remove it - UNSET_EXT_SQLS(); + unsetExtensionSqls(); // Do we need to remove update depency? - if (EXT_COUNT_UPDATE_DEPENDS() > 0) { + if (countExtensionUpdateDependencies() > 0) { // Then find all updates we shall no longer execute - foreach (EXT_GET_UPDATE_DEPENDS() as $id=>$ext_name) { + foreach (getExtensionUpdateDependencies() as $id=>$ext_name) { // Shall we remove this update? - if (in_array($ext_name, EXT_GET_REMOVAL_LIST())) { + if (in_array($ext_name, getExtensionRemovalList())) { // Then remove this extension! - EXT_REMOVE_UPDATE_DEPENDS($ext_name); + removeExtensionUpdateDependency($ext_name); } // END - if } // END - foreach } // END - if + + // Return data + return $data; } // Determines username for current user state function FILTER_DETERMINE_USERNAME () { - global $username; - // Check if logged in - if (IS_MEMBER()) { + if (isMember()) { // 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(getUserId()), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load surname and family's name and build the username $content = SQL_FETCHARRAY($result); // Prepare username - $username = $content['surname'] . ' ' . $content['family']; + setUsername($content['surname'] . ' ' . $content['family']); // Additionally admin? - if (IS_ADMIN()) { + if (isAdmin()) { // Add it - $username .= ' ({--_ADMIN_SHORT--})'; + setUsername(getUsername() . ' ({--USERNAME_ADMIN_SHORT--})'); } // END - if } else { // Hmmm, logged in and no valid userid? - $username = '<em>{--_UNKNOWN--}</em>'; + setUsername('<em>{--USERNAME_UNKNOWN--}</em>'); // Destroy session destroyUserSession(); @@ -612,14 +418,258 @@ function FILTER_DETERMINE_USERNAME () { // Free memory SQL_FREERESULT($result); - } elseif (IS_ADMIN()) { + } elseif (isAdmin()) { // Admin is there - $username = getMessage('_ADMIN'); + setUsername('{--USERNAME_ADMIN--}'); } else { // He's a guest, hello there... ;-) - $username = getMessage('_GUEST'); + setUsername('{--USERNAME_GUEST--}'); + } +} + +// Filter for compiling config entries +function FILTER_COMPILE_CONFIG ($code) { + // Compile {?some_var?} to getConfig('some_var') + preg_match_all('/\{\?(([a-zA-Z0-9-_]+)*)\?\}/', $code, $matches); + + // Some entries found? + if ((count($matches) > 0) && (count($matches[0]) > 0)) { + // Replace all matches + foreach ($matches[0] as $key => $match) { + // Do we have cache? + if (!isset($GLOBALS['compile_config'][$matches[1][$key]])) { + // Is the config valid? + if (isConfigEntrySet($matches[1][$key])) { + // Set it for caching + $GLOBALS['compile_config'][$matches[1][$key]] = getConfig($matches[1][$key]); + } else { + // No config, try the language system + $GLOBALS['compile_config'][$matches[1][$key]] = getMessage('DEFAULT_' . strtoupper($matches[1][$key])); + } + } // END - if + + // Use this for replacing + $code = str_replace($match, $GLOBALS['compile_config'][$matches[1][$key]], $code); + //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die('<pre>'.htmlentities($code).'</pre>'); + } // END - foreach + } // END - if + + // Return compiled code + return $code; +} + +// Filter for compiling extension data +function FILTER_COMPILE_EXTENSION ($code) { + // Compile {%cmd=some_value%} to get extension data + // Support cmd is: + // - version -> getExtensionVersion() call + preg_match_all('/\{%((([a-zA-Z0-9-_]+)=([a-zA-Z0-9-_]+))*)\%\}/', $code, $matches); + + // Some entries found? + if ((count($matches) > 0) && (count($matches[3]) > 0)) { + // Replace all matches + foreach ($matches[3] as $key => $cmd) { + // Construct call-back function name + $functionName = 'getExtension' . ucfirst(strtolower($cmd)); + + // Call the function + $replacer = call_user_func_array($functionName, $matches[4][$key]); + + // Replace it and insert parameter for GET request + $code = str_replace($matches[0][$key], sprintf("&%s=%s&rev=%s", $cmd, $replacer, getConfig('CURR_SVN_REVISION')), $code); + } // END - foreach + } // END - if + + // Return compiled code + return $code; +} + +// Runs some generic filter update steps +function FILTER_UPDATE_EXTENSION_DATA ($ext_name) { + // Create task + createExtensionUpdateTask(getCurrentAdminId(), $ext_name, $GLOBALS['update_ver'][$ext_name], SQL_ESCAPE(getExtensionNotes(getExtensionNotes()))); + + // Update extension's version + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_version`='%s' WHERE `ext_name`='%s' LIMIT 1", + array($GLOBALS['update_ver'][$ext_name], $ext_name), __FUNCTION__, __LINE__); + + // Remove arrays + unsetSqls(); + unset($GLOBALS['update_ver'][$ext_name]); +} + +// Load more reset scripts +function FILTER_RUN_RESET_INCLUDES () { + // Is the reset set or old sql_patches? + if ((!isResetModeEnabled()) || (!isExtensionInstalledAndOlder('sql_patches', '0.4.5'))) { + // Then abort here + logDebugMessage(__FUNCTION__, __LINE__, 'Cannot run reset! Please report this bug. Thanks'); + } // END - if + + // Get more daily reset scripts + setIncludePool('reset', getArrayFromDirectory('inc/reset/', 'reset_')); + + // Update database + if (getConfig('DEBUG_RESET') != 'Y') updateConfiguration('last_update', time()); + + // Is the config entry set? + if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) { + // Create current week mark + $currWeek = date('W', time()); + + // Has it changed? + if ((getConfig('last_week') != $currWeek) || (getConfig('DEBUG_WEEKLY') == 'Y')) { + // Include weekly reset scripts + mergeIncludePool('reset', getArrayFromDirectory('inc/weekly/', 'weekly_')); + + // Update config + if (getConfig('DEBUG_WEEKLY') != 'Y') updateConfiguration('last_week', $currWeek); + } // END - if + + // Create current month mark + $currMonth = date('m', time()); + + // Has it changed? + if ((getConfig('last_month') != $currMonth) || (getConfig('DEBUG_MONTHLY') == 'Y')) { + // Include monthly reset scripts + mergeIncludePool('reset', getArrayFromDirectory('inc/monthly/', 'monthly_')); + + // Update config + if (getConfig('DEBUG_MONTHLY') != 'Y') updateConfiguration('last_month', $currMonth); + } // END - if + } // END - if + + // Run the filter + runFilterChain('load_includes', 'reset'); +} + +// Filter for removing the given extension +function FILTER_REMOVE_EXTENSION () { + // 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", + array(getCurrentExtensionName()), __FUNCTION__, __LINE__); + + // Remove the extension from global cache array as well + removeExtensionFromArray(); + + // Remove the cache + rebuildCacheFile('extension', 'extension'); +} + +// Filter for flushing the output +function FILTER_FLUSH_OUTPUT () { + // Simple, he? + outputHtml(''); +} + +// Prepares an SQL statement part for HTML mail and/or holiday depency +function FILTER_HTML_INCLUDE_USERS ($mode) { + // Exclude no users by default + $MORE = ''; + + // HTML mail? + if ($mode == 'html') $MORE = " AND `html`='Y'"; + if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) { + // Add something for the holiday extension + $MORE .= " AND `holiday_active`='N'"; + } // END - if + + // Return result + return $MORE; +} + +// Filter for determining what/action/module +function FILTER_DETERMINE_WHAT_ACTION () { + // Get all values + if ((getOutputMode() != 1) && (getOutputMode() != -1)) { + // Fix module + if (!isModuleSet()) setModule('index'); + + // Fix 'what' if not yet set + if (!isWhatSet()) setWhat(getWhatFromModule(getModule())); + + // Fix 'action' if not yet set + if (!isActionSet()) setAction(getModeAction(getModule(), getWhat())); + } else { + // Set action/what to empty + setAction(''); + setWhat(''); } + + // Set default 'what' value + //* DEBUG: */ outputHtml('-'.getModule().'/'.getWhat()."-<br />"); + if ((!isWhatSet()) && (!isActionSet()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { + if (getModule() == 'admin') { + // Set 'action' value to 'login' in admin menu + setAction(getModeAction(getModule(), getWhat())); + } elseif ((getModule() == 'index') || (getModule() == 'login')) { + // Set 'what' value to 'welcome' in guest and member menu + setWhatFromConfig('index_home'); + } else { + // Anything else like begging link + setWhat(''); + } + } // END - if +} + +// Sends out pooled mails +function FILTER_TRIGGER_SENDING_POOL () { + // Are we in normal output mode? + if (getOutputMode() != '0') { + // Only in normal output mode to prevent race-conditons! + } // END - if + + // Init counter + $GLOBALS['pool_cnt'] = 0; + + // Init & set the include pool + initIncludePool('pool'); + setIncludePool('pool', getArrayFromDirectory('inc/pool/', 'pool-')); + + // Run the filter + runFilterChain('load_includes', 'pool'); + + // Remove the counter + unset($GLOBALS['pool_cnt']); +} + +// Filter for checking and updating SVN revision +function FILTER_CHECK_SVN_REVISION () { + // Check for patch level differences between databases and current hard-coded + if ((getConfig('CURR_SVN_REVISION') > getConfig('patch_level')) || (getConfig('patch_level') == 'CURR_SVN_REVISION') || (getConfig('patch_ctime') == 'UNIX_TIMES')) { + // Update database and CONFIG array + updateConfiguration(array('patch_level', 'patch_ctime'), array(getConfig('CURR_SVN_REVISION'), 'UNIX_TIMESTAMP()')); + setConfigEntry('patch_level', getConfig('CURR_SVN_REVISION')); + setConfigEntry('patch_ctime', time()); + } // END - if +} + +// Filter for running daily reset +function FILTER_RUN_DAILY_RESET () { + // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D + // 012 3 4 43 3 4432 2 3 3 21 1 221 1 221 1 2 21 1 22 10 + if (((date('d', getConfig('last_update')) != date('d', time())) || (getConfig('DEBUG_RESET') == 'Y')) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (getOutputMode() != 1)) { + // Tell every module we are in reset-mode! + doReset(); + } // END - if +} + +// Filter for loading more runtime includes (not for installation) +function FILTER_LOAD_RUNTIME_INCLUDES () { + // Load more includes + foreach (array('inc/session.php','inc/versions.php') as $inc) { + // Load the include + loadIncludeOnce($inc); + } // END - foreach + + // Load admin include file if he is admin + if (isAdmin()) { + // Administrative functions + loadIncludeOnce('inc/modules/admin/admin-inc.php'); + } // END - if + //* DEBUG: */ addPointsThroughReferalSystem('test', 36, 1000); + //* DEBUG: */ die(); } -// +// [EOF] ?> diff --git a/inc/fix_filters.php b/inc/fix_filters.php index d29a1c323b..756532e988 100644 --- a/inc/fix_filters.php +++ b/inc/fix_filters.php @@ -10,14 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Repariert doppelte Eintraege in filters-Tabelle * * -------------------------------------------------------------------- * - * $Revision:: 1004 $ * - * $Date:: 2009-04-03 09:32:14 +0000 (Fri, 03 Apr 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: quix0r $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Get all filters $result = SQL_QUERY('SELECT `filter_name`, `filter_function` FROM - `{!_MYSQL_PREFIX!}_filters` + `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_function` ASC', __FILE__, __LINE__); @@ -55,28 +54,26 @@ if (SQL_NUMROWS($result) > 0) { // Load row by row while ($filter = SQL_FETCHARRAY($result)) { // Now search again for this filter and get it's total count - $count = GET_TOTAL_DATA($filter['filter_name'], 'filters', 'filter_id', 'filter_name', true, sprintf(" AND `filter_function`='%s'", $filter['filter_function'])); + $count = countSumTotalData($filter['filter_name'], 'filters', 'filter_id', 'filter_name', true, sprintf(" AND `filter_function`='%s'", $filter['filter_function'])); // Do we have more than one entry? if ($count > 1) { // Then clean them up, except one - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_filters` WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT %s", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_filters` WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT %s", array($filter['filter_name'], $filter['filter_function'], ($count - 1)), __FILE__, __LINE__); } // END - while } // END - while // Rebuild the cache - rebuildCacheFiles('filter', 'filter'); -} else { - // @TODO Why does this happen? In installation phase of sql_patches? - debug_report_bug(basename(__FILE__) . ' did run with no filters in database.'); -} + rebuildCacheFile('filter', 'filter'); +} // END - if // Free result SQL_FREERESULT($result); // Now insert our unqiue key -SQL_QUERY("ALTER TABLE `{!_MYSQL_PREFIX!}_filters` ADD UNIQUE `name_function` (`filter_name` , `filter_function`)", __FILE__, __LINE__); +SQL_QUERY('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` DROP KEY `name_function`', __FILE__, __LINE__); +SQL_QUERY('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` ADD UNIQUE `name_function` (`filter_name` , `filter_function`)', __FILE__, __LINE__); // [EOF] ?> diff --git a/inc/fix_menu.php b/inc/fix_menu.php new file mode 100644 index 0000000000..b50b07fe9d --- /dev/null +++ b/inc/fix_menu.php @@ -0,0 +1,103 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/22/2009 * + * =============== Last change: 10/22/2009 * + * * + * -------------------------------------------------------------------- * + * File : fix_menu.php * + * -------------------------------------------------------------------- * + * Short description : Fixes dublicate entries in filters table * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Repariert doppelte Eintraege in filters-Tabelle * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Get all menus +foreach (array('guest','member','admin') as $menu) { + // Query it + $result = SQL_QUERY_ESC("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC, `what` ASC", + array($menu), __FILE__, __LINE__); + + // Init array + $menus = array(); + + // Load all entries + while ($entry = SQL_FETCHARRAY($result)) { + // Is the menu entry set? + if (!isset($menus['menu'][$entry['action']][$entry['what']])) { + // Not found + $menus['menu'][$entry['action']][$entry['what']] = 1; + } else { + // Double entry, so get count + if (is_null($entry['what'])) { + // Main menu + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, " AND `what` IS NULL"); + } else { + // Sub menu + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, sprintf(" AND `what`='%s'", $entry['what'])); + } + //* DEBUG: */ print 'menu='.$menu.',action='.$entry['action'].',what='.$entry['what'].',entries='.$entries.'<br />'; + + // Only remove if we have at least 2 entries from same menu + if ($entries > 1) { + // Remove all except one + if (is_null($entry['what'])) { + // Main menu is double + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s", + array($menu, $entry['action'], ($entries - 1)), __FILE__, __LINE__); + } else { + // Sub menu is double + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s", + array($menu, $entry['action'], $entry['what'], ($entries - 1)), __FILE__, __LINE__); + } + } // END - if + } + } // END - while + + // Free result + SQL_FREERESULT($result); + + // Now insert our unqiue key for action-what combination + SQL_QUERY_ESC("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `action_what`", + array($menu), __FILE__, __LINE__); + SQL_QUERY_ESC("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE `action_what` (`action` , `what`)", + array($menu), __FILE__, __LINE__); + + // Now insert our unqiue key for what + SQL_QUERY_ESC("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `what`", + array($menu), __FILE__, __LINE__); + SQL_QUERY_ESC("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE `what` (`what`)", + array($menu), __FILE__, __LINE__); +} // END - foreach + +// [EOF] +?> diff --git a/inc/footer.php b/inc/footer.php index 7d6a2f8172..9c97434af5 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -36,62 +36,60 @@ * MA 02110-1301 USA * ************************************************************************/ -// Global variable stuff // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Footer disabled or already sent? // 1234 5 54 45 5 5 543 3 321 if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && ($GLOBALS['footer_sent'] != '2'))) && (getOutputMode() != '1'))) { - // Output the generated HTML code or do nothing in direct-mode // @TODO Rewrite these all into filters - if (getTotalFatalErrors() > 0) { - // Output fatal error messages - loadIncludeOnce('inc/fatal_errors.php'); - } // END - if + // Handle fatal errors + handleFatalErrors(); // Shall we display the copyright notice? - if ((!REQUEST_ISSET_GET('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == '2')) { + if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == '2')) { // Backlink enabled? if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) { // Copyright with backlink, thanks! :-) - LOAD_TEMPLATE('copyright_backlink'); + loadTemplate('copyright_backlink'); } else { // No backlink in Copyright note - LOAD_TEMPLATE('copyright'); + loadTemplate('copyright'); } } // END - if // Shall we display the parsing time and number of queries? - if ((GET_EXT_VERSION('sql_patches') >= '0.4.1') && (getConfig('show_timings') == 'Y') && (!REQUEST_ISSET_GET('frame')) && ($GLOBALS['header_sent'] == '2')) { + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && ($GLOBALS['header_sent'] == '2')) { // Then display it here displayParsingTime(); } // END - if + // Shall we display SQL queries? + if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == '2')) { + // Then display it here + displayDebugSqls(); + } // END - if + // Shall we include the uberwach snippet? - if ((!REQUEST_ISSET_GET('frame')) && (EXT_IS_ACTIVE('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == '2')) { + if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == '2')) { // Then display it here loadUberwachSnippet(); } // END - if // Load page footer - LOAD_TEMPLATE('page_footer'); + loadTemplate('page_footer'); // And the last closing HTML tag - OUTPUT_HTML('</html>'); + outputHtml('</html>'); } // END - if // Footer has been reached $GLOBALS['footer_sent'] = 1; -// Output HTML code -OUTPUT_HTML(''); - // Shutdown shutdown(); -// +// [EOF] ?> diff --git a/inc/functions.php b/inc/functions.php index 361b71180b..27dc9ab349 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,49 +35,44 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * * MA 02110-1301 USA * ************************************************************************/ + // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Output HTML code directly or 'render' it. You addionally switch the new-line character off -function OUTPUT_HTML ($HTML, $newLine = true) { - // Some global variables - global $OUTPUT, $username; - - // Prepare IP number and User Agent - $REMOTE_ADDR = detectRemoteAddr(); - $HTTP_USER_AGENT = detectUserAgent(); +function outputHtml ($htmlCode, $newLine = true) { + // Transfer username + $username = getUsername(); // Do we have HTML-Code here? - if (!empty($HTML)) { + if (!empty($htmlCode)) { // Yes, so we handle it as you have configured - switch (getConfig('OUTPUT_MODE')) - { + switch (getConfig('OUTPUT_MODE')) { case 'render': // That's why you don't need any \n at the end of your HTML code... :-) - if (constant('_OB_CACHING') == 'on') { + if (getPhpCaching() == 'on') { // Output into PHP's internal buffer - outputRawCode($HTML); + outputRawCode($htmlCode); // That's why you don't need any \n at the end of your HTML code... :-) - if ($newLine) print("\n"); + if ($newLine === true) print("\n"); } else { // Render mode for old or lame servers... - $OUTPUT .= $HTML; + $GLOBALS['output'] .= $htmlCode; // That's why you don't need any \n at the end of your HTML code... :-) - if ($newLine) $OUTPUT .= "\n"; + if ($newLine === true) $GLOBALS['output'] .= "\n"; } break; case 'direct': // If we are switching from render to direct output rendered code - if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; } + if ((!empty($GLOBALS['output'])) && (getPhpCaching() != 'on')) { outputRawCode($GLOBALS['output']); $GLOBALS['output'] = ''; } // The same as above... ^ - outputRawCode($HTML); + outputRawCode($htmlCode); if ($newLine) print("\n"); break; @@ -85,22 +80,22 @@ function OUTPUT_HTML ($HTML, $newLine = true) { // Huh, something goes wrong or maybe you have edited config.php ??? app_die(__FUNCTION__, __LINE__, '<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}'); break; - } - } elseif ((constant('_OB_CACHING') == 'on') && (isset($GLOBALS['footer_sent'])) && ($GLOBALS['footer_sent'] == 1)) { + } // END - switch + } elseif ((getPhpCaching() == 'on') && (isset($GLOBALS['footer_sent'])) && ($GLOBALS['footer_sent'] == 1)) { // Headers already sent? if (headers_sent()) { // Log this error - DEBUG_LOG(__FUNCTION__, __LINE__, 'Headers already sent! We need debug backtrace here.'); + logDebugMessage(__FUNCTION__, __LINE__, 'Headers already sent! We need debug backtrace here.'); // Trigger an user error debug_report_bug('Headers are already sent!'); } // END - if // Output cached HTML code - $OUTPUT = ob_get_contents(); + $GLOBALS['output'] = ob_get_contents(); // Clear output buffer for later output if output is found - if (!empty($OUTPUT)) { + if (!empty($GLOBALS['output'])) { clearOutputBuffer(); } // END - if @@ -116,57 +111,57 @@ function OUTPUT_HTML ($HTML, $newLine = true) { sendHeader('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 sendHeader('Pragma: no-cache'); // HTTP/1.0 sendHeader('Connection: Close'); + sendHeader('Content-Type: ' . getContentType() . '; charset=UTF-8'); + sendHeader('Content-language: ' . getLanguage()); // Extension 'rewrite' installed? - if ((EXT_IS_ACTIVE('rewrite')) && (getOutputMode() != '1') && (getOutputMode() != '-1')) { - $OUTPUT = rewriteLinksInCode($OUTPUT); + if ((isExtensionActive('rewrite')) && (getOutputMode() != '1')) { + $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']); } // END - if // Compile and run finished rendered HTML code - while (strpos($OUTPUT, '{!') > 0) { - // Replace _MYSQL_PREFIX - $OUTPUT = str_replace('{!_MYSQL_PREFIX!}', getConfig('_MYSQL_PREFIX'), $OUTPUT); - + while ((strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) { // Prepare the content and eval() it... $content = array(); $newContent = ''; - $eval = "\$newContent = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";"; + + // Compile it + $eval = "\$newContent = \"".compileCode(smartAddSlashes($GLOBALS['output']))."\";"; eval($eval); // Was that eval okay? if (empty($newContent)) { // Something went wrong! - app_die(__FUNCTION__, __LINE__, 'Evaluation error:<pre>' . htmlentities($eval) . '</pre>'); + debug_report_bug('Evaluation error:<pre>' . htmlentities($eval) . '</pre>'); } // END - if - $OUTPUT = $newContent; + $GLOBALS['output'] = $newContent; } // END - while // Output code here, DO NOT REMOVE! ;-) - outputRawCode($OUTPUT); - } elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($OUTPUT))) { + outputRawCode($GLOBALS['output']); + } elseif ((getConfig('OUTPUT_MODE') == 'render') && (!empty($GLOBALS['output']))) { // Rewrite links when rewrite extension is active - if ((EXT_IS_ACTIVE('rewrite')) && (getOutputMode() != '1') && (getOutputMode() != '-1')) { - $OUTPUT = rewriteLinksInCode($OUTPUT); + if ((isExtensionActive('rewrite')) && (getOutputMode() != '1')) { + $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']); } // END - if // Compile and run finished rendered HTML code - while (strpos($OUTPUT, '{!') > 0) { - $eval = "\$OUTPUT = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";"; - eval($eval); + while (strpos($GLOBALS['output'], '{!') > 0) { + eval("\$GLOBALS['output'] = \"".compileCode(smartAddSlashes($GLOBALS['output']))."\";"); } // END - while // Output code here, DO NOT REMOVE! ;-) - outputRawCode($OUTPUT); + outputRawCode($GLOBALS['output']); } } // Output the raw HTML code -function outputRawCode ($HTML) { +function outputRawCode ($htmlCode) { // Output stripped HTML code to avoid broken JavaScript code, etc. - print(stripslashes(stripslashes($HTML))); + print(stripslashes(stripslashes($htmlCode))); - // Flush the output if only constant('_OB_CACHING') is not 'on' - if (constant('_OB_CACHING') != 'on') { + // Flush the output if only getPhpCaching() is not 'on' + if (getPhpCaching() != 'on') { // Flush it flush(); } // END - if @@ -196,7 +191,7 @@ function addFatalMessage ($F, $L, $message, $extra='') { $GLOBALS['fatal_messages'][] = $message; // Log fatal messages away - DEBUG_LOG($F, $L, " message={$message}"); + logDebugMessage($F, $L, " message={$message}"); } // Getter for total fatal message count @@ -215,203 +210,370 @@ function getTotalFatalErrors () { } // Load a template file and return it's content (only it's name; do not use ' or ") -function LOAD_TEMPLATE ($template, $return=false, $content=array()) { +function loadTemplate ($template, $return=false, $content=array()) { // @TODO Remove this sanity-check if all is fine if (!is_bool($return)) debug_report_bug('return is not bool (' . gettype($return) . ')'); - // Prepare IP number and User Agent - $REMOTE_ADDR = detectRemoteAddr(); - $HTTP_USER_AGENT = detectUserAgent(); + // @TODO Try to rewrite all $DATA to $content + global $DATA; + + // Do we have cache? + if (!isset($GLOBALS['template_eval'][$template])) { + // Add more variables which you want to use in your template files + $username = getUsername(); + + // Make all template names lowercase + $template = strtolower($template); + + // Count the template load + incrementConfigEntry('num_templates'); + + // Init some data + $ret = ''; + if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; + + // Generate date/time string + $date_time = generateDateTime(time(), '1'); + + // Is content an array + if (is_array($content)) $content['date_time'] = $date_time; + + // @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", + array(getUserId()), __FUNCTION__, __LINE__); + + // Is content an array? + if (is_array($content)) { + // Merge data + $content = merge_array($content, SQL_FETCHARRAY($result)); + + // Translate gender + $content['gender'] = translateGender($content['gender']); + } else { + // @DEPRECATED + // @TODO Find all templates which are using these direct variables and rewrite them. + // @TODO After this step is done, this else-block is history + list($gender, $surname, $family, $email) = SQL_FETCHROW($result); + + // Translate gender + $gender = translateGender($gender); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("DEPRECATION-WARNING: content is not array [%s], template=%s.", gettype($content), $template)); + } + + // Free result + SQL_FREERESULT($result); + } // END - if + + // Base directory + $basePath = sprintf("%stemplates/%s/html/", getConfig('PATH'), getLanguage()); + $mode = ''; + + // Check for admin/guest/member templates + if (substr($template, 0, 6) == 'admin_') { + // Admin template found + $mode = 'admin/'; + } elseif (substr($template, 0, 6) == 'guest_') { + // Guest template found + $mode = 'guest/'; + } elseif (substr($template, 0, 7) == 'member_') { + // Member template found + $mode = 'member/'; + } elseif (substr($template, 0, 8) == 'install_') { + // Installation template found + $mode = 'install/'; + } elseif (substr($template, 0, 4) == 'ext_') { + // Extension template found + $mode = 'ext/'; + } elseif (substr($template, 0, 3) == 'la_') { + // 'Logical-area' template found + $mode = 'la/'; + } elseif (substr($template, 0, 3) == 'js_') { + // JavaScript template found + $mode = 'js/'; + } elseif (substr($template, 0, 5) == 'menu_') { + // Menu template found + $mode = 'menu/'; + } else { + // Test for extension + $test = substr($template, 0, strpos($template, '_')); + + // Probe for valid extension name + if (isExtensionNameValid($test)) { + // Set extra path to extension's name + $mode = $test . '/'; + } // END - if + } + + //////////////////////// + // Generate file name // + //////////////////////// + $FQFN = $basePath . $mode . $template . '.tpl'; + + if ((isWhatSet()) && ((strpos($template, '_header') > 0) || (strpos($template, '_footer') > 0)) && (($mode == 'guest/') || ($mode == 'member/') || ($mode == 'admin/'))) { + // Select what depended header/footer template file for admin/guest/member area + $file2 = sprintf("%s%s%s_%s.tpl", + $basePath, + $mode, + $template, + getWhat() + ); + + // Probe for it... + if (isFileReadable($file2)) $FQFN = $file2; + + // Remove variable from memory + unset($file2); + } // END - if + + // Does the special template exists? + if (!isFileReadable($FQFN)) { + // Reset to default template + $FQFN = $basePath . $template . '.tpl'; + } // END - if + + // Now does the final template exists? + if (isFileReadable($FQFN)) { + // The local file does exists so we load it. :) + $GLOBALS['tpl_content'] = readFromFile($FQFN); + + // Replace ' to our own chars to preventing them being quoted + while (strpos($GLOBALS['tpl_content'], "'") !== false) { $GLOBALS['tpl_content'] = str_replace("'", '{QUOT}', $GLOBALS['tpl_content']); } + + // Do we have to compile the code? + $ret = ''; + if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) { + // Normal HTML output? + if ($GLOBALS['output_mode'] == 0) { + // Add surrounding HTML comments to help finding bugs faster + $ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n"; + + // Prepare eval() command + $eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";'; + } else { + // Prepare eval() command + $eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";'; + } + } else { + // Simply return loaded code + $eval = '$ret = $GLOBALS[\'tpl_content\'];'; + } // END - if + + // Cache the eval() command here + $GLOBALS['template_eval'][$template] = $eval; + + // Eval the code + eval($GLOBALS['template_eval'][$template]); + } else { + // No file! + $GLOBALS['template_eval'][$template] = '404'; + } + } elseif (((isAdmin()) || ((isInstalling()) && (!isInstalled()))) && ($GLOBALS['template_eval'][$template] == '404')) { + // Only admins shall see this warning or when installation mode is active + $ret = '<br /><span class=\\"guest_failed\\">{--TEMPLATE_404--}</span><br /> +(' . $template . ')<br /> +<br /> +{--TEMPLATE_CONTENT--} +<pre>' . print_r($content, true) . '</pre> +{--TEMPLATE_DATA--} +<pre>' . print_r($DATA, true) . '</pre> +<br /><br />\";'; + } else { + // Eval the code + eval($GLOBALS['template_eval'][$template]); + } - // Add more variables which you want to use in your template files - global $DATA, $username; + // Do we have some content to output or return? + if (!empty($ret)) { + // Not empty so let's put it out! ;) + if ($return === true) { + // Return the HTML code + return $ret; + } else { + // Output direct + outputHtml($ret); + } + } elseif (isDebugModeEnabled()) { + // Warning, empty output! + return 'E:' . $template . ',content=<pre>' . print_r($content, true) . '</pre>'; + } +} - // Make all template names lowercase +// Loads an email template and compiles it +function loadEmailTemplate ($template, $content = array(), $UID = '0') { + global $DATA; + + // Our configuration is kept non-global here + $_CONFIG = getConfigArray(); + + // Make sure all template names are lowercase! $template = strtolower($template); - // Count the template load - incrementConfigEntry('num_templates'); + // Default 'nickname' if extension is not installed + $nick = '---'; - // Init some data - $ret = ''; - if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; + // Prepare IP number and User Agent + $REMOTE_ADDR = detectRemoteAddr(); + $HTTP_USER_AGENT = detectUserAgent(); - // Generate date/time string - $date_time = generateDateTime(time(), '1'); + // Default admin + $ADMIN = getConfig('MAIN_TITLE'); - // Is content an array - if (is_array($content)) $content['date_time'] = $date_time; + // Is the admin logged in? + if (isAdmin()) { + // Get admin id + $adminId = getCurrentAdminId(); + + // Load Admin data + $ADMIN = getAdminEmail($adminId); + } // END - if + + // Neutral email address is default + $email = getConfig('WEBMASTER'); - // @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", - array(getUserId()), __FUNCTION__, __LINE__); + // Expiration in a nice output format + // NOTE: Use $content[expiration] in your templates instead of $EXPIRATION + if (getConfig('auto_purge') == 0) { + // Will never expire! + $EXPIRATION = getMessage('MAIL_WILL_NEVER_EXPIRE'); + } else { + // Create nice date string + $EXPIRATION = createFancyTime(getConfig('auto_purge')); + } - // Is content an array? - if (is_array($content)) { - // Merge data - $content = merge_array($content, SQL_FETCHARRAY($result)); + // Is content an array? + if (is_array($content)) { + // Add expiration to array, $EXPIRATION is now deprecated! + $content['expiration'] = $EXPIRATION; + } // END - if - // Translate gender - $content['gender'] = translateGender($content['gender']); + // Load user's data + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):UID={$UID},template={$template},content[]=".gettype($content)."<br />"); + if (($UID > 0) && (is_array($content))) { + // If nickname extension is installed, fetch nickname as well + if (isExtensionActive('nickname')) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />"); + // Load nickname + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email`, `nickname` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($UID)), __FUNCTION__, __LINE__); } else { - // @DEPRECATED - // @TODO Find all templates which are using these direct variables and rewrite them. - // @TODO After this step is done, this else-block is history - list($gender, $surname, $family, $email) = SQL_FETCHROW($result); - - // Translate gender - $gender = translateGender($gender); - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("DEPRECATION-WARNING: content is not array [%s], template=%s.", gettype($content), $template)); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />"); + /// Load normal data + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($UID)), __FUNCTION__, __LINE__); } + // Fetch and merge data + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - PRE<br />"); + $content = merge_array($content, SQL_FETCHARRAY($result)); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - AFTER<br />"); + // Free result SQL_FREERESULT($result); } // END - if + // Translate M to male or F to female if present + if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); + + // Overwrite email from data if present + if (isset($content['email'])) $email = $content['email']; + + // Store email for some functions in global data array + $DATA['email'] = $email; + // Base directory - $basePath = sprintf("%stemplates/%s/html/", getConfig('PATH'), getLanguage()); - $mode = ''; + $basePath = sprintf("%stemplates/%s/emails/", getConfig('PATH'), getLanguage()); // Check for admin/guest/member templates - if (strpos($template, 'admin_') > -1) { + if (substr($template, 0, 6) == 'admin_') { // Admin template found - $mode = 'admin/'; - } elseif (strpos($template, 'guest_') > -1) { + $FQFN = $basePath.'admin/' . $template.'.tpl'; + } elseif (substr($template, 0, 6) == 'guest_') { // Guest template found - $mode = 'guest/'; - } elseif (strpos($template, 'member_') > -1) { + $FQFN = $basePath.'guest/' . $template.'.tpl'; + } elseif (substr($template, 0, 7) == 'member_') { // Member template found - $mode = 'member/'; - } elseif (strpos($template, 'install_') > -1) { - // Installation template found - $mode = 'install/'; - } elseif (strpos($template, 'ext_') > -1) { - // Extension template found - $mode = 'ext/'; - } elseif (strpos($template, 'la_') > -1) { - // 'Logical-area' template found - $mode = 'la/'; - } elseif (strpos($template, 'js_') > -1) { - // JavaScript template found - $mode = 'js/'; + $FQFN = $basePath.'member/' . $template.'.tpl'; } else { // Test for extension $test = substr($template, 0, strpos($template, '_')); - if (EXT_IS_ACTIVE($test)) { + if (isExtensionNameValid($test)) { // Set extra path to extension's name - $mode = $test . '/'; - } // END - if + $FQFN = $basePath . $test.'/' . $template.'.tpl'; + } else { + // No special filename + $FQFN = $basePath . $template.'.tpl'; + } } - //////////////////////// - // Generate file name // - //////////////////////// - $FQFN = $basePath . $mode . $template . '.tpl'; - - if ((isWhatSet()) && ((strpos($template, '_header') > 0) || (strpos($template, '_footer') > 0)) && (($mode == 'guest/') || ($mode == 'member/') || ($mode == 'admin/'))) { - // Select what depended header/footer template file for admin/guest/member area - $file2 = sprintf("%s%s%s_%s.tpl", - $basePath, - $mode, - $template, - getWhat() - ); - - // Probe for it... - if (isFileReadable($file2)) $FQFN = $file2; - - // Remove variable from memory - unset($file2); - } // END - if - // Does the special template exists? if (!isFileReadable($FQFN)) { // Reset to default template - $FQFN = $basePath . $template . '.tpl'; + $FQFN = $basePath . $template.'.tpl'; } // END - if // Now does the final template exists? + $newContent = ''; if (isFileReadable($FQFN)) { // The local file does exists so we load it. :) - $tmpl_file = readFromFile($FQFN); + $GLOBALS['tpl_content'] = readFromFile($FQFN); + $GLOBALS['tpl_content'] = SQL_ESCAPE($GLOBALS['tpl_content']); - // Replace ' to our own chars to preventing them being quoted - while (strpos($tmpl_file, "'") !== false) { $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file); } - - // Do we have to compile the code? - $ret = ''; - if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) { - // Compile it - $eval = "\$ret = \"".COMPILE_CODE(smartAddSlashes($tmpl_file))."\";"; - eval($eval); - // NEW WAY: $ret = str_replace("\$content", "\$GLOBALS[compile][".$template."]", $tmpl_file); - // NEW WAY: $ret = str_replace("\$DATA", "\$GLOBALS[data][".$template."]", $ret); - // NEW WAY: $GLOBALS['compile'][$template] = $content; - // NEW WAY: $GLOBALS['data'][$template] = $DATA; - } else { - // Simply return loaded code - $ret = $tmpl_file; - } - - // Normal HTML output? - if ($GLOBALS['output_mode'] == 0) { - // Add surrounding HTML comments to help finding bugs faster - $ret = "<!-- Template " . $template . " - Start -->\n" . $ret . "<!-- Template " . $template . " - End -->\n"; - } // END - if - } elseif ((IS_ADMIN()) || ((isInstalling()) && (!isInstalled()))) { - // Only admins shall see this warning or when installation mode is active - $ret = "<br /><span class=\"guest_failed\">{--TEMPLATE_404--}</span><br /> -(".basename($FQFN).")<br /> -<br /> + // Run code + $GLOBALS['tpl_content'] = "\$newContent = decodeEntities(\"".compileCode($GLOBALS['tpl_content'])."\");"; + eval($GLOBALS['tpl_content']); + } elseif (!empty($template)) { + // Template file not found! + $newContent = "{--TEMPLATE_404--}: " . $template."<br /> {--TEMPLATE_CONTENT--} <pre>".print_r($content, true)."</pre> {--TEMPLATE_DATA--} <pre>".print_r($DATA, true)."</pre> <br /><br />"; + + // Debug mode not active? Then remove the HTML tags + if (!isDebugModeEnabled()) $newContent = secureString($newContent); + } else { + // No template name supplied! + $newContent = getMessage('NO_TEMPLATE_SUPPLIED'); } + // Is there some content? + if (empty($newContent)) { + // Compiling failed + $newContent = "Compiler error for template {$template}!\nUncompiled content:\n" . $GLOBALS['tpl_content']; + // Add last error if the required function exists + if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx."; + } // END - if + // Remove content and data unset($content); unset($DATA); - // Do we have some content to output or return? - if (!empty($ret)) { - // Not empty so let's put it out! ;) - if ($return === true) { - // Return the HTML code - return $ret; - } else { - // Output direct - OUTPUT_HTML($ret); - } - } elseif (isDebugModeEnabled()) { - // Warning, empty output! - return "E:" . $template."<br />\n"; - } + // Return compiled content + return compileCode($newContent); } // Send mail out to an email address -function sendEmail ($toEmail, $subject, $message, $HTML = 'N', $mailHeader = '') { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail},SUBJECT={$subject}<br />"); +function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '') { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail},SUBJECT={$subject}<br />"); // Compile subject line (for POINTS constant etc.) - $eval = "\$subject = decodeEntities(\"".COMPILE_CODE(smartAddSlashes($subject))."\");"; - eval($eval); + eval("\$subject = decodeEntities(\"".compileCode(smartAddSlashes($subject))."\");"); // Set from header if ((!eregi('@', $toEmail)) && ($toEmail > 0)) { // Value detected, is the message extension installed? // @TODO Extension 'msg' does not exist - if (EXT_IS_ACTIVE('msg')) { - ADD_MESSAGE_TO_BOX($toEmail, $subject, $message, $HTML); + if (isExtensionActive('msg')) { + ADD_MESSAGE_TO_BOX($toEmail, $subject, $message, $isHtml); return; } else { // Load email address - $result_email = SQL_QUERY_ESC("SELECT `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", + $result_email = SQL_QUERY_ESC("SELECT `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($toEmail)), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result_email)."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result_email)."<br />"); // Does the user exist? if (SQL_NUMROWS($result_email)) { @@ -429,53 +591,51 @@ function sendEmail ($toEmail, $subject, $message, $HTML = 'N', $mailHeader = '') // Is the webmaster! $toEmail = getConfig('WEBMASTER'); } - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail}<br />"); // Check for PHPMailer or debug-mode if (!checkPhpMailerUsage()) { // Not in PHPMailer-Mode if (empty($mailHeader)) { // Load email header template - $mailHeader = LOAD_EMAIL_TEMPLATE('header'); + $mailHeader = loadEmailTemplate('header'); } else { // Append header - $mailHeader .= LOAD_EMAIL_TEMPLATE('header'); + $mailHeader .= loadEmailTemplate('header'); } } elseif (isDebugModeEnabled()) { if (empty($mailHeader)) { // Load email header template - $mailHeader = LOAD_EMAIL_TEMPLATE('header'); + $mailHeader = loadEmailTemplate('header'); } else { // Append header - $mailHeader .= LOAD_EMAIL_TEMPLATE('header'); + $mailHeader .= loadEmailTemplate('header'); } } // Compile "TO" - $eval = "\$toEmail = \"".COMPILE_CODE(smartAddSlashes($toEmail))."\";"; - eval($eval); + eval("\$toEmail = \"".compileCode(smartAddSlashes($toEmail))."\";"); // Compile "MSG" - $eval = "\$message = \"".COMPILE_CODE(smartAddSlashes($message))."\";"; - eval($eval); + eval("\$message = \"".compileCode(smartAddSlashes($message))."\";"); // Fix HTML parameter (default is no!) - if (empty($HTML)) $HTML = 'N'; + if (empty($isHtml)) $isHtml = 'N'; if (isDebugModeEnabled()) { // In debug mode we want to display the mail instead of sending it away so we can debug this part - OUTPUT_HTML("<pre> + outputHtml("<pre> ".htmlentities(trim($mailHeader))." To : " . $toEmail." Subject : " . $subject." Message : " . $message." </pre>\n"); - } elseif (($HTML == 'Y') && (EXT_IS_ACTIVE('html_mail'))) { + } elseif (($isHtml == 'Y') && (isExtensionActive('html_mail'))) { // Send mail as HTML away sendHtmlEmail($toEmail, $subject, $message, $mailHeader); } elseif (!empty($toEmail)) { // Send Mail away sendRawEmail($toEmail, $subject, $message, $mailHeader); - } elseif ($HTML == 'N') { + } elseif ($isHtml != 'Y') { // Problem found! sendRawEmail(getConfig('WEBMASTER'), '[PROBLEM:]' . $subject, $message, $mailHeader); } @@ -513,7 +673,7 @@ function sendRawEmail ($toEmail, $subject, $message, $from) { } $mail->FromName = getConfig('MAIN_TITLE'); $mail->Subject = $subject; - if ((EXT_IS_ACTIVE('html_mail')) && (strip_tags($message) != $message)) { + if ((isExtensionActive('html_mail')) && (secureString($message) != $message)) { $mail->Body = $message; $mail->AltBody = 'Your mail program required HTML support to read this mail!'; $mail->WordWrap = 70; @@ -568,8 +728,7 @@ function generateDateTime ($time, $mode = '0') { return getMessage('NEVER_HAPPENED'); } // END - if - switch (getLanguage()) - { + switch (getLanguage()) { case 'de': // German date / time format switch ($mode) { case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; @@ -577,22 +736,24 @@ function generateDateTime ($time, $mode = '0') { case '2': $ret = date("d.m.Y|H:i", $time); break; case '3': $ret = date("d.m.Y", $time); break; default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; } break; - default: // Default is the US date / time format! - switch ($mode) { - case '0': $ret = date("r", $time); break; - case '1': $ret = date("Y-m-d - g:i A", $time); break; - case '2': $ret = date("y-m-d|H:i", $time); break; - case '3': $ret = date("y-m-d", $time); break; - default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); - break; - } - } + default: // Default is the US date / time format! + switch ($mode) { + case '0': $ret = date("r", $time); break; + case '1': $ret = date("Y-m-d - g:i A", $time); break; + case '2': $ret = date("y-m-d|H:i", $time); break; + case '3': $ret = date("y-m-d", $time); break; + default: + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + break; + } // END - switch + } // END - switch + + // Return result return $ret; } @@ -605,7 +766,7 @@ function translateYesNo ($yn) { case 'N': $translated = getMessage('NO'); break; default: // Log unknown value - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn)); break; } @@ -622,7 +783,7 @@ function translatePoolType ($type) { $constName = sprintf("POOL_TYPE_%s", $type); // Does it exist? - if (defined($constName)) { + if (isMessageIdValid($constName)) { // Then use it $translated = getMessage($constName); } // END - if @@ -643,7 +804,7 @@ function translateComma ($dotted, $cut = true, $max = 0) { if ($max > 0) $maxComma = $max; // Cut zeros off? - if (($cut) && ($max == 0)) { + if (($cut === true) && ($max == 0)) { // Test for commata if in cut-mode $com = explode('.', $dotted); if (count($com) < 2) { @@ -653,15 +814,15 @@ function translateComma ($dotted, $cut = true, $max = 0) { } // END - if // Debug log - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "dotted={$dotted},maxComma={$maxComma}"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "dotted={$dotted},maxComma={$maxComma}"); // Translate it now switch (getLanguage()) { - case 'de': + case 'de': // German language $dotted = number_format($dotted, $maxComma, ',', '.'); break; - default: + default: // All others $dotted = number_format($dotted, $maxComma, '.', ','); break; } @@ -682,7 +843,7 @@ function translateGender ($gender) { case 'C': $ret = getMessage('GENDER_C'); break; default: // Log unknown gender - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown gender %s detected.", $gender)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown gender %s detected.", $gender)); break; } @@ -692,8 +853,8 @@ function translateGender ($gender) { // "Translates" the user status function translateUserStatus ($status) { - switch ($status) - { + // Generate message depending on status + switch ($status) { case 'UNCONFIRMED': case 'CONFIRMED': case 'LOCKED': @@ -706,17 +867,17 @@ function translateUserStatus ($status) { break; default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status); break; - } + } // END - switch // Return it return $ret; } // Generates an URL for the dereferer -function DEREFERER ($URL) { +function generateDerefererUrl ($URL) { // Don't de-refer our own links! if (substr($URL, 0, strlen(getConfig('URL'))) != getConfig('URL')) { // De-refer this link @@ -728,183 +889,40 @@ function DEREFERER ($URL) { } // Generates an URL for the frametester -function FRAMETESTER ($URL) { +function generateFrametesterUrl ($URL) { // Prepare frametester URL $frametesterUrl = sprintf("{?URL?}/modules.php?module=frametester&url=%s", - encodeString(compileUriCode($URL)) + encodeString(compileUriCode($URL)) ); + + // Return the new URL return $frametesterUrl; } // Count entries from e.g. a selection box function countSelection ($array) { - $ret = 0; - if (is_array($array)) { - foreach ($array as $key => $selected) { - if (!empty($selected)) $ret++; - } - } - return $ret; -} - -// Generate XHTML code for the CAPTCHA -function generateCaptchaCode ($code, $type, $DATA, $uid) { - return '<IMG border="0" alt="Code" src="{?URL?}/mailid_top.php?uid=' . $uid . '&' . $type . '=' . $DATA . '&mode=img&code=' . $code . '" />'; -} - -// Loads an email template and compiles it -function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') { - global $DATA; - - // Our configuration is kept non-global here - $_CONFIG = getConfigArray(); - - // Make sure all template names are lowercase! - $template = strtolower($template); - - // Default 'nickname' if extension is not installed - $nick = '---'; - - // Prepare IP number and User Agent - $REMOTE_ADDR = detectRemoteAddr(); - $HTTP_USER_AGENT = detectUserAgent(); - - // Default admin - $ADMIN = getConfig('MAIN_TITLE'); - - // Is the admin logged in? - if (IS_ADMIN()) { - // Get admin id - $aid = getCurrentAdminId(); - - // Load Admin data - $ADMIN = getAdminEmail($aid); + // Integrity check + if (!is_array($array)) { + // Not an array! + debug_report_bug(__FUNCTION__.': No array provided.'); } // END - if - // Neutral email address is default - $email = getConfig('WEBMASTER'); - - // Expiration in a nice output format - // NOTE: Use $content[expiration] in your templates instead of $EXPIRATION - if (getConfig('auto_purge') == 0) { - // Will never expire! - $EXPIRATION = getMessage('MAIL_WILL_NEVER_EXPIRE'); - } else { - // Create nice date string - $EXPIRATION = createFancyTime(getConfig('auto_purge')); - } - - // Is content an array? - if (is_array($content)) { - // Add expiration to array, $EXPIRATION is now deprecated! - $content['expiration'] = $EXPIRATION; - } // END - if - - // Load user's data - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):UID={$UID},template={$template},content[]=".gettype($content)."<br />"); - if (($UID > 0) && (is_array($content))) { - // If nickname extension is installed, fetch nickname as well - if (EXT_IS_ACTIVE('nickname')) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />"); - // Load nickname - $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email`, `nickname` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($UID)), __FUNCTION__, __LINE__); - } else { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />"); - /// Load normal data - $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `gender`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($UID)), __FUNCTION__, __LINE__); - } - - // Fetch and merge data - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - PRE<br />"); - $content = merge_array($content, SQL_FETCHARRAY($result)); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - AFTER<br />"); - - // Free result - SQL_FREERESULT($result); - } // END - if - - // Translate M to male or F to female if present - if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); - - // Overwrite email from data if present - if (isset($content['email'])) $email = $content['email']; - - // Store email for some functions in global data array - $DATA['email'] = $email; - - // Base directory - $basePath = sprintf("%stemplates/%s/emails/", getConfig('PATH'), getLanguage()); - - // Check for admin/guest/member templates - if (strpos($template, 'admin_') > -1) { - // Admin template found - $FQFN = $basePath.'admin/' . $template.'.tpl'; - } elseif (strpos($template, 'guest_') > -1) { - // Guest template found - $FQFN = $basePath.'guest/' . $template.'.tpl'; - } elseif (strpos($template, 'member_') > -1) { - // Member template found - $FQFN = $basePath.'member/' . $template.'.tpl'; - } else { - // Test for extension - $test = substr($template, 0, strpos($template, '_')); - if (EXT_IS_ACTIVE($test)) { - // Set extra path to extension's name - $FQFN = $basePath . $test.'/' . $template.'.tpl'; - } else { - // No special filename - $FQFN = $basePath . $template.'.tpl'; - } - } - - // Does the special template exists? - if (!isFileReadable($FQFN)) { - // Reset to default template - $FQFN = $basePath . $template.'.tpl'; - } // END - if - - // Now does the final template exists? - $newContent = ''; - if (isFileReadable($FQFN)) { - // The local file does exists so we load it. :) - $tmpl_file = readFromFile($FQFN); - $tmpl_file = SQL_ESCAPE($tmpl_file); - - // Run code - $tmpl_file = "\$newContent = decodeEntities(\"".COMPILE_CODE($tmpl_file)."\");"; - eval($tmpl_file); - } elseif (!empty($template)) { - // Template file not found! - $newContent = "{--TEMPLATE_404--}: " . $template."<br /> -{--TEMPLATE_CONTENT--} -<pre>".print_r($content, true)."</pre> -{--TEMPLATE_DATA--} -<pre>".print_r($DATA, true)."</pre> -<br /><br />"; - - // Debug mode not active? Then remove the HTML tags - if (!isDebugModeEnabled()) $newContent = strip_tags($newContent); - } else { - // No template name supplied! - $newContent = getMessage('NO_TEMPLATE_SUPPLIED'); - } + // Init count + $ret = 0; - // Is there some content? - if (empty($newContent)) { - // Compiling failed - $newContent = "Compiler error for template {$template}!\nUncompiled content:\n" . $tmpl_file; - // Add last error if the required function exists - if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx."; - } // END - if + // Count all entries + foreach ($array as $key => $selected) { + // Is it checked? + if (!empty($selected)) $ret++; + } // END - foreach - // Remove content and data - unset($content); - unset($DATA); + // Return counted selections + return $ret; +} - // Return compiled content - return COMPILE_CODE($newContent); +// Generate XHTML code for the CAPTCHA +function generateCaptchaCode ($code, $type, $DATA, $userid) { + return '<IMG border="0" alt="Code" src="{?URL?}/mailid_top.php?userid=' . $userid . '&' . $type . '=' . $DATA . '&mode=img&code=' . $code . '" />'; } // Generates a timestamp (some wrapper for mktime()) @@ -931,7 +949,7 @@ function redirectToUrl ($URL) { // Three different debug ways... //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL)); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $URL); //* DEBUG: */ die($URL); // Default 'rel' value is external, nofollow is evil from Google and hurts the Internet @@ -944,20 +962,20 @@ function redirectToUrl ($URL) { } // END - if // Get output buffer - $OUTPUT = ob_get_contents(); + $GLOBALS['output'] = ob_get_contents(); // Clear it only if there is content - if (!empty($OUTPUT)) { + if (!empty($GLOBALS['output'])) { clearOutputBuffer(); } // END - if // Simple probe for bots/spiders from search engines if ((strpos(detectUserAgent(), 'spider') !== false) || (strpos(detectUserAgent(), 'bot') !== false)) { // Secure the URL against bad things such als HTML insertions and so on... - $URL = htmlentities(strip_tags($URL), ENT_QUOTES); + $URL = secureString($URL); // Output new location link as anchor - OUTPUT_HTML('<a href="' . $URL . '"' . $rel . '>' . $URL . '</a>'); + outputHtml('<a href="' . $URL . '"' . $rel . '>' . $URL . '</a>'); } elseif (!headers_sent()) { // Load URL when headers are not sent //* DEBUG: */ debug_report_bug("URL={$URL}"); @@ -965,7 +983,7 @@ function redirectToUrl ($URL) { } else { // Output error message loadInclude('inc/header.php'); - LOAD_TEMPLATE('redirect_url', false, str_replace('&', '&', $URL)); + loadTemplate('redirect_url', false, str_replace('&', '&', $URL)); loadInclude('inc/footer.php'); } @@ -981,15 +999,15 @@ function redirectToConfiguredUrl ($configEntry) { // Is this URL set? if (is_null($URL)) { // Then abort here - trigger_error(sprintf("Configuration entry %s is not set!", $configEntry)); + debug_report_bug(sprintf("Configuration entry %s is not set!", $configEntry)); } // END - if // Load the URL redirectToUrl($URL); } -// -function COMPILE_CODE ($code, $simple = false, $constants = true, $full = true) { +// Compiles the given HTML/mail code +function compileCode ($code, $simple = false, $constants = true, $full = true) { // Is the code a string? if (!is_string($code)) { // Silently return it @@ -1000,7 +1018,10 @@ function COMPILE_CODE ($code, $simple = false, $constants = true, $full = true) $secChars = $GLOBALS['security_chars']; // Select smaller set of chars to replace when we e.g. want to compile URLs - if (!$full) $secChars = $GLOBALS['url_chars']; + if ($full === false) $secChars = $GLOBALS['url_chars']; + + // Compile more through a filter + $code = runFilterChain('compile_code', $code); // Compile constants if ($constants === true) { @@ -1039,10 +1060,10 @@ function COMPILE_CODE ($code, $simple = false, $constants = true, $full = true) $test = substr($found, 0, strlen($match)); // Does this entry exist? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found={$found},match={$match},set={$set}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found={$found},match={$match},set={$set}<br />"); if ($test == $match) { // Match found! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):fuzzyFound!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):fuzzyFound!<br />"); $fuzzyFound = true; break; } // END - if @@ -1054,35 +1075,20 @@ function COMPILE_CODE ($code, $simple = false, $constants = true, $full = true) // Take all string elements if ((is_string($matches[4][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key."_" . $matches[4][$key]]))) { // Replace it in the code - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):key={$key},match={$match}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):key={$key},match={$match}<br />"); $newMatch = str_replace('[', "['", str_replace(']', "']", $match)); $code = str_replace($match, "\"." . $newMatch.".\"", $code); $matchesFound[$key . '_' . $matches[4][$key]] = 1; $matchesFound[$match] = 1; } elseif (!isset($matchesFound[$match])) { // Not yet replaced! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):match={$match}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):match={$match}<br />"); $code = str_replace($match, "\"." . $match.".\"", $code); $matchesFound[$match] = 1; } } // END - foreach } // END - if - // Compile {?some_var?} to getConfig('some_var') - preg_match_all('/\{\?(([a-zA-Z0-9-_]+)*)\?\}/', $code, $matches); - - // Some entries found? - if ((count($matches) > 0) && (count($matches[0]) > 0)) { - // Replace all matches - foreach ($matches[0] as $key => $match) { - // Replace it - //* DEBUG: */ if ($key == 0) { print '<pre>'; debug_print_backtrace(); print '</pre>'; } - //* DEBUG: */ print htmlentities($match).'['.strlen($match).']='.$matches[1][$key].'='.getConfig($matches[1][$key]).' (key='.$key.',len='.strlen($code).')<br />'; - $code = str_replace($match, getConfig($matches[1][$key]), $code); - //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die('<pre>'.htmlentities($code).'</pre>'); - } // END - foreach - } // END - if - // Return compiled code return $code; } @@ -1109,7 +1115,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums = foreach ($dummy[$a_sort[$primary_key]] as $key => $value) { foreach ($dummy[$a_sort[$primary_key]] as $key2 => $value2) { $match = false; - if (!$nums) { + if ($nums === false) { // Sort byte-by-byte (also numbers will be interpreted as chars! E.g.: "9" > "10") if (($key != $key2) && (strcmp(strtolower($dummy[$a_sort[$primary_key]][$key]), strtolower($dummy[$a_sort[$primary_key]][$key2])) == $order)) $match = true; } elseif ($key != $key2) { @@ -1139,7 +1145,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums = } // -function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { +function addSelectionBox ($type, $default, $prefix = '', $id = '0') { $OUT = ''; if ($type == 'yn') { @@ -1155,7 +1161,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } switch ($type) { - case "day": // Day + case 'day': // Day for ($idx = 1; $idx < 32; $idx++) { $OUT .= "<option value=\"" . $idx."\""; if ($default == $idx) $OUT .= ' selected="selected"'; @@ -1163,7 +1169,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } // END - for break; - case "month": // Month + case 'month': // Month foreach ($GLOBALS['month_descr'] as $month => $descr) { $OUT .= "<option value=\"" . $month."\""; if ($default == $month) $OUT .= ' selected="selected"'; @@ -1171,12 +1177,12 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } // END - for break; - case "year": // Year + case 'year': // Year // Get current year $year = date('Y', time()); // Use configured min age or fixed? - if (GET_EXT_VERSION('other') >= '0.2.1') { + if ((isExtensionActive('other')) && (getExtensionVersion('other') >= '0.2.1')) { // Configured $startYear = $year - getConfig('min_age'); } else { @@ -1204,7 +1210,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { // Get current year and subtract the configured minimum age $OUT .= "<option value=\"".($minYear - 1)."\"><" . $minYear."</option>\n"; // Calculate earliest year depending on extension version - if (GET_EXT_VERSION('other') >= '0.2.1') { + if ((isExtensionActive('other')) && (getExtensionVersion('other') >= '0.2.1')) { // Use configured minimum age $year = date('Y', time()) - getConfig('min_age'); } else { @@ -1221,8 +1227,8 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } break; - case "sec": - case "min": + case 'sec': + case 'min': for ($idx = 0; $idx < 60; $idx+=5) { if (strlen($idx) == 1) $idx = '0' . $idx; $OUT .= "<option value=\"" . $idx."\""; @@ -1231,7 +1237,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } // END - for break; - case "hour": + case 'hour': for ($idx = 0; $idx < 24; $idx++) { if (strlen($idx) == 1) $idx = '0' . $idx; $OUT .= "<option value=\"" . $idx."\""; @@ -1244,7 +1250,7 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { $OUT .= "<option value=\"Y\""; if ($default == 'Y') $OUT .= ' selected="selected"'; $OUT .= ">{--YES--}</option>\n<option value=\"N\""; - if ($default == 'N') $OUT .= ' selected="selected"'; + if ($default != 'Y') $OUT .= ' selected="selected"'; $OUT .= ">{--NO--}</option>\n"; break; } @@ -1256,42 +1262,44 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { // Deprecated : $length // Optional : $DATA // -function generateRandomCode ($length, $code, $uid, $DATA = '') { +function generateRandomCode ($length, $code, $userid, $DATA = '') { // Build server string - $server = $_SERVER['PHP_SELF'].getConfig('ENCRYPT_SEPERATOR').detectUserAgent().getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_SOFTWARE').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().":'.':".filemtime(getConfig('PATH').'inc/databases.php'); + $server = $_SERVER['PHP_SELF'] . getConfig('ENCRYPT_SEPERATOR') . detectUserAgent() . getConfig('ENCRYPT_SEPERATOR') . getenv('SERVER_SOFTWARE') . getConfig('ENCRYPT_SEPERATOR') . detectRemoteAddr().":'.':".filemtime(getConfig('PATH').'inc/databases.php'); // Build key string - $keys = getConfig('SITE_KEY').getConfig('ENCRYPT_SEPERATOR').getConfig('DATE_KEY'); + $keys = getConfig('SITE_KEY') . getConfig('ENCRYPT_SEPERATOR') . getConfig('DATE_KEY'); if (isConfigEntrySet('secret_key')) $keys .= getConfig('ENCRYPT_SEPERATOR').getConfig('secret_key'); if (isConfigEntrySet('file_hash')) $keys .= getConfig('ENCRYPT_SEPERATOR').getConfig('file_hash'); - $keys .= getConfig('ENCRYPT_SEPERATOR') . date("d-m-Y (l-F-T)", getConfig('patch_ctime')); + $keys .= getConfig('ENCRYPT_SEPERATOR') . date('d-m-Y (l-F-T)', getConfig('patch_ctime')); if (isConfigEntrySet('master_salt')) $keys .= getConfig('ENCRYPT_SEPERATOR').getConfig('master_salt'); // Build string from misc data - $data = $code.getConfig('ENCRYPT_SEPERATOR') . $uid.getConfig('ENCRYPT_SEPERATOR') . $DATA; + $data = $code . getConfig('ENCRYPT_SEPERATOR') . $userid . getConfig('ENCRYPT_SEPERATOR') . $DATA; // Add more additional data - if (isSessionVariableSet('u_hash')) $data .= getConfig('ENCRYPT_SEPERATOR').getSession('u_hash'); - if (isUserIdSet()) $data .= getConfig('ENCRYPT_SEPERATOR').getUserId(); - if (isSessionVariableSet('mxchange_theme')) $data .= getConfig('ENCRYPT_SEPERATOR').getSession('mxchange_theme'); - if (isSessionVariableSet('mx_lang')) $data .= getConfig('ENCRYPT_SEPERATOR').getLanguage(); - if (isset($GLOBALS['refid'])) $data .= getConfig('ENCRYPT_SEPERATOR') . $GLOBALS['refid']; + if (isSessionVariableSet('u_hash')) $data .= getConfig('ENCRYPT_SEPERATOR') . getSession('u_hash'); + + // Add referal id, language, theme and userid + $data .= getConfig('ENCRYPT_SEPERATOR') . determineReferalId(); + $data .= getConfig('ENCRYPT_SEPERATOR') . getLanguage(); + $data .= getConfig('ENCRYPT_SEPERATOR') . getCurrentTheme(); + $data .= getConfig('ENCRYPT_SEPERATOR') . getUserId(); // Calculate number for generating the code $a = $code + getConfig('_ADD') - 1; if (isConfigEntrySet('master_hash')) { // Generate hash with master salt from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getConfig('_PRIME')).getConfig('ENCRYPT_SEPERATOR') . $server.getConfig('ENCRYPT_SEPERATOR') . $keys.getConfig('ENCRYPT_SEPERATOR') . $data.getConfig('ENCRYPT_SEPERATOR').getConfig('DATE_KEY').getConfig('ENCRYPT_SEPERATOR') . $a, getConfig('master_salt')); + $saltedHash = generateHash(($a % getConfig('_PRIME')) . getConfig('ENCRYPT_SEPERATOR') . $server . getConfig('ENCRYPT_SEPERATOR') . $keys . getConfig('ENCRYPT_SEPERATOR') . $data . getConfig('ENCRYPT_SEPERATOR') . getConfig('DATE_KEY') . getConfig('ENCRYPT_SEPERATOR') . $a, getConfig('master_salt')); // Create number from hash - $rcode = hexdec(substr($saltedHash, strlen(getConfig('master_salt')), 9)) / abs(getConfig('_MAX') - $a + sqrt(getConfig('_ADD'))) / pi(); + $rcode = hexdec(substr($saltedHash, strlen(getConfig('master_salt')), 9)) / abs(getConfig('rand_no') - $a + sqrt(getConfig('_ADD'))) / pi(); } else { // Generate hash with "hash of site key" from modula of number with the prime number and other data - $saltedHash = generateHash(($a % getConfig('_PRIME')).getConfig('ENCRYPT_SEPERATOR') . $server.getConfig('ENCRYPT_SEPERATOR') . $keys.getConfig('ENCRYPT_SEPERATOR') . $data.getConfig('ENCRYPT_SEPERATOR').getConfig('DATE_KEY').getConfig('ENCRYPT_SEPERATOR') . $a, substr(sha1(getConfig('SITE_KEY')), 0, 8)); + $saltedHash = generateHash(($a % getConfig('_PRIME')) . getConfig('ENCRYPT_SEPERATOR') . $server . getConfig('ENCRYPT_SEPERATOR') . $keys . getConfig('ENCRYPT_SEPERATOR') . $data . getConfig('ENCRYPT_SEPERATOR') . getConfig('DATE_KEY') . getConfig('ENCRYPT_SEPERATOR') . $a, substr(sha1(getConfig('SITE_KEY')), 0, 8)); // Create number from hash - $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getConfig('_MAX') - $a + sqrt(getConfig('_ADD'))) / pi(); + $rcode = hexdec(substr($saltedHash, 8, 9)) / abs(getConfig('rand_no') - $a + sqrt(getConfig('_ADD'))) / pi(); } // At least 10 numbers shall be secure enought! @@ -1326,11 +1334,11 @@ function bigintval ($num, $castValue = true) { } // Insert the code in $img_code into jpeg or PNG image -function GENERATE_IMAGE ($img_code, $headerSent=true) { +function generateImageOrCode ($img_code, $headerSent=true) { if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == 0)) { // Stop execution of function here because of over-sized code length return; - } elseif (!$headerSent) { + } elseif ($headerSent === false) { // Return in an HTML code code return "<img src=\"{?URL?}/img.php?code=" . $img_code."\" alt=\"Image\" />\n"; } @@ -1343,17 +1351,17 @@ function GENERATE_IMAGE ($img_code, $headerSent=true) { { case 'jpg': // Okay, load image and hide all errors - $image = @imagecreatefromjpeg($img); + $image = imagecreatefromjpeg($img); break; case 'png': // Okay, load image and hide all errors - $image = @imagecreatefrompng($img); + $image = imagecreatefrompng($img); break; } } else { // Exit function here - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("File for image type %s not found.", getConfig('img_type'))); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("File for image type %s not found.", getConfig('img_type'))); return; } @@ -1388,7 +1396,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = $M2 = date('m', (time() + $timestamp)); // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day) - if ((floor($TEST) == $TEST) && ($M1 == "02") && ($M2 > "02")) $SWITCH = getConfig('one_day'); + if ((floor($TEST) == $TEST) && ($M1 == "02") && ($M2 > "02")) $SWITCH = getConfig('ONE_DAY'); // First of all years... $Y = abs(floor($timestamp / (31536000 + $SWITCH))); @@ -1397,19 +1405,19 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = $M = abs(floor($timestamp / 2628000 - $Y * 12)); //* DEBUG: */ print("M={$M}<br />"); // Next weeks - $W = abs(floor($timestamp / 604800 - $Y * ((365 + $SWITCH / getConfig('one_day')) / 7) - ($M / 12 * (365 + $SWITCH / getConfig('one_day')) / 7))); + $W = abs(floor($timestamp / 604800 - $Y * ((365 + $SWITCH / getConfig('ONE_DAY')) / 7) - ($M / 12 * (365 + $SWITCH / getConfig('ONE_DAY')) / 7))); //* DEBUG: */ print("W={$W}<br />"); // Next days... - $D = abs(floor($timestamp / 86400 - $Y * (365 + $SWITCH / getConfig('one_day')) - ($M / 12 * (365 + $SWITCH / getConfig('one_day'))) - $W * 7)); + $D = abs(floor($timestamp / 86400 - $Y * (365 + $SWITCH / getConfig('ONE_DAY')) - ($M / 12 * (365 + $SWITCH / getConfig('ONE_DAY'))) - $W * 7)); //* DEBUG: */ print("D={$D}<br />"); // Next hours... - $h = abs(floor($timestamp / 3600 - $Y * (365 + $SWITCH / getConfig('one_day')) * 24 - ($M / 12 * (365 + $SWITCH / getConfig('one_day')) * 24) - $W * 7 * 24 - $D * 24)); + $h = abs(floor($timestamp / 3600 - $Y * (365 + $SWITCH / getConfig('ONE_DAY')) * 24 - ($M / 12 * (365 + $SWITCH / getConfig('ONE_DAY')) * 24) - $W * 7 * 24 - $D * 24)); //* DEBUG: */ print("h={$h}<br />"); // Next minutes.. - $m = abs(floor($timestamp / 60 - $Y * (365 + $SWITCH / getConfig('one_day')) * 24 * 60 - ($M / 12 * (365 + $SWITCH / getConfig('one_day')) * 24 * 60) - $W * 7 * 24 * 60 - $D * 24 * 60 - $h * 60)); + $m = abs(floor($timestamp / 60 - $Y * (365 + $SWITCH / getConfig('ONE_DAY')) * 24 * 60 - ($M / 12 * (365 + $SWITCH / getConfig('ONE_DAY')) * 24 * 60) - $W * 7 * 24 * 60 - $D * 24 * 60 - $h * 60)); //* DEBUG: */ print("m={$m}<br />"); // And at last seconds... - $s = abs(floor($timestamp - $Y * (365 + $SWITCH / getConfig('one_day')) * 24 * 3600 - ($M / 12 * (365 + $SWITCH / getConfig('one_day')) * 24 * 3600) - $W * 7 * 24 * 3600 - $D * 24 * 3600 - $h * 3600 - $m * 60)); + $s = abs(floor($timestamp - $Y * (365 + $SWITCH / getConfig('ONE_DAY')) * 24 * 3600 - ($M / 12 * (365 + $SWITCH / getConfig('ONE_DAY')) * 24 * 3600) - $W * 7 * 24 * 3600 - $D * 24 * 3600 - $h * 3600 - $m * 60)); //* DEBUG: */ print("s={$s}<br />"); // Is seconds zero and time is < 60 seconds? @@ -1569,7 +1577,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = } // -function createTimestampFromSelections ($prefix, $POST) { +function createTimestampFromSelections ($prefix, $postData) { // Initial return value $ret = 0; @@ -1578,89 +1586,25 @@ function createTimestampFromSelections ($prefix, $POST) { $TEST = date('Y', time()) / 4; $M1 = date('m', time()); // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day) - if ((floor($TEST) == $TEST) && ($M1 == "02") && ($POST[$prefix."_mo"] > "02")) $SWITCH = getConfig('one_day'); + if ((floor($TEST) == $TEST) && ($M1 == "02") && ($postData[$prefix."_mo"] > "02")) $SWITCH = getConfig('ONE_DAY'); // First add years... - $ret += $POST[$prefix."_ye"] * (31536000 + $SWITCH); + $ret += $postData[$prefix."_ye"] * (31536000 + $SWITCH); // Next months... - $ret += $POST[$prefix."_mo"] * 2628000; + $ret += $postData[$prefix."_mo"] * 2628000; // Next weeks - $ret += $POST[$prefix."_we"] * 604800; + $ret += $postData[$prefix."_we"] * 604800; // Next days... - $ret += $POST[$prefix."_da"] * 86400; + $ret += $postData[$prefix."_da"] * 86400; // Next hours... - $ret += $POST[$prefix."_ho"] * 3600; + $ret += $postData[$prefix."_ho"] * 3600; // Next minutes.. - $ret += $POST[$prefix."_mi"] * 60; + $ret += $postData[$prefix."_mi"] * 60; // And at last seconds... - $ret += $POST[$prefix."_se"]; + $ret += $postData[$prefix."_se"]; // Return calculated value return $ret; } -// Sends out mail to all administrators -// IMPORTANT: Please use SEND_ADMIN_NOTIFCATION() for now! -function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) { - // Trim template name - $template = trim($template); - - // Load email template - $message = LOAD_EMAIL_TEMPLATE($template, $content, $UID); - - // 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", - array($template), __FUNCTION__, __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')", - array($template), __FUNCTION__, __LINE__); - } else { - // Load admin IDs... - // @TODO This can be, somehow, rewritten - $adminIds = array(); - while ($content = SQL_FETCHARRAY($result)) { - $adminIds[] = $content['admin_id']; - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Init result - $result = false; - - // "implode" IDs and query string - $aid = implode(',', $adminIds); - if ($aid == '-1') { - if (EXT_IS_ACTIVE('events')) { - // Add line to user events - EVENTS_ADD_LINE($subj, $message, $UID); - } else { - // Log error for debug - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,UID=%s", - $template, - $subj, - $UID - )); - } - } elseif ($aid == '0') { - // Select all email adresses - $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`", - __FUNCTION__, __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), __FUNCTION__, __LINE__); - } - } - - // Load email addresses and send away - while ($content = SQL_FETCHARRAY($result)) { - sendEmail($content['email'], $subj, $message); - } // END - while - - // Free memory - SQL_FREERESULT($result); -} - // Creates a 'fancy' human-readable timestamp from a Uni* stamp function createFancyTime ($stamp) { // Get data array with years/months/weeks/days/... @@ -1669,8 +1613,7 @@ function createFancyTime ($stamp) { foreach($data as $k => $v) { if ($v > 0) { // Value is greater than 0 "eval" data to return string - $eval = "\$ret .= \", \".\$v.\" {--_".strtoupper($k)."--}\";"; - eval($eval); + eval("\$ret .= \", \".\$v.\" {--_".strtoupper($k)."--}\";"); break; } // END - if } // END - foreach @@ -1688,10 +1631,10 @@ function createFancyTime ($stamp) { return $ret; } -// -function ADD_EMAIL_NAV ($PAGES, $offset, $show_form, $colspan, $return=false) { +// Generates a navigation row for listing emails +function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=false) { $SEP = ''; $TOP = ''; - if (!$show_form) { + if ($show_form === false) { $TOP = " top2"; $SEP = "<tr><td colspan=\"" . $colspan."\" class=\"seperator\"> </td></tr>"; } @@ -1699,49 +1642,47 @@ function ADD_EMAIL_NAV ($PAGES, $offset, $show_form, $colspan, $return=false) { $NAV = ''; for ($page = 1; $page <= $PAGES; $page++) { // Is the page currently selected or shall we generate a link to it? - if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET('page')) && ($page == '1'))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) { // Is currently selected, so only highlight it - $NAV .= "<strong>-"; + $NAV .= '<strong>-'; } else { // Open anchor tag and add base URL - $NAV .= "<a href=\"{?URL?}/modules.php?module=admin&what=" . getWhat()."&page=" . $page."&offset=" . $offset; + $NAV .= '<a href="{?URL?}/modules.php?module=admin&what=' . getWhat() . '&page=' . $page . '&offset=' . $offset; // Add userid when we shall show all mails from a single member - if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) $NAV .= "&uid=".bigintval(REQUEST_GET('uid')); + if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) $NAV .= '&userid=' . bigintval(getRequestElement('userid')); // Close open anchor tag - $NAV .= "\">"; + $NAV .= '">'; } $NAV .= $page; - if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET('page')) && ($page == '1'))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) { // Is currently selected, so only highlight it - $NAV .= "-</strong>"; + $NAV .= '-</strong>'; } else { // Close anchor tag - $NAV .= "</a>"; + $NAV .= '</a>'; } // Add seperator if we have not yet reached total pages - if ($page < $PAGES) $NAV .= " | "; + if ($page < $PAGES) $NAV .= ' | '; } // END - for // Define constants only once - if (!defined('__NAV_OUTPUT')) { - define('__NAV_OUTPUT' , $NAV); - define('__NAV_COLSPAN', $colspan); - define('__NAV_TOP' , $TOP); - define('__NAV_SEP' , $SEP); - } // END - if + $content['nav'] = $NAV; + $content['span'] = $colspan; + $content['top'] = $TOP; + $content['sep'] = $SEP; // Load navigation template - $OUT = LOAD_TEMPLATE("admin_email_nav_row", true); + $OUT = loadTemplate('admin_email_nav_row', true, $content); if ($return === true) { // Return generated HTML-Code return $OUT; } else { // Output HTML-Code - OUTPUT_HTML($OUT); + outputHtml($OUT); } } @@ -1782,24 +1723,21 @@ function extractHostnameFromUrl (&$script) { // Send a GET request function sendGetRequest ($script) { - // Compile the script name - $script = COMPILE_CODE($script); - // Extract host name from script $host = extractHostnameFromUrl($script); // Generate GET request header - $request = "GET /" . trim($script) . " HTTP/1.1" . getConfig('HTTP_EOL'); - $request .= "Host: " . $host . getConfig('HTTP_EOL'); - $request .= "Referer: " . getConfig('URL') . "/admin.php" . getConfig('HTTP_EOL'); + $request = 'GET /' . trim($script) . ' HTTP/1.1' . getConfig('HTTP_EOL'); + $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); + $request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL'); if (isConfigEntrySet('FULL_VERSION')) { - $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL'); + $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL'); } else { - $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('VERSION') . getConfig('HTTP_EOL'); + $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('VERSION') . getConfig('HTTP_EOL'); } - $request .= "Content-Type: text/plain" . getConfig('HTTP_EOL'); - $request .= "Cache-Control: no-cache" . getConfig('HTTP_EOL'); - $request .= "Connection: Close" . getConfig('HTTP_EOL') . getConfig('HTTP_EOL'); + $request .= 'Content-Type: text/plain' . getConfig('HTTP_EOL'); + $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL'); + $request .= 'Connection: Close' . getConfig('HTTP_EOL') . getConfig('HTTP_EOL'); // Send the raw request $response = sendRawRequest($host, $request); @@ -1813,12 +1751,12 @@ function sendPostRequest ($script, $postData) { // Is postData an array? if (!is_array($postData)) { // Abort here - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("postData is not an array. Type: %s", gettype($postData))); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("postData is not an array. Type: %s", gettype($postData))); return array('', '', ''); } // END - if // Compile the script name - $script = COMPILE_CODE($script); + $script = compileCode($script); // Extract host name from script $host = extractHostnameFromUrl($script); @@ -1827,14 +1765,14 @@ function sendPostRequest ($script, $postData) { $data = http_build_query($postData, '','&'); // Generate POST request header - $request = "POST /" . trim($script) . " HTTP/1.1" . getConfig('HTTP_EOL'); - $request .= "Host: " . $host . getConfig('HTTP_EOL'); - $request .= "Referer: " . getConfig('URL') . "/admin.php" . getConfig('HTTP_EOL'); - $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL'); - $request .= "Content-type: application/x-www-form-urlencoded" . getConfig('HTTP_EOL'); - $request .= "Content-length: " . strlen($data) . getConfig('HTTP_EOL'); - $request .= "Cache-Control: no-cache" . getConfig('HTTP_EOL'); - $request .= "Connection: Close" . getConfig('HTTP_EOL') . getConfig('HTTP_EOL'); + $request = 'POST /' . trim($script) . ' HTTP/1.1' . getConfig('HTTP_EOL'); + $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); + $request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL'); + $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL'); + $request .= 'Content-Type: application/x-www-form-urlencoded' . getConfig('HTTP_EOL'); + $request .= 'Content-length: ' . strlen($data) . getConfig('HTTP_EOL'); + $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL'); + $request .= 'Connection: Close' . getConfig('HTTP_EOL') . getConfig('HTTP_EOL'); $request .= $data; // Send the raw request @@ -1856,7 +1794,7 @@ function sendRawRequest ($host, $request) { $useProxy = false; // Are proxy settins set? - if ((getConfig('proxy_host') != '') && (getConfig('proxy_port') > 0)) { + if ((isConfigEntrySet('proxy_host')) && (getConfig('proxy_host') != '') && (isConfigEntrySet('proxy_port')) && (getConfig('proxy_port') > 0)) { // Then use it $useProxy = true; } // END - if @@ -1865,7 +1803,7 @@ function sendRawRequest ($host, $request) { //* DEBUG: */ die("SCRIPT=" . $script."<br />"); if ($useProxy === true) { // Connect to host through proxy connection - $fp = @fsockopen(COMPILE_CODE(getConfig('proxy_host')), bigintval(getConfig('proxy_port')), $errno, $errdesc, 30); + $fp = @fsockopen(compileCode(getConfig('proxy_host')), bigintval(getConfig('proxy_port')), $errno, $errdesc, 30); } else { // Connect to host directly $fp = @fsockopen($host, 80, $errno, $errdesc, 30); @@ -1886,7 +1824,7 @@ function sendRawRequest ($host, $request) { // Use login data to proxy? (username at least!) if (getConfig('proxy_username') != '') { // Add it as well - $encodedAuth = base64_encode(COMPILE_CODE(getConfig('proxy_username')) . getConfig('ENCRYPT_SEPERATOR') . COMPILE_CODE(getConfig('proxy_password'))); + $encodedAuth = base64_encode(compileCode(getConfig('proxy_username')) . getConfig('ENCRYPT_SEPERATOR') . compileCode(getConfig('proxy_password'))); $proxyTunnel .= "Proxy-Authorization: Basic " . $encodedAuth . getConfig('HTTP_EOL'); } // END - if @@ -1961,7 +1899,7 @@ function sendRawRequest ($host, $request) { // Taken from www.php.net eregi() user comments function isEmailValid ($email) { // Compile email - $email = COMPILE_CODE($email); + $email = compileCode($email); // Check first part of email address $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*'; @@ -1980,14 +1918,14 @@ function isEmailValid ($email) { function isUrlValid ($URL, $compile=true) { // Trim URL a little $URL = trim(urldecode($URL)); - //* DEBUG: */ OUTPUT_HTML($URL."<br />"); + //* DEBUG: */ outputHtml($URL."<br />"); // Compile some chars out... if ($compile === true) $URL = compileUriCode($URL, false, false, false); - //* DEBUG: */ OUTPUT_HTML($URL."<br />"); + //* DEBUG: */ outputHtml($URL."<br />"); // Check for the extension filter - if (EXT_IS_ACTIVE('filter')) { + if (isExtensionActive('filter')) { // Use the extension's filter set return FILTER_VALIDATE_URL($URL, false); } // END - if @@ -1998,37 +1936,39 @@ function isUrlValid ($URL, $compile=true) { } // Generate a list of administrative links to a given userid -function generateMemberAdminActionLinks ($uid, $status = '') { +function generateMemberAdminActionLinks ($userid, $status = '') { + // Make sure userid is a number + if ($userid != bigintval($userid)) debug_report_bug('userid is not a number!'); + // Define all main targets - $TARGETS = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points'); + $targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points'); // Begin of navigation links - $eval = "\$OUT = \"[ "; + $OUT = "[ "; - foreach ($TARGETS as $tar) { - $eval .= "<span class=\\\"admin_user_link\\\"><a href=\\\"{?URL?}/modules.php?module=admin&what=" . $tar."&uid=" . $uid."\\\" title=\\\"{--ADMIN_LINK_"; - //* DEBUG: */ OUTPUT_HTML("*" . $tar.'/' . $status."*<br />"); - if (($tar == "lock_user") && ($status == 'LOCKED')) { + foreach ($targetArray as $tar) { + $OUT .= "<span class=\"admin_user_link\"><a href=\"{?URL?}/modules.php?module=admin&what=" . $tar . "&userid=" . $userid . "\" title=\"{--ADMIN_LINK_"; + //* DEBUG: */ outputHtml("*" . $tar.'/' . $status."*<br />"); + if (($tar == 'lock_user') && ($status == 'LOCKED')) { // Locked accounts shall be unlocked - $eval .= "UNLOCK_USER"; + $OUT .= 'UNLOCK_USER'; } else { // All other status is fine - $eval .= strtoupper($tar); + $OUT .= strtoupper($tar); } - $eval .= "_TITLE--}\\\">{--ADMIN_"; - if (($tar == "lock_user") && ($status == 'LOCKED')) { + $OUT .= "_TITLE--}\">{--ADMIN_"; + if (($tar == 'lock_user') && ($status == 'LOCKED')) { // Locked accounts shall be unlocked - $eval .= "UNLOCK_USER"; + $OUT .= 'UNLOCK_USER'; } else { // All other status is fine - $eval .= strtoupper($tar); + $OUT .= strtoupper($tar); } - $eval .= "--}</a></span> | "; + $OUT .= "--}</a></span> | "; } // Finish navigation link - $eval = substr($eval, 0, -7)."]\";"; - eval($eval); + $OUT = substr($OUT, 0, -7) . ']'; // Return string return $OUT; @@ -2040,19 +1980,19 @@ function generateEmailLink ($email, $table = 'admins') { $EMAIL = 'mailto:' . $email; // Check for several extensions - if ((EXT_IS_ACTIVE('admins')) && ($table == 'admins')) { + if ((isExtensionActive('admins')) && ($table == 'admins')) { // Create email link for contacting admin in guest area $EMAIL = generateAdminEmailLink($email); - } elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) { + } elseif ((isExtensionActive('user')) && (getExtensionVersion('user') >= '0.3.3') && ($table == 'user_data')) { // Create email link for contacting a member within admin area (or later in other areas, too?) $EMAIL = generateUserEmailLink($email, 'admin'); - } elseif ((EXT_IS_ACTIVE('sponsor')) && ($table == 'sponsor_data')) { + } elseif ((isExtensionActive('sponsor')) && ($table == 'sponsor_data')) { // Create email link to contact sponsor within admin area (or like the link above?) $EMAIL = generateSponsorEmailLink($email, 'sponsor_data'); } // Shall I close the link when there is no admin? - if ((!IS_ADMIN()) && ($EMAIL == $email)) $EMAIL = '#'; // Closed! + if ((!isAdmin()) && ($EMAIL == $email)) $EMAIL = '#'; // Closed! // Return email link return $EMAIL; @@ -2061,7 +2001,7 @@ function generateEmailLink ($email, $table = 'admins') { // Generate a hash for extra-security for all passwords function generateHash ($plainText, $salt = '') { // Is the required extension 'sql_patches' there and a salt is not given? - if (((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (!EXT_IS_ACTIVE('sql_patches'))) && (empty($salt))) { + if (((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionActive('sql_patches'))) && (empty($salt))) { // Extension sql_patches is missing/outdated so we hash the plain text with MD5 return md5($plainText); } // END - if @@ -2075,32 +2015,32 @@ function generateHash ($plainText, $salt = '') { // When the salt is empty build a new one, else use the first x configured characters as the salt if (empty($salt)) { // Build server string (inc/databases.php is no longer updated with every commit) - $server = $_SERVER['PHP_SELF'].getConfig('ENCRYPT_SEPERATOR').detectUserAgent().getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_SOFTWARE').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr(); + $server = $_SERVER['PHP_SELF'] . getConfig('ENCRYPT_SEPERATOR') . detectUserAgent() . getConfig('ENCRYPT_SEPERATOR') . getenv('SERVER_SOFTWARE') . getConfig('ENCRYPT_SEPERATOR') . detectRemoteAddr(); // Build key string - $keys = getConfig('SITE_KEY').getConfig('ENCRYPT_SEPERATOR').getConfig('DATE_KEY').getConfig('ENCRYPT_SEPERATOR').getConfig('secret_key').getConfig('ENCRYPT_SEPERATOR').getConfig('file_hash').getConfig('ENCRYPT_SEPERATOR').date("d-m-Y (l-F-T)", getConfig('patch_ctime')).getConfig('ENCRYPT_SEPERATOR').getConfig('master_salt'); + $keys = getConfig('SITE_KEY') . getConfig('ENCRYPT_SEPERATOR') . getConfig('DATE_KEY') . getConfig('ENCRYPT_SEPERATOR') . getConfig('secret_key') . getConfig('ENCRYPT_SEPERATOR') . getConfig('file_hash') . getConfig('ENCRYPT_SEPERATOR') . date('d-m-Y (l-F-T)', getConfig('patch_ctime')) . getConfig('ENCRYPT_SEPERATOR') . getConfig('master_salt'); // Additional data - $data = $plainText.getConfig('ENCRYPT_SEPERATOR').uniqid(mt_rand(), true).getConfig('ENCRYPT_SEPERATOR').time(); + $data = $plainText . getConfig('ENCRYPT_SEPERATOR') . uniqid(mt_rand(), true) . getConfig('ENCRYPT_SEPERATOR') . time(); // Calculate number for generating the code $a = time() + getConfig('_ADD') - 1; // Generate SHA1 sum from modula of number and the prime number - $sha1 = sha1(($a % getConfig('_PRIME')) . $server.getConfig('ENCRYPT_SEPERATOR') . $keys.getConfig('ENCRYPT_SEPERATOR') . $data.getConfig('ENCRYPT_SEPERATOR').getConfig('DATE_KEY').getConfig('ENCRYPT_SEPERATOR') . $a); - //* DEBUG: */ OUTPUT_HTML("SHA1=" . $sha1." (".strlen($sha1).")<br />"); + $sha1 = sha1(($a % getConfig('_PRIME')) . $server . getConfig('ENCRYPT_SEPERATOR') . $keys . getConfig('ENCRYPT_SEPERATOR') . $data . getConfig('ENCRYPT_SEPERATOR') . getConfig('DATE_KEY') . getConfig('ENCRYPT_SEPERATOR') . $a); + //* DEBUG: */ outputHtml("SHA1=" . $sha1." (".strlen($sha1).")<br />"); $sha1 = scrambleString($sha1); - //* DEBUG: */ OUTPUT_HTML("Scrambled=" . $sha1." (".strlen($sha1).")<br />"); + //* DEBUG: */ outputHtml("Scrambled=" . $sha1." (".strlen($sha1).")<br />"); //* DEBUG: */ $sha1b = descrambleString($sha1); - //* DEBUG: */ OUTPUT_HTML("Descrambled=" . $sha1b." (".strlen($sha1b).")<br />"); + //* DEBUG: */ outputHtml("Descrambled=" . $sha1b." (".strlen($sha1b).")<br />"); // Generate the password salt string $salt = substr($sha1, 0, getConfig('salt_length')); - //* DEBUG: */ OUTPUT_HTML($salt." (".strlen($salt).")<br />"); + //* DEBUG: */ outputHtml($salt." (".strlen($salt).")<br />"); } else { // Use given salt $salt = substr($salt, 0, getConfig('salt_length')); - //* DEBUG: */ OUTPUT_HTML("GIVEN={$salt}<br />"); + //* DEBUG: */ outputHtml("GIVEN={$salt}<br />"); } // Return hash @@ -2125,7 +2065,7 @@ function scrambleString($str) { } // Scramble string here - //* DEBUG: */ OUTPUT_HTML("***Original=" . $str."***<br />"); + //* DEBUG: */ outputHtml("***Original=" . $str."***<br />"); for ($idx = 0; $idx < strlen($str); $idx++) { // Get char on scrambled position $char = substr($str, $scrambleNums[$idx], 1); @@ -2135,7 +2075,7 @@ function scrambleString($str) { } // END - for // Return scrambled string - //* DEBUG: */ OUTPUT_HTML("***Scrambled=" . $scrambled."***<br />"); + //* DEBUG: */ outputHtml("***Scrambled=" . $scrambled."***<br />"); return $scrambled; } @@ -2152,14 +2092,14 @@ function descrambleString($str) { // Begin descrambling $orig = str_repeat(' ', 40); - //* DEBUG: */ OUTPUT_HTML("+++Scrambled=" . $str."+++<br />"); + //* DEBUG: */ outputHtml("+++Scrambled=" . $str."+++<br />"); for ($idx = 0; $idx < 40; $idx++) { $char = substr($str, $idx, 1); $orig = substr_replace($orig, $char, $scrambleNums[$idx], 1); } // END - for // Return scrambled string - //* DEBUG: */ OUTPUT_HTML("+++Original=" . $orig."+++<br />"); + //* DEBUG: */ outputHtml("+++Original=" . $orig."+++<br />"); return $orig; } @@ -2193,7 +2133,7 @@ function generatePassString ($passHash) { $ret = $passHash; // Is a secret key and master salt already initialized? - if ((getConfig('secret_key') != '') && (getConfig('master_salt') != '')) { + if ((isExtensionInstalled('sql_patches')) && (isConfigEntrySet('secret_key')) && (isConfigEntrySet('master_salt'))) { // Only calculate when the secret key is generated $newHash = ''; $start = 9; for ($idx = 0; $idx < 10; $idx++) { @@ -2207,7 +2147,7 @@ function generatePassString ($passHash) { } $mod = substr(round($mod), 0, 4); $mod = str_repeat('0', 4-strlen($mod)) . $mod; - //* DEBUG: */ OUTPUT_HTML("*" . $start.'=' . $mod."*<br />"); + //* DEBUG: */ outputHtml("*" . $start.'=' . $mod."*<br />"); $start += 4; $newHash .= $mod; } // END - for @@ -2217,9 +2157,9 @@ function generatePassString ($passHash) { //* DEBUG: */ print($ret."<br />"); } else { // Hash it simple - //* DEBUG: */ OUTPUT_HTML("--" . $passHash."--<br />"); + //* DEBUG: */ outputHtml("--" . $passHash."--<br />"); $ret = md5($passHash); - //* DEBUG: */ OUTPUT_HTML("++" . $ret."++<br />"); + //* DEBUG: */ outputHtml("++" . $ret."++<br />"); } // Return result @@ -2254,10 +2194,10 @@ function app_die ($F, $L, $message) { $message = sprintf(getMessage('MXCHANGE_HAS_DIED'), basename($F), $L, $message); // Better log this message away - DEBUG_LOG($F, $L, $message); + logDebugMessage($F, $L, $message); // Load the message template - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); // Load footer loadIncludeOnce('inc/footer.php'); @@ -2283,17 +2223,15 @@ function displayParsingTime() { $end = explode(' ', $endTime); $runTime = $end[0] - $start[0]; if ($runTime < 0) $runTime = 0; - $runTime = translateComma($runTime); // Prepare output $content = array( - 'runtime' => $runTime, - 'numSQLs' => (getConfig('sql_count') + 1), - 'numTemplates' => (getConfig('num_templates') + 1) + 'runtime' => translateComma($runTime), + 'timeSQLs' => translateComma(getConfig('sql_time') * 1000), ); // Load the template - LOAD_TEMPLATE('show_timings', false, $content); + loadTemplate('show_timings', false, $content); } // Check wether a boolean constant is set @@ -2305,14 +2243,14 @@ function isBooleanConstantAndTrue ($constName) { // : Boolean // In cache? if (isset($GLOBALS['cache_array']['const'][$constName])) { // Use cache - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-CACHE!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-CACHE!<br />"); $res = ($GLOBALS['cache_array']['const'][$constName] === true); } else { // Check constant - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-RESOLVE!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-RESOLVE!<br />"); if (defined($constName)) { // Found! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-FOUND!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-FOUND!<br />"); $res = (constant($constName) === true); } // END - if @@ -2332,7 +2270,7 @@ function isApacheModuleLoaded ($apacheModule) { } // Get current theme name -function getCurrentTheme() { +function getCurrentTheme () { // The default theme is 'default'... ;-) $ret = 'default'; @@ -2341,8 +2279,8 @@ function getCurrentTheme() { if (!isSessionVariableSet('mxchange_theme')) { // Set default theme - setSession('mxchange_theme', $ret); - } elseif ((isSessionVariableSet('mxchange_theme')) && (GET_EXT_VERSION('sql_patches') >= '0.1.4')) { + setTheme($ret); + } elseif ((isSessionVariableSet('mxchange_theme')) && (isExtensionInstalledAndNewer('sql_patches', '0.1.4'))) { //die("<pre>".print_r($GLOBALS['cache_array']['themes'], true)."</pre>"); // Get theme from cookie $ret = getSession('mxchange_theme'); @@ -2352,40 +2290,40 @@ function getCurrentTheme() { // Fix it to default $ret = 'default'; } // END - if - } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((REQUEST_ISSET_GET('theme')) || (REQUEST_ISSET_POST('theme')))) { + } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) { // Prepare FQFN for checking - $theme = sprintf("%stheme/%s/theme.php", getConfig('PATH'), REQUEST_GET('theme')); + $theme = sprintf("%stheme/%s/theme.php", getConfig('PATH'), getRequestElement('theme')); // Installation mode active - if ((REQUEST_ISSET_GET('theme')) && (isFileReadable($theme))) { + if ((isGetRequestElementSet('theme')) && (isFileReadable($theme))) { // Set cookie from URL data - setSession('mxchange_theme', REQUEST_GET('theme')); - } elseif (isFileReadable(sprintf("%stheme/%s/theme.php", getConfig('PATH'), SQL_ESCAPE(REQUEST_POST('theme'))))) { + setTheme(getRequestElement('theme')); + } elseif (isFileReadable(sprintf("%stheme/%s/theme.php", getConfig('PATH'), SQL_ESCAPE(postRequestElement('theme'))))) { // Set cookie from posted data - setSession('mxchange_theme', SQL_ESCAPE(REQUEST_POST('theme'))); + setTheme(SQL_ESCAPE(postRequestElement('theme'))); } // Set return value $ret = getSession('mxchange_theme'); } else { // Invalid design, reset cookie - setSession('mxchange_theme', $ret); + setTheme($ret); } - // Add (maybe) found theme.php file to inclusion list - $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($ret)); - - // Try to load the requested include file - if (isIncludeReadable($INC)) ADD_INC_TO_POOL($INC); - // Return theme value return $ret; } +// Setter for theme in session +function setTheme ($newTheme) { + setSession('mxchange_theme', $newTheme); +} + // Get id from theme +// @TODO Try to move this to inc/libs/theme_functions.php function getThemeId ($name) { // Is the extension 'theme' installed? - if (!EXT_IS_ACTIVE('theme')) { + if (!isExtensionActive('theme')) { // Then abort here return 0; } // END - if @@ -2399,11 +2337,11 @@ function getThemeId ($name) { $id = $GLOBALS['cache_array']['themes']['id'][$name]; // Count up - incrementConfigEntry('cache_hits'); - } elseif (GET_EXT_VERSION('cache') != '0.1.8') { + incrementStatsEntry('cache_hits'); + } elseif (getExtensionVersion('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", - array($name), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' LIMIT 1", + array($name), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -2439,7 +2377,7 @@ function generateErrorCodeFromUserStatus ($status) { $errorCode = getCode($constantName); } else { // Unknown status - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown error status %s detected.", $status)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error status %s detected.", $status)); } // Return error code @@ -2449,12 +2387,12 @@ function generateErrorCodeFromUserStatus ($status) { // Function to search for the last modifified file function searchDirsRecursive ($dir, &$last_changed) { // Get dir as array - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):dir=" . $dir."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):dir=" . $dir."<br />"); // Does it match what we are looking for? (We skip a lot files already!) // RegexPattern to exclude ., .., .revision, .svn, debug.log or .cache in the filenames $excludePattern = '@(\.revision|debug\.log|\.cache|config\.php)$@'; $ds = getArrayFromDirectory($dir, '', true, false, array(), '.php', $excludePattern); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds)."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds)."<br />"); // Walk through all entries foreach ($ds as $d) { @@ -2462,20 +2400,20 @@ function searchDirsRecursive ($dir, &$last_changed) { $FQFN = str_replace('//', '/', getConfig('PATH') . $dir. '/'. $d); // Is it a file and readable? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />"); if (isDirectory($FQFN)) { // $FQFN is a directory so also crawl into this directory $newDir = $d; if (!empty($dir)) $newDir = $dir . '/'. $d; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):DESCENT: " . $newDir."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):DESCENT: " . $newDir."<br />"); searchDirsRecursive($newDir, $last_changed); } elseif (isFileReadable($FQFN)) { // $FQFN is a filename and no directory $time = filemtime($FQFN); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):File: " . $d." found. (".($last_changed['time'] - $time).")<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):File: " . $d." found. (".($last_changed['time'] - $time).")<br />"); if ($last_changed['time'] < $time) { // This file is newer as the file before - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>) - NEWER!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>) - NEWER!<br />"); $last_changed['path_name'] = $FQFN; $last_changed['time'] = $time; } // END - if @@ -2488,50 +2426,19 @@ function getActualVersion ($type = 'Revision') { // By default nothing is new... ;-) $new = false; - if (EXT_IS_ACTIVE('cache')) { - // Check if REQUEST_GET('check_revision_data') is setted (switch for manually rewrite the .revision-File) - if (REQUEST_ISSET_GET('check_revision_data') && REQUEST_GET('check_revision_data') == 'yes') { - // Force rebuild by URL parameter - $new = true; - } elseif (( - !isset($GLOBALS['cache_array']['revision'][$type]) - ) || ( - count($GLOBALS['cache_array']['revision']) < 3 - ) || ( - !$GLOBALS['cache_instance']->loadCacheFile('revision') - )) { - // Out-dated cache - $new = true; - } // END - if - - // Is the cache file outdated/invalid? - if ($new === true) { - // Reload the cache file - $GLOBALS['cache_instance']->loadCacheFile('revision'); - - // Destroy cache file - $GLOBALS['cache_instance']->destroyCacheFile(false, true); - - // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')? - unset($GLOBALS['cache_array']['revision']); - - // Reload load_cach-revison.php - loadInclude('inc/loader/load_cache-revision.php'); - - // Abort here - return; - } // END - if + // Is the cache entry there? + if (isset($GLOBALS['cache_array']['revision'][$type])) { + // Found so increase cache hit + incrementStatsEntry('cache_hits'); - // Return found value + // Return it return $GLOBALS['cache_array']['revision'][$type][0]; } else { - // Old Version without ext-cache active (deprecated ?) - // FQFN of revision file - $FQFN = sprintf("%sinc/cache/.revision", getConfig('PATH')); + $FQFN = sprintf("%s/.revision", getConfig('CACHE_PATH')); - // Check if REQUEST_GET('check_revision_data') is setted (switch for manually rewrite the .revision-File) - if ((REQUEST_ISSET_GET('check_revision_data')) && (REQUEST_GET('check_revision_data') == 'yes')) { + // Check if 'check_revision_data' is setted (switch for manually rewrite the .revision-File) + if ((isGetRequestElementSet('check_revision_data')) && (getRequestElement('check_revision_data') == 'yes')) { // Forced rebuild of .revision file $new = true; } else { @@ -2545,13 +2452,18 @@ function getActualVersion ($type = 'Revision') { // Get array for mapping information $mapper = array_flip(getSearchFor()); - //* DEBUG: */ print("<pre>".print_r($mapper, true).print_r($ins_vers, true)."</pre>"); + //* DEBUG: */ print('<pre>mapper='.print_r($mapper, true).'</pre>ins_vers=<pre>'.print_r($ins_vers, true).'</pre>'); // Is the content valid? - if ((!is_array($ins_vers)) || (count($ins_vers) <= 0) || (!isset($ins_vers[$mapper[$type]])) || (trim($ins_vers[$mapper[$type]]) == '') || ($ins_vers[0]) == "new") { + if ((!is_array($ins_vers)) || (count($ins_vers) <= 0) || (!isset($ins_vers[$mapper[$type]])) || (trim($ins_vers[$mapper[$type]]) == '') || ($ins_vers[0]) == 'new') { // File needs update! $new = true; } else { + // Generate fake cache entry + foreach ($mapper as $map=>$idx) { + $GLOBALS['cache_array']['revision'][$map][0] = $ins_vers[$idx]; + } // END - foreach + // Return found value return trim($ins_vers[$mapper[$type]]); } @@ -2560,7 +2472,11 @@ function getActualVersion ($type = 'Revision') { // Has it been updated? if ($new === true) { + // Write it writeToFile($FQFN, implode("\n", getArrayFromActualVersion())); + + // ... and call recursive + return getActualVersion($type); } // END - if } } @@ -2569,7 +2485,7 @@ function getActualVersion ($type = 'Revision') { // The returned Array is needed twice (in getArrayFromActualVersion() and in getActualVersion() in the old .revision-fallback) so I puted it in an extra function to not polute the global namespace function getSearchFor () { // Add Revision, Date, Tag and Author - $searchFor = array('Revision', 'Date', 'Tag', 'Author'); + $searchFor = array('Revision', 'Date', 'Tag', 'Author', 'File'); // Return the created array return $searchFor; @@ -2605,27 +2521,27 @@ function getArrayFromActualVersion () { foreach ($searchFor as $search) { // Searches for "$search-tag:VALUE$" or "$search-tag::VALUE$"(the stylish keywordversion ;-)) in the lates modified file $res += preg_match('@\$' . $search.'(:|::) (.*) \$@U', $last_file, $t); - // This trimms the search-result and puts it in the $akt_vers-return array - if (isset($t[2])) $akt_vers[$search] = trim($t[2]); + // This trimms the search-result and puts it in the $GLOBALS['cache_array']['revision']-return array + if (isset($t[2])) $GLOBALS['cache_array']['revision'][$search] = trim($t[2]); } // END - foreach // Save the last-changed filename for debugging - $akt_vers['File'] = $last_changed['path_name']; + $GLOBALS['cache_array']['revision']['File'] = $last_changed['path_name']; // at least 3 keyword-Tags are needed for propper values if ($res && $res >= 3 - && isset($akt_vers['Revision']) && $akt_vers['Revision'] != '' - && isset($akt_vers['Date']) && $akt_vers['Date'] != '' - && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') { + && isset($GLOBALS['cache_array']['revision']['Revision']) && $GLOBALS['cache_array']['revision']['Revision'] != '' + && isset($GLOBALS['cache_array']['revision']['Date']) && $GLOBALS['cache_array']['revision']['Date'] != '' + && isset($GLOBALS['cache_array']['revision']['Tag']) && $GLOBALS['cache_array']['revision']['Tag'] != '') { // Prepare content witch need special treadment // Prepare timestamp for date - preg_match('@(....)-(..)-(..) (..):(..):(..)@', $akt_vers['Date'], $match_d); - $akt_vers['Date'] = mktime($match_d[4], $match_d[5], $match_d[6], $match_d[2], $match_d[3], $match_d[1]); + preg_match('@(....)-(..)-(..) (..):(..):(..)@', $GLOBALS['cache_array']['revision']['Date'], $match_d); + $GLOBALS['cache_array']['revision']['Date'] = mktime($match_d[4], $match_d[5], $match_d[6], $match_d[2], $match_d[3], $match_d[1]); // Add author to the Tag if the author is set and is not quix0r (lead coder) - if ((isset($akt_vers['Author'])) && ($akt_vers['Author'] != "quix0r")) { - $akt_vers['Tag'] .= '-'.strtoupper($akt_vers['Author']); + if ((isset($GLOBALS['cache_array']['revision']['Author'])) && ($GLOBALS['cache_array']['revision']['Author'] != 'quix0r')) { + $GLOBALS['cache_array']['revision']['Tag'] .= '-'.strtoupper($GLOBALS['cache_array']['revision']['Author']); } // END - if } else { @@ -2634,14 +2550,15 @@ function getArrayFromActualVersion () { // Prepare content // Only sets not setted or not proper values to the Online-Server-Fallback-Solution - if (!isset($akt_vers['Revision']) || $akt_vers['Revision'] == '') $akt_vers['Revision'] = trim($version[10]); - if (!isset($akt_vers['Date']) || $akt_vers['Date'] == '') $akt_vers['Date'] = trim($version[9]); - if (!isset($akt_vers['Tag']) || $akt_vers['Tag'] == '') $akt_vers['Tag'] = trim($version[8]); - if (!isset($akt_vers['Author']) || $akt_vers['Author'] == '') $akt_vers['Author'] = "quix0r"; + if (!isset($GLOBALS['cache_array']['revision']['Revision']) || $GLOBALS['cache_array']['revision']['Revision'] == '') $GLOBALS['cache_array']['revision']['Revision'] = trim($version[10]); + if (!isset($GLOBALS['cache_array']['revision']['Date']) || $GLOBALS['cache_array']['revision']['Date'] == '') $GLOBALS['cache_array']['revision']['Date'] = trim($version[9]); + if (!isset($GLOBALS['cache_array']['revision']['Tag']) || $GLOBALS['cache_array']['revision']['Tag'] == '') $GLOBALS['cache_array']['revision']['Tag'] = trim($version[8]); + if (!isset($GLOBALS['cache_array']['revision']['Author']) || $GLOBALS['cache_array']['revision']['Author'] == '') $GLOBALS['cache_array']['revision']['Author'] = 'quix0r'; + if (!isset($GLOBALS['cache_array']['revision']['File']) || $GLOBALS['cache_array']['revision']['File'] == '') $GLOBALS['cache_array']['revision']['File'] = trim($version[11]); } // Return prepared array - return $akt_vers; + return $GLOBALS['cache_array']['revision']; } // Back-ported from the new ship-simu engine. :-) @@ -2669,6 +2586,7 @@ function debug_get_printable_backtrace () { function debug_report_bug ($message = '') { // Init message $debug = ''; + // Is the optional message set? if (!empty($message)) { // Use and log it @@ -2677,13 +2595,13 @@ function debug_report_bug ($message = '') { ); // @TODO Add a little more infos here - DEBUG_LOG(__FUNCTION__, __LINE__, $message); + logDebugMessage(__FUNCTION__, __LINE__, strip_tags($message)); } // END - if // Add output - $debug .= "Please report this bug at <a title=\"Direct link to the bug-tracker\" href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a> and include the logfile from <strong>inc/cache/debug.log</strong> in your report (you can now attach files):<pre>"; + $debug .= "Please report this bug at <a title=\"Direct link to the bug-tracker\" href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a> and include the logfile from <strong>" . getConfig('CACHE_PATH') . "debug.log</strong> in your report (you can now attach files):<pre>"; $debug .= debug_get_printable_backtrace(); - $debug .= "</pre>\nRequest-URI: " . $_SERVER['REQUEST_URI']."<br />\n"; + $debug .= "</pre>\nRequest-URI: " . getRequestUri()."<br />\n"; $debug .= "Thank you for finding bugs."; // And abort here @@ -2699,20 +2617,41 @@ function generateSeed () { } // Converts a message code to a human-readable message -function convertCodeToMessage ($code) { +function getMessageFromErrorCode ($code) { $message = ''; switch ($code) { + case '': break; case getCode('LOGOUT_DONE') : $message = getMessage('LOGOUT_DONE'); break; case getCode('LOGOUT_FAILED') : $message = "<span class=\"guest_failed\">{--LOGOUT_FAILED--}</span>"; break; case getCode('DATA_INVALID') : $message = getMessage('MAIL_DATA_INVALID'); break; case getCode('POSSIBLE_INVALID') : $message = getMessage('MAIL_POSSIBLE_INVALID'); break; case getCode('ACCOUNT_LOCKED') : $message = getMessage('MEMBER_ACCOUNT_LOCKED_UNC'); break; - case getCode('USER_404') : $message = getMessage('USER_NOT_FOUND'); break; + case getCode('USER_404') : $message = getMessage('USER_404'); break; case getCode('STATS_404') : $message = getMessage('MAIL_STATS_404'); break; case getCode('ALREADY_CONFIRMED'): $message = getMessage('MAIL_ALREADY_CONFIRMED'); break; + case getCode('WRONG_PASS') : $message = getMessage('LOGIN_WRONG_PASS'); break; + case getCode('WRONG_ID') : $message = getMessage('LOGIN_WRONG_ID'); break; + case getCode('ID_LOCKED') : $message = getMessage('LOGIN_ID_LOCKED'); break; + case getCode('ID_UNCONFIRMED') : $message = getMessage('LOGIN_ID_UNCONFIRMED'); break; + case getCode('NO_COOKIES') : $message = getMessage('LOGIN_NO_COOKIES'); break; + case getCode('COOKIES_DISABLED') : $message = getMessage('LOGIN_NO_COOKIES'); break; + case getCode('BEG_SAME_AS_OWN') : $message = getMessage('BEG_SAME_UID_AS_OWN'); break; + case getCode('LOGIN_FAILED') : $message = getMessage('LOGIN_FAILED_GENERAL'); break; + case getCode('MODULE_MEM_ONLY') : $message = sprintf(getMessage('MODULE_MEM_ONLY'), getRequestElement('mod')); break; + case getCode('OVERLENGTH') : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break; + case getCode('URL_FOUND') : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break; + case getCode('SUBJ_URL') : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break; + case getCode('BLIST_URL') : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), '0'); break; + case getCode('NO_RECS_LEFT') : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break; + case getCode('INVALID_TAGS') : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break; + case getCode('MORE_POINTS') : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break; + case getCode('MORE_RECEIVERS1') : $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); break; + case getCode('MORE_RECEIVERS2') : $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break; + case getCode('MORE_RECEIVERS3') : $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); break; + case getCode('INVALID_URL') : $message = getMessage('MEMBER_ENTER_INVALID_URL'); break; case getCode('ERROR_MAILID'): - if (EXT_IS_ACTIVE($ext, true)) { + if (isExtensionActive('mailid', true)) { $message = getMessage('ERROR_CONFIRMING_MAIL'); } else { $message = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'mailid'); @@ -2720,24 +2659,46 @@ function convertCodeToMessage ($code) { break; case getCode('EXTENSION_PROBLEM'): - if (REQUEST_ISSET_GET('ext')) { - $message = generateExtensionInactiveNotInstalledMessage(REQUEST_GET('ext')); + if (isGetRequestElementSet('ext')) { + $message = generateExtensionInactiveNotInstalledMessage(getRequestElement('ext')); } else { $message = getMessage('EXTENSION_PROBLEM_UNSET_EXT'); } break; - case getCode('COOKIES_DISABLED') : $message = getMessage('LOGIN_NO_COOKIES'); break; - case getCode('BEG_SAME_AS_OWN') : $message = getMessage('BEG_SAME_UID_AS_OWN'); break; - case getCode('LOGIN_FAILED') : $message = getMessage('LOGIN_FAILED_GENERAL'); break; - case getCode('MODULE_MEM_ONLY') : $message = sprintf(getMessage('MODULE_MEM_ONLY'), REQUEST_GET('mod')); break; + case getCode('URL_TLOCK'): + $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + + // Load timestamp from last order + list($timestamp) = SQL_FETCHROW($result); + $timestamp = generateDateTime($timestamp, '1'); + + // Free memory + SQL_FREERESULT($result); + + // Calculate hours... + $STD = round(getConfig('url_tlock') / 60 / 60); + + // Minutes... + $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60); + + // And seconds + $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60; + + // Finally contruct the message + // @TODO Rewrite this old lost code to a template + $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD." + {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br /> + {--MEMBER_LAST_TLOCK--}: ".$timestamp; + break; default: // Missing/invalid code $message = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code); // Log it - DEBUG_LOG(__FUNCTION__, __LINE__, $message); + logDebugMessage(__FUNCTION__, __LINE__, $message); break; } // END - switch @@ -2745,29 +2706,29 @@ function convertCodeToMessage ($code) { return $message; } -// Generate a "link" for the given admin id (aid) -function generateAdminLink ($aid) { +// Generate a "link" for the given admin id (admin_id) +function generateAdminLink ($adminId) { // No assigned admin is default $admin = "<span class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>"; // Zero? = Not assigned - if (bigintval($aid) > 0) { + if (bigintval($adminId) > 0) { // Load admin's login - $login = getAdminLogin($aid); + $login = getAdminLogin($adminId); // Is the login valid? if ($login != '***') { // Is the extension there? - if (EXT_IS_ACTIVE('admins')) { + if (isExtensionActive('admins')) { // Admin found - $admin = "<a href=\"".generateEmailLink(getAdminEmail($aid), 'admins')."\">" . $login."</a>"; + $admin = "<a href=\"".generateEmailLink(getAdminEmail($adminId), 'admins')."\">" . $login."</a>"; } else { // Extension not found $admin = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'admins'); } } else { // Maybe deleted? - $admin = "<div class=\"admin_note\">".sprintf(getMessage('ADMIN_ID_404'), $aid)."</div>"; + $admin = "<div class=\"admin_note\">".sprintf(getMessage('ADMIN_ID_404'), $adminId)."</div>"; } } // END - if @@ -2778,7 +2739,7 @@ function generateAdminLink ($aid) { // Compile characters which are allowed in URLs function compileUriCode ($code, $simple = true) { // Compile constants - if (!$simple) $code = str_replace('{--', '".', str_replace('--}', '."', $code)); + if ($simple === false) $code = str_replace('{--', '".', str_replace('--}', '."', $code)); // Compile QUOT and other non-HTML codes $code = str_replace('{DOT}', '.', @@ -2800,7 +2761,7 @@ function compileUriCode ($code, $simple = true) { // Function taken from user comments on www.php.net / function eregi() function isUrlValidSimple ($url) { // Prepare URL - $url = strip_tags(str_replace("\\", '', COMPILE_CODE(urldecode($url)))); + $url = secureString(str_replace("\\", '', compileCode(urldecode($url)))); // Allows http and https $http = "(http|https)+(:\/\/)"; @@ -2848,7 +2809,7 @@ function isUrlValidSimple ($url) { // @TODO Are these convertions still required? $pat = str_replace('.', "\.", $pat); $pat = str_replace('@', "\@", $pat); - //* DEBUG: */ OUTPUT_HTML($key."= " . $pat . "<br />"); + //* DEBUG: */ outputHtml($key."= " . $pat . "<br />"); } // END - if // Check if expression matches @@ -2877,15 +2838,19 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) { $tmp = $FQFN . '.tmp'; // Open the source file - $fp = fopen($FQFN, 'r') or OUTPUT_HTML('<strong>READ:</strong> ' . $FQFN . '<br />'); + $fp = fopen($FQFN, 'r') or outputHtml('<strong>READ:</strong> ' . $FQFN . '<br />'); // Is the resource valid? if (is_resource($fp)) { // Open temporary file - $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML('<strong>WRITE:</strong> ' . $tmp . '<br />'); + $fp_tmp = fopen($tmp, 'w') or outputHtml('<strong>WRITE:</strong> ' . $tmp . '<br />'); // Is the resource again valid? if (is_resource($fp_tmp)) { + // Mark temporary file as readable + $GLOBALS['file_readable'][$tmp] = true; + + // Start reading while (!feof($fp)) { // Read from source file $line = fgets ($fp, 1024); @@ -2920,90 +2885,45 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) { copyFileVerified($tmp, $FQFN, 0644); return removeFile($tmp); } elseif ($found === false) { - OUTPUT_HTML('<strong>CHANGE:</strong> 404!'); + outputHtml('<strong>CHANGE:</strong> 404!'); } else { - OUTPUT_HTML('<strong>TMP:</strong> UNDONE!'); + outputHtml('<strong>TMP:</strong> UNDONE!'); } } } else { // File not found, not readable or writeable - OUTPUT_HTML('<strong>404:</strong> ' . $FQFN . '<br />'); + outputHtml('<strong>404:</strong> ' . $FQFN . '<br />'); } // An error was detected! return false; } // Send notification to admin -function sendAdminNotification ($subject, $templateName, $content=array(), $uid = '0') { - if (GET_EXT_VERSION('admins') >= '0.4.1') { +function sendAdminNotification ($subject, $templateName, $content=array(), $userid = '0') { + if (getExtensionVersion('admins') >= '0.4.1') { // Send new way - SEND_ADMIN_EMAILS_PRO($subject, $templateName, $content, $uid); + sendAdminsEmails($subject, $templateName, $content, $userid); } else { // Send out out-dated way - $message = LOAD_EMAIL_TEMPLATE($templateName, $content, $uid); - SEND_ADMIN_EMAILS($subject, $message); + $message = loadEmailTemplate($templateName, $content, $userid); + sendAdminEmails($subject, $message); } } // Debug message logger -function DEBUG_LOG ($funcFile, $line, $message, $force=true) { +function logDebugMessage ($funcFile, $line, $message, $force=true) { // Is debug mode enabled? if ((isDebugModeEnabled()) || ($force === true)) { // Remove CRLF $message = str_replace("\r", '', str_replace("\n", '', $message)); // Log this message away, we better don't call app_die() here to prevent an endless loop - $fp = fopen(getConfig('PATH') . 'inc/cache/debug.log', 'a') or die(__FUNCTION__.'['.__LINE__.']: Cannot write logfile debug.log!'); - fwrite($fp, date('d.m.Y|H:i:s', time()) . '|' . getModule() . '|' . basename($funcFile) . '|' . $line . '|' . strip_tags($message) . "\n"); + $fp = fopen(getConfig('CACHE_PATH') . 'debug.log', 'a') or die(__FUNCTION__.'['.__LINE__.']: Cannot write logfile debug.log!'); + fwrite($fp, date('d.m.Y|H:i:s', time()) . '|' . getModule() . '|' . basename($funcFile) . '|' . $line . '|' . $message . "\n"); fclose($fp); } // END - if } -// Load more reset scripts -function runResetIncludes () { - // Is the reset set or old sql_patches? - if ((!isResetModeEnabled()) || (EXT_VERSION_IS_OLDER('sql_patches', '0.4.5'))) { - // Then abort here - DEBUG_LOG(__FUNCTION__, __LINE__, 'Cannot run reset! Please report this bug. Thanks'); - } // END - if - - // Get more daily reset scripts - SET_INC_POOL(getArrayFromDirectory('inc/reset/', 'reset_')); - - // Update database - if (getConfig('DEBUG_RESET') != 'Y') updateConfiguration('last_update', time()); - - // Is the config entry set? - if (GET_EXT_VERSION('sql_patches') >= '0.4.2') { - // Create current week mark - $currWeek = date('W', time()); - - // Has it changed? - if (getConfig('last_week') != $currWeek) { - // Include weekly reset scripts - MERGE_INC_POOL(getArrayFromDirectory('inc/weekly/', 'weekly_')); - - // Update config - if (getConfig('DEBUG_WEEKLY') != 'Y') updateConfiguration('last_week', $currWeek); - } // END - if - - // Create current month mark - $currMonth = date('m', time()); - - // Has it changed? - if (getConfig('last_month') != $currMonth) { - // Include monthly reset scripts - MERGE_INC_POOL(getArrayFromDirectory('inc/monthly/', 'monthly_')); - - // Update config - if (getConfig('DEBUG_MONTHLY') != 'Y') updateConfiguration('last_month', $currMonth); - } // END - if - } // END - if - - // Run the filter - runFilterChain('load_includes'); -} - // Handle extra values function handleExtraValues ($filterFunction, $value, $extraValue) { // Default is the value itself @@ -3038,7 +2958,7 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { } // Converts timestamp selections into a timestamp -function convertSelectionsToTimestamp (&$POST, &$DATA, &$id, &$skip) { +function convertSelectionsToTimestamp (&$postData, &$DATA, &$id, &$skip) { // Init test variable $test2 = ''; @@ -3049,14 +2969,14 @@ function convertSelectionsToTimestamp (&$POST, &$DATA, &$id, &$skip) { if (in_array($test, array('_ye', '_mo', '_we', '_da', '_ho', '_mi', '_se'))) { // Found a multi-selection for timings? $test = substr($id, 0, -3); - if ((isset($POST[$test.'_ye'])) && (isset($POST[$test.'_mo'])) && (isset($POST[$test.'_we'])) && (isset($POST[$test.'_da'])) && (isset($POST[$test.'_ho'])) && (isset($POST[$test.'_mi'])) && (isset($POST[$test.'_se'])) && ($test != $test2)) { + if ((isset($postData[$test.'_ye'])) && (isset($postData[$test.'_mo'])) && (isset($postData[$test.'_we'])) && (isset($postData[$test.'_da'])) && (isset($postData[$test.'_ho'])) && (isset($postData[$test.'_mi'])) && (isset($postData[$test.'_se'])) && ($test != $test2)) { // Generate timestamp - $POST[$test] = createTimestampFromSelections($test, $POST); - $DATA[] = sprintf("%s='%s'", $test, $POST[$test]); + $postData[$test] = createTimestampFromSelections($test, $postData); + $DATA[] = sprintf("%s='%s'", $test, $postData[$test]); // Remove data from array foreach (array('ye', 'mo', 'we', 'da', 'ho', 'mi', 'se') as $rem) { - unset($POST[$test.'_' . $rem]); + unset($postData[$test.'_' . $rem]); } // END - foreach // Skip adding @@ -3095,7 +3015,7 @@ function convertCommaToDot ($str) { } // Handle menu-depending failed logins and return the rendered content -function HANDLE_LOGIN_FAILTURES ($accessLevel) { +function handleLoginFailtures ($accessLevel) { // Default output is empty ;-) $OUT = ''; @@ -3104,14 +3024,14 @@ function HANDLE_LOGIN_FAILTURES ($accessLevel) { // Ignore zero values if (getSession('mxchange_' . $accessLevel.'_failures') > 0) { // Non-guest has login failures found, get both data and prepare it for template - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):accessLevel={$accessLevel}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):accessLevel={$accessLevel}<br />"); $content = array( 'login_failures' => getSession('mxchange_' . $accessLevel.'_failures'), 'last_failure' => generateDateTime(getSession('mxchange_' . $accessLevel.'_last_fail'), '2') ); // Load template - $OUT = LOAD_TEMPLATE('login_failures', true, $content); + $OUT = loadTemplate('login_failures', true, $content); } // END - if // Reset session data @@ -3124,59 +3044,43 @@ function HANDLE_LOGIN_FAILTURES ($accessLevel) { } // Rebuild cache -function rebuildCacheFiles ($cache, $inc = '') { +function rebuildCacheFile ($cache, $inc = '', $force = false) { + // Debug message + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("cache=%s, inc=%s, force=%s", $cache, $inc, intval($force))); + // Shall I remove the cache file? - if ((EXT_IS_ACTIVE('cache')) && (isCacheInstanceValid())) { + if (isCacheInstanceValid()) { // Rebuild cache if ($GLOBALS['cache_instance']->loadCacheFile($cache)) { // Destroy it - $GLOBALS['cache_instance']->destroyCacheFile(); + $GLOBALS['cache_instance']->removeCacheFile(false, $force); } // END - if // Include file given? if (!empty($inc)) { // Construct FQFN - $INC = sprintf("inc/loader/load_cache-%s.php", $inc); + $inc = sprintf("inc/loader/load_cache-%s.php", $inc); // Is the include there? - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // And rebuild it from scratch - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): inc={$inc} - LOADED!<br />"); - loadInclude($INC); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): inc={$inc} - LOADED!<br />"); + loadInclude($inc); } else { // Include not found! - DEBUG_LOG(__FUNCTION__, __LINE__, "Include {$inc} not found. cache={$cache}"); + logDebugMessage(__FUNCTION__, __LINE__, "Include {$inc} not found. cache={$cache}"); } } // END - if } // END - if } -// Purge admin menu cache -function cachePurgeAdminMenu ($id=0, $action = '', $what = '', $str = '') { - // Is the cache extension enabled or no cache instance or admin menu cache disabled? - if (!EXT_IS_ACTIVE('cache')) { - // Cache extension not active - return false; - } elseif (!isCacheInstanceValid()) { - // No cache instance! - DEBUG_LOG(__FUNCTION__, __LINE__, 'No cache instance found.'); - return false; - } elseif ((!isConfigEntrySet('cache_admin_menu')) || (getConfig('cache_admin_menu') != 'Y')) { - // Caching disabled (currently experiemental!) - return false; - } - - // Experiemental feature! - debug_report_bug("<strong>Experimental feature:</strong> You have to delete the admin_*.cache files by yourself at this point."); -} - // Determines the real remote address function determineRealRemoteAddress () { // Is a proxy in use? - if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){ + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { // Proxy was used $address = $_SERVER['HTTP_X_FORWARDED_FOR']; - } elseif (isset($_SERVER['HTTP_CLIENT_IP'])){ + } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) { // Yet, another proxy $address = $_SERVER['HTTP_CLIENT_IP']; } else { @@ -3185,7 +3089,7 @@ function determineRealRemoteAddress () { } // This strips out the real address from proxy output - if (strstr($address, ',')){ + if (strstr($address, ',')) { $addressArray = explode(',', $address); $address = $addressArray[0]; } // END - if @@ -3219,38 +3123,43 @@ function addNewBonusMail ($data, $mode = '', $output=true) { ); // Mail inserted into bonus pool - if ($output) LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_SEND')); + if ($output) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_SEND')); } elseif ($output) { // More entered than can be reached! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MORE_SELECTED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_MORE_SELECTED')); } else { // Debug log - DEBUG_LOG(__FUNCTION__, __LINE__, "cat={$data['cat']},receiver={$data['receiver']},data=".base64_encode(serialize($data))." More selected, than available!"); + logDebugMessage(__FUNCTION__, __LINE__, "cat={$data['cat']},receiver={$data['receiver']},data=".base64_encode(serialize($data))." More selected, than available!"); } } // Determines referal id and sets it -function DETERMINE_REFID () { +function determineReferalId () { + // Skip this in non-html-mode + if (getOutputMode() != '0') return false; + // Check if refid is set - if ((REQUEST_ISSET_GET('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { + if ((isset($GLOBALS['refid'])) && ($GLOBALS['refid'] > 0)) { + // This is fine... + } elseif ((isGetRequestElementSet('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { // The variable user comes from the click-counter script click.php and we only accept this here - $GLOBALS['refid'] = bigintval(REQUEST_GET('user')); - } elseif (REQUEST_ISSET_POST('refid')) { + $GLOBALS['refid'] = bigintval(getRequestElement('user')); + } elseif (isPostRequestElementSet('refid')) { // Get referal id from variable refid (so I hope this makes my script more compatible to other scripts) - $GLOBALS['refid'] = strip_tags(REQUEST_POST('refid')); - } elseif (REQUEST_ISSET_GET('refid')) { + $GLOBALS['refid'] = secureString(postRequestElement('refid')); + } elseif (isGetRequestElementSet('refid')) { // Get referal id from variable refid (so I hope this makes my script more compatible to other scripts) - $GLOBALS['refid'] = strip_tags(REQUEST_GET('refid')); - } elseif (REQUEST_ISSET_GET('ref')) { + $GLOBALS['refid'] = secureString(getRequestElement('refid')); + } elseif (isGetRequestElementSet('ref')) { // Set refid=ref (the referal link uses such variable) - $GLOBALS['refid'] = strip_tags(REQUEST_GET('ref')); + $GLOBALS['refid'] = secureString(getRequestElement('ref')); } elseif ((isSessionVariableSet('refid')) && (getSession('refid') != 0)) { // Set session refid als global $GLOBALS['refid'] = bigintval(getSession('refid')); - } elseif ((GET_EXT_VERSION('user') >= '0.3.4') && (getConfig('select_user_zero_refid')) == 'Y') { + } elseif ((isExtensionInstalledAndNewer('user', '0.3.4')) && (getConfig('select_user_zero_refid')) == 'Y') { // Select a random user which has confirmed enougth mails $GLOBALS['refid'] = determineRandomReferalId(); - } elseif ((GET_EXT_VERSION('sql_patches') != '') && (getConfig('def_refid') > 0)) { + } elseif ((isExtensionInstalled('sql_patches')) && (getConfig('def_refid') > 0)) { // Set default refid as refid in URL $GLOBALS['refid'] = getConfig('def_refid'); } else { @@ -3268,25 +3177,24 @@ function DETERMINE_REFID () { return $GLOBALS['refid']; } -// Enables the reset mode. Only call this function if you really want the -// reset to be run! -function enableResetMode () { +// Enables the reset mode and runs it +function doReset () { // Enable the reset mode $GLOBALS['reset_enabled'] = true; // Run filters - runFilterChain('reset_enabled'); + runFilterChain('reset'); } // Our shutdown-function function shutdown () { // Call the filter chain 'shutdown' - runFilterChain('shutdown', null, false); + runFilterChain('shutdown', null); if (SQL_IS_LINK_UP()) { // Close link SQL_CLOSE(__FILE__, __LINE__); - } elseif ((!isInstalling()) && (isInstalled())) { + } elseif (!isInstallationPhase()) { // No database link addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN')); } @@ -3322,18 +3230,18 @@ function isUserIdSet () { // Handle message codes from URL function handleCodeMessage () { - if (REQUEST_ISSET_GET('msg')) { + if (isGetRequestElementSet('code')) { // Default extension is 'unknown' $ext = 'unknown'; // Is extension given? - if (REQUEST_ISSET_GET('ext')) $ext = REQUEST_GET('ext'); + if (isGetRequestElementSet('ext')) $ext = getRequestElement('ext'); - // Convert the 'msg' parameter from URL to a human-readable message - $message = convertCodeToMessage(REQUEST_GET('msg')); + // Convert the 'code' parameter from URL to a human-readable message + $message = getMessageFromErrorCode(getRequestElement('code')); // Load message template - LOAD_TEMPLATE('message', false, $message); + loadTemplate('message', false, $message); } // END - if } @@ -3364,14 +3272,14 @@ function generateExtensionInactiveMessage ($ext_name) { // Is the extension empty? if (empty($ext_name)) { // This should not happen - trigger_error(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); + debug_report_bug(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); } // END - if // Default message $message = sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), $ext_name); // Is an admin logged in? - if (IS_ADMIN()) { + if (isAdmin()) { // Then output admin message $message = sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE'), $ext_name); } // END - if @@ -3385,14 +3293,14 @@ function generateExtensionNotInstalledMessage ($ext_name) { // Is the extension empty? if (empty($ext_name)) { // This should not happen - trigger_error(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); + debug_report_bug(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); } // END - if // Default message $message = sprintf(getMessage('EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), $ext_name); // Is an admin logged in? - if (IS_ADMIN()) { + if (isAdmin()) { // Then output admin message $message = sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), $ext_name); } // END - if @@ -3418,7 +3326,7 @@ function generateExtensionInactiveNotInstalledMessage ($ext_name) { break; default: // Should not happen! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid state of extension %s detected.", $ext_name)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid state of extension %s detected.", $ext_name)); $message = sprintf("Invalid state of extension %s detected.", $ext_name); break; } // END - switch @@ -3437,7 +3345,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad $excludeArray[] = '.svn'; $excludeArray[] = '.htaccess'; - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix} - Entered!"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix} - Entered!"); // Init includes $files = array(); @@ -3449,12 +3357,12 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Exclude '.', '..' and entries in $excludeArray automatically if (in_array($baseFile, $excludeArray, true)) { // Exclude them - //* DEBUG: */ OUTPUT_HTML('excluded=' . $baseFile . "<br />"); + //* DEBUG: */ outputHtml('excluded=' . $baseFile . "<br />"); continue; } // END - if // Construct include filename and FQFN - $fileName = $baseDir . '/' . $baseFile; + $fileName = $baseDir . $baseFile; $FQFN = getConfig('PATH') . $fileName; // Remove double slashes @@ -3463,9 +3371,9 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Check if the base filename matches an exclusion pattern and if the pattern is not empty if ((!empty($excludePattern)) && (preg_match($excludePattern, $baseFile, $match))) { // These Lines are only for debugging!! - //* DEBUG: */ OUTPUT_HTML('baseDir:' . $baseDir . "<br />"); - //* DEBUG: */ OUTPUT_HTML('baseFile:' . $baseFile . "<br />"); - //* DEBUG: */ OUTPUT_HTML('FQFN:' . $FQFN . "<br />"); + //* DEBUG: */ outputHtml('baseDir:' . $baseDir . "<br />"); + //* DEBUG: */ outputHtml('baseFile:' . $baseFile . "<br />"); + //* DEBUG: */ outputHtml('FQFN:' . $FQFN . "<br />"); // Exclude this one continue; @@ -3474,39 +3382,36 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Skip also files with non-matching prefix genericly if (($recursive === true) && (isDirectory($FQFN))) { // Is a redirectory so read it as well - $files = merge_array($files, getArrayFromDirectory ($baseDir . $baseFile . '/', $prefix, $fileIncludeDirs, $addBaseDir, $excludeArray, $extension, $excludePattern, $recursive)); + $files = merge_array($files, getArrayFromDirectory($baseDir . $baseFile . '/', $prefix, $fileIncludeDirs, $addBaseDir, $excludeArray, $extension, $excludePattern, $recursive)); // And skip further processing continue; } elseif (substr($baseFile, 0, strlen($prefix)) != $prefix) { // Skip this file - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Invalid prefix in file " . $baseFile . ", prefix=" . $prefix); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Invalid prefix in file " . $baseFile . ", prefix=" . $prefix); continue; } elseif (!isFileReadable($FQFN)) { // Not readable so skip it - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "File " . $FQFN . " is not readable!"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "File " . $FQFN . " is not readable!"); continue; } // Is the file a PHP script or other? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix},baseFile={$baseFile}"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix},baseFile={$baseFile}"); if ((substr($baseFile, -4, 4) == '.php') || (($fileIncludeDirs === true) && (isDirectory($FQFN)))) { // Is this a valid include file? if ($extension == '.php') { // Remove both for extension name $extName = substr($baseFile, strlen($prefix), -4); - // Try to find it - $extId = GET_EXT_ID($extName); - // Is the extension valid and active? - if (($extId > 0) && (EXT_IS_ACTIVE($extName))) { + if (isExtensionNameValid($extName)) { // Then add this file - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Extension entry ' . $baseFile . ' added.'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension entry ' . $baseFile . ' added.'); $files[] = $fileName; - } elseif ($extId == 0) { + } else { // Add non-extension files as well - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Regular entry ' . $baseFile . ' added.'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Regular entry ' . $baseFile . ' added.'); if ($addBaseDir === true) { $files[] = $fileName; } else { @@ -3517,7 +3422,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // We found .php file but should not search for them, why? debug_report_bug('We should find files with extension=' . $extension . ', but we found a PHP script.'); } - } else { + } elseif (substr($baseFile, -4, 4) == $extension) { // Other, generic file found $files[] = $fileName; } @@ -3530,10 +3435,151 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad asort($files); // Return array with include files - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, '- Left!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Left!'); return $files; } +// Maps a module name into a database table name +function mapModuleToTable ($moduleName) { + // Map only these, still lame code... + switch ($moduleName) { + // 'index' is the guest's menu + case 'index': $moduleName = 'guest'; break; + // ... and 'login' the member's menu + case 'login': $moduleName = 'member'; break; + // Anything else will not be mapped, silently. + } // END - switch + + // Return result + return $moduleName; +} + +// Add SQL debug data to array for later output +function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { + // Don't execute anything here if we don't need + if (getConfig('display_debug_sqls') != 'Y') return; + + // Generate record + $record = array( + 'num_rows' => SQL_NUMROWS($result), + 'affected' => SQL_AFFECTEDROWS(), + 'sql_str' => $sqlString, + 'timing' => $timing, + 'file' => basename($F), + 'line' => $L + ); + + // Add it + $GLOBALS['debug_sqls'][] = $record; +} + +// Initializes the cache instance +function initCacheInstance () { + // Load include for CacheSystem class + loadIncludeOnce('inc/classes/cachesystem.class.php'); + + // Initialize cache system only when it's needed + $GLOBALS['cache_instance'] = new CacheSystem(); + if ($GLOBALS['cache_instance']->getStatus() != 'done') { + // Failed to initialize cache sustem + addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE')); + } // END - if +} + +// Getter for message from array or raw message +function getMessageFromIndexedArray ($message, $pos, $array) { + // Check if the requested message was found in array + if (isset($array[$pos])) { + // ... if yes then use it! + $ret = $array[$pos]; + } else { + // ... else use default message + $ret = $message; + } + + // Return result + return $ret; +} + +// Handles fatal errors +function handleFatalErrors () { + // Do we have errors to handle and right output mode? + if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) { + // Abort executing here + return false; + } // END - if + + // Load config here + loadIncludeOnce('inc/load_config.php'); + + // Set unset variable + if (empty($check)) $check = ''; + + // Default is none + $content = ''; + + // Installation phase or regular mode? + if ((isInstallationPhase())) { + // While we are installing ouput other header than while it is installed... :-) + $OUT = ''; + foreach (getFatalArray() as $key => $value) { + // Prepare content for the template + $content = array( + 'key' => ($key + 1), + 'value' => $value + ); + + // Load row template + $OUT .= loadTemplate('install_fatal_row', true, $content); + } + + // Load main template + $content = loadTemplate('install_fatal_table', true, $OUT); + } elseif (isInstalled()) { + // Display all runtime fatal errors + $OUT = ''; + foreach (getFatalArray() as $key => $value) { + // Prepare content for the template + $content = array( + 'key' => ($key + 1), + 'value' => $value + ); + + // Load row template + $OUT .= loadTemplate('runtime_fatal_row', true, $content); + } + + // Load main template + $content = loadTemplate('runtime_fatal_table', true, $OUT); + } + + // Message to regular users (non-admin) + $CORR = getMessage('FATAL_REPORT_ERRORS'); + + // PHP warnings fixed + if ($check == 'done') { + if (isAdmin()) $CORR = getMessage('FATAL_CORRECT_ERRORS'); + } // END - if + + // Remember all in array + $content = array( + 'rows' => $content, + 'corr' => $CORR + ); + + // Load main template + loadTemplate('fatal_errors', false, $content); + + // Delete all to prevent double-display + initFatalMessages(); + + // Load footer + loadIncludeOnce('inc/footer.php'); + + // Abort here + shutdown(); +} + ////////////////////////////////////////////////// // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // ////////////////////////////////////////////////// diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index e060e39fe5..027d21a621 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Init variables @@ -47,7 +46,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; @@ -56,16 +55,16 @@ if (empty($nclicks)) $nclicks = 0; SQL_FREERESULT($result_media); // Count mail orders -$ncount = GET_TOTAL_DATA('', 'user_stats', 'id', '', true); +$ncount = countSumTotalData('', 'user_stats', 'id', '', true); // Check for bonus extension -if (EXT_IS_ACTIVE('bonus')) { +if (isExtensionActive('bonus')) { // Count bonus mails - $bcount = GET_TOTAL_DATA('', 'bonus', 'id', '', true); + $bcount = countSumTotalData('', 'bonus', 'id', '', true); // 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; @@ -75,25 +74,25 @@ FROM `{!_MYSQL_PREFIX!}_bonus`', __FILE__, __LINE__); loadIncludeOnce('inc/libs/mediadata_functions.php'); // Insert info to database -MEDIA_UPDATE_ENTRY(array('total_send' , 'normal_send') , 'init', $nsent); -MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'init', $nclicks); -MEDIA_UPDATE_ENTRY(array('total_orders', 'normal_orders'), 'init', $ncount); -MEDIA_UPDATE_ENTRY(array('total_send' , 'bonus_send' ) , 'init', $bsent); -MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks') , 'init', $bclicks); -MEDIA_UPDATE_ENTRY(array('total_orders', 'bonus_orders') , 'init', $bcount); +updateMediadataEntry(array('total_send' , 'normal_send') , 'init', $nsent); +updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'init', $nclicks); +updateMediadataEntry(array('total_orders', 'normal_orders'), 'init', $ncount); +updateMediadataEntry(array('total_send' , 'bonus_send' ) , 'init', $bsent); +updateMediadataEntry(array('total_clicks', 'bonus_clicks') , 'init', $bclicks); +updateMediadataEntry(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); // Update database -MEDIA_UPDATE_ENTRY(array('total_points'), 'init', ($points - $used)); +updateMediadataEntry(array('total_points'), 'init', ($points - $used)); // ?> diff --git a/inc/gen_refback.php b/inc/gen_refback.php index 421bcbdde3..7d0a6b7d7b 100644 --- a/inc/gen_refback.php +++ b/inc/gen_refback.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,37 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Make sure our functions are there loadIncludeOnce('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 - rebuildCacheFiles('refsystem', 'refsystem'); + rebuildCacheFile('refsystem', 'refsystem'); } // END - if // Free result 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__); @@ -78,10 +77,10 @@ if (SQL_NUMROWS($result_direct) > 0) { // When 'walk' through all users while ($content = SQL_FETCHARRAY($result_direct)) { // Init level - $GLOBALS['cache_array']['back_level'] = 1; + $GLOBALS['refback_level'] = 1; // Update refback table - //* DEBUG: */ OUTPUT_HTML("uid={$content['userid']}<br />"); + //* DEBUG: */ outputHtml("userid={$content['userid']}<br />"); updateRefbackTable($content['userid']); } // END - while } // END - if diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index d8cf59fece..57ec554ca2 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if (!defined('__SECURITY')) { + die(); } // Check for version of sql_patches -if (GET_EXT_VERSION('sql_patches') < '0.3.6') return false; +if (getExtensionVersion('sql_patches') < '0.3.6') return false; // Check if there is no scrambling string if (getConfig('pass_scramble') == '') { diff --git a/inc/handler.php b/inc/handler.php index 1c28ca893f..57da7b6a06 100644 --- a/inc/handler.php +++ b/inc/handler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Error handler function diff --git a/inc/header.php b/inc/header.php index da0f68cfe6..cd22a87054 100644 --- a/inc/header.php +++ b/inc/header.php @@ -19,7 +19,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,8 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Is the header already sent? @@ -51,63 +50,63 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) { // Generate header $TITLE = ''; - // Add title decorations? (left) - if (!defined('__PAGE_TITLE')) { - // Config and database connection valid? - if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP())) { - // Title decoration enabled? - if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." "; - - // Do we have some extra title? - if (isExtraTitleSet()) { - // Then prepent it - $TITLE .= getExtraTitle() . ' by '; - } // END - if - - // Add main title - $TITLE .= getConfig('MAIN_TITLE'); - - // Add title of module? (middle decoration will also be added!) - if ((getConfig('enable_mod_title') == 'Y') || ((!isWhatSet()) && (!isActionSet())) || (getModule() == 'admin')) { - $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleTitle(getModule()); - } // END - if - - // Add title from what file - $mode = ''; - if (getModule() == 'login') $mode = 'member'; - elseif (getModule() == 'index') $mode = 'guest'; - if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, getWhat()); - - // Add title decorations? (right) - if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != '')) $TITLE .= " ".trim(getConfig('title_right')); - - // Remember title in constant for the template - define('__PAGE_TITLE', $TITLE); - } elseif ((isInstalled()) && (!isAdminRegistered())) { - // Installed but no admin registered - define('__PAGE_TITLE', sprintf(getMessage('SETUP_OF_MXCHANGE'), getConfig('MAIN_TITLE'))); - } elseif ((!isInstalled()) || (!isAdminRegistered())) { - // Installation mode - define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE')); - } else { - // Configuration not found! - define('__PAGE_TITLE', getMessage('NO_CONFIG_FOUND_TITLE')); - - // Do not add the fatal message in installation mode - if (!isInstalling()) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND')); - } - } // END - if + // Config and database connection valid? + if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionActive('sql_patches'))) { + // Title decoration enabled? + if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." "; + + // Do we have some extra title? + if (isExtraTitleSet()) { + // Then prepent it + $TITLE .= getExtraTitle() . ' by '; + } // END - if + + // Add main title + $TITLE .= getConfig('MAIN_TITLE'); + + // Add title of module? (middle decoration will also be added!) + if ((getConfig('enable_mod_title') == 'Y') || ((!isWhatSet()) && (!isActionSet())) || (getModule() == 'admin')) { + $TITLE .= ' ' . trim(getConfig('title_middle')) . ' ' . getModuleTitle(getModule()); + } // END - if + + // Add title from what file + $mode = ''; + if (getModule() == 'login') $mode = 'member'; + elseif (getModule() == 'index') $mode = 'guest'; + if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, getWhat()); + + // Add title decorations? (right) + if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != '')) $TITLE .= " ".trim(getConfig('title_right')); + + // Remember title in constant for the template + $content['header_title'] = $TITLE; + } elseif ((isInstalled()) && (isAdminRegistered())) { + // Installed, admin registered but no ext-sql_patches + $content['header_title'] = '[-- ' . getConfig('MAIN_TITLE').' - '.getModuleTitle(getModule()) . ' --]'; + } elseif ((isInstalled()) && (!isAdminRegistered())) { + // Installed but no admin registered + $content['header_title'] = sprintf(getMessage('SETUP_OF_MXCHANGE'), getConfig('MAIN_TITLE')); + } elseif ((!isInstalled()) || (!isAdminRegistered())) { + // Installation mode + $content['header_title'] = getMessage('INSTALLATION_OF_MXCHANGE'); + } else { + // Configuration not found! + $content['header_title'] = getMessage('NO_CONFIG_FOUND_TITLE'); + + // Do not add the fatal message in installation mode + if ((!isInstalling()) && (!isConfigLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND')); + } // Save some little memory unset($TITLE); // Output page header code - LOAD_TEMPLATE('page_header'); + loadTemplate('page_header', false, $content); // Include meta data in 'guest' module if (getModule() == 'index') { // Load meta data template - LOAD_TEMPLATE('metadata'); + loadTemplate('metadata'); // Add meta description to header if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { @@ -117,22 +116,22 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) { } // END - if // Include more header data here - LOAD_TEMPLATE('header'); + loadTemplate('header'); // Include stylesheet loadIncludeOnce('inc/stylesheet.php'); } // END - if // Closing HEAD tag - if (getOutputMode() != '1') OUTPUT_HTML('</head>'); + if (getOutputMode() != '1') outputHtml('</head>'); if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1; } // END - if // Add BODY tag or not? if ((getOutputMode() != '1') && ($GLOBALS['header_sent'] == 1)) { - LOAD_TEMPLATE('page_body'); + loadTemplate('page_body'); $GLOBALS['header_sent'] = 2; } // END - if -// +// [EOF] ?> diff --git a/inc/hooks.php b/inc/hooks.php index 92bcc81a7b..de633d3956 100644 --- a/inc/hooks.php +++ b/inc/hooks.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // [EOF] diff --git a/inc/inc-functions.php b/inc/inc-functions.php index 19570ae207..06e912fa06 100644 --- a/inc/inc-functions.php +++ b/inc/inc-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,74 +38,123 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Check if our config file is writeable or not -function isIncludeWriteable ($inc) { - // Generate FQFN - $FQFN = sprintf("%sinc/%s.php", getConfig('PATH'), $inc); - - // Abort by simple test - if ((isFileReadable($FQFN)) && (!is_writeable($FQFN))) { - return false; - } // END - if - - // Test write-access on directory - return is_writeable(dirname($FQFN)); -} + die(); +} // END - if // Init INC_POOL -function INIT_INC_POOL () { - $GLOBALS['inc_pool'] = array(); +function initIncludePool ($pool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + $GLOBALS['inc_pool'][$pool] = array(); } // Setter for INC_POOL -function SET_INC_POOL ($includePool) { - $GLOBALS['inc_pool'] = (array) $includePool; +function setIncludePool ($pool, $includePool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + $GLOBALS['inc_pool'][$pool] = (array) $includePool; } // Getter for INC_POOL -function GET_INC_POOL () { - return $GLOBALS['inc_pool']; +function getIncludePool ($pool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + return $GLOBALS['inc_pool'][$pool]; } // Count INC_POOL -function COUNT_INC_POOL () { - return count($GLOBALS['inc_pool']); +function countIncludePool ($pool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + return count($GLOBALS['inc_pool'][$pool]); } // Merge INC_POOL into given -function MERGE_INC_POOL ($includePool) { - SET_INC_POOL(merge_array(GET_INC_POOL(), $includePool)); +function mergeIncludePool ($pool, $includePool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + setIncludePool($pool, merge_array(getIncludePool($pool), $includePool)); } // Add single include file to INC_POOL -function ADD_INC_TO_POOL ($INC) { - $GLOBALS['inc_pool'][] = (string) $INC; +function addIncludeToPool ($pool, $inc) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; + $GLOBALS['inc_pool'][$pool][] = (string) $inc; } // Remove an include file from INC_POOL -function REMOVE_INC_FROM_POOL ($INC) { +function removeIncludeFromPool ($pool, $inc) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />'; // First look it up - $key = array_search($INC, GET_INC_POOL()); + $key = array_search($inc, getIncludePool($pool)); // Is it valid? if ($key !== false) { // Then remove it - unset($GLOBALS['inc_pool'][$key]); + unset($GLOBALS['inc_pool'][$pool][$key]); // And sort the list - asort($GLOBALS['inc_pool']); + asort($GLOBALS['inc_pool'][$pool]); } // END - if } // Load the whole include pool -function LOAD_INC_POOL () { - foreach (GET_INC_POOL() as $inc) { +function loadIncludePool ($pool) { + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - START<br />'; + foreach (getIncludePool($pool) as $inc) { + //* DEBUG: */ print __FUNCTION__.':inc='.$inc.'<br />'; loadIncludeOnce($inc); } // END - foreach + //* DEBUG: */ print __FUNCTION__.':pool='.$pool.' - END<br />'; + + // Remove it + initIncludePool($pool); +} + +// Loads an include file and logs any missing files for debug purposes +function loadInclude ($inc) { + // Do we have cache? + if (!isset($GLOBALS['inc_loaded'][$inc])) { + // Add the path. This is why we need a trailing slash in config.php + $GLOBALS['inc_loaded'][$inc] = getConfig('PATH') . $inc; + + // Is the include file there? + if (!isIncludeReadable($inc)) { + // Not there so log it + debug_report_bug(sprintf("Include file %s not found.", $inc)); + } // END - if + } // END - if + + // Try to load it + require($GLOBALS['inc_loaded'][$inc]); +} + +// Loads an include file once +function loadIncludeOnce ($inc) { + // Remove double path + $inc = str_replace(getConfig('PATH'), '', $inc); + + // Is it not loaded? + if (!isset($GLOBALS['load_once'][$inc])) { + // Mark it as loaded + $GLOBALS['load_once'][$inc] = 'loaded'; + + // Then try to load it + loadInclude($inc); + } // END - if +} + +// Checks wether an include file (non-FQFN better) is readable +function isIncludeReadable ($inc) { + // Do we have cache? + if (!isset($GLOBALS['inc_readable'][$inc])) { + // Remove double path + $inc = str_replace(getConfig('PATH'), '', $inc); + + // Construct FQFN + $FQFN = getConfig('PATH') . $inc; + + // Is it readable? + $GLOBALS['inc_readable'][$inc] = isFileReadable($FQFN); + } // END - if + + // Return result + return $GLOBALS['inc_readable'][$inc]; } // [EOF] diff --git a/inc/install-functions.php b/inc/install-functions.php new file mode 100644 index 0000000000..7306874d4f --- /dev/null +++ b/inc/install-functions.php @@ -0,0 +1,105 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/22/2009 * + * =============== Last change: 10/22/2009 * + * * + * -------------------------------------------------------------------- * + * File : install-functions.php * + * -------------------------------------------------------------------- * + * Short description : Functions for installation procedure * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Funktionen fuer die Installationsroutine * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +/************************************************************************ + * YOU MAY ALSO WANT TO REMOVE THIS FILE AFTER INSTALLTION! * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Write the local config-local.php file from "template" +function doInstallWriteLocalConfig () { + // Copy the config template and verify it + copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', getConfig('CACHE_PATH') . 'config-local.php', 0644); + + // Ok, all done. So we can write the config data to the php files + if (postRequestElement('spath') != getConfig('PATH')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestElement('spath'), 0); + if (postRequestElement('burl') != getConfig('URL')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'HOST-URL', "setConfigEntry('URL', '", "');", postRequestElement('burl'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestElement('title'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestElement('slogan'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestElement('email'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestElement('warn_no_pass'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestElement('wfooter'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestElement('blink'), 0); + // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-HOST', " 'host' => '", "',", postRequestElement('mysql','host'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-DBASE', " 'dbase' => '", "',", postRequestElement('mysql','dbase'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-LOGIN', " 'login' => '", "',", postRequestElement('mysql','login'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PASSWORD', " 'password' => '", "',", postRequestElement('mysql','pass1'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestElement('mysql','prefix'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestElement('mysql','type'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestElement('smtp_host'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0); + + // Generate a long site key + $siteKey = generatePassword(50); + + // And write it + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0); + + // Script is now installed + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0); +} + +// Adds a given template with content to install output stream +function addTemplateToInstallContent ($template, $content = array()) { + // Load the template + $out = loadTemplate($template, true, $content); + + // Add it to output + addToInstallContent($out); +} + +// Add it to install content +function addToInstallContent ($out) { + // Set or add it... + if (!isset($GLOBALS['install_content'])) { + // Set it + $GLOBALS['install_content'] = $out; + } else { + // Add it + $GLOBALS['install_content'] .= $out; + } // END - if +} + +// [EOF] +?> diff --git a/inc/install-inc.php b/inc/install-inc.php index 3a3844bbbd..d4afebe5df 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -17,9 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * @TODO Rewrite all constants in this include file * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,56 +42,52 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Init variables $mysql = array(); -if ((REQUEST_ISSET_POST('mysql')) && (is_array(REQUEST_POST('mysql')))) $mysql = REQUEST_POST('mysql'); +if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) $mysql = postRequestElement('mysql'); // Check if both passwords from SMTP are matching -if ((REQUEST_ISSET_GET('page') && (REQUEST_GET('page') == 5))) { +if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) { // Okay, we have to check it - if (REQUEST_ISSET_POST('smtp_user') && (!REQUEST_ISSET_POST('smtp_host'))) { + if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) { // Hostname not set - OUTPUT_HTML(getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '<br />'); - REQUEST_SET_GET('page', 3); + addToInstallContent(getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '<br />'); + setRequestGetElement('page', 3); } // END - if - if ((!REQUEST_ISSET_POST('smtp_pass1')) && (REQUEST_ISSET_POST('smtp_pass2'))) { + if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty - OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS1_EMPTY') . '<br />'); - REQUEST_SET_GET('page', 3); + addToInstallContent(getMessage('INSTALL_SMTP_PASS1_EMPTY') . '<br />'); + setRequestGetElement('page', 3); } // END - if - if ((REQUEST_ISSET_POST('smtp_pass1')) && (!REQUEST_ISSET_POST('smtp_pass2'))) { + if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty - OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS2_EMPTY') . '<br />'); - REQUEST_SET_GET('page', 3); + addToInstallContent(getMessage('INSTALL_SMTP_PASS2_EMPTY') . '<br />'); + setRequestGetElement('page', 3); } // END - if - if (REQUEST_POST('smtp_pass1') != REQUEST_POST('smtp_pass1')) { + if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching - OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS_MISMATCH') . '<br />'); - REQUEST_SET_GET('page', 3); + addToInstallContent(getMessage('INSTALL_SMTP_PASS_MISMATCH') . '<br />'); + setRequestGetElement('page', 3); } // END - if } // END - if // Is MXChange installed or no admin registered so far? if ((!isInstalled()) || (!isAdminRegistered())) { - // Set URL for FORM actions - define('__BURL_ACTION', getConfig('URL')); - // Output page for entered value - switch (REQUEST_GET('page')) { + switch (getRequestElement('page')) { case 'welcome': // Welcome to the installation! - LOAD_TEMPLATE('install_welcome'); + addTemplateToInstallContent('install_welcome'); break; case '1': // Server path, base URL // Load template - LOAD_TEMPLATE('install_page1'); + addTemplateToInstallContent('install_page1'); break; case '2': // MySQL data (alone!) @@ -103,34 +97,34 @@ if ((!isInstalled()) || (!isAdminRegistered())) { if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange'; if (empty($mysql['type'])) $mysql['type'] = 'MyISAM'; if (getTotalFatalErrors() > 0) { - OUTPUT_HTML('<span class="install_fatal">'); + addToInstallContent('<span class="install_fatal">'); foreach (getFatalArray() as $key => $err) { - OUTPUT_HTML('<strong>·</strong> {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '<br />'); + addToInstallContent('<strong>·</strong> {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '<br />'); } - OUTPUT_HTML('</span><br />'); + addToInstallContent('</span><br />'); } - define('__MYSQL_HOST' , $mysql['host']); - define('__MYSQL_DBASE' , $mysql['dbase']); - define('__MYSQL_PREFIX', $mysql['prefix']); - define('__TABLE_TYPE' , $mysql['type']); - define('__MYSQL_LOGIN' , $mysql['login']); - define('__SPATH_VALUE' , REQUEST_POST('spath')); - define('__BURL_VALUE' , REQUEST_POST('burl')); - define('__TITLE_VALUE' , REQUEST_POST('title')); - define('__SLOGAN_VALUE', REQUEST_POST('slogan')); - define('__EMAIL_VALUE' , REQUEST_POST('email')); + $content['mysql_host'] = $mysql['host']; + $content['mysql_dbase'] = $mysql['dbase']; + $content['mysql_prefix'] = $mysql['prefix']; + $content['mysql_login'] = $mysql['login']; + $content['table_type'] = $mysql['type']; + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // Load template - LOAD_TEMPLATE('install_page2'); + addTemplateToInstallContent('install_page2', false, $content); break; case '3': // Set more values - define('__SPATH_VALUE' , REQUEST_POST('spath')); - define('__BURL_VALUE' , REQUEST_POST('burl')); - define('__TITLE_VALUE' , REQUEST_POST('title')); - define('__SLOGAN_VALUE', REQUEST_POST('slogan')); - define('__EMAIL_VALUE' , REQUEST_POST('email')); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // Use default SMTP data $smtpHost = getConfig('SMTP_HOSTNAME'); @@ -139,67 +133,67 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $smtpPass2 = getConfig('SMTP_PASSWORD'); // Overwrite it with the data from sent (failed) form - if (REQUEST_ISSET_POST('smtp_host')) $smtpHost = REQUEST_POST('smtp_host'); - if (REQUEST_ISSET_POST('smtp_user')) $smtpUser = REQUEST_POST('smtp_user'); - if (REQUEST_ISSET_POST('smtp_pass')) { - $smtpPass1 = REQUEST_POST('smtp_pass'); - $smtpPass2 = REQUEST_POST('smtp_pass'); + if (isPostRequestElementSet('smtp_host')) $smtpHost = postRequestElement('smtp_host'); + if (isPostRequestElementSet('smtp_user')) $smtpUser = postRequestElement('smtp_user'); + if (isPostRequestElementSet('smtp_pass')) { + $smtpPass1 = postRequestElement('smtp_pass'); + $smtpPass2 = postRequestElement('smtp_pass'); } // END - if // MySQL settings - define('__MYSQL_HOST' , $mysql['host']); - define('__MYSQL_DBASE' , $mysql['dbase']); - define('__MYSQL_PREFIX', $mysql['prefix']); - define('__TABLE_TYPE' , $mysql['type']); - define('__MYSQL_LOGIN' , $mysql['login']); - define('__MYSQL_PASS1' , $mysql['pass1']); - define('__MYSQL_PASS2' , $mysql['pass2']); + $content['mysql_host'] = $mysql['host']; + $content['mysql_dbase'] = $mysql['dbase']; + $content['mysql_prefix'] = $mysql['prefix']; + $content['table_type'] = $mysql['type']; + $content['mysql_login'] = $mysql['login']; + $content['mysql_pass1'] = $mysql['pass1']; + $content['mysql_pass2'] = $mysql['pass2']; // Set constants for SMTP data - define('__SMTP_HOST' , $smtpHost); - define('__SMTP_USER' , $smtpUser); - define('__SMTP_PASS1', $smtpPass1); - define('__SMTP_PASS2', $smtpPass2); + $content['smtp_host'] = $smtpHost; + $content['smtp_user'] = $smtpUser; + $content['smtp_pass1'] = $smtpPass1; + $content['smtp_pass2'] = $smtpPass2; // Load template - LOAD_TEMPLATE('install_page3'); + addTemplateToInstallContent('install_page3', false, $content); break; case '5': // Misc settings // General settings - define('__SPATH_VALUE' , REQUEST_POST('spath')); - define('__BURL_VALUE' , REQUEST_POST('burl')); - define('__TITLE_VALUE' , REQUEST_POST('title')); - define('__SLOGAN_VALUE', REQUEST_POST('slogan')); - define('__EMAIL_VALUE' , REQUEST_POST('email')); + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['slogan'] = postRequestElement('slogan'); + $content['email'] = postRequestElement('email'); // MySQL settings - define('__MYSQL_HOST' , $mysql['host']); - define('__MYSQL_DBASE' , $mysql['dbase']); - define('__MYSQL_PREFIX', $mysql['prefix']); - define('__TABLE_TYPE' , $mysql['type']); - define('__MYSQL_LOGIN' , $mysql['login']); + $content['mysql_host'] = $mysql['host']; + $content['mysql_dbase'] = $mysql['dbase']; + $content['mysql_prefix'] = $mysql['prefix']; + $content['mysql_login'] = $mysql['login']; + $content['table_type'] = $mysql['type']; // SMTP settings - define('__SMTP_HOST', REQUEST_POST('smtp_host')); - define('__SMTP_USER', REQUEST_POST('smtp_user')); - define('__SMTP_PASS', REQUEST_POST('smtp_pass1')); + $content['smtp_host'] = postRequestElement('smtp_host'); + $content['smtp_user'] = postRequestElement('smtp_user'); + $content['smtp_pass'] = postRequestElement('smtp_pass1'); // MySQL data - $content = ''; + $OUT = ''; foreach ($mysql as $key => $value) { - $content .= " <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n"; + $OUT .= " <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n"; } - define('__MYSQL_DATA', $content); + $content['mysql_hidden'] = $OUT; // Load template - LOAD_TEMPLATE('install_page5'); + addTemplateToInstallContent('install_page5', false, $content); break; case 'finalize': // Write captured data to files - if ((REQUEST_ISSET_POST('finalize')) && (!isInstalled())) { + if ((isPostRequestElementSet('finalize')) && (!isInstalled())) { // You have submitted data then we have to reset the SQLs - INIT_SQLS(); + initSqls(); // Connect to MySQL server SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__); @@ -207,39 +201,40 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Seems to work, also right database? if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) { // Automatically run install.sql - if ((!isFileReadable(REQUEST_POST('spath') . 'install/tables.sql')) || (!isFileReadable(REQUEST_POST('spath') . 'install/menu-'.getLanguage().'.sql'))) { + if ((!isFileReadable(postRequestElement('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestElement('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found! addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); } // END - if if (getTotalFatalErrors() == 0) { + // Set type and prefix from POST data + setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type')); + setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix')); + // Both exists so import them foreach (array('tables', 'menu-'.getLanguage()) as $dump) { // Should be save here because file_exists() is there but we check it again. :) - $FQFN = REQUEST_POST('spath') . 'install/' . $dump . '.sql'; + $FQFN = postRequestElement('spath') . 'install/' . $dump . '.sql'; // Is the file readable? if (isFileReadable($FQFN)) { // Read the file $fileContent = readFromFile($FQFN, true); - // Replace the {!prefix/type!} with actual one - foreach (array('prefix', 'type') as $replace) { - while (strpos($fileContent, '{!' . $replace . '!}') !== false) { - $fileContent = str_replace('{!' . $replace . '!}', $mysql[$replace], $fileContent); - } // END - while - } // END - foreach + // Compile all config entries (we use a filter here, yes...) + $fileContent = FILTER_COMPILE_CONFIG($fileContent); // Split it up against ";\n" and merge it into existing SQLs - MERGE_SQLS(explode(";\n", $fileContent)); + mergeSqls(explode(";\n", $fileContent), 'install'); } else { // Not readable! debug_report_bug(sprintf("SQL dump %s is not readable!", $dump)); } } // END - foreach + //* DEBUG: */ die('<pre>'.print_r(getSqls(), true).'</pre>'); // Are some SQLs found? - if (COUNT_SQLS() == 0) { + if (countSqls() == 0) { // Abort here addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED')); return; @@ -249,36 +244,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { runFilterChain('run_sqls'); // Copy the config template and verify it - copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644); - - // Ok, all done. So we can write the config data to the php files - if (REQUEST_POST('spath') != getConfig('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SERVER-PATH', "setConfigEntry('PATH', '", "');", REQUEST_POST('spath'), 0); - if (REQUEST_POST('burl') != getConfig('URL')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'HOST-URL', "setConfigEntry('URL', '", "');", REQUEST_POST('burl'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", REQUEST_POST('title'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SLOGAN', "setConfigEntry('SLOGAN', '", "');", REQUEST_POST('slogan'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", REQUEST_POST('email'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", REQUEST_POST('warn_no_pass'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", REQUEST_POST('wfooter'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", REQUEST_POST('blink'), 0); - // @TODO DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", REQUEST_POST('omode'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-HOST', " 'host' => '", "',", $mysql['host'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-DBASE', " 'dbase' => '", "',", $mysql['dbase'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-LOGIN', " 'login' => '", "',", $mysql['login'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-PASSWORD', " 'password' => '", "',", $mysql['pass1'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", $mysql['prefix'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", $mysql['type'], 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", REQUEST_POST('smtp_host'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", REQUEST_POST('smtp_user'), 0); - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", REQUEST_POST('smtp_pass1'), 0); - - // Generate a long site key - $siteKey = generatePassword(50); - - // And write it - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0); - - // Script is now installed - changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0); + doInstallWriteLocalConfig(); } // END - if } // END - if } // END - if @@ -288,21 +254,21 @@ if ((!isInstalled()) || (!isAdminRegistered())) { foreach (getFatalArray() as $value) { $OUT .= " <li>" . $value . "</li>\n"; } // END foreach - define('__FATAL_ERROR_LI', $OUT); + $content['fatal_errors'] = $OUT; $OUT = ''; foreach ($mysql as $key => $value) { $OUT .= " <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n"; } // END foreach - define('__MYSQL_DATA' , $OUT); - define('__SPATH_VALUE' , REQUEST_POST('spath')); - define('__BURL_VALUE' , REQUEST_POST('burl')); - define('__TITLE_VALUE' , REQUEST_POST('title')); - define('__SMTP_HOST' , REQUEST_POST('smtp_host')); - define('__SMTP_USER' , REQUEST_POST('smtp_user')); - define('__SMTP_PASS' , REQUEST_POST('smtp_pass1')); + $content['mysql_hidden'] = $OUT; + $content['spath'] = postRequestElement('spath'); + $content['burl'] = postRequestElement('burl'); + $content['title'] = postRequestElement('title'); + $content['smtp_host'] = postRequestElement('smtp_host'); + $content['smtp_user'] = postRequestElement('smtp_user'); + $content['smtp_pass'] = postRequestElement('smtp_pass1'); // Load template - LOAD_TEMPLATE('install_fatal_errors'); + addTemplateToInstallContent('install_fatal_errors', false, $content); } else { // Installation is done! redirectToUrl('install.php?page=finished'); @@ -310,14 +276,13 @@ if ((!isInstalled()) || (!isAdminRegistered())) { } else { // Something goes wrong during installation! :-( addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED')); - loadInclude('inc/fatal_errors.php'); } break; case 'finished': if (isInstalled()) { // Load template that we are finished - LOAD_TEMPLATE('install_finished'); + addTemplateToInstallContent('install_finished'); } else { // Not finished redirectToUrl('install.php'); @@ -325,14 +290,14 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", REQUEST_GET('page'))); - OUTPUT_HTML(" <div class=\"install_error\">{--WRONG_PAGE--}</div>"); + logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page'))); + addTemplateToInstallContent('admin_settings_saved', "<div class=\"install_error\">{--WRONG_PAGE--}</div>"); break; - } + } // END - switch } else { // Already installed! addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED')); } -// +// [EOF] ?> diff --git a/inc/js/js- b/inc/js/js- new file mode 100644 index 0000000000..56b4ffdacc --- /dev/null +++ b/inc/js/js- @@ -0,0 +1,45 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/20/2009 * + * =============== Last change: 10/20/2009 * + * * + * -------------------------------------------------------------------- * + * File : js- * + * -------------------------------------------------------------------- * + * Short description : JavaScript tag for ext- * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : JavaScript-Tag fuer ext- * + * -------------------------------------------------------------------- * + * $Revision:: 1109 $ * + * $Date:: 2009-07-31 18:30:33 +0200 (Fri, 31 Jul 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// [EOF] +?> diff --git a/inc/js/js-order_send.php b/inc/js/js-order_send.php new file mode 100644 index 0000000000..b44d43d8fe --- /dev/null +++ b/inc/js/js-order_send.php @@ -0,0 +1,48 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/20/2009 * + * =============== Last change: 10/20/2009 * + * * + * -------------------------------------------------------------------- * + * File : js-order_sent.php * + * -------------------------------------------------------------------- * + * Short description : JavaScript tag for ext-order.php * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : JavaScript-Tag fuer ext-order.php * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Simply load the JavaScript here +loadTemplate('js_order_sent'); + +// [EOF] +?> diff --git a/inc/js/js-surfbar_member_book.php b/inc/js/js-surfbar_member_book.php new file mode 100644 index 0000000000..1b74ecc5f1 --- /dev/null +++ b/inc/js/js-surfbar_member_book.php @@ -0,0 +1,48 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/20/2009 * + * =============== Last change: 10/20/2009 * + * * + * -------------------------------------------------------------------- * + * File : js-surfbar_member_book.php * + * -------------------------------------------------------------------- * + * Short description : JavaScript tag for ext-surfbar.php * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : JavaScript-Tag fuer ext-surfbar.php * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Simply load the JavaScript here +loadTemplate('js_surfbar_member_book'); + +// [EOF] +?> diff --git a/inc/js/js-surfbar_member_edit.php b/inc/js/js-surfbar_member_edit.php new file mode 100644 index 0000000000..6d0c53a54a --- /dev/null +++ b/inc/js/js-surfbar_member_edit.php @@ -0,0 +1,54 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/20/2009 * + * =============== Last change: 10/20/2009 * + * * + * -------------------------------------------------------------------- * + * File : js-surfbar_member_edit.php * + * -------------------------------------------------------------------- * + * Short description : JavaScript tag for ext-surfbar.php * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : JavaScript-Tag fuer ext-surfbar.php * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Prepare content +$content = array( + 'views_max' => bigintval(getRequestElement('views_max')), + 'limited' => bigintval(getRequestElement('limited')) +); + +// Simply load the JavaScript here +loadTemplate('js_surfbar_member_edit', false, $content); + +// [EOF] +?> diff --git a/inc/js/js-surfbar_stopped.php b/inc/js/js-surfbar_stopped.php new file mode 100644 index 0000000000..69c25416f8 --- /dev/null +++ b/inc/js/js-surfbar_stopped.php @@ -0,0 +1,54 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/20/2009 * + * =============== Last change: 10/20/2009 * + * * + * -------------------------------------------------------------------- * + * File : js-surfbar_stopped.php * + * -------------------------------------------------------------------- * + * Short description : JavaScript tag for ext-surfbar.php * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : JavaScript-Tag fuer ext-surfbar.php * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Prepare content +$content = array( + 'restart' => bigintval(getRequestElement('restart')), + 'autostart' => getRequestElement('autostart') +); + +// Load template +loadTemplate('js_surfbar_stopped', false, $content); + +// [EOF] +?> diff --git a/inc/js/js-uberwach.php b/inc/js/js-uberwach.php index d3683b7c6f..bf07a96fcc 100644 --- a/inc/js/js-uberwach.php +++ b/inc/js/js-uberwach.php @@ -1,7 +1,7 @@ <?php /************************************************************************ * MXChange v0.2.1 Start: 07/31/2009 * - * =============== Last change: 07/31/2009 * + * =============== Last change: 10/20/2009 * * * * -------------------------------------------------------------------- * * File : js-uberwach.php * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,11 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Simply load the JavaScript here -LOAD_TEMPLATE('js_uberwach'); +loadTemplate('js_uberwach'); +// [EOF] ?> diff --git a/inc/language-functions.php b/inc/language-functions.php index 8aa6350529..5a339f4fad 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,11 +35,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * * MA 02110-1301 USA * ************************************************************************/ + // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // "Getter" for language strings // @TODO Rewrite all language constants to this function. @@ -48,24 +48,39 @@ function getMessage ($messageId) { $return = '!' . $messageId . '!'; // Is the language string found? - if (isset($GLOBALS['msg'][strtolower($messageId)])) { + if (isMessageIdValid($messageId)) { // Language array element found in small_letters - $return = $GLOBALS['msg'][$messageId]; - } elseif (isset($GLOBALS['msg'][strtoupper($messageId)])) { - // @DEPRECATED Language array element found in BIG_LETTERS - $return = $GLOBALS['msg'][$messageId]; - } elseif (defined($messageId)) { - // @DEPRECATED Deprecated constant found - $return = constant($messageId); + $return = $GLOBALS['messages'][$messageId]; } else { // Missing language constant - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId)); } // Return the string return $return; } +// Init messages +function initMessages () { + $GLOBALS['messages'] = array(); +} + +// Add message +function addMessages ($messages) { + // Merge both + $GLOBALS['messages'] = merge_array($GLOBALS['messages'], $messages); +} + +// Checks wether given message id is valid +function isMessageIdValid ($messageId) { + return (isset($GLOBALS['messages'][$messageId])); +} + +// "Getter for current language +function getCurrentLanguage () { + return $GLOBALS['language']; +} + // "Getter" for language function getLanguage () { // Set default return value to default language from config @@ -75,12 +90,12 @@ function getLanguage () { $lang = ''; // Is the variable set - if (REQUEST_ISSET_GET('mx_lang')) { + if (isGetRequestElementSet('mx_lang')) { // Accept only first 2 chars - $lang = substr(REQUEST_GET('mx_lang'), 0, 2); - } elseif (isset($GLOBALS['cache_array']['language'])) { + $lang = substr(getRequestElement('mx_lang'), 0, 2); + } elseif (isset($GLOBALS['language'])) { // Use cached - $ret = $GLOBALS['cache_array']['language']; + $ret = getCurrentLanguage(); } elseif (!empty($lang)) { // Check if main language file does exist if (isIncludeReadable('inc/language/' . $lang . '.php')) { @@ -96,7 +111,7 @@ function getLanguage () { } // Cache entry - $GLOBALS['cache_array']['language'] = $ret; + $GLOBALS['language'] = $ret; // Return value return $ret; @@ -105,58 +120,98 @@ function getLanguage () { // "Setter" for language function setLanguage ($lang) { // Accept only first 2 chars! - $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); + $lang = substr(SQL_ESCAPE(secureString($lang)), 0, 2); // Set cookie setSession('mx_lang', $lang); } +// Checks wether a language file is there for optional extension +function isLanguageIncludeReadable ($ext_name = 'none') { + // Do we have array element? + if (!isset($GLOBALS['lang_inc'][$ext_name])) { + // Generate filename + if ($ext_name == 'none') { + // Generic + $languageInclude = sprintf("inc/language/%s.php", getLanguage()); + } else { + // Extension's language file + $languageInclude = sprintf("inc/language/%s_%s.php", $ext_name, getLanguage()); + } + + // Look for file if no extension name is provided + $GLOBALS['lang_inc'][$ext_name] = isIncludeReadable($languageInclude); + //* DEBUG: */ print __FUNCTION__.':'.$ext_name.'='.$languageInclude.'='.intval(isIncludeReadable($languageInclude)).'<br />'; + } // END - if + + // Return it + return $GLOBALS['lang_inc'][$ext_name]; +} + // Load the current language file or fixes it to 'de' -// If ext_name is empty, load general language support, else load extension's -// language file. -function loadLanguageFile ($ext_name = '') { +// If ext_name is 'none', load general language support, else load extension's +// language file. In installation phase load the install language file. +function loadLanguageFile ($ext_name = 'none') { // Try to get language from session - $mx_lang = getSession('mx_lang'); + $currLanguage = getLanguage(); // Set default language if it is not (yet) set - if (is_null($mx_lang)) $mx_lang = getConfig('DEFAULT_LANG'); + if (is_null($currLanguage)) { + // Get it from config + $currLanguage = getConfig('DEFAULT_LANG'); - // Generate filename - if (empty($ext_name)) { - // Generic - $languageInclude = sprintf("inc/language/%s.php", SQL_ESCAPE($mx_lang)); - } else { - // Extension's language file - $languageInclude = sprintf("inc/language/%s_%s.php", $ext_name, getLanguage()); - } + // And save it in session + setLanguage($currLanguage); + } // END - if - // Look for file if no extension name is provided - if ((empty($ext_name)) && (isIncludeReadable($languageInclude) === false)) { + // Do we have the language file NOT? + if (!isLanguageIncludeReadable($ext_name)) { // Switch to default (DO NOT CHANGE!!!) setLanguage('de'); - $languageInclude = 'inc/language/de.php'; // And set it temporarily setConfigEntry('DEFAULT_LANG', 'de'); } // END - if // Is the file there? - if (isIncludeReadable($languageInclude)) { + if (isLanguageIncludeReadable($ext_name)) { // Load language file - loadIncludeOnce($languageInclude); - } elseif ((isDebugModeEnabled()) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) { + loadLanguageInclude($ext_name); + } elseif ((isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) { // No language file is not so good... - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s", - $ext_name, getLanguage() + logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s", + $ext_name, + getLanguage() )); } // Check for installation mode - if ((isInstalling()) || (!isInstalled()) || (!isAdminRegistered())) { - // Load matching language file - loadInclude('inc/language/install_' . getSession('mx_lang') . '.php'); + if ((isInstallationPhase()) || (!isAdminRegistered())) { + // Load language file + loadLanguageInclude('install'); } // END - if } +// Loads the language file +function loadLanguageInclude ($ext_name = 'none') { + // Generate filename + if ($ext_name == 'none') { + // Generic + $languageInclude = sprintf("inc/language/%s.php", getLanguage()); + } else { + // Extension's language file + $languageInclude = sprintf("inc/language/%s_%s.php", $ext_name, getLanguage()); + } + + // Check it before loading + if (isLanguageIncludeReadable($ext_name)) { + // Load it + loadIncludeOnce($languageInclude); + } else { + // Not readable! + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Language file %s not found or readable.", $languageInclude)); + } +} + // [EOF] ?> diff --git a/inc/language/_de.php b/inc/language/_de.php index 71376d3418..fdd31070bc 100644 --- a/inc/language/_de.php +++ b/inc/language/_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,11 +38,12 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions +addMessages(array( +)); -// +// [EOF] ?> diff --git a/inc/language/active_de.php b/inc/language/active_de.php index 0ffe2c4e35..b80e9f3f2e 100644 --- a/inc/language/active_de.php +++ b/inc/language/active_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('GUEST_ACTIVE_LINK', "Heute Online"); -define('GUEST_ACTIVE_NO_MEMER_ONLINE_TODAY', "Heute war noch kein einziges Mitglied online!"); -define('GUEST_ACTIVE_HEADER', "Wir waren heute online!"); -define('GUEST_ACTIVE_FOOTER', "Diese Mitglieder waren heute bei <strong>{--MAIN_TITLE--}</strong> eingeloggt."); -define('ADMIN_ACTIVE_SETTINGS', "Einstellungen an Aktiv-Liste"); -define('ADMIN_ACTIVE_LIMIT', "Anzahl Einträge in Liste"); +addMessages(array( + 'GUEST_ACTIVE_LINK' => "Heute Online", + 'GUEST_ACTIVE_NO_MEMER_ONLINE_TODAY' => "Heute war noch kein einziges Mitglied online!", + 'GUEST_ACTIVE_HEADER' => "Wir waren heute online!", + 'GUEST_ACTIVE_FOOTER' => "Diese Mitglieder waren heute bei <strong>{?MAIN_TITLE?}</strong> eingeloggt.", + 'ADMIN_ACTIVE_SETTINGS' => "Einstellungen an Aktiv-Liste", + 'ADMIN_ACTIVE_LIMIT' => "Anzahl Einträge in Liste", +)); -// +// [EOF] ?> diff --git a/inc/language/admins_de.php b/inc/language/admins_de.php index e444e0665a..e9f6ee619c 100644 --- a/inc/language/admins_de.php +++ b/inc/language/admins_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,77 +38,78 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_ADMINS_ADD_NEW_ADMIN', "Neuen Administrator-Account anlegen"); -define('ADMIN_ADMINS_ADD_ADMIN', "Hinzufügen"); -define('ADMIN_ADMINS_ENTER_LOGIN', "Loginname eingeben"); -define('ADMIN_ADMINS_ENTER_EMAIL', "E-Mail eingeben"); -define('ADMIN_ADMINS_ENTER_PASS1', "Passwort eingeben"); -define('ADMIN_ADMINS_ENTER_PASS2', "Passwort wiederholen"); -define('ADMIN_ADMINS_ADD_DONE', "Das Admin-Account wurde angelegt."); -define('ADMIN_ADMINS_EDIT_ACCOUNTS', "Admin-Accounts verwalten"); -define('ADMIN_ADMINS_EDIT', "Bearbeiten"); -define('ADMIN_ADMINS_DELETE', "Löschen"); -define('ADMIN_ADMINS_CONTACT', "Admin-Login"); -define('ADMIN_ADMINS_EMAIL', "E-Mail Adresse"); -define('ADMIN_ADMINS_PASSWORD', "Passwort und Wiederholung"); -define('ADMIN_ADMINS_EDIT_NOTE', "Bitte beachten Sie, dass Sie nur dann das Passwort zweimal eingeben müssen, wenn Sie es ändern wollen. Wollen Sie nur die Daten ändern, brauchen Sie kein Passwort eingeben!"); -define('ADMIN_ADMINS_DELETE_ACCOUNTS', "Wollen Sie wirklich diese Accounts löschen?"); -define('ADMIN_ADMINS_CANNOT_DELETE_LAST', "Das letzte Admin-Account kann nicht gelöscht werden!"); -define('ADMINS_SELECT_ADMIN', "Bitte wählen Sie einen Administrator aus dem Menüpunkt <em>Admin-Account ändern</em> aus!"); -define('ADMINS_ADMIN_ID', "Admin-ID"); -define('ADMINS_CONTACT_SUBMIT', "Admin kontaktieren"); -define('ADMINS_ENTER_CONTACT_TEXT', "Kontaktgrund eingeben"); -define('ADMINS_SELECT_CONTACT_TYPE', "Nachricht übertragen als"); -define('ADMINS_CONTACT_TYPE_MAIL', "Mail"); -define('ADMINS_CONTACT_TYPE_MSG', "Nachricht"); -define('ADMINS_CONTACT_DEFAULT_MAIL', "Ihre Nachricht wird als Mail versendet."); -define('ADMINS_MSG_FROM_ADMIN', "Nachricht von einem Admin"); -define('ADMINS_ADMIN_CONTACTED', "Administrator wurde benachrichtigt!"); -define('ADMIN_ADMINS_ADD_ACL', "Zugriffkontrollzeile hinzufügen"); -define('ADMIN_ADMINS_SELECT_LOGIN', "Admin-Login auswählen"); -define('ADMIN_ADMINS_SELECT_ACTION', "Hauptmenü"); -define('ADMIN_ADMINS_SELECT_WHAT', "Untermenü"); -define('ADMIN_ADMINS_SELECT_MODE', "Zugriffsmodus auswählen"); -define('ADMINS_ALLOW_MODE', "Erlauben"); -define('ADMINS_DENY_MODE', "Ablehnen"); -define('ADMIN_ADMINS_ACCESS_MODE', "Zugriffsmodus"); -define('ADMIN_ADMINS_ACL_NOTE', "Sperren Sie nicht sich selber aus, indem Sie den Zugriffsmodus Ihres eigenen Accountes auf <strong>Ablehnen</strong> stellen! Dann können Sie zwar einloggen, aber nichts mehr machen!"); -define('ADMIN_ADMINS_SAME_MODE_SELECTED', "Bitte wählen Sie den anderen Zugriffsmodus aus!"); -define('ADMIN_ADMINS_SELECT_ACTION_WHAT', "Bitte wählen Sie ein Haupt- oder Untermenü aus!"); -define('ADMIN_ADMINS_ACL_ALREADY_ADDED', "Zugriffskontrollzeile bereits hinzugefügt!"); -define('ADMIN_ADMINS_ACL_SAVED', "Zugriffskontrollzeile gespeichert."); -define('ADMIN_ADMINS_LIST_ACLS', "Alle angelgten Zugriffkontrollzeilen auflisten"); -define('ADMINS_EDIT_ACLS', "Editieren"); -define('ADMINS_DEL_ACLS', "Löschen"); -define('ADMINS_AID', "Admin-Login"); -define('ADMIN_ADMINS_EDIT_ACLS', "Zugriffkontrollzeilen ändern"); -define('ADMINS_CHANGE_ACLS', "Einträge ändern"); -define('ADMINS_REMOVE_ACLS', "Einträge löschen"); -define('ADMIN_ADMINS_ENTRIES_CHANGED', "Zugriffkontrollzeilen wurden geändert."); -define('ADMIN_ADMINS_DELETE_ACLS', "Zugriffkontrollzeilen löschen"); -define('ADMIN_ADMINS_ENTRIES_DELETED', "Zugriffkontrollzeilen wurden gelöscht."); -define('ADMINS_MAILS_NO_ENTRIES', "Keine Einträge gefunden!"); -define('ADMINS_MAILS_TITLE', "Admins-Mails verwalten"); -define('ADMIN_ADMINS_TEMPLATE', "Mail-Template"); -define('ADMINS_ALL_ADMINS', "An alle Admins"); -define('ADMINS_TO_USER_EVENTS', "Im Userlog vermerken"); -define('ADMINS_NO_MAIL_CHECKED', "Keine Mails zum Editieren ausgewählt."); -define('ADMINS_MAILS_EDIT_TITLE', "Ausgewählte Templates den Admins zuweisen"); -define('ADMIN_ADMINS_CHANGE', "Ändern"); -define('ADMINS_ADD_MORE_ADMINS', "Weiteren Admin hinzufügen"); -define('ADMIN_ACCOUNT_SAVED', "Admin-Account gespeichert."); -define('ADMINS_ERROR_PASS_MISMATCH', "Die beiden Passwörter stimmen nicht überein!"); -define('ADMIN_ACCOUNT_404', "Admin-Account nicht gefunden!"); +addMessages(array( + 'ADMIN_ADMINS_ADD_NEW_ADMIN' => "Neuen Administrator-Account anlegen", + 'ADMIN_ADMINS_ADD_ADMIN' => "Hinzufügen", + 'ADMIN_ADMINS_ENTER_LOGIN' => "Loginname eingeben", + 'ADMIN_ADMINS_ENTER_EMAIL' => "E-Mail eingeben", + 'ADMIN_ADMINS_ENTER_PASS1' => "Passwort eingeben", + 'ADMIN_ADMINS_ENTER_PASS2' => "Passwort wiederholen", + 'ADMIN_ADMINS_ADD_DONE' => "Das Admin-Account wurde angelegt.", + 'ADMIN_ADMINS_EDIT_ACCOUNTS' => "Admin-Accounts verwalten", + 'ADMIN_ADMINS_EDIT' => "Bearbeiten", + 'ADMIN_ADMINS_DELETE' => "Löschen", + 'ADMIN_ADMINS_CONTACT' => "Admin-Login", + 'ADMIN_ADMINS_EMAIL' => "E-Mail Adresse", + 'ADMIN_ADMINS_PASSWORD' => "Passwort und Wiederholung", + 'ADMIN_ADMINS_EDIT_NOTE' => "Bitte beachten Sie, dass Sie nur dann das Passwort zweimal eingeben müssen, wenn Sie es ändern wollen. Wollen Sie nur die Daten ändern, brauchen Sie kein Passwort eingeben!", + 'ADMIN_ADMINS_DELETE_ACCOUNTS' => "Wollen Sie wirklich diese Accounts löschen?", + 'ADMIN_ADMINS_CANNOT_DELETE_LAST' => "Das letzte Admin-Account kann nicht gelöscht werden!", + 'ADMINS_SELECT_ADMIN' => "Bitte wählen Sie einen Administrator aus dem Menüpunkt <em>Admin-Account ändern</em> aus!", + 'ADMINS_ADMIN_ID' => "Admin-ID", + 'ADMINS_CONTACT_SUBMIT' => "Admin kontaktieren", + 'ADMINS_ENTER_CONTACT_TEXT' => "Kontaktgrund eingeben", + 'ADMINS_SELECT_CONTACT_TYPE' => "Nachricht übertragen als", + 'ADMINS_CONTACT_TYPE_MAIL' => "Mail", + 'ADMINS_CONTACT_TYPE_MSG' => "Nachricht", + 'ADMINS_CONTACT_DEFAULT_MAIL' => "Ihre Nachricht wird als Mail versendet.", + 'ADMINS_MSG_FROM_ADMIN' => "Nachricht von einem Admin", + 'ADMINS_ADMIN_CONTACTED' => "Administrator wurde benachrichtigt!", + 'ADMIN_ADMINS_ADD_ACL' => "Zugriffkontrollzeile hinzufügen", + 'ADMIN_ADMINS_SELECT_LOGIN' => "Admin-Login auswählen", + 'ADMIN_ADMINS_SELECT_ACTION' => "Hauptmenü", + 'ADMIN_ADMINS_SELECT_WHAT' => "Untermenü", + 'ADMIN_ADMINS_SELECT_MODE' => "Zugriffsmodus auswählen", + 'ADMINS_ALLOW_MODE' => "Erlauben", + 'ADMINS_DENY_MODE' => "Ablehnen", + 'ADMIN_ADMINS_ACCESS_MODE' => "Zugriffsmodus", + 'ADMIN_ADMINS_ACL_NOTE' => "Sperren Sie nicht sich selber aus, indem Sie den Zugriffsmodus Ihres eigenen Accountes auf <strong>Ablehnen</strong> stellen! Dann können Sie zwar einloggen, aber nichts mehr machen!", + 'ADMIN_ADMINS_SAME_MODE_SELECTED' => "Bitte wählen Sie den anderen Zugriffsmodus aus!", + 'ADMIN_ADMINS_SELECT_ACTION_WHAT' => "Bitte wählen Sie ein Haupt- oder Untermenü aus!", + 'ADMIN_ADMINS_ACL_ALREADY_ADDED' => "Zugriffskontrollzeile bereits hinzugefügt!", + 'ADMIN_ADMINS_ACL_SAVED' => "Zugriffskontrollzeile gespeichert.", + 'ADMIN_ADMINS_LIST_ACLS' => "Alle angelgten Zugriffkontrollzeilen auflisten", + 'ADMINS_EDIT_ACLS' => "Editieren", + 'ADMINS_DEL_ACLS' => "Löschen", + 'ADMINS_AID' => "Admin-Login", + 'ADMIN_ADMINS_EDIT_ACLS' => "Zugriffkontrollzeilen ändern", + 'ADMINS_CHANGE_ACLS' => "Einträge ändern", + 'ADMINS_REMOVE_ACLS' => "Einträge löschen", + 'ADMIN_ADMINS_ENTRIES_CHANGED' => "Zugriffkontrollzeilen wurden geändert.", + 'ADMIN_ADMINS_DELETE_ACLS' => "Zugriffkontrollzeilen löschen", + 'ADMIN_ADMINS_ENTRIES_DELETED' => "Zugriffkontrollzeilen wurden gelöscht.", + 'ADMINS_MAILS_NO_ENTRIES' => "Keine Einträge gefunden!", + 'ADMINS_MAILS_TITLE' => "Admins-Mails verwalten", + 'ADMIN_ADMINS_TEMPLATE' => "Mail-Template", + 'ADMINS_ALL_ADMINS' => "An alle Admins", + 'ADMINS_TO_USER_EVENTS' => "Im Userlog vermerken", + 'ADMINS_NO_MAIL_CHECKED' => "Keine Mails zum Editieren ausgewählt.", + 'ADMINS_MAILS_EDIT_TITLE' => "Ausgewählte Templates den Admins zuweisen", + 'ADMIN_ADMINS_CHANGE' => "Ändern", + 'ADMINS_ADD_MORE_ADMINS' => "Weiteren Admin hinzufügen", + 'ADMIN_ACCOUNT_SAVED' => "Admin-Account gespeichert.", + 'ADMINS_ERROR_PASS_MISMATCH' => "Die beiden Passwörter stimmen nicht überein!", + 'ADMIN_ACCOUNT_404' => "Admin-Account nicht gefunden!", // Logical area constants -define('ADMINS_GLOBAL_LA_SETTING', "Globale Einst."); -define('ADMINS_OLD_LA_SETTING', "Altes Menü"); -define('ADMINS_NEW_LA_SETTING', "Neues Menü"); + 'ADMINS_GLOBAL_LA_SETTING' => "Globale Einst.", + 'ADMINS_OLD_LA_SETTING' => "Altes Menü", + 'ADMINS_NEW_LA_SETTING' => "Neues Menü", +)); -// +// [EOF] ?> diff --git a/inc/language/autopurge_de.php b/inc/language/autopurge_de.php index 62d2b07c02..2c6dc76153 100644 --- a/inc/language/autopurge_de.php +++ b/inc/language/autopurge_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,49 +38,50 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('AUTOPURGE_MEMBER_SUBJECT', "{?POINTS?}-Gutschrift bei Auto-Loeschung"); -define('AUTOPURGE_MEMBER_INACTIVE_SUBJECT', "Inaktivitaet --> Account wird bald geloescht!"); -define('AUTOPURGE_MEMBER_UNCONFIRMED_SUBJECT', "Loeschung --> EMail-Adresse nicht bestaetigt!"); -define('AUTOPURGE_ADMIN_SUBJECT', "[Auto-Purge:] Bestaetigungslinks"); -define('AUTOPURGE_ADMIN_INACTIVE_SUBJECT', "Inaktive User benachrichtigt"); -define('AUTOPURGE_ADMIN_DELETE_SUBJECT', "[Auto-Purge:] Inaktiven Mitgliedern"); -define('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT', "[Auto-Purge:] Unbestaetigten Accounts"); -define('AUTOPURGE_ADMIN_TASKS_SUBJECT', "[Auto-Purge:] Zu Loeschen marktierte Aufgaben"); -define('AUTOPURGE_ADMIN_TURBO_SUBJECT', "[Auto-Purge:] Veraltete Bonus-Eintraege"); -define('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT', "[Auto-Purge:] Mailbuchungen bereits gel. Mitglieder"); +addMessages(array( + 'AUTOPURGE_MEMBER_SUBJECT' => "{?POINTS?}-Gutschrift bei Auto-Loeschung", + 'AUTOPURGE_MEMBER_INACTIVE_SUBJECT' => "Inaktivitaet --> Account wird bald geloescht!", + 'AUTOPURGE_MEMBER_UNCONFIRMED_SUBJECT' => "Loeschung --> EMail-Adresse nicht bestätigt!", + 'AUTOPURGE_ADMIN_SUBJECT' => "[Auto-Purge:] Bestaetigungslinks", + 'AUTOPURGE_ADMIN_INACTIVE_SUBJECT' => "Inaktive User benachrichtigt", + 'AUTOPURGE_ADMIN_DELETE_SUBJECT' => "[Auto-Purge:] Inaktiven Mitgliedern", + 'AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT' => "[Auto-Purge:] Unbestätigten Accounts", + 'AUTOPURGE_ADMIN_TASKS_SUBJECT' => "[Auto-Purge:] Zu Loeschen marktierte Aufgaben", + 'AUTOPURGE_ADMIN_TURBO_SUBJECT' => "[Auto-Purge:] Veraltete Bonus-Eintraege", + 'AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT' => "[Auto-Purge:] Mailbuchungen bereits gel. Mitglieder", -define('ADMIN_AUTOPURGE_CONFIGURATION', "Konfiguration der automatischen Löschungen"); -define('ADMIN_AUTOPURGE_INACTIVE', "Sollten inaktive Accounts erkannt und gelöscht werden?"); -define('ADMIN_AUTOPURGE_INACTIVE_SINCE', "Dauer bis bestätigtes Account als inaktiv markiert wird"); -define('ADMIN_AUTOPURGE_INACTIVE_TIME', "Dauer bis inaktives Account gelöscht wird"); -define('ADMIN_AUTOPURGE_UNCONFIRMED', "Sollen unbestätigte Accounts gelöscht werden?"); -define('ADMIN_AUTOPURGE_UNCONFIRMED_TIME', "Dauer bis unbestätigte Accounts gelöscht werden"); -define('ADMIN_AUTOPURGE_ALL_ACTIVE', "Alle Ihre Mitlieder sind aktiv!"); -define('ADMIN_AUTOPURGE_TASKS', "Löschen von veralteten zu Löschen markierten Aufgaben?"); -define('ADMIN_AUTOPURGE_TASKS_TIME', "Dauer bis zu löschen marktierte Aufgaben gelöscht werden"); -define('ADMIN_AUTOPURGE_INACTIVE_TITLE', "Inaktive Accounts löschen"); -define('ADMIN_AUTOPURGE_UNCONFIRMED_TITLE', "Unbestätigte Accounts löschen"); -define('ADMIN_AUTOPURGE_TASKS_TITLE', "Veraltete Aufgaben löschen"); -define('ADMIN_AUTOPURGE_NOTIFICATION_TITLE', "Benachtigung an Admin bei Auto-Löschung"); -define('ADMIN_AUTOPURGE_NOTIFY_INACTIVE', "Benachrichtigung bei inaktive Accounts löschen"); -define('ADMIN_AUTOPURGE_NOTIFY_UNCONFIRMED', "Benachrichtigung bei unbestätigte Accounts löschen"); -define('ADMIN_AUTOPURGE_NOTIFY_TASKS', "Benachrichtigung bei veraltete Aufgaben löschen"); -define('AUTOPURGE_NOTIFIED', "Benachrichtigt"); + 'ADMIN_AUTOPURGE_CONFIGURATION' => "Konfiguration der automatischen Löschungen", + 'ADMIN_AUTOPURGE_INACTIVE' => "Sollten inaktive Accounts erkannt und gelöscht werden?", + 'ADMIN_AUTOPURGE_INACTIVE_SINCE' => "Dauer bis bestätigtes Account als inaktiv markiert wird", + 'ADMIN_AUTOPURGE_INACTIVE_TIME' => "Dauer bis inaktives Account gelöscht wird", + 'ADMIN_AUTOPURGE_UNCONFIRMED' => "Sollen unbestätigte Accounts gelöscht werden?", + 'ADMIN_AUTOPURGE_UNCONFIRMED_TIME' => "Dauer bis unbestätigte Accounts gelöscht werden", + 'ADMIN_AUTOPURGE_ALL_ACTIVE' => "Alle Ihre Mitlieder sind aktiv!", + 'ADMIN_AUTOPURGE_TASKS' => "Löschen von veralteten zu Löschen markierten Aufgaben?", + 'ADMIN_AUTOPURGE_TASKS_TIME' => "Dauer bis zu löschen marktierte Aufgaben gelöscht werden", + 'ADMIN_AUTOPURGE_INACTIVE_TITLE' => "Inaktive Accounts löschen", + 'ADMIN_AUTOPURGE_UNCONFIRMED_TITLE' => "Unbestätigte Accounts löschen", + 'ADMIN_AUTOPURGE_TASKS_TITLE' => "Veraltete Aufgaben löschen", + 'ADMIN_AUTOPURGE_NOTIFICATION_TITLE' => "Benachtigung an Admin bei Auto-Löschung", + 'ADMIN_AUTOPURGE_NOTIFY_INACTIVE' => "Benachrichtigung bei inaktive Accounts löschen", + 'ADMIN_AUTOPURGE_NOTIFY_UNCONFIRMED' => "Benachrichtigung bei unbestätigte Accounts löschen", + 'ADMIN_AUTOPURGE_NOTIFY_TASKS' => "Benachrichtigung bei veraltete Aufgaben löschen", + 'AUTOPURGE_NOTIFIED' => "Benachrichtigt", -define('ADMIN_AUTOPURGE_DEL_MAILS_TITLE', "Mails von gelöschten Mitgliedern löschen"); -define('ADMIN_AUTOPURGE_DEL_MAILS', "Sollen die Mailbuchungen von be bnreits gelöschten Mitgliedern gelöscht werden?"); -define('ADMIN_AUTOPURGE_DEL_MAILS_TIME', "Dauer bis Mails gelöscht werden"); -define('ADMIN_AUTOPURGE_NOTIFY_DEL_MAILS', "Benachrichtigen bei Löschung von Mails"); + 'ADMIN_AUTOPURGE_DEL_MAILS_TITLE' => "Mails von gelöschten Mitgliedern löschen", + 'ADMIN_AUTOPURGE_DEL_MAILS' => "Sollen die Mailbuchungen von be bnreits gelöschten Mitgliedern gelöscht werden?", + 'ADMIN_AUTOPURGE_DEL_MAILS_TIME' => "Dauer bis Mails gelöscht werden", + 'ADMIN_AUTOPURGE_NOTIFY_DEL_MAILS' => "Benachrichtigen bei Löschung von Mails", // Moved from other extensions -define('ADMIN_OPTION_AUTOPURGE_ACTIVE', "Auto-Löschung von Bestätigungslink ist aktiviert?"); -define('ADMIN_OPTION_MAIL_LIFETIME', "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)"); -define('ADMIN_AUTOPURGE_MAILID_TITLE', "Mailbestätigungslinks löschen"); + 'ADMIN_OPTION_AUTOPURGE_ACTIVE' => "Auto-Löschung von Bestätigungslink ist aktiviert?", + 'ADMIN_OPTION_MAIL_LIFETIME' => "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)", + 'ADMIN_AUTOPURGE_MAILID_TITLE' => "Mailbestätigungslinks löschen", +)); -// +// [EOF] ?> diff --git a/inc/language/bank_de.php b/inc/language/bank_de.php index 00d688f17f..2e700bb380 100644 --- a/inc/language/bank_de.php +++ b/inc/language/bank_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,47 +38,48 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_ADD_BANK_PACKAGE_TITLE', "Neues Angebotspaket hinzufügen"); -define('ADMIN_BANK_PACKAGE_TITLE', "Titel des Angebotspaketes"); -define('ADMIN_BANK_PACKAGE_DESCRIPTION', "Kurze Beschreibung des Paketes"); -define('ADMIN_BANK_PACKAGE_ACCOUNT_FEE', "Monatliche Grundgebühr (Kontoführung)"); -define('ADMIN_BANK_PACKAGE_FREE_TRANSFERS', "Anzahl kostenlose Überweisungen pro Monat"); -define('ADMIN_BANK_PACKAGE_OUTPUT_MODE', "Abrufmöglichkeiten der Kontoauszüge"); -define('ADMIN_BANK_PACKAGE_FREE_MONTHS_FEE', "Anzahl grundgebührfreier Monate"); -define('ADMIN_BANK_PACKAGE_INTEREST_PLUS', "Zinssatz für Haben"); -define('ADMIN_BANK_PACKAGE_INTEREST_MINUS', "Zinssatz für Soll"); -define('ADMIN_BANK_PACKAGE_FIRST_PAYMENT', "Höhe der ersten Einzahlung"); -define('ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME', "Höhe der monatlichen Einnahmen, um Konto kostenlos zu erhalten"); -define('ADMIN_BANK_PACKAGE_FREE_ACCOUNT_STUFF', "Freitext für Dinge, die kostenlos sein werden."); -define('ADMIN_BANK_PACKAGE_TAN_LOCK', "Anzahl Versuche richtige (i)TAN einzugeben, bis (i)TAN-Liste gesperrt wird."); -define('ADMIN_BANK_PACKAGE_ACTIVE', "Ist dieses Angebotspaket vom Mitglied einsehbar, also aktiviert?"); -define('ADMIN_BANK_PACKAGE_TRANSFER_FEE', "Gebühr für Überweisung"); -define('ADMIN_BANK_PACKAGE_EDIT_TAN_LOCK', "Anzahl Versuche bis (i)TAN-Liste gesperrt ist."); -define('ADMIN_BANK_PACKAGE_EDIT_ACTIVE', "Aktiviert/Erwerbbar"); -define('ADMIN_ADD_BANK_PACKAGE', "Angebotspaket einstellen"); -define('ADMIN_BANK_FOOTER_NOTE', "Bitte beachten Sie, dass keine Mail zu den Mitgliedern unterwegs ist. Seien Sie bei Titel, Beschreibung und Freitext kreativ und schreiben Sie aussagekräftige Texte!"); -define('ADMIN_BANK_NO_PACKAGES_FOUND', "Keine Angebotspakete zum Auflisten gefunden!"); -define('ADMIN_LIST_BANK_PACKAGES', "Angebotspakete für Ihre Bank auflisten"); -define('ADMIN_LIST_BANK_PACKAGES_TITLE', "Pakettitel"); -define('ADMIN_LIST_BANK_PACKAGES_DESCR', "Paketbeschreibung"); -define('ADMIN_LIST_BANK_PACKAGES_ACCOUNT_FEE', "Grundgebühr"); -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', "<strong>Hinweis:</strong> 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 <em>Konten auflisten</em> vorher nach!"); -define('ADMIN_EDIT_BANK_PACKAGES', "Angebotspakete ändern"); -define('ADMIN_EDIT_BANK_PACKAGES_NOTES', "<strong>Hinweis:</strong> Derzeit keine Tipps für diese Aktion."); +addMessages(array( + 'ADMIN_ADD_BANK_PACKAGE_TITLE' => "Neues Angebotspaket hinzufügen", + 'ADMIN_BANK_PACKAGE_TITLE' => "Titel des Angebotspaketes", + 'ADMIN_BANK_PACKAGE_DESCRIPTION' => "Kurze Beschreibung des Paketes", + 'ADMIN_BANK_PACKAGE_ACCOUNT_FEE' => "Monatliche Grundgebühr (Kontoführung)", + 'ADMIN_BANK_PACKAGE_FREE_TRANSFERS' => "Anzahl kostenlose Überweisungen pro Monat", + 'ADMIN_BANK_PACKAGE_OUTPUT_MODE' => "Abrufmöglichkeiten der Kontoauszüge", + 'ADMIN_BANK_PACKAGE_FREE_MONTHS_FEE' => "Anzahl grundgebührfreier Monate", + 'ADMIN_BANK_PACKAGE_INTEREST_PLUS' => "Zinssatz für Haben", + 'ADMIN_BANK_PACKAGE_INTEREST_MINUS' => "Zinssatz für Soll", + 'ADMIN_BANK_PACKAGE_FIRST_PAYMENT' => "Höhe der ersten Einzahlung", + 'ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME' => "Höhe der monatlichen Einnahmen, um Konto kostenlos zu erhalten", + 'ADMIN_BANK_PACKAGE_FREE_ACCOUNT_STUFF' => "Freitext für Dinge, die kostenlos sein werden.", + 'ADMIN_BANK_PACKAGE_TAN_LOCK' => "Anzahl Versuche richtige (i)TAN einzugeben, bis (i)TAN-Liste gesperrt wird.", + 'ADMIN_BANK_PACKAGE_ACTIVE' => "Ist dieses Angebotspaket vom Mitglied einsehbar, also aktiviert?", + 'ADMIN_BANK_PACKAGE_TRANSFER_FEE' => "Gebühr für Überweisung", + 'ADMIN_BANK_PACKAGE_EDIT_TAN_LOCK' => "Anzahl Versuche bis (i)TAN-Liste gesperrt ist.", + 'ADMIN_BANK_PACKAGE_EDIT_ACTIVE' => "Aktiviert/Erwerbbar", + 'ADMIN_ADD_BANK_PACKAGE' => "Angebotspaket einstellen", + 'ADMIN_BANK_FOOTER_NOTE' => "Bitte beachten Sie, dass keine Mail zu den Mitgliedern unterwegs ist. Seien Sie bei Titel, Beschreibung und Freitext kreativ und schreiben Sie aussagekräftige Texte!", + 'ADMIN_BANK_NO_PACKAGES_FOUND' => "Keine Angebotspakete zum Auflisten gefunden!", + 'ADMIN_LIST_BANK_PACKAGES' => "Angebotspakete für Ihre Bank auflisten", + 'ADMIN_LIST_BANK_PACKAGES_TITLE' => "Pakettitel", + 'ADMIN_LIST_BANK_PACKAGES_DESCR' => "Paketbeschreibung", + 'ADMIN_LIST_BANK_PACKAGES_ACCOUNT_FEE' => "Grundgebühr", + 'ADMIN_LIST_BANK_PACKAGES_STATUS' => "Erwerbbar?", + 'ADMIN_LIST_BANK_PACKAGES_ACCOUNT_INTEREST_PLUS' => "Zinsen f. Haben", + 'ADMIN_LIST_BANK_PACKAGES_ACCOUNT_INTEREST_MINUS' => "Zinsen f. Soll", + 'ADMIN_DELETE_BANK_PACKAGES' => "Angebotspakete entgültig entfernen", + 'ADMIN_DELETE_BANK_PACKAGES_NOTES' => "<strong>Hinweis:</strong> 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 <em>Konten auflisten</em> vorher nach!", + 'ADMIN_EDIT_BANK_PACKAGES' => "Angebotspakete ändern", + 'ADMIN_EDIT_BANK_PACKAGES_NOTES' => "<strong>Hinweis:</strong> Derzeit keine Tipps für diese Aktion.", // Output modes -define('BANK_OUTPUT_MODE_LOGIN', "Nur im Mitgliedsbereich"); -define('BANK_OUTPUT_MODE_EMAIL', "Per EMail&Mitgliedsbereich"); -define('BANK_OUTPUT_MODE_DISABLED', "Keinen Zugriff"); + 'BANK_OUTPUT_MODE_LOGIN' => "Nur im Mitgliedsbereich", + 'BANK_OUTPUT_MODE_EMAIL' => "Per EMail&Mitgliedsbereich", + 'BANK_OUTPUT_MODE_DISABLED' => "Keinen Zugriff", +)); -// +// [EOF] ?> diff --git a/inc/language/beg_de.php b/inc/language/beg_de.php index a075526de4..ce084747e8 100644 --- a/inc/language/beg_de.php +++ b/inc/language/beg_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,113 +38,114 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_EDIT_BEG_SETTINGS', "Einstellungen am Bettel-Link"); -define('ADMIN_BEG_POINTS', "{?POINTS?}-Gutschrift bei Klick auf Bettel-Link"); -define('ADMIN_CONFIG_BEG_TIMEOUT', "Zeitsperre global"); -define('ADMIN_CONFIG_BEG_UID_TIMEOUT', "Zeitsperre gegen eine Mitglieder-ID"); -define('ADMIN_CONFIG_BEG_REMOTE_IP_TIMEOUT', "Zeitsperre gegen eine IP-Nummer"); -define('BEG_LINK_BY_1', "Bettel-Link bei "); -define('BEG_LINK_BY_2', ""); -define('BEG_LINK_USERID_1', "Unser Mitglied "); -define('BEG_LINK_USERID_2', " hat {?POINTS?} gebettelt!"); -define('BEG_UID_STEAL_1', "Das Mitglied "); -define('BEG_UID_STEAL_2', " hat soeben "); -define('BEG_UID_STEAL_3', " {?POINTS?} bei Ihnen erbettelt!"); -define('BEG_CLICKS_1', "Dies war insgesamt der "); -define('BEG_CLICKS_2', ". Klick auf sein Bettel-Link."); -define('BEG_THANKS_FOR_CLICK', "Danke für Ihre Spende!"); -define('BEG_CONTINUE_REGISTER', "Und weiter geht es zur Anmeldung bei {--MAIN_TITLE--} ..."); -define('BEG_SORRY_ANOTHER_WAS_HERE_1', "Oh schade! Es war vor kurzem schon einer hier! Das Mitglied "); -define('BEG_SORRY_ANOTHER_WAS_HERE_2', " hat von Ihnen auch keine "); -define('BEG_SORRY_ANOTHER_WAS_HERE_3', " {?POINTS?} erhalten."); -define('BEG_THANKS_FOR_CLICK_AGAIN', "Danke dennoch für den erneuten Klick!"); -define('BEG_MEMBER_YOUR_LINK', "Hier ist Ihr persönlicher Bettel-Link"); -define('BEG_MEMBER_CLICKS_TOTAL', "Anzahl Gesamtklicks auf Ihren Bettel-Link"); -define('BEG_MEMBER_EARN_1', "Sie erhalten von"); -define('BEG_MEMBER_EARN_2', "bis"); -define('BEG_MEMBER_EARN_3', "für jeden Klick auf Ihren Bettellink."); -define('BEG_MEMBER_TIMEOUT_1', "Die Zeitsperre ist derzeit eingestellt auf "); -define('BEG_MEMBER_TIMEOUT_2', ". Innerhalb dieser Zeit erhalten Sie keine erneute Vergütung!"); -define('BEG_MEMBER_HAVE_FUN', "Viel Spass beim {?POINTS?}-Betteln."); -define('BEG_GUEST_TRAILER', "{?POINTS?} erbetteln bei..."); -define('BEG_GUEST_EARN_1', "Betteln macht sich bezahlt! Für jeden Klick erhalten Sie von"); -define('BEG_GUEST_EARN_2', "bis"); -define('BEG_GUEST_EARN_3', "auf Ihr Mitgliedskonto direkt gutgeschrieben. Zuddem verdienen Sie an den erbettelteten {?POINTS?} Ihrer Refferal mit."); -define('BEG_GUEST_TIMEOUT_1', "Sie können derzeit alle "); -define('BEG_GUEST_TIMEOUT_2', " {?POINTS?} betteln."); -define('BEG_GUEST_HAVE_FUN', "Heute noch anmelden und Spass haben!"); -define('ADMIN_BEG_POINTS_MAX', "Maximale erbettelbare {?POINTS?} bei Klick auf Bettellink"); -define('ADMIN_BEG_USERID', "Mitglied-Account zum Abbuchen der erbettelten {?POINTS?}"); -define('ADMIN_SELECT_BEG_MODE', "Vergütungsmodus der erbettelten {?POINTS?}"); -define('BEG_MODE_DIRECT', "Nur direktem Mitglied gutschreiben."); -define('BEG_MODE_REF', "Auch dem Werber des Mitgliedes gutschreiben."); -define('BEG_SORRY_YOURE_LOGGED_IN_1', "Oh schade! Sie haben vermutlich auf Ihren eigenen Bettel-Link mit der User-ID "); -define('BEG_SORRY_YOURE_LOGGED_IN_2', " geklickt. Sie haben somit auch keine "); -define('BEG_SORRY_YOURE_LOGGED_IN_3', " {?POINTS?} erhalten!"); -define('BEG_SAME_UID_AS_OWN', "Mitglieder-ID des Webmasters benutzt!"); +addMessages(array( + 'ADMIN_EDIT_BEG_SETTINGS' => "Einstellungen am Bettel-Link", + 'ADMIN_BEG_POINTS' => "{?POINTS?}-Gutschrift bei Klick auf Bettel-Link", + 'ADMIN_CONFIG_BEG_TIMEOUT' => "Zeitsperre global", + 'ADMIN_CONFIG_BEG_UID_TIMEOUT' => "Zeitsperre gegen eine Mitglieder-ID", + 'ADMIN_CONFIG_BEG_REMOTE_IP_TIMEOUT' => "Zeitsperre gegen eine IP-Nummer", + 'BEG_LINK_BY_1' => "Bettel-Link bei ", + 'BEG_LINK_BY_2' => "", + 'BEG_LINK_USERID_1' => "Unser Mitglied ", + 'BEG_LINK_USERID_2' => " hat {?POINTS?} gebettelt!", + 'BEG_UID_STEAL_1' => "Das Mitglied ", + 'BEG_UID_STEAL_2' => " hat soeben ", + 'BEG_UID_STEAL_3' => " {?POINTS?} bei Ihnen erbettelt!", + 'BEG_CLICKS_1' => "Dies war insgesamt der ", + 'BEG_CLICKS_2' => ". Klick auf sein Bettel-Link.", + 'BEG_THANKS_FOR_CLICK' => "Danke für Ihre Spende!", + 'BEG_CONTINUE_REGISTER' => "Und weiter geht es zur Anmeldung bei {?MAIN_TITLE?} ...", + 'BEG_SORRY_ANOTHER_WAS_HERE_1' => "Oh schade! Es war vor kurzem schon einer hier! Das Mitglied ", + 'BEG_SORRY_ANOTHER_WAS_HERE_2' => " hat von Ihnen auch keine ", + 'BEG_SORRY_ANOTHER_WAS_HERE_3' => " {?POINTS?} erhalten.", + 'BEG_THANKS_FOR_CLICK_AGAIN' => "Danke dennoch für den erneuten Klick!", + 'BEG_MEMBER_YOUR_LINK' => "Hier ist Ihr persönlicher Bettel-Link", + 'BEG_MEMBER_CLICKS_TOTAL' => "Anzahl Gesamtklicks auf Ihren Bettel-Link", + 'BEG_MEMBER_EARN_1' => "Sie erhalten von", + 'BEG_MEMBER_EARN_2' => "bis", + 'BEG_MEMBER_EARN_3' => "für jeden Klick auf Ihren Bettellink.", + 'BEG_MEMBER_TIMEOUT_1' => "Die Zeitsperre ist derzeit eingestellt auf ", + 'BEG_MEMBER_TIMEOUT_2' => ". Innerhalb dieser Zeit erhalten Sie keine erneute Vergütung!", + 'BEG_MEMBER_HAVE_FUN' => "Viel Spass beim {?POINTS?}-Betteln.", + 'BEG_GUEST_TRAILER' => "{?POINTS?} erbetteln bei...", + 'BEG_GUEST_EARN_1' => "Betteln macht sich bezahlt! Für jeden Klick erhalten Sie von", + 'BEG_GUEST_EARN_2' => "bis", + 'BEG_GUEST_EARN_3' => "auf Ihr Mitgliedskonto direkt gutgeschrieben. Zuddem verdienen Sie an den erbettelteten {?POINTS?} Ihrer Refferal mit.", + 'BEG_GUEST_TIMEOUT_1' => "Sie können derzeit alle ", + 'BEG_GUEST_TIMEOUT_2' => " {?POINTS?} betteln.", + 'BEG_GUEST_HAVE_FUN' => "Heute noch anmelden und Spass haben!", + 'ADMIN_BEG_POINTS_MAX' => "Maximale erbettelbare {?POINTS?} bei Klick auf Bettellink", + 'ADMIN_BEG_USERID' => "Mitglied-Account zum Abbuchen der erbettelten {?POINTS?}", + 'ADMIN_SELECT_BEG_MODE' => "Vergütungsmodus der erbettelten {?POINTS?}", + 'BEG_MODE_DIRECT' => "Nur direktem Mitglied gutschreiben.", + 'BEG_MODE_REF' => "Auch dem Werber des Mitgliedes gutschreiben.", + 'BEG_SORRY_YOURE_LOGGED_IN_1' => "Oh schade! Sie haben vermutlich auf Ihren eigenen Bettel-Link mit der User-ID ", + 'BEG_SORRY_YOURE_LOGGED_IN_2' => " geklickt. Sie haben somit auch keine ", + 'BEG_SORRY_YOURE_LOGGED_IN_3' => " {?POINTS?} erhalten!", + 'BEG_SAME_UID_AS_OWN' => "Mitglieder-ID des Webmasters benutzt!", // Pay modes -define('ADMIN_BEG_PAY_MODE', "Wie sollen {?POINTS?} vergütet werden?"); -define('ADMIN_BEG_PAY_MODE_IMG', "Abgesichert durch ein 1x1-Pixel"); -define('ADMIN_BEG_PAY_MODE_JS', "Abgesichert durch ein Fake-JavaScript"); -define('ADMIN_BEG_PAY_MODE_BOTH', "Durch beides obriges absichern"); -define('ADMIN_BEG_PAY_MODE_NONE', "Keine Absicherung (unsicher)"); + 'ADMIN_BEG_PAY_MODE' => "Wie sollen {?POINTS?} vergütet werden?", + 'ADMIN_BEG_PAY_MODE_IMG' => "Abgesichert durch ein 1x1-Pixel", + 'ADMIN_BEG_PAY_MODE_JS' => "Abgesichert durch ein Fake-JavaScript", + 'ADMIN_BEG_PAY_MODE_BOTH' => "Durch beides obriges absichern", + 'ADMIN_BEG_PAY_MODE_NONE' => "Keine Absicherung (unsicher)", // More strings for beg link -define('BEG_LINK_PAY_BOTH_1', "Das Mitglied <strong>"); -define('BEG_LINK_PAY_BOTH_2', "</strong> hat bei Ihnen gerade <strong>"); -define('BEG_LINK_PAY_BOTH_3', " {?POINTS?}</strong> erbettelt. Dies war der <strong>"); -define('BEG_LINK_PAY_BOTH_4', ".</strong> Klick auf seinen Bettellink. Vielen Dank für Ihre Spende!"); + 'BEG_LINK_PAY_BOTH_1' => "Das Mitglied <strong>", + 'BEG_LINK_PAY_BOTH_2' => "</strong> hat bei Ihnen gerade <strong>", + 'BEG_LINK_PAY_BOTH_3' => " {?POINTS?}</strong> erbettelt. Dies war der <strong>", + 'BEG_LINK_PAY_BOTH_4' => ".</strong> Klick auf seinen Bettellink. Vielen Dank für Ihre Spende!", // Begging rallye -define('BEG_RANK', "Bettel-Rank"); -define('BEG_TOTAL', "Gesamt erbettelt"); -define('BEG_POINTS', "Erbettelt"); -define('BEG_MEMBER_TOTAL', "Erbettelte {?POINTS?} aller Mitglieder"); -define('ADMIN_BEG_TIMEOUT_1', "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am "); -define('ADMIN_BEG_TIMEOUT_2', "noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht!"); -define('ADMIN_EDIT_BEG_RALLYE_SETTINGS', "Einstellungen an der Bettel-Rallye"); -define('ADMIN_BEG_RALLYE_ACTIVE', "Ist die Bettel-Rallye aktiv? (Mails können optional versendet werden!)"); -define('ADMIN_BEG_RALLYE_ONLY_ACTIVE', "Nur aktive Mitglieder nehmen dran?<br /><div class=\"admin_note\">(Nur in Verbindung mit der Erweiterung <strong>autopurge</strong>!)</div>"); -define('ADMIN_BEG_NO_RALLYE', "Niemand nimmt an der Bettel-Rallye dran teil!"); -define('ADMIN_BEG_WITHDRAW_NOW', "Jetzt Vergütung Bettel-Rallye vergüten"); -define('ADMIN_BEG_WITHDRAW_NOTE', "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr!"); -define('ADMIN_BEG_WITHDRAW_PREPARED', "Vergütung der Bettel-Rallye vorbereitet."); -define('ADMIN_BEG_WINNER_HIGLIGHTED', "Mögliche Gewinner der Bettel-Rallye sind dick marktiert."); -define('ADMIN_BEG_ALREADY_WITHDRAW', "Manuelle Vergütungvorbereitung bereits betätigt!"); -define('BEG_RALLYE_NOTE', "Hinweis: Unter <strong>{--BEG_POINTS--}</strong> finden Sie Ihre gesamt erbettelten {?POINTS?} wieder!"); -define('BEG_RALLYE_CONDITIONS', "Wer alles an der Bettel-Rallye teilnehmen kann"); -define('BEG_RALLYE_CONDITION_1', "Es werden nur aktive und freigeschaltete Mitglieder berücksichtig."); -define('BEG_RALLYE_CONDITION_2', "Es kann jeder dran teilnehmen, der Mitglied bei diesem {?MT_WORD?} (<strong>{--MAIN_TITLE--}</strong>) und freigegeben ist."); -define('BEG_RALLYE_CONDITION_3', "Zur Erstellung des Rallye-Ergebnisses werden alle erbettelten {?POINTS?} berücksichtig."); -define('BEG_RALLYE_CONDITION_4', "Der Rechtsweg ist ausgeschlossen."); -define('BEG_MEMBER_HERE_IS_THE_LIST', "Hier finden Sie die aktuelle Liste mit den möglichen Gewinnern!"); -define('BEG_LINK_HERE', "Betteln Sie am Besten gleich los! Hier ist der Link dazu!"); -define('ADMIN_BEG_RANKS', "Anzahl Gewinner der Bettel-Rallye"); -define('BEG_MONTHLY_RALLYE', "GEWONNEN: Monatliche Bettel-Rallye"); -define('BEG_RALLYE_NO_ONE_JOINED', "Niemand nimmt an der Bettel-Rallye dran teil, oder sie ist administrativ deaktiviert worden!"); -define('ADMIN_BEG_RALLYE_DEACTIVATED', "Bettel-Rallye nicht aktiviert."); -define('ADMIN_EDIT_BEG_RALLYE_NOTIFICATIONS', "Benachrichtungen per Mail zur Bettel-Rallye"); -define('ADMIN_BEG_RAL_EN_NOTIFY', "Benachtigen, wenn Bettel-Rallye aktiviert wurde?"); -define('ADMIN_BEG_RAL_DI_NOTIFY', "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?"); -define('ADMIN_BEG_NOTIFY_BONUS', "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bettel-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unvergütete Benachrichtigung aussenden; nur in Verbindung mit der Erweiterung <strong>bonus!</strong>)</div>"); -define('ADMIN_BEG_NEW_MEMBER_NOTIFY', "Sollen neue Mitglieder mit selber Mail über eine laufende Bettel-Rallye benachrichtigt werden?"); -define('ADMIN_BEG_NOTIFY_WAIT', "Wie lange soll die Wartezeit der Bonus-Mail sein?"); -define('BEG_NO_LIMITATION', "Keine IP-Sperre eingerichtet!!!"); -define('ADMIN_BEG_INCLUDE_OWN', "Soll Ihre Mitglieder-ID an der Bettel-Rallye dran teilnehmen?"); + 'BEG_RANK' => "Bettel-Rank", + 'BEG_TOTAL' => "Gesamt erbettelt", + 'BEG_POINTS' => "Erbettelt", + 'BEG_MEMBER_TOTAL' => "Erbettelte {?POINTS?} aller Mitglieder", + 'ADMIN_BEG_TIMEOUT_1' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am ", + 'ADMIN_BEG_TIMEOUT_2' => "noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht!", + 'ADMIN_EDIT_BEG_RALLYE_SETTINGS' => "Einstellungen an der Bettel-Rallye", + 'ADMIN_BEG_RALLYE_ACTIVE' => "Ist die Bettel-Rallye aktiv? (Mails können optional versendet werden!)", + 'ADMIN_BEG_RALLYE_ONLY_ACTIVE' => "Nur aktive Mitglieder nehmen dran?<br /><div class=\"admin_note\">(Nur in Verbindung mit der Erweiterung <strong>autopurge</strong>!)</div>", + 'ADMIN_BEG_NO_RALLYE' => "Niemand nimmt an der Bettel-Rallye dran teil!", + 'ADMIN_BEG_WITHDRAW_NOW' => "Jetzt Vergütung Bettel-Rallye vergüten", + 'ADMIN_BEG_WITHDRAW_NOTE' => "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr!", + 'ADMIN_BEG_WITHDRAW_PREPARED' => "Vergütung der Bettel-Rallye vorbereitet.", + 'ADMIN_BEG_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Bettel-Rallye sind dick marktiert.", + 'ADMIN_BEG_ALREADY_WITHDRAW' => "Manuelle Vergütungvorbereitung bereits betätigt!", + 'BEG_RALLYE_NOTE' => "Hinweis: Unter <strong>{--BEG_POINTS--}</strong> finden Sie Ihre gesamt erbettelten {?POINTS?} wieder!", + 'BEG_RALLYE_CONDITIONS' => "Wer alles an der Bettel-Rallye teilnehmen kann", + 'BEG_RALLYE_CONDITION_1' => "Es werden nur aktive und freigeschaltete Mitglieder berücksichtig.", + 'BEG_RALLYE_CONDITION_2' => "Es kann jeder dran teilnehmen, der Mitglied bei diesem {?mt_word?} (<strong>{?MAIN_TITLE?}</strong>) und freigegeben ist.", + 'BEG_RALLYE_CONDITION_3' => "Zur Erstellung des Rallye-Ergebnisses werden alle erbettelten {?POINTS?} berücksichtig.", + 'BEG_RALLYE_CONDITION_4' => "Der Rechtsweg ist ausgeschlossen.", + 'BEG_MEMBER_HERE_IS_THE_LIST' => "Hier finden Sie die aktuelle Liste mit den möglichen Gewinnern!", + 'BEG_LINK_HERE' => "Betteln Sie am Besten gleich los! Hier ist der Link dazu!", + 'ADMIN_BEG_RANKS' => "Anzahl Gewinner der Bettel-Rallye", + 'BEG_MONTHLY_RALLYE' => "GEWONNEN: Monatliche Bettel-Rallye", + 'BEG_RALLYE_NO_ONE_JOINED' => "Niemand nimmt an der Bettel-Rallye dran teil, oder sie ist administrativ deaktiviert worden!", + 'ADMIN_BEG_RALLYE_DEACTIVATED' => "Bettel-Rallye nicht aktiviert.", + 'ADMIN_EDIT_BEG_RALLYE_NOTIFICATIONS' => "Benachrichtungen per Mail zur Bettel-Rallye", + 'ADMIN_BEG_RAL_EN_NOTIFY' => "Benachtigen, wenn Bettel-Rallye aktiviert wurde?", + 'ADMIN_BEG_RAL_DI_NOTIFY' => "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?", + 'ADMIN_BEG_NOTIFY_BONUS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bettel-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unvergütete Benachrichtigung aussenden; nur in Verbindung mit der Erweiterung <strong>bonus!</strong>)</div>", + 'ADMIN_BEG_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail über eine laufende Bettel-Rallye benachrichtigt werden?", + 'ADMIN_BEG_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?", + 'BEG_NO_LIMITATION' => "Keine IP-Sperre eingerichtet!!!", + 'ADMIN_BEG_INCLUDE_OWN' => "Soll Ihre Mitglieder-ID an der Bettel-Rallye dran teilnehmen?", // Task overview -define('ADMIN_TASK_LIST_BEG', "Bettel-Rallye-Teilnehmer"); -define('ADMIN_TASK_LIST_BEG_TITLE', "Es nehmen Mitglieder an der Bettel-Rallye dran teil!"); + 'ADMIN_TASK_LIST_BEG' => "Bettel-Rallye-Teilnehmer", + 'ADMIN_TASK_LIST_BEG_TITLE' => "Es nehmen Mitglieder an der Bettel-Rallye dran teil!", // Subject lines -define('BEG_RALLYE_EN_NOTIFY', "HINWEIS: Eine Bettel-Rallye ist am Laufen!"); -define('BEG_RALLYE_DI_NOTIFY', "HINWEIS: Eine Bettel-Rallye wurde gestoppt!"); + 'BEG_RALLYE_EN_NOTIFY' => "HINWEIS: Eine Bettel-Rallye ist am Laufen!", + 'BEG_RALLYE_DI_NOTIFY' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt!", +)); -// +// [EOF] ?> diff --git a/inc/language/birthday_de.php b/inc/language/birthday_de.php index eca354b50e..014b4ba67a 100644 --- a/inc/language/birthday_de.php +++ b/inc/language/birthday_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('HAPPY_BIRTHDAY', "Herzlichen Glueckwunsch zum Geburtstag!"); -define('ADMIN_CONFIG_BIRTHDAY_HEADER', "Einstellungen zu Geburtstagsmails"); -define('ADMIN_BIRTHDAY_POINTS', "{?POINTS?} als "Geburtstagsgeschenk""); -define('ADMIN_BIRTHDAY_POINTS_NOTE', "Wert <strong>0</strong> deaktiviert die Extragutschrift!"); -define('BIRTHDAY_CANNOT_STATUS', "Kann keine {?POINTS?} gutschreiben! Status Ihres Accounts: <span class=\"data\">%s</span>"); -define('BIRTHDAY_CANNOT_LOAD_DATA', "Entweder haben Sie bereits Ihr Geburtsgeschenk erhalten oder Sie haben heute keinen Geburtstag!"); -define('ADMIN_SELECT_BIRTHDAY_MODE', "Vergütungsmodus der {?POINTS?}"); -define('BIRTHDAY_MODE_DIRECT', "Nur direktem Mitglied gutschreiben."); -define('BIRTHDAY_MODE_REF', "Auch dem Werber des Mitgliedes gutschreiben."); -define('ADMIN_BIRTHDAY_ONLY_ACTIVE', "Nur aktive Mitglieder erhalten die Geburtstagsgutschrift?<br /><div class=\"admin_note\">(Nur in Verbindung mit der Erweiterung <strong>autopurge</strong>!)</div>"); +addMessages(array( + 'HAPPY_BIRTHDAY' => "Herzlichen Glueckwunsch zum Geburtstag!", + 'ADMIN_CONFIG_BIRTHDAY_HEADER' => "Einstellungen zu Geburtstagsmails", + 'ADMIN_BIRTHDAY_POINTS' => "{?POINTS?} als "Geburtstagsgeschenk"", + 'ADMIN_BIRTHDAY_POINTS_NOTE' => "Wert <strong>0</strong> deaktiviert die Extragutschrift!", + 'BIRTHDAY_CANNOT_STATUS' => "Kann keine {?POINTS?} gutschreiben! Status Ihres Accounts: <span class=\"data\">%s</span>", + 'BIRTHDAY_CANNOT_LOAD_DATA' => "Entweder haben Sie bereits Ihr Geburtsgeschenk erhalten oder Sie haben heute keinen Geburtstag!", + 'ADMIN_SELECT_BIRTHDAY_MODE' => "Vergütungsmodus der {?POINTS?}", + 'BIRTHDAY_MODE_DIRECT' => "Nur direktem Mitglied gutschreiben.", + 'BIRTHDAY_MODE_REF' => "Auch dem Werber des Mitgliedes gutschreiben.", + 'ADMIN_BIRTHDAY_ONLY_ACTIVE' => "Nur aktive Mitglieder erhalten die Geburtstagsgutschrift?<br /><div class=\"admin_note\">(Nur in Verbindung mit der Erweiterung <strong>autopurge</strong>!)</div>", +)); -// +// [EOF] ?> diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index 74972a60fd..e723c3878c 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,106 +38,108 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('BONUS_LOGIN_TOTAL', "Login-Bonus"); -define('BONUS_TURBO_TOTAL', "Aktiv-Bonus beim Best."); -define('ADMIN_EDIT_BONUS_SETTINGS', "Einstellungen an Vergütungen"); -define('ADMIN_BONUS_LOGIN_BONUS', "Bonus für Login"); -define('ADMIN_BONUS_TURBO_BONUS', "Rang-Bonus für Erst-Klicker"); -define('ADMIN_BONUS_TURBO_RATES', "Bonus für Klicker 2 bis x"); -define('ADMIN_BONUS_TURBO_RATES_NOTE1', "Hinweise"); -define('ADMIN_BONUS_TURBO_RATES_NOTE2', "Stellen Sie zuerst unter <strong>{--ADMIN_BONUS_TURBO_RANKS--}</strong> die Anzahl der Gewinner ein. Lassen Sie dabei den letzten Platz frei!"); -define('ADMIN_BONUS_TURBO_RATES_NOTE3', "Einträge löschen, um Bonus zu entfernen (alle unteren rücken beim Speichern nach!)"); -define('ADMIN_BONUS_TURBO_RATES_NOTE4', "Wenn Sie alle Einträge gelöscht haben, werden Platz 2 und 3 automatisch neu berechnet."); -define('ADMIN_CONFIG_LOGIN_TIMEOUT', "Zeitspanne zwischen zwei Logins"); -define('ADMIN_BONUS_TURBO_RANKS', "Wie viele Mitglieder sollen die monatliche Auszahlung der Aktiv-Vergütung gewinnen können?"); -define('ADMIN_BONUS_NO_ACTIVE_RALLYE', "Niemand nimmt an der Aktiv-Rallye dran teil!"); -define('BONUS_SHOW_TURBO_BONUS', "Sehen Sie hier nach, wer alles schon bestätigt hat..."); -define('BONUS_SHOW_WRONG_CALL', "Falscher Aufruf des Scriptes, bitte nur aus dem Bestätigungsframe aufrufen!"); -define('BONUS_SHOW_WRONG_TYPE', "Falscher Typ an das Script übergeben! Bitte melden Sie sich <a href=\"mailto:{?WEBMASTER?}\">beim Webmaster</a> !"); -define('BONUS_SHOW_NO_DATA', "Entweder haben Sie für diese Mail keine Aktiv-Vergütung erhalten oder der Link ist nicht mehr gültig."); -define('BONUS_NO_RANKS', "Es hat noch niemand {?POINTS?} zur Mail <span class=\"data\">%s</span> gewonnen! Sie könnten der erste sein! :-)"); -define('BONUS_LOGIN_TURBO_NOTE', "Der Login-, Referal-, Klickrate-, Mailbuchungs- und Bestätigungsbonus wird Ihnen nicht sofort vergütet, sondern erst am Ende jeden Monats in Form einer Aktiv-Rallye. Den Mailbuchungsbonus erhalten Sie erst bei Freischaltung Ihrer Mail auf das Bonus-Konto gutgeschrieben."); -define('BONUS_POINTS_TITLE', "Sonderbonus-{?POINTS?}"); -define('BONUS_RANK_YOU_ARE_NOT_FOUND', "Sie haben bis jetzt noch keine Aktiv-Vergütung erhalten!"); -define('BONUS_RANK', "Platz"); -define('BONUS_SHOW_HEADER_LINE_1', "Hier sehen Sie eine Übersicht, wer alles"); -define('BONUS_SHOW_HEADER_LINE_2', "für die Mail"); -define('BONUS_SHOW_HEADER_LINE_3', "erhalten hat"); -define('BONUS_SHOW_YOU_HAVE_CONFIRMED', "Sie haben diese Mail am"); -define('BONUS_SHOW_CONFIRMED_BONUS_IS', "Stelle bestätigt. Ihre Gutschrift für diese eMail"); -define('BONUS_TOTAL', "Gesamtbonus"); -define('BONUS_RALLYE_NO_ONE_JOINED', "Niemand nimmt an unserer Aktiv-Rallye dran teil. :-("); -define('BONUS_RALLYE_NOTE', "Bitte beachten Sie, dass Ihr Login-Bonus hier nicht mit angezeigt wird. Bei der monatlichen Auswertung wird er Ihnen jedoch gutgeschrieben."); -define('BONUS_RALLYE_CONDITIONS', "Wer alles an der Aktiv-Rallye teilnehmen kann"); -define('BONUS_START_CONFIRMING_MAILS', "Hier sind Ihre unbestätigten Mails..."); -define('BONUS_MEMBER_HERE_IS_THE_LIST', "Hier finden Sie die aktuelle Liste mit den möglichen Gewinnern!"); -define('BONUS_MONTHLY_ONLINE_BONUS', "Gewonnen: Monatliche Aktiv-Rallye"); -define('BONUS_TURBO_TOTAL2', "Aktiv-Bonus"); -define('ADMIN_BONUS_WITHDRAW_NOW', "Jetzt Aktiv-Bonus vergüten"); -define('ADMIN_BONUS_WITHDRAW_NOTE', "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr!"); -define('ADMIN_BONUS_WITHDRAW_PREPARED', "Vergütung des Aktiv-Bonuses vorbereitet."); -define('ADMIN_BONUS_WINNER_HIGLIGHTED', "Mögliche Gewinner der Aktiv-Rallye sind dick marktiert."); -define('ADMIN_BONUS_ALREADY_WITHDRAW', "Manuelle Vergütungvorbereitung bereits betätigt!"); -define('ADMIN_BONUS_TIMEOUT_1', "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am "); -define('ADMIN_BONUS_TIMEOUT_2', " noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht!"); -define('ADMIN_BONUS_USERID', "Mitgliedskonto zum Abbuchen der {?POINTS?}"); -define('ADMIN_CONFIG_BONUS_TIMEOUT', "Verweildauer von Aktiv-Bonus-Einträgen"); -define('ADMIN_BONUS_TURBO_LINES', "Anzahl angezeigter Aktiv-Bonus-Empfänger in <strong>show_bonus.php</strong>"); -define('ADMIN_SEND_BONUS_MAILS', "Versenden von Bonus-Mails"); -define('ADMIN_SEND_BONUS_NORMAL', "Text-Mail versenden"); -define('ADMIN_SEND_BONUS_HTML', "HTML-Mail versenden"); -define('ADMIN_SEND_BONUS_NORMAL_NOTES', "Standart Text-Mail an Ihre Mitglieder aussenden."); -define('ADMIN_SEND_BONUS_HTML_NOTES', "HTML-Mail an Ihre Mitglieder versenden. Dazu muss die Erweiterung html_mail jedoch installiert sein!"); -define('ADMIN_BONUS_ORDER_BONUS', "Bonus für eine Mailbuchung"); -define('ADMIN_BONUS_REF_BONUS', "Bonus für das Werben eines weiteren Mitgliedes"); -define('ADMIN_BONUS_STATS_BONUS', "Einmalige Bonus bei Erreichen von 100% Klickrate auf eine Mailbuchung (=<div class=\"tiny\">Statistik-Bonus</strong>)"); -define('ADMIN_BONUS_TURBO_BONUS_TITLE', "Bonus-{?POINTS?} für bestätigte Mails"); -define('ADMIN_BONUS_TURBO_TIMEOUT_TITLE', "Zeitabstände und Aufbewahrungszeiten"); -define('ADMIN_BONUS_TURBO_MISC_TITLE', "Sonstige Einstellungen zur Bonus-Erweiterung"); -define('BONUS_REF_TOTAL', "Referal-Bonus"); -define('BONUS_ORDER_TOTAL', "Mailbestellungsbonus"); -define('BONUS_STATS_TOTAL', "100%-Klickratebonus"); -define('BONUS_POINTS_DISABLED', "Aktiv-Rallye derzeit nicht aktiv."); -define('BONUS_MEMBER_STATS_SUBJECT', "Ihr Aktiv-Bonus wegen 100% Klickrate"); -define('BONUS_LOGIN_BONUS_ADDED', "Login-Bonus mit <u>%s {?POINTS?}</u> vergütet!"); -define('BONUS_LOGIN_BONUS_NOT_ADDED', "Login-Bonus nicht vergütet!"); -define('LIST_UNCONFIRMED_BONUS_LINKS', "Unbest. Bonus-Mail"); -define('ADMIN_BONUS_MAIL_ALREADY_DELETED', "Bonus-Mail bereits gelöscht!"); -define('ADMIN_ACTIVATE_BONUS_SETTINGS', "Einstellungen an der Aktiv-Rallye"); -define('BONUS_MEMBER_TOTAL', "Gesamtbonus aller teilnehmenden Mitglieder"); -define('ADMIN_BONUS_RALLYE_DEACTIVATED', "Aktiv-Rallye deaktiviert."); -define('ADMIN_BONUS_RALLYE_NOTIFTICATIONS', "Benachrichtigungen per Mail über Bonus-Rallye"); -define('ADMIN_BONUS_RALLYE_EN_NOTIFY', "Sollen die Mitglieder bei Aktivierung benachtichtigt werden?"); -define('ADMIN_BONUS_RALLYE_DI_NOTIFY', "Sollen die Mitglieder bei Deaktivierung benachtichtigt werden?"); -define('ADMIN_BONUS_RALLYE_NOTIFY_POINTS', "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bonus-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unvergütete Benachrichtigung aussenden)</div>"); -define('ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY', "Sollen neue Mitglieder mit selber Mail über eine laufende Bonus-Rallye benachrichtigt werden?"); -define('ADMIN_BONUS_RALLYE_NOTIFY_WAIT', "Wie lange soll die Wartezeit der Bonus-Mail sein?"); -define('ADMIN_BONUS_INCLUDE_OWN', "Soll Ihre Mitglieder-ID an der Aktiv-Rallye dran teilnehmen?"); -define('ADMIN_NOTIFCATION_TITLE', "Ausgesendete Benachrichtigungen"); -define('ADMIN_DELETE_NOTIFY_MAIL', "Obrige Benachrichtigung entfernen"); -define('ADMIN_NOTIFY_MAIL_ALREADY_DELETED', "Benachrichtigung bereits entfernt."); -define('ADMIN_NOTIFICATION_DELETED_TITLE', "Benachrichtigung entfernt"); +addMessages(array( + 'BONUS_LOGIN_TOTAL' => "Login-Bonus", + 'BONUS_TURBO_TOTAL' => "Aktiv-Bonus beim Best.", + 'ADMIN_EDIT_BONUS_SETTINGS' => "Einstellungen an Vergütungen", + 'ADMIN_BONUS_LOGIN_BONUS' => "Bonus für Login", + 'ADMIN_BONUS_TURBO_BONUS' => "Rang-Bonus für Erst-Klicker", + 'ADMIN_BONUS_TURBO_RATES' => "Bonus für Klicker 2 bis x", + 'ADMIN_BONUS_TURBO_RATES_NOTE1' => "Hinweise", + 'ADMIN_BONUS_TURBO_RATES_NOTE2' => "Stellen Sie zuerst unter <strong>{--ADMIN_BONUS_TURBO_RANKS--}</strong> die Anzahl der Gewinner ein. Lassen Sie dabei den letzten Platz frei!", + 'ADMIN_BONUS_TURBO_RATES_NOTE3' => "Einträge löschen, um Bonus zu entfernen (alle unteren rücken beim Speichern nach!)", + 'ADMIN_BONUS_TURBO_RATES_NOTE4' => "Wenn Sie alle Einträge gelöscht haben, werden Platz 2 und 3 automatisch neu berechnet.", + 'ADMIN_CONFIG_LOGIN_TIMEOUT' => "Zeitspanne zwischen zwei Logins", + 'ADMIN_BONUS_TURBO_RANKS' => "Wie viele Mitglieder sollen die monatliche Auszahlung der Aktiv-Vergütung gewinnen können?", + 'ADMIN_BONUS_NO_ACTIVE_RALLYE' => "Niemand nimmt an der Aktiv-Rallye dran teil!", + 'BONUS_SHOW_TURBO_BONUS' => "Sehen Sie hier nach, wer alles schon bestätigt hat...", + 'BONUS_SHOW_WRONG_CALL' => "Falscher Aufruf des Scriptes, bitte nur aus dem Bestätigungsframe aufrufen!", + 'BONUS_SHOW_WRONG_TYPE' => "Falscher Typ an das Script übergeben! Bitte melden Sie sich <a href=\"mailto:{?WEBMASTER?}\">beim Webmaster</a> !", + 'BONUS_SHOW_NO_DATA' => "Entweder haben Sie für diese Mail keine Aktiv-Vergütung erhalten oder der Link ist nicht mehr gültig.", + 'BONUS_NO_RANKS' => "Es hat noch niemand {?POINTS?} zur Mail <span class=\"data\">%s</span> gewonnen! Sie könnten der erste sein! :-)", + 'BONUS_LOGIN_TURBO_NOTE' => "Der Login-, Referal-, Klickrate-, Mailbuchungs- und Bestätigungsbonus wird Ihnen nicht sofort vergütet, sondern erst am Ende jeden Monats in Form einer Aktiv-Rallye. Den Mailbuchungsbonus erhalten Sie erst bei Freischaltung Ihrer Mail auf das Bonus-Konto gutgeschrieben.", + 'BONUS_POINTS_TITLE' => "Sonderbonus-{?POINTS?}", + 'BONUS_RANK_YOU_ARE_404' => "Sie haben bis jetzt noch keine Aktiv-Vergütung erhalten!", + 'BONUS_RANK' => "Platz", + 'BONUS_SHOW_HEADER_LINE_1' => "Hier sehen Sie eine Übersicht, wer alles", + 'BONUS_SHOW_HEADER_LINE_2' => "für die Mail", + 'BONUS_SHOW_HEADER_LINE_3' => "erhalten hat", + 'BONUS_SHOW_YOU_HAVE_CONFIRMED' => "Sie haben diese Mail am", + 'BONUS_SHOW_CONFIRMED_BONUS_IS' => "Stelle bestätigt. Ihre Gutschrift für diese eMail", + 'BONUS_TOTAL' => "Gesamtbonus", + 'BONUS_RALLYE_NO_ONE_JOINED' => "Niemand nimmt an unserer Aktiv-Rallye dran teil. :-(", + 'BONUS_RALLYE_NOTE' => "Bitte beachten Sie, dass Ihr Login-Bonus hier nicht mit angezeigt wird. Bei der monatlichen Auswertung wird er Ihnen jedoch gutgeschrieben.", + 'BONUS_RALLYE_CONDITIONS' => "Wer alles an der Aktiv-Rallye teilnehmen kann", + 'BONUS_START_CONFIRMING_MAILS' => "Hier sind Ihre unbestätigten Mails...", + 'BONUS_MEMBER_HERE_IS_THE_LIST' => "Hier finden Sie die aktuelle Liste mit den möglichen Gewinnern!", + 'BONUS_MONTHLY_ONLINE_BONUS' => "Gewonnen: Monatliche Aktiv-Rallye", + 'BONUS_TURBO_TOTAL2' => "Aktiv-Bonus", + 'ADMIN_BONUS_WITHDRAW_NOW' => "Jetzt Aktiv-Bonus vergüten", + 'ADMIN_BONUS_WITHDRAW_NOTE' => "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr!", + 'ADMIN_BONUS_WITHDRAW_PREPARED' => "Vergütung des Aktiv-Bonuses vorbereitet.", + 'ADMIN_BONUS_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Aktiv-Rallye sind dick marktiert.", + 'ADMIN_BONUS_ALREADY_WITHDRAW' => "Manuelle Vergütungvorbereitung bereits betätigt!", + 'ADMIN_BONUS_TIMEOUT_1' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am ", + 'ADMIN_BONUS_TIMEOUT_2' => " noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht!", + 'ADMIN_BONUS_USERID' => "Mitgliedskonto zum Abbuchen der {?POINTS?}", + 'ADMIN_CONFIG_BONUS_TIMEOUT' => "Verweildauer von Aktiv-Bonus-Einträgen", + 'ADMIN_BONUS_TURBO_LINES' => "Anzahl angezeigter Aktiv-Bonus-Empfänger in <strong>show_bonus.php</strong>", + 'ADMIN_SEND_BONUS_MAILS' => "Versenden von Bonus-Mails", + 'ADMIN_SEND_BONUS_NORMAL' => "Text-Mail versenden", + 'ADMIN_SEND_BONUS_HTML' => "HTML-Mail versenden", + 'ADMIN_SEND_BONUS_NORMAL_NOTES' => "Standart Text-Mail an Ihre Mitglieder aussenden.", + 'ADMIN_SEND_BONUS_HTML_NOTES' => "HTML-Mail an Ihre Mitglieder versenden. Dazu muss die Erweiterung html_mail jedoch installiert sein!", + 'ADMIN_BONUS_ORDER_BONUS' => "Bonus für eine Mailbuchung", + 'ADMIN_BONUS_REF_BONUS' => "Bonus für das Werben eines weiteren Mitgliedes", + 'ADMIN_BONUS_STATS_BONUS' => "Einmalige Bonus bei Erreichen von 100% Klickrate auf eine Mailbuchung (=<div class=\"tiny\">Statistik-Bonus</strong>)", + 'ADMIN_BONUS_TURBO_BONUS_TITLE' => "Bonus-{?POINTS?} für bestätigte Mails", + 'ADMIN_BONUS_TURBO_TIMEOUT_TITLE' => "Zeitabstände und Aufbewahrungszeiten", + 'ADMIN_BONUS_TURBO_MISC_TITLE' => "Sonstige Einstellungen zur Bonus-Erweiterung", + 'BONUS_REF_TOTAL' => "Referal-Bonus", + 'BONUS_ORDER_TOTAL' => "Mailbestellungsbonus", + 'BONUS_STATS_TOTAL' => "100%-Klickratebonus", + 'BONUS_POINTS_DISABLED' => "Aktiv-Rallye derzeit nicht aktiv.", + 'BONUS_MEMBER_STATS_SUBJECT' => "Ihr Aktiv-Bonus wegen 100% Klickrate", + 'BONUS_LOGIN_BONUS_ADDED' => "Login-Bonus mit <u>%s {?POINTS?}</u> vergütet!", + 'BONUS_LOGIN_BONUS_NOT_ADDED' => "Login-Bonus nicht vergütet!", + 'LIST_UNCONFIRMED_BONUS_LINKS' => "Unbest. Bonus-Mail", + 'ADMIN_BONUS_MAIL_ALREADY_DELETED' => "Bonus-Mail bereits gelöscht!", + 'ADMIN_ACTIVATE_BONUS_SETTINGS' => "Einstellungen an der Aktiv-Rallye", + 'BONUS_MEMBER_TOTAL' => "Gesamtbonus aller teilnehmenden Mitglieder", + 'ADMIN_BONUS_RALLYE_DEACTIVATED' => "Aktiv-Rallye deaktiviert.", + 'ADMIN_BONUS_RALLYE_NOTIFTICATIONS' => "Benachrichtigungen per Mail über Bonus-Rallye", + 'ADMIN_BONUS_RALLYE_EN_NOTIFY' => "Sollen die Mitglieder bei Aktivierung benachtichtigt werden?", + 'ADMIN_BONUS_RALLYE_DI_NOTIFY' => "Sollen die Mitglieder bei Deaktivierung benachtichtigt werden?", + 'ADMIN_BONUS_RALLYE_NOTIFY_POINTS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bonus-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unvergütete Benachrichtigung aussenden)</div>", + 'ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail über eine laufende Bonus-Rallye benachrichtigt werden?", + 'ADMIN_BONUS_RALLYE_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?", + 'ADMIN_BONUS_INCLUDE_OWN' => "Soll Ihre Mitglieder-ID an der Aktiv-Rallye dran teilnehmen?", + 'ADMIN_NOTIFCATION_TITLE' => "Ausgesendete Benachrichtigungen", + 'ADMIN_DELETE_NOTIFY_MAIL' => "Obrige Benachrichtigung entfernen", + 'ADMIN_NOTIFY_MAIL_ALREADY_DELETED' => "Benachrichtigung bereits entfernt.", + 'ADMIN_NOTIFICATION_DELETED_TITLE' => "Benachrichtigung entfernt", + 'ADMIN_NO_NOTIFICATIONS' => "Keine Benachrichtigungen gefunden.", // Switches -define('ADMIN_BONUS_RALLYE_IS_ACTIVE' , "Ist die Aktiv-Rallye aktiv?"); -define('ADMIN_BONUS_RALLYE_LOGIN_INCLUDE', "Login-Bonus in monatlicher Auswertung mit einschliessen?"); -define('ADMIN_BONUS_RALLYE_ORDER_INCLUDE', "Mailbuchungsbonus in monatlicher Auswertung mit einschliessen?"); -define('ADMIN_BONUS_RALLYE_STATS_INCLUDE', "Statistik-Bonus in monatlicher Auswertung mit einschliessen?"); -define('ADMIN_BONUS_RALLYE_CLICK_INCLUDE', "Mailbestätigungsbonus in monatlicher Auswertung mit einschliessen?"); -define('ADMIN_BONUS_RALLYE_REF_INCLUDE' , "Referal-Bonus in monatlicher Auswertung mit einschliessen?"); + 'ADMIN_BONUS_RALLYE_IS_ACTIVE' , "Ist die Aktiv-Rallye aktiv?", + 'ADMIN_BONUS_RALLYE_LOGIN_INCLUDE' => "Login-Bonus in monatlicher Auswertung mit einschliessen?", + 'ADMIN_BONUS_RALLYE_ORDER_INCLUDE' => "Mailbuchungsbonus in monatlicher Auswertung mit einschliessen?", + 'ADMIN_BONUS_RALLYE_STATS_INCLUDE' => "Statistik-Bonus in monatlicher Auswertung mit einschliessen?", + 'ADMIN_BONUS_RALLYE_CLICK_INCLUDE' => "Mailbestätigungsbonus in monatlicher Auswertung mit einschliessen?", + 'ADMIN_BONUS_RALLYE_REF_INCLUDE' , "Referal-Bonus in monatlicher Auswertung mit einschliessen?", // Header -define('MEMBER_MAIL_BONUS_DETAILS_TITLE_1', "Details zur Bonusmail <u>"); -define('MEMBER_MAIL_BONUS_DETAILS_TITLE_2', "</u>:"); + 'MEMBER_MAIL_BONUS_DETAILS_TITLE_1' => "Details zur Bonusmail <u>", + 'MEMBER_MAIL_BONUS_DETAILS_TITLE_2' => "</u>:", // Subject lines -define('BONUS_RALLYE_DI_NOTIFY', "HINWEIS: Aktiv-Rallye gestoppt!"); -define('BONUS_RALLYE_EN_NOTIFY', "HINWEIS: Aktiv-Rallye ist am Laufen!"); + 'BONUS_RALLYE_DI_NOTIFY' => "HINWEIS: Aktiv-Rallye gestoppt!", + 'BONUS_RALLYE_EN_NOTIFY' => "HINWEIS: Aktiv-Rallye ist am Laufen!", +)); -// +// [EOF] ?> diff --git a/inc/language/booking_de.php b/inc/language/booking_de.php index fb7224f3a0..9d8e9a3689 100644 --- a/inc/language/booking_de.php +++ b/inc/language/booking_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,12 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if -// +// Language strings +addMessages(array( +)); + +// [EOF] ?> diff --git a/inc/language/cache_de.php b/inc/language/cache_de.php index 66b9d18d02..63894b5008 100644 --- a/inc/language/cache_de.php +++ b/inc/language/cache_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,35 +38,37 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('CACHE_PROBLEMS_DETECTED', "Probleme mit dem Cache-Subsystem erkannt!"); -define('CACHE_CANNOT_LOAD', "Kann nicht Cache-Datei <strong><u>%s</u></strong> laden!"); -define('CACHE_CANNOT_INITIALIZE', "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen!"); -define('ADMIN_CACHE_STATS_TITLE', "Statistiken des Caching-Systems"); -define('ADMIN_CACHE_DB_HITS', "Zugriffe auf die Datenbank"); -define('ADMIN_CACHE_HITS', "Zugriffe auf den Cache"); -define('ADMIN_CACHE_PERCENTS', "Prozentual (*)"); -define('ADMIN_CACHE_NOTES', "(*): Sollten bei Ihnen die Prozente unter 50% liegen und Sie nicht vor September 2008 das Script *neu* installiert haben, so ist dies kein Grund zur Besorgnis. Im Normalfall sollten die Prozente seit eigenen Revisionen im September 2008 (R300+) über 50% liegen."); -define('ADMIN_TOTAL_HITS', "Gesamtzugriffe"); -define('CACHE_CANNOT_UNLINK', "Kann nicht die Cache-Datei <strong><u>%s</u></strong> vom Server entfernen!"); +addMessages(array( + 'CACHE_PROBLEMS_DETECTED' => "Probleme mit dem Cache-Subsystem erkannt!", + 'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><u>%s</u></strong> laden!", + 'CACHE_CANNOT_INITIALIZE' => "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen!", + 'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><u>%s</u></strong> vom Server entfernen!", // Administrative settings -define('ADMIN_CONFIG_CACHE_SETTINGS', "Caching-Einstellung"); -define('ADMIN_CACHE_ADMINS', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_admins</strong> beschleunigt werden?"); -define('ADMIN_CACHE_ACLS', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_admins_acls</strong> beschleunigt werden?"); -define('ADMIN_CACHE_EXTS', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_extensions</strong> beschleunigt werden?"); -define('ADMIN_CACHE_CONFIG', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> beschleunigt werden?"); -define('ADMIN_CACHE_MODREG', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> beschleunigt werden?"); -define('ADMIN_CACHE_REFDEPTH', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_refdepths</strong> beschleunigt werden?"); -define('ADMIN_CACHE_REFSYS', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_refsystem</strong> beschleunigt werden?"); -define('ADMIN_CACHE_FILTER', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_filter</strong> beschleunigt werden?"); -define('ADMIN_CACHE_THEMES', "Soll der Zugriff auf die Tabelle <strong>{!_MYSQL_PREFIX!}_themes</strong> beschleunigt werden?"); -define('ADMIN_CACHE_ADMIN_MENU', "Soll der Aufbau des Administratormenüs beschleunigt werden (EXPERIMENTELL!)?"); -define('ADMIN_CACHE_PATH', "Relativer Pfad für alle Cache-Dateien zum Pfad <strong>inc</strong>"); + 'ADMIN_CACHE_STATS_TITLE' => "Statistiken des Caching-Systems", + 'ADMIN_CACHE_DB_HITS' => "Zugriffe auf die Datenbank", + 'ADMIN_CACHE_HITS' => "Zugriffe auf den Cache", + 'ADMIN_CACHE_PERCENTS' => "Prozentual (*)", + 'ADMIN_CACHE_NOTES' => "(*): Sollten bei Ihnen die Prozente unter 50% liegen und Sie nicht vor September 2008 das Script *neu* installiert haben, so ist dies kein Grund zur Besorgnis. Im Normalfall sollten die Prozente seit eigenen Revisionen im September 2008 (R300+) über 50% liegen.", + 'ADMIN_TOTAL_HITS' => "Gesamtzugriffe", + 'ADMIN_CONFIG_CACHE_SETTINGS' => "Caching-Einstellung", + 'ADMIN_CACHE_ADMINS' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_admins</strong> beschleunigt werden?", + 'ADMIN_CACHE_ACLS' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_admins_acls</strong> beschleunigt werden?", + 'ADMIN_CACHE_EXTS' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_extensions</strong> beschleunigt werden?", + 'ADMIN_CACHE_CONFIG' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_config</strong> beschleunigt werden?", + 'ADMIN_CACHE_MODREG' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_mod_reg</strong> beschleunigt werden?", + 'ADMIN_CACHE_REFDEPTH' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_refdepths</strong> beschleunigt werden?", + 'ADMIN_CACHE_REFSYS' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_refsystem</strong> beschleunigt werden?", + 'ADMIN_CACHE_FILTER' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_filter</strong> beschleunigt werden?", + 'ADMIN_CACHE_THEMES' => "Soll der Zugriff auf die Tabelle <strong>{?_MYSQL_PREFIX?}_themes</strong> beschleunigt werden?", + 'ADMIN_CACHE_ADMIN_MENU' => "Soll der Aufbau des Administratormenüs beschleunigt werden (EXPERIMENTELL!)?", + 'ADMIN_CACHE_PATH' => "Relativer Pfad für alle Cache-Dateien zum Pfad <strong>inc</strong>", + 'ADMIN_CACHE_DB_STATS_DEACTIVATED' => "Datenbank-/Cache-Statistiken sind deaktiviert. Dies ist gut für die Performance.", +)); // [EOF] ?> diff --git a/inc/language/country_de.php b/inc/language/country_de.php index bb9b0a9c74..5ea8f46ab9 100644 --- a/inc/language/country_de.php +++ b/inc/language/country_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,31 +38,32 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_ADD_COUNTRY_CODE', "Ländercode hinzufügen"); -define('ADMIN_ENTER_COUNTRY_CODE', "Zweistelligen Lädercode eingeben (z.B. PL)"); -define('ADMIN_ENTER_COUNTRY_NAME', "Ländernamen eingeben (z.B. Polen)"); -define('ADMIN_COUNTRY_CODE_ACTIVE', "Soll der Ländercode angezeigt werden?"); -define('ADD_COUNTRY', "Land hinzufügen"); -define('ADMIN_COUNTRY_NO_CODES_SETUP', "Noch keine Ländercodes eingerichtet!"); -define('ADMIN_LIST_COUNTRIES', "Ländercodes auflisten"); -define('ADMIN_COUNTRY_CODE', "Code"); -define('ADMIN_COUNTRY_NAME', "Name"); -define('ADMIN_COUNTRY_STATUS', "Anzeigen?"); -define('ADMIN_COUNTRY_ALREADY', "Ländercode <span class=\"data\">%s</span> existiert bereits!"); -define('ADMIN_COUNTRY_ADDED', "Ländercode für Land <span class=\"data\">%s</span> hinzugefügt."); -define('ADMIN_COUNTRY_EDIT_NOW', "Ländercodes ändern"); -define('ADMIN_COUNTRY_DELETE_NOW', "Ländercodes löschen"); -define('ADMIN_COUNTRY_EDIT_TITLE', "Ländercodes ändern"); -define('ADMIN_COUNTRY_DELETE_TITLE', "Ländercodes löschen"); -define('ADMIN_COUNTRIES_MODIFIED', "Ländercode(s) geändert."); -define('ADMIN_COUNTRIES_REMOVED', "Ländercode(s) gelöscht."); -define('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK', "Weiter zur Länderauflistung..."); -define('COUNTRY_NOT_FOUND', "Land nicht gefunden!"); +addMessages(array( + 'ADMIN_ADD_COUNTRY_CODE' => "Ländercode hinzufügen", + 'ADMIN_ENTER_COUNTRY_CODE' => "Zweistelligen Lädercode eingeben (z.B. PL)", + 'ADMIN_ENTER_COUNTRY_NAME' => "Ländernamen eingeben (z.B. Polen)", + 'ADMIN_COUNTRY_CODE_ACTIVE' => "Soll der Ländercode angezeigt werden?", + 'ADD_COUNTRY' => "Land hinzufügen", + 'ADMIN_COUNTRY_NO_CODES_SETUP' => "Noch keine Ländercodes eingerichtet!", + 'ADMIN_LIST_COUNTRIES' => "Ländercodes auflisten", + 'ADMIN_COUNTRY_CODE' => "Code", + 'ADMIN_COUNTRY_NAME' => "Name", + 'ADMIN_COUNTRY_STATUS' => "Anzeigen?", + 'ADMIN_COUNTRY_ALREADY' => "Ländercode <span class=\"data\">%s</span> existiert bereits!", + 'ADMIN_COUNTRY_ADDED' => "Ländercode für Land <span class=\"data\">%s</span> hinzugefügt.", + 'ADMIN_COUNTRY_EDIT_NOW' => "Ländercodes ändern", + 'ADMIN_COUNTRY_DELETE_NOW' => "Ländercodes löschen", + 'ADMIN_COUNTRY_EDIT_TITLE' => "Ländercodes ändern", + 'ADMIN_COUNTRY_DELETE_TITLE' => "Ländercodes löschen", + 'ADMIN_COUNTRIES_MODIFIED' => "Ländercode(s) geändert.", + 'ADMIN_COUNTRIES_REMOVED' => "Ländercode(s) gelöscht.", + 'ADMIN_COUNTRY_ACTIVATION_NEXT_LINK' => "Weiter zur Länderauflistung...", + 'COUNTRY_404' => "Land nicht gefunden!", +)); -// +// [EOF] ?> diff --git a/inc/language/de.php b/inc/language/de.php index 9bcfb266ee..59dc26ca2b 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,1166 +38,1171 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Installation/setup -define('CONFIG_IS_WRITE_PROTECTED', "Die Konfigurationsdatei <strong>inc/cache/config-local.php</strong> ist schreibgeschützt. Bitte setzen Sie CHMOD 666 auf die Datei!"); -define('DUMMY_IS_WRITE_PROTECTED', "In dem Verzeichnis <strong>inc/</strong> kann keine Datei erzeugt werden. Bitte setzen Sie CHMOD 777 auf das Verzeichnis!"); -define('SECRET_IS_WRITE_PROTECTED', "In dem Verzeichnis <strong>inc/.secret/</strong> kann keine Datei erzeugt werden. Bitte setzen Sie CHMOD 777 auf das Verzeichnis oder probieren Sie auch 770 aus!"); - +addMessages(array( // Language constants -define('_TABLE', "Tabelle"); -define('_SIZE', "Größe"); -define('_STATUS', "Status"); -define('_SPACESAVED', "Freigegeben"); -define('_ORESULT', "Optimization Resultat"); -define('_OJETZT', "Jetzt freigegeben"); -define('_ONR', "Sie haben bereits "); -define('_ONRR', "mal die Tabellen optimiert"); -define('_OGESAMT', "KiloByte Gesamt optimiert"); -define('_WOPT', "wurde bereits optimiert"); -define('_OKOPT', "Optimiert!"); -define('LANG_DOWN_MAINTAINCE', "System wegen Wartungsarbeiten geschlossen!"); -define('LANG_MOD_REG_404', "Modul <span class=\"data\">%s</span> existiert nicht!"); -define('LANG_UNKNOWN_MODULE', "Unbekanntes Modul"); -define('META_YOUR_NAME_1', "Ihr Name hier"); -define('META_YOUR_NAME_2', "Ihr Name nochmal"); -define('META_DESCRIPTION', "Beschreibung Ihrer Webseite hier"); -define('META_KEYWORDS', "mailtausch, mailversand, kostenlos, kostenloser, mailexchange, werbemail, werbemailversand, exchange, werbepunkte, punkte, auktion, auktionen, umsonst, sms kostenlos, produkte, produktproben, gewinn, gewinnspiel, gratis sms, promotion, besucher, werbung, linkliste, geldverdienen, verdienen, traffic, hits"); -define('LANG_WARNING', "Warnung"); -define('DIE_CONFIG_CHANGED_YOU', "Sie haben Ihre Config-Datei editiert! Auf Wiedersehen..."); -define('DIE_RUN_INSTALL_MYSQL', "Bitte rufen Sie http://your-domain.com/install.php auf, um Ihre MySQL-Daten einzurichten!"); -define('WARN_NULL_PASSWORD', "Sie haben kein Passwort eingegeben! Bitte lesen Sie in der <strong>inc/cache/config-local.php</strong> nach, wie Sie diese Warnung abschalten können."); -define('FATAL_CONFIG_WRITABLE', "Ihre Datei inc/cache/config-local.php ist beschreibbar! Dies ist ein mögliches Sicherheitsrisiko!"); -define('FATAL_CANNOT_WRITE_CONFIG', "Kann Konfigurationsdaten nicht speichern, da ich keinen Schreibzugriff auf inc/cache/config-local.php habe!"); -define('FATAL_CANNOT_CREATE_TMP', "Kann eine temporäre Datei nicht erzeugen! Bitte setzen Sie CHMOD 777 auf Verzeichnis inc!"); -define('FATAL_ERROR', "Fataler Fehler"); -define('LANG_NO_RENDER_DIRECT', "Sie haben weder 'render' noch 'direct' als Ausgabe-Modus eingestellt!"); -define('INSTALLATION', "Installation des Scriptes"); -define('INSTALL_PROBLEMS_DETECTED', "Es wurden bei der Initialisierung des Installationsvorganges Probleme festgestellt!"); -define('FATAL_NO', "Fataler Fehler Nr. #"); -define('FATAL_CORRECT_ERRORS', "Kann nicht fortsetzen! Bitte korregieren Sie erst die obrigen Probleme und versuchen Sie es dann erneut!"); -define('YES', "Ja"); -define('NO', "Nein"); -define('RETURN_MYSQL_PAGE', "Zurück zu den MySQL-Einstellungen"); -define('INSTALL_FINALIZER_FAILED', "Während der Installation ist ein unerwarteter Fehler aufgetreten! Der Finalizer konnte die Installation nicht abschliessen!"); -define('INSTALL_MAYBE_DONE', "Die Installation ist möglicherweise abgeschlossen oder es ist ein unerwarteter Fehler aufgetreten!"); -define('INSTALL_FINISHED', "Die Installation ist abgeschlossen! :-)"); -define('INSTALL_FIN_SECU', "Sie sollten jetzt die Dateien <u>install.php</u> und <u>inc/install-inc.php</u> von Ihrem Server löschen. Dies ist zwar normalerweise nicht erforderlich, Sie sollten es aber dennoch tun, um die Sicherheit zusätzlich zu erhöhen."); -define('CONTINUE_ADMIN', "Weiter zum Administrationsbereich..."); -define('RUNTIME_PROBLEMS_DETECTED', "Laufzeit-Problem erkannt!"); -define('FATAL_INC_WRITABLE', "Das Verzeichnis inc ist beschreibbar! Bitte setzen Sie die Zugriffsrechte auf 755 oder 555."); -define('LANG_WRITE_FOOTER', "Scriptname, -version und -author anzeigen?"); -define('LANG_FRAMESET_ACTIVE', "Soll das Frameset aktiviert werden? (Wenn nein wird ein Table-Set aktiviert)"); -define('MYSQL_ERRORS', "Es sind MySQL-Fehler aufgetreten! Bitte korregieren Sie diese!"); -define('LANG_MOD_REG_UNKNOWN', "Der Return-Code <span class=\"data\">%s</span> ist unbekannt!"); -define('LANG_MOD_REG_LOCKED', "Das Modul <span class=\"data\">%s</span> wurde gesperrt!"); -define('ADMIN_NOT_REGISTERED', "Es ist noch kein Administrator-Account angelegt worden."); -define('ADMIN_REGISTER_NOW', "Legen Sie jetzt das Administrator-Account an:"); -define('ADMIN_LOGIN', "Geben Sie ein Administrator-Login ein"); -define('ADMIN_PASS', "Geben Sie das Passwort ein"); -define('CLEAR_FORM', "Nochmal eingeben"); -define('ADMIN_REG_SUBMIT', "Admin-Account erstellen"); -define('ADMIN_NO_LOGIN', "Sie haben keinen Loginnamen eingegeben!"); -define('ADMIN_NO_PASS', "Sie haben kein Passwort eingegeben!"); -define('ADMIN_SHORT_PASS', "Das Passwort ist zu kurz! Mindestens 4 Zeichen!"); -define('ADMIN_LOGIN_ALREADY_REG', "Das von Ihnen eingegebene Admin-Login existiert bereits!"); -define('ADMIN_REGISTER_FAILED', "Bei der Registrierung eines Admin-Accounts ist ein unerwarteter Fehler unterlaufen!"); -define('ADMIN_REGISTER_DONE', "Das Admin-Account wurde soeben erstellt. Sie können sich nun mit den eingegeben Login-Daten einloggen."); -define('ADMIN_CANNOT_COMPLETE', "Kann die Regsitrierung des Admin-Accounts nicht abschliessen!"); -define('ADMIN_LOGIN_NOW', "Sie können sich nun in den Administratorbereich einloggen.<br />Geben Sie dazu Ihren Admin-Login (nicht Mitglied-Login!) und das Passwort dazu ein."); -define('ENTER_ADMIN_LOGIN', "Administrator-Login"); -define('ENTER_ADMIN_PASS', "Passwort zum Admin-Account"); -define('ADMIN_LOGIN_SUBMIT', "Einloggen zum Admin-Bereich"); -define('WRONG_PASS', "Falsches Passwort!"); -define('ADMIN_NOT_FOUND', "Administrator-Account wurde nicht gefunden!"); -define('ADMIN_LOGIN_FAILED', "Einloggen in den Administrator-Bereich fehlgeschlagen!"); -define('CANNOT_REGISTER_SESS', "Konnte eine Sitzungsvariable nicht setzen! Vermutlich sind bei Ihnen Cookies deaktiviert."); -define('SELECT_TIMEOUT', "Gütigkeitsdauer des Auto-Logins"); -define('TIMEOUT_ONE_DAY', "1 Tag"); -define('TIMEOUT_TWO_DAYS', "2 Tage"); -define('TIMEOUT_THREE_DAYS', "3 Tage"); -define('TIMEOUT_ONE_WEEK', "1 Woche"); -define('TIMEOUT_TWO_WEEKS', "2 Wochen"); -define('TIMEOUT_ONE_MONTH', "1 Monat"); -define('TIMEOUT_HALF_YEAR', "1/2 Jahr"); -define('TIMEOUT_FULL_YEAR', "1 Jahr"); -define('ADMIN_LOGOUT_DONE', "Ausloggen aus dem Admin-Bereich abgeschlossen!"); -define('ADMIN_LOGOUT_FAILED', "Konnte nicht aus dem Admin-Bereich ausloggen! :-("); -define('ADMIN_RELOGIN_LINK', "Klicken Sie hier, um sich erneut einzuloggen."); -define('ADMIN_ACTION_404', "Das aufgerufe Admin-Modul <span class=\"data\">%s</span> ist zwar gültig, konnte aber nicht auf dem Server gefunden werden."); -define('ALREADY_INSTALLED', "Dieses Script ist bereits auf diesem Server installiert worden Bitte löschen Sie install.php inc/install-inc.php und install.sql von Ihrem Server! (Keine Sorge, Sie können es tun...)"); -define('ADMIN_MAIN_TITLE', "Willkommen zum Administrationsbereich"); -define('YOU_ARE_HERE', "Sie sind hier:"); -define('ID_SELECT', "ID:"); -define('DISPLAY_ACTION', "Aktion"); -define('DISPLAY_WHAT', "Unteraktion"); -define('DISPLAY_TITLE', "Titel"); -define('UNDO_SELECTIONS', "Auswahl zurücknehmen"); -define('EDIT_MENUS', "Menüs bearbeiten"); -define('DEL_MENUS', "Menüs löschen"); -define('EDIT_ADMIN_MENU', "Admin-Menüeinträge ändern"); -define('EDIT_MENU_1', "Es soll/sollen <strong>"); -define('EDIT_MENU_2', "</strong> Menüeintrag/-einträge geändert werden:"); -define('ENTRY_MODIFY', "Eintrag"); -define('SUBMIT_CHANGES', "Änderungen durchführen"); -define('ENTRY_404_1', "Eintrag <em>"); -define('ENTRY_404_2', "</em> wurde nicht gefunden!"); -define('EDIT_UNKNOWN_OKAY', "Es wurde eine unbekannte Aktion durchgeführt!"); -define('DEL_ADMIN_MENU', "Admin-Menüeinträge löschen"); -define('DEL_MENU_1', "Es soll/sollen <strong>"); -define('DEL_MENU_2', "</strong> Menüeintrag/-einträge gelöscht werden:"); -define('DEL_ENTRIES', "Einträge unwiederruflich löschen"); -define('EDIT_ACTION', "Aktionswert ändern"); -define('EDIT_WHAT', "Unteraktionswert ändern"); -define('EDIT_TITLE', "Linktitel ändern"); -define('ADMIN_ADD_MENU', "Menü hinzufügen"); -define('ENTER_TITLE', "Geben Sie den Linktitel zum neuen Menüpunkt ein"); -define('SELECT_PARENT_MENU', "Wählen Sie das übergeordnete Hauptmenü aus"); -define('IS_TOP_MENU', "Ist ein Hauptmenü"); -define('SELECT_WHAT_NAME', "Wählen Sie den passenden Suffix aus der Liste aus"); -define('ENTER_DESCR', "Geben Sie eine kurze aussagekräftige Beschreibung des Menüpunktes ein"); -define('SELECT_BELOW_MENU', "Wählen Sie den Menüpunkt aus, unterhalb dem der neue Punkt erscheinen soll"); -define('EDIT_DESCR', "Beschreibung ändern"); -define('CREATE_WHAT_FIRST', "Bitte erstellen Sie zuerst die what-xxxxx.php Datei. Dann können Sie sie hier auswählen."); -define('MENU_IS_VISIBLE', "Menüpunkt ist sichtbar"); -define('MENU_IS_ACTIVE', "Menüpunkt ist aktiviert"); -define('CREATE_ACTION_FIRST', "Bitte erstellen Sie zuerst die action-xxxxx.php Datei. Dann können Sie sie hier auswählen."); -define('IS_FIRST_MENU', "Ist das erste Hauptmenü"); -define('NO_DB_LINK', "Keine Verbindung zur Datenbank."); -define('NO_DB_LINK_SHUTDOWN', "Keine Verbindung zur Datenbank beim Schliessen der Verbindung."); -define('MYSQL_DATA_MISSING', "Die Konfiguration Ihrer Datenbankverbindung ist unnvollständig. Bitte in <strong>inc/cache/config-local.php</strong> mindestens den Hostnamen, Datenbanknamen und Login zur Datenbank eingeben."); -define('REGISTER_PERSONAL_DATA', "Persönliche Daten"); -define('REGISTER_CATEGORIES', "Interessengebiete"); -define('REGISTER_MISC', "Passwort, maximale Mails pro Tag etc."); -define('SURNAME', "Vorname"); -define('FAMILY_NAME', "Nachname"); -define('STREET_NR', "Straße + Hausnummer"); -define('COUNTRY', "Land"); -define('ZIP', "Postleitzahl"); -define('CITY', "Wohnort"); -define('ADDY', "Email-Adresse"); -define('BIRTHDAY', "Geburtstag (TT.MM.JJJJ)"); -define('PASS_1', "Passwort"); -define('PASS_2', "Passwortbestätigung"); -define('ADD_NEW_CATEGORY', "Neue Kategorie hinzufügen"); -define('ENTER_CATNAME', "Kategoriebezeichnung"); -define('SELECT_PARENT', "Unter welcher Kategorie soll diese eingeblendet werden?"); -define('IS_TOP_CATEGORY', "Ist oberste Kategorie"); -define('ADD_NEW_CAT', "Neue Kategorie dazufügen"); -define('CAT_IS_VISIBLE', "Kategorie wird eingeblendet?"); -define('CATEGORY_ADDED', "Kategorie wurde hinzugefügt"); -define('CATEGORY_ALREADY_EXISTS', "Kategorie existiert bereits!"); -define('EDIT_DEL_CATEGORIES', "Aufgelistete Kategorien bearbeiten / löschen"); -define('CATNAME', "Kategoriebezeichnung:"); -define('EDIT_CATS', "Kategorien bearbeiten"); -define('DEL_CATS', "Kategorien löschen"); -define('NO_CATEGORIES_VISIBLE', "Derzeit sind keine Kategorien anzeigbar!"); -define('MAX_RECEIVE', "Wie viel Mails sollen Ihre Mitglieder maximal empfangen können? Fügen Sie bitte mehrere Werte hinzu, damit sich die Mitglieder dies individuell einstellen können."); -define('ADD_MAX_RECEIVE', "Hinzufügen"); -define('SAVE_SETTINGS', "Einstellungen speichern"); -define('ENTER_MAX_VALUE', "Neuen Maximal-Wert (0 bis 9999)"); -define('ENTER_MAX_COMMENT', "Optionaler Hinweis (erscheint in Klammern hinter dem Wert!)"); -define('MAX_VALUE_SAVED', "Maximal-Wert gespeichert"); -define('MAX_VALUE_ALREADY', "Maximal-Wert existiert bereits!"); -define('EDIT_DEL_MAX_VALUES', "Maximal-Werte bearbeiten / löschen"); -define('MAX_VALUE', "Maximal zu empfangene Mails"); -define('MAX_COMMENT', "Hinweis zum Maximal-Wert"); -define('EDIT_MAX_V', "Bearbeiten"); -define('DEL_MAX_V', "Löschen"); -define('NO_MAX_VALUES', "Derzeit klappt die Anmeldung nicht, da Sie keine maximal zu empfangenen Mails einstellen können!"); -define('MAX_PER_DAY', "Maximale Mitgliedermails/Tag"); -define('PER_DAY', "Mails"); -define('REFID_BY', "Sie wurden geworben von"); -define('TERMS_OF_USAGE', "AGBs zustimmen und absenden"); -define('YOU_FINALIZE', "Sie haben es gleich geschafft!"); -define('AGREE_TO_THIS', "Stimmen Sie unseren [<a href=\"{?URL?}/modules.php?module=index&what=agb\" class=\"register_term\" target=\"_blank\">AGBs</a>] zu?"); -define('SUBMIT_REGISTER', "Anmeldedaten abschicken"); -define('HAVE_TO_AGREE', "Sie müssen unseren AGBs zustimmen, damit Sie an diesem {?MT_WORD?} teilnehmen können!"); -define('ENTER_BOTH_PASSWORDS', "Bitte geben Sie ein Passwort und das selbe Passwort noch einmal ein!"); -define('ENTER_PASS1', "Bitte geben Sie ein Passwort ein!"); -define('ENTER_PASS2', "Bitte geben Sie noch die Bestätigung Ihres Passwortes ein!"); -define('ENTER_EMAIL', "Bitte geben Sie Ihre Email-Adresse ein! Diese muss auch erreichbar sein!"); -define('ENTER_SURNAME', "Bitte geben Sie Ihren Vornamen ein!"); -define('ENTER_FAMILY', "Bitte geben Sie Ihren Nachnamen ein!"); -define('EDIT_SECURITY_SETTINGS', "Ändern von sicherheits-relevanten Einstellungen"); -define('MIN_PASS_LENGTH', "Minimale Passwortlänge"); -define('SETTINGS_NOT_SAVED', "Einstellungen NICHT gespeichert / geändert!"); -define('SETTINGS_SAVED', "Einstellungen gespeichert."); -define('FATAL_CANNOT_LOAD_CONFIG', "Kann die Konfigurationsdaten nicht laden! Vermutlich richtet der Webmaster diesen {?MT_WORD2?} gerade das Script erst ein! Bitte schauen Sie später noch einmal vorbei!"); -define('ADMIN_ACTION_INVALID', "Die action/what-Kombination <span class=\"data\">%s</span> ist ungültig!"); -define('SHORT_PASS', "Das eingegebene Passwort ist nach unseren Sicherheitseinstellungen zu kurz. Mindestlänge ist"); -define('EDIT_POINTS_SETTINGS', "Ändern der Willkommensgutschrift und anderer {?POINTS?}"); -define('POINTS_REGISTER', "Willkommensgutschrift"); -define('POINTS_REF', "Einmalige Referal-Gutschrift"); -define('EDIT_REGFORM_SETTINGS', "Einstellungen am Anmeldeformular"); -define('LEAST_CATS', "Mindestens auszuwählende Kategorieanzahl"); -define('CATS_LEAST', "Bitte wählen Sie mehr Kategorien aus! Minimum ist: %s"); -define('EMAIL_ALREADY_DB', "Sie haben sich bereits mit dieser Email-Adresse angemeldet, oder jemand anderes verwendet Ihre. Doppelte Anmeldungen sind bei uns verboten."); -define('REJECT_DOUBLE_EMAIL', "Doppelt angemeldete Email-Adressen ablehnen?"); -define('REJECT_DOUBLE_PASS', "Gleiche Passwörter bei der Anmeldung ablehnen? (Wird nicht angezeigt!)"); -define('ADMIN_EDIT_POINTS', "Willkommensgutschrift und andere Festbeträge editieren"); -define('ADMIN_EDIT_REFDEPTHS', "Referal-Ebenen editieren / löschen / hinzufügen"); -define('ADD_NEW_REFDEPTH', "Neue Referal-Ebene hinzufügen"); -define('ADD_DEPTH', "Referal-Ebene hinzufügen"); -define('ENTER_REF_LVL', "Referal-Ebene"); -define('ENTER_REF_PERCENTS', "Prozentuale Vergütung"); -define('EDIT_DEL_REFDEPTH', "Referal-Ebenen editieren / löschen"); -define('REF_LEVEL', "Referal-Ebene"); -define('REF_PERCENT', "Prozentuale Vergütung"); -define('EDIT_LVL', "Ref-Ebene editieren"); -define('DEL_LVL', "Ref-Ebene löschen"); -define('HELLO', "Hallo"); -define('GUEST_YOU_REGISTERED_WITH_US', "vielen Dank, dass Sie sich für unseren {?MT_WORD?} entschieden haben! Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns!"); -define('GUEST_YOUR_PERSONA_DATA', "Hier sind nochmals zur Überprüfung Ihre persönlichen Daten"); -define('GUEST_SURNAME', "Vorname"); -define('GUEST_FAMILY', "Nachname"); -define('GUEST_STREET_NR', "Straße und Hausnummer"); -define('GUEST_COUNTRY', "Ländercode"); -define('GUEST_ZIPCODE', "Postleitzahl"); -define('GUEST_CITY', "Wohnort"); -define('GUEST_ADDY', "Email-Adresse"); -define('GUEST_BIRTHDAY', "Geburtsdatum"); -define('GUEST_REF', "Geworben von"); -define('GUEST_YOUR_REFLINK', "Hier ist Ihr persönlicher Referal-Link, mit dem Sie bereits jetzt schon neue Mitglieder werben können:"); -define('GUEST_CONFIRM_LINK', "Ihr Bestätigungslink"); -define('ADMIN_GUEST_REGISTERED_WITH_US', "Ein Gast hat sich soeben bei uns angemeldet."); -define('ADMIN_GUEST_PERSONA_DATA', "Hier sind zur Überprüfung nochmals seine persönlichen Daten"); -define('ADMIN_NEW_ACCOUNT', "Neue Anmeldung zu Ihrem {?MT_WORD?}"); -define('REGISTRATION_DONE', "Vielen Dank für die Anmeldung. Ein Bestätigungslink ist zur angemeldeten EMail-Adresse unterwegs!"); -define('GUEST_404_WHAT', "Das angegeben Menümodul <span class=\"data\">%s</span> existiert leider nicht, oder dieses Script hat einen Fehler gemacht!"); -define('GUEST_LOCKED_ACTION', "Aktionsmodul <span class=\"data\">%s</span> wurde gesperrt!"); -define('FATAL_REPORT_ERRORS', "Es wurde ein Problem während der Abarbeitung von Anweisungen festgestellt. Wenn ein Modul gesperrt sein sollte, so wird vermutlich gerade dran gearbeitet, anderfalls melden Sie sich bitte bei uns!"); -define('TEMPLATE_404', "Template nicht gefunden!"); -define('EDIT_GUEST_MENU', "Gästemenü bearbeiten"); -define('EDIT_MEMBER_MENU', "Mitgliedsmenü bearbeiten"); -define('DEL_GUEST_MENU', "Gästemenü löschen"); -define('DEL_MEMBER_MENU', "Mitgliedsmenü löschen"); -define('GUEST_PASSWORD', "Ihr Passwort"); -define('GUEST_THANX_CONFIRMATION', "Sie haben soeben Ihre Email-Adresse bestätigt und sind somit für den {?MT_WORD?} {?MAIN_TITLE?} freigeschaltet!"); -define('GUEST_MAY_LOGIN_HERE', "Sie können sich nun hier einloggen:"); -define('HAPPY_MAILING', "Wir wünschen Ihnen viel Spass und Erfolg beim Mail-Versand!\n\nMit freundlichem Gruss,"); -define('GUEST_THANX_CONFIRM', "Email-Adresse bestätigt"); -define('GUEST_CONFIRMED_TWICE', "Sie haben bereits Ihre Email-Adresse bestätigt oder Ihr Account ist derzeit gesperrt."); -define('TOP', "Nach oben"); -define('YOUR_LOGIN', "Ihre Login-ID lautet"); -define('LOGIN_URL', "URL zum Login"); -define('GUEST_WELCOME_MEMBER', "Willkommen zum Login-Bereich für Mitglieder"); -define('GUEST_ENTER_LOGIN', "Login-ID"); -define('GUEST_ENTER_PASSWORD', "Passwort"); -define('LOGIN_SUBMIT', "Einloggen"); -define('GUEST_GET_NEW_PASS', "Neues Passwort zuschicken"); -define('GUEST_ENTER_EMAIL', "Angemeldete Email-Adresse"); -define('NEW_PASSWD', "Jetzt zuschicken!"); -define('GUEST_WRONG_ID_EMAIL', "Konnte Account-Daten nicht auffinden! Vermutlich haben Sie eine falsche Login-ID oder Email-Adresse eingegeben! Bitte probieren Sie es nochmal!"); -define('GUEST_NEW_PASS_1', "Sie oder ein anderes Mitglied"); -define('GUEST_NEW_PASS_2', "haben soben ein neues Passwort angefordert. Hier ist Ihr neues Passwort:"); -define('YOUR_NEW_PASS', "Neues Passwort"); -define('GUEST_NOT_THIS_REPORT', "Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns!\n\nMit freundlichem Gruss,"); -define('GUEST_NEW_PASSWORD', "Ihre Passwortanfrage"); -define('LOGIN_UNKNOWN_CODE', "Unbekannter Rückgabewert!"); -define('LOGIN_WRONG_PASS', "Falsches Passwort eingegben!"); -define('LOGIN_WRONG_ID', "Die Login-ID ist nicht mehr gültig!"); -define('LOGIN_ID_LOCKED', "Ihr Account wurde gesperrt!"); -define('LOGIN_ID_UNCONFIRMED', "Bitte bestätigen Sie erst Ihre Email-Adresse!<br />Haben Sie den Bestätigungslink verloren? Links im Menü können Sie ihn erneut anfordern."); -define('LOGIN_NO_COOKIES', "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt!"); -define('GUEST_REG_POINTS_1', "Für Ihre Anmeldung haben wir Ihnen als Willkommensgutschrift"); -define('GUEST_REG_POINTS_2', "{?POINTS?} gutgeschrieben. Sie können bereits jetzt schon Mails an die anderen Mitglieder verschicken - solange Empfänger auch erreichbar sind."); -define('GUEST_SELECT_LIFETIME', "Wie lange soll Auto-Login aktiv sein?"); -define('LIFE_CLOSE_BROWSER', "Browser wurde geschlossen"); -define('LIFE_HOURS', "Stunde(n)"); -define('LIFE_DAYS', "Tag(e)"); -define('LIFE_WEEKS', "Woche(n)"); -define('LIFE_MONTHS', "Monat(e)"); -define('LIFE_YEARS', "Jahr(e)"); -define('MODULE_MEM_ONLY', "Auf das ausgewählte Modul <span class=\"data\">%s</span> dürfen nur eingeloggte Mitglieder zugreifen!"); -define('MEMBER_404_ACTION', "Das Mitgliedsaktionsmodul <span class=\"data\">%s</span> ist nicht auffindbar!"); -define('_GUEST', "Gast"); -define('_UNKNOWN', "Name ist nicht ladbar"); -define('_ADMIN', "Administrator"); -define('_ADMIN_SHORT', "Admin"); -define('LAST_ONLINE', "Sie waren als letztes Online am"); -define('LAST_MODULE', "Ihr zuletzt ausgewähltes Modul"); -define('MEMBER_EDIT_PROFILE', "Profildaten ändern"); -define('GENDER', "Geschlecht"); -define('GUEST_GENDER', "Geschlecht"); -define('GENDER_M', "Herr"); -define('GENDER_F', "Frau"); -define('GENDER_C', ""Firma""); -define('SAVE_CHANGES', "Änderungen speichern"); -define('MYDATA_NOTE', "Geben Sie nur bei <strong>Passwort</strong> Ihr aktuelles Passwort ein, wenn Sie nur Daten ändern wollen. Geben Sie bei <strong>Passwortbestätigung</strong> das neue Passwort erneut ein, wenn Sie Ihr aktuelles Passwort ändern wollen."); -define('MEMBER_UPDATE_PWD_WRONG', "Bitte geben Sie Ihr aktuelles Passwort zum Ändern Ihrer Einstellungen ein. Wir haben dies zur Sicherheit unserer Mitglieder eingebaut."); -define('MEMBER_UPDATE_FAILED', "Bei der Aktualisierung Ihres Kontos ist ein Fehler entstanden. Es wurden keine Daten aktualisiert."); -define('MEMBER_HAVE_CHANGED_DATA', "Sie haben heute Ihr Mitgliedsprofil geändert."); -define('YOUR_NEW_DATA', "Hier sind Ihre neuen Profildaten"); -define('PLEASE_NOTIFY_ABUSE_MYDATA', "Sollten Sie diese änderungen nicht durchgeführt haben, benachrichten Sie uns bitte! ({?WEBMASTER?})"); -define('MEMBER_UNKNOWN_MODE', "Unbekannter Modus erkannt"); -define('MEMBER_CHANGED_EMAIL', "Sie haben Ihre Email-Adresse geändert! Alte Adresse war"); -define('MEMBER_CHANGED_PASS', "Sie haben Ihr Passwort geändert."); -define('MEMBER_CHANGED_DATA', "änderung Ihrer Profildaten"); -define('MYDATA_MAIL_SENT', "Es ist eine Email zu Ihnen unterwegs."); -define('ADMIN_CHANGED_DATA', "Profildaten geaendert"); -define('ADMIN_MEMBER_CHANGED_PROFILE', "Eines Ihrer Mitglieder hat seine Profildaten geändert!"); -define('MEMBER_UID', "Seine Login-ID lautet"); -define('LOGOUT_DONE', "Ausloggen abgeschlossen!"); -define('LOGOUT_FAILED', "Ausloggen fehlgeschlagen!"); -define('MEMBER_NO_CATS', "Es wurden bis jetzt noch keine Kategorien eingerichtet!"); -define('SELECT_CAT', "Mails aus Kategorie empfangen?"); -define('MEMBER_CATS_SAVED', "Kategorien gespeichert."); -define('YOUR_PERSONAL_REFLINK', "Ihr persönlicher Ref-Link zum Werben neuer Mitglieder lautet"); -define('YOUR_REFCLICKS', "Klicks auf Ihren Referal-Link"); -define('CLICKS', "Klicks"); -define('YOU_REFERRAL_ONE', "Sie haben heute ein neues Mitglied für unseren {?MT_WORD?} geworben!\n\nHier sehen Sie genau, in welcher Ebene Sie ihn geworben haben:"); -define('YOU_THANX_REFERRAL', "Sie werden nun auch weiterhin {?POINTS?} über diese geworbene Person erhalten.\n\nVielen Dank für Ihr Mitwerben! Wir wünschen Ihnen noch weiterhin viele neue Referals!\n\nMit freundlichem Gruss,"); -define('POINTS_REF_REGISTER', "Referal-Pauschale und prozentual vom Anmeldebonus!"); -define('NO_REFLEVEL_LEFT', "Keine Referal-Ebenen mehr verfügbar! Bitte melden Sie sich bei uns."); -define('ENGINE', "{?MT_WORD?}-Engine"); -define('ADD_NEW_PAYMENT', "Neue Mailvergütung hinzufügen"); -define('ENTER_PAY_TIME', "Wartezeit"); -define('ENTER_PAY_PAYMENT', "Vergütete {?POINTS?}"); -define('ENTER_PAY_PRICE', "{?POINTS?}-Kosten"); -define('ENTER_PAY_TITLE', "Mailname"); -define('ADD_PAYMENT', "Mailvergütung hinzufügen"); -define('EDIT_DEL_PAYMENT', "Mailvergütung editieren / löschen"); -define('PAY_TIME', "Wartezeit"); -define('PAY_PAYMENT', "Vergütete {?POINTS?}"); -define('PAY_PRICE', "{?POINTS?}-Kosten"); -define('PAY_TITLE', "Mailname"); -define('EDIT_PAY', "Editeren"); -define('DEL_PAY', "Löschen"); -define('ADD_NEW_REFBANNER', "Neuen Banner hinzufügen"); -define('ENTER_URL', "Banner-URL"); -define('ENTER_ALTERNATE', "Alternativen Text"); -define('SELECT_VISIBLE', "Ist der Banner aktiv?"); -define('ADD_REFBANNER', "Banner hinzufügen"); -define('EDIT_DEL_REFBANNER', "Werbebanner editieren / löschen"); -define('VIEWS', "Views"); -define('REF_URL', "Banner"); -define('REF_TITLE', "Alternativer Text"); -define('REF_CNTR', "Views"); -define('REF_VIS', "Aktiv?"); -define('POINTS_USED', "Verbrauchte {?POINTS?}"); -define('MEMBER_NO_POINTS', "Sie haben keine {?POINTS?} mehr zum Versenden übrig!"); -define('MEMBER_NO_PAYMENTS', "Der Admin diesen {?MT_WORD2?} hat noch keine Mailarten definiert!"); -define('MEMBER_POINTS_LEFT', "{?POINTS?}-Guthaben zum Mailversand übrig"); -define('SELECT_MAIL_TYPE', "Mailart auswählen"); -define('PLEASE_SELECT', "Bitte auswählen"); -define('PER_MAIL', "{?POINTS?} / Mail"); -define('PAYMENT', "{?POINTS?} Vergütung"); -define('SELECT_CATEGORY', "Zielkategorie"); -define('USER_IN_CAT', "Empfänger"); -define('ENTER_RECEIVER', "Empfängeranzahl"); -define('ENTER_SUBJECT', "Betreffzeile"); -define('ENTER_TEXT', "Werbetext"); -define('MEMBER_PLEASE_NOTE', "Bitte beachten Sie vor dem Absenden:"); -define('MEMBER_ENTER_URL', "URL"); -define('CONTINUE_FRAMETESTER', "Weiter zum Framekiller-Test"); -define('MEMBER_URL_TIME_LOCK', "Sie hatten bereits die selbe URL gebucht:"); -define('MEMBER_LAST_TLOCK', "Ihre letzte Buchung war am"); -define('CONFIG_URL_TLOCK', "Selbe URLs sind buchbar in"); -define('_AND', "und"); -define('UNKNOWN_CODE', "Es ist während der Ausführung ein unbekannter Fehler-Code <span class=\"data\">%s</span> enstanden, für den Sie vermutlich nicht verantwortlich sind. Bitte informieren Sie uns über diese Meldung!"); -define('MEMBER_TEXT_CONTAINS_URL', "Ihr Werbetext enthält eine URL, dies ist in unserem {?MT_WORD?} nicht zulässig. Bitte entfernen Sie diese aus Ihrem Text und versuchen Sie es erneut."); -define('MEMBER_TEXT_OVERLENGTH', "Ihr Text hat die maximale Textlänge überschritten. Bitte fassen Sie ihn etwas kürzer."); -define('MEMBER_SUBJ_CONTAINS_URL', "Ihre eingegebe Betreffzeile enthält eine URL, dies ist in unserem {?MT_WORD?} nicht zulässig. Bitte entfernen Sie diese aus Ihrer Betreffzeile und versuchen Sie es erneut."); -define('MEMBER_URL_BLACK_LISTED', "Ihre eingegebene URL wurde in unsere Ausschlussliste aufgenommen!"); -define('MEMBER_BLIST_TIME', "Datum der Sperrung war"); -define('MEMBER_SELECTED_MORE_RECS', "Sie haben für diese Kategorie zu viele Empfänger eingegeben!"); -define('MEMBER_GO_BACK', "Zurück zum Buchungsformular"); -define('MEMBER_DO_ORDER', "Mailbuchung so aufgeben!"); -define('LOADER_NOT_WORKING', "Falls die Weiterleitung nicht automatisch in einer Sekunde klappen sollte,"); -define('LOADER_CLICK_HERE', "so kommen Sie hier zur externen Seite weiter"); -define('ADMIN_NEW_MAIL_IN_QUEUE', "Ein Mitglied hat soeben eine Mailbuchung durchgeführt!\n\nSeine Buchung befindet sich nun im Sende-Pool und wird automatisch in 100-Mail-Bloecken versand.\n\nHier sind nochmals seine Daten, gebuchter Text und URL zur Verifizierung"); -define('ADMIN_SECOND_MAIL', "Sie werden bald nochmals benachrichtig, sobald der Versand vollstaendig beendet wurde."); -define('_CATEGORY_404', "Kategorie nicht gefunden!"); -define('_PAYMENT_404', "Payment-Typ nicht gefunden!"); -define('ORDERED_CATEGORY', "Gebuchte Kategorie"); -define('MEMBER_MAILTYPE', "Gebuchter Payment-Typ"); -define('MEMBER_SUBJECT', "Betreffzeile in den Mails"); -define('MEMBER_URL', "Gebuchte URL"); -define('MEMBER_NEW_MAIL_IN_QUEUE', "Ihre Mailbuchung befindet sich derzeit in Warteschleife und wird bald ausgesendet!\n\nHier sind nochmals Ihre Daten aus dem Buchungsformular"); -define('MEMBER_SECOND_MAIL', "Sobald Ihre Mailbuchung vollständig gesendet wurde, erhalten Sie eine zweite Mail! Sie können bereits eine weitere Mailbuchung durchführen!"); -define('ADMIN_NEW_QUEUE', "Mailbuchung in Ihrem {?MT_WORD?}"); -define('MEMBER_NEW_QUEUE', "Vielen Dank fuer die Mailbuchung!"); -define('MEMBER_CONTINUE_AREA', "Weiter zum Mitgliedsbereich"); -define('MEMBER_THANX_ORDER', "Vielen Dank für Ihre Mailbuchung! Es ist eine Mail zu Ihnen unterwegs."); -define('ADMIN_NO_MAILS_IN_POOL', "Es wurden noch keine Mailbuchungen aufgegeben, kann somit keine Mails anzeigen!"); -define('ADMIN_POOL_CONTENT', "Mailbuchungen im Sende-Pool"); -define('POOL_TYPE_UNKNOWN', "Unbekannt (%s)"); -define('POOL_TYPE_TEMP', "Neuer Auftrag"); -define('POOL_TYPE_SEND', "Gesendet"); -define('POOL_TYPE_NEW', "Wartet auf Versand"); -define('POOL_TYPE_ACTIVE', "Wird versendet"); -define('POOL_TYPE_ADMIN', "Wartet auf Freischaltung"); -define('EMAIL_ID', "Email-ID"); -define('EMAIL_SENDER', "Versender"); -define('EMAIL_SUBJECT', "Betreffzeile"); -define('EMAIL_TEXT', "Gebuchter Text"); -define('EMAIL_PAYMENT', "Mailart"); -define('EMAIL_CATEGORY', "Gebuchte Kategorie"); -define('EMAIL_RECEIVERS', "Anzahl Empfänger"); -define('EMAIL_RUIDS', "User-IDs"); -define('EMAIL_POOL_TYPE', "Derzeitiger Status"); -define('EMAIL_TSEND', "Noch zu sendene Mails"); -define('EMAIL_URL', "Beworbene URL"); -define('EMAIL_TYPE', "Sendestatus"); -define('EMAIL_ZIP', "PLZ"); -define('EMAIL_TIME', "Mindestaufenthalt"); -define('EMAIL_IS_NOTIFY', "Vergütete Benachrichtigungsmail?"); -define('ADMIN_TEST_URL', "URL testen"); -define('EMAIL_TIMESTAMP', "Gebucht am"); -define('GUEST_FRAMETESTER_TOP', "Sollte dieser Text verschwinden, enthält Ihre Webseite einen Frame-Killer!"); -define('ADMIN_SELECT_EMAIL_EDIT', "Email auswählen, um diese zu editieren"); -define('RESET_SELECT', "Auswahl zurücknehmen"); -define('ADMIN_EDIT_EMAIL', "Mailbuchung bearbeiten"); -define('ADMIN_CHANGE_EMAIL', "Änderungen speichern"); -define('EDIT_URL', "URL bearbeiten"); -define('EMAIL_EDIT_SUBJ', "Betreff bearbeiten"); -define('EMAIL_EDIT_TEXT', "Werbetext bearbeiten"); -define('ADMIN_UNLOCK_EMAILS', "Neue Mailbuchungen freischalten"); -define('EMAIL_ACCEPT', "Annehmen"); -define('EMAIL_REJECT', "Ablehnen und umleiten"); -define('CANNOT_RE_REGISTER_SESS', "Kann Sitzungs-Cookies nicht doppelt registrieren oder es liegt ein Script-Fehler vor!"); -define('ADMIN_MAILS_ACTIVATED', "Die Mailbuchungen wurden in den Sende-Pool übertragen und werden bald versand."); -define('ADMIN_REJECTED_URLS', "URLs auswählen, die in die Black-List aufgenommen werden sollen:"); -define('ADMIN_LOCK_URLS', "URLs in die Black-List aufnehmen"); -define('ADMIN_URLS_BLOCKED', "URLs wurden in die Black-List aufgenommen!"); -define('ADMIN_SENDING_DONE', "Eine gebuchte Mail wurde soeben vollstaendig ausgesendet. Das werbende Mitglied wurde darueber in Kenntnis gesetzt."); -define('ADMIN_NOTIFY_DONE', "Sollte diese Buchung nicht Ihren AGBs entsprechen, loggen Sie sich bitte in den Admin-Bereich ein und aendern die Mail."); -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 <strong><BIG>"); -define('GUEST_SELECT_LEAST_CATS_2', "</BIG></strong> Kategorien aus. Anderfalls erfolgt keine Anmeldung!"); -define('MEMBER_POOL_CONTENT', "Ihre Mails im Sende-Pool"); -define('MEMBER_STATS_CONTENT', "Statistiken versandter Mails"); -define('EMAIL_END_SEND', "Vollständig versendet"); -define('EMAIL_CONFIRMED', "Bestätigt"); -define('EMAIL_PERCENT', "Klickrate"); -define('MEMBER_NO_MAILS_TO_CONFIRM', "Keine Mails übrig zum Bestätigen!"); -define('MEMBER_SID', "Mail-ID"); -define('CONFIRM_LINK', "Bestätigungslink"); -define('CONFIRM_LINK2', "Best.link"); -define('MAIL_ALREADY_CONFIRMED', "Mail bereits vergütet oder Link ist nicht mehr gültig!"); -define('MAIL_STATS_404', "Konnte Daten aus der Statistik-Tabelle nicht laden!"); -define('USER_NOT_FOUND', "Mitgliedsdaten nicht gefunden! Sind Sie noch angemeldet?"); -define('ADMIN_UNCONFIRMED_ACCOUNTS', "Hier alle Accounts, deren Email-Adresse nicht bestätigt ist"); -define('_UID', "User-ID"); -define('REMOTE_IP', "IP-Nummer"); -define('REF_UID', "Werber-ID"); -define('UNKNOWN_STATUS', "Unbekannter Status <span class=\"data\">%s</span> erkannt!"); -define('ACCOUNT_STATUS', "Account-Status"); -define('ACCOUNT_UNCONFIRMED', "<span class=\"admin_failed\">Unbestätigt</span>"); -define('ACCOUNT_CONFIRMED', "<span class=\"admin_green\">Bestätigt</span>"); -define('ACCOUNT_LOCKED', "Gesperrt"); -define('ACCOUNT_DELETED', "Gelöscht"); -define('ADMIN_ALL_ACCOUNTS', "Alle Mitglieder-Accounts auflisten"); -define('ADMIN_NO_NONE_REGISTERED', "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. "); -define('ADMIN_MEMBER_404', "Mitglieds-Account <span class=\"data\">%s</span> existiert nicht!"); -define('ADMIN_LAST_ONLINE', "Zuletzt aktiv"); -define('ADMIN_LAST_MODULE', "Letzte Aktion"); -define('RECEIVE_MAILS', "Kann Mails empfangen"); -define('REF_CLICKS', "Klicks auf Ref-Link"); -define('TOTAL_LOGINS', "Logins gesamt"); -define('USED_POINTS', "Ausgegebene {?POINTS?}"); -define('MAILS_SENT', "Mails versendet"); -define('HAS_JOINED', "Beigetreten am"); -define('TOTAL_POINTS', "{?POINTS?} gesamt"); -define('TOTAL_REFERRALS', "Referals gesamt"); -define('ADMIN_MEMBER_FUNCTIONS', "Administrative Funktionen"); -define('ADMIN_DEL_USER', "Löschen"); -define('ADMIN_LOCK_USER', "Sperren"); -define('ADMIN_UNLOCK_USER', "Entsperren"); -define('ADMIN_ADD_POINTS', "{?POINTS?} aufbuchen"); -define('ADMIN_EDIT_USER', "Ändern"); -define('ADMIN_ALL_REFS', "Alle Refs auflisten"); -define('BIRTHDAY2', "Geburtstag"); -define('TOTAL_CATS', "Ausgewählte Kategorien"); -define('ADMIN_GOTO_USERLIST', "Dieser Menüpunkt kann nicht direkt aufgerufen werden. Bitte rufen Sie stattdessen <em><u>User auflisten</u></em> auf."); -define('ADMIN_USER_UPDATED', "Das Mitgliedsaccount wurde aktualisiert!"); -define('ADMIN_LOCKED_YOUR_ACCOUNT', "Ihr Account wurde von einem unserer Administratoren gesperrt! Bitte halten Sie sich an unsere AGBs."); -define('REASON_LOCKED', "Grund der Sperrung war"); -define('MEMBER_PLEASE_RESPECT', "Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns. Wir kommen dann in Kontakt mit Ihnen."); -define('ADMIN_LOCKED_SUBJ', "Ihr Account wurde gesperrt!"); -define('ADMIN_UNLOCKED_SUBJ', "Ihr Account wurde wieder freigegeben!"); -define('ADMIN_UNLOCKED_YOUR_ACCOUNT', "Einer unserer Administratoren hat soeben Ihren Account wieder freigeben! Sie koennen sich nun wieder unter folgender URL einloggen:\n\n{?URL?}/login.php"); -define('REASON_UNLOCKED', "Nachricht vom Admin"); -define('ADMIN_WELCOME_BACK', "Bitte beachten Sie beim naechsten Mal auf unsere AGBs, damit Ihnen diese Unangenehmlichkeiten erspart bleiben."); -define('ADMIN_DEL_ACCOUNT', "Loeschung Ihres Accounts!"); -define('ADMIN_DELETED_YOUR_ACCOUNT', "Einer unserer Administratoren hat soeben Ihren Account geloescht!"); -define('REASON_DELETE', "Grund der Loeschung war folgender"); -define('ADMIN_BYE_BYE', "Wir wuenschen Ihnen weiterhin noch alles Gute und koennen Sie vielleicht irgentwann einmal wieder begruessen."); -define('ADMIN_ALL_CONFIRMED_EMAIL', "Alle Ihre Mitglieder haben ihre Email-Adresse bestätigt! Keine Neuanmeldungen vorhanden."); -define('GUEST_CONFIRM_SUBJ', "Bitte Ihre Email-Adresse bestaetigen!"); -define('MEMBER_ORDER_ACCEPTED', "Ihre Mailbuchung wurde freigeschaltet"); -define('MEMBER_ORDER_REJECTED', "Ihre Mailbuchung wurde abgelehnt"); -define('THANX_REFERRAL_ONE', "Vielen Dank fuer die Referal-Werbung!"); -define('ADMIN_SEND_MAIL', "Bonusmail versenden"); -define('ADMIN_BONUS_SEND', "Bonusmail wurde in den Sende-Pool eingefügt!"); -define('ENTER_POINTS', "Vergütung"); -define('ENTER_SECONDS', "Wartezeit"); -define('ADMIN_MORE_SELECTED', "Sie haben mehr Empfänger eingegeben, als das empfangsbereit sind!"); -define('ADMIN_BONUS_CONTENT', "Versendete Bonus-Mails"); -define('EMAIL_POINTS', "Vergütung"); -define('EMAIL_SECONDS', "Wartezeit"); -define('POOL_ACTIVE', "Wird gerade versendet"); -define('ALL_MEMBERS', "Alle Mitglieder"); -define('ADMIN_SELECT_USER', "Mitglied auswählen"); -define('ENTER_POINTS_ADD', "{?POINTS?} zum Aufbuchen"); -define('ENTER_ADD_REASON', "Grund der Aufbuchung"); -define('ADMIN_ADDED_POINTS_1', "Einer unserer Administratoren hat Ihnen soeben"); -define('ADMIN_ADDED_POINTS_2', " {?POINTS?} gutgeschrieben!"); -define('ADMIN_ADDED_REASON', "Grund dazu war folgender"); -define('ADMIN_ADD_SUBJ', "{?POINTS?}-Gutschrift durch unsere Admins!"); -define('ADMIN_POINTS_ADDED', "{?POINTS?} wurden gutgeschrieben. Das Mitglied hat eine Mail erhalten!"); -define('MAILS_PER_DAY', "Mails / Tag"); -define('GUEST_CONFIRMED_DONE', "Danke für die Bestätigung Ihrer Email-Adresse! Es ist eine Mail mit den Login-Daten zu Ihnen unterwegs."); -define('VALIDATING_LOGIN', "Logindaten werden geprüft . . ."); -define('MEMBER_ACCOUNT_LOCKED_UNC', "Kann keine {?POINTS?} gutschreiben, da Ihr Account gesperrt wurde!"); -define('MAIL_POSSIBLE_INVALID', "Konnte keine {?POINTS?} gutschreiben: Daten moeglicherweise beschaedigt!"); -define('MEMBER_COOKIES_DISABLED', "Kann nicht einloggen, da Cookies bei Ihnen deaktiviert sind."); -define('ADMIN_DEL_COMPLETED', "Account wurde gelöscht! Die {?POINTS?} werden immer in den Jackpot transferiert!"); -define('NORMAL_MAIL_PROBLEM', "Mail vom Mitgliedern bereits gelöscht"); -define('BONUS_MAIL_PROBLEM', "Bonus-Mail bereits gelöscht"); -define('GENERAL_MAIL_PROBLEM', "BUG! BUG! Bitte reporten auf <a href=\"http://bugs.mxchange.org/\" target=\"_blank\" title=\"Link zum MXChange Bug-Tracker\">bugs.mxchange.org</a>."); -define('MEMBER_BACK_JACKPOT', "{?POINTS?}-Rueckgutschrift"); -define('ADMIN_BACK_JACKPOT', "{?POINTS?}-Aufbuchung fuer Jackpot"); -define('MEDIA_DATA', "Mediendaten"); -define('USERS_TOTAL', "Mitglieder gesamt"); -define('USERS_MAX_MAILS', "Erreichbare Mitglieder"); -define('USERS_REC_PER_DAY', "Heute noch erreichbar"); -define('USERS_LINKS', "Unbestätigte Mails"); -define('USERS_STATS', "Werbebuchungen"); -define('USERS_SENT_MAILS', "Gesendete Mails"); -define('USERS_MAX_PER_DAY', "Versendbare Mails pro Tag"); -define('USERS_MAX_REC', "Heute versendbare Mails"); -define('EDIT_CATEGORIES', "Kategorien ändern"); -define('CATEGORY_ID', "Kategorie-ID"); -define('CAT_DESCRIPTION', "Kategoriebeschreibung"); -define('CHANGE_CATS', "Ändern"); -define('SORT_KEY', "Sortierung"); -define('CATEGORIES_SAVED', "Kategorien gespeichert..."); -define('CATEGORIES_DELETED', "Kategorien gelöscht..."); -define('DELETE_CATEGORIES', "Kategorien löschen"); -define('REMOVE_CATS', "Löschen"); -define('EDIT_MRECEIVE', "Maximal-Werte editieren"); -define('DELETE_MRECEIVE', "Maximal-Werte löschen"); -define('MRECEIVE_ID', "Max-Wert ID"); -define('MREC_VALUE', "Mails pro Tag"); -define('MREC_COMMENT', "Kommentar"); -define('CHANGE_MREC', "Ändern"); -define('REMOVE_MREC', "Löschen"); -define('MRECEIVE_SAVED', "Maximal-Werte gespeichert..."); -define('MRECEIVE_DELETED', "Maximal-Werte gelöscht..."); -define('EDIT_REF_DEPTHS', "Referal-Ebenen editieren"); -define('DELETE_REF_DEPTHS', "Referal-Ebenen löschen"); -define('REF_DEPTHS_ID', "Ref-Level ID"); -define('CHANGE_REF', "Ändern"); -define('REMOVE_REF', "Löschen"); -define('REF_DEPTHS_SAVED', "Referal-Ebenen gespeichert..."); -define('REF_DEPTHS_DELETED', "Referal-Ebenen gelöscht..."); -define('EDIT_PAYMENT', "Mailvergütungen editieren"); -define('PAYMENT_ID', "Vergütungs-ID"); -define('CHANGE_PAY', "Ändern"); -define('REMOVE_PAY', "Löschen"); -define('REFERRALS', "Referals"); -define('POINTS_SUM', "Gesamtsumme"); -define('NEW_VERSION_AVAILABLE', "Neue Version verfügbar!"); -define('YOUR_VERSION_IS', "Installierte Version"); -define('ONLINE_VERSION_IS', "Verfügbare Version"); -define('UPDATE_CREATE_TIME', "Update wurde erstellt"); -define('DOWNLOAD_NEW_VERSION', "Jetzt neue Version herunterladen!"); -define('NO_UPDATES_AVAILABLE', "Keine neuen Updates verfügbar!"); -define('NEW_PATCHES_AVAILABLE', "Neue Entwickler-Patches verfügbar!"); -define('PATCH_FNAME', "Download-Link"); -define('PATCH_CTIME', "Patch erstellt"); -define('PATCH_FSIZE', "Downloadgrösse"); -define('KBYTES', "KBytes"); -define('DEFAULT_SUBJECT_LINE', "Klick-Mail von {?MAIN_TITLE?}"); -define('MEBER_UPDATE_PWD_WRONG', "Sie haben das falsche Passwort eingegeben! Bitte nochmal versuchen!"); -define('ADMIN_MEM_NO_CATS_1', "Das Mitglied <u>"); -define('ADMIN_MEM_NO_CATS_2', "</u> hat keine Kategorien ausgewählt!"); -define('USER_ID', "Mitglied"); -define('UNCONFIRMED_LINKS', "Unbestätigte Mails"); -define('ADMIN_MEMBER_LINKS', "Das Mitglied <span class=\"data\">%s</span> hat alle seine Mails bestätigt."); -define('MEMBER_TOTAL_LINKS_1', "Es müssen noch <strong>"); -define('MEMBER_TOTAL_LINKS_2', "</strong> Mails von diesem Mitglied bestätigt werden!"); -define('ADMIN_DEL_UNCONFIRMED_LINKS', "Alle unbestätigten Mails löschen"); -define('ADMIN_LINKS_DELETED', "Links für unbestätigte Mails wurden gelöscht!"); -define('ADMIN_DEL_LINK_SUBJ', "Ihr unbestaetigen Mails wurden geloescht!"); -define('MEMBER_LINKS_LEFT', "Sie haben <span class=\"data\">%s</span> unbestätigte Mails. Bitte bestätigen Sie diese zuerst. Wenn Sie weniger als <span class=\"data\">%s</span> Mails im Account haben, können Sie auch wieder buchen."); -define('TODAY', "Heute"); -define('MEMBER_PROFILE_LOCKED', "Sie können Ihren Account erst am <span class=\"data\">%s</span> wieder ändern!"); -define('MEMBER_HAS_ZERO_MMAILS', "Sie haben Ihren Empfang auf <strong>Urlaub</strong> stehen! Bitte stellen Sie unter "Profildaten ändern" den Empfang höher ein!"); -define('REF_CLIX', "Clicks"); -define('REF_VIEWS', "Views"); -define('REFBANNER_TOTALS', "Gesamt"); -define('DAYS', "Tage"); -define('GUESTS_ONLINE', "Gäste"); -define('MEMBERS_ONLINE', "Mitglieder"); -define('ADMINS_ONLINE', "Administratoren"); -define('USER_NOW_ONLINE', "User Online"); -define('ADMIN_ONLINE_DETAILS', "Detailierte Statistik für alle Besucher"); -define('_REFID', "Ref-ID"); -define('_MODULE', "Modul"); -define('MENU_ACTION', "Hauptmenü"); -define('MENU_WHAT', "Untermenü"); -define('_IS_ADMIN', "Administrator"); -define('_IS_GUEST', "Gast"); -define('LAST_SEEN', "Zuletzt gesehen"); -define('ADMIN_TOTAL_PATCH_SIZES', "Gesamtgrösse aller Patches"); -define('ADMIN_DELETE_BONUS_MAIL', "Obrige Bonus-Mail löschen"); -define('ADMIN_DELETE_NORMAL_MAIL', "Obrige Normal-Mail löschen"); -define('ADMIN_REALLY_DELETE_ALL_MAILS', "Wollen Sie wirklich alle Mails löschen?"); -define('SURNAME_FAMILY', "Vor- und Nachname"); -define('ADMIN_USER_TOTAL_REFS', "Das Mitglied <span class=\"data\">%s</span> hat bereits <span class=\"data\">%s</span> weitere(s) Mitglied(er) geworben, davon sind <span class=\"data\">%s</span> gesperrt oder nicht bestätigt!"); -define('REFS_COUNT', "Refs"); -define('MEMBER_JOINED', "Beigetreten"); -define('ADMIN_EMAIL_DELETED', "E-Mail wurde aus dem System gelöscht."); -define('_ALL', "alle"); -define('PROFILE_LAST_CHANGE', "Letzte Änderung"); -define('PROFILE_OUTDATED', "Haben Sie Neuigkeiten fuer uns?"); -define('PROFILE_NEVER_CHANGED', "Sie haben noch nie eine Aenderung durchgefuehrt!"); -define('PROFILE_UPDATED', "Profildaten wurden geändert!"); -define('SORT_BY', "Sortieren:"); -define('_OTHERS', "Andere"); -define('_ALL2', "Alle"); -define('WE_HAVE', "Wir haben"); -define('MEMBER_TEST_URL', "Zur beworbenen Seite"); -define('ADMIN_ENTER_REDIRECT_URL', "URL eingeben, wenn abgelehnt werden soll"); -define('MEMBER_NO_REFBANNER_FOUND', "Es sind noch keine Werbebanner eingerichtet worden. Bitte verwende solange deinen Referal-Link."); -define('ADMIN_ID_404', "ID <span class=\"data\">%s</span> nicht gefunden!"); -define('ADMIN_ASSIGNED_ADMIN', "Zugewiesener Admin-Login"); -define('ADMIN_MEMBER_UID', "ID des Mitgliedes"); -define('ADMIN_TASK_TYPE', "Aufgabenbereich"); -define('ADMIN_TASK_CREATED', "Task erstellt"); -define('ADMIN_NO_ADMIN_ASSIGNED', "Kein Admin-Login zugewiesen!"); -define('ADMIN_UNKNOWN_TASK_TYPE', "Unbekannter Task-Typ <span class=\"data\">%s</span> im Task <span class=\"data\">%s</span> erkannt!"); -define('ADMIN_TASK_SYSTEM_WELCOME', "Task-Management Ihres {?MT_WORD2?}"); -define('ADMIN_UNSELECT_ALL', "Alles abwählen"); -define('ADMIN_ASSIGN_TASKS', "Bearbeiten"); -define('ADMIN_UNASSIGN_TASKS', "Zuweisung aufheben"); -define('ADMIN_REDIRECT_TASKS', "An uns weiterleiten"); -define('PATCHES_APPLIED', "Patches an der Datenbank durchgeführt!"); -define('PATCH_NOTES', "Bitte beachten Sie, dass wenn bei der Installation die SQL-Dateien nicht automatisch eingespielt werden konnten, dass sie auch hier nicht eingespielt worden sind! Sie müssen sie dann manuell einspielen."); -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! <a href=\""); -define('LOAD_URL_ERROR_2', "\">Bitte klicken Sie hier</a>, um zur URL zu kommen.<br />\n<br />\nDanke."); -define('GUEST_STATS', "Statistiken unseres {?MT_WORD2?}"); -define('GUEST_STATS_MONTHLY', "Mitgliederverteilung auf Kalendermonate"); -define('GUEST_STATS_CATS', "Mitgliederverteilung auf Mail-Kategorien"); -define('GUEST_STATS_MALES', "Angemeldete Männer"); -define('GUEST_STATS_FEMALES', "Angemeldete Frauen"); -define('GUEST_STATS_TONLINE', "Heute Online gewesen"); -define('GUEST_STATS_YONLINE', "Gestern Online gewesen"); -define('GUEST_STATS_TREGISTER', "Heutige Anmeldungen"); -define('GUEST_STATS_YREGISTER', "Gestrige Anmeldungen"); -define('GUEST_STATS_INACTIVE', "Mitgliederstatistik deaktiviert"); -define('CHANGE_MENUS', "Ändern"); -define('CHANGE_MEMBER_MENU', "Verdecken, anzeigen, deaktivieren, aktivieren des Mitgliedsmenüs"); -define('CHANGE_MENU_1', "Ändern von <strong>"); -define('CHANGE_MENU_2', "</strong> Menüeinträgen"); -define('IS_VISIBLE', "Wird angezeigt"); -define('IS_ACTIVE', "Aktiviert"); -define('CHANGE_ENTRIES', "Änderungen durchführen"); -define('BASE_URL_NOTE', "Ohne abschliessendem /!"); -define('ADMIN_WRONG_CALL', "Falscher Aufruf einer Aktion oder des Scriptes. Bitte navigieren Sie links weiter."); - -// Description of all months -$GLOBALS['month_descr'] = array( - '01' => "Januar", - '02' => "Februar", - '03' => "März", - '04' => "April", - '05' => "Mai", - '06' => "Juni", - '07' => "Juli", - '08' => "August", - '09' => "September", - '10' => "Oktober", - '11' => "November", - '12' => "Dezember", -); -// -define('ADMIN_IS_SYSTEM_TASK', "System-Task"); -define('ADMIN_NEW_EXT_SUBJ', "Neue Erweiterung gefunden"); -define('ADMIN_TASK_SUBJECT', "Aufgabenbetreff"); -define('ADMIN_TASK_TEXT', "Aufgabentext"); -define('ADMIN_REGISTER_EXTENSION', "Registrieren"); -define('ADMIN_REGISTER_EXTENSION_TITLE', "Erweiterung direkt registrieren"); -define('ADMIN_SELECTED_TASKS_ASSIGN', "Zum Bearbeiten ausgewählte Tasks"); -define('ADMIN_REG_FAILED_INVALID', "Registrierung fehlgeschlagen: Ungütige ID übermittelt!"); -define('ADMIN_REG_FAILED_ID_404', "Registrierung fehlgeschlagen: Erweiterung-ID nicht auffindbar!"); -define('ADMIN_REG_FAILED_404', "Registrierung fehlgeschlagen: Erweiterung <span class=\"data\">%s</span> nicht auffindbar!"); -define('ADMIN_REG_FAILED_ASSIGED', "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder Task ist veraltet!"); -define('ADMIN_REG_FAILED_ALREADY', "Registrierung fehlgeschlagen: Erweiterun bereits installiert."); -define('ADMIN_REG_FAILED_DEPRECATED', "Registrierung fehlgeschlagen: Erweiterung ist veraltet."); -define('ADMIN_NO_EXTENSION_REGISTERED', "Derzeit haben Sie keine Erweiterung in Ihrem {?MT_WORD?} registriert."); -define('ADMIN_EXTENSION_REGISTERED', "Erweiterung wurde in Ihrem {?MT_WORD?} registriert."); -define('ADMIN_EXT_ALREADY_REGISTERED', "Erweiterung bereits registriert!"); -define('ADMIN_EXT_NO_INFO_FOUND', "Keine Informationen zu dieser Erweiterung gefunden!"); -define('ADMIN_EXT_NEW_FOUND_TITLE', "Neue Erweiterungen gefunden"); -define('ADMIN_EXT_DOWNLOAD_LINK', "Download-Link"); -define('ADMIN_EXT_FILE_SIZE', "Downloadgröße"); -define('ADMIN_EXT_FILE_CTIME', "Erweiterung erstellt am"); -define('ADMIN_EXT_FILE_VERSION', "Version (alt)"); -define('ADMIN_EXT_TOTAL_FSIZE', "Downloadgesamtgrösse"); -define('ADMIN_EXT_TOTAL_FOUND', "Gesamt gefundene Erweiterungen"); + '_TABLE' => "Tabelle", + '_SIZE' => "Größe", + '_STATUS' => "Status", + '_SPACESAVED' => "Freigegeben", + '_ORESULT' => "Optimization Resultat", + '_OJETZT' => "Jetzt freigegeben", + '_ONR' => "Sie haben bereits ", + '_ONRR' => "mal die Tabellen optimiert", + '_OGESAMT' => "KiloByte Gesamt optimiert", + '_WOPT' => "wurde bereits optimiert", + '_OKOPT' => "Optimiert!", + 'LANG_DOWN_MAINTAINCE' => "System wegen Wartungsarbeiten geschlossen!", + 'LANG_MOD_REG_404' => "Modul <span class=\"data\">%s</span> existiert nicht!", + 'LANG_UNKNOWN_MODULE' => "Unbekanntes Modul", + 'META_YOUR_NAME_1' => "Ihr Name hier", + 'META_YOUR_NAME_2' => "Ihr Name nochmal", + 'META_DESCRIPTION' => "Beschreibung Ihrer Webseite hier", + 'META_KEYWORDS' => "mailtausch, mailversand, kostenlos, kostenloser, mailexchange, werbemail, werbemailversand, exchange, werbepunkte, punkte, auktion, auktionen, umsonst, sms kostenlos, produkte, produktproben, gewinn, gewinnspiel, gratis sms, promotion, besucher, werbung, linkliste, geldverdienen, verdienen, traffic, hits", + 'LANG_WARNING' => "Warnung", + 'DIE_CONFIG_CHANGED_YOU' => "Sie haben Ihre Config-Datei editiert! Auf Wiedersehen...", + 'DIE_RUN_INSTALL_MYSQL' => "Bitte rufen Sie http://your-domain.com/install.php auf, um Ihre MySQL-Daten einzurichten!", + 'WARN_NULL_PASSWORD' => "Sie haben kein Passwort eingegeben! Bitte lesen Sie in der <strong>{?CACHE_PATH?}/config-local.php</strong> nach, wie Sie diese Warnung abschalten können.", + 'FATAL_CONFIG_WRITABLE' => "Ihre Datei {?CACHE_PATH?}/config-local.php ist beschreibbar! Dies ist ein mögliches Sicherheitsrisiko!", + 'FATAL_CANNOT_WRITE_CONFIG' => "Kann Konfigurationsdaten nicht speichern, da ich keinen Schreibzugriff auf {?CACHE_PATH?}/config-local.php habe!", + 'FATAL_CANNOT_CREATE_TMP' => "Kann eine temporäre Datei nicht erzeugen! Bitte setzen Sie CHMOD 777 auf Verzeichnis inc!", + 'FATAL_ERROR' => "Fataler Fehler", + 'LANG_NO_RENDER_DIRECT' => "Sie haben weder 'render' noch 'direct' als Ausgabe-Modus eingestellt!", + 'INSTALLATION' => "Installation des Scriptes", + 'INSTALL_PROBLEMS_DETECTED' => "Es wurden bei der Initialisierung des Installationsvorganges Probleme festgestellt!", + 'FATAL_NO' => "Fataler Fehler Nr. #", + 'FATAL_CORRECT_ERRORS' => "Kann nicht fortsetzen! Bitte korregieren Sie erst die obrigen Probleme und versuchen Sie es dann erneut!", + 'YES' => "Ja", + 'NO' => "Nein", + 'RETURN_MYSQL_PAGE' => "Zurück zu den MySQL-Einstellungen", + 'INSTALL_FINALIZER_FAILED' => "Während der Installation ist ein unerwarteter Fehler aufgetreten! Der Finalizer konnte die Installation nicht abschliessen!", + 'INSTALL_MAYBE_DONE' => "Die Installation ist möglicherweise abgeschlossen oder es ist ein unerwarteter Fehler aufgetreten!", + 'INSTALL_FINISHED' => "Die Installation ist abgeschlossen! :-)", + 'INSTALL_FIN_SECU' => "Sie sollten jetzt die Dateien <u>install.php</u> und <u>inc/install-inc.php</u> von Ihrem Server löschen. Dies ist zwar normalerweise nicht erforderlich, Sie sollten es aber dennoch tun, um die Sicherheit zusätzlich zu erhöhen.", + 'CONTINUE_ADMIN' => "Weiter zum Administrationsbereich...", + 'RUNTIME_PROBLEMS_DETECTED' => "Laufzeit-Problem erkannt!", + 'FATAL_INC_WRITABLE' => "Das Verzeichnis inc ist beschreibbar! Bitte setzen Sie die Zugriffsrechte auf 755 oder 555.", + 'LANG_WRITE_FOOTER' => "Scriptname, -version und -author anzeigen?", + 'LANG_FRAMESET_ACTIVE' => "Soll das Frameset aktiviert werden? (Wenn nein wird ein Table-Set aktiviert)", + 'MYSQL_ERRORS' => "Es sind MySQL-Fehler aufgetreten! Bitte korregieren Sie diese!", + 'LANG_MOD_REG_UNKNOWN' => "Der Return-Code <span class=\"data\">%s</span> ist unbekannt!", + 'LANG_MOD_REG_LOCKED' => "Das Modul <span class=\"data\">%s</span> wurde gesperrt!", + 'ADMIN_NOT_REGISTERED' => "Es ist noch kein Administrator-Account angelegt worden.", + 'ADMIN_REGISTER_NOW' => "Legen Sie jetzt das Administrator-Account an:", + 'ADMIN_LOGIN' => "Geben Sie ein Administrator-Login ein", + 'ADMIN_PASS' => "Geben Sie das Passwort ein", + 'CLEAR_FORM' => "Nochmal eingeben", + 'ADMIN_REG_SUBMIT' => "Admin-Account erstellen", + 'ADMIN_NO_LOGIN' => "Sie haben keinen Loginnamen eingegeben!", + 'ADMIN_NO_PASS' => "Sie haben kein Passwort eingegeben!", + 'ADMIN_SHORT_PASS' => "Das Passwort ist zu kurz! Mindestens 4 Zeichen!", + 'ADMIN_LOGIN_ALREADY_REG' => "Das von Ihnen eingegebene Admin-Login existiert bereits!", + 'ADMIN_REGISTER_FAILED' => "Bei der Registrierung eines Admin-Accounts ist ein unerwarteter Fehler unterlaufen!", + 'ADMIN_REGISTER_DONE' => "Das Admin-Account wurde soeben erstellt. Sie können sich nun mit den eingegeben Login-Daten einloggen.", + 'ADMIN_CANNOT_COMPLETE' => "Kann die Regsitrierung des Admin-Accounts nicht abschliessen!", + 'ADMIN_LOGIN_NOW' => "Sie können sich nun in den Administratorbereich einloggen.<br />Geben Sie dazu Ihren Admin-Login (nicht Mitglied-Login!) und das Passwort dazu ein.", + 'ENTER_ADMIN_LOGIN' => "Administrator-Login", + 'ENTER_ADMIN_PASS' => "Passwort zum Admin-Account", + 'ADMIN_LOGIN_SUBMIT' => "Einloggen zum Admin-Bereich", + 'WRONG_PASS' => "Falsches Passwort!", + 'ADMIN_404' => "Administrator-Account wurde nicht gefunden!", + 'ADMIN_LOGIN_FAILED' => "Einloggen in den Administrator-Bereich fehlgeschlagen!", + 'CANNOT_REGISTER_SESS' => "Konnte eine Sitzungsvariable nicht setzen! Vermutlich sind bei Ihnen Cookies deaktiviert.", + 'SELECT_TIMEOUT' => "Gütigkeitsdauer des Auto-Logins", + 'TIMEOUT_ONE_DAY' => "1 Tag", + 'TIMEOUT_TWO_DAYS' => "2 Tage", + 'TIMEOUT_THREE_DAYS' => "3 Tage", + 'TIMEOUT_ONE_WEEK' => "1 Woche", + 'TIMEOUT_TWO_WEEKS' => "2 Wochen", + 'TIMEOUT_ONE_MONTH' => "1 Monat", + 'TIMEOUT_HALF_YEAR' => "1/2 Jahr", + 'TIMEOUT_FULL_YEAR' => "1 Jahr", + 'ADMIN_LOGOUT_DONE' => "Ausloggen aus dem Admin-Bereich abgeschlossen!", + 'ADMIN_LOGOUT_FAILED' => "Konnte nicht aus dem Admin-Bereich ausloggen! :-(", + 'ADMIN_RELOGIN_LINK' => "Klicken Sie hier, um sich erneut einzuloggen.", + 'ADMIN_ACTION_404' => "Das aufgerufe Admin-Modul <span class=\"data\">%s</span> ist zwar gültig, konnte aber nicht auf dem Server gefunden werden.", + 'ALREADY_INSTALLED' => "Dieses Script ist bereits auf diesem Server installiert worden Bitte löschen Sie install.php inc/install-inc.php und install.sql von Ihrem Server! (Keine Sorge, Sie können es tun...)", + 'ADMIN_MAIN_TITLE' => "Willkommen zum Administrationsbereich", + 'YOU_ARE_HERE' => "Sie sind hier:", + 'ID_SELECT' => "ID:", + 'KEY_SELECT' => "Eintrag:", + 'DISPLAY_ACTION' => "Aktion", + 'DISPLAY_WHAT' => "Unteraktion", + 'DISPLAY_TITLE' => "Titel", + 'UNDO_SELECTIONS' => "Auswahl zurücknehmen", + 'EDIT_MENUS' => "Menüs bearbeiten", + 'DEL_MENUS' => "Menüs löschen", + 'EDIT_ADMIN_MENU' => "Admin-Menüeinträge ändern", + 'EDIT_MENU_1' => "Es soll/sollen <strong>", + 'EDIT_MENU_2' => "</strong> Menüeintrag/-einträge geändert werden:", + 'ENTRY_MODIFY' => "Eintrag", + 'SUBMIT_CHANGES' => "Änderungen durchführen", + 'ENTRY_404_1' => "Eintrag <em>", + 'ENTRY_404_2' => "</em> wurde nicht gefunden!", + 'EDIT_UNKNOWN_OKAY' => "Es wurde eine unbekannte Aktion durchgeführt!", + 'DEL_ADMIN_MENU' => "Admin-Menüeinträge löschen", + 'DEL_MENU_1' => "Es soll/sollen <strong>", + 'DEL_MENU_2' => "</strong> Menüeintrag/-einträge gelöscht werden:", + 'DEL_ENTRIES' => "Einträge unwiederruflich löschen", + 'EDIT_ACTION' => "Aktionswert ändern", + 'EDIT_WHAT' => "Unteraktionswert ändern", + 'EDIT_TITLE' => "Linktitel ändern", + 'ADMIN_ADD_MENU' => "Menü hinzufügen", + 'ENTER_TITLE' => "Geben Sie den Linktitel zum neuen Menüpunkt ein", + 'SELECT_PARENT_MENU' => "Wählen Sie das übergeordnete Hauptmenü aus", + 'IS_TOP_MENU' => "Ist ein Hauptmenü", + 'SELECT_WHAT_NAME' => "Wählen Sie den passenden Suffix aus der Liste aus", + 'ENTER_DESCR' => "Geben Sie eine kurze aussagekräftige Beschreibung des Menüpunktes ein", + 'SELECT_BELOW_MENU' => "Wählen Sie den Menüpunkt aus, unterhalb dem der neue Punkt erscheinen soll", + 'EDIT_DESCR' => "Beschreibung ändern", + 'CREATE_WHAT_FIRST' => "Bitte erstellen Sie zuerst die what-xxxxx.php Datei. Dann können Sie sie hier auswählen.", + 'MENU_IS_VISIBLE' => "Menüpunkt ist sichtbar", + 'MENU_IS_ACTIVE' => "Menüpunkt ist aktiviert", + 'CREATE_ACTION_FIRST' => "Bitte erstellen Sie zuerst die action-xxxxx.php Datei. Dann können Sie sie hier auswählen.", + 'IS_FIRST_MENU' => "Ist das erste Hauptmenü", + 'NO_DB_LINK' => "Keine Verbindung zur Datenbank.", + 'NO_DB_LINK_SHUTDOWN' => "Keine Verbindung zur Datenbank beim Schliessen der Verbindung.", + 'MYSQL_DATA_MISSING' => "Die Konfiguration Ihrer Datenbankverbindung ist unnvollständig. Bitte in <strong>{?CACHE_PATH?}/config-local.php</strong> mindestens den Hostnamen, Datenbanknamen und Login zur Datenbank eingeben.", + 'REGISTER_PERSONAL_DATA' => "Persönliche Daten", + 'REGISTER_CATEGORIES' => "Interessengebiete", + 'REGISTER_MISC' => "Passwort, maximale Mails pro Tag etc.", + 'SURNAME' => "Vorname", + 'FAMILY_NAME' => "Nachname", + 'STREET_NR' => "Straße + Hausnummer", + 'COUNTRY' => "Land", + 'ZIP' => "Postleitzahl", + 'CITY' => "Wohnort", + 'EMAIL_ADDRESS' => "Email-Adresse", + 'BIRTHDAY' => "Geburtstag (TT.MM.JJJJ)", + 'PASS_1' => "Passwort", + 'PASS_2' => "Passwortbestätigung", + 'ADD_NEW_CATEGORY' => "Neue Kategorie hinzufügen", + 'ENTER_CATNAME' => "Kategoriebezeichnung", + 'SELECT_PARENT' => "Unter welcher Kategorie soll diese eingeblendet werden?", + 'IS_TOP_CATEGORY' => "Ist oberste Kategorie", + 'ADD_NEW_CAT' => "Neue Kategorie dazufügen", + 'CAT_IS_VISIBLE' => "Kategorie wird eingeblendet?", + 'CATEGORY_ADDED' => "Kategorie wurde hinzugefügt", + 'CATEGORY_ALREADY_EXISTS' => "Kategorie existiert bereits!", + 'EDIT_DEL_CATEGORIES' => "Aufgelistete Kategorien bearbeiten / löschen", + 'CATNAME' => "Kategoriebezeichnung:", + 'EDIT_CATS' => "Kategorien bearbeiten", + 'DEL_CATS' => "Kategorien löschen", + 'NO_CATEGORIES_VISIBLE' => "Derzeit sind keine Kategorien anzeigbar!", + 'MAX_RECEIVE' => "Wie viel Mails sollen Ihre Mitglieder maximal empfangen können? Fügen Sie bitte mehrere Werte hinzu, damit sich die Mitglieder dies individuell einstellen können.", + 'ADD_MAX_RECEIVE' => "Hinzufügen", + 'SAVE_SETTINGS' => "Einstellungen speichern", + 'ENTER_MAX_VALUE' => "Neuen Maximal-Wert (0 bis 9999)", + 'ENTER_MAX_COMMENT' => "Optionaler Hinweis (erscheint in Klammern hinter dem Wert!)", + 'MAX_VALUE_SAVED' => "Maximal-Wert gespeichert", + 'MAX_VALUE_ALREADY' => "Maximal-Wert existiert bereits!", + 'EDIT_DEL_MAX_VALUES' => "Maximal-Werte bearbeiten / löschen", + 'MAX_VALUE' => "Maximal zu empfangene Mails", + 'MAX_COMMENT' => "Hinweis zum Maximal-Wert", + 'EDIT_MAX_V' => "Bearbeiten", + 'DEL_MAX_V' => "Löschen", + 'NO_MAX_VALUES' => "Derzeit klappt die Anmeldung nicht, da Sie keine maximal zu empfangenen Mails einstellen können!", + 'MAX_PER_DAY' => "Maximale Mitgliedermails/Tag", + 'PER_DAY' => "Mails", + 'REFID_BY' => "Sie wurden geworben von", + 'TERMS_OF_USAGE' => "AGBs zustimmen und absenden", + 'YOU_FINALIZE' => "Sie haben es gleich geschafft!", + 'AGREE_TO_THIS' => "Stimmen Sie unseren [<a href=\"{?URL?}/modules.php?module=index&what=agb\" class=\"register_term\" target=\"_blank\">AGBs</a>] zu?", + 'SUBMIT_REGISTER' => "Anmeldedaten abschicken", + 'HAVE_TO_AGREE' => "Sie müssen unseren AGBs zustimmen, damit Sie an diesem {?mt_word?} teilnehmen können!", + 'ENTER_BOTH_PASSWORDS' => "Bitte geben Sie ein Passwort und das selbe Passwort noch einmal ein!", + 'ENTER_PASS1' => "Bitte geben Sie ein Passwort ein!", + 'ENTER_PASS2' => "Bitte geben Sie noch die Bestätigung Ihres Passwortes ein!", + 'ENTER_EMAIL' => "Bitte geben Sie Ihre Email-Adresse ein! Diese muss auch erreichbar sein!", + 'ENTER_SURNAME' => "Bitte geben Sie Ihren Vornamen ein!", + 'ENTER_FAMILY' => "Bitte geben Sie Ihren Nachnamen ein!", + 'EDIT_SECURITY_SETTINGS' => "Ändern von sicherheits-relevanten Einstellungen", + 'MIN_PASS_LENGTH' => "Minimale Passwortlänge", + 'SETTINGS_NOT_SAVED' => "Einstellungen NICHT gespeichert / geändert!", + 'SETTINGS_SAVED' => "Einstellungen gespeichert.", + 'FATAL_CANNOT_LOAD_CONFIG' => "Kann die Konfigurationsdaten nicht laden! Vermutlich richtet der Webmaster diesen {?mt_word?} gerade das Script erst ein! Bitte schauen Sie später noch einmal vorbei!", + 'ADMIN_ACTION_INVALID' => "Die action/what-Kombination <span class=\"data\">%s</span> ist ungültig!", + 'SHORT_PASS' => "Das eingegebene Passwort ist nach unseren Sicherheitseinstellungen zu kurz. Mindestlänge ist", + 'EDIT_POINTS_SETTINGS' => "Ändern der Willkommensgutschrift und anderer {?POINTS?}", + 'POINTS_REGISTER' => "Willkommensgutschrift", + 'POINTS_REF' => "Einmalige Referal-Gutschrift", + 'EDIT_REGFORM_SETTINGS' => "Einstellungen am Anmeldeformular", + 'LEAST_CATS' => "Mindestens auszuwählende Kategorieanzahl", + 'CATS_LEAST' => "Bitte wählen Sie mehr Kategorien aus! Minimum ist: %s", + 'EMAIL_ALREADY_DB' => "Sie haben sich bereits mit dieser Email-Adresse angemeldet, oder jemand anderes verwendet Ihre. Doppelte Anmeldungen sind bei uns verboten.", + 'REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?", + 'REJECT_DOUBLE_PASS' => "Gleiche Passwörter bei der Anmeldung ablehnen? (Wird nicht angezeigt!)", + 'ADMIN_EDIT_POINTS' => "Willkommensgutschrift und andere Festbeträge editieren", + 'ADMIN_EDIT_REFDEPTHS' => "Referal-Ebenen editieren / löschen / hinzufügen", + 'ADD_NEW_REFDEPTH' => "Neue Referal-Ebene hinzufügen", + 'ADD_DEPTH' => "Referal-Ebene hinzufügen", + 'ENTER_REF_LVL' => "Referal-Ebene", + 'ENTER_REF_PERCENTS' => "Prozentuale Vergütung", + 'EDIT_DEL_REFDEPTH' => "Referal-Ebenen editieren / löschen", + 'REF_LEVEL' => "Referal-Ebene", + 'REF_PERCENT' => "Prozentuale Vergütung", + 'EDIT_LVL' => "Ref-Ebene editieren", + 'DEL_LVL' => "Ref-Ebene löschen", + 'HELLO' => "Hallo", + 'GUEST_YOU_REGISTERED_WITH_US' => "vielen Dank, dass Sie sich für unseren {?mt_word?} entschieden haben! Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns!", + 'GUEST_YOUR_PERSONA_DATA' => "Hier sind nochmals zur Überprüfung Ihre persönlichen Daten", + 'GUEST_SURNAME' => "Vorname", + 'GUEST_FAMILY' => "Nachname", + 'GUEST_STREET_NR' => "Straße und Hausnummer", + 'GUEST_COUNTRY' => "Ländercode", + 'GUEST_ZIPCODE' => "Postleitzahl", + 'GUEST_CITY' => "Wohnort", + 'GUEST_EMAIL_ADDRESS' => "Email-Adresse", + 'GUEST_BIRTHDAY' => "Geburtsdatum", + 'GUEST_REF' => "Geworben von", + 'GUEST_YOUR_REFLINK' => "Hier ist Ihr persönlicher Referal-Link, mit dem Sie bereits jetzt schon neue Mitglieder werben können:", + 'GUEST_SUBJECT_CONFIRM_LINK' => "Ihr Bestätigungslink", + 'ADMIN_GUEST_REGISTERED_WITH_US' => "Ein Gast hat sich soeben bei uns angemeldet.", + 'ADMIN_GUEST_PERSONA_DATA' => "Hier sind zur Überprüfung nochmals seine persönlichen Daten", + 'ADMIN_SUBJECT_NEW_ACCOUNT' => "Neue Anmeldung zu Ihrem {?mt_word?}", + 'REGISTRATION_DONE' => "Vielen Dank für die Anmeldung. Ein Bestätigungslink ist zur angemeldeten EMail-Adresse unterwegs!", + 'GUEST_404_WHAT' => "Das angegeben Menümodul <span class=\"data\">%s</span> existiert leider nicht, oder dieses Script hat einen Fehler gemacht!", + 'GUEST_LOCKED_ACTION' => "Aktionsmodul <span class=\"data\">%s</span> wurde gesperrt!", + 'FATAL_REPORT_ERRORS' => "Es wurde ein Problem während der Abarbeitung von Anweisungen festgestellt. Wenn ein Modul gesperrt sein sollte, so wird vermutlich gerade dran gearbeitet, anderfalls melden Sie sich bitte bei uns!", + 'TEMPLATE_404' => "Template nicht gefunden!", + 'EDIT_GUEST_MENU' => "Gästemenü bearbeiten", + 'EDIT_MEMBER_MENU' => "Mitgliedsmenü bearbeiten", + 'DEL_GUEST_MENU' => "Gästemenü löschen", + 'DEL_MEMBER_MENU' => "Mitgliedsmenü löschen", + 'GUEST_PASSWORD' => "Ihr Passwort", + 'GUEST_THANX_CONFIRMATION' => "Sie haben soeben Ihre Email-Adresse bestätigt und sind somit für den {?mt_word?} {?MAIN_TITLE?} freigeschaltet!", + 'GUEST_MAY_LOGIN_HERE' => "Sie können sich nun hier einloggen:", + 'HAPPY_MAILING' => "Wir wünschen Ihnen viel Spass und Erfolg beim Mail-Versand!\n\nMit freundlichen Grüßen,", + 'GUEST_THANX_CONFIRM' => "Email-Adresse bestätigt", + 'TOP' => "Nach oben", + 'YOUR_LOGIN' => "Ihre Login-ID lautet", + 'LOGIN_URL' => "URL zum Login", + 'GUEST_WELCOME_MEMBER' => "Willkommen zum Login-Bereich für Mitglieder", + 'GUEST_ENTER_LOGIN' => "Login-ID", + 'GUEST_ENTER_PASSWORD' => "Passwort", + 'LOGIN_SUBMIT' => "Einloggen", + 'GUEST_GET_NEW_PASS' => "Neues Passwort zuschicken", + 'GUEST_ENTER_EMAIL' => "Angemeldete Email-Adresse", + 'NEW_PASSWD' => "Jetzt zuschicken!", + 'GUEST_WRONG_ID_EMAIL' => "Konnte Account-Daten nicht auffinden! Vermutlich haben Sie eine falsche Login-ID oder Email-Adresse eingegeben! Bitte probieren Sie es nochmal!", + 'GUEST_NEW_PASS_1' => "Sie oder ein anderes Mitglied", + 'GUEST_NEW_PASS_2' => "haben soben ein neues Passwort angefordert. Hier ist Ihr neues Passwort:", + 'YOUR_NEW_PASS' => "Neues Passwort", + 'GUEST_NOT_THIS_REPORT' => "Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns!\n\nMit freundlichen Grüßen,", + 'GUEST_NEW_PASSWORD' => "Ihre Passwortanfrage", + 'LOGIN_UNKNOWN_CODE' => "Unbekannter Rückgabewert!", + 'LOGIN_WRONG_PASS' => "Falsches Passwort eingegben!", + 'LOGIN_WRONG_ID' => "Es wurde kein Account unter Ihren eingegebenen Logindaten gefunden!", + 'LOGIN_ID_LOCKED' => "Ihr Account wurde gesperrt!", + 'LOGIN_ID_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre Email-Adresse!<br />Haben Sie den Bestätigungslink verloren? Links im Menü können Sie ihn erneut anfordern.", + 'LOGIN_NO_COOKIES' => "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt!", + 'GUEST_REG_POINTS_1' => "Für Ihre Anmeldung haben wir Ihnen als Willkommensgutschrift", + 'GUEST_REG_POINTS_2' => "{?POINTS?} gutgeschrieben. Sie können bereits jetzt schon Mails an die anderen Mitglieder verschicken - solange Empfänger auch erreichbar sind.", + 'GUEST_SELECT_LIFETIME' => "Wie lange soll Auto-Login aktiv sein?", + 'LIFE_CLOSE_BROWSER' => "Browser wurde geschlossen", + 'LIFE_HOURS' => "Stunde(n)", + 'LIFE_DAYS' => "Tag(e)", + 'LIFE_WEEKS' => "Woche(n)", + 'LIFE_MONTHS' => "Monat(e)", + 'LIFE_YEARS' => "Jahr(e)", + 'MODULE_MEM_ONLY' => "Auf das ausgewählte Modul <span class=\"data\">%s</span> dürfen nur eingeloggte Mitglieder zugreifen!", + 'MEMBER_404_ACTION' => "Das Mitgliedsaktionsmodul <span class=\"data\">%s</span> ist nicht auffindbar!", + 'USERNAME_GUEST' => "Gast", + 'USERNAME_INSTALLER' => "Installation", + 'USERNAME_UNKNOWN' => "Name ist nicht ladbar", + 'USERNAME_ADMIN' => "Administrator", + 'USERNAME_ADMIN_SHORT' => "Admin", + 'LAST_ONLINE' => "Sie waren als letztes Online am", + 'LAST_MODULE' => "Ihr zuletzt ausgewähltes Modul", + 'MEMBER_EDIT_PROFILE' => "Profildaten ändern", + 'GENDER' => "Geschlecht", + 'GUEST_GENDER' => "Geschlecht", + 'GENDER_M' => "Herr", + 'GENDER_F' => "Frau", + 'GENDER_C' => ""Firma"", + 'SAVE_CHANGES' => "Änderungen speichern", + 'MYDATA_NOTE' => "Geben Sie nur bei <strong>Passwort</strong> Ihr aktuelles Passwort ein, wenn Sie nur Daten ändern wollen. Geben Sie bei <strong>Passwortbestätigung</strong> das neue Passwort erneut ein, wenn Sie Ihr aktuelles Passwort ändern wollen.", + 'MEMBER_UPDATE_PWD_WRONG' => "Bitte geben Sie Ihr aktuelles Passwort zum Ändern Ihrer Einstellungen ein. Wir haben dies zur Sicherheit unserer Mitglieder eingebaut.", + 'MEMBER_UPDATE_FAILED' => "Bei der Aktualisierung Ihres Kontos ist ein Fehler entstanden. Es wurden keine Daten aktualisiert.", + 'MEMBER_HAVE_CHANGED_DATA' => "Sie haben heute Ihr Mitgliedsprofil geändert.", + 'YOUR_NEW_DATA' => "Hier sind Ihre neuen Profildaten", + 'PLEASE_NOTIFY_ABUSE_MYDATA' => "Sollten Sie diese änderungen nicht durchgeführt haben, benachrichten Sie uns bitte! ({?WEBMASTER?})", + 'MEMBER_UNKNOWN_MODE' => "Unbekannter Modus erkannt", + 'MEMBER_CHANGED_EMAIL' => "Sie haben Ihre Email-Adresse geändert! Alte Adresse war", + 'MEMBER_CHANGED_PASS' => "Sie haben Ihr Passwort geändert.", + 'MEMBER_CHANGED_DATA' => "änderung Ihrer Profildaten", + 'MYDATA_MAIL_SENT' => "Es ist eine Email zu Ihnen unterwegs.", + 'ADMIN_CHANGED_DATA' => "Profildaten geaendert", + 'ADMIN_MEMBER_CHANGED_PROFILE' => "Eines Ihrer Mitglieder hat seine Profildaten geändert!", + 'MEMBER_UID' => "Seine Login-ID lautet", + 'LOGOUT_DONE' => "Ausloggen abgeschlossen!", + 'LOGOUT_FAILED' => "Ausloggen fehlgeschlagen!", + 'MEMBER_NO_CATS' => "Es wurden bis jetzt noch keine Kategorien eingerichtet!", + 'SELECT_CAT' => "Mails aus Kategorie empfangen?", + 'MEMBER_CATS_SAVED' => "Kategorien gespeichert.", + 'YOUR_PERSONAL_REFLINK' => "Ihr persönlicher Ref-Link zum Werben neuer Mitglieder lautet", + 'YOUR_REFCLICKS' => "Klicks auf Ihren Referal-Link", + 'CLICKS' => "Klicks", + 'YOU_REFERRAL_ONE' => "Sie haben heute ein neues Mitglied für unseren {?mt_word?} geworben!\n\nHier sehen Sie genau, in welcher Ebene Sie ihn geworben haben:", + 'YOU_THANX_REFERRAL' => "Sie werden nun auch weiterhin {?POINTS?} über diese geworbene Person erhalten.\n\nVielen Dank für Ihr Mitwerben! Wir wünschen Ihnen noch weiterhin viele neue Referals!\n\nMit freundlichen Grüßen,", + 'POINTS_REF_REGISTER' => "Referal-Pauschale und prozentual vom Anmeldebonus!", + 'NO_REFLEVEL_LEFT' => "Keine Referal-Ebenen mehr verfügbar! Bitte melden Sie sich bei uns.", + 'ENGINE' => "{?mt_word?}-Engine", + 'ADD_NEW_PAYMENT' => "Neue Mailvergütung hinzufügen", + 'ENTER_PAY_TIME' => "Wartezeit", + 'ENTER_PAY_PAYMENT' => "Vergütete {?POINTS?}", + 'ENTER_PAY_PRICE' => "{?POINTS?}-Kosten", + 'ENTER_PAY_TITLE' => "Mailname", + 'ADD_PAYMENT' => "Mailvergütung hinzufügen", + 'EDIT_DEL_PAYMENT' => "Mailvergütung editieren / löschen", + 'PAY_TIME' => "Wartezeit", + 'PAY_PAYMENT' => "Vergütete {?POINTS?}", + 'PAY_PRICE' => "{?POINTS?}-Kosten", + 'PAY_TITLE' => "Mailname", + 'EDIT_PAY' => "Editeren", + 'DEL_PAY' => "Löschen", + 'ADD_NEW_REFBANNER' => "Neuen Banner hinzufügen", + 'ENTER_URL' => "Banner-URL", + 'ENTER_ALTERNATE' => "Alternativen Text", + 'SELECT_VISIBLE' => "Ist der Banner aktiv?", + 'ADD_REFBANNER' => "Banner hinzufügen", + 'EDIT_DEL_REFBANNER' => "Werbebanner editieren / löschen", + 'VIEWS' => "Views", + 'REF_URL' => "Banner", + 'REF_TITLE' => "Alternativer Text", + 'REF_CNTR' => "Views", + 'REF_VIS' => "Aktiv?", + 'POINTS_USED' => "Verbrauchte {?POINTS?}", + 'MEMBER_NO_POINTS' => "Sie haben keine {?POINTS?} mehr zum Versenden übrig!", + 'MEMBER_NO_PAYMENTS' => "Der Admin diesen {?mt_word?} hat noch keine Mailarten definiert!", + 'MEMBER_POINTS_LEFT' => "{?POINTS?}-Guthaben zum Mailversand übrig", + 'SELECT_MAIL_TYPE' => "Mailart auswählen", + 'PLEASE_SELECT' => "Bitte auswählen", + 'PER_MAIL' => "{?POINTS?} / Mail", + 'PAYMENT' => "{?POINTS?} Vergütung", + 'SELECT_CATEGORY' => "Zielkategorie", + 'USER_IN_CAT' => "Empfänger", + 'ENTER_RECEIVER' => "Empfängeranzahl", + 'ENTER_SUBJECT' => "Betreffzeile", + 'ENTER_TEXT' => "Werbetext", + 'MEMBER_PLEASE_NOTE' => "Bitte beachten Sie vor dem Absenden:", + 'MEMBER_ENTER_URL' => "URL", + 'CONTINUE_FRAMETESTER' => "Weiter zum Framekiller-Test", + 'MEMBER_URL_TIME_LOCK' => "Sie hatten bereits die selbe URL gebucht:", + 'MEMBER_LAST_TLOCK' => "Ihre letzte Buchung war am", + 'CONFIG_URL_TLOCK' => "Selbe URLs sind buchbar in", + '_AND' => "und", + 'UNKNOWN_CODE' => "Es ist während der Ausführung ein unbekannter Fehler-Code <span class=\"data\">%s</span> enstanden, für den Sie vermutlich nicht verantwortlich sind. Bitte informieren Sie uns über diese Meldung!", + 'MEMBER_TEXT_CONTAINS_URL' => "Ihr Werbetext enthält eine URL, dies ist in unserem {?mt_word?} nicht zulässig. Bitte entfernen Sie diese aus Ihrem Text und versuchen Sie es erneut.", + 'MEMBER_TEXT_OVERLENGTH' => "Ihr Text hat die maximale Textlänge überschritten. Bitte fassen Sie ihn etwas kürzer.", + 'MEMBER_SUBJ_CONTAINS_URL' => "Ihre eingegebe Betreffzeile enthält eine URL, dies ist in unserem {?mt_word?} nicht zulässig. Bitte entfernen Sie diese aus Ihrer Betreffzeile und versuchen Sie es erneut.", + 'MEMBER_URL_BLACK_LISTED' => "Ihre eingegebene URL wurde in unsere Ausschlussliste aufgenommen!", + 'MEMBER_BLIST_TIME' => "Datum der Sperrung war", + 'MEMBER_SELECTED_MORE_RECS' => "Sie haben für diese Kategorie zu viele Empfänger eingegeben!", + 'MEMBER_GO_BACK' => "Zurück zum Buchungsformular", + 'MEMBER_DO_ORDER' => "Mailbuchung so aufgeben!", + 'LOADER_NOT_WORKING' => "Falls die Weiterleitung nicht automatisch in einer Sekunde klappen sollte,", + 'LOADER_CLICK_HERE' => "so kommen Sie hier zur externen Seite weiter", + 'ADMIN_NEW_MAIL_IN_QUEUE' => "Ein Mitglied hat soeben eine Mailbuchung durchgeführt!\n\nSeine Buchung befindet sich nun im Sende-Pool und wird automatisch in 100-Mail-Bloecken versand.\n\nHier sind nochmals seine Daten, gebuchter Text und URL zur Verifizierung", + 'ADMIN_SECOND_MAIL' => "Sie werden bald nochmals benachrichtig, sobald der Versand vollstaendig beendet wurde.", + '_CATEGORY_404' => "Kategorie nicht gefunden!", + '_PAYMENT_404' => "Payment-Typ nicht gefunden!", + 'ORDERED_CATEGORY' => "Gebuchte Kategorie", + 'MEMBER_MAILTYPE' => "Gebuchter Payment-Typ", + 'MEMBER_SUBJECT' => "Betreffzeile in den Mails", + 'MEMBER_URL' => "Gebuchte URL", + 'MEMBER_NEW_MAIL_IN_QUEUE' => "Ihre Mailbuchung befindet sich derzeit in Warteschleife und wird bald ausgesendet!\n\nHier sind nochmals Ihre Daten aus dem Buchungsformular", + 'MEMBER_SECOND_MAIL' => "Sobald Ihre Mailbuchung vollständig gesendet wurde, erhalten Sie eine zweite Mail! Sie können bereits eine weitere Mailbuchung durchführen!", + 'ADMIN_NEW_QUEUE' => "Mailbuchung in Ihrem {?mt_word?}", + 'MEMBER_NEW_QUEUE' => "Vielen Dank fuer die Mailbuchung!", + 'MEMBER_CONTINUE_AREA' => "Weiter zum Mitgliedsbereich", + 'MEMBER_THANX_ORDER' => "Vielen Dank für Ihre Mailbuchung! Es ist eine Mail zu Ihnen unterwegs.", + 'ADMIN_NO_MAILS_IN_POOL' => "Es wurden noch keine Mailbuchungen aufgegeben, kann somit keine Mails anzeigen!", + 'ADMIN_POOL_CONTENT' => "Mailbuchungen im Sende-Pool", + 'POOL_TYPE_UNKNOWN' => "Unbekannt (%s)", + 'POOL_TYPE_TEMP' => "Neuer Auftrag", + 'POOL_TYPE_SEND' => "Gesendet", + 'POOL_TYPE_NEW' => "Wartet auf Versand", + 'POOL_TYPE_ACTIVE' => "Wird versendet", + 'POOL_TYPE_ADMIN' => "Wartet auf Freischaltung", + 'EMAIL_ID' => "Email-ID", + 'EMAIL_SENDER' => "Versender", + 'EMAIL_SUBJECT' => "Betreffzeile", + 'EMAIL_TEXT' => "Gebuchter Text", + 'EMAIL_PAYMENT' => "Mailart", + 'EMAIL_CATEGORY' => "Gebuchte Kategorie", + 'EMAIL_RECEIVERS' => "Anzahl Empfänger", + 'EMAIL_RUIDS' => "User-IDs", + 'EMAIL_POOL_TYPE' => "Derzeitiger Status", + 'EMAIL_TSEND' => "Noch zu sendene Mails", + 'EMAIL_URL' => "Beworbene URL", + 'EMAIL_TYPE' => "Sendestatus", + 'EMAIL_ZIP' => "PLZ", + 'EMAIL_TIME' => "Mindestaufenthalt", + 'EMAIL_IS_NOTIFY' => "Vergütete Benachrichtigungsmail?", + 'ADMIN_TEST_URL' => "URL testen", + 'EMAIL_TIMESTAMP' => "Gebucht am", + 'GUEST_FRAMETESTER_TOP' => "Sollte dieser Text verschwinden, enthält Ihre Webseite einen Frame-Killer!", + 'ADMIN_SELECT_EMAIL_EDIT' => "Email auswählen, um diese zu editieren", + 'RESET_SELECT' => "Auswahl zurücknehmen", + 'ADMIN_EDIT_EMAIL' => "Mailbuchung bearbeiten", + 'ADMIN_CHANGE_EMAIL' => "Änderungen speichern", + 'EDIT_URL' => "URL bearbeiten", + 'EMAIL_EDIT_SUBJ' => "Betreff bearbeiten", + 'EMAIL_EDIT_TEXT' => "Werbetext bearbeiten", + 'ADMIN_UNLOCK_EMAILS' => "Neue Mailbuchungen freischalten", + 'EMAIL_ACCEPT' => "Annehmen", + 'EMAIL_REJECT' => "Ablehnen und umleiten", + 'CANNOT_RE_REGISTER_SESS' => "Kann Sitzungs-Cookies nicht doppelt registrieren oder es liegt ein Script-Fehler vor!", + 'ADMIN_MAILS_ACTIVATED' => "Die Mailbuchungen wurden in den Sende-Pool übertragen und werden bald versand.", + 'ADMIN_REJECTED_URLS' => "URLs auswählen, die in die Black-List aufgenommen werden sollen:", + 'ADMIN_LOCK_URLS' => "URLs in die Black-List aufnehmen", + 'ADMIN_URLS_BLOCKED' => "URLs wurden in die Black-List aufgenommen!", + 'ADMIN_SENDING_DONE' => "Eine gebuchte Mail wurde soeben vollstaendig ausgesendet. Das werbende Mitglied wurde darueber in Kenntnis gesetzt.", + 'ADMIN_NOTIFY_DONE' => "Sollte diese Buchung nicht Ihren AGBs entsprechen, loggen Sie sich bitte in den Admin-Bereich ein und aendern die Mail.", + 'ADMIN_SUBJ_SEND_DONE' => "Vollstaendig: Aussendung einer Werbebbuchung!", + 'MEMBER_SENDING_DONE' => "Ihre gebuchte Mail wurde soeben vollstaendig von unserem System versendet! Wir wuenschen Ihnen viel Erfolg mit Ihrer Werbebuchung!", + 'MEMBER_NOTIFY_DONE' => "Den weiteren Verlauf dieser Werbebuchung koennen Sie im Mitgliedsbereich unter Statistiken verfolgen!", + 'MEMBER_SUBJ_SEND_DONE' => "Ihre Werbebuchung wurde versandt", + 'GUEST_SELECT_LEAST_CATS_1' => "Bitte wählen Sie mindestens <strong><BIG>", + 'GUEST_SELECT_LEAST_CATS_2' => "</BIG></strong> Kategorien aus. Anderfalls erfolgt keine Anmeldung!", + 'MEMBER_POOL_CONTENT' => "Ihre Mails im Sende-Pool", + 'MEMBER_STATS_CONTENT' => "Statistiken versandter Mails", + 'EMAIL_END_SEND' => "Vollständig versendet", + 'EMAIL_CONFIRMED' => "Bestätigt", + 'EMAIL_PERCENT' => "Klickrate", + 'MEMBER_NO_MAILS_TO_CONFIRM' => "Keine Mails übrig zum Bestätigen!", + 'MEMBER_SID' => "Mail-ID", + 'CONFIRM_LINK' => "Bestätigungslink", + 'CONFIRM_LINK2' => "Best.link", + 'MAIL_ALREADY_CONFIRMED' => "Mail bereits vergütet oder Link ist nicht mehr gültig!", + 'MAIL_STATS_404' => "Konnte Daten aus der Statistik-Tabelle nicht laden!", + 'USER_404' => "Mitgliedsdaten nicht gefunden! Sind Sie noch angemeldet?", + 'ADMIN_UNCONFIRMED_ACCOUNTS' => "Hier alle Accounts, deren Email-Adresse nicht bestätigt ist", + '_UID' => "User-ID", + 'REMOTE_IP' => "IP-Nummer", + 'REF_UID' => "Werber-ID", + 'UNKNOWN_STATUS' => "Unbekannter Status <span class=\"data\">%s</span> erkannt!", + 'ACCOUNT_STATUS' => "Account-Status", + 'ACCOUNT_UNCONFIRMED' => "<span class=\"admin_failed\">Unbestätigt</span>", + 'ACCOUNT_CONFIRMED' => "<span class=\"admin_green\">Bestätigt</span>", + 'ACCOUNT_LOCKED' => "Gesperrt", + 'ACCOUNT_DELETED' => "Gelöscht", + 'ADMIN_ALL_ACCOUNTS' => "Alle Mitglieder-Accounts auflisten", + 'ADMIN_NO_NONE_REGISTERED' => "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. ", + 'ADMIN_MEMBER_404' => "Mitglieds-Account <span class=\"data\">%s</span> existiert nicht!", + 'ADMIN_LAST_ONLINE' => "Zuletzt aktiv", + 'ADMIN_LAST_MODULE' => "Letzte Aktion", + 'RECEIVE_MAILS' => "Kann Mails empfangen", + 'REF_CLICKS' => "Klicks auf Ref-Link", + 'TOTAL_LOGINS' => "Logins gesamt", + 'USED_POINTS' => "Ausgegebene {?POINTS?}", + 'MAILS_SENT' => "Mails versendet", + 'HAS_JOINED' => "Beigetreten am", + 'TOTAL_POINTS' => "{?POINTS?} gesamt", + 'TOTAL_REFERRALS' => "Referals gesamt", + 'ADMIN_MEMBER_FUNCTIONS' => "Administrative Funktionen", + 'ADMIN_DEL_USER' => "Löschen", + 'ADMIN_LOCK_USER' => "Sperren", + 'ADMIN_UNLOCK_USER' => "Entsperren", + 'ADMIN_ADD_POINTS' => "{?POINTS?} aufbuchen", + 'ADMIN_EDIT_USER' => "Ändern", + 'ADMIN_ALL_REFS' => "Alle Refs auflisten", + 'BIRTHDAY2' => "Geburtstag", + 'TOTAL_CATS' => "Ausgewählte Kategorien", + 'ADMIN_GOTO_USERLIST' => "Dieser Menüpunkt kann nicht direkt aufgerufen werden. Bitte rufen Sie stattdessen <em><u>User auflisten</u></em> auf.", + 'ADMIN_USER_UPDATED' => "Das Mitgliedsaccount wurde aktualisiert!", + 'ADMIN_LOCKED_YOUR_ACCOUNT' => "Ihr Account wurde von einem unserer Administratoren gesperrt! Bitte halten Sie sich an unsere AGBs.", + 'REASON_LOCKED' => "Grund der Sperrung war", + 'MEMBER_PLEASE_RESPECT' => "Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns. Wir kommen dann in Kontakt mit Ihnen.", + 'ADMIN_LOCKED_SUBJ' => "Ihr Account wurde gesperrt!", + 'ADMIN_UNLOCKED_SUBJ' => "Ihr Account wurde wieder freigegeben!", + 'ADMIN_UNLOCKED_YOUR_ACCOUNT' => "Einer unserer Administratoren hat soeben Ihren Account wieder freigeben! Sie koennen sich nun wieder unter folgender URL einloggen:\n\n{?URL?}/login.php", + 'REASON_UNLOCKED' => "Nachricht vom Admin", + 'ADMIN_WELCOME_BACK' => "Bitte beachten Sie beim naechsten Mal auf unsere AGBs, damit Ihnen diese Unangenehmlichkeiten erspart bleiben.", + 'ADMIN_DEL_ACCOUNT' => "Loeschung Ihres Accounts!", + 'ADMIN_DELETED_YOUR_ACCOUNT' => "Einer unserer Administratoren hat soeben Ihren Account geloescht!", + 'REASON_DELETE' => "Grund der Loeschung war folgender", + 'ADMIN_BYE_BYE' => "Wir wuenschen Ihnen weiterhin noch alles Gute und koennen Sie vielleicht irgentwann einmal wieder begruessen.", + 'ADMIN_ALL_CONFIRMED_EMAIL' => "Alle Ihre Mitglieder haben ihre Email-Adresse bestätigt! Keine Neuanmeldungen vorhanden.", + 'GUEST_CONFIRM_SUBJ' => "Bitte Ihre Email-Adresse bestätigen!", + 'MEMBER_ORDER_ACCEPTED' => "Ihre Mailbuchung wurde freigeschaltet", + 'MEMBER_ORDER_REJECTED' => "Ihre Mailbuchung wurde abgelehnt", + 'THANX_REFERRAL_ONE' => "Vielen Dank fuer die Referal-Werbung!", + 'ADMIN_SEND_MAIL' => "Bonusmail versenden", + 'ADMIN_BONUS_SEND' => "Bonusmail wurde in den Sende-Pool eingefügt!", + 'ENTER_POINTS' => "Vergütung", + 'ENTER_SECONDS' => "Wartezeit", + 'ADMIN_MORE_SELECTED' => "Sie haben mehr Empfänger eingegeben, als das empfangsbereit sind!", + 'ADMIN_BONUS_CONTENT' => "Versendete Bonus-Mails", + 'EMAIL_POINTS' => "Vergütung", + 'EMAIL_SECONDS' => "Wartezeit", + 'POOL_ACTIVE' => "Wird gerade versendet", + 'ALL_MEMBERS' => "Alle Mitglieder", + 'ADMIN_SELECT_USER' => "Mitglied auswählen", + 'ENTER_POINTS_ADD' => "{?POINTS?} zum Aufbuchen", + 'ENTER_ADD_REASON' => "Grund der Aufbuchung", + 'ADMIN_ADDED_POINTS_1' => "Einer unserer Administratoren hat Ihnen soeben", + 'ADMIN_ADDED_POINTS_2' => " {?POINTS?} gutgeschrieben!", + 'ADMIN_ADDED_REASON' => "Grund dazu war folgender", + 'ADMIN_ADD_SUBJ' => "{?POINTS?}-Gutschrift durch unsere Admins!", + 'ADMIN_POINTS_ADDED' => "{?POINTS?} wurden gutgeschrieben. Das Mitglied hat eine Mail erhalten!", + 'MAILS_PER_DAY' => "Mails / Tag", + 'GUEST_CONFIRMED_DONE' => "Danke für die Bestätigung Ihrer Email-Adresse! Es ist eine Mail mit den Login-Daten zu Ihnen unterwegs.", + 'GUEST_CONFIRMED_TWICE' => "Sie haben bereits Ihre Email-Adresse bestätigt oder Ihr Account ist derzeit gesperrt.", + 'GUEST_CONFIRMED_FAILED' => "Bestätigung Ihrer Email-Adresse fehlgeschlagen oder es liegt ein anderer Fehler vor.", + 'VALIDATING_LOGIN' => "Logindaten werden geprüft . . .", + 'MEMBER_ACCOUNT_LOCKED_UNC' => "Kann keine {?POINTS?} gutschreiben, da Ihr Account gesperrt wurde!", + 'MAIL_POSSIBLE_INVALID' => "Konnte keine {?POINTS?} gutschreiben: Daten moeglicherweise beschaedigt!", + 'MEMBER_COOKIES_DISABLED' => "Kann nicht einloggen, da Cookies bei Ihnen deaktiviert sind.", + 'ADMIN_DEL_COMPLETED' => "Account wurde gelöscht! Die {?POINTS?} werden immer in den Jackpot transferiert!", + 'NORMAL_MAIL_PROBLEM' => "Mail vom Mitgliedern bereits gelöscht", + 'BONUS_MAIL_PROBLEM' => "Bonus-Mail bereits gelöscht", + 'GENERAL_MAIL_PROBLEM' => "BUG! BUG! Bitte reporten auf <a href=\"http://bugs.mxchange.org/\" target=\"_blank\" title=\"Link zum MXChange Bug-Tracker\">bugs.mxchange.org</a>.", + 'MEMBER_BACK_JACKPOT' => "{?POINTS?}-Rueckgutschrift", + 'ADMIN_BACK_JACKPOT' => "{?POINTS?}-Aufbuchung fuer Jackpot", + 'MEDIA_DATA' => "Mediendaten", + 'USERS_TOTAL' => "Mitglieder gesamt", + 'USERS_MAX_MAILS' => "Erreichbare Mitglieder", + 'USERS_REC_PER_DAY' => "Heute noch erreichbar", + 'USERS_LINKS' => "Unbestätigte Mails", + 'USERS_STATS' => "Werbebuchungen", + 'USERS_SENT_MAILS' => "Gesendete Mails", + 'USERS_MAX_PER_DAY' => "Versendbare Mails pro Tag", + 'USERS_MAX_REC' => "Heute versendbare Mails", + 'EDIT_CATEGORIES' => "Kategorien ändern", + 'CATEGORY_ID' => "Kategorie-ID", + 'CAT_DESCRIPTION' => "Kategoriebeschreibung", + 'CHANGE_CATS' => "Ändern", + 'SORT_KEY' => "Sortierung", + 'CATEGORIES_SAVED' => "Kategorien gespeichert...", + 'CATEGORIES_DELETED' => "Kategorien gelöscht...", + 'DELETE_CATEGORIES' => "Kategorien löschen", + 'REMOVE_CATS' => "Löschen", + 'EDIT_MRECEIVE' => "Maximal-Werte editieren", + 'DELETE_MRECEIVE' => "Maximal-Werte löschen", + 'MRECEIVE_ID' => "Max-Wert ID", + 'MREC_VALUE' => "Mails pro Tag", + 'MREC_COMMENT' => "Kommentar", + 'CHANGE_MREC' => "Ändern", + 'REMOVE_MREC' => "Löschen", + 'MRECEIVE_SAVED' => "Maximal-Werte gespeichert...", + 'MRECEIVE_DELETED' => "Maximal-Werte gelöscht...", + 'EDIT_REF_DEPTHS' => "Referal-Ebenen editieren", + 'DELETE_REF_DEPTHS' => "Referal-Ebenen löschen", + 'REF_DEPTHS_ID' => "Ref-Level ID", + 'CHANGE_REF' => "Ändern", + 'REMOVE_REF' => "Löschen", + 'REF_DEPTHS_SAVED' => "Referal-Ebenen gespeichert...", + 'REF_DEPTHS_DELETED' => "Referal-Ebenen gelöscht...", + 'EDIT_PAYMENT' => "Mailvergütungen editieren", + 'PAYMENT_ID' => "Vergütungs-ID", + 'CHANGE_PAY' => "Ändern", + 'REMOVE_PAY' => "Löschen", + 'REFERRALS' => "Referals", + 'POINTS_SUM' => "Gesamtsumme", + 'NEW_VERSION_AVAILABLE' => "Neue Version verfügbar!", + 'YOUR_VERSION_IS' => "Installierte Version", + 'ONLINE_VERSION_IS' => "Verfügbare Version", + 'UPDATE_CREATE_TIME' => "Update wurde erstellt", + 'DOWNLOAD_NEW_VERSION' => "Jetzt neue Version herunterladen!", + 'NO_UPDATES_AVAILABLE' => "Keine neuen Updates verfügbar!", + 'NEW_PATCHES_AVAILABLE' => "Neue Entwickler-Patches verfügbar!", + 'PATCH_FNAME' => "Download-Link", + 'PATCH_CTIME' => "Patch erstellt", + 'PATCH_FSIZE' => "Downloadgrösse", + 'KBYTES' => "KBytes", + 'DEFAULT_SUBJECT_LINE' => "Klick-Mail von {?MAIN_TITLE?}", + 'MEBER_UPDATE_PWD_WRONG' => "Sie haben das falsche Passwort eingegeben! Bitte nochmal versuchen!", + 'ADMIN_MEM_NO_CATS_1' => "Das Mitglied <u>", + 'ADMIN_MEM_NO_CATS_2' => "</u> hat keine Kategorien ausgewählt!", + 'USER_ID' => "Mitglied", + 'UNCONFIRMED_LINKS' => "Unbestätigte Mails", + 'ADMIN_MEMBER_LINKS' => "Das Mitglied <span class=\"data\">%s</span> hat alle seine Mails bestätigt.", + 'MEMBER_TOTAL_LINKS_1' => "Es müssen noch <strong>", + 'MEMBER_TOTAL_LINKS_2' => "</strong> Mails von diesem Mitglied bestätigt werden!", + 'ADMIN_DEL_UNCONFIRMED_LINKS' => "Alle unbestätigten Mails löschen", + 'ADMIN_LINKS_DELETED' => "Links für unbestätigte Mails wurden gelöscht!", + 'ADMIN_DEL_LINK_SUBJ' => "Ihr unbestätigen Mails wurden geloescht!", + 'MEMBER_LINKS_LEFT' => "Sie haben <span class=\"data\">%s</span> unbestätigte Mails. Bitte bestätigen Sie diese zuerst. Wenn Sie weniger als <span class=\"data\">%s</span> Mails im Account haben, können Sie auch wieder buchen.", + 'TODAY' => "Heute", + 'MEMBER_PROFILE_LOCKED' => "Sie können Ihren Account erst am <span class=\"data\">%s</span> wieder ändern!", + 'MEMBER_HAS_ZERO_MMAILS' => "Sie haben Ihren Empfang auf <strong>Urlaub</strong> stehen! Bitte stellen Sie unter "Profildaten ändern" den Empfang höher ein!", + 'REF_CLIX' => "Clicks", + 'REF_VIEWS' => "Views", + 'REFBANNER_TOTALS' => "Gesamt", + 'DAYS' => "Tage", + 'GUESTS_ONLINE' => "Gäste", + 'MEMBERS_ONLINE' => "Mitglieder", + 'ADMINS_ONLINE' => "Administratoren", + 'USER_NOW_ONLINE' => "User Online", + 'ADMIN_ONLINE_DETAILS' => "Detailierte Statistik für alle Besucher", + '_REFID' => "Ref-ID", + '_MODULE' => "Modul", + 'MENU_ACTION' => "Hauptmenü", + 'MENU_WHAT' => "Untermenü", + '_IS_ADMIN' => "Administrator", + '_IS_GUEST' => "Gast", + 'LAST_SEEN' => "Zuletzt gesehen", + 'ADMIN_TOTAL_PATCH_SIZES' => "Gesamtgrösse aller Patches", + 'ADMIN_DELETE_BONUS_MAIL' => "Obrige Bonus-Mail löschen", + 'ADMIN_DELETE_NORMAL_MAIL' => "Obrige Normal-Mail löschen", + 'ADMIN_REALLY_DELETE_ALL_MAILS' => "Wollen Sie wirklich alle Mails löschen?", + 'SURNAME_FAMILY' => "Vor- und Nachname", + 'ADMIN_USER_TOTAL_REFS' => "Das Mitglied <span class=\"data\">%s</span> hat bereits <span class=\"data\">%s</span> weitere(s) Mitglied(er) geworben, davon sind <span class=\"data\">%s</span> gesperrt oder nicht bestätigt!", + 'REFS_COUNT' => "Refs", + 'MEMBER_JOINED' => "Beigetreten", + 'ADMIN_EMAIL_DELETED' => "E-Mail wurde aus dem System gelöscht.", + '_ALL' => "alle", + 'PROFILE_LAST_CHANGE' => "Letzte Änderung", + 'PROFILE_OUTDATED' => "Haben Sie Neuigkeiten fuer uns?", + 'PROFILE_NEVER_CHANGED' => "Sie haben noch nie eine Aenderung durchgefuehrt!", + 'PROFILE_UPDATED' => "Profildaten wurden geändert!", + 'SORT_BY' => "Sortieren:", + '_OTHERS' => "Andere", + '_ALL2' => "Alle", + 'WE_HAVE' => "Wir haben", + 'MEMBER_TEST_URL' => "Zur beworbenen Seite", + 'ADMIN_ENTER_REDIRECT_URL' => "URL eingeben, wenn abgelehnt werden soll", + 'MEMBER_NO_REFBANNER_FOUND' => "Es sind noch keine Werbebanner eingerichtet worden. Bitte verwende solange deinen Referal-Link.", + 'ADMIN_ID_404' => "ID <span class=\"data\">%s</span> nicht gefunden!", + 'ADMIN_ASSIGNED_ADMIN' => "Zugewiesener Admin-Login", + 'ADMIN_MEMBER_UID' => "ID des Mitgliedes", + 'ADMIN_TASK_TYPE' => "Aufgabenbereich", + 'ADMIN_TASK_CREATED' => "Task erstellt", + 'ADMIN_NO_ADMIN_ASSIGNED' => "Kein Admin-Login zugewiesen!", + 'ADMIN_UNKNOWN_TASK_TYPE' => "Unbekannter Task-Typ <span class=\"data\">%s</span> im Task <span class=\"data\">%s</span> erkannt!", + 'ADMIN_TASK_SYSTEM_WELCOME' => "Task-Management Ihres {?mt_word2?}", + 'ADMIN_UNSELECT_ALL' => "Alles abwählen", + 'ADMIN_ASSIGN_TASKS' => "Bearbeiten", + 'ADMIN_UNASSIGN_TASKS' => "Zuweisung aufheben", + 'ADMIN_REDIRECT_TASKS' => "An MXChange weiterleiten", + 'PATCHES_APPLIED' => "Patches an der Datenbank durchgeführt!", + 'PATCH_NOTES' => "Bitte beachten Sie, dass wenn bei der Installation die SQL-Dateien nicht automatisch eingespielt werden konnten, dass sie auch hier nicht eingespielt worden sind! Sie müssen sie dann manuell einspielen.", + 'LATEST_PATCH_INSTALLED' => "Es wurde bereits die Datenbank aktualisiert!", + 'PATCH_LISTED' => "Anbei eine Liste der noetigen Dateien:", + 'NO_PATCHES_APPLIED' => "Keine Patches wurden ausgeführt!", + 'LOAD_URL_ERROR_1' => "Konnte nicht weiterleiten, da bereits Kopfinformationen gesendet wurden! <a href=\"", + 'LOAD_URL_ERROR_2' => "\">Bitte klicken Sie hier</a>, um zur URL zu kommen.<br />\n<br />\nDanke.", + 'GUEST_STATS' => "Statistiken unseres {?mt_word2?}", + 'GUEST_STATS_MONTHLY' => "Mitgliederverteilung auf Kalendermonate", + 'GUEST_STATS_CATS' => "Mitgliederverteilung auf Mail-Kategorien", + 'GUEST_STATS_MALES' => "Angemeldete Männer", + 'GUEST_STATS_FEMALES' => "Angemeldete Frauen", + 'GUEST_STATS_TONLINE' => "Heute Online gewesen", + 'GUEST_STATS_YONLINE' => "Gestern Online gewesen", + 'GUEST_STATS_TREGISTER' => "Heutige Anmeldungen", + 'GUEST_STATS_YREGISTER' => "Gestrige Anmeldungen", + 'GUEST_STATS_INACTIVE' => "Mitgliederstatistik deaktiviert", + 'CHANGE_MENUS' => "Ändern", + 'CHANGE_MEMBER_MENU' => "Verdecken, anzeigen, deaktivieren, aktivieren des Mitgliedsmenüs", + 'CHANGE_MENU_1' => "Ändern von <strong>", + 'CHANGE_MENU_2' => "</strong> Menüeinträgen", + 'IS_VISIBLE' => "Wird angezeigt", + 'IS_ACTIVE' => "Aktiviert", + 'CHANGE_ENTRIES' => "Änderungen durchführen", + 'BASE_URL_NOTE' => "Ohne abschliessendem /!", + 'ADMIN_WRONG_CALL' => "Falscher Aufruf einer Aktion oder des Scriptes. Bitte navigieren Sie links weiter.", + 'ADMIN_IS_SYSTEM_TASK' => "System-Task", + 'ADMIN_NEW_EXT_SUBJ' => "Neue Erweiterung gefunden", + 'ADMIN_TASK_SUBJECT' => "Aufgabenbetreff", + 'ADMIN_TASK_TEXT' => "Aufgabentext", + 'ADMIN_REGISTER_EXTENSION' => "Registrieren", + 'ADMIN_REGISTER_EXTENSION_TITLE' => "Erweiterung sofort registrieren", + 'ADMIN_SELECTED_TASKS_ASSIGN' => "Zum Bearbeiten ausgewählte Tasks", + 'ADMIN_REG_FAILED_INVALID' => "Registrierung fehlgeschlagen: Ungütige ID übermittelt!", + 'ADMIN_REG_FAILED_ID_404' => "Registrierung fehlgeschlagen: Erweiterung-ID nicht auffindbar!", + 'ADMIN_REG_FAILED_404' => "Registrierung fehlgeschlagen: Erweiterung <span class=\"data\">%s</span> nicht auffindbar!", + 'ADMIN_REG_FAILED_ASSIGED' => "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder Task ist veraltet!", + 'ADMIN_REG_FAILED_ALREADY' => "Registrierung fehlgeschlagen: Erweiterun bereits installiert.", + 'ADMIN_REG_FAILED_DEPRECATED' => "Registrierung fehlgeschlagen: Erweiterung ist veraltet.", + 'ADMIN_NO_EXTENSION_REGISTERED' => "Derzeit haben Sie keine Erweiterung in Ihrem {?mt_word?} registriert.", + 'ADMIN_EXTENSION_REGISTERED' => "Erweiterung <strong>%s</strong> wurde in Ihrem {?mt_word?} registriert.", + 'ADMIN_EXTENSION_NOT_REGISTERED' => "Erweiterung <strong>%s</strong> wurde in Ihrem {?mt_word?} <u>nicht</u> registriert.", + 'ADMIN_EXT_ALREADY_REGISTERED' => "Erweiterung bereits registriert!", + 'ADMIN_EXT_NO_INFO_FOUND' => "Keine Informationen zu dieser Erweiterung gefunden!", + 'ADMIN_EXT_DOWNLOAD_LINK' => "Download-Link", + 'ADMIN_EXT_FILE_SIZE' => "Downloadgröße", + 'ADMIN_EXT_FILE_CTIME' => "Erweiterung erstellt am", + 'ADMIN_EXT_FILE_VERSION' => "Version (alt)", + 'ADMIN_EXT_TOTAL_FSIZE' => "Downloadgesamtgrösse", + 'ADMIN_EXT_TOTAL_FOUND' => "Gesamt gefundene Erweiterungen", // @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used. -define('ADMIN_EXT_ALREADY_INSTALLED', "Alle <strong><span class=\"data\">%s</span></strong> gefundenen Erweiterungen sind bereits installiert!"); -define('ADMIN_EXT_VERSION', "Version"); -define('ADMIN_EXT_AUTOPURGE_404', "autopurge nicht installiert!"); -define('ADMIN_EXT_BONUS_OUTDATED', "Ihre Bonus-Erweiterung ist veraltet! Version <span class=\"data\">%s</span> oder höher wird benötigt!"); -define('ADMIN_EXT_BONUS_404', "bonus nicht installiert!"); -define('ADMIN_EXT_CSSFILE', "CSS?"); -define('ADMIN_EXT_CHANGED', "Erweiterungen geändert."); -define('ADMIN_EXT_REGISTER_NEXT_LINK', "Weiter zur Task-Übersicht..."); -define('ADMIN_DELETE_ENTRIES', "Löschen"); -define('ADMIN_REGISTERED_EXTENSIONS', "Registrierte Erweiterungen"); -define('ADMIN_EXT_NAME', "Erweiterungsname"); -define('ADMIN_EXT_LANG', "Sprachdatei"); -define('ADMIN_EXT_ADMIN', "Admin-Bereich?"); -define('ADMIN_EXT_ACTIVE', "Aktiviert?"); -define('ADMIN_DE_ACTIVATE', "De-/Aktivieren"); -define('ADMIN_SEARCH_NEW_EXTENSIONS', "Nach neuen Erweiterungen suchen..."); -define('JACKPOT_POINTS', "{?POINTS?} im Jackpot"); -define('CLICK_RATE', "Klickrate"); -define('GUEST_STATS_MODULES', "Klicks in allen Modulen (TOP-10)"); -define('GUEST_STATS_MEMBERS', "Statistiken über unsere Mitglieder"); -define('EDIT_REFBANNER', "Werbebanner editieren"); -define('REQUEST_CONFIRM_LINK_TITLE', "Bestätigungslink erneut anfordern"); -define('GUEST_CONFIRM_LINK_NOTE', "Sie haben Ihren Bestätigungslink verlegt? Kein Problem, hier können Sie ihn erneut anfordern. Geben Sie dazu einfach Ihre angemeldete eMail-Adresse an. Der Link wird Ihnen dann per Mail zugesandt."); -define('REQUEST_CONFIRM_LINK', "Erneut anfordern"); -define('LOGIN_ID_CONFIRMED', "Sie haben bereits Ihre E-Mail Adresse bestätigt!"); -define('CONFIRM_LINK_SENT', "Der Bestätigungslink wurde an Ihre E-Mail Adresse ausgesandt."); -define('REQUEST_CONFIRM_LINK_SUBJ', "Anforderung Ihres Bestaetigunglinkes"); -define('EMAIL_ADDY_404', "Unter der angegebenen E-Mail Adresse konnten wir keinen Account finden! Bitte versuchen Sie es erneut."); -define('SELECT_NONE', "Keine/s/r"); -define('ADMIN_SETUP_STATS_TITLE', "Einstellungen an den Gast-Statistiken"); -define('ADMIN_GSTATS_MEMBERS', "Mitglieder-Statistik zuerst"); -define('ADMIN_GSTATS_MODULES', "TOP10-Modul-Statistik zuerst"); -define('ADMIN_GSTATS_INACTIVE', "Gast-Statistik deaktivieren"); -define('ADMIN_GSTATS_MEMBERS_NOTE', "Die Mitglieder-Statistik zeigt an, wie viele Mitglieder Ihr {?MT_WORD?} hat und wie viele Mitglieder welche Kategorien ausgewählt haben."); -define('ADMIN_GSTATS_MODULES_NOTE', "Zeigt Klicks in den 10 am häufigsten angeklickten Gast- und Mitgliedsmodulen an."); -define('ADMIN_GSTATS_INACTIVE_NOTE', "Deaktiviert die Gast-Statistiken komplett."); -define('DELETE_PAYMENT', "Vergütungen löschen"); -define('REF_PAYOUT', "Wie viele Mails müssen die Mitglieder mindestens bestätigen, um den Willkommensbonus, einmaliger Referal-Bonus usw. gutgeschrieben bekommen?"); -define('ADMIN_EXTENSION_UPDATED', "Erweiterung aktualisiert!"); -define('ADMIN_UPDATE_EXT_SUBJ', "Erweiterung-Update installiert"); -define('MEMBER_ORDER_PAGE1_INTRO', "Mailbuchung - Schritt 1 von 4: PLZ eingeben"); -define('MEMBER_ORDER_PAGE2_INTRO', "Mailbuchung - Schritt 2 von 4: Daten eingeben"); -define('MEMBER_ORDER_PAGE3_INTRO', "Mailbuchung - Schritt 3 von 4: Frame-Killer Test und Absenden"); -define('MEMBER_ORDER_PAGE4_INTRO', "Mailbuchung - Schritt 4 von 4: Vielen Dank!"); -define('MEMBER_ENTER_ZIP_CODE', "PLZ eingeben"); -define('ORDER_PAGE_2', "Weiter zur Seite 2"); -define('UNCONFIRMED_USERIDS', "Unbest./Gesperrte Accounts"); -define('LOCKED_POINTS', "Nicht vergütete {?POINTS?}"); -define('LAST_UPDATE', "Letzte Profiländerung"); -define('LAST_PROFILE_SENT', "Erinnerung gesendet"); -define('USER_REF_PAYOUT', "Noch zu best. Mails"); -define('DISPLAY_REFID', "Ref-ID anzeigen"); -define('SORT_NAVIGATION', "Sortieren"); -define('HIGHER', "Höher"); -define('LOWER', "Niedriger"); -define('MEMBER_SETTINGS_SAVED', "Einstellungen gespeichert."); -define('REMOTE_ADDR_TIMEOUT', "Ein Mitglied ist mit Ihrer IP-Nummer <u>{!REMOTE_ADDR!}</u> bereits registriert! Bitte kontaktieren Sie uns, wenn dies ein Fehler sein sollte!"); -define('IP_TIMEOUT', "IP-Zeitsperre"); -define('ADMIN_PAYOUT_NOT_INSTALLED', "payout-Erweiterung nicht installiert!"); -define('ADMIN_WERNIS_NOT_INSTALLED', "wernis-Erweiterung nicht installiert!"); -define('ADMIN_ADD_MAX_VALUE', "Neuen Maximal-Wert hinzufügen"); -define('ADMIN_CANNOT_CHECK_VERSION', "Konnte Versionsnummer nicht abgleichen! (Fehlende Internet-Verbindung? Server ist down?)"); -define('GUEST_STATS_DEACTIVATED', "Statistiken sind deaktiviert."); -define('GUEST_TOPTEN_STATS', "Die am häufigsten angeklickten Menüs"); -define('GUEST_TOP_GUEST_STATS', "Gastmenü"); -define('GUEST_TOP_MEMBER_STATS', "Mitgliedmenü"); -define('ADMIN_EDIT_BANNER_URL', "Banner-URL ändern"); -define('ADMIN_EDIT_ALTERNATE', "Alternativen Text ändern"); -define('ADMIN_EDIT_POINT_SETTINGS', "Einstellungen an {?POINTS?}vergütungen"); -define('ADMIN_CONFIG_DIRECT_PAY', "Sollen die eingestellte Anzahl an mindest zubestätigener Mails bei {?POINTS?}gutschriften berücksichtig werden oder immer gutgeschrieben werden?"); -define('CHANGE_PROFILE', "Profil ändern"); -define('ADMIN_PASS1', "Passwort eingeben"); -define('ADMIN_PASS2', "Passwortbestätigung"); -define('ADMIN_EDIT_USER_PROFILE', "Editieren eines Mitgliederaccountes"); -define('ADMIN_EDIT_USER_PASSWORD_NOTE', "Geben Sie nur zweimal das Passwort ein, wenn Sie es ändern wollen. Wollen Sie nur Daten ändern, geben Sie bitte keines ein."); -define('POINTS_LOCKED', "Noch wartende {?POINTS?}"); -define('ADMIN_TASK_INFOS', "Infos"); -define('NICKNAME', "Nickname"); -define('EXT_NICKNAME_404', "<div class=\"note\">nickname-Erweiterung fehlt!</div>"); -define('ADMIN_PROBLEM_NO_MENU', "Konnte keine Menüeinträge finden!"); -define('USER_REF_404', "Dieses Mitglied hat keine Referals gemacht."); -define('USER_NICKNAME', "Nickname"); -define('ADMIN_CONFIG_POINTS_DIRECT', "{?POINTS?} immer gutgeschreiben."); -define('ADMIN_CONFIG_POINTS_MAILS', "Anzahl zu best. Mails berücksichtigen."); -define('MEMBER_MORE_POINTS_NEEDED', "Sie haben nicht ausreichend {?POINTS?} übrig, um die Buchung durchzuführen! Bitte stellen Sie weniger Empfänger oder eine kleinere Mailart ein."); -define('CANNOT_SEND_ADMIN_MAILS', "Fehler bei Mailversand an Admin!"); -define('MAILID_CLICK_BUTTON', "Einmal den Button anklicken"); -define('ADMIN_ADD_POINTS_TO_ALL', "Allen Mitgliedern {?POINTS?} gutschreiben"); -define('ADMIN_ALL_POINTS_ADDED', "Allen Mitgliedern wurden die {?POINTS?} gutgeschrieben!"); -define('EMAILS_PAGENAV', "Seite"); -define('_IS_CURRENT_HOME', "Liegt in Home"); -define('_IS_NEW_HOME', "In Home setzen"); -define('ADMIN_CONFIG_HOME', "Legen Sie hier die neue Home-Seite fest"); -define('HOME_ACTION', "Funktion"); -define('HOME_BOTTOM_NOTE', "Es werden nur aktive Menüpunkte aus dem Gasthauptmenü (main) angezeigt."); -define('ADMIN_EDIT', "Ändern"); -define('ADMIN_EDIT_EXTENSIONS', "Ändern von Erweiterungen"); -define('POOL_DELETED', "Bereinigt"); + 'ADMIN_EXT_ALREADY_INSTALLED' => "Alle <strong><span class=\"data\">%s</span></strong> gefundenen Erweiterungen sind bereits installiert!", + 'ADMIN_EXT_VERSION' => "Version", + 'ADMIN_EXT_AUTOPURGE_404' => "autopurge nicht installiert!", + 'ADMIN_EXT_BONUS_OUTDATED' => "Ihre Bonus-Erweiterung ist veraltet! Version <span class=\"data\">%s</span> oder höher wird benötigt!", + 'ADMIN_EXT_BONUS_404' => "bonus nicht installiert!", + 'ADMIN_EXT_CSSFILE' => "CSS?", + 'ADMIN_EXT_CHANGED' => "Erweiterungen geändert.", + 'ADMIN_EXT_REGISTER_NEXT_LINK' => "Weiter zur Task-Übersicht...", + 'ADMIN_DELETE_ENTRIES' => "Löschen", + 'ADMIN_REGISTERED_EXTENSIONS' => "Registrierte Erweiterungen", + 'ADMIN_EXT_NAME' => "Erweiterungsurname", + 'ADMIN_EXT_LANG' => "Sprachdatei", + 'ADMIN_EXT_ADMIN' => "Admin-Bereich?", + 'ADMIN_EXT_ACTIVE' => "Aktiviert?", + 'ADMIN_DE_ACTIVATE' => "De-/Aktivieren", + 'ADMIN_SEARCH_NEW_EXTENSIONS' => "Nach neuen Erweiterungen suchen...", + 'JACKPOT_POINTS' => "{?POINTS?} im Jackpot", + 'CLICK_RATE' => "Klickrate", + 'GUEST_STATS_MODULES' => "Klicks in allen Modulen (TOP-10)", + 'GUEST_STATS_MEMBERS' => "Statistiken über unsere Mitglieder", + 'EDIT_REFBANNER' => "Werbebanner editieren", + 'REQUEST_CONFIRM_LINK_TITLE' => "Bestätigungslink erneut anfordern", + 'GUEST_CONFIRM_LINK_NOTE' => "Sie haben Ihren Bestätigungslink verlegt? Kein Problem, hier können Sie ihn erneut anfordern. Geben Sie dazu einfach Ihre angemeldete eMail-Adresse an. Der Link wird Ihnen dann per Mail zugesandt.", + 'REQUEST_CONFIRM_LINK' => "Erneut anfordern", + 'LOGIN_ID_CONFIRMED' => "Sie haben bereits Ihre E-Mail Adresse bestätigt!", + 'CONFIRM_LINK_SENT' => "Der Bestätigungslink wurde an Ihre E-Mail Adresse ausgesandt.", + 'REQUEST_CONFIRM_LINK_SUBJ' => "Anforderung Ihres Bestaetigunglinkes", + 'EMAIL_ADDRESS_404' => "Unter der angegebenen E-Mail Adresse konnten wir keinen Account finden! Bitte versuchen Sie es erneut.", + 'SELECT_NONE' => "Keine/s/r", + 'ADMIN_SETUP_STATS_TITLE' => "Einstellungen an den Gast-Statistiken", + 'ADMIN_GSTATS_MEMBERS' => "Mitglieder-Statistik zuerst", + 'ADMIN_GSTATS_MODULES' => "TOP10-Modul-Statistik zuerst", + 'ADMIN_GSTATS_INACTIVE' => "Gast-Statistik deaktivieren", + 'ADMIN_GSTATS_MEMBERS_NOTE' => "Die Mitglieder-Statistik zeigt an, wie viele Mitglieder Ihr {?mt_word?} hat und wie viele Mitglieder welche Kategorien ausgewählt haben.", + 'ADMIN_GSTATS_MODULES_NOTE' => "Zeigt Klicks in den 10 am häufigsten angeklickten Gast- und Mitgliedsmodulen an.", + 'ADMIN_GSTATS_INACTIVE_NOTE' => "Deaktiviert die Gast-Statistiken komplett.", + 'DELETE_PAYMENT' => "Vergütungen löschen", + 'REF_PAYOUT' => "Wie viele Mails müssen die Mitglieder mindestens bestätigen, um den Willkommensbonus, einmaliger Referal-Bonus usw. gutgeschrieben bekommen?", + 'ADMIN_EXTENSION_UPDATED' => "Erweiterung aktualisiert!", + 'ADMIN_UPDATE_EXT_SUBJ' => "Erweiterung-Update installiert", + 'MEMBER_ORDER_PAGE1_INTRO' => "Mailbuchung - Schritt 1 von 4: PLZ eingeben", + 'MEMBER_ORDER_PAGE2_INTRO' => "Mailbuchung - Schritt 2 von 4: Daten eingeben", + 'MEMBER_ORDER_PAGE3_INTRO' => "Mailbuchung - Schritt 3 von 4: Frame-Killer Test und Absenden", + 'MEMBER_ORDER_PAGE4_INTRO' => "Mailbuchung - Schritt 4 von 4: Vielen Dank!", + 'MEMBER_ENTER_ZIP_CODE' => "PLZ eingeben", + 'ORDER_PAGE_2' => "Weiter zur Seite 2", + 'UNCONFIRMED_USERIDS' => "Unbest./Gesperrte Accounts", + 'LOCKED_POINTS' => "Nicht vergütete {?POINTS?}", + 'LAST_UPDATE' => "Letzte Profiländerung", + 'LAST_PROFILE_SENT' => "Erinnerung gesendet", + 'USER_REF_PAYOUT' => "Noch zu best. Mails", + 'DISPLAY_REFID' => "Ref-ID anzeigen", + 'SORT_NAVIGATION' => "Sortieren", + 'HIGHER' => "Höher", + 'LOWER' => "Niedriger", + 'MEMBER_SETTINGS_SAVED' => "Einstellungen gespeichert.", + 'REMOTE_ADDR_TIMEOUT' => "Ein Mitglied ist mit Ihrer IP-Nummer <u>{?REMOTE_ADDR?}</u> bereits registriert! Bitte kontaktieren Sie uns, wenn dies ein Fehler sein sollte!", + 'IP_TIMEOUT' => "IP-Zeitsperre", + 'ADMIN_PAYOUT_NOT_INSTALLED' => "payout-Erweiterung nicht installiert!", + 'ADMIN_WERNIS_NOT_INSTALLED' => "wernis-Erweiterung nicht installiert!", + 'ADMIN_ADD_MAX_VALUE' => "Neuen Maximal-Wert hinzufügen", + 'ADMIN_CANNOT_CHECK_VERSION' => "Konnte Versionsnummer nicht abgleichen! (Fehlende Internet-Verbindung? Server ist down?)", + 'GUEST_STATS_DEACTIVATED' => "Statistiken sind deaktiviert.", + 'GUEST_TOPTEN_STATS' => "Die am häufigsten angeklickten Menüs", + 'GUEST_TOP_GUEST_STATS' => "Gastmenü", + 'GUEST_TOP_MEMBER_STATS' => "Mitgliedmenü", + 'ADMIN_EDIT_BANNER_URL' => "Banner-URL ändern", + 'ADMIN_EDIT_ALTERNATE' => "Alternativen Text ändern", + 'ADMIN_EDIT_POINT_SETTINGS' => "Einstellungen an {?POINTS?}vergütungen", + 'ADMIN_CONFIG_DIRECT_PAY' => "Sollen die eingestellte Anzahl an mindest zubestätigener Mails bei {?POINTS?}gutschriften berücksichtig werden oder immer gutgeschrieben werden?", + 'CHANGE_PROFILE' => "Profil ändern", + 'ADMIN_PASS1' => "Passwort eingeben", + 'ADMIN_PASS2' => "Passwortbestätigung", + 'ADMIN_EDIT_USER_PROFILE' => "Editieren eines Mitgliederaccountes", + 'ADMIN_EDIT_USER_PASSWORD_NOTE' => "Geben Sie nur zweimal das Passwort ein, wenn Sie es ändern wollen. Wollen Sie nur Daten ändern, geben Sie bitte keines ein.", + 'POINTS_LOCKED' => "Noch wartende {?POINTS?}", + 'ADMIN_TASK_INFOS' => "Infos", + 'NICKNAME' => "Nickname", + 'EXT_NICKNAME_404' => "<div class=\"note\">nickname-Erweiterung fehlt!</div>", + 'ADMIN_PROBLEM_NO_MENU' => "Konnte keine Menüeinträge finden!", + 'USER_REF_404' => "Dieses Mitglied hat keine Referals gemacht.", + 'USER_NICKNAME' => "Nickname", + 'ADMIN_CONFIG_POINTS_DIRECT' => "{?POINTS?} immer gutgeschreiben.", + 'ADMIN_CONFIG_POINTS_MAILS' => "Anzahl zu best. Mails berücksichtigen.", + 'MEMBER_MORE_POINTS_NEEDED' => "Sie haben nicht ausreichend {?POINTS?} übrig, um die Buchung durchzuführen! Bitte stellen Sie weniger Empfänger oder eine kleinere Mailart ein.", + 'CANNOT_SEND_ADMIN_MAILS' => "Fehler bei Mailversand an Admin!", + 'MAILID_CLICK_BUTTON' => "Einmal den Button anklicken", + 'ADMIN_ADD_POINTS_TO_ALL' => "Allen Mitgliedern {?POINTS?} gutschreiben", + 'ADMIN_ALL_POINTS_ADDED' => "Allen Mitgliedern wurden die {?POINTS?} gutgeschrieben!", + 'EMAILS_PAGENAV' => "Seite", + '_IS_CURRENT_HOME' => "Liegt in Home", + '_IS_NEW_HOME' => "In Home setzen", + 'ADMIN_CONFIG_HOME' => "Legen Sie hier die neue Home-Seite fest", + 'HOME_ACTION' => "Funktion", + 'HOME_BOTTOM_NOTE' => "Es werden nur aktive Menüpunkte aus dem Gasthauptmenü (main) angezeigt.", + 'ADMIN_EDIT' => "Ändern", + 'ADMIN_EDIT_EXTENSIONS' => "Ändern von Erweiterungen", + 'POOL_DELETED' => "Bereinigt", // @TODO Are these constants still used? -define('ONLINE_TIMEOUT_IS_1', "Die Liste zeigt die Besucher der letzten <strong>"); -define('ONLINE_TIMEOUT_IS_2', "</strong> an."); -define('ADMIN_CONFIG_EXTENSIONS_SETTINGS', "Erweiterungs-Management konfigurieren"); -define('ADMIN_VERBOSE_SQL', "SQL-Anweisungen beim Registrieren/Updates/Entfernen ausgeben"); -define('ADMIN_REMOVING_THESE_EXTENSIONS', "Diese Erweiterungen werden deinstalliert"); -define('ADMIN_REMOVE_EXTENSIONS', "Erweiterungen jetzt entfernen"); -define('ADMIN_SQLS_EXECUTED_ON_REMOVAL', "Beim Entfernen ausgeführte SQL-Anweisungen"); -define('ADMIN_NO_ADDITIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausführen!"); -define('ADMIN_SQLS_EXECUTED_ON_UPDATE', "Beim Aktualisieren ausgeführte SQL-Anweisungen"); -define('ADMIN_SQLS_EXECUTED_ON_REGISTER', "Beim Registrieren ausgeführte SQL-Anweisungen"); + 'ONLINE_TIMEOUT_IS_1' => "Die Liste zeigt die Besucher der letzten <strong>", + 'ONLINE_TIMEOUT_IS_2' => "</strong> an.", + 'ADMIN_CONFIG_EXTENSIONS_SETTINGS' => "Erweiterungs-Management konfigurieren", + 'ADMIN_VERBOSE_SQL' => "SQL-Anweisungen beim Registrieren/Updates/Entfernen ausgeben", + 'ADMIN_REMOVING_THESE_EXTENSIONS' => "Diese Erweiterungen werden deinstalliert", + 'ADMIN_REMOVE_EXTENSIONS' => "Erweiterungen jetzt entfernen", + 'ADMIN_SQLS_EXECUTED_ON_REMOVAL' => "Beim Entfernen ausgeführte SQL-Anweisungen", + 'ADMIN_NO_ADDITIONAL_SQLS' => "Keine weiteren SQL-Anweisungen zum Ausführen!", + 'ADMIN_SQLS_EXECUTED_ON_UPDATE' => "Beim Aktualisieren ausgeführte SQL-Anweisungen", + 'ADMIN_SQLS_EXECUTED_ON_REGISTER' => "Beim Registrieren ausgeführte SQL-Anweisungen", // @TODO Are these constants longer used? -define('ADMIN_UNKNOWN_FIELD_TYPE_1', "Unbekannter Datentyp <strong>"); -define('ADMIN_UNKNOWN_FIELD_TYPE_2', "</strong> erkannt!"); -define('ADMIN_ADD_POINTS_TO_USER', "Einem Mitglied {?POINTS?} gutschreiben"); -define('MEMBER_ORDER_DELETED', "Ihre Mailbuchung wurde soeben geloescht"); -define('ADMIN_CALL_NOT_DIRECTLY', "Bitte diesen Menüpunkt nicht direkt aufrufen!"); -define('ADMIN_UNCONFIRMED_POOL_MISSING', "Es fehlen Daten im Sende-Pool zur Mail-ID <span class=\"data\">%s</span> !"); -define('ADMIN_UNCONFIRMED_STATS_MISSING', "Es fehlen Daten in der User-Statistik zur Mail-ID <span class=\"data\">%s</span> !"); -define('ADMIN_UNCONFIRMED_INVALID_LINK', "Ungütigen Link aufgerufen oder Mail ist nicht mehr vorhanden!"); -define('ADMIN_UNCONFIRMED_NO_LINK_LEFT', "Diese Mailbuchung wurde komplett bestätigt!"); -define('ADMIN_CONFIG_REFMODE', "Soll die einmalige Referal-Gutschrift dem Werber alleine oder auch seinem Werber (usw.) gutgeschrieben werden?"); -define('ADMIN_CONFIG_REFMODE_REF', "Werber und seinen Werbern gutschreiben."); -define('ADMIN_CONFIG_REFMODE_DIRECT', "Nur dem direkten Werber gutschreiben."); -define('ADMIN_HEADER_LOCK_ACCOUNT', "Mitgliedsaccount <span class=\"data\">%s</span> sperren"); -define('ADMIN_HEADER_UNLOCK_ACCOUNT', "Mitgliedsaccount <span class=\"data\">%s</span> freigeben"); -define('ADMIN_HEADER_DEL_ACCOUNT', "Mitgliedsaccount <span class=\"data\">%s</span> löschen"); -define('ADMIN_TEXT_LOCK_ACCOUNT', "Möchten Sie den User <span class=\"data\">%s</span> nun sperren? Bitte geben Sie einen Grund der Sperrung mit an!"); -define('ADMIN_TEXT_UNLOCK_ACCOUNT', "Möchten Sie den User <span class=\"data\">%s</span> nun freischalten? Sie können auch optional einen Text mit angeben."); -define('ADMIN_TEXT_DEL_ACCOUNT', "Möchten Sie den User <span class=\"data\">%s</span> nun <strong>unwiederruflich</strong> löschen? Bitte geben Sie einen Grund der Löschung mit an!"); -define('ADMIN_EDIT_HOME_TARGET', "Home-Seite festlegen"); -define('ADMIN_EDIT_HOME_SETTINGS', "Einstellungen an Eingangsseite"); -define('ADMIN_CONFIG_HOME_TITLE', "Einstellungen an der Home-Seite"); -define('ADMIN_CONFIG_INDEX_DELAY', "Verzögerung bevor weitergeleitet wird"); -define('ADMIN_INDEX_MANUAL_FORWARD', "Klicken leitet weiter"); -define('ADMIN_INDEX_NO_DELAY', "Sofort weiterleiten"); -define('ADMIN_CONTINUE_TO_CONFIG', "Weiter zu den Einstellungen"); -define('ADMIN_CONFIG_INDEX_COOKIE', "Wie lange soll der Besucher die Eingangsseite nicht mehr sehen?"); -define('BONUS_EXTENSION_UPGRADE_1', "Bitte aktualisieren Sie Ihre Bonus-Erweiterung auf Version <u>"); -define('BONUS_EXTENSION_UPGRADE_2', "</u> oder neuer!"); -define('_ON', "an"); -define('CLICK_STATISTICS', "Mail-Statistik"); -define('ADMIN_SELECT_DEF_REFID', "Standart Referal-ID bei Anmeldung über <strong>keinen</strong> Ref-Link"); -define('ADMIN_SELECT_REFID_TARGRT', "Ziel-Seite des Referal-Linkes"); -define('ADMIN_REF_TARGET_REGISTER', "Zur Anmeldeseite"); -define('ADMIN_REF_TARGET_INDEX', "Zur Eingangsseite"); -define('ADMIN_INSTALL_THEME', "Theme importieren"); -define('ADMIN_NO_THEMES_FOUND', "Keine Themes gefunden!"); -define('THEME_UNIX', "Uni*-Name"); -define('THEME_NAME', "Theme-Titel"); -define('THEME_AUTHOR', "Author"); -define('THEME_URL', "Download-URL"); -define('THEME_VERSION', "Versionsnummer"); -define('THEME_INSTALL', "Import-Status"); -define('THEME_ACTIVE', "Aktiviert?"); -define('ADMIN_THEME_LIST_NOTE', "Diese Liste zeigt alle auf Ihrem Server abgelegten Themes sortiert nach dem Uni*-Namen an."); -define('ADMIN_CHANGE_STATUS_THEME', "Themes de-/aktivieren"); -define('ADMIN_THEME_NO_OUTPUT', "Problem: Kein Text zum Ausgeben!"); -define('ADMIN_THEMES_UPDATED', "Themes wurden aktualisiert."); -define('ADMIN_THEMES_DELETED', "Themes wurden gelöscht."); -define('ADMIN_THEME_IMPORTED', "Theme <span class=\"data\">%s</span> wurde importiert."); -define('CURR_THEME_IS_1', "Aktuelles Design: <strong>"); -define('CURR_THEME_IS_2', "</strong>"); -define('ADMIN_NO_THEME_INSTALLED_WARNING', "Kein Design installiert!"); -define('CHANGE_THEME', "Design ändern"); -define('ADMIN_SET_AS_NEW_THEME', "Dieses Theme als Standart-Theme setzen"); -define('ADMIN_THEME_NEW_DEFAULT_THEME', "Durch Anklicken des Uni*-Names wird das jeweilige Theme als Standart-Theme gesetzt, welches Ihre Besucher sofort sehen werden."); -define('ENTRY_DELETE', "Eintrag löschen"); -define('ADMIN_NO_MENUS_FOUND', "Keine Menüs gefunden!"); -define('ADMIN_CONFIG_TITLE_SETTINGS', "Einstellungen am Seitentitel"); -define('ADMIN_CONFIG_TITLE_DECORATIONS', "Titeldekorationen"); -define('ADMIN_TITLE_ENABLE_DECORATIONS', "Dekorationen aktivieren"); -define('ADMIN_TITLE_ENABLE_MODULE_TITLE', "Modul-Titel in Seiten titel einblenden"); -define('ADMIN_TITLE_ENABLE_WHAT_TITLE', "Titel vom Menüpunkt einblenden"); -define('ADMIN_TITLE_LEFT', "Linke Seite"); -define('ADMIN_TITLE_MIDDLE', "Mittleres Trennzeichen"); -define('ADMIN_TITLE_RIGHT', "Rechte Seite"); -define('ADMIN_MENU_PROBLEM_TITLE', "Problem im Admin-Menüsystem erkannt"); -define('CONFIRM_ACCOUNT', "Account bestätigen"); -define('CONFIRMATION_LINK', "Hier bestätigen"); -define('CLICK_NOW', "Klick!"); -define('MAILID_LINK', "Best.-Link"); -define('UNKNOWN_MAILID_CODE', "Unbekannter Fehler-Code <span class=\"data\">%s</span> erkannt!"); -define('CHANGE_GUEST_MENU', "Verdecken, anzeigen, deaktivieren, aktivieren des Gastmenüs"); -define('IS_LOCKED', "Ist gesperrt"); -define('ADMIN_REMOVE_STATS_ENTRY', "Hier klicken, um Mitgliederstatistik zu entfernen!"); -define('ADMIN_USER_STATS_REMOVED', "Mitgliederstatistiken entfernt."); -define('MAIL_WILL_NEVER_EXPIRE', "Bestaetigungslink verfaellt nicht."); -define('MEMBER_ENTER_MORE_RECEIVERS', "Geben Sie mindestens ein Empfänger ein!"); -define('MEMBER_NO_MORE_RECEIVERS_FOUND', "Es konnten nicht ausreichend genug empfangsbereite Mitglieder gefunden werden."); -define('ADMIN_USER_PROFILE_TITLE', "Mitgliedsprofil aufrufen"); -define('LIST_UNCONFIRMED_MEMBER_LINKS', "Unbestätigte Maillinks eines Mitgliedes auflisten"); -define('MEMBER_ENTER_MORE_MIN_RECEIVERS', "Geben Sie mehr als <span class=\"data\">%s</span> Empfänger ein!"); -define('NO_TEMPLATE_SUPPLIED', "Keinen Template-Namen uebergeben! Fehler im Script erkannt. Bitte den Webmaster ({?WEBMASTER?}) verstaendigen!"); -define('_OR', "oder"); -define('GUEST_NEW_PASSWORD_SEND', "Neues Passwort ist zu Ihrem Postfach unterwegs!"); -define('UNDER_CONSTRUCTION', "Funktion noch im Aufbau!"); -define('ADMIN_SUB_SUBJ', "{?POINTS?}-Abzug durch unsere Admins"); -define('ADMIN_POINTS_SUBTRACTED', "{?POINTS?} wurden erfolgreich abgezogen!"); -define('ADMIN_ALL_POINTS_SUBTRACTED', "Allen Mitgliedern wurden {?POINTS?} abgezogen!"); -define('ADMIN_SUB_POINTS_FROM_USER', "Abzug von {?POINTS?} eines Mitgliedes"); -define('ENTER_POINTS_SUB', "Abzuziehende {?POINTS?}"); -define('ENTER_SUB_REASON', "Grund des Abzuges"); -define('ADMIN_SUB_POINTS', "{?POINTS?} abziehen"); -define('ADMIN_SUB_POINTS_FROM_ALL', "Allen Mitgliedern {?POINTS?} abziehen"); -define('PATCH_DESCRIPTION', "Beschreibung zum Patch"); -define('DOWNLOAD_SVN', "SVN-Version herunterladen"); -define('SVN_REPOSITORY', "SVN-Repository"); -define('SVN_CHECKOUT_COMMAND', "SVN auschecken mit:"); -define('DOWNLOAD_NOW', "Jetzt downloaden!"); -define('ADMIN_MEMBER_STATS_TITLE', "Einstellungen an der Mitglieder-Statistik"); -define('ADMIN_MEMBER_STATS_LIMIT', "Anzahl Mailbuchungen pro Seite (<strong>Nicht verwendet!</strong>)"); -define('MEMBER_NO_THEMES_FOUND', "Keine Design gefunden!"); -define('MEMBER_THEME_LIST_NOTE', "Wenn Sie Fragen zu einem der Designs haben, wenden Sie sich bitte an den jeweiligen Autor!"); -define('MEMBER_SAVE_THEME', "Design speichern"); -define('MEMBER_THEME_LIST_USAGE', "Wählen Sie unten ein neues Design aus und klicken Sie auf <strong>Theme abspeichern</strong>, das Design wird dann nur für Sie dauerhaft geändert."); -define('MEMBER_THEME_SAVED', "Design gespeichert."); -define('TASK_NO_TITLE', "Aufgabe ohne SQL-Anweisungen"); -define('UNCONFIRMED_LOCKED', "Anzahl zu best. Mails für Willkommensgutschrift"); -define('CONFIRMED_MAILS', "Bereits best. Mails"); -define('_YEARS' , "Jahre"); -define('_MONTHS' , "Monate"); -define('_WEEKS' , "Wochen"); -define('_DAYS' , "Tage"); -define('_HOURS' , "Stunden"); -define('_MINUTES', "Minuten"); -define('_SECONDS', "Sekunden"); -define('SORT_ASCENDING', "Aufsteigend"); -define('SORT_DESCENDING', "Absteigend"); -define('INVALID_EMAIL_ADDRESS_ENTERED', "Ungütige EMail-Adresse eingegeben!"); -define('NEVER_HAPPENED', "Nie"); -define('WRONG_DB_SELECTED', "Falsche oder fehlende Datenbank ausgewählt!"); -define('NO_CONFIG_FOUND', "Keine Konfigurationsdaten gefunden! (Leere Datenbank? Oder haben Sie die SQL-Dateien in andere Datenbank eingespielt?)"); -define('NO_CONFIG_FOUND_TITLE', "Keine Konfigurationsdaten gefunden!"); -define('SORTING_KEY', "Sortierung"); -define('ADMIN_ADD_BANNER', "Neuen Banner hinzufügen"); -define('ADMIN_ENTER_BANNER_URL', "Banner-URL"); -define('ADMIN_ENTER_ALTERNATE_TEXT', "Alternativen Text"); -define('ADMIN_SELECT_BANNER_ACTIVE', "Ist der Banner aktiv?"); -define('ADMIN_SUBMIT_BANNER', "Banner hinzufügen"); -define('ADMIN_LIST_REFERRALS_1', "Referal-Übersicht des Mitgliedes "); -define('ADMIN_LIST_REFERRALS_2', " in allen Ebenen:"); -define('ADMIN_LIST_REFERRALS_LEVEL_1', "Referals in Ebene "); -define('ADMIN_LIST_REFERRALS_LEVEL_2', ":"); -define('ADMIN_LIST_REFERRALS_NOTE', "<strong>Änderung:</strong> Klicken Sie die User-ID an und gelangen Sie zum Mitgliederprofil. Klicken Sie Anzahl Referals an, werden die Referals des jeweiligen Mitgliedes aufgelistet."); -define('ADMIN_NORMAL_MAIL_ALREADY_DELETED', "Mitglieder-Mail bereits gelöscht!"); -define('INITIAL_RELEASE', "Erste Alpha-Version"); -define('NO_UPDATE_NOTES', "Keine Update-Hinweise gefunden!"); -define('MYSQL_QUERY_STRING', "MySQL-Abfragebefehl war:"); + 'ADMIN_UNKNOWN_FIELD_TYPE_1' => "Unbekannter Datentyp <strong>", + 'ADMIN_UNKNOWN_FIELD_TYPE_2' => "</strong> erkannt!", + 'ADMIN_ADD_POINTS_TO_USER' => "Einem Mitglied {?POINTS?} gutschreiben", + 'MEMBER_ORDER_DELETED' => "Ihre Mailbuchung wurde soeben geloescht", + 'ADMIN_CALL_NOT_DIRECTLY' => "Bitte diesen Menüpunkt nicht direkt aufrufen!", + 'ADMIN_UNCONFIRMED_POOL_MISSING' => "Es fehlen Daten im Sende-Pool zur Mail-ID <span class=\"data\">%s</span> !", + 'ADMIN_UNCONFIRMED_STATS_MISSING' => "Es fehlen Daten in der User-Statistik zur Mail-ID <span class=\"data\">%s</span> !", + 'ADMIN_UNCONFIRMED_INVALID_LINK' => "Ungütigen Link aufgerufen oder Mail ist nicht mehr vorhanden!", + 'ADMIN_UNCONFIRMED_NO_LINK_LEFT' => "Diese Mailbuchung wurde komplett bestätigt!", + 'ADMIN_CONFIG_REFMODE' => "Soll die einmalige Referal-Gutschrift dem Werber alleine oder auch seinem Werber (usw.) gutgeschrieben werden?", + 'ADMIN_CONFIG_REFMODE_REF' => "Werber und seinen Werbern gutschreiben.", + 'ADMIN_CONFIG_REFMODE_DIRECT' => "Nur dem direkten Werber gutschreiben.", + 'ADMIN_HEADER_LOCK_ACCOUNT' => "Mitgliedsaccount <span class=\"data\">%s</span> sperren", + 'ADMIN_HEADER_UNLOCK_ACCOUNT' => "Mitgliedsaccount <span class=\"data\">%s</span> freigeben", + 'ADMIN_HEADER_DEL_ACCOUNT' => "Mitgliedsaccount <span class=\"data\">%s</span> löschen", + 'ADMIN_TEXT_LOCK_ACCOUNT' => "Möchten Sie den User <span class=\"data\">%s</span> nun sperren? Bitte geben Sie einen Grund der Sperrung mit an!", + 'ADMIN_TEXT_UNLOCK_ACCOUNT' => "Möchten Sie den User <span class=\"data\">%s</span> nun freischalten? Sie können auch optional einen Text mit angeben.", + 'ADMIN_TEXT_DEL_ACCOUNT' => "Möchten Sie den User <span class=\"data\">%s</span> nun <strong>unwiederruflich</strong> löschen? Bitte geben Sie einen Grund der Löschung mit an!", + 'ADMIN_EDIT_HOME_TARGET' => "Home-Seite festlegen", + 'ADMIN_EDIT_HOME_SETTINGS' => "Einstellungen an Eingangsseite", + 'ADMIN_CONFIG_HOME_TITLE' => "Einstellungen an der Home-Seite", + 'ADMIN_CONFIG_INDEX_DELAY' => "Verzögerung bevor weitergeleitet wird", + 'ADMIN_INDEX_MANUAL_FORWARD' => "Klicken leitet weiter (kein JavaScript)", + 'ADMIN_INDEX_NO_DELAY' => "Sofort weiterleiten (302 Server-Redirect)", + 'ADMIN_CONTINUE_TO_CONFIG' => "Weiter zu den Einstellungen", + 'ADMIN_CONFIG_INDEX_COOKIE' => "Wie lange soll der Besucher die Eingangsseite nicht mehr sehen?", + 'BONUS_EXTENSION_UPGRADE_1' => "Bitte aktualisieren Sie Ihre Bonus-Erweiterung auf Version <u>", + 'BONUS_EXTENSION_UPGRADE_2' => "</u> oder neuer!", + '_ON' => "an", + 'CLICK_STATISTICS' => "Mail-Statistik", + 'ADMIN_SELECT_DEF_REFID' => "Standart Referal-ID bei Anmeldung über <strong>keinen</strong> Ref-Link", + 'ADMIN_SELECT_REFID_TARGRT' => "Ziel-Seite des Referal-Linkes", + 'ADMIN_REF_TARGET_REGISTER' => "Zur Anmeldeseite", + 'ADMIN_REF_TARGET_INDEX' => "Zur Eingangsseite", + 'ADMIN_INSTALL_THEME' => "Theme importieren", + 'ADMIN_NO_THEMES_FOUND' => "Keine Themes gefunden!", + 'THEME_UNIX' => "Uni*-Name", + 'THEME_NAME' => "Theme-Titel", + 'THEME_AUTHOR' => "Author", + 'THEME_URL' => "Download-URL", + 'THEME_VERSION' => "Versionsnummer", + 'THEME_INSTALL' => "Import-Status", + 'THEME_ACTIVE' => "Aktiviert?", + 'ADMIN_THEME_LIST_NOTE' => "Diese Liste zeigt alle auf Ihrem Server abgelegten Themes sortiert nach dem Uni*-Namen an.", + 'ADMIN_CHANGE_STATUS_THEME' => "Themes de-/aktivieren", + 'ADMIN_THEME_NO_OUTPUT' => "Problem: Kein Text zum Ausgeben!", + 'ADMIN_THEMES_UPDATED' => "Themes wurden aktualisiert.", + 'ADMIN_THEMES_DELETED' => "Themes wurden gelöscht.", + 'ADMIN_THEME_IMPORTED' => "Theme <span class=\"data\">%s</span> wurde importiert.", + 'CURR_THEME_IS_1' => "Aktuelles Design: <strong>", + 'CURR_THEME_IS_2' => "</strong>", + 'ADMIN_NO_THEME_INSTALLED_WARNING' => "Kein Design installiert!", + 'CHANGE_THEME' => "Design ändern", + 'ADMIN_SET_AS_NEW_THEME' => "Dieses Theme als Standart-Theme setzen", + 'ADMIN_THEME_NEW_DEFAULT_THEME' => "Durch Anklicken des Uni*-Names wird das jeweilige Theme als Standart-Theme gesetzt, welches Ihre Besucher sofort sehen werden.", + 'ENTRY_DELETE' => "Eintrag löschen", + 'ADMIN_NO_MENUS_FOUND' => "Keine Menüs gefunden!", + 'ADMIN_CONFIG_TITLE_SETTINGS' => "Einstellungen am Seitentitel", + 'ADMIN_CONFIG_TITLE_DECORATIONS' => "Titeldekorationen", + 'ADMIN_TITLE_ENABLE_DECORATIONS' => "Dekorationen aktivieren", + 'ADMIN_TITLE_ENABLE_MODULE_TITLE' => "Modul-Titel in Seiten titel einblenden", + 'ADMIN_TITLE_ENABLE_WHAT_TITLE' => "Titel vom Menüpunkt einblenden", + 'ADMIN_TITLE_LEFT' => "Linke Seite", + 'ADMIN_TITLE_MIDDLE' => "Mittleres Trennzeichen", + 'ADMIN_TITLE_RIGHT' => "Rechte Seite", + 'ADMIN_MENU_PROBLEM_TITLE' => "Problem im Admin-Menüsystem erkannt", + 'CONFIRM_ACCOUNT' => "Account bestätigen", + 'CONFIRMATION_LINK' => "Hier bestätigen", + 'CLICK_NOW' => "Klick!", + 'MAILID_LINK' => "Best.-Link", + 'UNKNOWN_MAILID_CODE' => "Unbekannter Fehler-Code <span class=\"data\">%s</span> erkannt!", + 'CHANGE_GUEST_MENU' => "Verdecken, anzeigen, deaktivieren, aktivieren des Gastmenüs", + 'IS_LOCKED' => "Ist gesperrt", + 'ADMIN_REMOVE_STATS_ENTRY' => "Hier klicken, um Mitgliederstatistik zu entfernen!", + 'ADMIN_USER_STATS_REMOVED' => "Mitgliederstatistiken entfernt.", + 'MAIL_WILL_NEVER_EXPIRE' => "Bestaetigungslink verfaellt nicht.", + 'MEMBER_ENTER_MORE_RECEIVERS' => "Geben Sie mindestens ein Empfänger ein!", + 'MEMBER_NO_MORE_RECEIVERS_FOUND' => "Es konnten nicht ausreichend genug empfangsbereite Mitglieder gefunden werden.", + 'ADMIN_USER_PROFILE_TITLE' => "Mitgliedsprofil aufrufen", + 'LIST_UNCONFIRMED_MEMBER_LINKS' => "Unbestätigte Maillinks eines Mitgliedes auflisten", + 'MEMBER_ENTER_MORE_MIN_RECEIVERS' => "Geben Sie mehr als <span class=\"data\">%s</span> Empfänger ein!", + 'NO_TEMPLATE_SUPPLIED' => "Keinen Template-Namen uebergeben! Fehler im Script erkannt. Bitte den Webmaster ({?WEBMASTER?}) verstaendigen!", + '_OR' => "oder", + 'GUEST_NEW_PASSWORD_SEND' => "Neues Passwort ist zu Ihrem Postfach unterwegs!", + 'UNDER_CONSTRUCTION' => "Funktion noch im Aufbau!", + 'ADMIN_SUB_SUBJ' => "{?POINTS?}-Abzug durch unsere Admins", + 'ADMIN_POINTS_SUBTRACTED' => "{?POINTS?} wurden erfolgreich abgezogen!", + 'ADMIN_ALL_POINTS_SUBTRACTED' => "Allen Mitgliedern wurden {?POINTS?} abgezogen!", + 'ADMIN_SUB_POINTS_FROM_USER' => "Abzug von {?POINTS?} eines Mitgliedes", + 'ENTER_POINTS_SUB' => "Abzuziehende {?POINTS?}", + 'ENTER_SUB_REASON' => "Grund des Abzuges", + 'ADMIN_SUB_POINTS' => "{?POINTS?} abziehen", + 'ADMIN_SUB_POINTS_FROM_ALL' => "Allen Mitgliedern {?POINTS?} abziehen", + 'PATCH_DESCRIPTION' => "Beschreibung zum Patch", + 'DOWNLOAD_SVN' => "SVN-Version herunterladen", + 'SVN_REPOSITORY' => "SVN-Repository", + 'SVN_CHECKOUT_COMMAND' => "SVN auschecken mit:", + 'DOWNLOAD_NOW' => "Jetzt downloaden!", + 'ADMIN_MEMBER_STATS_TITLE' => "Einstellungen an der Mitglieder-Statistik", + 'ADMIN_MEMBER_STATS_LIMIT' => "Anzahl Mailbuchungen pro Seite (<strong>Nicht verwendet!</strong>)", + 'MEMBER_NO_THEMES_FOUND' => "Keine Design gefunden!", + 'MEMBER_THEME_LIST_NOTE' => "Wenn Sie Fragen zu einem der Designs haben, wenden Sie sich bitte an den jeweiligen Autor!", + 'MEMBER_SAVE_THEME' => "Design speichern", + 'MEMBER_THEME_LIST_USAGE' => "Wählen Sie unten ein neues Design aus und klicken Sie auf <strong>Theme abspeichern</strong>, das Design wird dann nur für Sie dauerhaft geändert.", + 'MEMBER_THEME_SAVED' => "Design gespeichert.", + 'TASK_NO_TITLE' => "Aufgabe ohne SQL-Anweisungen", + 'UNCONFIRMED_LOCKED' => "Anzahl zu best. Mails für Willkommensgutschrift", + 'CONFIRMED_MAILS' => "Bereits best. Mails", + '_YEARS' , "Jahre", + '_MONTHS' , "Monate", + '_WEEKS' , "Wochen", + '_DAYS' , "Tage", + '_HOURS' , "Stunden", + '_MINUTES' => "Minuten", + '_SECONDS' => "Sekunden", + 'SORT_ASCENDING' => "Aufsteigend", + 'SORT_DESCENDING' => "Absteigend", + 'INVALID_EMAIL_ADDRESS_ENTERED' => "Ungütige EMail-Adresse eingegeben!", + 'NEVER_HAPPENED' => "Nie", + 'WRONG_DB_SELECTED' => "Falsche oder fehlende Datenbank ausgewählt!", + 'NO_CONFIG_FOUND' => "Keine Konfigurationsdaten gefunden! (Leere Datenbank? Oder haben Sie die SQL-Dateien in andere Datenbank eingespielt?)", + 'NO_CONFIG_FOUND_TITLE' => "Keine Konfigurationsdaten gefunden!", + 'SORTING_KEY' => "Sortierung", + 'ADMIN_ADD_BANNER' => "Neuen Banner hinzufügen", + 'ADMIN_ENTER_BANNER_URL' => "Banner-URL", + 'ADMIN_ENTER_ALTERNATE_TEXT' => "Alternativen Text", + 'ADMIN_SELECT_BANNER_ACTIVE' => "Ist der Banner aktiv?", + 'ADMIN_SUBMIT_BANNER' => "Banner hinzufügen", + 'ADMIN_LIST_REFERRALS_1' => "Referal-Übersicht des Mitgliedes ", + 'ADMIN_LIST_REFERRALS_2' => " in allen Ebenen:", + 'ADMIN_LIST_REFERRALS_LEVEL_1' => "Referals in Ebene ", + 'ADMIN_LIST_REFERRALS_LEVEL_2' => ":", + 'ADMIN_LIST_REFERRALS_NOTE' => "<strong>Änderung:</strong> Klicken Sie die User-ID an und gelangen Sie zum Mitgliederprofil. Klicken Sie Anzahl Referals an, werden die Referals des jeweiligen Mitgliedes aufgelistet.", + 'ADMIN_NORMAL_MAIL_ALREADY_DELETED' => "Mitglieder-Mail bereits gelöscht!", + 'INITIAL_RELEASE' => "Erste Alpha-Version", + 'NO_UPDATE_NOTES' => "Keine Update-Hinweise gefunden!", + 'MYSQL_QUERY_STRING' => "MySQL-Abfragebefehl war:", // Until this line goes en.ph (please translate it to english!) -define('MEMBER_NO_MAILS_IN_POOL', "Sie haben noch keine Mailbuchungen aufgegeben! Es können somit Ihnen auch keine angezeigt werden."); -define('ADMIN_CONFIG_ADMIN_MENU_HEADER', "Einstellungen am Adminmenü"); -define('ADMIN_SELECT_MENU_TYPE', "Menütyp auswählen"); -define('ADMIN_MENU_NEW', "Neues Menüsystem mit "logischen Bereichen""); -define('ADMIN_MENU_OLD', "Herkömliches Menüsystem links im Browser"); -define('ADMIN_BACK_TO_GUEST_MENU', "Zum Gastmenü zurück..."); -define('ADMIN_LOGOUT_NOW', "Aus dem Admin-Bereich ausloggen"); -define('ADMIN_LOGOUT_NOTE', "Loggen Sie sich immer aus dem Admin-Bereich aus, wenn Sie beabsichten, ihn nicht mehr zu benutzen. Auch sollten Sie dies <strong>auf jedem Fall</strong> in einem Internet-Cafe vor Verlassen des Platzes tun!"); -define('ADMIN_LOGOUT_QUESTION', "Wollen Sie sich jetzt ausloggen?"); -define('ADMIN_LA_MODE', "Menütyp"); -define('ADMIN_ACCOUNT_NOREFS_404', "Es wurden keine Mitgliederaccounts ohne Werber gefunden, oder verändern Sie die Aussortierung!"); -define('ADMIN_SALT_LENGTH', "Länge des Zufallshashes für alle Passwörter"); -define('MEMBER_PASS_SALTED', "Passwort wegen Update geaendert"); -define('MEMBER_PASSWORD_ERROR', "Fehler beim Abgleichen der Passwörter!"); -define('ADMIN_PASS_SALTED', "Admin-Password wegen Update geaendert"); -define('ADMIN_SALT_LENGTH_NOTE', "Um für alle Accounts (Mitglieder/Admins derzeit) neue Passwörter zu generieren, lassen Sie das Eingabefeld <strong>{--ADMIN_SALT_LENGTH--}</strong> leer oder geben Sie eine <strong>0</strong> ein! <strong>Vorsicht!</strong> Sie müssen sich dann anschliessend erneut einloggen!"); -define('LOGIN_FAILED_GENERAL', "Genereller Loginfehler! Bitte kontaktieren Sie den Webmaster!"); -define('DEFAULT_MT_WORD', "Mailtausch"); -define('DEFAULT_MT_WORD2', "Mailtausches"); -define('DEFAULT_MT_WORD3', "Mailtauscher"); -define('DEFAULT_POINTS', "Punkte"); -define('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE', "{?POINTS?}-Übersicht derzeit nicht verfügbar."); -define('ADMIN_NOTHING_SELECTED_CHANGE', "Sie haben nichts zum Ändern des Status ausgewählt."); -define('TEMPLATE_CONTENT', "Template-Content:"); -define('TEMPLATE_DATA', "Template-Daten:"); -define('ADMIN_LINK_DEL_USER_TITLE', "Mitglied löschen (mit Abfrage)"); -define('ADMIN_LINK_EDIT_USER_TITLE', "Mitglied editieren"); -define('ADMIN_LINK_LOCK_USER_TITLE', "Mitglied sperren"); -define('ADMIN_LINK_UNLOCK_USER_TITLE', "Mitglied entsperren"); -define('ADMIN_LINK_ADD_POINTS_TITLE', "{?POINTS?} aufbuchen"); -define('ADMIN_LINK_SUB_POINTS_TITLE', "{?POINTS?} abziehen"); -define('MESSAGE_HEADER', "Hinweis:"); -define('ADMIN_ALPHA_SELCTION', "Alphabetische Suche:"); -define('CATEGORY_NOT_SAVED', "Kategorie <span class=\"data\">%s</span> nicht gespeichert."); -define('USER_ACCOUNT_404', "User-Account <span class=\"data\">%s</span> nicht gefunden."); -define('ADMIN_CONTACT_USER', "Mitglied kontaktieren"); -define('CONTACT_USER', "Mitglied kontaktieren"); -define('ADMIN_USER_CONTACTED', "Das Mitglied wurde per EMail kontaktiert."); -define('ADMIN_CONTACT_USER_SUBJECT', "Nachricht vom {?MT_WORD?} {?MAIN_TITLE?}"); -define('MEMBER_CANNOT_LOAD_PROFILE', "Fehler beim Laden des Mitgliederprofiles. Bitte Support benachrichten."); -define('SHOW_TIMINGS_RUNTIME', "Laufzeit:"); -define('SHOW_TIMINGS_SQL_QUERIES', "SQL-Abfragen:"); -define('SHOW_TIMINGS_NUM_TEMPLATES', "Templates:"); -define('SHOW_TIMINGS_SECS', "Sek."); -define('ADMIN_OPTION_MAILID_REDIRECT', "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?"); -define('ADMIN_CONFIG_MAILID_REDIRECT_INDEX', "Auf Hauptseite weiterleiten."); -define('ADMIN_CONFIG_MAILID_REDIRECT_REJECT', "Auf Ablehnungsseite umleiten."); -define('REASON_DIRECT_PAYMENT', "Direkte Gutschrift (siehe evtl. vorangegangene Mail)"); -define('SUBJECT_DIRECT_PAYMENT', "Direkte {?POINTS?}-Gutschrift durch das System"); -define('ADMIN_LOGOUT_SQL_PATCHES_DONE', "Sie wurden automatisch ausgeloggt, da Sie die Erweiterung <strong>sql_patches</strong> installiert haben und dabei das Passort-Hashing geändert/verbessert wurde. Bitte erneut einloggen!"); -define('ADMIN_LOGOUT_SQL_PATCHES_REMOVE', "Sie wurden automatisch ausgeloggt, da Sie die Erweiterung <strong>sql_patches</strong> entfernt haben. Bitte klicken Sie weiter, um jetzt das Passwort neu zu setzen."); -define('ADMIN_POINTS_REPAYED', "Es wurden dem Mitglied <span class=\"data\">%s</span> {?POINTS?} zurückgeschrieben."); -define('ADMIN_POINTS_TO_JACKPOT', "Es wurden <span class=\"data\">%s</span> {?POINTS?} in den Jackpot gelegt."); -define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {?POINTS?} zum zurückbuchen!"); -define('ADMIN_POINTS_SHREDDED', "Es wurden <span class=\"data\">%s</span> {?POINTS?} geschrettert."); -define('EXTENSION_PROBLEM_EXT_INACTIVE', "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> deaktiviert!"); -define('ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE', "Die Erweiterung <span class=\"data\">%s</span> ist derzeit deaktiviert. <a href=\"{?URL?}/modules.php?module=admin&what=extensions\">Hier</a> können Sie diese aktivieren."); -define('EXTENSION_PROBLEM_EXT_NOT_INSTALLED', "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> nicht installiert!"); -define('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED', "Die Erweiterung <span class=\"data\">%s</span> ist derzeit nicht installiert. <a href=\"{?URL?}/modules.php?module=admin&what=extensions\">Hier</a> können Sie diese aktivieren."); -define('EXTENSION_PROBLEM_NOT_INSTALLED', "Erweiterung <span class=\"data\">%s</span> nicht installiert."); -define('EXTENSION_PROBLEM_UNSET_EXT', "Skriptfehler: Parameter <strong>ext</strong> nicht gesetzt!"); -define('EXTENSION_WARNING_EXT_INACTIVE', "Die Erweiterung <span class=\"data\">%s</span> ist nicht aktiv. Dies kann zu Störungen führen.<br />\nBitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>."); -define('EXTENSION_WARNING_USER_LIMIT', "Die Erweiterung <u>user</u> ist nicht aktiv. Die Anzahl User pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>."); -define('ADMIN_PROXY_SETTINGS_INVALID', "Ihre Proxy-Einstellungen scheinen ungültig zu sein!"); -define('ADMIN_EDIT_PROXY_SETTINGS', "Proxy-Einstellungen ändern"); -define('ADMIN_CONFIG_PROXY_HOST', "Hostname oder IP-Nummer:"); -define('ADMIN_CONFIG_PROXY_PORT', "Port-Nummer (z.B. 8085):"); -define('ADMIN_CONFIG_PROXY_USERNAME', "Benuztername (falls vorhanden):"); -define('ADMIN_CONFIG_PROXY_PASSWORD', "Passwort (falls vorhanden):"); -define('EDIT_ENTRIES', "Einträge ändern"); -define('_CATEGORY_NONE', "Keine Kategorie"); -define('__UNUSED', "Im Aufbau"); -define('ADMIN_DELETED_MAILS_COUNT', "Es wurden <span class=\"data\">%s</span> Einträge gelöscht."); -define('EMAIL_DELETE_COUNT', "Buchungseinträge gelöscht"); -define('MXCHANGE_HAS_DIED', "{?TITLE?} ist in Script/Funktion <span class=\"data\">%s</span>, Zeile <span class=\"data\">%s</span> mit folgender Meldung gestorben: <span class=\"data\">%s</span>"); + 'MEMBER_NO_MAILS_IN_POOL' => "Sie haben noch keine Mailbuchungen aufgegeben! Es können somit Ihnen auch keine angezeigt werden.", + 'ADMIN_CONFIG_ADMIN_MENU_HEADER' => "Einstellungen am Adminmenü", + 'ADMIN_SELECT_MENU_TYPE' => "Menütyp auswählen", + 'ADMIN_MENU_NEW' => "Neues Menüsystem mit "logischen Bereichen"", + 'ADMIN_MENU_OLD' => "Herkömliches Menüsystem links im Browser", + 'ADMIN_BACK_TO_GUEST_MENU' => "Zum Gastmenü zurück...", + 'ADMIN_LOGOUT_NOW' => "Aus dem Admin-Bereich ausloggen", + 'ADMIN_LOGOUT_NOTE' => "Loggen Sie sich immer aus dem Admin-Bereich aus, wenn Sie beabsichten, ihn nicht mehr zu benutzen. Auch sollten Sie dies <strong>auf jedem Fall</strong> in einem Internet-Cafe vor Verlassen des Platzes tun!", + 'ADMIN_LOGOUT_QUESTION' => "Wollen Sie sich jetzt ausloggen?", + 'ADMIN_LA_MODE' => "Menütyp", + 'ADMIN_ACCOUNT_NOREFS_404' => "Es wurden keine Mitgliederaccounts ohne Werber gefunden, oder verändern Sie die Aussortierung!", + 'ADMIN_SALT_LENGTH' => "Länge des Zufallshashes für alle Passwörter", + 'MEMBER_PASS_SALTED' => "Passwort wegen Update geaendert", + 'MEMBER_PASSWORD_ERROR' => "Fehler beim Abgleichen der Passwörter!", + 'ADMIN_PASS_SALTED' => "Admin-Password wegen Update geaendert", + 'ADMIN_SALT_LENGTH_NOTE' => "Um für alle Accounts (Mitglieder/Admins derzeit) neue Passwörter zu generieren, lassen Sie das Eingabefeld <strong>{--ADMIN_SALT_LENGTH--}</strong> leer oder geben Sie eine <strong>0</strong> ein! <strong>Vorsicht!</strong> Sie müssen sich dann anschliessend erneut einloggen!", + 'LOGIN_FAILED_GENERAL' => "Genereller Loginfehler! Bitte kontaktieren Sie den Webmaster!", + 'DEFAULT_MT_WORD' => "Mailtausch", + 'DEFAULT_MT_WORD2' => "Mailtausches", + 'DEFAULT_MT_WORD3' => "Mailtauscher", + 'DEFAULT_POINTS' => "Punkte", + 'PROBLEM_POINTS_OVERVIEW_UNAVAILABLE' => "{?POINTS?}-Übersicht derzeit nicht verfügbar.", + 'ADMIN_NOTHING_SELECTED_CHANGE' => "Sie haben nichts zum Ändern des Status ausgewählt.", + 'TEMPLATE_CONTENT' => "Template-Content:", + 'TEMPLATE_DATA' => "Template-Daten:", + 'ADMIN_LINK_DEL_USER_TITLE' => "Mitglied löschen (mit Abfrage)", + 'ADMIN_LINK_EDIT_USER_TITLE' => "Mitglied editieren", + 'ADMIN_LINK_LOCK_USER_TITLE' => "Mitglied sperren", + 'ADMIN_LINK_UNLOCK_USER_TITLE' => "Mitglied entsperren", + 'ADMIN_LINK_ADD_POINTS_TITLE' => "{?POINTS?} aufbuchen", + 'ADMIN_LINK_SUB_POINTS_TITLE' => "{?POINTS?} abziehen", + 'MESSAGE_HEADER' => "Hinweis:", + 'ADMIN_ALPHA_SELCTION' => "Alphabetische Suche:", + 'CATEGORY_NOT_SAVED' => "Kategorie <span class=\"data\">%s</span> nicht gespeichert.", + 'USER_ACCOUNT_404' => "User-Account <span class=\"data\">%s</span> nicht gefunden.", + 'ADMIN_CONTACT_USER' => "Mitglied kontaktieren", + 'CONTACT_USER' => "Mitglied kontaktieren", + 'ADMIN_USER_CONTACTED' => "Das Mitglied wurde per EMail kontaktiert.", + 'ADMIN_CONTACT_USER_SUBJECT' => "Nachricht vom {?mt_word?} {?MAIN_TITLE?}", + 'MEMBER_CANNOT_LOAD_PROFILE' => "Fehler beim Laden des Mitgliederprofiles. Bitte Support benachrichten.", + 'SHOW_TIMINGS_RUNTIME' => "Laufzeit:", + 'SHOW_TIMINGS_SQL_QUERIES' => "SQL-Abfragen:", + 'SHOW_TIMINGS_SQL_TIME' => "SQL-Zeit:", + 'SHOW_TIMINGS_NUM_TEMPLATES' => "Templates:", + 'SHOW_TIMINGS_SECS' => "Sek.", + 'ADMIN_OPTION_MAILID_REDIRECT' => "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?", + 'ADMIN_CONFIG_MAILID_REDIRECT_INDEX' => "Auf Hauptseite weiterleiten.", + 'ADMIN_CONFIG_MAILID_REDIRECT_REJECT' => "Auf Ablehnungsseite umleiten.", + 'REASON_DIRECT_PAYMENT' => "Direkte Gutschrift (siehe evtl. vorangegangene Mail)", + 'SUBJECT_DIRECT_PAYMENT' => "Direkte {?POINTS?}-Gutschrift durch das System", + 'ADMIN_LOGOUT_SQL_PATCHES_DONE' => "Sie wurden automatisch ausgeloggt, da Sie die Erweiterung <strong>sql_patches</strong> installiert haben und dabei das Passort-Hashing geändert/verbessert wurde. Bitte erneut einloggen!", + 'ADMIN_LOGOUT_SQL_PATCHES_REMOVE' => "Sie wurden automatisch ausgeloggt, da Sie die Erweiterung <strong>sql_patches</strong> entfernt haben. Bitte klicken Sie weiter, um jetzt das Passwort neu zu setzen.", + 'ADMIN_POINTS_REPAYED' => "Es wurden dem Mitglied <span class=\"data\">%s {?POINTS?}</span> zurückgeschrieben.", + 'ADMIN_POINTS_TO_JACKPOT' => "Es wurden <span class=\"data\">%s {?POINTS?}</span> in den Jackpot gelegt.", + 'ADMIN_NO_POINTS_REPAYED' => "Die Mailbuchung hatte keine {?POINTS?} zum zurückbuchen!", + 'ADMIN_POINTS_SHREDDED' => "Es wurden <span class=\"data\">%s {?POINTS?}</span> geschrettert.", + 'EXTENSION_PROBLEM_EXT_INACTIVE' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> deaktiviert!", + 'ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit deaktiviert. <a href=\"{?URL?}/modules.php?module=admin&what=extensions\">Hier</a> können Sie diese aktivieren.", + 'EXTENSION_PROBLEM_EXT_NOT_INSTALLED' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> nicht installiert!", + 'ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit nicht installiert. <a href=\"{?URL?}/modules.php?module=admin&what=extensions\">Hier</a> können Sie diese aktivieren.", + 'EXTENSION_PROBLEM_NOT_INSTALLED' => "Erweiterung <span class=\"data\">%s</span> nicht installiert.", + 'EXTENSION_PROBLEM_UNSET_EXT' => "Skriptfehler: Parameter <strong>ext</strong> nicht gesetzt!", + 'EXTENSION_WARNING_EXT_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist nicht aktiv. Dies kann zu Störungen führen.<br />\nBitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>.", + 'EXTENSION_WARNING_USER_LIMIT' => "Die Erweiterung <u>user</u> ist nicht aktiv. Die Anzahl User pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>.", + 'ADMIN_PROXY_SETTINGS_INVALID' => "Ihre Proxy-Einstellungen scheinen ungültig zu sein!", + 'ADMIN_EDIT_PROXY_SETTINGS' => "Proxy-Einstellungen ändern", + 'ADMIN_CONFIG_PROXY_HOST' => "Hostname oder IP-Nummer:", + 'ADMIN_CONFIG_PROXY_PORT' => "Port-Nummer (z.B. 8085):", + 'ADMIN_CONFIG_PROXY_USERNAME' => "Benuztername (falls vorhanden):", + 'ADMIN_CONFIG_PROXY_PASSWORD' => "Passwort (falls vorhanden):", + 'EDIT_ENTRIES' => "Einträge ändern", + '_CATEGORY_NONE' => "Keine Kategorie", + '_UNUSED' => "Im Aufbau", + 'ADMIN_DELETED_MAILS_COUNT' => "Es wurden <span class=\"data\">%s</span> Einträge gelöscht.", + 'EMAIL_DELETE_COUNT' => "Buchungseinträge gelöscht", + 'MXCHANGE_HAS_DIED' => "{?TITLE?} ist in Script/Funktion <span class=\"data\">%s</span>, Zeile <span class=\"data\">%s</span> mit folgender Meldung gestorben: <span class=\"data\">%s</span>", -define('ADMIN_SEND_RESET_LINK_TITLE', "1/4: Administratorkennwort zurücksetzen"); -define('ADMIN_VALIDATE_HASH_TITLE', "2/4: Validierung Iher Logindaten"); -define('ADMIN_RESET_PASSWORD_TITLE', "3/4: Neues Passwort eingeben"); -define('ADMIN_RESET_PASS_DONE_TITLE', "4/4: Neues Passwort gesetzt"); + 'ADMIN_SEND_RESET_LINK_TITLE' => "1/4: Administratorkennwort zurücksetzen", + 'ADMIN_VALIDATE_HASH_TITLE' => "2/4: Validierung Iher Logindaten", + 'ADMIN_RESET_PASSWORD_TITLE' => "3/4: Neues Passwort eingeben", + 'ADMIN_RESET_PASS_DONE_TITLE' => "4/4: Neues Passwort gesetzt", -define('ADMIN_SEND_RESET_LINK_SUBMIT', "Passwort zurücksetzen"); -define('ADMIN_VALIDATE_HASH_SUBMIT', "Adminlogindaten validieren"); -define('ADMIN_RESET_PASSWORD_SUBMIT', "Neues Kennwort setzen"); + 'ADMIN_SEND_RESET_LINK_SUBMIT' => "Passwort zurücksetzen", + 'ADMIN_VALIDATE_HASH_SUBMIT' => "Adminlogindaten validieren", + 'ADMIN_RESET_PASSWORD_SUBMIT' => "Neues Kennwort setzen", -define('ADMIN_SEND_RESET_LINK_NOTE', "Sobald Sie Ihre Email-Adresse eingegeben haben, wird Ihnen Ihr Loginname zugeschickt. Diesen geben Sie in dem nächsten Formular zusammen mit Ihrem neuen Passwort ein. Danach können Sie wieder in den Adminbereich einloggen."); -define('ADMIN_VALIDATE_HASH_NOTE', "Sie haben diesen Link aus einer Mail angeklickt, die Ihnen zuvor zugesandt wurde. Daraus benötigen Sie Ihren Loginnamen, damit Ihre Daten validiert werden können. Nach Abesenden des Formulars können Sie dann Ihr Administratorkennwort ändern."); -define('ADMIN_RESET_PASSWORD_NOTE', "Geben Sie nun zweimal ein neues Kennwort für das angezeigte Administratorlogin ein. Dabei sollten Sie Buchstaben, Zahlen und Sonderzeichen wie Slash, Strich, Unterstrich usw. verwenden, um die Stärke des Passwortes zu maximieren."); + 'ADMIN_SEND_RESET_LINK_NOTE' => "Sobald Sie Ihre Email-Adresse eingegeben haben, wird Ihnen Ihr Loginname zugeschickt. Diesen geben Sie in dem nächsten Formular zusammen mit Ihrem neuen Passwort ein. Danach können Sie wieder in den Adminbereich einloggen.", + 'ADMIN_VALIDATE_HASH_NOTE' => "Sie haben diesen Link aus einer Mail angeklickt, die Ihnen zuvor zugesandt wurde. Daraus benötigen Sie Ihren Loginnamen, damit Ihre Daten validiert werden können. Nach Abesenden des Formulars können Sie dann Ihr Administratorkennwort ändern.", + 'ADMIN_RESET_PASSWORD_NOTE' => "Geben Sie nun zweimal ein neues Kennwort für das angezeigte Administratorlogin ein. Dabei sollten Sie Buchstaben, Zahlen und Sonderzeichen wie Slash, Strich, Unterstrich usw. verwenden, um die Stärke des Passwortes zu maximieren.", -define('ADMIN_ENTER_EMAIL', "Geben Sie Ihre Email-Adresse ein, die Ihrem Adminlogin hinterlegt ist:"); -define('ADMIN_ENTER_LOGIN', "Bitte geben Sie Ihr Administratorlogin ein, dass Sie in der Mail erhalten haben:"); -define('ADMIN_ENTER_PASSWORD1', "Geben Sie Ihr neues Administratorkennwort ein:"); -define('ADMIN_ENTER_PASSWORD2', "Wiederholen Sie das Passwort zur Bestätigung:"); + 'ADMIN_ENTER_EMAIL' => "Geben Sie Ihre Email-Adresse ein, die Ihrem Adminlogin hinterlegt ist:", + 'ADMIN_ENTER_LOGIN' => "Bitte geben Sie Ihr Administratorlogin ein, dass Sie in der Mail erhalten haben:", + 'ADMIN_ENTER_PASSWORD1' => "Geben Sie Ihr neues Administratorkennwort ein:", + 'ADMIN_ENTER_PASSWORD2' => "Wiederholen Sie das Passwort zur Bestätigung:", -define('ADMIN_RESET_PASS', "Ihr Administratorkennwort zurücksetzen?"); -define('ADMIN_NO_LOGIN_WITH_EMAIL', "Kein Administrator-Account mit der angegebenen Email-Adresse gefunden!"); -define('ADMIN_RESET_PASS_LINK_SUBJ', "Zuruecksetzung Ihres Admin-Passwortes"); -define('ADMIN_RESET_LINK_SENT', "Der Reset-Link wurde soeben an Ihre eingegebene Email-Adresse ausgesendet."); -define('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED', "Validierung Ihrer Logindaten fehlgeschlagen. Haben Sie auch den Link aus der Mail angeklickt und Ihren Loginnamen eingegeben?"); -define('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2', "Validierung Ihrer Logindaten fehlgeschlagen. Es liegt ein Fehler im Script vor. Bitte im <a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker</a> den Fehler melden."); -define('ADMIN_SHOW_LOGIN', "Ihr Administratorlogin:"); -define('ADMIN_CHANGE_LOGIN', "Anderes Adminlogin"); -define('ADMIN_PASSWORD_RESET_DONE', "Ihr Administratorkennwort wurde neu gesetzt. Sie können sich jetzt mit Ihren neuen Zugangsdaten im Adminbereich einloggen."); -define('ADMIN_CONTINUE_LOGIN', "Weiter zum Administratorlogin"); -define('ADMIN_RESET_PASS_LINK', "Jetzt Ihr Administratorkennwort zurücksetzen (nötiger Schritt!)"); -define('ADMIN_SUPPORT_FORUM_LINK', "Direktlink zum Support-Forum (neues Fenster)"); -define('ADMIN_SUPPORT_BUGTRACKER_LINK', "Direktlink zum Bug-Tracker (neues Fenster)"); -define('ADMIN_REFERAL_LEVEL_ZERO_NOTICE', "Die Referal-Ebene 0 ist das Mitglied selber und sollte daher auf 100% stehen. Sie sollte auch nicht geändert oder gelöscht werden! Dann erhalten Ihre Mitglieder keine {?POINTS?} gutgeschrieben."); -define('ADMIN_ALL_ENTRIES_REMOVED', "Alle ausgewählten Einträge sind gelöscht."); -define('ADMIN_SOME_ENTRIES_NOT_DELETED', "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> ausgewählten Einträge gelöscht."); -define('ADMIN_ALL_ENTRIES_EDITED', "Alle ausgewählten Einträge sind geändert."); -define('ADMIN_SOME_ENTRIES_NOT_EDITED', "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> ausgewählten Einträge geändert."); -define('USER_NOT_REGISTERED', "Anmeldung hat nicht geklappt! :-( Ist unten eine Fehlermeldung eingeblendet? Bitte beim Support melden."); -define('ADMIN_SELECTION_BOX_TITLE', "Mitglied für Aktion auswählen"); -define('ADMIN_DO_ACTION', "Aktion ausführen"); -define('MEMBER_ORDER_PLEASE_WAIT_TESTER', "Bitte warten Sie den Framekiller-Test ab!"); -define('MEMBER_ORDER_TEST_STARTED', "Framekiller-Test startet..."); -define('MEMBER_ORDER_PLEASE_WAIT_1', "Ihre Seite wird auf Framekiller getestet. Bitte noch "); -define('MEMBER_ORDER_PLEASE_WAIT_2', " Sekunden warten."); -define('ADMIN_LIST_NOREFS_ACCOUNTS', "Auflistung aller Accounts ohne Werber"); -define('ADMIN_NO_REF_LEVELS', "In Ihrem {?MT_WORD?} sind keine Referal-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {?POINTS?} gutgeschrieben. Richten Sie mindestens Referal-Ebene 0 mit 100% Vergütung ein."); -define('ADMIN_SESSION_SAVE_PATH_INVALID', "Pfad für Sitzungsdateien ungütig!"); -define('ADMIN_SESSION_SETTINGS_TITLE', "Einstellungen zum Sitzungsmanagement"); -define('ADMIN_CONFIG_SESSION_SAVE_PATH', "Speicherpfad f. Sitzungsdateien"); -define('ADMIN_BASE_PATH', "Absoluter Server-Pfad"); -define('ADMIN_SESSION_SAVE_PATH_NOTE', "Sie sollten für Sitzungsdateien einen Pfad wählen der ausserhalb des Server-Pfades liegt, da sonst eventuell die Sitzungsdateien vom Web erreichbar sind, was ein hohes Sicherheitsrisiko darstellt."); -define('MEMBER_NO_MAILS_IN_STATS', "Keine versandten Buchungen gefunden!"); -define('ADMIN_RESET_PASSWORD', "Passwort vergessen?"); -define('EMAIL_DETAILS', "Email-Details"); -define('EMAIL_DETAILS_LINK', "Details anzeigen"); -define('ADMIN_CONFIG_REFID_TITLE', "Einstellungen zum Referal-Link"); -define('ADMIN_RANDOM_ZERO_REFID', "Soll per Zufall ein User nach folgenden Kriterien ausgewählt werden, wenn keine Standart-Refid eingestellt ist?"); -define('ADMIN_RAND_REFID_ENABLED', "Mitglieder per Zufall wählen"); -define('ADMIN_RAND_REFID_DISABLED', "Referal-Id 0 verwenden"); -define('ADMIN_RANDOM_MIN_CONFIRMED', "Wie viele bestätigte Mails muss ein Mitglied mindestens haben, um per Zufall ausgewählt zu werden?"); -define('EMAILS_RECEIVED', "Emails empfangen"); -define('MAILS_CONFIRMED', "Emails bestätigt"); -define('RAND_CONFIRMED', "Bestätigt f. Zufalls-Ref"); -define('LOCK_REASON', "Sperrgrund"); -define('LOCK_TIMESTAMP', "Sperrzeitpunkt"); -define('EXTENSION', "Erweiterung"); -define('MOD_REWRITE_ERROR', "Sie müssen mod_rewrite in Apache aktiviert haben um die Erweiterung rewrite nutzen zu können."); -define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler"); -define('TASK_SUBJ_EXTENSION_DEACTIVATED', "Erweiterung deaktiviert"); -define('ADMIN_SUBJECT_EXTENSION_DEACTIVATED', "Automatische Deaktivierung einer Erweiterung"); -define('FATAL_EXTENSION_LOADED', "Erweiterung <span class=\"data\">%s</span> bereits geladen!"); -define('ADMIN_ACCESS_DENIED', "Zugriff auf diesen Adminmenüpunkt nicht gestattet."); -define('ADMIN_URL_BLACKLIST_DISABLED', "URL-Sperrliste ist deaktiviert."); -define('ADMIN_MENU_IS_EMPTY', "Das von Ihnen ausgewählte Menü <span class=\"data\">%s</span> ist leer."); -define('ADMIN_EXT_TEXT_FILE_MISSING', "Die Erweiterung <span class=\"data\">%s</span> hat keinen Beschreibungstext. Bitte melden Sie dies uns <a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direkter Link zum Bug-Tracker\">im Bug-Tracker</a>."); + 'ADMIN_RESET_PASS' => "Ihr Administratorkennwort zurücksetzen?", + 'ADMIN_NO_LOGIN_WITH_EMAIL' => "Kein Administrator-Account mit der angegebenen Email-Adresse gefunden!", + 'ADMIN_RESET_PASS_LINK_SUBJ' => "Zuruecksetzung Ihres Admin-Passwortes", + 'ADMIN_RESET_LINK_SENT' => "Der Reset-Link wurde soeben an Ihre eingegebene Email-Adresse ausgesendet.", + 'ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED' => "Validierung Ihrer Logindaten fehlgeschlagen. Haben Sie auch den Link aus der Mail angeklickt und Ihren Loginnamen eingegeben?", + 'ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2' => "Validierung Ihrer Logindaten fehlgeschlagen. Es liegt ein Fehler im Script vor. Bitte im <a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker</a> den Fehler melden.", + 'ADMIN_SHOW_LOGIN' => "Ihr Administratorlogin:", + 'ADMIN_CHANGE_LOGIN' => "Anderes Adminlogin", + 'ADMIN_PASSWORD_RESET_DONE' => "Ihr Administratorkennwort wurde neu gesetzt. Sie können sich jetzt mit Ihren neuen Zugangsdaten im Adminbereich einloggen.", + 'ADMIN_CONTINUE_LOGIN' => "Weiter zum Administratorlogin", + 'ADMIN_RESET_PASS_LINK' => "Jetzt Ihr Administratorkennwort zurücksetzen (nötiger Schritt!)", + 'ADMIN_SUPPORT_FORUM_LINK' => "Direktlink zum Support-Forum (neues Fenster)", + 'ADMIN_SUPPORT_BUGTRACKER_LINK' => "Direktlink zum Bug-Tracker (neues Fenster)", + 'ADMIN_REFERAL_LEVEL_ZERO_NOTICE' => "Die Referal-Ebene 0 ist das Mitglied selber und sollte daher auf 100% stehen. Sie sollte auch nicht geändert oder gelöscht werden! Dann erhalten Ihre Mitglieder keine {?POINTS?} gutgeschrieben.", + 'ADMIN_ALL_ENTRIES_REMOVED' => "Alle ausgewählten Einträge sind gelöscht.", + 'ADMIN_SOME_ENTRIES_NOT_DELETED' => "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> ausgewählten Einträge gelöscht.", + 'ADMIN_ALL_ENTRIES_EDITED' => "Alle ausgewählten Einträge sind geändert.", + 'ADMIN_SOME_ENTRIES_NOT_EDITED' => "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> ausgewählten Einträge geändert.", + 'USER_NOT_REGISTERED' => "Anmeldung hat nicht geklappt! :-( Ist unten eine Fehlermeldung eingeblendet? Bitte beim Support melden.", + 'ADMIN_SELECTION_BOX_TITLE' => "Mitglied für Aktion auswählen", + 'ADMIN_DO_ACTION' => "Aktion ausführen", + 'MEMBER_ORDER_PLEASE_WAIT_TESTER' => "Bitte warten Sie den Framekiller-Test ab!", + 'MEMBER_ORDER_TEST_STARTED' => "Framekiller-Test startet...", + 'MEMBER_ORDER_PLEASE_WAIT_1' => "Ihre Seite wird auf Framekiller getestet. Bitte noch ", + 'MEMBER_ORDER_PLEASE_WAIT_2' => " Sekunden warten.", + 'ADMIN_LIST_NOREFS_ACCOUNTS' => "Auflistung aller Accounts ohne Werber", + 'ADMIN_NO_REF_LEVELS' => "In Ihrem {?mt_word?} sind keine Referal-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {?POINTS?} gutgeschrieben. Richten Sie mindestens Referal-Ebene 0 mit 100% Vergütung ein.", + 'ADMIN_SESSION_SAVE_PATH_INVALID' => "Pfad für Sitzungsdateien ungütig!", + 'ADMIN_SESSION_SETTINGS_TITLE' => "Einstellungen zum Sitzungsmanagement", + 'ADMIN_CONFIG_SESSION_SAVE_PATH' => "Speicherpfad f. Sitzungsdateien", + 'ADMIN_BASE_PATH' => "Absoluter Server-Pfad", + 'ADMIN_SESSION_SAVE_PATH_NOTE' => "Sie sollten für Sitzungsdateien einen Pfad wählen der ausserhalb des Server-Pfades liegt, da sonst eventuell die Sitzungsdateien vom Web erreichbar sind, was ein hohes Sicherheitsrisiko darstellt.", + 'MEMBER_NO_MAILS_IN_STATS' => "Keine versandten Buchungen gefunden!", + 'ADMIN_RESET_PASSWORD' => "Passwort vergessen?", + 'EMAIL_DETAILS' => "Email-Details", + 'EMAIL_DETAILS_LINK' => "Details anzeigen", + 'ADMIN_CONFIG_REFID_TITLE' => "Einstellungen zum Referal-Link", + 'ADMIN_RANDOM_ZERO_REFID' => "Soll per Zufall ein User nach folgenden Kriterien ausgewählt werden, wenn keine Standart-Refid eingestellt ist?", + 'ADMIN_RAND_REFID_ENABLED' => "Mitglieder per Zufall wählen", + 'ADMIN_RAND_REFID_DISABLED' => "Referal-Id 0 verwenden", + 'ADMIN_RANDOM_MIN_CONFIRMED' => "Wie viele bestätigte Mails muss ein Mitglied mindestens haben, um per Zufall ausgewählt zu werden?", + 'EMAILS_RECEIVED' => "Emails empfangen", + 'MAILS_CONFIRMED' => "Emails bestätigt", + 'RAND_CONFIRMED' => "Bestätigt f. Zufalls-Ref", + 'LOCK_REASON' => "Sperrgrund", + 'LOCK_TIMESTAMP' => "Sperrzeitpunkt", + 'EXTENSION' => "Erweiterung", + 'MOD_REWRITE_ERROR' => "Sie müssen mod_rewrite in Apache aktiviert haben um die Erweiterung rewrite nutzen zu können.", + 'ADMIN_BUILD_STATUS_HANDLER' => "Status-Handler", + 'TASK_SUBJ_EXTENSION_DEACTIVATED' => "Erweiterung deaktiviert", + 'ADMIN_SUBJECT_EXTENSION_DEACTIVATED' => "Automatische Deaktivierung einer Erweiterung", + 'FATAL_EXTENSION_LOADED' => "Erweiterung <span class=\"data\">%s</span> bereits geladen!", + 'ADMIN_ACCESS_DENIED' => "Zugriff auf den Adminmenüpunkt <strong>%s</strong> nicht gestattet.", + 'ADMIN_URL_BLACKLIST_DISABLED' => "URL-Sperrliste ist deaktiviert.", + 'ADMIN_MENU_IS_EMPTY' => "Das von Ihnen ausgewählte Menü <span class=\"data\">%s</span> ist leer.", + 'ADMIN_EXT_TEXT_FILE_MISSING' => "Die Erweiterung <span class=\"data\">%s</span> hat keinen Beschreibungstext. Bitte melden Sie dies uns <a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direkter Link zum Bug-Tracker\">im Bug-Tracker</a>.", + 'GUEST_STATS_NO_CLICKS' => "Keine Klicks in Ihrem {?mt_word?} verzeichnet.", + 'ADMIN_EXTENSIONS_REMOVED' => "Es wurden <strong>%s</strong> Erweiterungen aus Ihrem {?mt_word?} entfernt.", -define('MEMBER_MAIL_BONUS_CONFIRMED_ON', "Sie haben diese Bonusmail <span class=\"data\">%s</span> bestätigt."); -define('MEMBER_MAIL_NORMAL_CONFIRMED_ON', "Sie haben diese Klickmail <span class=\"data\">%s</span> bestätigt."); + 'MEMBER_MAIL_BONUS_CONFIRMED_ON' => "Sie haben diese Bonusmail <span class=\"data\">%s</span> bestätigt.", + 'MEMBER_MAIL_NORMAL_CONFIRMED_ON' => "Sie haben diese Klickmail <span class=\"data\">%s</span> bestätigt.", // @TODO Rewrite these two constants -define('MEMBER_MAIL_NORMAL_DETAILS_TITLE_1', "Details zur Klickmail <u>"); -define('MEMBER_MAIL_NORMAL_DETAILS_TITLE_2', "</u>:"); + 'MEMBER_MAIL_NORMAL_DETAILS_TITLE_1' => "Details zur Klickmail <u>", + 'MEMBER_MAIL_NORMAL_DETAILS_TITLE_2' => "</u>:", -define('EMAIL_STATUS_ACTIVE', "Wird gerade versendet"); -define('EMAIL_STATUS_ADMIN', "Wartet auf Freischaltung"); -define('EMAIL_STATUS_DELETED', "Gelöscht"); -define('EMAIL_STATUS_NEW', "Wartet auf Versand"); -define('EMAIL_STATUS_QUEUE', "Wird versendet"); -define('EMAIL_STATUS_TEMP', "Wird gerade gebucht"); + 'EMAIL_STATUS_ACTIVE' => "Wird gerade versendet", + 'EMAIL_STATUS_ADMIN' => "Wartet auf Freischaltung", + 'EMAIL_STATUS_DELETED' => "Gelöscht", + 'EMAIL_STATUS_NEW' => "Wartet auf Versand", + 'EMAIL_STATUS_QUEUE' => "Wird versendet", + 'EMAIL_STATUS_TEMP' => "Wird gerade gebucht", // Member activity -define('MEMBER_ACTIVITY_ACTIVE', "Aktiv"); -define('MEMBER_ACTIVITY_INACTIVE', "Inaktiv"); + 'MEMBER_ACTIVITY_ACTIVE' => "Aktiv", + 'MEMBER_ACTIVITY_INACTIVE' => "Inaktiv", // Member reflist // @TODO Rewrite these five constants -define('MEMBER_REFLIST_LIST_TITLE_1', "Ihre Referals in Ebene <u>"); -define('MEMBER_REFLIST_LIST_TITLE_2', "</u> (<u>"); -define('MEMBER_REFLIST_LIST_TITLE_3', "%</u>)"); -define('MEMBER_REFLIST_COUNTER_1', "In dieser Ebene haben Sie <u>"); -define('MEMBER_REFLIST_COUNTER_2', "</u> Mitglieder geworben."); -define('MEMBER_REFLIST_TITLE', "Referal-Übersicht"); -define('MEMBER_REFLIST_POINTS', "Verdienst des Mitgliedes"); -define('MEMBER_REFLIST_ACTIVITY', "Mitglied aktiv?"); + 'MEMBER_REFLIST_LIST_TITLE_1' => "Ihre Referals in Ebene <u>", + 'MEMBER_REFLIST_LIST_TITLE_2' => "</u> (<u>", + 'MEMBER_REFLIST_LIST_TITLE_3' => "%</u>)", + 'MEMBER_REFLIST_COUNTER_1' => "In dieser Ebene haben Sie <u>", + 'MEMBER_REFLIST_COUNTER_2' => "</u> Mitglieder geworben.", + 'MEMBER_REFLIST_TITLE' => "Referal-Übersicht", + 'MEMBER_REFLIST_POINTS' => "Verdienst des Mitgliedes", + 'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?", // Special user lists (what=list_user) -define('ADMIN_LIST_STATUS_LOCKED_ACCOUNTS', "Alle gesperrten Mitglieder-Accounts auflisten"); -define('ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten"); -define('ADMIN_LIST_MODE_NOREFS_ACCOUNTS', "Alle Mitglieder-Accounts ohne Referrals auflisten"); + 'ADMIN_LIST_STATUS_LOCKED_ACCOUNTS' => "Alle gesperrten Mitglieder-Accounts auflisten", + 'ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS' => "Alle bestätigten Mitglieder-Accounts auflisten", + 'ADMIN_LIST_MODE_NOREFS_ACCOUNTS' => "Alle Mitglieder-Accounts ohne Referrals auflisten", // Admin task lines -define('ADMIN_TASK_IS_MEMBER_SUPPORT', "Support-Anfrage eines Mitgliedes"); -define('ADMIN_TASK_IS_EXTENSION', "Erweiterung-Management"); -define('ADMIN_TASK_IS_EXTENSION_UPDATE', "Erweiterung-Update"); -define('ADMIN_TASK_IS_EXTENSION_DEACTIVATION', "Erweiterung-Management"); + 'ADMIN_TASK_IS_MEMBER_SUPPORT' => "Support-Anfrage eines Mitgliedes", + 'ADMIN_TASK_IS_EXTENSION' => "Erweiterung-Management", + 'ADMIN_TASK_IS_EXTENSION_UPDATE' => "Erweiterung-Update", + 'ADMIN_TASK_IS_EXTENSION_DEACTIVATION' => "Erweiterung-Management", // Filter sub-system -define('FILTER_FAILED_ALREADY_INIT', "Filter-System ist bereits initialisiert."); -define('FILTER_FAILED_ALREADY_ADDED', "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugefügt."); -define('FILTER_FAILED_NOT_FOUND', "Die Filterfunktion <span class=\"data\">%s</span> wurde nicht gefunden und konnte der Filterkette <span class=\"data\">%s</span> nicht hinzugefügt werden."); -define('FILTER_FAILED_NO_FILTER_FOUND', "Die Filterkette <span class=\"data\">%s</span> konnte nicht gefunden werden."); -define('FILTER_FAILED_NOT_REMOVED', "Die Filterfunktion <span class=\"data\">%s</span> konnte nicht aus der Filterkette <span class=\"data\">%s</span> entfernt werden, da sie nicht existiert."); -define('FILTER_FLUSH_FAILED_NO_DATABASE', "Kann die Filterketten nicht speichern. Datenbank fehlt!"); + 'FILTER_FAILED_ALREADY_INIT' => "Filter-System ist bereits initialisiert.", + 'FILTER_FAILED_ALREADY_ADDED' => "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugefügt.", + 'FILTER_FAILED_404' => "Die Filterfunktion <span class=\"data\">%s</span> wurde nicht gefunden und konnte der Filterkette <span class=\"data\">%s</span> nicht hinzugefügt werden.", + 'FILTER_FAILED_NO_FILTER_FOUND' => "Die Filterkette <span class=\"data\">%s</span> konnte nicht gefunden werden.", + 'FILTER_FAILED_NOT_REMOVED' => "Die Filterfunktion <span class=\"data\">%s</span> konnte nicht aus der Filterkette <span class=\"data\">%s</span> entfernt werden, da sie nicht existiert.", + 'FILTER_FLUSH_FAILED_NO_DATABASE' => "Kann die Filterketten nicht speichern. Datenbank fehlt!", // Status changes -define('ADMIN_STATUS_CHANGED', "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Einträgen geändert."); + 'ADMIN_STATUS_CHANGED' => "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Einträgen geändert.", + +// Missing menu whats + 'MENU_WHAT_404' => "Menü deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.", +)); + +// Description of all months +$GLOBALS['month_descr'] = array( + '01' => "Januar", + '02' => "Februar", + '03' => "März", + '04' => "April", + '05' => "Mai", + '06' => "Juni", + '07' => "Juli", + '08' => "August", + '09' => "September", + '10' => "Oktober", + '11' => "November", + '12' => "Dezember", +); -// +// [EOF] ?> diff --git a/inc/language/debug_de.php b/inc/language/debug_de.php index 8fd5b56e2e..33bf45f377 100644 --- a/inc/language/debug_de.php +++ b/inc/language/debug_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,12 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if + +// Language definitions +addMessages(array( +)); // ?> diff --git a/inc/language/doubler_de.php b/inc/language/doubler_de.php index c802add316..176cafa00c 100644 --- a/inc/language/doubler_de.php +++ b/inc/language/doubler_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,113 +38,113 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_EDIT_DOUBLER_SETTINGS', "Einstellungen am {?POINTS?}-Verdoppler"); -define('ADMIN_DOUBLER_CHARGE', "Prozentuale Gebühr zum Verdoppeln"); -define('ADMIN_DOUBLER_JACKPOT', "Soll der Jackpot zum Verdoppeln verwendet werden?"); -define('ADMIN_DOUBLER_SEND_MODE', "Aussendemodus der Benachrichtigungsmails"); -define('ADMIN_DOUBLER_SEND_DIRECT', "Aussenden, sobald genügend {?POINTS?} zur Auszahlung der Verdoppelung bereit stehen."); -define('ADMIN_DOUBLER_SEND_RESET', "Erst beim täglichen Reset prüfen, ob Verdoppelungen ausgezahlt werden können."); -define('ADMIN_DOUBLER_TIMEOUT', "Verweildauer ausgezahlter Verdoppelungen in der Datenbank"); -define('ADMIN_DOUBLER_USERID', "Mitglieder-Account zur Verdoppelung verwenden"); -define('ADMIN_DOUBLER_DISPLAY_SETTINGS', "Anzeige-Einstellungen für Anzahl Einträge"); -define('ADMIN_DOUBLER_DISPLAY_NEW', "Anzahl ersten X neuen Einträge"); -define('ADMIN_DOUBLER_DISPLAY_PAY', "Anzahl ersten X vor Auszahlung stehender Verdoppelungen"); -define('ADMIN_DOUBLER_DISPLAY_OLD', "Anzahl ersten X bereits ausgezahlter Verdoppelungen"); -define('ADMIN_DOUBLER_REFERRAL', "Prozentuale Referal-Vergütung"); -define('ADMIN_DOUBLER_MINIMUM', "Minimum {?POINTS?} die verdoppelt werden sollen"); -define('ADMIN_DOUBLER_MAXIMUM', "Maximum {?POINTS?} die verdoppelt werden sollen"); -define('ADMIN_DOUBLER_LEFT', "Auf dem Mitgliedsaccount nach Verdoppelung Minimum-{?POINTS?}-Guthaben"); -define('ADMIN_DOUBLER_OWN', "{?POINTS?}-Guthaben des Verdopplers zur Auszahlung verwenden"); -define('ADMIN_DOUBLER_GROUP_SENT', "Auf Anzahl durchführbare Auszahlungen warten, damit an diese ausgezahlt werden kann. (Gruppenauszahlung!)"); -define('ADMIN_DOUBLER_MAX_SENT', "Pro Klick/Reset auf Auszahlungsfähigkeit hin zu testende Verdopplungen"); -define('ADMIN_DOUBLER_SENT_ALL', "Soll anstelle der Gruppenauszahlung alle möglichen Auszahlungen durchgeführt werden?"); -define('ADMIN_DOUBLER_LIST_OVERVIEW', "Auflistung der Verdoppelungen - Übersichtsseite"); -define('ADMIN_DOUBLER_LIST_ALREADY', "Bereits getätigte Auszahlungen"); -define('ADMIN_DOUBLER_LIST_WAITING', "Wartene Auszahlungen"); -define('ADMIN_DOUBLER_ALREADY_ALL', "Gesamt Auszahlungen"); -define('ADMIN_DOUBLER_ALREADY_DIRECT', "Direkte Auszahlungen"); -define('ADMIN_DOUBLER_ALREADY_REF', "Referal-Auszahlungen"); -define('ADMIN_DOUBLER_WAITING_ALL', "Gesamt wartend"); -define('ADMIN_DOUBLER_WAITING_DIRECT', "Direkte w. Auszahlungen"); -define('ADMIN_DOUBLER_WAITING_REF', "W. Referal-Auszahlungen"); -define('ADMIN_DOUBLER_PAYMENT_TIMEMARK', "Eingezahlt"); -define('ADMIN_DOUBLER_LIST_ALREADY_ALL', "Alle bereits ausgezahlten {?POINTS?}"); -define('ADMIN_DOUBLER_LIST_ALREADY_DIRECT', "Direkt ausgezahlte {?POINTS?}"); -define('ADMIN_DOUBLER_LIST_ALREADY_REF', "Ausgezahlte Referal-{?POINTS?}"); -define('ADMIN_DOUBLER_LIST_WAITING_ALL', "Alle wartenden {?POINTS?}-Auszahlungen"); -define('ADMIN_DOUBLER_LIST_WAITING_DIRECT', "Wartende Direkt-Auszahlungen"); -define('ADMIN_DOUBLER_LIST_WAITING_REF', "Wartende Referal-Auszahlungen"); +addMessages(array( + 'ADMIN_EDIT_DOUBLER_SETTINGS' => "Einstellungen am {?POINTS?}-Verdoppler", + 'ADMIN_DOUBLER_CHARGE' => "Prozentuale Gebühr zum Verdoppeln", + 'ADMIN_DOUBLER_JACKPOT' => "Soll der Jackpot zum Verdoppeln verwendet werden?", + 'ADMIN_DOUBLER_SEND_MODE' => "Aussendemodus der Benachrichtigungsmails", + 'ADMIN_DOUBLER_SEND_DIRECT' => "Aussenden, sobald genügend {?POINTS?} zur Auszahlung der Verdoppelung bereit stehen.", + 'ADMIN_DOUBLER_SEND_RESET' => "Erst beim täglichen Reset prüfen, ob Verdoppelungen ausgezahlt werden können.", + 'ADMIN_DOUBLER_TIMEOUT' => "Verweildauer ausgezahlter Verdoppelungen in der Datenbank", + 'ADMIN_DOUBLER_USERID' => "Mitglieder-Account zur Verdoppelung verwenden", + 'ADMIN_DOUBLER_DISPLAY_SETTINGS' => "Anzeige-Einstellungen für Anzahl Einträge", + 'ADMIN_DOUBLER_DISPLAY_NEW' => "Anzahl ersten X neuen Einträge", + 'ADMIN_DOUBLER_DISPLAY_PAY' => "Anzahl ersten X vor Auszahlung stehender Verdoppelungen", + 'ADMIN_DOUBLER_DISPLAY_OLD' => "Anzahl ersten X bereits ausgezahlter Verdoppelungen", + 'ADMIN_DOUBLER_REFERRAL' => "Prozentuale Referal-Vergütung", + 'ADMIN_DOUBLER_MINIMUM' => "Minimum {?POINTS?} die verdoppelt werden sollen", + 'ADMIN_DOUBLER_MAXIMUM' => "Maximum {?POINTS?} die verdoppelt werden sollen", + 'ADMIN_DOUBLER_LEFT' => "Auf dem Mitgliedsaccount nach Verdoppelung Minimum-{?POINTS?}-Guthaben", + 'ADMIN_DOUBLER_OWN' => "{?POINTS?}-Guthaben des Verdopplers zur Auszahlung verwenden", + 'ADMIN_DOUBLER_GROUP_SENT' => "Auf Anzahl durchführbare Auszahlungen warten, damit an diese ausgezahlt werden kann. (Gruppenauszahlung!)", + 'ADMIN_DOUBLER_MAX_SENT' => "Pro Klick/Reset auf Auszahlungsfähigkeit hin zu testende Verdopplungen", + 'ADMIN_DOUBLER_SENT_ALL' => "Soll anstelle der Gruppenauszahlung alle möglichen Auszahlungen durchgeführt werden?", + 'ADMIN_DOUBLER_LIST_OVERVIEW' => "Auflistung der Verdoppelungen - Übersichtsseite", + 'ADMIN_DOUBLER_LIST_ALREADY' => "Bereits getätigte Auszahlungen", + 'ADMIN_DOUBLER_LIST_WAITING' => "Wartene Auszahlungen", + 'ADMIN_DOUBLER_ALREADY_ALL' => "Gesamt Auszahlungen", + 'ADMIN_DOUBLER_ALREADY_DIRECT' => "Direkte Auszahlungen", + 'ADMIN_DOUBLER_ALREADY_REF' => "Referal-Auszahlungen", + 'ADMIN_DOUBLER_WAITING_ALL' => "Gesamt wartend", + 'ADMIN_DOUBLER_WAITING_DIRECT' => "Direkte w. Auszahlungen", + 'ADMIN_DOUBLER_WAITING_REF' => "W. Referal-Auszahlungen", + 'ADMIN_DOUBLER_PAYMENT_TIMEMARK' => "Eingezahlt", + 'ADMIN_DOUBLER_LIST_ALREADY_ALL' => "Alle bereits ausgezahlten {?POINTS?}", + 'ADMIN_DOUBLER_LIST_ALREADY_DIRECT' => "Direkt ausgezahlte {?POINTS?}", + 'ADMIN_DOUBLER_LIST_ALREADY_REF' => "Ausgezahlte Referal-{?POINTS?}", + 'ADMIN_DOUBLER_LIST_WAITING_ALL' => "Alle wartenden {?POINTS?}-Auszahlungen", + 'ADMIN_DOUBLER_LIST_WAITING_DIRECT' => "Wartende Direkt-Auszahlungen", + 'ADMIN_DOUBLER_LIST_WAITING_REF' => "Wartende Referal-Auszahlungen", -define('DOUBLER_TITLE', "Verdoppler"); -define('DOUBLER_ENTER_LOGIN_DATA', "Geben Sie hier Ihre Zugangsdaten ein:"); -define('DOUBLER_NOTE_FOR_PASSWORD', "Das Passwort wird nicht gespeichert."); -define('DOUBLER_ENTER_POINTS', "{?POINTS?} zum Verdoppeln"); -define('DOUBLER_NOW', "Verdoppeln!"); -define('DOUBLER_ALREADY_PAYED_1', "Es wurden bereits"); -define('DOUBLER_ALREADY_PAYED_2', "ausgezahlt."); -define('DOUBLER_MINIMUM_IS', "Mindestens"); -define('DOUBLER_MAXIMUM_IS', "verdoppeln, maximal"); -define('DOUBLER_HAVE_FUN', "Viel Spaß!"); -define('DOUBLER_POINTS_1', "Wenn Sie {?POINTS?} verdoppeln, kommen Sie diese nach Abzug von"); -define('DOUBLER_POINTS_2', "Betriebergebühr in einen Topf; bei Erreichen einer Verdopplung wird diese der Einzahlungsreihe nach, automatisch ausgeführt."); -define('DOUBLER_EXAMPLE_1', "Beispiel: Einzahlung"); -define('DOUBLER_EXAMPLE_2', "Auszahlung:"); -define('DOUBLER_EXAMPLE_3', ", sobald Sie an der Reihe sind, ohne(*) ein Risiko einzugehen!"); -define('DOUBLER_FULL_PAYOUT', "100% Auszahlung"); -define('DOUBLER_REFERRAL_1', "Refverdienst: Es gibt"); -define('DOUBLER_REFERRAL_2', "Refverdienst. Wenn Sie {?POINTS?} auf dem Refkonto durch Werbung erwirtschaftet haben,"); -define('DOUBLER_REFERRAL_3', "(Wichtig! Maximal Verdoppelung darf nicht überschritten werden)"); -define('DOUBLER_REFERRAL_4', "werden diese bei Ihrer nächsten Verdoppelung aufgeschlagen."); -define('DOUBLER_REFERRAL_5', "Beispiel: Sie haben"); -define('DOUBLER_REFERRAL_6', "Refverdienst und verdoppeln"); -define('DOUBLER_REFERRAL_7', ", Sie bekommen - sobald Sie an der Reihe sind -"); -define('DOUBLER_REFERRAL_8', "zurück."); -define('DOUBLER_TIMEOUT_1', "Es werden Einträge nicht älter als"); -define('DOUBLER_TIMEOUT_2', "angezeigt."); -define('DOUBLER_REFERRAL_LINK', "Den Reflink erfahren Sie nach jeder Verdoppelung."); -define('DOUBLER_NOT_YET_REGISTERED', "Noch nicht angemeldet?"); -define('DOUBLER_REGISTER_NOW', "Weiter zur Anmeldung!"); -define('DOUBLER_YOUR_ADVERTISING_HERE', "Hier könnte auch Ihre Werbung stehen:"); -define('DOUBLER_CONTACT_US', "Fragen Sie uns nach unseren Konditionen!"); -define('DOUBLER_FORM_404_LOGIN', "Login nicht eingegeben!"); -define('DOUBLER_FORM_404_PASSWORD', "Password nicht eingeben!"); -define('DOUBLER_FORM_404_POINTS', "Keine {?POINTS?} zum Verdoppeln eingegeben!"); -define('DOUBLER_FORM_404_NICKNAME', "Unbekannter Nickname eingegeben oder falsches Passwort!"); -define('DOUBLER_FORM_404_MEMBER', "Mitgliedsaccount nicht gefunden oder falsches Passwort!"); -define('DOUBLER_FORM_STATUS_UNCONFIRMED', "Bitte bestätigen Sie erst Ihre EMail-Adresse. Den Bestätigungslink können Sie <a href=\"{?URL?}/modules.php?module=index&what=confirm\">hier erneut per EMail anfordern</a> !"); -define('DOUBLER_FORM_STATUS_LOCKED', "Ihr Account wurde von einem Administrator oder durch Urlaub gesperrt. Bitte <a href=\"{?URL?}/modules.php?module=index&what=impressum\">melden Sie sich bei uns</a>, damit wir Ihren Account freischalten können!"); -define('DOUBLER_FORM_WRONG_PASS', "Passwort ist falsch!"); -define('DOUBLER_FORM_POINTS_MIN', "Zu wenig {?POINTS?} zum Verdoppeln eingegeben!"); -define('DOUBLER_FORM_POINTS_MAX', "Zu viele {?POINTS?} zum Verdoppeln eingegeben!"); -define('DOUBLER_FORM_NO_POINTS_LEFT', "Sie haben nicht ausreichend {?POINTS?} übrig!"); -define('DOUBLER_MEMBER_SUBJECT', "Gutschrift durch Verdoppelung"); -define('DOUBLER_PAYOUT_TIME_DIRECT', "Die Auszahlung erfolgt unmittelbar, nachdem genügend {?POINTS?} zusammengekommen sind, um Ihnen die Verdoppelung auszuzahlen."); -define('DOUBLER_PAYOUT_TIME_RESET', "Abends um 00:00 Uhr jeden Tages wird geprüft, ob genügend {?POINTS?} zusammengekommen sind, um Ihnen die Verdoppelung auszuzahlen."); -define('DOUBLER_PAYOUT_TIME_UNKNOWN', "Unbebannter Modus <span class=\"data\">%s</span> erkannt. Bitte Bug melden."); -define('DOUBLER_NO_ENTRIES_FOUND', "Keine Einträge gefunden!"); -define('DOUBLER_TIMEMARK', "Auszahlungstag"); -define('DOUBLER_GENERAL_INFOS', "Allgemeine Informationen zum Verdoppeln"); -define('DOUBLER_ALREADY_PAYOUT', "Bereits an unsere Mitglieder ausgezahlte Beträge"); -define('DOUBLER_REGISTER_ADVERT', "Weiter zur Anmeldung / Werbebuchung"); -define('DOUBLER_NEXT_PAYOUT', "Die als nächstes anstehenden Auszahlungen"); -define('DOUBLER_WANNA_TRY', "Wollen Sie mal ausprobieren?"); -define('DOUBLER_GUEST_NO_ENTRIES_FOUND', "In dieser Kategorie hat noch kein Mitglied einen Eintrag!"); -define('DOUBLER_MEMBER_NO_ENTRIES_FOUND', "In dieser Kategorie haben Sie noch keine Einträge!"); -define('DOUBLER_MEMBER_ALREADY_PAYOUT', "An Sie bereits ausgezahlte Verdoppelungen"); -define('DOUBLER_MEMBER_NEXT_PAYOUT', "Sie erhalten bald folgende Verdoppelungen ausgezahlt"); -define('DOUBLER_MEMBER_REF_PAYOUT', "Ihr Refferal-Verdienst"); -define('DOUBLER_MEMBER_YOUR_LINK', "Hier ist Ihr Verdoppler-Link"); -define('DOUBLER_MEMBER_LINK_NOTE', "<strong>Tipp:</strong> Nutzen Sie diesen zum Werben unseres {?MT_WORD2?}, um die <strong>{!__REF_VALUE!}%</strong> Referal-Vergütung zu erhalten!"); -define('DOUBLER_MEMBER_YOUR_REFLINK', "Ihr Referal-Link zum Verdoppeln"); -define('DOUBLER_POINTS_LEFT_1', "Es stehen noch"); -define('DOUBLER_POINTS_LEFT_2', "zum Verdoppeln zur Verfügung."); -define('DOUBLER_USAGE_COUNTER_1', "Der Verdoppler wurde bereits"); -define('DOUBLER_USAGE_COUNTER_2', "mal genutzt."); + 'DOUBLER_TITLE' => "Verdoppler", + 'DOUBLER_ENTER_LOGIN_DATA' => "Geben Sie hier Ihre Zugangsdaten ein:", + 'DOUBLER_NOTE_FOR_PASSWORD' => "Das Passwort wird nicht gespeichert.", + 'DOUBLER_ENTER_POINTS' => "{?POINTS?} zum Verdoppeln", + 'DOUBLER_NOW' => "Verdoppeln!", + 'DOUBLER_ALREADY_PAYED_1' => "Es wurden bereits", + 'DOUBLER_ALREADY_PAYED_2' => "ausgezahlt.", + 'DOUBLER_MINIMUM_IS' => "Mindestens", + 'DOUBLER_MAXIMUM_IS' => "verdoppeln, maximal", + 'DOUBLER_HAVE_FUN' => "Viel Spaß!", + 'DOUBLER_POINTS_1' => "Wenn Sie {?POINTS?} verdoppeln, kommen Sie diese nach Abzug von", + 'DOUBLER_POINTS_2' => "Betriebergebühr in einen Topf; bei Erreichen einer Verdopplung wird diese der Einzahlungsreihe nach, automatisch ausgeführt.", + 'DOUBLER_EXAMPLE_1' => "Beispiel: Einzahlung", + 'DOUBLER_EXAMPLE_2' => "Auszahlung:", + 'DOUBLER_EXAMPLE_3' => ", sobald Sie an der Reihe sind, ohne(*) ein Risiko einzugehen!", + 'DOUBLER_FULL_PAYOUT' => "100% Auszahlung", + 'DOUBLER_REFERRAL_1' => "Refverdienst: Es gibt", + 'DOUBLER_REFERRAL_2' => "Refverdienst. Wenn Sie {?POINTS?} auf dem Refkonto durch Werbung erwirtschaftet haben,", + 'DOUBLER_REFERRAL_3' => "(Wichtig! Maximal Verdoppelung darf nicht überschritten werden)", + 'DOUBLER_REFERRAL_4' => "werden diese bei Ihrer nächsten Verdoppelung aufgeschlagen.", + 'DOUBLER_REFERRAL_5' => "Beispiel: Sie haben", + 'DOUBLER_REFERRAL_6' => "Refverdienst und verdoppeln", + 'DOUBLER_REFERRAL_7' => ", Sie bekommen - sobald Sie an der Reihe sind -", + 'DOUBLER_REFERRAL_8' => "zurück.", + 'DOUBLER_TIMEOUT_1' => "Es werden Einträge nicht älter als", + 'DOUBLER_TIMEOUT_2' => "angezeigt.", + 'DOUBLER_REFERRAL_LINK' => "Den Reflink erfahren Sie nach jeder Verdoppelung.", + 'DOUBLER_NOT_YET_REGISTERED' => "Noch nicht angemeldet?", + 'DOUBLER_REGISTER_NOW' => "Weiter zur Anmeldung!", + 'DOUBLER_YOUR_ADVERTISING_HERE' => "Hier könnte auch Ihre Werbung stehen:", + 'DOUBLER_CONTACT_US' => "Fragen Sie uns nach unseren Konditionen!", + 'DOUBLER_FORM_404_LOGIN' => "Login nicht eingegeben!", + 'DOUBLER_FORM_404_PASSWORD' => "Password nicht eingeben!", + 'DOUBLER_FORM_404_POINTS' => "Keine {?POINTS?} zum Verdoppeln eingegeben!", + 'DOUBLER_FORM_404_NICKNAME' => "Unbekannter Nickname eingegeben oder falsches Passwort!", + 'DOUBLER_FORM_404_MEMBER' => "Mitgliedsaccount nicht gefunden oder falsches Passwort!", + 'DOUBLER_FORM_STATUS_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre EMail-Adresse. Den Bestätigungslink können Sie <a href=\"{?URL?}/modules.php?module=index&what=confirm\">hier erneut per EMail anfordern</a> !", + 'DOUBLER_FORM_STATUS_LOCKED' => "Ihr Account wurde von einem Administrator oder durch Urlaub gesperrt. Bitte <a href=\"{?URL?}/modules.php?module=index&what=impressum\">melden Sie sich bei uns</a>, damit wir Ihren Account freischalten können!", + 'DOUBLER_FORM_WRONG_PASS' => "Passwort ist falsch!", + 'DOUBLER_FORM_POINTS_MIN' => "Zu wenig {?POINTS?} zum Verdoppeln eingegeben!", + 'DOUBLER_FORM_POINTS_MAX' => "Zu viele {?POINTS?} zum Verdoppeln eingegeben!", + 'DOUBLER_FORM_NO_POINTS_LEFT' => "Sie haben nicht ausreichend {?POINTS?} übrig!", + 'DOUBLER_MEMBER_SUBJECT' => "Gutschrift durch Verdoppelung", + 'DOUBLER_PAYOUT_TIME_DIRECT' => "Die Auszahlung erfolgt unmittelbar, nachdem genügend {?POINTS?} zusammengekommen sind, um Ihnen die Verdoppelung auszuzahlen.", + 'DOUBLER_PAYOUT_TIME_RESET' => "Abends um 00:00 Uhr jeden Tages wird geprüft, ob genügend {?POINTS?} zusammengekommen sind, um Ihnen die Verdoppelung auszuzahlen.", + 'DOUBLER_PAYOUT_TIME_UNKNOWN' => "Unbebannter Modus <span class=\"data\">%s</span> erkannt. Bitte Bug melden.", + 'DOUBLER_NO_ENTRIES_FOUND' => "Keine Einträge gefunden!", + 'DOUBLER_TIMEMARK' => "Auszahlungstag", + 'DOUBLER_GENERAL_INFOS' => "Allgemeine Informationen zum Verdoppeln", + 'DOUBLER_ALREADY_PAYOUT' => "Bereits an unsere Mitglieder ausgezahlte Beträge", + 'DOUBLER_REGISTER_ADVERT' => "Weiter zur Anmeldung / Werbebuchung", + 'DOUBLER_NEXT_PAYOUT' => "Die als nächstes anstehenden Auszahlungen", + 'DOUBLER_WANNA_TRY' => "Wollen Sie mal ausprobieren?", + 'DOUBLER_GUEST_NO_ENTRIES_FOUND' => "In dieser Kategorie hat noch kein Mitglied einen Eintrag!", + 'DOUBLER_MEMBER_NO_ENTRIES_FOUND' => "In dieser Kategorie haben Sie noch keine Einträge!", + 'DOUBLER_MEMBER_ALREADY_PAYOUT' => "An Sie bereits ausgezahlte Verdoppelungen", + 'DOUBLER_MEMBER_NEXT_PAYOUT' => "Sie erhalten bald folgende Verdoppelungen ausgezahlt", + 'DOUBLER_MEMBER_REF_PAYOUT' => "Ihr Refferal-Verdienst", + 'DOUBLER_MEMBER_YOUR_LINK' => "Hier ist Ihr Verdoppler-Link", + 'DOUBLER_MEMBER_YOUR_REFLINK' => "Ihr Referal-Link zum Verdoppeln", + 'DOUBLER_POINTS_LEFT_1' => "Es stehen noch", + 'DOUBLER_POINTS_LEFT_2' => "zum Verdoppeln zur Verfügung.", + 'DOUBLER_USAGE_COUNTER_1' => "Der Verdoppler wurde bereits", + 'DOUBLER_USAGE_COUNTER_2' => "mal genutzt.", +)); -// +// [EOF] ?> diff --git a/inc/language/en.php b/inc/language/en.php index 3cf7650faa..22f151e609 100644 --- a/inc/language/en.php +++ b/inc/language/en.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,262 +38,263 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('LANG_DOWN_MAINTAINCE', "System is down for maintenance."); -define('LANG_MOD_REG_404', "Module <span class=\"data\">%s</span> does not exists."); -define('LANG_UNKNOWN_MODULE', "Unknown module"); -define('META_YOUR_NAME_1', "Your name here"); -define('META_YOUR_NAME_2', "Your name again"); -define('META_DESCRIPTION', "The description of your website here"); -define('META_KEYWORDS', "Enter at least (1) 20 search keywords seperated by commatas here"); -define('LANG_WARNING', "Warning"); -define('DIE_CONFIG_CHANGED_YOU', "You have edited your config.php file! I'm out here..."); -define('DIE_RUN_INSTALL_MYSQL', "Please run http://your-domain.com/install.php to setup your MySQL data."); -define('WARN_NULL_PASSWORD', "You have a null-password! If you want to switch off this warning please have a look in <strong>inc/cache/config-local.php</strong>."); -define('FATAL_CONFIG_WRITABLE', "Your file inc/cache/config-local.php is writeable! This is a possible security risk."); -define('FATAL_CANNOT_WRITE_CONFIG', "Cannot write config data because I have no write permissions to inc/cache/config-local.php."); -define('FATAL_ERROR', "Fatal error"); -define('LANG_NO_RENDER_DIRECT', "You did not setup the output mode weather to 'render' nor to 'direct'."); -define('INSTALLATION', "Script installation"); -define('INSTALL_PROBLEMS_DETECTED', "I have detected problems while initializing the installation procedure."); -define('FATAL_NO', "Fatal error no. #"); -define('FATAL_CORRECT_ERRORS', "I cannot continue! Please correct the listet problems first and retry again!"); -define('WRONG_PAGE', "You or this system has selected a wrong page!"); -define('SERVER_PATH', "Absolute server path"); -define('BASE_URL', "Base URL"); -define('HP_TITLE', "Mail-exchange's title"); -define('HP_SLOGAN', "Slogan"); -define('MYSQL_HOST', "Server hostname"); -define('MYSQL_DBASE', "Database"); -define('MYSQL_PREFIX', "Prefix for all tables"); -define('MYSQL_LOGIN', "Your login name"); -define('MYSQL_PASS1', "Your password"); -define('MYSQL_PASS2', "Password confirmation"); -define('CSS_URL', "URL to CSS file (relative)"); -define('FATAL_NO_MHOST', "You have entered no host name!"); -define('FATAL_NO_MDBASE', "Please provide a database name."); -define('FATAL_NO_MLOGIN', "Please enter your login to the database."); -define('FATAL_NO_MPASS1', "You have entered no password. This is very unsecure and will be handled as an error."); -define('FATAL_NO_MPASS2', "Please enter the password confirmation."); -define('FATAL_MPASS1_MPASS2', "Your both passwords didn't match."); -define('LANG_OUTPUT_MODE', "Output mode of HTML code"); -define('MODE_RENDER', "HTML code will be rendered and then delivered."); -define('MODE_DIRECT', "HTML code will be delivered immediately."); -define('WARN_NO_PASSWORD', "Shall I warn you if you did not provide a password?"); -define('YES', "Yes"); -define('NO', "No"); -define('RETURN_MYSQL_PAGE', "Back to MySQL settings"); -define('INSTALL_FINALIZER_FAILED', "While installtion unexpected errors occur! The finalizer cannt finish installation."); -define('INSTALL_MAYBE_DONE', "The installation is possibely completed or unexpected errros occur."); -define('INSTALL_FINISHED', "Installation is completed! :-)"); -define('INSTALL_FIN_SECU', "You should remove <u>install.php</u> and <u>inc/install-inc.php</u> from your server. Normally this is not required. But you should really do it for additional security."); -define('CONTINUE_ADMIN', "Continue to administrator's area..."); -define('RUNTIME_PROBLEMS_DETECTED', "Runtime-problem detected!"); -define('FATAL_INC_WRITABLE', "Directory inc is writeable! Please set the access rights to CHMOD 755."); -define('LANG_WRITE_FOOTER', "Display name, version and author of this script?"); -define('LANG_FRAMESET_ACTIVE', "Enable frameset? If not a table-set will be used instead."); -define('MYSQL_ERRORS', "MySQL errors detected. Please correct first to continue."); -define('LANG_MOD_REG_UNKNOWN', "Unknown return-code <span class=\"data\">%s</span> detected!"); -define('LANG_MOD_REG_LOCKED', "Selected module <span class=\"data\">%s</span> is locked!"); -define('ADMIN_NOT_REGISTERED', "There is no administrator account created so far."); -define('ADMIN_REGISTER_NOW', "Please create an administrator account now:"); -define('ADMIN_LOGIN', "Enter administrator login"); -define('ADMIN_PASS', "Enter password"); -define('LANG_CLEAR_FORM', "Clear form"); -define('ADMIN_REG_SUBMIT', "Create admin-account"); -define('ADMIN_NO_LOGIN', "You have entered no login."); -define('ADMIN_NO_PASS', "You have entered no password."); -define('ADMIN_SHORT_PASS', "Your entered password is too short. Please enter at least 4 chars!"); -define('ADMIN_LOGIN_ALREADY_REG', "Your entered admin-login does already exists."); -define('ADMIN_REGISTER_FAILED', "While creating an admin-account an unexpected error occurs!"); -define('ADMIN_REGISTER_DONE', "Admin account created. You can use the account to login into the admin-area."); -define('ADMIN_CANNOT_COMPLETE', "Cannot finish registration of admin-account!"); -define('ADMIN_LOGIN_NOW', "You can now login into the admin-area.<br />Enter your admin-login (not user-login!) and the password to do so."); -define('ENTER_ADMIN_LOGIN', "Administrator login"); -define('ENTER_ADMIN_PASS', "Password"); -define('ADMIN_LOGIN_SUBMIT', "Login to admin-area"); -define('WRONG_PASS', "Wrong password."); -define('ADMIN_NOT_FOUND', "Administrator account not found."); -define('ADMIN_LOGIN_FAILED', "Login into admin-area failed!"); -define('CANNOT_REGISTER_SESS', "Cannot register session cookies. Maybe you have deactivated cookies?"); -define('SELECT_TIMEOUT', "Expiration time for automated login"); -define('TIMEOUT_ONE_DAY', "1 Day"); -define('TIMEOUT_TWO_DAYS', "2 Days"); -define('TIMEOUT_THREE_DAYS', "3 Days"); -define('TIMEOUT_ONE_WEEK', "1 Week"); -define('TIMEOUT_TWO_WEEKS', "2 Weeks"); -define('TIMEOUT_ONE_MONTH', "1 Month"); -define('TIMEOUT_HALF_YEAR', "1/2 Year"); -define('TIMEOUT_FULL_YEAR', "1 Year"); -define('ADMIN_LOGOUT_DONE', "Logout from admin-account completed."); -define('ADMIN_LOGOUT_FAILED', "Logout from admin-account failed! :-("); -define('ADMIN_RELOGIN_LINK', "Click here to re-login again."); -define('ADMIN_ACTION_404', "Called admin-module <span class=\"data\">%s</span> is well valid but it is not on this server."); -define('ALREADY_INSTALLED', "This script is already installed on this server. Please delete the whole installation system for your server. Don't worry you can do it..."); -define('ADMIN_MAIN_TITLE', "Welcome to the administration area"); -define('YOU_ARE_HERE', "You are here:"); -define('ID_SELECT', "ID:"); -define('DISPLAY_ACTION', "Action"); -define('DISPLAY_WHAT', "Sub action"); -define('DISPLAY_TITLE', "Title"); -define('UNDO_SELECTIONS', "Undo selections"); -define('EDIT_MENUS', "Edit menus"); -define('DEL_MENUS', "Delete menus"); -define('EDIT_ADMIN_MENU', "Edit admin menu entries"); -define('EDIT_MENU_1', "<strong>"); -define('EDIT_MENU_2', "</strong> menu entr(y/ies) shall be edited:"); -define('ENTRY_MODIFY', "Entry"); -define('SUBMIT_CHANGES', "Submit changes"); -define('ENTRY_404_1', "Entry <em>"); -define('ENTRY_404_2', "</em> was not found!"); -define('EDIT_UNKNOWN_OKAY', "An unknown action was performed."); -define('DEL_ADMIN_MENU', "Admin-Menüeinträge löschen"); -define('DEL_MENU_1', "<strong>"); -define('DEL_MENU_2', "</strong> menu entr(y/ies) shall be deleted:"); -define('DEL_ENTRIES', "Remove entries permanently"); -define('EDIT_ACTION', "Change action value"); -define('EDIT_WHAT', "Change sub action"); -define('EDIT_TITLE', "Change link title"); -define('ADMIN_ADD_MENU', ""); -define('ENTER_TITLE', "Enter link title for new menu entry"); -define('SELECT_PARENT_MENU', "Select the parent main menu"); -define('IS_TOP_MENU', "Is main menu"); -define('SELECT_WHAT_NAME', "Select your wished suffix"); -define('ENTER_DESCR', "Enter short but good-to-understand description"); -define('SELECT_BELOW_MENU', "Select menu entry where the new one shall be displayed below"); -define('EDIT_DESCR', "Edit description"); -define('CREATE_WHAT_FIRST', "Please create a what-xxxxx.php file first. After this you can select it here."); -define('MENU_IS_VISIBLE', "Menu point is visible"); -define('MENU_IS_ACTIVE', "Menu point is active"); -define('CREATE_ACTION_FIRST', "Please create an action-xxxxx.php file first. After this you can select it here."); -define('IS_FIRST_MENU', "Is the first main menu"); -define('NO_DB_LINK', "No connection to our database found!"); -define('MYSQL_DATA_MISSING', "Something is wrong with the MySQL settings!"); -define('REGISTER_PERSONAL_DATA', "Personal data"); -define('REGISTER_CATEGORIES', "Your interests"); -define('REGISTER_MISC', "Password, maximum mails per day, etc."); -define('SURNAME', "Surname"); -define('FAMILY_NAME', "Family name"); -define('STREET_NR', "Street and house number"); -define('COUNTRY', "Country"); -define('ZIP', "ZIP code"); -define('CITY', "City"); -define('ADDY', "Email address"); -define('BIRTHDAY', "Birthday (MM.DD.YYYY)"); -define('PASS_1', "Password"); -define('PASS_2', "Password again"); -define('ADD_NEW_CATEGORY', "Add new category"); -define('ENTER_CATNAME', "Description of category"); -define('SELECT_PARENT', "Below which category shall this new be displayed?"); -define('IS_TOP_CATEGORY', "Is top-level category"); -define('CAT_IS_VISIBLE', "Category is visible?"); -define('ADD_NEW_CAT', "Add new category"); -define('CATEGORY_ADDED', "Category added."); -define('CATEGORY_ALREADY_EXISTS', "Category does already exist!"); -define('EDIT_DEL_CATEGORIES', "Edit / delete listed categories"); -define('CATNAME', "Description of category:"); -define('EDIT_CATS', "Edit categories"); -define('DEL_CATS', "Delete categories"); -define('NO_CATEGORIES_VISIBLE', "Currently no categories can be displayed!"); -define('MAX_RECEIVE', "How many totally mails shall your memebers receive daily? Please add more values so every member can set it more individually."); -define('ADD_MAX_RECEIVE', "Add max-value"); -define('SAVE_SETTINGS', "Save settings"); -define('ENTER_MAX_VALUE', "New max-value (0 to 9999)"); -define('ENTER_MAX_COMMENT', "Addition hint which will be displayed in brackets."); -define('MAX_VALUE_SAVED', "Max-value saved"); -define('MAX_VALUE_ALREADY', "Max-values does already exist!"); -define('EDIT_DEL_MAX_VALUES', "Edit/Delete max-values"); -define('MAX_VALUE', "Maxium receiveable mails"); -define('MAX_COMMENT', "Comment to max-value"); -define('EDIT_MAX_V', "Edit max-value"); -define('DEL_MAX_V', "Delete max-value"); -define('NO_MAX_VALUES', "The registration cannot be completed because you cannot select maximum receiveable mails!"); -define('MAX_PER_DAY', "Maximum mails per day"); -define('PER_DAY', "Mails"); -define('REFID_BY', "You are advertised by"); -define('TERMS_OF_USAGE', "Accept T&C and submit form"); -define('YOU_FINALIZE', "You have nearly filled out this form!"); -define('AGREE_TO_THIS', "Do you accep our [<a href=\"{?URL?}/agb.php\" class=\"register_term\" target=\"_blank\">Terms And Conditions</a>] ?"); -define('SUBMIT_REGISTER', "Submit registration form"); -define('HAVE_TO_AGREE', "You have to accept our Terms And Conditions you cannot join this mail exchange!"); -define('ENTER_BOTH_PASSWORDS', "Please enter a password by your choice twice."); -define('ENTER_PASS1', "Please enter a password."); -define('ENTER_PASS2', "Please enter confirmation of your password."); -define('ENTER_EMAIL', "Please enter your valid email address."); -define('ENTER_SURNAME', "Please enter your surname."); -define('ENTER_FAMILY', "Please enter your family's name."); -define('EDIT_SECURITY_SETTINGS', "Change security-related settings"); -define('MIN_PASS_LENGTH', "Minimum password length"); -define('SETTINGS_NOT_SAVED', "Settings are NOT saved/changed!"); -define('SETTINGS_SAVED', "Settings saved."); -define('FATAL_CANNOT_LOAD_CONFIG', "Cannot load base configuration! a possible reason for this message is that the webmaster is setting up this mail exchange. Please come back later again."); -define('ADMIN_ACTION_INVALID', "Your combination action/what <span class=\"data\">%s</span> is invalid!"); -define('SHORT_PASS', "Your entered password is to short to match with our security conditions. Mimum length is"); -define('EDIT_POINTS_SETTINGS', "Edit welcome credit and other {?POINTS?}"); -define('POINTS_REGISTER', "Wecome credit"); -define('POINTS_REF', "Single referal credit"); -define('EDIT_REGFORM_SETTINGS', "Settings for registration form"); -define('LEAST_CATS', "Minium to select categories"); -define('CATS_LEAST', "Please select more categories! Minimum is: %s"); -define('EMAIL_ALREADY_DB', "You are already registered with your entered email address or someone else is using your email address. Registering twice is not allowed in our service."); -define('REJECT_DOUBLE_EMAIL', "Prevent of registering with same email address?"); -define('REJECT_DOUBLE_PASS', "Prevent of registering with same password? (Will not be displayed!)"); -define('ADMIN_EDIT_POINTS', "Edit welcome bonus and other fixed amounts"); -define('ADMIN_EDIT_REFDEPTHS', "Edit / delete / add referal levels"); -define('ADD_NEW_REFDEPTH', "Add new referal level"); -define('ADD_DEPTH', "Add referal level"); -define('ENTER_REF_LVL', "Referal level"); -define('ENTER_REF_PERCENTS', "Percentage payment"); -define('EDIT_DEL_REFDEPTH', "Edit / delete referal levels"); -define('REF_LEVEL', "Referal level"); -define('REF_PERCENT', "Percentage payment"); -define('EDIT_LVL', "Edit referal level"); -define('DEL_LVL', "Delete referal level"); -define('GUEST_YOU_REGISTERED_WITH_US', "Thank you for registering with our email exchange! If you didn't do this please contact us!"); -define('GUEST_YOUR_PERSONA_DATA', "Please verify your personal data"); -define('GUEST_SURNAME', "Surname"); -define('GUEST_FAMILY', "Family name"); -define('GUEST_STREET_NR', "Street and house no."); -define('GUEST_COUNTRY', "Country code"); -define('GUEST_ZIPCODE', "ZIP code"); -define('GUEST_CITY', "City"); -define('GUEST_ADDY', "EMail address"); -define('GUEST_BIRTHDAY', "Birthday"); -define('GUEST_REF', "Advertised by"); -define('GUEST_YOUR_REFLINK', "Here is your personal referal link which you can use to advertise new members:"); -define('GUEST_CONFIRM_LINK', "Your confirmation link (click once!)"); -define('ADMIN_GUEST_REGISTERED_WITH_US', "a guest has registered with our service."); -define('ADMIN_GUEST_PERSONA_DATA', "Here you can verify his personal data"); -define('ADMIN_NEW_ACCOUNT', "New registration for your email exchange"); -define('REGISTRATION_DONE', "Registration is done. An email is on its way to you."); -define('GUEST_404_WHAT', "The menu module <span class=\"data\">%s</span> does not exist or this script makes a boo-boo!"); -define('GUEST_LOCKED_ACTION', "Action module is locked."); -define('FATAL_REPORT_ERRORS', "a fatal error ocurs while runtime. If a module is locked we are working on it othervice please contact us!"); -define('TEMPLATE_404', "Template not found."); -define('EDIT_GUEST_MENU', "Edit guest menu"); -define('EDIT_MEMBER_MENU', "Edit member menu"); -define('DEL_GUEST_MENU', "Delete guest menu"); -define('DEL_MEMBER_MENU', "Delete member menu"); -define('GUEST_PASSWORD', "Your password"); -define('GUEST_THANX_CONFIRMATION', "You have just now confirmed your email address. You are now unlocked for our service {--MAIN_TITLE--}."); -define('GUEST_MAY_LOGIN_HERE', "You can now login here:"); -define('HAPPY_MAILING', "We wish you lots of fun and success with our mailer system!\n\nBest regards,"); -define('GUEST_THANX_CONFIRM', "EMail address confirmed"); -define('GUEST_CONFIRMED_TWICE', "You have already confirmed your email address or your account is locked."); -define('TOP', "To top"); -define('YOUR_LOGIN', "Your login ID is"); -define('LOGIN_URL', "URL for login"); -define('GUEST_WELCOME_MEMBER', "Welcome to the login-area for members"); -define('GUEST_ENTER_LOGIN', "Login ID"); -define('GUEST_ENTER_PASSWORD', "Password"); -define('LOGIN_SUBMIT', "Login"); -define('GUEST_GET_NEW_PASS', "Submit new password"); -define('GUEST_ENTER_EMAIL', "Registered email address"); -define('NEW_PASSWD', "Send new password!"); +addMessages(array( + 'LANG_DOWN_MAINTAINCE' => "System is down for maintenance.", + 'LANG_MOD_REG_404' => "Module <span class=\"data\">%s</span> does not exists.", + 'LANG_UNKNOWN_MODULE' => "Unknown module", + 'META_YOUR_NAME_1' => "Your name here", + 'META_YOUR_NAME_2' => "Your name again", + 'META_DESCRIPTION' => "The description of your website here", + 'META_KEYWORDS' => "Enter at least (1) 20 search keywords seperated by commatas here", + 'LANG_WARNING' => "Warning", + 'DIE_CONFIG_CHANGED_YOU' => "You have edited your config.php file! I'm out here...", + 'DIE_RUN_INSTALL_MYSQL' => "Please run http://your-domain.com/install.php to setup your MySQL data.", + 'WARN_NULL_PASSWORD' => "You have a null-password! If you want to switch off this warning please have a look in <strong>{?CACHE_PATH?}/config-local.php</strong>.", + 'FATAL_CONFIG_WRITABLE' => "Your file {?CACHE_PATH?}/config-local.php is writeable! This is a possible security risk.", + 'FATAL_CANNOT_WRITE_CONFIG' => "Cannot write config data because I have no write permissions to {?CACHE_PATH?}/config-local.php.", + 'FATAL_ERROR' => "Fatal error", + 'LANG_NO_RENDER_DIRECT' => "You did not setup the output mode weather to 'render' nor to 'direct'.", + 'INSTALLATION' => "Script installation", + 'INSTALL_PROBLEMS_DETECTED' => "I have detected problems while initializing the installation procedure.", + 'FATAL_NO' => "Fatal error no. #", + 'FATAL_CORRECT_ERRORS' => "I cannot continue! Please correct the listet problems first and retry again!", + 'WRONG_PAGE' => "You or this system has selected a wrong page!", + 'SERVER_PATH' => "Absolute server path", + 'BASE_URL' => "Base URL", + 'HP_TITLE' => "Mail-exchange's title", + 'HP_SLOGAN' => "Slogan", + 'MYSQL_HOST' => "Server hostname", + 'MYSQL_DBASE' => "Database", + 'MYSQL_PREFIX' => "Prefix for all tables", + 'MYSQL_LOGIN' => "Your login name", + 'MYSQL_PASS1' => "Your password", + 'MYSQL_PASS2' => "Password confirmation", + 'CSS_URL' => "URL to CSS file (relative)", + 'FATAL_NO_MHOST' => "You have entered no host name!", + 'FATAL_NO_MDBASE' => "Please provide a database name.", + 'FATAL_NO_MLOGIN' => "Please enter your login to the database.", + 'FATAL_NO_MPASS1' => "You have entered no password. This is very unsecure and will be handled as an error.", + 'FATAL_NO_MPASS2' => "Please enter the password confirmation.", + 'FATAL_MPASS1_MPASS2' => "Your both passwords didn't match.", + 'LANG_OUTPUT_MODE' => "Output mode of HTML code", + 'MODE_RENDER' => "HTML code will be rendered and then delivered.", + 'MODE_DIRECT' => "HTML code will be delivered immediately.", + 'WARN_NO_PASSWORD' => "Shall I warn you if you did not provide a password?", + 'YES' => "Yes", + 'NO' => "No", + 'RETURN_MYSQL_PAGE' => "Back to MySQL settings", + 'INSTALL_FINALIZER_FAILED' => "While installtion unexpected errors occur! The finalizer cannt finish installation.", + 'INSTALL_MAYBE_DONE' => "The installation is possibely completed or unexpected errros occur.", + 'INSTALL_FINISHED' => "Installation is completed! :-)", + 'INSTALL_FIN_SECU' => "You should remove <u>install.php</u> and <u>inc/install-inc.php</u> from your server. Normally this is not required. But you should really do it for additional security.", + 'CONTINUE_ADMIN' => "Continue to administrator's area...", + 'RUNTIME_PROBLEMS_DETECTED' => "Runtime-problem detected!", + 'FATAL_INC_WRITABLE' => "Directory inc is writeable! Please set the access rights to CHMOD 755.", + 'LANG_WRITE_FOOTER' => "Display name, version and author of this script?", + 'LANG_FRAMESET_ACTIVE' => "Enable frameset? If not a table-set will be used instead.", + 'MYSQL_ERRORS' => "MySQL errors detected. Please correct first to continue.", + 'LANG_MOD_REG_UNKNOWN' => "Unknown return-code <span class=\"data\">%s</span> detected!", + 'LANG_MOD_REG_LOCKED' => "Selected module <span class=\"data\">%s</span> is locked!", + 'ADMIN_NOT_REGISTERED' => "There is no administrator account created so far.", + 'ADMIN_REGISTER_NOW' => "Please create an administrator account now:", + 'ADMIN_LOGIN' => "Enter administrator login", + 'ADMIN_PASS' => "Enter password", + 'LANG_CLEAR_FORM' => "Clear form", + 'ADMIN_REG_SUBMIT' => "Create admin-account", + 'ADMIN_NO_LOGIN' => "You have entered no login.", + 'ADMIN_NO_PASS' => "You have entered no password.", + 'ADMIN_SHORT_PASS' => "Your entered password is too short. Please enter at least 4 chars!", + 'ADMIN_LOGIN_ALREADY_REG' => "Your entered admin-login does already exists.", + 'ADMIN_REGISTER_FAILED' => "While creating an admin-account an unexpected error occurs!", + 'ADMIN_REGISTER_DONE' => "Admin account created. You can use the account to login into the admin-area.", + 'ADMIN_CANNOT_COMPLETE' => "Cannot finish registration of admin-account!", + 'ADMIN_LOGIN_NOW' => "You can now login into the admin-area.<br />Enter your admin-login (not user-login!) and the password to do so.", + 'ENTER_ADMIN_LOGIN' => "Administrator login", + 'ENTER_ADMIN_PASS' => "Password", + 'ADMIN_LOGIN_SUBMIT' => "Login to admin-area", + 'WRONG_PASS' => "Wrong password.", + 'ADMIN_404' => "Administrator account not found.", + 'ADMIN_LOGIN_FAILED' => "Login into admin-area failed!", + 'CANNOT_REGISTER_SESS' => "Cannot register session cookies. Maybe you have deactivated cookies?", + 'SELECT_TIMEOUT' => "Expiration time for automated login", + 'TIMEOUT_ONE_DAY' => "1 Day", + 'TIMEOUT_TWO_DAYS' => "2 Days", + 'TIMEOUT_THREE_DAYS' => "3 Days", + 'TIMEOUT_ONE_WEEK' => "1 Week", + 'TIMEOUT_TWO_WEEKS' => "2 Weeks", + 'TIMEOUT_ONE_MONTH' => "1 Month", + 'TIMEOUT_HALF_YEAR' => "1/2 Year", + 'TIMEOUT_FULL_YEAR' => "1 Year", + 'ADMIN_LOGOUT_DONE' => "Logout from admin-account completed.", + 'ADMIN_LOGOUT_FAILED' => "Logout from admin-account failed! :-(", + 'ADMIN_RELOGIN_LINK' => "Click here to re-login again.", + 'ADMIN_ACTION_404' => "Called admin-module <span class=\"data\">%s</span> is well valid but it is not on this server.", + 'ALREADY_INSTALLED' => "This script is already installed on this server. Please delete the whole installation system for your server. Don't worry you can do it...", + 'ADMIN_MAIN_TITLE' => "Welcome to the administration area", + 'YOU_ARE_HERE' => "You are here:", + 'ID_SELECT' => "ID:", + 'DISPLAY_ACTION' => "Action", + 'DISPLAY_WHAT' => "Sub action", + 'DISPLAY_TITLE' => "Title", + 'UNDO_SELECTIONS' => "Undo selections", + 'EDIT_MENUS' => "Edit menus", + 'DEL_MENUS' => "Delete menus", + 'EDIT_ADMIN_MENU' => "Edit admin menu entries", + 'EDIT_MENU_1' => "<strong>", + 'EDIT_MENU_2' => "</strong> menu entr(y/ies) shall be edited:", + 'ENTRY_MODIFY' => "Entry", + 'SUBMIT_CHANGES' => "Submit changes", + 'ENTRY_404_1' => "Entry <em>", + 'ENTRY_404_2' => "</em> was not found!", + 'EDIT_UNKNOWN_OKAY' => "An unknown action was performed.", + 'DEL_ADMIN_MENU' => "Admin-Menüeinträge löschen", + 'DEL_MENU_1' => "<strong>", + 'DEL_MENU_2' => "</strong> menu entr(y/ies) shall be deleted:", + 'DEL_ENTRIES' => "Remove entries permanently", + 'EDIT_ACTION' => "Change action value", + 'EDIT_WHAT' => "Change sub action", + 'EDIT_TITLE' => "Change link title", + 'ADMIN_ADD_MENU' => "", + 'ENTER_TITLE' => "Enter link title for new menu entry", + 'SELECT_PARENT_MENU' => "Select the parent main menu", + 'IS_TOP_MENU' => "Is main menu", + 'SELECT_WHAT_NAME' => "Select your wished suffix", + 'ENTER_DESCR' => "Enter short but good-to-understand description", + 'SELECT_BELOW_MENU' => "Select menu entry where the new one shall be displayed below", + 'EDIT_DESCR' => "Edit description", + 'CREATE_WHAT_FIRST' => "Please create a what-xxxxx.php file first. After this you can select it here.", + 'MENU_IS_VISIBLE' => "Menu point is visible", + 'MENU_IS_ACTIVE' => "Menu point is active", + 'CREATE_ACTION_FIRST' => "Please create an action-xxxxx.php file first. After this you can select it here.", + 'IS_FIRST_MENU' => "Is the first main menu", + 'NO_DB_LINK' => "No connection to our database found!", + 'MYSQL_DATA_MISSING' => "Something is wrong with the MySQL settings!", + 'REGISTER_PERSONAL_DATA' => "Personal data", + 'REGISTER_CATEGORIES' => "Your interests", + 'REGISTER_MISC' => "Password, maximum mails per day, etc.", + 'SURNAME' => "Surname", + 'FAMILY_NAME' => "Family name", + 'STREET_NR' => "Street and house number", + 'COUNTRY' => "Country", + 'ZIP' => "ZIP code", + 'CITY' => "City", + 'EMAIL_ADDRESS' => "Email address", + 'BIRTHDAY' => "Birthday (MM.DD.YYYY)", + 'PASS_1' => "Password", + 'PASS_2' => "Password again", + 'ADD_NEW_CATEGORY' => "Add new category", + 'ENTER_CATNAME' => "Description of category", + 'SELECT_PARENT' => "Below which category shall this new be displayed?", + 'IS_TOP_CATEGORY' => "Is top-level category", + 'CAT_IS_VISIBLE' => "Category is visible?", + 'ADD_NEW_CAT' => "Add new category", + 'CATEGORY_ADDED' => "Category added.", + 'CATEGORY_ALREADY_EXISTS' => "Category does already exist!", + 'EDIT_DEL_CATEGORIES' => "Edit / delete listed categories", + 'CATNAME' => "Description of category:", + 'EDIT_CATS' => "Edit categories", + 'DEL_CATS' => "Delete categories", + 'NO_CATEGORIES_VISIBLE' => "Currently no categories can be displayed!", + 'MAX_RECEIVE' => "How many totally mails shall your memebers receive daily? Please add more values so every member can set it more individually.", + 'ADD_MAX_RECEIVE' => "Add max-value", + 'SAVE_SETTINGS' => "Save settings", + 'ENTER_MAX_VALUE' => "New max-value (0 to 9999)", + 'ENTER_MAX_COMMENT' => "Addition hint which will be displayed in brackets.", + 'MAX_VALUE_SAVED' => "Max-value saved", + 'MAX_VALUE_ALREADY' => "Max-values does already exist!", + 'EDIT_DEL_MAX_VALUES' => "Edit/Delete max-values", + 'MAX_VALUE' => "Maxium receiveable mails", + 'MAX_COMMENT' => "Comment to max-value", + 'EDIT_MAX_V' => "Edit max-value", + 'DEL_MAX_V' => "Delete max-value", + 'NO_MAX_VALUES' => "The registration cannot be completed because you cannot select maximum receiveable mails!", + 'MAX_PER_DAY' => "Maximum mails per day", + 'PER_DAY' => "Mails", + 'REFID_BY' => "You are advertised by", + 'TERMS_OF_USAGE' => "Accept T&C and submit form", + 'YOU_FINALIZE' => "You have nearly filled out this form!", + 'AGREE_TO_THIS' => "Do you accep our [<a href=\"{?URL?}/agb.php\" class=\"register_term\" target=\"_blank\">Terms And Conditions</a>] ?", + 'SUBMIT_REGISTER' => "Submit registration form", + 'HAVE_TO_AGREE' => "You have to accept our Terms And Conditions you cannot join this mail exchange!", + 'ENTER_BOTH_PASSWORDS' => "Please enter a password by your choice twice.", + 'ENTER_PASS1' => "Please enter a password.", + 'ENTER_PASS2' => "Please enter confirmation of your password.", + 'ENTER_EMAIL' => "Please enter your valid email address.", + 'ENTER_SURNAME' => "Please enter your surname.", + 'ENTER_FAMILY' => "Please enter your family's name.", + 'EDIT_SECURITY_SETTINGS' => "Change security-related settings", + 'MIN_PASS_LENGTH' => "Minimum password length", + 'SETTINGS_NOT_SAVED' => "Settings are NOT saved/changed!", + 'SETTINGS_SAVED' => "Settings saved.", + 'FATAL_CANNOT_LOAD_CONFIG' => "Cannot load base configuration! a possible reason for this message is that the webmaster is setting up this mail exchange. Please come back later again.", + 'ADMIN_ACTION_INVALID' => "Your combination action/what <span class=\"data\">%s</span> is invalid!", + 'SHORT_PASS' => "Your entered password is to short to match with our security conditions. Mimum length is", + 'EDIT_POINTS_SETTINGS' => "Edit welcome credit and other {?POINTS?}", + 'POINTS_REGISTER' => "Wecome credit", + 'POINTS_REF' => "Single referal credit", + 'EDIT_REGFORM_SETTINGS' => "Settings for registration form", + 'LEAST_CATS' => "Minium to select categories", + 'CATS_LEAST' => "Please select more categories! Minimum is: %s", + 'EMAIL_ALREADY_DB' => "You are already registered with your entered email address or someone else is using your email address. Registering twice is not allowed in our service.", + 'REJECT_DOUBLE_EMAIL' => "Prevent of registering with same email address?", + 'REJECT_DOUBLE_PASS' => "Prevent of registering with same password? (Will not be displayed!)", + 'ADMIN_EDIT_POINTS' => "Edit welcome bonus and other fixed amounts", + 'ADMIN_EDIT_REFDEPTHS' => "Edit / delete / add referal levels", + 'ADD_NEW_REFDEPTH' => "Add new referal level", + 'ADD_DEPTH' => "Add referal level", + 'ENTER_REF_LVL' => "Referal level", + 'ENTER_REF_PERCENTS' => "Percentage payment", + 'EDIT_DEL_REFDEPTH' => "Edit / delete referal levels", + 'REF_LEVEL' => "Referal level", + 'REF_PERCENT' => "Percentage payment", + 'EDIT_LVL' => "Edit referal level", + 'DEL_LVL' => "Delete referal level", + 'GUEST_YOU_REGISTERED_WITH_US' => "Thank you for registering with our email exchange! If you didn't do this please contact us!", + 'GUEST_YOUR_PERSONA_DATA' => "Please verify your personal data", + 'GUEST_SURNAME' => "Surname", + 'GUEST_FAMILY' => "Family name", + 'GUEST_STREET_NR' => "Street and house no.", + 'GUEST_COUNTRY' => "Country code", + 'GUEST_ZIPCODE' => "ZIP code", + 'GUEST_CITY' => "City", + 'GUEST_EMAIL_ADDRESS' => "EMail address", + 'GUEST_BIRTHDAY' => "Birthday", + 'GUEST_REF' => "Advertised by", + 'GUEST_YOUR_REFLINK' => "Here is your personal referal link which you can use to advertise new members:", + 'GUEST_SUBJECT_CONFIRM_LINK' => "Your confirmation link (click once!)", + 'ADMIN_GUEST_REGISTERED_WITH_US' => "a guest has registered with our service.", + 'ADMIN_GUEST_PERSONA_DATA' => "Here you can verify his personal data", + 'ADMIN_SUBJECT_NEW_ACCOUNT' => "New registration for your email exchange", + 'REGISTRATION_DONE' => "Registration is done. An email is on its way to you.", + 'GUEST_404_WHAT' => "The menu module <span class=\"data\">%s</span> does not exist or this script makes a boo-boo!", + 'GUEST_LOCKED_ACTION' => "Action module is locked.", + 'FATAL_REPORT_ERRORS' => "a fatal error ocurs while runtime. If a module is locked we are working on it othervice please contact us!", + 'TEMPLATE_404' => "Template not found.", + 'EDIT_GUEST_MENU' => "Edit guest menu", + 'EDIT_MEMBER_MENU' => "Edit member menu", + 'DEL_GUEST_MENU' => "Delete guest menu", + 'DEL_MEMBER_MENU' => "Delete member menu", + 'GUEST_PASSWORD' => "Your password", + 'GUEST_THANX_CONFIRMATION' => "You have just now confirmed your email address. You are now unlocked for our service {?MAIN_TITLE?}.", + 'GUEST_MAY_LOGIN_HERE' => "You can now login here:", + 'HAPPY_MAILING' => "We wish you lots of fun and success with our mailer system!\n\nBest regards,", + 'GUEST_THANX_CONFIRM' => "EMail address confirmed", + 'GUEST_CONFIRMED_TWICE' => "You have already confirmed your email address or your account is locked.", + 'TOP' => "To top", + 'YOUR_LOGIN' => "Your login ID is", + 'LOGIN_URL' => "URL for login", + 'GUEST_WELCOME_MEMBER' => "Welcome to the login-area for members", + 'GUEST_ENTER_LOGIN' => "Login ID", + 'GUEST_ENTER_PASSWORD' => "Password", + 'LOGIN_SUBMIT' => "Login", + 'GUEST_GET_NEW_PASS' => "Submit new password", + 'GUEST_ENTER_EMAIL' => "Registered email address", + 'NEW_PASSWD' => "Send new password!", +)); -// +// [EOF] ?> diff --git a/inc/language/holiday_de.php b/inc/language/holiday_de.php index 4ff495a76b..a78c9741f4 100644 --- a/inc/language/holiday_de.php +++ b/inc/language/holiday_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,57 +38,58 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('HOLIDAY_MEMBER_TITLE', "Von wann bis wann sind Sie im Urlaub?"); -define('HOLIDAY_MEMBER_TSTART', "Anfang Ihres Urlaubes"); -define('HOLIDAY_MEMBER_TEND', "Ende Ihres Urlaubes"); +addMessages(array( + 'HOLIDAY_MEMBER_TITLE' => "Von wann bis wann sind Sie im Urlaub?", + 'HOLIDAY_MEMBER_TSTART' => "Anfang Ihres Urlaubes", + 'HOLIDAY_MEMBER_TEND' => "Ende Ihres Urlaubes", // @TODO Rewrite these two constants to one -define('HOLIDAY_MAX_DAYS_1', "Sie können nicht mehr als "); -define('HOLIDAY_MAX_DAYS_2', " Tag(e) an Urlaub einstellen!"); -define('HOLIDAY_ADD', "Urlaubsschaltung aktivieren"); -define('HOLIDAY_COMMENTS', "Sonstige Hinweise an uns"); -define('HOLIDAY_NOTES', "Sobald Sie das Formular abgeschickt haben, wird die Urlaubsschaltung für Ihren Account aktiviert. Sie können sich weiterhin im Mitgliedsbereich aufhalten, können aber keine Mails mehr empfangen und auch selber keine mehr buchen!"); -define('ADMIN_TASK_IS_HOLIDAY_REQUEST', "Urlaubsanfrage"); -define('HOLIDAY_ADMIN_NOTHING_FOUND', "Niemand hat Urlaub beantragt."); -define('HOLIDAY_ADMIN_TSTART', "Anfang"); -define('HOLIDAY_ADMIN_TEND', "Ende"); -define('HOLIDAY_ADMIN_COMMENTS', "Kommentar"); -define('HOLIDAY_ADMIN_STOP_CHECKED', "Ausgew. Urlaub beenden"); -define('HOLIDAY_ADMIN_DELETE_NOTE', "Bitte beachten Sie, dass beim vorzeitigen Beenden des Urlaubes der Account-Status nicht geändert wird. Ist also das Account noch gesperrt, müssen Sie es seperat freischalten."); -define('HOLIDAY_NO_DIRECT_CALL', "Bite rufen Sie dieses Script über Auflisten auf."); -define('HOLIDAY_ADMIN_DEL_LINK', "Urlaub beenden"); -define('HOLIDAY_ADMIN_SINGLE_DELETED', "Urlaub eines Mitgliedes beendet!"); -define('HOLIDAY_ADMIN_MULTI_DEL', "Urlaub von <span class=\"data\">%s</span> Mitglied(-ern) beendet!"); -define('HOLIDAY_ADMIN_CONFIG_HEADER', "Einstellungen an der Urlaubsschaltung"); -define('HOLIDAY_ADMIN_MAX_HOLIDAY', "Maximale beantragbare Urlaubszeit"); -define('HOLIDAY_IS_ACTIVATED_NOW', "Ihre Urlaubsschaltung wurde jetzt aktiviert. Sie können keine Mails mehr buchen!"); -define('HOLIDAY_MEMBER_DEACTIVATE_TITLE', "Bestehende Urlaubsschaltung deaktivieren"); -define('HOLIDAY_DEACTIVATE_NOTES', "Möchten Sie diese Urlaubsschaltung wieder deaktivieren? Es ist eine weitere Mail dann an uns unterwegs."); -define('HOLIDAY_STOP', "Urlaubsschaltung aufheben"); -define('HOLIDAY_MEMBER_DEACTIVATED_NOW', "Ihre Urlaubsschaltung ist jetzt aufgehoben!"); -define('HOLIDAY_MEMBER_CANNOT_DEACTIVATE', "Konnte Ihre Urlaubsschaltung nicht aufheben! Bitte melden Sie sich bei uns!"); -define('HOLIDAY_ORDER_NOT_POSSIBLE', "Sie können keine Mails versenden, da Ihre Urlaubsschaltung aktiviert ist!"); -define('HOLIDAY_MEMBER_TLOCK', "Urlaubsschaltung eingerichtet"); -define('HOLIDAY_MEMBER_LOCKED', "Sie können derzeit Ihre Urlaubsschaltung nicht wieder deaktivieren, da Sie diese erst vor Kurzem aktiviert haben."); -define('HOLIDAY_MEMBER_ORDER', "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: <span class=\"data\">%s</span>"); -define('HOLIDAY_ADMIN_SINGLE_404', "Urlaubsschaltung nicht mehr vorhanden, oder veralteter Link!"); -define('HOLIDAY_ADMIN_LOCKED', "Dauer bis Urlaubsschaltung aufgehoben werden kann"); -define('HOLIDAY_ADMIN_MODE', "Zeitpunkt der Abarbeitung der Urlaubsschaltungen"); -define('HOLIDAY_ADMIN_MODE_RESET', "Am täglichen Reset um 00:00 Uhr"); -define('HOLIDAY_ADMIN_MODE_DIRECT', "Sofort nach Beantragung prüfen"); + 'HOLIDAY_MAX_DAYS_1' => "Sie können nicht mehr als ", + 'HOLIDAY_MAX_DAYS_2' => " Tag(e) an Urlaub einstellen!", + 'HOLIDAY_ADD' => "Urlaubsschaltung aktivieren", + 'HOLIDAY_COMMENTS' => "Sonstige Hinweise an uns", + 'HOLIDAY_NOTES' => "Sobald Sie das Formular abgeschickt haben, wird die Urlaubsschaltung für Ihren Account aktiviert. Sie können sich weiterhin im Mitgliedsbereich aufhalten, können aber keine Mails mehr empfangen und auch selber keine mehr buchen!", + 'ADMIN_TASK_IS_HOLIDAY_REQUEST' => "Urlaubsanfrage", + 'HOLIDAY_ADMIN_NOTHING_FOUND' => "Niemand hat Urlaub beantragt.", + 'HOLIDAY_ADMIN_TSTART' => "Anfang", + 'HOLIDAY_ADMIN_TEND' => "Ende", + 'HOLIDAY_ADMIN_COMMENTS' => "Kommentar", + 'HOLIDAY_ADMIN_STOP_CHECKED' => "Ausgew. Urlaub beenden", + 'HOLIDAY_ADMIN_DELETE_NOTE' => "Bitte beachten Sie, dass beim vorzeitigen Beenden des Urlaubes der Account-Status nicht geändert wird. Ist also das Account noch gesperrt, müssen Sie es seperat freischalten.", + 'HOLIDAY_NO_DIRECT_CALL' => "Bite rufen Sie dieses Script über Auflisten auf.", + 'HOLIDAY_ADMIN_DEL_LINK' => "Urlaub beenden", + 'HOLIDAY_ADMIN_SINGLE_DELETED' => "Urlaub eines Mitgliedes beendet!", + 'HOLIDAY_ADMIN_MULTI_DEL' => "Urlaub von <span class=\"data\">%s</span> Mitglied(-ern) beendet!", + 'HOLIDAY_ADMIN_CONFIG_HEADER' => "Einstellungen an der Urlaubsschaltung", + 'HOLIDAY_ADMIN_MAX_HOLIDAY' => "Maximale beantragbare Urlaubszeit", + 'HOLIDAY_IS_ACTIVATED_NOW' => "Ihre Urlaubsschaltung wurde jetzt aktiviert. Sie können keine Mails mehr buchen!", + 'HOLIDAY_MEMBER_DEACTIVATE_TITLE' => "Bestehende Urlaubsschaltung deaktivieren", + 'HOLIDAY_DEACTIVATE_NOTES' => "Möchten Sie diese Urlaubsschaltung wieder deaktivieren? Es ist eine weitere Mail dann an uns unterwegs.", + 'HOLIDAY_STOP' => "Urlaubsschaltung aufheben", + 'HOLIDAY_MEMBER_DEACTIVATED_NOW' => "Ihre Urlaubsschaltung ist jetzt aufgehoben!", + 'HOLIDAY_MEMBER_CANNOT_DEACTIVATE' => "Konnte Ihre Urlaubsschaltung nicht aufheben! Bitte melden Sie sich bei uns!", + 'HOLIDAY_ORDER_NOT_POSSIBLE' => "Sie können keine Mails versenden, da Ihre Urlaubsschaltung aktiviert ist!", + 'HOLIDAY_MEMBER_TLOCK' => "Urlaubsschaltung eingerichtet", + 'HOLIDAY_MEMBER_LOCKED' => "Sie können derzeit Ihre Urlaubsschaltung nicht wieder deaktivieren, da Sie diese erst vor Kurzem aktiviert haben.", + 'HOLIDAY_MEMBER_ORDER' => "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: <span class=\"data\">%s</span>", + 'HOLIDAY_ADMIN_SINGLE_404' => "Urlaubsschaltung nicht mehr vorhanden, oder veralteter Link!", + 'HOLIDAY_ADMIN_LOCKED' => "Dauer bis Urlaubsschaltung aufgehoben werden kann", + 'HOLIDAY_ADMIN_MODE' => "Zeitpunkt der Abarbeitung der Urlaubsschaltungen", + 'HOLIDAY_ADMIN_MODE_RESET' => "Am täglichen Reset um 00:00 Uhr", + 'HOLIDAY_ADMIN_MODE_DIRECT' => "Sofort nach Beantragung prüfen", // Subject lines -define('HOLIDAY_MEMBER_SUBJECT', "[HINWEIS:] Ihre Urlaubsanfrage"); -define('HOLIDAY_ADMIN_SUBJECT', "Urlaubsanfrage in Ihrem {?MT_WORD?}"); -define('HOLIDAY_MEMBER_UNLOCK_SUBJ', "[HINWEIS:] Beendigung Ihres Urlaubes"); -define('HOLIDAY_ADMIN_UNLOCK_SUBJ', "Automatische Urlaubsbeendigung"); -define('HOLIDAY_ADMIN_DEAC_SUBJ', "Deaktivierung einer Urlaubsschaltung"); -define('HOLIDAY_ADMIN_REMOVED_SUBJ', "[HINWEIS:] Ihr Urlaub wurde beendet"); -define('HOLIDAY_MEMBER_ACTIVATED_SUBJ', "[HINWEIS:] Ihre Urlaubsschaltung ist aktiviert"); + 'HOLIDAY_MEMBER_SUBJECT' => "[HINWEIS:] Ihre Urlaubsanfrage", + 'HOLIDAY_ADMIN_SUBJECT' => "Urlaubsanfrage in Ihrem {?mt_word?}", + 'HOLIDAY_MEMBER_UNLOCK_SUBJ' => "[HINWEIS:] Beendigung Ihres Urlaubes", + 'HOLIDAY_ADMIN_UNLOCK_SUBJ' => "Automatische Urlaubsbeendigung", + 'HOLIDAY_ADMIN_DEAC_SUBJ' => "Deaktivierung einer Urlaubsschaltung", + 'HOLIDAY_ADMIN_REMOVED_SUBJ' => "[HINWEIS:] Ihr Urlaub wurde beendet", + 'HOLIDAY_MEMBER_ACTIVATED_SUBJ' => "[HINWEIS:] Ihre Urlaubsschaltung ist aktiviert", +)); -// +// [EOF] ?> diff --git a/inc/language/html_mail_de.php b/inc/language/html_mail_de.php index 0001074cbd..08263e2a90 100644 --- a/inc/language/html_mail_de.php +++ b/inc/language/html_mail_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,19 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_HTML_DOWNLOAD_CLASS', "Bitte laden Sie sich die Klasse <a href=\"".DEREFERER("https://sourceforge.net/projects/phpmailer/")."\" target=\"_blank\">PHPMailer</a> herunter, um diese Funktion nutzen zu können!"); -define('MEMBER_HTML_INTRO', "HTML-Emfpang - Einstellung"); -define('MEMBER_HTML_TEXT', "In unserem {?MT_WORD?} ist das Empfangen von HTML-Mails nun möglich. Gleichzeitig können Sie auch selber HTML-Mails versenden. Möchten Sie dies beides nutzen?"); -define('MEMBER_HTML_ORDER_INTRO', "HTML- oder normale Text-Mails versenden?"); -define('MEMBER_HTML_MSG', "HTML-Mail"); -define('MEMBER_NORMAL_MSG', "Normale Text-Mail"); -define('MEMBER_HTML_VALID_TAGS', "Gütige HTML-Codes sind"); -define('MEMBER_HTML_INVALID_TAGS', "Ungütige HTML-Tags im HTML-Code gefunden!"); +addMessages(array( + 'ADMIN_HTML_DOWNLOAD_CLASS' => "Bitte laden Sie sich die Klasse <a href=\"".generateDerefererUrl("https://sourceforge.net/projects/phpmailer/")."\" target=\"_blank\">PHPMailer</a> herunter, um diese Funktion nutzen zu können!", + 'MEMBER_HTML_INTRO' => "HTML-Emfpang - Einstellung", + 'MEMBER_HTML_TEXT' => "In unserem {?mt_word?} ist das Empfangen von HTML-Mails nun möglich. Gleichzeitig können Sie auch selber HTML-Mails versenden. Möchten Sie dies beides nutzen?", + 'MEMBER_HTML_ORDER_INTRO' => "HTML- oder normale Text-Mails versenden?", + 'MEMBER_HTML_MSG' => "HTML-Mail", + 'MEMBER_NORMAL_MSG' => "Normale Text-Mail", + 'MEMBER_HTML_VALID_TAGS' => "Gütige HTML-Codes sind", + 'MEMBER_HTML_INVALID_TAGS' => "Ungütige HTML-Tags im HTML-Code gefunden!", +)); -// +// [EOF] ?> diff --git a/inc/language/imprint_de.php b/inc/language/imprint_de.php new file mode 100644 index 0000000000..69ef8b517e --- /dev/null +++ b/inc/language/imprint_de.php @@ -0,0 +1,54 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * =============== Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : imprint_de.php * + * -------------------------------------------------------------------- * + * Short description : German langugage support * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Deutsche Sprachunterstuetzung * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Language definitions +addMessages(array( + 'ADMIN_IMPRINT_NO_ROWS' => "Keine Impressumsdaten gefunden! Bitte Erweiterung neuinstallieren, dies fügt Standart-Einträge dazu.", + 'ADMIN_CONFIG_IMPRINT' => "Konfiguration der Impressumsdaten", + 'ADMIN_IMPRINT_KEY' => "Eintragsname", + 'ADMIN_IMPRINT_VALUE' => "Datenwert", + 'ADMIN_IMPRINT_SELECT_ROW' => "Datenzeile auswählen", +)); + +// [EOF] +?> diff --git a/inc/language/install_de.php b/inc/language/install_de.php index 797b464df5..877747a2b2 100644 --- a/inc/language/install_de.php +++ b/inc/language/install_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,65 +38,66 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{?MT_WORD?}-Script"); -define('SETUP_OF_MXCHANGE', "Installation von MXChange-{?MT_WORD?}-Script - %s"); -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?) <em>rel="external"</em> ist gesetzt. Bitte nicht den Backlink einbauen, und <strong>nofollow</strong> verwenden! Das schadet allen."); -define('WRONG_PAGE', "Sie oder dieses Script haben eine falsche Seite ausgewählt!"); -define('NEXT_PAGE', "Weiter zur nächsten Seite..."); -define('HEADER_TEXT_PAGE1', "Server-Pfad, Basis-URL und Webseitentitel"); -define('HEADER_TEXT_PAGE2', "MySQL-Daten: Hostname, Login und Passwort"); -define('HEADER_TEXT_PAGE3', "SMTP-Server Einstellungen"); -define('HEADER_TEXT_PAGE4', "Cascading Stylesheet-Datei"); -define('HEADER_TEXT_PAGE5', "Verschiedene Einstellungen"); -define('HEADER_MYSQL_ERRORS', "Fehler beim Verbinden zur MySQL-Datenbank!"); -define('TEXT_PAGE_1', "Geben Sie hier den absoluten Server-Pfad (/ihr/server/pfad/) <strong>mit</strong> abschliessendem Slash (/), die Basis-URL (vorgegebene Werte stimmen meistens) und den Titel Ihres {?MT_WORD2?} ein."); -define('TEXT_PAGE_2', "Geben Sie hier die Daten vom MySQL-Server ein, die Ihnen vom Hoster mitgeteilt wurden. Es wird dann anschliessend versucht, eine Testverbindung aufzubauen."); -define('TEXT_PAGE_3', "Geben Sie hier die Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standart-Einstellungen."); -define('TEXT_PAGE_4', "Geben Sie hier die URL Ihrer hochgeladenen CSS-Datei an. Wenn Sie die bestehende Standart-Datei verwenden möchten, so klicken Sie einfach auf Weiter."); -define('TEXT_PAGE_5', "Hier können Sie weitere Einstellungen vornehmen, wie zum Beispiel den Ausgabe-Modus festlegen, in der der HTML-Code ausgegeben werden soll, usw."); -define('TEXT_MYSQL_ERRORS', "Es konnte keine Verbindung zur Datenbank aufgebaut werden! Ist das Login richtig? Ist auch die UMSCHALT-Taste nicht betätigt? (zweite grüne Lampe leuchtet!) Ist somit das Passwort richtig?<br /><br />Hier sind / ist alle Fehler aufgelistet:"); -define('SERVER_PATH', "Absoluter Server-Pfad"); -define('BASE_URL', "Basis-URL"); -define('HP_TITLE', "{?MT_WORD?}-Titel"); -define('HP_SLOGAN', "Werbespruch"); -define('HP_EMAIL', "E-Mail-Adresse"); -define('MYSQL_HOST', "Server-Hostname"); -define('MYSQL_DBASE', "Datenbank"); -define('MYSQL_PREFIX', "Präfix für alle Tabellen"); -define('MYSQL_TABLE_TYPE', "Tabellentyp: (MyISAM ist meistens ausreichend)"); -define('TABLE_TYPE_MYISAM', "MyISAM (langsamer, da Tabelle gelockt wird)"); -define('TABLE_TYPE_INNODB', "InnoDB (schneller, da zweilenweis gelockt wird)"); -define('MYSQL_LOGIN', "Ihr Loginname"); -define('MYSQL_PASS1', "Ihr Passwort"); -define('MYSQL_PASS2', "Passwortwiederholung"); -define('CSS_URL', "URL zur CSS-Datei (relativ)"); -define('FATAL_NO_MHOST', "Sie haben keinen Hostnamen eingeben!"); -define('FATAL_NO_MDBASE', "Bitte geben Sie einen Datenbankname ein."); -define('FATAL_NO_MLOGIN', "Bitte geben Sie Ihr Loginname zum MySQL-Server ein."); -define('FATAL_NO_MPASS1', "Sie haben kein Passwort eingegeben! Dies ist sehr unsicher und wird daher als Fehler gewertet!"); -define('FATAL_NO_MPASS2', "Bitte geben Sie noch die Passwortbestätigung ein!"); -define('FATAL_MPASS1_MPASS2', "Ihre beiden Passwörter sind nicht identisch!"); -define('LANG_OUTPUT_MODE', "Ausgabemodus des HTML-Codes"); -define('MODE_RENDER', "HTML-Code wird vom Server komplett erzeugt und dann ausgegeben"); -define('MODE_DIRECT', "HTML-Code wird sofort ausgegegeben. (Langsam)"); -define('WARN_NO_PASSWORD', "Warnen, wenn kein Passwort angegeben wurde?"); -define('INSTALL_SQL_IMPORT_FAILED', "Konnte die SQL-Dateien aus <strong>install/</strong> nicht nachladen. Bitte Zugriffsrechte (CHMOD) auf die Dateien überprüfen. Diese sollten 644 mindestens aufweisen!"); +addMessages(array( + 'INSTALLATION_OF_MXCHANGE' => "Installation von MXChange-{?mt_word?}-Script", + 'SETUP_OF_MXCHANGE' => "Installation von MXChange-{?mt_word?}-Script - %s", + 'INSTALL_MISSING_DUMPS' => "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).", + 'INSTALL_ENABLE_BACKLINK' => "Backlink (=Rückverlinkung zu mxchange.org setzen?) <em>rel="external"</em> ist gesetzt. Bitte nicht den Backlink einbauen, und <strong>nofollow</strong> verwenden! Das schadet allen.", + 'WRONG_PAGE' => "Sie oder dieses Script haben eine falsche Seite ausgewählt!", + 'NEXT_PAGE' => "Weiter zur nächsten Seite...", + 'HEADER_TEXT_PAGE1' => "Server-Pfad, Basis-URL und Webseitentitel", + 'HEADER_TEXT_PAGE2' => "MySQL-Daten: Hostname, Login und Passwort", + 'HEADER_TEXT_PAGE3' => "SMTP-Server Einstellungen", + 'HEADER_TEXT_PAGE4' => "Cascading Stylesheet-Datei", + 'HEADER_TEXT_PAGE5' => "Verschiedene Einstellungen", + 'HEADER_MYSQL_ERRORS' => "Fehler beim Verbinden zur MySQL-Datenbank!", + 'TEXT_PAGE_1' => "Geben Sie hier den absoluten Server-Pfad (/ihr/server/pfad/) <strong>mit</strong> abschliessendem Slash (/), die Basis-URL (vorgegebene Werte stimmen meistens) und den Titel Ihres {?mt_word2?} ein.", + 'TEXT_PAGE_2' => "Geben Sie hier die Daten vom MySQL-Server ein, die Ihnen vom Hoster mitgeteilt wurden. Es wird dann anschliessend versucht, eine Testverbindung aufzubauen.", + 'TEXT_PAGE_3' => "Geben Sie hier die Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standart-Einstellungen.", + 'TEXT_PAGE_4' => "Geben Sie hier die URL Ihrer hochgeladenen CSS-Datei an. Wenn Sie die bestehende Standart-Datei verwenden möchten, so klicken Sie einfach auf Weiter.", + 'TEXT_PAGE_5' => "Hier können Sie weitere Einstellungen vornehmen, wie zum Beispiel den Ausgabe-Modus festlegen, in der der HTML-Code ausgegeben werden soll, usw.", + 'TEXT_MYSQL_ERRORS' => "Es konnte keine Verbindung zur Datenbank aufgebaut werden! Ist das Login richtig? Ist auch die UMSCHALT-Taste nicht betätigt? (zweite grüne Lampe leuchtet!) Ist somit das Passwort richtig?<br /><br />Hier sind / ist alle Fehler aufgelistet:", + 'SERVER_PATH' => "Absoluter Server-Pfad", + 'BASE_URL' => "Basis-URL", + 'HP_TITLE' => "{?mt_word?}-Titel", + 'HP_SLOGAN' => "Werbespruch", + 'HP_EMAIL' => "E-Mail-Adresse", + 'MYSQL_HOST' => "Server-Hostname", + 'MYSQL_DBASE' => "Datenbank", + 'MYSQL_PREFIX' => "Präfix für alle Tabellen", + 'MYSQL_TABLE_TYPE' => "Tabellentyp: (MyISAM ist meistens ausreichend)", + 'TABLE_TYPE_MYISAM' => "MyISAM (langsamer, da Tabelle gelockt wird)", + 'TABLE_TYPE_INNODB' => "InnoDB (schneller, da zweilenweis gelockt wird)", + 'MYSQL_LOGIN' => "Ihr Loginname", + 'MYSQL_PASS1' => "Ihr Passwort", + 'MYSQL_PASS2' => "Passwortwiederholung", + 'CSS_URL' => "URL zur CSS-Datei (relativ)", + 'FATAL_NO_MHOST' => "Sie haben keinen Hostnamen eingeben!", + 'FATAL_NO_MDBASE' => "Bitte geben Sie einen Datenbankname ein.", + 'FATAL_NO_MLOGIN' => "Bitte geben Sie Ihr Loginname zum MySQL-Server ein.", + 'FATAL_NO_MPASS1' => "Sie haben kein Passwort eingegeben! Dies ist sehr unsicher und wird daher als Fehler gewertet!", + 'FATAL_NO_MPASS2' => "Bitte geben Sie noch die Passwortbestätigung ein!", + 'FATAL_MPASS1_MPASS2' => "Ihre beiden Passwörter sind nicht identisch!", + 'LANG_OUTPUT_MODE' => "Ausgabemodus des HTML-Codes", + 'MODE_RENDER' => "HTML-Code wird vom Server komplett erzeugt und dann ausgegeben", + 'MODE_DIRECT' => "HTML-Code wird sofort ausgegegeben. (Langsam)", + 'WARN_NO_PASSWORD' => "Warnen, wenn kein Passwort angegeben wurde?", + 'INSTALL_SQL_IMPORT_FAILED' => "Konnte die SQL-Dateien aus <strong>install/</strong> nicht nachladen. Bitte Zugriffsrechte (CHMOD) auf die Dateien überprüfen. Diese sollten 644 mindestens aufweisen!", // SMTP input -define('TEXT_SMTP_HOST', "SMTP-Servername (z.B. mail.provider.tld)"); -define('TEXT_SMTP_USER', "SMTP-Benutzername"); -define('TEXT_SMTP_PASS1', "SMTP-Kennwort"); -define('TEXT_SMTP_PASS2', "SMTP-Kennwortwiederholung"); -define('INSTALL_SMTP_HOSTNAME_EMPTY', "SMTP-Servername leer gelassen."); -define('INSTALL_SMTP_PASS1_EMPTY', "SMTP-Passwort leer gelassen."); -define('INSTALL_SMTP_PASS2_EMPTY', "SMTP-Passwortwiederholung leer gelassen."); -define('INSTALL_SMTP_PASS_MISMATCH', "SMTP-Passwort und -wiederholung stimmen nicht überein."); + 'TEXT_SMTP_HOST' => "SMTP-Servername (z.B. mail.provider.tld)", + 'TEXT_SMTP_USER' => "SMTP-Benutzername", + 'TEXT_SMTP_PASS1' => "SMTP-Kennwort", + 'TEXT_SMTP_PASS2' => "SMTP-Kennwortwiederholung", + 'INSTALL_SMTP_HOSTNAME_EMPTY' => "SMTP-Servername leer gelassen.", + 'INSTALL_SMTP_PASS1_EMPTY' => "SMTP-Passwort leer gelassen.", + 'INSTALL_SMTP_PASS2_EMPTY' => "SMTP-Passwortwiederholung leer gelassen.", + 'INSTALL_SMTP_PASS_MISMATCH' => "SMTP-Passwort und -wiederholung stimmen nicht überein.", +)); -// +// [EOF] ?> diff --git a/inc/language/logs_de.php b/inc/language/logs_de.php index 8f741e2f44..eedfbb6ffe 100644 --- a/inc/language/logs_de.php +++ b/inc/language/logs_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,15 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} //Â END - if // Language definitions -define('ADMIN_LOGS_DIR_404', "Das Verzeichnis mit den Zugriffslogbüchern konnte nicht gefunden werden! (<span class=\"data\">%s</span>) Vermutlich unterstützt Ihr Server dieses nicht."); -define('ADMIN_LOGFILE_NOT_READABLE', "Das Logbuch <span class=\"data\">%s</span> konnte nicht geladen werden."); -define('ADMIN_UNKNOWN_LOGFILE_FORMAT', "Das Logbuch <span class=\"data\">%s</span> hat ein ungültiges oder nicht unterstütztes Format."); +addMessages(array( + 'ADMIN_LOGS_DIR_404' => "Das Verzeichnis mit den Zugriffslogbüchern konnte nicht gefunden werden! (<span class=\"data\">%s</span>) Vermutlich unterstützt Ihr Server dieses nicht.", + 'ADMIN_LOGFILE_NOT_READABLE' => "Das Logbuch <span class=\"data\">%s</span> konnte nicht geladen werden.", + 'ADMIN_UNKNOWN_LOGFILE_FORMAT' => "Das Logbuch <span class=\"data\">%s</span> hat ein ungültiges oder nicht unterstütztes Format.", +)); -// +// [EOF] ?> diff --git a/inc/language/mailid_de.php b/inc/language/mailid_de.php index 8378b53910..13b9b3e12a 100644 --- a/inc/language/mailid_de.php +++ b/inc/language/mailid_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,25 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('MAIL_DATA_INVALID', "Daten der Mailbuchung sind fehlerhaft."); -define('ERROR_CONFIRMING_MAIL', "Bitte klicken Sie nur Links aus Ihrem Mitgliedsbereich oder aus den Mails an."); -define('THANX_POINTS_ADDED_1', "Vielen Dank für die Bestätigung der Mail. Die "); -define('THANX_POINTS_ADDED_2', " {?POINTS?} wurden Ihnen gerade gutgeschrieben!"); -define('THANX_POINTS_LOCKED_1', "Vielen Dank für die Bestätigung der Mail. Die "); -define('THANX_POINTS_LOCKED_2', " {?POINTS?} werden Ihnen bald gutgeschrieben!"); -define('POINTS_NOT_ADDED_1', "Falscher Bestätigungscode eingegeben! Die "); -define('POINTS_NOT_ADDED_2', " {?POINTS?} wurden dem Versender wieder gutgeschrieben!"); -define('ENTER_CODE', "Code eingeben"); -define('MEMBER_TIME_COUNTER_1', "Gutschrift der {?POINTS?} erfolgt in"); -define('MEMBER_TIME_COUNTER_2', "!"); -define('SUBMIT_CODE', "Abschicken"); -define('MAILID_TOTAL_POINTS1', "Ihr Kontostand beträgt jetzt"); -define('MAILID_TOTAL_POINTS2', "."); +addMessages(array( + 'MAIL_DATA_INVALID' => "Daten der Mailbuchung sind fehlerhaft.", + 'ERROR_CONFIRMING_MAIL' => "Bitte klicken Sie nur Links aus Ihrem Mitgliedsbereich oder aus den Mails an.", + 'THANX_POINTS_ADDED_1' => "Vielen Dank für die Bestätigung der Mail. Die ", + 'THANX_POINTS_ADDED_2' => " {?POINTS?} wurden Ihnen gerade gutgeschrieben!", + 'THANX_POINTS_LOCKED_1' => "Vielen Dank für die Bestätigung der Mail. Die ", + 'THANX_POINTS_LOCKED_2' => " {?POINTS?} werden Ihnen bald gutgeschrieben!", + 'POINTS_NOT_ADDED_1' => "Falscher Bestätigungscode eingegeben! Die ", + 'POINTS_NOT_ADDED_2' => " {?POINTS?} wurden dem Versender wieder gutgeschrieben!", + 'ENTER_CODE' => "Code eingeben", + 'MEMBER_TIME_COUNTER_1' => "Gutschrift der {?POINTS?} erfolgt in", + 'MEMBER_TIME_COUNTER_2' => "!", + 'SUBMIT_CODE' => "Abschicken", + 'MAILID_TOTAL_POINTS1' => "Ihr Kontostand beträgt jetzt", + 'MAILID_TOTAL_POINTS2' => ".", +)); -// +// [EOF] ?> diff --git a/inc/language/maintenance_de.php b/inc/language/maintenance_de.php index 4804b19b2b..7619443c09 100644 --- a/inc/language/maintenance_de.php +++ b/inc/language/maintenance_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language constans -define('ADMIN_CHANGE_MAINTENANCE_MODE', "Wartungsmodus ändern"); -define('ADMIN_MAINTENANCE_MODE_INTRO', "Wartungsmodus Ihrer Webseite"); -define('ADMIN_MAINTENANCE_MODE_IS_INACTIVE', "Der Wartungsmodus ist derzeit ausgeschaltet. Wenn Sie ihn jetzt aktivieren, wird Ihre Webseite gesperrt. Nur Administratoren können diese dann besuchen."); -define('ADMIN_MAINTENANCE_MODE_IS_ACTIVE', "Der Wartungsmodus ist derzeit eingeschaltet. Wenn Sie ihn jetzt deaktivieren, wird Ihre Webseite freigegeben. Alle Gäste können Ihre Webseite dann wieder besuchen."); -define('ADMIN_MAINTENANCE_DEACTIVATED', "Wartungsmodus wurde deaktiviert."); -define('ADMIN_MAINTENANCE_ACTIVATED', "Wartungsmodus wurde aktiviert."); +addMessages(array( + 'ADMIN_CHANGE_MAINTENANCE_MODE' => "Wartungsmodus ändern", + 'ADMIN_MAINTENANCE_MODE_INTRO' => "Wartungsmodus Ihrer Webseite", + 'ADMIN_MAINTENANCE_MODE_IS_INACTIVE' => "Der Wartungsmodus ist derzeit ausgeschaltet. Wenn Sie ihn jetzt aktivieren, wird Ihre Webseite gesperrt. Nur Administratoren können diese dann besuchen.", + 'ADMIN_MAINTENANCE_MODE_IS_ACTIVE' => "Der Wartungsmodus ist derzeit eingeschaltet. Wenn Sie ihn jetzt deaktivieren, wird Ihre Webseite freigegeben. Alle Gäste können Ihre Webseite dann wieder besuchen.", + 'ADMIN_MAINTENANCE_DEACTIVATED' => "Wartungsmodus wurde deaktiviert.", + 'ADMIN_MAINTENANCE_ACTIVATED' => "Wartungsmodus wurde aktiviert.", +)); -// +// [EOF] ?> diff --git a/inc/language/mediadata_de.php b/inc/language/mediadata_de.php index 04ccc7bc3e..b5f8429fa9 100644 --- a/inc/language/mediadata_de.php +++ b/inc/language/mediadata_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,60 +38,61 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('MEDIA_DATA_GENERAL', "Allgemeine Mediendaten"); -define('MEDIA_DATA_POINTS', "{?POINTS?} im System"); -define('MEDIA_DATA_MISC', "Verschiedene Mediendaten"); -define('MEDIA_DATA_REFBANNER', "Daten zu unsere Referal-Bannern"); -define('MEDIA_DATA_MAIL', "Mailstatistik"); +addMessages(array( + 'MEDIA_DATA_GENERAL' => "Allgemeine Mediendaten", + 'MEDIA_DATA_POINTS' => "{?POINTS?} im System", + 'MEDIA_DATA_MISC' => "Verschiedene Mediendaten", + 'MEDIA_DATA_REFBANNER' => "Daten zu unsere Referal-Bannern", + 'MEDIA_DATA_MAIL' => "Mailstatistik", -define('MEDIA_DOUBLER_HEADER', "Statistiken - {?POINTS?}-Verdoppler"); -define('MEDIA_DOUBLER_COUNT', "Anzahl Auszahlungen"); -define('MEDIA_DOUBLER_CPOINTS', "Ausgezahlte {?POINTS?}"); -define('MEDIA_DOUBLER_WAITING', "In Warteschleife befindlich"); -define('MEDIA_DOUBLER_WPOINTS', "Wartende {?POINTS?}"); + 'MEDIA_DOUBLER_HEADER' => "Statistiken - {?POINTS?}-Verdoppler", + 'MEDIA_DOUBLER_COUNT' => "Anzahl Auszahlungen", + 'MEDIA_DOUBLER_CPOINTS' => "Ausgezahlte {?POINTS?}", + 'MEDIA_DOUBLER_WAITING' => "In Warteschleife befindlich", + 'MEDIA_DOUBLER_WPOINTS' => "Wartende {?POINTS?}", -define('MEDIA_TRANSFER_HEADER', "Statistiken - {?POINTS?}-Transfer"); -define('MEDIA_TRANSFER_IN_COUNT', "Anzahl eingehende Transfers"); -define('MEDIA_TRANSFER_IN_POINTS', "Eingehende {?POINTS?}"); -define('MEDIA_TRANSFER_OUT_COUNT', "Anzahl ausgehende Transfers"); -define('MEDIA_TRANSFER_OUT_POINTS', "Ausgehende {?POINTS?}"); + 'MEDIA_TRANSFER_HEADER' => "Statistiken - {?POINTS?}-Transfer", + 'MEDIA_TRANSFER_IN_COUNT' => "Anzahl eingehende Transfers", + 'MEDIA_TRANSFER_IN_POINTS' => "Eingehende {?POINTS?}", + 'MEDIA_TRANSFER_OUT_COUNT' => "Anzahl ausgehende Transfers", + 'MEDIA_TRANSFER_OUT_POINTS' => "Ausgehende {?POINTS?}", -define('TOTAL_REF_BANNER', "Anzahl Referal-Banner"); -define('TOTAL_REF_CLICKS', "Klicks auf die Banner"); -define('TOTAL_REF_VIEWS', "Einblendungen der Banner"); -define('TOTAL_REFCLICKS', "Referal-Klicks"); -define('MEDIA_BEG_CLICKS', "Klicks auf Bettellinks"); -define('MEDIA_HOLIDAY_COUNT', "Auf Urlaub gestellte Accounts"); -define('CONTINUE_MEMBER_STATS', "Weiter zur Mitglieder-Statistik"); + 'TOTAL_REF_BANNER' => "Anzahl Referal-Banner", + 'TOTAL_REF_CLICKS' => "Klicks auf die Banner", + 'TOTAL_REF_VIEWS' => "Einblendungen der Banner", + 'TOTAL_REFCLICKS' => "Referal-Klicks", + 'MEDIA_BEG_CLICKS' => "Klicks auf Bettellinks", + 'MEDIA_HOLIDAY_COUNT' => "Auf Urlaub gestellte Accounts", + 'CONTINUE_MEMBER_STATS' => "Weiter zur Mitglieder-Statistik", -define('MEDIA_DATA_SCRIPT', "Daten zur verwendeten Software"); -define('ENGINE_SOFTWARE', "Verwendete Engine"); -define('ENGINE_VERSION', "Installierte MXChange-Version"); -define('ENGINE_PATCH_LEVEL', "Patch-Level"); -define('ENGINE_PATCH_CTIME', "Letzte Aktualisierung"); + 'MEDIA_DATA_SCRIPT' => "Daten zur verwendeten Software", + 'ENGINE_SOFTWARE' => "Verwendete Engine", + 'ENGINE_VERSION' => "Installierte MXChange-Version", + 'ENGINE_PATCH_LEVEL' => "Patch-Level", + 'ENGINE_PATCH_CTIME' => "Letzte Aktualisierung", // Admin area -define('ADMIN_MEDIADATA_SETTINGS', "Einstellungen zu den Mediendaten"); -define('ADMIN_MEDIADATA_MT_START', "Startdatum Ihres {?MT_WORD2?}"); -define('ADMIN_MEDIADATA_MT_START_NOTE', "Bitte beachten Sie, dass das Startdatum Ihres {?MT_WORD2?} nicht in der Zukunft liegen darf!"); -define('ADMIN_MEDIADATA_MT_STAGE', "Anzahl zu vorausberechnende Mitgliederanzahl"); -define('ADMIN_MEDIADATA_MT_STAGE_NOTE', "Geben Sie hier an, wie viele Mitglieder Ihr {?MT_WORD?} erreichen soll. Es wird dann vom Script geschätzt, an welchem Tag dies sein wird."); + 'ADMIN_MEDIADATA_SETTINGS' => "Einstellungen zu den Mediendaten", + 'ADMIN_MEDIADATA_MT_START' => "Startdatum Ihres {?mt_word2?}", + 'ADMIN_MEDIADATA_MT_START_NOTE' => "Bitte beachten Sie, dass das Startdatum Ihres {?mt_word2?} nicht in der Zukunft liegen darf!", + 'ADMIN_MEDIADATA_MT_STAGE' => "Anzahl zu vorausberechnende Mitgliederanzahl", + 'ADMIN_MEDIADATA_MT_STAGE_NOTE' => "Geben Sie hier an, wie viele Mitglieder Ihr {?mt_word?} erreichen soll. Es wird dann vom Script geschätzt, an welchem Tag dies sein wird.", // New guest data -define('MEDIA_DATA_MEMBERS', "Mitglieder-Statistik"); -define('USERS_CONFIRMED', "Bestätigte Accounts"); -define('USERS_UNCONFIRMED', "Auf Freischaltung wartend"); -define('USERS_LOCKED', "Gesperrte Accounts"); -define('USER_MT_START', "Start dieses {?MT_WORD2?}"); -define('USER_MT_PROJECTED_1', "Voraussichtlich: Am <strong>"); -define('USER_MT_PROJECTED_2', "</strong> werden wir <strong>"); -define('USER_MT_PROJECTED_3', "</strong> Mitglieder erreicht haben!"); -define('USER_PROJECTION_UNKNOWN', "<em>unbekanntes Datum</em>"); + 'MEDIA_DATA_MEMBERS' => "Mitglieder-Statistik", + 'USERS_CONFIRMED' => "Bestätigte Accounts", + 'USERS_UNCONFIRMED' => "Auf Freischaltung wartend", + 'USERS_LOCKED' => "Gesperrte Accounts", + 'USER_MT_START' => "Start dieses {?mt_word2?}", + 'USER_MT_PROJECTED_1' => "Voraussichtlich: Am <strong>", + 'USER_MT_PROJECTED_2' => "</strong> werden wir <strong>", + 'USER_MT_PROJECTED_3' => "</strong> Mitglieder erreicht haben!", + 'USER_PROJECTION_UNKNOWN' => "<em>unbekanntes Datum</em>", +)); -// +// [EOF] ?> diff --git a/inc/language/menu_de.php b/inc/language/menu_de.php new file mode 100644 index 0000000000..09a28ca75f --- /dev/null +++ b/inc/language/menu_de.php @@ -0,0 +1,52 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/21/2009 * + * =============== Last change: 10/21/2009 * + * * + * -------------------------------------------------------------------- * + * File : menu_de.php * + * -------------------------------------------------------------------- * + * Short description : German langugage support * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Deutsche Sprachunterstuetzung * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Language definitions +addMessages(array( + 'ADMIN_CONFIG_MENU_TITLE' => "Menü-Systeme konfigurieren", + 'ADMIN_CONFIG_GUEST_MENU_ADVERT_ENABLED' => "Soll Werbung im Gastmenü zwischen allen Menüblöcken angezeigt werden?", + 'ADMIN_CONFIG_MEMBER_MENU_ADVERT_ENABLED' => "Soll Werbung im Mitgliedsmenü zwischen allen Menüblöcken angezeigt werden?", +)); + +// [EOF] +?> diff --git a/inc/language/mods_de.php b/inc/language/mods_de.php index a10028bb57..fac508f612 100644 --- a/inc/language/mods_de.php +++ b/inc/language/mods_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,24 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('MODS_NAME', "Modulname"); -define('MODS_TITLE', "Modultitel"); -define('MODS_IS_LOCKED', "Gesperrt"); -define('MODS_IS_HIDDEN', "Verdeckt"); -define('MODS_IS_ADMIN', "Nur Admin"); -define('MODS_IS_MEMBER', "Nur Mitglied"); -define('MODS_CLICKS', "Klicks"); -define('MODS_EDIT', "Module ändern"); -define('MODS_ADMIN_EDIT_NOTE', "Klicken Sie auf den Modulnamen, um Statistiken zu den verknüpften Menüpunkten zu erhalten."); -define('MODS_NOTHING_SELECTED', "Bitte mindestens ein Modul auswählen."); -define('MODS_CHANGED', "Module wurden geändert."); -define('MODS_WHAT_ACTION', "Menüpunkt (Hauptmenü)"); +addMessages(array( + 'MODS_NAME' => "Modulname", + 'MODS_TITLE' => "Modultitel", + 'MODS_IS_LOCKED' => "Gesperrt", + 'MODS_IS_HIDDEN' => "Verdeckt", + 'MODS_IS_ADMIN' => "Nur Admin", + 'MODS_IS_MEMBER' => "Nur Mitglied", + 'MODS_CLICKS' => "Klicks", + 'MODS_EDIT' => "Module ändern", + 'MODS_ADMIN_EDIT_NOTE' => "Klicken Sie auf den Modulnamen, um Statistiken zu den verknüpften Menüpunkten zu erhalten.", + 'MODS_NOTHING_SELECTED' => "Bitte mindestens ein Modul auswählen.", + 'MODS_CHANGED' => "Module wurden geändert.", + 'MODS_WHAT_ACTION' => "Menüpunkt (Hauptmenü)", +)); -// +// [EOF] ?> diff --git a/inc/language/newsletter_de.php b/inc/language/newsletter_de.php index 5f399c23b9..75c4337d00 100644 --- a/inc/language/newsletter_de.php +++ b/inc/language/newsletter_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,43 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - + die(); +} // END - if // Language definitions -define('ADMIN_SEND_NL', "Newsletter versenden"); -define('NEWSLETTER_FROM', "Newsletter vom"); -define('ENTER_NL_SUBJECT', "Betreffzeile"); -define('ENTER_NL_TEXT', "Werbetext"); -define('ADMIN_NL_TITLE', "Newsletter an Mitglieder versenden"); -define('ADMIN_NL_SEND_MODE', "Aussendemodus der Mails"); -define('NL_MODE_TEXT', "Text-Mail"); -define('NL_MODE_HTML', "HTML-Mail"); -define('ADMIN_NL_SEND_DONE', "Newsletter wurde versendet."); -define('ADMIN_NEWSLETTER_SETTINGS', "Einstellungen am Newsletter"); -define('ADMIN_NL_CHARGE', "Monatliche Gebühr zur Abschaltung des Newsletters"); -define('ADMIN_NL_AUTO_ADD', "URLs automatisch umwandeln"); -define('ADMIN_NL_SUBJECT', "Newsletterabmeldung"); -define('ADMIN_TASK_IS_NL_UNSUBSCRIBE', "Newsletter-System"); -define('ADMIN_NL_UNSUBSCRIBE', "Abbestellung durchführen"); -define('ADMIN_NL_UNSUBSCRIBE_ALREADY', "Abbestellung bereits durchgeführt!"); -define('ADMIN_NL_MEMBER_DONE', "Mitglied wurde ausgetragen und benachrichtigt."); -define('NL_MEMBER_TITLE', "Newsletter abbestellen"); -define('NL_MEMBER_RECEIVE_STATUS', "Newsletterempfang ist derzeit..."); -define('NL_MEMBER_CHARGE', "Abbestellgebühr für einen Monat"); -define('NL_MEMBER_ON', "eingeschaltet"); -define('NL_MEMBER_OFF', "ausgeschaltet"); -define('NL_MEMBER_SUBMIT_ON', "Jetzt wieder einschalten"); -define('NL_MEMBER_SUBMIT_OFF', "Abschaltung *verbindlich* bestellen"); -define('NL_MEMBER_SUBJECT', "Ihre Newsletterabbestellung"); -define('NL_ADMIN_SUBJECT', "Abbestellungsanfrage des Newsletters"); -define('NL_MEMBER_REQUEST_DONE', "Abestellungsanfrage versendet."); -define('NL_MEMBER_REQUEST_ALREADY', "Newsletterabbestellung ist bereits beantragt."); -define('NL_MEMBER_DONE_SUBJECT', "Newsletter-Austragung abgeschlossen"); -define('NL_MEMBER_RESET_SUBJECT', "Automatische Eintragung in Newsletter"); -define('ADMIN_NEWSLETTER_NOTE', "Hinweis: Wenn die URLs umgewandelt werden sollen, wird ein Dereferrer eingesetzt."); +addMessages(array( + 'ADMIN_SEND_NL' => "Newsletter versenden", + 'NEWSLETTER_FROM' => "Newsletter vom", + 'ENTER_NL_SUBJECT' => "Betreffzeile", + 'ENTER_NL_TEXT' => "Werbetext", + 'ADMIN_NL_TITLE' => "Newsletter an Mitglieder versenden", + 'ADMIN_NL_SEND_MODE' => "Aussendemodus der Mails", + 'NL_MODE_TEXT' => "Text-Mail", + 'NL_MODE_HTML' => "HTML-Mail", + 'ADMIN_NL_SEND_DONE' => "Newsletter wurde versendet.", + 'ADMIN_NEWSLETTER_SETTINGS' => "Einstellungen am Newsletter", + 'ADMIN_NL_CHARGE' => "Monatliche Gebühr zur Abschaltung des Newsletters", + 'ADMIN_NL_AUTO_ADD' => "URLs automatisch umwandeln", + 'NL_MEMBER_RECEIVE_STATUS' => "Newsletterempfang ist derzeit...", + 'NL_MEMBER_ON' => "eingeschaltet", + 'NL_MEMBER_OFF' => "ausgeschaltet", + 'NL_MEMBER_SUBMIT_ON' => "Jetzt wieder einschalten", + 'NL_MEMBER_SUBMIT_OFF' => "Keinen Newsletter mehr empfangen", + 'ADMIN_NEWSLETTER_NOTE' => "Hinweis: Wenn die URLs umgewandelt werden sollen, wird ein Dereferrer eingesetzt.", +)); -// +// [EOF] ?> diff --git a/inc/language/nickname_de.php b/inc/language/nickname_de.php index e4ccc8424a..f4d0f1a397 100644 --- a/inc/language/nickname_de.php +++ b/inc/language/nickname_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,27 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('NICKNAME_CHANGE_NICKNAME_TITLE', "Einstellen Ihres Nicknames"); -define('NICKNAME_CHANGE_NICKNAME_INTRO', "Stellen Sie hier einen Nicknamen ein, der anstelle Ihrer User-ID angezeigt wird! Dieser darf nur unten aufgeführte Zeichen enthalten und sollte nicht kürzer als ".getConfig('nickname_len')." Zeichen sein."); -define('NICKNAME_ENTER_NICKNAME', "Nickname eingeben"); -define('NICKNAME_SUBMIT', "Nickname ändern"); -define('NICKNAME_ALREADY_IN_USE', "Der von Ihnen eingegebene Nickname wird bereits verwendet!"); -define('NICKNAME_SAVED', "Nickname wurde gespeichert."); -define('GUEST_ENTER_LOGIN_NICKNAME', "Nickname o. Login-ID"); -define('NICKNAME_ALLOWED_CHARS', "Erlaubte Zeichen:"); -define('NICKNAME_IS_INVALID', "Ungütige Zeichen im Nicknamen gefunden oder ist zu kurz!"); -define('NICKNAME_YOUR_REFLINK', "Ihr Nickname-Reflink"); -define('NO_NICKNAME_SET', "Sie haben noch keinen Nickname eingerichtet! Damit können Sie sich alternativ zur User-ID einloggen."); -define('PLEASE_CLICK_NICKNAME_FORM', "Hier können Sie sich nun einen einrichten..."); -define('NICKNAME_ADMIN_CONFIG_HEADER', "Einstellungen am Nicknamen"); -define('ADMIN_NICKNAME_MIN_LENGTH', "Minimale Länge"); -define('ADMIN_NICKNAME_PATTERN', "Pattern für ereg()-Befehl"); -define('ADMIN_NICKNAME_LANG_CHARS', "Zeichenfolge für Sprachdatei"); +addMessages(array( + 'NICKNAME_CHANGE_NICKNAME_TITLE' => "Einstellen Ihres Nicknames", + 'NICKNAME_CHANGE_NICKNAME_INTRO' => "Stellen Sie hier einen Nicknamen ein, der anstelle Ihrer User-ID angezeigt wird! Dieser darf nur unten aufgeführte Zeichen enthalten und sollte nicht kürzer als {?nickname_len?} Zeichen sein.", + 'NICKNAME_ENTER_NICKNAME' => "Nickname eingeben", + 'NICKNAME_SUBMIT' => "Nickname ändern", + 'NICKNAME_ALREADY_IN_USE' => "Der von Ihnen eingegebene Nickname wird bereits verwendet!", + 'NICKNAME_SAVED' => "Nickname wurde gespeichert.", + 'GUEST_ENTER_LOGIN_NICKNAME' => "Nickname o. Login-ID", + 'NICKNAME_ALLOWED_CHARS' => "Erlaubte Zeichen:", + 'NICKNAME_IS_INVALID' => "Ungütige Zeichen im Nicknamen gefunden oder ist zu kurz!", + 'NICKNAME_YOUR_REFLINK' => "Ihr Nickname-Reflink", + 'NO_NICKNAME_SET' => "Sie haben noch keinen Nickname eingerichtet! Damit können Sie sich alternativ zur User-ID einloggen.", + 'PLEASE_CLICK_NICKNAME_FORM' => "Hier können Sie sich nun einen einrichten...", + 'NICKNAME_ADMIN_CONFIG_HEADER' => "Einstellungen am Nicknamen", + 'ADMIN_NICKNAME_MIN_LENGTH' => "Minimale Länge", + 'ADMIN_NICKNAME_PATTERN' => "Pattern für ereg()-Befehl", + 'ADMIN_NICKNAME_LANG_CHARS' => "Zeichenfolge für Sprachdatei", +)); -// +// [EOF] ?> diff --git a/inc/language/online_de.php b/inc/language/online_de.php index f8317a268a..127072bc79 100644 --- a/inc/language/online_de.php +++ b/inc/language/online_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ONLINE_STATISTICS_DEACTIVATED', "Online-Statistik deaktivert."); +addMessages(array( + 'ONLINE_STATISTICS_DEACTIVATED' => "Online-Statistik deaktivert.", +)); -// +// [EOF] ?> diff --git a/inc/language/optimize_de.php b/inc/language/optimize_de.php index b6504fbb80..56504a95f2 100644 --- a/inc/language/optimize_de.php +++ b/inc/language/optimize_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,25 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('OPTIMIZE_DBNAME', "Tabelle"); -define('OPTIMIZE_REPAIRED', "Repariert"); -define('OPTIMIZE_OPTIMIZED', "Optimiert"); -define('OPTIMIZE_TOTAL_SIZE', "Gesamtgrösse"); -define('OPTIMIZE_GAIN_SIZE', "Eingespart"); -define('OPTIMIZE_STATUS_OK', "Nein"); -define('OPTIMIZE_STATUS_UNSUPPORTED', "Nicht möglich"); -define('OPTIMIZE_STATUS_OPTIMIZED', "Optimiert!"); -define('OPTIMIZE_DB_TOTAL_TABLES', "Gesamtzahl angelegter Tabellen"); -define('OPTIMIZE_DB_TOTAL_SIZE', "Gesamtgröße der Datenbank"); -define('OPTIMIZE_DB_TOTAL_OPTIMIZE', "Aufrufe der Optimierungsfunktion"); -define('OPTIMIZE_DB_TOTAL_GAIN_SIZE', "Diesen Durchlauf eingespart"); -define('OPTIMIZE_DB_TOTAL_GAIN_TABLES', "Diesen Durchlauf optimierte Tabellen"); -define('OPTIMIZE_DB_TOTAL_OPTI', "Gesamteinsparnisse"); +addMessages(array( + 'OPTIMIZE_DBNAME' => "Tabelle", + 'OPTIMIZE_REPAIRED' => "Repariert", + 'OPTIMIZE_OPTIMIZED' => "Optimiert", + 'OPTIMIZE_TOTAL_SIZE' => "Gesamtgrösse", + 'OPTIMIZE_GAIN_SIZE' => "Eingespart", + 'OPTIMIZE_STATUS_OK' => "Nein", + 'OPTIMIZE_STATUS_UNSUPPORTED' => "Nicht möglich", + 'OPTIMIZE_STATUS_OPTIMIZED' => "Optimiert!", + 'OPTIMIZE_DB_TOTAL_TABLES' => "Gesamtzahl angelegter Tabellen", + 'OPTIMIZE_DB_TOTAL_SIZE' => "Gesamtgröße der Datenbank", + 'OPTIMIZE_DB_TOTAL_OPTIMIZE' => "Aufrufe der Optimierungsfunktion", + 'OPTIMIZE_DB_TOTAL_GAIN_SIZE' => "Diesen Durchlauf eingespart", + 'OPTIMIZE_DB_TOTAL_GAIN_TABLES' => "Diesen Durchlauf optimierte Tabellen", + 'OPTIMIZE_DB_TOTAL_OPTI' => "Gesamteinsparnisse", +)); -// +// [EOF] ?> diff --git a/inc/language/order_de.php b/inc/language/order_de.php index 3b01420896..a75de0d35e 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,48 +38,49 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_ORDER_SETTINGS', "Einstellungen - Mailbuchung"); -define('ADMIN_ORDER_MISC_SETTINGS', "Weitere Einstellungen"); -define('ADMIN_ORDER_MAX_ORDER_SELECT', "Wie viele Mailbuchungen sollen die Mitglieder maximal versenden können?"); -define('ADMIN_ORDER_MIN_RECEIVER_PER_ORDER', "Minimale Empfänger pro Mailbuchung"); -define('ADMIN_ORDER_MAX', "So viele wie möglich."); -define('ADMIN_ORDER_ORDER', "So viele wie auf Empfang eingestellt."); -define('MEMBER_ORDER_ALLOWED_RECEIVE', "Sie können heute noch <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Mailbuchungen aufgeben."); -define('MEMBER_ORDER_ALLOWED_MAX', "Sie können solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind."); -define('MEMBER_ORDER_ALLOWED_UNKNOWN', "Fehler in Konfiguration erkannt! Bitte den Administrator benachrichtigen."); -define('ADMIN_ORDER_SELECTION_COLUMN', "Tabellenspalte, nach der umsortiert werden soll"); -define('ADMIN_ORDER_SELECTION_MODE', "Sortierreihenfolge"); -define('ADMIN_ORDER_SELECTION_SETTINGS', "Auswahlverfahren der Empfänger"); +addMessages(array( + 'ADMIN_ORDER_SETTINGS' => "Einstellungen - Mailbuchung", + 'ADMIN_ORDER_MISC_SETTINGS' => "Weitere Einstellungen", + 'ADMIN_ORDER_MAX_ORDER_SELECT' => "Wie viele Mailbuchungen sollen die Mitglieder maximal versenden können?", + 'ADMIN_ORDER_MIN_RECEIVER_PER_ORDER' => "Minimale Empfänger pro Mailbuchung", + 'ADMIN_ORDER_MAX' => "So viele wie möglich.", + 'ADMIN_ORDER_ORDER' => "So viele wie auf Empfang eingestellt.", + 'MEMBER_ORDER_ALLOWED_RECEIVE' => "Sie können heute noch <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Mailbuchungen aufgeben.", + 'MEMBER_ORDER_ALLOWED_MAX' => "Sie können solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind.", + 'MEMBER_ORDER_ALLOWED_UNKNOWN' => "Fehler in Konfiguration erkannt! cfg=<strong>%s</strong> Bitte den Administrator benachrichtigen.", + 'ADMIN_ORDER_SELECTION_COLUMN' => "Tabellenspalte, nach der umsortiert werden soll", + 'ADMIN_ORDER_SELECTION_MODE' => "Sortierreihenfolge", + 'ADMIN_ORDER_SELECTION_SETTINGS' => "Auswahlverfahren der Empfänger", -define('MEMBER_ORDER_MAX_ALLOWED', "Maximale Mailbuchungen"); -define('MEMBER_ORDER_ALLOWED_EXHAUSTED', "Sie können keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang höher ein."); -define('MEMBER_ENTER_INVALID_URL', "Ungütige URL eingegeben!"); + 'MEMBER_ORDER_MAX_ALLOWED' => "Maximale Mailbuchungen", + 'MEMBER_ORDER_ALLOWED_EXHAUSTED' => "Sie können keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang höher ein.", + 'MEMBER_ENTER_INVALID_URL' => "Ungütige URL eingegeben!", -define('ORDER_SELECT_COLUMN_USERID', "Mitgliedsnummer"); -define('ORDER_SELECT_COLUMN_ZIP', "Postleitzahl"); -define('ORDER_SELECT_COLUMN_COUNTRY', "Land"); -define('ORDER_SELECT_COLUMN_EMAIL', "EMail-Adresse"); -define('ORDER_SELECT_COLUMN_BIRTH_YEAR', "Geburtsjahr"); -define('ORDER_SELECT_COLUMN_LAST_ONLINE', "Als letztes Online"); -define('ORDER_SELECT_COLUMN_REF_CLICKS', "Klicks auf Ref-Link"); -define('ORDER_SELECT_COLUMN_TOTAL_LOGINS', "Gesamtlogins"); -define('ORDER_SELECT_COLUMN_MAIL_ORDERS', "Heutige Mailbuchungen"); + 'ORDER_SELECT_COLUMN_USERID' => "Mitgliedsnummer", + 'ORDER_SELECT_COLUMN_ZIP' => "Postleitzahl", + 'ORDER_SELECT_COLUMN_COUNTRY' => "Land", + 'ORDER_SELECT_COLUMN_EMAIL' => "EMail-Adresse", + 'ORDER_SELECT_COLUMN_BIRTH_YEAR' => "Geburtsjahr", + 'ORDER_SELECT_COLUMN_LAST_ONLINE' => "Als letztes Online", + 'ORDER_SELECT_COLUMN_REF_CLICKS' => "Klicks auf Ref-Link", + 'ORDER_SELECT_COLUMN_TOTAL_LOGINS' => "Gesamtlogins", + 'ORDER_SELECT_COLUMN_MAIL_ORDERS' => "Heutige Mailbuchungen", -define('ADMIN_AUTOSEND_INACTIVE', "Der Auto-Versand ist in Ihrem {?MT_WORD?} derzeit deaktiviert. Bitte loggen Sie sich in den Admin-Bereich ein und schalten Sie diese Mailbuchung frei!"); -define('ADMIN_AUTOSEND_ACTIVE', "Der Auto-Versand ist in Ihrem {?MT_WORD?} derzeit aktiviert. Die Mailbuchung wird aktiviert und dann automatisch versand."); -define('MEMBER_AUTOSEND_INACTIVE', "Der Auto-Versand ist in unserem {?MT_WORD?} derzeit deaktiviert. Ihre Mailbuchung wird bald von einem Administrator ueberprueft und dann freigegeben."); -define('MEMBER_AUTOSEND_ACTIVE', "Der Auto-Versand ist in unserem {?MT_WORD?} derzeit aktiviert. Ihr Mailbuchung wurde aktiviert und wird bald automatisch versant."); + 'ADMIN_AUTOSEND_INACTIVE' => "Der Auto-Versand ist in Ihrem {?mt_word?} derzeit deaktiviert. Bitte loggen Sie sich in den Admin-Bereich ein und schalten Sie diese Mailbuchung frei!", + 'ADMIN_AUTOSEND_ACTIVE' => "Der Auto-Versand ist in Ihrem {?mt_word?} derzeit aktiviert. Die Mailbuchung wird aktiviert und dann automatisch versand.", + 'MEMBER_AUTOSEND_INACTIVE' => "Der Auto-Versand ist in unserem {?mt_word?} derzeit deaktiviert. Ihre Mailbuchung wird bald von einem Administrator ueberprueft und dann freigegeben.", + 'MEMBER_AUTOSEND_ACTIVE' => "Der Auto-Versand ist in unserem {?mt_word?} derzeit aktiviert. Ihr Mailbuchung wurde aktiviert und wird bald automatisch versant.", // Repay deleted mails constants -define('ADMIN_CFG_REPAY_POINTS_REPAY', "Dem Mitglied gutschreiben"); -define('ADMIN_CFG_REPAY_POINTS_JACKPOT', "In den Jackpot legen"); -define('ADMIN_CFG_REPAY_POINTS_SHRED', "Nicht gutschreiben (verfällt dann)"); -define('ADMIN_REPAY_ON_DELETE_MODE', "Wie sollen {?POINTS?} von gelöschten Mails verbucht werden?"); + 'ADMIN_CFG_REPAY_POINTS_REPAY' => "Dem Mitglied gutschreiben", + 'ADMIN_CFG_REPAY_POINTS_JACKPOT' => "In den Jackpot legen", + 'ADMIN_CFG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verfällt dann)", + 'ADMIN_REPAY_ON_DELETE_MODE' => "Wie sollen {?POINTS?} von gelöschten Mails verbucht werden?", +)); -// +// [EOF] ?> diff --git a/inc/language/other_de.php b/inc/language/other_de.php index 7fa552064f..90346c74d1 100644 --- a/inc/language/other_de.php +++ b/inc/language/other_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,59 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language constans -define('ADMIN_OTHER_SETTINGS', "Sonstige Einstellungen"); -define('ADMIN_OPTION_URL_TIME_LOCK', "Selbe beworbene URL nicht mehr bewerbar (0 = URL sofort erneut buchbar)"); -define('ADMIN_OPTION_POOL_MAX_SEND', "Anzahl zu sendender Mails aus dem Pool"); -define('ADMIN_OPTION_MAX_UNCONFIRMED_MAILS', "Maximale Anzahl unbest. Mails (Mailbuchung)"); -define('ADMIN_OPTION_LOCK_PROFILE_TIME', "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)"); -define('ADMIN_OPTION_MAX_TEXT_LENGTH', "Maximale Länge des Werbetextes"); -define('ADMIN_OPTION_CHECK_EMAIL_TEXT', "Sind URLs im Werbetext erlaubt?"); -define('ADMIN_OPTION_CHECK_EMAIL_SUBJ', "Sind URLs in der Betreffzeile erlaubt?"); -define('ADMIN_OPTION_URL_BLACKLIST', "Black-Liste für gebuchte URLs aktivieren?"); -define('ADMIN_OPTION_AUTOSEND_ACTIVE', "Ist der Auto-Versand aktiv?"); -define('ADMIN_OPTION_NOTIFY_ADMIN', "Benachrichtigung bei Profiländerung?"); -define('ADMIN_OPTION_MAX_ONLINETIME', "Timeout für Who-is-Online"); -define('ADMIN_OPTION_SEND_UPDATE', "Mail zur Erneurung des Profiles senden?"); -define('ADMIN_SENDING_SETTINGS', "Versand-Optionen"); -define('ADMIN_NOTIFY_SETTINGS', "Benachrichtigungsoptionen"); -define('ADMIN_TIMEOUT_SETTINGS', "Time-out Optionen"); -define('ADMIN_PROFILE_TIME_SETTINGS', "Zeitenangaben für Mitgliederprofile"); -define('ADMIN_OPTION_PROFILE_UPDATE', "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)"); -define('ADMIN_OPTION_PROFILE_REUPDATE', "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)"); -define('ADMIN_OPTION_CODE_LENGTH', "Länge des grafischen Codes im Best.-Frame (0 = Nur Button anklicken)"); -define('ADMIN_CODE_LENGTH_NOTE', "(Zeichenanzahl)"); -define('ADMIN_OPTION_ACTIVATE_EXCHANGE', "Automatisches Freischalten des Mailtauschs, wenn x Mitglieder empfangsbereit sind. 0 = Funktion abschalten"); -define('ADMIN_OPTION_ZIPCODE_ACTIVE', "Versand nach PLZ erlauben"); -define('ADMIN_OPTION_POINTS_WORD', "Währung Ihres Tausches (Klammlose, Wernis, FuCo, etc.)"); -define('ADMIN_OPTION_MAX_COMMA', "Angezeigte Stellen hinter dem Komma"); -define('ADMIN_OPTION_CSS_PHP', "Sollen die CSS-Dateien direkt ausgegeben werden oder von css.php angezeigt werden?"); -define('ADMIN_CSS_PHP_DIRECT', "Direkt ausgeben"); -define('ADMIN_CSS_PHP_FILE', "Per css.php ausgeben"); -define('ADMIN_OPTION_GUEST_MENU', "Gastmenü global ein-/ausblenden"); -define('ADMIN_OPTION_MEMBER_MENU', "Mitgliedsmenü global ein-/ausblenden"); -define('ADMIN_OPTION_YOURE_HERE', "Navigation "Sie sind hier" ein-/ausblenden"); -define('ADMIN_GUEST_MENU_ACTIVE', "Einblenden"); -define('ADMIN_GUEST_MENU_INACTIVE', "Ausblenden"); -define('ADMIN_MEMBER_MENU_ACTIVE', "Einblenden"); -define('ADMIN_MEMBER_MENU_INACTIVE', "Ausblenden"); -define('ADMIN_YOURE_HERE_ACTIVE', "Einblenden"); -define('ADMIN_YOURE_HERE_INACTIVE', "Ausblenden"); -define('ADMIN_OPTION_MT_WORD', "Art Ihres Tausches (1. Fall)"); -define('ADMIN_OPTION_MT_WORD2', "Art Ihres Tausches (2. Fall)"); -define('ADMIN_OPTION_MT_WORD3', "Art Ihres Tausches (1. Fall, Plural)"); -define('ADMIN_OPTION_REJECT_URL', "Standart-URL bei Ablehnung der Mailbuchung"); -define('ADMIN_OPTION_SHOW_TIMINGS', "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)"); -define('ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED', "{?POINTS?} in unbestätige Mails im Mitgliedsbereich anzeigen?"); -define('ADMIN_OPTION_MINIMUM_AGE', "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?"); +addMessages(array( + 'ADMIN_OTHER_SETTINGS' => "Sonstige Einstellungen", + 'ADMIN_OPTION_URL_TIME_LOCK' => "Selbe beworbene URL nicht mehr bewerbar (0 = URL sofort erneut buchbar)", + 'ADMIN_OPTION_POOL_MAX_SEND' => "Anzahl zu sendender Mails aus dem Pool", + 'ADMIN_OPTION_MAX_UNCONFIRMED_MAILS' => "Maximale Anzahl unbest. Mails (Mailbuchung)", + 'ADMIN_OPTION_LOCK_PROFILE_TIME' => "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)", + 'ADMIN_OPTION_MAX_TEXT_LENGTH' => "Maximale Länge des Werbetextes", + 'ADMIN_OPTION_CHECK_EMAIL_TEXT' => "Sind URLs im Werbetext erlaubt?", + 'ADMIN_OPTION_CHECK_EMAIL_SUBJ' => "Sind URLs in der Betreffzeile erlaubt?", + 'ADMIN_OPTION_URL_BLACKLIST' => "Black-Liste für gebuchte URLs aktivieren?", + 'ADMIN_OPTION_AUTOSEND_ACTIVE' => "Ist der Auto-Versand aktiv?", + 'ADMIN_OPTION_NOTIFY_ADMIN' => "Benachrichtigung bei Profiländerung?", + 'ADMIN_OPTION_MAX_ONLINETIME' => "Timeout für Who-is-Online", + 'ADMIN_OPTION_SEND_UPDATE' => "Mail zur Erneurung des Profiles senden?", + 'ADMIN_SENDING_SETTINGS' => "Versand-Optionen", + 'ADMIN_NOTIFY_SETTINGS' => "Benachrichtigungsoptionen", + 'ADMIN_TIMEOUT_SETTINGS' => "Time-out Optionen", + 'ADMIN_PROFILE_TIME_SETTINGS' => "Zeitenangaben für Mitgliederprofile", + 'ADMIN_OPTION_PROFILE_UPDATE' => "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)", + 'ADMIN_OPTION_PROFILE_REUPDATE' => "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)", + 'ADMIN_OPTION_CODE_LENGTH' => "Länge des grafischen Codes im Best.-Frame (0 = Nur Button anklicken)", + 'ADMIN_CODE_LENGTH_NOTE' => "(Zeichenanzahl)", + 'ADMIN_OPTION_ACTIVATE_EXCHANGE' => "Automatisches Freischalten des Mailtauschs, wenn x Mitglieder empfangsbereit sind. 0 = Funktion abschalten", + 'ADMIN_OPTION_ZIPCODE_ACTIVE' => "Versand nach PLZ erlauben", + 'ADMIN_OPTION_POINTS_WORD' => "Währung Ihres Tausches (Klammlose, Wernis, FuCo, etc.)", + 'ADMIN_OPTION_MAX_COMMA' => "Angezeigte Stellen hinter dem Komma", + 'ADMIN_OPTION_CSS_PHP' => "Sollen die CSS-Dateien direkt ausgegeben werden oder von css.php angezeigt werden?", + 'ADMIN_CSS_PHP_DIRECT' => "Per <link>-Tag ausgeben (Debug!)", + 'ADMIN_CSS_PHP_FILE' => "Per css.php ausgeben (<strong>empfohlen</strong>)", + 'ADMIN_CSS_PHP_INLINE' => "In <style>-Tag eingeschlossen ausgeben (Debug!)", + 'ADMIN_OPTION_GUEST_MENU' => "Gastmenü global ein-/ausblenden", + 'ADMIN_OPTION_MEMBER_MENU' => "Mitgliedsmenü global ein-/ausblenden", + 'ADMIN_OPTION_YOURE_HERE' => "Navigation "Sie sind hier" ein-/ausblenden", + 'ADMIN_GUEST_MENU_ACTIVE' => "Einblenden", + 'ADMIN_GUEST_MENU_INACTIVE' => "Ausblenden", + 'ADMIN_MEMBER_MENU_ACTIVE' => "Einblenden", + 'ADMIN_MEMBER_MENU_INACTIVE' => "Ausblenden", + 'ADMIN_YOURE_HERE_ACTIVE' => "Einblenden", + 'ADMIN_YOURE_HERE_INACTIVE' => "Ausblenden", + 'ADMIN_OPTION_MT_WORD' => "Art Ihres Tausches (1. Fall)", + 'ADMIN_OPTION_MT_WORD2' => "Art Ihres Tausches (2. Fall)", + 'ADMIN_OPTION_MT_WORD3' => "Art Ihres Tausches (1. Fall, Plural)", + 'ADMIN_OPTION_REJECT_URL' => "Standart-URL bei Ablehnung der Mailbuchung", + 'ADMIN_OPTION_SHOW_TIMINGS' => "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)", + 'ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED' => "{?POINTS?} in unbestätige Mails im Mitgliedsbereich anzeigen?", + 'ADMIN_OPTION_MINIMUM_AGE' => "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?", + 'ADMIN_SQL_SETTINGS' => "SQL-Einstellungen", + 'ADMIN_DISPLAY_DEBUG_SQLS' => "Sollen die SQL-Abfragen zu Debug-Zwecken angezeigt werden? Keines Ihrer Mitglieder sehen diese!", +)); -// +// [EOF] ?> diff --git a/inc/language/payout_de.php b/inc/language/payout_de.php index 0578d29acf..816ac37448 100644 --- a/inc/language/payout_de.php +++ b/inc/language/payout_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,110 +38,111 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_PAYOUT_ADD_NEW_TITLE', "Neuer Auszahlungstyp hinzufügen"); -define('ADMIN_PAYOUT_ADD_NEW_NOTE', "Auszahlungsbezeichnung kann z.B. Lose, FCs, HCs oder € sein."); -define('ADMIN_PAYOUT_ADD_NEW', "Hinzufügen"); -define('ADMIN_PAYOUT_FROM', "Ihr Account"); -define('ADMIN_PAYOUT_TITLE', "Auszahlungsbezeichnung"); -define('ADMIN_PAYOUT_RATE', "Umrechnungsrate: 1 Punkt ="); -define('ADMIN_PAYOUT_RATE2', "Umrechnungsrate"); -define('ADMIN_PAYOUT_VALUE_NOTE', "0.1, 1.2 o.ä"); -define('ADMIN_PAYOUT_TYPE_ADDED', "Auszahlungstyp hinzugefügt."); -define('ADMIN_PAYOUT_TYPE_ALREADY', "Auszahlungstyp existiert bereits!"); -define('ADMIN_PAYOUT_EDIT_DEL_TITLE', "Editieren / Löschen von Auszahlungstypen"); -define('ADMIN_PAYOUT_EDIT_TITLE', "Ausgwählte Einträge editieren"); -define('ADMIN_PAYOUT_DELETE_TITLE', "Ausgwählte Einträge löschen"); -define('ADMIN_PAYOUT_EDIT', "Editieren"); -define('ADMIN_PAYOUT_DELETE', "Löschen"); -define('ADMIN_PAYOUT_NO_MEMBER_REQUESTS', "Keine Auszahlungsanfragen von Ihren Mitgliedern erhalten!"); -define('ADMIN_PAYOUT_ENTRIES_CHANGED', "Einträge wurden geändert."); -define('ADMIN_PAYOUT_ENTRIES_DELETED', "Einträge wurden gelölscht."); -define('ADMIN_PAYOUT_MIN_POINTS', "Minium {?POINTS?}-Guthaben"); -define('ADMIN_PAYOUT_MIN_POINTS2', "Min. {?POINTS?}"); -define('ADMIN_PAYOUT_YOUR_ACCOUNT', "Ihre Account-ID"); -define('ADMIN_PAYOUT_YOUR_PASSWORD', "Passwort"); -define('ADMIN_PAYOUT_YOUR_URL', "URL zum ext. Script"); -define('ADMIN_PAYOUT_YOUR_URL_NOTE', "<div class=\"admin_note\"> - Wobei $fuid/$fpass und $f/$fpass die Logindaten sind und $points die zu übberweisenden {?POINTS?} sind:<br /> - http://url/engine.php?action=trans&from_uid=$fuid&from_pass=$fpass&to_uid=$tuid&to_pass=$tpass&points=$points<br /> -</div>"); -define('ADMIN_PAYOUT_YOUR_RET_DONE', "Return-Code: Erfolgreich"); -define('ADMIN_PAYOUT_YOUR_RET_FAILED', "Return-Code: Fehlgeschlagen"); -define('ADMIN_PAYOUT_OPTIONAL_SETTINGS', "Optionale Einstellungen"); -define('ADMIN_PAYOUT_YOUR_PASS_TRANSFER', "Passwortverschlüsslung zur Übertragung"); -define('PAYOUT_NOW', "Sie können Ihre angesammelten {?POINTS?} jetzt in anderen Währungen auszahlen lassen!"); -define('PAYOUT_IN', "Auszahlen in"); -define('PAYOUT_MAX', "maximal"); -define('PAYOUT_ID_INVALID', "Auszahlungs-ID ist ungültig!"); -define('PAYOUT_POINTS_NOT_ENOUGTH', "Sie haben nicht ausreichend {?POINTS?} angesammelt!"); -define('PAYOUT_NOW_TITLE', "Auszahlungsanforderung an uns senden:"); -define('PAYOUT_SEND_NOW', "Auszahlung anfordern"); -define('PAYOUT_SELECTED_TYPE', "Auszahlungstyp"); -define('PAYOUT_MAX_PAYOUT', "Maximal auszahlbar"); -define('PAYOUT_WANT_PAYOUT', "Auszuzahlender Betrag"); -define('PAYOUT_TARGET_ACCOUNT', "An Accountnummer"); -define('PAYOUT_TARGET_BANK', "Bankleitzahl (od. Klamm)"); -define('PAYOUT_MEMBER_NOTE', "Accountnummer kann Ihre Kontonummer bei der Bank, Klamm-ID oder Ihre ID bei der Empfänger-Webseite sein. Bitte beachten Sie weitere Hinweise dieses {?MT_WORD2?}!"); -define('PAYOUT_REQUEST_MEMBER', "Ihre Auszahlungsanfrage an uns"); -define('PAYOUT_REQUEST_ADMIN', "Auszahlungsanfrage eines Mitgliedes"); -define('PAYOUT_REQUEST_SENT', "Auszahlungsanfrage wurde versendet . . ."); -define('ADMIN_TASK_IS_PAYOUT_REQUEST', "Auszahlungsanfrage"); -define('ADMIN_PAYOUT_LIST_REQUESTS', "Jetzt alle Auszahlungsanfragen auflisten."); -define('PAYOUT_ADMIN_LIST_PAYOUTS', "Alle Auszahlungen nach Mitgliedern auflisten"); -define('PAYOUT_DELETE_ALL_REQUESTS', "Alle Anfragen <strong>*SOFORT*</strong> löschen"); -define('PAYOUT_TOTAL_PAYOUT', "Gesamtbetrag"); -define('PAYOUT_TARGET_ACCOUNT2', "Ziel-Account"); -define('PAYOUT_TARGET_BANK2', "Ziel-Bank"); -define('PAYOUT_ID', "Auszahlungs-ID"); -define('PAYOUT_TIMESTAMP', "Wann?"); -define('PAYOUT_STATUS', "Status / Aktionen"); -define('PAYOUT_STATUS_NEW', "Neu"); -define('PAYOUT_STATUS_ACCEPTED', "Angenommen"); -define('PAYOUT_STATUS_REJECTED', "Abgelehnt"); -define('PAYOUT_MEMBER_STATUS_NEW', "In Arbeit"); -define('PAYOUT_MEMBER_STATUS_ACCEPTED', "Angenommen"); -define('PAYOUT_MEMBER_STATUS_REJECTED', "Abgelehnt"); -define('PAYOUT_ACCEPT_PAYOUT', "Annehmen"); -define('PAYOUT_REJECT_PAYOUT', "Ablehnen"); -define('PAYOUT_OBTAIN_ID_FAILED', "Konnte ID nicht finden! Bitte links im Menü diese Anfrage aufsuchen!"); -define('PAYOUT_FAILED_OBTAIN_USERID', "Konnte Mitglieds-ID nicht finden!"); -define('PAYOUT_FAILED_OBTAIN_TASK_ID', "Konnte Task-ID nicht finden!"); -define('PAYOUT_FAILED_OBTAIN_USERDATA', "Konnte Mitgliedsdaten nicht laden!"); -define('PAYOUT_FAILED_OBTAIN_PAYOUT_ID', "Konnte Auszahlungs-ID nicht laden!"); -define('PAYOUT_ACCEPT_PAYOUT_INTRO', "Auszahlungsanfrage annehmen"); -define('PAYOUT_REJECT_PAYOUT_INTRO', "Auszahlungsanfrage ablehnen"); -define('PAYOUT_RECEIVER_ACCEPT', "Empfänger der Auszahlung"); -define('PAYOUT_RECEIVER_REJECT', "Empfänger der Ablehnung"); -define('PAYOUT_OPTIONAL_TEXT', "Optionale Hinweise an den Empfänger"); -define('PAYOUT_ACCEPTED_NOTIFIED', "Anfrage angenommen! Bitte überweisen Sie nun den Betrag!"); -define('PAYOUT_REJECTED_NOTIFIED', "Anfrage abgelehnt! Das Mitglied wurde benachrichtigt."); -define('PAYOUT_ACCEPTED_SUBJECT', "[Auszahlunganfrage:] Angenommen!"); -define('PAYOUT_REJECTED_SUBJECT', "[Auszahlunganfrage:] Abgelehnt!"); -define('PAYOUT_MEMBER_LIST_PAYOUTS', "Ihre Auszahlungsanfragen"); -define('PAYOUT_OPTIONAL_PASSWORD', "Optionales Passwort"); -define('PAYOUT_ADMIN_NO_REQUESTS_FOUND', "Keine Auszahlungsanfragen von Ihren Mitgliedern erhalten."); -define('PAYOUT_REASON_PAYOUT', "{?POINTS?}-Transfer von {?MAIN_TITLE?}"); -define('ADMIN_PAYOUT_TRANSFER_FAILED', "Transfer nicht abgeschlossen:"); -define('ADMIN_PAYOUT_ALLOW_URLS', "URLs erlauben"); -define('PAYOUT_URLS_ALLOWED', "Keine direkte e-Währung"); -define('PAYOUT_TARGET_URL', "Beworbene URL"); -define('PAYOUT_ALTERNATE_TEXT', "Kurzer Text (30 Zeichen)"); -define('PAYOUT_OPTIONAL_BANNER', "Optionaler Banner"); -define('PAYOUT_BANNER_NOTE', "Erlaube Bannerformate: 468x60, 88x31 usw."); -define('PAYOUT_REMEMBER_TERMS', "Bitte beachten Sie für Auszahlungen in e-Währungen unsere AGBs!"); -define('PAYOUT_MEMBER_STATUS', "Status"); -define('CLICK_HERE', "Klick!"); -define('PAYOUT_BANNER_ACCEPTED_NOTIFIED', "Anfrage angenommen, bitte richten Sie eine Werbekampagne ein!"); -define('PAYOUT_NOT_ENOUGH_POINTS', "Sie haben nicht ausreichend {?POINTS?}!"); -define('PAYOUT_NO_PAYOUT_TYPES', "Es wurden vom Admin noch keine Auszahlungstypen eingerichtet."); -define('PAYOUT_LINK_TEXT', "Link-Text"); -define('PAYOUT_LINK_URL', "Link-URL"); -define('PAYOUT_NO_POINTS_ENTERED', "Sie haben keine {?POINTS?} zum Auszahlen eingegeben, oder es besteht ein Übertragungsfehler! Bitte benachrichtigen Sie den Support!"); +addMessages(array( + 'ADMIN_PAYOUT_ADD_NEW_TITLE' => "Neuer Auszahlungstyp hinzufügen", + 'ADMIN_PAYOUT_ADD_NEW_NOTE' => "Auszahlungsbezeichnung kann z.B. Lose, FCs, HCs oder € sein.", + 'ADMIN_PAYOUT_ADD_NEW' => "Hinzufügen", + 'ADMIN_PAYOUT_FROM' => "Ihr Account", + 'ADMIN_PAYOUT_TITLE' => "Auszahlungsbezeichnung", + 'ADMIN_PAYOUT_RATE' => "Umrechnungsrate: 1 Punkt =", + 'ADMIN_PAYOUT_RATE2' => "Umrechnungsrate", + 'ADMIN_PAYOUT_VALUE_NOTE' => "0.1, 1.2 o.ä", + 'ADMIN_PAYOUT_TYPE_ADDED' => "Auszahlungstyp hinzugefügt.", + 'ADMIN_PAYOUT_TYPE_ALREADY' => "Auszahlungstyp existiert bereits!", + 'ADMIN_PAYOUT_EDIT_DEL_TITLE' => "Editieren / Löschen von Auszahlungstypen", + 'ADMIN_PAYOUT_EDIT_TITLE' => "Ausgwählte Einträge editieren", + 'ADMIN_PAYOUT_DELETE_TITLE' => "Ausgwählte Einträge löschen", + 'ADMIN_PAYOUT_EDIT' => "Editieren", + 'ADMIN_PAYOUT_DELETE' => "Löschen", + 'ADMIN_PAYOUT_NO_MEMBER_REQUESTS' => "Keine Auszahlungsanfragen von Ihren Mitgliedern erhalten!", + 'ADMIN_PAYOUT_ENTRIES_CHANGED' => "Einträge wurden geändert.", + 'ADMIN_PAYOUT_ENTRIES_DELETED' => "Einträge wurden gelölscht.", + 'ADMIN_PAYOUT_MIN_POINTS' => "Minium {?POINTS?}-Guthaben", + 'ADMIN_PAYOUT_MIN_POINTS2' => "Min. {?POINTS?}", + 'ADMIN_PAYOUT_YOUR_ACCOUNT' => "Ihre Account-ID", + 'ADMIN_PAYOUT_YOUR_PASSWORD' => "Passwort", + 'ADMIN_PAYOUT_YOUR_URL' => "URL zum ext. Script", + 'ADMIN_PAYOUT_YOUR_URL_NOTE' => "<div class=\"admin_note\"> + Wobei $fuserid/$fpass und $f/$fpass die Logindaten sind und $points die zu übberweisenden {?POINTS?} sind:<br /> + http://url/engine.php?action=trans&from_userid=$fuserid&from_pass=$fpass&to_userid=$tuserid&to_pass=$tpass&points=$points<br /> +</div>", + 'ADMIN_PAYOUT_YOUR_RET_DONE' => "Return-Code: Erfolgreich", + 'ADMIN_PAYOUT_YOUR_RET_FAILED' => "Return-Code: Fehlgeschlagen", + 'ADMIN_PAYOUT_OPTIONAL_SETTINGS' => "Optionale Einstellungen", + 'ADMIN_PAYOUT_YOUR_PASS_TRANSFER' => "Passwortverschlüsslung zur Übertragung", + 'PAYOUT_NOW' => "Sie können Ihre angesammelten {?POINTS?} jetzt in anderen Währungen auszahlen lassen!", + 'PAYOUT_IN' => "Auszahlen in", + 'PAYOUT_MAX' => "maximal", + 'PAYOUT_ID_INVALID' => "Auszahlungs-ID ist ungültig!", + 'PAYOUT_POINTS_NOT_ENOUGTH' => "Sie haben nicht ausreichend {?POINTS?} angesammelt!", + 'PAYOUT_NOW_TITLE' => "Auszahlungsanforderung an uns senden:", + 'PAYOUT_SEND_NOW' => "Auszahlung anfordern", + 'PAYOUT_SELECTED_TYPE' => "Auszahlungstyp", + 'PAYOUT_MAX_PAYOUT' => "Maximal auszahlbar", + 'PAYOUT_WANT_PAYOUT' => "Auszuzahlender Betrag", + 'PAYOUT_TARGET_ACCOUNT' => "An Accountnummer", + 'PAYOUT_TARGET_BANK' => "Bankleitzahl (od. Klamm)", + 'PAYOUT_MEMBER_NOTE' => "Accountnummer kann Ihre Kontonummer bei der Bank, Klamm-ID oder Ihre ID bei der Empfänger-Webseite sein. Bitte beachten Sie weitere Hinweise dieses {?mt_word2?}!", + 'PAYOUT_REQUEST_MEMBER' => "Ihre Auszahlungsanfrage an uns", + 'PAYOUT_REQUEST_ADMIN' => "Auszahlungsanfrage eines Mitgliedes", + 'PAYOUT_REQUEST_SENT' => "Auszahlungsanfrage wurde versendet . . .", + 'ADMIN_TASK_IS_PAYOUT_REQUEST' => "Auszahlungsanfrage", + 'ADMIN_PAYOUT_LIST_REQUESTS' => "Jetzt alle Auszahlungsanfragen auflisten.", + 'PAYOUT_ADMIN_LIST_PAYOUTS' => "Alle Auszahlungen nach Mitgliedern auflisten", + 'PAYOUT_DELETE_ALL_REQUESTS' => "Alle Anfragen <strong>*SOFORT*</strong> löschen", + 'PAYOUT_TOTAL_PAYOUT' => "Gesamtbetrag", + 'PAYOUT_TARGET_ACCOUNT2' => "Ziel-Account", + 'PAYOUT_TARGET_BANK2' => "Ziel-Bank", + 'PAYOUT_ID' => "Auszahlungs-ID", + 'PAYOUT_TIMESTAMP' => "Wann?", + 'PAYOUT_STATUS' => "Status / Aktionen", + 'PAYOUT_STATUS_NEW' => "Neu", + 'PAYOUT_STATUS_ACCEPTED' => "Angenommen", + 'PAYOUT_STATUS_REJECTED' => "Abgelehnt", + 'PAYOUT_MEMBER_STATUS_NEW' => "In Arbeit", + 'PAYOUT_MEMBER_STATUS_ACCEPTED' => "Angenommen", + 'PAYOUT_MEMBER_STATUS_REJECTED' => "Abgelehnt", + 'PAYOUT_ACCEPT_PAYOUT' => "Annehmen", + 'PAYOUT_REJECT_PAYOUT' => "Ablehnen", + 'PAYOUT_OBTAIN_ID_FAILED' => "Konnte ID nicht finden! Bitte links im Menü diese Anfrage aufsuchen!", + 'PAYOUT_FAILED_OBTAIN_USERID' => "Konnte Mitglieds-ID nicht finden!", + 'PAYOUT_FAILED_OBTAIN_TASK_ID' => "Konnte Task-ID nicht finden!", + 'PAYOUT_FAILED_OBTAIN_USERDATA' => "Konnte Mitgliedsdaten nicht laden!", + 'PAYOUT_FAILED_OBTAIN_PAYOUT_ID' => "Konnte Auszahlungs-ID nicht laden!", + 'PAYOUT_ACCEPT_PAYOUT_INTRO' => "Auszahlungsanfrage annehmen", + 'PAYOUT_REJECT_PAYOUT_INTRO' => "Auszahlungsanfrage ablehnen", + 'PAYOUT_RECEIVER_ACCEPT' => "Empfänger der Auszahlung", + 'PAYOUT_RECEIVER_REJECT' => "Empfänger der Ablehnung", + 'PAYOUT_OPTIONAL_TEXT' => "Optionale Hinweise an den Empfänger", + 'PAYOUT_ACCEPTED_NOTIFIED' => "Anfrage angenommen! Bitte überweisen Sie nun den Betrag!", + 'PAYOUT_REJECTED_NOTIFIED' => "Anfrage abgelehnt! Das Mitglied wurde benachrichtigt.", + 'PAYOUT_ACCEPTED_SUBJECT' => "[Auszahlunganfrage:] Angenommen!", + 'PAYOUT_REJECTED_SUBJECT' => "[Auszahlunganfrage:] Abgelehnt!", + 'PAYOUT_MEMBER_LIST_PAYOUTS' => "Ihre Auszahlungsanfragen", + 'PAYOUT_OPTIONAL_PASSWORD' => "Optionales Passwort", + 'PAYOUT_ADMIN_NO_REQUESTS_FOUND' => "Keine Auszahlungsanfragen von Ihren Mitgliedern erhalten.", + 'PAYOUT_REASON_PAYOUT' => "{?POINTS?}-Transfer von {?MAIN_TITLE?}", + 'ADMIN_PAYOUT_TRANSFER_FAILED' => "Transfer nicht abgeschlossen:", + 'ADMIN_PAYOUT_ALLOW_URLS' => "URLs erlauben", + 'PAYOUT_URLS_ALLOWED' => "Keine direkte e-Währung", + 'PAYOUT_TARGET_URL' => "Beworbene URL", + 'PAYOUT_ALTERNATE_TEXT' => "Kurzer Text (30 Zeichen)", + 'PAYOUT_OPTIONAL_BANNER' => "Optionaler Banner", + 'PAYOUT_BANNER_NOTE' => "Erlaube Bannerformate: 468x60, 88x31 usw.", + 'PAYOUT_REMEMBER_TERMS' => "Bitte beachten Sie für Auszahlungen in e-Währungen unsere AGBs!", + 'PAYOUT_MEMBER_STATUS' => "Status", + 'CLICK_HERE' => "Klick!", + 'PAYOUT_BANNER_ACCEPTED_NOTIFIED' => "Anfrage angenommen, bitte richten Sie eine Werbekampagne ein!", + 'PAYOUT_NOT_ENOUGH_POINTS' => "Sie haben nicht ausreichend {?POINTS?}!", + 'PAYOUT_NO_PAYOUT_TYPES' => "Es wurden vom Admin noch keine Auszahlungstypen eingerichtet.", + 'PAYOUT_LINK_TEXT' => "Link-Text", + 'PAYOUT_LINK_URL' => "Link-URL", + 'PAYOUT_NO_POINTS_ENTERED' => "Sie haben keine {?POINTS?} zum Auszahlen eingegeben, oder es besteht ein Übertragungsfehler! Bitte benachrichtigen Sie den Support!", +)); -// +// [EOF] ?> diff --git a/inc/language/primera_de.php b/inc/language/primera_de.php index 9bd6b98112..ad687e1355 100644 --- a/inc/language/primera_de.php +++ b/inc/language/primera_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,84 +38,85 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_TASK_LIST_PRIMERA_ALL', "Alle Primera-Ein-/Auszahlungen"); -define('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE', "Listet alle Primera-Ein- und Auszahlungen auf."); -define('PRIMERA_ADMIN_CONFIG_TITLE', "Einstellungen zum Primus-Portal:"); -define('PRIMERA_ADMIN_MIN_PAYOUT', "Minimumguthaben für Auszahlungen."); -define('PRIMERA_ADMIN_MIN_WITHDRAW', "Minimumguthaben für Einzahlungen."); -define('PRIMERA_ADMIN_API_NAME', "Primus-Nickname"); -define('PRIMERA_ADMIN_API_MD5', "Primera-Passwort (Wird als MD5-Hash gespeichert)"); -define('PRIMERA_ADMIN_API_REFID', "Primus-Referal-ID (???)"); -define('PRIMERA_ADMIN_CONFIG_NOTE', "<a href=\"http://www.primusportal.de/r/Quix0r\" target=\"_blank\">Hier</a> können Sie sich ein Primus-Portal-Account holen. <strong>Geben Sie immer Ihren Usernamen von Primus-Portal ein und überprüfen Sie diesen mehrmals! Er wird zum Überweisen von Primera benötigt."); -define('PRIMERA_ADMIN_NO_TRANSFERS', "Derzeit keine Primera transferiert!"); -define('PRIMERA_ADMIN_ACCOUNT', "Account bei Primus-Portal"); -define('PRIMERA_ADMIN_TRANSFERED', "Primera transferiert"); -define('PRIMERA_ADMIN_TIMESTAMP', "Zeitpunkt Überweisung"); -define('PRIMERA_ADMIN_TYPE', "Überweisungsrichtung"); -define('PRIMERA_ADMIN_API_MESSAGE', "Nachricht von Primus-API"); -define('PRIMERA_ADMIN_API_STATUS', "Status von Primus-API"); -define('MEMBER_PRIMERA_MODE_WITHDRAW', "Primera einzahlen"); -define('MEMBER_PRIMERA_MODE_PAYOUT', "Primera auszahlen"); -define('PRIMERA_STATUS_UNKNWOWN', "Primera-Typ <span class=\"data\">%s</span> unbekannt."); -define('PRIMERA_STATUS_WITHDRAW', "Einzahlung von Primus"); -define('PRIMERA_STATUS_PAYOUT', "Auszahlung an Primus"); -define('PRIMERA_STATUS_FAILED', "Fehlgeschlagen"); -define('PRIMERA_TIMESTAMP', "Buchungszeitmarke"); -define('PRIMERA_ACCOUNT', "Primus-Portal"); -define('PRIMERA_TOTAL_PRIMERA', "Gesamt überwiesen"); -define('PRIMERA_MEMBER_LIST_PRIMERA', "Überweisungsliste von/an Primus-Portal"); +addMessages(array( + 'ADMIN_TASK_LIST_PRIMERA_ALL' => "Alle Primera-Ein-/Auszahlungen", + 'ADMIN_TASK_LIST_PRIMERA_ALL_TITLE' => "Listet alle Primera-Ein- und Auszahlungen auf.", + 'PRIMERA_ADMIN_CONFIG_TITLE' => "Einstellungen zum Primus-Portal:", + 'PRIMERA_ADMIN_MIN_PAYOUT' => "Minimumguthaben für Auszahlungen.", + 'PRIMERA_ADMIN_MIN_WITHDRAW' => "Minimumguthaben für Einzahlungen.", + 'PRIMERA_ADMIN_API_NAME' => "Primus-Nickname", + 'PRIMERA_ADMIN_API_MD5' => "Primera-Passwort (Wird als MD5-Hash gespeichert)", + 'PRIMERA_ADMIN_API_REFID' => "Primus-Referal-ID (???)", + 'PRIMERA_ADMIN_CONFIG_NOTE' => "<a href=\"http://www.primusportal.de/r/Quix0r\" target=\"_blank\">Hier</a> können Sie sich ein Primus-Portal-Account holen. <strong>Geben Sie immer Ihren Usernamen von Primus-Portal ein und überprüfen Sie diesen mehrmals! Er wird zum Überweisen von Primera benötigt.", + 'PRIMERA_ADMIN_NO_TRANSFERS' => "Derzeit keine Primera transferiert!", + 'PRIMERA_ADMIN_ACCOUNT' => "Account bei Primus-Portal", + 'PRIMERA_ADMIN_TRANSFERED' => "Primera transferiert", + 'PRIMERA_ADMIN_TIMESTAMP' => "Zeitpunkt Überweisung", + 'PRIMERA_ADMIN_TYPE' => "Überweisungsrichtung", + 'PRIMERA_ADMIN_API_MESSAGE' => "Nachricht von Primus-API", + 'PRIMERA_ADMIN_API_STATUS' => "Status von Primus-API", + 'MEMBER_PRIMERA_MODE_WITHDRAW' => "Primera einzahlen", + 'MEMBER_PRIMERA_MODE_PAYOUT' => "Primera auszahlen", + 'PRIMERA_STATUS_UNKNWOWN' => "Primera-Typ <span class=\"data\">%s</span> unbekannt.", + 'PRIMERA_STATUS_WITHDRAW' => "Einzahlung von Primus", + 'PRIMERA_STATUS_PAYOUT' => "Auszahlung an Primus", + 'PRIMERA_STATUS_FAILED' => "Fehlgeschlagen", + 'PRIMERA_TIMESTAMP' => "Buchungszeitmarke", + 'PRIMERA_ACCOUNT' => "Primus-Portal", + 'PRIMERA_TOTAL_PRIMERA' => "Gesamt überwiesen", + 'PRIMERA_MEMBER_LIST_PRIMERA' => "Überweisungsliste von/an Primus-Portal", // API messages -define('PRIMERA_API_REQUEST_DATA_INVALID', "Interner Fehler: Abfragedaten sind defekt!"); -define('PRIMERA_API_REQUEST_DATA_MISSING', "Interner Fehler: Abfragedaten sind nicht komplett!"); -define('PRIMERA_API_REQUEST_ERROR', "Abfragefehler: <span class=\"data\">%s</span>"); -define('PRIMERA_API_REQUEST_FAILED', "Unbekannter Fehler <span class=\"data\">%s</span> von API erhalten! Bitte im [<a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker posten</a>], den Fehlercode nennen und wie es dazu gekommen ist."); -define('PRIMERA_API_REQUEST_FAILED_AUTH', "Authorisierung an API fehlgeschlagen! Bitte Primera-Nickname und Passwort überprüfen. [<a href=\"http://www.primusportal.de/\" target=\"_blank\" title=\"Direkt zum Primus-Exportaccount\">Hier</a>] direkt zum Primera-Account. Sie benötigen Ihren Usernamen und Passwort!"); -define('PRIMERA_API_REQUEST_FAILED_USER', "Useraccount nicht gefunden oder Primera-Passwort ist ungültig!"); -define('PRIMERA_API_REQUEST_FAILED_OWN', "Überweisung an eigenes Account nicht möglich."); -define('PRIMERA_API_REQUEST_FAILED_AMOUNT', "Konto weist nicht genügend Deckung auf."); -define('PRIMERA_API_REQUEST_FAILED_API_AMOUNT', "Primera-Account weist nicht genügend Deckung auf."); -define('PRIMERA_API_PURPOSE_WITHDRAW', "Einzahlung auf {?MAIN_TITLE?} ({?URL?}), ID: %s"); -define('PRIMERA_API_PURPOSE_PAYOUT', "Auszahlung von {?MAIN_TITLE?} ({?URL?}), ID: %s"); + 'PRIMERA_API_REQUEST_DATA_INVALID' => "Interner Fehler: Abfragedaten sind defekt!", + 'PRIMERA_API_REQUEST_DATA_MISSING' => "Interner Fehler: Abfragedaten sind nicht komplett!", + 'PRIMERA_API_REQUEST_ERROR' => "Abfragefehler: <span class=\"data\">%s</span>", + 'PRIMERA_API_REQUEST_FAILED' => "Unbekannter Fehler <span class=\"data\">%s</span> von API erhalten! Bitte im [<a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker posten</a>], den Fehlercode nennen und wie es dazu gekommen ist.", + 'PRIMERA_API_REQUEST_FAILED_AUTH' => "Authorisierung an API fehlgeschlagen! Bitte Primera-Nickname und Passwort überprüfen. [<a href=\"http://www.primusportal.de/\" target=\"_blank\" title=\"Direkt zum Primus-Exportaccount\">Hier</a>] direkt zum Primera-Account. Sie benötigen Ihren Usernamen und Passwort!", + 'PRIMERA_API_REQUEST_FAILED_USER' => "Useraccount nicht gefunden oder Primera-Passwort ist ungültig!", + 'PRIMERA_API_REQUEST_FAILED_OWN' => "Überweisung an eigenes Account nicht möglich.", + 'PRIMERA_API_REQUEST_FAILED_AMOUNT' => "Konto weist nicht genügend Deckung auf.", + 'PRIMERA_API_REQUEST_FAILED_API_AMOUNT' => "Primera-Account weist nicht genügend Deckung auf.", + 'PRIMERA_API_PURPOSE_WITHDRAW' => "Einzahlung auf {?MAIN_TITLE?} ({?URL?}), ID: %s", + 'PRIMERA_API_PURPOSE_PAYOUT' => "Auszahlung von {?MAIN_TITLE?} ({?URL?}), ID: %s", // Error messages -define('PRIMERA_ERROR_STATUS', "Fehler-Status <span class=\"data\">%s</span> erhalten."); -define('PRIMERA_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!"); + 'PRIMERA_ERROR_STATUS' => "Fehler-Status <span class=\"data\">%s</span> erhalten.", + 'PRIMERA_UNKNOWN_ERROR' => "Unbekannter Fehler aufgetreten!", // Member messages -define('PRIMERA_MEMBER_NO_ACCOUNT', "Noch kein Primus-Account? Hier entlang!"); -define('PRIMERA_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten müssen."); -define('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT', "Sie haben nicht genügend Primera zum Auszahlen! Mindestens: <span class=\"data\">%s</span> Primera."); -define('PRIMERA_MEMBER_WITHDRAW_TITLE', "Primera bei {?MAIN_TITLE?} einzahlen:"); -define('PRIMERA_MEMBER_WITHDRAW_POINTS_ACCOUNT', "Primera hier im Account:"); -define('PRIMERA_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Primera-Guthaben:"); -define('PRIMERA_MEMBER_WITHDRAW_SUBMIT', "Primera jetzt einzahlen"); -define('PRIMERA_MEMBER_WITHDRAW_NOTE', "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Beträge eingeben! Ihr Primera-Account sollte ausreichend Deckung aufweisen!"); -define('PRIMERA_MEMBER_PAYOUT_TITLE', "Primera auf Ihr Portal-Account auszahlen"); -define('PRIMERA_MEMBER_PAYOUT_POINTS', "Auszahlfähiges Primera-Guthaben"); -define('PRIMERA_MEMBER_PAYOUT_MIN_POINTS', "Mindestens auszuzahlendes Primera-Guthaben"); -define('PRIMERA_MEMBER_PAYOUT_SUBMIT', "Auszahlung durchführen"); -define('PRIMERA_MEMBER_PAYOUT_NOTE', "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Beträge eingeben! Überprüfen Sie vor dem Absenden Ihren Primus-Usernamen."); -define('PRIMERA_MEMBER_NICKNAME', "Username bei Primus-Portal: [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]"); -define('PRIMERA_MEMBER_PASSWORD', "Primera-Passwort (nicht Accountpasswort!): [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]"); -define('PRIMERA_MEMBER_AMOUNT', "Zu überweisenden Betrag eingeben:"); -define('PRIMERA_MEMBER_MODE_INVALID', "Ungültiger Modus <span class=\"data\">%s</span> erkannt! Bitte links im Menü fortfahren."); -define('PRIMERA_MEMBER_EMPTY_USERNAME', "Sie haben Ihren Primus-Usernamen nicht eingegeben."); -define('PRIMERA_MEMBER_EMPTY_PASSWORD', "Sieh haben kein Primera-Passwort eingegeben."); -define('PRIMERA_MEMBER_EMPTY_AMOUNT', "Sie haben keine zu überweisende Betrag angegeben."); -define('PRIMERA_MEMBER_INVALID_USERNAME', "Bitte nur Zahlen für den Primus-Usernamen eingeben!"); -define('PRIMERA_MEMBER_INVALID_AMOUNT', "Bitte nur Zahlen für den zu überweisenden Betrag eingeben!"); -define('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN', "Bitte geben Sie mindestens <span class=\"data\">%s</span> Primera an!"); -define('PRIMERA_MEMBER_WITHDRAW_FAILED', "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: <em>%s</em>."); -define('PRIMERA_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)"); -define('PRIMERA_MEMBER_PAYOUT_DONE', "Auszahlung auf Primus-Portal erfolgreich abgeschlossen. :-)"); -define('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie können nicht <span class=\"data\">%s</span> Primera auszahlen, da Sie nur <span class=\"data\">%s</span> übrig haben."); -define('PRIMERA_MEMBER_STATUS', "Überweisungsart"); + 'PRIMERA_MEMBER_NO_ACCOUNT' => "Noch kein Primus-Account? Hier entlang!", + 'PRIMERA_MEMBER_API_DATA_MISSING' => "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten müssen.", + 'PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT' => "Sie haben nicht genügend Primera zum Auszahlen! Mindestens: <span class=\"data\">%s</span> Primera.", + 'PRIMERA_MEMBER_WITHDRAW_TITLE' => "Primera bei {?MAIN_TITLE?} einzahlen:", + 'PRIMERA_MEMBER_WITHDRAW_POINTS_ACCOUNT' => "Primera hier im Account:", + 'PRIMERA_MEMBER_WITHDRAW_MIN_POINTS' => "Mindest einzuzahlendes Primera-Guthaben:", + 'PRIMERA_MEMBER_WITHDRAW_SUBMIT' => "Primera jetzt einzahlen", + 'PRIMERA_MEMBER_WITHDRAW_NOTE' => "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Beträge eingeben! Ihr Primera-Account sollte ausreichend Deckung aufweisen!", + 'PRIMERA_MEMBER_PAYOUT_TITLE' => "Primera auf Ihr Portal-Account auszahlen", + 'PRIMERA_MEMBER_PAYOUT_POINTS' => "Auszahlfähiges Primera-Guthaben", + 'PRIMERA_MEMBER_PAYOUT_MIN_POINTS' => "Mindestens auszuzahlendes Primera-Guthaben", + 'PRIMERA_MEMBER_PAYOUT_SUBMIT' => "Auszahlung durchführen", + 'PRIMERA_MEMBER_PAYOUT_NOTE' => "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Beträge eingeben! Überprüfen Sie vor dem Absenden Ihren Primus-Usernamen.", + 'PRIMERA_MEMBER_NICKNAME' => "Username bei Primus-Portal: [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]", + 'PRIMERA_MEMBER_PASSWORD' => "Primera-Passwort (nicht Accountpasswort!): [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]", + 'PRIMERA_MEMBER_AMOUNT' => "Zu überweisenden Betrag eingeben:", + 'PRIMERA_MEMBER_MODE_INVALID' => "Ungültiger Modus <span class=\"data\">%s</span> erkannt! Bitte links im Menü fortfahren.", + 'PRIMERA_MEMBER_EMPTY_USERNAME' => "Sie haben Ihren Primus-Usernamen nicht eingegeben.", + 'PRIMERA_MEMBER_EMPTY_PASSWORD' => "Sieh haben kein Primera-Passwort eingegeben.", + 'PRIMERA_MEMBER_EMPTY_AMOUNT' => "Sie haben keine zu überweisende Betrag angegeben.", + 'PRIMERA_MEMBER_INVALID_USERNAME' => "Bitte nur Zahlen für den Primus-Usernamen eingeben!", + 'PRIMERA_MEMBER_INVALID_AMOUNT' => "Bitte nur Zahlen für den zu überweisenden Betrag eingeben!", + 'PRIMERA_MEMBER_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">%s</span> Primera an!", + 'PRIMERA_MEMBER_WITHDRAW_FAILED' => "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: <em>%s</em>.", + 'PRIMERA_MEMBER_WITHDRAW_DONE' => "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)", + 'PRIMERA_MEMBER_PAYOUT_DONE' => "Auszahlung auf Primus-Portal erfolgreich abgeschlossen. :-)", + 'PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED' => "Sie können nicht <span class=\"data\">%s</span> Primera auszahlen, da Sie nur <span class=\"data\">%s</span> übrig haben.", + 'PRIMERA_MEMBER_STATUS' => "Überweisungsart", +)); -// +// [EOF] ?> diff --git a/inc/language/rallye_de.php b/inc/language/rallye_de.php index 1d222af618..245a07865f 100644 --- a/inc/language/rallye_de.php +++ b/inc/language/rallye_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,117 +38,118 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_RALLYE_ADD_NEW_TITLE', "Neue Ref-Rallye hinzufügen"); -define('ADD_RALLYE', "Rallye hinzufügen"); -define('ADD_RALLYE_PRICE', "Preis hinzufügen"); -define('RALLYE_START_DAY', "Beginn der Rallye"); -define('RALLYE_END_DAY', "Ende der Rallye"); -define('RALLYE_AUTO_ADD_USER', "Neue Mitglieder nehmen automatisch dran teil"); -define('RALLYE_IS_ACTIVE', "Rallye ist aktiv"); -define('RALLYE_SEND_NOTIFY', "Autom. Benachrichtigung an Mitglieder senden"); -define('RALLYE_OVERLAP_TIMES', "Rallyes dürfen nicht zeitgleich laufen!"); -define('RALLYE_TITLE', "Rallye-Titel"); -define('RALLYE_DESCR', "Kurze Beschreibung / Freier HTML-Code der Rallye"); -define('RALLYE_TEMPLATE', "Template (anstelle freien HTML-Codes)"); -define('RALLYE_PROBLEM_CREATE', "Problem beim Erzeugen der Rallye!"); -define('RALLYE_NO_RALLYES_SETUP', "Bitte fügen Sie zuerst eine neue Rallye hinzu."); -define('RALLYE_CONFIG_PRICES_1', "Preise einrichten für Rallye <u>"); -define('RALLYE_CONFIG_PRICES_2', "</u>"); -define('RALLYE_PRICE_LEVEL', "Platz eingeben (1, 2, 3, usw.)"); -define('RALLYE_PRICE_POINTS', "Preis in {?POINTS?}"); -define('RALLYE_PRICE_INFOS', "Preisbeschreibung (<div class=\"tiny\">Sie können auch nur die Beschreibung eingeben!</div>)"); -define('RALLYE_PRICE_ALREADY_FOUND', "Sie haben bereits für diesen Platz einen Preis vergeben oder ist identisch mit anderen Preisen!"); -define('RALLYE_PRICE_LEVEL_SAVED', "Preis wurde hinzugefügt."); -define('RALLYE_EDIT_DEL_PRICES', "Ändern und Löschen von Rallye-Preisen"); -define('RALLYE_LEVEL', "Platz"); -define('RALLYE_PRICE_INFO', "Infos"); -define('RALLYE_EDIT_SELECTED_PRICES', "Preise/Plätze ändern"); -define('RALLYE_EDIT_PRICES', "Editieren"); -define('RALLYE_DELETE_PRICES', "Löschen"); -define('RALLYE_CHANGE_PRICES', "Ändern"); -define('RALLYE_ID', "Rallye-ID"); -define('RALLYE_EDIT_DEL_RALLYES', "Ändern / Löschen von Rallyes (Grunddaten)"); -define('RALLYE_ADMIN_ID', "Admin-Login"); -define('RALLYE_TSTART', "Anfang"); -define('RALLYE_TEND', "Ende"); -define('RALLYE_EDIT_ADMIN', "Editieren"); -define('RALLYE_DELETE_ADMIN', "Löschen"); -define('RALLYE_EDIT_DEL_NOTE', "Wenn Sie die Grunddaten der ausgewählten Rallyes ändern / löschen wollen, markieren Sie diese per Kästchen. Wollen Sie die Preise ändern, klicken Sie den Rallye-Titel an. Aktive Rallyes können nicht geändert werden, sondern müssen erst deaktiviert werden."); -define('RALLYE_ENTRIES_DELETED', "Einträge gelöscht."); -define('RALLYE_ENTRIES_CHANGED', "Einträge geändert."); -define('RALLYE_ENTRIES_NOT_DELETED', "Bitte wählen Sie mindestens einen Eintrag zum Löschen aus."); -define('RALLYE_DESCR2', "Kurzbeschreibung"); -define('RALLYE_TEMPLATE2', "Template"); -define('RALLYE_AUTO_ADD', "Autom. Teilnahme"); -define('RALLYE_ACTIVE', "Aktiviert"); -define('RALLYE_NOTIFY', "Benachrichtigen"); -define('RALLYE_NOTIFIED', "Benachrichtigt"); -define('RALLYE_ASSIGNED_PRICES', "Bereits eingerichtete Preise"); -define('RALLYE_ASSIGNED_USERS', "Teilnehmende Mitglieder"); -define('RALLYE_LIST_OVERVIEW_TITLE', "Datenblätter der Rallyes"); -define('RALLYE_NO_RALLYES_SELECTED_1', "Sie haben keine "); -define('RALLYE_NO_RALLYES_SELECTED_2', "Rallyes zum Editieren"); -define('RALLYE_NO_RALLYES_SELECTED_3', " ausgewählt!"); -define('RALLYE_DEACTIVATE_NOW', "Rallye deaktivieren"); -define('RALLYE_ACTIVATE_NOW', "Rallye aktivieren"); -define('RALLYE_STOP_NOTIFY_NOW', "Nicht mehr benachrichtigen"); -define('RALLYE_START_NOTIFY_NOW', "Mitglieder autom. benachrichtigen"); -define('RALLYE_EDIT_ONLY_INACTIVE_NOTE', "Es können nur deaktivierte Rallyes bearbeitet bzw. gelöscht werden. Beim Löschen werden alle dazu verknüpften Daten ebenfalls ohne Vorwarnung gelöscht."); -define('RALLYE_DELETE_NOTHING_SELECTED', "Keine Rallye(s) zum Löschen ausgewählt!"); -define('RALLYE_DELETED', "Rallye(s) wurde(n) gelöscht."); -define('RALLYE_MEMBER_NO_PRICES', "--> Keine Preise für Modus %s ausgesetzt! <--"); -define('RALLYE_MEMBER_PRICES_ADDED', "Die Preise"); -define('RALLYE_PRICE', ". Platz"); -define('RALLYE_MEMBER_NOTIFY', "REF-RALLYE GESTARTET: %s"); -define('RALLYE_ADMIN_NOTIFY', "Neue Ref-Rallye: %s"); -define('RALLYE_ADMIN_USERS_404', "Zur ausgewählten Rallye sind noch keine Mitglieder hinzugefügt worden!"); +addMessages(array( + 'ADMIN_RALLYE_ADD_NEW_TITLE' => "Neue Ref-Rallye hinzufügen", + 'ADD_RALLYE' => "Rallye hinzufügen", + 'ADD_RALLYE_PRICE' => "Preis hinzufügen", + 'RALLYE_START_DAY' => "Beginn der Rallye", + 'RALLYE_END_DAY' => "Ende der Rallye", + 'RALLYE_AUTO_ADD_USER' => "Neue Mitglieder nehmen automatisch dran teil", + 'RALLYE_IS_ACTIVE' => "Rallye ist aktiv", + 'RALLYE_SEND_NOTIFY' => "Autom. Benachrichtigung an Mitglieder senden", + 'RALLYE_OVERLAP_TIMES' => "Rallyes dürfen nicht zeitgleich laufen!", + 'RALLYE_TITLE' => "Rallye-Titel", + 'RALLYE_DESCR' => "Kurze Beschreibung / Freier HTML-Code der Rallye", + 'RALLYE_TEMPLATE' => "Template (anstelle freien HTML-Codes)", + 'RALLYE_PROBLEM_CREATE' => "Problem beim Erzeugen der Rallye!", + 'RALLYE_NO_RALLYES_SETUP' => "Bitte fügen Sie zuerst eine neue Rallye hinzu.", + 'RALLYE_CONFIG_PRICES_1' => "Preise einrichten für Rallye <u>", + 'RALLYE_CONFIG_PRICES_2' => "</u>", + 'RALLYE_PRICE_LEVEL' => "Platz eingeben (1, 2, 3, usw.)", + 'RALLYE_PRICE_POINTS' => "Preis in {?POINTS?}", + 'RALLYE_PRICE_INFOS' => "Preisbeschreibung (<div class=\"tiny\">Sie können auch nur die Beschreibung eingeben!</div>)", + 'RALLYE_PRICE_ALREADY_FOUND' => "Sie haben bereits für diesen Platz einen Preis vergeben oder ist identisch mit anderen Preisen!", + 'RALLYE_PRICE_LEVEL_SAVED' => "Preis wurde hinzugefügt.", + 'RALLYE_EDIT_DEL_PRICES' => "Ändern und Löschen von Rallye-Preisen", + 'RALLYE_LEVEL' => "Platz", + 'RALLYE_PRICE_INFO' => "Infos", + 'RALLYE_EDIT_SELECTED_PRICES' => "Preise/Plätze ändern", + 'RALLYE_EDIT_PRICES' => "Editieren", + 'RALLYE_DELETE_PRICES' => "Löschen", + 'RALLYE_CHANGE_PRICES' => "Ändern", + 'RALLYE_ID' => "Rallye-ID", + 'RALLYE_EDIT_DEL_RALLYES' => "Ändern / Löschen von Rallyes (Grunddaten)", + 'RALLYE_ADMIN_ID' => "Admin-Login", + 'RALLYE_TSTART' => "Anfang", + 'RALLYE_TEND' => "Ende", + 'RALLYE_EDIT_ADMIN' => "Editieren", + 'RALLYE_DELETE_ADMIN' => "Löschen", + 'RALLYE_EDIT_DEL_NOTE' => "Wenn Sie die Grunddaten der ausgewählten Rallyes ändern / löschen wollen, markieren Sie diese per Kästchen. Wollen Sie die Preise ändern, klicken Sie den Rallye-Titel an. Aktive Rallyes können nicht geändert werden, sondern müssen erst deaktiviert werden.", + 'RALLYE_ENTRIES_DELETED' => "Einträge gelöscht.", + 'RALLYE_ENTRIES_CHANGED' => "Einträge geändert.", + 'RALLYE_ENTRIES_NOT_DELETED' => "Bitte wählen Sie mindestens einen Eintrag zum Löschen aus.", + 'RALLYE_DESCR2' => "Kurzbeschreibung", + 'RALLYE_TEMPLATE2' => "Template", + 'RALLYE_AUTO_ADD' => "Autom. Teilnahme", + 'RALLYE_ACTIVE' => "Aktiviert", + 'RALLYE_NOTIFY' => "Benachrichtigen", + 'RALLYE_NOTIFIED' => "Benachrichtigt", + 'RALLYE_ASSIGNED_PRICES' => "Bereits eingerichtete Preise", + 'RALLYE_ASSIGNED_USERS' => "Teilnehmende Mitglieder", + 'RALLYE_LIST_OVERVIEW_TITLE' => "Datenblätter der Rallyes", + 'RALLYE_NO_RALLYES_SELECTED_1' => "Sie haben keine ", + 'RALLYE_NO_RALLYES_SELECTED_2' => "Rallyes zum Editieren", + 'RALLYE_NO_RALLYES_SELECTED_3' => " ausgewählt!", + 'RALLYE_DEACTIVATE_NOW' => "Rallye deaktivieren", + 'RALLYE_ACTIVATE_NOW' => "Rallye aktivieren", + 'RALLYE_STOP_NOTIFY_NOW' => "Nicht mehr benachrichtigen", + 'RALLYE_START_NOTIFY_NOW' => "Mitglieder autom. benachrichtigen", + 'RALLYE_EDIT_ONLY_INACTIVE_NOTE' => "Es können nur deaktivierte Rallyes bearbeitet bzw. gelöscht werden. Beim Löschen werden alle dazu verknüpften Daten ebenfalls ohne Vorwarnung gelöscht.", + 'RALLYE_DELETE_NOTHING_SELECTED' => "Keine Rallye(s) zum Löschen ausgewählt!", + 'RALLYE_DELETED' => "Rallye(s) wurde(n) gelöscht.", + 'RALLYE_MEMBER_NO_PRICES' => "--> Keine Preise für Modus %s ausgesetzt! <--", + 'RALLYE_MEMBER_PRICES_ADDED' => "Die Preise", + 'RALLYE_PRICE' => ". Platz", + 'RALLYE_MEMBER_NOTIFY' => "REF-RALLYE GESTARTET: %s", + 'RALLYE_ADMIN_NOTIFY' => "Neue Ref-Rallye: %s", + 'RALLYE_ADMIN_USERS_404' => "Zur ausgewählten Rallye sind noch keine Mitglieder hinzugefügt worden!", // @TODO Rewrite following two lines to one -define('RALLYE_LIST_USERS_1', "Teilnehmende Mitglieder an der Rallye <u>"); -define('RALLYE_LIST_USERS_2', "</u>"); -define('RALLYE_OLD_REFS', "Refs vor Rallye"); -define('RALLYE_NEW_REFS', "Neue Refs"); -define('RALLYE_STOP_AUTO_ADD_NOW', "Auto-Beitreten neuer Mitglieder deaktivieren"); -define('RALLYE_START_AUTO_ADD_NOW', "Auto-Beitreten neuer Mitglieder aktivieren"); -define('RALLYE_GUEST_REFS', "Geworbene Mitglieder"); -define('_RALLYE_PRICE', "Platz"); -define('RALLYE_EXPIRE_ONE_DAY', "Rallye endet in weniger als 24 Stunden!"); -define('RALLYE_HAS_EXPIRED', "Diese Rallye ist beendet."); -define('RALLYE_ADMIN_EXPIRED', "Rallye beendet"); -define('RALLYE_ADMIN_EXPIRED_SUBJ', "Rallye beendet: %s"); -define('RALLYE_MEMBER_EXPIRED_SUBJ', "REF-RALLYE BEENDET: %s. Platz"); -define('RALLYE_YOU_CAN_WIN', "Was Sie gewinnen können"); -define('RALLYE_OUR_WINNERS_ARE', "Unsere Gewinner sind dieses Mal"); -define('RALLYE_PRICE_IS', "Hat gewonnen"); -define('RALLYE_HAPPY_WINNERS', "Wir gratulieren allen Gewinnern!"); -define('RALLYE_ADMIN_PURGED_SUBJ', "[HINWEIS:] Rallye '%s' entfernt"); -define('RALLYE_ADMIN_EXPIRED_TEXT', "Eine Referal-Rallye ist beendet worden. Bitte kontrollieren Sie diese und führen Sie ggf. weitere Schritte durch!"); -define('RALLYE_ADMIN_PURGED_TEXT', "Eine oder mehr Referal-Rallye(s) ist/sind gelöscht worden."); -define('RALLYE_EDIT_RALLYES', "Rallye-Grunddaten ändern"); -define('RALLYE_CHANGE_ADMIN', "Änderungen speichern"); -define('RALLYE_CHANGED', "Änderungen gespeichert."); -define('RALLYE_REF_POINTS', "Verdienst durch Refs"); -define('RALLYE_REGISTER_NOW', "Jetzt kostenlos und unverbindlich anmelden!"); -define('RALLYE_GET_REFLINK', "Jetzt dran teilnehmen!"); -define('ADMIN_TASK_IS_RALLYE_EXPIRED', "Rallye wurde beendet"); -define('ADMIN_TASK_IS_RALLYE_PURGED', "Rallye wurde gelöscht"); -define('RALLYE_LIST_USERS_TITLE', "Alle teilnehmenden Mitglieder auflisten."); -define('RALLYE_REF_POINTS_NOTE', "Die {?POINTS?} in der Spalte <u>Verdienst durch Refs</u> geben den Verdienst in erster Ebene vor der Rallye an und wird sich bis Ende der Rallye nicht verändern."); -define('RALLYE_MIN_USERS', "Gesamtzahl der Mitglieder, ab der Rallye automatisch endet."); -define('RALLYE_MIN_PRICES', "Mindestens zu belegende Plätze"); -define('RALLYE_MIN_USERS_MINI', "Mitgliederanzahl erreicht"); -define('RALLYE_MIN_PRICES_MINI', "Minimum Plätze"); -define('RALLYE_END_NO_USER_LIMITATION', "Die Rallye endet ohne Mitgliederbegrenzung."); -define('RALLYE_END_NO_PRICE_LIMITATION', "Die Rallye endet ohne Platzbelegungsbegrenzung."); -define('RALLYE_END_USERS', "Die Rallye endet, sobald wir <span class=\"data\">%s</span> Mitglieder in unserem {?MT_WORD?} haben!"); -define('RALLYE_END_PRICES', "Die Rallye endet, sobald mindestens <span class=\"data\">%s</span> Plaetze belegt sind!"); -define('RALLYE_LIMITATIONS', "Einschränkungen an der Dauer der Rallye"); -define('RALLYE_REMOVE_PRICES', "Rallye-Preis(e) entfernen"); -define('RALLYE_NO_TEMPLATES_FOUND', "Keine Templates gefunden!"); + 'RALLYE_LIST_USERS_1' => "Teilnehmende Mitglieder an der Rallye <u>", + 'RALLYE_LIST_USERS_2' => "</u>", + 'RALLYE_OLD_REFS' => "Refs vor Rallye", + 'RALLYE_NEW_REFS' => "Neue Refs", + 'RALLYE_STOP_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder deaktivieren", + 'RALLYE_START_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder aktivieren", + 'RALLYE_GUEST_REFS' => "Geworbene Mitglieder", + '_RALLYE_PRICE' => "Platz", + 'RALLYE_EXPIRE_ONE_DAY' => "Rallye endet in weniger als 24 Stunden!", + 'RALLYE_HAS_EXPIRED' => "Diese Rallye ist beendet.", + 'RALLYE_ADMIN_EXPIRED' => "Rallye beendet", + 'RALLYE_ADMIN_EXPIRED_SUBJ' => "Rallye beendet: %s", + 'RALLYE_MEMBER_EXPIRED_SUBJ' => "REF-RALLYE BEENDET: %s. Platz", + 'RALLYE_YOU_CAN_WIN' => "Was Sie gewinnen können", + 'RALLYE_OUR_WINNERS_ARE' => "Unsere Gewinner sind dieses Mal", + 'RALLYE_PRICE_IS' => "Hat gewonnen", + 'RALLYE_HAPPY_WINNERS' => "Wir gratulieren allen Gewinnern!", + 'RALLYE_ADMIN_PURGED_SUBJ' => "[HINWEIS:] Rallye '%s' entfernt", + 'RALLYE_ADMIN_EXPIRED_TEXT' => "Eine Referal-Rallye ist beendet worden. Bitte kontrollieren Sie diese und führen Sie ggf. weitere Schritte durch!", + 'RALLYE_ADMIN_PURGED_TEXT' => "Eine oder mehr Referal-Rallye(s) ist/sind gelöscht worden.", + 'RALLYE_EDIT_RALLYES' => "Rallye-Grunddaten ändern", + 'RALLYE_CHANGE_ADMIN' => "Änderungen speichern", + 'RALLYE_CHANGED' => "Änderungen gespeichert.", + 'RALLYE_REF_POINTS' => "Verdienst durch Refs", + 'RALLYE_REGISTER_NOW' => "Jetzt kostenlos und unverbindlich anmelden!", + 'RALLYE_GET_REFLINK' => "Jetzt dran teilnehmen!", + 'ADMIN_TASK_IS_RALLYE_EXPIRED' => "Rallye wurde beendet", + 'ADMIN_TASK_IS_RALLYE_PURGED' => "Rallye wurde gelöscht", + 'RALLYE_LIST_USERS_TITLE' => "Alle teilnehmenden Mitglieder auflisten.", + 'RALLYE_REF_POINTS_NOTE' => "Die {?POINTS?} in der Spalte <u>Verdienst durch Refs</u> geben den Verdienst in erster Ebene vor der Rallye an und wird sich bis Ende der Rallye nicht verändern.", + 'RALLYE_MIN_USERS' => "Gesamtzahl der Mitglieder, ab der Rallye automatisch endet.", + 'RALLYE_MIN_PRICES' => "Mindestens zu belegende Plätze", + 'RALLYE_MIN_USERS_MINI' => "Mitgliederanzahl erreicht", + 'RALLYE_MIN_PRICES_MINI' => "Minimum Plätze", + 'RALLYE_END_NO_USER_LIMITATION' => "Die Rallye endet ohne Mitgliederbegrenzung.", + 'RALLYE_END_NO_PRICE_LIMITATION' => "Die Rallye endet ohne Platzbelegungsbegrenzung.", + 'RALLYE_END_USERS' => "Die Rallye endet, sobald wir <span class=\"data\">%s</span> Mitglieder in unserem {?mt_word?} haben!", + 'RALLYE_END_PRICES' => "Die Rallye endet, sobald mindestens <span class=\"data\">%s</span> Plaetze belegt sind!", + 'RALLYE_LIMITATIONS' => "Einschränkungen an der Dauer der Rallye", + 'RALLYE_REMOVE_PRICES' => "Rallye-Preis(e) entfernen", + 'RALLYE_NO_TEMPLATES_FOUND' => "Keine Templates gefunden!", +)); -// +// [EOF] ?> diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index a9a6135c55..b93783ae60 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,55 +38,56 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Admin language strings // @TODO Rewrite these constants to one -define('ADMIN_LIST_USER_NOREFS_1', "Das Mitglied <u>"); -define('ADMIN_LIST_USER_NOREFS_2', "</u> hat in dieser Referal-Ebene keine Refs!"); -define('ADMIN_CONFIG_REFBACK_TITLE', "Refback-Einstellungen"); -define('ADMIN_CONFIG_REFBACK_ENABLED', "Refback eingeschaltet? (Wenn nein, ist nur die Referal-Übersicht funktionell.)"); -define('ADMIN_CONFIG_REFBACK_MIN_PERCENTS', "Minimum erlaubte Refback-Prozente:<br /><span class=\"admin_note\">(0% ist immer erlaubt!)</span>"); -define('ADMIN_CONFIG_REFBACK_MAX_PERCENTS', "Maximum erlaubte Refback-Prozente:"); +addMessages(array( + 'ADMIN_LIST_USER_NOREFS_1' => "Das Mitglied <u>", + 'ADMIN_LIST_USER_NOREFS_2' => "</u> hat in dieser Referal-Ebene keine Refs!", + 'ADMIN_CONFIG_REFBACK_TITLE' => "Refback-Einstellungen", + 'ADMIN_CONFIG_REFBACK_ENABLED' => "Refback eingeschaltet? (Wenn nein, ist nur die Referal-Übersicht funktionell.)", + 'ADMIN_CONFIG_REFBACK_MIN_PERCENTS' => "Minimum erlaubte Refback-Prozente:<br /><span class=\"admin_note\">(0% ist immer erlaubt!)</span>", + 'ADMIN_CONFIG_REFBACK_MAX_PERCENTS' => "Maximum erlaubte Refback-Prozente:", // Member language strings -define('MEMBER_REFBACK_LIST_TITLE_1', "Ref-Back Übersicht für Referal-Ebene <u>"); -define('MEMBER_REFBACK_LIST_TITLE_2', "</u> (<u>"); -define('MEMBER_REFBACK_LIST_TITLE_3', "%</u>)"); -define('MEMBER_REFBACK_TITLE', "Ref-Back und Referal-Übersicht"); -define('MEMBER_REFBACK_NOTE', "Hier können Sie in jeder Referal-Ebene jedem von Ihnen geworbenen Mitglied Ref-Back einstellen. Sollte Ihr Referal {?POINTS?} verdienen und diese ihm/ihr nicht direkt gutgeschrieben werden, so erhält Ihr Referal die eingestellten Prozente von Ihrem Referalverdienst aufgebuch. Ihnen wird dafür sein Anteil (=eingestellte Prozente) von dem Refverdienst abgezogen. Unter <strong>{--MEMBER_REFBACK_POINTS--}</strong> sind die {?POINTS?}-Gutschriften durch Ref-Back an das jeweilige Mitglied zu verstehen."); -define('MEMBER_REFBACK_EXAMPLE', "Ein Rechenbeispiel: Ihr Ref <strong>X</strong> verdient 1000 {?POINTS?}, es sind 10% in Ref-Ebene 1 eingestellt. Sie erhalten somit 100 {?POINTS?} in Ref-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Ref gegeben. Ihrem Ref werden somit 90 und Ihnen die restlichen 10 {?POINTS?} gutgeschrieben."); -define('MEMBER_REFBACK_NO_ENTRIES', "Es gibt technische Probleme mit der Refback-Tabelle. Bitte Support benachrichtigen."); -define('MEMBER_REFBACK_EDIT_SUBMIT', "Refback einstellen"); -define('MEMBER_REFBACK_REFID', "User-ID (Nickname)"); -define('MEMBER_REFBACK_STATUS', "Referal-Status"); -define('MEMBER_REFBACK_PERCENTS', "Ref-Back Prozente"); -define('MEMBER_REFBACK_POINTS', "Ref-Back Vergütung"); -define('MEMBER_REFBACK_EDIT', "Einstellen"); -define('MEMBER_REFBACK_EDIT_TITLE', "Ref-Back für ausgewähltes Mitglied einstellen:"); -define('MEMBER_REFBACK_DELETED_SUBMIT', "Nicht möglich"); -define('MEMBER_REFBACK_DELETED_TITLE', "Einstellen von Ref-Back ist für gelöschte Mitglieder nicht möglich."); -define('MEMBER_REFBACK_DISABLED', "Refback ist administrativ deaktiviert. Bitte nutze die Referal-Übersicht links im Menü."); -define('MEMBER_REFBACK_MIN_MAX_NOTE_1', "<strong>Hinweis:</strong> Sie können derzeit zwischen <u>"); -define('MEMBER_REFBACK_MIN_MAX_NOTE_2', "</u> und <u>"); -define('MEMBER_REFBACK_MIN_MAX_NOTE_3', "</u> Prozent, inklusive, Refback einstellen."); + 'MEMBER_REFBACK_LIST_TITLE_1' => "Ref-Back Übersicht für Referal-Ebene <u>", + 'MEMBER_REFBACK_LIST_TITLE_2' => "</u> (<u>", + 'MEMBER_REFBACK_LIST_TITLE_3' => "%</u>)", + 'MEMBER_REFBACK_TITLE' => "Ref-Back und Referal-Übersicht", + 'MEMBER_REFBACK_NOTE' => "Hier können Sie in jeder Referal-Ebene jedem von Ihnen geworbenen Mitglied Ref-Back einstellen. Sollte Ihr Referal {?POINTS?} verdienen und diese ihm/ihr nicht direkt gutgeschrieben werden, so erhält Ihr Referal die eingestellten Prozente von Ihrem Referalverdienst aufgebuch. Ihnen wird dafür sein Anteil (=eingestellte Prozente) von dem Refverdienst abgezogen. Unter <strong>{--MEMBER_REFBACK_POINTS--}</strong> sind die {?POINTS?}-Gutschriften durch Ref-Back an das jeweilige Mitglied zu verstehen.", + 'MEMBER_REFBACK_EXAMPLE' => "Ein Rechenbeispiel: Ihr Ref <strong>X</strong> verdient 1000 {?POINTS?}, es sind 10% in Ref-Ebene 1 eingestellt. Sie erhalten somit 100 {?POINTS?} in Ref-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Ref gegeben. Ihrem Ref werden somit 90 und Ihnen die restlichen 10 {?POINTS?} gutgeschrieben.", + 'MEMBER_REFBACK_NO_ENTRIES' => "Es gibt technische Probleme mit der Refback-Tabelle. Bitte Support benachrichtigen.", + 'MEMBER_REFBACK_EDIT_SUBMIT' => "Refback einstellen", + 'MEMBER_REFBACK_REFID' => "User-ID (Nickname)", + 'MEMBER_REFBACK_STATUS' => "Referal-Status", + 'MEMBER_REFBACK_PERCENTS' => "Ref-Back Prozente", + 'MEMBER_REFBACK_POINTS' => "Ref-Back Vergütung", + 'MEMBER_REFBACK_EDIT' => "Einstellen", + 'MEMBER_REFBACK_EDIT_TITLE' => "Ref-Back für ausgewähltes Mitglied einstellen:", + 'MEMBER_REFBACK_DELETED_SUBMIT' => "Nicht möglich", + 'MEMBER_REFBACK_DELETED_TITLE' => "Einstellen von Ref-Back ist für gelöschte Mitglieder nicht möglich.", + 'MEMBER_REFBACK_DISABLED' => "Refback ist administrativ deaktiviert. Bitte nutze die Referal-Übersicht links im Menü.", + 'MEMBER_REFBACK_MIN_MAX_NOTE_1' => "<strong>Hinweis:</strong> Sie können derzeit zwischen <u>", + 'MEMBER_REFBACK_MIN_MAX_NOTE_2' => "</u> und <u>", + 'MEMBER_REFBACK_MIN_MAX_NOTE_3' => "</u> Prozent, inklusive, Refback einstellen.", // Error messages for members -define('MEMBER_REFBACK_ERROR_MESSAGE', "Fehler beim Einstellen des Ref-Backs. Fehlermeldung:<br />\n<span class=\"data\">%s</span>"); -define('MEMBER_REFBACK_ERROR_GENERAL', "Allgemeiner Scriptefehler. Bitte beim Support melden."); -define('MEMBER_REFBACK_ERROR_NO_MEMBER', "Nur Mitglieder können Ref-Backs einstellen."); -define('MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER', "Ungültige ID-Nummer übertragen."); -define('MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE', "Prozentsatz ungültig. 0 bis 100 sind gültige Werte."); -define('MEMBER_REFBACK_ERROR_ID_MISMATCH', "Die ausgewählte Ref-Back ID gehört Ihnen nicht."); -define('MEMBER_REFBACK_ERROR_NOT_UPDATED', "Ref-Back nicht aktualisiert."); -define('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS', "Sie können nur mindestens <span class=\"data\">%s%</span> und maximal <span class=\"data\">%s%</span> einstellen!"); -define('MEMBER_REFBACK_DONE', "Ref-Back eingestellt. Dieser ist ab jetzt gültig."); + 'MEMBER_REFBACK_ERROR_MESSAGE' => "Fehler beim Einstellen des Ref-Backs. Fehlermeldung:<br />\n<span class=\"data\">%s</span>", + 'MEMBER_REFBACK_ERROR_GENERAL' => "Allgemeiner Scriptefehler. Bitte beim Support melden.", + 'MEMBER_REFBACK_ERROR_NO_MEMBER' => "Nur Mitglieder können Ref-Backs einstellen.", + 'MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER' => "Ungültige ID-Nummer übertragen.", + 'MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE' => "Prozentsatz ungültig. 0 bis 100 sind gültige Werte.", + 'MEMBER_REFBACK_ERROR_ID_MISMATCH' => "Die ausgewählte Ref-Back ID gehört Ihnen nicht.", + 'MEMBER_REFBACK_ERROR_NOT_UPDATED' => "Ref-Back nicht aktualisiert.", + 'MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS' => "Sie können nur mindestens <span class=\"data\">%s%</span> und maximal <span class=\"data\">%s%</span> einstellen!", + 'MEMBER_REFBACK_DONE' => "Ref-Back eingestellt. Dieser ist ab jetzt gültig.", // Subject lines -define('ADMIN_REFBACK_SUBJECT', "Es wurde Ref-Back eingestellt"); -define('MEMBER_REFBACK_SUBJECT', "Für Sie wurde Ref-Back eingestellt"); + 'ADMIN_REFBACK_SUBJECT' => "Es wurde Ref-Back eingestellt", + 'MEMBER_REFBACK_SUBJECT' => "Für Sie wurde Ref-Back eingestellt", +)); -// +// [EOF] ?> diff --git a/inc/language/register_de.php b/inc/language/register_de.php index 6776c034f4..7b27805d13 100644 --- a/inc/language/register_de.php +++ b/inc/language/register_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('REGISTER_MUST_SET_NOTE', "Sind Pflichtangaben, ansonsten erfolgt keine Anmeldung."); -define('REGISTER_MUST_HEADER', "Pflichtfelder einstellen"); -define('REGISTER_CHANGE_MUST', "Einstellungen ändern"); -define('REGISTER_FIELD_NAME', "Eingabefeld"); -define('REGISTER_FIELD_REQUIRED', "Pflichtfeld?"); -define('REGISTER_ADMIN_CHANGES_SAVED', "Änderungen gespeichert."); -define('REGISTER_SURNAME_REQUIRED', "Bitte geben Sie Ihren Vornamen ein."); -define('REGISTER_FAMILY_NAME_REQUIRED', "Bitte geben Sie Ihren Nachnamen ein."); -define('REGISTER_STREET_NR_REQUIRED', "Bitte geben Sie Straße und Hausnummer ein."); -define('REGISTER_CNTRY_REQUIRED', "Bitte geben Sie den zweistelligen Ländercode ein."); -define('REGISTER_ZIP_REQUIRED', "Bitte geben Sie die Postleitzahl ein."); -define('REGISTER_CITY_REQUIRED', "Bitte geben Sie den Wohnort ein."); -define('CNTRY', "Ländercode"); -define('ADMIN_CFG_REGISTER_DEFAULT', "Standart-Vorauswahl in der Kategorienliste einstellen auf Ja/Nein"); -define('ADMIN_CFG_REGISTER_DISPLAY_REFID', "Soll die Ref-ID angezeigt werden? <div class=\"admin_note\">(Nein = ID wird editierbar!)</div>"); +addMessages(array( + 'REGISTER_MUST_SET_NOTE' => "Sind Pflichtangaben, ansonsten erfolgt keine Anmeldung.", + 'REGISTER_MUST_HEADER' => "Pflichtfelder einstellen", + 'REGISTER_CHANGE_MUST' => "Einstellungen ändern", + 'REGISTER_FIELD_NAME' => "Eingabefeld", + 'REGISTER_FIELD_REQUIRED' => "Pflichtfeld?", + 'REGISTER_ADMIN_CHANGES_SAVED' => "Änderungen gespeichert.", + 'REGISTER_SURNAME_REQUIRED' => "Bitte geben Sie Ihren Vornamen ein.", + 'REGISTER_FAMILY_NAME_REQUIRED' => "Bitte geben Sie Ihren Nachnamen ein.", + 'REGISTER_STREET_NR_REQUIRED' => "Bitte geben Sie Straße und Hausnummer ein.", + 'REGISTER_CNTRY_REQUIRED' => "Bitte geben Sie den zweistelligen Ländercode ein.", + 'REGISTER_ZIP_REQUIRED' => "Bitte geben Sie die Postleitzahl ein.", + 'REGISTER_CITY_REQUIRED' => "Bitte geben Sie den Wohnort ein.", + 'CNTRY' => "Ländercode", + 'ADMIN_CFG_REGISTER_DEFAULT' => "Standart-Vorauswahl in der Kategorienliste einstellen auf Ja/Nein", + 'ADMIN_CFG_REGISTER_DISPLAY_REFID' => "Soll die Ref-ID angezeigt werden? <div class=\"admin_note\">(Nein = ID wird editierbar!)</div>", +)); -// +// [EOF] ?> diff --git a/inc/language/removeip_de.php b/inc/language/removeip_de.php index 4d331ca86f..c9f932ac1c 100644 --- a/inc/language/removeip_de.php +++ b/inc/language/removeip_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,31 +38,32 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} //Â END - if // Language definitions -define('ADMIN_CONFIG_REMOVEIP_TITLE', "Konfiguration zur Anonymität/Privatsphähre"); -define('ADMIN_CONFIG_REMOVEIP_ANON_IP', "IP-Nummer anonymisieren?<br /><span class=\"admin_note\">(Siehe dazu weiter unten)</span>"); -define('ADMIN_CONFIG_REMOVEIP_ANON_HOST', "Hostname anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als <strong>localhost.localnet</strong> ausgegeben.)</span>"); -define('ADMIN_CONFIG_REMOVEIP_ANON_UA', "User-Agent anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>"); -define('ADMIN_CONFIG_REMOVEIP_ANON_REF', "Referer anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>"); -define('ADMIN_CONFIG_REMOVEIP_ANONYMOUS_IP', "Als was soll die anonymisierte IP-Nummer ausgegeben werden?"); -define('ADMIN_CONFIG_REMOVEIP_LOCAL', "127.0.0.1 (Lokal)"); -define('ADMIN_CONFIG_REMOVEIP_ZERO', "0.0.0.0 (Nicht existierend)"); -define('ADMIN_CONFIG_REMOVEIP_RANDOM', "???.???.???.??? (Pseudozufall)"); -define('ADMIN_CONFIG_REMOVEIP_ADMIN_SHOW', "Im Adminbereich Anonymitätslevel zeigen?"); -define('ADMIN_CONFIG_REMOVEIP_GUEST_SHOW', "Im Gastbereich Anonymitätslevel zeigen?"); -define('ADMIN_CONFIG_REMOVEIP_MEMBER_SHOW', "Im Mitgliedsbereich Anonymitätslevel zeigen?"); -define('ADMIN_CONFIG_REMOVEIP_SPONSOR_SHOW', "Im Sponsorbereich Anonymitätslevel zeigen?"); +addMessages(array( + 'ADMIN_CONFIG_REMOVEIP_TITLE' => "Konfiguration zur Anonymität/Privatsphähre", + 'ADMIN_CONFIG_REMOVEIP_ANON_IP' => "IP-Nummer anonymisieren?<br /><span class=\"admin_note\">(Siehe dazu weiter unten)</span>", + 'ADMIN_CONFIG_REMOVEIP_ANON_HOST' => "Hostname anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als <strong>localhost.localnet</strong> ausgegeben.)</span>", + 'ADMIN_CONFIG_REMOVEIP_ANON_UA' => "User-Agent anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>", + 'ADMIN_CONFIG_REMOVEIP_ANON_REF' => "Referer anonymisieren?<br /><span class=\"admin_note\">(Dieser wird als Strich ausgegeben.)</span>", + 'ADMIN_CONFIG_REMOVEIP_ANONYMOUS_IP' => "Als was soll die anonymisierte IP-Nummer ausgegeben werden?", + 'ADMIN_CONFIG_REMOVEIP_LOCAL' => "127.0.0.1 (Lokal)", + 'ADMIN_CONFIG_REMOVEIP_ZERO' => "0.0.0.0 (Nicht existierend)", + 'ADMIN_CONFIG_REMOVEIP_RANDOM' => "???.???.???.??? (Pseudozufall)", + 'ADMIN_CONFIG_REMOVEIP_ADMIN_SHOW' => "Im Adminbereich Anonymitätslevel zeigen?", + 'ADMIN_CONFIG_REMOVEIP_GUEST_SHOW' => "Im Gastbereich Anonymitätslevel zeigen?", + 'ADMIN_CONFIG_REMOVEIP_MEMBER_SHOW' => "Im Mitgliedsbereich Anonymitätslevel zeigen?", + 'ADMIN_CONFIG_REMOVEIP_SPONSOR_SHOW' => "Im Sponsorbereich Anonymitätslevel zeigen?", // Anonymity levels -define('REMOVEIP_UNKNOWN_LEVEL', "Unbekannte Anonymitätslevel <span class=\"data\">%s</span>"); -define('REMOVEIP_LEVEL_NONE', "Keine Anonymität"); -define('REMOVEIP_LEVEL_LOW', "Niedrige Anonymität"); -define('REMOVEIP_LEVEL_MEDIUM', "Mittlere Anonymität"); -define('REMOVEIP_LEVEL_HIGH', "Hohe Anonymität"); + 'REMOVEIP_UNKNOWN_LEVEL' => "Unbekannte Anonymitätslevel <span class=\"data\">%s</span>", + 'REMOVEIP_LEVEL_NONE' => "Keine Anonymität", + 'REMOVEIP_LEVEL_LOW' => "Niedrige Anonymität", + 'REMOVEIP_LEVEL_MEDIUM' => "Mittlere Anonymität", + 'REMOVEIP_LEVEL_HIGH' => "Hohe Anonymität", +)); -// +// [EOF] ?> diff --git a/inc/language/repair_de.php b/inc/language/repair_de.php index f2110026b6..1b87daaa21 100644 --- a/inc/language/repair_de.php +++ b/inc/language/repair_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,15 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_REPAIR_CATS_NOTHING', "Keine Kategorie-Auswahlenn gefunden! Vermutlich sind keine Mitglieder registriert?"); -define('ADMIN_REPAIR_ENTRIES_FIXED', "Es wurden <span class=\"data\">%s</span> Einträge repariert!"); -define('ADMIN_REPAIR_NOTHING_FIXED', "Es wurden keine Einträge repariert!"); +addMessages(array( + 'ADMIN_REPAIR_CATS_NOTHING' => "Keine Kategorie-Auswahlenn gefunden! Vermutlich sind keine Mitglieder registriert?", + 'ADMIN_REPAIR_ENTRIES_FIXED' => "Es wurden <span class=\"data\">%s</span> Einträge repariert!", + 'ADMIN_REPAIR_NOTHING_FIXED' => "Es wurden keine Einträge repariert!", +)); -// +// [EOF] ?> diff --git a/inc/language/rewrite_de.php b/inc/language/rewrite_de.php index 6c1cc81235..3aae1f43b9 100644 --- a/inc/language/rewrite_de.php +++ b/inc/language/rewrite_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('MODULE_NAME', "Modulname"); -define('MODULE_TITLE', "Modultitel"); -define('MODULE_SKIPPED', "Modul wird ausgeblendet"); -define('ADMIN_CONFIG_REWRITE_NOTE', "Stellen Sie hier die Module ein, die von der Rewrite-Engine nicht<br /> +addMessages(array( + 'MODULE_NAME' => "Modulname", + 'MODULE_TITLE' => "Modultitel", + 'MODULE_SKIPPED' => "Modul wird ausgeblendet", + 'ADMIN_CONFIG_REWRITE_NOTE' => "Stellen Sie hier die Module ein, die von der Rewrite-Engine nicht<br /> auf die suchmaschienenoptimierten URLs umgeschrieben werden sollen.<br /> -Das Modul <u>admin</u> sollten Sie *KEINES FALLS* aus der Liste enfernen!"); +Das Modul <u>admin</u> sollten Sie *KEINES FALLS* aus der Liste enfernen!", +)); -// +// [EOF] ?> diff --git a/inc/language/sponsor_de.php b/inc/language/sponsor_de.php index 48fd3d81e1..5cf7b6b731 100644 --- a/inc/language/sponsor_de.php +++ b/inc/language/sponsor_de.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,276 +38,275 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('SPONSOR_NOT_INITIALIZED', "Sponsorenbereich noch nicht eingerichtet!"); -define('ADMIN_CONFIG_SPONSOR_TITLE', "Allgemeine Einstellungen"); -define('ADMIN_SPONSOR_MIN_POINTS', "Minimum buchbare {?POINTS?}"); -define('ADMIN_SPONSOR_REF_POINTS', "Einmalige Referal-Gutschrift bei Vermittlung eines neuen Sponsors"); -define('ADMIN_SPONSOR_ENTER_COMPANY_DATA', "Daten zur anzumeldenen Unternehmen eingeben"); -define('SPONSOR_ENTER_COMPANY_TITLE', "Firmenname"); -define('SPONSOR_ENTER_COMPANY_POSITION', "Position"); -define('SPONSOR_ENTER_TAX_IDENT', "Ust-Ident-Nr."); -define('ADMIN_SPONSOR_ENTER_PERSONA_DATA', "Daten zur Person (oder bei Unternehmen Kontaktperson)"); -define('ADMIN_SPONSOR_ENTER_CONTACT_DATA', "Kontaktdaten des Sponsors"); -define('SPONSOR_ENTER_STREET_NR1', "Straße mit Hausnummer"); -define('SPONSOR_ENTER_STREET_NR2', "(noch Straße; Zeile 2)"); -define('SPONSOR_ENTER_CNTRY_ZIP_CITY', "Ländercode, PLZ, Wohnort"); -define('SPONSOR_ENTER_PHONE', "Telefonnummer"); -define('SPONSOR_ENTER_FAX', "Faxnummer"); -define('SPONSOR_ENTER_CELL', "Handynummer"); -define('SPONSOR_ENTER_EMAIL', "EMail-Adresse"); -define('SPONSOR_ENTER_URL', "Homepage-URL"); -define('ADMIN_SPONSOR_ENTER_PASSWORDS', "Passwörter eingeben"); -define('SPONSOR_ENTER_PASSWORDS', "Passwort mit -bestätigung"); -define('ADMIN_SPONSOR_WARNINGS_POINTS', "Warnungen und {?POINTS?}"); -define('SPONSOR_RECEIVE_WARNINGS', "Sponsor erhält bei jeder Aktion Mails zugesandt"); -define('SPONSOR_WARNING_INTERVAL', "Sendeinterval des Sponsorenberichtes"); -define('SPONSOR_ENTER_POINTS', "Guthaben an {?POINTS?} zum Starten"); -define('ADD_SPONSOR', "Sponsor hinzufügen"); -define('ADMIN_SPONSOR_COMPANY_NOTE', "Wenn Sie eine Privatperson anmelden wollen, lassen Sie bitte die folgenden drei Felder einfach leer!"); -define('SPONSOR_DATA_NOT_SAVED', "Sponsorendaten wurden <u>nicht</u> gespeichert."); -define('ADMIN_SPONSOR_REALLY_ADD_SPONSOR', "Sponsor existiert bereits!"); -define('ADMIN_SPONSOR_DO_YOU_REALLY_WANT_ADDING', "Ein Sponsor existiert bereits mit der eingegeben EMail-Adresse <strong>{!__EMAIL!}</strong>. Wollen Sie ihn dennoch hinzufügen?"); -define('ADMIN_SPONSOR_ADDED', "Sponsor wurde hinzugefügt."); -define('ADMIN_SPONSOR_UPDATED', "Sponsordaten wurden aktualisiert."); -define('ADMIN_SPONSOR_FAILED', "Konnte Daten nichtn speichern!"); -define('ADMIN_SPONSOR_NONE_PENDING', "Kein Sponsorenaccount wartet auf Freischaltung."); -define('SPONSOR_CREATED', "Angelegt"); -define('SPONSOR_UNLOCK', "Sponsoren freischalten"); -define('ADMIN_SPONSOR_UNLOCK_NOTES', "Wichtig: Schalten Sie nur Sponsoren frei, wenn diese auch bezahlt haben! Das Script wird dann den Status auf <u>Bezahlt</u> setzen."); -define('ADMIN_SPONSOR_UNLOCK_TITLE', "Sponsorenaccounts freischalten"); -define('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK', "Keinen Sponsor zum Freischalten ausgewählt!"); -define('SPONSOR_NO_ADMIN', "Ihrer Bestellung wurde keinem Administrator zugewiesen!"); -define('SPONSOR_NO_PAYMENTS_FOUND', "Keine offenen Bestellungen gefunden!"); -define('ADMIN_SPONSOR_NONE_REGISTERED', "Kein Sponsor hat sich bei Ihnen angemeldet! :-("); -define('ACCOUNT_PENDING', "Wartend"); -define('ADMIN_LIST_SPONSOR_ACCOUNTS', "Alle Sponsoren auflisten"); -define('SPONSOR_POINTS_LEFT', "Restguthaben"); -define('ADMIN_LIST_SPONSOR_NOTES', "Klicken Sie auf die ID-Nummer, um weitere Details zu sehen und um weitere Aktionen am Sponsorenaccount durchführen zu können! Klicken Sie auf das Restguthaben an {?POINTS?}, um dem jeweiligen Sponsor mehr {?POINTS?} aufzubuchen."); -define('ADMIN_SPONSOR_404', "Sponsorenaccount <span class=\"data\">%s</span> nicht gefunden!"); -define('ADMIN_SPONSOR_REFS_404', "Der Sponsor <span class=\"data\">%s</span> hat keine Referals!"); -define('ADMIN_SPONSOR_DETAILS', "Datenblatt eines Sponsors"); -define('ADMIN_SPONSOR_COMPANY_DATA', "Firmendaten des Sponsors"); -define('ADMIN_SPONSOR_PERSONA_DATA', "Persönliche Daten des Sponsors"); -define('ADMIN_SPONSOR_OTHER_DETAILS', "Sonstige Daten zum Sponsor"); -define('SPONSOR_POINTS_AMOUNT', "Guthaben"); -define('SPONSOR_POINTS_USED', "Verwendet"); -define('SPONSOR_RECEIVE_WARNINGS_SHORT', "Mailbenachrichtigung"); -define('SPONSOR_WARNING_INTERVAL_SHORT', "Benachrichtunsinterval"); -define('ADMIN_LAST_CHANGE', "Letzte Änderung"); -define('SPONSOR_REFID', "Von Sponsor geworben"); -define('ADMIN_SPONSOR_ACTIONS', "Aktionen am Sponsorenaccount"); -define('SPONSOR_ID', "Sponsor-ID"); -define('SPONSOR_STATUS', "Sponsor-Status"); -define('SPONSOR_REFERRALS', "Sponsoren geworben"); -define('ADMIN_SPONSOR_INVALID_MODE', "Ungütiger Modus <span class=\"data\">%s</span> angegeben!"); -define('ADMIN_SPONSOR_MODUS_TPL_404', "Modus-Template <span class=\"data\">%s</span> nicht gefunden!"); -define('ADMIN_ADD_POINTS_TO_SPONSOR', "{?POINTS?} gutschreiben"); -define('ADMIN_SUB_POINTS_FROM_SPONSOR', "{?POINTS?} abziehen"); -define('ADMIN_SUM_SPONSOR_POINTS', "Summe {?POINTS?}"); -define('ADMIN_SPONSOR_ADD_POINTS', "Jetzt gutschreiben"); -define('ADMIN_SPONSOR_SUB_POINTS', "Jetzt abziehen"); -define('ADMIN_SPONSPOR_NO_POINTS_TO_ADD', "Keine {?POINTS?} zum Gutschreiben eingegeben!"); -define('ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT', "Keine {?POINTS?} zum Abziehen eingegeben!"); -define('ADMIN_SPONSOR_POINTS_ADDED', "{?POINTS?} wurden gutgeschrieben."); -define('ADMIN_SPONSOR_POINTS_SUBTRACTED', "{?POINTS?} wurden abgezogen."); -define('ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS', "Sie können keine auf Freischaltung wartende oder unbestätigte Accounts sperren/freigeben!"); +addMessages(array( + 'SPONSOR_NOT_INITIALIZED' => "Sponsorenbereich noch nicht eingerichtet!", + 'ADMIN_CONFIG_SPONSOR_TITLE' => "Allgemeine Einstellungen", + 'ADMIN_SPONSOR_MIN_POINTS' => "Minimum buchbare {?POINTS?}", + 'ADMIN_SPONSOR_REF_POINTS' => "Einmalige Referal-Gutschrift bei Vermittlung eines neuen Sponsors", + 'ADMIN_SPONSOR_ENTER_COMPANY_DATA' => "Daten zur anzumeldenen Unternehmen eingeben", + 'SPONSOR_ENTER_COMPANY_TITLE' => "Firmenname", + 'SPONSOR_ENTER_COMPANY_POSITION' => "Position", + 'SPONSOR_ENTER_TAX_IDENT' => "Ust-Ident-Nr.", + 'ADMIN_SPONSOR_ENTER_PERSONA_DATA' => "Daten zur Person (oder bei Unternehmen Kontaktperson)", + 'ADMIN_SPONSOR_ENTER_CONTACT_DATA' => "Kontaktdaten des Sponsors", + 'SPONSOR_ENTER_STREET_NR1' => "Straße mit Hausnummer", + 'SPONSOR_ENTER_STREET_NR2' => "(noch Straße; Zeile 2)", + 'SPONSOR_ENTER_CNTRY_ZIP_CITY' => "Ländercode, PLZ, Wohnort", + 'SPONSOR_ENTER_PHONE' => "Telefonnummer", + 'SPONSOR_ENTER_FAX' => "Faxnummer", + 'SPONSOR_ENTER_CELL' => "Handynummer", + 'SPONSOR_ENTER_EMAIL' => "EMail-Adresse", + 'SPONSOR_ENTER_URL' => "Homepage-URL", + 'ADMIN_SPONSOR_ENTER_PASSWORDS' => "Passwörter eingeben", + 'SPONSOR_ENTER_PASSWORDS' => "Passwort mit -bestätigung", + 'ADMIN_SPONSOR_WARNINGS_POINTS' => "Warnungen und {?POINTS?}", + 'SPONSOR_RECEIVE_WARNINGS' => "Sponsor erhält bei jeder Aktion Mails zugesandt", + 'SPONSOR_WARNING_INTERVAL' => "Sendeinterval des Sponsorenberichtes", + 'SPONSOR_ENTER_POINTS' => "Guthaben an {?POINTS?} zum Starten", + 'ADD_SPONSOR' => "Sponsor hinzufügen", + 'ADMIN_SPONSOR_COMPANY_NOTE' => "Wenn Sie eine Privatperson anmelden wollen, lassen Sie bitte die folgenden drei Felder einfach leer!", + 'SPONSOR_DATA_NOT_SAVED' => "Sponsorendaten wurden <u>nicht</u> gespeichert.", + 'ADMIN_SPONSOR_REALLY_ADD_SPONSOR' => "Sponsor existiert bereits!", + 'ADMIN_SPONSOR_ADDED' => "Sponsor wurde hinzugefügt.", + 'ADMIN_SPONSOR_UPDATED' => "Sponsordaten wurden aktualisiert.", + 'ADMIN_SPONSOR_FAILED' => "Konnte Daten nichtn speichern!", + 'ADMIN_SPONSOR_NONE_PENDING' => "Kein Sponsorenaccount wartet auf Freischaltung.", + 'SPONSOR_CREATED' => "Angelegt", + 'SPONSOR_UNLOCK' => "Sponsoren freischalten", + 'ADMIN_SPONSOR_UNLOCK_NOTES' => "Wichtig: Schalten Sie nur Sponsoren frei, wenn diese auch bezahlt haben! Das Script wird dann den Status auf <u>Bezahlt</u> setzen.", + 'ADMIN_SPONSOR_UNLOCK_TITLE' => "Sponsorenaccounts freischalten", + 'ADMIN_SPONSOR_NONE_SELECTED_UNLOCK' => "Keinen Sponsor zum Freischalten ausgewählt!", + 'SPONSOR_NO_ADMIN' => "Ihrer Bestellung wurde keinem Administrator zugewiesen!", + 'SPONSOR_NO_PAYMENTS_FOUND' => "Keine offenen Bestellungen gefunden!", + 'ADMIN_SPONSOR_NONE_REGISTERED' => "Kein Sponsor hat sich bei Ihnen angemeldet! :-(", + 'ACCOUNT_PENDING' => "Wartend", + 'ADMIN_LIST_SPONSOR_ACCOUNTS' => "Alle Sponsoren auflisten", + 'SPONSOR_POINTS_LEFT' => "Restguthaben", + 'ADMIN_LIST_SPONSOR_NOTES' => "Klicken Sie auf die ID-Nummer, um weitere Details zu sehen und um weitere Aktionen am Sponsorenaccount durchführen zu können! Klicken Sie auf das Restguthaben an {?POINTS?}, um dem jeweiligen Sponsor mehr {?POINTS?} aufzubuchen.", + 'ADMIN_SPONSOR_404' => "Sponsorenaccount <span class=\"data\">%s</span> nicht gefunden!", + 'ADMIN_SPONSOR_REFS_404' => "Der Sponsor <span class=\"data\">%s</span> hat keine Referals!", + 'ADMIN_SPONSOR_DETAILS' => "Datenblatt eines Sponsors", + 'ADMIN_SPONSOR_COMPANY_DATA' => "Firmendaten des Sponsors", + 'ADMIN_SPONSOR_PERSONA_DATA' => "Persönliche Daten des Sponsors", + 'ADMIN_SPONSOR_OTHER_DETAILS' => "Sonstige Daten zum Sponsor", + 'SPONSOR_POINTS_AMOUNT' => "Guthaben", + 'SPONSOR_POINTS_USED' => "Verwendet", + 'SPONSOR_RECEIVE_WARNINGS_SHORT' => "Mailbenachrichtigung", + 'SPONSOR_WARNING_INTERVAL_SHORT' => "Benachrichtunsinterval", + 'ADMIN_LAST_CHANGE' => "Letzte Änderung", + 'SPONSOR_REFID' => "Von Sponsor geworben", + 'ADMIN_SPONSOR_ACTIONS' => "Aktionen am Sponsorenaccount", + 'SPONSOR_ID' => "Sponsor-ID", + 'SPONSOR_STATUS' => "Sponsor-Status", + 'SPONSOR_REFERRALS' => "Sponsoren geworben", + 'ADMIN_SPONSOR_INVALID_MODE' => "Ungütiger Modus <span class=\"data\">%s</span> angegeben!", + 'ADMIN_SPONSOR_MODUS_TPL_404' => "Modus-Template <span class=\"data\">%s</span> nicht gefunden!", + 'ADMIN_ADD_POINTS_TO_SPONSOR' => "{?POINTS?} gutschreiben", + 'ADMIN_SUB_POINTS_FROM_SPONSOR' => "{?POINTS?} abziehen", + 'ADMIN_SUM_SPONSOR_POINTS' => "Summe {?POINTS?}", + 'ADMIN_SPONSOR_ADD_POINTS' => "Jetzt gutschreiben", + 'ADMIN_SPONSOR_SUB_POINTS' => "Jetzt abziehen", + 'ADMIN_SPONSPOR_NO_POINTS_TO_ADD' => "Keine {?POINTS?} zum Gutschreiben eingegeben!", + 'ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT' => "Keine {?POINTS?} zum Abziehen eingegeben!", + 'ADMIN_SPONSOR_POINTS_ADDED' => "{?POINTS?} wurden gutgeschrieben.", + 'ADMIN_SPONSOR_POINTS_SUBTRACTED' => "{?POINTS?} wurden abgezogen.", + 'ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS' => "Sie können keine auf Freischaltung wartende oder unbestätigte Accounts sperren/freigeben!", // @TODO Rewrite these four constants to one and use sprintf() -define('ADMIN_HEADER_DEL_SPONSOR_1', "Sponsorenaccount <u>"); -define('ADMIN_HEADER_DEL_SPONSOR_2', "</u> löschen"); -define('ADMIN_TEXT_DEL_SPONSOR_1', "Möchten Sie den Sponsoren <strong>"); -define('ADMIN_TEXT_DEL_SPONSOR_2', "</strong> mit samt aller seiner Bestellungen unwiederruflich löschen?"); -define('ADMIN_SPONSOR_DELETED', "Sponsorenaccount <span class=\"data\">%s</span> entfernt."); -define('GUEST_SPONSOR_TITLE', "Anmeldung als Sponsor"); -define('SPONSOR_ENTER_COMPANY_DATA', "Daten zum Unternehmen"); -define('SPONSOR_COMPANY_NOTE', "Sie können sich auch als private Person anmelden, lassen Sie dazu die drei folgenden Felder einfach leer!"); -define('SPONSOR_ENTER_PERSONA_DATA', "Daten zu Ihrer Person"); -define('SPONSOR_ENTER_CONTACT_DATA', "Kontaktmöglichkeiten (mindestens EMail!)"); -define('SPONSOR_WARNINGS', "Mailbenachrichtigungen"); -define('SPONSOR_SELECT_PAYMENT', "Buchungspaket auswählen"); -define('REGISTER_SPONSOR', "Jetzt verbindlich anmelden!"); -define('SPONSOR_PAYMENTS', "Bezahlung der {?POINTS?}"); -define('SPONSOR_NO_ACTIONS_ACTIVATED', "Derzeit sind keine Aktionen im Sponsorenbereich möglich!"); -define('SPONSOR_PAYTYPE', "Buchungspaket(e)"); -define('SPONSOR_PAYTYPE_VALUE', "Bestellwert"); -define('SPONSOR_PAYTYPE_COUNT', "Bestellmenge"); -define('GUEST_SPONSOR_RECEIVE_WARNINGS', "Bei Datenänderung eine Bestätigung per Mail erhalten?"); -define('SPONSOR_ACCEPT_TERMS', "Ich/wir habe/n die [<strong><a href=\"{?URL?}/modules.php?module=index&what=sponsor_agb\" target=\"_blank\">AGBs</a></strong>] gelesen und akzeptiert."); -define('SPONSOR_TERMS_HEADER', "Allgemeine Geschäftsbedingungen"); + 'ADMIN_HEADER_DEL_SPONSOR_1' => "Sponsorenaccount <u>", + 'ADMIN_HEADER_DEL_SPONSOR_2' => "</u> löschen", + 'ADMIN_TEXT_DEL_SPONSOR_1' => "Möchten Sie den Sponsoren <strong>", + 'ADMIN_TEXT_DEL_SPONSOR_2' => "</strong> mit samt aller seiner Bestellungen unwiederruflich löschen?", + 'ADMIN_SPONSOR_DELETED' => "Sponsorenaccount <span class=\"data\">%s</span> entfernt.", + 'GUEST_SPONSOR_TITLE' => "Anmeldung als Sponsor", + 'SPONSOR_ENTER_COMPANY_DATA' => "Daten zum Unternehmen", + 'SPONSOR_COMPANY_NOTE' => "Sie können sich auch als private Person anmelden, lassen Sie dazu die drei folgenden Felder einfach leer!", + 'SPONSOR_ENTER_PERSONA_DATA' => "Daten zu Ihrer Person", + 'SPONSOR_ENTER_CONTACT_DATA' => "Kontaktmöglichkeiten (mindestens EMail!)", + 'SPONSOR_WARNINGS' => "Mailbenachrichtigungen", + 'SPONSOR_SELECT_PAYMENT' => "Buchungspaket auswählen", + 'REGISTER_SPONSOR' => "Jetzt verbindlich anmelden!", + 'SPONSOR_PAYMENTS' => "Bezahlung der {?POINTS?}", + 'SPONSOR_NO_ACTIONS_ACTIVATED' => "Derzeit sind keine Aktionen im Sponsorenbereich möglich!", + 'SPONSOR_PAYTYPE' => "Buchungspaket(e)", + 'SPONSOR_PAYTYPE_VALUE' => "Bestellwert", + 'SPONSOR_PAYTYPE_COUNT' => "Bestellmenge", + 'GUEST_SPONSOR_RECEIVE_WARNINGS' => "Bei Datenänderung eine Bestätigung per Mail erhalten?", + 'SPONSOR_ACCEPT_TERMS' => "Ich/wir habe/n die [<strong><a href=\"{?URL?}/modules.php?module=index&what=sponsor_agb\" target=\"_blank\">AGBs</a></strong>] gelesen und akzeptiert.", + 'SPONSOR_TERMS_HEADER' => "Allgemeine Geschäftsbedingungen", // Add payment types -define('ADMIN_SPONSOR_NO_PAYTYPES', "Noch keine Buchungspakete eingerichtet!"); -define('ADMIN_ADD_SPONSOR_PAYTYPE_TITLE', "Neue Buchungspaket hinzufügen"); -define('ADMIN_ADD_SPONSOR_PAYTYPE', "Buchungspaket hinzufügen"); -define('SPONSOR_PAYTYPE_NAME', "Bezeichnung"); -define('SPONSOR_PAYTYPE_NAME_HINT', "(max. 255 Zeichen)"); -define('SPONSOR_PAYTYPE_RATE', "Umrechnungsrate"); -define('SPONSOR_PAYTYPE_RATE_HINT', "(z.B. 1 € = x {?POINTS?})"); -define('SPONSOR_PAYTYPE_MIN_COUNT', "Bestellmenge"); -define('SPONSOR_PAYTYPE_CURRENCY', "Währung"); -define('SPONSOR_ADD_PAYTYPES_NOTES', "Hinweise zu den Buchungspaketen"); -define('SPONSOR_PAYTYPE_NAME_NOTE', "Geben Sie eine passende Bezeichnung zum Buchungspaket ein (z.B. <strong>Spar-Paket</strong>)"); -define('SPONSOR_PAYTYPE_RATE_NOTE', "Wie viele {?POINTS?} soll der Sponsor für z.B. 1 € bekommen?"); -define('SPONSOR_PAYTYPE_MIN_COUNT_NOTE', "Und wie oft soll dieses Buchungspaket <strong>mindestens</strong> eingekauft werden? (meistens einmal)"); -define('SPONSOR_PAYTYPE_CURRENCY_NOTE', "Währung des Geldbetrages, die der Sponsor an Sie überweisen soll."); -define('ADMIN_SPONSOR_PAYTYPE_ALREADY', "Buchungspaket <span class=\"data\">%s</span> bereits eingerichtet."); -define('ADMIN_SPONSOR_PAYTYPE_ADDED', "Buchungspaket <span class=\"data\">%s</span> hinzugefügt."); -define('SPONSOR_LIST_PAYMENT_TYPES_TITLE', "Buchungspakete auflisten, bearbeiten und löschen"); -define('SPONSOR_PAYTYPE_MIN_COUNT2', "Minium"); -define('ADMIN_SPONSOR_PAYTYPE_EDIT', "Bearbeiten"); -define('ADMIN_SPONSOR_PAYTYPE_DELETE', "Löschen"); -define('SPONSOR_EDIT_PAY_ENTRIES', "Buchungspakete editieren"); -define('SPONSOR_DELETE_PAY_ENTRIES', "Buchungspakete löschen"); -define('SPONSOR_PAY_ENTRIES_CHANGED', "Buchungspakete geändert."); -define('SPONSOR_PAY_ENTRIES_REMOVED', "Buchungspakete gelöscht."); -define('SPONSOR_PAYMENT_LIST_IS_EMPTY', "Noch keine Buchungspakete eingerichtet!"); -define('ADMIN_SPONSOR_UNKNOWN_STATUS', "Unbekannter Status <span class=\"data\">%s</span> wurde bei der Anmeldung zurückgeliefert!"); -define('SPONSOR_REFERRAL', "Sponsoren-Referal"); -define('SPONSOR_REFID_WAS', "Sie wurden vom Sponsor geworben"); -define('SPONSOR_ACCOUNT_IS_PENDING', "EMail-Adresse bestätigt! Sie haben soeben eine EMail mit weiteren Anweisungen erhalten."); + 'ADMIN_SPONSOR_NO_PAYTYPES' => "Noch keine Buchungspakete eingerichtet!", + 'ADMIN_ADD_SPONSOR_PAYTYPE_TITLE' => "Neue Buchungspaket hinzufügen", + 'ADMIN_ADD_SPONSOR_PAYTYPE' => "Buchungspaket hinzufügen", + 'SPONSOR_PAYTYPE_NAME' => "Bezeichnung", + 'SPONSOR_PAYTYPE_NAME_HINT' => "(max. 255 Zeichen)", + 'SPONSOR_PAYTYPE_RATE' => "Umrechnungsrate", + 'SPONSOR_PAYTYPE_RATE_HINT' => "(z.B. 1 € = x {?POINTS?})", + 'SPONSOR_PAYTYPE_MIN_COUNT' => "Bestellmenge", + 'SPONSOR_PAYTYPE_CURRENCY' => "Währung", + 'SPONSOR_ADD_PAYTYPES_NOTES' => "Hinweise zu den Buchungspaketen", + 'SPONSOR_PAYTYPE_NAME_NOTE' => "Geben Sie eine passende Bezeichnung zum Buchungspaket ein (z.B. <strong>Spar-Paket</strong>)", + 'SPONSOR_PAYTYPE_RATE_NOTE' => "Wie viele {?POINTS?} soll der Sponsor für z.B. 1 € bekommen?", + 'SPONSOR_PAYTYPE_MIN_COUNT_NOTE' => "Und wie oft soll dieses Buchungspaket <strong>mindestens</strong> eingekauft werden? (meistens einmal)", + 'SPONSOR_PAYTYPE_CURRENCY_NOTE' => "Währung des Geldbetrages, die der Sponsor an Sie überweisen soll.", + 'ADMIN_SPONSOR_PAYTYPE_ALREADY' => "Buchungspaket <span class=\"data\">%s</span> bereits eingerichtet.", + 'ADMIN_SPONSOR_PAYTYPE_ADDED' => "Buchungspaket <span class=\"data\">%s</span> hinzugefügt.", + 'SPONSOR_LIST_PAYMENT_TYPES_TITLE' => "Buchungspakete auflisten, bearbeiten und löschen", + 'SPONSOR_PAYTYPE_MIN_COUNT2' => "Minium", + 'ADMIN_SPONSOR_PAYTYPE_EDIT' => "Bearbeiten", + 'ADMIN_SPONSOR_PAYTYPE_DELETE' => "Löschen", + 'SPONSOR_EDIT_PAY_ENTRIES' => "Buchungspakete editieren", + 'SPONSOR_DELETE_PAY_ENTRIES' => "Buchungspakete löschen", + 'SPONSOR_PAY_ENTRIES_CHANGED' => "Buchungspakete geändert.", + 'SPONSOR_PAY_ENTRIES_REMOVED' => "Buchungspakete gelöscht.", + 'SPONSOR_PAYMENT_LIST_IS_EMPTY' => "Noch keine Buchungspakete eingerichtet!", + 'ADMIN_SPONSOR_UNKNOWN_STATUS' => "Unbekannter Status <span class=\"data\">%s</span> wurde bei der Anmeldung zurückgeliefert!", + 'SPONSOR_REFERRAL' => "Sponsoren-Referal", + 'SPONSOR_REFID_WAS' => "Sie wurden vom Sponsor geworben", + 'SPONSOR_ACCOUNT_IS_PENDING' => "EMail-Adresse bestätigt! Sie haben soeben eine EMail mit weiteren Anweisungen erhalten.", // Header / text / email messages -define('SPONSOR_LOCK_SPONSOR_HEADER', "Sponsorenaccount sperren"); -define('SPONSOR_UNLOCK_SPONSOR_HEADER', "Sponsorenaccount freigeben"); -define('SPONSOR_LOCK_SPONSOR_TEXT', "Wollen Sie das ausgewählte Sponsorenaccount sperren? Falls ja, wird eine Mail an den Sponsor geschickt. Bitte geben Sie auch eine plaubsible Begründung der Sperrung mit an!"); -define('SPONSOR_UNLOCK_SPONSOR_TEXT', "Wollen Sie das ausgewählte Sponsorenaccount freigeben? Falls ja, wird eine Mail an den Sponsor geschickt."); -define('SPONSOR_ACCOUNT_LOCKED', "Ihr Sponsorenaccount wurde hiermit von einem unserer Administratoren gesperrt. Bitte beachten Sie fuer die Zukunft unsere AGBs!"); -define('SPONSOR_ACCOUNT_UNLOCKED', "Ihr Sponsorenaccount wurde hiermit von einem unserer Administratoren wieder freigegeben. Sie koennen sich mit den alten Logindaten wieder einloggen. Sollten Sie Ihr Passwort vergessen haben, koennen Sie sich unter Sponsoren->Einloggen ein neues zusenden lassen."); -define('SPONSOR_EMAIL_STREET_NR1', "Strasse mit Hausnummer"); -define('SPONSOR_EMAIL_STREET_NR2', "(noch Strasse; Zeile 2)"); -define('SPONSOR_EMAIL_CNTRY_ZIP_CITY', "Laendercode, PLZ, Wohnort"); -define('SPONSOR_PASS_UNCHANGED', "- Nicht geaendert! -"); + 'SPONSOR_LOCK_SPONSOR_HEADER' => "Sponsorenaccount sperren", + 'SPONSOR_UNLOCK_SPONSOR_HEADER' => "Sponsorenaccount freigeben", + 'SPONSOR_LOCK_SPONSOR_TEXT' => "Wollen Sie das ausgewählte Sponsorenaccount sperren? Falls ja, wird eine Mail an den Sponsor geschickt. Bitte geben Sie auch eine plaubsible Begründung der Sperrung mit an!", + 'SPONSOR_UNLOCK_SPONSOR_TEXT' => "Wollen Sie das ausgewählte Sponsorenaccount freigeben? Falls ja, wird eine Mail an den Sponsor geschickt.", + 'SPONSOR_ACCOUNT_LOCKED' => "Ihr Sponsorenaccount wurde hiermit von einem unserer Administratoren gesperrt. Bitte beachten Sie fuer die Zukunft unsere AGBs!", + 'SPONSOR_ACCOUNT_UNLOCKED' => "Ihr Sponsorenaccount wurde hiermit von einem unserer Administratoren wieder freigegeben. Sie koennen sich mit den alten Logindaten wieder einloggen. Sollten Sie Ihr Passwort vergessen haben, koennen Sie sich unter Sponsoren->Einloggen ein neues zusenden lassen.", + 'SPONSOR_EMAIL_STREET_NR1' => "Strasse mit Hausnummer", + 'SPONSOR_EMAIL_STREET_NR2' => "(noch Strasse; Zeile 2)", + 'SPONSOR_EMAIL_CNTRY_ZIP_CITY' => "Laendercode, PLZ, Wohnort", + 'SPONSOR_PASS_UNCHANGED' => "- Nicht geaendert! -", // Guest headers -define('GUEST_SPONSOR_WANT_BECOME_HEADER', "Sie wollen unser Sponsor sein?"); -define('GUEST_SPONSOR_INFOS_PRICING_HEADER', "Hier sind Preise und was Sie für Ihr Geld bekommen!"); -define('GUEST_SPONSOR_PRICING_HEADER', "Unsere Preise sind einfach fair! Schauen Sie selbst:"); -define('GUEST_SPONSOR_ACTIONS_HEADER', "Und das bekommen Sie von uns:"); + 'GUEST_SPONSOR_WANT_BECOME_HEADER' => "Sie wollen unser Sponsor sein?", + 'GUEST_SPONSOR_INFOS_PRICING_HEADER' => "Hier sind Preise und was Sie für Ihr Geld bekommen!", + 'GUEST_SPONSOR_PRICING_HEADER' => "Unsere Preise sind einfach fair! Schauen Sie selbst:", + 'GUEST_SPONSOR_ACTIONS_HEADER' => "Und das bekommen Sie von uns:", // Link descriptions -define('ADMIN_SPONSOR_DETAILS_LINK_TITLE', "Details des Sponsorenaccounts anzeigen"); -define('ADMIN_SPONSOR_EDIT_LINK_TITLE', "Sponsorenaccount ändern"); -define('ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE', "{?POINTS?} gutschreiben"); -define('ADMIN_SPONSOR_SUB_POINTS_LINK_TITLE', "{?POINTS?} abziehen"); + 'ADMIN_SPONSOR_DETAILS_LINK_TITLE' => "Details des Sponsorenaccounts anzeigen", + 'ADMIN_SPONSOR_EDIT_LINK_TITLE' => "Sponsorenaccount ändern", + 'ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE' => "{?POINTS?} gutschreiben", + 'ADMIN_SPONSOR_SUB_POINTS_LINK_TITLE' => "{?POINTS?} abziehen", // Performable actions on a sponsor's account -define('ADMIN_SPONSOR_EDIT', "Sponsor ändern"); -define('ADMIN_SPONSOR_DEL', "Sponsor löschen"); -define('ADMIN_SPONSOR_LOCK', "Sponsoren ent-/sperren"); -define('ADMIN_LIST_SPONSOR_ORDERS', "Bestellungen bearbeiten"); + 'ADMIN_SPONSOR_EDIT' => "Sponsor ändern", + 'ADMIN_SPONSOR_DEL' => "Sponsor löschen", + 'ADMIN_SPONSOR_LOCK' => "Sponsoren ent-/sperren", + 'ADMIN_LIST_SPONSOR_ORDERS' => "Bestellungen bearbeiten", // Subject lines -define('SPONSOR_UNLOCKED_SUBJ', "HINWEIS: Freischaltung Ihres Sponsorenaccounts"); -define('ADMIN_SPONSOR_ADD_POINTS_SUBJ', "HINWEIS: Gutschrift durch den Admin!"); -define('ADMIN_SPONSOR_SUB_POINTS_SUBJ', "HINWEIS: Abzug durch den Admin!"); -define('SPONSOR_SUBJECT_LOCKED', "HINWEIS: Sperrung Ihres Sponsorenaccounts!"); -define('SPONSOR_SUBJECT_UNLOCKED', "HINWEIS: Freigabe Ihres Sponsorenaccounts!"); -define('ADMIN_SPONSOR_EDIT_SUBJECT', "HINWEIS: Sponsorenaccount geändert durch Admin!"); -define('ADMIN_SPONSOR_DEL_SUBJECT', "HINWEIS: Sponsorenaccount geloescht durch Admin!"); -define('SPONSOR_PLEASE_CONFIRM_SUBJ', "HINWEIS: Bitte bestätigen Sie Ihren Account!"); -define('SPONSOR_ACCOUNT_PENDING_SUBJ', "HINWEIS: Ihr Account wartet auf Freischaltung!"); -define('ADMIN_NEW_SPONSOR', "Neue Anmeldung eines Sponsors"); -define('SPONSOR_ACTIVATION_LINK_SUBJ', "HINWEIS: Erneute Aussendung Ihres Bestätigunglinkes!"); -define('SPONSOR_LOST_PASSWORD_SUBJ', "HINWEIS: Ihr neues Passwort"); -define('SPONSOR_ACC_DATA_SUBJ', "HINWEIS: Änderung Ihrer Daten"); -define('SPONSOR_ACC_EMAIL_SUBJ', "HINWEIS: Bitte neue EMail-Adresse bestätigen!"); -define('ADMIN_SPONSOR_ACC_EMAIL_SUBJ', "Sponsor hat seine EMail-Adresse geändert!"); -define('ADMIN_SPONSOR_ACC_DATA_SUBJ', "Sponsor hat seine Daten geändert!"); -define('ADMIN_SPONSOR_SETTINGS_SUBJ', "Sponsor hat seine Einstellungen geändert!"); -define('SPONSOR_SETTINGS_SUBJ', "HINWEIS: Änderung Ihrer Einstellungen"); + 'SPONSOR_UNLOCKED_SUBJ' => "HINWEIS: Freischaltung Ihres Sponsorenaccounts", + 'ADMIN_SPONSOR_ADD_POINTS_SUBJ' => "HINWEIS: Gutschrift durch den Admin!", + 'ADMIN_SPONSOR_SUB_POINTS_SUBJ' => "HINWEIS: Abzug durch den Admin!", + 'SPONSOR_SUBJECT_LOCKED' => "HINWEIS: Sperrung Ihres Sponsorenaccounts!", + 'SPONSOR_SUBJECT_UNLOCKED' => "HINWEIS: Freigabe Ihres Sponsorenaccounts!", + 'ADMIN_SPONSOR_EDIT_SUBJECT' => "HINWEIS: Sponsorenaccount geändert durch Admin!", + 'ADMIN_SPONSOR_DEL_SUBJECT' => "HINWEIS: Sponsorenaccount geloescht durch Admin!", + 'SPONSOR_PLEASE_CONFIRM_SUBJ' => "HINWEIS: Bitte bestätigen Sie Ihren Account!", + 'SPONSOR_ACCOUNT_PENDING_SUBJ' => "HINWEIS: Ihr Account wartet auf Freischaltung!", + 'ADMIN_NEW_SPONSOR' => "Neue Anmeldung eines Sponsors", + 'SPONSOR_ACTIVATION_LINK_SUBJ' => "HINWEIS: Erneute Aussendung Ihres Bestätigunglinkes!", + 'SPONSOR_LOST_PASSWORD_SUBJ' => "HINWEIS: Ihr neues Passwort", + 'SPONSOR_ACC_DATA_SUBJ' => "HINWEIS: Änderung Ihrer Daten", + 'SPONSOR_ACC_EMAIL_SUBJ' => "HINWEIS: Bitte neue EMail-Adresse bestätigen!", + 'ADMIN_SPONSOR_ACC_EMAIL_SUBJ' => "Sponsor hat seine EMail-Adresse geändert!", + 'ADMIN_SPONSOR_ACC_DATA_SUBJ' => "Sponsor hat seine Daten geändert!", + 'ADMIN_SPONSOR_SETTINGS_SUBJ' => "Sponsor hat seine Einstellungen geändert!", + 'SPONSOR_SETTINGS_SUBJ' => "HINWEIS: Änderung Ihrer Einstellungen", // Sponsor registration errors -define('SPONSOR_SURNAME_IS_EMPTY', "Sie haben keinen Vornamen eingegeben!"); -define('SPONSOR_FAMILY_IS_EMPTY', "Sie haben keinen Nachnamen eingegeben!"); -define('SPONSOR_STREET_NR1_IS_EMPTY', "Sie haben keine Straße eingegeben!"); -define('SPONSOR_COUNTRY_IS_EMPTY', "Sie haben nicht den 2-stelligen Ländercode eingegeben!"); -define('SPONSOR_COUNTRY_IS_INVALID', "Der von Ihnen eingegebene 2-stellige Ländercode ist nicht korrekt!"); -define('SPONSOR_ZIP_IS_EMPTY', "Sie haben keine Postleitzahl eingegeben!"); -define('SPONSOR_CITY_IS_EMPTY', "Sie haben keinen Wohnort/Firmensitz eingegeben!"); -define('SPONSOR_PHONE_IS_EMPTY', "Sie haben keine Telefonnummer eingegeben!"); -define('SPONSOR_URL_IS_INVALID', "Die von Ihnen eingegebene Homepage-Adresse ist nicht korrekt!"); -define('SPONSOR_URL_IS_EMPTY', "Sie haben keine Homepage-URL eingegeben!"); -define('SPONSOR_EMAIL_IS_INVALID', "Die von Ihnen eingegebene EMail-Adresse ist nicht korrekt!"); -define('SPONSOR_PASSWORD1_EMPTY', "Sie haben kein Passwort eingegeben!"); -define('SPONSOR_PASSWORD2_EMPTY', "Sie haben keine Passwortbestätigung eingegeben!"); -define('SPONSOR_COMPANY_IS_EMPTY', "Sie haben keine Firmennamen eingegeben!"); -define('SPONSOR_POSITION_IS_EMPTY', "Sie haben keine Position eingegeben!"); -define('SPONSOR_TAX_IDENT_IS_EMPTY', "Sie haben keine Ust-Ident-Nr. eingegeben!"); -define('SPONSOR_REGISTER_SOMETHING_MISSING', "Die Sponsorenanmeldung konnte wegen der folgenden Punkte nicht durchgeführt werden"); -define('SPONSOR_PASSWORDS_MISMATCH', "Die beiden von Ihnen eingegebenen Passwörter stimmen nicht überein!"); -define('SPONSOR_TERMS_NOT_ACCEPTED', "Bitte akzeptieren Sie unsere [<strong><a href=\"{?URL?}/modules.php?module=index&what=sponsor_agb\" target=\"_blank\">AGBs</a></strong>] !"); -define('SPONSOR_NO_PAYTYPE_SELECTED', "Bitte wählen Sie noch ein Buchungspaket aus!"); -define('SPONSOR_NO_WARNING_INTERVAL_SELECTED', "Bitte wählen Sie noch den Zeitabstand zwischen zwei Sponsorenberichten aus!"); -define('SPONSOR_NO_RECEIVE_WARNINGS_SELECTED', "Bitte wählen Sie noch aus, ob Sie bei jeder Aktion Bestätigungsmails empfangen wollen oder nicht!"); -define('SPONSOR_EMAIL_IS_ALREADY_REGISTERED', "Die von Ihnen eingegebene Email-Adresse existiert bereits in unserer Datenbank!"); -define('SPONSOR_ALREADY_FOUND', "Ein Sponsor ist bereits mit der Email-Adresse <span class=\"data\">%s</span> bei uns angemeldet!"); -define('SPONSOR_REGISTRATION_FAILED', "Anmeldung ist fehlgeschlagen!"); -define('SPONSOR_REGISTRATION_COMPLETED', "Anmeldung war erfolgreich! Es ist eine Mail zu Ihnen unterwegs, die weitere Anweisungen enthält, um die Anmeldung abzuschliessen."); -define('SPONSOR_UNKNOWN_STATUS', "Bei der Anmeldung wurde ein unbekannter Rückgabewert <span class=\"data\">%s</span> erkannt. Bitte melden Sie dies dem Betreiber dieses {?MT_WORD2?}!<br />Vielen Dank."); -define('SPONSOR_EMAIL_404', "Bei der Anmeldung ist uns ein Fehler unterlaufen: Ihr Sponsor-Account mit der EMail-Adresse <span class=\"data\">%s</span> wurde nicht gefunden!"); -define('SPONSOR_ACCOUNT_NOT_FOUND', "Es wurde keine Sponsor-Account gefunden."); -define('SPONSOR_ACCOUNT_PENDING_FAILED', "Bei der Umschaltung Ihres Sponorenaccounts auf <em>Wartend</em> trat ein unerwarteter Fehler auf!"); -define('SPONSOR_ACCOUNT_404', "Sponsorenaccount <span class=\"data\">%s</span> nicht gefunden!"); -define('SPONSOR_ACCOUNT_FAILED', "Sponsorenaccount konnte nicht geladen werden: <span class=\"data\">%s</span>"); -define('SPONSOR_ACCOUNT_EMAIL_FAILED', "Konnten Sponsorenaccount nicht freigeben! Bitte benachrichtigen Sie den Support!"); + 'SPONSOR_SURNAME_IS_EMPTY' => "Sie haben keinen Vornamen eingegeben!", + 'SPONSOR_FAMILY_IS_EMPTY' => "Sie haben keinen Nachnamen eingegeben!", + 'SPONSOR_STREET_NR1_IS_EMPTY' => "Sie haben keine Straße eingegeben!", + 'SPONSOR_COUNTRY_IS_EMPTY' => "Sie haben nicht den 2-stelligen Ländercode eingegeben!", + 'SPONSOR_COUNTRY_IS_INVALID' => "Der von Ihnen eingegebene 2-stellige Ländercode ist nicht korrekt!", + 'SPONSOR_ZIP_IS_EMPTY' => "Sie haben keine Postleitzahl eingegeben!", + 'SPONSOR_CITY_IS_EMPTY' => "Sie haben keinen Wohnort/Firmensitz eingegeben!", + 'SPONSOR_PHONE_IS_EMPTY' => "Sie haben keine Telefonnummer eingegeben!", + 'SPONSOR_URL_IS_INVALID' => "Die von Ihnen eingegebene Homepage-Adresse ist nicht korrekt!", + 'SPONSOR_URL_IS_EMPTY' => "Sie haben keine Homepage-URL eingegeben!", + 'SPONSOR_EMAIL_IS_INVALID' => "Die von Ihnen eingegebene EMail-Adresse ist nicht korrekt!", + 'SPONSOR_PASSWORD1_EMPTY' => "Sie haben kein Passwort eingegeben!", + 'SPONSOR_PASSWORD2_EMPTY' => "Sie haben keine Passwortbestätigung eingegeben!", + 'SPONSOR_COMPANY_IS_EMPTY' => "Sie haben keine Firmennamen eingegeben!", + 'SPONSOR_POSITION_IS_EMPTY' => "Sie haben keine Position eingegeben!", + 'SPONSOR_TAX_IDENT_IS_EMPTY' => "Sie haben keine Ust-Ident-Nr. eingegeben!", + 'SPONSOR_REGISTER_SOMETHING_MISSING' => "Die Sponsorenanmeldung konnte wegen der folgenden Punkte nicht durchgeführt werden", + 'SPONSOR_PASSWORDS_MISMATCH' => "Die beiden von Ihnen eingegebenen Passwörter stimmen nicht überein!", + 'SPONSOR_TERMS_NOT_ACCEPTED' => "Bitte akzeptieren Sie unsere [<strong><a href=\"{?URL?}/modules.php?module=index&what=sponsor_agb\" target=\"_blank\">AGBs</a></strong>] !", + 'SPONSOR_NO_PAYTYPE_SELECTED' => "Bitte wählen Sie noch ein Buchungspaket aus!", + 'SPONSOR_NO_WARNING_INTERVAL_SELECTED' => "Bitte wählen Sie noch den Zeitabstand zwischen zwei Sponsorenberichten aus!", + 'SPONSOR_NO_RECEIVE_WARNINGS_SELECTED' => "Bitte wählen Sie noch aus, ob Sie bei jeder Aktion Bestätigungsmails empfangen wollen oder nicht!", + 'SPONSOR_EMAIL_IS_ALREADY_REGISTERED' => "Die von Ihnen eingegebene Email-Adresse existiert bereits in unserer Datenbank!", + 'SPONSOR_ALREADY_FOUND' => "Ein Sponsor ist bereits mit der Email-Adresse <span class=\"data\">%s</span> bei uns angemeldet!", + 'SPONSOR_REGISTRATION_FAILED' => "Anmeldung ist fehlgeschlagen!", + 'SPONSOR_REGISTRATION_COMPLETED' => "Anmeldung war erfolgreich! Es ist eine Mail zu Ihnen unterwegs, die weitere Anweisungen enthält, um die Anmeldung abzuschliessen.", + 'SPONSOR_UNKNOWN_STATUS' => "Bei der Anmeldung wurde ein unbekannter Rückgabewert <span class=\"data\">%s</span> erkannt. Bitte melden Sie dies dem Betreiber dieses {?mt_word2?}!<br />Vielen Dank.", + 'SPONSOR_EMAIL_404' => "Bei der Anmeldung ist uns ein Fehler unterlaufen: Ihr Sponsor-Account mit der EMail-Adresse <span class=\"data\">%s</span> wurde nicht gefunden!", + 'SPONSOR_ACCOUNT_PENDING_FAILED' => "Bei der Umschaltung Ihres Sponorenaccounts auf <em>Wartend</em> trat ein unerwarteter Fehler auf!", + 'SPONSOR_ACCOUNT_404' => "Sponsorenaccount <span class=\"data\">%s</span> nicht gefunden!", + 'SPONSOR_ACCOUNT_FAILED' => "Sponsorenaccount konnte nicht geladen werden: <span class=\"data\">%s</span>", + 'SPONSOR_ACCOUNT_EMAIL_FAILED' => "Konnten Sponsorenaccount nicht freigeben! Bitte benachrichtigen Sie den Support!", // Login form -define('SPONSOR_LOGIN_WELCOME', "Willkommen zum Sponsorenlogin"); -define('SPONSOR_ENTER_ID', "Sponsor-ID"); -define('SPONSOR_ENTER_PASSWORD', "Passwort"); -define('SPONSOR_PASSWORD_LOST', "Zugangsdaten zum Sponsorenbereich erneut anfordern"); -define('SPONSOR_ACTIVATION_LINK_LOST', "Bestätigungslink erneut anfordern"); -define('SPONSOR_SEND_ACTIVATION_LINK', "Bestätigungslink anfordern"); -define('SPONSOR_BACK_TO_LOGIN', "Zurück zum Login-Formular"); -define('SPONSOR_ACTIVATION_SUBMIT', "Link erneut anfordern"); -define('SPONSOR_HOWTO_GET_ACTIVATION_LINK', "Geben Sie oben Ihre EMail-Adresse ein, die Sie bei der Anmeldung als Sponsor eingegeben haben. Sollten Sie diese auch nicht mehr wissen, kontaktieren Sie uns bitte."); -define('SPONSOR_ACTIVATION_LINK_404', "Bestätigungscode nicht aussendbar: Wir konnten entweder Ihren Account nicht finden, oder Sie haben bereits Ihren Account bestätigt oder Sie wurden gesperrt."); -define('SPONSOR_ACTIVATION_LINK_SENT', "Es ist eine EMail mit Ihrem Bestätigungslink zu Ihnen unterwegs."); -define('SPONSOR_SEND_LOST_PASSWORD', "Verlorenes Passwort aussenden"); -define('SPONSOR_LOST_PASS_SUBMIT', "Passwort zusenden"); -define('SPONSOR_HOWTO_GET_LOST_PASSWORD', "Geben Sie oben Ihre EMail-Adresse und die dazu gehöhrige Sponsor-ID ein, die Sie bei der Anmeldung als Sponsor eingegeben haben. Sie erhalten dann umgehnst ein neues Passwort zugesandt. Das alte Passwort können wir Ihnen leider nicht zusenden. Sollten Sie diese Daten auch nicht mehr wissen, kontaktieren Sie uns bitte."); -define('SPONSOR_LOST_PASSWORD_SENT', "Es ist eine EMail zu Ihnen unterwegs, die Ihr neues Passwort enthält."); -define('SPONSOR_LOST_PASSWORD_404', "Neues Passwort nicht aussendbar: Wir konnten entweder Ihren Account nicht finden, oder Sie haben noch nicht Ihren Account bestätigt oder Sie wurden gesperrt."); -define('SPONSOR_LOGIN_FAILED_404_WRONG_PASS', "Sponsoren-Account existiert nicht oder falsches Passwort!"); -define('SPONSOR_LOGIN_FAILED_UNCONFIRMED', "Sie haben noch nicht Ihre Email-Adresse bestätigt!"); -define('SPONSOR_LOGIN_FAILED_PENDING', "Ihr Account wartet noch auf Freischaltung durch den Administrator!"); -define('SPONSOR_LOGIN_FAILED_LOCKED', "Ihr Account wurde gesperrt, vermutlich wegen Nichteinhaltung von Regeln!"); -define('SPONSOR_LOGIN_FAILED_EMAIL', "Sie haben Ihre Email-Adresse geändert und diese noch nicht bestätigt!"); -define('SPONSPOR_COOKIE_SETUP_FAILED', "Es konnten keine Cookies gesetzt werden. Bitte Sicherheitseinstellungen in Ihrem Browser überprüfen!"); -define('SPONSOR_ONLY_AREA_ENTERED', "Sie haben einen Bereich aufgerufen, der nur den Sponsoren vorenthalten ist, die auch bezahlt haben. Bitte kehren Sie zur [ <strong><a href=\"{?URL?}/index.php\">Eingangsseite</a></strong> ] zurück!"); -define('SPONSOR_ACCOUNT_STATUS_FAILED', "Unerwarteter Zustand des Scriptes erreicht! Bitte Support benachrichtigen!"); -define('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN', "Ihr Sponsorenaccount ist wieder freigegeben! Sie können sich nun erneut einloggen!"); + 'SPONSOR_LOGIN_WELCOME' => "Willkommen zum Sponsorenlogin", + 'SPONSOR_ENTER_ID' => "Sponsor-ID", + 'SPONSOR_ENTER_PASSWORD' => "Passwort", + 'SPONSOR_PASSWORD_LOST' => "Zugangsdaten zum Sponsorenbereich erneut anfordern", + 'SPONSOR_ACTIVATION_LINK_LOST' => "Bestätigungslink erneut anfordern", + 'SPONSOR_SEND_ACTIVATION_LINK' => "Bestätigungslink anfordern", + 'SPONSOR_BACK_TO_LOGIN' => "Zurück zum Login-Formular", + 'SPONSOR_ACTIVATION_SUBMIT' => "Link erneut anfordern", + 'SPONSOR_HOWTO_GET_ACTIVATION_LINK' => "Geben Sie oben Ihre EMail-Adresse ein, die Sie bei der Anmeldung als Sponsor eingegeben haben. Sollten Sie diese auch nicht mehr wissen, kontaktieren Sie uns bitte.", + 'SPONSOR_ACTIVATION_LINK_404' => "Bestätigungscode nicht aussendbar: Wir konnten entweder Ihren Account nicht finden, oder Sie haben bereits Ihren Account bestätigt oder Sie wurden gesperrt.", + 'SPONSOR_ACTIVATION_LINK_SENT' => "Es ist eine EMail mit Ihrem Bestätigungslink zu Ihnen unterwegs.", + 'SPONSOR_SEND_LOST_PASSWORD' => "Verlorenes Passwort aussenden", + 'SPONSOR_LOST_PASS_SUBMIT' => "Passwort zusenden", + 'SPONSOR_HOWTO_GET_LOST_PASSWORD' => "Geben Sie oben Ihre EMail-Adresse und die dazu gehöhrige Sponsor-ID ein, die Sie bei der Anmeldung als Sponsor eingegeben haben. Sie erhalten dann umgehnst ein neues Passwort zugesandt. Das alte Passwort können wir Ihnen leider nicht zusenden. Sollten Sie diese Daten auch nicht mehr wissen, kontaktieren Sie uns bitte.", + 'SPONSOR_LOST_PASSWORD_SENT' => "Es ist eine EMail zu Ihnen unterwegs, die Ihr neues Passwort enthält.", + 'SPONSOR_LOST_PASSWORD_404' => "Neues Passwort nicht aussendbar: Wir konnten entweder Ihren Account nicht finden, oder Sie haben noch nicht Ihren Account bestätigt oder Sie wurden gesperrt.", + 'SPONSOR_LOGIN_FAILED_404_WRONG_PASS' => "Sponsoren-Account existiert nicht oder falsches Passwort!", + 'SPONSOR_LOGIN_FAILED_UNCONFIRMED' => "Sie haben noch nicht Ihre Email-Adresse bestätigt!", + 'SPONSOR_LOGIN_FAILED_PENDING' => "Ihr Account wartet noch auf Freischaltung durch den Administrator!", + 'SPONSOR_LOGIN_FAILED_LOCKED' => "Ihr Account wurde gesperrt, vermutlich wegen Nichteinhaltung von Regeln!", + 'SPONSOR_LOGIN_FAILED_EMAIL' => "Sie haben Ihre Email-Adresse geändert und diese noch nicht bestätigt!", + 'SPONSPOR_COOKIE_SETUP_FAILED' => "Es konnten keine Cookies gesetzt werden. Bitte Sicherheitseinstellungen in Ihrem Browser überprüfen!", + 'SPONSOR_ONLY_AREA_ENTERED' => "Sie haben einen Bereich aufgerufen, der nur den Sponsoren vorenthalten ist, die auch bezahlt haben. Bitte kehren Sie zur [ <strong><a href=\"{?URL?}/index.php\">Eingangsseite</a></strong> ] zurück!", + 'SPONSOR_ACCOUNT_STATUS_FAILED' => "Unerwarteter Zustand des Scriptes erreicht! Bitte Support benachrichtigen!", + 'SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN' => "Ihr Sponsorenaccount ist wieder freigegeben! Sie können sich nun erneut einloggen!", // Sponsor area -define('SPONSOR_NO_MAIN_MENUS_ACTIVE', "Keine Hauptmenüs aktiviert!"); -define('SPONSOR_NO_SUB_MENUS_ACTIVE', "Keine Untermenüs aktiviert!"); -define('SPONSOR_CONTENT_404', "Konnte das Sponsor-Modul <span class=\"data\">%s</span> auf dem Server nicht finden!"); -define('SPONSOR_WELCOME_TO', "Willkommen zum Sponsorenbereich!"); -define('SPONSOR_PASSWORD_NOTE', "Wollen Sie nur Ihre Daten, aber nicht das Passwort ändern, geben Sie Ihr aktuelles Passwort unter "{--SPONSOR_ENTER_OLD_PASSWORD--}" ein. Wollen Sie Ihr Passwort ändern, geben Sie Ihr derzeiges und zweimal das neue Passwort ein."); -define('SPONSOR_POINTS_OVERVIEW', "Ihre {?POINTS?}-Übersicht"); -define('SPONSOR_POINTS_TOTAL', "Gesamtanzahl {?POINTS?}"); -define('SPONSOR_FILL_UP_POINTS', "Jetzt {?POINTS?}-Guthaben auffüllen..."); -define('SPONSOR_ENTER_OLD_PASSWORD', "Geben Sie Ihr derzeitiges Passwort ein"); -define('SPONSOR_CHANGE_PASSWORD', "Neues Passwort einstellen"); -define('SPONSOR_ACCOUNT_DATA_SAVED', "Ihre Daten wurden gespeichert."); -define('SPONSOR_ACCOUNT_EMAIL_CHANGED', "Sie haben Ihre EMail-Adresse geändert, Account wurde temporär gesperrt. Bitte [<a href=\"{?URL?}/index.php\">hier klicken</a>], um in den Gastbereich zu gelangen."); -define('SPONSOR_SETTINGS_HEADER', "Einstellungen Ihres Sponsorenaccounts"); -define('SPONSOR_UNKNOWN_WHAT', "Scripte-Fehler: Unbekannte Sponsor-Aktion <span class=\"data\">%s</span> erkannt!"); -define('SPONSOR_SETTINGS_SAVED', "Neue Einstellungen gespeichert."); + 'SPONSOR_NO_MAIN_MENUS_ACTIVE' => "Keine Hauptmenüs aktiviert!", + 'SPONSOR_NO_SUB_MENUS_ACTIVE' => "Keine Untermenüs aktiviert!", + 'SPONSOR_CONTENT_404' => "Konnte das Sponsor-Modul <span class=\"data\">%s</span> auf dem Server nicht finden!", + 'SPONSOR_WELCOME_TO' => "Willkommen zum Sponsorenbereich!", + 'SPONSOR_PASSWORD_NOTE' => "Wollen Sie nur Ihre Daten, aber nicht das Passwort ändern, geben Sie Ihr aktuelles Passwort unter "{--SPONSOR_ENTER_OLD_PASSWORD--}" ein. Wollen Sie Ihr Passwort ändern, geben Sie Ihr derzeiges und zweimal das neue Passwort ein.", + 'SPONSOR_POINTS_OVERVIEW' => "Ihre {?POINTS?}-Übersicht", + 'SPONSOR_POINTS_TOTAL' => "Gesamtanzahl {?POINTS?}", + 'SPONSOR_FILL_UP_POINTS' => "Jetzt {?POINTS?}-Guthaben auffüllen...", + 'SPONSOR_ENTER_OLD_PASSWORD' => "Geben Sie Ihr derzeitiges Passwort ein", + 'SPONSOR_CHANGE_PASSWORD' => "Neues Passwort einstellen", + 'SPONSOR_ACCOUNT_DATA_SAVED' => "Ihre Daten wurden gespeichert.", + 'SPONSOR_ACCOUNT_EMAIL_CHANGED' => "Sie haben Ihre EMail-Adresse geändert, Account wurde temporär gesperrt. Bitte [<a href=\"{?URL?}/index.php\">hier klicken</a>], um in den Gastbereich zu gelangen.", + 'SPONSOR_SETTINGS_HEADER' => "Einstellungen Ihres Sponsorenaccounts", + 'SPONSOR_UNKNOWN_WHAT' => "Scripte-Fehler: Unbekannte Sponsor-Aktion <span class=\"data\">%s</span> erkannt!", + 'SPONSOR_SETTINGS_SAVED' => "Neue Einstellungen gespeichert.", // Error messages -define('SPONSOR_NO_MESSAGE_GENERATED', "Fehler bei der Verarbeitung: Keine Nachricht generiert!"); -define('SPONSOR_NO_CURRENT_PASSWORD_ENTERED', "Sie haben Ihr derzeit gespeichertes Passwort nicht eingegeben!"); -define('SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB', "Das von Ihnen und das in der Datenbank hinterlegte Passwort stimmen nicht überein!"); -define('SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH', "Die von Ihnen eingegebenen neuen Passwörter stimmen nicht überein!"); -define('SPONSOR_PASSWORD_ONE_EMPTY', "Erstes einzugebenes Passwort ist leer!"); -define('SPONSOR_PASSWORD_TWO_EMPTY', "Zweites einzugebenes Passwort ist leer!"); -define('SPONSOR_PASSWORD_TOO_SHORT', "Eingegebenes Passwort entspricht nicht der Mindestlänge von <span class=\"data\">%s</span> Zeichen!"); -define('SPONSOR_ACCOUNT_DATA_NOT_SAVED', "Ihre Daten wurden <u>nicht</u> gespeichert!"); + 'SPONSOR_NO_MESSAGE_GENERATED' => "Fehler bei der Verarbeitung: Keine Nachricht generiert!", + 'SPONSOR_NO_CURRENT_PASSWORD_ENTERED' => "Sie haben Ihr derzeit gespeichertes Passwort nicht eingegeben!", + 'SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB' => "Das von Ihnen und das in der Datenbank hinterlegte Passwort stimmen nicht überein!", + 'SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH' => "Die von Ihnen eingegebenen neuen Passwörter stimmen nicht überein!", + 'SPONSOR_PASSWORD_ONE_EMPTY' => "Erstes einzugebenes Passwort ist leer!", + 'SPONSOR_PASSWORD_TWO_EMPTY' => "Zweites einzugebenes Passwort ist leer!", + 'SPONSOR_PASSWORD_TOO_SHORT' => "Eingegebenes Passwort entspricht nicht der Mindestlänge von <span class=\"data\">%s</span> Zeichen!", + 'SPONSOR_ACCOUNT_DATA_NOT_SAVED' => "Ihre Daten wurden <u>nicht</u> gespeichert!", +)); -// +// [EOF] ?> diff --git a/inc/language/support_de.php b/inc/language/support_de.php index 8fd0c8bdcd..ad4908308c 100644 --- a/inc/language/support_de.php +++ b/inc/language/support_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language constans -define('SUPPORT_SUBJ_ADMIN_ORDER', "[Support:] Mailbuchung"); -define('SUPPORT_SUBJ_ADMIN_REFLINK', "[Support:] Referal-Link"); -define('SUPPORT_SUBJ_ADMIN_UNCONFIRMED', "[Support:] Unbestaetigte Mails"); -define('SUPPORT_SUBJ_MEMBER_ORDER', "Ihr Anfrage an den Support: Mailbuchung"); -define('SUPPORT_SUBJ_MEMBER_REFLINK', "Ihr Anfrage an den Support: Referal-Link"); -define('SUPPORT_SUBJ_MEMBER_UNCONFIRMED', "Ihr Anfrage an den Support: Unbestaetigte Mails"); -define('ADMIN_TASK_IS_SUPPORT_MEMBER', "Mitglieder-Support"); -define('ADMIN_UNKNOWN_SUPPORT_MODE', "Unbekannter Support-Modus <span class=\"data\">%s</span> erkannt!"); -define('ADMIN_TASK_SUPPORT_MODE', "Support-Art"); +addMessages(array( + 'SUPPORT_SUBJ_ADMIN_ORDER' => "[Support:] Mailbuchung", + 'SUPPORT_SUBJ_ADMIN_REFLINK' => "[Support:] Referal-Link", + 'SUPPORT_SUBJ_ADMIN_UNCONFIRMED' => "[Support:] Unbestätigte Mails", + 'SUPPORT_SUBJ_MEMBER_ORDER' => "Ihr Anfrage an den Support: Mailbuchung", + 'SUPPORT_SUBJ_MEMBER_REFLINK' => "Ihr Anfrage an den Support: Referal-Link", + 'SUPPORT_SUBJ_MEMBER_UNCONFIRMED' => "Ihr Anfrage an den Support: Unbestätigte Mails", + 'ADMIN_TASK_IS_SUPPORT_MEMBER' => "Mitglieder-Support", + 'ADMIN_UNKNOWN_SUPPORT_MODE' => "Unbekannter Support-Modus <span class=\"data\">%s</span> erkannt!", + 'ADMIN_TASK_SUPPORT_MODE' => "Support-Art", +)); -// +// [EOF] ?> diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index e6b081bc80..b4bf170a40 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,217 +38,218 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Configuration strings in admin area -define('ADMIN_CONFIG_SURFBAR_TITLE', "Konfiguration der Surfbar"); -define('ADMIN_CONFIG_SURFBAR_STATIC_REWARD', "Statische Vergütung:"); -define('ADMIN_CONFIG_SURFBAR_STATIC_COSTS', "Statische Kosten:"); -define('ADMIN_CONFIG_SURFBAR_STATIC_TIME', "Statische Verweildauer bis nächste Seite geladen wird in Sekunden:"); -define('ADMIN_CONFIG_SURFBAR_STATIC_LOCK', "Statische Reload-Sperre:"); -define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL', "Vergütungsmodel auswählen:"); -define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC', "Statische Werte verwenden."); -define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC', "Dynamische Werte errechnen."); -define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung/ Verweildauer/Reload-Sperre:"); -define('ADMIN_CONFIG_SURFBAR_MAX_ORDER', "Maximal durch Mitglied in Surfbar buchbare URLs:"); -define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind: "); -define('ADMIN_CONFIG_SURFBAR_AUTOSTART', "Surfbar soll nach Ruhezeit automatisch starten?"); -define('ADMIN_CONFIG_SURFBAR_STATS_RELOAD', "Reload-Zeit der Statistik unterhalb der beworbenen Seite:"); -define('ADMIN_CONFIG_SURFBAR_PURGE_DELETED', "Verweildauer gelöschter URLs in der Datenbank:"); -define('ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED', "Verweildauer migrierter URLs in der Datenbank:"); -define('ADMIN_CONFIG_SURFBAR_NOTE', "<strong>Hinweise:</strong> Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen. Migrierte URLs sind aus Mailbuchungen übernommene URLs, die das Mitglied noch bestätigen muss. Werden URLs aus freigeschalteten Mailbuchungen in die Surfbar "migriert" so muss erst das Mitglied der Aufnahme zustimmen. Tut es dies nicht, wird die URL wieder aus der Surfbar entfernt. Eine sofortige Freischaltung ist nicht möglich."); -define('ADMIN_CONFIG_SURFBAR_PAUSE_MODE', "Auf welche Seite soll umgeleitet werden, wenn der User alle gebuchten URLs besucht hat? (Wenn sie also im Reload-Lock sind)"); -define('ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', "Auf interne Pausenseite umleiten."); -define('ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', "Auf externe Seite umleiten.<br /><span class=\"admin_note\">(Bitte angeben)</span>"); -define('ADMIN_CONFIG_SURFBAR_PAUSE_URL', "Externe Pausenseite: (leer lassen, wenn auf interne umgeleitet werden soll)"); -define('ADMIN_CONFIG_SURFBAR_NOTIFY_LIMITS', "Soll das Mitglied per Mail benachrichtigt werden, wenn aufrufbegrenzte URLs abgelaufen und auf "pausierend" gesetzt sind? (<strong>Derzeit nicht verwendet!</strong>)"); -define('ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK', "Soll der Administrator auch bei durch ihn freigegebene URLs benachrichtigt werden?"); -define('ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS', "Mitglied warnen, wenn {?POINTS?}-Guthaben unterschritten ist: (0=keine Warnung aussenden)"); -define('ADMIN_CONFIG_SURFBAR_MIGRATE_ORDER', "Sollen URLs aus Mailfreischaltungen in die Surfbar migriert werden? (Diese sind nicht sofort freigegeben)"); -define('ADMIN_CONFIG_SURFBAR_LOW_INTERVAL', "Wiederholungsinterval für Nachrichten wegen niedrigem {?POINTS?}-Guthaben:"); -define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE', "Benachrichtigungen sofort oder beim täglichen Reset aussenden? ("Sofort" kann zu Verzögerungen und/oder Belastung des Servers führen!"); -define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "Sofort aussenden"); -define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET', "Beim täglichen Reset"); -define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM', "Soll bei Aufruf der Surfbar durch einen Gast ein Loginformular angezeigt oder zur Startseite weitergeleitet werden?"); -define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', "Loginformular angzeigen."); -define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', "Zur Startseite weiterleiten."); +addMessages(array( + 'ADMIN_CONFIG_SURFBAR_TITLE' => "Konfiguration der Surfbar", + 'ADMIN_CONFIG_SURFBAR_STATIC_REWARD' => "Statische Vergütung:", + 'ADMIN_CONFIG_SURFBAR_STATIC_COSTS' => "Statische Kosten:", + 'ADMIN_CONFIG_SURFBAR_STATIC_TIME' => "Statische Verweildauer bis nächste Seite geladen wird in Sekunden:", + 'ADMIN_CONFIG_SURFBAR_STATIC_LOCK' => "Statische Reload-Sperre:", + 'ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL' => "Vergütungsmodel auswählen:", + 'ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC' => "Statische Werte verwenden.", + 'ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC' => "Dynamische Werte errechnen.", + 'ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT' => "Prozent auf dynamische Vergütung/ Verweildauer/Reload-Sperre:", + 'ADMIN_CONFIG_SURFBAR_MAX_ORDER' => "Maximal durch Mitglied in Surfbar buchbare URLs:", + 'ADMIN_CONFIG_SURFBAR_RESTART_TIME' => "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind: ", + 'ADMIN_CONFIG_SURFBAR_AUTOSTART' => "Surfbar soll nach Ruhezeit automatisch starten?", + 'ADMIN_CONFIG_SURFBAR_STATS_RELOAD' => "Reload-Zeit der Statistik unterhalb der beworbenen Seite:", + 'ADMIN_CONFIG_SURFBAR_PURGE_DELETED' => "Verweildauer gelöschter URLs in der Datenbank:", + 'ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED' => "Verweildauer migrierter URLs in der Datenbank:", + 'ADMIN_CONFIG_SURFBAR_NOTE' => "<strong>Hinweise:</strong> Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen. Migrierte URLs sind aus Mailbuchungen übernommene URLs, die das Mitglied noch bestätigen muss. Werden URLs aus freigeschalteten Mailbuchungen in die Surfbar "migriert" so muss erst das Mitglied der Aufnahme zustimmen. Tut es dies nicht, wird die URL wieder aus der Surfbar entfernt. Eine sofortige Freischaltung ist nicht möglich.", + 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE' => "Auf welche Seite soll umgeleitet werden, wenn der User alle gebuchten URLs besucht hat? (Wenn sie also im Reload-Lock sind)", + 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL' => "Auf interne Pausenseite umleiten.", + 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL' => "Auf externe Seite umleiten.<br /><span class=\"admin_note\">(Bitte angeben)</span>", + 'ADMIN_CONFIG_SURFBAR_PAUSE_URL' => "Externe Pausenseite: (leer lassen, wenn auf interne umgeleitet werden soll)", + 'ADMIN_CONFIG_SURFBAR_NOTIFY_LIMITS' => "Soll das Mitglied per Mail benachrichtigt werden, wenn aufrufbegrenzte URLs abgelaufen und auf "pausierend" gesetzt sind? (<strong>Derzeit nicht verwendet!</strong>)", + 'ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK' => "Soll der Administrator auch bei durch ihn freigegebene URLs benachrichtigt werden?", + 'ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS' => "Mitglied warnen, wenn {?POINTS?}-Guthaben unterschritten ist: (0=keine Warnung aussenden)", + 'ADMIN_CONFIG_SURFBAR_MIGRATE_ORDER' => "Sollen URLs aus Mailfreischaltungen in die Surfbar migriert werden? (Diese sind nicht sofort freigegeben)", + 'ADMIN_CONFIG_SURFBAR_LOW_INTERVAL' => "Wiederholungsinterval für Nachrichten wegen niedrigem {?POINTS?}-Guthaben:", + 'ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE' => "Benachrichtigungen sofort oder beim täglichen Reset aussenden? ("Sofort" kann zu Verzögerungen und/oder Belastung des Servers führen!", + 'ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT' => "Sofort aussenden", + 'ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' => "Beim täglichen Reset", + 'ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM' => "Soll bei Aufruf der Surfbar durch einen Gast ein Loginformular angezeigt oder zur Startseite weitergeleitet werden?", + 'ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y' => "Loginformular angzeigen.", + 'ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N' => "Zur Startseite weiterleiten.", // Admin non-config titles -define('ADMIN_SURFBAR_STATS_TITLE', "Mitglieder-Statistik der Surfbar"); -define('ADMIN_SURFBAR_URL_STATS_TITLE', "URL-bezogene Statistik der Surfbar"); -define('ADMIN_LIST_SURFBAR_ACTIONS_TITLE', "Mitglieder-Aktionen der Surfbar auflisten"); + 'ADMIN_SURFBAR_STATS_TITLE' => "Mitglieder-Statistik der Surfbar", + 'ADMIN_SURFBAR_URL_STATS_TITLE' => "URL-bezogene Statistik der Surfbar", + 'ADMIN_LIST_SURFBAR_ACTIONS_TITLE' => "Mitglieder-Aktionen der Surfbar auflisten", // General admin text -define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu."); -define('ADMIN_SURFBAR_ADD_NEW_REFDEPTH', "Neue Referal-Ebene zur Surfbar hinzufügen"); -define('ADMIN_SURFBAR_NO_URLS_FOUND', "Es konnten keine URLs in der Surfbar gefunden werden."); -define('ADMIN_SURFBAR_REWARD', "Vergütung"); -define('ADMIN_SURFBAR_COSTS', "Kosten"); -define('ADMIN_SURFBAR_PAYMENT', "Payment"); -define('ADMIN_SURFBAR_VIEWS_TOTAL', "Gesamtaufrufe"); -define('ADMIN_SURFBAR_STATUS', "URL-Status"); -define('ADMIN_SURFBAR_REGISTERED', "URL aufgenommen"); -define('ADMIN_SURFBAR_LAST_LOCKED', "Zuletzt gesperrt"); -define('ADMIN_SURFBAR_LOCK_REASON', "Sperrgrund"); -define('ADMIN_SURFBAR_EDIT_URL', "URLs ändern"); -define('ADMIN_SURFBAR_EDIT_URL_NOW', "URLs jetzt ändern"); -define('ADMIN_SURFBAR_DEL_URL', "URLs löschen"); -define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen"); -define('ADMIN_SURFBAR_UNDELETE_URL', "Löschung zurücknehmen"); -define('ADMIN_SURFBAR_UNDELETE_URL_NOW', "URLs jetzt wiederherstellen"); -define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren"); -define('ADMIN_SURFBAR_LOCK_URL_NOW', "URL jetzt ent-/sperren"); -define('ADMIN_SURFBAR_CONFIRM_URL', "URL(s) freigeben"); -define('ADMIN_SURFBAR_REJECT_URL', "URL(s) ablehnen"); -define('ADMIN_SURFBAR_UNLOCK_DONE', "Freischaltung ausgewählter URL(s) vollständig. :-)"); -define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachschauen, welche URLs nicht freigegeben wurden."); -define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugefügt."); -define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?"); -define('ADMIN_SURFBAR_ADD_URL', "URL hinzufügen"); -define('ADMIN_SURFBAR_NO_STATS', "Keine Surfbar-Statistiken vorhanden!"); -define('ADMIN_SURFBAR_VISITED_URLS', "Aufgerufene URLs"); -define('ADMIN_SURFBAR_TOTAL_VISITS', "Gesamtbesuche"); -define('ADMIN_SURFBAR_TOTALS', "Zusammenfassung"); -define('ADMIN_SURFBAR_LAST_ONLINE', "Letzter Aufruf der URL"); -define('ADMIN_SURFBAR_NO_URL_STATS', "Keine URL-bezogene Statistik gefunden"); -define('ADMIN_SURFBAR_NO_ACTIONS', "Keine Mitgliederaktionen gefunden. Bitte installieren Sie die Surfbar neu."); -define('ADMIN_SURFBAR_MEMBER_ACTION', "Mitgliedaktion"); -define('ADMIN_SURFBAR_CURRENT_STATUS', "Aktueller Status"); -define('ADMIN_SURFBAR_NEW_STATUS', "Neuer Status"); -define('ADMIN_SURFBAR_EDIT_ACTIONS', "Mitgliedsaktionen editieren"); -define('ADMIN_LIST_SURFBAR_ACTIONS_NOTE', "<strong>Hinweise:</strong> Sie sollten zur Sicherheit Ihres {?MT_WORD2?} den neuen Status nie auf <u>{--SURFBAR_URL_STATUS_ACTIVE--}</u> z.B. bei der Mitgliedaktion <u>{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}</u> einstellen."); -define('ADMIN_SURFBAR_URL', "Gebuchte URL"); + 'ADMIN_SURFBAR_NO_REF_LEVELS_FOUND' => "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu.", + 'ADMIN_SURFBAR_ADD_NEW_REFDEPTH' => "Neue Referal-Ebene zur Surfbar hinzufügen", + 'ADMIN_SURFBAR_NO_URLS_FOUND' => "Es konnten keine URLs in der Surfbar gefunden werden.", + 'ADMIN_SURFBAR_REWARD' => "Vergütung", + 'ADMIN_SURFBAR_COSTS' => "Kosten", + 'ADMIN_SURFBAR_PAYMENT' => "Payment", + 'ADMIN_SURFBAR_VIEWS_TOTAL' => "Gesamtaufrufe", + 'ADMIN_SURFBAR_STATUS' => "URL-Status", + 'ADMIN_SURFBAR_REGISTERED' => "URL aufgenommen", + 'ADMIN_SURFBAR_LAST_LOCKED' => "Zuletzt gesperrt", + 'ADMIN_SURFBAR_LOCK_REASON' => "Sperrgrund", + 'ADMIN_SURFBAR_EDIT_URL' => "URLs ändern", + 'ADMIN_SURFBAR_EDIT_URL_NOW' => "URLs jetzt ändern", + 'ADMIN_SURFBAR_DEL_URL' => "URLs löschen", + 'ADMIN_SURFBAR_DEL_URL_NOW' => "URLs jetzt entfernen", + 'ADMIN_SURFBAR_UNDELETE_URL' => "Löschung zurücknehmen", + 'ADMIN_SURFBAR_UNDELETE_URL_NOW' => "URLs jetzt wiederherstellen", + 'ADMIN_SURFBAR_UNLOCK_URL' => "URL ent-/sperren", + 'ADMIN_SURFBAR_LOCK_URL_NOW' => "URL jetzt ent-/sperren", + 'ADMIN_SURFBAR_CONFIRM_URL' => "URL(s) freigeben", + 'ADMIN_SURFBAR_REJECT_URL' => "URL(s) ablehnen", + 'ADMIN_SURFBAR_UNLOCK_DONE' => "Freischaltung ausgewählter URL(s) vollständig. :-)", + 'ADMIN_SURFBAR_UNLOCK_FAILED' => "Freischaltung fehlgeschlagen. Bitte nachschauen, welche URLs nicht freigegeben wurden.", + 'ADMIN_SURFBAR_URL_ADDED' => "URL wurde der Surfbar hinzugefügt.", + 'ADMIN_SURFBAR_URL_NOT_ADDED' => "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?", + 'ADMIN_SURFBAR_ADD_URL' => "URL hinzufügen", + 'ADMIN_SURFBAR_NO_STATS' => "Keine Surfbar-Statistiken vorhanden!", + 'ADMIN_SURFBAR_VISITED_URLS' => "Aufgerufene URLs", + 'ADMIN_SURFBAR_TOTAL_VISITS' => "Gesamtbesuche", + 'ADMIN_SURFBAR_TOTALS' => "Zusammenfassung", + 'ADMIN_SURFBAR_LAST_ONLINE' => "Letzter Aufruf der URL", + 'ADMIN_SURFBAR_NO_URL_STATS' => "Keine URL-bezogene Statistik gefunden", + 'ADMIN_SURFBAR_NO_ACTIONS' => "Keine Mitgliederaktionen gefunden. Bitte installieren Sie die Surfbar neu.", + 'ADMIN_SURFBAR_MEMBER_ACTION' => "Mitgliedaktion", + 'ADMIN_SURFBAR_CURRENT_STATUS' => "Aktueller Status", + 'ADMIN_SURFBAR_NEW_STATUS' => "Neuer Status", + 'ADMIN_SURFBAR_EDIT_ACTIONS' => "Mitgliedsaktionen editieren", + 'ADMIN_LIST_SURFBAR_ACTIONS_NOTE' => "<strong>Hinweise:</strong> Sie sollten zur Sicherheit Ihres {?mt_word2?} den neuen Status nie auf <u>{--SURFBAR_URL_STATUS_ACTIVE--}</u> z.B. bei der Mitgliedaktion <u>{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}</u> einstellen.", + 'ADMIN_SURFBAR_URL' => "Gebuchte URL", // Admin titles -define('ADMIN_UNLOCK_SURFBAR_URLS_TITLE', "Surfbar - URLs freihschalten/ablehnen"); -define('ADMIN_SURFBAR_LIST_URLS_TITLE', "Surfbar - URLs aufisten"); -define('ADMIN_SURFBAR_DELETE_URLS_TITLE', "Surfbar - URLs entfernen"); -define('ADMIN_SURFBAR_EDIT_URLS_TITLE', "Surfbar - URLs editieren"); -define('ADMIN_SURFBAR_LOCK_URLS_TITLE', "Surfbar - URLs sperren/entsperren"); -define('ADMIN_SURFBAR_UNDELETE_URLS_TITLE', "Surfbar - gelöschte URLs wiederherstellen"); + 'ADMIN_UNLOCK_SURFBAR_URLS_TITLE' => "Surfbar - URLs freihschalten/ablehnen", + 'ADMIN_SURFBAR_LIST_URLS_TITLE' => "Surfbar - URLs aufisten", + 'ADMIN_SURFBAR_DELETE_URLS_TITLE' => "Surfbar - URLs entfernen", + 'ADMIN_SURFBAR_EDIT_URLS_TITLE' => "Surfbar - URLs editieren", + 'ADMIN_SURFBAR_LOCK_URLS_TITLE' => "Surfbar - URLs sperren/entsperren", + 'ADMIN_SURFBAR_UNDELETE_URLS_TITLE' => "Surfbar - gelöschte URLs wiederherstellen", // Member titles -define('MEMBER_SURFBAR_LIST_TITLE', "Ihre URLs in der Surfbar verwalten"); + 'MEMBER_SURFBAR_LIST_TITLE' => "Ihre URLs in der Surfbar verwalten", // General member text -define('MEMBER_SURFBAR_URL_ADDED', "URL hinzugefügt und wartet auf Freischaltung."); -define('MEMBER_SURFBAR_URL_NOT_ADDED', "URL konnte nicht hinzugefügt werden, da ein Fehler vorliegt."); -define('MEMBER_SURFBAR_ADD_URL', "URL in Surfbar buchen"); -define('MEMBER_SURFBAR_NO_MORE_ALLOWED', "Sie können leider nicht mehr URLs in der Surfbar buchen, da Sie das Maximum erreicht haben."); -define('MEMBER_SURFBAR_NO_URLS_FOUND', "Sie haben noch keine URLs für die Surfbar gebucht."); -define('MEMBER_SURFBAR_VIEWS_TOTAL', "Views"); -define('MEMBER_SURFBAR_STATUS', "Status"); -define('MEMBER_SURFBAR_REGISTERED', "Angemeldet"); -define('MEMBER_SURFBAR_LAST_LOCKED', "Letzte Sperre"); -define('MEMBER_SURFBAR_LOCK_REASON', "Sperrgrund"); -define('MEMBER_SURFBAR_ACTIONS', "Aktionen"); -define('MEMBER_SURFBAR_TEST_URL', "URL anzeigen"); -define('MEMBER_SURFBAR_LIST_NOTE', "<strong>Hinweise:</strong> Bitte beachten Sie, dass Editieren, erneutes Aktivieren von gestoppten URLs und nochmalige Anmeldung nach Ablehnung eine Freischaltung durch unsere Administratoren nötig ist. Migrierte URLs sind in der Surfbar nicht freigegeben und bedarfen einer Buchungsbestätigung ("Jetzt buchen" bitte dazu anklicken) Ihrerseits, da die Bewerbung Ihrer URL in der Surfbar zusätzliche {?POINTS?}-Kosten bedeuten. Die aktuellen Kosten entnehmen Sie bitte der Seite "Surfbar starten" oder "URL buchen" aus dem Surfbar-Mitgliedsmenü."); -define('MEMBER_SURFBAR_ACTION_DONE', "Ausgewählte Aktion ausgeführt."); -define('MEMBER_SURFBAR_ACTION_FAILED', "Ausgewählte Aktion konnte nicht vollständig ausgeführt werden!"); -define('MEMBER_SURFBAR_UNLIMITED_VIEWS', "Unbegrenzt"); + 'MEMBER_SURFBAR_URL_ADDED' => "URL hinzugefügt und wartet auf Freischaltung.", + 'MEMBER_SURFBAR_URL_NOT_ADDED' => "URL konnte nicht hinzugefügt werden, da ein Fehler vorliegt.", + 'MEMBER_SURFBAR_ADD_URL' => "URL in Surfbar buchen", + 'MEMBER_SURFBAR_NO_MORE_ALLOWED' => "Sie können leider nicht mehr URLs in der Surfbar buchen, da Sie das Maximum erreicht haben.", + 'MEMBER_SURFBAR_NO_URLS_FOUND' => "Sie haben noch keine URLs für die Surfbar gebucht.", + 'MEMBER_SURFBAR_VIEWS_TOTAL' => "Views", + 'MEMBER_SURFBAR_STATUS' => "Status", + 'MEMBER_SURFBAR_REGISTERED' => "Angemeldet", + 'MEMBER_SURFBAR_LAST_LOCKED' => "Letzte Sperre", + 'MEMBER_SURFBAR_LOCK_REASON' => "Sperrgrund", + 'MEMBER_SURFBAR_ACTIONS' => "Aktionen", + 'MEMBER_SURFBAR_TEST_URL' => "URL anzeigen", + 'MEMBER_SURFBAR_LIST_NOTE' => "<strong>Hinweise:</strong> Bitte beachten Sie, dass Editieren, erneutes Aktivieren von gestoppten URLs und nochmalige Anmeldung nach Ablehnung eine Freischaltung durch unsere Administratoren nötig ist. Migrierte URLs sind in der Surfbar nicht freigegeben und bedarfen einer Buchungsbestätigung ("Jetzt buchen" bitte dazu anklicken) Ihrerseits, da die Bewerbung Ihrer URL in der Surfbar zusätzliche {?POINTS?}-Kosten bedeuten. Die aktuellen Kosten entnehmen Sie bitte der Seite "Surfbar starten" oder "URL buchen" aus dem Surfbar-Mitgliedsmenü.", + 'MEMBER_SURFBAR_ACTION_DONE' => "Ausgewählte Aktion ausgeführt.", + 'MEMBER_SURFBAR_ACTION_FAILED' => "Ausgewählte Aktion konnte nicht vollständig ausgeführt werden!", + 'MEMBER_SURFBAR_UNLIMITED_VIEWS' => "Unbegrenzt", // Subject lines for admins -define('ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "[Surfbar:] URL hinzugefügt durch Admin"); -define('ADMIN_SURFBAR_NOTIFY_URL_REG_SUBJECT', "[Surfbar:] Mitgliedsbuchung einer URL"); -define('ADMIN_SURFBAR_NOTIFY_URL_MIGRATE_SUBJECT', "[Surfbar:] Migrierung einer Mailbuchung"); -define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "[Surfbar:] Freigabe einer URL"); -define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_DELETED_SUBJECT', "[Surfbar:] Mitglied hat freigegebene URL gelöscht"); -define('ADMIN_SURFBAR_NOTIFY_URL_LOCKED_DELETED_SUBJECT', "[Surfbar:] Mitglied hat gesperrte URL gelöscht"); -define('ADMIN_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT', "[Surfbar:] Mitglied hat wartende URL zurückgenommen"); -define('ADMIN_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT', "[Surfbar:] Mitglied hat angehaltene URL gelöscht"); -define('ADMIN_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "[Surfbar:] URL abgelehnt"); -define('ADMIN_SURFBAR_NOTIFY_URL_PENDING_SUBJECT', "[Surfbar:] URL-Buchung zugestimmt"); -define('ADMIN_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT', "[Surfbar:] URL automatisch angehalten"); -define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_PENDING_SUBJECT', "[Surfbar:] Mitglied hat freigegebene URL geändert"); -define('ADMIN_SURFBAR_NOTIFY_URL_LOCKED_PENDING_SUBJECT', "[Surfbar:] Mitglied hat gesperrte URL erneut gebucht"); -define('ADMIN_SURFBAR_NOTIFY_URL_STOPPED_CONTINUED_SUBJECT', "[Surfbar:] Mitglied hat gestoppte URL gestartet"); -define('ADMIN_SURFBAR_NOTIFY_URL_STOPPED_PENDING_SUBJECT', "[Surfbar:] Mitglied hat gestoppte URL geändert"); -define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_STOPPED_SUBJECT', "[Surfbar:] Mitglied hat freigegebene URL gestoppt"); -define('ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_DELETED_SUBJECT', "[Surfbar:] Mitglied hat migrierte URL gelöscht"); -define('ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_MIGRATED_SUBJECT', "[Surfbar:] Mitglied hat migrierte URL geändert"); -define('ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_PENDING_SUBJECT', "[Surfbar:] Mitglied hat migrierte URL gebucht"); -define('ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "Problem in Surfbar-Betreff"); + 'ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT' => "[Surfbar:] URL hinzugefügt durch Admin", + 'ADMIN_SURFBAR_NOTIFY_URL_REG_SUBJECT' => "[Surfbar:] Mitgliedsbuchung einer URL", + 'ADMIN_SURFBAR_NOTIFY_URL_MIGRATE_SUBJECT' => "[Surfbar:] Migrierung einer Mailbuchung", + 'ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT' => "[Surfbar:] Freigabe einer URL", + 'ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat freigegebene URL gelöscht", + 'ADMIN_SURFBAR_NOTIFY_URL_LOCKED_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat gesperrte URL gelöscht", + 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat wartende URL zurückgenommen", + 'ADMIN_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat angehaltene URL gelöscht", + 'ADMIN_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT' => "[Surfbar:] URL abgelehnt", + 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_SUBJECT' => "[Surfbar:] URL-Buchung zugestimmt", + 'ADMIN_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT' => "[Surfbar:] URL automatisch angehalten", + 'ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_PENDING_SUBJECT' => "[Surfbar:] Mitglied hat freigegebene URL geändert", + 'ADMIN_SURFBAR_NOTIFY_URL_LOCKED_PENDING_SUBJECT' => "[Surfbar:] Mitglied hat gesperrte URL erneut gebucht", + 'ADMIN_SURFBAR_NOTIFY_URL_STOPPED_CONTINUED_SUBJECT' => "[Surfbar:] Mitglied hat gestoppte URL gestartet", + 'ADMIN_SURFBAR_NOTIFY_URL_STOPPED_PENDING_SUBJECT' => "[Surfbar:] Mitglied hat gestoppte URL geändert", + 'ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_STOPPED_SUBJECT' => "[Surfbar:] Mitglied hat freigegebene URL gestoppt", + 'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL gelöscht", + 'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_MIGRATED_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL geändert", + 'ADMIN_SURFBAR_NOTIFY_URL_MIGRATED_PENDING_SUBJECT' => "[Surfbar:] Mitglied hat migrierte URL gebucht", + 'ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT' => "Problem in Surfbar-Betreff", // Auto-generated admin subject lines -define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL entfernt"); -define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL geändert"); -define('ADMIN_ACTIVE_SURFBAR_URLS_SUBJECT', "[Surfbar:] Freigabe einer URL"); -define('ADMIN_LOCKED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Sperrung einer URL"); + 'ADMIN_DEL_SURFBAR_URLS_SUBJECT' => "[Surfbar:] URL entfernt", + 'ADMIN_EDIT_SURFBAR_URLS_SUBJECT' => "[Surfbar:] URL geändert", + 'ADMIN_ACTIVE_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Freigabe einer URL", + 'ADMIN_LOCKED_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Sperrung einer URL", // Subject lines for members -define('MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "[Surfbar:] Ihre URL wurde aufgenommen"); -define('MEMBER_SURFBAR_NOTIFY_URL_REG_SUBJECT', "[Surfbar:] Ihre URL wartet auf Freischaltung"); -define('MEMBER_SURFBAR_NOTIFY_URL_MIGRATE_SUBJECT', "[Surfbar:] Ihre URL aus der Mailbuchung wurde migriert"); -define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "[Surfbar:] Ihre URL wurde freigegeben"); -define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_DELETED_SUBJECT', "[Surfbar:] Sie haben Ihre freigegebene URL gelöscht"); -define('MEMBER_SURFBAR_NOTIFY_URL_LOCKED_DELETED_SUBJECT', "[Surfbar:] Sie haben eine gesperrte URL gelöscht"); -define('MEMBER_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT', "[Surfbar:] Sie haben Ihre wartende URL zurückgenommen"); -define('MEMBER_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT', "[Surfbar:] Sie haben Ihre gestoppte URL gelöscht"); -define('MEMBER_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "[Surfbar:] Ihre URL wurde abgelehnt!"); -define('MEMBER_SURFBAR_NOTIFY_URL_PENDING_SUBJECT', "[Surfbar:] Zustimmung zur URL-Buchung erhalten"); -define('MEMBER_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT', "[Surfbar:] Ihre URL wurde automatisch angehalten"); -define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_PENDING_SUBJECT', "[Surfbar:] Sie haben Ihre freigegebene URL geändert"); -define('MEMBER_SURFBAR_NOTIFY_URL_LOCKED_PENDING_SUBJECT', "[Surfbar:] Sie haben eine gesperrte URL erneut gebucht"); -define('MEMBER_SURFBAR_NOTIFY_URL_STOPPED_CONTINUED_SUBJECT', "[Surfbar:] Sie haben Ihre gestoppte URL gestartet"); -define('MEMBER_SURFBAR_NOTIFY_URL_STOPPED_PENDING_SUBJECT', "[Surfbar:] Sie haben Ihre gestoppte URL geändert"); -define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_STOPPED_SUBJECT', "[Surfbar:] Sie haben Ihre freigegebene URL gestoppt"); -define('MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_DELETED_SUBJECT', "[Surfbar:] Sie haben eine migrierte URL gelöscht"); -define('MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_MIGRATED_SUBJECT', "[Surfbar:] Sie haben eine migrierte URL geändert"); -define('MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_PENDING_SUBJECT', "[Surfbar:] Sie haben eine migrierte URL gebucht"); -define('MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "[Fehler:] Bitte leiten Sie diese Mail an uns weiter!"); -define('MEMBER_SURFBAR_NOTIFY_LOW_POINTS_SUBJECT', "[Surfbar:] Ihr {?POINTS?}-Stand ist sehr niedrig!"); + 'MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT' => "[Surfbar:] Ihre URL wurde aufgenommen", + 'MEMBER_SURFBAR_NOTIFY_URL_REG_SUBJECT' => "[Surfbar:] Ihre URL wartet auf Freischaltung", + 'MEMBER_SURFBAR_NOTIFY_URL_MIGRATE_SUBJECT' => "[Surfbar:] Ihre URL aus der Mailbuchung wurde migriert", + 'MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT' => "[Surfbar:] Ihre URL wurde freigegeben", + 'MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_DELETED_SUBJECT' => "[Surfbar:] Sie haben Ihre freigegebene URL gelöscht", + 'MEMBER_SURFBAR_NOTIFY_URL_LOCKED_DELETED_SUBJECT' => "[Surfbar:] Sie haben eine gesperrte URL gelöscht", + 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT' => "[Surfbar:] Sie haben Ihre wartende URL zurückgenommen", + 'MEMBER_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT' => "[Surfbar:] Sie haben Ihre gestoppte URL gelöscht", + 'MEMBER_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT' => "[Surfbar:] Ihre URL wurde abgelehnt!", + 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_SUBJECT' => "[Surfbar:] Zustimmung zur URL-Buchung erhalten", + 'MEMBER_SURFBAR_NOTIFY_URL_DEPLETED_SUBJECT' => "[Surfbar:] Ihre URL wurde automatisch angehalten", + 'MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_PENDING_SUBJECT' => "[Surfbar:] Sie haben Ihre freigegebene URL geändert", + 'MEMBER_SURFBAR_NOTIFY_URL_LOCKED_PENDING_SUBJECT' => "[Surfbar:] Sie haben eine gesperrte URL erneut gebucht", + 'MEMBER_SURFBAR_NOTIFY_URL_STOPPED_CONTINUED_SUBJECT' => "[Surfbar:] Sie haben Ihre gestoppte URL gestartet", + 'MEMBER_SURFBAR_NOTIFY_URL_STOPPED_PENDING_SUBJECT' => "[Surfbar:] Sie haben Ihre gestoppte URL geändert", + 'MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_STOPPED_SUBJECT' => "[Surfbar:] Sie haben Ihre freigegebene URL gestoppt", + 'MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_DELETED_SUBJECT' => "[Surfbar:] Sie haben eine migrierte URL gelöscht", + 'MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_MIGRATED_SUBJECT' => "[Surfbar:] Sie haben eine migrierte URL geändert", + 'MEMBER_SURFBAR_NOTIFY_URL_MIGRATED_PENDING_SUBJECT' => "[Surfbar:] Sie haben eine migrierte URL gebucht", + 'MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT' => "[Fehler:] Bitte leiten Sie diese Mail an uns weiter!", + 'MEMBER_SURFBAR_NOTIFY_LOW_POINTS_SUBJECT' => "[Surfbar:] Ihr {?POINTS?}-Stand ist sehr niedrig!", // Auto-generated member subject lines -define('MEMBER_DEL_SURFBAR_URLS_SUBJECT', "[Surfbar:] Ihre URL wurde entfernt"); -define('MEMBER_EDIT_SURFBAR_URLS_SUBJECT', "[Surfbar:] Änderung Ihrer URL durch Admin"); -define('MEMBER_LOCKED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Sperrung Ihrer URL, bitte AGBs beachten!"); -define('MEMBER_ACTIVE_SURFBAR_URLS_SUBJECT', "[Surfbar:] Freigabe Ihrer URL"); + 'MEMBER_DEL_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Ihre URL wurde entfernt", + 'MEMBER_EDIT_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Änderung Ihrer URL durch Admin", + 'MEMBER_LOCKED_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Sperrung Ihrer URL, bitte AGBs beachten!", + 'MEMBER_ACTIVE_SURFBAR_URLS_SUBJECT' => "[Surfbar:] Freigabe Ihrer URL", // URL status -define('SURFBAR_URL_STATUS_ACTIVE', "Freigegeben"); -define('SURFBAR_URL_STATUS_LOCKED', "Gesperrt"); -define('SURFBAR_URL_STATUS_PENDING', "Wartend"); -define('SURFBAR_URL_STATUS_STOPPED', "Angehalten"); -define('SURFBAR_URL_STATUS_DEPLETED', "Views erschöpft"); -define('SURFBAR_URL_STATUS_REJECTED', "Abgelehnt"); -define('SURFBAR_URL_STATUS_DELETED', "Gelöscht"); -define('SURFBAR_URL_STATUS_MIGRATED', "Migriert"); -define('SURFBAR_URL_STATUS_NONE', "Nicht geändert"); + 'SURFBAR_URL_STATUS_ACTIVE' => "Freigegeben", + 'SURFBAR_URL_STATUS_LOCKED' => "Gesperrt", + 'SURFBAR_URL_STATUS_PENDING' => "Wartend", + 'SURFBAR_URL_STATUS_STOPPED' => "Angehalten", + 'SURFBAR_URL_STATUS_DEPLETED' => "Views erschöpft", + 'SURFBAR_URL_STATUS_REJECTED' => "Abgelehnt", + 'SURFBAR_URL_STATUS_DELETED' => "Gelöscht", + 'SURFBAR_URL_STATUS_MIGRATED' => "Migriert", + 'SURFBAR_URL_STATUS_NONE' => "Nicht geändert", // Member actions - submit buttons -define('MEMBER_SURFBAR_ACTION_RETREAT_SUBMIT', "Zurücknehmen"); -define('MEMBER_SURFBAR_ACTION_FRAMETEST_SUBMIT', "Framkiller-Test"); -define('MEMBER_SURFBAR_ACTION_EDIT_SUBMIT', "Ändern"); -define('MEMBER_SURFBAR_ACTION_DELETE_SUBMIT', "Löschen"); -define('MEMBER_SURFBAR_ACTION_RESUBMIT_SUBMIT', "Nochmal anmelden"); -define('MEMBER_SURFBAR_ACTION_BOOKNOW_SUBMIT', "Jetzt buchen"); -define('MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT', "Anhalten"); -define('MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT', "Fortfahren"); + 'MEMBER_SURFBAR_ACTION_RETREAT_SUBMIT' => "Zurücknehmen", + 'MEMBER_SURFBAR_ACTION_FRAMETEST_SUBMIT' => "Framkiller-Test", + 'MEMBER_SURFBAR_ACTION_EDIT_SUBMIT' => "Ändern", + 'MEMBER_SURFBAR_ACTION_DELETE_SUBMIT' => "Löschen", + 'MEMBER_SURFBAR_ACTION_RESUBMIT_SUBMIT' => "Nochmal anmelden", + 'MEMBER_SURFBAR_ACTION_BOOKNOW_SUBMIT' => "Jetzt buchen", + 'MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT' => "Anhalten", + 'MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT' => "Fortfahren", // Member actions - "now" submit buttons -define('MEMBER_SURFBAR_ACTION_DELETE_NOW_SUBMIT', "Jetzt löschen"); -define('MEMBER_SURFBAR_ACTION_EDIT_NOW_SUBMIT', "Jetzt ändern"); + 'MEMBER_SURFBAR_ACTION_DELETE_NOW_SUBMIT' => "Jetzt löschen", + 'MEMBER_SURFBAR_ACTION_EDIT_NOW_SUBMIT' => "Jetzt ändern", // Member actions - button titles -define('MEMBER_SURFBAR_ACTION_RETREAT_TITLE', "Nehmen Sie hiermit Ihre Buchung wieder zurück, falls Sie diese doch nicht bewerben wollten."); -define('MEMBER_SURFBAR_ACTION_FRAMETEST_TITLE', "Testen Sie die Seite auf Framekiller hin, diese sind in unserer Surfbar grundsätzlich nicht gestattet."); -define('MEMBER_SURFBAR_ACTION_EDIT_TITLE', "Ändern Sie hier Ihre URL, wenn diese nicht stimmen sollte. Allerdings wird Ihre URL dann auf Freischaltung wartend gesetzt, damit wir sie vor Aufnahme nochmals kontrollieren können."); -define('MEMBER_SURFBAR_ACTION_DELETE_TITLE', "Löschen Sie URLs, die in unserem System nicht mehr beworben werden sollen. Ihre URL wird dann als zu Löschen markiert und wird dann von uns entgültig gelöscht. Dies gilt als Vorsichtsmaßnahme."); -define('MEMBER_SURFBAR_ACTION_RESUBMIT_TITLE', "Melden Sie Ihre URL erneut an, wenn Sie diese an unsere AGBs angepasst haben, wie z.B. Framekiller oder Hardcore/Erotik entfernt. Diese sind bei uns nicht gestattet."); -define('MEMBER_SURFBAR_ACTION_BOOKNOW_TITLE', "Die URL wurde aus einer Mailbuchung migriert. Hiermit können Sie die URL jetzt in der Surfbar buchen."); -define('MEMBER_SURFBAR_ACTION_PAUSE_TITLE', "Halten Sie die URL in der Surfbar kurz an, wenn sie gerade nicht erreichbar ist. Dies geschieht nicht automatisch."); -define('MEMBER_SURFBAR_ACTION_UNPAUSE_TITLE', "Lassen Sie die URL in der Surfbar weiterlaufen, wenn Sie dies möchten. Wir müssen die URL jedoch erneut freigeben."); + 'MEMBER_SURFBAR_ACTION_RETREAT_TITLE' => "Nehmen Sie hiermit Ihre Buchung wieder zurück, falls Sie diese doch nicht bewerben wollten.", + 'MEMBER_SURFBAR_ACTION_FRAMETEST_TITLE' => "Testen Sie die Seite auf Framekiller hin, diese sind in unserer Surfbar grundsätzlich nicht gestattet.", + 'MEMBER_SURFBAR_ACTION_EDIT_TITLE' => "Ändern Sie hier Ihre URL, wenn diese nicht stimmen sollte. Allerdings wird Ihre URL dann auf Freischaltung wartend gesetzt, damit wir sie vor Aufnahme nochmals kontrollieren können.", + 'MEMBER_SURFBAR_ACTION_DELETE_TITLE' => "Löschen Sie URLs, die in unserem System nicht mehr beworben werden sollen. Ihre URL wird dann als zu Löschen markiert und wird dann von uns entgültig gelöscht. Dies gilt als Vorsichtsmaßnahme.", + 'MEMBER_SURFBAR_ACTION_RESUBMIT_TITLE' => "Melden Sie Ihre URL erneut an, wenn Sie diese an unsere AGBs angepasst haben, wie z.B. Framekiller oder Hardcore/Erotik entfernt. Diese sind bei uns nicht gestattet.", + 'MEMBER_SURFBAR_ACTION_BOOKNOW_TITLE' => "Die URL wurde aus einer Mailbuchung migriert. Hiermit können Sie die URL jetzt in der Surfbar buchen.", + 'MEMBER_SURFBAR_ACTION_PAUSE_TITLE' => "Halten Sie die URL in der Surfbar kurz an, wenn sie gerade nicht erreichbar ist. Dies geschieht nicht automatisch.", + 'MEMBER_SURFBAR_ACTION_UNPAUSE_TITLE' => "Lassen Sie die URL in der Surfbar weiterlaufen, wenn Sie dies möchten. Wir müssen die URL jedoch erneut freigeben.", // Internal errors -define('MEMBER_SURFBAR_EXECUTE_ACTION_404', "Auszuführende Funktion <span class=\"data\">%s</span> nicht gefunden!"); -define('ADMIN_SURFBAR_NOTIFY_SUBJECT_404', "Admin-Betreffzeile %s nicht gefunden."); -define('MEMBER_SURFBAR_NOTIFY_SUBJECT_404', "Mitglieder-Betreffzeile %s nicht gefunden."); + 'MEMBER_SURFBAR_EXECUTE_ACTION_404' => "Auszuführende Funktion <span class=\"data\">%s</span> nicht gefunden!", + 'ADMIN_SURFBAR_NOTIFY_SUBJECT_404' => "Admin-Betreffzeile %s nicht gefunden.", + 'MEMBER_SURFBAR_NOTIFY_SUBJECT_404' => "Mitglieder-Betreffzeile %s nicht gefunden.", // Guest texts -define('GUEST_SURFBAR_LOGIN_HEADER', "Login zur Surfbar:"); + 'GUEST_SURFBAR_LOGIN_HEADER' => "Login zur Surfbar:", +)); // [EOF] ?> diff --git a/inc/language/task_de.php b/inc/language/task_de.php index 7de2f8b266..edc287bd14 100644 --- a/inc/language/task_de.php +++ b/inc/language/task_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,93 +38,94 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_TASK_OVERVIEW_HEADER', "Admin-Übersicht zum {?MT_WORD?}-System"); -define('ADMIN_TASK_OVERVIEW_MEMBERS', "MitgliederÜbersicht"); -define('ADMIN_TASK_OVERVIEW_TASKS', "Task-Übersicht"); -define('ADMIN_TASK_OVERVIEW_MAILS', "Mail-Übersicht"); -define('ADMIN_TASK_OVERVIEW_EXTRAS', "Extra-Übersichten"); -define('ADMIN_TASK_CONFIRMED', "Bestätigt"); -define('ADMIN_TASK_UNCONFIRMED', "Unbestätigt"); -define('ADMIN_TASK_LOCKED', "Gesperrt"); -define('ADMIN_TASK_NEW_TASKS', "Ohne Zuweisung"); -define('ADMIN_TASK_CLOSED_TASKS', "Geschlossen"); -define('ADMIN_TASK_YOUR_TASKS', "Ihre Aufgaben"); -define('ADMIN_TASK_DELETED_TASKS', "Gelöscht"); -define('ADMIN_TASK_SOLVED_TASKS', "Erledigt"); -define('ADMIN_TASK_UPDATE_TASKS', "Updates"); -define('ADMIN_TASK_MAIL_ADMIN', "Wartende Mailbuchungen"); -define('ADMIN_TASK_MAIL_TEMP', "Abgebrochene Mailbuchungen"); -define('ADMIN_TASK_MAIL_SEND', "Versendete Mails"); -define('ADMIN_TASK_MAIL_DELETED', "Bereinigte Mails"); -define('ADMIN_TASK_MAIL_BONUS_AP', "Bereinigte Bonus-Mails"); -define('ADMIN_TASK_MAIL_BONUS_SEND', "Versendete Bonus-Mails"); -define('ADMIN_TASK_UNKNOWN_MODE', "Unbekannter Modus <span class=\"data\">%s</span> erkannt!"); -define('ADMIN_OVERVIEW_TASK_YOUR_TYPE', "Ihre zugewiesen Aufgaben (ohne Updates)"); -define('ADMIN_OVERVIEW_TASK_UPDATES_TYPE', "Automatisch durchgeführte Updates"); -define('ADMIN_OVERVIEW_TASK_SOLVED_TYPE', "Ihre erledigten Aufgaben"); -define('ADMIN_OVERVIEW_TASK_UNASSIGNED_TYPE', "Nicht zugewiesene und nicht gelöschte Aufgaben"); -define('ADMIN_OVERVIEW_TASK_DELETED_TYPE', "Als zu löschende markierte Aufgaben"); -define('ADMIN_OVERVIEW_TASK_CLOSED_TYPE', "Ihre geschlossenen Aufgaben"); -define('ADMIN_TASK_DELETE_ENTRIES', "Sofort löschen"); -define('TASK_DELETE_MODE_NOTE', "Diese Aufgaben sind zum automatischen Löschen freigegeben.<br /> +addMessages(array( + 'ADMIN_TASK_OVERVIEW_HEADER' => "Admin-Übersicht zum {?mt_word?}-System", + 'ADMIN_TASK_OVERVIEW_MEMBERS' => "Mitglieder-Übersicht", + 'ADMIN_TASK_OVERVIEW_TASKS' => "Task-Übersicht", + 'ADMIN_TASK_OVERVIEW_MAILS' => "Mail-Übersicht", + 'ADMIN_TASK_OVERVIEW_EXTRAS' => "Weiteres/Diverses", + 'ADMIN_TASK_CONFIRMED' => "Bestätigt", + 'ADMIN_TASK_UNCONFIRMED' => "Unbestätigt", + 'ADMIN_TASK_LOCKED' => "Gesperrt", + 'ADMIN_TASK_NEW_TASKS' => "Ohne Zuweisung", + 'ADMIN_TASK_CLOSED_TASKS' => "Geschlossen", + 'ADMIN_TASK_YOUR_TASKS' => "Ihre Aufgaben", + 'ADMIN_TASK_DELETED_TASKS' => "Gelöscht", + 'ADMIN_TASK_SOLVED_TASKS' => "Erledigt", + 'ADMIN_TASK_UPDATE_TASKS' => "Updates", + 'ADMIN_TASK_MAIL_ADMIN' => "Wartende Mailbuchungen", + 'ADMIN_TASK_MAIL_TEMP' => "Abgebrochene Mailbuchungen", + 'ADMIN_TASK_MAIL_SEND' => "Versendete Mails", + 'ADMIN_TASK_MAIL_DELETED' => "Bereinigte Mails", + 'ADMIN_TASK_MAIL_BONUS_AP' => "Bereinigte Bonus-Mails", + 'ADMIN_TASK_MAIL_BONUS_SEND' => "Versendete Bonus-Mails", + 'ADMIN_TASK_UNKNOWN_MODE' => "Unbekannter Modus <span class=\"data\">%s</span> erkannt!", + 'ADMIN_OVERVIEW_TASK_YOUR_TYPE' => "Ihre zugewiesen Aufgaben (ohne Updates)", + 'ADMIN_OVERVIEW_TASK_UPDATES_TYPE' => "Automatisch durchgeführte Updates", + 'ADMIN_OVERVIEW_TASK_SOLVED_TYPE' => "Ihre erledigten Aufgaben", + 'ADMIN_OVERVIEW_TASK_UNASSIGNED_TYPE' => "Nicht zugewiesene und nicht gelöschte Aufgaben", + 'ADMIN_OVERVIEW_TASK_DELETED_TYPE' => "Als zu löschende markierte Aufgaben", + 'ADMIN_OVERVIEW_TASK_CLOSED_TYPE' => "Ihre geschlossenen Aufgaben", + 'ADMIN_TASK_DELETE_ENTRIES' => "Sofort löschen", + 'TASK_DELETE_MODE_NOTE' => "Diese Aufgaben sind zum automatischen Löschen freigegeben.<br /> Die automatische Löschung erfolgt durch die autopurge-Erweiterung.<br /> -Sie können die Aufgaben aber auch jetzt endgültig löschen!"); -define('ADMIN_TASK_UNKNOWN_LIST_TITLE', "Linktitel nicht gesetzt!"); -define('ADMIN_TASK_INACTIVE_AUTOPURGE', "Inaktive Accounts"); -define('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE', "Es gibt inaktiv gewordene Mitglieder in Ihrem {?MT_WORD?}!"); -define('ADMIN_TASK_LIST_PAYOUTS_WAITING', "Wart. Auszahlungen"); -define('ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE', "Es warten Auszahlungsanfragen auf Ihre Bearbeitung!"); -define('ADMIN_TASK_LIST_PAYOUTS_ALL', "Alle Auszahlungen"); -define('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE', "Es gibt Auszahlungsanfragen!"); -define('ADMIN_TASK_LIST_HOLIDAYS', "Urlaubssanfragen"); -define('ADMIN_TASK_LIST_HOLIDAYS_TITLE', "Einige Ihrer Mitglieder haben Urlaub beantragt!"); -define('ADMIN_TASK_LIST_COUNTRY', "Ländercodes"); -define('ADMIN_TASK_LIST_COUNTRY_TITLE', "Sie haben Ländercodes eingerichtet!"); -define('ADMIN_TASK_LIST_DOUBLER_WAITING', "Wart. Verdopplungen"); -define('ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE', "Es warten Vedopplungen auf Vergütung!"); -define('ADMIN_TASK_LIST_DOUBLER_ALL', "Alle Verdopplungen"); -define('ADMIN_TASK_LIST_DOUBLER_ALL_TITLE', "In Ihrem {?MT_WORD?} wurde verdoppelt!"); -define('ADMIN_TASK_LIST_BONUS', "Aktiv-Rallye-Teilnehmer"); -define('ADMIN_TASK_LIST_BONUS_TITLE', "Es gibt Teilnehmer in Ihrer Aktiv-Rallye!"); -define('ADMIN_TASK_LIST_SPONSOR', "Sponsorenaccounts"); -define('ADMIN_TASK_LIST_SPONSOR_TITLE', "Sie haben Sponsoren in Ihrem {?MT_WORD?}!"); -define('ADMIN_TASK_LIST_SPONSOR_PENDING', "Wart. Sponsorenac."); -define('ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE', "Es warten Sponsorenaccounts auf Ihre Begutachtung wegen Freischaltung!"); -define('ADMIN_TASK_LIST_SPONSOR_CONFIRMED', "Best. Sponsorenac."); -define('ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE', "Es sind Sponsorenaccounts freigeschaltet."); -define('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED', "Unbest. Sponsorenac."); -define('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE', "Es müssen Sponsoren noch ihre Accounts bestätigen!"); -define('ADMIN_TASK_LIST_SPONSOR_LOCKED', "Gesprte. Sponsorenac."); -define('ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE', "Es wurden Sponsorenaccounts gesperrt!"); -define('ADMIN_TASK_LIST_SPONSOR_ORDERS', "Wart. Buch. d. Spons."); -define('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE', "Es warten Buchungen Ihrer Sponsoren wegen Annahme/Ablehnung!"); -define('ADMIN_TASK_LIST_THEME_ALL', "Alle inst. Themes"); -define('ADMIN_TASK_LIST_THEME_ALL_TITLE', "Es sind Themes installiert!"); -define('ADMIN_TASK_LIST_THEME_ACTIVE', "Aktivierte Themes"); -define('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE', "Sie haben Themes in Ihrem {?MT_WORD?} aktiviert!"); -define('ADMIN_TASK_LIST_ADMINS_ALL', "Administratoren"); -define('ADMIN_TASK_LIST_ADMINS_ALL_TITLE', "Es existieren Administratoren-Accounts in Ihrem Mailtausch!"); -define('ADMIN_TASK_LIST_REFBANNER_ALL', "Alle Referal-Banner"); -define('ADMIN_TASK_LIST_REFBANNER_ALL_TITLE', "Es exisitieren Erweiterungen in Ihrem {?MT_WORD?}."); -define('ADMIN_TASK_LIST_REFBANNER_ACTIVE', "Aktivierte Ref-Banner"); -define('ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE', "Ihre Mitglieder können Referal-Banner auswählen!"); -define('ADMIN_TASK_LIST_EXTENSIONS_ALL', "Alle Erweiterungen"); -define('ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE', "Es exisitieren Erweiterungen in Ihrem {?MT_WORD?}."); -define('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE', "Aktivierte Erweit."); -define('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE', "Sie haben Erweiterungen aktiviert!"); -define('ADMIN_TASK_LIST_ACCOUNT_NOREF', "Accounts ohne Werber"); -define('ADMIN_TASK_LIST_ACCOUNT_NOREF_TITLE', "Es wurden Accounts ohne Werber-ID (refid=0) gefunden!"); -define('ADMIN_TASK_LIST_SURFBAR_URLS_ALL', "Alle URLs in Surfbar"); -define('ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE', "In der Surfbar sind URLs gebucht worden."); -define('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING', "Wartende URLs in Surfbar"); -define('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE', "Es warten noch URLs auf Freischaltung für die Surfbar."); -define('ADMIN_TASK_LIST_NOTIFICATIONS', "Alle Benachrichtigungen"); -define('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE', "Es sind ausgesandte,vergütete Benachrichtigungen vorhanden."); +Sie können die Aufgaben aber auch jetzt endgültig löschen!", + 'ADMIN_TASK_UNKNOWN_LIST_TITLE' => "Linktitel nicht gesetzt!", + 'ADMIN_TASK_INACTIVE_AUTOPURGE' => "Inaktive Accounts", + 'ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE' => "Es gibt inaktiv gewordene Mitglieder in Ihrem {?mt_word?}!", + 'ADMIN_TASK_LIST_PAYOUTS_WAITING' => "Wart. Auszahlungen", + 'ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE' => "Es warten Auszahlungsanfragen auf Ihre Bearbeitung!", + 'ADMIN_TASK_LIST_PAYOUTS_ALL' => "Alle Auszahlungen", + 'ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE' => "Es gibt Auszahlungsanfragen!", + 'ADMIN_TASK_LIST_HOLIDAYS' => "Urlaubssanfragen", + 'ADMIN_TASK_LIST_HOLIDAYS_TITLE' => "Einige Ihrer Mitglieder haben Urlaub beantragt!", + 'ADMIN_TASK_LIST_COUNTRY' => "Ländercodes", + 'ADMIN_TASK_LIST_COUNTRY_TITLE' => "Sie haben Ländercodes eingerichtet!", + 'ADMIN_TASK_LIST_DOUBLER_WAITING' => "Wart. Verdopplungen", + 'ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE' => "Es warten Vedopplungen auf Vergütung!", + 'ADMIN_TASK_LIST_DOUBLER_ALL' => "Alle Verdopplungen", + 'ADMIN_TASK_LIST_DOUBLER_ALL_TITLE' => "In Ihrem {?mt_word?} wurde verdoppelt!", + 'ADMIN_TASK_LIST_BONUS' => "Aktiv-Rallye-Teilnehmer", + 'ADMIN_TASK_LIST_BONUS_TITLE' => "Es gibt Teilnehmer in Ihrer Aktiv-Rallye!", + 'ADMIN_TASK_LIST_SPONSOR' => "Sponsorenaccounts", + 'ADMIN_TASK_LIST_SPONSOR_TITLE' => "Sie haben Sponsoren in Ihrem {?mt_word?}!", + 'ADMIN_TASK_LIST_SPONSOR_PENDING' => "Wart. Sponsorenac.", + 'ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE' => "Es warten Sponsorenaccounts auf Ihre Begutachtung wegen Freischaltung!", + 'ADMIN_TASK_LIST_SPONSOR_CONFIRMED' => "Best. Sponsorenac.", + 'ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE' => "Es sind Sponsorenaccounts freigeschaltet.", + 'ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED' => "Unbest. Sponsorenac.", + 'ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE' => "Es müssen Sponsoren noch ihre Accounts bestätigen!", + 'ADMIN_TASK_LIST_SPONSOR_LOCKED' => "Gesprte. Sponsorenac.", + 'ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE' => "Es wurden Sponsorenaccounts gesperrt!", + 'ADMIN_TASK_LIST_SPONSOR_ORDERS' => "Wart. Buch. d. Spons.", + 'ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE' => "Es warten Buchungen Ihrer Sponsoren wegen Annahme/Ablehnung!", + 'ADMIN_TASK_LIST_THEME_ALL' => "Alle inst. Themes", + 'ADMIN_TASK_LIST_THEME_ALL_TITLE' => "Es sind Themes installiert!", + 'ADMIN_TASK_LIST_THEME_ACTIVE' => "Aktivierte Themes", + 'ADMIN_TASK_LIST_THEME_ACTIVE_TITLE' => "Sie haben Themes in Ihrem {?mt_word?} aktiviert!", + 'ADMIN_TASK_LIST_ADMINS_ALL' => "Administratoren", + 'ADMIN_TASK_LIST_ADMINS_ALL_TITLE' => "Es existieren Administratoren-Accounts in Ihrem Mailtausch!", + 'ADMIN_TASK_LIST_REFBANNER_ALL' => "Alle Referal-Banner", + 'ADMIN_TASK_LIST_REFBANNER_ALL_TITLE' => "Es exisitieren Erweiterungen in Ihrem {?mt_word?}.", + 'ADMIN_TASK_LIST_REFBANNER_ACTIVE' => "Aktivierte Ref-Banner", + 'ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE' => "Ihre Mitglieder können Referal-Banner auswählen!", + 'ADMIN_TASK_LIST_EXTENSIONS_ALL' => "Alle Erweiterungen", + 'ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE' => "Es exisitieren Erweiterungen in Ihrem {?mt_word?}.", + 'ADMIN_TASK_LIST_EXTENSIONS_ACTIVE' => "Aktivierte Erweit.", + 'ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE' => "Sie haben Erweiterungen aktiviert!", + 'ADMIN_TASK_LIST_ACCOUNT_NOREF' => "Accounts ohne Werber", + 'ADMIN_TASK_LIST_ACCOUNT_NOREF_TITLE' => "Es wurden Accounts ohne Werber-ID (refid=0) gefunden!", + 'ADMIN_TASK_LIST_SURFBAR_URLS_ALL' => "Alle URLs in Surfbar", + 'ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE' => "In der Surfbar sind URLs gebucht worden.", + 'ADMIN_TASK_LIST_SURFBAR_URLS_PENDING' => "Wartende URLs in Surfbar", + 'ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE' => "Es warten noch URLs auf Freischaltung für die Surfbar.", + 'ADMIN_TASK_LIST_NOTIFICATIONS' => "Alle Benachrichtigungen", + 'ADMIN_TASK_LIST_NOTIFICATIONS_TITLE' => "Es sind ausgesandte,vergütete Benachrichtigungen vorhanden.", +)); -// +// [EOF] ?> diff --git a/inc/language/theme_de.php b/inc/language/theme_de.php index 93fe0a31e6..a1f09dddb2 100644 --- a/inc/language/theme_de.php +++ b/inc/language/theme_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_THEME_NEW_FOUND_TITLE', "Neue Themes gefunden!"); -define('ADMIN_THEME_FILE_CTIME', "Theme erstellt"); -define('ADMIN_THEME_TOTAL_FOUND', "Themes gesamt gefunden"); -define('ADMIN_THEME_ALREADY_INSTALLED', "Theme <span class=\"data\">%s</span> bereits installiert."); -define('ADMIN_THEME_NOTHING_FOUND', "Keine Themes auf dem Server gefunden!"); -define('ADMIN_THEME_INC_404', "Wichtige Design-Headerdatei <u>theme.php</u> konnte zum Design <span class=\"data\">%s</span> nicht gefunden werden."); +addMessages(array( + 'ADMIN_THEME_NEW_FOUND_TITLE' => "Neue Themes gefunden!", + 'ADMIN_THEME_FILE_CTIME' => "Theme erstellt", + 'ADMIN_THEME_TOTAL_FOUND' => "Themes gesamt gefunden", + 'ADMIN_THEME_ALREADY_INSTALLED' => "Theme <span class=\"data\">%s</span> bereits installiert.", + 'ADMIN_THEME_NOTHING_FOUND' => "Keine Themes auf dem Server gefunden!", + 'ADMIN_THEME_INC_404' => "Wichtige Design-Headerdatei <u>theme.php</u> konnte zum Design <span class=\"data\">%s</span> nicht gefunden werden.", +)); -// +// [EOF] ?> diff --git a/inc/language/top10_de.php b/inc/language/top10_de.php index 6ee814a9d9..24368ee26a 100644 --- a/inc/language/top10_de.php +++ b/inc/language/top10_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,13 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('TOP10_ADMIN_CONFIG_HEADER', "Einstellungen an TOP-Listen"); -define('TOP10_ADMIN_MAX_TOP10', "Maximale Plätze pro Liste"); +addMessages(array( + 'TOP10_ADMIN_CONFIG_HEADER' => "Einstellungen an TOP-Listen", + 'TOP10_ADMIN_MAX_TOP10' => "Maximale Plätze pro Liste", +)); -// +// [EOF] ?> diff --git a/inc/language/transfer_de.php b/inc/language/transfer_de.php index b85e56ee1b..349c4a0f66 100644 --- a/inc/language/transfer_de.php +++ b/inc/language/transfer_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,61 +38,62 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_CONFIG_TRANSFER_HEADER', "Einstellungen zu {?POINTS?}-Überweisungen"); -define('ADMIN_TRANSFER_MAX', "Maximal angezeigte Einträge"); -define('ADMIN_TRANSFER_AGE', "Maximales Alter von Einträgen"); -define('ADMIN_TRANSFER_TIMEOUT', "Sperrung der Einstellungen nach {?POINTS?}-Überweisung"); -define('ADMIN_TRANSFER_BALANCE', "Restbetrag nach Überweisung auf Account"); -define('ADMIN_TRANSFER_CODE', "Länge des Touring-Codes"); -define('ADMIN_TRANSFER_CODE_NOTE', "<strong>0</strong> deaktiviert den Touring-Code!"); -define('ADMIN_AUTOPURGE_TRANSFER', "Veraltete Einträge automatisch löschen? (purge)"); -define('TRANSFER_LIST_INCOMING', "Eingehende Überweisungen"); -define('TRANSFER_LIST_OUTGOING', "Ausgehende Überweisungen"); -define('TRANSFER_ALLOW_OPT_IN', "Wollen Sie {?POINTS?}-Überweisungen von anderen Mitgliedern erhalten?"); -define('TRANSFER_TO_MEMBER_NOW', "Neue {?POINTS?}-Überweisung starten"); -define('TRANSFER_PLEASE_ALLOW_OPT_IN', "Bitte erst Empfangen von Überweisungen erlauben!"); -define('TRANSFER_NOW_LINK', "Überweisung zum anderen Mitglied tätigen"); -define('TRANSFER_SELECT_TARGET_UID', "Empfänger auswählen"); -define('TRANSFER_NO_ONE_ELSE_OPT_IN', "Niemand weiteres möchte Überweisungen empfangen!"); -define('TRANSFER_POINTS_MAXIMUM', "Maximaler Betrag"); -define('TRANSFER_POINTS_AMOUNT', "Zu überweisende {?POINTS?}"); -define('TRANSFER_NO_CODE', "Nicht erforderlich!"); -define('TRANSFER_POINTS_REASON', "Verwendungszweck"); -define('TRANSFER_POINTS_SECURITY_CODE', "Touring-Code eingeben"); -define('TRANSFER_ENTER_PASSWORD', "Ihr Passwort eingeben"); -define('TRANSFER_ADD_NEW', "Transfer abschliessen"); -define('TRANSFER_INVALID_CODE', "Ungütigen Touring-Code eingegeben!"); -define('TRANSFER_INVALID_PASSWORD', "Eingegebenes und gespeichertes Passwort stimmen nicht überein!"); -define('TRANSFER_INVALID_POINTS', "Kann nicht mehr überweisen, als dass Sie an Guthaben haben!"); -define('TRANSFER_INVALID_REASON', "Bitte einen Verwendungszweck eingeben!"); -define('TRANSFER_INVALID_RECIPIENT', "Bitte wählen Sie einen Empfänger aus!"); -define('TRANSFER_INVALID_DATA', "Konnte Absender- und Empfängerdaten nicht verifizieren!"); -define('TRANSFER_ADMIN_SUBJECT', "{?POINTS?}-Transfer abgeschlossen"); -define('TRANSFER_MEMBER_RECIPIENT_SUBJ', "{?POINTS?}-Ueberweisung durch Mitglied"); -define('TRANSFER_MEMBER_SENDER_SUBJ', "{?POINTS?}-Ueberweisung an Mitglied"); -define('TRANSFER_ADMIN_AUTOPURGE', "Auto-Loeschung von Transfer-Eintraegen"); -define('TRANSFER_COMPLETED', "Überweisung vollständig."); -define('TRANSFER_CONTINUE_OVERVIEW', "Weiter zur Übersichtsseite..."); -define('TRANSFER_LATEST_IS', "Einstellung gesperrt, letzte Überweisung war am <span class=\"data\">%s</span>"); -define('TRANSFER_LIST_ALL', "Gesamte Überweisungsliste anzeigen"); -define('TRANSFER_NO_INCOMING_TRANSFERS', "Keine eingehenden Überweisungen gefunden."); -define('TRANSFER_NO_OUTGOING_TRANSFERS', "Keine ausgehenden Überweisungen gefunden."); -define('TRANSFER_NO_INOUT_TRANSFERS', "Keine Überweisungen gefunden."); -define('TRANSFER_TOTAL_INCOMING', "Gesamteingänge"); -define('TRANSFER_TOTAL_OUTGOING', "Gesamtausgänge"); -define('TRANSFER_TOTAL_BALANCE', "Saldo"); -define('TRANSFER_ID', "Trans-ID"); -define('TRANSFER_STAMP', "Buchungstag"); -define('TRANSFER_PARTY', "Empf./Sender"); -define('TRANSFER_FROM_UID', "Sender"); -define('TRANSFER_TO_UID', "Empfänger"); -define('TRANSFER_TOTAL_SUM', "Gesamt transferierte {?POINTS?}"); -define('TRANSFER_DELETE', "Einträge löschen"); +addMessages(array( + 'ADMIN_CONFIG_TRANSFER_HEADER' => "Einstellungen zu {?POINTS?}-Überweisungen", + 'ADMIN_TRANSFER_MAX' => "Maximal angezeigte Einträge", + 'ADMIN_TRANSFER_AGE' => "Maximales Alter von Einträgen", + 'ADMIN_TRANSFER_TIMEOUT' => "Sperrung der Einstellungen nach {?POINTS?}-Überweisung", + 'ADMIN_TRANSFER_BALANCE' => "Restbetrag nach Überweisung auf Account", + 'ADMIN_TRANSFER_CODE' => "Länge des Touring-Codes", + 'ADMIN_TRANSFER_CODE_NOTE' => "<strong>0</strong> deaktiviert den Touring-Code!", + 'ADMIN_AUTOPURGE_TRANSFER' => "Veraltete Einträge automatisch löschen? (purge)", + 'TRANSFER_LIST_INCOMING' => "Eingehende Überweisungen", + 'TRANSFER_LIST_OUTGOING' => "Ausgehende Überweisungen", + 'TRANSFER_ALLOW_OPT_IN' => "Wollen Sie {?POINTS?}-Überweisungen von anderen Mitgliedern erhalten?", + 'TRANSFER_TO_MEMBER_NOW' => "Neue {?POINTS?}-Überweisung starten", + 'TRANSFER_PLEASE_ALLOW_OPT_IN' => "Bitte erst Empfangen von Überweisungen erlauben!", + 'TRANSFER_NOW_LINK' => "Überweisung zum anderen Mitglied tätigen", + 'TRANSFER_SELECT_TARGET_UID' => "Empfänger auswählen", + 'TRANSFER_NO_ONE_ELSE_OPT_IN' => "Niemand weiteres möchte Überweisungen empfangen!", + 'TRANSFER_POINTS_MAXIMUM' => "Maximaler Betrag", + 'TRANSFER_POINTS_AMOUNT' => "Zu überweisende {?POINTS?}", + 'TRANSFER_NO_CODE' => "Nicht erforderlich!", + 'TRANSFER_POINTS_REASON' => "Verwendungszweck", + 'TRANSFER_POINTS_SECURITY_CODE' => "Touring-Code eingeben", + 'TRANSFER_ENTER_PASSWORD' => "Ihr Passwort eingeben", + 'TRANSFER_ADD_NEW' => "Transfer abschliessen", + 'TRANSFER_INVALID_CODE' => "Ungütigen Touring-Code eingegeben!", + 'TRANSFER_INVALID_PASSWORD' => "Eingegebenes und gespeichertes Passwort stimmen nicht überein!", + 'TRANSFER_INVALID_POINTS' => "Kann nicht mehr überweisen, als dass Sie an Guthaben haben!", + 'TRANSFER_INVALID_REASON' => "Bitte einen Verwendungszweck eingeben!", + 'TRANSFER_INVALID_RECIPIENT' => "Bitte wählen Sie einen Empfänger aus!", + 'TRANSFER_INVALID_DATA' => "Konnte Absender- und Empfängerdaten nicht verifizieren!", + 'TRANSFER_ADMIN_SUBJECT' => "{?POINTS?}-Transfer abgeschlossen", + 'TRANSFER_MEMBER_RECIPIENT_SUBJ' => "{?POINTS?}-Ueberweisung durch Mitglied", + 'TRANSFER_MEMBER_SENDER_SUBJ' => "{?POINTS?}-Ueberweisung an Mitglied", + 'TRANSFER_ADMIN_AUTOPURGE' => "Auto-Loeschung von Transfer-Eintraegen", + 'TRANSFER_COMPLETED' => "Überweisung vollständig.", + 'TRANSFER_CONTINUE_OVERVIEW' => "Weiter zur Übersichtsseite...", + 'TRANSFER_LATEST_IS' => "Einstellung gesperrt, letzte Überweisung war am <span class=\"data\">%s</span>", + 'TRANSFER_LIST_ALL' => "Gesamte Überweisungsliste anzeigen", + 'TRANSFER_NO_INCOMING_TRANSFERS' => "Keine eingehenden Überweisungen gefunden.", + 'TRANSFER_NO_OUTGOING_TRANSFERS' => "Keine ausgehenden Überweisungen gefunden.", + 'TRANSFER_NO_INOUT_TRANSFERS' => "Keine Überweisungen gefunden.", + 'TRANSFER_TOTAL_INCOMING' => "Gesamteingänge", + 'TRANSFER_TOTAL_OUTGOING' => "Gesamtausgänge", + 'TRANSFER_TOTAL_BALANCE' => "Saldo", + 'TRANSFER_ID' => "Trans-ID", + 'TRANSFER_STAMP' => "Buchungstag", + 'TRANSFER_PARTY' => "Empf./Sender", + 'TRANSFER_FROM_UID' => "Sender", + 'TRANSFER_TO_UID' => "Empfänger", + 'TRANSFER_TOTAL_SUM' => "Gesamt transferierte {?POINTS?}", + 'TRANSFER_DELETE' => "Einträge löschen", +)); -// +// [EOF] ?> diff --git a/inc/language/usage_de.php b/inc/language/usage_de.php index 4726c461ed..9bd60f49ea 100644 --- a/inc/language/usage_de.php +++ b/inc/language/usage_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_USAGE_DIRECTORY_404', "Das Verzeichnis <span class=\"data\">%s</span> scheint auf Ihrem Server zu fehlen. Funktion nicht verfügbar."); +addMessages(array( + 'ADMIN_USAGE_DIRECTORY_404' => "Das Verzeichnis <span class=\"data\">%s</span> scheint auf Ihrem Server zu fehlen. Funktion nicht verfügbar.", +)); -// +// [EOF] ?> diff --git a/inc/language/user_de.php b/inc/language/user_de.php index f70813aff5..d888044b6f 100644 --- a/inc/language/user_de.php +++ b/inc/language/user_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('USER_PAGENAV', "Seiten"); -define('RECEIVED_MAILS', "Empfangene Mails"); -define('SENT_MAILS', "Versendete Mails"); -define('USER_ADMIN_CONFIG_HEADER', "Konfiguration - Mitgliederliste"); -define('USER_ADMIN_LIMIT_USER', "Anzahl Mitglieder pro Seite"); -define('USER_ADMIN_ALPHA_USER', "Azanhl Buchstaben pro Zeile"); -define('USER_ACCOUNT_SAVED', "Mitgliedsaccount gespeichert."); -define('USER_ACCOUNT_NOT_SAVED', "Mitgliedsaccount <u>nicht</u> gespeichert."); -define('USER_ACCOUNT_LOCKED', "Mitgliedsaccount <span class=\"data\">%s</span> wurde gesperrt."); -define('USER_ACCOUNT_UNLOCKED', "Mitgliedsaccount <span class=\"data\">%s</span> wurde freigegeben."); +addMessages(array( + 'USER_PAGENAV' => "Seiten", + 'RECEIVED_MAILS' => "Empfangene Mails", + 'SENT_MAILS' => "Versendete Mails", + 'USER_ADMIN_CONFIG_HEADER' => "Konfiguration - Mitgliederliste", + 'USER_ADMIN_LIMIT_USER' => "Anzahl Mitglieder pro Seite", + 'USER_ADMIN_ALPHA_USER' => "Azanhl Buchstaben pro Zeile", + 'USER_ACCOUNT_SAVED' => "Mitgliedsaccount gespeichert.", + 'USER_ACCOUNT_NOT_SAVED' => "Mitgliedsaccount <u>nicht</u> gespeichert.", + 'USER_ACCOUNT_LOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde gesperrt.", + 'USER_ACCOUNT_UNLOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde freigegeben.", +)); -// +// [EOF] ?> diff --git a/inc/language/wernis_de.php b/inc/language/wernis_de.php index 7794696bb8..3d1384c278 100644 --- a/inc/language/wernis_de.php +++ b/inc/language/wernis_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,100 +38,101 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Language definitions -define('ADMIN_TASK_LIST_WERNIS_ALL', "Alle Wernis-Ein-/Auszahlungen"); -define('ADMIN_TASK_LIST_WERNIS_ALL_TITLE', "Listet alle Wernis-Ein- und Auszahlungen auf."); -define('MEMBER_WERNIS_MODE_WITHDRAW', "Wernis einzahlen"); -define('MEMBER_WERNIS_MODE_PAYOUT', "Wernis auszahlen"); -define('WERNIS_STATUS_UNKNWOWN', "Wernis-Typ <span class=\"data\">%s</span> unbekannt."); -define('WERNIS_STATUS_WITHDRAW', "Einzahlung von WDS66"); -define('WERNIS_STATUS_PAYOUT', "Auszahlung an WDS66"); -define('WERNIS_STATUS_FAILED', "Fehlgeschlagen"); -define('WERNIS_TIMESTAMP', "Buchungszeitmarke"); -define('WERNIS_ACCOUNT', "WDS66-Hauptaccount"); -define('WERNIS_TOTAL_WERNIS', "Gesamt überwiesen"); -define('WERNIS_MEMBER_LIST_WERNIS', "Überweisungsliste von/an WDS66-Hauptaccount"); +addMessages(array( + 'ADMIN_TASK_LIST_WERNIS_ALL' => "Alle Wernis-Ein-/Auszahlungen", + 'ADMIN_TASK_LIST_WERNIS_ALL_TITLE' => "Listet alle Wernis-Ein- und Auszahlungen auf.", + 'MEMBER_WERNIS_MODE_WITHDRAW' => "Wernis einzahlen", + 'MEMBER_WERNIS_MODE_PAYOUT' => "Wernis auszahlen", + 'WERNIS_STATUS_UNKNWOWN' => "Wernis-Typ <span class=\"data\">%s</span> unbekannt.", + 'WERNIS_STATUS_WITHDRAW' => "Einzahlung von WDS66", + 'WERNIS_STATUS_PAYOUT' => "Auszahlung an WDS66", + 'WERNIS_STATUS_FAILED' => "Fehlgeschlagen", + 'WERNIS_TIMESTAMP' => "Buchungszeitmarke", + 'WERNIS_ACCOUNT' => "WDS66-Hauptaccount", + 'WERNIS_TOTAL_WERNIS' => "Gesamt überwiesen", + 'WERNIS_MEMBER_LIST_WERNIS' => "Überweisungsliste von/an WDS66-Hauptaccount", // Admin messages -define('WERNIS_ADMIN_CONFIG_TITLE', "Einstellungen zum WDS66-Hauptaccount:"); -define('WERNIS_ADMIN_MIN_PAYOUT', "Minimumguthaben für Auszahlungen."); -define('WERNIS_ADMIN_MIN_WITHDRAW', "Minimumguthaben für Einzahlungen."); -define('WERNIS_ADMIN_API_ID', "WDS66-API-ID (api_id=x)"); -define('WERNIS_ADMIN_API_MD5', "WDS66-API-Key (api_md5=xxxxx; 32-stellig)"); -define('WERNIS_ADMIN_API_URL', "Basis-URL der API-Skripte"); -define('WERNIS_ADMIN_REFID', "Ihre Referal-ID bei WDS66-Portal (= Ihr Username!)"); -define('WERNIS_ADMIN_WPASS', "Wernis-Passwort (nicht Account-Passwort!)"); -define('WERNIS_ADMIN_CONFIG_NOTE', "[<a href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</a>] können Sie schon für <strong>5,00€</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> Wernis-Account dennoch nötig!) Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und überprüfen Sie diesen mehrmals! Er wird zum Überweisen von und nach WDS66-Wernis-Portal benötigt. Die Betreibergebühren und Umrechnungsfaktoren sind für den Betrieb Ihres {?MT_WORD2?} komplett in Wernis ausgelegt, diese müssen Sie also noch anpassen, wenn Sie z.B. Punkte haben und in Wernis auszahlen lassen wollen."); -define('WERNIS_ADMIN_NO_TRANSFERS', "Derzeit keine Wernis transferiert!"); -define('WERNIS_ADMIN_WDS66_ACCOUNT', "Account bei WDS66-Portal"); -define('WERNIS_ADMIN_TRANSFERED', "Wernis transferiert"); -define('WERNIS_ADMIN_TIMESTAMP', "Zeitpunkt Überweisung"); -define('WERNIS_ADMIN_TYPE', "Überweisungsrichtung"); -define('WERNIS_ADMIN_API_MESSAGE', "Nachricht von WDS66-API"); -define('WERNIS_ADMIN_API_STATUS', "Status von WDS66-API"); -define('WERNIS_ADMIN_PAYOUT_ACTIVE', "Auszahlungen zum WDS66-Portal aktiviert?"); -define('WERNIS_ADMIN_WITHDRAW_ACTIVE', "Einzahlungen vom WDS66-Portal aktiviert?"); -define('WERNIS_ADMIN_PAYOUT_FACTOR', "Umrechnungsfaktor von {?POINTS?} in Wernis für Auszahlungen"); -define('WERNIS_ADMIN_WITHDRAW_FACTOR', "Umrechnungsfaktor von Wernis in {?POINTS?} für Einzahlungen"); -define('WERNIS_ADMIN_PAYOUT_FEE_PERCENT', "Prozentuale Betreibergebühr für Auszahlungen"); -define('WERNIS_ADMIN_WITHDRAW_FEE_PERCENT', "Prozentuale Betreibergebühr für Einzahlungen"); -define('WERNIS_ADMIN_PAYOUT_FEE_FIX', "Fixe Betreibergebühr für Auszahlungen"); -define('WERNIS_ADMIN_WITHDRAW_FEE_FIX', "Fixe Betreibergebühr für Einzahlungen"); + 'WERNIS_ADMIN_CONFIG_TITLE' => "Einstellungen zum WDS66-Hauptaccount:", + 'WERNIS_ADMIN_MIN_PAYOUT' => "Minimumguthaben für Auszahlungen.", + 'WERNIS_ADMIN_MIN_WITHDRAW' => "Minimumguthaben für Einzahlungen.", + 'WERNIS_ADMIN_API_ID' => "WDS66-API-ID (api_id=x)", + 'WERNIS_ADMIN_API_MD5' => "WDS66-API-Key (api_md5=xxxxx; 32-stellig)", + 'WERNIS_ADMIN_API_URL' => "Basis-URL der API-Skripte", + 'WERNIS_ADMIN_REFID' => "Ihre Referal-ID bei WDS66-Portal (= Ihr Username!)", + 'WERNIS_ADMIN_WPASS' => "Wernis-Passwort (nicht Account-Passwort!)", + 'WERNIS_ADMIN_CONFIG_NOTE' => "[<a href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</a>] können Sie schon für <strong>einmalig kostenlos</strong> <strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> Wernis-Account dennoch nötig!) Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und überprüfen Sie diesen mehrmals! Er wird zum Überweisen von und nach WDS66-Wernis-Portal benötigt. Die Betreibergebühren und Umrechnungsfaktoren sind für den Betrieb Ihres {?mt_word2?} komplett in Wernis ausgelegt, diese müssen Sie also noch anpassen, wenn Sie z.B. Punkte haben und in Wernis auszahlen lassen wollen.", + 'WERNIS_ADMIN_NO_TRANSFERS' => "Derzeit keine Wernis transferiert!", + 'WERNIS_ADMIN_WDS66_ACCOUNT' => "Account bei WDS66-Portal", + 'WERNIS_ADMIN_TRANSFERED' => "Wernis transferiert", + 'WERNIS_ADMIN_TIMESTAMP' => "Zeitpunkt Überweisung", + 'WERNIS_ADMIN_TYPE' => "Überweisungsrichtung", + 'WERNIS_ADMIN_API_MESSAGE' => "Nachricht von WDS66-API", + 'WERNIS_ADMIN_API_STATUS' => "Status von WDS66-API", + 'WERNIS_ADMIN_PAYOUT_ACTIVE' => "Auszahlungen zum WDS66-Portal aktiviert?", + 'WERNIS_ADMIN_WITHDRAW_ACTIVE' => "Einzahlungen vom WDS66-Portal aktiviert?", + 'WERNIS_ADMIN_PAYOUT_FACTOR' => "Umrechnungsfaktor von {?POINTS?} in Wernis für Auszahlungen", + 'WERNIS_ADMIN_WITHDRAW_FACTOR' => "Umrechnungsfaktor von Wernis in {?POINTS?} für Einzahlungen", + 'WERNIS_ADMIN_PAYOUT_FEE_PERCENT' => "Prozentuale Betreibergebühr für Auszahlungen", + 'WERNIS_ADMIN_WITHDRAW_FEE_PERCENT' => "Prozentuale Betreibergebühr für Einzahlungen", + 'WERNIS_ADMIN_PAYOUT_FEE_FIX' => "Fixe Betreibergebühr für Auszahlungen", + 'WERNIS_ADMIN_WITHDRAW_FEE_FIX' => "Fixe Betreibergebühr für Einzahlungen", // API messages -define('WERNIS_API_REQUEST_DATA_INVALID', "Interner Fehler: Abfragedaten sind defekt!"); -define('WERNIS_API_REQUEST_DATA_MISSING', "Interner Fehler: Abfragedaten sind nicht komplett!"); -define('WERNIS_API_REQUEST_ERROR', "Abfragefehler: <span class=\"data\">%s</span>"); -define('WERNIS_API_REQUEST_FAILED', "Unbekannter Fehler <span class=\"data\">%s</span> von API erhalten! Bitte im [<a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker posten</a>], den Fehlercode nennen und wie es dazu gekommen ist."); -define('WERNIS_API_REQUEST_FAILED_AUTH', "Authorisierung an API fehlgeschlagen! Bitte API-ID und Key überprüfen. [<a href=\"http://www.wds66.com/modules.php?module=export\" target=\"_blank\" title=\"Direkt zum WDS66-Exportaccount\">Hier</a>] direkt zum Export-Account. Sie benötigen Ihren Usernamen und Passwort!"); -define('WERNIS_API_REQUEST_FAILED_USER', "Useraccount nicht gefunden oder Wernis-Passwort ist ungültig!"); -define('WERNIS_API_REQUEST_FAILED_OWN', "Überweisung an eigenes Account nicht möglich."); -define('WERNIS_API_REQUEST_FAILED_AMOUNT', "Konto weist nicht genügend Deckung auf."); -define('WERNIS_API_REQUEST_FAILED_API_AMOUNT', "API-Konto weist nicht genügend Deckung auf."); -define('WERNIS_API_PURPOSE_WITHDRAW', "Einzahlung auf {?MAIN_TITLE?} ({?URL?}), ID: %s"); -define('WERNIS_API_PURPOSE_PAYOUT', "Auszahlung von {?MAIN_TITLE?} ({?URL?}), ID: %s"); + 'WERNIS_API_REQUEST_DATA_INVALID' => "Interner Fehler: Abfragedaten sind defekt!", + 'WERNIS_API_REQUEST_DATA_MISSING' => "Interner Fehler: Abfragedaten sind nicht komplett!", + 'WERNIS_API_REQUEST_ERROR' => "Abfragefehler: <span class=\"data\">%s</span>", + 'WERNIS_API_REQUEST_FAILED' => "Unbekannter Fehler <span class=\"data\">%s</span> von API erhalten! Bitte im [<a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker posten</a>], den Fehlercode nennen und wie es dazu gekommen ist.", + 'WERNIS_API_REQUEST_FAILED_AUTH' => "Authorisierung an API fehlgeschlagen! Bitte API-ID und Key überprüfen. [<a href=\"http://www.wds66.com/modules.php?module=export\" target=\"_blank\" title=\"Direkt zum WDS66-Exportaccount\">Hier</a>] direkt zum Export-Account. Sie benötigen Ihren Usernamen und Passwort!", + 'WERNIS_API_REQUEST_FAILED_USER' => "Useraccount nicht gefunden oder Wernis-Passwort ist ungültig!", + 'WERNIS_API_REQUEST_FAILED_OWN' => "Überweisung an eigenes Account nicht möglich.", + 'WERNIS_API_REQUEST_FAILED_AMOUNT' => "Konto weist nicht genügend Deckung auf.", + 'WERNIS_API_REQUEST_FAILED_API_AMOUNT' => "API-Konto weist nicht genügend Deckung auf.", + 'WERNIS_API_PURPOSE_WITHDRAW' => "Einzahlung auf {?MAIN_TITLE?} ({?URL?}), ID: %s", + 'WERNIS_API_PURPOSE_PAYOUT' => "Auszahlung von {?MAIN_TITLE?} ({?URL?}), ID: %s", // Error messages -define('WERNIS_ERROR_STATUS', "Fehler-Status <span class=\"data\">%s</span> erhalten."); -define('WERNIS_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!"); + 'WERNIS_ERROR_STATUS' => "Fehler-Status <span class=\"data\">%s</span> erhalten.", + 'WERNIS_UNKNOWN_ERROR' => "Unbekannter Fehler aufgetreten!", // Member messages -define('MEMBER_WERNIS_MODE_CHOOSE', "Möchten Sie Wernis zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder Wernis hier einzahlen?"); -define('MEMBER_WERNIS_MODE_CHOOSE2', "Hier klicken um neue Überweisung zu starten..."); -define('WERNIS_MEMBER_NO_ACCOUNT', "Noch kein WDS66-Account? Hier entlang!"); -define('WERNIS_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten müssen."); -define('WERNIS_MEMBER_MIN_PAYOUT', "Sie haben nicht genügend Wernis zum Auszahlen! Mindestens: <span class=\"data\">%s</span> Wernis."); -define('WERNIS_MEMBER_WITHDRAW_TITLE', "Wernis bei {?MAIN_TITLE?} einzahlen:"); -define('WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT', "Wernis hier im Account:"); -define('WERNIS_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Wernis-Guthaben:"); -define('WERNIS_MEMBER_WITHDRAW_SUBMIT', "Wernis jetzt einzahlen"); -define('WERNIS_MEMBER_WITHDRAW_NOTE', "Ihr Wernis-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Ihr WDS66-Konto sollte ausreichend Deckung aufweisen!"); -define('WERNIS_MEMBER_PAYOUT_TITLE', "Wernis auf Ihr WDS66-Hauptaccount auszahlen"); -define('WERNIS_MEMBER_PAYOUT_POINTS', "Auszahlfähiges Wernis-Guthaben"); -define('WERNIS_MEMBER_PAYOUT_MIN_POINTS', "Mindestens auszuzahlendes Wernis-Guthaben"); -define('WERNIS_MEMBER_PAYOUT_SUBMIT', "Auszahlung durchführen"); -define('WERNIS_MEMBER_PAYOUT_NOTE', "Ihr Wernis-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Überprüfen Sie vor dem Absenden Ihren WDS66-Usernamen."); -define('WERNIS_MEMBER_WDS66_ID', "Username bei WDS66-Portal: [<a href=\"http://www.wds66.com/modules.php?module=wpass&mode=new\" target=\"_blank\">Vergessen?</a>]"); -define('WERNIS_MEMBER_WDS66_PASSWORD', "Wernis-Passwort (nicht Accountpasswort!): [<a href=\"http://www.wds66.com/modules.php?module=wpass&mode=new\" target=\"_blank\">Vergessen?</a>]"); -define('WERNIS_MEMBER_WDS66_AMOUNT', "Zu überweisenden Betrag eingeben:"); -define('WERNIS_MEMBER_MODE_INVALID', "Ungültiger Modus <span class=\"data\">%s</span> erkannt! Bitte links im Menü fortfahren."); -define('WERNIS_MEMBER_EMPTY_USERNAME', "Sie haben Ihren WDS66-Usernamen nicht eingegeben."); -define('WERNIS_MEMBER_EMPTY_PASSWORD', "Sieh haben kein Wernis-Passwort eingegeben."); -define('WERNIS_MEMBER_EMPTY_AMOUNT', "Sie haben keine zu überweisende Betrag angegeben."); -define('WERNIS_MEMBER_INVALID_USERNAME', "Bitte nur Zahlen für den WDS66-Usernamen eingeben!"); -define('WERNIS_MEMBER_INVALID_AMOUNT', "Bitte nur Zahlen für den zu überweisenden Betrag eingeben!"); -define('WERNIS_MEMBER_AMOUNT_SMALLER_MIN', "Bitte geben Sie mindestens <span class=\"data\">%s</span> Wernis an!"); -define('WERNIS_MEMBER_WITHDRAW_FAILED', "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: <em>%s</em>."); -define('WERNIS_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)"); -define('WERNIS_MEMBER_PAYOUT_DONE', "Auszahlung auf WDS66-Hauptaccount erfolgreich abgeschlossen. :-)"); -define('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie können nicht <span class=\"data\">%s</span> Wernis auszahlen, da Sie nur <span class=\"data\">%s</span> übrig haben."); -define('WERNIS_MEMBER_STATUS', "Überweisungsart"); -define('WERNIS_MEMBER_PAYOUT_DISABLED', "Auszahlung wurde administrativ deaktiviert."); -define('WERNIS_MEMBER_WITHDRAW_DISABLED', "Einzahlung wurde administrativ deaktiviert."); + 'MEMBER_WERNIS_MODE_CHOOSE' => "Möchten Sie Wernis zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder Wernis hier einzahlen?", + 'MEMBER_WERNIS_MODE_CHOOSE2' => "Hier klicken um neue Überweisung zu starten...", + 'WERNIS_MEMBER_NO_ACCOUNT' => "Noch kein WDS66-Account? Hier entlang!", + 'WERNIS_MEMBER_API_DATA_MISSING' => "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten müssen.", + 'WERNIS_MEMBER_MIN_PAYOUT' => "Sie haben nicht genügend Wernis zum Auszahlen! Mindestens: <span class=\"data\">%s</span> Wernis.", + 'WERNIS_MEMBER_WITHDRAW_TITLE' => "Wernis bei {?MAIN_TITLE?} einzahlen:", + 'WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT' => "Wernis hier im Account:", + 'WERNIS_MEMBER_WITHDRAW_MIN_POINTS' => "Mindest einzuzahlendes Wernis-Guthaben:", + 'WERNIS_MEMBER_WITHDRAW_SUBMIT' => "Wernis jetzt einzahlen", + 'WERNIS_MEMBER_WITHDRAW_NOTE' => "Ihr Wernis-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Ihr WDS66-Konto sollte ausreichend Deckung aufweisen!", + 'WERNIS_MEMBER_PAYOUT_TITLE' => "Wernis auf Ihr WDS66-Hauptaccount auszahlen", + 'WERNIS_MEMBER_PAYOUT_POINTS' => "Auszahlfähiges Wernis-Guthaben", + 'WERNIS_MEMBER_PAYOUT_MIN_POINTS' => "Mindestens auszuzahlendes Wernis-Guthaben", + 'WERNIS_MEMBER_PAYOUT_SUBMIT' => "Auszahlung durchführen", + 'WERNIS_MEMBER_PAYOUT_NOTE' => "Ihr Wernis-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Überprüfen Sie vor dem Absenden Ihren WDS66-Usernamen.", + 'WERNIS_MEMBER_WDS66_ID' => "Username bei WDS66-Portal: [<a href=\"http://www.wds66.com/modules.php?module=wpass&mode=new\" target=\"_blank\">Vergessen?</a>]", + 'WERNIS_MEMBER_WDS66_PASSWORD' => "Wernis-Passwort (nicht Accountpasswort!): [<a href=\"http://www.wds66.com/modules.php?module=wpass&mode=new\" target=\"_blank\">Vergessen?</a>]", + 'WERNIS_MEMBER_WDS66_AMOUNT' => "Zu überweisenden Betrag eingeben:", + 'WERNIS_MEMBER_MODE_INVALID' => "Ungültiger Modus <span class=\"data\">%s</span> erkannt! Bitte links im Menü fortfahren.", + 'WERNIS_MEMBER_EMPTY_USERNAME' => "Sie haben Ihren WDS66-Usernamen nicht eingegeben.", + 'WERNIS_MEMBER_EMPTY_PASSWORD' => "Sieh haben kein Wernis-Passwort eingegeben.", + 'WERNIS_MEMBER_EMPTY_AMOUNT' => "Sie haben keine zu überweisende Betrag angegeben.", + 'WERNIS_MEMBER_INVALID_USERNAME' => "Bitte nur Zahlen für den WDS66-Usernamen eingeben!", + 'WERNIS_MEMBER_INVALID_AMOUNT' => "Bitte nur Zahlen für den zu überweisenden Betrag eingeben!", + 'WERNIS_MEMBER_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">%s</span> Wernis an!", + 'WERNIS_MEMBER_WITHDRAW_FAILED' => "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: <em>%s</em>.", + 'WERNIS_MEMBER_WITHDRAW_DONE' => "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)", + 'WERNIS_MEMBER_PAYOUT_DONE' => "Auszahlung auf WDS66-Hauptaccount erfolgreich abgeschlossen. :-)", + 'WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED' => "Sie können nicht <span class=\"data\">%s</span> Wernis auszahlen, da Sie nur <span class=\"data\">%s</span> übrig haben.", + 'WERNIS_MEMBER_STATUS' => "Überweisungsart", + 'WERNIS_MEMBER_PAYOUT_DISABLED' => "Auszahlung wurde administrativ deaktiviert.", + 'WERNIS_MEMBER_WITHDRAW_DISABLED' => "Einzahlung wurde administrativ deaktiviert.", +)); -// +// [EOF] ?> diff --git a/inc/language/yoomedia_de.php b/inc/language/yoomedia_de.php index 286297e429..0044b0304a 100644 --- a/inc/language/yoomedia_de.php +++ b/inc/language/yoomedia_de.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,63 +38,64 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Admin config strings -define('ADMIN_CONFIG_YOOMEDIA_TITLE', "Einstellungen für Yoo!Media Interface 2.0"); -define('ADMIN_CONFIG_YOOMEDIA_ID', "Ihre User-ID:"); -define('ADMIN_CONFIG_YOOMEDIA_SID', "Seiten-ID:"); -define('ADMIN_CONFIG_YOOMEDIA_PASSWD', "Interface-Passwort:"); -define('ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD', "Maximale Reloadsperre der Kampagnen in Stunden:"); -define('ADMIN_CONFIG_YOOMEDIA_TM_MIN_WAIT', "Mindestaufenthalt in Sekunden:"); -define('ADMIN_CONFIG_YOOMEDIA_TM_CLICKS_REMAIN', "Mindestanzahl der restlichen Klicks:"); -define('ADMIN_CONFIG_YOOMEDIA_TM_MIN_PAY', "Mindestvergütung der Kampagne:"); -define('ADMIN_CONFIG_YOOMEDIA_EROTIC_ALLOWED', "Kampagnen mit erotischen Inhalt anzeigen?"); -define('ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE', "Keine Erotik anzeigen"); -define('ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE', "Auch Erotik anzeigen"); -define('ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY', "Nur Erotik anzeigen"); -define('ADMIN_CONFIG_YOOMEDIA_EROTIC_NOTE', "<strong>Hinweise:</strong> Sollten Sie Erotik in Ihrem {?MT_WORD?} anzeigen wollen, so sollten Sie einen Jugendschutzbeauftragten haben und diesen im Impressum nennen. Das gesamte MXChange-Team weisst darauf hin, dass niemand aus dem Team Ihnen hierzu rechtsberatende Hinweise geben kann. Auch im Community-Forum erfolgt keine Rechtsberatung! Etwaige Postings werden entweder kommentarlos gelöscht oder gesperrt."); -define('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED', "Konfigurationsdaten stimmen nicht überein. Details entnehmen Sie bitte der Datei <u>inc/cache/debug.log</u>."); +addMessages(array( + 'ADMIN_CONFIG_YOOMEDIA_TITLE' => "Einstellungen für Yoo!Media Interface 2.0", + 'ADMIN_CONFIG_YOOMEDIA_ID' => "Ihre User-ID:", + 'ADMIN_CONFIG_YOOMEDIA_SID' => "Seiten-ID:", + 'ADMIN_CONFIG_YOOMEDIA_PASSWD' => "Interface-Passwort:", + 'ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD' => "Maximale Reloadsperre der Kampagnen in Stunden:", + 'ADMIN_CONFIG_YOOMEDIA_TM_MIN_WAIT' => "Mindestaufenthalt in Sekunden:", + 'ADMIN_CONFIG_YOOMEDIA_TM_CLICKS_REMAIN' => "Mindestanzahl der restlichen Klicks:", + 'ADMIN_CONFIG_YOOMEDIA_TM_MIN_PAY' => "Mindestvergütung der Kampagne:", + 'ADMIN_CONFIG_YOOMEDIA_EROTIC_ALLOWED' => "Kampagnen mit erotischen Inhalt anzeigen?", + 'ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE' => "Keine Erotik anzeigen", + 'ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE' => "Auch Erotik anzeigen", + 'ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY' => "Nur Erotik anzeigen", + 'ADMIN_CONFIG_YOOMEDIA_EROTIC_NOTE' => "<strong>Hinweise:</strong> Sollten Sie Erotik in Ihrem {?mt_word?} anzeigen wollen, so sollten Sie einen Jugendschutzbeauftragten haben und diesen im Impressum nennen. Das gesamte MXChange-Team weisst darauf hin, dass niemand aus dem Team Ihnen hierzu rechtsberatende Hinweise geben kann. Auch im Community-Forum erfolgt keine Rechtsberatung! Etwaige Postings werden entweder kommentarlos gelöscht oder gesperrt.", + 'ADMIN_CONFIG_YOOMEDIA_TEST_FAILED' => "Konfigurationsdaten stimmen nicht überein. Details entnehmen Sie bitte der Datei <u>{?CACHE_PATH?}debug.log</u>.", // Generic admin strings -define('ADMIN_YOOMEDIA_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist erschöpft. Bitte surfen Sie auf <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.YooMedia.de</a> und loggen Sie sich ein, um manuell Mails zu versenden."); -define('ADMIN_YOOMEDIA_INVALID_RESULT', "Ungültige Antwort von der API erhalten. Ist <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.yoomedia.de</a> erreichbar?"); -define('ADMIN_YOOMEDIA_PREPARE_MAIL', "Bonusmail vorbereiten"); -define('ADMIN_YOOMEDIA_REMOVE_MAIL', "Mail entfernen"); -define('ADMIN_YOOMEDIA_UNLIST_MAIL', "Aus Ausschlussliste nehmen"); -define('ADMIN_YOOMEDIA_TEXTMAIL_ALREADY_SENT', "Textmail wurde <span class=\"data\">%s</span> bereits versendet."); -define('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', "Textmail kann in <span class=\"data\">%s</span> erneut versendet werden."); -define('ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED', "Textmail wurde manuell gesperrt."); -define('ADMIN_LIST_YOOMEDIA_TITLE', "Alle Textmails von der Yoo!Media API 2.0 anzeigen"); -define('ADMIN_LIST_YOOMEDIA_NOTE', "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist!"); -define('ADMIN_YOOMEDIA_SEND_MAIL_TITLE', "Textmail aus Yoo!Media API 2.0 versenden"); -define('ADMIN_YOOMEDIA_RECEIVER_ARE_ALL_NOTE', "Es werden in der jeweiligen Kategorie alle verfügbaren Empfänger ausgewählt."); + 'ADMIN_YOOMEDIA_REQUESTS_DEPLETED' => "Ihr Abfragekonto der API ist erschöpft. Bitte surfen Sie auf <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.YooMedia.de</a> und loggen Sie sich ein, um manuell Mails zu versenden.", + 'ADMIN_YOOMEDIA_INVALID_RESULT' => "Ungültige Antwort von der API erhalten. Ist <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.yoomedia.de</a> erreichbar?", + 'ADMIN_YOOMEDIA_PREPARE_MAIL' => "Bonusmail vorbereiten", + 'ADMIN_YOOMEDIA_REMOVE_MAIL' => "Mail entfernen", + 'ADMIN_YOOMEDIA_UNLIST_MAIL' => "Aus Ausschlussliste nehmen", + 'ADMIN_YOOMEDIA_TEXTMAIL_ALREADY_SENT' => "Textmail wurde <span class=\"data\">%s</span> bereits versendet.", + 'ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN' => "Textmail kann in <span class=\"data\">%s</span> erneut versendet werden.", + 'ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED' => "Textmail wurde manuell gesperrt.", + 'ADMIN_LIST_YOOMEDIA_TITLE' => "Alle Textmails von der Yoo!Media API 2.0 anzeigen", + 'ADMIN_LIST_YOOMEDIA_NOTE' => "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist!", + 'ADMIN_YOOMEDIA_SEND_MAIL_TITLE' => "Textmail aus Yoo!Media API 2.0 versenden", + 'ADMIN_YOOMEDIA_RECEIVER_ARE_ALL_NOTE' => "Es werden in der jeweiligen Kategorie alle verfügbaren Empfänger ausgewählt.", // Subject lines -define('ADMIN_YOOMEDIA_SUBJECT_PREFIX', "Paidmail:"); -define('ADMIN_YOOMEDIA_ENTER_URL_NOTE', "Die URL wird automatisch für Sie konstruiert!"); + 'ADMIN_YOOMEDIA_SUBJECT_PREFIX' => "Admin-Paidmail:", + 'ADMIN_YOOMEDIA_ENTER_URL_NOTE' => "Die URL wird automatisch für Sie konstruiert!", // Admin header lines -define('ADMIN_YOOMEDIA_TM_ID', "Id"); -define('ADMIN_YOOMEDIA_TM_NAME', "Betreff"); -define('ADMIN_YOOMEDIA_TM_RELOAD', "Reloadsperre"); -define('ADMIN_YOOMEDIA_TM_WAIT', "Mindestaufenthalt"); -define('ADMIN_YOOMEDIA_TM_REMAIN', "Klicks übrig"); -define('ADMIN_YOOMEDIA_TM_PAY', "Vergütung"); -define('ADMIN_YOOMEDIA_TM_ACTIONS', "Aktionen"); + 'ADMIN_YOOMEDIA_TM_ID' => "Id", + 'ADMIN_YOOMEDIA_TM_NAME' => "Betreff", + 'ADMIN_YOOMEDIA_TM_RELOAD' => "Reloadsperre", + 'ADMIN_YOOMEDIA_TM_WAIT' => "Mindestaufenthalt", + 'ADMIN_YOOMEDIA_TM_REMAIN' => "Klicks übrig", + 'ADMIN_YOOMEDIA_TM_PAY' => "Vergütung", + 'ADMIN_YOOMEDIA_TM_ACTIONS' => "Aktionen", // Error messages for admin -define('ADMIN_YOOMEDIA_ERROR_FAILED', "Allgemeiner Fehler von API, nicht weiter spezifiziert."); -define('ADMIN_YOOMEDIA_ERROR_TITLE', "Fehler bei Abfrage der Yoo!Media API 2.0"); -define('ADMIN_YOOMEDIA_ERROR_WRONG_PASS', "Falsches Interfacepasswort angegeben."); -define('ADMIN_YOOMEDIA_ERROR_WRONG_SID', "Falsche Seiten-ID verwendet."); -define('ADMIN_YOOMEDIA_ERROR_WEBSITE_LOCKED', "Ihre Webseite (Werbefläche) wurde bei Yoo!Media gesperrt."); -define('ADMIN_YOOMEDIA_ERROR_API_DATA_ERROR', "Fehler in API-Daten erkannt."); -define('ADMIN_YOOMEDIA_ERROR_REQUESTS_DEPLETED', "Abfrageguthaben erschöpft."); -define('ADMIN_YOOMEDIA_ERROR_ZERO_RESULT', "Keine Buchungenz zur Auswahl gefunden."); -define('ADMIN_YOOMEDIA_ERROR_INCOMPLETE_REQUEST', "Abfragedaten sind nicht komplett."); + 'ADMIN_YOOMEDIA_ERROR_FAILED' => "Allgemeiner Fehler von API, nicht weiter spezifiziert.", + 'ADMIN_YOOMEDIA_ERROR_TITLE' => "Fehler bei Abfrage der Yoo!Media API 2.0", + 'ADMIN_YOOMEDIA_ERROR_WRONG_PASS' => "Falsches Interfacepasswort angegeben.", + 'ADMIN_YOOMEDIA_ERROR_WRONG_SID' => "Falsche Seiten-ID verwendet.", + 'ADMIN_YOOMEDIA_ERROR_WEBSITE_LOCKED' => "Ihre Webseite (Werbefläche) wurde bei Yoo!Media gesperrt.", + 'ADMIN_YOOMEDIA_ERROR_API_DATA_ERROR' => "Fehler in API-Daten erkannt.", + 'ADMIN_YOOMEDIA_ERROR_REQUESTS_DEPLETED' => "Abfrageguthaben erschöpft.", + 'ADMIN_YOOMEDIA_ERROR_ZERO_RESULT' => "Keine Buchungenz zur Auswahl gefunden.", + 'ADMIN_YOOMEDIA_ERROR_INCOMPLETE_REQUEST' => "Abfragedaten sind nicht komplett.", +)); -// +// [EOF] ?> diff --git a/inc/libs/active_functions.php b/inc/libs/active_functions.php index c191c5a954..b3b3726e5a 100644 --- a/inc/libs/active_functions.php +++ b/inc/libs/active_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Filter for adding link to "active list" function FILTER_ADD_LINK_ACTIVE_LIST () { // Are the extensions online and active there? - if ((EXT_IS_ACTIVE('active')) && (EXT_IS_ACTIVE('online'))) { + if (isExtensionActive('online')) { // Init content $content = array( - 'menu' => "<a class=\"menu_blur\" href=\"{?URL?}/modules.php?module=index&what=active\">".getConfig('menu_blur_spacer').GUEST_ACTIVE_LINK."</a>", + 'menu' => "<a class=\"menu_blur\" href=\"{?URL?}/modules.php?module=index&what=active\">".getConfig('menu_blur_spacer').getMessage('GUEST_ACTIVE_LINK')."</a>", 'what' => 'active' - ); + ); - // Add link to "we were active today" page - LOAD_TEMPLATE("guest_menu_bottom", false, $content); + // Add link to "we were active today" page + $GLOBALS['rows'] .= loadTemplate('guest_menu_bottom', true, $content); } // END - if } -// +// [EOF] ?> diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index d42f59fe26..ea9a4c14e9 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Check ACL for menu combination -function adminsCheckAdminAcl ($act, $wht) { +function adminsCheckAdminAcl ($action, $what) { // If action is login or logout allow allways! $default = 'allow'; - if (($act == 'login') || ($act == 'logout')) return true; + if (($action == 'login') || ($action == 'logout')) return true; // Default is deny $ret = false; // Get admin's ID - $aid = getCurrentAdminId(); + $adminId = getCurrentAdminId(); // Get admin's defult access right - $default = getAdminDefaultAcl($aid); + $default = getAdminDefaultAcl($adminId); - if (!empty($wht)) { + if (!empty($what)) { // Check for parent menu: // First get it's action value - $parent_action = getModeAction('admin', $wht); + $parent_action = getModeAction('admin', $what); // Check with this function... $parent = adminsCheckAdminAcl($parent_action, ''); @@ -71,31 +70,32 @@ function adminsCheckAdminAcl ($act, $wht) { // Shall I test for a main or sub menu? (action or what?) $acl_mode = 'failed'; - if ((GET_EXT_VERSION('cache') >= '0.1.2') && (count($GLOBALS['cache_array']['admin_acls']) > 0)) { + if ((getExtensionVersion('cache') >= '0.1.2') && (count($GLOBALS['cache_array']['admin_acls']) > 0)) { // Lookup in cache - if ((!empty($act)) && (isset($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid])) & ($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid] == $act)) { + if ((!empty($action)) && (isset($GLOBALS['cache_array']['admin_acls']['action_menu'][$adminId])) & ($GLOBALS['cache_array']['admin_acls']['action_menu'][$adminId] == $action)) { // Main menu line found - $acl_mode = $GLOBALS['cache_array']['admin_acls']['access_mode'][$aid]; + $acl_mode = $GLOBALS['cache_array']['admin_acls']['access_mode'][$adminId]; // Count cache hits - incrementConfigEntry('cache_hits'); - } elseif ((!empty($wht)) && (isset($GLOBALS['cache_array']['admin_acls']['what_menu'][$aid])) && ($GLOBALS['cache_array']['admin_acls']['what_menu'][$aid] == $wht)) { + incrementStatsEntry('cache_hits'); + } elseif ((!empty($what)) && (isset($GLOBALS['cache_array']['admin_acls']['what_menu'][$adminId])) && ($GLOBALS['cache_array']['admin_acls']['what_menu'][$adminId] == $what)) { // Check sub menu - $acl_mode = $GLOBALS['cache_array']['admin_acls']['access_mode'][$aid]; + $acl_mode = $GLOBALS['cache_array']['admin_acls']['access_mode'][$adminId]; // Count cache hits - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); } - } elseif (!EXT_IS_ACTIVE('cache')) { + } elseif (!isExtensionActive('cache')) { // Old version, so load it from database - if (!empty($act)) { + $result = false; + if (!empty($action)) { // Main menu - $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), __FUNCTION__, __LINE__); - } elseif (!empty($wht)) { + $result = SQL_QUERY_ESC("SELECT `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `admin_id`=%s AND `action_menu`='%s' LIMIT 1", + array(bigintval($adminId), $action), __FUNCTION__, __LINE__); + } elseif (!empty($what)) { // Sub menu - $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), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `admin_id`=%s AND `what_menu`='%s' LIMIT 1", + array(bigintval($adminId), $what), __FUNCTION__, __LINE__); } // Is an entry found? @@ -109,13 +109,14 @@ function adminsCheckAdminAcl ($act, $wht) { } // Check ACL and (maybe) allow - if (($default == 'allow') || (($default == 'deny') && ($acl_mode == 'allow')) || ($parent === true)) { + //* DEBUG: */ print 'default='.$default.',acl_mode='.$acl_mode.',parent='.intval($parent).'<br />'; + if (($default == 'allow') || (($default == 'deny') && ($acl_mode == 'allow')) || ($parent === true) || (($default == '***') && ($acl_mode == 'failed') && ($parent === false))) { // Access is granted $ret = true; } // END - if // Return value - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."[".__LINE__."]:act={$act},wht={$wht},default={$default},acl_mode={$acl_mode}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."[".__LINE__."]:act={$action},wht={$whatOR},default={$default},acl_mode={$acl_mode}<br />"); return $ret; } @@ -126,7 +127,7 @@ function generateAdminEmailLink ($email, $mod = 'admin') { // Create email link $result = SQL_QUERY_ESC("SELECT `id` FROM - `{!_MYSQL_PREFIX!}_admins` + `{?_MYSQL_PREFIX?}_admins` WHERE `email`='%s' LIMIT 1", @@ -135,10 +136,10 @@ LIMIT 1", // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Load userid - list($aid) = SQL_FETCHROW($result); + list($adminId) = SQL_FETCHROW($result); // Rewrite email address to contact link - $email = "{?URL?}/modules.php?module=".$mod."&what=admins_contct&admin=".bigintval($aid); + $email = "{?URL?}/modules.php?module=".$mod."&what=admins_contct&admin=".bigintval($adminId); } // END - if // Free memory @@ -153,30 +154,30 @@ LIMIT 1", } // Change a lot admin account -function adminsChangeAdminAccount ($POST) { +function adminsChangeAdminAccount ($postData) { // Begin the update $cache_update = 0; - foreach ($POST['login'] as $id => $login) { + foreach ($postData['login'] as $id => $login) { // Secure ID number $id = bigintval($id); // When both passwords match update admin account - if ($POST['pass1'][$id] == $POST['pass2'][$id]) { + if ($postData['pass1'][$id] == $postData['pass2'][$id]) { // Save only when both passwords are the same (also when they are empty) $add = ''; $cache_update = '1'; // Generate hash - $hash = generateHash($POST['pass1'][$id]); + $hash = generateHash($postData['pass1'][$id]); // Save password when set - if (!empty($POST['pass1'][$id])) $add = sprintf(", password='%s'", SQL_ESCAPE($hash)); + if (!empty($postData['pass1'][$id])) $add = sprintf(", password='%s'", SQL_ESCAPE($hash)); // Get admin's ID - $aid = getCurrentAdminId(); - $salt = substr(GET_ADMIN_HASH($aid), 0, -40); + $adminId = getCurrentAdminId(); + $salt = substr(getAdminHash($adminId), 0, -40); // Rewrite cookie when it's own account - if ($aid == $id) { + if ($adminId == $id) { // Set timeout cookie setSession('admin_last', time()); @@ -186,7 +187,7 @@ function adminsChangeAdminAccount ($POST) { // Update password cookie as well? if (!empty($add)) setSession('admin_md5', $hash); - } elseif (generateHash($POST['pass1'][$id], $salt) != getSession('admin_md5')) { + } elseif (generateHash($postData['pass1'][$id], $salt) != getSession('admin_md5')) { // Update password cookie setSession('admin_md5', $hash); } @@ -198,68 +199,73 @@ function adminsChangeAdminAccount ($POST) { // Update admin account if ($default == 'allow') { // Allow changing default ACL - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET -login='%s'".$add.", -email='%s', -default_acl='%s', -la_mode='%s' -WHERE `id`=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_admins` +SET + `login`='%s'".$add.", + `email`='%s', + `default_acl`='%s', + `la_mode`='%s' +WHERE + `id`=%s +LIMIT 1", array( - $login, - $POST['email'][$id], - $POST['mode'][$id], - $POST['la_mode'][$id], - $id + $login, + $postData['email'][$id], + $postData['mode'][$id], + $postData['la_mode'][$id], + $id ), __FUNCTION__, __LINE__); } else { // Do not allow it here - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET -login='%s'".$add.", -email='%s', -la_mode='%s' -WHERE `id`=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_admins` +SET + `login`='%s'".$add.", + `email`='%s', + `la_mode`='%s' +WHERE + `id`=%s +LIMIT 1", array( - $login, - $POST['email'][$id], - $POST['la_mode'][$id], - $id + $login, + $postData['email'][$id], + $postData['la_mode'][$id], + $id ), __FUNCTION__, __LINE__); } - // Purge cache - cachePurgeAdminMenu($id); - // Admin account saved - $message = ADMIN_ACCOUNT_SAVED; + $message = getMessage('ADMIN_ACCOUNT_SAVED'); } else { // Passwords did not match - $message = ADMINS_ERROR_PASS_MISMATCH; + $message = getMessage('ADMINS_ERROR_PASS_MISMATCH'); } // Display message if (!empty($message)) { - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } } // Remove cache file - runFilterChain('post_admin_edited', REQUEST_POST_ARRAY()); + runFilterChain('post_admin_edited', postRequestArray()); } // Make admin accounts editable -function adminsEditAdminAccount ($POST) { +function adminsEditAdminAccount ($postData) { // "Resolve" current's admin access mode $currMode = getAdminDefaultAcl(getCurrentAdminId()); // Begin the edit loop $OUT = ''; $SW = 2; - foreach ($POST['sel'] as $id => $selected) { + foreach ($postData['sel'] as $id => $selected) { // Secure ID number $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", - array($id), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `login`, `email`, `default_acl` AS mode, `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array($id), __FUNCTION__, __LINE__); if ((SQL_NUMROWS($result) == 1) && ($selected == 1)) { // Entry found $content = SQL_FETCHARRAY($result); @@ -280,31 +286,30 @@ function adminsEditAdminAccount ($POST) { $content['la_mode'] = generateOptionList('/ARRAY/', array('global', 'OLD', 'NEW'), array(getMessage('ADMINS_GLOBAL_LA_SETTING'), getMessage('ADMINS_OLD_LA_SETTING'), getMessage('ADMINS_NEW_LA_SETTING')), $content['la_mode']); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_edit_admins_row', true, $content); + $OUT .= loadTemplate('admin_edit_admins_row', true, $content); $SW = 3 - $SW; } } - define('__ADMINS_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_edit_admins'); + loadTemplate('admin_edit_admins', false, $OUT); } // Delete given admin accounts -function adminsDeleteAdminAccount ($POST) { +function adminsDeleteAdminAccount ($postData) { // Check if this account is the last one which cannot be deleted... - $result_main = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins`", __FUNCTION__, __LINE__); + $result_main = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins`", __FUNCTION__, __LINE__); $accounts = SQL_NUMROWS($result_main); SQL_FREERESULT($result_main); if ($accounts > 1) { // Delete accounts $OUT = ''; $SW = 2; - foreach ($POST['sel'] as $id => $selected) { + foreach ($postData['sel'] as $id => $selected) { // Secure ID number $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), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Entry found @@ -318,52 +323,47 @@ function adminsDeleteAdminAccount ($POST) { $content['id'] = $id; // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_del_admins_row', true, $content); + $OUT .= loadTemplate('admin_del_admins_row', true, $content); $SW = 3 - $SW; } } - define('__ADMINS_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_del_admins'); + loadTemplate('admin_del_admins', false, $OUT); } else { // Cannot delete last account! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_CANNOT_DELETE_LAST')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_CANNOT_DELETE_LAST')); } } // Remove the given accounts -function adminsRemoveAdminAccount ($POST) { +function adminsRemoveAdminAccount ($postData) { // Begin removal $cache_update = 0; - foreach ($POST['sel'] as $id => $del) { + foreach ($postData['sel'] as $id => $del) { // Secure ID number $id = bigintval($id); // Delete only when it's not your own account! if (($del == 1) && (getCurrentAdminId() != $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), __FUNCTION__, __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), __FUNCTION__, __LINE__); - - // Purge cache - cachePurgeAdminMenu($id); - $cache_update = '1'; } } // Remove cache if cache system is activated - runFilterChain('post_admin_deleted', REQUEST_POST_ARRAY()); + runFilterChain('post_admin_deleted', postRequestArray()); } // List all admin accounts function adminsListAdminAccounts() { // 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", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `login`, `email`, `default_acl` AS mode, `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `login` ASC", __FUNCTION__, __LINE__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Compile some variables @@ -375,28 +375,91 @@ function adminsListAdminAccounts() { $content['email_link'] = generateEmailLink($content['id'], 'admins'); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_list_admins_row', true, $content); + $OUT .= loadTemplate('admin_list_admins_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__ADMINS_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_list_admins'); + loadTemplate('admin_list_admins', false, $OUT); } // Filter for adding extra data to the query function FILTER_ADD_EXTRA_SQL_DATA ($add = '') { // Is the admins extension updated? (should be!) - if (GET_EXT_VERSION('admins') >= '0.3.0') $add .= ', `default_acl` AS def_acl'; - if (GET_EXT_VERSION('admins') >= '0.6.7') $add .= ', `la_mode`'; - if (GET_EXT_VERSION('admins') >= '0.7.2') $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure'; + if (getExtensionVersion('admins') >= '0.3.0') $add .= ', `default_acl` AS def_acl'; + if (getExtensionVersion('admins') >= '0.6.7') $add .= ', `la_mode`'; + if (getExtensionVersion('admins') >= '0.7.2') $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure'; // Return it return $add; } -// +// Sends out mail to all administrators +// IMPORTANT: Please use SEND_ADMIN_NOTIFCATION() for now! +function sendAdminsEmails ($subj, $template, $content, $UID) { + // Trim template name + $template = trim($template); + + // Load email template + $message = loadEmailTemplate($template, $content, $UID); + + // Check which admin shall receive this mail + $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC", + array($template), __FUNCTION__, __LINE__); + if (SQL_NUMROWS($result) == 0) { + // Create new entry (to all admins) + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')", + array($template), __FUNCTION__, __LINE__); + } else { + // Load admin IDs... + // @TODO This can be, somehow, rewritten + $adminIds = array(); + while ($content = SQL_FETCHARRAY($result)) { + $adminIds[] = $content['admin_id']; + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Init result + $result = false; + + // "implode" IDs and query string + $adminId = implode(',', $adminIds); + if ($adminId == '-1') { + if (isExtensionActive('events')) { + // Add line to user events + EVENTS_ADD_LINE($subj, $message, $UID); + } else { + // Log error for debug + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,UID=%s", + $template, + $subj, + $UID + )); + } + } elseif ($adminId == '0') { + // Select all email adresses + $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC", + __FUNCTION__, __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` ASC", + array($adminId), __FUNCTION__, __LINE__); + } + } + + // Load email addresses and send away + while ($content = SQL_FETCHARRAY($result)) { + sendEmail($content['email'], $subj, $message); + } // END - while + + // Free memory + SQL_FREERESULT($result); +} + +// [EOF] ?> diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index a420f9ee13..dcdadc8453 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,47 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } -function AUTOPURGE_ADD_POINTS($uid, $points) { - // 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", - array(bigintval($uid)), __FUNCTION__, __LINE__); - list($payout) = SQL_FETCHROW($result); - SQL_FREERESULT($result); +// Add points in autopurge-mode +function addPointsAutoPurge ($userid, $points) { + // Add points over the ref system directly now + addPointsDirectly('autopurge_add', $userid, $points); - if (($payout > 0) && (!empty($payout))) { - // Yes, he has. - $target = 'locked_points'; - } elseif ($payout == '0') { - // No, he has not - $target = 'points'; - } - - // Add points... - if (empty($payout)) { - // ... to jackpot account - ADD_JACKPOT($points); - if (empty($jackpot)) $jackpot = 0; - $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", - array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__); - - // Update mediadata as well - if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($target == 'points')) { - // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $points); - } // END - if - - // Send out mail to user - $message = LOAD_EMAIL_TEMPLATE('member_autopurge_points', translateComma($points), $uid); - sendEmail($uid, getMessage('AUTOPURGE_MEMBER_SUBJECT'), $message); - } + // Send out mail to user + $message = loadEmailTemplate('member_autopurge_points', translateComma($points), $userid); + sendEmail($userid, getMessage('AUTOPURGE_MEMBER_SUBJECT'), $message); } -// +// [EOF] ?> diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index d7a706b435..6fc6f55c17 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add points to user or begging rallye account -function BEG_ADD_POINTS ($uid, $points) { +function addPointsBeg ($userid, $points) { // Set mode depending on how many mails the member has to confirm $locked = false; if ((getConfig('ref_payout') > 0) && (getConfig('allow_direct_pay') != 'Y')) $locked = true; @@ -51,18 +50,19 @@ 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", - array($points, $uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `beg_points`=`beg_points`+%s WHERE `userid`=%s LIMIT 1", + array($points, $userid), __FUNCTION__, __LINE__); } else { // Add points to account + // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM('beg', $uid, $points, false, '0', $locked, strtolower(getConfig('beg_mode'))); + addPointsThroughReferalSystem('beg', $userid, $points, false, '0', $locked, strtolower(getConfig('beg_mode'))); } // Subtract begged points from member account if the admin has selected one - if (getConfig('beg_uid') > 0) { + if (getConfig('beg_userid') > 0) { // Subtract from this account - SUB_POINTS("beg_payout", getConfig('beg_uid'), $points); + subtractPoints('beg_payout', getConfig('beg_userid'), $points); } // END - if } diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 55aba4995f..445857c6ae 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' ! -function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) { +function addTurboBonus ($mid, $userid, $type) { // Shall we add bonus points? if (getConfig('bonus_active') != 'Y') return false; @@ -64,7 +63,7 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) { break; default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type)); break; } @@ -75,7 +74,7 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) { } // END - if // Check for entry - $rank = GET_TOTAL_DATA($uid, 'bonus_turbo', 'id', 'userid', true, sprintf(" AND `%s`=%s", $column, $mid)) + 1; + $rank = countSumTotalData($userid, 'bonus_turbo', 'id', 'userid', true, sprintf(" AND `%s`=%s", $column, $mid)) + 1; // Which rank? if ($rank == 1) { @@ -94,84 +93,99 @@ 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`+%s WHERE `userid`=%s LIMIT 1", - array(bigintval($uid), $points), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `turbo_bonus`=`turbo_bonus`+%s WHERE `userid`=%s LIMIT 1", + array(bigintval($userid), $points), __FUNCTION__, __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($userid), bigintval($mail), bigintval($bonus), $rank, $points ), __FUNCTION__, __LINE__); - if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points); + if ((getExtensionVersion('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD") && ($points > 0)) handleBonusPoints($points); } + // -function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { - $self = false; $OUT = ''; +function addBonusRanks ($data, $type, $userid) { + // Init variables + $self = false; $OUT = ''; $content = array(); + + // Clear rankings by default + setConfigEntry('__rankings', ''); // How many ranks do we have? $ranks = count(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", - array($type, $data, $uid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `level`, `points`, `timemark` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s AND `userid`=%s LIMIT 1", + array($type, $data, $userid), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data - list($rank, $points, $mark) = SQL_FETCHROW($result); + $content = merge_array($content, SQL_FETCHARRAY($result)); // Remember all values for later use - $self = true; $points = translateComma($points); + $self = true; // Transfer data to template - define('__YR_LEVEL' , $rank); - define('__YR_POINTS', $points); - define('__YR_TMARK' , generateDateTime($mark, '1')); + $content['yr_level'] = $content['level']; + $content['yr_points'] = translateComma($content['points']); + $content['yr_tmark'] = generateDateTime($content['timemark'], '1'); // Load template - define('__YOUR_RANKING_LINE', LOAD_TEMPLATE("show_bonus_yr", true)); + setConfigEntry('__rankings', loadTemplate('show_bonus_yr', true, $content)); } // END - if // Load rankings - $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')), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE %s=%s ORDER BY `level` ASC LIMIT %s", + array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start generating the ranking list $max = SQL_NUMROWS($result); - $SW = 2; + // Init variables + $SW = 2; $content = array(); + + // Output all ranks (levels) 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", - array($type, $data, $rank), __FUNCTION__, __LINE__); + $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), __FUNCTION__, __LINE__); // Nothing found by default - $userid = '---'; $points = '---'; + $content['userid'] = '---'; $content['points'] = '---'; // Are you one of them? if (SQL_NUMROWS($result_users) == 1) { // Load data - list($userid, $points, $mark) = SQL_FETCHROW($result_users); + $content = merge_array($content, SQL_FETCHARRAY($result_users)); // Translate comma - $points = translateComma($points); + $content['points'] = translateComma($content['points']); } // END - if + // Add more + $content['rank'] = $rank; + $content['sw'] = $SW; + // Output row $OUT .= "<tr> - <td class=\"bonus_rank_".$rank." bottom2 switch_sw".$SW."\"> ".$rank.".</td> - <td class=\"bonus_rank_".$rank." bottom2 switch_sw".$SW."\" align=\"center\">".$userid."</td> - <td class=\"bonus_rank_".$rank." bottom2 switch_sw".$SW."\" align=\"center\">".$points."</td> + <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\"> ".$content['level'].".</td> + <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\" align=\"center\">".$content['userid']."</td> + <td class=\"bonus_rank_".$content['level']." bottom2 switch_sw".$content['sw']."\" align=\"center\">".$content['points']."</td> </tr>\n"; + + // Switch color $SW = 3 - $SW; } // END - for - if (!$self) { + if ($self === false) { // If current user was not found set constant - define('__YOUR_RANKING_LINE', BONUS_RANK_YOU_ARE_NOT_FOUND); + // @TODO Try to find a way for rewriting this constant + setConfigEntry('__rankings', getMessage('BONUS_RANK_YOU_ARE_404')); } // END - if } else { // No entries found! @@ -180,17 +194,19 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { <div class=\"guest_failed\">".sprintf(getMessage('BONUS_NO_RANKS'), $data)."</div> </td> </tr>\n"; - define('__YOUR_RANKING_LINE', ''); } + + // Retutn content return $OUT; } + // -function BONUS_POINTS_HANDLER ($mode) { +function handleBonusPoints ($mode) { // Shall we add bonus points? if (getConfig('bonus_active') != 'Y') return; // Switch to jackpot-mode when no UID is supplied but userid-mode is selected - if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_uid') == '0')) { + if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == '0') && (isExtensionActive('jackpot'))) { // Update database & config updateConfiguration('bonus_mode', 'JACKPOT'); } // END - if @@ -204,40 +220,40 @@ function BONUS_POINTS_HANDLER ($mode) { } // Subtract points from... - switch (getConfig('bonus_mode')) - { + switch (getConfig('bonus_mode')) { case 'JACKPOT': // ... jackpot - if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) { + if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (getConfig('bonus_userid') > 0)) { // Check points amount first... - $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points'); + $total = countSumTotalData(getConfig('bonus_userid'), 'user_points', 'points') - countSumTotalData(getConfig('bonus_userid'), 'user_data', 'used_points'); if ($total >= $points) { // Subtract points from userid's account - SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points); + subtractPoints('bonus_payout_jackpot', getConfig('bonus_userid'), $points); } // END - if } // END - if break; case 'UID': // ... userid's account // Check his amount first - $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points'); + $total = countSumTotalData(getConfig('bonus_userid'), 'user_points', 'points') - countSumTotalData(getConfig('bonus_userid'), 'user_data', 'used_points'); if ($total >= $points) { // Subtract points from userid's account - SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points); - } else { + subtractPoints('bonus_payout_userid', getConfig('bonus_userid'), $points); + } elseif (isExtensionActive('jackpot')) { // Try to subtract from jackpot - $dummy = SUB_JACKPOT($points); + $dummy = subtractPointsFromJackpot($points); } break; } } -// -function BONUS_PURGE_EXPIRED_TURBO_BONUS() { +// Purges expired fast-click bonus entries +function purgeExpiredTurboBonus() { // Remove entries - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FUNCTION__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `timemark` < (UNIX_TIMESTAMP() - {?bonus_timeout?})", __FUNCTION__, __LINE__); + if (SQL_AFFECTEDROWS() > 0) { // Send out email to admin - sendAdminNotification(AUTOPURGE_ADMIN_TURBO_SUBJECT, 'admin_autopurge_turbo', SQL_AFFECTEDROWS(), ''); + sendAdminNotification(getMessage('AUTOPURGE_ADMIN_TURBO_SUBJECT'), 'admin_autopurge_turbo', SQL_AFFECTEDROWS(), ''); } // END - if } diff --git a/inc/libs/booking_functions.php b/inc/libs/booking_functions.php index 4297becaeb..b50bda8982 100644 --- a/inc/libs/booking_functions.php +++ b/inc/libs/booking_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - + die(); +} // END - if // Add a record entry ("mode" can be add/sub!) -function ADD_BOOKING_RECORD ($subject, $uid, $points, $mode) { +function addBookingRecord ($subject, $userid, $points, $mode) { // Is the sql_patches updated? - if (EXT_VERSION_IS_OLDER('sql_patches', '0.5.7')) { + if (isExtensionOlder('sql_patches', '0.5.7')) { // Abort here return; } // END - if // Add record entry here - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)", - array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)", + array($userid, $subject, $mode, $points), __FUNCTION__, __LINE__); +} + +// Filter for adding booking record +function FILTER_ADD_BOOKING_RECORD ($data) { + // Add a record + addBookingRecord($data['subject'], $data['userid'], $data['points'], $data['mode']); } // [EOF] diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 7cfc987a87..2140aaf316 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,418 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Caching class -class CacheSystem { - // Define variables - var $ret = 'init'; - var $path = ''; - var $inc = ''; - var $fqfn = ''; - var $pointer = false; - var $data = array(); - var $version = array(); - var $name = ''; - var $rebuilt = array(); - var $extension = '.cache'; - var $statusDone = 'done'; - - // Constructor - function CacheSystem ($interval, $path, $tested) { - // Failed is the default - $this->ret = 'failed'; - - // Remeber path - $this->path = $path; - - // Check if path exists - if ((isDirectory($path)) && ($tested === false)) { - // Make FQFN for dummy file - $fqfn = $path . 'dummy.tmp'; - - // Check if we can create a file inside the path - touch($fqfn, 'w'); - - // Is the file there? - if (isFileReadable($fqfn)) { - // Yes, we can do. So let's remove it - removeFile($fqfn); - - // Is there a .htaccess file? - if (isFileReadable($path . '.htaccess')) { - // Update database that we have tested it - updateConfiguration('cache_tested', 1); - - // All done! - $this->ret = $this->statusDone; - } else { - // Stop! Set a .htaccess file first - $this->ret = 'htaccess'; - } - } - } elseif ($tested) { - // System already tested - $this->ret = $this->statusDone; - } - } - - // Checks validity of cache file and if content is given - function loadCacheFile ($cacheName, $forceContent = false) { - // Remember cache file - $this->name = $cacheName; - - // Construct include filename for loadIncludeOnce() call - $this->inc = $this->path . $cacheName . $this->extension; - - // Construct FQFN (full qualified file name) - $this->fqfn = getConfig('PATH') . $this->inc; - - // Check if file exists and if version matches - $status = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches('cache'))); - - // Return status - return $status; - } - - // Initializes the cache file - function init () { - // This will destory an existing cache file! - if ($this->ret == $this->statusDone) { - // Create file - if ($this->isCacheReadable()) changeMode($this->fqfn, 0666); - $this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !"); - - // Add open PHP tag - fwrite($this->pointer, "<?php\n"); - - // Add default depency - $this->storeExtensionVersion('cache'); - } else { - // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - function addRow ($data) { - // Is the pointe rvalid? - if (is_resource($this->pointer)) { - // Write every array element to cache file - foreach ($data as $k => $v) { - // Write global cache array for immediate access - if ((substr($k, 0, 4) == 'ext_') && (isset($data['ext_name'])) && (isset($data['ext_id']))) { - if ($k != 'ext_name') { - $GLOBALS['cache_array']['extensions'][$k][$data['ext_name']] = $v; - } else { - $GLOBALS['cache_array']['extensions'][$k][$data['ext_id']] = $v; - } - if (($k == 'ext_keep') && ($v == 'Y')) { - $GLOBALS['cache_array']['active_extensions'][$data['ext_name']] = $v; - } // END - if - } elseif (is_array($v)) { - // Serialize and BASE64-encode the array - $v = base64_encode(serialize($v)); - } - - // Write cache line to file - fwrite($this->pointer, $this->rewriteEntry($k, $v)); - } - } else { - // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - function finalize () { - // Quit function when no pointer is set - if (is_resource($this->pointer)) { - // Write footer - fwrite($this->pointer, "?>\n"); - - // Close file add destroy handler - fclose($this->pointer); - - // Set rights - if ($this->isCacheReadable()) changeMode($this->fqfn, 0666); - - // Remove pointer - $this->pointer = false; - //* DEBUG: */ OUTPUT_HTML(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - FINALIZED!<br />"); - } // END - if - } - - function getArrayFromCache () { - // Is the cache already loaded? - if (isset($this->data[$this->name])) { - // Return it's content! - return $this->data[$this->name]; - } // END - if - - // Is the cache file there? - if ($this->isCacheReadable()) { - // Prepare temporary array - $data = array(); - $cache_version = null; - - // Load cache file - require($this->inc); - - // Is there an array? - if (is_array($data)) { - // Cache data - $this->data[$this->name] = $data; - - // Cache version found? - if ((is_array($cache_version)) && (count($cache_version) > 0)) { - // Remember it as well... - $this->version[$this->name] = $cache_version; - } else { - // Invalid cache so destroy it - $this->destroyCacheFile(); - - // Clear cached data - $this->data[$this->name] = array(); - } - - // Return cache - return $this->data[$this->name]; - } else { - // Cache problem detected! - $this->destroyCacheFile(); - } - } else { - // Cache file not found or not readable - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_LOAD', $this->fqfn))); - } - } - - // Destroy an existing cache file - function destroyCacheFile ($removeArray = false, $force = false) { - // Only run in regular output mode - if ((getOutputMode() != 0) && ($force === false)) { - // Debug message if allowed - if (isDebugModeEnabled()) { - // Debug message - debug_report_bug('Not removing cache ' . $this->name . ' in output_mode=' . getOutputMode()); - } // END - if - - // Abort here - return; - } // END - if - - // Is the cache file there? - if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) { - // Close cache - $this->finalize(); - - // Debug-mode enabled? - if (isDebugModeEnabled()) { - // Log removal of cache - DEBUG_LOG(__METHOD__, __LINE__, 'removing cache: ' . $this->name); - } // END - if - - // Remove cache file from system - removeFile($this->fqfn); - - // Shall we remove the array from memory? - if ($removeArray === true) { - // Debug message if allowed - if (isDebugModeEnabled()) { - // Debug message - DEBUG_LOG(__METHOD__, __LINE__, 'removing array!'); - } // END - if - - // Remove it from memory - unset($GLOBALS['cache_array'][$this->name]); - } // END - if - - // Is the file there? - if (!$this->isCacheReadable()) { - // The cache does no longer exist so kill the content - unset($this->data[$this->name]); - unset($this->version[$this->name]); - $this->rebuilt[$this->name] = true; - } else { - // Not removed! - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_UNLINK', $this->fqfn))); - } - } // END - if - } - - // Unused method: - function removeEntry ($search, $data, $array) { - if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) { - // Load cache into dummy array - $dummy = $this->getArrayFromCache(); - - // Search for key in array - $key = array_search($data, $dummy[$search]); - if (!empty($key)) { - // Key (hopefully) found? - foreach ($array as $a) { - // So we can remove all elements as requested - unset($dummy[$a][$key]); - } // END - foreach - - // Flush array to cache file - $this->init(); - - // Write array out - $this->writeArray($dummy); - - // Close cache file - $this->finalize(); - } - } else { - // Cannot write to cache! - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - function writeArray ($array) { - if (is_resource($this->pointer)) { - foreach ($array as $k => $v) { - if (is_array($v)) { - // Multi line(s) found - $LINE = ''; - foreach($v as $k2 => $v2) { - // Put every array element in a row... - $LINE .= $this->rewriteEntry($k, $v2); - } - } else { - // Single line found - $LINE = $this->rewriteEntry($k, $v); - } - - // Write line(s) - fwrite($this->pointer, $LINE); - } // END - foreach - } else { - // Cannot write array! - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - // Unused method - function replaceEntry ($search, $replace, $search_key, $array) { - if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) { - // Load cache into dummy array - $dummy = $this->getArrayFromCache(); - - // Check if $dummy is valid (prevents some errors) - if ((is_array($dummy)) && (isset($dummy[$search])) && (is_array($dummy[$search]))) { - // Search for key in array - $key_found = array_key_exists($search_key, $dummy[$search]); - if ($key_found == true) { - $key = $search_key; - // Key (hopefully) found? - foreach ($dummy as $a => $v) { - // So we can update all entries - if ($a == $search) { - // Update now... - $dummy[$a][$search_key] = $replace; - } // END - if - } // END - foreach - - // Flush array to cache file - $this->init(); - - // Write array out - $this->writeArray($dummy); - - // Close cache file - $this->finalize(); - } // END - if - } // END - if - } else { - // Cannot write to cache! - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - // Writes the version of given extension to the cache file - function storeExtensionVersion ($ext_name) { - // Valid cache pointer? - if (is_resource($this->pointer)) { - // Get extension version - $ext_ver = GET_EXT_VERSION($ext_name); - - // Write cache line to file - fwrite($this->pointer, "\$cache_version['".$ext_name."'] = \"".$ext_ver."\";\n"); - - // Add the extension version to object (DO NOT REMOVE IT! Endless loop...) - $this->version[$this->name][$ext_name] = $ext_ver; - //* DEBUG: */ OUTPUT_HTML(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />"); - } else { - // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED')); - } - } - - // Checks wether versions from cache and extension matches - function extensionVersionMatches ($ext_name) { - // Load cache (dummy) - $this->getArrayFromCache(); - - // Get extension version - $ext_ver = GET_EXT_VERSION($ext_name); - - // Debug messages - if (isset($this->version[$this->name][$ext_name])) { - //* DEBUG: */ OUTPUT_HTML(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): cache={$this->name},ext_name={$ext_name} - {$ext_ver}/{$this->version[$this->name][$ext_name]}<br />"); - } else { - // No cache version found! - DEBUG_LOG(__METHOD__, __LINE__, "Cache {$this->name} has missing version entry for extension {$ext_name}!"); - } - - // Compare both - return ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver)); - } - - // Rewrit the entry so it can be stored in cache file - // @TODO Add support for more types which break in last else-block - function rewriteEntry ($key, $value) { - // Init line - $line = ''; - - // String or non-string? ;-) - if (is_string($value)) { - // String... - $line = "\$data['".$key."'][] = \"".$value."\";\n"; - } elseif (is_null($value)) { - // Null - $line = "\$data['".$key."'][] = null;\n"; - } elseif (is_bool($value)) { - // Boolean value - if ($value === true) { - // True - $line = "\$data['".$key."'][] = true;\n"; - } else { - // False - $line = "\$data['".$key."'][] = false;\n"; - } - } else { - // Non-string - $line = "\$data['".$key."'][] = ".$value.";\n"; - } - - // Return line - return $line; - } - - // Getter for cache status - function getStatus () { - return $this->ret; - } - - // Checks wether the current cache file is readable - function isCacheReadable () { - return isIncludeReadable($this->inc); - } - -} // END - class + die(); +} // END - if // Destroy the cache on extension changes function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) { @@ -457,57 +47,48 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) { if (!isCacheInstanceValid()) return $data; // Remove cache - if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('extensions')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile(false); + foreach (array('config','extensions','modreg') as $cache) { + if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(false); + } // END - foreach // Return it return $data; } // Destroy the cache on changing admin -function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE () { +function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) { // Skip this step if the cache instance is not there if (!isCacheInstanceValid()) return false; // Remove cache - if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->destroyCacheFile(false); + if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->removeCacheFile(false); + + // Return the data + return $data; } // Destroy all cache files function FILTER_CACHE_DESTROY_ALL () { // Skip this step if the cache instance is not there - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Called!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isCacheInstanceValid()) return false; // Remove cache files - if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('extensions')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('refdepths')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('refsystem')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('themes')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('revision')) $GLOBALS['cache_instance']->destroyCacheFile(false); - if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->destroyCacheFile(false); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Done!'); + foreach (array('admins','admins_acls','config','extensions','modreg','refdepths','refsystem','themes','revision','filter','imprint') as $cache) { + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Trying to remove cache %s.", $cache)); + if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(false); + } // END - foreach + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); } // Filter for purging 'filter' cache function FILTER_CACHE_DESTROY_FILTER () { // Skip this step if the cache instance is not there - if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') == 'N')) return false; + if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') != 'Y')) return false; // Remove cache files - if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->destroyCacheFile(false); -} - -// Filter for purging entire admin menu cache -function FILTER_CACHE_PURGE_ADMIN_MENU () { - // Just call the function - cachePurgeAdminMenu(); + if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile(false); } -// +// [EOF] ?> diff --git a/inc/libs/country_functions.php b/inc/libs/country_functions.php index e8f7df36f5..c5d341e848 100644 --- a/inc/libs/country_functions.php +++ b/inc/libs/country_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,27 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Generate a human-readable country description with code -function COUNTRY_GENERATE_INFO ($id) { +function generateCountryInfo ($id) { + // Not found is the default + $ret = getMessage('COUNTRY_404'); + // Load code and description - $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `code`, `descr` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1", + array(bigintval($id)), __FUNCTION__, __LINE__); // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Load entry - list($code, $descr) = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result); // Construct human-readable description - $ret = sprintf("%s (%s)", $descr, $code); - } else { - // Not found! - $ret = COUNTRY_NOT_FOUND; - } + $ret = sprintf("%s (%s)", $content['descr'], $content['code']); + } // END - if // Free the result SQL_FREERESULT($result); @@ -66,5 +65,6 @@ function COUNTRY_GENERATE_INFO ($id) { // Return info return $ret; } -// + +// [EOF] ?> diff --git a/inc/libs/debug_functions.php b/inc/libs/debug_functions.php index 58677d5990..49e7e68f2e 100644 --- a/inc/libs/debug_functions.php +++ b/inc/libs/debug_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 27c33d2582..1efe4bf30c 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Generates a HTML table based on given data // @TODO Lame description -function DOUBLER_GENERATE_TABLE ($uid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') { +function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') { if (empty($cnt)) $cnt = 0; $add = ''; $DT_MODE = 0; - if ($uid > 0) { + if ($userid > 0) { // Load entries only from a single user - $add = " AND `userid`='".bigintval($uid)."'"; + $add = " AND `userid`='".bigintval($userid)."'"; $mode = 'member'; $COLS = '4'; $DT_MODE = '2'; - $NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND'); + $message = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND'); } else { // Guest mode! $mode = 'guest'; $COLS = '3'; $DT_MODE = '3'; - $NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND'); + $message = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND'); } if (($done == 'Y') && ($sort == 'ASC')) { @@ -70,10 +69,14 @@ function DOUBLER_GENERATE_TABLE ($uid = '0', $done = 'N', $ref = 'N', $sort = 'A } // List entries - $result = SQL_QUERY("SELECT userid, refid, points, timemark -FROM `{!_MYSQL_PREFIX!}_doubler` -WHERE completed='".$done."' AND is_ref='".$ref."'".$add." -ORDER BY timemark ".$sort." + $result = SQL_QUERY("SELECT + `userid`, `refid`, `points`, `timemark` +FROM + `{?_MYSQL_PREFIX?}_doubler` +WHERE + `completed`='".$done."' AND is_ref`='".$ref."'".$add." +ORDER BY + `timemark` ".$sort." LIMIT ".$limit, __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -81,7 +84,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Rewrite userid/refid only if admin is in - if (IS_ADMIN()) { + if (isAdmin()) { // Set links to admin area if ($content['userid'] > 0) { $content['userid'] = generateUserProfileLink($content['userid']); } else { $content['userid'] = '---'; } if ($content['refid'] > 0) { $content['refid'] = generateUserProfileLink($content['refid']); } else { $content['refid'] = '---'; } @@ -89,7 +92,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // Prepare data for the row template $content = array( - 'uid' => $content['userid'], + 'userid' => $content['userid'], 'rid' => $content['refid'], 'points' => translateComma($content['points']), 'stamp' => generateDateTime($content['timemark'], $DT_MODE), @@ -97,7 +100,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); ); // Load template and switch color - $OUT .= LOAD_TEMPLATE($mode . '_doubler_list_rows', true, $content); + $OUT .= loadTemplate($mode . '_doubler_list_rows', true, $content); $SW = 3 - $SW; } @@ -107,13 +110,13 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // List no entries $OUT = "<tr> <td colspan=\"".$COLS."\" align=\"center\" class=\"doubler_big_row bottom2\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, $NOT_FOUND)." + ".loadTemplate('admin_settings_saved', true, $message)." </td> </tr>\n"; } // Return template - return LOAD_TEMPLATE($mode . '_doubler_list', true, $OUT); + return loadTemplate($mode . '_doubler_list', true, $OUT); } // @@ -126,18 +129,18 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() { $points += getConfig('doubler_points') - getConfig('doubler_used'); } // END - if - if (getConfig('doubler_jackpot') == 'Y') { + if ((getConfig('doubler_jackpot') == 'Y') && (isExtensionActive('jackpot'))) { // Load jackpot - $jackpot = GET_JACKPOT_POINTS(); + $jackpot = getJackpotPoints(); if (!empty($jackpot)) $points += $jackpot; - } + } // END - if - if (getConfig('doubler_uid') > 0) { + if (getConfig('doubler_userid') > 0) { // Get user's points - $user = GET_TOTAL_DATA(getConfig('doubler_uid'), 'user_points', 'points'); + $user = countSumTotalData(getConfig('doubler_userid'), 'user_points', 'points'); $points += $user; - } + } // END - if // Return value return $points; diff --git a/inc/libs/events_functions.php b/inc/libs/events_functions.php index 08ac8d609a..62b1eef316 100644 --- a/inc/libs/events_functions.php +++ b/inc/libs/events_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index e23f772dd4..2ddd8df687 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if -// -function HOLIDAY_STOP_HOLIDAYS () { +// Stops all expired holidays +function stopHolidays () { // Let's find some expired holiday requests... $result_stop = SQL_QUERY("SELECT `userid`, `holiday_start`, `holiday_end`, `comments` FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `holiday_end` <= UNIX_TIMESTAMP() ORDER BY @@ -57,17 +56,17 @@ ORDER BY // We foud at least one $admin = ''; // Init SQLs - INIT_SQLS(); + initSqls(); // Process all found entries while ($content = SQL_FETCHARRAY($result_stop)) { // Stop holiday - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays` WHERE `userid`=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false)); // Unlock account - ADD_SQL(SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + addSql(SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_user_data` SET `holiday_active`='N', `holiday_activated`=0 WHERE @@ -83,7 +82,7 @@ LIMIT 1", ); // Send mail to user - $message = LOAD_EMAIL_TEMPLATE('member_holiday_unlock', $content, $content['userid']); + $message = loadEmailTemplate('member_holiday_unlock', $content, $content['userid']); sendEmail($content['userid'], getMessage('HOLIDAY_MEMBER_UNLOCK_SUBJ'), $message); // Remember userid for admin diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index ee0f7bde32..f72b7d5955 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // -function HTML_ADD_VALID_TAGS() { +function addValidHtmlTags() { $OUT = ''; if (!is_array($GLOBALS['html_tags'])) return ""; foreach ($GLOBALS['html_tags'] as $tag) { @@ -52,8 +51,9 @@ function HTML_ADD_VALID_TAGS() { $OUT = substr($OUT, 2); return $OUT; } + // -function HTML_CHECK_TAGS ($html) { +function checkHtmlTags ($html) { $test = stripslashes($html); while (ereg('<', $test) && ereg('>', $test)) { $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1)); @@ -67,8 +67,9 @@ function HTML_CHECK_TAGS ($html) { // Return tested code return $html; } + // -function HTML_INSERT_URLS ($text) { +function insertUrlsIntoHtml ($text) { $test = $text; // First replace URLs... @@ -81,7 +82,7 @@ function HTML_INSERT_URLS ($text) { } // END - foreach // Now replace the URL against anchor container and pray... - $text = substr($text, 0, strpos($text, $check2))."<a href=\"".DEREFERER($check)."\" target=\"_blank\">".$check."</a>".substr($text, strpos($text, $check2) + strlen($check)); + $text = substr($text, 0, strpos($text, $check2))."<a href=\"".generateDerefererUrl($check)."\" target=\"_blank\">".$check."</a>".substr($text, strpos($text, $check2) + strlen($check)); // Finally remove the url from testing string (or we have a loop and maybe server overload!) $test = substr($test, strpos($test, $check) + strlen($check)); @@ -146,14 +147,14 @@ function HTML_INSERT_URLS ($text) { } // Replace new-lines agains <br />-s and finally compile possible own HTML tags out... - return COMPILE_CODE(str_replace("\n", "<br />\n", $text)); + return compileCode(str_replace("\n", "<br />\n", $text)); } // Sends a HTML mail to the user function sendHtmlEmail($to, $subject, $message, $FROM) { - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // Send mail away as HTML - $FROM = "Content-Type: text/html\n" . $FROM; + $FROM = "Content-Type: text/html; charset=UTF-8\n" . $FROM; sendEmail($to, $subject, $message, 'N', $FROM); } } diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php new file mode 100644 index 0000000000..c64026d0c4 --- /dev/null +++ b/inc/libs/jackpot_functions.php @@ -0,0 +1,103 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/23/2009 * + * =============== Last change: 10/23/2009 * + * * + * -------------------------------------------------------------------- * + * File : jackpot_functions.php * + * -------------------------------------------------------------------- * + * Short description : Jackpot functions * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Jackpot-Funktionen * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + + +// Getter for jackpot points +function getJackpotPoints () { + // Default is zero + $jackpot = '0.00000'; + + // Read them + $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__); + + // Do we have an entry? + if (SQL_NUMROWS($result) == 0) { + // No, so create line + SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); + } else { + // Read the line + list($jackpot) = SQL_FETCHROW($result); + } + + // Free result + SQL_FREERESULT($result); + + // Return them + return $jackpot; +} + +// Adds points to the jackpot +function addPointsToJackpot ($points) { + // Get jackpot points for dummy + $jackpot = getJackpotPoints(); + + // Update points + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_jackpot` SET `points`=`points`+%s WHERE `ok`='ok' LIMIT 1", + array($points), __FUNCTION__, __LINE__); +} + +// Subtracts points from the jackpot +function subtractPointsFromJackpot ($points) { + // First failed + $ret = '-1'; + + // Get jackpot points for dummy + $jackpot = getJackpotPoints(); + + // Enougth points i jackpot? + 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", + array($points), __FUNCTION__, __LINE__); + $ret = $jackpot - $points; + } // END - if + + // Free memory + SQL_FREERESULT($result); + + // Return the result + return $ret; +} + +// [EOF] +?> diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index bfcd911183..1660d77796 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } -// -function MEDIA_UPDATE_ENTRY($keys_array, $mode, $value) { +// Update an entry +function updateMediadataEntry ($keys_array, $mode, $value) { if (is_array($keys_array) && ($value > 0)) { // Is an array so we can run it through 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), __FUNCTION__, __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), __FUNCTION__, __LINE__); } else { // Update entry @@ -63,11 +62,11 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __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), __FUNCTION__, __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), __FUNCTION__, __LINE__); } } @@ -75,22 +74,28 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__); } } -// -function MEDIA_GET_ENTRY ($key) { +// Getter for entry +function getMediadataEntry ($key) { // Return nothing by default $value = ''; // Check for entry - $result = SQL_QUERY_ESC("SELECT media_value FROM `{!_MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1", - array($key), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT media_value FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE media_key='%s' LIMIT 1", + array($key), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data list($value) = SQL_FETCHROW($result); - } + } // END - if // Return data return $value; } +// Filter for updating media data +function FILTER_UPDATE_MEDIADATA_ENTRY ($data) { + // Execute the filter function + updateMediadataEntry(array('total_points'), $data['mode'], $data['points']); +} + // ?> diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 2c77e3a802..e2f9b72270 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,39 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // -function NL_ADD_VALID_TAGS () { - $OUT = ''; - if (!is_array($GLOBALS['html_tags'])) return ""; - foreach ($GLOBALS['html_tags'] as $tag) { - $OUT .= ", ".strtoupper($tag); - } - $OUT = substr($OUT, 2); - return $OUT; -} - -// -function NL_CHECK_TAGS ($html) { - $test = stripslashes($html); - while (ereg('<', $test) && ereg('>', $test)) { - $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1)); - $check = str_replace('/', '', $check); - if (!in_array($check, $GLOBALS['html_tags'])) { - // Invalid tag found! - return ""; - } - $test = substr($test, strpos($test, '>') + 1); - } - // Return tested code - return $html; -} - -// -function NL_INSERT_URLS ($text) { +function insertNewsletterUrls ($text) { $test = $text; // First replace URLs... @@ -83,7 +55,7 @@ function NL_INSERT_URLS ($text) { } // END - foreach // Now replace the URL against anchor container and pray... - $text = substr($text, 0, strpos($text, $check2)) . DEREFERER($check) . substr($text, strpos($text, $check2) + strlen($check)); + $text = substr($text, 0, strpos($text, $check2)) . generateDerefererUrl($check) . substr($text, strpos($text, $check2) + strlen($check)); // Finally remove the url from testing string (or we have a loop and maybe server overload!) $test = substr($test, strpos($test, $check) + strlen($check)); @@ -149,24 +121,24 @@ function NL_INSERT_URLS ($text) { } // Compile possible own HTML tags out... - return COMPILE_CODE($text); + return compileCode($text); } -// -function SEND_NEWSLETTER ($to, $subject, $message, $mode) { +// Wrapper for sending newsletter and wrapping URLs / HTML mail +function sendNewsletter ($to, $subject, $message, $mode) { // Send mail away as HTML - if (REQUEST_POST('auto_urls') == 'Y') { + if (postRequestElement('auto_urls') == 'Y') { // Automatically insert URLs into newsletter - if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) { + if ((isExtensionActive('html_mail')) && ($mode == 'html')) { // Send HTML mail - sendEmail($to, $subject, HTML_INSERT_URLS($message), 'Y'); + sendEmail($to, $subject, insertUrlsIntoHtml($message), 'Y'); } else { // Send normal mail - sendEmail($to, $subject, NL_INSERT_URLS($message), 'N'); + sendEmail($to, $subject, insertNewsletterUrls($message), 'N'); } } else { // Regular send-out - if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) { + if ((isExtensionActive('html_mail')) && ($mode == 'html')) { sendEmail($to, $subject, $message, 'Y'); } else { sendEmail($to, $subject, $message, 'N'); diff --git a/inc/libs/nickname_functions.php b/inc/libs/nickname_functions.php index 766bd54cfe..08a94a206d 100644 --- a/inc/libs/nickname_functions.php +++ b/inc/libs/nickname_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,31 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Checks wether the nickname is active -function NICKNAME_IS_ACTIVE ($uidNick) { +function isNicknameOrUserid ($useridNick) { // By default nothing is found... $ret = false; // Found in cache? - if (isset($GLOBALS['cache_array']['nick_active'][$uidNick])) { + if (isset($GLOBALS['nickname_active'][$useridNick])) { // Use it directly - $ret = $GLOBALS['cache_array']['nick_active'][$uidNick]; - - // Increment cache counter - incrementConfigEntry('cache_hits'); + $ret = $GLOBALS['nickname_active'][$useridNick]; } else { // Nickname or userid used? - $nick = NICKNAME_GET_NICK($uidNick); + $nick = getNickname($useridNick); // Check for nickname - $ret = ($nick != $uidNick); + $ret = ($nick == $useridNick); // Put it in cache - $GLOBALS['cache_array']['nick_active'][$uidNick] = $ret; + $GLOBALS['nickname_active'][$useridNick] = $ret; } // Return nickname @@ -70,17 +66,14 @@ function NICKNAME_IS_ACTIVE ($uidNick) { } // "Getter" for nickname for specfied userid -function NICKNAME_GET_NICK ($userid) { +function getNickname ($userid) { // If not found... $ret = ''; // Found in cache? - if (isset($GLOBALS['cache_array']['nicknames'][$userid])) { + if (isset($GLOBALS['nicknames'][$userid])) { // Use it directly - $ret = $GLOBALS['cache_array']['nicknames'][$userid]; - - // Increment cache counter - incrementConfigEntry('cache_hits'); + $ret = $GLOBALS['nicknames'][$userid]; } else { // Init result $result = false; @@ -88,7 +81,7 @@ function NICKNAME_GET_NICK ($userid) { // Nickname or userid used? if (''.round($userid).'' === ''.$userid.'') { // Userid given - $result = SQL_QUERY_ESC("SELECT `nickname` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid` =%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `nickname` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` =%s LIMIT 1", array(bigintval($userid)), __FUNCTION__, __LINE__); // Found? @@ -97,7 +90,7 @@ function NICKNAME_GET_NICK ($userid) { list($ret) = SQL_FETCHROW($result); // Put it in cche - $GLOBALS['cache_array']['nicknames'][$userid] = $ret; + $GLOBALS['nicknames'][$userid] = $ret; } // END - if // Free result @@ -107,7 +100,7 @@ function NICKNAME_GET_NICK ($userid) { $ret = $userid; // Put it in cche - $GLOBALS['cache_array']['nicknames'][$userid] = $ret; + $GLOBALS['nicknames'][$userid] = $ret; } } @@ -115,5 +108,5 @@ function NICKNAME_GET_NICK ($userid) { return $ret; } -// +// [EOF] ?> diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index 0348497e65..fb7dfc7c89 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,50 +38,49 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Filter for updates/extends on the online list function FILTER_UPDATE_ONLINE_LIST () { // Do not update online list when extension is deactivated - if (!EXT_IS_ACTIVE('online', true)) return; + if (!isExtensionActive('online', true)) return; // Empty session? if (session_id() == '') { // This is invalid here! - debug_report_bug("Invalid session."); + debug_report_bug('Invalid session.'); } // END - if // Initialize variables - $uid = 0; $rid = 0; $MEM = 'N'; $ADMIN = 'N'; + $userid = 0; + $MEM = 'N'; + $ADMIN = 'N'; // Valid userid? - if ((isUserIdSet()) && (getUserId() > 0) && (IS_MEMBER())) { + if ((isUserIdSet()) && (getUserId() > 0) && (isMember())) { // Is valid user - $uid = getUserId(); + $userid = getUserId(); $MEM = 'Y'; } // END - if - if (IS_ADMIN()) { + if (isAdmin()) { // Is administrator $ADMIN = 'Y'; } // END - if - if (!empty($GLOBALS['refid'])) { - // Read cookie - $rid = bigintval($GLOBALS['refid']); - } // END - if + // Get refid + $rid = determineReferalId(); // Now search for the user - $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{!_MYSQL_PREFIX!}_online` WHERE `sid`='%s' LIMIT 1", - array(session_id()), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_online` WHERE `sid`='%s' LIMIT 1", + array(session_id()), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { // Then update it SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_online` + `{?_MYSQL_PREFIX?}_online` SET `module`='%s', `action`='%s', @@ -99,7 +98,7 @@ LIMIT 1", getModule(), getAction(), getWhat(), - $uid, + $userid, $rid, $MEM, $ADMIN, @@ -108,12 +107,12 @@ LIMIT 1", ), __FUNCTION__, __LINE__); } 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( getModule(), getAction(), getWhat(), - $uid, + $userid, $rid, $MEM, $ADMIN, @@ -126,8 +125,7 @@ LIMIT 1", SQL_FREERESULT($result); // Purge old entries - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - %s)", - array(getConfig('online_timeout')), __FUNCTION__, __LINE__); + SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - {?online_timeout?})", __FUNCTION__, __LINE__); } // [EOF] diff --git a/inc/libs/optimize_functions.php b/inc/libs/optimize_functions.php index 59d142b907..01ada00791 100644 --- a/inc/libs/optimize_functions.php +++ b/inc/libs/optimize_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Part taken from admin optimize module of PHPNuke (http://www.phpnuke.org) -function REPAIR_OPTIMIZE_DB () { +function repairOptimizeDatabase () { $ret = array(); $tot_data = 0; $tabs = 0; $opts = 0; $tot_idx = 0; $total_gain = 0; $tot_all = 0; - $result = SQL_QUERY_ESC("SHOW TABLE STATUS FROM `%s`", array(constant('__DB_NAME')), __FUNCTION__, __LINE__); + $result = SQL_QUERY("SHOW TABLE STATUS FROM `{?__DB_NAME?}`", __FUNCTION__, __LINE__); $tabs = SQL_NUMROWS($result); $ret['total_size'] = 0; $ret['total_tabs'] = $tabs; @@ -87,11 +86,11 @@ function REPAIR_OPTIMIZE_DB () { $ret['total_gain'] = $total_gain; // Insert new row - $result = SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_optimize_gain` (`gain`) VALUES (%s)", + $result = SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_optimize_gain` (`gain`) VALUES (%s)", array($total_gain), __FUNCTION__, __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`", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT COUNT(`id`) AS rows, SUM(`gain`) AS opti FROM `{?_MYSQL_PREFIX?}_optimize_gain`", __FUNCTION__, __LINE__); list($total_rows, $total_opti) = SQL_FETCHROW($result); // Free memory diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index e839164e53..2ae8f367d3 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,11 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if -function ORDER_SELECT_OPTION_LIST ($default) { +// Generates a selection list for mail order +function addOrderSelectionOptions ($default) { // Currenty the list is hardcoded... $LIST = array('userid', 'zip', 'country', 'email', 'birth_year', 'last_online', 'ref_clicks', 'total_logins', 'mail_orders'); $OUT = ''; @@ -56,5 +56,5 @@ function ORDER_SELECT_OPTION_LIST ($default) { return $OUT; } -// +// [EOF] ?> diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php new file mode 100644 index 0000000000..4cc7b7cf03 --- /dev/null +++ b/inc/libs/other_functions.php @@ -0,0 +1,69 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/21/2009 * + * =============== Last change: 10/21/2009 * + * * + * -------------------------------------------------------------------- * + * File : other_functions.php * + * -------------------------------------------------------------------- * + * Short description : Special functions for other extension * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Spezielle Funktion fuer Debug-Erweiterung * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Displays all SQL queries with num rows, affected rows and timings +function displayDebugSqls () { + // Walk through all SQLs + $OUT = ''; $SW = 2; $i = 1; + foreach ($GLOBALS['debug_sqls'] as $content) { + // Translate/add some data + $content['sw'] = $SW; + $content['i'] = $i; + $content['num_rows'] = translateComma($content['num_rows']); + $content['affected'] = translateComma($content['affected']); + $content['sql_str'] = secureString($content['sql_str']); + $content['timing'] = translateComma($content['timing'] * 1000); + + // Load row template + $OUT .= loadTemplate('admin_other_sqls_row', true, $content); + + // Switch color + $SW = 3 - $SW; $i++; + } // END - foreach + + // Load main template + loadTemplate('admin_other_sqls', false, $OUT); +} + +// [EOF] +?> diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 835bb7394f..a95ce7ce36 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,50 +38,51 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// -function PAYOUT_OUTPUT_PAYOUT_LIST ($points) { - // Replace german decimal comma with CPU's decimal dot - $points = convertCommaToDot($points); + die(); +} // END - if +// Outputs all payout methods the user has +function outputPayoutList ($points) { // Enougth points? if ($points > 0) { // Pay this out! - $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points -FROM `{!_MYSQL_PREFIX!}_payout_types` -WHERE %s >= min_points -ORDER BY type", array($points), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT + `id`, `type`, `rate`, `min_points` +FROM + `{?_MYSQL_PREFIX?}_payout_types` +WHERE + %s >= `min_points` +ORDER BY + `type` ASC", + array($points), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { - OUTPUT_HTML("<br /><div align=\"center\"> + outputHtml("<br /><div align=\"center\"> <div align=\"center\"><strong>{--PAYOUT_NOW--}:</strong></div><br /> <ul>"); // Now let's check while ($content = SQL_FETCHARRAY($result)) { // Compile the type - $content['type'] = COMPILE_CODE($content['type']); + $content['type'] = compileCode($content['type']); // Are these points enougth? if ($points >= $content['min_points']) { // Ok we found one - $P = $points * $content['rate'] - 0.5; - OUTPUT_HTML("<li>{--PAYOUT_IN--}: <strong><a href=\"{?URL?}/modules.php?module=login&what=payout&payout=".$content['id']."\">".$content['type']." ({--PAYOUT_MAX--} ".round($P)." ".$content['type'].")</a></strong></li>"); + $P = translateComma($points * $content['rate'] - 0.5); + outputHtml("<li>{--PAYOUT_IN--}: <strong><a href=\"{?URL?}/modules.php?module=login&what=payout&payout=".$content['id']."\">".$content['type']." ({--PAYOUT_MAX--} ".$P." ".$content['type'].")</a></strong></li>"); } // END - if } // END - while - OUTPUT_HTML("</ul></div>"); + outputHtml("</ul></div>"); } else { // No payout types setup so far - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div"); + loadTemplate('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div"); } // Free memory SQL_FREERESULT($result); } else { // Points is empty - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div"); + loadTemplate('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div"); } } diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php index 3f7f445f79..43db5b0138 100644 --- a/inc/libs/primera_functions.php +++ b/inc/libs/primera_functions.php @@ -3,7 +3,7 @@ * PrimeraApi * ------------------------------------------- * Mit dieser Klasse ist ein einfacher Primeratransfer von Ihrem Account - * zu dem Account eines bei Primusportal.de registrierten Mitglieds möglich. + * zu dem Account eines bei Primusportal.de registrierten Mitglieds m�glich. * *------------------ Aenderungen durch Roland Haeder 09.08.2008 ---------------- * Klasse umbenannt nach PrimeraApi, damit sie in das Framework besser passt. @@ -14,7 +14,7 @@ * die Methoden Pay,Query und Parse umbenannt. *------------------ Aenderungen durch Roland Haeder 09.08.2008 ---------------- * - * Die Einbindung des Interfaces geschieht folgendermaßen: + * Die Einbindung des Interfaces geschieht folgenderma�en: * 1. Einbindung der Klasse in Ihr PHP-Auszahlungsskript: * CODE: * require_once( "PFAD/ZU/DER/KLASSE/PrimeraApi.class.php" ); @@ -22,31 +22,31 @@ * $PPPassword = "passwort"; // Ihr Passwort bei Primusportal * * $Interface = new PrimeraApi($PPUsername, $PPPassword); - * 2. Durchführen einer Auszahlung: + * 2. Durchf�hren einer Auszahlung: * CODE: * $Status = $Interface->payPrimera($PayReceiver, $PayAmount, $PayDescription); * - * Wobei $PayReicer der Username des Empfängers bei + * Wobei $PayReicer der Username des Empf�ngers bei * Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera, - * die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen - * festgelegte kurze Beschreibung. Die Länge dieses Textes darf 100 Zeichen - * nicht überschreiten. Beispiel: + * die der Empf�nger erhalten soll. $PayDescription ist eine von Ihnen + * festgelegte kurze Beschreibung. Die L�nge dieses Textes darf 100 Zeichen + * nicht �berschreiten. Beispiel: * $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - ID: 12345"); - * 3. Überprüfung des Status (Rückgabecode): + * 3. �berpr�fung des Status (R�ckgabecode): * CODE: * if (!$status) { * // Ein Fehler ist aufgetreten - * // Fehlerbehandlung hier einfügen... + * // Fehlerbehandlung hier einf�gen... * }else { - * // Auszahlung erfolgreich durchgeführt - * // Führen Sie hier Ihre Datenbankabfragen durch, um die Auszahlung zu - * // bestätigen... + * // Auszahlung erfolgreich durchgef�hrt + * // F�hren Sie hier Ihre Datenbankabfragen durch, um die Auszahlung zu + * // best�tigen... * } * - * Die komplette Rückgabe des Interfaces wird als assoziatives Array in der Klassen- + * Die komplette R�ckgabe des Interfaces wird als assoziatives Array in der Klassen- * variable __data gespeichert: - * __data => array('status' => Rückgabecode (PI_DONE, PI_SENDER_ERROR, ...), - * "statustext" => Status in Worten (z.B.: "Transaktion erfolgreich durchgeführt"), + * __data => array('status' => R�ckgabecode (PI_DONE, PI_SENDER_ERROR, ...), + * "statustext" => Status in Worten (z.B.: "Transaktion erfolgreich durchgef�hrt"), * ") * * @@ -63,7 +63,7 @@ class PrimeraApi { const PI_ERROR = -1; /** - * Statuscode für erfolgreich ausgeführte Transaktion + * Statuscode f�r erfolgreich ausgef�hrte Transaktion */ const PI_DONE = 200; @@ -103,7 +103,7 @@ class PrimeraApi { const PI_GET_PRIMERA_DONE = 701; /** - * URL für das Interface auf dem Primusserver: + * URL f�r das Interface auf dem Primusserver: */ var $host = "http://www.primusportal.de"; var $path = "/transfer.interface.2.0.php"; @@ -130,7 +130,7 @@ class PrimeraApi { } /** - * Anfrage senden und Rückgabecode in Variable speichern + * Anfrage senden und R�ckgabecode in Variable speichern */ function queryApi ( $data = array() ) { // Base64-encode username and password hash @@ -154,7 +154,7 @@ class PrimeraApi { } /** - * Funktion parst die Rückgabe vom Transferskript: + * Funktion parst die R�ckgabe vom Transferskript: */ function parseContent ( $content ) { $x = explode("\n", $content); @@ -169,7 +169,7 @@ class PrimeraApi { } /** - * @param int/string $Receiver UserID / Username des Empfängers + * @param int/string $Receiver UserID / Username des Empf�ngers * @param int $Amount Betrag in ganzzahligen Primera * @param string $Description Beschreibung (Sichtbar in Einzelauflistung) */ @@ -190,7 +190,7 @@ class PrimeraApi { } /** - * Überprüft den Status eines Primus-Users + * �berpr�ft den Status eines Primus-Users * - existiert der User * - ist er aktiv * @param string/int $User Userid / Username @@ -234,20 +234,21 @@ class PrimeraApi { // Function to test the Primera API by getting the amount. If the returned value // is not false the API data is valid, else invalid -function PRIMERA_TEST_API () { +function testPrimeraApi () { // Get new instance - $api = new PrimeraApi(REQUEST_POST('primera_api_name'), REQUEST_POST('primera_api_md5')); + $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5')); // Was that fine? return ($api->getPrimera() !== false); } + // Execute the withdraw of a sponsor only! -function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { +function executePrimeraWithdraw ($primusNick, $userMd5, $amount) { // Is the sponsor extension installed? - if (!EXT_IS_ACTIVE('sponsor')) { + if (!isExtensionActive('sponsor')) { // No, abort here return false; - } elseif (!IS_SPONSOR()) { + } elseif (!isSponsor()) { // No sponsor, not allowed to withdraw! return false; } @@ -256,23 +257,23 @@ function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { $api = new PrimeraApi($primusNick, $userMd5); // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), getSession('sponsorid')))."\";"; - eval($eval); + eval("\$purpose = \"".compileCode(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), getSession('sponsorid')))."\";"); // Pay the Primera return $api->payPrimera($primusNick, $amount, $purpose); } + // Execute the payout -function PRIMERA_EXECUTE_PAYOUT ($primusNick, $userMd5, $amount) { +function executePrimeraPayout ($primusNick, $userMd5, $amount) { // Get new instance $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5')); // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getUserId()))."\";"; - eval($eval); + eval("\$purpose = \"".compileCode(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getUserId()))."\";"); // Pay the Primera return $api->payPrimera($primusNick, $amount, $purpose); } + // [EOF] ?> diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 5f32d7974f..ef1624286c 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if -// -function RALLYE_AUTOSTART_RALLYES ($result) { - // Global data array for LOAD_EMAIL_TEMPLATE() +// Auto-start referal rallyes +function autostartReferalRallyes ($result) { + // Global data array for loadEmailTemplate() global $DATA; $DATA = array(); // Load all rallyes (usally we have only one rallye active per time! list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); + + // Free result SQL_FREERESULT($result); // Set notified to Y - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FUNCTION__, __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` ASC", __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `notified`='Y' WHERE `id`=%s LIMIT 1", + array(bigintval($id)), __FUNCTION__, __LINE__); - // Transfer all neccessary data to the global $DATA array - $DATA['uid_cnt'] = SQL_NUMROWS($result_user); + // Transfer all neccessary data to the $DATA array + $DATA['userid_cnt'] = countSumTotalData('CONFIRMED','user_data','userid','status',true); $DATA['start'] = generateDateTime($start, '2'); $DATA['end'] = generateDateTime($end , '2'); $DATA['now_t'] = generateDateTime(time(), '2'); @@ -68,41 +66,58 @@ function RALLYE_AUTOSTART_RALLYES ($result) { $DATA['id'] = $id; // ID for the rallye details link // Determine min_users and min_prices - $DATA['min_users'] = RALLYE_DETERMINE_MIN_USERS($min_users); - $DATA['min_prices'] = RALLYE_DETERMINE_MIN_PRICES($min_prices); + $DATA['min_users'] = determineReferalRallyeMinimumUsers($min_users); + $DATA['min_prices'] = determineReferalRallyeMinimumPrices($min_prices); // Load prices - $prices = RALLYE_ADD_PRICES($id); + $prices = addReferalRallyePrices($id); + + // Query all users + $result_user = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FUNCTION__, __LINE__); // Let's begin with the userids... while ($content = SQL_FETCHARRAY($result_user)) { $un = false; // Get refs by userid - $cnt = RALLYE_GET_REFCOUNT($content['userid']); + $cnt = getReferalRallyeRefsCount($content['userid']); if (empty($cnt)) $cnt = 0; // Added prevent some unknown troubles... :-? // Check if line is already included... - $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1", - array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__); + $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1", + array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_ref) == 0) { // Free memory SQL_FREERESULT($result_ref); // 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 -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($content['userid'])), __FUNCTION__, __LINE__); + $result_ref = SQL_QUERY_ESC("SELECT + SUM(p.points) AS points +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 >= {?ref_payout?} AND + p.ref_depth=1 AND + p.points > 0 + AND d.userid=%s", + array(bigintval($content['userid'])), __FUNCTION__, __LINE__); + + // Get points list($cpoints) = SQL_FETCHROW($result_ref); + + // Free result SQL_FREERESULT($result_ref); 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($content['userid']), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__); $un = true; @@ -114,14 +129,14 @@ VALUES ('%s','%s','%s','%s')", // Shall I notify this member? if (($notify == 'Y') && ($un)) { // Load email template and send it to the user - $message = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $content['userid']); + $message = loadEmailTemplate('member_rallye_notify', array('prices' => $prices), $content['userid']); sendEmail($content['userid'], sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $message); } // END - if } // END - while // Choose the right admin template - $templ = "admin_rallye_no_notify"; - if ($notify == 'Y') $templ = "admin_rallye_notify"; + $templ = 'admin_rallye_no_notify'; + if ($notify == 'Y') $templ = 'admin_rallye_notify'; // Send email to admin sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, '0'); @@ -129,8 +144,9 @@ VALUES ('%s','%s','%s','%s')", // Free memory SQL_FREERESULT($result_user); } + // -function RALLYE_ADD_PRICES ($rallye, $mode='email') { +function addReferalRallyePrices ($rallye, $mode='email') { // Output mode switch($mode) { case 'email': $mode = "\n"; break; @@ -138,7 +154,15 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') { } // END - switch // Load prices - $result_prices = SQL_QUERY("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id='".$rallye."' ORDER BY price_level", __FUNCTION__, __LINE__); + $result_prices = SQL_QUERY("SELECT + `price_level`, `points`, `info` +FROM + `{?_MYSQL_PREFIX?}_rallye_prices` +WHERE + `rallye_id`='".$rallye."' +ORDER BY + `price_level` ASC", + __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_prices) > 0) { // Load prices if ($mode == "\n") $prices = "{--RALLYE_MEMBER_PRICES_ADDED--}:".$mode."------------------------------".$mode; @@ -148,9 +172,9 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') { if (!empty($content['info'])) { $prices .= $content['info']; } else { - $prices .= $content['points']." {?POINTS?}"; + $prices .= $content['points'] . ' {?POINTS?}'; } - $prices .= "".$mode; + $prices .= '' . $mode; } // END - if // Free memory @@ -161,57 +185,79 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') { } // Add last line for email mode - if ($mode == "\n") $prices .= "------------------------------"; + if ($mode == "\n") $prices .= '------------------------------'; // Return price list return $prices; } // -function RALLYE_ADD_TOPUSERS ($rallye, $default=0) { +function addReferalRallyeTopUsers ($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", - array(bigintval($rallye)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", + array(bigintval($rallye)), __FUNCTION__, __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 -ON u.userid=r.userid -WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC", - array(bigintval($rallye)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT + 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)), __FUNCTION__, __LINE__); // Load users $DATA = array( - 'uid' => array(), + 'userid' => array(), 'ref' => array(), 'cpoints' => array() ); while ($content = SQL_FETCHARRAY($result)) { // Get current refs - $cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']); + $cnt = getReferalRallyeRefsCount($content['userid'], $content['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 -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($content['userid']), getConfig('ref_payout')), __FUNCTION__, __LINE__); + $result_ref = SQL_QUERY_ESC("SELECT + 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($content['userid']), getConfig('ref_payout')), __FUNCTION__, __LINE__); + + // Get points list($refpoints) = SQL_FETCHROW($result_ref); + + // Free result SQL_FREERESULT($result_ref); if (empty($refpoints)) $refpoints = 0; // Init userid for list - $_uid = '---'; + $_userid = '---'; + // List only users with at least one ref! - //* DEBUG: */ OUTPUT_HTML("*".$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints."*<br />"); - if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ''; } + //* DEBUG: */ outputHtml("*".$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints."*<br />"); + if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_userid = $content['userid']; } else { $cnt = ''; } // Save values to array - $DATA['uid'][] = $_uid; + $DATA['userid'][] = $_userid; $DATA['ref'][] = $cnt; $DATA['cpoints'][] = $content['curr_points']; } // END - while @@ -223,51 +269,61 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT array_pk_sort($DATA, array('ref', 'cpoints'), 0, 1, true); // Generate table - $OUT = LOAD_TEMPLATE('guest_rallye_header', true); + $OUT = loadTemplate('guest_rallye_header', true); $SW = 2; for ($idx = 0; $idx < $prices; $idx++) { - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = '---'; + if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---'; if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = '---'; // Add row $OUT .= "<tr> <td class=\"switch_sw".$SW." bottom2\"> ".($idx+1).".</td> <td align=\"center\" class=\"switch_sw".$SW." bottom2\">"; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; + $OUT .= $DATA['userid'][$idx]; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; $OUT .= "</td> <td align=\"center\" class=\"switch_sw".$SW." bottom2\">"; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; $OUT .= "</td> </tr>\n"; $SW = 3 - $SW; } // END - for // Add footer - $OUT .= LOAD_TEMPLATE("guest_rallye_footer", true); + $OUT .= loadTemplate('guest_rallye_footer', true); // And finnally return the output return $OUT; } + // Run this function only when a new member has confirmed his email address! -function RALLYE_AUTOADD_USER ($uid) { +function addUserToReferalRallye ($userid) { global $DATA; $add = ''; // Updated extension? - if (GET_EXT_VERSION('rallye') >= '0.2.0') { - $add .= ", min_users, min_prices"; + if (getExtensionVersion('rallye') >= '0.2.0') { + $add .= ", `min_users`, `min_prices`"; } // 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", __FUNCTION__, __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", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Init variables $min_users = 0; $min_prices = 0; // Load data - if (GET_EXT_VERSION('rallye') >= '0.2.0') { + if (getExtensionVersion('rallye') >= '0.2.0') { list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); } else { list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result); @@ -277,15 +333,15 @@ 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", - array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1", + array(bigintval($id), bigintval($userid)), __FUNCTION__, __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)), __FUNCTION__, __LINE__); + array(bigintval($id), bigintval($userid)), __FUNCTION__, __LINE__); } // END - if // Free memory @@ -299,32 +355,34 @@ VALUES ('%s','%s','0')", $DATA['title'] = $title; $DATA['id'] = $id; // ID for the rallye details link $DATA['ref'] = 0; - $DATA['refs'] = GET_TOTAL_DATA($uid, 'user_data', 'userid', "refid", true); + $DATA['refs'] = countSumTotalData($userid, 'user_data', 'userid', "refid", true); // Load prices - $prices = RALLYE_ADD_PRICES($id); + $prices = addReferalRallyePrices($id); // Determine min_users/prices tring - $DATA['min_users'] = RALLYE_DETERMINE_MIN_USERS($min_users); - $DATA['min_prices'] = RALLYE_DETERMINE_MIN_PRICES($min_prices); + $DATA['min_users'] = determineReferalRallyeMinimumUsers($min_users); + $DATA['min_prices'] = determineReferalRallyeMinimumPrices($min_prices); // Send notification to member - $message = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $uid); - sendEmail($uid, sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $message); + $message = loadEmailTemplate('member_rallye_notify', array('prices' => $prices), $userid); + sendEmail($userid, sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $message); } // END - if } // END - if } // -function RALLYE_EXPIRE_RALLYES ($result) { +function markReferalRallyesAsExpired ($result) { global $DATA; // Load rallye data list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); + + // Free result SQL_FREERESULT($result); // Load users array (!) with assigned prices - $prices = RALLYE_LOAD_USERS_ARRAY($id); + $prices = getArrayFromReferalRallyeUsers($id); // Init array $DATA = array(); $cnt = 0; @@ -336,25 +394,25 @@ function RALLYE_EXPIRE_RALLYES ($result) { // Just count... $total = 0; - foreach($prices['uid'] as $key => $uid) { + foreach($prices['userid'] as $key => $userid) { // Check status // 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` + `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", - array(bigintval($uid)), __FUNCTION__, __LINE__); + array(bigintval($userid)), __FUNCTION__, __LINE__); list($active) = SQL_FETCHROW($result); SQL_FREERESULT($result); $prices['active'][$key] = $active; // Allow valid and active users with at least one ref to get points - if (($uid > 0) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) { + if (($userid > 0) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) { $total++; } // END - if } // END - foreach @@ -366,13 +424,13 @@ LIMIT 1", } // 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)), __FUNCTION__, __LINE__); - // Run array through (by uid is the most important 2nd-level-array) - foreach($prices['uid'] as $key => $uid) { + // Run array through (by userid is the most important 2nd-level-array) + foreach($prices['userid'] as $key => $userid) { // Allow valid and active users with at least one ref to get points - if (($uid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) { + if (($userid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) { // Transfer data to array for the mail template $DATA['level'] = $prices['level'][$key]; $DATA['points'] = $prices['points'][$key]; @@ -396,7 +454,7 @@ LIMIT 1", if ($DATA['points'] > 0) { // Add points directly to user's account - ADD_POINTS_REFSYSTEM_DIRECT('rallye_winner' . $winnerLevel, $uid, $DATA['points']); + addPointsDirectly('rallye_winner' . $winnerLevel, $userid, $DATA['points']); } // END - if if ($notify == 'Y') { @@ -413,23 +471,23 @@ LIMIT 1", $template = 'member_rallye_expired' . $winnerLevel; // Load template - $message = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid); - sendEmail($uid, sprintf(getMessage('RALLYE_MEMBER_EXPIRED_SUBJ'), $DATA['level']), $message); + $message = loadEmailTemplate($template, $DATA, $userid); + sendEmail($userid, sprintf(getMessage('RALLYE_MEMBER_EXPIRED_SUBJ'), $DATA['level']), $message); } // END - if // Count userid $cnt++; - $users['uid'][$uid] = $uid; - $users['poi'][$uid] = $DATA['infos']; + $users['userid'][$userid] = $userid; + $users['poi'][$userid] = $DATA['infos']; } // END - if } // END - foreach // Select template depending on notfication is switch on / off if ($notify == 'Y') { $templ = "admin_rallye_expired"; - } elseif (is_array($users['uid'])) { + } elseif (is_array($users['userid'])) { $templ = "admin_rallye_expired_no"; - $cnt = RALLYE_LOAD_USER_DATA($users); + $cnt = getReferalRallyeUserDataFromArray($users); } // Send mail to admin @@ -440,24 +498,24 @@ LIMIT 1", } // -function RALLYE_LOAD_USER_DATA ($uids_array) { +function getReferalRallyeUserDataFromArray ($userIds) { // Implode user ids - $uid_string = implode(',', $uids_array['uid']); + $userid_string = implode(',', $userIds['userid']); // Init result string $ret = ''; // 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` ASC LIMIT %s", - array($uid_string, count($uids_array)), __FUNCTION__, __LINE__); + $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` ASC LIMIT %s", + array($userid_string, count($userIds)), __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { // Construct the message masked and add it $ret .= sprintf("%s %s %s (%s) - %s\n", - translateGender($content['gender']), - $content['surname'], - $content['family'], - $content['email'], - $uids_array['poi'][$content['userid']] + translateGender($content['gender']), + $content['surname'], + $content['family'], + $content['email'], + $userIds['poi'][$content['userid']] ); } // END - while @@ -466,7 +524,7 @@ function RALLYE_LOAD_USER_DATA ($uids_array) { } // -function RALLYE_LOAD_PRICES_ARRAY ($rallye) { +function getArrayFromReferalRallyePrices ($rallye) { // Init multi array $prices = array( 'level' => array(), @@ -475,7 +533,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)), __FUNCTION__, __LINE__); // Transfer elements @@ -493,39 +551,54 @@ function RALLYE_LOAD_PRICES_ARRAY ($rallye) { } // -function RALLYE_LOAD_USERS_ARRAY ($rallye) { +function getArrayFromReferalRallyeUsers ($rallye) { // Fix zero points to 0.00000 if (getConfig('ref_payout') == '0') setConfigEntry('ref_payout', '0.00000'); // Init multi array $users = array( - 'uid' => array(), + 'userid' => array(), 'ref' => array(), 'cpoints' => array(), ); - // 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` ASC", - array(bigintval($rallye)), __FUNCTION__, __LINE__); + // Load users userid 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` ASC", + array(bigintval($rallye)), __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result_user)) { // Load current ref count - $cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']); + $cnt = getReferalRallyeRefsCount($content['userid'], $content['refs']); // 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 -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($content['userid'])), __FUNCTION__, __LINE__); + $result_ref = SQL_QUERY_ESC("SELECT + SUM(p.points) AS points +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 >= {?ref_payout?} AND + p.ref_depth=1 AND + p.points > 0 AND + d.userid=%s +LIMIT 1", + array(bigintval($content['userid'])), __FUNCTION__, __LINE__); + + // Get points list($refpoints) = SQL_FETCHROW($result_ref); + + // Free result SQL_FREERESULT($result_ref); // Fix empty refpoints if (empty($refpoints)) $refpoints = 0; // Store calculated new refs to array - $users['uid'][] = $content['userid']; + $users['userid'][] = $content['userid']; $users['ref'][] = abs($cnt - $content['refs']); $users['cpoints'][] = $refpoints - $content['curr_points']; } // END - while @@ -537,14 +610,14 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND array_pk_sort($users, array("ref", "cpoints"), 0, 1, true); // Load prices array (!) - $prices = RALLYE_LOAD_PRICES_ARRAY($rallye); + $prices = getArrayFromReferalRallyePrices($rallye); // Merge users into prices - foreach ($prices['level'] as $k => $lvl) { + foreach ($prices['level'] as $k => $level) { // We only need to check one element in $users, see above while() block - if (isset($users['uid'][$k])) { - $prices['uid'][$k] = $users['uid'][$k]; - if (empty($prices['uid'][$k])) $prices['uid'][$k] = '---'; + if (isset($users['userid'][$k])) { + $prices['userid'][$k] = $users['userid'][$k]; + if (empty($prices['userid'][$k])) $prices['userid'][$k] = '---'; $prices['ref'][$k] = $users['ref'][$k]; if (empty($prices['ref'][$k])) $prices['ref'][$k] = '---'; $prices['cpoints'][$k] = $users['cpoints'][$k]; @@ -556,30 +629,30 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND } // -function RALLYE_LIST_WINNERS ($rallye, $default=0) { +function addReferalRallyeWinners ($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` ASC", + $result_prices = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC", array(bigintval($rallye)), __FUNCTION__, __LINE__); $prices = SQL_NUMROWS($result_prices); SQL_FREERESULT($result_prices); // Load data - $DATA = RALLYE_LOAD_USERS_ARRAY($rallye); + $DATA = getArrayFromReferalRallyeUsers($rallye); // Generate table - $OUT = LOAD_TEMPLATE('guest_rallye_expired_header', true); + $OUT = loadTemplate('guest_rallye_expired_header', true); $SW = 2; for ($idx = 0; $idx < $prices; $idx++) { // Check status // active = 1: account is still confirmed // active = 0: account is deleted or locked - $active = GET_TOTAL_DATA($DATA['uid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); + $active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = '---'; + if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---'; if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == '0') || (empty($DATA['cpoints'][$idx]))) { // Allow valid and active users with at least one ref to get points $DATA['ref'][$idx] = '---'; - $DATA['uid'][$idx] = '---'; + $DATA['userid'][$idx] = '---'; } // END - if if (!empty($DATA['info'][$idx])) { @@ -595,63 +668,60 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) { $OUT .= "<tr> <td class=\"switch_sw".$SW." bottom2".$add."\"> ".($idx+1).".</td> <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">"; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; + $OUT .= $DATA['userid'][$idx]; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; $OUT .= "</td> <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">"; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; $OUT .= "</td> <td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">"; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "<strong>"; $OUT .= $DATA['infos'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; + if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= "</strong>"; $OUT .= "</td> </tr>\n"; $SW = 3 - $SW; } // END - for // Add footer - $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true); + $OUT .= loadTemplate('guest_rallye_expired_footer', true); // And finnally return the output return $OUT; } // -function RALLYE_DELETE_EXPIRED_RALLYES () { - global $DATA; - +function purgeExpiredReferalRallyes () { // Check for expired rallyes - $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value... + $EXPIRE = 3; // @TODO The hard-coded value... $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time -FROM `{!_MYSQL_PREFIX!}_rallye_data` -WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", - array($EXPIRE), __FUNCTION__, __LINE__); +FROM `{?_MYSQL_PREFIX?}_rallye_data` +WHERE end_time <= (UNIX_TIMESTAMP() - {?ONE_DAY?} - %s) AND expired='Y'", + array($EXPIRE), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_rallye) > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // Expire found rallyes and notify admin while ($content = SQL_FETCHARRAY($result_rallye)) { // Prepare data for mail template - $DATA['title'] = $content['title']; - $DATA['start'] = generateDateTime($content['start_time'], '1'); - $DATA['end'] = generateDateTime($content['end_time'] , '1'); - $DATA['now_t'] = generateDateTime(time(), '1'); + $content['start_time'] = generateDateTime($content['start_time'], '1'); + $content['end_time'] = generateDateTime($content['end_time'] , '1'); + $content['now_time'] = generateDateTime(time(), '1'); // Send mail to admin - sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), "admin_rallye_purged", '', 0); + sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), 'admin_rallye_purged', $content, 0); // Purge whole rallye - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s LIMIT 1", array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s LIMIT 1", array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); // Add task @@ -667,7 +737,7 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", } // -function RALLYE_TEMPLATE_SELECTION ($name = 'template', $default = '') { +function addReferalRallyeTemplateSelection ($name = 'template', $default = '') { // Init variables $OUT = ''; $ral = array(); @@ -709,21 +779,21 @@ function RALLYE_TEMPLATE_SELECTION ($name = 'template', $default = '') { } // -function RALLYE_GET_REFCOUNT ($uid, $old = 0) { +function getReferalRallyeRefsCount ($userid, $old = 0) { // Check current refs - if (GET_EXT_VERSION('cache') >= '0.1.2') { + if (getExtensionVersion('cache') >= '0.1.2') { // Get refs from cache $cnt = 0; - foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $uid) { + foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) { // Do we have a ref for this user? - //* DEBUG: */ OUTPUT_HTML("id={$id},uid={$uid},uid={$uid},old={$old},level={$GLOBALS['cache_array']['refsystem']['level'][$id]}<br />"); - if (($uid == $uid) && ($GLOBALS['cache_array']['refsystem']['level'][$id] == 1)) { - //* DEBUG: */ OUTPUT_HTML("uid matches!<br />"); + //* DEBUG: */ outputHtml("id={$id},userid={$userid},userid={$userid},old={$old},level={$GLOBALS['cache_array']['refsystem']['level'][$id]}<br />"); + if (($userid == $userid) && ($GLOBALS['cache_array']['refsystem']['level'][$id] == 1)) { + //* DEBUG: */ outputHtml("userid matches!<br />"); foreach ($GLOBALS['cache_array']['ref_depths']['level'] as $level) { if (($level == $GLOBALS['cache_array']['refsystem']['level'][$id]) && ($level == 1)) { // Level does exist so abort here $cnt = $GLOBALS['cache_array']['refsystem']['counter'][$id]; - //* DEBUG: */ OUTPUT_HTML("*".$uid.'/'.$cnt."*<br />"); + //* DEBUG: */ outputHtml("*".$userid.'/'.$cnt."*<br />"); break; } elseif ($level > 1) { // Not interesting here... @@ -736,26 +806,26 @@ function RALLYE_GET_REFCOUNT ($uid, $old = 0) { } // END - if } // END - foreach - //* DEBUG: */ OUTPUT_HTML("<pre>"); - //* DEBUG: */ OUTPUT_HTML(print_r($GLOBALS['cache_array']['refsystem'], true)); - //* DEBUG: */ OUTPUT_HTML("</pre>"); + //* DEBUG: */ outputHtml("<pre>"); + //* DEBUG: */ outputHtml(print_r($GLOBALS['cache_array']['refsystem'], true)); + //* DEBUG: */ outputHtml("</pre>"); //* DEBUG: */ shutdown(); if ($cnt > 0) { // Count cache hits - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); // Remove old refs - //* DEBUG: */ OUTPUT_HTML('+'.$cnt.'/'.$old."+<br />"); + //* DEBUG: */ outputHtml('+'.$cnt.'/'.$old."+<br />"); $cnt -= $old; } // END - if } 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 + $result_ref = SQL_QUERY_ESC("SELECT SUM(s.counter) AS cnt +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)), __FUNCTION__, __LINE__); +WHERE s.userid=%s AND s.level=1", array(bigintval($userid)), __FUNCTION__, __LINE__); list($cnt) = SQL_FETCHROW($result_ref); SQL_FREERESULT($result_ref); if (empty($cnt)) { @@ -766,12 +836,12 @@ WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FUNCTION__, __LINE__ } // Return count - //* DEBUG: */ OUTPUT_HTML("*".$uid.'/'.$old.'/'.$cnt."*<br />"); + //* DEBUG: */ outputHtml("*".$userid.'/'.$old.'/'.$cnt."*<br />"); return $cnt; } // Determines the right language string for min_users -function RALLYE_DETERMINE_MIN_USERS ($min_users) { +function determineReferalRallyeMinimumUsers ($min_users) { // Rallye ends without user limitation is the default $return = getMessage('RALLYE_END_NO_USER_LIMITATION'); @@ -785,7 +855,7 @@ function RALLYE_DETERMINE_MIN_USERS ($min_users) { } // Determines the right language string for min_prices -function RALLYE_DETERMINE_MIN_PRICES ($min_prices) { +function determineReferalRallyeMinimumPrices ($min_prices) { // Rallye ends without user limitation is the default $return = getMessage('RALLYE_END_NO_PRICE_LIMITATION'); @@ -801,8 +871,8 @@ function RALLYE_DETERMINE_MIN_PRICES ($min_prices) { // Filter for extra-autpurge function FILTER_RALLYE_EXTRA_AUTOPURGE () { // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) - RALLYE_DELETE_EXPIRED_RALLYES(); + purgeExpiredReferalRallyes(); } -// +// [EOF] ?> diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index d8fc49e0ad..129564c14d 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,58 +38,58 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Payback refback for refid and reduce it for current user -function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function addRefbackPoints ($userid, $ref, $points, $ref_points) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Back ref depths - $GLOBALS['cache_array']['depth'][$uid][$ref] = $GLOBALS['ref_level']; + $GLOBALS['refback_depth'][$userid][$ref] = $GLOBALS['ref_level']; // Init 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", + $result_refs = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level` > 0 ORDER BY `level` ASC", __FUNCTION__, __LINE__); // "Walk" through all level while ($content = SQL_FETCHARRAY($result_refs)) { // Reset ref depths + // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); // "Walk" through all refids - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref},level={$content['level']},points={$points}<br />"); - foreach (GET_REFBACK_USERID_ARRAY($uid, $content['level']) as $refid) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref},level={$content['level']},points={$points}<br />"); + foreach (getArrayFromRefbackLevel($userid, $content['level']) as $refid) { // Skip level zero or if both are the same - if ($uid == $refid) continue; + if ($userid == $refid) continue; // Get refback percents - $percents = GET_REFBACK_PERCENTS($uid, $refid); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref},refid={$refid},points={$points},percents={$percents}<br />"); + $percents = getRefbackPercents($userid, $refid); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref},refid={$refid},points={$points},percents={$percents}<br />"); // Some percents given? if ($percents > 0) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}<br />"); // Calculate points for refback $refback = $points * ($content['percents'] / 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", - array($refback, $refid, $uid), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />"); + // Update refback table ("refid" and "userid" must be exchanged!) + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_refs` SET `points`=`points`+%s WHERE `userid`=%s AND `refid`=%s LIMIT 1", + array($refback, $refid, $userid), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},userid={$userid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />"); // Add points again, but only directly - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback}<br />"); - ADD_POINTS_REFSYSTEM_DIRECT(sprintf("refback:%s", $refid), $uid, $refback); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback}<br />"); + addPointsDirectly(sprintf("refback:%s", $refid), $userid, $refback); // Reduce points if refid is found if ($refid == $ref) { // Reduce points here! $return = $points * ($content['percents'] / 100) - $refback; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):points={$return} - REDUCED<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):points={$return} - REDUCED<br />"); } // END - if } // END - if } // END foreach @@ -99,50 +99,50 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) { SQL_FREERESULT($result_refs); // Restore ref depth - $GLOBALS['ref_level'] = $GLOBALS['cache_array']['depth'][$uid][$ref]; + $GLOBALS['ref_level'] = $GLOBALS['refback_depth'][$userid][$ref]; // Return them - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $return; } // "Getter" for refback percents -function GET_REFBACK_PERCENTS ($uid, $ref) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref}<br />"); +function getRefbackPercents ($userid, $ref) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref}<br />"); // Skip identical ids - if ($uid == $ref) return 0; + if ($userid == $ref) return 0; // Default is zero $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", - array($ref, $uid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT refback FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `refid`=%s LIMIT 1", + array($ref, $userid), __FUNCTION__, __LINE__); // Entry found? (Should be!) if (SQL_NUMROWS($result) == 1) { // Fetch percents list($percents) = SQL_FETCHROW($result); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):percents={$percents}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):percents={$percents}<br />"); } else { // Debug log - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): NO ENTRY FOUND! :-(<br />"); - DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$uid},ref={$ref} - No entry found! :-("); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): NO ENTRY FOUND! :-(<br />"); + logDebugMessage(__FUNCTION__, __LINE__, "userid={$userid},ref={$ref} - No entry found! :-("); } // Free result SQL_FREERESULT($result); // Return percents - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $percents; } // "Getter" for userid array which will return only one entry -function GET_REFBACK_USERID_ARRAY ($rid, $level) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level}<br />"); +function getArrayFromRefbackLevel ($rid, $level) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level}<br />"); // Init userids $userIds = array(); @@ -150,7 +150,7 @@ function GET_REFBACK_USERID_ARRAY ($rid, $level) { $result = SQL_QUERY_ESC("SELECT `userid` FROM - `{!_MYSQL_PREFIX!}_user_refs` + `{?_MYSQL_PREFIX?}_user_refs` WHERE `refid=`%s AND `level`=%s ORDER BY @@ -158,11 +158,11 @@ ORDER BY array($rid,$level), __FUNCTION__, __LINE__); // Entries found? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />"); if (SQL_NUMROWS($result) > 0) { // Add all while ($content = SQL_FETCHARRAY($result)) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level},userid={$content['userid']}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level},userid={$content['userid']}<br />"); $userIds[] = $content['userid']; } // END - while } // END - if @@ -171,78 +171,78 @@ ORDER BY SQL_FREERESULT($result); // Return array - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},count()=".count($userIds)."<br />"); - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},count()=".count($userIds)."<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $userIds; } // Update "refback table" -function updateRefbackTable ($uid) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function updateRefbackTable ($userid) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Make it sure referal level zero (member him-/herself) is at least selected - if (empty($GLOBALS['cache_array']['back_level'])) $GLOBALS['cache_array']['back_level'] = 1; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']}<br />"); + if (empty($GLOBALS['refback_level'])) $GLOBALS['refback_level'] = 1; + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']}<br />"); // Init refid - $GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] = 0; + $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = 0; $old = 0; $minus = 0; // Check for his referal - $result_refid = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC", - array(bigintval($uid)), __FUNCTION__, __LINE__); + $result_refid = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC", + array(bigintval($userid)), __FUNCTION__, __LINE__); // When no entry was updated then we have to create it here - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />"); if (SQL_NUMROWS($result_refid) > 0) { // Load all refids - while (list($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]) = SQL_FETCHROW($result_refid)) { + while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) { // Remmber userid - $GLOBALS['cache_array']['up_userid'][$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]] = $uid; + $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']]] = $userid; // Refid set? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]}<br />"); - if (($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] > 0) && ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] != $uid) && (isset($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]))) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]}<br />"); + if (($GLOBALS['refback_refid'][$GLOBALS['refback_level']] > 0) && ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] != $userid) && (isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']]))) { // New userid? - if ((isset($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1])) && (isset($GLOBALS['cache_array']['up_userid'][$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1]]))) { + if ((isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) && (isset($GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]]))) { // New userid! - $old = $uid; - $uid = $GLOBALS['cache_array']['up_userid'][$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1]]; + $old = $userid; + $userid = $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]]; $minus = 1; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},old={$old},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - NEW UID!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},old={$old},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - NEW UID!<br />"); } // 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", - array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' AND `refid`=%s LIMIT 1", + array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__); // Do we have no entry? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />"); if (SQL_NUMROWS($result) == 0) { // Insert this level - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - ADD!<br />"); - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", - array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />"); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", + array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__); // Move to next referal level and count his counter one up! - $GLOBALS['cache_array']['back_level']++; updateRefbackTable($GLOBALS['cache_array']['up_refid'][($GLOBALS['cache_array']['back_level'] - 1)]); + $GLOBALS['refback_level']++; updateRefbackTable($GLOBALS['refback_refid'][($GLOBALS['refback_level'] - 1)]); } // END - if // Do we have another level here? - if ((($GLOBALS['cache_array']['back_level']-$minus) > 0) && ($old > 0)) { + if ((($GLOBALS['refback_level']-$minus) > 0) && ($old > 0)) { // Restore old one - $uid = $old; + $userid = $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", - array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' AND `refid`=%s LIMIT 1", + array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__); // Do we have no entry? - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />"); if (SQL_NUMROWS($result) == 0) { // Insert this level - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", - array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - RETURNED!<br />"); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", + array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - RETURNED!<br />"); } // END - if } // END - if } // END - if @@ -253,32 +253,32 @@ function updateRefbackTable ($uid) { } // END - if // When he has a referal... - if ((($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == $uid) || ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == 0)) && (GET_EXT_VERSION('cache') >= '0.1.2') && (!isset($GLOBALS['cache_array']['back_cached']))) { + if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == 0)) && (getExtensionVersion('cache') >= '0.1.2') && (!isset($GLOBALS['refback_cached']))) { // Remove cache here - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - CACHE!<br />"); - if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->destroyCacheFile(); - $GLOBALS['cache_array']['back_cached'] = 1; + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - CACHE!<br />"); + if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->removeCacheFile(); + $GLOBALS['refback_cached'] = 1; } // END - if // "Walk" back here - $GLOBALS['cache_array']['back_level']--; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']} - LEVEL!<br />"); + $GLOBALS['refback_level']--; + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']} - LEVEL!<br />"); // Fix empty refid - if (!isset($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1])) $GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1] = 0; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']-1]} - BACK!<br />"); - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = 0; + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]} - BACK!<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); } // "Getter" for array for user refs in given level -function GET_USER_REFS ($uid, $level) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function getArrayFromRefbackUserRefs ($userid, $level) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Default is no refs and no nickname $add = ''; $refs = array(); // Do we have nickname extension installed? - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('nickname')) { $add = ", d.nickname"; } // END - if @@ -290,16 +290,16 @@ function GET_USER_REFS ($uid, $level) { r.points, d.status".$add." FROM - `{!_MYSQL_PREFIX!}_user_refs` AS r + `{?_MYSQL_PREFIX?}_user_refs` AS r LEFT JOIN - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS d ON r.refid=d.userid WHERE r.userid=%s AND r.level=%s ORDER BY r.refid ASC", - array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__); + array(bigintval($userid), bigintval($level)), __FUNCTION__, __LINE__); // Are there some entries? if (SQL_NUMROWS($result) > 0) { @@ -314,13 +314,13 @@ ORDER BY SQL_FREERESULT($result); // Return result - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $refs; } // "Getter" for refback entry -function GET_USER_REF_ENTRY ($id) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function getArrayFromUserRefbackData ($id) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Default data is nothing $data = array(); @@ -328,7 +328,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, getUserId()), __FUNCTION__, __LINE__); // Is there an entry? @@ -341,18 +341,18 @@ function GET_USER_REF_ENTRY ($id) { SQL_FREERESULT($result); // Return entry - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $data; } // Update refback percents (but with some sanity-checks! -function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function updateMemberRefbackPercents ($id, $percents) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Default status is failed $status['message'] = getMessage('MEMBER_REFBACK_ERROR_GENERAL'); // Do some sanity-checks - if (!IS_MEMBER()) { + if (!isMember()) { // No member! $status['message'] = getMessage('MEMBER_REFBACK_ERROR_NO_MEMBER'); return $status; @@ -367,7 +367,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { } // Get ref entry - $dummy = GET_USER_REF_ENTRY($id); + $dummy = getArrayFromUserRefbackData($id); // Is this valid? if (count($dummy) == 0) { @@ -380,7 +380,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { $percents = convertCommaToDot($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, getUserId()), __FUNCTION__, __LINE__); // Entry updated? @@ -398,7 +398,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { ); // Load member email template - $mail = LOAD_EMAIL_TEMPLATE('member_refback', $content, getUserId()); + $mail = loadEmailTemplate('member_refback', $content, getUserId()); // Send email to user sendEmail($dummy['refid'], getMessage('MEMBER_REFBACK_SUBJECT'), $mail); @@ -410,7 +410,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { $status['ok'] = true; // Return status array - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $status; } // diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 105749117b..99af2efc60 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,32 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// -function registerMustFillout () { - $result = SQL_QUERY("SELECT `field_name`, `field_required` FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id` ASC", - __FUNCTION__, __LINE__); - - while ($content = SQL_FETCHARRAY($result)) { - $value = ''; - if ($content['field_required'] == 'Y') $value = "<span class=\\\"guest_failed\\\"> (*)</span>"; - // @TODO Rewrite these constants - $eval = "define('MUST_".strtoupper($content['field_name'])."', \"".$value."\");"; - eval($eval); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Also fill other constants - // @TODO Rewrite these constants, too - define('MUST_GENDER', "<span class=\"guest_failed\"> (*)</span>"); - define('MUST_ADDY' , "<span class=\"guest_failed\"> (*)</span>"); - define('MUST_BIRTH' , "<span class=\"guest_failed\"> (*)</span>"); - define('MUST_MARKER', "<span class=\"guest_failed\"> (*)</span>"); + die(); } // @@ -72,14 +47,14 @@ function ifRequiredRegisterFieldsAreSet (&$array) { $ret = true; foreach ($array as $key => $value) { // Check all fields that must register - $result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_must_register` WHERE `field_name`='".$key."' AND `field_required`='Y' LIMIT 1", + $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_must_register` WHERE `field_name`='".$key."' AND `field_required`='Y' LIMIT 1", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Check if extension country is not found (you have to enter the 2-chars long country code) or // if extensions is present check if country code was selected // 01 2 21 12 3 32 234 5 54 4 43 34 4 4 5 5432 2 3 3210 - $country = ((!EXT_IS_ACTIVE('country')) || ((EXT_IS_ACTIVE('country')) && (((empty($value)) && ($key == 'cntry')) || (($key == 'country_code') && (!empty($value)))) && (!empty($array['country_code'])))); - if ((empty($value)) && (!$country)) { + $country = ((!isExtensionActive('country')) || ((isExtensionActive('country')) && (((empty($value)) && ($key == 'cntry')) || (($key == 'country_code') && (!empty($value)))) && (!empty($array['country_code'])))); + if ((empty($value)) && ($country === false)) { // Required field not set $array[$key] = '!'; $ret = false; @@ -94,25 +69,6 @@ function ifRequiredRegisterFieldsAreSet (&$array) { return $ret; } -// @TODO This function is no longer used??? -function REGISTER_OUTPUT_REQUIRE_CHECK (&$array) { - // Get all fields for output - $result = SQL_QUERY("SELECT `field_name`, `field_required` FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FUNCTION__, __LINE__); - - // Loop through them - while ($content = SQL_FETCHARRAY($result)) { - if (($array[$content['field_name']] == '!') && ($content['field_required'] == 'Y')) { - // Empty entry found - $array[$content['field_name']] = ''; - $OUT = getMessage('REGISTER_'.strtoupper($content['field_name']).'_REQUIRED'); - registerOutputFailedMessage('', $OUT); - } // END - if - } // END - while - - // Free memory - SQL_FREERESULT($result); -} - // Generates a 'category table' for the registration form function registerGenerateCategoryTable ($mode, $return=false) { $OUT = ''; @@ -122,10 +78,10 @@ function registerGenerateCategoryTable ($mode, $return=false) { $AND = "WHERE `visible`='Y' "; // Admins are allowed to see every category... - if (IS_ADMIN()) $AND = ''; + if (isAdmin()) $AND = ''; // Look for categories - $result = SQL_QUERY("SELECT `id`, `cat`, `visible` FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort` ASC", + $result = SQL_QUERY("SELECT `id`, `cat`, `visible` FROM `{?_MYSQL_PREFIX?}_cats` ".$AND." ORDER BY `sort` ASC", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -134,9 +90,9 @@ function registerGenerateCategoryTable ($mode, $return=false) { $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n"; while ($content = SQL_FETCHARRAY($result)) { // Is the array element not set? - if (!REQUEST_ISSET_POST('cat', $content['id'])) { + if (!isPostRequestElementSet('cat', $content['id'])) { // Then set it - REQUEST_SET_POST('cat', array($content['id'] => '')); + setRequestPostElement('cat', array($content['id'] => '')); } // END - if // Prepare array for the template @@ -148,14 +104,14 @@ function registerGenerateCategoryTable ($mode, $return=false) { 'id' => $content['id'], ); - if ((REQUEST_POST('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!REQUEST_ISSET_POST('cat', $content['id'])))) { + if ((postRequestElement('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!isPostRequestElementSet('cat', $content['id'])))) { $content['def_y'] = ' checked="checked"'; } else { $content['def_n'] = ' checked="checked"'; } // Load template and switch color - $OUT .= LOAD_TEMPLATE("guest_cat_row", true, $content); + $OUT .= loadTemplate('guest_cat_row', true, $content); $SW = 3 - $SW; } $OUT .= "</table>\n"; @@ -164,7 +120,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { SQL_FREERESULT($result); } else { // No categories setted up so far... - $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('NO_CATEGORIES_VISIBLE')); + $OUT .= loadTemplate('admin_settings_saved', true, getMessage('NO_CATEGORIES_VISIBLE')); } if ($return === true) { @@ -172,18 +128,38 @@ function registerGenerateCategoryTable ($mode, $return=false) { return $OUT; } else { // Output directly (default) - OUTPUT_HTML($OUT); + outputHtml($OUT); } } // Outputs a 'failed message' function registerOutputFailedMessage ($messageId, $extra='') { if (empty($messageId)) { - OUTPUT_HTML('<div class="register_failed">' . $extra . '</div>'); + outputHtml('<div class="register_failed">' . $extra . '</div>'); } else { - OUTPUT_HTML('<div class="register_failed">{--' . $messageId . '--}' . $extra . '</div>'); + outputHtml('<div class="register_failed">{--' . $messageId . '--}' . $extra . '</div>'); } } +// Run a filter for must-fillout fields +function FILTER_REGISTER_MUST_FILLOUT ($content) { + // Get all fields for output + $result = SQL_QUERY("SELECT `field_name`, `field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC", + __FUNCTION__, __LINE__); + + while ($row = SQL_FETCHARRAY($result)) { + $value = ''; + if ($row['field_required'] == 'Y') $value = "<span class=\\\"guest_failed\\\"> (*)</span>"; + // @TODO Rewrite these constants + $content['must_fillout_'.strtolower($row['field_name']).''] = $value; + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Return it + return $content; +} + // ?> diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 84cf2ce3ae..8e908dad35 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // "Getter" for anonymous remote IP number -function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { +function getAnonymousRemoteAddress ($remoteAddr) { // Is config enabled? if (getConfig('removeip_anon_ip') == 'Y') { // Switch way do we like? switch (getConfig('anonymous_ip')) { - case "127.0.0.1": // mod_removeip style - case "0.0.0.0": // Some people may prefer this... - $remoteAddr = getConfig('anonymous_ip'); + case 'LOCAL': // localhost + $remoteAddr = '127.0.0.1'; break; - case "RANDOM": // Pseudo-random IP number - $remoteAddr = mt_rand(1,254).'.'.mt_rand(0,254).'.'.mt_rand(0,254).'.'.mt_rand(1,254); + case 'ZERO': // All four numbers zero + $remoteAddr = '0.0.0.0'; + break; + + case 'RANDOM': // Generate random ip + $remoteAddr = mt_rand(1, 254) . '.' . mt_rand(0, 254) . '.'.mt_rand(0, 254) . '.' . mt_rand(1, 254); break; } // END - switch } // END - if @@ -62,19 +64,21 @@ function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { // Return it return $remoteAddr; } + // "Getter" for anonymous remote hostname -function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { +function getAnonymousRemoteHost ($remoteHost) { // Is config enabled? if (getConfig('removeip_anon_host') == 'Y') { // Set anon hostname - $remoteHost = "localhost.localnet"; + $remoteHost = 'localhost.localnet'; } // END - if // Return it return $remoteHost; } + // "Getter" for anonymous user agent -function GET_ANONYMOUS_USER_AGENT ($userAgent) { +function getAnonymousUserAgent ($userAgent) { // Is config enabled? if (getConfig('removeip_anon_ua') == 'Y') { // Set anon user agent @@ -84,8 +88,9 @@ function GET_ANONYMOUS_USER_AGENT ($userAgent) { // Return it return $userAgent; } + // "Getter" for anonymous referer -function GET_ANONYMOUS_REFERER ($referer) { +function getAnonymousReferer ($referer) { // Is config enabled? if (getConfig('removeip_anon_ref') == 'Y') { // Set anon user agent @@ -95,8 +100,9 @@ function GET_ANONYMOUS_REFERER ($referer) { // Return it return $referer; } + // Adds informations about anonymity/privacy to the menu -function REMOVEIP_ADD_INFOS () { +function addAnonymityLevel () { // "Base-privacy" is by default low (we add more later) $anonymity = 0; @@ -110,39 +116,39 @@ function REMOVEIP_ADD_INFOS () { $level = round($anonymity / 4 * 3); // Set constant name suffix depending on that level - $suffix = "unsupported_{$level}"; + $suffix = 'unsupported_' . $level; switch ($level) { case 0: - $suffix = "none"; + $suffix = 'none'; break; case 1: - $suffix = "low"; + $suffix = 'low'; break; case 2: - $suffix = "medium"; + $suffix = 'medium'; break; case 3: // High level - $suffix = "high"; + $suffix = 'high'; break; } // END - while // Construct constant name - $constantName = strtoupper(sprintf("REMOVEIP_LEVEL_%s", $suffix)); + $constantName = sprintf("REMOVEIP_LEVEL_%s", strtoupper($suffix)); // Default message - $message = sprintf(REMOVEIP_UNKNOWN_LEVEL, $suffix); + $message = sprintf(getMessage('REMOVEIP_UNKNOWN_LEVEL'), $suffix); // Is that constant there? - if (defined($constantName)) { + if (isMessageIdValid($constantName)) { // Use that string - $message = constant($constantName); + $message = getMessage($constantName); } // END - if // Output message in template - return LOAD_TEMPLATE("removeip_level", true, $message); + return loadTemplate('removeip_level', true, $message); } // Filter for adding anonymity notice to the output stream @@ -151,14 +157,14 @@ function FILTER_ADD_ANONYMITY_NOTICE ($data) { $content = $data; // Extension removeip activated? - if ((EXT_IS_ACTIVE('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) { + if ((isExtensionActive('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) { // Add anoymity/privacy infos - $content['content'] .= REMOVEIP_ADD_INFOS()."<br />\n"; + $content['content'] .= addAnonymityLevel() . "<br />\n"; } // END - if // Return it return $content; } -// +// [EOF] ?> diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index e6ca8694c9..c7ed9f91f5 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Rewrite links in HTML for better SEO (ugly part of mx!) @@ -48,35 +47,35 @@ function rewriteLinksInCode ($HTML) { if (eregi(getModule(), getConfig('rewrite_skip')) !== false) return $HTML; // Generate target URL - $target = "{?URL?}/cms/"; + $target = '{?URL?}/cms/'; // Convert modules.php?module=... - $output = str_replace(getConfig('URL') . "/modules.php?module=", $target, $HTML); + $output = str_replace(getConfig('URL') . '/modules.php?module=', $target, $HTML); // Convert modules.php?module=... - $output = str_replace("{?URL?}/modules.php?module=", $target, $output); + $output = str_replace('{?URL?}/modules.php?module=', $target, $output); // Do we have an URL linked to mxchange.org? if (eregi(getConfig('SERVER_URL'), $output)) { // Convert URLs from my server - $output = str_replace("{?URL?}/modules.php?module=", getConfig('SERVER_URL') . '/cms/', $output); + $output = str_replace('{?URL?}/modules.php?module=', getConfig('SERVER_URL') . '/cms/', $output); // Convert URLs from my server - $output = str_replace(getConfig('URL') . "/modules.php?module=", getConfig('SERVER_URL') . '/cms/', $output); + $output = str_replace(getConfig('URL') . '/modules.php?module=', getConfig('SERVER_URL') . '/cms/', $output); } // END - if // Strip slashes as above for the main URL $target2 = preg_quote($target, '/'); // Action variable - $act = $target."\$1/act/"; + $action = $target."\$1/act/"; // Convert &|&action=... - $output = preg_replace('/' . $target2 . "(.*)&action=/i", $act, $output); + $output = preg_replace('/' . $target2 . '(.*)&action=/i', $action, $output); // "The same procedure as last variable"... now for &what= - $wht = $target."\$1/wht/"; - $output = preg_replace('/' . $target2 . "(.*)&what=/i", $wht, $output); + $what = $target."\$1/wht/"; + $output = preg_replace('/' . $target2 . '(.*)&what=/i', $what, $output); // Repair missed &what=??? entries while (preg_match("/&what=(.*)\/(.*)\/(.*)/i", $output)) { @@ -86,5 +85,6 @@ function rewriteLinksInCode ($HTML) { // Return rewritten code return $output; } -// + +// [EOF] ?> diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index fa1679ab02..3922624fb7 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -36,11 +36,13 @@ * MA 02110-1301 USA * ************************************************************************/ +// Run only once this security check/exchange +if (defined('__SECURITY')) return; + // Some security stuff... if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if /** * Function to secure input strings @@ -51,7 +53,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { */ function secureString ($str, $strip=true) { // Shall we strip HTML code? - if ($strip) $str = strip_tags($str); + if ($strip === true) $str = strip_tags($str); // Trim string $str = trim($str); @@ -61,12 +63,9 @@ function secureString ($str, $strip=true) { return $str; } -// Run only once this security check/exchange -if (defined('__SECURITY')) return; - // Runtime/GPC quoting is off now... -@set_magic_quotes_runtime(false); -@ini_set('magic_quotes_gpc', false); // This may not work on some systems +set_magic_quotes_runtime(false); +ini_set('magic_quotes_gpc', false); // This may not work on some systems // Check if important arrays are found and define them if missing if (!isset($_SERVER)) { @@ -89,118 +88,102 @@ if (!isset($_POST)) { // Generate arrays which holds the relevante chars to replace $GLOBALS['security_chars'] = array( -// The chars we are looking for... - 'from' => array("{", "}", '/', '.', "'", "$", '(', ')', '{--', '--}', "%", ';', "[", "]", ':', "--"), -// ... and we will replace to. + // The chars we are looking for... + 'from' => array('{', '}', '/', '.', "'", "$", '(', ')', '{--', '--}', '{?', '?}', '%', ';', '[', ']', ':', '--'), + // ... and we will replace to. 'to' => array( - "{OPEN_ANCHOR2}", - "{CLOSE_ANCHOR2}", - "{SLASH}", - "{DOT}", - "{QUOT}", - "{DOLLAR}", - "{OPEN_ANCHOR}", - "{CLOSE_ANCHOR}", - "{OPEN_TEMPLATE}", - "{CLOSE_TEMPLATE}", - "{PER}", - "{SEMI}", - "{OPEN_INDEX}", - "{CLOSE_INDEX}", - "{DBL_DOT}", - "{COMMENT}" - ), - ); - - // Characters allowed in URLs - // - // Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be - // rejected because of the {SLASH}, {DOT} and all below listed items inside the URL. - $GLOBALS['url_chars'] = array( - // Search for these secured characters - 'to' => array("{SLASH}", "{DOT}", "{PER}", "{DBL_DOT}", "{COMMENT}"), - // Replace with these characters - 'from' => array('/', '.', "%", ':', "--") - ); - - // Overworked security part: - if (is_array($_GET)) { - foreach ($_GET as $seckey => $secvalue) { - if (is_array($secvalue)) { - // Throw arrays away... - unset($_GET[$seckey]); - } else { - // Only variables are allowed (non-array) but we secure them all! - foreach ($GLOBALS['security_chars']['from'] as $key => $char) { - // Pass all through - $_GET[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]); - } - - // Strip all other out - $_GET[$seckey] = strip_tags($_GET[$seckey]); - } - } + '{OPEN_ANCHOR2}', + '{CLOSE_ANCHOR2}', + '{SLASH}', + '{DOT}', + '{QUOT}', + '{DOLLAR}', + '{OPEN_ANCHOR}', + '{CLOSE_ANCHOR}', + '{OPEN_TEMPLATE}', + '{CLOSE_TEMPLATE}', + '{OPEN_CONFIG}', + '{CLOSE_CONFIG}', + '{PER}', + '{SEMI}', + '{OPEN_INDEX}', + '{CLOSE_INDEX}', + '{DBL_DOT}', + '{COMMENT}' + ), +); + +// Characters allowed in URLs +// +// Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be +// rejected because of the {SLASH}, {DOT} and all below listed items inside the URL. +$GLOBALS['url_chars'] = array( + // Search for these secured characters + 'to' => array('{SLASH}', '{DOT}', '{PER}', '{DBL_DOT}', '{COMMENT}'), + // Replace with these characters + 'from' => array('/', '.', '%', ':', '--') +); + +// Overworked security part: +if (is_array($_GET)) { + foreach ($_GET as $seckey => $secvalue) { + if (is_array($secvalue)) { + // Throw arrays away... + unset($_GET[$seckey]); + } else { + // Only variables are allowed (non-array) but we secure them all! + foreach ($GLOBALS['security_chars']['from'] as $key => $char) { + // Pass all through + $_GET[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]); + } // END - foreach + + // Strip all other out + $_GET[$seckey] = secureString($_GET[$seckey]); } + } // END - foreach +} // END - if + +// Activate caching or transparent compressing when it is not already done +if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), 'Mozilla')))) { + if ((extension_loaded('zlib')) && (function_exists('ob_start'))) { + // Start caching + $GLOBALS['php_caching'] = 'on'; + ob_start(); + } else { + // Extension not loaded or required function is missing + $GLOBALS['php_caching'] = '404'; + } +} else { + // Old PHP version + $GLOBALS['php_caching'] = 'old'; +} - if (basename($_SERVER['PHP_SELF']) != 'install.php') { - // And POST data - foreach ($_POST as $seckey => $secvalue) { - if (!is_array($secvalue)) { - // Only variables are allowed (non-array) to be secured... - foreach ($GLOBALS['security_chars']['from'] as $key => $char) { - // Pass all through - $_POST[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_POST[$seckey]); - } - - // Strip all other out - $_POST[$seckey] = strip_tags($_POST[$seckey]); - } - } - } +// At last secure the $_SERVER['PHP_SELF'] element +$_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']); - // Activate caching or transparent compressing when it is not already done - if (!defined('_OB_CACHING')) { - if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) { - if ((extension_loaded('zlib')) && (function_exists('ob_start'))) { - // Start caching - define('_OB_CACHING', 'on'); - ob_start(); - } else { - // Extension not loaded or required function is missing - define('_OB_CACHING', '404'); - } - } else { - // Old PHP version - define('_OB_CACHING', 'old'); - } - } +// Split it up into path and filename +$SELF_DIR = dirname($_SERVER['PHP_SELF']); +$SELF_FILE = basename($_SERVER['PHP_SELF']); - // At last secure the $_SERVER['PHP_SELF'] element - $_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']); - - // Split it up into path and filename - $SELF_DIR = dirname($_SERVER['PHP_SELF']); - $SELF_FILE = basename($_SERVER['PHP_SELF']); - - // Check for a .php inside the $SELF_DIR... - while (ereg('.php', $SELF_DIR)) { - // Correct the dirname - $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4)); - // Rewrite filename... - $SELF_FILE = basename($SELF_DIR); - // ... and dirname - $SELF_DIR = dirname($SELF_DIR); - } +// Check for a .php inside the $SELF_DIR... +while (ereg('.php', $SELF_DIR)) { + // Correct the dirname + $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4)); + // Rewrite filename... + $SELF_FILE = basename($SELF_DIR); + // ... and dirname + $SELF_DIR = dirname($SELF_DIR); +} // END - while - // Put both together again and let's pray it is secured now... - $_SERVER['PHP_SELF'] = $SELF_DIR.'/'.$SELF_FILE; +// Put both together again and let's pray it is secured now... +$_SERVER['PHP_SELF'] = $SELF_DIR . '/' . $SELF_FILE; - // Remove uneccessary variables - unset($SELF_DIR); - unset($SELF_FILE); +// Remove uneccessary variables +unset($SELF_DIR); +unset($SELF_FILE); - // Security system loaded... - define('__SECURITY', '1'); +// Security system loaded... +define('__SECURITY', '1'); - // - ?> +// [EOF] +?> diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 78f0959782..630db06a0f 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // -function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array(), $RET_STATUS=false) { +function handlSponsorRequest (&$postData, $update=false, $messageArray=array(), $RET_STATUS=false) { // Init a lot variables $SAVE = true; $UPDATE = false; @@ -53,16 +53,16 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // Skip these entries $SKIPPED = array( 'ok', 'edit', 'terms', 'pay_type' - ); + ); - // Save sponsor data - $DATA = array( + // Save sponsor data + $DATA = array( 'keys' => array(), 'values' => array() - ); + ); // Check if sponsor already exists - foreach ($POST as $k => $v) { + foreach ($postData as $k => $v) { if (!(array_search($k, $SKIPPED) > -1)) { // Check only posted input entries not the submit button switch ($k) @@ -74,13 +74,13 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() $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", - array($POST['email']), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' LIMIT 1", + array($postData['email']), __FUNCTION__, __LINE__); // Is a sponsor alread in the db? if (SQL_NUMROWS($result) == 1) { // Yes, he is! - if ((getWhat() == 'add_sponsor') || ($NO_UPDATE)) { + if ((getWhat() == 'add_sponsor') || ($update)) { // Already found! $ALREADY = true; } else { @@ -108,7 +108,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() default: // Test if there is are time selections - convertSelectionsToTimestamp($POST, $DATA, $k, $skip); + convertSelectionsToTimestamp($postData, $DATA, $k, $skip); break; } @@ -122,7 +122,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // Save sponsor? if ($SAVE === true) { // Default is no force even when a guest want to abuse this force switch - if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0; + if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = 0; // SQL and message string is empty by default $sql = ''; $message = ''; @@ -130,23 +130,23 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // 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', "; } // Remove last ", " from SQL string $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1"; - $DATA['values'][] = bigintval(REQUEST_GET('id')); + $DATA['values'][] = bigintval(getRequestElement('id')); // Generate message - $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_UPDATED'), 'updated', $messageArray); + $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_UPDATED'), 'updated', $messageArray); $ret = "updated"; - } elseif ((!$ALREADY) || (($POST['force'] == '1') && (IS_ADMIN()))) { + } elseif (($ALREADY === false) || (($postData['force'] == '1') && (isAdmin()))) { // Add new sponsor, first add more data $DATA['keys'][] = 'sponsor_created'; $DATA['values'][] = time(); $DATA['keys'][] = 'status'; - if ((!$NO_UPDATE) && (IS_ADMIN()) && (getWhat() == 'add_sponsor')) { + if (($update === true) && (isAdmin()) && (getWhat() == 'add_sponsor')) { // Only allowed for admin $DATA['values'][] = 'PENDING'; } else { @@ -155,7 +155,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // Generate hash code $DATA['keys'][] = 'hash'; - $DATA['values'][] = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time()); + $DATA['values'][] = md5(session_id().':'.$postData['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time()); $DATA['keys'][] = 'remote_addr'; $DATA['values'][] = detectRemoteAddr(); } @@ -165,29 +165,29 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() $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 - $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray); + $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray); $ret = 'added'; - } elseif ((!$NO_UPDATE) && (IS_ADMIN())) { + } elseif (($update === true) && (isAdmin())) { // Add all data as hidden data $OUT = ''; - foreach ($POST as $k => $v) { + foreach ($postData as $k => $v) { // Do not add 'force' ! if ($k != "force") { $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n"; } } - define('__HIDDEN_DATA', $OUT); - define('__EMAIL' , $POST['email']); + $content['hidden'] = $OUT; + $content['email'] = $postData['email']; // Ask for adding a sponsor with same email address - LOAD_TEMPLATE('admin_add_sponsor_already'); + loadTemplate('admin_add_sponsor_already', false, $content); return; } else { // Already added! - $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND', $POST['email'])); + $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND'), $postData['email']); $ret = 'already'; } @@ -197,18 +197,19 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() } // END - if // Output message - if ((!$NO_UPDATE) && (IS_ADMIN())) { - LOAD_TEMPLATE('admin_settings_saved', false, $message); + if (($update === true) && (isAdmin())) { + loadTemplate('admin_settings_saved', false, $message); } // END - if } else { // Error found! - $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), 'failed', $messageArray); - LOAD_TEMPLATE('admin_settings_saved', false, $message); + $message = getMessageFromIndexedArray(getMessage('SPONSOR_DATA_NOT_SAVED'), 'failed', $messageArray); + loadTemplate('admin_settings_saved', false, $message); } // Shall we return the status? if ($RET_STATUS === true) return $ret; } + // function sponsorTranslateUserStatus ($status) { // Construct constant name @@ -220,36 +221,23 @@ function sponsorTranslateUserStatus ($status) { $ret = constant($constantName); } else { // Not found! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status); } return $ret; } + // Search for an email address in the database -function SPONSOR_FOUND_EMAIL_DB ($email) { +function isSponsorRegisteredWithEmail ($email) { // Do we already have the provided email address in our DB? - $ret = (GET_TOTAL_DATA($email, "sponsor_data", 'id', 'email', true) == 1); - - // Return result - return $ret; -} -// -function SPONSOR_GET_MESSAGE ($message, $pos, $array) { - // Check if the requested message was found in array - if (isset($array[$pos])) { - // ... if yes then use it! - $ret = $array[$pos]; - } else { - // ... else use default message - $ret = $message; - } + $ret = (countSumTotalData($email, 'sponsor_data', 'id', 'email', true) == 1); // Return result return $ret; } -// -function IS_SPONSOR () { +// Wether the current user is a sponsor +function isSponsor () { // Failed... $ret = false; if ((isSessionVariableSet('sponsorid')) && (isSessionVariableSet('sponsorpass'))) { @@ -257,7 +245,7 @@ function IS_SPONSOR () { $result = SQL_QUERY_ESC("SELECT `id` FROM - `{!_MYSQL_PREFIX!}_sponsor_data` + `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' AND `password`='%s' AND `status`='CONFIRMED' LIMIT 1", @@ -279,20 +267,20 @@ LIMIT 1", } // -function GENERATE_SPONSOR_MENU ($current) { +function addSponsorMenu ($current) { $OUT = ''; $WHERE = " AND active='Y'"; - if (IS_ADMIN()) $WHERE = ''; + if (isAdmin()) $WHERE = ''; // Load main menu entries - $result_main = SQL_QUERY("SELECT action AS main_action, title AS main_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu` + $result_main = SQL_QUERY("SELECT action AS main_action, title AS main_title FROM `{?_MYSQL_PREFIX?}_sponsor_menu` WHERE (`what`='' OR `what` IS NULL) ".$WHERE." ORDER BY `sort`", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // Load every menu and it's sub menus while ($content = SQL_FETCHARRAY($result_main)) { // Load sub menus - $result_sub = SQL_QUERY_ESC("SELECT what AS sub_what, title AS sub_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu` + $result_sub = SQL_QUERY_ESC("SELECT what AS sub_what, title AS sub_title FROM `{?_MYSQL_PREFIX?}_sponsor_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE." ORDER BY `sort`", array($content['main_action']), __FUNCTION__, __LINE__); @@ -313,7 +301,7 @@ ORDER BY `sort`", ); // Load row template - $SUB .= LOAD_TEMPLATE("sponsor_what", true, $content); + $SUB .= loadTemplate('sponsor_what', true, $content); } // Prepare data for the main template @@ -323,10 +311,10 @@ ORDER BY `sort`", ); // Load menu template - $OUT .= LOAD_TEMPLATE("sponsor_action", true, $content); + $OUT .= loadTemplate('sponsor_action', true, $content); } else { // No sub menus active - $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE')); + $OUT .= loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE')); } // Free memory @@ -334,7 +322,7 @@ ORDER BY `sort`", } } else { // No main menus active - $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE')); + $OUT .= loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE')); } // Free memory @@ -345,7 +333,7 @@ ORDER BY `sort`", } // -function GENERATE_SPONSOR_CONTENT ($what) { +function addSponsorContent ($what) { $OUT = ''; $INC = sprintf("inc/modules/sponsor/%s.php", $what); if (isIncludeReadable($INC)) { @@ -353,7 +341,7 @@ function GENERATE_SPONSOR_CONTENT ($what) { loadIncludeOnce($INC); } else { // File not found! - $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what)); + $OUT .= loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what)); } // Return content @@ -361,17 +349,20 @@ function GENERATE_SPONSOR_CONTENT ($what) { } // -function UPDATE_SPONSOR_LOGIN () { +function updateSponsorLogin () { // Failed by default $login = false; // Is sponsor? - if (IS_SPONSOR()) { + if (isSponsor()) { // Update last online timestamp - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` -SET last_online=UNIX_TIMESTAMP() -WHERE `id`='%s' AND password='%s' LIMIT 1", - array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` +SET `last_online`=UNIX_TIMESTAMP() +WHERE `id`='%s' AND `password`='%s' LIMIT 1", + array( + bigintval(getSession('sponsorid')), + getSession('sponsorpass') + ), __FUNCTION__, __LINE__); // This update went fine? $login = (SQL_AFFECTEDROWS() == 1); @@ -380,8 +371,9 @@ WHERE `id`='%s' AND password='%s' LIMIT 1", // Return status return $login; } -// -function SPONSOR_SAVE_DATA ($POST, $content) { + +// Saves sponsor's data +function saveSponsorData ($postData, $content) { $EMAIL = false; // Unsecure data which we don't want @@ -393,17 +385,17 @@ function SPONSOR_SAVE_DATA ($POST, $content) { $message = getMessage('SPONSOR_ACCOUNT_DATA_NOT_SAVED'); // Check for submitted passwords - if ((!empty($POST['pass1'])) && (!empty($POST['pass2']))) { + if ((!empty($postData['pass1'])) && (!empty($postData['pass2']))) { // Are both passwords the same? - if ($POST['pass1'] == $POST['pass2']) { + if ($postData['pass1'] == $postData['pass2']) { // Okay, then set password and remove pass1 and pass2 - $POST['password'] = md5($POST['pass1']); + $postData['password'] = md5($postData['pass1']); } // END - if } // END - if // Remove all (maybe spoofed) unsafe data from array foreach ($UNSAFE as $remove) { - unset($POST[$remove]); + unset($postData[$remove]); } // END - foreach // This array is for the submitted data which we will use with the SQL_QUERY_ESC() function to @@ -411,29 +403,26 @@ function SPONSOR_SAVE_DATA ($POST, $content) { $DATA = array(); // Prepare SQL string - $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET"; - foreach ($POST as $key => $value) { + $sql = "UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET"; + foreach ($postData as $key => $value) { // Mmmmm, too less security here??? - $sql .= " ".strip_tags($key)."='%s',"; + $sql .= " `".secureString($key)."`='%s',"; // We will secure this later inside the SQL_QUERY_ESC() function - $DATA[] = strip_tags($value); - - // Compile {SLASH} and so on for the email templates - $POST[$key] = COMPILE_CODE($value); + $DATA[] = secureString($value); } // END - foreach // Check if email has changed - if ((!empty($content['email'])) && (!empty($POST['email']))) { - if ($content['email'] != $POST['email']) { + if ((!empty($content['email'])) && (!empty($postData['email']))) { + if ($content['email'] != $postData['email']) { // Change email address $EMAIL = true; // Okay, has changed then add status with UNCONFIRMED and new hash code - $sql .= " `status`='EMAIL', hash='%s',"; + $sql .= " `status`='EMAIL', `hash`='%s',"; // Generate hash code - $HASH = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time()); + $HASH = md5(session_id().':'.$postData['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time()); $DATA[] = $HASH; } // END - if } // END - if @@ -473,7 +462,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) { break; default: // Unknown sponsor what value! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", getWhat())); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", getWhat())); $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), getWhat()); $templ = ''; $subj = ''; break; @@ -485,14 +474,13 @@ function SPONSOR_SAVE_DATA ($POST, $content) { $result = SQL_QUERY_ESC($sql, $DATA, __FUNCTION__, __LINE__); // Add all data to content - global $DATA; - $DATA = $POST; + $content['new_data'] = $postData; // Change some data - if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); - if (isset($DATA['gender'])) $DATA['gender'] = translateGender($DATA['gender']); - if (isset($content['receive_warnings'])) $DATA['receive'] = translateYesNo($POST['receive_warnings']); - if (isset($content['warning_interval'])) $DATA['interval'] = createFancyTime($POST['warning_interval']); + if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']); + if (isset($content['new_data']['gender'])) $content['new_data']['gender'] = translateGender($content['new_data']['gender']); + if (isset($content['receive_warnings'])) $content['new_data']['receive'] = translateYesNo($content['new_data']['receive_warnings']); + if (isset($content['warning_interval'])) $content['new_data']['interval'] = createFancyTime($content['new_data']['warning_interval']); // Send email to admins sendAdminNotification($subj, $templ, $content); @@ -506,7 +494,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) { switch (getWhat()) { case 'account': // Change account data - $email_msg = LOAD_EMAIL_TEMPLATE('sponsor_change_data', $content); + $email_msg = loadEmailTemplate('sponsor_change_data', $content); sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg); if ($EMAIL === true) { @@ -514,14 +502,14 @@ function SPONSOR_SAVE_DATA ($POST, $content) { $content['hash'] = $HASH; // Second mail goes to the new address - $email_msg = LOAD_EMAIL_TEMPLATE('sponsor_change_email', $content); + $email_msg = loadEmailTemplate('sponsor_change_email', $content); sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg); } break; case 'settings': // Change settings // Send email - $email_msg = LOAD_EMAIL_TEMPLATE('sponsor_settings', $content); + $email_msg = loadEmailTemplate('sponsor_settings', $content); sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg); break; } @@ -533,5 +521,5 @@ function SPONSOR_SAVE_DATA ($POST, $content) { return $message; } -// +// [EOF] ?> diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 10a2ba6583..a46474ab98 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // ----------------------------------------------------------------------------- @@ -49,29 +48,29 @@ if (!defined('__SECURITY')) { // Admin has added an URL with given user id and so on function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) { // Do some pre-checks - if (!IS_ADMIN()) { + if (!isAdmin()) { // Not an admin - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Not admin.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Not admin.", $url, $limit, $reload)); return false; } elseif (!isUrlValid($url)) { // URL invalid - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid URL.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid URL.", $url, $limit, $reload)); return false; } elseif (SURFBAR_LOOKUP_BY_URL($url, '0')) { // URL already found in surfbar! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Already added.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Already added.", $url, $limit, $reload)); return false; } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more allowed! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : No more URLs allowed.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : No more URLs allowed.", $url, $limit, $reload)); return false; } elseif ('' . ($limit + 0) . '' != '' . $limit . '') { // Invalid limit entered - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid limit entered.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid limit entered.", $url, $limit, $reload)); return false; } elseif ('' . ($reload + 0) . '' != '' . $reload . '') { // Invalid amount entered - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid reload entered.", $url, $limit, $reload)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid reload entered.", $url, $limit, $reload)); return false; } @@ -80,30 +79,30 @@ function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) { } // Admin unlocked an email so we can migrate the URL -function SURFBAR_ADMIN_MIGRATE_URL ($url, $uid) { +function SURFBAR_ADMIN_MIGRATE_URL ($url, $userid) { // Do some pre-checks - if (!IS_ADMIN()) { + if (!isAdmin()) { // Not an admin return false; } elseif (!isUrlValid($url)) { // URL invalid return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, $uid)) { + } elseif (SURFBAR_LOOKUP_BY_URL($url, $userid)) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($uid)) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($userid)) { // No more allowed! return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, $uid, 'MIGRATED', 'migrate'); + return SURFBAR_REGISTER_URL($url, $userid, 'MIGRATED', 'migrate'); } // Admin function for unlocking URLs function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { // Is this an admin or invalid array? - if (!IS_ADMIN()) { + if (!isAdmin()) { // Not admin or invalid IDs array return false; } elseif (!is_array($IDs)) { @@ -130,7 +129,7 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { // Admin function for rejecting URLs function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { // Is this an admin or invalid array? - if (!IS_ADMIN()) { + if (!isAdmin()) { // Not admin or invalid IDs array return false; } elseif (!is_array($IDs)) { @@ -162,10 +161,10 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { // Member has added an URL function SURFBAR_MEMBER_ADD_URL ($url, $limit) { // Do some pre-checks - if (!IS_MEMBER()) { + if (!isMember()) { // Not a member return false; - } elseif ((!isUrlValid($url)) && (!IS_ADMIN())) { + } elseif ((!isUrlValid($url)) && (!isAdmin())) { // URL invalid return false; } elseif (SURFBAR_LOOKUP_BY_URL($url, getUserId())) { @@ -186,7 +185,7 @@ function SURFBAR_MEMBER_ADD_URL ($url, $limit) { // Create list of actions depending on status for the user function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { // Load all actions in an array for given status - $actionArray = SURFBAR_getModeAction_ARRAY($status); + $actionArray = SURFBAR_GET_ARRAY_FROM_STATUS($status); // Init HTML code $OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\"> @@ -198,7 +197,7 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { // "Walk" through all actions and create forms foreach ($actionArray as $actionId => $action) { // Add form for this action - $OUT .= LOAD_TEMPLATE('member_surfbar_list_form', true, array( + $OUT .= loadTemplate('member_surfbar_list_form', true, array( 'width' => $width, 'id' => bigintval($urlId), 'action' => strtolower($action), @@ -221,7 +220,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { $performed = false; // Is this a member? - if (!IS_MEMBER()) { + if (!isMember()) { // No member! return false; } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) { @@ -236,7 +235,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { } // Secure action - $action = SQL_ESCAPE(htmlentities(strip_tags($formData['action']), ENT_QUOTES)); + $action = SQL_ESCAPE(secureString($formData['action'])); // Has it changed? if ($action != $formData['action']) { @@ -259,7 +258,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { $performed = call_user_func_array($functionName, $urlData); } else { // Log invalid request - DEBUG_LOG(__FUNCTION__, __LINE__, "action={$formData['action']},id={$formData['id']},function={$functionName}"); + logDebugMessage(__FUNCTION__, __LINE__, "action={$formData['action']},id={$formData['id']},function={$functionName}"); addFatalMessage(__FUNCTION__, __LINE__, "Invalid member action! action=%s,id=%s,function=%s", array($formData['action'], $formData['id'], $functionName)); } @@ -270,7 +269,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { // Validate if the requested action can be performed on current URL status function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) { // 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), __FUNCTION__, __LINE__); // Is the entry there? @@ -379,21 +378,21 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { // Include fields only for action 'edit' if ($action == 'edit') { // Default is not limited - $urlData['limited_yes'] = ''; - $urlData['limited_no'] = ' checked="checked"'; - $urlData['limited'] = 'false'; + $urlData['limited_y'] = ''; + $urlData['limited_n'] = ' checked="checked"'; + $urlData['limited'] = 'false'; // Is this URL limited? if ($urlData['views_max'] > 0) { // Then rewrite form data - $urlData['limited_yes'] = ' checked="checked"'; - $urlData['limited_no'] = ''; - $urlData['limited'] = 'true'; + $urlData['limited_y'] = ' checked="checked"'; + $urlData['limited_n'] = ''; + $urlData['limited'] = 'true'; } // END - if } // END - if // Load the form and display it - LOAD_TEMPLATE(sprintf("member_surfbar_%s_action_form", $action), false, $urlData); + loadTemplate(sprintf("member_surfbar_%s_action_form", $action), false, $urlData); // All fine by default ... ;-) return true; @@ -405,7 +404,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { $executed = false; // Is limitation "no" and "limit" is > 0? - if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == 'N') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) { + if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] != 'Y') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) { // Set it to unlimited $urlData[$action]['limit'] = 0; } // END - if @@ -413,10 +412,10 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { // Construct function name $functionName = sprintf("SURFBAR_MEMBER_EXECUTE_%s_ACTION", strtoupper($action)); - // Is 'userid' set and not 'uid' ? - if ((!isset($urlData['uid'])) && (isset($urlData['userid']))) { + // Is 'userid' set and not 'userid' ? + if ((!isset($urlData['userid'])) && (isset($urlData['userid']))) { // Auto-fix this - $urlData['uid'] = $urlData['userid']; + $urlData['userid'] = $urlData['userid']; } // END - if // Is that function there? @@ -440,14 +439,14 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) { $status = false; // Translate URLs for testing - $url1 = COMPILE_CODE($urlData['url']); - $url2 = COMPILE_CODE($urlData['edit']['url']); + $url1 = compileCode($urlData['url']); + $url2 = compileCode($urlData['edit']['url']); // Has the URL or limit changed? 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']), __FUNCTION__, __LINE__); // All fine @@ -502,15 +501,15 @@ function SURFBAR_HANDLE_LOW_POINTS () { $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(getConfig('surfbar_warn_low_points')); // "Walk" through all URLs - foreach ($UIDs['uid'] as $uid => $dummy) { + foreach ($UIDs['userid'] as $userid => $dummy) { // Is the last notification far enougth away to notify again? - if ((time() - $UIDs['notified'][$uid]) >= getConfig('surfbar_low_interval')) { + if ((time() - $UIDs['notified'][$userid]) >= getConfig('surfbar_low_interval')) { // Prepare content $content = array( - 'uid' => $uid, + 'userid' => $userid, 'low' => translateComma(getConfig('surfbar_warn_low_points')), - 'points' => translateComma($UIDs['points'][$uid]), - 'notified' => generateDateTime($UIDs['notified'][$uid]), + 'points' => translateComma($UIDs['points'][$userid]), + 'notified' => generateDateTime($UIDs['notified'][$userid]), 'interval' => createFancyTime(getConfig('surfbar_low_interval')) ); @@ -518,8 +517,8 @@ 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", - array($uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET surfbar_low_notified=NOW() WHERE `userid`=%s LIMIT 1", + array($userid), __FUNCTION__, __LINE__); } // END - if } // END - foreach } @@ -531,9 +530,9 @@ function SURFBAR_HANDLE_LOW_POINTS () { // // Looks up by an URL -function SURFBAR_LOOKUP_BY_URL ($url, $uid) { +function SURFBAR_LOOKUP_BY_URL ($url, $userid) { // Now lookup that given URL by itself - $urlArray = SURFBAR_GET_URL_DATA($url, 'url', 'id', 'ASC', 'id', sprintf(" AND `userid`=%s", bigintval($uid))); + $urlArray = SURFBAR_GET_URL_DATA($url, 'url', 'id', 'ASC', 'id', sprintf(" AND `userid`=%s", bigintval($userid))); // Was it found? return (count($urlArray) > 0); @@ -558,7 +557,7 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort // 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", @@ -587,7 +586,7 @@ ORDER BY %s %s } // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first! -function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) { +function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) { // Make sure by the user registered URLs are always pending if ($addMode == 'reg') { $status = 'PENDING'; @@ -596,8 +595,8 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg' // Prepare content $content = merge_array($extraFields, array( 'url' => $url, - 'frametester' => FRAMETESTER($url), - 'uid' => $uid, + 'frametester' => generateFrametesterUrl($url), + 'userid' => $userid, 'status' => $status, )); @@ -619,7 +618,7 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg' } // END - if // Translate status and limit - $content['limit'] = surfbarTranslateLimit($content['limit']); + $content['limit'] = translateSurfbarLimit($content['limit']); // If in reg-mode we notify admin if (($addMode == 'reg') || (getConfig('surfbar_notify_admin_unlock') == 'Y')) { @@ -637,15 +636,15 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg' // Inserts an url by given data array and return the insert id function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { // Get userid - $uid = bigintval($urlData['uid']); + $userid = bigintval($urlData['userid']); // Is the id set? - if (empty($uid)) $uid = 0; + if (empty($userid)) $userid = 0; // Just run the insert query for now - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)", + 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, + $userid, $urlData['url'], $urlData['status'], $urlData['limit'], @@ -665,7 +664,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { // Prepare subject $subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT", - strtoupper($messageType) + strtoupper($messageType) )); // Is the subject line there? @@ -675,7 +674,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { } // END - if // Translate some data if present - if (isset($content['status'])) $content['status'] = surfbarTranslateUserStatus($content['status']); + if (isset($content['status'])) $content['status'] = translateSurfbarUrlStatus($content['status']); if (isset($content['registered'])) $content['registered'] = generateDateTime($content['registered'], '2'); if (isset($content['last_locked'])) $content['last_locked'] = generateDateTime($content['last_locked'], '2'); if (isset($content['views_total'])) $content['views_total'] = translateComma($content['views_total']); @@ -683,13 +682,13 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { if (isset($content['views_max'])) $content['views_max'] = translateComma($content['views_max']); // Send the notification out - return sendAdminNotification($subject, $templateName, $content, $content['uid']); + return sendAdminNotification($subject, $templateName, $content, $content['userid']); } // Notify the user about the performed action function SURFBAR_NOTIFY_USER ($messageType, $content) { // Skip notification if userid is zero - if ($content['uid'] == 0) { + if ($content['userid'] == 0) { return false; } // END - if @@ -708,7 +707,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { } // END - if // Translate some data if present - if (isset($content['status'])) $content['status'] = surfbarTranslateUserStatus($content['status']); + if (isset($content['status'])) $content['status'] = translateSurfbarUrlStatus($content['status']); if (isset($content['registered'])) $content['registered'] = generateDateTime($content['registered'], '2'); if (isset($content['last_locked'])) $content['last_locked'] = generateDateTime($content['last_locked'], '2'); if (isset($content['views_total'])) $content['views_total'] = translateComma($content['views_total']); @@ -716,14 +715,14 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { if (isset($content['views_max'])) $content['views_max'] = translateComma($content['views_max']); // Load template - $mailText = LOAD_EMAIL_TEMPLATE($templateName, $content, $content['uid']); + $mailText = loadEmailTemplate($templateName, $content, $content['userid']); // Send the email - return sendEmail($content['uid'], $subject, $mailText); + return sendEmail($content['userid'], $subject, $mailText); } // Translates the limit -function surfbarTranslateLimit ($limit) { +function translateSurfbarLimit ($limit) { // Is this zero? if ($limit == 0) { // Unlimited! @@ -738,7 +737,7 @@ function surfbarTranslateLimit ($limit) { } // Translate the URL status -function surfbarTranslateUserStatus ($status) { +function translateSurfbarUrlStatus ($status) { // Create constant name $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status)); @@ -809,10 +808,10 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() { $templateName = "surfbar_frameset"; // Any frame set? ;-) - if (REQUEST_ISSET_GET('frame')) { + if (isGetRequestElementSet('frame')) { // Use the frame as a template name part... ;-) $templateName = sprintf("surfbar_frame_%s", - REQUEST_GET('frame') + getRequestElement('frame') ); } // END - if @@ -828,7 +827,7 @@ function SURFBAR_CHECK_RELOAD_FULL() { // Cache static reload lock $GLOBALS['surfbar_cache']['surf_lock'] = getConfig('surfbar_static_lock'); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Fixed surf lock is ".getConfig('surfbar_static_lock')."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Fixed surf lock is '.getConfig('surfbar_static_lock') . '', false); // Do we have dynamic model? if (getConfig('surfbar_pay_model') == 'DYNAMIC') { @@ -840,9 +839,9 @@ function SURFBAR_CHECK_RELOAD_FULL() { $result = SQL_QUERY_ESC("SELECT COUNT(l.id) AS cnt FROM - `{!_MYSQL_PREFIX!}_surfbar_locks` AS l + `{?_MYSQL_PREFIX?}_surfbar_locks` AS l INNER JOIN - `{!_MYSQL_PREFIX!}_surfbar_urls` AS u + `{?_MYSQL_PREFIX?}_surfbar_urls` AS u ON u.id=l.url_id WHERE @@ -867,7 +866,7 @@ LIMIT 1", $total = SURFBAR_GET_TOTAL_URLS(); // Do we have some URLs in lock? Admins can always surf on own URLs! - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "userLocks=".SURFBAR_GET_USER_LOCKS().",total={$total}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userLocks=".SURFBAR_GET_USER_LOCKS().",total={$total}", false); $isFull = ((SURFBAR_GET_USER_LOCKS() == $total) && ($total > 0)); // Return result @@ -880,7 +879,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) { $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); // If we dont get any user ids back, there are no URLs - if (count($UIDs['uid']) == 0) { + if (count($UIDs['userid']) == 0) { // No user ids found, no URLs! return 0; } // END - if @@ -888,13 +887,13 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) { // Is the exlude userid set? if ($excludeUserId > 0) { // Then add it - $UIDs['uid'][$excludeUserId] = $excludeUserId; + $UIDs['userid'][$excludeUserId] = $excludeUserId; } // END - if // Get amount from database $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt -FROM `{!_MYSQL_PREFIX!}_surfbar_urls` -WHERE `userid` NOT IN (".implode(', ', $UIDs['uid']).") AND `status`='%s'", +FROM `{?_MYSQL_PREFIX?}_surfbar_urls` +WHERE `userid` NOT IN (".implode(', ', $UIDs['userid']).") AND `status`='%s'", array($status), __FUNCTION__, __LINE__ ); @@ -909,18 +908,18 @@ WHERE `userid` NOT IN (".implode(', ', $UIDs['uid']).") AND `status`='%s'", } // Check wether the user is allowed to book more URLs -function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { +function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid=0) { // Is this admin and userid is zero or does the user has some URLs left to book? - return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, '', array("REJECTED")) < getConfig('surfbar_max_order'))); + return ((($userid == 0) && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order'))); } // Get total amount of URLs of given status for current user -function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status = '',$exclude = '') { +function SURFBAR_GET_TOTAL_USER_URLS ($userid=0, $status = '',$exclude = '') { // Is the user 0 and user is logged in? - if (($uid == 0) && (IS_MEMBER())) { + if (($userid == 0) && (isMember())) { // Then use this userid - $uid = getUserId(); - } elseif ($uid == 0) { + $userid = getUserId(); + } elseif ($userid == 0) { // Error! return (getConfig('surfbar_max_order') + 1); } @@ -944,7 +943,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status = '',$exclude = '') { } // Get amount from database - $cnt = GET_TOTAL_DATA($uid, 'surfbar_urls', 'id', 'userid', true, $add); + $cnt = countSumTotalData($userid, 'surfbar_urls', 'id', 'userid', true, $add); // Return result return $cnt; @@ -968,16 +967,16 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') { if (empty($salt)) { // Generate random hashed string $GLOBALS['surfbar_cache']['salt'] = sha1(generatePassword(mt_rand(200, 255))); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "newSalt=".SURFBAR_GET_SALT()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newSalt='.SURFBAR_GET_SALT().'', false); } else { // Use this as salt! $GLOBALS['surfbar_cache']['salt'] = $salt; - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "oldSalt=".SURFBAR_GET_SALT()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'oldSalt='.SURFBAR_GET_SALT().'', false); } // ... and now the validation code $valCode = generateRandomCode($length, sha1(SURFBAR_GET_SALT().':'.$urlId), getUserId()); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "valCode={$valCode}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'valCode='.valCode.'', false); } // END - while // Hash it with md5() and salt it with the random string @@ -987,7 +986,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') { $valHashedCode = generatePassString($hashedCode); // Return hashed value - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "finalValCode={$valHashedCode}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'finalValCode='.$valHashedCode.'', false); return $valHashedCode; } @@ -1000,35 +999,35 @@ function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) { $code = SURFBAR_GENERATE_VALIDATION_CODE($urlId, $salt); // Return result of checking hashes and salts - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, '---'.$code.'|'.$check.'---', false); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "+++".$salt.'|'.SURFBAR_GET_DATA('last_salt')."+++", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '---'.$code.'|'.$check.'---', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '+++'.$salt.'|'.SURFBAR_GET_DATA('last_salt').'+++', false); return (($code == $check) && ($salt == SURFBAR_GET_DATA('last_salt'))); } // Lockdown the userid/id combination (reload lock) function SURFBAR_LOCKDOWN_ID ($urlId) { - //* DEBUG: */ OUTPUT_HTML("LOCK!"); + //* DEBUG: */ outputHtml('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(getUserId(), bigintval($urlId)), __FUNCTION__, __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), getUserId()), __FUNCTION__, __LINE__); } // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf" function SURFBAR_PAY_POINTS () { // Remove it from the URL owner - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.SURFBAR_GET_USERID().',costs='.SURFBAR_GET_COSTS().'', false); if (SURFBAR_GET_USERID() > 0) { - SUB_POINTS(sprintf("surfbar_%s", getConfig('surfbar_pay_model')), SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); + subtractPoints(sprintf("surfbar_%s", getConfig('surfbar_pay_model')), SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); } // END - if // Book it to the user - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".getUserId().",reward=".SURFBAR_GET_REWARD()."", false); - ADD_POINTS_REFSYSTEM(sprintf("surfbar_%s", getConfig('surfbar_pay_model')), getUserId(), SURFBAR_GET_DATA('reward')); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getUserId().',reward='.SURFBAR_GET_REWARD().'', false); + addPointsThroughReferalSystem(sprintf("surfbar_%s", getConfig('surfbar_pay_model')), getUserId(), SURFBAR_GET_DATA('reward')); } // Updates the statistics of current URL/userid @@ -1046,17 +1045,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()), __FUNCTION__, __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(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __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(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__); } // END - if @@ -1076,21 +1075,21 @@ 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(), getUserId()), __FUNCTION__, __LINE__); // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "salt=".SURFBAR_GET_SALT().",id=".SURFBAR_GET_ID().",uid=".getUserId()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'salt='.SURFBAR_GET_SALT().',id='.SURFBAR_GET_ID().',userid='.getUserId().'', false); // 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(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__); } // END - if // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "affectedRows=".SQL_AFFECTEDROWS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'affectedRows='.SQL_AFFECTEDROWS().'', false); // Return if the update was okay return (SQL_AFFECTEDROWS() == 1); @@ -1098,11 +1097,11 @@ function SURFBAR_UPDATE_SALT_STATS () { // Check if the reload lock is active for given id function SURFBAR_CHECK_RELOAD_LOCK ($urlId) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "id={$urlId}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $urlId . '', false); // Ask the database $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt FROM - `{!_MYSQL_PREFIX!}_surfbar_locks` + `{?_MYSQL_PREFIX?}_surfbar_locks` WHERE `userid`=%s AND `url_id`=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(`last_surfed`) ORDER BY @@ -1118,7 +1117,7 @@ LIMIT 1", SQL_FREERESULT($result); // Return check - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "cnt={$cnt},".SURFBAR_GET_SURF_LOCK()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $cnt . ',' . SURFBAR_GET_SURF_LOCK() . '', false); return ($cnt == 1); } @@ -1126,25 +1125,25 @@ LIMIT 1", function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) { // Init array $UIDs = array( - 'uid' => array(), + 'userid' => array(), 'points' => array(), 'notified' => array(), ); // Do we have a current user id? - if ((IS_MEMBER()) && ($limit == 0)) { + if ((isMember()) && ($limit == 0)) { // Then add this as well - $UIDs['uid'][getUserId()] = getUserId(); - $UIDs['points'][getUserId()] = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $UIDs['userid'][getUserId()] = getUserId(); + $UIDs['points'][getUserId()] = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); $UIDs['notified'][getUserId()] = 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 + `{?_MYSQL_PREFIX?}_surfbar_urls` AS u INNER JOIN - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS d ON u.userid=d.userid WHERE @@ -1159,9 +1158,9 @@ ORDER BY $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified FROM - `{!_MYSQL_PREFIX!}_surfbar_urls` AS u + `{?_MYSQL_PREFIX?}_surfbar_urls` AS u INNER JOIN - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS d ON u.userid=d.userid WHERE @@ -1175,14 +1174,14 @@ ORDER BY // Load all userid while ($content = SQL_FETCHARRAY($result)) { // Get total points - $points = GET_TOTAL_DATA($content['userid'], 'user_points', 'points') - GET_TOTAL_DATA($content['userid'], 'user_data', 'used_points'); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$content['userid']},points={$points}", false); + $points = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userid={$content['userid']},points={$points}", false); // Shall we add this to ignore? if ($points <= $limit) { // Ignore this one! - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$content['userid']} has depleted points amount!", false); - $UIDs['uid'][$content['userid']] = $content['userid']; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userid={$content['userid']} has depleted points amount!", false); + $UIDs['userid'][$content['userid']] = $content['userid']; $UIDs['points'][$content['userid']] = $points; $UIDs['notified'][$content['userid']] = $content['notified']; } // END - if @@ -1192,7 +1191,7 @@ ORDER BY SQL_FREERESULT($result); // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "UIDs::count=".count($UIDs)." (with own userid=".getUserId().')', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UIDs::count=".count($UIDs)." (with own userid=".getUserId().')', false); // Return result return $UIDs; @@ -1201,11 +1200,14 @@ ORDER BY // Determine how many users are Online in surfbar 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` -WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s -GROUP BY userid", - array(getConfig('online_timeout')), __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT + `id` +FROM + `{?_MYSQL_PREFIX?}_surfbar_stats` +WHERE + (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`last_surfed`)) <= {?online_timeout?} +GROUP BY + `userid` ASC", __FUNCTION__, __LINE__); // Fetch count $cnt = SQL_NUMROWS($result); @@ -1267,7 +1269,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)), __FUNCTION__, __LINE__); // ---------- Comment out for debugging/developing member actions! --------- @@ -1280,8 +1282,8 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) // ---------- Comment out for debugging/developing member actions! --------- // Prepare content for notification routines - $data[$urlId]['uid'] = $data[$urlId]['userid']; - $data[$urlId]['frametester'] = FRAMETESTER($data[$urlId]['url']); + $data[$urlId]['userid'] = $data[$urlId]['userid']; + $data[$urlId]['frametester'] = generateFrametesterUrl($data[$urlId]['url']); $data[$urlId]['reward'] = translateComma(getConfig('surfbar_static_reward')); $data[$urlId]['costs'] = translateComma(getConfig('surfbar_static_costs')); @@ -1310,7 +1312,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { $percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1)); // Get total users - $totalUsers = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true); // Get online users $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); @@ -1347,7 +1349,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { $percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1)); // Get total users - $totalUsers = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true); // Calculate addon $addon += abs($max * $percent * $totalUsers); @@ -1385,37 +1387,37 @@ function SURFBAR_GET_LOCK_IDS () { $ignored = array(); // Get all id from locks within the timestamp - $result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) AS last + $result = SQL_QUERY_ESC("SELECT `id`, `url_id`, UNIX_TIMESTAMP(`last_surfed`) AS last_surfed FROM - {!_MYSQL_PREFIX!}_surfbar_locks + `{?_MYSQL_PREFIX?}_surfbar_locks` WHERE - userid=%s + `userid`=%s ORDER BY - id ASC", array(getUserId()), + `id` ASC", array(getUserId()), __FUNCTION__, __LINE__); // Load all entries while ($content = SQL_FETCHARRAY($result)) { // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "next - lid={$content['id']},url={$content['url_id']},rest=".(time() - $last).'/'.SURFBAR_GET_SURF_LOCK()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'next - lid='.$content['id'].',url='.$content['url_id'].',rest='.(time() - $content['last_surfed']).'/'.SURFBAR_GET_SURF_LOCK().'', false); // Skip entries that are too old - if (($last > (time() - SURFBAR_GET_SURF_LOCK())) && (!in_array($content['url_id'], $ignored))) { + if (($content['last_surfed'] > (time() - SURFBAR_GET_SURF_LOCK())) && (!in_array($content['url_id'], $ignored))) { // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "okay - lid={$content['id']},url={$content['url_id']},last={$last}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'okay - lid='.$content['id'].',url='.$content['url_id'].',last='.$content['last_surfed'].'', false); // Add only if missing or bigger - if ((!isset($IDs[$content['url_id']])) || ($IDs[$content['url_id']] > $last)) { + if ((!isset($IDs[$content['url_id']])) || ($IDs[$content['url_id']] > $content['last_surfed'])) { // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ADD - lid={$content['id']},url={$content['url_id']},last={$last}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ADD - lid='.$content['id'].',url='.$content['url_id'].',last='.$content['last_surfed'].'', false); // Add this ID - $IDs[$content['url_id']] = $last; + $IDs[$content['url_id']] = $content['last_surfed']; $USE[$content['url_id']] = $content['id']; } // END - if } else { // Debug message - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ignore - lid={$content['id']},url={$content['url_id']},last={$last}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ignore - lid='.$content['id'].',url='.$content['url_id'].',last='.$content['last_surfed'].'', false); // Ignore these old entries! $ignored[] = $content['url_id']; @@ -1435,16 +1437,16 @@ ORDER BY function SURFBAR_GET_MAX_RANDOM ($UIDs, $add) { // 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", __FUNCTION__, __LINE__); // Log last query - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "lastQuery=".getConfig('db_last_query')."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS().'', false); // Fetch max rand $maxRand = SQL_NUMROWS($result); @@ -1463,7 +1465,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(getUserId()), __FUNCTION__, __LINE__); @@ -1485,12 +1487,12 @@ ORDER BY u.id ASC", } // "Getter" for member action array for given status -function SURFBAR_getModeAction_ARRAY ($status) { +function SURFBAR_GET_ARRAY_FROM_STATUS ($status) { // Init array $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), __FUNCTION__, __LINE__); // Some entries there? @@ -1551,7 +1553,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); // Get maximum randomness factor - $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs['uid'], $add); + $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs['userid'], $add); // If more than one URL can be called generate the random number! if ($maxRand > 1) { @@ -1560,40 +1562,40 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { } // END - if // And query the database - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_SURF_LOCK()."", false); + //* DEBUG: */ logDebugMessage(__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." +WHERE sbu.userid NOT IN (".implode(',', $UIDs['userid']).") AND sbu.`status`='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$add." GROUP BY sbu.id ORDER BY l.last_surfed ASC, sbu.id ASC LIMIT %s,1", - array($randNum), __FUNCTION__, __LINE__ + array($randNum), __FUNCTION__, __LINE__ ); } 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", - array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__ + array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__ ); } // Is there an id number? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "lastQuery=".getConfig('db_last_query')."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS().'', false); if (SQL_NUMROWS($result) == 1) { // Load/cache data - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['surfbar_cache']).") - BEFORE", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - BEFORE', false); $GLOBALS['surfbar_cache'] = merge_array($GLOBALS['surfbar_cache'], SQL_FETCHARRAY($result)); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['surfbar_cache']).") - AFTER", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - AFTER', false); // Determine waiting time $GLOBALS['surfbar_cache']['time'] = SURFBAR_DETERMINE_WAIT_TIME(); @@ -1601,28 +1603,28 @@ LIMIT 1", // Is the last salt there? if (is_null($GLOBALS['surfbar_cache']['last_salt'])) { // Then repair it wit the static! - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_salt - FIXED!", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', false); $GLOBALS['surfbar_cache']['last_salt'] = ''; } // END - if // Fix missing last_surfed if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) { // Fix it here - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_surfed - FIXED!", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false); $GLOBALS['surfbar_cache']['last_surfed'] = 0; } // END - if // Get base/fixed reward and costs $GLOBALS['surfbar_cache']['reward'] = SURFBAR_DETERMINE_REWARD(); $GLOBALS['surfbar_cache']['costs'] = SURFBAR_DETERMINE_COSTS(); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "BASE/STATIC - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'BASE/STATIC - reward='.SURFBAR_GET_REWARD().'|costs='.SURFBAR_GET_COSTS().'', false); // Only in dynamic model add the dynamic bonus! if (getConfig('surfbar_pay_model') == 'DYNAMIC') { // Calculate dynamic reward/costs and add it $GLOBALS['surfbar_cache']['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); $GLOBALS['surfbar_cache']['costs'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DYNAMIC+ - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'DYNAMIC+ - reward='.SURFBAR_GET_REWARD().'|costs='.SURFBAR_GET_COSTS().'', false); } // END - if // Now get the id @@ -1633,7 +1635,7 @@ LIMIT 1", SQL_FREERESULT($result); // Return result - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "nextId={$nextId}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'nextId='.$nextId.'', false); return $nextId; } @@ -1650,7 +1652,7 @@ function SURFBAR_INIT () { // Private getter for data elements function SURFBAR_GET_DATA ($element) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "element={$element}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "element={$element}", false); // Default is null $data = null; @@ -1667,7 +1669,7 @@ function SURFBAR_GET_DATA ($element) { } // Return result - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "element[$element]={$data}", false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "element[$element]={$data}", false); return $data; } diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 40cea64953..5656d7523c 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // @@ -51,205 +50,189 @@ if (!defined('__SECURITY')) { // - ... // // @TODO Move all extension-dependent queries into filters -function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { +function outputAdvancedOverview (&$result_main) { // Init variables/arrays $EXTRAS = ''; - $OUT = ''; - $WHATs = array(); + $OUT = ''; + $WHATs = array(); $DESCRs = array(); $TITLEs = array(); // Chheck for new extensions and updates - $jobsDone = OUTPUT_STANDARD_OVERVIEW($result_main); + $jobsDone = outputStandardOverview($result_main); // Init SQLs - INIT_SQLS(); + initSqls(); + + // Init contentn + foreach ( + array( + // Member accounts + 'confirmed_members','unconfirmed_members','locked_members', + // Tasks + 'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks', + // Mail orders + 'pending_mails','canceled_mails','send_emails', + // Bonus mails + 'send_bonus_mails', + // Purging + 'purged_mails','purged_bonus_mails' + ) as $entry) { + // Set it to zero + $content[$entry] = '0'; + } // END - foreach + + // Extension updates found + $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'"); - if (!$jobsDone) { - // New extensions or updates found - $value = GET_TOTAL_DATA(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'"); - - if ($value > 0) { - define('__TASK_UPDATE_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=updates\">".$value."</a>"); - } else { - define('__TASK_UPDATE_VALUE', '0'); - } - } else { - define('__TASK_UPDATE_VALUE', '0'); - } + if ($value > 0) { + $content['update_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=updates\">".$value."</a>"; + } // END - if // // First check for all account status seperately // // Confirmed accounts - $value = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true); + $value = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true); if ($value > 0) { - define('__CONFIRMED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_user&status=confirmed\">".$value."</a>"); - } else { - define('__CONFIRMED_VALUE', '0'); - } + $content['confirmed_members'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_user&status=confirmed\">".$value."</a>"; + } // END - if // Unconfirmed accounts - $value = GET_TOTAL_DATA('UNCONFIRMED', 'user_data', 'userid', 'status', true); + $value = countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true); if ($value > 0) { - define('__UNCONFIRMED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=chk_regs\">".$value."</a>"); - } else { - define('__UNCONFIRMED_VALUE', '0'); - } + $content['unconfirmed_members'] = "<a href=\"{?URL?}/modules.php?module=admin&what=chk_regs\">".$value."</a>"; + } // END - if - // And locked accounts - $value = GET_TOTAL_DATA('LOCKED', 'user_data', 'userid', 'status', true); + // And locked accounts + $value = countSumTotalData('LOCKED', 'user_data', 'userid', 'status', true); if ($value > 0) { - define('__LOCKED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_user&status=locked\">".$value."</a>"); - } else { - define('__LOCKED_VALUE', '0'); - } + $content['locked_members'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_user&status=locked\">".$value."</a>"; + } // END - if // // Unassigned tasks // - $value = GET_TOTAL_DATA('0', 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'"); + $value = countSumTotalData('0', 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'"); if ($value > 0) { - define('__TASK_NEW_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=unassigned\">".$value."</a>"); - } else { - define('__TASK_NEW_VALUE', '0'); - } + $content['new_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=unassigned\">".$value."</a>"; + } // END - if // // Closed tasks // - $value = GET_TOTAL_DATA('CLOSED', 'task_system', 'id', 'status', true); + $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', true); if ($value > 0) { - define('__TASK_CLOSED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=closed\">".$value."</a>"); - } else { - define('__TASK_CLOSED_VALUE', '0'); - } + $content['closed_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=closed\">".$value."</a>"; + } // END - if // // Deleted tasks // - $value = GET_TOTAL_DATA('DELETED', 'task_system', 'id', 'status', true); + $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', true); if ($value > 0) { - define('__TASK_DELETED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=deleted\">".$value."</a>"); - } else { - define('__TASK_DELETED_VALUE', '0'); - } + $content['deleted_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=deleted\">".$value."</a>"; + } // END - if // // Solved tasks // - $value = GET_TOTAL_DATA('SOLVED', 'task_system', 'id', 'status', true, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId())); + $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', true, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId())); if ($value > 0) { - define('__TASK_SOLVED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=solved\">".$value."</a>"); - } else { - define('__TASK_SOLVED_VALUE', '0'); - } + $content['solved_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task&type=solved\">".$value."</a>"; + } // END - if // // Your tasks // - $value = GET_TOTAL_DATA(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'"); + $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'"); if ($value > 0) { - define('__TASK_YOUR_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=list_task\">".$value."</a>"); - } else { - define('__TASK_YOUR_VALUE', '0'); - } + $content['your_tasks'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_task\">".$value."</a>"; + } // END - if // // Mails waiting to be approved // - $value = GET_TOTAL_DATA('ADMIN', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', true); if ($value > 0) { - define('__MAIL_ADMIN_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=unlock_emails\">".$value."</a>"); - } else { - define('__MAIL_ADMIN_VALUE', '0'); - } + $content['pending_mails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=unlock_emails\">".$value."</a>"; + } // END - if // // Unfinished mail orders // - $value = GET_TOTAL_DATA('TEMP', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', true); if ($value > 0) { - define('__MAIL_TEMP_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"); - } else { - define('__MAIL_TEMP_VALUE', '0'); - } + $content['canceled_mails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"; + } // END - if // // Sent mail orders // - $value = GET_TOTAL_DATA('SEND', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', true); if ($value > 0) { - define('__MAIL_SEND_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=email_archiv\">".$value."</a>"); - } else { - define('__MAIL_SEND_VALUE', '0'); - } + $content['send_emails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=email_archiv\">".$value."</a>"; + } // END - if // // Autopurged mails // - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Get auto-purged mails - $value = GET_TOTAL_DATA('DELETED', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', true); if ($value > 0) { - define('__MAIL_DELETED_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"); - } else { - define('__MAIL_DELETED_VALUE', '0'); - } + $content['purged_mails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"; + } // END - if // // Autopurged bonus mails // - if (GET_EXT_VERSION('bonus') >= '0.1.8') { + if (isExtensionInstalledAndNewer('bonus', '0.1.8')) { // Get auto-purged bonus mails - $value = GET_TOTAL_DATA('DELETED', 'bonus', 'id', 'data_type', true); + $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', true); if ($value > 0) { - define('__MAIL_BONUS_AP_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"); - } else { - define('__MAIL_BONUS_AP_VALUE', '0'); - } - } elseif (EXT_IS_ACTIVE('bonus')) { - define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8'))); + $content['purged_bonus_mails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"; + } // END - if + } elseif (isExtensionActive('bonus')) { + $content['purged_bonus_mails'] = sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED'), '0.1.8'); } else { - define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>"); + $content['purged_bonus_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>"; } } else { - define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>"); - define('__MAIL_DELETED_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>"); + $content['purged_bonus_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>"; + $content['purged_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>"; } // // Sent bonus mails // - if (GET_EXT_VERSION('bonus') >= '0.1.8') { + if (isExtensionInstalledAndNewer('bonus', '0.1.8')) { // Get sent bonus mails (but not notifications) - $value = GET_TOTAL_DATA('SEND', 'bonus', 'id', 'data_type', true, " AND `is_notify`='N'"); + $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', true, " AND `is_notify`='N'"); if ($value > 0) { - define('__MAIL_BONUS_SEND_VALUE', "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"); - } else { - define('__MAIL_BONUS_SEND_VALUE', '0'); - } - } elseif (EXT_IS_ACTIVE('bonus')) { - define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8'))); + $content['send_bonus_mails'] = "<a href=\"{?URL?}/modules.php?module=admin&what=email_details\">".$value."</a>"; + } // END - if + } elseif (isExtensionActive('bonus')) { + $content['send_bonus_mails'] = sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED'), '0.1.8'); } else { - define('__MAIL_BONUS_SEND_VALUE', getMessage('ADMIN_EXT_BONUS_404')); + $content['send_bonus_mails'] = getMessage('ADMIN_EXT_BONUS_404'); } - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Start finding them... $since = getConfig('ap_inactive_since'); $EXCLUDE_LIST = ''; @@ -259,77 +242,87 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // Check for more extensions // @TODO These can be rewritten to filter - if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; - if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; - if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; - if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; + if (isExtensionActive('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid').""; + if (isExtensionActive('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid').""; + if (isExtensionActive('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid').""; + if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) { + // Recent ext-holiday found + $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; + } // END - if // Check for all accounts - ADD_SQL("SELECT DISTINCT d.userid, d.email, d.last_online -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.") + addSql("SELECT + d.userid, d.email, d.last_online +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"); +ORDER BY + d.userid ASC"); $WHATs[] = 'list_autopurge'; $DESCRs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE'); $TITLEs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE'); } - if (GET_EXT_VERSION('sql_patches') >= '0.3.4') { + if (getExtensionVersion('sql_patches') >= '0.3.4') { // Check for accounts without referal - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `refid`=0 ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 ORDER BY `userid` ASC"); $DESCRs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF_TITLE'); $WHATs[] = 'list_user&mode=norefs'; } - if (EXT_IS_ACTIVE('payout')) { + if (isExtensionActive('payout')) { // List new payout requests - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `status`='NEW' ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `status`='NEW' ORDER BY `userid` ASC"); $WHATs[] = 'list_payouts'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_WAITING'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE'); - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_payouts` ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` ORDER BY `userid` ASC"); $WHATs[] = 'list_payouts'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE'); } - if (EXT_IS_ACTIVE('wernis')) { + if (isExtensionActive('wernis')) { // List new wernis requests - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_wernis` ORDER BY `userid` ASC"); $WHATs[] = 'list_wernis'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL_TITLE'); } - if (EXT_IS_ACTIVE('primera')) { + if (isExtensionActive('primera')) { // List new primera requests - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_primera` ORDER BY `userid` ASC"); $WHATs[] = 'list_primera'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE'); } - if (EXT_IS_ACTIVE('holiday')) { + if (isExtensionActive('holiday')) { // List holiday requests - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_holidays` ORDER BY `userid` ASC"); + addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC"); $WHATs[] = 'list_holiday'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS_TITLE'); } - if (GET_EXT_VERSION('bonus') >= '0.8.7') { + if (isExtensionInstalledAndNewer('bonus', '0.8.7')) { // List all notifications - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `is_notify`='Y' ORDER BY `timestamp` DESC"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `is_notify`='Y' ORDER BY `timestamp` DESC"); $WHATs[] = 'list_notifications'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE'); } // END - if - if (GET_EXT_VERSION('bonus') >= '0.2.3') { + if (isExtensionInstalledAndNewer('bonus', '0.2.3')) { // Active rallye - if (GET_EXT_VERSION('bonus') >= '0.6.9') { + if (getExtensionVersion('bonus') >= '0.6.9') { // Add more bonus points here $USE = '(0'; if (getConfig('bonus_click_yn') == 'Y') $USE .= ' + `turbo_bonus`'; @@ -345,45 +338,58 @@ ORDER BY d.userid"); // Autopurge installed? $lastOnline = ''; - if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { + if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { // Use last online timestamp to keep inactive members away from here - $lastOnline = sprintf(" AND `last_online` >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since')); - } + $lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})'; + } // END - if - ADD_SQL("SELECT ".$USE." AS points -FROM `{!_MYSQL_PREFIX!}_user_data` -WHERE `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline." -ORDER BY points DESC, `userid` ASC"); + addSql("SELECT + ".$USE." AS points +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline." +ORDER BY + `points` DESC, + `userid` ASC"); $WHATs[] = 'list_bonus'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_BONUS'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE'); } - if (GET_EXT_VERSION('beg') >= '0.1.2') { + if ((isExtensionActive('beg')) && (getExtensionVersion('beg') >= '0.1.2')) { // Begging rallye // Autopurge installed? $lastOnline = ''; - if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { + if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { // Use last online timestamp to keep inactive members away from here - $lastOnline = sprintf(" AND `last_online` >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since')); - } + $lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})'; + } // END - if - ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` -WHERE `status`='CONFIRMED' AND `beg_points` > 0".$lastOnline." -ORDER BY `beg_points` DESC, `userid` ASC"); + addSql("SELECT + `userid` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `status`='CONFIRMED' AND + `beg_points` > 0 + ".$lastOnline." +ORDER BY + `beg_points` DESC, + `userid` ASC"); $WHATs[] = 'list_beg'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_BEG'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_BEG_TITLE'); } - if (EXT_IS_ACTIVE('doubler')) { + if (isExtensionActive('doubler')) { // List waiting payouts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_doubler` WHERE `completed`='N' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` WHERE `completed`='N' ORDER BY `id` ASC"); $WHATs[] = 'list_doubler&mode=waiting&select=all'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_WAITING'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE'); - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_doubler` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` ORDER BY `id` ASC"); $WHATs[] = 'list_doubler'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_ALL_TITLE'); @@ -392,7 +398,7 @@ ORDER BY `beg_points` DESC, `userid` ASC"); // // All referal banner // - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `id` ASC"); $WHATs[] = 'refbanner'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ALL_TITLE'); @@ -400,7 +406,7 @@ ORDER BY `beg_points` DESC, `userid` ASC"); // // All activated referal banner // - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `visible`='Y' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y' ORDER BY `id` ASC"); $WHATs[] = 'refbanner'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ACTIVE'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE'); @@ -408,7 +414,7 @@ ORDER BY `beg_points` DESC, `userid` ASC"); // // All extensions // - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `id` ASC"); $WHATs[] = 'extensions'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE'); @@ -416,174 +422,177 @@ ORDER BY `beg_points` DESC, `userid` ASC"); // // All activated extensions // - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_active`='Y' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_active`='Y' ORDER BY `id` ASC"); $WHATs[] = 'extensions&active=Y'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE'); - if (EXT_IS_ACTIVE('engine')) { + if (isExtensionActive('engine')) { // List all export accounts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_engine_accounts` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_accounts` ORDER BY `id` ASC"); $WHATs[] = 'list_engine'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_ENGINE'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_TITLE'); // List all pending accounts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_engine_accounts` WHERE `status`='UNCONFIRMED' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_accounts` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC"); $WHATs[] = 'unlock_engine'; $DESCRs[] = getMessage('ADMIN_TASK_UNLOCK_ENGINE'); $TITLEs[] = getMessage('ADMIN_TASK_UNLOCK_ENGINE_TITLE'); // List all safes - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_engine_safe` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_safe` ORDER BY `id` ASC"); $WHATs[] = 'list_engine&mode=safe'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_ENGINE_SAFES'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_SAFES_TITLE'); // List all export URLs - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_engine_urls` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_urls` ORDER BY `id` ASC"); $WHATs[] = 'engine_urls'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS_TITLE'); } // END - if - if (EXT_IS_ACTIVE('sponsor')) { + if (isExtensionActive('sponsor')) { // List all sponsors - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` ORDER BY `id` ASC"); $WHATs[] = 'list_sponsor'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_TITLE'); // List confirmed sponsor accounts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `status`='CONFIRMED' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='CONFIRMED' ORDER BY `id` ASC"); $WHATs[] = 'list_sponsor'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_CONFIRMED'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE'); // List unconfirmed sponsor accounts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `status`='UNCONFIRMED' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC"); $WHATs[] = 'list_sponsor'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE'); // List locked sponsor accounts - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `status`='LOCKED' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='LOCKED' ORDER BY `id` ASC"); $WHATs[] = 'list_sponsor'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_LOCKED'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE'); // List waiting sponsor accounts to be approved - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `status`='PENDING' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='PENDING' ORDER BY `id` ASC"); $WHATs[] = 'unlock_sponsor'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_PENDING'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE'); // Waiting payments - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id` ASC"); $WHATs[] = 'list_sponsor_pays'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE'); - } + } // END - if - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // List country codes - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `id` ASC"); $WHATs[] = 'list_country'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_COUNTRY'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_COUNTRY_TITLE'); - } + } // END - if - if (EXT_IS_ACTIVE('theme')) { + if (isExtensionActive('theme')) { // List all themes - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC"); $WHATs[] = 'theme_edit'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_THEME_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ALL_TITLE'); // List active themes - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_active='Y' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_active`='Y' ORDER BY `id` ASC"); $WHATs[] = 'theme_edit'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE'); - } + } // END - if - if (EXT_IS_ACTIVE('admins')) { + if (isExtensionActive('admins')) { // List all administrator logins - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC"); $WHATs[] = 'admins_edit'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL_TITLE'); - } + } // END - if - if (EXT_IS_ACTIVE('surfbar')) { + if (isExtensionActive('surfbar')) { // List all URLs in surfbar - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_surfbar_urls` ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `id` ASC"); $WHATs[] = 'list_surfbar_urls'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE'); // List all pending URLs in surfbar - ADD_SQL("SELECT `id` FROM `{!_MYSQL_PREFIX!}_surfbar_urls` WHERE `status`='PENDING' ORDER BY `id`"); + addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `status`='PENDING' ORDER BY `id` ASC"); $WHATs[] = 'unlock_surfbar_urls'; $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING'); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE'); - } + } // END - if // Generate extra overview rows - $EXTRAS .= TASK_CREATE_EXTRA_ROWS($WHATs, $DESCRs, $TITLEs); + $EXTRAS .= createExtraTaskRows($WHATs, $DESCRs, $TITLEs); // If empty just keep a forced-space left for CSS issues if (empty($EXTRAS)) $EXTRAS = ' '; // Add compiled string to constant for final template - define('__OVERVIEW_EXTRA_TABLE', $EXTRAS); + $content['extra_table'] = $EXTRAS; // Simply load the template... :-) - LOAD_TEMPLATE('admin_overview_task'); + loadTemplate('admin_overview_task', false, $content); } // -function TASK_CREATE_EXTRA_ROWS ($WHATs, $DESCRs, $TITLEs) { +function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) { // Init variables $OUT = ''; $SW = 2; // Sadly this cannot be rewritten to a filter... :( - foreach (GET_SQLS() as $key => $sql) { - // Run SQL command, get line numbers and free memory - $result = SQL_QUERY($sql, __FUNCTION__, __LINE__); - - // Get rows - $value = SQL_NUMROWS($result); - - // Free result - SQL_FREERESULT($result); - - // Prepare array for output - $content = array( - 'row_descr' => $DESCRs[$key], - 'row_sw' => $SW, - 'bottom' => '', - ); - - // Rewrite CSS class if not last entry is reached - if ($key < (COUNT_SQLS() - 1)) $content['bottom'] = 'bottom2'; - - if (($value > 0) && (!empty($WHATs[$key]))) { - if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE'); - $content['row_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=".$WHATs[$key]."\" title=\"".$TITLEs[$key]."\">".$value."</a>"; - } else { - $content['row_link'] = 0; - } + foreach (getSqls() as $sqls) { + // New format... + foreach ($sqls as $key => $sql) { + // Run SQL command, get line numbers and free memory + $result = SQL_QUERY($sql, __FUNCTION__, __LINE__); + + // Get rows + $value = SQL_NUMROWS($result); + + // Free result + SQL_FREERESULT($result); + + // Prepare array for output + $content = array( + 'row_descr' => $DESCRs[$key], + 'row_sw' => $SW, + 'bottom' => '', + ); + + // Rewrite CSS class if not last entry is reached + if ($key < (count($sqls) - 1)) $content['bottom'] = 'bottom2'; + + if (($value > 0) && (!empty($WHATs[$key]))) { + if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE'); + $content['row_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=".$WHATs[$key]."\" title=\"".$TITLEs[$key]."\">".$value."</a>"; + } else { + $content['row_link'] = 0; + } - // And insert the final string into extras template - $OUT .= LOAD_TEMPLATE('admin_overview_task_rows', true, $content); + // And insert the final string into extras template + $OUT .= loadTemplate('admin_overview_task_rows', true, $content); - // Switch color - $SW = 3 - $SW; - } // END - if + // Switch color + $SW = 3 - $SW; + } // END- foreach + } // END - foreach // Return output in the template - return LOAD_TEMPLATE('admin_overview_task_extras', true, $OUT); + return loadTemplate('admin_overview_task_extras', true, $OUT); } // diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index 0c36ae43b9..1cac6e877e 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Create a selection box with installed and activated themes or all if admin @@ -65,20 +64,20 @@ function generateThemeSelectionBox () { $add = " WHERE `theme_active`='Y'"; // Do we have admin? - if (IS_ADMIN()) $add = ''; + if (isAdmin()) $add = ''; // Select all themes we want - $result = SQL_QUERY("SELECT `theme_path`, `theme_name` FROM `{!_MYSQL_PREFIX!}_themes`".$add." ORDER BY `theme_name` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `theme_path`, `theme_name` FROM `{?_MYSQL_PREFIX?}_themes`".$add." ORDER BY `theme_name` ASC", __FILE__, __LINE__); // Load all themes while ($content = SQL_FETCHARRAY($result)) { // Construct relative include file name - $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($content['theme_path'])); + $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE($content['theme_path'])); // Load it's theme.php file if found - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // And save all data in array - loadInclude($INC); + loadInclude($inc); $themesArray['theme_unix'][] = $content['theme_path']; $themesArray['theme_name'][] = $GLOBALS['theme_data']['name']; } // END - if @@ -102,13 +101,13 @@ function generateThemeSelectionBox () { ); // Return generated selection - return LOAD_TEMPLATE('theme_select_form', true, $content); + return loadTemplate('theme_select_form', true, $content); } // Get version from name -function THEME_GET_VERSION ($name) { +function getThemeVersion ($name) { // Is the extension 'theme' installed? - if (!EXT_IS_ACTIVE('theme')) { + if (!isExtensionActive('theme')) { // Then abort here return '!.!'; } // END - if @@ -122,10 +121,10 @@ function THEME_GET_VERSION ($name) { $cver = $GLOBALS['cache_array']['themes']['theme_ver'][$name]; // Count up - incrementConfigEntry('cache_hits'); - } elseif (GET_EXT_VERSION('cache') != '0.1.8') { + incrementStatsEntry('cache_hits'); + } elseif (getExtensionVersion('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), __FUNCTION__, __LINE__); // Entry found? @@ -151,7 +150,7 @@ function ifThemeExists ($name) { // Checks if a theme is active function isThemeActive ($name) { // Is the extension 'theme' installed? - if (!EXT_IS_ACTIVE('theme')) { + if (!isExtensionActive('theme')) { // Then abort here return false; } // END - if @@ -165,10 +164,10 @@ function isThemeActive ($name) { $active = ($GLOBALS['cache_array']['themes']['theme_active'][$name] == 'Y'); // Count up - incrementConfigEntry('cache_hits'); - } elseif (GET_EXT_VERSION('cache') != '0.1.8') { + incrementStatsEntry('cache_hits'); + } elseif (getExtensionVersion('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), __FUNCTION__, __LINE__); // Is the theme active and installed? @@ -185,7 +184,7 @@ function isThemeActive ($name) { // Gets current human-readable theme name function getCurrentThemeName () { // Is the extension 'theme' installed? - if (!EXT_IS_ACTIVE('theme')) { + if (!isExtensionActive('theme')) { // Then abort here return 'default'; } // END - if @@ -199,10 +198,10 @@ function getCurrentThemeName () { $name = $GLOBALS['cache_array']['themes']['theme_name'][$name]; // Count up - incrementConfigEntry('cache_hits'); - } elseif (GET_EXT_VERSION('cache') != '0.1.8') { + incrementStatsEntry('cache_hits'); + } elseif (getExtensionVersion('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), __FUNCTION__, __LINE__); // Load theme name @@ -220,18 +219,18 @@ function getCurrentThemeName () { $GLOBALS['curr_theme'] = getCurrentTheme(); // Check if new theme is selcted -if ((REQUEST_ISSET_POST('new_theme')) && (REQUEST_POST('new_theme') != $GLOBALS['curr_theme'])) { +if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != $GLOBALS['curr_theme'])) { // Set new theme for guests - $newTheme = REQUEST_POST('new_theme'); + $newTheme = postRequestElement('new_theme'); // Change to new theme - setSession('mxchange_theme', $newTheme); + setTheme($newTheme); // Remove current from array - REMOVE_INC_FROM_POOL(sprintf("theme/%s/theme.php", $GLOBALS['curr_theme'])); + removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", $GLOBALS['curr_theme'])); // Add new theme - ADD_INC_TO_POOL(sprintf("theme/%s/theme.php", $newTheme)); + addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme)); } // END - if // [EOF] diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index cdd28764ea..4ff97ebdd6 100644 --- a/inc/libs/transfer_functions.php +++ b/inc/libs/transfer_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,37 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // -function TRANSFER_AUTPPURGE($max, $age) { +function autoPurgeTransfers($max, $age) { // First get total in-going lines - $result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_transfers_in` ORDER BY `id`", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` ORDER BY `id`", __FUNCTION__, __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, __FUNCTION__, __LINE__); + $result = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_transfers_in` SET `time_trans`=0 ORDER BY `id` LIMIT ".$remove, __FUNCTION__, __LINE__); } // Second get total out-going lines - $result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_transfers_out` ORDER BY `id`", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY `id`", __FUNCTION__, __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, __FUNCTION__, __LINE__); + $result = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_transfers_out` SET `time_trans`=0 ORDER BY `id` LIMIT ".$remove, __FUNCTION__, __LINE__); } // Remove old in-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FUNCTION__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FUNCTION__, __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.")", __FUNCTION__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FUNCTION__, __LINE__); $REMOVE += SQL_AFFECTEDROWS(); // Only send email to admin(s) when we have removed entries diff --git a/inc/libs/uberwach_functions.php b/inc/libs/uberwach_functions.php index eae74b4c08..8539e5c8b9 100644 --- a/inc/libs/uberwach_functions.php +++ b/inc/libs/uberwach_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Loads the snippet for the uberwach action function loadUberwachSnippet () { // Simply load the template here - LOAD_TEMPLATE('uberwach_snippet'); + loadTemplate('uberwach_snippet'); } // diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 75861062de..16e7344649 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,28 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add links for selecting some users function alpha ($sortby, $colspan, $return=false) { - if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', 0); - $add = "&page=".REQUEST_GET('page')."&offset=".REQUEST_GET('offset'); - if (REQUEST_ISSET_GET('mode')) $add .= "&mode=".REQUEST_GET('mode'); + if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', 0); + $add = "&page=".getRequestElement('page')."&offset=".getRequestElement('offset'); + if (isGetRequestElementSet('mode')) $add .= "&mode=".getRequestElement('mode'); /* Creates the list of letters and makes them a link. */ - $alphabet = explode(',', getMessage('_ALL2') . 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z' . getMessage('_OTHERS')); + $alphabet = explode(',', getMessage('_ALL2') . ',A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,' . getMessage('_OTHERS')); $num = count($alphabet) - 1; $OUT = ''; while (list($counter, $ltr) = each($alphabet)) { - if (REQUEST_GET('letter') == $ltr) { + if (getRequestElement('letter') == $ltr) { // Current letter is letter from URL $OUT .= "<strong>".$ltr."</strong>"; } else { // Output link to letter $OUT .= "<a href=\"{?URL?}/modules.php?module=admin&what=".getWhat(); - if (REQUEST_ISSET_GET('mode')) $OUT .= "&mode=".REQUEST_GET('mode'); + if (isGetRequestElementSet('mode')) $OUT .= "&mode=".getRequestElement('mode'); $OUT .= "&letter=".$ltr."&sortby=".$sortby.$add."\">".$ltr."</a>"; } @@ -70,45 +69,43 @@ function alpha ($sortby, $colspan, $return=false) { } } // END - while - define('__ALPHA_LIST', $OUT); - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_alpha", true); + $OUT = loadTemplate('admin_list_user_alpha', true, $OUT); if ($return === true) { // Return generated code return $OUT; } else { // Output generated code - OUTPUT_HTML($OUT); + outputHtml($OUT); } } // Add links for sorting -function SortLinks ($letter, $sortby, $colspan, $return=false) { +function addSortLinks ($letter, $sortby, $colspan, $return=false) { $OUT = ''; - if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', 0); - if (!REQUEST_ISSET_GET('page')) REQUEST_SET_GET('page' , 0); + if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', 0); + if (!isGetRequestElementSet('page')) setRequestGetElement('page' , 0); // Add page and offset - $add = "&page=".REQUEST_GET('page')."&offset=".REQUEST_GET('offset'); + $add = '&page=' . getRequestElement('page') . '&offset=' . getRequestElement('offset'); // Add status or mode - if (REQUEST_ISSET_GET('status')) $add .= '&mode=' . REQUEST_GET('status'); - elseif (REQUEST_ISSET_GET('mode')) $add .= '&mode=' . REQUEST_GET('mode'); + if (isGetRequestElementSet('status')) $add .= '&mode=' . getRequestElement('status'); + elseif (isGetRequestElementSet('mode')) $add .= '&mode=' . getRequestElement('mode'); // Makes order by links.. - if ($letter == "front") $letter = getMessage('_ALL2'); + if ($letter == 'front') $letter = getMessage('_ALL2'); // Prepare array with all possible sorters $list = array( 'userid' => getMessage('_UID'), 'family' => getMessage('FAMILY_NAME'), - 'email' => getMessage('ADDY'), + 'email' => getMessage('EMAIL_ADDRESS'), 'REMOTE_ADDR' => getMessage('REMOTE_IP') ); // Add nickname if extension is installed - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('nickname')) { $list['nickname'] = getMessage('NICKNAME'); } // END - if @@ -120,53 +117,56 @@ function SortLinks ($letter, $sortby, $colspan, $return=false) { } } // END - foreach - define('__SORT_LIST', substr($OUT, 0, -13)); + $content['list'] = substr($OUT, 0, -13); // Load template - $OUT = LOAD_TEMPLATE('admin_list_user_sort', true); + $OUT = loadTemplate('admin_list_user_sort', true, $content); + + // Should we return or output? if ($return === true) { // Return code return $OUT; } else { // Output code - OUTPUT_HTML($OUT); + outputHtml($OUT); } } // Add page navigation -function ADD_PAGENAV ($PAGES, $offset, $show_form, $colspan,$return=false) { - if ($show_form) { - // Load form for changing number of lines - define('__FORM_HEADER', LOAD_TEMPLATE('admin_list_user_sort_form', true)); - define('__FORM_FOOTER', '<tr><td colspan="{!__COLSPAN2!}" class="seperator bottom2"> </td></tr>'); - } else { - // Empty row - define('__FORM_HEADER', '<tr><td colspan="' . $colspan . '" class="seperator"> </td></tr>'); - define('__FORM_FOOTER', '<tr><td colspan="{!__COLSPAN2!}" class="seperator bottom2"> </td></tr>'); - } +function addPageNavigation ($PAGES, $offset, $show_form, $colspan,$return=false) { + // @TODO These two constants are no longer used, maybe we reactivate this code? + //if ($show_form === true) { + // // Load form for changing number of lines + // define('__FORM_HEADER', loadTemplate('admin_list_user_sort_form', true)); + // define('__FORM_FOOTER', '<tr><td colspan="'.$colspan.'" class="seperator bottom2"> </td></tr>'); + //} else { + // // Empty row + // define('__FORM_HEADER', '<tr><td colspan="' . $colspan . '" class="seperator"> </td></tr>'); + // define('__FORM_FOOTER', '<tr><td colspan="' . $colspan . '" class="seperator bottom2"> </td></tr>'); + //} $OUT = ''; for ($page = 1; $page <= $PAGES; $page++) { - if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET('page')) && ($page == '1'))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) { $OUT .= '<strong>-'; } else { - if (!REQUEST_ISSET_GET('letter')) REQUEST_SET_GET('letter', getMessage('_ALL2')); - if (!REQUEST_ISSET_GET('sortby')) REQUEST_SET_GET('sortby', 'userid'); + if (!isGetRequestElementSet('letter')) setRequestGetElement('letter', getMessage('_ALL2')); + if (!isGetRequestElementSet('sortby')) setRequestGetElement('sortby', 'userid'); // Base link $OUT .= '<a href="{?URL?}/modules.php?module=admin&what=' . getWhat(); // Add status or mode - if (REQUEST_ISSET_GET('status')) $OUT .= '&mode=' . REQUEST_GET('status'); - elseif (REQUEST_ISSET_GET('mode')) $OUT .= '&mode=' . REQUEST_GET('mode'); + if (isGetRequestElementSet('status')) $OUT .= '&mode=' . getRequestElement('status'); + elseif (isGetRequestElementSet('mode')) $OUT .= '&mode=' . getRequestElement('mode'); // Letter and so on - $OUT .= '&letter=' . REQUEST_GET('letter') . '&sortby=' . REQUEST_GET('sortby') . '&page=' . $page . '&offset=' . $offset . '">'; + $OUT .= '&letter=' . getRequestElement('letter') . '&sortby=' . getRequestElement('sortby') . '&page=' . $page . '&offset=' . $offset . '">'; } $OUT .= $page; - if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET('page')) && ($page == '1'))) { + if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == '1'))) { $OUT .= '-</strong>'; } else { $OUT .= '</a>'; @@ -175,16 +175,17 @@ function ADD_PAGENAV ($PAGES, $offset, $show_form, $colspan,$return=false) { if ($page < $PAGES) $OUT .= ' | '; } // END - for - define('__PAGENAV_LIST', $OUT); + // Remember the list + $content['list'] = $OUT; // Load template - $OUT = LOAD_TEMPLATE('admin_list_user_pagenav', true); + $OUT = loadTemplate('admin_list_user_pagenav', true, $content); if ($return === true) { // Return code return $OUT; } else { // Output code - OUTPUT_HTML($OUT); + outputHtml($OUT); } } @@ -194,22 +195,22 @@ function generateUserEmailLink($email, $mod = 'admin') { $locked = " AND `status`='CONFIRMED'"; // But admins shall always see it - if (IS_ADMIN()) $locked = ''; + if (isAdmin()) $locked = ''; $result = SQL_QUERY_ESC("SELECT `userid` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `email`='%s'" . $locked." LIMIT 1", array($email), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load userid - list($uid) = SQL_FETCHROW($result); + list($userid) = SQL_FETCHROW($result); // Rewrite email address to contact link - $email = '{?URL?}/modules.php?module=' . $mod . '&what=user_contct&uid=' . bigintval($uid); + $email = '{?URL?}/modules.php?module=' . $mod . '&what=user_contct&userid=' . bigintval($userid); } // END - if // Free memory @@ -225,9 +226,9 @@ function determineRandomReferalId () { $refid = 0; // Is the extension version fine? - if (GET_EXT_VERSION('user') >= '0.3.4') { + if (getExtensionVersion('user') >= '0.3.4') { // Get all user ids - $totalUsers = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed').""); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed').""); // Do we have at least one? if ($totalUsers > 0) { @@ -235,8 +236,8 @@ function determineRandomReferalId () { $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", - array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= {?user_min_confirmed?} ORDER BY `rand_confirmed` DESC LIMIT %s, 1", + array($randNum), __FUNCTION__, __LINE__); // Do we have one entry there? if (SQL_NUMROWS($result) == 1) { @@ -244,7 +245,7 @@ function determineRandomReferalId () { 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), __FUNCTION__, __LINE__); } // END - if @@ -258,13 +259,14 @@ function determineRandomReferalId () { } // Do the user login -function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { +function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.php?module=index&what=login&login=') { // Init variables $dmy = ''; $add = ''; + $errorCode = 0; // Add last_login if available $lastOnline = ''; - if (GET_EXT_VERSION('sql_patches') >= '0.2.8') { + if (getExtensionVersion('sql_patches') >= '0.2.8') { $lastOnline = ', `last_login`'; } // END - if @@ -278,22 +280,22 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { ); // Check login data - if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE($uid))) { + if ((isExtensionActive('nickname')) && (isNicknameOrUserid($userid))) { // Nickname entered - $result = SQL_QUERY_ESC("SELECT `userid`, `password`, `last_online`" . $lastOnline . " FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `nickname`='%s' AND `status`='CONFIRMED' LIMIT 1", - array($uid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `password`, `last_online`" . $lastOnline . " FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `status`='CONFIRMED' LIMIT 1", + array($userid), __FUNCTION__, __LINE__); } else { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT `userid`, `password`, `last_online`" . $lastOnline . " FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", - array($uid, $content['hash']), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `password`, `last_online`" . $lastOnline . " FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array($userid, $content['hash']), __FUNCTION__, __LINE__); } // Load entry $content = SQL_FETCHARRAY($result); - if (!empty($content['userid'])) $uid = bigintval($content['userid']); + if (!empty($content['userid'])) $userid = bigintval($content['userid']); // Is there an entry? - if ((SQL_NUMROWS($result) == 1) && ((isNicknameUsed($content['userid'] === true) && (!empty($content['userid']))) || ($content['userid'] == $uid))) { + if ((SQL_NUMROWS($result) == 1) && ((isNicknameUsed($content['userid'] === true) && (!empty($content['userid']))) || ($content['userid'] == $userid))) { // Free result SQL_FREERESULT($result); @@ -313,8 +315,8 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { // ... and update database // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `password`='%s' WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", - array($content['hash'], $uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `password`='%s' WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array($content['hash'], $userid), __FUNCTION__, __LINE__); // No login bonus by default $GLOBALS['bonus_payed'] = false; @@ -322,7 +324,7 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { // Probe for last online timemark $probe = time() - $content['last_online']; if (!empty($content['last_login'])) $probe = time() - $content['last_login']; - if ((GET_EXT_VERSION('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) { + if ((getExtensionVersion('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) { // Add login bonus to user's account $add = sprintf(", `login_bonus`=`login_bonus`+%s", (float)getConfig('login_bonus') @@ -330,7 +332,7 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { $GLOBALS['bonus_payed'] = true; // Subtract login bonus from userid's account or jackpot - if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != 'ADD')) BONUS_POINTS_HANDLER('login_bonus'); + if ((getExtensionVersion('bonus') >= '0.3.5') && (getConfig('bonus_mode') != 'ADD')) handleBonusPoints('login_bonus'); } // END - if // Calculate new hash with the secret key and master salt together @@ -338,18 +340,18 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { // Update global array // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); - setUserId($uid); + setUserId($userid); // Try to set session data (which shall normally always work!) - if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) { + if ((setSession('userid', $userid )) && (setSession('u_hash', $content['hash']))) { // Update database records - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `total_logins`=`total_logins`+1" . $add . " WHERE `userid`=%s LIMIT 1", - array($uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `total_logins`=`total_logins`+1" . $add . " WHERE `userid`=%s LIMIT 1", + array($userid), __FUNCTION__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { // Is a success URL set? if (empty($successUrl)) { // Procedure to checking for login data - if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) { + if (($GLOBALS['bonus_payed']) && (isExtensionActive('bonus'))) { // Bonus added (just displaying!) $URL = 'modules.php?module=chk_login&mode=bonus'; } else { @@ -362,25 +364,25 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { } } else { // Cannot update counter! - $URL = 'modules.php?module=index&what=login&login='.getCode('CNTR_FAILED'); + $errorCode = getCode('CNTR_FAILED'); } } else { // Cookies not setable! - $URL = 'modules.php?module=index&what=login&login='.getCode('NO_COOKIES'); + $errorCode = getCode('NO_COOKIES'); } - } elseif (GET_EXT_VERSION('sql_patches') >= '0.6.1') { + } elseif (getExtensionVersion('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", - array($uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `login_failures`=`login_failures`+1,`last_failure`=NOW() WHERE `userid`=%s LIMIT 1", + array($userid), __FUNCTION__, __LINE__); // Wrong password! - $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_PASS'); + $errorCode = getCode('WRONG_PASS'); } - } elseif (((isNicknameUsed($content['userid'])) && (!empty($content['userid']))) || ($content['userid'] == $uid)) { + } elseif (((isNicknameUsed($content['userid'])) && (!empty($content['userid']))) || ($content['userid'] == $userid)) { // 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", - array($uid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array($userid), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -393,20 +395,23 @@ function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') { // ID not found! $errorCode = getCode('WRONG_ID'); } - - // Construct URL - $URL = 'modules.php?module=index&what=login&login='.$errorCode; } else { // ID not found! - $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_ID'); + $errorCode = getCode('WRONG_ID'); } + // Error code provided? + if ($errorCode > 0) { + // Then reconstruct the URL + $URL = $errorUrl . $errorCode; + } // END - if + // Return URL return $URL; } // Try to send a new password for the given user account -function USER_DO_NEW_PASSWORD ($email, $uid) { +function doNewUserPassword ($email, $userid) { // Compile email when found in address (only secure chars!) if (!empty($email)) $email = str_replace('{DOT}', '.', $email); @@ -415,43 +420,43 @@ function USER_DO_NEW_PASSWORD ($email, $uid) { $result = false; // Probe userid/nickname - if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE($uid))) { + if ((isExtensionActive('nickname')) && (isNicknameOrUserid($userid))) { // Nickname entered - $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `nickname`='%s' OR `email`='%s' LIMIT 1", - array($uid, $email), __FUNCTION__, __LINE__); - } elseif (($uid > 0) && (empty($email))) { + $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' OR `userid`='%s' OR `email`='%s' LIMIT 1", + array($userid, $userid, $email), __FUNCTION__, __LINE__); + } elseif (($userid > 0) && (empty($email))) { // Direct userid entered - $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($uid)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FUNCTION__, __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), __FUNCTION__, __LINE__); } else { // Userid not set! - DEBUG_LOG(__FUNCTION__, __LINE__, 'Userid is not set! BUG!'); + logDebugMessage(__FUNCTION__, __LINE__, 'Userid is not set! BUG!'); $errorCode = getCode('WRONG_ID'); } // Any entry found? if (SQL_NUMROWS($result) == 1) { // This data is valid, so we create a new pass... :-) - list($uid, $status) = SQL_FETCHROW($result); + list($userid, $status) = SQL_FETCHROW($result); if ($status == 'CONFIRMED') { // Ooppps, this was missing! ;-) We should update the database... $NEW_PASS = generatePassword(); - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `password`='%s' WHERE `userid`=%s LIMIT 1", - array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `password`='%s' WHERE `userid`=%s LIMIT 1", + array(generateHash($NEW_PASS), $userid), __FUNCTION__, __LINE__); // Prepare data and message for email - $message = LOAD_EMAIL_TEMPLATE('new-pass', array('new_pass' => $NEW_PASS), $uid); + $message = loadEmailTemplate('new-pass', array('new_pass' => $NEW_PASS), $userid); // ... and send it away - sendEmail($uid, getMessage('GUEST_NEW_PASSWORD'), $message); + sendEmail($userid, getMessage('GUEST_NEW_PASSWORD'), $message); // Output note to user - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('GUEST_NEW_PASSWORD_SEND')); + loadTemplate('admin_settings_saved', false, getMessage('GUEST_NEW_PASSWORD_SEND')); } else { // Account is locked or unconfirmed $errorCode = generateErrorCodeFromUserStatus($status); @@ -461,7 +466,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) { } } else { // ID or email is wrong - LOAD_TEMPLATE('admin_settings_saved', false, '<span class="guest_failed">{--GUEST_WRONG_ID_EMAIL--}</span>'); + loadTemplate('admin_settings_saved', false, '<span class="guest_failed">{--GUEST_WRONG_ID_EMAIL--}</span>'); } // Return the error code diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index a7ff74f1de..101c5b3606 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Sets a status message and code @@ -176,7 +175,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { break; default: // Unknown error (maybe new?) - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1])); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1])); $return = array( 'status' => 'request_failed', 'message' => sprintf(getMessage('WERNIS_API_REQUEST_FAILED'), $data[1]) @@ -219,10 +218,10 @@ function WERNIS_TEST_API () { function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { // Is the sponsor extension installed? if (getConfig('wernis_withdraw_active') != 'Y') { - if (!EXT_IS_ACTIVE('sponsor')) { + if (!isExtensionActive('sponsor')) { // No, abort here return false; - } elseif (!IS_SPONSOR()) { + } elseif (!isSponsor()) { // No sponsor, not allowed to withdraw! return false; } @@ -232,17 +231,16 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { $result = false; // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_WITHDRAW'), getUserId()))."\";"; - eval($eval); + eval("\$purpose = \"".compileCode(sprintf(getMessage('WERNIS_API_PURPOSE_WITHDRAW'), getUserId()))."\";"); // Prepare the request data $requestData = array( - 'sub_request' => 'receive', - 't_uid' => bigintval($wdsId), - 't_md5' => $userMd5, - 'r_uid' => getConfig('wernis_refid'), - 'amount' => bigintval($amount), - 'purpose' => encodeString($purpose, false) + 'sub_request' => 'receive', + 't_userid' => bigintval($wdsId), + 't_md5' => $userMd5, + 'r_userid' => getConfig('wernis_refid'), + 'amount' => bigintval($amount), + 'purpose' => encodeString($purpose, false) ); // Return the result from the lower functions @@ -273,17 +271,16 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) { $result = false; // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), getUserId()))."\";"; - eval($eval); + eval("\$purpose = \"".compileCode(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), getUserId()))."\";"); // Prepare the request data $requestData = array( - 'sub_request' => 'send', - 't_uid' => getConfig('wernis_refid'), - 't_md5' => getConfig('wernis_pass_md5'), - 'r_uid' => bigintval($wdsId), - 'amount' => bigintval($amount), - 'purpose' => encodeString($purpose, false) + 'sub_request' => 'send', + 't_userid' => getConfig('wernis_refid'), + 't_md5' => getConfig('wernis_pass_md5'), + 'r_userid' => bigintval($wdsId), + 'amount' => bigintval($amount), + 'purpose' => encodeString($purpose, false) ); // Return the result from the lower functions @@ -332,17 +329,17 @@ 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(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__); } // Take fees and factor function WERNIS_TAKE_FEE ($points, $mode) { // Payout or withdraw are allowed modes! - //* DEBUG: */ OUTPUT_HTML("mode={$mode},points={$points}<br />"); + //* DEBUG: */ outputHtml("mode={$mode},points={$points}<br />"); if (!in_array($mode, array('payout', 'withdraw'))) { // Log error and abort - DEBUG_LOG(__FUNCTION__, __LINE__, "uid={getUserId()},mode={$mode},points={$points}"); + logDebugMessage(__FUNCTION__, __LINE__, "userid={getUserId()},mode={$mode},points={$points}"); return false; } // END - if @@ -365,7 +362,7 @@ function WERNIS_TAKE_FEE ($points, $mode) { } // Return value - //* DEBUG: */ OUTPUT_HTML("mode={$mode},points={$points}<br />"); + //* DEBUG: */ outputHtml("mode={$mode},points={$points}<br />"); return $points; } @@ -389,7 +386,7 @@ function WERNIS_ADD_FEES_TO_ARRAY (&$array) { // Is the array an array? ;-) if (!is_array($array)) { // Log error and return - DEBUG_LOG(__FUNCTION__, __LINE__, 'Type ' . gettype($array) . ' != array.'); + logDebugMessage(__FUNCTION__, __LINE__, 'Type ' . gettype($array) . ' != array.'); return; } // END - if diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 4ed0f57bbd..6bd9c4e525 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Test if the extension settings did work function YOOMEDIA_TEST_CONFIG ($data) { // Is this admin? - if (!IS_ADMIN()) { + if (!isAdmin()) { // No admin! return false; } // END - if @@ -70,18 +69,18 @@ function YOOMEDIA_TEST_CONFIG ($data) { // Log the response if failed if (count($response) == 0) { // Queries depleted (as we count here!) - DEBUG_LOG(__FUNCTION__, __LINE__, "Requested depleted. Maxmimum was: " . getConfig('yoomedia_requests_total')); + logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total')); $errorCode = -1; } elseif (!isset($response[8])) { // Invalid response - DEBUG_LOG(__FUNCTION__, __LINE__, "Missing response line [8]. Raw response=" . base64_encode(serialize($response))); + logDebugMessage(__FUNCTION__, __LINE__, 'Missing response line [8]. Raw response=' . base64_encode(serialize($response))); $errorCode = -1; } elseif ((($errorCode <= 4) && ($errorCode > 0)) || ($errorCode >= 8)) { // An error has returned from the account - DEBUG_LOG(__FUNCTION__, __LINE__, "Unexpected error code " . $errorCode . " received."); + logDebugMessage(__FUNCTION__, __LINE__, 'Unexpected error code ' . $errorCode . ' received.'); } elseif (count($response) < 9) { // Log serialized raw response - DEBUG_LOG(__FUNCTION__, __LINE__, "Raw response=" . base64_encode(serialize($response))); + logDebugMessage(__FUNCTION__, __LINE__, 'Raw response=' . base64_encode(serialize($response))); $errorCode = -1; } else { // This is fine, because the result array is okay and the response code on element 8 is fine @@ -98,7 +97,7 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) { $response = array(); // Enougth queries left? - if ((getConfig('yoomedia_requests_remain') > 0) || (!$countQuery)) { + if ((getConfig('yoomedia_requests_remain') > 0) || ($countQuery === false)) { // Prepare the low-level request $requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s", $script, @@ -115,6 +114,11 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) { // Run the query $response = sendGetRequest($requestString); + // Convert from ISO to UTF-8 + foreach ($response as $k => $v) { + $response[$k] = iconv('ISO-8859-1', 'UTF-8//TRANSLIT',$v); + } // END - if + // Shall we count the query as used? if ($countQuery === true) { // Then update the config! @@ -190,10 +194,10 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { // Prepares a bonus mail for delivery. Works only if extension 'bonus' is active function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { // Is this an admin? - if (!IS_ADMIN()) { + if (!isAdmin()) { // Abort here return false; - } elseif (!EXT_IS_ACTIVE('bonus')) { + } elseif (!isExtensionActive('bonus')) { // Abort here return false; } @@ -216,17 +220,20 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { // Add categories $data['categories'] = generateCategoryOptionsList('normal'); + // Decode entities + $data['text'] = (decodeEntities($data['text'])); + // Load template - LOAD_TEMPLATE("admin_send_yoomedia", false, $data); + loadTemplate('admin_send_yoomedia', false, $data); } // Adds the mail to the bonus mail pool function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) { // Is this an admin? - if (!IS_ADMIN()) { + if (!isAdmin()) { // Abort here return false; - } elseif (!EXT_IS_ACTIVE('bonus')) { + } elseif (!isExtensionActive('bonus')) { // Abort here return false; } @@ -236,13 +243,13 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) { // HTML or normal? (normal is default...) $type = 't'; - if (($mode == 'html') && (EXT_IS_ACTIVE('html_mail'))) $type = 'h'; + if (($mode == 'html') && (isExtensionActive('html_mail'))) $type = 'h'; // Auto-generate URL $data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s", - $type, - $data['id'], - $data['sid'] + $type, + $data['id'], + $data['sid'] ); // Lock this mail for new delivery @@ -260,8 +267,12 @@ 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')", - array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__); + 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']) + ), __FUNCTION__, __LINE__); } // END - if } @@ -271,8 +282,8 @@ 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", - array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__); + 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'])), __FUNCTION__, __LINE__); } // "Translates" the index number into an assosiative value @@ -286,7 +297,7 @@ function yoomediaTranslateIndex ($type, $index) { $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index]; } else { // Not found! - DEBUG_LOG(__FUNCTION__, __LINE__, "type={$type},index={$index} not found."); + logDebugMessage(__FUNCTION__, __LINE__, "type={$type},index={$index} not found."); } // Return value @@ -294,9 +305,9 @@ function yoomediaTranslateIndex ($type, $index) { } // "Translate" error code -function yoomediaTranslateError ($errorCode) { +function translateYooMediaError ($errorCode) { // Default is 'failed' - $return = 'failed'; + $return = 'failed (Code: ' . $errorCode . ')'; // Is the entry there? if (isset($GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode])) { @@ -304,7 +315,7 @@ function yoomediaTranslateError ($errorCode) { $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode]; } else { // Log missing entries - DEBUG_LOG(__FUNCTION__, __LINE__, "errorCode={$errorCode}"); + logDebugMessage(__FUNCTION__, __LINE__, "errorCode={$errorCode}"); print('<pre>'); debug_print_backtrace(); die('</pre>'); @@ -320,7 +331,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)), __FUNCTION__, __LINE__); // Entry found? @@ -331,7 +342,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), __FUNCTION__, __LINE__); } else { // Dont' sent again this mail @@ -354,7 +365,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'])), __FUNCTION__, __LINE__); } // END - if } @@ -405,7 +416,7 @@ function YOOMEDIA_GET_ERRORCODE_FROM_RESULT (array $response) { $code = str_replace("\n", '', $code); } else { // Should not happen! - DEBUG_LOG(__FUNCTION__, __LINE__, "Cannot parse response. Raw response=" . base64_encode(serialize($response))); + logDebugMessage(__FUNCTION__, __LINE__, "Cannot parse response. Raw response=" . base64_encode(serialize($response))); } // Return error code diff --git a/inc/load_cache.php b/inc/load_cache.php index a927511f96..cb35e6adf9 100644 --- a/inc/load_cache.php +++ b/inc/load_cache.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,34 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if + +// Init cache instance and array +$GLOBALS['cache_instance'] = null; +$GLOBALS['cache_array'] = array(); + +// Init cache first +initCacheInstance(); + +// Init variables +initExtensionCssFiles(); + +// Initialize array for "always keep active extensions" +$GLOBALS['cache_array']['active_extensions'] = array(); // Init & set the INC_POOL -INIT_INC_POOL(); -SET_INC_POOL(getArrayFromDirectory('inc/loader/', 'load_cache-')); +initIncludePool('cache'); +setIncludePool('cache', getArrayFromDirectory('inc/loader/', 'load_cache-')); // Pre-load filter cacher loadIncludeOnce('inc/loader/load_cache-filter.php'); -// Init filter system here -initFilterSystem(); +// Pre-load extensions cacher +loadIncludeOnce('inc/loader/load_cache-extension.php'); -// We have to include all here by-hand -LOAD_INC_POOL(); +// Load all includes +loadIncludePool('cache'); -// +// [EOF] ?> diff --git a/inc/load_config.php b/inc/load_config.php index 4fac605313..e38c041606 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Set some config entries which is required for installation phase @@ -51,7 +50,7 @@ setConfigEntry('_DB_TYPE' , 'mysql3'); $GLOBALS['config_local_loaded'] = false; // Is the local configuration there? -if ((isIncludeReadable('inc/cache/config-local.php')) && (isIncludeReadable('inc/config.php'))) { +if ((isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php')) && (isIncludeReadable('inc/config.php'))) { // We are better in installation mode $GLOBALS['mxchange_installing'] = true; @@ -62,10 +61,10 @@ if ((isIncludeReadable('inc/cache/config-local.php')) && (isIncludeReadable('inc setConfigEntry('OUTPUT_MODE', 'render'); // Both exist! This is bad and should be avoided by the admin - app_die(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>inc/cache/config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.'); -} elseif (isIncludeReadable('inc/cache/config-local.php')) { + app_die(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>'.getConfig('CACHE_PATH').'config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.'); +} elseif (isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php')) { // Then load it - loadIncludeOnce('inc/cache/config-local.php'); + loadIncludeOnce(getConfig('CACHE_PATH') . 'config-local.php'); // Mark configuration as loaded $GLOBALS['config_local_loaded'] = true; @@ -82,14 +81,14 @@ if ((isIncludeReadable('inc/cache/config-local.php')) && (isIncludeReadable('inc // Set output mode here setConfigEntry('OUTPUT_MODE', 'render'); } else { - // Problem in application detected - debug_report_bug('Wether we are not installing nor config-local.php is created!'); + // Redirect to install.php + redirectToUrl('install.php'); } // Check if the user setups his MySQL stuff... -if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!REQUEST_ISSET_GET('installing')) && (isInstalled())) { +if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isGetRequestElementSet('installing')) && (isInstalled())) { // No login entered and outside installation mode - OUTPUT_HTML('<strong>{--LANG_WARNING--}:</strong> '); + outputHtml('<strong>{--LANG_WARNING--}:</strong> '); if (isInstalled()) { // You have changed my configuration file! app_die(__FILE__, __LINE__, '{--DIE_CONFIG_CHANGED_YOU--}'); @@ -99,7 +98,7 @@ if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!REQUEST_ISSET_ } } elseif ((!isInstalling()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) { // No database password entered!!! - OUTPUT_HTML('<div>{--LANG_WARNING--}:</div> {--WARN_NULL_PASSWORD--}'); + outputHtml('<div>{--LANG_WARNING--}:</div> {--WARN_NULL_PASSWORD--}'); } // diff --git a/inc/load_extensions.php b/inc/load_extensions.php index 52acbc9cea..f551ef47b7 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -1,316 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 06/26/2004 * - * =============== Last change: 07/01/2005 * - * * - * -------------------------------------------------------------------- * - * File : load_extensions.php * - * -------------------------------------------------------------------- * - * Short description : Load all extensions * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Alle Erweiterungen laden * - * -------------------------------------------------------------------- * - * @TODO Rewrite this whole file to load_cache-extensions.php * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} // END - if - -// Init variables -EXT_INIT_CSS_FILES(); -$add = ''; - -// Init cache instance and array -$GLOBALS['cache_instance'] = null; -$GLOBALS['cache_array'] = array(); - -// Skip loading extensions -if ((!isInstalled()) || (isInstalling())) { - // Init filter system here - initFilterSystem(); - - // Skip loading - return; -} // END - if - -// Initialize array for "always keep active extensions" -$GLOBALS['cache_array']['active_extensions'] = array(); - -// By default no cache is set -$GLOBALS['cache_mode'] = 'no'; - -// Load sql_patchrs extension alone -if (!LOAD_EXTENSION('sql_patches')) { - // Could not load sql_patches! ARGH!!! - trigger_error('Cannot load extension sql_patches.'); -} // END - if - -// Init inc pool array -INIT_INC_POOL(); - -// -// Load extensions -// -if (EXT_IS_ACTIVE('cache')) { - // Load cache extension alone - if (!LOAD_EXTENSION('cache')) { - // Extension 'cache' was not loaded - trigger_error('Cannot load extension cache.'); - } // END - if - - // Check extension cache - switch (($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { - case true : $GLOBALS['cache_mode'] = 'load'; break; - case false: $GLOBALS['cache_mode'] = 'init'; break; - } // END - switch - - // Do we need to init the cache? But not in "CSS mode". - if (($GLOBALS['cache_mode'] == 'init') && (getConfig('cache_exts') == 'Y') && (getOutputMode() == '0')) { - // Init cache file - $GLOBALS['cache_instance']->init('EXTENSIONS'); - $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); - } elseif (getConfig('cache_exts') != 'Y') { - // Cache will not be created for extensions - $GLOBALS['cache_mode'] = 'skip'; - } -} // END - if - -// Load cache? -if ($GLOBALS['cache_mode'] == 'load') { - // Init include array - $EXT_POOL = array(); - - // Re-initialize handler - $GLOBALS['cache_instance']->loadCacheFile('extensions', true); - - // Load extension data from cache file - $EXT_DUMMY = $GLOBALS['cache_instance']->getArrayFromCache(); - - // Is the cache file fine? - if (!isset($EXT_DUMMY['ext_name'])) { - // Cache file is damaged so kill it - $GLOBALS['cache_instance']->destroyCacheFile(); - - // Retry it - require(__FILE__); - return; - } // END - if - - // Begin with the cache preparation of extensions - $EXT_NAMES = array(); - foreach ($EXT_DUMMY['ext_name'] as $k => $name) { - // Load CSS file - if ($EXT_DUMMY['ext_css'][$k] == 'Y') EXT_ADD_CSS_FILE($name . '.css'); - - // Load extension file itself - if ((($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y') || (IS_ADMIN())) && (!in_array($name, array('sql_patches', 'cache')))) { - $EXT_POOL[] = $name; - } // END - if - - // Version number - $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; - unset($EXT_DUMMY['ext_version'][$k]); - - // Extension is active - $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; - unset($EXT_DUMMY['ext_active'][$k]); - - // Ext menu - $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; - unset($EXT_DUMMY['ext_menu'][$k]); - - // Extension id - $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k]; - $id = $EXT_DUMMY['ext_id'][$name]; - unset($EXT_DUMMY['ext_id'][$k]); - - // Add ext name - $EXT_NAMES[$id] = $name; - - // Add deprecated flag (defaults to 'not deprecated') - $EXT_DUMMY['ext_deprecated'][$name] = 'N'; - - // Mark it as active extension - $GLOBALS['cache_array']['active_extensions'][$name] = $EXT_DUMMY['ext_keep'][$k]; - unset($EXT_DUMMY['ext_keep'][$k]); - - // Remove unneccessary data from memory - unset($EXT_DUMMY['ext_css'][$k]); - } // END - foreach - - // Write dummy array back - $EXT_DUMMY['ext_name'] = $EXT_NAMES; - unset($EXT_NAMES); - - // Loading cache is done so let's free some memory! - unset($EXT_DUMMY['ext_keep']); - unset($EXT_DUMMY['ext_css']); - $GLOBALS['cache_array']['extensions'] = $EXT_DUMMY; - unset($EXT_DUMMY); - - // No database load needed - $res_ext_crt = false; - - // Load all extension files - foreach ($EXT_POOL as $ext) { - LOAD_EXTENSION($ext); - } // END - foreach - - // Load more cache files (like admins) - loadIncludeOnce('inc/load_cache.php'); - - // Remove array - unset($EXT_POOL); -} else { - // If current user is not admin load only activated extensions. But load - // them all if we are going to init the cache files. The admin shall use - // every available extension for testing purposes. - if ((!IS_ADMIN()) && ($GLOBALS['cache_mode'] != 'init')) $add = " WHERE `ext_active`='Y'"; - - 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 . " -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 . " -ORDER BY ext_name", __FILE__, __LINE__); - } -} - -// Array for removed but not uninstalled extensions -$DEL = array(); - -// At least one found? -if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cache_mode'] == 'init') && (getOutputMode() != '1') && (getOutputMode() != '-1')) || ($GLOBALS['cache_mode'] == 'no'))) { - // Extensions are registered so we load them - while ($content = SQL_FETCHARRAY($res_ext_crt)) { - // Get menu entry - $content['ext_menu'] = 'N'; - if (MODULE_HAS_MENU($content['ext_name'], true)) { - $content['ext_menu'] = 'Y'; - } // END - if - - // Generate FQFN for extension - $INC = sprintf("inc/extensions/ext-%s.php", $content['ext_name']); - - // Does the extension file exists? - if (isIncludeReadable($INC)) { - // By default no extension is always active, except sql_patches - EXT_SET_ALWAYS_ACTIVE('N'); - - // Load extension - if (($content['ext_name'] != 'sql_patches') && (($content['ext_name'] != 'cache') || (!EXT_IS_ACTIVE('cache')))) { - // Load extension - LOAD_EXTENSION($content['ext_name']); - } else { - // Keep sql_patches always active - EXT_SET_ALWAYS_ACTIVE('Y'); - } - - // Transfer EXT_ALWAYS_ACTIVE flag - $content['ext_keep'] = EXT_GET_ALWAYS_ACTIVE(); - - // CSS file handling: - if ((!isset($content['ext_css'])) || ($content['ext_css'] == 'Y')) { - // Create FQFN for the CSS file - $FQFN = sprintf("%stheme/%s/css/%s.css", getConfig('PATH'), getCurrentTheme(), $content['ext_name']); - - // Is the file there? - if (isFileReadable($FQFN)) { - // CSS file for extension was found (use only relative path for now!) - EXT_ADD_CSS_FILE($content['ext_name'] . '.css'); - $content['ext_css'] = 'Y'; - } else { - // Don't load CSS file - $content['ext_css'] = 'N'; - } - } // END - if - - // Shall we cache? - if ($GLOBALS['cache_mode'] == 'init') { - // Add cache row - $GLOBALS['cache_instance']->addRow($content); - } elseif ($GLOBALS['cache_mode'] == 'no') { - // Remember this value for later usage - $GLOBALS['cache_array']['active_extensions'][$content['ext_name']] = EXT_GET_ALWAYS_ACTIVE(); - } - } elseif (!isFileReadable($FQFN)) { - // Deleted extension file so we mark it for removal from DB - $DEL[] = $content['ext_name']; - } - } // END - while - - if ($GLOBALS['cache_mode'] == 'init') { - // Close cache file - $GLOBALS['cache_instance']->finalize(); - - // Load more cache files (like admins) - loadIncludeOnce('inc/load_cache.php'); - } else { - // Init filter system for non-init mode - initFilterSystem(); - } - - // Free memory - SQL_FREERESULT($res_ext_crt); -} elseif ((!EXT_IS_ACTIVE('cache')) || (($GLOBALS['cache_mode'] == 'init') && (getOutputMode() != 0))) { - // Init filter system even when there are no extensions installed. #16 - initFilterSystem(); -} elseif ($GLOBALS['cache_mode'] != 'load') { - // Something unexpected! - debug_report_bug('Unexpected state in '.basename(__FILE__).': cache_mode='.$GLOBALS['cache_mode'].', numRows='.SQL_NUMROWS($res_ext_crt)); -} - -// Run the filter -runFilterChain('load_includes'); - -// Uninstall extensions that are no longer in our system -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", - 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')", - array($del_ext), __FILE__, __LINE__); - } // END - foreach - - // I think it's not neccessary to run the optimization function here - // because we didn't delete so much data from database. Can you aggree? -} // END - if - -// +// @DEPRECATED ?> diff --git a/inc/loader/load_cache- b/inc/loader/load_cache- new file mode 100644 index 0000000000..548c05e6b8 --- /dev/null +++ b/inc/loader/load_cache- @@ -0,0 +1,74 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : load_cache- * + * -------------------------------------------------------------------- * + * Short description : Load more cache files * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Mehr Cache-Dateien nachladen * + * -------------------------------------------------------------------- * + * $Revision:: 1092 $ * + * $Date:: 2009-07-28 20:50:32 +0200 (Tue, 28 Jul 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Let's start with the admins table... +if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) { + // Load cache + $GLOBALS['cache_array']['foo'] = $GLOBALS['cache_instance']->getArrayFromCache(); +} elseif (getOutputMode() != '1') { + // Create cache file + $GLOBALS['cache_instance']->init('FOO'); + + // Load every data from DB to cache file + $add = runFilterChain('sql_admin_extra_data'); + + // Query the database about this + $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_table` ORDER BY `some_column` ASC', __FILE__, __LINE__); + while ($dummy = SQL_FETCHARRAY($result)) { + // Save row + $GLOBALS['cache_instance']->addRow($dummy); + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Close cache + $GLOBALS['cache_instance']->storeExtensionVersion('foo'); + $GLOBALS['cache_instance']->finalize(); + + // Include loader again + loadInclude('inc/loader/'.basename(__FILE__)); +} + +// [EOF] +?> diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index 11d80fe511..cc4ae544b4 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Let's start with the admins table... @@ -48,20 +47,20 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admins')) && ($GLOBALS['cache_in $GLOBALS['cache_array']['admins'] = $GLOBALS['cache_instance']->getArrayFromCache(); // Check if valid - if ((isset($GLOBALS['cache_array']['admins']['login'])) && (is_array($GLOBALS['cache_array']['admins']['login'])) && (is_array($GLOBALS['cache_array']['admins']['aid']))) { + if ((isset($GLOBALS['cache_array']['admins']['login'])) && (is_array($GLOBALS['cache_array']['admins']['login'])) && (is_array($GLOBALS['cache_array']['admins']['admin_id']))) { // Check count - if (count($GLOBALS['cache_array']['admins']['login']) == count($GLOBALS['cache_array']['admins']['aid'])) { + if (count($GLOBALS['cache_array']['admins']['login']) == count($GLOBALS['cache_array']['admins']['admin_id'])) { // Get "id map" - $idMap = $GLOBALS['cache_array']['admins']['aid']; + $idMap = $GLOBALS['cache_array']['admins']['admin_id']; // Rewrite the cache array for ($idx = (count($idMap) - 1); $idx >= 0; $idx--) { // Rewrite all entries foreach ($GLOBALS['cache_array']['admins'] as $key=>$entryArray) { // Rewrite the entry - if ($key == 'aid') { + if ($key == 'admin_id') { // Rewrite admin id (use login name as index) - $GLOBALS['cache_array']['admins']['aid'][$GLOBALS['cache_array']['admins']['login'][$idx]] = $entryArray[$idx]; + $GLOBALS['cache_array']['admins']['admin_id'][$GLOBALS['cache_array']['admins']['login'][$idx]] = $entryArray[$idx]; } else { // Rewrite regular entry $GLOBALS['cache_array']['admins'][$key][$idMap[$idx]] = $entryArray[$idx]; @@ -76,26 +75,28 @@ if (($GLOBALS['cache_instance']->loadCacheFile('admins')) && ($GLOBALS['cache_in } // END - for } else { // Nope, cache file is corrupted! - $GLOBALS['cache_instance']->destroyCacheFile(); + $GLOBALS['cache_instance']->removeCacheFile(); unset($GLOBALS['cache_array']['admins']); } } else { // Nope, cache file is corrupted! - $GLOBALS['cache_instance']->destroyCacheFile(); + $GLOBALS['cache_instance']->removeCacheFile(); unset($GLOBALS['cache_array']['admins']); } -} elseif ((getConfig('cache_admins') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif (getOutputMode() != '1') { // Create cache file $GLOBALS['cache_instance']->init('ADMINS'); - $GLOBALS['cache_instance']->storeExtensionVersion('admins'); // Load every data from DB to cache file $add = runFilterChain('sql_admin_extra_data'); // Query the database about this - $result_admins = SQL_QUERY('SELECT id AS aid, login, password, email'.$add.' -FROM `{!_MYSQL_PREFIX!}_admins` -ORDER BY login', __FILE__, __LINE__); + $result_admins = SQL_QUERY('SELECT + `id` AS admin_id, `login`, `password`, `email`' . $add . ' +FROM + `{?_MYSQL_PREFIX?}_admins` +ORDER BY + `login` ASC', __FILE__, __LINE__); while ($dummy = SQL_FETCHARRAY($result_admins)) { // Save row $GLOBALS['cache_instance']->addRow($dummy); @@ -105,42 +106,43 @@ ORDER BY login', __FILE__, __LINE__); SQL_FREERESULT($result_admins); // Close cache + $GLOBALS['cache_instance']->storeExtensionVersion('admins'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } // Next cached table are the admins_acls... -if (GET_EXT_VERSION('admins') >= '0.3') { +if (isExtensionInstalledAndNewer('admins', '0.3')) { // Check for cache file if (($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) { // Load referal system from cache $GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache(); - } elseif ((getConfig('cache_acls') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { + } elseif (getOutputMode() != '1') { // Create cache file here $GLOBALS['cache_instance']->init('ADMINS_ACLS'); - $GLOBALS['cache_instance']->storeExtensionVersion('admins'); // Load all modules and their data (column 'id' is no longer required) - $result = SQL_QUERY('SELECT 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 `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)) { + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close cache + $GLOBALS['cache_instance']->storeExtensionVersion('admins'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } } // END - if -// +// [EOF] ?> diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php index 8f7e4a7e7b..8fd6c9aecf 100644 --- a/inc/loader/load_cache-config.php +++ b/inc/loader/load_cache-config.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,35 +38,47 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Next cached table is the configuration (config)... -if (($GLOBALS['cache_instance']->loadCacheFile('config', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { +if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load config from cache $GLOBALS['cache_array']['config'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getConfig('cache_config') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { + + // Swap cache + $config = array(); + foreach ($GLOBALS['cache_array']['config'] as $entry => $array) { + // All config levels + foreach ($array as $key => $value) { + $config[$key][$entry] = $value; + } // END - foreach + } // END - foreach + + // Copy it back and remove dummy array + $GLOBALS['cache_array']['config'] = $config; + unset($config); +} elseif (getOutputMode() != '1') { // Create cache file here $GLOBALS['cache_instance']->init('CONFIG'); - $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); // Load all modules and their data - $result = SQL_QUERY('SELECT * FROM `{!_MYSQL_PREFIX!}_config` ORDER BY `config` ASC', __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { + $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_config` ORDER BY `config` ASC', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/loader/load_cache-extension.php b/inc/loader/load_cache-extension.php new file mode 100644 index 0000000000..d765f85846 --- /dev/null +++ b/inc/loader/load_cache-extension.php @@ -0,0 +1,188 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 06/26/2004 * + * =============== Last change: 07/01/2005 * + * * + * -------------------------------------------------------------------- * + * File : load_cache-extensions.php * + * -------------------------------------------------------------------- * + * Short description : Load all extensions * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Alle Erweiterungen laden * + * -------------------------------------------------------------------- * + * @TODO Rewrite this whole file to load_cache-extensions.php * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Next cached table is the extension +if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { + // Load extension from cache + $EXT_DUMMY = $GLOBALS['cache_instance']->getArrayFromCache(); + + // Init extension inc-pool + $EXT_POOL = array(); + + // Do we have entries? + if (count($EXT_DUMMY) > 0) { + // Init arrays + $EXT_NAMES = array(); + + // Loop through all + foreach ($EXT_DUMMY['ext_name'] as $k => $name) { + // Load CSS file + if ($EXT_DUMMY['ext_css'][$k] == 'Y') addExtensionCssFile($name . '.css'); + + // Load extension file itself + if ((($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y') || (isAdmin()))) { + $EXT_POOL[] = $name; + } // END - if + + // Version number + $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; + unset($EXT_DUMMY['ext_version'][$k]); + + // Extension is active + $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; + unset($EXT_DUMMY['ext_active'][$k]); + + // Ext menu + $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; + unset($EXT_DUMMY['ext_menu'][$k]); + + // Language file + $EXT_DUMMY['ext_lang'][$name] = $EXT_DUMMY['ext_lang'][$k]; + unset($EXT_DUMMY['ext_lang'][$k]); + + // Functions file + $EXT_DUMMY['ext_func'][$name] = $EXT_DUMMY['ext_func'][$k]; + unset($EXT_DUMMY['ext_func'][$k]); + + // Extension id + $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k]; + $id = $EXT_DUMMY['ext_id'][$name]; + unset($EXT_DUMMY['ext_id'][$k]); + + // Add ext name + $EXT_NAMES[$id] = $name; + + // Add deprecated flag (defaults to 'not deprecated') + $EXT_DUMMY['ext_deprecated'][$name] = 'N'; + + // Mark it as active extension + $GLOBALS['cache_array']['active_extensions'][$name] = $EXT_DUMMY['ext_keep'][$k]; + unset($EXT_DUMMY['ext_keep'][$k]); + + // Remove unneccessary data from memory + unset($EXT_DUMMY['ext_css'][$k]); + } // END - foreach + + // Write dummy array back + $EXT_DUMMY['ext_name'] = $EXT_NAMES; + unset($EXT_NAMES); + + // Loading cache is done so let's free some memory! + unset($EXT_DUMMY['ext_keep']); + unset($EXT_DUMMY['ext_css']); + } // END - if + + // Transfer dummy array + $GLOBALS['cache_array']['extension'] = $EXT_DUMMY; + unset($EXT_DUMMY); + + // No database load needed + $res_ext_crt = false; + + // Load all extension files in test-mode (we initialize them later) + foreach ($EXT_POOL as $ext) { + loadExtension($ext, 'test'); + } // END - foreach + + // Remove array and mark cache as loaded + unset($EXT_POOL); +} elseif (getOutputMode() != '1') { + // Create cache file here + $GLOBALS['cache_instance']->init('extension'); + + // Add more if sql_patches is recent enougth + $add = ''; + if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $add = ", `ext_has_css` AS ext_css"; + + // Load all modules and their data + $result = SQL_QUERY('SELECT `id` AS ext_id, `ext_name`, `ext_active`, `ext_version`'.$add.' FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `ext_name` ASC', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { + // Load extension + loadExtension($content['ext_name'], 'test'); + + // Get menu entry + $content['ext_menu'] = 'N'; + if (ifModuleHasMenu($content['ext_name'], true)) { + // Extension is a module and has menu... pew! + $content['ext_menu'] = 'Y'; + } // END - if + + // Get language entry + $content['ext_lang'] = 'N'; + if (isLanguageIncludeReadable($content['ext_name'])) { + // Readable + $content['ext_lang'] = 'Y'; + } // END - if + + // Get function entry + $content['ext_func'] = 'N'; + if (isExtensionFunctionFileReadable($content['ext_name'])) { + // Readable + $content['ext_func'] = 'Y'; + } // END - if + + // Transfer EXT_ALWAYS_ACTIVE flag + $content['ext_keep'] = getExtensionAlwaysActive(); + + // Fix missing ext_css + if (!isset($content['ext_css'])) $content['ext_css'] = 'N'; + + // Add row to cache file + $GLOBALS['cache_instance']->addRow($content); + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); + $GLOBALS['cache_instance']->finalize(); + + // Include loader again + loadInclude('inc/loader/'.basename(__FILE__)); +} + +// [EOF] +?> diff --git a/inc/loader/load_cache-filter.php b/inc/loader/load_cache-filter.php index 25b9083fdb..b158b05f99 100644 --- a/inc/loader/load_cache-filter.php +++ b/inc/loader/load_cache-filter.php @@ -10,14 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mehr Cache-Dateien nachladen * * -------------------------------------------------------------------- * - * $Revision:: 1092 $ * - * $Date:: 2009-07-28 20:50:32 +0200 (Tue, 28 Jul 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: quix0r $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,34 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Skip this cache if we count usage -if ((getConfig('update_filter_usage') == 'Y') || (EXT_VERSION_IS_OLDER('cache', '0.2.3'))) return; + die(); +} // END - if // Next cached table is the filteruration (filter)... -if (($GLOBALS['cache_instance']->loadCacheFile('filter', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { +if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load filter from cache $GLOBALS['cache_array']['filter'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getConfig('cache_filter') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif ((getOutputMode() != '1') && (isExtensionInstalled('sql_patches'))) { // Create cache file here $GLOBALS['cache_instance']->init('FILTER'); - $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); // Load all modules and their data - $result = SQL_QUERY('SELECT * FROM `{!_MYSQL_PREFIX!}_filters` ORDER BY `filter_name` ASC', __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { + $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_filters` ORDER BY `filter_name` ASC, `filter_id` ASC', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/loader/load_cache-impressum.php b/inc/loader/load_cache-impressum.php new file mode 100644 index 0000000000..20ed9562b6 --- /dev/null +++ b/inc/loader/load_cache-impressum.php @@ -0,0 +1,77 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : load_cache- * + * -------------------------------------------------------------------- * + * Short description : Load more cache files * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Mehr Cache-Dateien nachladen * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionInstalled('imprint')) { + // Not not cache if not installed! + return; +} + +// Let's start with the admins table... +if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) { + // Load cache + $GLOBALS['cache_array']['imprint'] = $GLOBALS['cache_instance']->getArrayFromCache(); +} elseif (getOutputMode() != '1') { + // Create cache file + $GLOBALS['cache_instance']->init('imprint'); + + // Load every data from DB to cache file + $add = runFilterChain('sql_admin_extra_data'); + + // Query the database about this + $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_imprint_data` ORDER BY `imprint_id` ASC', __FILE__, __LINE__); + while ($dummy = SQL_FETCHARRAY($result)) { + // Save row + $GLOBALS['cache_instance']->addRow($dummy); + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Close cache + $GLOBALS['cache_instance']->storeExtensionVersion('imprint'); + $GLOBALS['cache_instance']->finalize(); + + // Include loader again + loadInclude('inc/loader/'.basename(__FILE__)); +} + +// [EOF] +?> diff --git a/inc/loader/load_cache-modreg.php b/inc/loader/load_cache-modreg.php index b37d67f017..f551ef47b7 100644 --- a/inc/loader/load_cache-modreg.php +++ b/inc/loader/load_cache-modreg.php @@ -1,104 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 09/09/2008 * - * =============== Last change: 09/09/2008 * - * * - * -------------------------------------------------------------------- * - * File : load_cache-config.php * - * -------------------------------------------------------------------- * - * Short description : Load more cache files * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Mehr Cache-Dateien nachladen * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Next cached table is the module registry (mod_reg)... -if (($GLOBALS['cache_instance']->loadCacheFile('modreg')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { - // Load cache - $GLOBALS['cache_array']['modules'] = $GLOBALS['cache_instance']->getArrayFromCache(); - - // Rewrite module cache - $modArray = $GLOBALS['cache_array']['modules']; - foreach ($modArray['module'] as $key => $mod) { - $GLOBALS['cache_array']['modules']['id'][$mod] = $modArray['id'][$key]; - unset($GLOBALS['cache_array']['modules']['id'][$key]); - $GLOBALS['cache_array']['modules']['title'][$mod] = $modArray['title'][$key]; - unset($GLOBALS['cache_array']['modules']['title'][$key]); - $GLOBALS['cache_array']['modules']['locked'][$mod] = $modArray['locked'][$key]; - unset($GLOBALS['cache_array']['modules']['locked'][$key]); - $GLOBALS['cache_array']['modules']['hidden'][$mod] = $modArray['hidden'][$key]; - unset($GLOBALS['cache_array']['modules']['hidden'][$key]); - $GLOBALS['cache_array']['modules']['admin_only'][$mod] = $modArray['admin_only'][$key]; - unset($GLOBALS['cache_array']['modules']['admin_only'][$key]); - $GLOBALS['cache_array']['modules']['mem_only'][$mod] = $modArray['mem_only'][$key]; - unset($GLOBALS['cache_array']['modules']['mem_only'][$key]); - if (isset($GLOBALS['cache_array']['modules']['has_menu'][$key])) { - $GLOBALS['cache_array']['modules']['has_menu'][$mod] = $modArray['has_menu'][$key]; - unset($GLOBALS['cache_array']['modules']['has_menu'][$key]); - } // END - if - } // END - foreach - unset($modArray); -} elseif ((getConfig('cache_modreg') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { - // Create cache file here - $GLOBALS['cache_instance']->init('MODULES'); - $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); - - // Load all modules and their data - 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__); - } 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__); - } - - // Cache all data - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $GLOBALS['cache_instance']->finalize(); - - // Include loader again - require(__FILE__); -} - -// +// @DEPRECATED ?> diff --git a/inc/loader/load_cache-modules.php b/inc/loader/load_cache-modules.php new file mode 100644 index 0000000000..8c66caa8a5 --- /dev/null +++ b/inc/loader/load_cache-modules.php @@ -0,0 +1,103 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 09/09/2008 * + * =============== Last change: 09/09/2008 * + * * + * -------------------------------------------------------------------- * + * File : load_cache-modules.php * + * -------------------------------------------------------------------- * + * Short description : Load more cache files * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Mehr Cache-Dateien nachladen * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Next cached table is the module registry (mod_reg)... +if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { + // Load cache + $GLOBALS['cache_array']['modules'] = $GLOBALS['cache_instance']->getArrayFromCache(); + + // Rewrite module cache + $modArray = $GLOBALS['cache_array']['modules']; + foreach ($modArray['module'] as $key => $mod) { + $GLOBALS['cache_array']['modules']['id'][$mod] = $modArray['id'][$key]; + unset($GLOBALS['cache_array']['modules']['id'][$key]); + $GLOBALS['cache_array']['modules']['title'][$mod] = $modArray['title'][$key]; + unset($GLOBALS['cache_array']['modules']['title'][$key]); + $GLOBALS['cache_array']['modules']['locked'][$mod] = $modArray['locked'][$key]; + unset($GLOBALS['cache_array']['modules']['locked'][$key]); + $GLOBALS['cache_array']['modules']['hidden'][$mod] = $modArray['hidden'][$key]; + unset($GLOBALS['cache_array']['modules']['hidden'][$key]); + $GLOBALS['cache_array']['modules']['admin_only'][$mod] = $modArray['admin_only'][$key]; + unset($GLOBALS['cache_array']['modules']['admin_only'][$key]); + $GLOBALS['cache_array']['modules']['mem_only'][$mod] = $modArray['mem_only'][$key]; + unset($GLOBALS['cache_array']['modules']['mem_only'][$key]); + if (isset($GLOBALS['cache_array']['modules']['has_menu'][$key])) { + $GLOBALS['cache_array']['modules']['has_menu'][$mod] = $modArray['has_menu'][$key]; + unset($GLOBALS['cache_array']['modules']['has_menu'][$key]); + } // END - if + } // END - foreach + unset($modArray); +} elseif (getOutputMode() != '1') { + // Create cache file here + $GLOBALS['cache_instance']->init('MODULES'); + + // Load all modules and their data + if (isExtensionInstalledAndNewer('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__); + } 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__); + } + + // Cache all data + while ($content = SQL_FETCHARRAY($result)) { + // Add row to cache file + $GLOBALS['cache_instance']->addRow($content); + } // END - while + + // Free memory + SQL_FREERESULT($result); + + // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); + $GLOBALS['cache_instance']->finalize(); + + // Include loader again + loadInclude('inc/loader/'.basename(__FILE__)); +} + +// [EOF] +?> diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php index ced42c3c41..7b3b3157d2 100644 --- a/inc/loader/load_cache-refdepths.php +++ b/inc/loader/load_cache-refdepths.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,35 +38,34 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Next cached table is the referal system (refdepths)... if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load referal system from cache $GLOBALS['cache_array']['ref_depths'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getConfig('cache_refdepth') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif (getOutputMode() != '1') { // Create cache file here $GLOBALS['cache_instance']->init('REFDEPTHS'); - $GLOBALS['cache_instance']->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__); - while ($data = SQL_FETCHARRAY($result)) { + $result = SQL_QUERY('SELECT id, level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index 8aa48c2699..06dee6c577 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,35 +38,34 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Next cached table is the referal system (refsystem)... if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { // Load referal system from cache $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getConfig('cache_refsys') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif (getOutputMode() != '1') { // Create cache file here $GLOBALS['cache_instance']->init('REFSYSTEM'); - $GLOBALS['cache_instance']->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__); - while ($data = SQL_FETCHARRAY($result)) { + $result = SQL_QUERY('SELECT id, userid, level, counter FROM `{?_MYSQL_PREFIX?}_refsystem` ORDER BY userid, level', __FILE__, __LINE__); + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/loader/load_cache-revision.php b/inc/loader/load_cache-revision.php index 1c2f3971fa..b79c66743e 100644 --- a/inc/loader/load_cache-revision.php +++ b/inc/loader/load_cache-revision.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Next cached table is the revision... -if (($GLOBALS['cache_instance']->loadCacheFile('revision', true))) { +if (($GLOBALS['cache_instance']->loadCacheFile('revision'))) { // Load revision from cache $GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache(); -} elseif ((getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif ((getOutputMode() != '1')) { // Create cache file here $GLOBALS['cache_instance']->init('revision'); @@ -56,9 +55,18 @@ if (($GLOBALS['cache_instance']->loadCacheFile('revision', true))) { // Close the cache $GLOBALS['cache_instance']->finalize(); + // Generate FQFN for old revision file + $FQFN = sprintf("%s%s/.revision", getConfig('PATH'), getConfig('CACHE_PATH')); + + // Is it there? + if (isFileReadable($FQFN)) { + // Then remove it + removeFile($FQFN); + } // END - if + // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php index 87dd7a1c0d..da82aac80e 100644 --- a/inc/loader/load_cache-them.php +++ b/inc/loader/load_cache-them.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('theme')) { + die(); +} elseif (!isExtensionActive('theme')) { // Skip this loader return false; } @@ -52,16 +51,16 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in // Restructure the array $GLOBALS['cache_array']['themes'] = array(); - foreach ($cache as $key => $data) { + foreach ($cache as $key => $content) { // Skip 'theme_path' because we don't need to rebuild it if ($key == 'theme_path') { // Add entries with id - foreach ($data as $id => $entry) { + foreach ($content as $id => $entry) { $GLOBALS['cache_array']['themes']['theme_path'][$cache['id'][$id]] = $entry; } // END - foreach } else { // Add all themes with theme name as array index - foreach ($data as $id => $entry) { + foreach ($content as $id => $entry) { $GLOBALS['cache_array']['themes'][$key][$cache['theme_path'][$id]] = $entry; } // END - foreach } @@ -69,31 +68,31 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in // Remove dummy array unset($cache); -} elseif ((getConfig('cache_themes') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) { +} elseif (getOutputMode() != '1') { // Create cache file here $GLOBALS['cache_instance']->init('THEMES'); - $GLOBALS['cache_instance']->storeExtensionVersion('theme'); // 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__); + if (getExtensionVersion('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__); } 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)) { + while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file - $GLOBALS['cache_instance']->addRow($data); + $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache + $GLOBALS['cache_instance']->storeExtensionVersion('theme'); $GLOBALS['cache_instance']->finalize(); // Include loader again - require(__FILE__); + loadInclude('inc/loader/'.basename(__FILE__)); } -// +// [EOF] ?> diff --git a/inc/mails/_mails.php b/inc/mails/_mails.php index 9b0e67c412..cd79dec201 100644 --- a/inc/mails/_mails.php +++ b/inc/mails/_mails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('')) { + die(); +} elseif (!isExtensionActive('')) { return; } // Do not execute when script is in CSS mode -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; +if (getOutputMode() != 0) return; -// +// [EOF] ?> diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 95eabfbf85..4f61d180fa 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('beg')) { + die(); +} elseif (!isExtensionActive('beg')) { return; } // Do not execute when script is in CSS mode -if (getOutputMode() == 1) return; +if (getOutputMode() != 0) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), date('d', time()), date('Y', time())); $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 if (getConfig('beg_ral_en_notify') == 'Y') { @@ -79,41 +78,45 @@ switch (getConfig('beg_rallye')) { if (!empty($sql)) { // The SQL command needs to be finisched here (only confirmed accounts!) - $sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC"; + $sql .= ") AND `status`='CONFIRMED' ORDER BY `last_online` ASC"; // Prepare data for the template - define('__BEG_MIN_POINTS' , translateComma(getConfig('beg_points'))); - define('__BEG_MAX_POINTS' , translateComma(getConfig('beg_points_max'))); - define('__BEG_MAX_WINNERS', round(getConfig('beg_ranks'))); - if (getConfig('beg_ip_timeout') == 0) { - // No IP locking setuped! - define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION')); - } else { + $content['min_points'] = translateComma(getConfig('beg_points')); + $content['max_points'] = translateComma(getConfig('beg_points_max')); + $content['max_winner'] = round(getConfig('beg_ranks')); + + // No IP locking setuped by default + $content['ip_locker'] = getMessage('BEG_NO_LIMITATION'); + + if (getConfig('beg_ip_timeout') > 0) { // Create timemark - define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout'))); - } + $content['ip_locker'] = createFancyTime(getConfig('beg_ip_timeout')); + } // END - if // Check for accounts to be notified $result_main = SQL_QUERY($sql, __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // Normal notification mails or bonus mails? - $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == "en") && (EXT_IS_ACTIVE('bonus'))); + $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == "en") && (isExtensionActive('bonus'))); // Generate subject line $subject = getMessage('BEG_RALLYE_'.strtoupper($mode).'_NOTIFY'); // Load message body for bonus mails - $message = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", '', "{PER}uid{PER}"); + $message = loadEmailTemplate('beg_en_notify_body', '', '{PER}userid{PER}'); $RECEIVER = ''; $UIDs = array(); // Okay lets notify all users! - while ($content = SQL_FETCHARRAY($result_main)) { + while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) { // Update account - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` -SET beg_ral_notify='%s', beg_ral_%s_notify='%s' -WHERE userid=%s + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` +SET `beg_ral_notify`=UNIX_TIMESTAMP(),` beg_ral_%s_notify`=UNIX_TIMESTAMP() +WHERE `userid`=%s LIMIT 1", - array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__); + array( + $mode, + $content['userid'] + ), __FILE__, __LINE__); // Load email template and send it to the user! if ($sentBonusMails === true) { @@ -121,7 +124,7 @@ LIMIT 1", $UIDs[] = $content['userid']; } else { // Send normal notification mail to the members - $message = LOAD_EMAIL_TEMPLATE('beg_' . $mode . '_notify', array(), $content['userid']); + $message = loadEmailTemplate('beg_' . $mode . '_notify', $content, $content['userid']); sendEmail($content['email'], $subject, $message); } } // END - while @@ -143,5 +146,5 @@ LIMIT 1", SQL_FREERESULT($result_main); } // END - if -// +// [EOF] ?> diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index 04e0499a75..f551ef47b7 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -1,114 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 05/23/2004 * - * =============== Last change: 11/22/2005 * - * * - * -------------------------------------------------------------------- * - * File : birthday_mails.php * - * -------------------------------------------------------------------- * - * Short description : Sends out birthday mails * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Versendet Geburtstagsmails * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('birthday')) { - return; -} - -// Do not execute when script is in CSS mode -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; - -// Get current day (01 to 31), month (01 to 12) and year (4-digits year) -$day = date('d', time()); -$month = date('m', time()); -$year = date('Y', time()); - -// Shall I include only active members? -$add = "%s"; $value = ''; -if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { - $add = " AND `last_online` >= (UNIX_TIMESTAP() - %s)"; - $value = getConfig('ap_inactive_since'); -} - -// Only confirmed members shall receive birthday mails... -$result_birthday = SQL_QUERY_ESC("SELECT userid, email, birth_year -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` ASC", -array($day, $month, $value), __FILE__, __LINE__); - -if (SQL_NUMROWS($result_birthday) > 0) { - // Start sending out birthday mails - while ($content = SQL_FETCHARRAY($result_birthday)) { - // Calculate own timestamp for birthday and today - $bd = $content['birth_year'] + 12 * $month + 365 * $day; - $now = $year + 12 * $month + 365 * $day; - - // Simply subtract both values and you got the age... :) - $age = $now - $bd; - - if (getConfig('birthday_points') > 0) { - // Add more entries to the array - $content['age'] = $age; - $content['points'] = translateComma(getConfig('birthday_points')); - $content['check'] = ''; - - // @TODO 4 is hard-coded here, should we move it out in config? - for ($idx = 0; $idx < 4; $idx++) { - $content['check'] .= generateRandomCode("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1))); - } // END - for - - // Insert row into database - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )", - array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__); - - // Load email template with confirmation link - $message = LOAD_EMAIL_TEMPLATE('member_birthday_confirm', $content, bigintval($content['userid'])); - } else { - // Load default email template and fill in the age - $message = LOAD_EMAIL_TEMPLATE('member_birthday', $age, $content['userid']); - } - - // Send email - sendEmail($content['email'], getMessage('HAPPY_BIRTHDAY'), $message); - - // 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", - array(bigintval($content['userid'])), __FILE__, __LINE__); - } // END - while - - // Free memory - SQL_FREERESULT($result); -} - -// +// @DEPRECATED ?> diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index aef8062d37..edd37ab917 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,28 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('bonus')) { + die(); +} elseif (!isExtensionActive('bonus')) { return; } // Do not execute when script is in CSS mode -if (getOutputMode() == 1) return; +if (getOutputMode() != 0) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), date('d', time()), date('Y', time())); $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 if (getConfig('bonus_en_notify') == 'Y') { // Okay, let's check for member accounts - $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; - $mode = "en"; + $sql .= "= 0 OR (`bonus_ral_notify` > 0 AND `bonus_ral_en_notify` < `bonus_ral_di_notify`)"; + $mode = 'en'; } else { // Do not notify! $sql = ''; @@ -69,8 +68,8 @@ switch (getConfig('bonus_active')) case 'N': // Active rallye is deactivated if (getConfig('bonus_di_notify') == 'Y') { // Okay, let's check for member accounts - $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; - $mode = "di"; + $sql .= " > 0 AND `bonus_ral_di_notify` < `bonus_ral_en_notify`"; + $mode = 'di'; } else { // Do not notify! $sql = ''; @@ -80,16 +79,16 @@ switch (getConfig('bonus_active')) if (!empty($sql)) { // The SQL command needs to be finisched here (only confirmed accounts!) - $sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC"; + $sql .= ") AND `status`='CONFIRMED' ORDER BY `last_online` ASC"; // Normal notification mails or bonus mails? - $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == "en") && (EXT_IS_ACTIVE('bonus'))); + $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == "en") && (isExtensionActive('bonus'))); // Generate subject line $subject = getMessage('BONUS_RALLYE_' . strtoupper($mode).'_NOTIFY'); // Load message body for bonus mails - $message = LOAD_EMAIL_TEMPLATE('bonus_en_notify_body', '', '{PER}uid{PER}'); + $message = loadEmailTemplate('bonus_en_notify_body', '', '{PER}userid{PER}'); $RECEIVER = ''; $UIDs = array(); // Check for accounts to be notified @@ -98,9 +97,9 @@ if (!empty($sql)) { // Okay lets notify all users! while ($content = SQL_FETCHARRAY($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 +WHERE `userid`=%s LIMIT 1", array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__); @@ -110,7 +109,7 @@ LIMIT 1", $UIDs[] = $content['userid']; } else { // Send normal notification mail to the members - $message = LOAD_EMAIL_TEMPLATE('bonus_' . $mode . '_notify', array(), $content['userid']); + $message = loadEmailTemplate('bonus_' . $mode . '_notify', array(), $content['userid']); sendEmail($content['email'], $subject, $message); } } // END - while diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php new file mode 100644 index 0000000000..4b6d8505e0 --- /dev/null +++ b/inc/mails/doubler_mails.php @@ -0,0 +1,183 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 02/16/2005 * + * =============== Last change: 01/21/2006 * + * * + * -------------------------------------------------------------------- * + * File : doubler_mails.php * + * -------------------------------------------------------------------- * + * Short description : Send's out mails for doubled points * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Sendet Mails bei vergueteter Verdoppelung aus * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('doubler')) { + return; +} + +// Do not execute when script is in CSS mode +if (getOutputMode() != 0) return; + +// Initialize variables +$jackpot = 0; $user = 0; +if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints(); + +// Get total points of the doubler itself +$DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT(); +if ($DOUBLER_POINTS == 0) { + // Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...) + return; +} // END - if + +// If not currently doubled set it to zero +unsetGetRequestElement('DOUBLER_UID'); +unsetPostRequestElement('DOUBLER_UID'); +setSession('DOUBLER_UID', ''); +if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = 0; + +// Check for doubles which we can pay out +$result_total = SQL_QUERY_ESC("SELECT d.id, d.userid, d.points, d.remote_ip, d.timemark +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, + getConfig(('doubler_min') * 2) + ), __FILE__, __LINE__); + +// Check for accounts with limitation +$result_main = SQL_QUERY_ESC("SELECT 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 +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 +LIMIT %d", + array( + $DOUBLER_POINTS, + getConfig(('doubler_min') * 2), + getConfig('doubler_max_sent') + ), __FILE__, __LINE__); + +// Do we have entries found? +if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != 'Y'))) { + // Switch to matching SQL resource + $result_load = $result_main; + if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) $result_load = $result_total; + + // At least one account was found + while ($content = SQL_FETCHARRAY($result_load)) { + // Only double when points are enougth! + if ($DOUBLER_POINTS >= $content['points']) { + // Check for his ref points + $ref = countSumTotalData($content['userid'], 'doubler', 'points', 'refid', false, " AND `completed`='N' AND `is_ref`='Y'"); + + // Zero refid when empty (might be helpful!) + if (empty($ref)) $ref = 0; + + if (($ref > 0) && ($GLOBALS['doubler_userid'] == $content['userid']) && (!empty($ref))) { + // Referal points found so add them and set line(s) to completed='Y' + $content['points'] += $ref; + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_doubler` SET `completed`='Y' WHERE `refid`=%s AND `completed`='N' AND `is_ref`='Y'", + array(bigintval($content['userid'])), __FILE__, __LINE__); + } else { + // No referal points found + $ref = 0; + } + + // Exclude webmaster from doubling... + if ($content['userid'] != getConfig('doubler_userid')) { + // Add points + addPointsDirectly(sprintf("doubler_%s", strtolower(getConfig('doubler_send_mode'))), $content['userid'], $content['points']); + } // END - if + + // Set entry as "payed" + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_doubler` SET `completed`='Y' WHERE `id`=%s LIMIT 1", + array(bigintval($content['id'])), __FILE__, __LINE__); + + $okay = false; + + // Check for jackpot inclusion in doubling process + if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) { + // Subtract points from jackpot + subtractPointsFromJackpot($content['points']); + $jackpot -= $content['points']; + + // Okay, done! + $okay = true; + } // END - if + + // Exclude also webmaster's ID in taking points from webmaster's account + if (($user > 0) && ($user >= $content['points']) && ($okay === false) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) { + // Add points to used points + subtractPoints('doubler_payout', getConfig('doubler_userid'), $content['points']); + + // Okay, done! + $okay = true; + } // END - if + + // Update doubler's account only when others are not updated + if ($okay === false) { + // Add points to used doubler points + updateConfiguration('doubler_used', $content['points'], '+'); + } // END - if + + // Update variables to prevent errors + incrementConfigEntry('doubler_used', $content['points']); + $DOUBLER_POINTS -= $content['points']; + + // Prepare array + $content = array( + // Doubler transmission ID + 'id' => $content['id'], + // Doubled points + 'points' => translateComma($content['points']), + // Timemark + 'when' => generateDateTime($content['timemark'], '2'), + // IP number when the member submitted the doubling form + 'ip' => $content['remote_ip'], + ); + + // Load mail template and send mail away... + $message = loadEmailTemplate('member_doubler', $content, $content['userid']); + sendEmail($content['userid'], getMessage('DOUBLER_MEMBER_SUBJECT'), $message); + } // END - if + } // END - while +} // END - if + +// Free memory +SQL_FREERESULT($result_total); +SQL_FREERESULT($result_main); + +// [EOF] +?> diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 6aa04a6869..43df3fa8de 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Load include file @@ -54,24 +53,24 @@ $ret = 'init'; // Is no admin registered? if (!isAdminRegistered()) { // Admin is not registered so we have to inform the user - if ((isFormSent()) && ((!REQUEST_ISSET_POST('login')) || (!REQUEST_ISSET_POST('pass')) || (strlen(REQUEST_POST('pass')) < 4))) { - REQUEST_SET_POST('ok', '***'); + if ((isFormSent()) && ((!isPostRequestElementSet('login')) || (!isPostRequestElementSet('pass')) || (strlen(postRequestElement('pass')) < 4))) { + setRequestPostElement('ok', '***'); } // END - if - if ((isFormSent()) && (REQUEST_POST('ok') != '***')) { + if ((isFormSent()) && (postRequestElement('ok') != '***')) { // Hash the password with the old function because we are here in install mode - $hashedPass = md5(REQUEST_POST('pass')); + $hashedPass = md5(postRequestElement('pass')); // Kill maybe existing session variables destroyAdminSession(false); // Do registration - $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, getConfig('WEBMASTER')); + $ret = addAdminAccount(postRequestElement('login'), $hashedPass, getConfig('WEBMASTER')); // Check if registration wents fine switch ($ret) { case 'done': - $done = changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0); + $done = changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'ADMIN-SETUP', "setConfigEntry('ADMIN_REGISTERED', '", "');", 'Y', 0); if ($done === true) { // Registering is done redirectToUrl('modules.php?module=admin&register=done'); @@ -91,7 +90,7 @@ if (!isAdminRegistered()) { $ret = getMessage('ADMIN_LOGIN_ALREADY_REG'); } else { // Any other kind will be logged and interpreted as 'done' - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret)); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminLoginDataIsValid() and interpreted as 'done'!", $ret)); // @TODO Why is this set to 'done'? $ret = 'done'; } @@ -99,7 +98,7 @@ if (!isAdminRegistered()) { // Admin still not registered? if (!isAdminRegistered()) { // Write to config that registration is done - changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'ADMIN-SETUP', "setConfigEntry('ADMIN_REGISTERED', '", "');", 'Y', 0); // Load URL for login redirectToUrl('modules.php?module=admin'); @@ -111,88 +110,81 @@ if (!isAdminRegistered()) { // Whas that action okay? if ($ret != 'done') { // Fixes another notice - if (REQUEST_ISSET_POST('login')) { - define('__LOGIN_VALUE', REQUEST_POST('login')); - } else { - define('__LOGIN_VALUE', ''); - } + $content['login'] = ''; + if (isPostRequestElementSet('login')) { + $content['login'] = postRequestElement('login'); + } // END - if + + // Init array elements + $content['login_message'] = ''; + $content['pass_message'] = ''; // Yet-another notice-fix - if ((isFormSent()) && (REQUEST_POST('ok') == '***')) { + if ((isFormSent()) && (postRequestElement('ok') == '***')) { // No login entered? - if (!REQUEST_ISSET_POST('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); + if (!isPostRequestElementSet('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); // An error comes back from registration? if (!empty($ret)) $loginMessage = $ret; // No password entered? - if (!REQUEST_ISSET_POST('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); + if (!isPostRequestElementSet('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); // Or password too short? - if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); + if (strlen(postRequestElement('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); // Output error messages - define('__MSG_LOGIN', LOAD_TEMPLATE('admin_login_msg', true, $loginMessage)); - define('__MSG_PASS', LOAD_TEMPLATE('admin_login_msg', true, $passwdMessage)); + $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); + $content['pass_message'] = loadTemplate('admin_login_msg', true, $passwdMessage); // Reset variables $loginMessage = ''; $passwdMessage = ''; - } else { - // Reset values to nothing - define('__MSG_LOGIN', ''); - define('__MSG_PASS' , ''); - } + } // END - if // Output message in seperate template - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOT_REGISTERED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NOT_REGISTERED')); // Load register template - LOAD_TEMPLATE('admin_reg_form'); + loadTemplate('admin_reg_form', false, $content); } -} elseif (REQUEST_ISSET_GET('reset_pass')) { +} elseif (isGetRequestElementSet('reset_pass')) { // Is the form submitted? - if ((REQUEST_ISSET_POST('send_link')) && (REQUEST_ISSET_POST('email'))) { - // Try to send the link out - $OUT = ADMIN_SEND_PASSWORD_RESET_LINK(REQUEST_POST('email')); - + if ((isPostRequestElementSet('send_link')) && (isPostRequestElementSet('email'))) { // Output result - LOAD_TEMPLATE('admin_settings_saved', false, $OUT); - } elseif (REQUEST_ISSET_GET('hash')) { + loadTemplate('admin_settings_saved', false, sendAdminPasswordResetLink(postRequestElement('email'))); + } elseif (isGetRequestElementSet('hash')) { // Output form for hash validation - LOAD_TEMPLATE('admin_validate_reset_hash_form', false, REQUEST_GET('hash')); - } elseif ((REQUEST_ISSET_POST('validate_hash')) && (REQUEST_ISSET_POST('login')) && (REQUEST_ISSET_POST('hash'))) { + loadTemplate('admin_validate_reset_hash_form', false, getRequestElement('hash')); + } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('hash'))) { // Validate the login data and hash - $valid = ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN(REQUEST_POST('hash'), REQUEST_POST('login')); + $valid = adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('login')); // Valid? if ($valid === true) { // Prepare content first $content = array( - 'hash' => SQL_ESCAPE(REQUEST_POST('hash')), - 'login' => SQL_ESCAPE(REQUEST_POST('login')) + 'hash' => SQL_ESCAPE(postRequestElement('hash')), + 'login' => SQL_ESCAPE(postRequestElement('login')) ); // Validation okay so display form for final password change - LOAD_TEMPLATE('admin_reset_password_form', false, $content); + loadTemplate('admin_reset_password_form', false, $content); } else { // Cannot validate the login data and hash - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED')); } - } elseif ((REQUEST_ISSET_POST('reset_pass')) && (REQUEST_ISSET_POST('hash')) && (REQUEST_ISSET_POST('login')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { + } elseif ((isPostRequestElementSet('reset_pass')) && (isPostRequestElementSet('hash')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('pass1')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { // Okay, we shall the admin password here. So first revalidate the hash - if (ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN(REQUEST_POST('hash'), REQUEST_POST('login'))) { - // Set the password now - $OUT = ADMIN_RESET_PASSWORD(REQUEST_POST('login'), REQUEST_POST('pass1')); - + if (adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('login'))) { // Output result - LOAD_TEMPLATE('admin_reset_pass_done', false, $OUT); + loadTemplate('admin_reset_pass_done', false, doResetAdminPassword(postRequestElement('login'), postRequestElement('pass1'))); } else { // Validation failed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2')); } } else { // Output reset password form - LOAD_TEMPLATE('admin_send_reset_link'); + loadTemplate('admin_send_reset_link'); } } elseif ((!isSessionVariableSet('admin_login')) || (!isSessionVariableSet('admin_md5')) || (!isSessionVariableSet('admin_last')) || (!isSessionVariableSet('admin_to')) || ((getSession('admin_last') + bigintval(getSession('admin_to')) * 3600 * 24) < time())) { // At leat one administrator account was created @@ -201,19 +193,19 @@ if (!isAdminRegistered()) { redirectToUrl('modules.php?module=admin&logout=1'); } // END - if - if (REQUEST_ISSET_GET('register')) { + if (isGetRequestElementSet('register')) { // Registration of first admin is done - if (REQUEST_GET('register') == 'done') LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REGISTER_DONE')); + if (getRequestElement('register') == 'done') loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REGISTER_DONE')); } // END - if // Check if the admin has submitted data or not - if ((isFormSent()) && ((!REQUEST_ISSET_POST('login')) || (!REQUEST_ISSET_POST('pass')) || (strlen(REQUEST_POST('pass')) < 4))) { - REQUEST_SET_POST('ok', '***'); + if ((isFormSent()) && ((!isPostRequestElementSet('login')) || (!isPostRequestElementSet('pass')) || (strlen(postRequestElement('pass')) < 4))) { + setRequestPostElement('ok', '***'); } // END - if - if ((isFormSent()) && (REQUEST_POST('ok') != '***')) { + if ((isFormSent()) && (postRequestElement('ok') != '***')) { // All required data was entered so we check his account - $ret = CHECK_ADMIN_LOGIN(REQUEST_POST('login'), REQUEST_POST('pass')); + $ret = ifAdminLoginDataIsValid(postRequestElement('login'), postRequestElement('pass')); // Which status do we have? switch ($ret) { @@ -229,124 +221,122 @@ if (!isAdminRegistered()) { // Add data to URL if (isWhatSet()) $URL .= 'what='.getWhat(); elseif (isActionSet()) $URL .= 'action='.getAction(); - elseif (REQUEST_ISSET_GET('area')) $URL .= 'area='.REQUEST_GET('area'); + elseif (isGetRequestElementSet('area')) $URL .= 'area='.getRequestElement('area'); // Load URL redirectToUrl($URL); break; case '404': // Administrator login not found - REQUEST_SET_POST('ok', $ret); - $ret = getMessage('ADMIN_NOT_FOUND'); + setRequestPostElement('ok', $ret); + $ret = getMessage('ADMIN_404'); destroyAdminSession(); break; case 'pass': // Wrong password - REQUEST_SET_POST('ok', $ret); + setRequestPostElement('ok', $ret); $ret = '{--WRONG_PASS--} [<a href="{?URL?}/modules.php?module=admin&reset_pass=1">{--ADMIN_RESET_PASS--}</a>]'; destroyAdminSession(); break; default: // Others will be logged - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret)); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminLoginDataIsValid()", $ret)); break; } // END - switch } // END - if // Error detected? - // @TODO Rewrite all these constants if ($ret != 'done') { - if (REQUEST_ISSET_POST('login')) { - define('__LOGIN_VALUE', REQUEST_POST('login')); - } else { - define('__LOGIN_VALUE', ''); - } + $content['login'] = ''; + if (isPostRequestElementSet('login')) { + $content['login'] = postRequestElement('login'); + } // END - if + + // Init array elements + $content['login_message'] = ''; + $content['pass_message'] = ''; if (isFormSent()) { // Set messages to zero $loginMessage = ''; $passwdMessage = ''; // No login entered? - if (!REQUEST_ISSET_POST('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); + if (!isPostRequestElementSet('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); // An error comes back from login? - if ((!empty($ret)) && (REQUEST_POST('ok') == '404')) $loginMessage = $ret; + if ((!empty($ret)) && (postRequestElement('ok') == '404')) $loginMessage = $ret; // No password entered? - if (!REQUEST_ISSET_POST('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); + if (!isPostRequestElementSet('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); // Or password too short? - if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); + if (strlen(postRequestElement('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); // An error comes back from login? - if ((!empty($ret)) && (REQUEST_POST('ok') == 'pass')) $passwdMessage = $ret; + if ((!empty($ret)) && (postRequestElement('ok') == 'pass')) $passwdMessage = $ret; // Load message template - define('__MSG_LOGIN', LOAD_TEMPLATE('admin_login_msg', true, $loginMessage)); - define('__MSG_PASS' , LOAD_TEMPLATE('admin_login_msg', true, $passwdMessage)); + $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); + $content['pass_message'] = loadTemplate('admin_login_msg', true, $passwdMessage); // Reset variables unset($loginMessage); unset($passwdMessage); - } else { - // Set constants to empty for hiding them - define('__MSG_LOGIN', ''); - define('__MSG_PASS' , ''); - } + } // END - if // Load login form if (isWhatSet()) { // Restore old what value - $content = array('target' => 'what', 'value' => getWhat()); + $content = merge_array($content, array('target' => 'what', 'value' => getWhat())); } elseif (isActionSet()) { if (getAction() != 'logout') { // Restore old action value - $content = array('target' => 'action', 'value' => getAction()); + $content = merge_array($content, array('target' => 'action', 'value' => getAction())); } else { // Set default values - $content = array('target' => 'action', 'value' => 'login'); + $content = merge_array($content, array('target' => 'action', 'value' => 'login')); } - } elseif (REQUEST_ISSET_GET('area')) { + } elseif (isGetRequestElementSet('area')) { // Restore old area value - $content = array('target' => 'area', 'value' => REQUEST_GET('area')); + $content = merge_array($content, array('target' => 'area', 'value' => getRequestElement('area'))); } else { // Set default values - $content = array('target' => 'action', 'value' => 'login'); + $content = merge_array($content, array('target' => 'action', 'value' => 'login')); } // Load login form template - LOAD_TEMPLATE('admin_login_form', false, $content); + loadTemplate('admin_login_form', false, $content); } // END - if -} elseif (REQUEST_ISSET_GET('logout')) { +} elseif (isGetRequestElementSet('logout')) { // Only try to remove cookies if (destroyAdminSession()) { // Load logout template - if (REQUEST_ISSET_GET('register')) { + if (isGetRequestElementSet('register')) { // Secure input - $register = REQUEST_GET('register'); + $register = getRequestElement('register'); // Special logout redirect for installation of given extension - LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register)); - } elseif (REQUEST_ISSET_GET('remove')) { + loadTemplate(sprintf("admin_logout_%s_install", $register)); + } elseif (isGetRequestElementSet('remove')) { // Secure input - $remove = REQUEST_GET('remove'); + $remove = getRequestElement('remove'); // Special logout redirect for removal of given extension - LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove)); + loadTemplate(sprintf("admin_logout_%s_remove", $remove)); } else { // Logged out normally - LOAD_TEMPLATE('admin_logout'); + loadTemplate('admin_logout'); } } else { // Something went wrong here... - LOAD_TEMPLATE('admin_settings_saved', false, '<div class="admin_fatal">{--ADMIN_LOGOUT_FAILED--}</div>'); + loadTemplate('admin_settings_saved', false, '<div class="admin_fatal">{--ADMIN_LOGOUT_FAILED--}</div>'); // Add fatal message addFatalMessage(__FILE__, __LINE__, getMessage('CANNOT_UNREG_SESS')); } } else { // Maybe an Admin want's to login? - $ret = CHECK_ADMIN_COOKIES(getSession('admin_login'), getSession('admin_md5')); + $ret = ifAdminCookiesAreValid(getSession('admin_login'), getSession('admin_md5')); switch ($ret) { case 'done': @@ -357,42 +347,42 @@ if (!isAdminRegistered()) { if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', 'OLD'); // Check for version and switch between old menu system and new intelligent menu system - if ((ADMIN_CHECK_MENU_MODE() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) { + if ((adminGetMenuMode() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) { // Default area is the entrance, of course $area = 'entrance'; // Check for similar URL variable - if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area'); + if (isGetRequestElementSet('area')) $area = getRequestElement('area'); // Load logical-area menu-system file loadIncludeOnce('inc/modules/admin/lasys-inc.php'); // Create new-style menu system will logical areas - ADMIN_LOGICAL_AREA_SYSTEM($area, $act, getWhat()); + ADMIN_LOGICAL_AREA_SYSTEM($area, $action, getWhat()); } else { // This little call constructs the whole default old and lacky menu system // on left side. It also renders the content on right side - ADMIN_DO_ACTION(getWhat()); + doAdminAction(getWhat()); } break; case '404': // Administrator login not found - REQUEST_SET_POST('ok', $ret); + setRequestPostElement('ok', $ret); destroyAdminSession(); - addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND')); + addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_404')); break; case 'pass': // Wrong password - REQUEST_SET_POST('ok', $ret); + setRequestPostElement('ok', $ret); destroyAdminSession(); addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS')); break; default: // Others will be logged - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_COOKIES()", $ret)); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminCookiesAreValid()", $ret)); break; } } -// +// [EOF] ?> diff --git a/inc/modules/admin/action- b/inc/modules/admin/action- index 1f76fd3313..e18db953c2 100644 --- a/inc/modules/admin/action- +++ b/inc/modules/admin/action- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { - addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('ADMIN_404_ACTION', getWhat()))); + addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('ADMIN_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-admins.php b/inc/modules/admin/action-admins.php index d470716f45..06867e14ca 100644 --- a/inc/modules/admin/action-admins.php +++ b/inc/modules/admin/action-admins.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-bank.php b/inc/modules/admin/action-bank.php index 7d531bfdaf..6766542044 100644 --- a/inc/modules/admin/action-bank.php +++ b/inc/modules/admin/action-bank.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-country.php b/inc/modules/admin/action-country.php index 54df02e525..af2e9ecbc0 100644 --- a/inc/modules/admin/action-country.php +++ b/inc/modules/admin/action-country.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-doubler.php b/inc/modules/admin/action-doubler.php index 175fbf3a77..d7599b892f 100644 --- a/inc/modules/admin/action-doubler.php +++ b/inc/modules/admin/action-doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,23 +37,22 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { // "what file" not found addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-email.php b/inc/modules/admin/action-email.php index 315df5c1be..39e63a964b 100644 --- a/inc/modules/admin/action-email.php +++ b/inc/modules/admin/action-email.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-holiday.php b/inc/modules/admin/action-holiday.php index 798fba3f45..60a75ea964 100644 --- a/inc/modules/admin/action-holiday.php +++ b/inc/modules/admin/action-holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-login.php b/inc/modules/admin/action-login.php index 594a50a313..e73fccc032 100644 --- a/inc/modules/admin/action-login.php +++ b/inc/modules/admin/action-login.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index d31da7d870..8a05dad619 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,23 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_POST('no')) { +if (isPostRequestElementSet('no')) { // Do not logout now redirectToUrl('admin.php'); -} elseif ((REQUEST_ISSET_POST(('yes'))) && (getAction() == 'logout')) { +} elseif ((isPostRequestElementSet(('yes'))) && (getAction() == 'logout')) { // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); } // Load logout form template -LOAD_TEMPLATE('admin_logout_form'); +loadTemplate('admin_logout_form'); -// +// [EOF] ?> diff --git a/inc/modules/admin/action-menu.php b/inc/modules/admin/action-menu.php index eb7f1fa800..be767d4bad 100644 --- a/inc/modules/admin/action-menu.php +++ b/inc/modules/admin/action-menu.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-misc.php b/inc/modules/admin/action-misc.php index c8a688e198..3f67688afa 100644 --- a/inc/modules/admin/action-misc.php +++ b/inc/modules/admin/action-misc.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } diff --git a/inc/modules/admin/action-mods.php b/inc/modules/admin/action-mods.php index 3f31c0adb8..fd1754fefc 100644 --- a/inc/modules/admin/action-mods.php +++ b/inc/modules/admin/action-mods.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-newsletter.php b/inc/modules/admin/action-newsletter.php index e20ac2a733..f71db92598 100644 --- a/inc/modules/admin/action-newsletter.php +++ b/inc/modules/admin/action-newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-payouts.php b/inc/modules/admin/action-payouts.php index f61f6fa133..21c5d95f68 100644 --- a/inc/modules/admin/action-payouts.php +++ b/inc/modules/admin/action-payouts.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-primera.php b/inc/modules/admin/action-primera.php index 55134ed1c6..315fda5d4e 100644 --- a/inc/modules/admin/action-primera.php +++ b/inc/modules/admin/action-primera.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-rallye.php b/inc/modules/admin/action-rallye.php index 14facb5b59..6a342875fd 100644 --- a/inc/modules/admin/action-rallye.php +++ b/inc/modules/admin/action-rallye.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-repair.php b/inc/modules/admin/action-repair.php index 77a5132f84..4ffb2da4f1 100644 --- a/inc/modules/admin/action-repair.php +++ b/inc/modules/admin/action-repair.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-setup.php b/inc/modules/admin/action-setup.php index fd20b86d27..60e5d6868a 100644 --- a/inc/modules/admin/action-setup.php +++ b/inc/modules/admin/action-setup.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-sponsor.php b/inc/modules/admin/action-sponsor.php index 1f527dced7..fb44eea7b6 100644 --- a/inc/modules/admin/action-sponsor.php +++ b/inc/modules/admin/action-sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,21 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// + +// [EOF] ?> diff --git a/inc/modules/admin/action-stats.php b/inc/modules/admin/action-stats.php index 7a58414c74..9f31458f25 100644 --- a/inc/modules/admin/action-stats.php +++ b/inc/modules/admin/action-stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-surfbar.php b/inc/modules/admin/action-surfbar.php index 9fba2e4ea4..c50fae900d 100644 --- a/inc/modules/admin/action-surfbar.php +++ b/inc/modules/admin/action-surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php index bdc3fe5402..4589cb3bd3 100644 --- a/inc/modules/admin/action-task.php +++ b/inc/modules/admin/action-task.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,26 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('task')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('task')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('task')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task')); + return; +} // END - if // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-theme.php b/inc/modules/admin/action-theme.php index c4ab6ced5a..53fa648418 100644 --- a/inc/modules/admin/action-theme.php +++ b/inc/modules/admin/action-theme.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-transfer.php b/inc/modules/admin/action-transfer.php index ef4c9680a8..fd4f45ed08 100644 --- a/inc/modules/admin/action-transfer.php +++ b/inc/modules/admin/action-transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-user.php b/inc/modules/admin/action-user.php index 6d481f6ed6..f2b7ca6892 100644 --- a/inc/modules/admin/action-user.php +++ b/inc/modules/admin/action-user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/admin/action-wernis.php b/inc/modules/admin/action-wernis.php index 12c9a9c556..75296b5ec3 100644 --- a/inc/modules/admin/action-wernis.php +++ b/inc/modules/admin/action-wernis.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Load the include file -$INC = sprintf("inc/modules/admin/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/admin/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat()); } diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index a9d93afa43..e8778670dd 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Register an administrator account -function REGISTER_ADMIN ($user, $md5, $email) { +function addAdminAccount ($user, $md5, $email) { // Login does already exist $ret = 'already'; // Lookup the admin - $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), __FUNCTION__, __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), __FUNCTION__, __LINE__); $ret = 'done'; } // END - if @@ -67,36 +66,36 @@ function REGISTER_ADMIN ($user, $md5, $email) { } // Only be executed on login procedure! -function CHECK_ADMIN_LOGIN ($admin_login, $password) { +function ifAdminLoginDataIsValid ($admin_login, $password) { // By default no admin is found $ret = '404'; // Get admin id - $aid = GET_ADMIN_ID($admin_login); + $adminId = getAdminId($admin_login); // Init array with admin id by default - $data = array('aid' => $aid); + $data = array('admin_id' => $adminId); // Is the cache valid? - if (isset($GLOBALS['cache_array']['admins']['password'][$aid])) { + if (isset($GLOBALS['cache_array']['admins']['password'][$adminId])) { // Get password from cache - $data['password'] = $GLOBALS['cache_array']['admins']['password'][$aid]; + $data['password'] = $GLOBALS['cache_array']['admins']['password'][$adminId]; $ret = 'pass'; - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); // Include more admins data? - if (GET_EXT_VERSION('admins') >= '0.7.2') { + if (isExtensionInstalledAndNewer('admins', '0.7.2')) { // Load them here - $data['login_failures'] = $GLOBALS['cache_array']['admins']['login_failures'][$aid]; - $data['last_failure'] = $GLOBALS['cache_array']['admins']['last_failure'][$aid]; + $data['login_failures'] = $GLOBALS['cache_array']['admins']['login_failures'][$adminId]; + $data['last_failure'] = $GLOBALS['cache_array']['admins']['last_failure'][$adminId]; } // END - if - } elseif (!EXT_IS_ACTIVE('cache')) { + } elseif (!isExtensionActive('cache')) { // Add extra data via filter now $add = runFilterChain('sql_admin_extra_data'); // Get password from DB - $result = SQL_QUERY_ESC("SELECT `password`" . $add . " FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1", - array($aid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `password`" . $add . " FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array($adminId), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -111,14 +110,14 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { SQL_FREERESULT($result); } - //* DEBUG: */ OUTPUT_HTML("*".$data['password'].'/'.md5($password).'/'.$ret."<br />"); + //* DEBUG: */ outputHtml("*".$data['password'].'/'.md5($password).'/'.$ret."<br />"); if ((isset($data['password'])) && (strlen($data['password']) == 32) && ($data['password'] == md5($password))) { // Generate new hash $data['password'] = generateHash($password); // Is the sql_patches not installed, than we cannot have a valid hashed password here! - if (($ret == 'pass') && ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == ''))) $ret = 'done'; - } elseif ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == '')) { + if (($ret == 'pass') && ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) $ret = 'done'; + } elseif ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches'))) { // Old hashing way return $ret; } elseif (!isset($data['password'])) { @@ -127,61 +126,60 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { } // Generate salt of password - define('__SALT', substr($data['password'], 0, -40)); - $salt = __SALT; + $salt = substr($data['password'], 0, -40); // Check if password is same - //* DEBUG: */ OUTPUT_HTML("*".$ret.','.$data['password'].','.$password.','.$salt."*<br />"); + //* DEBUG: */ outputHtml("*".$ret.','.$data['password'].','.$password.','.$salt."*<br />"); if (($ret == 'pass') && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) { // Re-hash the plain passord with new random salt $data['password'] = generateHash($password); // Do we have 0.7.0 of admins or later? // Remmeber login failures if available - if (GET_EXT_VERSION('admins') >= '0.7.2') { + if (isExtensionInstalledAndNewer('admins', '0.7.2')) { // Store it in session setSession('mxchange_admin_failures', $data['login_failures']); setSession('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", - array($data['password'], $aid), __FUNCTION__, __LINE__); + 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'], $adminId), __FUNCTION__, __LINE__); } else { // Update password - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE `id`=%s LIMIT 1", - array($data['password'], $aid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET password='%s' WHERE `id`=%s LIMIT 1", + array($data['password'], $adminId), __FUNCTION__, __LINE__); } // Rebuild cache - rebuildCacheFiles('admins', 'admin'); + rebuildCacheFile('admins', 'admin'); // Login has failed by default... ;-) - $ret = 'failed'; + $ret = 'failed1'; // Password matches so login here - if (LOGIN_ADMIN($admin_login, $data['password'])) { + if (doAdminLogin($admin_login, $data['password'])) { // All done now $ret = 'done'; } // END - if } elseif ((empty($salt)) && ($ret == 'pass')) { // Something bad went wrong - $ret = 'failed'; + $ret = 'failed_salt'; } elseif ($ret == 'done') { // Try to login here if we have the old hashing way (sql_patches not installed?) - if (!LOGIN_ADMIN($admin_login, $data['password'])) { + if (!doAdminLogin($admin_login, $data['password'])) { // Something went wrong - $ret = 'failed'; + $ret = 'failed2'; } // END - if } // Count login failure if admins extension version is 0.7.0+ - if (($ret == 'pass') && (GET_EXT_VERSION('admins') >= '0.7.0')) { + if (($ret == 'pass') && (getExtensionVersion('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", - array($aid), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET login_failures=login_failures+1,last_failure=NOW() WHERE `id`=%s LIMIT 1", + array($adminId), __FUNCTION__, __LINE__); // Rebuild cache - rebuildCacheFiles('admins', 'admin'); + rebuildCacheFile('admins', 'admin'); } // END - if // Return the result @@ -190,15 +188,15 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { } // Try to login the admin by setting some session/cookie variables -function LOGIN_ADMIN ($adminLogin, $passHash) { +function doAdminLogin ($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') == ''))) { + if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('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), __FUNCTION__, __LINE__); // Rebuild cache - rebuildCacheFiles('admins', 'admin'); + rebuildCacheFile('admins', 'admin'); } // END - if // Now set all session variables and return the result @@ -209,21 +207,21 @@ function LOGIN_ADMIN ($adminLogin, $passHash) { ) && ( setSession('admin_last', time()) ) && ( - setSession('admin_to', bigintval(REQUEST_POST('timeout'))) + setSession('admin_to', bigintval(postRequestElement('timeout'))) )); } // Only be executed on cookie checking -function CHECK_ADMIN_COOKIES ($admin_login, $password) { +function ifAdminCookiesAreValid ($admin_login, $password) { // By default no admin cookies are found $ret = '404'; $pass = ''; // Get hash - $pass = GET_ADMIN_HASH(GET_ADMIN_ID($admin_login)); + $pass = getAdminHash(getAdminId($admin_login)); if ($pass != '-1') $ret = 'pass'; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />"); // Check if password matches if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) { @@ -235,73 +233,84 @@ function CHECK_ADMIN_COOKIES ($admin_login, $password) { return $ret; } -// -function ADMIN_DO_ACTION ($wht) { - global $DATA; - //* DEBUG: */ OUTPUT_HTML(__LINE__."*".$wht.'/'.getModule().'/'.getAction().'/'.getWhat()."*<br />"); +// Do an admin action +function doAdminAction ($what) { + //* DEBUG: */ outputHtml(__LINE__."*".$what.'/'.getModule().'/'.getAction().'/'.getWhat()."*<br />"); // Remove any spaces from variable - if (empty($wht)) { + if (empty($what)) { // Default admin action is the overview page - $wht = 'overview'; + $what = 'overview'; } else { // Compile out some chars - $wht = COMPILE_CODE($wht, false, false, false); + $what = compileCode($what, false, false, false); } // Get action value - $act = getModeAction(getModule(), $wht); + $action = getModeAction(getModule(), $what); // Define admin login name and ID number $content['login'] = getSession('admin_login'); $content['id'] = getCurrentAdminId(); // Preload templates - if (EXT_IS_ACTIVE('admins')) { - $content['welcome'] = LOAD_TEMPLATE('admin_welcome_admins', true, $content); + if (isExtensionActive('admins')) { + $content['welcome'] = loadTemplate('admin_welcome_admins', true, $content); } else { - $content['welcome'] = LOAD_TEMPLATE('admin_welcome', true, $content); + $content['welcome'] = loadTemplate('admin_welcome', true, $content); } - $content['footer'] = LOAD_TEMPLATE('admin_footer' , true, $content); - $content['menu'] = ADD_ADMIN_MENU($act, $wht, true, $content); + $content['footer'] = loadTemplate('admin_footer' , true, $content); + $content['menu'] = addAdminMenu($action, $what, true); // Tableset header - LOAD_TEMPLATE('admin_main_header', false, $content); + loadTemplate('admin_main_header', false, $content); // Check if action/what pair is valid - $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), __FUNCTION__, __LINE__); + $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($action, $what, $what), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_action) == 1) { // Is valid but does the inlcude file exists? - $INC = sprintf("inc/modules/admin/action-%s.php", $act); - if ((isIncludeReadable($INC)) && (isMenuActionValid('admin', $act, $wht)) && ($GLOBALS['acl_allow'] === true)) { + $inc = sprintf("inc/modules/admin/action-%s.php", $action); + if ((isIncludeReadable($inc)) && (isMenuActionValid('admin', $action, $what)) && ($GLOBALS['acl_allow'] === true)) { // Ok, we finally load the admin action module - loadInclude($INC); + loadInclude($inc); } elseif ($GLOBALS['acl_allow'] === false) { // Access denied - LOAD_TEMPLATE('admin_menu_failed', false, getMessage('ADMIN_ACCESS_DENIED')); - addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACCESS_DENIED')); + loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACCESS_DENIED'), $what)); } else { // Include file not found! :-( - LOAD_TEMPLATE('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_404'), $act)); - addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_404'), $act); + loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_404'), $action)); } } else { // Invalid action/what pair found! - LOAD_TEMPLATE('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $act.'/'.$wht)); - addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_INVALID'), $act.'/'.$wht); + loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $action.'/'.$what)); } // Free memory SQL_FREERESULT($result_action); // Tableset footer - LOAD_TEMPLATE('admin_main_footer', false, $content); + loadTemplate('admin_main_footer', false, $content); } -// -function ADD_ADMIN_MENU ($act, $wht, $return=false) { +// Adds an admin menu +function addAdminMenu ($action, $what, $return=false) { // Init variables $SUB = false; $OUT = ''; @@ -310,38 +319,22 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { $GLOBALS['menu']['description'] = array(); $GLOBALS['menu']['title'] = array(); - // Is there a cache instance? - if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == 'Y')) { - // Create cache name - $cacheName = 'admin_' . $act . '_' . $wht . '_' . getLanguage() . '_' . strtolower(getSession('admin_login')); - - // Is that cache there? - if ($GLOBALS['cache_instance']->loadCacheFile($cacheName)) { - // Then load it - $data = $GLOBALS['cache_instance']->getArrayFromCache(); - - // Extract all parts - $OUT = base64_decode($data['output'][0]); - $GLOBALS['menu']['title'] = unserialize(base64_decode($data['title'][0])); - $GLOBALS['menu']['description'] = unserialize(base64_decode($data['descr'][0])); - - // Return or output content? - if ($return === true) { - return $OUT; - } else { - OUTPUT_HTML($OUT); - } - } // END - if - } // 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", __FUNCTION__, __LINE__); + $result_main = SQL_QUERY("SELECT + `action`, `title`, `descr` +FROM + `{?_MYSQL_PREFIX?}_admin_menu` +WHERE + (`what`='' OR `what` IS NULL) +ORDER BY + `sort` ASC, + `id` DESC", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { $OUT = "<div style=\"height:7px\" class=\"seperator\"> </div>\n"; $OUT .= "<ul class=\"admin_menu_main\">\n"; // @TODO Rewrite this to $content = SQL_FETCHARRAY() while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) { - if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) { + if ((isExtensionActive('admins')) && (getExtensionVersion('admins') > '0.2.0')) { $ACL = adminsCheckAdminAcl($menu, ''); } else { // @TODO ACL is 'allow'... hmmm @@ -349,7 +342,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { } if ($ACL === true) { - if (!$SUB) { + if ($SUB === false) { // Insert compiled menu title and description $GLOBALS['menu']['title'][$menu] = $title; $GLOBALS['menu']['description'][$menu] = $descr; @@ -357,7 +350,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { $OUT .= "<li class=\"admin_menu\"> <div class=\"nobr\"><strong>·</strong> "; - if (($menu == $act) && (empty($wht))) { + if (($menu == $action) && (empty($what))) { $OUT .= "<strong>"; } else { $OUT .= "[<a href=\"{?URL?}/modules.php?module=admin&action=".$menu."\">"; @@ -365,7 +358,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { $OUT .= $title; - if (($menu == $act) && (empty($wht))) { + if (($menu == $action) && (empty($what))) { $OUT .= "</strong>"; } else { $OUT .= "</a>]"; @@ -375,11 +368,21 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { </li>\n"; // Check for menu entries - $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` ASC, + `id` DESC", array($menu), __FUNCTION__, __LINE__); // Remember the count for later checks - setAdminMenuHasEntries($menu, ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))); + setAdminMenuHasEntries($menu, ((SQL_NUMROWS($result_what) > 0) && ($action == $menu))); // Do we have entries? if ((ifAdminMenuHasEntries($menu)) && (SQL_NUMROWS($result_what) > 0)) { @@ -387,42 +390,42 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { $GLOBALS['menu']['title'] = array(); $SUB = true; $OUT .= "<li class=\"admin_menu_sub\"><ul class=\"admin_menu_sub\">\n"; // @TODO Rewrite this to $content = SQL_FETCHARRAY() - while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) { + while (list($what_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) { // Check for access level - if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) { - $ACL = adminsCheckAdminAcl('', $wht_sub); + if ((isExtensionActive('admins')) && (getExtensionVersion('admins') > '0.2.0')) { + $ACL = adminsCheckAdminAcl('', $what_sub); } else { // @TODO ACL is 'allow'... hmmm $ACL = true; } // Filename - $INC = sprintf("inc/modules/admin/what-%s.php", $wht_sub); + $inc = sprintf("inc/modules/admin/what-%s.php", $what_sub); // Is the file readable? - $readable = isIncludeReadable($INC); + $readable = isIncludeReadable($inc); // Access allowed? if ($ACL === true) { // Insert compiled title and description - $GLOBALS['menu']['title'][$wht_sub] = $title_what; - $GLOBALS['menu']['description'][$wht_sub] = $desc_what; + $GLOBALS['menu']['title'][$what_sub] = $title_what; + $GLOBALS['menu']['description'][$what_sub] = $desc_what; $OUT .= "<li class=\"admin_menu\"> <div class=\"nobr\"><strong>--></strong> "; if ($readable === true) { - if ($wht == $wht_sub) { + if ($what == $what_sub) { $OUT .= "<strong>"; } else { - $OUT .= "[<a href=\"{?URL?}/modules.php?module=admin&what=".$wht_sub."\">"; + $OUT .= "[<a href=\"{?URL?}/modules.php?module=admin&what=".$what_sub."\">"; } } else { - $OUT .= "<em class=\"admin_note\">"; + $OUT .= "<em style=\"cursor:help\" class=\"admin_note\" title=\"{--MENU_WHAT_404--}\">"; } $OUT .= $title_what; if ($readable === true) { - if ($wht == $wht_sub) { + if ($what == $what_sub) { $OUT .= "</strong>"; } else { $OUT .= "</a>]"; @@ -432,18 +435,18 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { } $OUT .= "</div> </li>\n"; - } - } + } // END - if + } // END - while // Free memory SQL_FREERESULT($result_what); - $OUT .= " </ul> + $OUT .= "</ul> </li>\n"; - } + } // END - if $OUT .= "<li style=\"height:7px\" class=\"seperator\"> </li>\n"; - } - } + } // END - if + } // END - while // Free memory SQL_FREERESULT($result_main); @@ -451,36 +454,18 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) { } // Is there a cache instance again? - if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == 'Y')) { - // Init cache - $GLOBALS['cache_instance']->init($cacheName); - - // Prepare cache data - $data = array( - 'output' => base64_encode($OUT), - 'title' => $GLOBALS['menu']['title'], - 'descr' => $GLOBALS['menu']['description'] - ); - - // Write the data away - $GLOBALS['cache_instance']->addRow($data); - - // Close cache - $GLOBALS['cache_instance']->finalize(); - } // END - if - // Return or output content? if ($return === true) { return $OUT; } else { - OUTPUT_HTML($OUT); + outputHtml($OUT); } } // Create member selection box -function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $none=false, $field='userid') { +function addMemberSelectionBox ($def='0', $add_all=false, $return=false, $none=false, $field='userid') { // Output selection form with all confirmed user accounts listed - $result = SQL_QUERY("SELECT userid, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` ORDER BY `userid` ASC", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT `userid`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` ORDER BY `userid` ASC", __FUNCTION__, __LINE__); // Default output $OUT = ''; @@ -498,16 +483,13 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non // Free memory SQL_FREERESULT($result); - if (!$return) { + if ($return === false) { // Remeber options in constant - // @TODO Rewrite these both constants - define('_MEMBER_SELECTION', $OUT); - - // Display selection box - define('__LANG_VALUE', getLanguage()); + $content['member_selection'] = $OUT; + $content['what'] = getWhat(); // Load template - LOAD_TEMPLATE('admin_member_selection_box', false, getWhat()); + loadTemplate('admin_member_selection_box', false, $content); } else { // Return content in selection frame return "<select class=\"admin_select\" name=\"".$field."\" size=\"1\">\n".$OUT."</select>\n"; @@ -515,11 +497,13 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non } // Create a menu selection box for given menu system -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`", - array($mode), __FUNCTION__, __LINE__); +// @TODO Try to rewrite this to adminAddMenuSelectionBox() +// @DEPRECATED +function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') { + $what = "`what` != ''"; + if ($mode == 'action') $what = "(`what`='' OR `what` IS NULL) AND action !='login'"; + $result = SQL_QUERY_ESC("SELECT %s, title FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$what." ORDER BY `sort`", + array($mode), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load menu as selection $OUT = "<select name=\"".$mode."_menu"; @@ -545,32 +529,32 @@ function ADMIN_MENU_SELECTION ($mode, $default = '', $defid = '') { return $OUT; } -// Wrapper for $_POST and ADMIN_SAVE_SETTINGS -function ADMIN_SAVE_SETTINGS_POST () { +// Wrapper for $_POST and adminSaveSettings +function adminSaveSettingsFromPostData ($tableName = "_config", $whereStatement = "config=0", $translateComma = array(), $alwaysAdd = false) { // Get the array - $POST = REQUEST_POST_ARRAY(); + $postData = postRequestArray(); // Call the lower function - ADMIN_SAVE_SETTINGS($POST); + adminSaveSettings($postData, $tableName, $whereStatement, $translateComma, $alwaysAdd); } // Save settings to the database -function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = "config=0", $translateComma = array(), $alwaysAdd = false) { +function adminSaveSettings (&$postData, $tableName = "_config", $whereStatement = "config=0", $translateComma = array(), $alwaysAdd = false) { // Prepare all arrays, variables $DATA = array(); $skip = false; // Now, walk through all entries and prepare them for saving - foreach ($POST as $id => $val) { + foreach ($postData as $id => $val) { // Process only formular field but not submit buttons ;) if ($id != 'ok') { // Do not save the ok value - convertSelectionsToTimestamp($POST, $DATA, $id, $skip); + convertSelectionsToTimestamp($postData, $DATA, $id, $skip); // Shall we process this ID? It muss not be empty, of course - if ((!$skip) && (!empty($id))) { + if (($skip === false) && (!empty($id))) { // Save this entry - $val = COMPILE_CODE($val); + $val = compileCode($val); // Translate the value? (comma to dot!) if ((is_array($translateComma)) && (in_array($id, $translateComma))) { @@ -596,11 +580,11 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = // Check if entry does exist $result = false; - if (!$alwaysAdd) { + if ($alwaysAdd === false) { if (!empty($whereStatement)) { - $result = SQL_QUERY("SELECT * FROM `{!_MYSQL_PREFIX!}".$tableName."` WHERE ".$whereStatement." LIMIT 1", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}".$tableName."` WHERE ".$whereStatement." LIMIT 1", __FUNCTION__, __LINE__); } else { - $result = SQL_QUERY("SELECT * FROM `{!_MYSQL_PREFIX!}".$tableName."` LIMIT 1", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}".$tableName."` LIMIT 1", __FUNCTION__, __LINE__); } } // END - if @@ -609,7 +593,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = $DATA_UPDATE = implode(", ", $DATA); // Generate SQL string - $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}%s` SET %s WHERE %s LIMIT 1", + $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}%s` SET %s WHERE %s LIMIT 1", $tableName, $DATA_UPDATE, $whereStatement @@ -628,7 +612,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = $values = implode(", ", $values); // Generate SQL string - $sql = sprintf("INSERT INTO {!_MYSQL_PREFIX!}%s (%s) VALUES (%s)", + $sql = sprintf("INSERT INTO {?_MYSQL_PREFIX?}%s (%s) VALUES (%s)", $tableName, $KEYs, $values @@ -642,14 +626,14 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement = SQL_QUERY($sql, __FUNCTION__, __LINE__); // Rebuild cache - rebuildCacheFiles("config", "config"); + rebuildCacheFile('config', 'config'); // Settings saved - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } // Generate a selection box -function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default = '') { +function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') { // Open the requested menu directory $menuArray = getArrayFromDirectory(sprintf("inc/modules/%s/", $menu), '', false, false); @@ -688,40 +672,40 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default = '') { } // Creates a user-profile link for the admin. This function can also be used for many other purposes -function generateUserProfileLink ($uid, $title = '', $wht = 'list_user') { +function generateUserProfileLink ($userid, $title = '', $what = 'list_user') { if (($title == '') && ($title != '0')) { // Set userid as title - $title = $uid; + $title = $userid; } // END - if - if (($title == '0') && ($wht == 'list_refs')) { + if (($title == '0') && ($what == 'list_refs')) { // Return title again return $title; } // END - if // Return link - //* DEBUG: */ OUTPUT_HTML("a:".$title."<br />"); - return "<a href=\"{?URL?}/modules.php?module=admin&what=".$wht."&uid=".$uid."\" title=\"{--ADMIN_USER_PROFILE_TITLE--}\">".$title."</a>"; + //* DEBUG: */ outputHtml("a:".$title."<br />"); + return '[<a href="{?URL?}/modules.php?module=admin&what=' . $what . '&userid=' . $userid . '" title="{--ADMIN_USER_PROFILE_TITLE--}">' . $title . '</a>]'; } // Check "logical-area-mode" -function ADMIN_CHECK_MENU_MODE () { +function adminGetMenuMode () { // Set the global mode as the mode for all admins $mode = getConfig('admin_menu'); $ADMIN = $mode; // Get admin id - $aid = getCurrentAdminId(); + $adminId = getCurrentAdminId(); // Check individual settings of current admin - if (isset($GLOBALS['cache_array']['admins']['la_mode'][$aid])) { + if (isset($GLOBALS['cache_array']['admins']['la_mode'][$adminId])) { // Load from cache - $ADMIN = $GLOBALS['cache_array']['admins']['la_mode'][$aid]; - incrementConfigEntry('cache_hits'); - } elseif (GET_EXT_VERSION('admins') >= '0.6.7') { + $ADMIN = $GLOBALS['cache_array']['admins']['la_mode'][$adminId]; + incrementStatsEntry('cache_hits'); + } elseif (isExtensionInstalledAndNewer('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", - array($aid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT la_mode FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array($adminId), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data list($ADMIN) = SQL_FETCHROW($result); @@ -739,7 +723,7 @@ function ADMIN_CHECK_MENU_MODE () { } // Change activation status -function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = 'id') { +function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') { $cnt = 0; $newStatus = 'Y'; if ((is_array($IDs)) && (count($IDs) > 0)) { // "Walk" all through and count them @@ -750,7 +734,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), __FUNCTION__, __LINE__); // Row found? @@ -762,7 +746,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), __FUNCTION__, __LINE__); // Count up affected rows @@ -775,15 +759,15 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = 'id') { } // END - foreach // Output status - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs))); } else { // Nothing selected! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE')); } } // Send mails for del/edit/lock build modes -function ADMIN_SEND_BUILD_MAILS ($mode, $table, $content, $id, $subjectPart = '') { +function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { // Default subject is the subject part $subject = $subjectPart; @@ -794,19 +778,19 @@ function ADMIN_SEND_BUILD_MAILS ($mode, $table, $content, $id, $subjectPart = '' } // END - if // Is the raw userid set? - if (REQUEST_POST('uid_raw', $id) > 0) { + if (postRequestElement('userid_raw', $id) > 0) { // Generate subject $subjectLine = getMessage('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT'); // Load email template if (!empty($subjectPart)) { - $mail = LOAD_EMAIL_TEMPLATE("member_".$mode."_".strtolower($subjectPart)."_".$table, $content); + $mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content); } else { - $mail = LOAD_EMAIL_TEMPLATE("member_".$mode."_".$table, $content); + $mail = loadEmailTemplate('member_' . $mode . '_' . $table, $content); } // Send email out - sendEmail(REQUEST_POST('uid_raw', $id), $subjectLine, $mail); + sendEmail(postRequestElement('userid_raw', $id), $subjectLine, $mail); } // END - if // Generate subject @@ -814,14 +798,14 @@ function ADMIN_SEND_BUILD_MAILS ($mode, $table, $content, $id, $subjectPart = '' // Send admin notification out if (!empty($subjectPart)) { - sendAdminNotification($subjectLine, "admin_".$mode."_".strtolower($subjectPart)."_".$table, $content, REQUEST_POST('uid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestElement('userid_raw', $id)); } else { - sendAdminNotification($subjectLine, "admin_".$mode."_".$table, $content, REQUEST_POST('uid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestElement('userid_raw', $id)); } } // Build a special template list -function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn) { +function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn) { $OUT = ''; $SW = 2; // "Walk" through all entries @@ -845,7 +829,7 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, // Do we have a userid? if ($key == 'userid') { // Add it again as raw id - $content['uid'] = bigintval($value); + $content['userid'] = bigintval($value); } // END - if // Handle the call in external function @@ -856,7 +840,7 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, $content['sw'] = $SW; // Then list it - $OUT .= LOAD_TEMPLATE(sprintf("admin_%s_%s_row", + $OUT .= loadTemplate(sprintf("admin_%s_%s_row", $listType, $table ), true, $content @@ -871,7 +855,7 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, } // END - foreach // Load master template - LOAD_TEMPLATE(sprintf("admin_%s_%s", + loadTemplate(sprintf("admin_%s_%s", $listType, $table ), false, $OUT @@ -879,16 +863,16 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, } // Change status of "build" list -function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray) { +function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray) { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (count($statusArray) > 0)) { // "Walk" through all entries foreach ($IDs as $id => $sel) { // Construct SQL query - $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET", SQL_ESCAPE($table)); + $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), __FUNCTION__, __LINE__); // Fetch the data @@ -921,9 +905,9 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct } // END - foreach // Add other columns as well - foreach (REQUEST_POST_ARRAY() as $key => $entries) { + foreach (postRequestArray() as $key => $entries) { // Skip id, raw userid and 'do_$mode' - if (!in_array($key, array($idColumn, 'uid_raw', ('do_'.$mode)))) { + if (!in_array($key, array($idColumn, 'userid_raw', ('do_'.$mode)))) { // Are there brackets () at the end? if (substr($entries[$id], -2, 2) == "()") { // Direct SQL command found @@ -940,10 +924,10 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct // Finish SQL statement $sql = substr($sql, 0, -1) . sprintf(" WHERE `%s`=%s AND `%s`='%s' LIMIT 1", - $idColumn, - bigintval($id), - $statusColumn, - $oldStatus + $idColumn, + bigintval($id), + $statusColumn, + $oldStatus ); // Run the SQL @@ -952,31 +936,31 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct // Do we have an URL? if (isset($content['url'])) { // Then add a framekiller test as well - $content['frametester'] = FRAMETESTER($content['url']); + $content['frametester'] = generateFrametesterUrl($content['url']); } // END - if // Send "build mails" out - ADMIN_SEND_BUILD_MAILS($mode, $table, $content, $id, $statusInfo[$content[$column]]); + sendAdminBuildMails($mode, $table, $content, $id, $statusInfo[$content[$column]]); } // END - foreach } // END - if } // Delete rows by given ID numbers -function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn='id', $userIdColumn='userid') { +function adminDeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn='id', $userIdColumn='userid') { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) { // Shall we delete here or list for deletion? - if ($deleteNow) { + if ($deleteNow === true) { // 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 = ''; foreach ($IDs as $id => $sel) { // Is there a userid? - if (REQUEST_ISSET_POST('uid_raw', $id)) { + if (isPostRequestElementSet('userid_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), __FUNCTION__, __LINE__); // Fetch the data @@ -986,7 +970,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu SQL_FREERESULT($result); // Send "build mails" out - ADMIN_SEND_BUILD_MAILS('del', $table, $content, $id); + sendAdminBuildMails('del', $table, $content, $id); } // END - if // Add id number @@ -999,24 +983,24 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu // Was this fine? if (SQL_AFFECTEDROWS() == count($IDs)) { // All deleted - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_REMOVED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_REMOVED')); } else { // Some are still there :( - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs))); } } else { // List for deletion confirmation - ADMIN_BUILD_LIST('del', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); + adminListBuilder('del', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); } } // END - if } // Edit rows by given ID numbers -function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn='id', $userIdColumn='userid') { +function adminEditEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn='id', $userIdColumn='userid') { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) { // Shall we change here or list for editing? - if ($editNow) { + if ($editNow === true) { // Change them all $affected = 0; foreach ($IDs as $id => $sel) { @@ -1024,12 +1008,12 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc $content = array(); // Prepare SQL for this row - $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET", - SQL_ESCAPE($table) + $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}_%s` SET", + SQL_ESCAPE($table) ); - foreach (REQUEST_POST_ARRAY() as $key => $entries) { + foreach (postRequestArray() as $key => $entries) { // Skip raw userid which is always invalid - if ($key == "uid_raw") { + if ($key == 'userid_raw') { // Continue with next field continue; } // END - if @@ -1046,7 +1030,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc } // END - if // Then add this value - $sql .= sprintf(" %s='%s',", + $sql .= sprintf(" `%s`='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]) ); @@ -1056,9 +1040,9 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc } // Do we have an URL? - if ($key == "url") { + if ($key == 'url') { // Then add a framekiller test as well - $content['frametester'] = FRAMETESTER($content[$key]); + $content['frametester'] = generateFrametesterUrl($content[$key]); } // END - if } // END - foreach @@ -1072,67 +1056,66 @@ 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", - array($table, $idColumn, $id), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`=%s LIMIT 1", + array($table, $idColumn, $id), __FUNCTION__, __LINE__); - // Fetch the data - global $DATA; - $DATA = SQL_FETCHARRAY($result); + // Fetch the data and merge it into $content + $content = merge_array($content, SQL_FETCHARRAY($result)); // Free the result SQL_FREERESULT($result); // Send "build mails" out - ADMIN_SEND_BUILD_MAILS('edit', $table, $content, $id); + sendAdminBuildMails('edit', $table, $content, $id); } // END - foreach // Was this fine? if ($affected == count($IDs)) { // All deleted - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_EDITED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_EDITED')); } else { // Some are still there :( - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs))); } } else { // List for editing - ADMIN_BUILD_LIST('edit', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); + adminListBuilder('edit', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); } } // END - if } // Un-/lock rows by given ID numbers -function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn='id', $userIdColumn='userid') { +function adminLockEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn='id', $userIdColumn='userid') { // All valid entries? (We hope so here!) - if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) { + if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (($lockNow === false) || (count($statusArray) == 1))) { // Shall we un-/lock here or list for locking? - if ($lockNow) { + if ($lockNow === true) { // Un-/lock entries - ADMIN_BUILD_STATUS_HANDLER("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray); + adminBuilderStatusHandler("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray); } else { // List for editing - ADMIN_BUILD_LIST("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); + adminListBuilder("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); } } // END - if } // Undelete rows by given ID numbers -function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn='id', $userIdColumn='userid') { +function adminUndeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $undeleteNow=false, $idColumn='id', $userIdColumn='userid') { // All valid entries? (We hope so here!) - if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) { + if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (($undeleteNow === false) || (count($statusArray) == 1))) { // Shall we un-/lock here or list for locking? - if ($lockNow) { + if ($undeleteNow === true) { // Undelete entries - ADMIN_BUILD_STATUS_HANDLER("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray); + adminBuilderStatusHandler("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray); } else { // List for editing - ADMIN_BUILD_LIST("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); + adminListBuilder("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn); } } // END - if } // Checks proxy settins by fetching check-updates3.php from www.mxchange.org -function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) { +function adminTestProxySettings ($settingsArray) { // Set temporary the new settings mergeConfig($settingsArray); @@ -1147,16 +1130,16 @@ function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) { } // Sends out a link to the given email adress so the admin can reset his/her password -function ADMIN_SEND_PASSWORD_RESET_LINK ($email) { +function sendAdminPasswordResetLink ($email) { // Init output $OUT = ''; // Compile out security characters (must be for looking up!) - $email = COMPILE_CODE($email); + $email = compileCode($email); // Look up administator login - $result = SQL_QUERY_ESC("SELECT id, login, password FROM `{!_MYSQL_PREFIX!}_admins` WHERE email='%s' LIMIT 1", - array($email), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `login`, `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `email`='%s' LIMIT 1", + array($email), __FUNCTION__, __LINE__); // Is there an account? if (SQL_NUMROWS($result) == 0) { @@ -1171,14 +1154,14 @@ function ADMIN_SEND_PASSWORD_RESET_LINK ($email) { SQL_FREERESULT($result); // Generate hash for reset link - $content['hash'] = generateHash(URL.':'.$content['id'].':'.$content['login'].':'.$content['password'], substr($content['password'], 10)); + $content['hash'] = generateHash(getConfig('URL').':'.$content['id'].':'.$content['login'].':'.$content['password'], substr($content['password'], 10)); // Remove some data unset($content['id']); unset($content['password']); // Prepare email - $mailText = LOAD_EMAIL_TEMPLATE("admin_reset_password", $content); + $mailText = loadEmailTemplate('admin_reset_password', $content); // Send it out sendEmail($email, getMessage('ADMIN_RESET_PASS_LINK_SUBJ'), $mailText); @@ -1188,15 +1171,15 @@ function ADMIN_SEND_PASSWORD_RESET_LINK ($email) { } // Validate hash and login for password reset -function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) { +function adminResetValidateHashLogin ($hash, $login) { // By default nothing validates... ;) $valid = false; // Compile the login for lookup - $login = COMPILE_CODE($login); + $login = compileCode($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), __FUNCTION__, __LINE__); // Is an account here? @@ -1205,7 +1188,7 @@ function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) { $content = SQL_FETCHARRAY($result); // Generate hash again - $hashFromData = generateHash(URL.':'.$content['id'].':'.$login.':'.$content['password'], substr($content['password'], 10)); + $hashFromData = generateHash(getConfig('URL').':'.$content['id'].':'.$login.':'.$content['password'], substr($content['password'], 10)); // Does both match? $valid = ($hash == $hashFromData); @@ -1219,12 +1202,12 @@ function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) { } // Reset the password for the login. Do NOT call this function without calling above function first! -function ADMIN_RESET_PASSWORD ($login, $password) { +function doResetAdminPassword ($login, $password) { // Init hash $passHash = ''; // Now check if we have sql_patches installed - if (GET_EXT_VERSION('sql_patches') >= '0.3.6') { + if (getExtensionVersion('sql_patches') >= '0.3.6') { // Use new way of hashing $passHash = generateHash($password); } else { @@ -1233,43 +1216,49 @@ function ADMIN_RESET_PASSWORD ($login, $password) { } // Update database - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE login='%s' LIMIT 1", - array($passHash, $login), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `password`='%s' WHERE `login`='%s' LIMIT 1", + array($passHash, $login), __FUNCTION__, __LINE__); // Run filters runFilterChain('post_admin_reset_pass', array('login' => $login, 'hash' => $passHash)); // Return output - return ADMIN_PASSWORD_RESET_DONE; + return getMessage('ADMIN_PASSWORD_RESET_DONE'); } // Solves a task by given id number -function ADMIN_SOLVE_TASK ($id) { +function adminSolveTask ($id) { // Update the task data - ADMIN_UPDATE_TASK_DATA($id, 'status', "SOLVED"); + adminUpdateTaskData($id, 'status', 'SOLVED'); } // Marks a given task as deleted -function ADMIN_DELETE_TASK ($id) { +function adminDeleteTask ($id) { // Update the task data - ADMIN_UPDATE_TASK_DATA($id, 'status', "DELETED"); + adminUpdateTaskData($id, 'status', 'DELETED'); } // Function to update task data -function ADMIN_UPDATE_TASK_DATA ($id, $row, $data) { +function adminUpdateTaskData ($id, $row, $data) { + // Should be admin! + if (!isAdmin()) { + // Not an admin so redirect better + redirectToUrl('index.php'); + } // END - if + // Is the id not set, then we need a backtrace here... :( if ($id <= 0) { // Initiate backtrace debug_report_bug(sprintf("id is invalid: %s. row=%s, data=%s", - $id, - $row, - $data + $id, + $row, + $data )); } // END - if // Update the task - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET %s='%s' WHERE `id`=%s LIMIT 1", - array($row, $data, bigintval($id)), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `%s`='%s' WHERE `id`=%s LIMIT 1", + array($row, $data, bigintval($id)), __FUNCTION__, __LINE__); } // Checks wether if the admin menu has entries @@ -1291,16 +1280,16 @@ function setAdminMenuHasEntries ($action, $hasEntries) { } // Creates a link to the user's admin-profile -function ADMIN_CREATE_USERID_LINK ($uid) { +function adminCreateUserLink ($userid) { // Is the userid set correctly? - if ($uid > 0) { + if ($userid > 0) { // Create a link to that profile - return '{?URL?}/modules.php?module=admin&what=list_user&uid='.bigintval($uid); + return '{?URL?}/modules.php?module=admin&what=list_user&userid='.bigintval($userid); } // END - if // Return a link to the user list return '{?URL?}/modules.php?module=admin&what=list_user'; } -// +// [EOF] ?> diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 97b4ce5437..0870dccdc8 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,18 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } -function OUTPUT_STANDARD_OVERVIEW (&$result_tasks) { +// @TODO This function does also check for uncompleted tasks +function outputStandardOverview (&$result_tasks) { // 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(getCurrentAdminId()), __FILE__, __LINE__); // We currently don't want to install an extension so let's find out if we need... - $EXT_LOAD_MODE = 'register'; + setExtensionMode('register'); $jobsDone = true; // Open the extension directory @@ -66,35 +66,38 @@ function OUTPUT_STANDARD_OVERVIEW (&$result_tasks) { $result = false; // Check if extension is installed or not - $ext_ver = GET_EXT_VERSION($ext_name); - //* DEBUG: */ OUTPUT_HTML($ext_name."=".$ext_ver."<br />"); + $extInstalled = (isExtensionInstalled($ext_name) && (isExtensionActive($ext_name))); // Is the extension not yet installed? - if (empty($ext_ver)) { + if ($extInstalled === false) { // Generate subject line $ext_subj = sprintf("[%s:]", $ext_name); // We maybe want to install an extension so let's test-drive it... - if (LOAD_EXTENSION($ext_name, $EXT_LOAD_MODE)) { + if (loadExtension($ext_name, getExtensionMode(), '', true)) { // Create a task for newly installed extension - CREATE_NEW_EXTENSION_TASK(getCurrentAdminId(), $ext_subj, $ext_name); + createNewExtensionTask(getCurrentAdminId(), $ext_subj, $ext_name); } // END - if } else { // Test-drive extension in update mode - require(sprintf("%sinc/extensions/ext-%s.php", getConfig('PATH'), $ext_name)); + loadExtension($ext_name, 'test'); + + // Get extension version + $ext_ver = getExtensionVersion($ext_name); + //* DEBUG: */ outputHtml($ext_name."=".$ext_ver."<br />"); // Update extension if extension is installed and outdated - //* DEBUG: */ OUTPUT_HTML("ext={$ext_name},ver={EXT_GET_VERSION()}/".GET_EXT_VERSION($ext_name)."<br />"); - if (EXT_GET_VERSION() > $ext_ver) { + //* DEBUG: */ outputHtml("ext={$ext_name},ver={getThisExtensionVersion()}/".getExtensionVersion($ext_name)."<br />"); + if (getThisExtensionVersion() > $ext_ver) { // Update the extension - EXTENSION_UPDATE($ext_name, $ext_ver); + updateExtension($ext_name, $ext_ver); } // END - if if (isset($GLOBALS['cache_array']['active_extensions'][$ext_name])) { // Maybe we want to keept the current extension active? - if (($GLOBALS['cache_array']['active_extensions'][$ext_name] == 'Y') && (!EXT_IS_ACTIVE($ext_name))) { + if (($GLOBALS['cache_array']['active_extensions'][$ext_name] == 'Y') && (!isExtensionActive($ext_name))) { // Reactivate this extension! - ACTIVATE_EXTENSION($ext_name); + doActivateExtension($ext_name); } // END - if } // END - if } @@ -102,11 +105,18 @@ function OUTPUT_STANDARD_OVERVIEW (&$result_tasks) { } // END - foreach // 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` -WHERE `assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW') -ORDER BY `userid` DESC, `task_type` DESC, `subject` ASC, `task_created` DESC", - array(getCurrentAdminId()), __FILE__, __LINE__); + $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 + `userid` DESC, + `task_type` DESC, + `subject` ASC, + `task_created` DESC", + array(getCurrentAdminId()), __FILE__, __LINE__); if (SQL_NUMROWS($result_tasks) > 0) { // New jobs found! @@ -121,25 +131,28 @@ ORDER BY `userid` DESC, `task_type` DESC, `subject` ASC, `task_created` DESC", } // Outputs selected tasks -function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) { - if ((isset($POST['assign'])) && (count($POST['task']) > 0)) { +function outputSeletectedTasks ($postData, $result_tasks) { + if ((isset($postData['assign'])) && (count($postData['task']) > 0)) { // 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')) + foreach ($postData['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", array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); // Task is found? if (SQL_NUMROWS($result_task) == 1) { // Task is valid... - list($tid, $uid, $type, $subj, $text, $created, $status, $aid) = SQL_FETCHROW($result_task); + list($tid, $userid, $type, $subj, $text, $created, $status, $adminId) = SQL_FETCHROW($result_task); - if ($aid == '0') { + if ($adminId == '0') { // Assgin current admin to unassgigned task - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1", array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__); } // END - if @@ -152,20 +165,22 @@ LIMIT 1", } // END - if // Is a userid assign? - if ($uid > 0) { + if ($userid > 0) { // Then load his data! // @TODO Can this SQL be encapsulated in a function, so all similar queries can be rewritten? - $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__); + $result_user = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result_user) == 1) { - list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user); - $add = "<li>{--ADMIN_MEMBER_UID--}: <strong>".generateUserProfileLink($uid, 'user_data')." (<a href=\"".generateEmailLink($email, 'user_data')."\">".translateGender($gender)." ".$sname." ".$fname."</a>)</strong></li>"; + // Fetch row + $content = SQL_FETCHARRAY($result_user); + // Generate HTML list entry + $add = "<li>{--ADMIN_MEMBER_UID--}: <strong>".generateUserProfileLink($userid, 'user_data')." (<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender'])." ".$content['surname']." ".$content['family']."</a>)</strong></li>"; } else { // Invalid userid, so log and zero it - DEBUG_LOG(__FUNCTION__, __LINE__, 'Invalid userid=' . $uid . '-> Not found!'); - $uid = 0; + logDebugMessage(__FUNCTION__, __LINE__, 'Invalid userid=' . $userid . ' -> not found!'); + $userid = 0; } // Free result @@ -176,28 +191,27 @@ LIMIT 1", $text = decodeEntities($text); // Compile and insert text from task into table template - $text = LOAD_TEMPLATE('admin_extensions_text', true, $text); + $text = loadTemplate('admin_extensions_text', true, $text); // Initialize variables (no title for SQL commands by default) $ext_name = ''; $ext_ver = ''; $title = getMessage('TASK_NO_TITLE'); // Shall I list SQL commands assigned to an extension installation or update task? - // OLD WAY: if (((GET_EXT_VERSION('sql_patches') != '') && (getConfig('verbose_sql') == 'Y')) || (!EXT_IS_ACTIVE('sql_patches'))) { if ((getConfig('verbose_sql') == 'Y')) { // Extract extension name from subject $ext_name = substr($subj, 1, strpos($subj, ':') - 1); // Update task or extension task? - if ($type == 'EXTENSION') { - // @TODO Should we init sql_notes here or inside REGISTER_EXTENSION()? - EXT_INIT_NOTES(); - + if (($type == 'EXTENSION') && (!isExtensionInstalled($ext_name))) { // Load SQL commands for registering - REGISTER_EXTENSION($ext_name, $id, true); + registerExtension($ext_name, $id, true); + + // Set current extension name + setCurrentExtensionName($ext_name); // Add notes to text - $text .= EXT_GET_NOTES(); + $text .= getExtensionNotes(); // Set title $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REGISTER'); @@ -210,10 +224,13 @@ LIMIT 1", $ext_ver = substr($ext_ver, 0, strpos($ext_ver, ':')); // Load SQLs from file - EXTENSION_UPDATE($ext_name, $ext_ver, true); + updateExtension($ext_name, $ext_ver, true); + + // Set current extension name + setCurrentExtensionName($ext_name); // Add notes to text - $text .= EXT_GET_NOTES(); + $text .= getExtensionNotes(); // Set title $title = getMessage('ADMIN_SQLS_EXECUTED_ON_UPDATE'); @@ -222,21 +239,23 @@ LIMIT 1", $ext_name = ''; } - // Auto-init SQL handler - if (!IS_SQLS_VALID()) INIT_SQLS(); - // Add SQLs to a table - if ((!empty($ext_name)) && (GET_EXT_VERSION('sql_patches')) && (getConfig('verbose_sql') == 'Y')) { + if ((!empty($ext_name)) && (getExtensionVersion('sql_patches')) && (getConfig('verbose_sql') == 'Y')) { // Add verbose SQL table - $text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, '100%')."<br />\n"; + $text .= addExtensionVerboseSqlTable($title, " class=\"admin_table top2 left2 right2\"", true, '100%') . "<br />\n"; } // END - if } elseif ((!empty($ext_name)) && (!empty($ext_ver))) { // Run SQL commands in dry mode but only return the notes - EXTENSION_UPDATE($ext_name, $ext_ver, true); - $text .= EXT_GET_NOTES(); + updateExtension($ext_name, $ext_ver, true); + + // Set current extension name + setCurrentExtensionName($ext_name); + + // Get notes + $text .= getExtensionNotes(); } else { // This should not normally happen! - debug_report_bug('ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . GET_EXT_VERSION('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql')); + debug_report_bug('ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . getExtensionVersion('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql')); } // Prepare array for the template @@ -250,29 +269,29 @@ LIMIT 1", ); // Load template - $OUT .= LOAD_TEMPLATE('admin_overview_row', true, $content); + $OUT .= loadTemplate('admin_overview_row', true, $content); // Which task do we actually have here? // @TODO Rewrite this to something with include files switch ($type) { 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", - array($ext_name), __FILE__, __LINE__); + $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); if ($lines == '0') { // New extension found - $OUT .= LOAD_TEMPLATE('admin_ext_reg_form', true, array( - 'id' => bigintval($id), - 'ext_name' => $ext_name + $OUT .= loadTemplate('admin_ext_reg_form', true, array( + 'id' => bigintval($id), + 'ext_name' => $ext_name )); } else { // Task is closed so nothing is todo $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n"; // Close task but not already closes or deleted or update tasks - if (($status != 'CLOSED') && ($status != 'DELETED') && ($type != 'EXTENSION_UPDATE')) { + if ((!in_array($status, array('CLOSED','DELETED','SOLVED'))) && ($type != 'EXTENSION_UPDATE')) { // Solve the task runFilterChain('solve_task', $tid); } // END - if @@ -294,89 +313,70 @@ LIMIT 1", // @TODO This may also be rewritten to include files switch ($mode) { default: // @TODO Unknown support mode - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode)); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode)); $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n"; break; } break; - 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", - array(bigintval($uid), bigintval($created)), __FILE__, __LINE__); - list($pid) = SQL_FETCHROW($result_pay); - SQL_FREERESULT($result_pay); - - if ((!empty($pid)) && ($pid > 0)) { - // Payout ID can be obtained - $content = array( - 'pid' => $pid, - 'tid' => $tid, - ); - $OUT .= LOAD_TEMPLATE('admin_payout_overview_form', true, $content); - } else { - // Problem obtaining payout ID - $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n"; - } - } else { - // Extension is not installed - $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n"; - } - break; - - 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", - array(bigintval($uid), bigintval($created)), __FILE__, __LINE__); - list($pid) = SQL_FETCHROW($result_pay); - SQL_FREERESULT($result_pay); - - if ((!empty($pid)) && ($pid > 0)) { - // Payout ID can be obtained - $content = array( - 'pid' => $pid, - 'tid' => $tid, - ); - $OUT .= LOAD_TEMPLATE('admin_wernis_overview_form', true, $content); - } else { - // Problem obtaining wernis ID - $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n"; - } - } else { - // Extension is not installed - $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n"; - } - break; - - case 'HOLIDAY_REQUEST': // Holiday requests - $OUT .= LOAD_TEMPLATE('admin_task_holiday', true, $uid); - break; - - case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions - $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); - - if ($span > 0) { - // Undone unscubscribe request - $content = array( - 'uid' => $uid, - 'id' => $tid - ); - $OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content); - } else { - // Already unsubscribed - $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_NL_UNSUBSCRIBE_ALREADY--}</div>\n"; - } - break; - - default: // Unknown task type - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type)); - $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n"; - break; + case 'PAYOUT_REQUEST': // Payout requests + if (isExtensionActive('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", + array(bigintval($userid), bigintval($created)), __FILE__, __LINE__); + list($pid) = SQL_FETCHROW($result_pay); + SQL_FREERESULT($result_pay); + + if ((!empty($pid)) && ($pid > 0)) { + // Payout ID can be obtained + $content = array( + 'pid' => $pid, + 'tid' => $tid, + ); + $OUT .= loadTemplate('admin_payout_overview_form', true, $content); + } else { + // Problem obtaining payout ID + $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n"; + } + } else { + // Extension is not installed + $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n"; + } + break; + + case 'WERNIS_REQUEST': // Wernis requests + if (isExtensionActive('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", + array(bigintval($userid), bigintval($created)), __FILE__, __LINE__); + list($pid) = SQL_FETCHROW($result_pay); + SQL_FREERESULT($result_pay); + + if ((!empty($pid)) && ($pid > 0)) { + // Payout ID can be obtained + $content = array( + 'pid' => $pid, + 'tid' => $tid, + ); + $OUT .= loadTemplate('admin_wernis_overview_form', true, $content); + } else { + // Problem obtaining wernis ID + $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n"; + } + } else { + // Extension is not installed + $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n"; + } + break; + + case 'HOLIDAY_REQUEST': // Holiday requests + $OUT .= loadTemplate('admin_task_holiday', true, $userid); + break; + + default: // Unknown task type + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type)); + $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n"; + break; } $OUT .= " </td> <td width=\"1%\" class=\"switch_sw".$SW." bottom2 right2\"> </td> @@ -389,30 +389,32 @@ LIMIT 1", // Switch colors $SW = 3 - $SW; } // END - foreach - define('__TASK_ROWS', $OUT); // Load final template - LOAD_TEMPLATE('admin_overview_list'); + loadTemplate('admin_overview_list', false, $OUT); } else { - if ((isset($POST['task'])) && ((count($POST['task']) > 0) || ($POST['task'][0] == '1'))) { + if ((isset($postData['task'])) && ((count($postData['task']) > 0) || ($postData['task'][0] == '1'))) { // Only unassign / delete tasks when there are selected tasks posted - if (!empty($POST['unassign'])) { + if (!empty($postData['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", - array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); + foreach ($postData['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", + array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } - } elseif (isset($POST['del'])) { + } elseif (isset($postData['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", - array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); + foreach ($postData['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", + array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } + } else { + // Unknown action + debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, true))); } // 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", - array(getCurrentAdminId()), __FILE__, __LINE__); + $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(getCurrentAdminId()), __FILE__, __LINE__); } // END - if // There are uncompleted jobs! @@ -444,34 +446,34 @@ LIMIT 1", } // Prepare content - // @TODO Rewritings: admin->assigned_admin,uid->userid,type->task_type_msg in template $content = merge_array($content, array( - 'sw' => $SW, - 'admin' => $content['assigned_admin'], - 'uid' => $content['userid'], - 'type' => $content['task_type_msg'], - 'created' => generateDateTime($content['task_created'], '2') + 'sw' => $SW, + 'assigned_admin' => $content['assigned_admin'], + 'userid' => $content['userid'], + 'task_type_msg' => $content['task_type_msg'], + 'created' => generateDateTime($content['task_created'], '2') )); // Do we have extension task? - if (($content['task_type'] == 'EXTENSION') && (GET_EXT_VERSION($content['infos']) == '')) { + if (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos']))) { // Load extension row template - $OUT .= LOAD_TEMPLATE("admin_overview_list_ext_rows", true, $content); + $OUT .= loadTemplate('admin_overview_list_ext_rows', true, $content); } else { // Load default row template - $OUT .= LOAD_TEMPLATE("admin_overview_list_rows", true, $content); + $OUT .= loadTemplate('admin_overview_list_rows', true, $content); } // Switch color $SW = 3 - $SW; - } + } // END - while // Free memory SQL_FREERESULT($result_tasks); // Load footer template - LOAD_TEMPLATE("admin_overview_table", false, $OUT); + loadTemplate('admin_overview_table', false, $OUT); } } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what- b/inc/modules/admin/what- index 02dbe0967e..ee740024aa 100644 --- a/inc/modules/admin/what- +++ b/inc/modules/admin/what- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!is_admin())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_bank_package.php b/inc/modules/admin/what-add_bank_package.php index 7eebf556a9..7c0d339aed 100644 --- a/inc/modules/admin/what-add_bank_package.php +++ b/inc/modules/admin/what-add_bank_package.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is the formular sent? if (isFormSent()) { // Save the row to the database - ADMIN_SAVE_SETTINGS(REQUEST_POST_ARRAY(), "_bank_packages", '', array("account_fee", "interest_plus", "interest_minus", "first_payment"), true); + adminSaveSettingsFromPostData('_bank_packages', '', array('account_fee', 'interest_plus', 'interest_minus', 'first_payment'), true); } else { // Display form - LOAD_TEMPLATE("admin_add_bank_package"); + loadTemplate('admin_add_bank_package'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_guestnl_cat.php b/inc/modules/admin/what-add_guestnl_cat.php index efdd811f68..c231acb6bb 100644 --- a/inc/modules/admin/what-add_guestnl_cat.php +++ b/inc/modules/admin/what-add_guestnl_cat.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,20 +37,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { - // Check if category does already exist + // @TODO Check if category does already exist + debug_report_bug('Unfinished area!'); } else { // Display form - LOAD_TEMPLATE("admin_add_guestnl_cat"); + loadTemplate('admin_add_guestnl_cat'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index e446473121..73534797b8 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,43 +37,39 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); - -// Fix a notice -if (!REQUEST_ISSET_GET('uid')) REQUEST_SET_GET('uid', ''); +addMenuDescription('admin', __FILE__); -if (REQUEST_GET('uid') == "all") { +if (getRequestElement('userid') == 'all') { // Add points to all accounts - if ((isFormSent()) && (REQUEST_POST('points') > 0)) { - // @TODO Rewrite this constant - define('__POINTS_VALUE', REQUEST_POST('points')); + if ((isFormSent()) && (postRequestElement('points') > 0)) { + // Points + $content['points'] = bigintval(postRequestElement('points')); // Select all users - $result_main = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", - __FILE__, __LINE__); + $result_main = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", + __FILE__, __LINE__); // Process all entries - while ($content = SQL_FETCHARRAY($result_main)) { + while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) { // Remove depth to prevent booking errors. This is a bad coding // practice, thats also why we need to write this project from // scratch... $GLOBALS['ref_level'] = -1; // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM_DIRECT('admin_all', $content['userid'], bigintval(REQUEST_POST('points'))); + addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestElement('points'))); // Prepare content - $content['text'] = SQL_ESCAPE(REQUEST_POST('reason')); - $content['points'] = bigintval(REQUEST_POST('points')); + $content['text'] = SQL_ESCAPE(postRequestElement('reason')); + $content['points'] = bigintval(postRequestElement('points')); // Load email template and send email away - $message = LOAD_EMAIL_TEMPLATE('add-points', $content, bigintval($content['userid'])); + $message = loadEmailTemplate('add-points', $content, bigintval($content['userid'])); sendEmail(bigintval($content['userid']), getMessage('ADMIN_ADD_SUBJ'), $message); } // END - while @@ -81,57 +77,53 @@ if (REQUEST_GET('uid') == "all") { SQL_FREERESULT($result_main); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_ADDED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_ADDED')); } else { // Display form add points - LOAD_TEMPLATE('admin_add_points_all'); + loadTemplate('admin_add_points_all'); } -} elseif (REQUEST_ISSET_GET('uid')) { +} elseif (isGetRequestElementSet('userid')) { // 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", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Selected user does exist - list($sname, $fname, $email) = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result); - if ((isFormSent()) && (REQUEST_ISSET_POST(('points')))) { - // Remove depth to prevent booking errors. This is a bad coding - // practice, thats also why we need to write this project from - // scratch... - unset($GLOBALS['ref_level']); - - // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM_DIRECT('admin_single', bigintval(REQUEST_GET('uid')), bigintval(REQUEST_POST('points'))); + if ((isFormSent()) && (isPostRequestElementSet(('points')))) { + // Add points and send an email to him... + addPointsDirectly('admin_single', bigintval(getRequestElement('userid')), bigintval(postRequestElement('points'))); // Prepare content $content = array( - 'text' => SQL_ESCAPE(REQUEST_POST('reason')), - 'points' => bigintval(REQUEST_POST('points')) + 'text' => SQL_ESCAPE(postRequestElement('reason')), + 'points' => bigintval(postRequestElement('points')) ); // Message laden - $message = LOAD_EMAIL_TEMPLATE("add-points", $content, bigintval(REQUEST_GET('uid'))); + $message = loadEmailTemplate('add-points', $content, bigintval(getRequestElement('userid'))); - sendEmail(bigintval(REQUEST_GET('uid')), getMessage('ADMIN_ADD_SUBJ'), $message); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED')); + sendEmail(bigintval(getRequestElement('userid')), getMessage('ADMIN_ADD_SUBJ'), $message); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED')); } else { - // Opps, missing form here - // @TODO Rewrite these both constants - define('__USER_VALUE', "<a href=\"".generateEmailLink($email, 'user_data')."\">".$sname." ".$fname."</a>"); - define('__UID' , bigintval(REQUEST_GET('uid'))); - LOAD_TEMPLATE('admin_add_points'); + // Prepare content + $content['user'] = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>"; + $content['userid'] = bigintval(getRequestElement('userid')); + + // Output template + loadTemplate('admin_add_points', false, $content); } } else { // User not found! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } // Free result SQL_FREERESULT($result); } else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX('0', true); + addMemberSelectionBox('0', true); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index 4ad03f5172..ef37b45341 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,42 +37,41 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Generate timestamps - $START = mktime(REQUEST_POST('start_hour'), REQUEST_POST('start_min'), REQUEST_POST('start_sec'), REQUEST_POST('start_month'), REQUEST_POST('start_day'), REQUEST_POST('start_year')); - $END = mktime(REQUEST_POST('end_hour') , REQUEST_POST('end_min') , REQUEST_POST('end_sec') , REQUEST_POST('end_month') , REQUEST_POST('end_day') , REQUEST_POST('end_year') ); + $START = mktime(postRequestElement('start_hour'), postRequestElement('start_min'), postRequestElement('start_sec'), postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); + $END = mktime(postRequestElement('end_hour') , postRequestElement('end_min') , postRequestElement('end_sec') , postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); // Is there already a rallye running? - $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", + $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( getCurrentAdminId(), - REQUEST_POST('title'), - REQUEST_POST('descr'), - REQUEST_POST('template'), + postRequestElement('title'), + postRequestElement('descr'), + postRequestElement('template'), $START, $END, - REQUEST_POST('auto_add'), - REQUEST_POST('active'), - REQUEST_POST('notify'), + postRequestElement('auto_add'), + postRequestElement('active'), + postRequestElement('notify'), ), __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", - array($START, $END, REQUEST_POST('title')), __FILE__, __LINE__); + $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, postRequestElement('title')), __FILE__, __LINE__); list($id) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -81,48 +80,48 @@ VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", redirectToUrl('modules.php?module=admin&what=config_rallye_prices&rallye='.$id); } else { // Problem detected... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PROBLEM_CREATE')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PROBLEM_CREATE')); } } else { // Free memory SQL_FREERESULT($result); // Overlapping detected - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_OVERLAP_TIMES')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_OVERLAP_TIMES')); } } // Prepare some constants for the template -define('_AUTO_ADD_OPTIONS', generateOptionList('/ARRAY/', array('Y','N'), array(YES, NO ))); -define('_ACTIVE_OPTIONS' , generateOptionList('/ARRAY/', array('N','Y'), array(NO , YES))); -define('_NOTIFY_OPTIONS' , generateOptionList('/ARRAY/', array('Y','N'), array(YES, NO ))); +$content['auto_add_options'] = generateOptionList('/ARRAY/', array('Y','N'), array(getMessage('YES'), getMessage('NO') )); +$content['active_options'] = generateOptionList('/ARRAY/', array('N','Y'), array(getMessage('NO') , getMessage('YES'))); +$content['notify_options'] = generateOptionList('/ARRAY/', array('Y','N'), array(getMessage('YES'), getMessage('NO') )); // Starting day -define('_START_SEC' , ADD_SELECTION('sec' , '0' , 'start')); -define('_START_MIN' , ADD_SELECTION('min' , '0' , 'start')); -define('_START_HOUR' , ADD_SELECTION('hour' , date('G', time()), 'start')); -define('_START_DAY' , ADD_SELECTION('day' , date('d', time()), 'start')); -define('_START_MONTH', ADD_SELECTION('month', date('m', time()), 'start')); -define('_START_YEAR' , ADD_SELECTION('year' , date('Y', time()), 'start')); +$content['start_sec'] = addSelectionBox('sec' , '0' , 'start'); +$content['start_min'] = addSelectionBox('min' , '0' , 'start'); +$content['start_hour'] = addSelectionBox('hour' , date('G', time()), 'start'); +$content['start_day'] = addSelectionBox('day' , date('d', time()), 'start'); +$content['start_month'] = addSelectionBox('month', date('m', time()), 'start'); +$content['start_year'] = addSelectionBox('year' , date('Y', time()), 'start'); // Calcualte ending date -$D = date('d', time() + (getConfig('one_day') * 7)); -$M = date('m', time() + (getConfig('one_day') * 7)); -$Y = date('Y', time() + (getConfig('one_day') * 7)); +$D = date('d', time() + (getConfig('ONE_DAY') * 7)); +$M = date('m', time() + (getConfig('ONE_DAY') * 7)); +$Y = date('Y', time() + (getConfig('ONE_DAY') * 7)); // Ending day -define('_END_SEC' , ADD_SELECTION('sec' , '0' , 'end')); -define('_END_MIN' , ADD_SELECTION('min' , '0' , 'end')); -define('_END_HOUR' , ADD_SELECTION('hour' , date('G', time()), 'end')); -define('_END_DAY' , ADD_SELECTION('day' , $D , 'end')); -define('_END_MONTH', ADD_SELECTION('month', $M , 'end')); -define('_END_YEAR' , ADD_SELECTION('year' , $Y , 'end')); +$content['end_sec'] = addSelectionBox('sec' , '0' , 'end'); +$content['end_min'] = addSelectionBox('min' , '0' , 'end'); +$content['end_hour'] = addSelectionBox('hour' , date('G', time()), 'end'); +$content['end_day'] = addSelectionBox('day' , $D , 'end'); +$content['end_month'] = addSelectionBox('month', $M , 'end'); +$content['end_year'] = addSelectionBox('year' , $Y , 'end'); // Transfer (maybe found) templates into constant for the template -define('_TEMPLATES', RALLYE_TEMPLATE_SELECTION()); +$content['templates_selection'] = addReferalRallyeTemplateSelection(); // Load template -LOAD_TEMPLATE('admin_add_rallye'); +loadTemplate('admin_add_rallye', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_sponsor.php b/inc/modules/admin/what-add_sponsor.php index 4254a691b9..74843375c6 100644 --- a/inc/modules/admin/what-add_sponsor.php +++ b/inc/modules/admin/what-add_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save sponsor in database - SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY()); + handlSponsorRequest(postRequestArray()); } else { - // Prepare constants for the template - define('__SPONSOR_MIN_VALUE', getConfig('sponsor_min_points')); - // Output form - LOAD_TEMPLATE("admin_add_sponsor"); + loadTemplate('admin_add_sponsor'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index e0cd01575d..05a904508e 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,33 +37,32 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Was an URL added? -if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('url'))) { +if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('url'))) { // Initialize variables $DATA = array(); $id = 'reload_ye'; $skip = false; - $POST = REQUEST_POST_ARRAY(); + $postData = postRequestArray(); // Convert the "reload selections" - // @TODO Find all convertSelectionsToTimestamp() calls and rewrite REQUEST_POST() calls to $POST - convertSelectionsToTimestamp($POST, $DATA, $id, $skip); + // @TODO Find all convertSelectionsToTimestamp() calls and rewrite postRequestElement() calls to $postData + convertSelectionsToTimestamp($postData, $DATA, $id, $skip); // Then add this URL - if (SURFBAR_ADMIN_ADD_URL($POST['url'], $POST['limit'], $POST['reload'])) { + if (SURFBAR_ADMIN_ADD_URL($postData['url'], $postData['limit'], $postData['reload'])) { // URL was added - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_ADDED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_ADDED')); } else { // Not added - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_NOT_ADDED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_NOT_ADDED')); } } // END - if @@ -73,7 +72,7 @@ $content = array( ); // Load template -LOAD_TEMPLATE('admin_add_surfbar_url', false, $content); +loadTemplate('admin_add_surfbar_url', false, $content); // ?> diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index d99ec7e678..ef768ff913 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,26 +37,24 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!REQUEST_ISSET_POST('title')) || (!REQUEST_ISSET_POST(('menu'))) || (!REQUEST_ISSET_POST(('descr')))) && (isFormSent())) { - REQUEST_UNSET_POST('ok'); +if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet(('menu'))) || (!isPostRequestElementSet(('descr')))) && (isFormSent())) { + unsetPostRequestElement('ok'); } // END - if -if (!isFormSent()) -{ +if (!isFormSent()) { // Create arrays $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 // @TODO Cant this be rewritten? @@ -94,7 +92,7 @@ if (!isFormSent()) // 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) { // Init arrays @@ -156,43 +154,42 @@ if (!isFormSent()) } $OUT .= "</select>"; - define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('admin', 'what', "name")); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('admin', 'action', "menu")); + // Prepare selections for template + $content['below_selection'] = $OUT; + $content['what_selection'] = adminAddMenuSelectionBox('member', 'what' , 'name'); + $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu'); // Display form - LOAD_TEMPLATE("admin_admin_add"); -} elseif (!IS_DEMO()) { + loadTemplate('admin_admin_add', false, $content); +} elseif (!isDemoModeActive()) { // Insert new menu entry - if (REQUEST_ISSET_POST(('menu'))) { + if (isPostRequestElementSet(('menu'))) { // Add sub menu - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", - array( - REQUEST_POST('menu'), - REQUEST_POST('name'), - REQUEST_POST('title'), - REQUEST_POST('descr'), - bigintval(REQUEST_POST('sort')), - ), __FILE__, __LINE__ + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", + array( + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('descr'), + bigintval(postRequestElement('sort')), + ), __FILE__, __LINE__ ); - cachePurgeAdminMenu(0, REQUEST_POST('menu'), REQUEST_POST('name')); } else { // Add main menu - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", - array( - REQUEST_POST('name'), - REQUEST_POST('title'), - REQUEST_POST('descr'), - bigintval(REQUEST_POST('sort')), - ), __FILE__, __LINE__ + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", + array( + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('descr'), + bigintval(postRequestElement('sort')), + ), __FILE__, __LINE__ ); - cachePurgeAdminMenu(0, REQUEST_POST('name')); } - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } else { // Is demo login! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 8d6aa9f0e1..ab7fe8bd2c 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,253 +37,254 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (REQUEST_ISSET_GET('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub')); - $SUB = REQUEST_GET('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); + $SUB = getRequestElement('sub'); } // END - if // Get count of (maybe) selected menu points $chk = 0; -if (REQUEST_ISSET_POST('sel')) $chk = countPostSelection(); +if (isPostRequestElementSet('sel')) $chk = countPostSelection(); // List all menu points and make them editable -if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { +if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Edit menu entries // @TODO Kill all constants in this file - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $cnt = 0; $SW = 2; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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", - array(bigintval($sel)), __FILE__, __LINE__); + $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) { // Entry found so we load the stuff... - list($menu, $act, $wht, $descr) = SQL_FETCHROW($result); - SQL_FREERESULT($result); + $data = SQL_FETCHARRAY($result); // Prepare data for the row template - $content = array( - 'action' => ADMIN_MAKE_MENU_SELECTION('admin', 'action', 'sel_action[' . $sel . ']', $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('admin', 'what', 'sel_what[' . $sel . ']', $wht), + $data = array( + 'action' => adminAddMenuSelectionBox('admin', 'action', 'sel_action[' . $sel . ']', $data['action']), + 'what' => adminAddMenuSelectionBox('admin', 'what' , 'sel_what[' . $sel . ']', $data['what']), 'sw' => $SW, 'sel' => $sel, - 'menu' => $menu, - 'descr' => $descr, + 'menu' => $data['title'], + 'descr' => $data['descr'], 'cnt' => $cnt, ); - $OUT .= LOAD_TEMPLATE('admin_amenu_edit_row', true, $content); + + // Load row template + $OUT .= loadTemplate('admin_amenu_edit_row', true, $data); } else { // Entry not found? - $content = array( + $data = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + + // Load row template + $OUT .= loadTemplate('admin_menu_404_row', true, $data); } + + // Free result and switch color + SQL_FREERESULT($result); $SW = 3 - $SW; } // END - if } // END - foreach - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_amenu_edit_form'); -} elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) { - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + loadTemplate('admin_amenu_edit_form', false, $content); +} elseif ((isPostRequestElementSet('del')) && (!isDemoModeActive())) { + // Prepare misc content + $content['sub'] = $SUB; + $content['chk'] = $chk; + // Del menu entries with or without confirmation $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; - $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", - array(bigintval($sel)), __FILE__, __LINE__); + $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) { // Entry found so we load the stuff... - list($menu) = SQL_FETCHROW($result); - SQL_FREERESULT($result); + $data = SQL_FETCHARRAY($result); // Prepare data for the row template - $content = array( - 'menu' => $menu, + $data = array( + 'menu' => $data['title'], 'cnt' => $cnt, 'sel' => $sel, 'sw' => $SW ); - $OUT .= LOAD_TEMPLATE('admin_amenu_delete_row', true, $content); + $OUT .= loadTemplate('admin_amenu_delete_row', true, $data); } else { // Entry not found? - $content = array( + $data = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $data); } + SQL_FREERESULT($result); $SW = 3 - $SW; } } - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_amenu_delete'); -} elseif ((isFormSent()) && (!IS_DEMO())) { + loadTemplate('admin_amenu_delete', false, $content); +} elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... - switch (REQUEST_POST('ok')) { + switch (postRequestElement('ok')) { case 'edit': // Edit menu - foreach (REQUEST_POST('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { // Secure ID $sel = bigintval($sel); // Update entry - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET -title='%s', + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET +`title`='%s', `action`='%s', `what`='%s', -descr='%s' +`descr`='%s' WHERE ".$AND." AND id=%s LIMIT 1", array( $menu, - REQUEST_POST('sel_action', $sel), - REQUEST_POST('sel_what', $sel), - REQUEST_POST('sel_desc', $sel), + postRequestElement('sel_action', $sel), + postRequestElement('sel_what', $sel), + postRequestElement('sel_desc', $sel), $sel, ), __FILE__, __LINE__); } - // Purge admin menu cache - cachePurgeAdminMenu(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel)); - // Load template - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; case 'del': // Delete menu - foreach (REQUEST_POST('sel') as $sel => $menu) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", - array(bigintval($sel)), __FILE__, __LINE__); - cachePurgeAdminMenu(0, '', '', $AND); + foreach (postRequestElement('sel') as $sel => $menu) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", + array(bigintval($sel)), __FILE__, __LINE__); } // END - foreach // Load template - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; default: // Unexpected action - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok'))); - define('__OK_VALUE', REQUEST_POST('ok')); - LOAD_TEMPLATE("admin_menu_unknown_okay"); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); + loadTemplate('admin_menu_unknown_okay', false, postRequestElement('ok')); break; } } else { - if ((REQUEST_ISSET_GET(('act'))) && (REQUEST_ISSET_GET(('tid'))) && (REQUEST_ISSET_GET(('fid')))) { + if ((isGetRequestElementSet(('act'))) && (isGetRequestElementSet(('tid'))) && (isGetRequestElementSet(('fid')))) { // Get IDs - if (REQUEST_ISSET_GET(('w'))) { + if (isGetRequestElementSet(('w'))) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(getRequestElement('act'), bigintval(getRequestElement('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", - array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(getRequestElement('act'), bigintval(getRequestElement('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } 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", - array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } 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", - array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", - array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__); - cachePurgeAdminMenu(0, '', '', $AND); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); } } // By default list menus 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) { - // @TODO Rewrite this constant - define('__SUB_VALUE', $SUB); + // Remember sub value + $content['sub'] = $SUB; // Init variables $OUT = ''; $SW = 2; $cnt = 0; // Process all entries - while ($content = SQL_FETCHARRAY($result)) { + while ($data = SQL_FETCHARRAY($result)) { // Count this entry $cnt++; // Init navigation variable - $content['navi'] = ''; - if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) { + $data['navi'] = ''; + if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) { // Is highest position - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } elseif ($cnt == $max) { // Is lowest position - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>"; - } elseif ($content['sort'] > 0) { + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>"; + } elseif ($data['sort'] > 0) { // Anything else between highest and lowest - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } // Fix empty elements for constant (fixes display bugs in Firefox) - if (empty($content['action'])) $content['action'] = ' '; - if (empty($content['what'])) $content['what'] = ' '; - if (empty($content['title'])) $content['title'] = ' '; + if (empty($data['action'])) $data['action'] = ' '; + if (empty($data['what'])) $data['what'] = ' '; + if (empty($data['title'])) $data['title'] = ' '; - // Add more data to $content - $content['sw'] = $SW; - $content['mode'] = 'admin'; + // Add more data to $data + $data['sw'] = $SW; + $data['mode'] = 'admin'; // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_menu_overview_row', true, $content); + $OUT .= loadTemplate('admin_menu_overview_row', true, $data); $SW = 3 - $SW; } // END - switch + // Remember all rows + $content['rows'] = $OUT; + // Free memory SQL_FREERESULT($result); - // Rewrite this constant - define('__MENU_ROWS', $OUT); - // Load template - LOAD_TEMPLATE('admin_amenu_edit'); + loadTemplate('admin_amenu_edit', false, $content); } else { // Menu entries are missing... (???) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); } } diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 7dc2947f53..eb3ec73366 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,28 +37,27 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Display form is default $FORM = true; -if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('login')) && (REQUEST_ISSET_POST('email')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')) && (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { +if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('email')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { // Add admin when not added already - if (REGISTER_ADMIN(REQUEST_POST('login'), generateHash(REQUEST_POST('pass1')), REQUEST_POST('email')) == 'done') { + if (addAdminAccount(postRequestElement('login'), generateHash(postRequestElement('pass1')), postRequestElement('email')) == 'done') { // Do not ouput any form! $FORM = false; // Admin login saved - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE')); // Run filter chain - runFilterChain('post_admin_added', REQUEST_POST_ARRAY()); + runFilterChain('post_admin_added', postRequestArray()); } // END - if } // END - if @@ -67,12 +66,12 @@ if ($FORM === true) { // Prepare content $content = merge_array( array('login' => '', 'email' => ''), - REQUEST_POST_ARRAY() + postRequestArray() ); // Load form from template - LOAD_TEMPLATE('admin_admins_add', false, $content); + loadTemplate('admin_admins_add', false, $content); } // END - if -// +// [EOF] ?> diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index a52a0359d9..364687e24a 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,48 +37,48 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if ((isFormSent()) && (REQUEST_ISSET_GET('admin'))) { +if ((isFormSent()) && (isGetRequestElementSet('admin'))) { // Send mail or message - if ((EXT_IS_ACTIVE("msg")) && (REQUEST_POST('type') == "msg")) { + if ((isExtensionActive('msg')) && (postRequestElement('type') == 'message')) { // Add message - $message = LOAD_EMAIL_TEMPLATE('admins_msg_contct_admin', REQUEST_POST('text'), '0'); - SEND_ADMIN_MESSAGE(REQUEST_GET('admin'), ADMINS_MSG_FROM_ADMIN, $message); + $message = loadEmailTemplate('admins_msg_contct_admin', postRequestElement('text'), '0'); + SEND_ADMIN_MESSAGE(getRequestElement('admin'), ADMINS_MSG_FROM_ADMIN, $message); } else { // Load admin's email address - $email = getAdminEmail(bigintval(REQUEST_GET('admin'))); + $email = getAdminEmail(bigintval(getRequestElement('admin'))); // Load email template and send the mail to the admin - $message = LOAD_EMAIL_TEMPLATE('admins_mail_contct_admin', REQUEST_POST('text'), '0'); + $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), '0'); sendEmail($email, getMessage('ADMINS_MSG_FROM_ADMIN'), $message); } // Mail / message dropped - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED')); -} elseif (REQUEST_ISSET_GET('admin')) { + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED')); +} elseif (isGetRequestElementSet('admin')) { // Load contact form template - define('__ADMIN', REQUEST_GET('admin')); - if (EXT_IS_ACTIVE('msg')) { + $content['admin'] = getRequestElement('admin'); + + if (isExtensionActive('msg')) { // Add option to select between mail and message - define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE('admin_admins_contct_select', true)); + $content['message_selection'] = loadTemplate('admin_admins_contct_select', true); } else { // Outout hidden input - define('ADMINS_MESSAGING_SELECTION', LOAD_TEMPLATE('admin_admins_contct_default', true)); + $content['message_selection'] = loadTemplate('admin_admins_contct_default', true); } // Load main form - LOAD_TEMPLATE('admin_admins_contct_form'); + loadTemplate('admin_admins_contct_form', false, $content); } else { // Please select an admin! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_SELECT_ADMIN')); + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_SELECT_ADMIN')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index 45c18bfeac..b6a8932bad 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,45 +37,44 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Set selection data to empty array when it is empty -if (!REQUEST_ISSET_POST('sel')) REQUEST_SET_POST('sel', array()); +if (!isPostRequestElementSet('sel')) setRequestPostElement('sel', array()); // Check if direct admin account was selected -if (REQUEST_ISSET_GET('admin')) { +if (isGetRequestElementSet('admin')) { // Secure ID number - $aid = bigintval(REQUEST_GET('admin')); + $adminId = bigintval(getRequestElement('admin')); // Set required fields - REQUEST_SET_POST('edit', '1'); - REQUEST_SET_POST('sel', array($aid => '1')); + setRequestPostElement('edit', '1'); + setRequestPostElement('sel', array($adminId => '1')); } // END - if -if ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) { +if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit account(s) - adminsEditAdminAccount(REQUEST_POST_ARRAY()); -} elseif ((REQUEST_ISSET_POST('change')) && (count(REQUEST_POST('login')) > 0)) { + adminsEditAdminAccount(postRequestArray()); +} elseif ((isPostRequestElementSet('change')) && (count(postRequestElement('login')) > 0)) { // Change admin accounts - adminsChangeAdminAccount(REQUEST_POST_ARRAY()); -} elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) { + adminsChangeAdminAccount(postRequestArray()); +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Show admin accounts for deletetion - adminsDeleteAdminAccount(REQUEST_POST_ARRAY()); + adminsDeleteAdminAccount(postRequestArray()); } else { - if ((REQUEST_ISSET_POST('remove')) && (countPostSelection() > 0)) { + if ((isPostRequestElementSet('remove')) && (countPostSelection() > 0)) { // Remove accounts now - adminsRemoveAdminAccount(REQUEST_POST_ARRAY()); + adminsRemoveAdminAccount(postRequestArray()); } // END - if // List all admin accounts adminsListAdminAccounts(); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index b8b0e4c51a..8cbbd054fa 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,40 +37,39 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_POST('edit')) { +if (isPostRequestElementSet('edit')) { // Check if entires are checked $SEL = countPostSelection(); if ($SEL > 0) { // Add option for events $GLOBALS['cache_array']['admins'] = generateOptionList('admins', 'id', 'login', '', 'email'); $SW = 2; $rowNameS = ''; - foreach (REQUEST_POST('sel') as $template => $sel) { + foreach (postRequestElement('sel') as $template => $sel) { // First of all load data from DB - $result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY `id`", + $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 = ''; $aid2 = 0; + $OUT = ''; $adminId2 = 0; while ($content = SQL_FETCHARRAY($result)) { // @TODO Can this be rewritten??? $OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\"> <option value=\"0\""; if ($content['admin_id'] == '0') $OUT .= ' selected="selected"'; $OUT .=">{--ADMINS_ALL_ADMINS--}</option>\n"; - if (EXT_IS_ACTIVE('events')) { + if (isExtensionActive('events')) { $OUT .= "<option value=\"-1\""; if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"'; $OUT .= ">{--ADMINS_TO_USER_EVENTS--}</option>\n"; } $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email'); $OUT .= "</select>\n<br />\n"; - $aid2 = $content['admin_id']; $id2 = $content['id']; + $adminId2 = $content['admin_id']; $id2 = $content['id']; } // Free memory @@ -84,63 +83,60 @@ if (REQUEST_ISSET_POST('edit')) { 'admins' => $GLOBALS['cache_array']['admins'] ); - if ($aid2 > 0) { + if ($adminId2 > 0) { // Add form for an additional admin - $OUT .= LOAD_TEMPLATE("admin_admins_mails_edit_form", true, $content); + $OUT .= loadTemplate('admin_admins_mails_edit_form', true, $content); } // Save full rendered content $content['content'] = $OUT; // Start outputing line - $rowNameS .= LOAD_TEMPLATE("admin_admins_mails_edit_row", true, $content); + $rowNameS .= loadTemplate('admin_admins_mails_edit_row', true, $content); $SW = 3 - $SW; } - // @TODO Rewrite this constant - define('__ADMINS_ROWS', $rowNameS); - // Edit checked entries - LOAD_TEMPLATE("admin_admins_mails_edit"); + loadTemplate('admin_admins_mails_edit', false, $rowNameS); } else { // Nothing selected - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_NO_MAIL_CHECKED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_NO_MAIL_CHECKED')); } } else { // 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 + $result = SQL_QUERY("SELECT m.id, m.admin_id, a.login, m.mail_template +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__); if (SQL_NUMROWS($result) > 0) { // Shall I change entries? - if (REQUEST_ISSET_POST('change')) { + if (isPostRequestElementSet('change')) { // Init SQLs - INIT_SQLS(); + initSqls(); // Ok, update database - foreach (REQUEST_POST('admin_id') as $id => $content['admin_id']) { + foreach (postRequestElement('admin_id') as $id => $content['admin_id']) { // Secure IDs $id = bigintval($id); $content['admin_id'] = bigintval($content['admin_id']); // Update entry - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1", + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1", array($content['admin_id'], $id), __FILE__, __LINE__, false)); - if (($content['admin_id'] < 1) && (REQUEST_ISSET_POST('template', $id))) { + if (($content['admin_id'] < 1) && (isPostRequestElementSet('template', $id))) { // Remove any other admin entries - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' AND id != '%s'", - array(REQUEST_POST('template', $id), $id), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'", + array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false)); } // END - if - if (REQUEST_POST('admin_new', REQUEST_POST('template', $id)) > 0) { + if (postRequestElement('admin_new', postRequestElement('template', $id)) > 0) { // Add new admin - ADD_SQL(SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')", - array($content['admin_id'], REQUEST_POST('template', $id)), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')", + array($content['admin_id'], postRequestElement('template', $id)), __FILE__, __LINE__, false)); } // END - if } // END - foreach @@ -148,7 +144,7 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); runFilterChain('run_sqls'); // 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 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__); } // END - if // List found entries @@ -163,23 +159,20 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); ); // Load row template - $OUT .= LOAD_TEMPLATE("admin_admins_mails_list_row", true, $content); + $OUT .= loadTemplate('admin_admins_mails_list_row', true, $content); $SW = 3 - $SW; } // END - while // Free result SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__MAILS_ROWS', $OUT); - // Load template - LOAD_TEMPLATE("admin_admins_mails_list"); + loadTemplate('admin_admins_mails_list', false, $OUT); } else { // No entries found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_MAILS_NO_ENTRIES')); + loadTemplate('admin_settings_saved', false, getMessage('ADMINS_MAILS_NO_ENTRIES')); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-bonus.php b/inc/modules/admin/what-bonus.php index edbee4763d..2262c1e5e4 100644 --- a/inc/modules/admin/what-bonus.php +++ b/inc/modules/admin/what-bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,14 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// +// @TODO Unused at the moment + +// [EOF] ?> diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index 474288056b..aeaee9c927 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,30 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// Calculate total hits -$totalHits = (getConfig('db_hits') + getConfig('cache_hits')); +// Activated? +if (getConfig('STATS_ENABLED') == 'Y') { + // Calculate total hits + $totalHits = (getStatsEntry('db_hits') + getStatsEntry('cache_hits')); -// Prepare data for the template -define('__DB_HITS' , translateComma(getConfig('db_hits'))); -define('__CACHE_HITS', translateComma(getConfig('cache_hits'))); -define('__TOTAL_HITS', translateComma($totalHits)); -define('__CACHE_PERC', translateComma((getConfig('cache_hits') / $totalHits * 100))); + // Prepare data for the template + $content['db_hits'] = translateComma(getStatsEntry('db_hits')); + $content['cache_hits'] = translateComma(getStatsEntry('cache_hits')); + $content['total_hits'] = translateComma($totalHits); + $content['cache_perc'] = translateComma((getStatsEntry('cache_hits') / $totalHits * 100)); -// Load template -LOAD_TEMPLATE("admin_cache_stats"); + // Load template + loadTemplate('admin_cache_stats', false, $content); +} else { + // Deactivated, which is good for performance + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CACHE_DB_STATS_DEACTIVATED')); +} -// +// [EOF] ?> diff --git a/inc/modules/admin/what-chk_regs.php b/inc/modules/admin/what-chk_regs.php index b563cfe848..d4af53b263 100644 --- a/inc/modules/admin/what-chk_regs.php +++ b/inc/modules/admin/what-chk_regs.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR ('admin', basename(__FILE__)); +addMenuDescription('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` + `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='UNCONFIRMED' ORDER BY @@ -63,12 +62,12 @@ if (SQL_NUMROWS($result) > 0) { if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']); // Prepare array for the row template - // @TODO Rewritings: sname->surname,fname->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template + // @TODO Rewritings: surname->surname,family->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template $content = array( 'sw' => $SW, 'gender' => translateGender($content['gender']), - 'sname' => $content['surname'], - 'fname' => $content['family'], + 'surname' => $content['surname'], + 'family' => $content['family'], 'email' => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>", 'ip' => $content['REMOTE_ADDR'], 'ref' => $content['refid'], @@ -77,23 +76,19 @@ if (SQL_NUMROWS($result) > 0) { ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_reg_row", true, $content); + $OUT .= loadTemplate('admin_reg_row', true, $content); $SW = 3 - $SW; } - // Remember rows - // @TODO Rewrite this constant - define('__REG_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE("admin_reg"); + loadTemplate('admin_reg', false, $OUT); } else { // No registrations left - or all has confirmed their email address... :-) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_CONFIRMED_EMAIL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_CONFIRMED_EMAIL')); } // Free memory SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_ b/inc/modules/admin/what-config_ new file mode 100644 index 0000000000..14cb3cafb6 --- /dev/null +++ b/inc/modules/admin/what-config_ @@ -0,0 +1,56 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * ================ Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : what-config_ * + * -------------------------------------------------------------------- * + * Short description : Configuration for * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Konfiguration der * + * -------------------------------------------------------------------- * + * $Revision:: 1047 $ * + * $Date:: 2009-06-08 19:32:34 +0200 (Mon, 08 Jun 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('admin', __FILE__); + +if (isFormSent()) { + // Save data + adminSaveSettingsFromPostData(); +} else { + // Load template + loadTemplate('admin_config_'); +} + +// [EOF] +?> diff --git a/inc/modules/admin/what-config_active.php b/inc/modules/admin/what-config_active.php index 326f91f7b0..7c8bc376ad 100644 --- a/inc/modules/admin/what-config_active.php +++ b/inc/modules/admin/what-config_active.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Minimum mails / active - define('__LIMIT_VALUE', getConfig('active_limit')); - // Load template - LOAD_TEMPLATE("admin_config_active"); + loadTemplate('admin_config_active'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_admin.php b/inc/modules/admin/what-config_admin.php index 7d2b9aba6a..b95db62427 100644 --- a/inc/modules/admin/what-config_admin.php +++ b/inc/modules/admin/what-config_admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,33 +37,25 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if + // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare data for the template - switch (getConfig('admin_menu')) { - case 'NEW': - define('__ADMIN_MENU_NEW', ' checked='checked''); - define('__ADMIN_MENU_OLD' , ''); - break; - - case 'OLD': - define('__ADMIN_MENU_NEW', ''); - define('__ADMIN_MENU_OLD' , ' checked='checked''); - break; - } + $content['admin_menu_new'] = ''; + $content['admin_menu_old'] = ''; + $content['admin_menu_' . strtolower(getConfig('admin_menu'))] = ' checked="checked"'; // Display form - LOAD_TEMPLATE('admin_config_admin'); + loadTemplate('admin_config_admin', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 30525cfb7b..0fffe6b204 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,34 +37,33 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); $SEL = 0; -if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection(); +if (isPostRequestElementSet('sel')) $SEL = countPostSelection(); -if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) { +if ((isPostRequestElementSet('edit')) && ($SEL > 0)) { // Edit ACLs $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // 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); + list($adminId, $action, $what, $mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare data for the row template $content = array( 'sw' => $SW, 'id' => $id, - 'admins_selection' => generateOptionList('admins', 'id', 'login', $aid, 'default_acl'), - 'action_selection' => ADMIN_MENU_SELECTION('action', $act, $id), - 'what_selection' => ADMIN_MENU_SELECTION('what', $wht, $id), + 'admins_selection' => generateOptionList('admins', 'id', 'login', $adminId, 'default_acl'), + 'action_selection' => adminMenuSelectionBox_DEPRECATED('action', $action, $id), + 'what_selection' => adminMenuSelectionBox_DEPRECATED('what', $what, $id), 'mode_options' => generateOptionList( '/ARRAY/', array('allow', 'deny'), @@ -77,53 +76,49 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) { ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_config_admins_edit_row', true, $content); + $OUT .= loadTemplate('admin_config_admins_edit_row', true, $content); $SW = 3 - $SW; } - define('__ACL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_config_admins_edit'); -} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0)) { + loadTemplate('admin_config_admins_edit', false, $OUT); +} elseif ((isPostRequestElementSet('change')) && ($SEL > 0)) { // Change entries - foreach (REQUEST_POST('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Secure ID $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( - REQUEST_POST('admin', $id), - REQUEST_POST('action_menu', $id), - REQUEST_POST('what_menu', $id), - REQUEST_POST('mode', $id), + postRequestElement('admin', $id), + postRequestElement('action_menu', $id), + postRequestElement('what_menu', $id), + postRequestElement('mode', $id), $id ),__FILE__, __LINE__); } // END - foreach // Update cache when installed - if (EXT_IS_ACTIVE('cache')) { - if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->destroyCacheFile(); - - // Purge menu cache - cachePurgeAdminMenu(REQUEST_POST('admin', $id)); + if (isExtensionActive('cache')) { + if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if // Entries changed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED')); -} elseif ((REQUEST_ISSET_POST('del')) && ($SEL > 0)) { + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED')); +} elseif ((isPostRequestElementSet('del')) && ($SEL > 0)) { // Delete ACLs $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // 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); + list($admin, $action, $what, $mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare variables - if (empty($act)) $act = '---'; - if (empty($wht)) $wht = '---'; + if (empty($action)) $action = '---'; + if (empty($what)) $what = '---'; // Get admin mode $mode = getMessage('ADMINS_'.strtoupper($mode).'_MODE'); @@ -136,73 +131,66 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) { 'sw' => $SW, 'id' => $id, 'admin' => $admin, - 'action' => $act, - 'what' => $wht, + 'action' => $action, + 'what' => $what, 'mode' => $mode, ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_config_admins_del_row', true, $content); + $OUT .= loadTemplate('admin_config_admins_del_row', true, $content); $SW = 3 - $SW; } // END - foreach - define('__ACL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_config_admins_del'); -} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0)) { + loadTemplate('admin_config_admins_del', false, $OUT); +} elseif ((isPostRequestElementSet('remove')) && ($SEL > 0)) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' - foreach (REQUEST_POST('sel') as $id => $selected) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $selected) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); } // END - foreach // Update cache when installed - if (EXT_IS_ACTIVE('cache')) { - if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->destroyCacheFile(); - - // @TODO This causes the whole (!) menu cache being rebuild - cachePurgeAdminMenu(); + if (isExtensionActive('cache')) { + if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if // Entries deleted - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED')); -} elseif (REQUEST_ISSET_POST('add')) { + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED')); +} elseif (isPostRequestElementSet('add')) { // Check if everything is fine... - $mode = getAdminDefaultAcl(bigintval(REQUEST_POST('admin_id'))); + $mode = getAdminDefaultAcl(bigintval(postRequestElement('admin_id'))); // Default ACL is false $ACL = false; - if (REQUEST_ISSET_POST('what_menu')) { + if (isPostRequestElementSet('what_menu')) { // Check parent ACL - $ACL = adminsCheckAdminAcl(getModeAction('admin', REQUEST_POST('what_menu')), ''); + $ACL = adminsCheckAdminAcl(getModeAction('admin', postRequestElement('what_menu')), ''); } // END - if - if (($mode != REQUEST_POST('mode')) || ($ACL)) { + if (($mode != postRequestElement('mode')) || ($ACL)) { // Mode is fine - $BOTH = ((REQUEST_ISSET_POST('action_menu')) && (REQUEST_ISSET_POST('what_menu'))); - if (((REQUEST_ISSET_POST('action_menu')) || (REQUEST_ISSET_POST('what_menu'))) && (!$BOTH)) { + $BOTH = ((isPostRequestElementSet('action_menu')) && (isPostRequestElementSet('what_menu'))); + if (((isPostRequestElementSet('action_menu')) || (isPostRequestElementSet('what_menu'))) && ($BOTH === false)) { // Main or sub menu selected - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1", - array(bigintval(REQUEST_POST('admin_id')), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1", + array(bigintval(postRequestElement('admin_id')), postRequestElement('action_menu'), postRequestElement('what_menu')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // 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(REQUEST_POST('admin_id')), - REQUEST_POST('action_menu'), - REQUEST_POST('what_menu'), - REQUEST_POST('mode') + bigintval(postRequestElement('admin_id')), + postRequestElement('action_menu'), + postRequestElement('what_menu'), + postRequestElement('mode') ), __FILE__, __LINE__); $content = getMessage('ADMIN_ADMINS_ACL_SAVED'); // Update cache when installed - if (EXT_IS_ACTIVE('cache')) { - if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->destroyCacheFile(); - - // Purge cache - cachePurgeAdminMenu(REQUEST_POST('admin_id'), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')); + if (isExtensionActive('cache')) { + if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if } else { // ACL does already exist! @@ -221,10 +209,10 @@ VALUES ('%s','%s','%s','%s')", } // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $content); + loadTemplate('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__); // Entries found? if (SQL_NUMROWS($result_acls) > 0) { @@ -249,33 +237,32 @@ VALUES ('%s','%s','%s','%s')", ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_config_admins_row', true, $content); + $OUT .= loadTemplate('admin_config_admins_row', true, $content); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - define('__ACL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_config_admins'); + loadTemplate('admin_config_admins', false, $OUT); } // END - if // Prepare some constants for the template - define('_ADMINS_SELECTION', generateOptionList('admins', 'id', 'login', '', 'default_acl')); - define('_ACTION_SELECTION', ADMIN_MENU_SELECTION('action')); - define('_WHAT_SELECTION' , ADMIN_MENU_SELECTION('what')); - define('_MODE_OPTIONS' , generateOptionList( + $content['admins_selection'] = generateOptionList('admins', 'id', 'login', '', 'default_acl'); + $content['action_selection'] = adminMenuSelectionBox_DEPRECATED('action'); + $content['what_selection'] = adminMenuSelectionBox_DEPRECATED('what'); + $content['mode_options'] = generateOptionList( '/ARRAY/', array('allow', 'deny'), array( getMessage('ADMINS_ALLOW_MODE'), getMessage('ADMINS_DENY_MODE') ) - )); + ); // Load template for adding new ACL - LOAD_TEMPLATE('admin_admins_add_acl'); + loadTemplate('admin_admins_add_acl', false, $content); } // diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index f0f27c0435..b2e2b721e6 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,49 +37,49 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Data was submitted so we store it - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Output de-/activation selections - define('__AP_INACTIVE_SELECTION' , ADD_SELECTION('yn', getConfig('autopurge_inactive') , "autopurge_inactive")); - define('__AP_UNCONFIRMED_SELECTION', ADD_SELECTION('yn', getConfig('autopurge_unconfirmed'), "autopurge_unconfirmed")); - define('__AP_TASKS_SELECTION' , ADD_SELECTION('yn', getConfig('ap_tasks') , "autopurge_tasks")); - define('__AP_DEL_MAILS_SELECTION' , ADD_SELECTION('yn', getConfig('ap_del_mails') , "ap_del_mails")); + $content['ap_inactive_selection'] = addSelectionBox('yn', getConfig('autopurge_inactive') , 'autopurge_inactive'); + $content['ap_unconfirmed_selection'] = addSelectionBox('yn', getConfig('autopurge_unconfirmed'), 'autopurge_unconfirmed'); + $content['ap_tasks_selection'] = addSelectionBox('yn', getConfig('autopurge_tasks') , 'autopurge_tasks'); + $content['ap_del_mails_selection'] = addSelectionBox('yn', getConfig('ap_del_mails') , 'ap_del_mails'); // Output notification selections - define('__AP_NOTIFY_INACTIVE' , ADD_SELECTION('yn', getConfig('ap_in_notify') , "ap_in_notify")); - define('__AP_NOTIFY_UNCONFIRMED' , ADD_SELECTION('yn', getConfig('ap_un_notify') , "ap_un_notify")); - define('__AP_NOTIFY_TASKS' , ADD_SELECTION('yn', getConfig('ap_tasks_notify'), "ap_tasks_notify")); - define('__AP_NOTIFY_DEL_MAILS' , ADD_SELECTION('yn', getConfig('ap_dm_notify') , "ap_dm_notify")); + $content['ap_notify_inactive'] = addSelectionBox('yn', getConfig('ap_in_notify') , 'ap_in_notify'); + $content['ap_notify_unconfirmed'] = addSelectionBox('yn', getConfig('ap_un_notify') , 'ap_un_notify'); + $content['ap_notify_tasks'] = addSelectionBox('yn', getConfig('ap_tasks_notify'), 'ap_tasks_notify'); + $content['ap_notify_del_mails'] = addSelectionBox('yn', getConfig('ap_dm_notify') , 'ap_dm_notify'); // Output time selection boxes - define('__AP_IN_SINCE' , createTimeSelections(getConfig('ap_inactive_since'), "ap_inactive_since" , "MWDh")); - define('__AP_IN_TIME' , createTimeSelections(getConfig('ap_in_time') , "ap_inactive_time" , "MWDh")); - define('__AP_UN_TIME' , createTimeSelections(getConfig('ap_un_time') , "ap_unconfirmed_time", "MWDh")); - define('__AP_TASK_TIME' , createTimeSelections(getConfig('ap_tasks_time') , "ap_tasks_time" , "MWDh")); - define('__AP_DEL_MAILS_TIME', createTimeSelections(getConfig('ap_dm_timeout') , "ap_dm_timeout" , "MWDh")); + $content['ap_in_since'] = createTimeSelections(getConfig('ap_inactive_since') , 'ap_inactive_since' , 'MWDh'); + $content['ap_in_time'] = createTimeSelections(getConfig('ap_inactive_time') , 'ap_inactive_time' , 'MWDh'); + $content['ap_un_time'] = createTimeSelections(getConfig('ap_unconfirmed_time'), 'ap_unconfirmed_time', 'MWDh'); + $content['ap_task_time'] = createTimeSelections(getConfig('ap_tasks_time') , 'ap_tasks_time' , 'MWDh'); + $content['ap_del_mails_time'] = createTimeSelections(getConfig('ap_dm_timeout') , 'ap_dm_timeout' , 'MWDh'); // Mail confirmation links - define('_CFG_AUTO_PURGE', createTimeSelections(getConfig('auto_purge'), "auto_purge", "MWD")); - if (getConfig('auto_purge_active') != 'Y') { - define('_CFG_AP_ACTIVE_N', ' checked="checked"'); - define('_CFG_AP_ACTIVE_Y', ''); - } else { - define('_CFG_AP_ACTIVE_N', ''); - define('_CFG_AP_ACTIVE_Y', ' checked="checked"'); - } + $content['auto_purge'] = createTimeSelections(getConfig('auto_purge'), 'auto_purge', 'MWD'); + + // Prepare more Y/N selections + foreach (array('auto_purge_active') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig('auto_purge_active'))] = ' checked="checked"'; + } // END - foreach // Output template - LOAD_TEMPLATE("admin_config_autopurge"); + loadTemplate('admin_config_autopurge', false, $content); } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 7148c1bae4..06d68b757f 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,145 +37,57 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Translate german decimal commas to computer decimal dots - REQUEST_SET_POST('beg_points' , convertCommaToDot(REQUEST_POST('beg_points') )); - REQUEST_SET_POST('beg_points_max' , convertCommaToDot(REQUEST_POST('beg_points_max') )); - REQUEST_SET_POST('beg_notify_bonus', convertCommaToDot(REQUEST_POST('beg_notify_bonus'))); + setRequestPostElement('beg_points' , convertCommaToDot(postRequestElement('beg_points') )); + setRequestPostElement('beg_points_max' , convertCommaToDot(postRequestElement('beg_points_max') )); + setRequestPostElement('beg_notify_bonus', convertCommaToDot(postRequestElement('beg_notify_bonus'))); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('beg_rallye' , REQUEST_POST('beg_rallye')); - setConfigEntry('beg_ral_en_notify', REQUEST_POST('beg_ral_en_notify')); - setConfigEntry('beg_ral_di_notify', REQUEST_POST('beg_ral_di_notify')); + setConfigEntry('beg_rallye' , postRequestElement('beg_rallye')); + setConfigEntry('beg_ral_en_notify', postRequestElement('beg_ral_en_notify')); + setConfigEntry('beg_ral_di_notify', postRequestElement('beg_ral_di_notify')); } else { // Prepare constants for the template $content['points'] = translateComma(getConfig('beg_points') , false); $content['points_max'] = translateComma(getConfig('beg_points_max') , false); $content['notify_bonus'] = translateComma(getConfig('beg_notify_bonus'), false); - $content['timeout'] = createTimeSelections(getConfig('beg_timeout') , 'beg_timeout' , 'Dhm'); - $content['uid_timeout'] = createTimeSelections(getConfig('beg_uid_timeout'), 'beg_uid_timeout', 'Dhm'); - $content['ip_timeout'] = createTimeSelections(getConfig('beg_ip_timeout') , 'beg_ip_timeout' , 'Dhm'); - $content['wait_selection'] = createTimeSelections(getConfig('beg_notify_wait'), 'beg_notify_wait', 'ms' ); - $content['ranks'] = getConfig('beg_ranks'); - - // Activate / Deactivate beg rallye (Y/N) - switch (getConfig('beg_rallye')) - { - case 'Y': - $content['rallye_yes'] = ' checked="checked"'; - $content['rallye_no'] = ''; - break; - - case 'N': - $content['rallye_yes'] = ''; - $content['rallye_no'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_active')) - { - case 'Y': - $content['active_yes'] = ' checked="checked"'; - $content['active_no'] = ''; - break; - - case 'N': - $content['active_yes'] = ''; - $content['active_no'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_mode')) - { - case 'DIRECT': - $content['mode_direct'] = ' checked="checked"'; - $content['mode_ref'] = ''; - break; - - case 'REF': - $content['mode_direct'] = ''; - $content['mode_ref'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_ral_en_notify')) - { - case 'Y': - $content['ral_enable_notify_yes'] = ' checked="checked"'; - $content['ral_enable_notify_no'] = ''; - break; - - case 'N': - $content['ral_enable_notify_yes'] = ''; - $content['ral_enable_notify_no'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_ral_di_notify')) - { - case 'Y': - $content['ral_disable_notify_yes'] = ' checked="checked"'; - $content['ral_disable_notify_no'] = ''; - break; - - case 'N': - $content['ral_disable_notify_yes'] = ''; - $content['ral_disable_notify_no'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_new_mem_notify')) - { - case 'Y': - $content['new_member_notify_yes'] = ' checked="checked"'; - $content['new_member_notify_no'] = ''; - break; - - case 'N': - $content['new_member_notify_yes'] = ''; - $content['new_member_notify_no'] = ' checked="checked"'; - break; - } - - switch (getConfig('beg_include_own')) - { - case 'Y': - $content['include_own_yes'] = ' checked="checked"'; - $content['include_own_no'] = ''; - break; - - case 'N': - $content['include_own_yes'] = ''; - $content['include_own_no'] = ' checked="checked"'; - break; - } + $content['timeout'] = createTimeSelections(getConfig('beg_timeout') , 'beg_timeout' , 'Dhm'); + $content['userid_timeout'] = createTimeSelections(getConfig('beg_userid_timeout'), 'beg_userid_timeout', 'Dhm'); + $content['ip_timeout'] = createTimeSelections(getConfig('beg_ip_timeout') , 'beg_ip_timeout' , 'Dhm'); + $content['wait_selection'] = createTimeSelections(getConfig('beg_notify_wait') , 'beg_notify_wait' , 'ms' ); + + // Init all Y/N selections + foreach (array('rallye','activate','mode','ral_en_notify','ral_di_notify','new_mem_notify','include_own') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig('rallye_' . $entry))] = ' checked="checked"'; + } // END - foreach // Init elements - $content['pay_mode_img'] = ''; - $content['pay_mode_js'] = ''; - $content['pay_mode_both'] = ''; - $content['pay_mode_none'] = ''; + foreach (array('pay_mode_img','pay_mode_js','pay_mode_both','pay_mode_none') as $key) { + $content[$entry] = ''; + } // END - foreach // Set pay mode $content['pay_mode_'.strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"'; // Member selection box - $content['member_selection'] = ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, 'beg_uid'); + $content['member_selection'] = addMemberSelectionBox(getConfig('beg_userid'), false, true, true, 'beg_userid'); // Load form template - LOAD_TEMPLATE('admin_config_beg', false, $content); + loadTemplate('admin_config_beg', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_birthday.php b/inc/modules/admin/what-config_birthday.php index 257106d884..1c47ee65ff 100644 --- a/inc/modules/admin/what-config_birthday.php +++ b/inc/modules/admin/what-config_birthday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,48 +37,30 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Prepare data for the template - define('__POINTS_VALUE', getConfig('birthday_points')); - switch (getConfig('birthday_active')) - { - case 'Y': - $content['active_yes'] = ' checked="checked"'; - $content['active_no'] = ''; - break; - - case 'N': - $content['active_yes'] = ''; - $content['active_no'] = ' checked="checked"'; - break; - } - switch (getConfig('birthday_mode')) - { - case 'DIRECT': - $content['mode_direct'] = ' checked="checked"'; - $content['mode_ref'] = ''; - break; + // Init all other templates + foreach (array('active_y','active_n','mode_direct','mode_ref') as $entry) { + $content[$entry] = ''; + } // END - foreach - case 'REF': - $content['mode_direct'] = ''; - $content['mode_ref'] = ' checked="checked"'; - break; - } + // Set current selections + foreach (array('active','mode') as $entry) { + $content[$entry . '_' . strtolower(getConfig('birthday_' . $entry))] = ' checked="checked"'; + } // END - foreach // Display form - LOAD_TEMPLATE("admin_config_birthday"); + loadTemplate('admin_config_birthday', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 8c4d5497bb..406cefa1bd 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,55 +37,52 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace german decimal commas to computer decimal dots - REQUEST_SET_POST('login_bonus', convertCommaToDot(REQUEST_POST('login_bonus'))); - REQUEST_SET_POST('turbo_bonus', convertCommaToDot(REQUEST_POST('turbo_bonus'))); - REQUEST_SET_POST('bonus_ref', convertCommaToDot(REQUEST_POST('bonus_ref'))); - REQUEST_SET_POST('bonus_order', convertCommaToDot(REQUEST_POST('bonus_order'))); - REQUEST_SET_POST('bonus_notify_points', convertCommaToDot(REQUEST_POST('bonus_notify_points'))); + setRequestPostElement('login_bonus', convertCommaToDot(postRequestElement('login_bonus'))); + setRequestPostElement('turbo_bonus', convertCommaToDot(postRequestElement('turbo_bonus'))); + setRequestPostElement('bonus_ref', convertCommaToDot(postRequestElement('bonus_ref'))); + setRequestPostElement('bonus_order', convertCommaToDot(postRequestElement('bonus_order'))); + setRequestPostElement('bonus_notify_points', convertCommaToDot(postRequestElement('bonus_notify_points'))); // Generate string for saving ranks - REQUEST_SET_POST('turbo_rates', ''); + setRequestPostElement('turbo_rates', ''); $RATES = array(); - foreach (REQUEST_POST('rate') as $rate) { + foreach (postRequestElement('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; } - REQUEST_SET_POST('turbo_rates', trim(implode(';', $RATES))); - REQUEST_UNSET_POST('rate'); + setRequestPostElement('turbo_rates', trim(implode(';', $RATES))); + unsetPostRequestElement('rate'); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + if (!isPostRequestElementSet('turbo_rates')) setRequestPostElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('bonus_active' , REQUEST_POST('bonus_active')); - setConfigEntry('bonus_en_notify', REQUEST_POST('bonus_en_notify')); - setConfigEntry('bonus_di_notify', REQUEST_POST('bonus_di_notify')); + setConfigEntry('bonus_active' , postRequestElement('bonus_active')); + setConfigEntry('bonus_en_notify', postRequestElement('bonus_en_notify')); + setConfigEntry('bonus_di_notify', postRequestElement('bonus_di_notify')); } else { // Prepare contants for the template - define('__LOGIN_VALUE' , translateComma(getConfig('login_bonus') , false)); - define('__TURBO_VALUE' , translateComma(getConfig('turbo_bonus') , false)); - define('__ORDER_VALUE' , translateComma(getConfig('bonus_order') , false)); - define('__REF_VALUE' , translateComma(getConfig('bonus_ref') , false)); - define('__STATS_VALUE' , translateComma(getConfig('bonus_stats') , false)); - define('__NOTIFY_VALUE', translateComma(getConfig('bonus_notify_points'), false)); - define('__TRANKS_VALUE', getConfig('bonus_ranks')); - define('__TLINES_VALUE', getConfig('bonus_lines')); - - // Transfer options to template __MEMBER_SELECTION - define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('bonus_uid'), false, true, true, 'bonus_uid')); + $content['login'] = translateComma(getConfig('login_bonus') , false); + $content['turbo'] = translateComma(getConfig('turbo_bonus') , false); + $contentp['order'] = translateComma(getConfig('bonus_order') , false); + $content['ref'] = translateComma(getConfig('bonus_ref') , false); + $content['stats'] = translateComma(getConfig('bonus_stats') , false); + $content['notify'] = translateComma(getConfig('bonus_notify_points'), false); + + // Transfer options to template + $content['member_selection'] = addMemberSelectionBox(getConfig('bonus_userid'), false, true, true, 'bonus_userid'); // Initialize array for the points list //die("*".getConfig('turbo_rates')."*"); @@ -101,149 +98,36 @@ if (isFormSent()) { if (!empty($rate)) { // Print only when something is in $OUT .= " <li><input type=\"text\" name=\"rate[".($k + 2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" value=\"".$rate."\"> <div class=\"admin_notes\">({?POINTS?})</div?</li>\n"; - } + } // END - if $cnt++; - } + } // END - foreach + // Maxmium entries $max = 10; if ($cnt >= 8) $max = $cnt+3; // Add more empty fields for ($i = $cnt; $i < $max; $i++) { - $OUT .= " <li><input type=\"text\" name=\"rate[".($i+2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\"> <div class=\"admin_notes\">({?POINTS?})</div?</li>\n"; - } + $OUT .= " <li><input type=\"text\" name=\"rate[".($i+2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" /> <div class=\"admin_notes\">({?POINTS?})</div></li>\n"; + } // END - for $OUT .= "</ol>\n"; - define('__TRATES_LIST', $OUT); - - define('__LOGIN_TIMEOUT_SELECTION', createTimeSelections(getConfig('login_timeout') , 'login_timeout' , 'WDh')); - define('__BONUS_TIMEOUT_SELECTION', createTimeSelections(getConfig('bonus_timeout') , 'bonus_timeout' , 'WDh')); - $content['wait_selection'] = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' ); - - // Activate / Deactivate bonus active rallye (Y/N) - switch (getConfig('bonus_active')) - { - case 'Y': - define('__BONUS_ACTIVE_Y', ' checked="checked"'); - define('__BONUS_ACTIVE_N', ''); - break; - - case 'N': - define('__BONUS_ACTIVE_Y', ''); - define('__BONUS_ACTIVE_N', ' checked="checked"'); - break; - } - // Other bonus to de-/activate - switch (getConfig('bonus_login_yn')) - { - case 'Y': - define('__BONUS_LOGIN_Y', ' checked="checked"'); - define('__BONUS_LOGIN_N', ''); - break; - - case 'N': - define('__BONUS_LOGIN_Y', ''); - define('__BONUS_LOGIN_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_stats_yn')) - { - case 'Y': - define('__BONUS_STATS_Y', ' checked="checked"'); - define('__BONUS_STATS_N', ''); - break; - - case 'N': - define('__BONUS_STATS_Y', ''); - define('__BONUS_STATS_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_order_yn')) - { - case 'Y': - define('__BONUS_ORDER_Y', ' checked="checked"'); - define('__BONUS_ORDER_N', ''); - break; - - case 'N': - define('__BONUS_ORDER_Y', ''); - define('__BONUS_ORDER_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_ref_yn')) - { - case 'Y': - define('__BONUS_REF_Y', ' checked="checked"'); - define('__BONUS_REF_N', ''); - break; - - case 'N': - define('__BONUS_REF_Y', ''); - define('__BONUS_REF_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_click_yn')) - { - case 'Y': - define('__BONUS_CLICK_Y', ' checked="checked"'); - define('__BONUS_CLICK_N', ''); - break; - - case 'N': - define('__BONUS_CLICK_Y', ''); - define('__BONUS_CLICK_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_en_notify')) - { - case 'Y': - define('__BONUS_EN_NOTIFY_Y', ' checked="checked"'); - define('__BONUS_EN_NOTIFY_N', ''); - break; - - case 'N': - define('__BONUS_EN_NOTIFY_Y', ''); - define('__BONUS_EN_NOTIFY_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_di_notify')) - { - case 'Y': - define('__BONUS_DI_NOTIFY_Y', ' checked="checked"'); - define('__BONUS_DI_NOTIFY_N', ''); - break; - - case 'N': - define('__BONUS_DI_NOTIFY_Y', ''); - define('__BONUS_DI_NOTIFY_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_new_mem_notify')) - { - case 'Y': - define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"'); - define('__BONUS_NEW_MEMBER_NOTIFY_N', ''); - break; - - case 'N': - define('__BONUS_NEW_MEMBER_NOTIFY_Y', ''); - define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"'); - break; - } - switch (getConfig('bonus_include_own')) - { - case 'Y': - define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"'); - define('__BONUS_INCLUDE_OWN_N', ''); - break; - - case 'N': - define('__BONUS_INCLUDE_OWN_Y', ''); - define('__BONUS_INCLUDE_OWN_N', ' checked="checked"'); - break; - } + $content['trates_list'] = $OUT; + + // Selection boxes + $content['login_timeout_selection'] = createTimeSelections(getConfig('login_timeout') , 'login_timeout' , 'WDh'); + $content['bonus_timeout_selection'] = createTimeSelections(getConfig('bonus_timeout') , 'bonus_timeout' , 'WDh'); + $content['wait_selection'] = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' ); + + // Init Y/N selections + foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','en_notify','di_notify','new_mem_notify','include_own') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig('bonus_' . $entry))] = ' checked="checked"'; + } // END - foreach // Load final template - LOAD_TEMPLATE('admin_config_bonus', false, $content); + loadTemplate('admin_config_bonus', false, $content); } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-config_cache.php b/inc/modules/admin/what-config_cache.php index 28b2d7e786..f551ef47b7 100644 --- a/inc/modules/admin/what-config_cache.php +++ b/inc/modules/admin/what-config_cache.php @@ -1,222 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 01/29/2006 * - * ================ Last change: 01/29/2006 * - * * - * -------------------------------------------------------------------- * - * File : what-config_cache.php * - * -------------------------------------------------------------------- * - * Short description : Configuration for the caching system * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Konfiguration des Caching-Systems * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} // END - if - -// Add description as navigation point -ADD_DESCR('admin', __FILE__); - -if (isFormSent()) { - // Cache path has been not changed by default so don't test it again - REQUEST_SET_POST('cache_tested', 'N'); - - // Check if path has been changed - if (REQUEST_POST('cache_path') != getConfig('cache_path')) { - // Okay, cache path has been altered so we have to test it again! - REQUEST_SET_POST('cache_tested', 'Y'); - } // END - if - - if ((REQUEST_POST('cache_admins') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('admins'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_acls') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('acls'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_exts') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('extensions', true))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_config') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('config'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_modreg') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('modreg'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_refdepth') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('refdepth'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_refsys') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('refsys'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - if ((REQUEST_POST('cache_filter') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('filter'))) { - $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - - // Save configuration - ADMIN_SAVE_SETTINGS_POST(); -} else { - // Prepare data - // @TODO Rewrite all constants - switch (getConfig('cache_admins')) { - case 'Y': - define('__ADMINS_Y', ' checked="checked"'); - define('__ADMINS_N', ''); - break; - - case 'N': - define('__ADMINS_Y', ''); - define('__ADMINS_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_acls')) { - case 'Y': - define('__ACLS_Y', ' checked="checked"'); - define('__ACLS_N', ''); - break; - - case 'N': - define('__ACLS_Y', ''); - define('__ACLS_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_exts')) { - case 'Y': - define('__EXTS_Y', ' checked="checked"'); - define('__EXTS_N', ''); - break; - - case 'N': - define('__EXTS_Y', ''); - define('__EXTS_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_config')) { - case 'Y': - define('__CONFIG_Y', ' checked="checked"'); - define('__CONFIG_N', ''); - break; - - case 'N': - define('__CONFIG_Y', ''); - define('__CONFIG_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_modreg')) { - case 'Y': - define('__MODREG_Y', ' checked="checked"'); - define('__MODREG_N', ''); - break; - - case 'N': - define('__MODREG_Y', ''); - define('__MODREG_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_refdepth')) { - case 'Y': - define('__REFDEPTH_Y', ' checked="checked"'); - define('__REFDEPTH_N', ''); - break; - - case 'N': - define('__REFDEPTH_Y', ''); - define('__REFDEPTH_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_refsys')) { - case 'Y': - define('__REFSYS_Y', ' checked="checked"'); - define('__REFSYS_N', ''); - break; - - case 'N': - define('__REFSYS_Y', ''); - define('__REFSYS_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_filter')) { - case 'Y': - define('__FILTER_Y', ' checked="checked"'); - define('__FILTER_N', ''); - break; - - case 'N': - define('__FILTER_Y', ''); - define('__FILTER_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_themes')) { - case 'Y': - define('__THEMES_Y', ' checked="checked"'); - define('__THEMES_N', ''); - break; - - case 'N': - define('__THEMES_Y', ''); - define('__THEMES_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('cache_admin_menu')) { - case 'Y': - define('__ADMIN_MENU_Y', ' checked="checked"'); - define('__ADMIN_MENU_N', ''); - break; - - case 'N': - define('__ADMIN_MENU_Y', ''); - define('__ADMIN_MENU_N', ' checked="checked"'); - break; - } // END - switch - - define('__PATH', getConfig('cache_path')); - - // Load template - LOAD_TEMPLATE('admin_config_cache'); -} - -// +// @DEPRECATED ?> diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index fbede77ba6..b6f0dddbfe 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,84 +38,85 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init variable to avoid a notice $CATS = ''; -if (REQUEST_ISSET_POST('add')) { +if (isPostRequestElementSet('add')) { // Add a new category - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_cats` WHERE cat='%s' LIMIT 1", - array(REQUEST_POST('catname')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE cat='%s' LIMIT 1", + array(postRequestElement('catname')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Category does not exists, we simply add it... - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')", - array(REQUEST_POST('catname'), REQUEST_POST('visible'), bigintval(REQUEST_POST('parent') + 1)), __FILE__, __LINE__); - $content = CATEGORY_ADDED; + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')", + array(postRequestElement('catname'), postRequestElement('visible'), bigintval(postRequestElement('parent') + 1)), __FILE__, __LINE__); + $content = getMessage('CATEGORY_ADDED'); } else { // Category does already exists - $content = "<span class=\"admin_failed\">".CATEGORY_ALREADY_EXISTS."</span>"; + $content = "<span class=\"admin_failed\">{--CATEGORY_ALREADY_EXISTS--}</span>"; } // Free memory SQL_FREERESULT($result); // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif ((isFormSent()) && (REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id')))) { + loadTemplate('admin_settings_saved', false, $content); +} elseif ((isFormSent()) && (isPostRequestElementSet('id')) && (is_array(postRequestElement('id')))) { // Change or delete categories... $TEXT = ''; - foreach (REQUEST_POST('id') as $id => $cat) { + foreach (postRequestElement('id') as $id => $cat) { // Secure ID $id = bigintval($id); // Is the entry set? if (!empty($cat)) { - switch (REQUEST_GET('do')) + switch (getRequestElement('do')) { case 'edit': // Change categories - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1", array( $cat, - REQUEST_POST('vis', $id), - REQUEST_POST('sort', $id), + postRequestElement('vis', $id), + postRequestElement('sort', $id), $id ), __FILE__, __LINE__); - $TEXT = CATEGORIES_SAVED; + $TEXT = getMessage('CATEGORIES_SAVED'); break; case 'del': // Delete categories - 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", - array($id), __FILE__, __LINE__); - $TEXT = CATEGORIES_DELETED; + 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", + array($id), __FILE__, __LINE__); + $TEXT = getMessage('CATEGORIES_DELETED'); break; } } else { // Entry not saved - $TEXT .= sprintf(CATEGORY_NOT_SAVED, $id); + $TEXT .= sprintf(getMessage('CATEGORY_NOT_SAVED'), $id); } } if (isset($TEXT)) { // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $TEXT); + loadTemplate('admin_settings_saved', false, $TEXT); } -} elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Delete categories $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Load data of category - $result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); + $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); + + // Free result SQL_FREERESULT($result); // Prepare data for the row template @@ -126,20 +127,19 @@ if (REQUEST_ISSET_POST('add')) { ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_del_cats_row", true, $content); + $OUT .= loadTemplate('admin_del_cats_row', true, $content); $SW = 3 - $SW; } - define('__CAT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_del_cats"); -} elseif ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) { + loadTemplate('admin_del_cats', false, $OUT); +} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit categories $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) + foreach (postRequestElement('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); @@ -149,24 +149,23 @@ if (REQUEST_ISSET_POST('add')) { 'sw' => $SW, 'id' => $id, 'cat' => $cat, - 'vis' => ADD_SELECTION('yn', $vis, "vis", $id), + 'vis' => addSelectionBox('yn', $vis, 'vis', $id), 'sort' => $sort, ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_edit_cats_row", true, $content); + $OUT .= loadTemplate('admin_edit_cats_row', true, $content); $SW = 3 - $SW; } - define('__CAT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_edit_cats"); + loadTemplate('admin_edit_cats', false, $OUT); } else { // Init variable here $CATS = ''; // 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` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Init variables $OUT = ''; $SW = 2; @@ -182,26 +181,23 @@ if (REQUEST_ISSET_POST('add')) { $CATS .= " <option value=\"".$content['sort']."\">".$content['cat']."</option>\n"; // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_cats_row", true, $content); + $OUT .= loadTemplate('admin_config_cats_row', true, $content); $SW = 3 - $SW; - } + } // END - while // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__CAT_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE("admin_config_cats"); - } + loadTemplate('admin_config_cats', false, $OUT); + } // END - if - // @TODO Rewrite this constant - define('CATS', $CATS); + // Remember in array + $content['cats'] = $CATS; // Form to add a new category - LOAD_TEMPLATE("admin_add_cat"); + loadTemplate('admin_add_cat', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index 0aa9a13976..45029a4684 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,107 +37,67 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace commata with decimal dot - REQUEST_SET_POST('doubler_charge', convertCommaToDot((REQUEST_POST('doubler_charge') / 100))); - REQUEST_SET_POST('doubler_ref' , convertCommaToDot((REQUEST_POST('doubler_ref') / 100))); - REQUEST_SET_POST('doubler_min' , convertCommaToDot(REQUEST_POST('doubler_min'))); - REQUEST_SET_POST('doubler_max' , convertCommaToDot(REQUEST_POST('doubler_max'))); - REQUEST_SET_POST('doubler_left' , convertCommaToDot(REQUEST_POST('doubler_left'))); + setRequestPostElement('doubler_charge', convertCommaToDot((postRequestElement('doubler_charge') / 100))); + setRequestPostElement('doubler_ref' , convertCommaToDot((postRequestElement('doubler_ref') / 100))); + setRequestPostElement('doubler_min' , convertCommaToDot(postRequestElement('doubler_min'))); + setRequestPostElement('doubler_max' , convertCommaToDot(postRequestElement('doubler_max'))); + setRequestPostElement('doubler_left' , convertCommaToDot(postRequestElement('doubler_left'))); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare data for the template // - Charge rate - define('__DOUBLER_CHARGE', translateComma((getConfig('doubler_charge') * 100), false)); + $content['charge'] = translateComma((getConfig('doubler_charge') * 100), false); // - Referal rate - define('__DOUBLER_REFERRAL', translateComma((getConfig('doubler_ref') * 100), false)); + $content['referal'] = translateComma((getConfig('doubler_ref') * 100), false); // - Minimum points to double - define('__DOUBLER_MINIMUM', translateComma(getConfig('doubler_min'), false)); + $content['minimum'] = translateComma(getConfig('doubler_min'), false); // - Maximum points to double - define('__DOUBLER_MAXIMUM', translateComma(getConfig('doubler_max'), false)); + $content['maximum'] = translateComma(getConfig('doubler_max'), false); // - Points left on users account after doubling - define('__DOUBLER_LEFT', translateComma(getConfig('doubler_left'), false)); - // - Max payouts to check per click/reset - define('__DOUBLER_MAX_SENT', getConfig('doubler_max_sent')); - // - Group sending - define('__DOUBLER_GROUP_SENT', getConfig('doubler_group_sent')); - - // Take points from jackpot (Y/N) - switch (getConfig('doubler_jackpot')) { - case 'Y': - define('__DOUBLER_JACKPOT_Y', ' checked="checked"'); - define('__DOUBLER_JACKPOT_N', ''); - break; - - case 'N': - define('__DOUBLER_JACKPOT_Y', ''); - define('__DOUBLER_JACKPOT_N', ' checked="checked"'); - break; - } - - // Take points from own account (Y/N) - switch (getConfig('doubler_own')) { - case 'Y': - define('__DOUBLER_OWN_Y', ' checked="checked"'); - define('__DOUBLER_OWN_N', ''); - break; - - case 'N': - define('__DOUBLER_OWN_Y', ''); - define('__DOUBLER_OWN_N', ' checked="checked"'); - break; - } - - // Mail send mode - switch (getConfig('doubler_send_mode')) { - case 'DIRECT': - define('__DOUBLER_SEND_DIRECT', ' checked="checked"'); - define('__DOUBLER_SEND_RESET' , ''); - break; + $content['left'] = translateComma(getConfig('doubler_left'), false); - case 'RESET': - define('__DOUBLER_SEND_DIRECT', ''); - define('__DOUBLER_SEND_RESET' , ' checked="checked"'); - break; - } + // Init all Y/N selections + foreach (array('jackpot','own','sent_all') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"'; + } // END - foreach - // Take points from own account (Y/N) - switch (getConfig('doubler_sent_all')) { - case 'Y': - define('__DOUBLER_SENT_ALL_Y', ' checked="checked"'); - define('__DOUBLER_SENT_ALL_N', ''); - break; + // Init other selections + foreach (array('send_mode_direct','send_mode_reset') as $entry) { + $content[$entry] = ''; + } // END - foreach - case 'N': - define('__DOUBLER_SENT_ALL_Y', ''); - define('__DOUBLER_SENT_ALL_N', ' checked="checked"'); - break; - } + // Set current selections + foreach (array('send_mode') as $entry) { + $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"'; + } // END - foreach - // Transfer options (!!!) to __MEMBER_SELECTION - define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('doubler_uid'), false, true, true, 'doubler_uid')); + // Transfer options + $content['member_selection'] = addMemberSelectionBox(getConfig('doubler_userid'), false, true, true, 'doubler_userid'); // Number of rows to display (option lines!!!) - define('__DOUBLER_DISPLAY_NEW', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_new'))); - define('__DOUBLER_DISPLAY_PAY', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_pay'))); - define('__DOUBLER_DISPLAY_OLD', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_old'))); + foreach (array('new','pay','old') as $entry) { + $content['display_' . $entry] = generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_' . $entry)); + } // END - foreach // Timeout selection box or input box? - define('__DOUBLER_TIMEOUT', createTimeSelections(getConfig('doubler_timeout') , 'doubler_timeout' , 'WDh')); + $content['timeout_selection'] = createTimeSelections(getConfig('doubler_timeout') , 'doubler_timeout' , 'WDh'); // Load template - LOAD_TEMPLATE('admin_config_doubler'); + loadTemplate('admin_config_doubler', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 5d7c6094ba..ac3e28e78f 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,26 +37,25 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Remove empty array index -if (!REQUEST_ISSET_POST(('max'))) REQUEST_UNSET_POST(('add_max')); +if (!isPostRequestElementSet(('max'))) unsetPostRequestElement(('add_max')); -if (REQUEST_ISSET_POST(('add_max'))) { +if (isPostRequestElementSet(('add_max'))) { // Save all settings - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='%s' LIMIT 1", - array(bigintval(REQUEST_POST('max'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1", + array(bigintval(postRequestElement('max'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add this value (including comment) - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('%s','%s')", - array(bigintval(REQUEST_POST('max')), REQUEST_POST('comment')),__FILE__, __LINE__); - $content = MAX_VALUE_SAVED; + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')", + array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__); + $content = getMessage('MAX_VALUE_SAVED'); } else { // Value does alread exists! $content = "<span class=\"admin_failed\">{--MAX_VALUE_ALREADY--}</span>"; @@ -66,45 +65,44 @@ if (REQUEST_ISSET_POST(('add_max'))) { SQL_FREERESULT($result); // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif ((isFormSent()) && (REQUEST_ISSET_GET('do'))) { + loadTemplate('admin_settings_saved', false, $content); +} elseif ((isFormSent()) && (isGetRequestElementSet('do'))) { // Change or delete entries... $TEXT = ''; - foreach (REQUEST_POST('id') as $id => $value) { + foreach (postRequestElement('id') as $id => $value) { // Secure ID $id = bigintval($id); - switch (REQUEST_GET('do')) + switch (getRequestElement('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(REQUEST_POST('val', $id)), - REQUEST_POST('comm', $id), - $id + bigintval(postRequestElement('val', $id)), + postRequestElement('comm', $id), + $id ),__FILE__, __LINE__); - $TEXT = MRECEIVE_SAVED; + $TEXT = getMessage('MRECEIVE_SAVED'); break; case 'del': - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1", - array($id), __FILE__, __LINE__); - $TEXT = MRECEIVE_DELETED; + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1", + array($id), __FILE__, __LINE__); + $TEXT = getMessage('MRECEIVE_DELETED'); break; } } if (isset($TEXT)) { // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $TEXT); - } -} elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) { + loadTemplate('admin_settings_saved', false, $TEXT); + } // END - if +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Delete entries $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) - { + foreach (postRequestElement('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); @@ -118,19 +116,19 @@ if (REQUEST_ISSET_POST(('add_max'))) { ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_email_del_row", true, $content); + $OUT .= loadTemplate('admin_config_email_del_row', true, $content); $SW = 3 - $SW; } - define('__ROWS', $OUT); + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_config_email_del"); -} elseif ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) { + loadTemplate('admin_config_email_del', false, $content); +} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { + foreach (postRequestElement('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); @@ -144,15 +142,15 @@ if (REQUEST_ISSET_POST(('add_max'))) { ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_email_edit_row", true, $content); + $OUT .= loadTemplate('admin_config_email_edit_row', true, $content); $SW = 3 - $SW; } - define('__ROWS', $OUT); + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_config_email_edit"); + loadTemplate('admin_config_email_edit', false, $content); } else { - $result = SQL_QUERY("SELECT id, value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", + $result = SQL_QUERY("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List already existing entries for editing @@ -162,21 +160,21 @@ if (REQUEST_ISSET_POST(('add_max'))) { $content['sw'] = $SW; // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_email_row", true, $content); + $OUT .= loadTemplate('admin_config_email_row', true, $content); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - define('__ROWS', $OUT); + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_config_email"); + loadTemplate('admin_config_email', false, $content); } // END - if // Display form - LOAD_TEMPLATE("admin_add_max"); + loadTemplate('admin_add_max'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_extensions.php b/inc/modules/admin/what-config_extensions.php index cc3ba11687..15911d60ec 100644 --- a/inc/modules/admin/what-config_extensions.php +++ b/inc/modules/admin/what-config_extensions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,35 +37,34 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare data switch (getConfig('verbose_sql')) { case 'Y': - define('__VERBOSE_Y', ' checked="checked"'); - define('__VERBOSE_N', ''); + $content['verbose_y'] = ' checked="checked"'; + $content['verbose_n'] = ''; break; case 'N': - define('__VERBOSE_Y', ''); - define('__VERBOSE_N', ' checked="checked"'); + $content['verbose_y'] = ''; + $content['verbose_n'] = ' checked="checked"'; break; - } + } // END - switch // Load template - LOAD_TEMPLATE("admin_config_extensions"); + loadTemplate('admin_config_extensions', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_holiday.php b/inc/modules/admin/what-config_holiday.php index 4b28ce9e57..0530be13b0 100644 --- a/inc/modules/admin/what-config_holiday.php +++ b/inc/modules/admin/what-config_holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,37 +37,28 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare constants for the template - define('__MAX_VALUE', getConfig('holiday_max')); - define('__LOCKED' , createTimeSelections(getConfig('holiday_lock') , "holiday_lock" , "WDh")); - - switch (getConfig('holiday_mode')) { - case 'RESET': - define('__RESET_DEFAULT' , ' checked="checked"'); - define('__DIRECT_DEFAULT', ''); - break; + $content['holiday_locked'] = createTimeSelections(getConfig('holiday_lock') , 'holiday_lock' , 'WDh'); - case 'DIRECT': - define('__RESET_DEFAULT' , ''); - define('__DIRECT_DEFAULT', ' checked="checked"'); - break; - } + // Set all entries + foreach (array('holiday_mode') as $entry) { + $content[$entry . '_' . strtolower(getConfig('holiday_mode'))] = ' checked="checked"'; + } // END - if // Load form template - LOAD_TEMPLATE("admin_config_holiday"); + loadTemplate('admin_config_holiday', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index 60a7b8fb40..3895c3bebc 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,44 +37,47 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init 'sub' value $sub = ''; -if (REQUEST_ISSET_GET('sub')) $sub = REQUEST_GET('sub'); +if (isGetRequestElementSet('sub')) $sub = getRequestElement('sub'); -switch ($sub) -{ - case "settings": // Settings related to the index page +switch ($sub) { + case 'settings': // Settings related to the index page if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); - OUTPUT_HTML("<a href=\"{?URL?}/modules.php?module=admin&what=config_home&sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>"); + adminSaveSettingsFromPostData(); + + // Display continue link + loadTemplate('admin_settings_saved', false, "<a href=\"{?URL?}/modules.php?module=admin&what=config_home&sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>"); } else { // Prepare data for the template $content = array_fill(-1, 60, ''); $content[getConfig('index_delay')] = ' selected="selected"'; - define('__INDEX_COOKIE_SELECTION', createTimeSelections(getConfig('index_cookie'), "index_cookie", "YMWD")); - LOAD_TEMPLATE("admin_config_home_settings", false, $content); + // Generate selection + $content['cookie_selection'] = createTimeSelections(getConfig('index_cookie'), 'index_cookie', 'YMWD'); + + // Output form + loadTemplate('admin_config_home_settings', false, $content); } break; - case "target": // Set which what-file will be placed in home-page (only modules.php?module=index) - if (REQUEST_ISSET_GET(('home'))) { + case 'target': // Set which what-file will be placed in home-page (only modules.php?module=index) + if (isGetRequestElementSet(('home'))) { // Set new home - updateConfiguration('index_home', REQUEST_GET(('home'))); + updateConfiguration('index_home', getRequestElement(('home'))); } // END - if // 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__); @@ -85,21 +88,21 @@ ORDER BY `sort` ASC", __FILE__, __LINE__); // Process all entries while ($content = SQL_FETCHARRAY($result)) { // Link for setting 'what' as new "home" - $LINK = "<a href=\"{?URL?}/modules.php?module=admin&what=config_home&sub=target&home=".$content['what']."\">{--_IS_NEW_HOME--}</a>"; + $newHomeLink = "<a href=\"{?URL?}/modules.php?module=admin&what=config_home&sub=target&home=".$content['what']."\">{--_IS_NEW_HOME--}</a>"; // Is this current home? if ($content['what'] == getConfig('index_home')) { // Is current home - $LINK = "<div class=\"admin_note\">{!_IS_CURRENT_HOME!}</div>"; - $content['title'] = "<div class=\"admin_note\">".$content['title']."</div>"; + $newHomeLink = "<div class=\"admin_mark\">{--_IS_CURRENT_HOME--}</div>"; + $content['title'] = "<div class=\"admin_mark\">".$content['title']."</div>"; } // END - if // Prepare content $content['sw'] = $SW; - $content['link'] = $LINK; + $content['link'] = $newHomeLink; // Load row template - $OUT .= LOAD_TEMPLATE("admin_config_home_row", true, $content); + $OUT .= loadTemplate('admin_config_home_row', true, $content); // Switch color $SW = 3 - $SW; @@ -107,17 +110,16 @@ ORDER BY `sort` ASC", __FILE__, __LINE__); // Free memory SQL_FREERESULT($result); - define('__HOME_ROWS', $OUT); // Load template - LOAD_TEMPLATE("admin_config_home"); + loadTemplate('admin_config_home', false, $OUT); break; default: // Output selection table - LOAD_TEMPLATE("admin_config_home_main"); + loadTemplate('admin_config_home_main'); break; } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_imprint.php b/inc/modules/admin/what-config_imprint.php new file mode 100644 index 0000000000..3957a3ed86 --- /dev/null +++ b/inc/modules/admin/what-config_imprint.php @@ -0,0 +1,81 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * ================ Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : what-config_imprint.php * + * -------------------------------------------------------------------- * + * Short description : Configuration for the imprint * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Konfiguration des Impressums * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('admin', __FILE__); + +// Form sent? +if (isFormSent()) { + // Handle form ... +} else { + // Query for all imprint data rows + $result = SQL_QUERY('SELECT `imprint_key`,`imprint_value` FROM `{?_MYSQL_PREFIX?}_imprint_data` ORDER BY `imprint_id` ASC', __FILE__, __LINE__); + + // Do we have entries? + if (SQL_NUMROWS($result) > 0) { + // Load all entries + $OUT = ''; $SW = 2; + while ($content = SQL_FETCHARRAY($result)) { + // Add more data + $content['sw'] = $SW; + + // Load row template + $OUT .= loadTemplate('admin_list_imprint_row', true, $content); + + // Switch color + $SW = 3 - $SW; + } // END - while + + // Transfer all rows to $content + $content = $OUT; + } else { + // None found! + $content = loadTemplate('admin_list_imprint_row_none', true); + } + + // Load template + loadTemplate('admin_list_imprint', false, $content); +} + +// [EOF] +?> diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 45ff327457..849e8792d9 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,60 +37,56 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Test timestamp - $STAMP = mktime(0, 0, 0, bigintval(REQUEST_POST('month')), bigintval(REQUEST_POST('day')), bigintval(REQUEST_POST('year'))); + $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('month')), bigintval(postRequestElement('day')), bigintval(postRequestElement('year'))); if ($STAMP > time()) { // Date is in the future! - REQUEST_UNSET_POST('ok'); + unsetPostRequestElement('ok'); } else { // Remove entries - REQUEST_UNSET_POST('day'); - REQUEST_UNSET_POST('month'); - REQUEST_UNSET_POST('year'); + unsetPostRequestElement('day'); + unsetPostRequestElement('month'); + unsetPostRequestElement('year'); // Remember timestamp - REQUEST_SET_POST('mt_start', $STAMP); + setRequestPostElement('mt_start', $STAMP); } // Convert some data - REQUEST_SET_POST('mt_stage', bigintval(REQUEST_POST('mt_stage'))); - if (REQUEST_POST('mt_stage') <= GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true)) { + setRequestPostElement('mt_stage', bigintval(postRequestElement('mt_stage'))); + if (postRequestElement('mt_stage') <= countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)) { // Not enougth! - REQUEST_UNSET_POST('ok'); + unsetPostRequestElement('ok'); } } if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Start of this exchange if (getConfig('mt_start') > 0) { // Only show start - define('__MT_START', '<strong>' . generateDateTime(getConfig('mt_start'), '3') . '</strong>'); + $content['mt_start'] = '<strong>' . generateDateTime(getConfig('mt_start'), '3') . '</strong>'; } else { // Make start editable - define('__MT_START', - ADD_SELECTION('day' , date('d', time())). - ADD_SELECTION('month', date('m', time())). - ADD_SELECTION('year', -1) - ); + $content['mt_start'] = + addSelectionBox('day' , date('d', time())). + addSelectionBox('month', date('m', time())). + addSelectionBox('year', -1) + ; } - // Next stage of this MT - define('__MT_STAGE', getConfig('mt_stage')); - // Load template - LOAD_TEMPLATE('admin_config_mediadata'); + loadTemplate('admin_config_mediadata', false, $content); } // diff --git a/inc/modules/admin/what-config_menu.php b/inc/modules/admin/what-config_menu.php new file mode 100644 index 0000000000..330a7900ff --- /dev/null +++ b/inc/modules/admin/what-config_menu.php @@ -0,0 +1,63 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/21/2009 * + * ================ Last change: 10/21/2009 * + * * + * -------------------------------------------------------------------- * + * File : what-config_menu.php * + * -------------------------------------------------------------------- * + * Short description : Configuration * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Einstellungen * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('admin', __FILE__); + +if (isFormSent()) { + // Save settings + adminSaveSettingsFromPostData(); +} else { + // Set all entries + foreach (array('guest_menu_advert_enabled','member_menu_advert_enabled') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - if + + // Load form template + loadTemplate('admin_config_menu', false, $content); +} + +// [EOF] +?> diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index 2ff24a213a..8d6c362fec 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,16 +37,15 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); $SEL = 0; -if (REQUEST_ISSET_POST('edit')) { +if (isPostRequestElementSet('edit')) { // Check if at least one module is selected $SEL = countPostSelection(); if ($SEL > 0) { @@ -54,9 +53,9 @@ if (REQUEST_ISSET_POST('edit')) { $OUT = ''; $SW = 2; // Edit selected modules - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('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); @@ -67,64 +66,63 @@ if (REQUEST_ISSET_POST('edit')) { 'mod' => $mod, 'id' => $id, 'title' => $title, - 'locked' => ADD_SELECTION('yn', $locked, 'locked', $id), - 'hidden' => ADD_SELECTION('yn', $hidden, 'hidden', $id), - 'admin' => ADD_SELECTION('yn', $admin , 'admin' , $id), - 'mem' => ADD_SELECTION('yn', $mem , 'member', $id), + 'locked' => addSelectionBox('yn', $locked, 'locked', $id), + 'hidden' => addSelectionBox('yn', $hidden, 'hidden', $id), + 'admin' => addSelectionBox('yn', $admin , 'admin' , $id), + 'mem' => addSelectionBox('yn', $mem , 'member', $id), ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_mods_edit_row', true, $content); + $OUT .= loadTemplate('admin_mods_edit_row', true, $content); } - define('__MODS_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_mods_edit'); + loadTemplate('admin_mods_edit', false, $OUT); } else { // Nothing selected - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MODS_NOTHING_SELECTED')); + loadTemplate('admin_settings_saved', false, getMessage('MODS_NOTHING_SELECTED')); // Remove maybe confusing data - REQUEST_UNSET_POST('edit'); - REQUEST_UNSET_POST('change'); + unsetPostRequestElement('edit'); + unsetPostRequestElement('change'); } -} elseif (REQUEST_ISSET_POST('change')) { +} elseif (isPostRequestElementSet('change')) { // Init SQLs - INIT_SQLS(); + initSqls(); // Change modules - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure ID number $id = bigintval($id); // Update module - ADD_SQL(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( - REQUEST_POST('title', $id), - REQUEST_POST('locked', $id), - REQUEST_POST('hidden', $id), - REQUEST_POST('admin', $id), - REQUEST_POST('member', $id), - $id - ), __FILE__, __LINE__, false)); + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='%s', `locked`='%s', `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE `id`=%s LIMIT 1", + array( + postRequestElement('title', $id), + postRequestElement('locked', $id), + postRequestElement('hidden', $id), + postRequestElement('admin', $id), + postRequestElement('member', $id), + $id + ), __FILE__, __LINE__, false)); } // Run all sqls runFilterChain('run_sqls'); // Remove cache file if version matches - if (GET_EXT_VERSION('cache') >= '0.1.2') { - if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile(); + if (getExtensionVersion('cache') >= '0.1.2') { + if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if // Entries updated - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MODS_CHANGED')); + loadTemplate('admin_settings_saved', false, getMessage('MODS_CHANGED')); } if ($SEL == 0) { // Load module data (We do not need to check if there's at least one...) $result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only -FROM `{!_MYSQL_PREFIX!}_mod_reg` +FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY module', __FILE__, __LINE__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { @@ -149,7 +147,7 @@ ORDER BY module', __FILE__, __LINE__); ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_mods_list_row', true, $content); + $OUT .= loadTemplate('admin_list_mods_row', true, $content); // Switch colors $SW = 3 - $SW; @@ -158,12 +156,9 @@ ORDER BY module', __FILE__, __LINE__); // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__MODS_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_mods_list'); + loadTemplate('admin_list_mods', false, $OUT); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_newsletter.php b/inc/modules/admin/what-config_newsletter.php index ed72a5e667..46d1846205 100644 --- a/inc/modules/admin/what-config_newsletter.php +++ b/inc/modules/admin/what-config_newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,26 +37,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { - // Save data - REQUEST_SET_POST('nl_charge', convertCommaToDot(REQUEST_POST('nl_charge'))); - - ADMIN_SAVE_SETTINGS_POST(); + // Save settings + adminSaveSettingsFromPostData(); } else { - // Prepare contants for the template - define('__CHARGE_VALUE' , translateComma(getConfig('nl_charge'), false)); - // Prepare constants and load template - LOAD_TEMPLATE("admin_config_newsletter", false); + loadTemplate('admin_config_newsletter'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_nickname.php b/inc/modules/admin/what-config_nickname.php index 35e56fcc1b..071b798cb0 100644 --- a/inc/modules/admin/what-config_nickname.php +++ b/inc/modules/admin/what-config_nickname.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,21 +37,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Load template - LOAD_TEMPLATE("admin_config_nickname"); + loadTemplate('admin_config_nickname'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_order.php b/inc/modules/admin/what-config_order.php index 3c1032bcfb..9f6049d900 100644 --- a/inc/modules/admin/what-config_order.php +++ b/inc/modules/admin/what-config_order.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,101 +37,38 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Prepare constants for the template - switch (getConfig('order_max_full')) { - case 'ORDER': - define('__ORDER_DEFAULT', ' checked="checked"'); - define('__MAX_DEFAULT' , ''); - break; - - case 'MAX': - define('__ORDER_DEFAULT', ''); - define('__MAX_DEFAULT' , ' checked="checked"'); - break; - } - - // Minimum mails / order - define('__MIN_VALUE', getConfig('order_min')); - - // Sorting mode (ascending / descending) - switch (getConfig('order_mode')) { - case 'ASC': - define('__ASC_DEFAULT' , ' selected="selected"'); - define('__DESC_DEFAULT', ''); - break; - - case 'DESC': - define('__ASC_DEFAULT' , ''); - define('__DESC_DEFAULT', ' selected="selected"'); - break; - } - - // Transfer other config data into constants for the template - define('_CFG_UNCONFIRMED' , getConfig('unconfirmed')); - define('_CFG_MAX_TLENGTH' , getConfig('max_tlength')); - - if (getConfig('test_text') != 'Y') { - define('_CFG_TEST_TEXT_N', ' checked="checked"'); - define('_CFG_TEST_TEXT_Y', ''); - } else { - define('_CFG_TEST_TEXT_N', ''); - define('_CFG_TEST_TEXT_Y', ' checked="checked"'); - } - - switch (getConfig('repay_deleted_mails')) { - case 'REPAY': - define('_CFG_REPAY_POINTS_REPAY' , ' selected="selected"'); - define('_CFG_REPAY_POINTS_JACKPOT', ''); - define('_CFG_REPAY_POINTS_SHRED' , ''); - break; - - case 'JACKPOT': - define('_CFG_REPAY_POINTS_REPAY' , ''); - define('_CFG_REPAY_POINTS_JACKPOT', ' selected="selected"'); - define('_CFG_REPAY_POINTS_SHRED' , ''); - break; - - case 'SHRED': - define('_CFG_REPAY_POINTS_REPAY' , ''); - define('_CFG_REPAY_POINTS_JACKPOT', ''); - define('_CFG_REPAY_POINTS_SHRED' , ' selected="selected"'); - break; - } + // Init all selection entries + foreach (array('order_max_full_order', 'order_max_full_max', 'order_mode_asc', 'order_mode_desc', 'test_text_y', 'test_text_n', 'test_subj_y', 'test_subj_n', 'url_blacklist_y', 'url_blacklist_n', 'repay_deleted_mails_repay', 'repay_deleted_mails_jackpot', 'repay_deleted_mails_shred') as $entry) { + $content[$entry] = ''; + } // END - foreach - if (getConfig('test_subj') != 'Y') { - define('_CFG_TEST_SUBJ_N', ' checked="checked"'); - define('_CFG_TEST_SUBJ_Y', ''); - } else { - define('_CFG_TEST_SUBJ_N', ''); - define('_CFG_TEST_SUBJ_Y', ' checked="checked"'); - } + // Set all default checks + foreach (array('order_max_full', 'order_mode', 'test_text', 'test_subj', 'url_blacklist') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach - if (getConfig('url_blacklist') != 'Y') { - define('_CFG_URL_BLIST_N', ' checked="checked"'); - define('_CFG_URL_BLIST_Y', ''); - } else { - define('_CFG_URL_BLIST_N', ''); - define('_CFG_URL_BLIST_Y', ' checked="checked"'); - } + // Set all default selections + foreach (array('repay_deleted_mails') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Selection list - define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST(getConfig('order_select'))); + $content['order_select'] = addOrderSelectionOptions(getConfig('order_select')); // Load template - LOAD_TEMPLATE('admin_config_order'); + loadTemplate('admin_config_order', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index d6bca2db09..54226ccbc5 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,157 +37,81 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('other')) { - // Missing extension! - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('other')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('other')) { + // Missing extension! + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('other')); + return; +} // END - if // Stop saving data if one input field is !isset if (isFormSent()) { // Calculate stamps and set calculated stamps - REQUEST_POST('online_timeout') = createTimestampFromSelections('ip_timeout' , REQUEST_POST_ARRAY()); - REQUEST_POST('url_tlock') = createTimestampFromSelections('url_tlock' , REQUEST_POST_ARRAY()); - REQUEST_POST('profile_lock') = createTimestampFromSelections('profile_lock' , REQUEST_POST_ARRAY()); - REQUEST_POST('profile_update') = createTimestampFromSelections('profile_update' , REQUEST_POST_ARRAY()); - REQUEST_SET_POST('resend_profile_update', createTimestampFromSelections('resend_profile_update', REQUEST_POST_ARRAY())); + setRequestPostElement('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray())); + setRequestPostElement('url_tlock' , createTimestampFromSelections('url_tlock' , postRequestArray())); + setRequestPostElement('profile_lock' , createTimestampFromSelections('profile_lock' , postRequestArray())); + setRequestPostElement('profile_update' , createTimestampFromSelections('profile_update' , postRequestArray())); + setRequestPostElement('resend_profile_update', createTimestampFromSelections('resend_profile_update', postRequestArray())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... - if (!REQUEST_ISSET_POST(('online_timeout'))) { REQUEST_UNSET_POST('ok'); } + if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } // Chedck other timestamps (which can be zero!) - if (!REQUEST_ISSET_POST(('profile_lock'))) { REQUEST_UNSET_POST('ok'); } - if (!REQUEST_ISSET_POST(('url_tlock'))) { REQUEST_UNSET_POST('ok'); } - if (!REQUEST_ISSET_POST(('profile_update'))) { REQUEST_UNSET_POST('ok'); } - if (!REQUEST_ISSET_POST(('resend_profile_update'))) { REQUEST_UNSET_POST('ok'); } + if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('profile_update')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); } // Check other settings - if (!REQUEST_ISSET_POST(('max_send'))) { REQUEST_UNSET_POST('ok'); } - if (!REQUEST_ISSET_POST(('code_length'))) { REQUEST_UNSET_POST('ok'); } - if (!REQUEST_ISSET_POST(('reject_url'))) { REQUEST_UNSET_POST('ok'); } + if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('code_length')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('reject_url')) { unsetPostRequestElement('ok'); } } if (isFormSent()) { // Update stamps directly - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Transfer config data into constants for the template - define('_CFG_CODE_LENGTH', getConfig('code_length')); - define('_CFG_ACT_SYSTEM' , getConfig('activate_xchange')); - define('_CFG_MAX_SEND' , getConfig('max_send')); - define('_CFG_REJECT_URL' , getConfig('reject_url')); - define('_CFG_MIN_AGE' , getConfig('min_age')); - // Time selection boxes - define('_CFG_ONLINE_TIMEOUT', createTimeSelections(getConfig('online_timeout'), 'ip_timeout' , 'ms')); - define('_CFG_URL_TLOCK' , createTimeSelections(getConfig('url_tlock') , 'url_tlock' , 'WDh')); - define('_CFG_PROFILE_LOCK' , createTimeSelections(getConfig('profile_lock') , 'profile_lock' , 'WDh')); - define('_CFG_PROFILE_UPDATE', createTimeSelections(getConfig('profile_update'), 'profile_update' , 'YM')); - define('_CFG_PROF_REUPDATE' , createTimeSelections(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD')); - - if (getConfig('order_multi_page') != 'Y') { - define('_CFG_ORDER_MULTI_N', ' checked="checked"'); - define('_CFG_ORDER_MULTI_Y', ''); - } else { - define('_CFG_ORDER_MULTI_N', ''); - define('_CFG_ORDER_MULTI_Y', ' checked="checked"'); - } - - if (getConfig('autosend_active') != 'Y') { - define('_CFG_AUTOSEND_ACTIVE_N', ' checked="checked"'); - define('_CFG_AUTOSEND_ACTIVE_Y', ''); - } else { - define('_CFG_AUTOSEND_ACTIVE_N', ''); - define('_CFG_AUTOSEND_ACTIVE_Y', ' checked="checked"'); - } - - if (getConfig('send_prof_update') != 'Y') { - define('_CFG_SEND_UPDATE_N', ' checked="checked"'); - define('_CFG_SEND_UPDATE_Y', ''); - } else { - define('_CFG_SEND_UPDATE_N', ''); - define('_CFG_SEND_UPDATE_Y', ' checked="checked"'); - } - - if (getConfig('admin_notify') != 'Y') { - define('_CFG_ADMIN_NOTIFY_N', ' checked="checked"'); - define('_CFG_ADMIN_NOTIFY_Y', ''); - } else { - define('_CFG_ADMIN_NOTIFY_N', ''); - define('_CFG_ADMIN_NOTIFY_Y', ' checked="checked"'); - } - - if (getConfig('css_php') == 'DIRECT') { - define('_CFG_CSS_PHP_DIRECT', ' checked="checked"'); - define('_CFG_CSS_PHP_FILE', ''); - } else { - define('_CFG_CSS_PHP_DIRECT', ''); - define('_CFG_CSS_PHP_FILE', ' checked="checked"'); - } - - if (getConfig('guest_menu') == 'Y') { - define('_CFG_GUEST_MENU_ACTIVE', ' checked="checked"'); - define('_CFG_GUEST_MENU_INACTIVE', ''); - } else { - define('_CFG_GUEST_MENU_ACTIVE', ''); - define('_CFG_GUEST_MENU_INACTIVE', ' checked="checked"'); - } - - if (getConfig('member_menu') == 'Y') { - define('_CFG_MEMBER_MENU_ACTIVE', ' checked="checked"'); - define('_CFG_MEMBER_MENU_INACTIVE', ''); - } else { - define('_CFG_MEMBER_MENU_ACTIVE', ''); - define('_CFG_MEMBER_MENU_INACTIVE', ' checked="checked"'); - } - - if (getConfig('youre_here') == 'Y') { - define('_CFG_YOURE_HERE_ACTIVE', ' checked="checked"'); - define('_CFG_YOURE_HERE_INACTIVE', ''); - } else { - define('_CFG_YOURE_HERE_ACTIVE', ''); - define('_CFG_YOURE_HERE_INACTIVE', ' checked="checked"'); - } - - if (getConfig('show_timings') == 'Y') { - define('_CFG_SHOW_TIMINGS_Y', ' checked="checked"'); - define('_CFG_SHOW_TIMINGS_N', ''); - } else { - define('_CFG_SHOW_TIMINGS_Y', ''); - define('_CFG_SHOW_TIMINGS_N', ' checked="checked"'); - } - - if (getConfig('show_points_unconfirmed') == 'Y') { - define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', ' checked="checked"'); - define('_CFG_SHOW_POINTS_UNCONFIRMED_N', ''); - } else { - define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', ''); - define('_CFG_SHOW_POINTS_UNCONFIRMED_N', ' checked="checked"'); - } - - if (getConfig('mailid_error_redirect') == 'INDEX') { - define('_CFG_MAILID_REDIRECT_INDEX', ' checked="checked"'); - define('_CFG_MAILID_REDIRECT_REJECT', ''); - } else { - define('_CFG_MAILID_REDIRECT_INDEX', ''); - define('_CFG_MAILID_REDIRECT_REJECT', ' checked="checked"'); - } + $content['online_timeout'] = createTimeSelections(getConfig('online_timeout'), 'ip_timeout' , 'ms'); + $content['url_tlock'] = createTimeSelections(getConfig('url_tlock') , 'url_tlock' , 'WDh'); + $content['profile_lock'] = createTimeSelections(getConfig('profile_lock') , 'profile_lock' , 'WDh'); + $content['profile_update'] = createTimeSelections(getConfig('profile_update'), 'profile_update' , 'YM'); + $content['profile_reupdate'] = createTimeSelections(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD'); + + // Prepare more Y/N selections + foreach(array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach + + // Prepare more + foreach (array('css_php_direct','css_php_file','css_php_inline','mailid_error_redirect_index','mailid_error_redirect_reject') as $entry) { + $content[$entry] = ''; + } // END - foreach + + // Set selections + foreach (array('css_php','mailid_error_redirect') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach for ($i = 0; $i <= 5; $i++) { - $eval = "define('_COMMA_DEF_".$i."', \"\");"; - if (getConfig('max_comma') == $i) $eval = "define('_COMMA_DEF_".$i."', ' selected=\"selected\"');"; - eval($eval); - } + $content['comma_def_' . $i] = ''; + } // END - for + + // Set selection + $content['comma_def_' . getConfig('max_comma')] = ' selected="selected"'; // Load template - LOAD_TEMPLATE("admin_config_other"); + loadTemplate('admin_config_other', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index a9f5b9fa80..526b80d334 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,36 +37,35 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_POST('rate')) REQUEST_SET_POST('rate', convertCommaToDot(REQUEST_POST('rate'))); +if (isPostRequestElementSet('rate')) setRequestPostElement('rate', convertCommaToDot(postRequestElement('rate'))); -if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('title')) && (REQUEST_POST('rate') > 0)) { +if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) { // Add new payout type - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE type='%s' LIMIT 1", - array(REQUEST_POST('title')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1", + array(postRequestElement('title')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // 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( - REQUEST_POST('title'), - bigintval(REQUEST_POST('rate')), - bigintval(REQUEST_POST('mpoi')), - REQUEST_POST('yacc'), - REQUEST_POST('ypass'), - REQUEST_POST('yurl'), - REQUEST_POST('yrdone'), - REQUEST_POST('yrfailed'), - REQUEST_POST('ytrans'), - REQUEST_POST('allow_url'), + postRequestElement('title'), + bigintval(postRequestElement('rate')), + bigintval(postRequestElement('mpoi')), + postRequestElement('yacc'), + postRequestElement('ypass'), + postRequestElement('yurl'), + postRequestElement('yrdone'), + postRequestElement('yrfailed'), + postRequestElement('ytrans'), + postRequestElement('allow_url'), ), __FILE__, __LINE__); // Get message @@ -81,34 +80,34 @@ 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 ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) { +if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit payout types - if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == 'ok')) { + if ((isGetRequestElementSet('ok')) && (getRequestElement('ok') == 'ok')) { // Init SQLs - INIT_SQLS(); + initSqls(); // Edit entries - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure ID $id = bigintval($id); // Edit only if something is entered - if ((REQUEST_ISSET_POST('title', $id)) && (REQUEST_POST('rate', $id) > 0)) { + if ((isPostRequestElementSet('title', $id)) && (postRequestElement('rate', $id) > 0)) { // Update entry - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_payout_types` SET + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_payout_types` SET type='%s', rate=%s, min_points=%s, allow_url='%s' WHERE `id`='".$id."' LIMIT 1", array( - REQUEST_POST('title', $id), - convertCommaToDot(REQUEST_POST('rate', $id)), - convertCommaToDot(REQUEST_POST('mpoi' , $id)), - REQUEST_POST('allow', $id), + postRequestElement('title', $id), + convertCommaToDot(postRequestElement('rate', $id)), + convertCommaToDot(postRequestElement('mpoi' , $id)), + postRequestElement('allow', $id), ),__FILE__, __LINE__, false)); } } @@ -121,9 +120,9 @@ WHERE `id`='".$id."' LIMIT 1", } else { $display = false; //Suppress any other outputs $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('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); @@ -132,32 +131,29 @@ WHERE `id`='".$id."' LIMIT 1", $content = array( 'sw' => $SW, 'id' => $id, - 'title' => COMPILE_CODE($title), + 'title' => $title, 'rate' => translateComma($rate), 'mpoi' => translateComma($mpoi), - 'allow' => ADD_SELECTION('yn', $allow, "allow[".$id."]"), + 'allow' => addSelectionBox('yn', $allow, "allow[".$id."]"), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_config_payouts_edit_row', true, $content); + $OUT .= loadTemplate('admin_config_payouts_edit_row', true, $content); $SW = 3 - $SW; } - // @TODO Rewrite this constant - define('__PAYOUT_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_config_payouts_edit'); + loadTemplate('admin_config_payouts_edit', false, $OUT); } -} elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Delete payout types - if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == 'ok')) { + if ((isGetRequestElementSet('ok')) && (getRequestElement('ok') == 'ok')) { // Init SQLs - INIT_SQLS(); + initSqls(); // Delete entries - foreach (REQUEST_POST('sel') as $id => $sel) { - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $sel) { + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); } // END - foreach @@ -169,12 +165,12 @@ WHERE `id`='".$id."' LIMIT 1", } else { $display = false; //Suppress any other outputs $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure ID number $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); @@ -183,32 +179,31 @@ WHERE `id`='".$id."' LIMIT 1", $content = array( 'sw' => $SW, 'id' => $id, - 'title' => COMPILE_CODE($title), + 'title' => $title, 'rate' => translateComma($rate), 'mpoi' => translateComma($mpoi), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_config_payouts_del_row', true, $content); + $OUT .= loadTemplate('admin_config_payouts_del_row', true, $content); $SW = 3 - $SW; } - define('__PAYOUT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_config_payouts_del'); + loadTemplate('admin_config_payouts_del', false, $OUT); } } if (!empty($message)) { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if // Payout types $result_type = SQL_QUERY("SELECT `id`, `type`, `rate`, `min_points`, `from_account` FROM - `{!_MYSQL_PREFIX!}_payout_types` + `{?_MYSQL_PREFIX?}_payout_types` ORDER BY `type` ASC", __FILE__, __LINE__); @@ -217,44 +212,42 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_type)) { // Prepare data for the row template + // @TODO Rewrite in template: mpoi->min_points,from->from_account $content = array( 'sw' => $SW, 'id' => $content['id'], - 'from' => COMPILE_CODE($content['from_account']), - 'type' => COMPILE_CODE($content['type']), + 'from' => $content['from_account'], + 'type' => $content['type'], 'rate' => translateComma($content['rate']), 'mpoi' => translateComma($content['min_points']), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_config_payouts_row', true, $content); + $OUT .= loadTemplate('admin_config_payouts_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result_type); - // @TODO Rewrite this constant - define('__PAYOUT_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_config_payouts'); + loadTemplate('admin_config_payouts', false, $OUT); } // Does your members request payouts? if ((SQL_NUMROWS($result_mem) > 0) && ($display)) { // Members has requested payouts - LOAD_TEMPLATE('admin_settings_saved', false, "<a href=\"{?URL?}/modules.php?module=admin&what=list_payouts\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>"); + loadTemplate('admin_settings_saved', false, "<a href=\"{?URL?}/modules.php?module=admin&what=list_payouts\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>"); } elseif ($display) { // No member requests so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS')); } // Free result SQL_FREERESULT($result_mem); // Add new paypout type -if ($display === true) LOAD_TEMPLATE('admin_payout_add_new'); +if ($display === true) loadTemplate('admin_payout_add_new'); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 6be930611a..53cbc18472 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,72 +37,71 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init variables $message = ''; // Is the 'sub' parameter set? -if (REQUEST_ISSET_GET('sub')) { +if (isGetRequestElementSet('sub')) { // Yes, then do some sanity-checks - switch (REQUEST_GET('sub')) { + switch (getRequestElement('sub')) { case 'points': - if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) { - REQUEST_UNSET_POST('ok'); + if ((!isPostRequestElementSet(('points_register'))) || (!isPostRequestElementSet(('points_ref')))) { + unsetPostRequestElement('ok'); } break; case 'ref': - if (REQUEST_ISSET_GET('do')) { - if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) { - REQUEST_UNSET_POST('ok'); + if (isGetRequestElementSet('do')) { + if (((!isPostRequestElementSet(('level'))) || (!isPostRequestElementSet(('perc')))) && (getRequestElement('do') == 'add')) { + unsetPostRequestElement('ok'); } } break; } } else { // Display overview - REQUEST_SET_GET('sub', 'overview'); + setRequestGetElement('sub', 'overview'); } if (isFormSent()) { - INIT_SQLS(); - switch (REQUEST_GET('sub')) { + initSqls(); + switch (getRequestElement('sub')) { case 'points': - updateConfiguration(array('points_register', 'points_ref'), array(REQUEST_POST('points_register'), REQUEST_POST('points_ref'))); + updateConfiguration(array('points_register', 'points_ref'), array(postRequestElement('points_register'), postRequestElement('points_ref'))); break; case 'ref': - switch (REQUEST_GET('do')) + switch (getRequestElement('do')) { case 'add': - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')"); + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (level, percents) VALUES ('".postRequestElement('level')."','".postRequestElement('perc')."')"); break; case 'edit': // Change entries - foreach (REQUEST_POST('lvl') as $id => $value) { + foreach (postRequestElement('level') as $id => $value) { // Secure ID $id = bigintval($id); // Revert german commata - REQUEST_SET_POST('perc', array($id => convertCommaToDot(REQUEST_POST('perc', $id)))); + setRequestPostElement('perc', array($id => convertCommaToDot(postRequestElement('perc', $id)))); // Update entry - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1", - array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1", + array(bigintval($value), postRequestElement('perc', $id), $id), __FILE__, __LINE__); } $message = getMessage('REF_DEPTHS_SAVED'); break; case 'del': - foreach (REQUEST_POST('id') as $id => $value) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('id') as $id => $value) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } $message = getMessage('REF_DEPTHS_DELETED'); @@ -110,38 +109,38 @@ if (isFormSent()) { } // Update cache file - if (GET_EXT_VERSION('cache') >= '0.1.2') { - if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile(); + if (getExtensionVersion('cache') >= '0.1.2') { + if ($GLOBALS['cache_instance']->loadCacheFile('refdepths')) $GLOBALS['cache_instance']->removeCacheFile(); } break; - case "settings": - $REF = bigintval(REQUEST_POST('ref_payout')); - updateConfiguration( - array('allow_direct_pay', 'reg_points_mode', 'ref_payout'), - array(REQUEST_POST('allow_direct_pay'), REQUEST_POST('reg_points_mode'), $REF) - ); - if ((getConfig('ref_payout') == 0) && (REQUEST_POST('ref_payout') > 0)) { - // Update account's ref_payout for "must-confirm" - ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) + case 'settings': + $REF = bigintval(postRequestElement('ref_payout')); + updateConfiguration( + array('allow_direct_pay', 'reg_points_mode', 'ref_payout'), + array(postRequestElement('allow_direct_pay'), postRequestElement('reg_points_mode'), $REF) + ); + if ((getConfig('ref_payout') == 0) && (postRequestElement('ref_payout') > 0)) { + // Update account's ref_payout for "must-confirm" + addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) WHERE `mails_confirmed` < %s", $REF, $REF)); - } elseif ((getConfig('ref_payout') > 0) && (REQUEST_POST('ref_payout') == 0)) { - // Update account's ref_payout for "not-must-confirm" - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET `locked_points`=0 WHERE `locked_points` > 0"); - } - break; + } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == 0)) { + // Update account's ref_payout for "not-must-confirm" + addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `locked_points`=0 WHERE `locked_points` > 0"); + } + break; } - if ((IS_SQLS_VALID()) && (IS_SQLS_VALID())) { - if (strpos($GLOBALS['sqls'][0], "INSERT") > -1) { - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1", - array(bigintval(REQUEST_POST('lvl'))), __FILE__, __LINE__); + if ((isSqlsValid()) && (isSqlsValid())) { + if (strpos($GLOBALS['sqls'][0], 'INSERT') > -1) { + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE level='%s' LIMIT 1", + array(bigintval(postRequestElement('level'))), __FILE__, __LINE__); SQL_FREERESULT($result); } // END - if - if (COUNT_SQLS() > 0) { + if (countSqls() > 0) { // Run all SQL commands runFilterChain('run_sqls'); @@ -149,109 +148,91 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); $message = getMessage('SETTINGS_SAVED'); // Destroy config cache file here... - rebuildCacheFiles("config", "config"); + rebuildCacheFile('config', 'config'); } else { // Prepare failed-message $message = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>"; } // Remove SQL queries - UNSET_SQLS(); + unsetSqls(); } // Shall we display a message? if (!empty($message)) { // When do so... - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } -} elseif (REQUEST_GET('sub') == "settings") { +} elseif (getRequestElement('sub') == 'settings') { // Setup some settings like direct pay and so on // Including new add-mode for one-time referal bonus - switch (getConfig('allow_direct_pay')) { - case 'Y': - define('__DIRECT_Y', ' checked="checked"'); - define('__DIRECT_N', ''); - break; - - case 'N': - define('__DIRECT_Y', ''); - define('__DIRECT_N', ' checked="checked"'); - break; - } + foreach (array('allow_direct_pay') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach // One-time referal bonus add-mode - switch (getConfig('reg_points_mode')) { - case 'ref' : - define('__MODE_REF', ' checked="checked"'); - define('__MODE_DIRECT', ''); - break; - - case 'direct': - define('__MODE_REF', ''); - define('__MODE_DIRECT', ' checked="checked"'); - break; - } - - // Referal payout value - define('__REF_PAYOUT', round(getConfig('ref_payout'))); + foreach (array('reg_points_mode_ref','reg_points_mode_direct') as $entry) { + $content[$entry] = ''; + } // END - if + $content['reg_points_mode_' . strtolower(getConfig('reg_points_mode'))] = ' checked="checked"'; // Load template - LOAD_TEMPLATE("admin_config_point_settings"); -} elseif (REQUEST_GET('sub') == "ref") { + loadTemplate('admin_config_point_settings', false, $content); +} elseif (getRequestElement('sub') == 'ref') { // 12 3 32 2 3 32 2 3 4 43 21 - if ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST('sel')) && (countPostSelection() > 0)) { + if ((isPostRequestElementSet('del')) && (isPostRequestElementSet('sel')) && (countPostSelection() > 0)) { // Delete entries $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { - $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); + foreach (postRequestElement('sel') as $id => $value) { + $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + $content = SQL_FETCHARRAY($result); SQL_FREERESULT($result); // Prepare data for the row template $content = array( - 'sw' => $SW, - 'id' => $id, - 'lvl' => $lvl, - 'per' => translateComma($perc), + 'sw' => $SW, + 'id' => $id, + 'level' => $content['level'], + 'percents' => translateComma($content['percents']), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_points_del_row", true, $content); + $OUT .= loadTemplate('admin_points_del_row', true, $content); $SW = 3 - $SW; } - define('__LEVEL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_points_del"); - } elseif ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('sel')) && (countPostSelection() > 0)) { + loadTemplate('admin_points_del', false, $OUT); + } elseif ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('sel')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { - $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); + foreach (postRequestElement('sel') as $id => $value) { + $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + $content = SQL_FETCHARRAY($result); SQL_FREERESULT($result); // Prepare data for the row template $content = array( - 'sw' => $SW, - 'id' => $id, - 'lvl' => $lvl, - 'per' => translateComma($perc), + 'sw' => $SW, + 'id' => $id, + 'level' => $content['level'], + 'percents' => translateComma($contentp['percents']), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_points_edit_row", true, $content); + $OUT .= loadTemplate('admin_points_edit_row', true, $content); $SW = 3 - $SW; } - define('__LEVEL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_points_edit"); + loadTemplate('admin_points_edit', false, $OUT); } else { // Referal levels - $result = SQL_QUERY("SELECT `id`, `level`, `percents` FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Make referal levels editable and deletable $OUT = ''; $SW = 2; @@ -259,41 +240,31 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); // List already existing categories for editing while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - // @TODO Rewritings: lvl->level, per->percents in template - $content = array( - 'sw' => $SW, - 'id' => $content['id'], - 'lvl' => $content['level'], - 'per' => translateComma($content['percents']), - ); + $content['sw'] = $SW; + $content['percents'] = translateComma($content['percents']); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_points_row', true, $content); + $OUT .= loadTemplate('admin_points_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__LEVEL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_points'); + loadTemplate('admin_points', false, $OUT); } // Form for adding new referal levels - LOAD_TEMPLATE('admin_add_reflvl'); + loadTemplate('admin_add_reflevel'); } -} elseif (REQUEST_GET('sub') == 'points') { - // First points for registration and other fixed points including new add-mode for one-time referal bonus... - define('P_REG_VALUE', getConfig('points_register')); - define('P_REF_VALUE', getConfig('points_ref')); - - // Load templates - LOAD_TEMPLATE('admin_config_sub_points'); +} elseif (getRequestElement('sub') == 'points') { + // Load template + loadTemplate('admin_config_sub_points'); } else { // Display selection box - LOAD_TEMPLATE('admin_config_points'); + loadTemplate('admin_config_points'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index d4af5be2db..95603180b5 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,46 +37,36 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // First merge temporarily the new API data into the current config - mergeConfig(REQUEST_POST_ARRAY()); + mergeConfig(postRequestArray()); // Is the password set? - if (REQUEST_ISSET_POST(('pass'))) { + if (isPostRequestElementSet(('pass'))) { // Then hash and remove it - REQUEST_SET_POST('primera_api_md5', md5(REQUEST_POST('pass'))); - REQUEST_UNSET_POST('pass'); + setRequestPostElement('primera_api_md5', md5(postRequestElement('pass'))); + unsetPostRequestElement('pass'); } // END - if // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) - if (PRIMERA_TEST_API()) { + if (testPrimeraApi()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Failed to test the API! - LOAD_TEMPLATE('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); + loadTemplate('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); } } else { - // Prepare data for template output - $content = array( - 'min_payout' => getConfig(('primera_min_payout')), - 'min_withdraw' => getConfig(('primera_min_withdraw')), - 'api_name' => getConfig('primera_api_name'), - 'api_md5' => getConfig('primera_api_md5'), - 'refid' => getConfig('primera_refid') - ); - // Load template - LOAD_TEMPLATE("admin_config_primera", false, $content); + loadTemplate('admin_config_primera'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_proxy.php b/inc/modules/admin/what-config_proxy.php index 619b30f55b..606ca73062 100644 --- a/inc/modules/admin/what-config_proxy.php +++ b/inc/modules/admin/what-config_proxy.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Test proxy settings - if (ADMIN_TEST_PROXY_SETTINGS(REQUEST_POST_ARRAY())) { + if (adminTestProxySettings(postRequestArray())) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Invalid! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_PROXY_SETTINGS_INVALID')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_PROXY_SETTINGS_INVALID')); } } else { // Prepare content @@ -64,7 +63,7 @@ if (isFormSent()) { ); // Load template - LOAD_TEMPLATE('admin_config_proxy', false, $content); + loadTemplate('admin_config_proxy', false, $content); } // [EOF] diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 0887e9ba98..6f43d830f9 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,86 +37,85 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET(('rallye'))) { +if (isGetRequestElementSet(('rallye'))) { // Price submitted? - if (REQUEST_ISSET_POST('add')) { - if ((REQUEST_ISSET_POST(('level'))) && ((REQUEST_ISSET_POST(('points'))) || (REQUEST_ISSET_POST(('info'))))) { + if (isPostRequestElementSet('add')) { + if ((isPostRequestElementSet(('level'))) && ((isPostRequestElementSet(('points'))) || (isPostRequestElementSet(('info'))))) { // Submitted data is valid, but maybe we already have this price level? - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1", - array(bigintval(REQUEST_GET('rallye')), bigintval(REQUEST_POST('level'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1", + array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // 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(REQUEST_GET('rallye')), - bigintval(REQUEST_POST('level')), - REQUEST_POST('points'), - REQUEST_POST('info') + bigintval(getRequestElement('rallye')), + bigintval(postRequestElement('level')), + postRequestElement('points'), + postRequestElement('info') ), __FILE__, __LINE__); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED')); } else { // Free memory SQL_FREERESULT($result); // Price level found! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND')); } } - } elseif (REQUEST_ISSET_POST('remove')) { + } elseif (isPostRequestElementSet('remove')) { // Check if at last one line is selected $SEL = countPostSelection(); if ($SEL > 0) { // Delete selected entries - foreach (REQUEST_POST('sel') as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $sel) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_DELETED')); } else { - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED')); } - } elseif (REQUEST_ISSET_POST('change')) { + } elseif (isPostRequestElementSet('change')) { // Change entries - foreach (REQUEST_POST('level') as $id => $level) { + foreach (postRequestElement('level') as $id => $level) { // Secure ID $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( - REQUEST_POST('rallye_id', $id), + postRequestElement('rallye_id', $id), bigintval($level), - REQUEST_POST('points', $id), - REQUEST_POST('infos', $id), + postRequestElement('points', $id), + postRequestElement('infos', $id), $id ), __FILE__, __LINE__); } // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED')); } - if (REQUEST_ISSET_POST('edit')) { + if (isPostRequestElementSet('edit')) { // Check if at last one line is selected $SEL = countPostSelection(); if ($SEL > 0) { // Make selected editable $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye - $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1", + $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); @@ -132,30 +131,30 @@ VALUES ('%s','%s','%s','%s')", ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_rallye_edit_row", true, $content); + $OUT .= loadTemplate('admin_config_rallye_edit_row', true, $content); $SW = 3 - $SW; } - define('__PRICE_ROWS', $OUT); + $content['rows'] = $OUT; // Prepare data for the main template - define('__RALLYE_ID', REQUEST_GET('rallye')); + $content['rallye'] = getRequestElement('rallye'); // Load main template - LOAD_TEMPLATE("admin_config_rallye_edit"); + loadTemplate('admin_config_rallye_edit', false, $content); } else { // Nothing selected - $content = sprintf(getMessage('RALLYE_NO_PRICES_SELECTED'), "<a href=\"{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=".REQUEST_GET('rallye')."\">", "</a>"); - LOAD_TEMPLATE('admin_settings_saved', false, $content); + $content = sprintf(getMessage('RALLYE_NO_PRICES_SELECTED'), "<a href=\"{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=".getRequestElement('rallye')."\">", "</a>"); + loadTemplate('admin_settings_saved', false, $content); } - } elseif (REQUEST_ISSET_POST('del')) { + } elseif (isPostRequestElementSet('del')) { // Check if at last one line is selected $SEL = countPostSelection(); if ($SEL > 0) { // List all prices $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye - $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1", + $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); @@ -172,25 +171,25 @@ VALUES ('%s','%s','%s','%s')", ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_config_rallye_del_row", true, $content); + $OUT .= loadTemplate('admin_config_rallye_del_row', true, $content); $SW = 3 - $SW; } - define('__PRICE_ROWS', $OUT); + $content['rows'] = $OUT; // Prepare data for the main template - define('__RALLYE_ID', REQUEST_GET('rallye')); + $content['rallye'] = getRequestElement('rallye'); // Load main template - LOAD_TEMPLATE("admin_config_rallye_del"); + loadTemplate('admin_config_rallye_del', false, $content); } else { // Nothing selected - $content = RALLYE_NO_PRICES_SELECTED_1."<a href=\"{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=".REQUEST_GET('rallye')."\">".RALLYE_NO_PRICES_SELECTED_2."</a>".RALLYE_NO_PRICES_SELECTED_3; - LOAD_TEMPLATE('admin_settings_saved', false, $content); + $content = "{--RALLYE_NO_PRICES_SELECTED_1--}<a href=\"{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=".getRequestElement('rallye')."\">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}"; + loadTemplate('admin_settings_saved', false, $content); } } else { // a rallye was selected, so check if there are already prices assigned... - $result = SQL_QUERY_ESC("SELECT id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", - array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__); + $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(getRequestElement('rallye'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load all prices for the selected rallye @@ -210,7 +209,7 @@ VALUES ('%s','%s','%s','%s')", ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_config_rallye_prices_row', true, $content); + $OUT .= loadTemplate('admin_config_rallye_prices_row', true, $content); $SW = 3 - $SW; } // END - while @@ -218,28 +217,28 @@ VALUES ('%s','%s','%s','%s')", SQL_FREERESULT($result); // @TODO Rewrite these two constants - define('__PRICE_ROWS', $OUT); + $content['rows'] = $OUT; // Prepare data for the main template - define('__RALLYE_ID', REQUEST_GET('rallye')); + $content['rallye'] = getRequestElement('rallye'); // Load main template - LOAD_TEMPLATE('admin_config_rallye_prices'); + loadTemplate('admin_config_rallye_prices', false, $content); } } // Add form for adding new price level - if (!REQUEST_ISSET_POST('edit')) { - LOAD_TEMPLATE('admin_add_rallye_prices', false, REQUEST_GET('rallye')); + if (!isPostRequestElementSet('edit')) { + loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye')); } } else { // 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?}_rallye_data` AS d, LEFT JOIN - `{!_MYSQL_PREFIX!}_admins` AS a + `{?_MYSQL_PREFIX?}_admins` AS a ON d.admin_id=a.id ORDER BY @@ -252,13 +251,13 @@ ORDER BY if ($content['is_active'] == 'Y') $select = "<div class=\"big\">".$content['id']."</div>"; // Prepare data for the row template - // @TODO Rewritings: aid->admin_id, alogin->login in template + // @TODO Rewritings: admin_id->admin_id, alogin->login in template $content = array( 'sw' => $SW, 'id' => $content['id'], 'select' => $select, 'title' => $content['title'], - 'aid' => $content['admin_id'], + 'admin_id' => $content['admin_id'], 'email_link' => generateEmailLink($content['admin_id']), 'alogin' => $content['login'], 'start' => generateDateTime($content['start_time'], '3'), @@ -266,20 +265,20 @@ ORDER BY ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_list_rallye_prices_row', true, $content); + $OUT .= loadTemplate('admin_list_rallye_prices_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__RALLYE_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_list_rallye_prices'); + loadTemplate('admin_list_rallye_prices', false, $OUT); } else { // No rallyes setup so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP')); } } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-config_refback.php b/inc/modules/admin/what-config_refback.php index 7d568d1e5e..5f7a523d69 100644 --- a/inc/modules/admin/what-config_refback.php +++ b/inc/modules/admin/what-config_refback.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,17 +37,16 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare content $content = array( @@ -69,8 +68,8 @@ if (isFormSent()) { } // Load template - LOAD_TEMPLATE("admin_config_refback", false, $content); + loadTemplate('admin_config_refback', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index e0c7373048..625a5754f4 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,62 +37,32 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Prepare contants for the template - define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('def_refid'), false, true, true, "def_refid")); - - switch (getConfig('refid_target')) { - case 'index': - define('__DEF_RT_INDEX' , ' selected="selected"'); - define('__DEF_RT_REGISTER', ''); - break; - - case 'register': - define('__DEF_RT_INDEX' , ''); - define('__DEF_RT_REGISTER', ' selected="selected"'); - break; - - default: // Invalid config! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid refid_target %s detected.", getConfig('refid_target'))); - break; - } // END - switch + // Prepare member selection + $content['member_selection'] = addMemberSelectionBox(getConfig('def_refid'), false, true, true, 'def_refid'); - switch (getConfig('select_user_zero_refid')) { - case 'Y': - define('__RAND_REFID_Y', ' selected="selected"'); - define('__RAND_REFID_N', ''); - break; - - case 'N': - define('__RAND_REFID_Y', ''); - define('__RAND_REFID_N', ' selected="selected"'); - break; - - default: // Invalid config! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid select_user_zero_refid %s detected.", getConfig('select_user_zero_refid'))); - define('__RAND_REFID_Y', ''); - define('__RAND_REFID_N', ''); - break; - } // END - switch + // Prepare contants for the template + foreach (array('refid_target_index','refid_target_register','select_user_zero_refid_y','select_user_zero_refid_n') as $entry) { + $content[$entry] = ''; + } // END - foreach - // Prepare content - $content = array( - 'user_min_confirmed' => getConfig('user_min_confirmed') - ); + // Set all selections + foreach (array('refid_target', 'select_user_zero_refid') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_refid", false, $content); + loadTemplate('admin_config_refid', false, $content); } // [EOF] diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index f7c4016c45..401ea9c85c 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,24 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Do we want to save changes? if (isFormSent()) { - foreach (REQUEST_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", + foreach (postRequestElement('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", array($value, bigintval($id), $value),__FILE__, __LINE__); } - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTER_ADMIN_CHANGES_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('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__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Get language string @@ -63,7 +62,7 @@ while ($content = SQL_FETCHARRAY($result)) { // Add more data $content['sw'] = $SW; - $content['selection'] = ADD_SELECTION('yn', $content['field_required'], "sel[".$content['id']."]"); + $content['selection'] = addSelectionBox('yn', $content['field_required'], "sel[".$content['id']."]"); // @TODO Move this HTML code into a template $OUT .= "<tr> @@ -81,12 +80,8 @@ while ($content = SQL_FETCHARRAY($result)) { // Free memory SQL_FREERESULT($result); -// Remember rows in constant -// @TODO Rewrite this constant -define('__REGISTER_ROWS', $OUT); - // Load template -LOAD_TEMPLATE("admin_config_register"); +loadTemplate('admin_config_register', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index bf40ec0467..726fae8205 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -12,7 +12,7 @@ * -------------------------------------------------------------------- * * Adapted from what-config_reg.php * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,33 +32,31 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Calculate timestamp from selections... - REQUEST_SET_POST('ip_timeout', createTimestampFromSelections('ip_timeout', REQUEST_POST_ARRAY())); - REQUEST_SET_POST('least_cats', round(REQUEST_POST('least_cats'))); + setRequestPostElement('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); + setRequestPostElement('least_cats', round(postRequestElement('least_cats'))); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Remember stuff in constants - define('LEAST_CATS_VALUE' , round(getConfig('least_cats'))); - define('__CFG_SHOW_REFID' , ADD_SELECTION('yn', getConfig('display_refid') , 'display_refid')); - define('__TIMEOUT_SELECTION', createTimeSelections(getConfig('ip_timeout') , 'ip_timeout', 'Dhm')); - define('__CFG_DBL_EMAIL' , ADD_SELECTION('yn', getConfig('check_double_email'), 'check_double_email')); - define('__CFG_DBL_PASS' , ADD_SELECTION('yn', getConfig('check_double_pass') , 'check_double_pass')); - define('__CFG_CAT_DEFAULT' , ADD_SELECTION('yn', getConfig('register_default') , 'register_default')); + $content['display_refid'] = addSelectionBox('yn', getConfig('display_refid') , 'display_refid'); + $content['ip_timeout'] = createTimeSelections(getConfig('ip_timeout') , 'ip_timeout', 'Dhm'); + $content['check_double_email'] = addSelectionBox('yn', getConfig('check_double_email'), 'check_double_email'); + $content['check_double_pass'] = addSelectionBox('yn', getConfig('check_double_pass') , 'check_double_pass'); + $content['register_default'] =addSelectionBox('yn', getConfig('register_default') , 'register_default'); // Load normal template - LOAD_TEMPLATE('admin_config_register2'); + loadTemplate('admin_config_register2', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_removeip.php b/inc/modules/admin/what-config_removeip.php index 3ae85a89cd..330b6bc9e4 100644 --- a/inc/modules/admin/what-config_removeip.php +++ b/inc/modules/admin/what-config_removeip.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,137 +37,37 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare data - switch (getConfig('removeip_anon_ip')) { - case 'Y': - define('__CFG_REMOVEIP_ANON_IP_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_ANON_IP_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_ANON_IP_Y', ''); - define('__CFG_REMOVEIP_ANON_IP_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_anon_host')) { - case 'Y': - define('__CFG_REMOVEIP_ANON_HOST_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_ANON_HOST_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_ANON_HOST_Y', ''); - define('__CFG_REMOVEIP_ANON_HOST_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_anon_ua')) { - case 'Y': - define('__CFG_REMOVEIP_ANON_UA_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_ANON_UA_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_ANON_UA_Y', ''); - define('__CFG_REMOVEIP_ANON_UA_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_anon_ref')) { - case 'Y': - define('__CFG_REMOVEIP_ANON_REF_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_ANON_REF_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_ANON_REF_Y', ''); - define('__CFG_REMOVEIP_ANON_REF_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_admin_show')) { - case 'Y': - define('__CFG_REMOVEIP_ADMIN_SHOW_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_ADMIN_SHOW_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_ADMIN_SHOW_Y', ''); - define('__CFG_REMOVEIP_ADMIN_SHOW_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_guest_show')) { - case 'Y': - define('__CFG_REMOVEIP_GUEST_SHOW_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_GUEST_SHOW_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_GUEST_SHOW_Y', ''); - define('__CFG_REMOVEIP_GUEST_SHOW_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_member_show')) { - case 'Y': - define('__CFG_REMOVEIP_MEMBER_SHOW_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_MEMBER_SHOW_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_MEMBER_SHOW_Y', ''); - define('__CFG_REMOVEIP_MEMBER_SHOW_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('removeip_sponsor_show')) { - case 'Y': - define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', ' checked="checked"'); - define('__CFG_REMOVEIP_SPONSOR_SHOW_N', ''); - break; - - case 'N': - define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', ''); - define('__CFG_REMOVEIP_SPONSOR_SHOW_N', ' checked="checked"'); - break; - } // END - switch - - switch (getConfig('anonymous_ip')) { - case "127.0.0.1": - define('__CFG_ANONYMOUS_IP_LOCAL' , ' selected="selected"'); - define('__CFG_ANONYMOUS_IP_ZERO' , ''); - define('__CFG_ANONYMOUS_IP_RANDOM', ''); - break; - - case "0.0.0.0": - define('__CFG_ANONYMOUS_IP_LOCAL' , ''); - define('__CFG_ANONYMOUS_IP_ZERO' , ' selected="selected"'); - define('__CFG_ANONYMOUS_IP_RANDOM', ''); - break; - - case "RANDOM": - define('__CFG_ANONYMOUS_IP_LOCAL' , ''); - define('__CFG_ANONYMOUS_IP_ZERO' , ''); - define('__CFG_ANONYMOUS_IP_RANDOM', ' selected="selected"'); - break; - } // END - switch + foreach (array('removeip_anon_ip','removeip_anon_host','removeip_anon_ua','removeip_anon_ref','removeip_admin_show','removeip_guest_show','removeip_member_show','removeip_sponsor_show') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - if + + // Prepare more entries + foreach (array('anonymous_ip_local','anonymous_ip_zero','anonymous_ip_random') as $entry) { + $content[$entry] = ''; + } // END - foreach + + // Set default selections + foreach (array('anonymous_ip') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_removeip"); + loadTemplate('admin_config_removeip', false, $content); } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index 4a74404081..3e61d342f4 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,18 +37,17 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Generate string $MODs = array(); - foreach (REQUEST_POST('mod') as $mod => $sel) { + foreach (postRequestElement('mod') as $mod => $sel) { // Now you can never deselect the admin module, bah!!! ;-) if (($sel == 'Y') || ($mod == 'admin')) { // Add module to queue @@ -57,14 +56,14 @@ if (isFormSent()) { } // Implode array to string and remove posted mod array - REQUEST_SET_POST('rewrite_skip', implode(':', $MODs)); - REQUEST_UNSET_POST('mod'); + setRequestPostElement('rewrite_skip', implode(':', $MODs)); + unsetPostRequestElement('mod'); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } 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__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Set title to three dashes when no title is supplied @@ -87,19 +86,16 @@ if (isFormSent()) { $content['sw'] = $SW; // Load template and switch colors - $OUT .= LOAD_TEMPLATE("admin_config_rewrite_rows", true, $content); + $OUT .= loadTemplate('admin_config_rewrite_rows', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__MODULE_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE("admin_config_rewrite"); + loadTemplate('admin_config_rewrite', false, $OUT); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index ab2a1234e0..f140678842 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,38 +37,32 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } + // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // If salt length is empty or null then we shall generate new passwords - if (!REQUEST_ISSET_POST(('salt_length')) || (REQUEST_POST('salt_length') == '0')) { + if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == '0')) { // Generate new passwords for all! loadInclude('inc/gen_sql_patches.php'); // Forget the wrong number! - REQUEST_UNSET_POST(('salt_length')); + unsetPostRequestElement(('salt_length')); // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); } // END - if // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Remember stuff in constants - define('__PASS_LEN' , getConfig('pass_len')); - - // Password-salt length - define('__SALT_LENGTH', getConfig('salt_length')); - // Load template - LOAD_TEMPLATE('admin_config_secure'); + loadTemplate('admin_config_secure'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index 3d987ab922..5e02381932 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Test Path - if ((!REQUEST_ISSET_POST(('session_save_path'))) || ((isDirectory(REQUEST_POST('session_save_path'))) && (is_writeable(REQUEST_POST('session_save_path'))))) { + if ((!isPostRequestElementSet(('session_save_path'))) || ((isDirectory(postRequestElement('session_save_path'))) && (is_writeable(postRequestElement('session_save_path'))))) { // Save configuration - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Invalid! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SESSION_SAVE_PATH_INVALID')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SESSION_SAVE_PATH_INVALID')); } } else { // Prepare content @@ -61,8 +60,8 @@ if (isFormSent()) { ); // Load template - LOAD_TEMPLATE("admin_config_session", false, $content); + loadTemplate('admin_config_session', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_sponsor.php b/inc/modules/admin/what-config_sponsor.php index f834d2e8e9..f4ef394d0b 100644 --- a/inc/modules/admin/what-config_sponsor.php +++ b/inc/modules/admin/what-config_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,28 +37,27 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Allow only direct points (non-floating) - REQUEST_SET_POST('sponsor_min_points', bigintval(REQUEST_POST('sponsor_min_points'))); - REQUEST_SET_POST('sponsor_ref_points', bigintval(REQUEST_POST('sponsor_ref_points'))); + setRequestPostElement('sponsor_min_points', bigintval(postRequestElement('sponsor_min_points'))); + setRequestPostElement('sponsor_ref_points', bigintval(postRequestElement('sponsor_ref_points'))); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Remember config data in constants for the template - define('__SPONSOR_MIN_POINTS', getConfig('sponsor_min_points')); - define('__SPONSOR_REF_POINTS', getConfig('sponsor_ref_points')); + $content['min_points'] = getConfig('sponsor_min_points'); + $content['ref_points'] = getConfig('sponsor_ref_points'); // Load template - LOAD_TEMPLATE("admin_config_sponsor"); + loadTemplate('admin_config_sponsor', false, $content); } // diff --git a/inc/modules/admin/what-config_stats.php b/inc/modules/admin/what-config_stats.php index 9c528083f6..8c7d3fe1f1 100644 --- a/inc/modules/admin/what-config_stats.php +++ b/inc/modules/admin/what-config_stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,47 +37,29 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Was the form submitted? if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Guest stats - switch (getConfig('guest_stats')) - { - case 'MEMBERS': - define('__MEMBERS_RADIO', ' selected="selected"'); - define('__MODULES_RADIO', ''); - define('__INACTIVE_RADIO', ''); - break; + foreach (array('members','modules','inactive') as $entry) { + $content['guest_stats_' . $entry] = ''; + } // END - foreach - case 'MODULES': - define('__MEMBERS_RADIO', ''); - define('__MODULES_RADIO', ' selected="selected"'); - define('__INACTIVE_RADIO', ''); - break; - - case 'INACTIVE': - define('__MEMBERS_RADIO', ''); - define('__MODULES_RADIO', ''); - define('__INACTIVE_RADIO', ' selected="selected"'); - break; - } - - // Max stats entries per page - define('__STATS_LIMIT', getConfig('stats_limit')); + // Prepare selected entry + $content['guest_stats_' . strtolower(getConfig('guest_stats'))] = ' selected="selected"'; // Load template - LOAD_TEMPLATE('admin_config_stats'); + loadTemplate('admin_config_stats', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 84b4e89fe0..cefac0ac8e 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,23 +37,22 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Was the form submitted? if (isFormSent()) { // Replace german decimal comma with computer decimal dot - if (REQUEST_ISSET_POST(('surfbar_static_reward'))) REQUEST_SET_POST('surfbar_static_reward' , convertCommaToDot(REQUEST_POST('surfbar_static_reward'))); - if (REQUEST_ISSET_POST(('surfbar_static_costs'))) REQUEST_SET_POST('surfbar_static_costs' , convertCommaToDot(REQUEST_POST('surfbar_static_costs'))); - if (REQUEST_ISSET_POST(('surfbar_dynamic_percent'))) REQUEST_SET_POST('surfbar_dynamic_percent', convertCommaToDot(REQUEST_POST('surfbar_dynamic_percent'))); + if (isPostRequestElementSet(('surfbar_static_reward'))) setRequestPostElement('surfbar_static_reward' , convertCommaToDot(postRequestElement('surfbar_static_reward'))); + if (isPostRequestElementSet(('surfbar_static_costs'))) setRequestPostElement('surfbar_static_costs' , convertCommaToDot(postRequestElement('surfbar_static_costs'))); + if (isPostRequestElementSet(('surfbar_dynamic_percent'))) setRequestPostElement('surfbar_dynamic_percent', convertCommaToDot(postRequestElement('surfbar_dynamic_percent'))); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare content $content = array( @@ -72,97 +71,26 @@ if (isFormSent()) { 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'), ); - // Prepare payment model for template - if (getConfig('surfbar_pay_model') == 'STATIC') { - // Static model - define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ' checked="checked"'); - define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', ''); - } else { - // Dynamic model - define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ''); - define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', ' checked="checked"'); - } + // Prepare further Y/N config entries + foreach (array('surfbar_autostart','surfbar_notify_limits','surfbar_notify_admin_unlock','surfbar_migrate_order','surfbar_guest_login_form') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach - // Prepare auto-sart - if (getConfig('surfbar_autostart') == 'Y') { - // Yes selected - define('__CONFIG_SURFBAR_AUTOSTART_Y', ' checked="checked"'); - define('__CONFIG_SURFBAR_AUTOSTART_N', ''); - } else { - // No selected - define('__CONFIG_SURFBAR_AUTOSTART_Y', ''); - define('__CONFIG_SURFBAR_AUTOSTART_N', ' checked="checked"'); - } + // Even some more... + foreach (array('surfbar_pay_model_static','surfbar_pay_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { + $content[$entry] = ''; + } // END - if - // Prepare notify limits - if (getConfig('surfbar_notify_limits') == 'Y') { - // Yes selected - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', ' checked="checked"'); - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', ''); - } else { - // No selected - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', ''); - define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', ' checked="checked"'); - } - - // Prepare notify admin about unlocked emails - if (getConfig('surfbar_notify_admin_unlock') == 'Y') { - // Yes selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', ' checked="checked"'); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ''); - } else { - // No selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', ''); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ' checked="checked"'); - } - - // Prepare order migration - if (getConfig('surfbar_migrate_order') == 'Y') { - // Yes selected - define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', ' checked="checked"'); - define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ''); - } else { - // No selected - define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', ''); - define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ' checked="checked"'); - } - - // Prepare order migration - if (getConfig('surfbar_guest_login_form') == 'Y') { - // Yes selected - define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', ' checked="checked"'); - define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', ''); - } else { - // No selected - define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', ''); - define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', ' checked="checked"'); - } - - // Pause URL mode - if (getConfig('surfbar_pause_mode') == 'INTERNAL') { - // Internal pause page - define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', ' checked="checked"'); - define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', ''); - } else { - // External pause page (if not empty) - define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', ''); - define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', ' checked="checked"'); - } - - // Notification mode - if (getConfig('surfbar_notification_mode') == 'INSTANT') { - // Instant notification - define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', ' selected="selected"'); - define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , ''); - } else { - // Only daily reset - define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', ''); - define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , ' selected="selected"'); - } + // Prepare selections + foreach (array('surfbar_pay_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach // Load template - LOAD_TEMPLATE('admin_config_surfbar', false, $content); + loadTemplate('admin_config_surfbar', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_title.php b/inc/modules/admin/what-config_title.php index b490c12b34..c8ba73115e 100644 --- a/inc/modules/admin/what-config_title.php +++ b/inc/modules/admin/what-config_title.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,29 +37,25 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Remember config data in constants for the template - define('__CFG_TITLE_LEFT' , getConfig('title_left')); - define('__CFG_TITLE_MIDDLE' , getConfig('title_middle')); - define('__CFG_TITLE_RIGHT' , getConfig('title_right')); - define('__CFG_TITLE_DECOS' , ADD_SELECTION('yn', getConfig('enable_title_deco'), "enable_title_deco")); - define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION('yn', getConfig('enable_mod_title') , "enable_mod_title" )); - define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION('yn', getConfig('enable_what_title'), "enable_what_title")); + $content['enable_title_deco'] = addSelectionBox('yn', getConfig('enable_title_deco'), 'enable_title_deco'); + $content['enable_mod_title'] = addSelectionBox('yn', getConfig('enable_mod_title') , 'enable_mod_title' ); + $content['enable_what_title'] = addSelectionBox('yn', getConfig('enable_what_title'), 'enable_what_title'); // Load template - LOAD_TEMPLATE("admin_config_title"); + loadTemplate('admin_config_title', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_top10.php b/inc/modules/admin/what-config_top10.php index b6876e5525..66a9e18aaa 100644 --- a/inc/modules/admin/what-config_top10.php +++ b/inc/modules/admin/what-config_top10.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,23 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Prepare constants for the template - define('__MAX_VALUE', getConfig('top10_max')); + $content['max'] = getConfig('top10_max'); // Load form template - LOAD_TEMPLATE("admin_config_top10"); + loadTemplate('admin_config_top10', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index 7557e6b45a..05bb78c317 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,43 +37,31 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save settings... - ADMIN_SAVE_SETTINGS_POST(); -} - -// Prepare constants for template -define('__TRANS_MAX_VALUE' , getConfig(('transfer_max'))); -define('__TRANS_BALANCE_VALUE', getConfig(('transfer_balance'))); -define('__TRANS_CODE_VALUE' , getConfig(('transfer_code'))); + adminSaveSettingsFromPostData(); +} else { + // Init all Y/N elements + foreach (array('ap_transfer') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - if -// Autppurge expired transfer entries? -switch (getConfig('ap_transfer')) { - case 'Y': - define('__YES_AP', ' selected="selected"'); - define('__NO_AP', ''); - break; + // Time selection box + $content['age_selection'] = createTimeSelections(getConfig('transfer_age'), 'transfer_age', 'MWDh'); + $content['timeout_selection'] = createTimeSelections(getConfig('transfer_timeout'), 'transfer_timeout', 'MWDh'); - case 'N': - define('__YES_AP', ''); - define('__NO_AP', ' selected="selected"'); - break; + // Load template + loadTemplate('admin_config_transfer', false, $content); } -// Time selection box -define('__TRANS_AGE_SELECTION' , createTimeSelections(getConfig('transfer_age'), "transfer_age", "MWDh")); -define('__TRANS_TIMEOUT_SELECTION', createTimeSelections(getConfig('transfer_timeout'), "transfer_timeout", "MWDh")); - -// Load template -LOAD_TEMPLATE("admin_config_transfer"); - -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_user.php b/inc/modules/admin/what-config_user.php index 8b5a2e7f93..f84fc188c7 100644 --- a/inc/modules/admin/what-config_user.php +++ b/inc/modules/admin/what-config_user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,19 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Prepare constants for the template - define('__LIMIT_VALUE', getConfig('user_limit')); - define('__ALPHA_VALUE', getConfig('user_alpha')); - // Load form template - LOAD_TEMPLATE("admin_config_user"); + loadTemplate('admin_config_user'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index d112c9565b..51f3f15800 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,77 +37,55 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // First merge temporarily the new API data into the current config - mergeConfig(REQUEST_POST_ARRAY()); + mergeConfig(postRequestArray()); // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) if (WERNIS_TEST_API()) { // Revert german commata foreach (array('payout_factor', 'withdraw_factor', 'payout_fee_percent', 'withdraw_fee_percent') as $revert) { - REQUEST_SET_POST('wernis_'.$revert, convertCommaToDot(REQUEST_POST('wernis_'.$revert))); + setRequestPostElement('wernis_'.$revert, convertCommaToDot(postRequestElement('wernis_'.$revert))); } // END - if // Hash the password and remove clear-text - REQUEST_SET_POST('wernis_pass_md5', md5(REQUEST_POST('wernis_pass'))); - REQUEST_UNSET_POST(('wernis_pass')); + setRequestPostElement('wernis_pass_md5', md5(postRequestElement('wernis_pass'))); + unsetPostRequestElement('wernis_pass'); // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Failed to test the API! - LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); } } else { // Prepare data for template output $content = array( - 'min_payout' => getConfig(('wernis_min_payout')), - 'min_withdraw' => getConfig(('wernis_min_withdraw')), - 'api_id' => getConfig(('wernis_api_id')), - 'api_md5' => getConfig('wernis_api_md5'), - 'api_url' => getConfig('wernis_api_url'), - 'refid' => getConfig(('wernis_refid')), - 'payout_factor' => translateComma(getConfig('wernis_payout_factor')), - 'withdraw_factor' => translateComma(getConfig('wernis_withdraw_factor')), - 'payout_fee_percent' => translateComma(getConfig('wernis_payout_fee_percent')), - 'withdraw_fee_percent' => translateComma(getConfig('wernis_withdraw_fee_percent')), - 'payout_fee_fix' => getConfig(('wernis_payout_fee_fix')), - 'withdraw_fee_fix' => getConfig(('wernis_withdraw_fee_fix')) + 'payout_factor' => translateComma(getConfig('wernis_payout_factor')), + 'withdraw_factor' => translateComma(getConfig('wernis_withdraw_factor')), + 'payout_fee_percent' => translateComma(getConfig('wernis_payout_fee_percent')), + 'withdraw_fee_percent' => translateComma(getConfig('wernis_withdraw_fee_percent')), + 'wernis_payout_active_y' => '', + 'wernis_payout_active_n' => '', + 'wernis_withdraw_active_y' => '', + 'wernis_withdraw_active_n' => '', ); // Prepare payout Y/N selection - if (getConfig('wernis_payout_active') == 'Y') { - // Payout allowed - define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', ' checked="checked"'); - define('__CFG_WERNIS_PAYOUT_ACTIVE_N', ''); - } else { - // Payout disabled - define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', ''); - define('__CFG_WERNIS_PAYOUT_ACTIVE_N', ' checked="checked"'); - } - - // Prepare withdraw Y/N selection - if (getConfig('wernis_withdraw_active') == 'Y') { - // Payout allowed - define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', ' checked="checked"'); - define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', ''); - } else { - // Payout disabled - define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', ''); - define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', ' checked="checked"'); - } + foreach (array('wernis_payout_active', 'wernis_withdraw_active') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_wernis", false, $content); + loadTemplate('admin_config_wernis', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index b435d4ae36..b9ea619724 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,63 +37,42 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('yoomedia')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('yoomedia')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('yoomedia')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('yoomedia')); + return; +} // END - if // Was the form submitted? if (isFormSent()) { // Test Yoo!Media config - if (YOOMEDIA_TEST_CONFIG(REQUEST_POST_ARRAY())) { + if (YOOMEDIA_TEST_CONFIG(postRequestArray())) { // Save settings - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { // Config not saved - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED')); } } else { - // Prepare content - $content = array( - 'yoomedia_id' => getConfig(('yoomedia_id')), - 'yoomedia_sid' => getConfig(('yoomedia_sid')), - 'yoomedia_passwd' => getConfig('yoomedia_passwd'), - 'yoomedia_tm_max_reload' => getConfig(('yoomedia_tm_max_reload')), - 'yoomedia_tm_min_wait' => getConfig(('yoomedia_tm_min_wait')), - 'yoomedia_tm_clicks_remain' => getConfig(('yoomedia_tm_clicks_remain')), - 'yoomedia_tm_min_pay' => getConfig(('yoomedia_tm_min_pay')) - ); + // Erotic selection + for ($idx = 0; $idx <= 2; $idx++) { + $content['yoomedia_erotic_allowed_' . $idx] = ''; + } // END - for - // Erotic? - switch (getConfig('yoomedia_erotic_allowed')) { - case 0: // No erotic at all - define('__CFG_YOOMEDIA_EROTIC_NONE' , ' selected="selected"'); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', ''); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , ''); - break; - - case 1: // Include erotic - define('__CFG_YOOMEDIA_EROTIC_NONE' , ''); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', ' selected="selected"'); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , ''); - break; - - case 2: // Erotic only - define('__CFG_YOOMEDIA_EROTIC_NONE' , ''); - define('__CFG_YOOMEDIA_EROTIC_INCLUDE', ''); - define('__CFG_YOOMEDIA_EROTIC_ONLY' , ' selected="selected"'); - break; - } + // Set default selection + foreach (array('yoomedia_erotic_allowed') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_yoomedia", false, $content); + loadTemplate('admin_config_yoomedia', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index 3b4c61f0aa..d87a510964 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -15,7 +15,7 @@ * web : http://mc-p.mcserver.de * * * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,21 +35,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init counter for deleted mails $cnt = 0; -if (REQUEST_ISSET_GET('mid')) { +if (isGetRequestElementSet('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", - array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `sender`, `subject`, `url`, `timestamp`, `payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -61,51 +60,51 @@ if (REQUEST_ISSET_GET('mid')) { $price = getPaymentPoints($payId, 'price'); // Prepare data for the template - define('__ID' , $id); - define('__SENDER' , generateUserProfileLink($sender)); - define('__SUBJECT', $subject); - define('__URL' , DEREFERER($url)); - define('__ORDERED', generateDateTime($timestamp, '0')); + $content['id'] = $id; + $content['sender'] = generateUserProfileLink($sender); + $content['subject'] = $subject; + $content['url'] = generateDerefererUrl($url); + $content['ordered'] = generateDateTime($timestamp, '0'); // Load template - LOAD_TEMPLATE("admin_del_email_normal"); + loadTemplate('admin_del_email_normal', false, $content); // Transfer data to data array $DATA = array('url' => $url, 'subject' => $subject); // Load email template and send the email away - $message_user = LOAD_EMAIL_TEMPLATE('order-deleted', array(), $sender); + $message_user = loadEmailTemplate('order-deleted', array(), $sender); sendEmail($sender, getMessage('MEMBER_ORDER_DELETED'), $message_user); // Fetch right stats_id from pool $result_pool = SQL_QUERY_ESC("SELECT s.id FROM - `{!_MYSQL_PREFIX!}_user_stats` AS s + `{?_MYSQL_PREFIX?}_user_stats` AS s LEFT JOIN - `{!_MYSQL_PREFIX!}_pool` AS p + `{?_MYSQL_PREFIX?}_pool` AS p ON s.pool_id=p.id WHERE s.pool_id=%s LIMIT 1", - array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_pool) == 1) { // Fetch stats id list($stats_id) = SQL_FETCHROW($result_pool); // Get all user links - $links = GET_TOTAL_DATA($stats_id, 'user_links', 'userid', 'stats_id', true); + $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('stats_id', REQUEST_GET('mid'), $links); + reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links); // Calc total points and pay them back $totalPoints = $links * $price; // Shall we pay the points back to the user? if (getConfig('repay_deleted_mails') != 'SHRED') { - //* DEBUG: */ OUTPUT_HTML($stats_id.':'.$totalPoints.'/'.$links.'/'.$price."<br />"); + //* DEBUG: */ outputHtml($stats_id.':'.$totalPoints.'/'.$links.'/'.$price."<br />"); if ($totalPoints > 0) { // Shall we payback to user or jackpot? if (getConfig('repay_deleted_mails') == 'JACKPOT') { @@ -114,64 +113,64 @@ LIMIT 1", } // END - if // Pay back points - //* DEBUG: */ OUTPUT_HTML("PAYBACK:".$sender."<br />"); - ADD_POINTS_REFSYSTEM('mail_deleted', $sender, $totalPoints, true, '0', false,'direct'); + //* DEBUG: */ outputHtml("PAYBACK:".$sender."<br />"); + addPointsThroughReferalSystem('mail_deleted', $sender, $totalPoints, true, '0', false,'direct'); // Output message if (getConfig('repay_deleted_mails') == 'REPAY') { // Repayed - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'), - translateComma($totalPoints) + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'), + translateComma($totalPoints) )); } else { // To jackpot - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'), - translateComma($totalPoints) + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'), + translateComma($totalPoints) )); } } else { // No points repayed! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_POINTS_REPAYED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_POINTS_REPAYED')); } } else { // Points shredded! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints)); } // 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(); // Load template for link - LOAD_TEMPLATE('admin_settings_saved', false, "<a href=\"{?URL?}/modules.php?module=admin&what=del_email&pid=".bigintval(REQUEST_GET('mid'))."\">{--ADMIN_REMOVE_STATS_ENTRY--}</a>"); + loadTemplate('admin_settings_saved', false, "<a href=\"{?URL?}/modules.php?module=admin&what=del_email&pid=".bigintval(getRequestElement('mid'))."\">{--ADMIN_REMOVE_STATS_ENTRY--}</a>"); } // END - if // Free the result SQL_FREERESULT($result_pool); // Delete mail from queue - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Output link for manually removing stats entry - OUTPUT_HTML(sprintf(getMessage('ADMIN_DELETED_MAILS_COUNT'), $cnt)); + outputHtml(sprintf(getMessage('ADMIN_DELETED_MAILS_COUNT'), $cnt)); } else { // Mail already deleted! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED')); } -} elseif (REQUEST_ISSET_GET('pid')) { +} elseif (isGetRequestElementSet('pid')) { // Remove stats entries - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `pool_id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1", + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_STATS_REMOVED')); -} elseif ((REQUEST_ISSET_GET('bid')) && (EXT_IS_ACTIVE('bonus'))) { + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USER_STATS_REMOVED')); +} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { // Load data from bonus mail - $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s", - array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s", + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -179,73 +178,75 @@ LIMIT 1", list($id, $subject, $url, $timestamp, $sent) = SQL_FETCHROW($result); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('bonus_id', REQUEST_GET('bid'), $sent); + reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $sent); // Init counter for deleted mails $cnt = 0; // Delete bonus mail entirely from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `bonus_id`=%s", - array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", + array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Prepare data for the template - define('__ID' , $id); - define('__SUBJECT', $subject); - define('__URL' , DEREFERER($url)); - define('__ORDERED', generateDateTime($timestamp, '0')); - define('__CNT' , $cnt); + $content['id'] = $id; + $content['subject'] = $subject; + $content['url'] = generateDerefererUrl($url); + $content['ordered'] = generateDateTime($timestamp, '0'); + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_del_email_bonus'); + loadTemplate('admin_del_email_bonus', false, $content); } else { // Mail already deleted! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_MAIL_ALREADY_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_MAIL_ALREADY_DELETED')); } // Free result SQL_FREERESULT($result); -} elseif ((REQUEST_ISSET_GET('nid')) && (GET_EXT_VERSION('bonus') >= '0.8.7')) { +} elseif ((isGetRequestElementSet('nid')) && (getExtensionVersion('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", - array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s", + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { // Load data list ($id, $subject, $url, $timestamp) = SQL_FETCHROW($result); - SQL_FREERESULT($result); // Init counter for deleted mails $cnt = 0; // Delete bonus mail entirely from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `bonus_id`=%s", - array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", + array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Prepare data for the template - define('__ID' , $id); - define('__SUBJECT', $subject); - define('__URL' , DEREFERER($url)); - define('__ORDERED', generateDateTime($timestamp, '0')); - define('__CNT' , $cnt); + $content['id'] = $id; + $content['subject'] = $subject; + $content['url'] = generateDerefererUrl($url); + $content['ordered'] = generateDateTime($timestamp, '0'); + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_del_email_notify'); + loadTemplate('admin_del_email_notify', false, $content); } else { // Mail already deleted! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOTIFY_MAIL_ALREADY_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NOTIFY_MAIL_ALREADY_DELETED')); } + + // Free result + SQL_FREERESULT($result); } else { // No mail orders fond - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); } // diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index 0a3d89802f..7435c85ec3 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,42 +37,38 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check for selected holidays $SUM = 0; -if (REQUEST_ISSET_POST('sel')) $SUM = countPostSelection(); +if (isPostRequestElementSet('sel')) $SUM = countPostSelection(); // Shall I delete selected holidays??? -if ($SUM > 0) -{ +if ($SUM > 0) { // Delete multiple holiday requests (for list_holiday) $cnt = 0; - foreach (REQUEST_POST('sel') as $id => $sel) - { + foreach (postRequestElement('sel') as $id => $sel) { // 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) - { + if (SQL_NUMROWS($result) == 1) { // Load data and free memory - list($uid, $start, $end) = SQL_FETCHROW($result); + list($userid, $start, $end) = SQL_FETCHROW($result); 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__); +WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __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 @@ -82,13 +78,13 @@ WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); ); // Send email to user - $message = LOAD_EMAIL_TEMPLATE("member_holiday_removed", $content, $uid); - sendEmail($uid, getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); + $message = loadEmailTemplate('member_holiday_removed', $content, $userid); + sendEmail($userid, getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); $cnt++; } } - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt)); -} elseif (REQUEST_ISSET_GET('uid')) { + loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt)); +} elseif (isGetRequestElementSet('userid')) { // Set default message $message = getMessage('HOLIDAY_ADMIN_SINGLE_404'); @@ -96,25 +92,25 @@ WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $result_load = SQL_QUERY_ESC("SELECT `holiday_start` AS start, `holiday_end` AS end FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_load) == 1) { // Load data $content = SQL_FETCHARRAY($result_load); // Delete one holiday request (for task) SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s -LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); +LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Send email to user - $message = LOAD_EMAIL_TEMPLATE('member_holiday_removed', $content, REQUEST_GET('uid')); - sendEmail(REQUEST_GET('uid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); + $message = loadEmailTemplate('member_holiday_removed', $content, getRequestElement('userid')); + sendEmail(getRequestElement('userid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); // Set message $message = getMessage('HOLIDAY_ADMIN_SINGLE_DELETED'); @@ -124,10 +120,10 @@ LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); SQL_FREERESULT($result_load); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } else { // Please call me over other scripts... ;) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_NO_DIRECT_CALL')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_NO_DIRECT_CALL')); } // diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index a1dee18c04..1f7f19e9a7 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,73 +37,66 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Remove sponsor if (isFormSent()) { // Load data and remember it in constants - $DATA = SQL_FETCHARRAY($result); + $content = SQL_FETCHARRAY($result); - // @TODO Rewrite these constants - define('__EMAIL' , $DATA['email']); - define('__GENDER' , translateGender($DATA['gender'])); - define('__SURNAME', $DATA['surname']); - define('__FAMILY' , $DATA['family']); + // Prepare data for the template + $content['gender'] = translateGender($content['gender']); + $content['reason'] = secureString(postRequestElement('reason')); // Prepare message and send it away - $message = LOAD_EMAIL_TEMPLATE('del_sponsor', REQUEST_POST('reason'), bigintval(REQUEST_GET('id'))); - sendEmail($DATA['email'], getMessage('ADMIN_SPONSOR_DEL_SUBJECT'), $message); + $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestElement('id'))); + sendEmail($content['email'], getMessage('ADMIN_SPONSOR_DEL_SUBJECT'), $message); // Remove account - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remove orders - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `sponsorid`='%s' LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(REQUEST_GET('id')))); - } elseif (REQUEST_ISSET_POST('no')) { + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(getRequestElement('id')))); + } elseif (isPostRequestElementSet('no')) { // Do not delete him... - redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(REQUEST_GET('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestElement('id'))); } else { // Load data - $DATA = SQL_FETCHARRAY($result); + $content = SQL_FETCHARRAY($result); // Transfer data to constants for the template - // @TODO Rewrite these constants - define('__EMAIL' , $DATA['email']); - define('__SNAME' , $DATA['surname']); - define('__FNAME' , $fname); - define('__GENDER', translateGender($DATA['gender'])); - define('__UID' , bigintval(REQUEST_GET('id'))); + $content['gender'] = translateGender($content['gender']); + $content['userid'] = bigintval(getRequestElement('id')); // Display form - LOAD_TEMPLATE('admin_del_sponsor'); + loadTemplate('admin_del_sponsor', false, $content); } } else { // Sponsor not found! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id')))); } // Free result SQL_FREERESULT($result); } else { // Not called by what-list_sponsor.php - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-del_task.php b/inc/modules/admin/what-del_task.php index 088c0dca2d..9b7860f836 100644 --- a/inc/modules/admin/what-del_task.php +++ b/inc/modules/admin/what-del_task.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,16 +37,17 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('task')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('task')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('task')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task')); + return; +} -// +// [EOF] ?> diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index 33c375ad5e..cf79679321 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,26 +37,25 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_POST('del')) { +if (isPostRequestElementSet('del')) { // Delete entries from tables $SEL = countPostSelection(); if ($SEL > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // Delete entries... - foreach (REQUEST_POST('sel') as $id => $sel) { - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE trans_id=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $sel) { + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE trans_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE trans_id=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE trans_id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); } // END - foreach @@ -66,26 +65,25 @@ if (REQUEST_ISSET_POST('del')) { } // 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_userid, 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) { // Output rows $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - // @TODO Rewritings: idx->trans_id in template $content = array( - 'sw' => $SW, - 'idx' => $content['trans_id'], - 'stamp' => generateDateTime($content['time_trans'], '3'), - 'uid_from' => generateUserProfileLink($content['userid']), - 'uid_to' => generateUserProfileLink($content['to_uid']), - 'reason' => $content['reason'], - 'points' => translateComma($content['points']), + 'sw' => $SW, + 'trans_id' => $content['trans_id'], + 'stamp' => generateDateTime($content['time_trans'], '3'), + 'userid_from' => generateUserProfileLink($content['userid']), + 'userid_to' => generateUserProfileLink($content['to_userid']), + 'reason' => $content['reason'], + 'points' => translateComma($content['points']), ); // Load row template - $OUT .= LOAD_TEMPLATE("admin_del_transfer_row", true, $content); + $OUT .= loadTemplate('admin_del_transfer_row', true, $content); // Sum points and switch colors $total += $content['points']; $SW = 3 - $SW; @@ -97,26 +95,25 @@ if (SQL_NUMROWS($result) > 0) { // Nothing for in and out $OUT = "<tr> <td colspan=\"6\" align=\"center\" class=\"bottom2\" height=\"70\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." </td> </tr>"; } // ... and add them to a constant for the template -// @TODO Rewrite all these constants -define('__TRANSFER_ROWS', $OUT); +$content['rows'] = $OUT; // Remeber total amount -define('__TRANSFER_TOTAL_VALUE', $total); +$content['total'] = translateComma($total); // Set title -define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL')); +$content['title'] = getMessage('TRANSFER_LIST_ALL'); // Show delete button here -define('__TRANSFER_DELETE', "<input type=\"reset\" class=\"admin_reset\" value=\"{--UNDO_SELECTIONS--}\" /> * <input type=\"submit\" name=\"del\" class=\"admin_delete\" value=\"{--TRANSFER_DELETE--}\" />"); +$content['delete'] = "<input type=\"reset\" class=\"admin_reset\" value=\"{--UNDO_SELECTIONS--}\" /> * <input type=\"submit\" name=\"del\" class=\"admin_delete\" value=\"{--TRANSFER_DELETE--}\" />"; // Load final template -LOAD_TEMPLATE("admin_list_transfer"); +loadTemplate('admin_list_transfer', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index b463096076..56e14dfc3a 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,63 +37,62 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Display only title when no form was submitted -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // User exists.. -if ((isFormSent()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) { +if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElementSet(('reason'))))) { // Delete users account - $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 1) { // Free memory SQL_FREERESULT($result_user); // Delete user account - deleteUserAccount(REQUEST_GET('uid'), REQUEST_POST('reason')); + deleteUserAccount(getRequestElement('userid'), postRequestElement('reason')); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED')); } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } -} elseif (REQUEST_ISSET_POST('no')) { +} elseif (isPostRequestElementSet('no')) { // Do not delete him... - redirectToUrl(ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid'))); -} elseif (!REQUEST_ISSET_GET('uid')) { + redirectToUrl(adminCreateUserLink(getRequestElement('userid'))); +} elseif (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } else { // Realy want to delete? - $result = SQL_QUERY_ESC("SELECT `email`, `surname`, `family` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `email`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Found a row? if (SQL_NUMROWS($result) == 1) { // Load data - list ($email, $sname, $fname) = SQL_FETCHROW($result); + list ($email, $surname, $family) = SQL_FETCHROW($result); // Prepare content $content = array( 'email' => generateEmailLink($email, 'user_data'), - 'surname' => $sname, - 'family' => $fname, - 'header' => sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), REQUEST_GET('uid')), - 'text' => sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), REQUEST_GET('uid')), - 'userid' => REQUEST_GET('uid') + 'surname' => $surname, + 'family' => $family, + 'header' => sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), getRequestElement('userid')), + 'text' => sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), getRequestElement('userid')), + 'userid' => getRequestElement('userid') ); // Display form - LOAD_TEMPLATE('admin_del_user', false, $content); + loadTemplate('admin_del_user', false, $content); } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } // Free the result diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index c36da87535..c03be85a37 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,47 +37,51 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if ((isFormSent()) && (!REQUEST_ISSET_POST('id'))) { - REQUEST_UNSET_POST('ok'); +if ((isFormSent()) && (!isPostRequestElementSet('id'))) { + unsetPostRequestElement('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 (isFormSent()) { // Make mail editable... - $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", + array(bigintval(postRequestElement('id'))), __FILE__, __LINE__); list($subj, $text, $url) = SQL_FETCHROW($result); SQL_FREERESULT($result); - // @TODO More constants to rewrite - define('__ID_VALUE' , REQUEST_POST('id')); - define('__URL_VALUE' , $url); - define('__SUBJ_VALUE', $subj); - define('__TEXT_VALUE', $text); + + // Prepare constant for template + $content['id'] = bigintval(postRequestElement('id')); + $content['url'] = $url; + $content['subject'] = $subj; + $content['text'] = $text; // Load template - LOAD_TEMPLATE("admin_edit_email"); - } elseif (REQUEST_ISSET_POST('save')) { + loadTemplate('admin_edit_email', false, $content); + } elseif (isPostRequestElementSet('save')) { // Save changes - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET -subject='%s', -text='%s', -url='%s' -WHERE `id`=%s LIMIT 1", - array( - REQUEST_POST('subj'), - REQUEST_POST('text'), - REQUEST_POST('url'), - bigintval(REQUEST_POST('id')), - ), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_pool` +SET + `subject`='%s', + `text`='%s', + `url`='%s' +WHERE + `id`=%s +LIMIT 1", + array( + postRequestElement('subj'), + postRequestElement('text'), + postRequestElement('url'), + bigintval(postRequestElement('id')), + ), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { $content = getMessage('SETTINGS_SAVED'); @@ -86,7 +90,7 @@ WHERE `id`=%s LIMIT 1", } // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $content); + loadTemplate('admin_settings_saved', false, $content); } else { // There are mail orders available $OUT = ''; $SW = 2; @@ -97,29 +101,26 @@ WHERE `id`=%s LIMIT 1", 'sw' => $SW, 'id' => $content['id'], 'subj' => $content['subject'], - 'uid' => generateUserProfileLink($content['sender']), + 'userid' => generateUserProfileLink($content['sender']), 'pay' => getPaymentTitlePrice($content['payment_id']), 'cat' => getCategory($content['cat_id']), ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_edit_email_row", true, $content); + $OUT .= loadTemplate('admin_edit_email_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Yet another constant to rewrite - define('__EMAIL_SELECT_ROWS', $OUT); - // Load email template - LOAD_TEMPLATE("admin_edit_email_select"); + loadTemplate('admin_edit_email_select', false, $OUT); } } else { // No mail orders left in pool - LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"admin_failed\">{--ADMIN_NO_MAILS_IN_POOL--}</span>"); + loadTemplate('admin_settings_saved', false, "<span class=\"admin_failed\">{--ADMIN_NO_MAILS_IN_POOL--}</span>"); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index ff340fff71..e522a1f314 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,15 +37,14 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET('mode'))) { +if ((isGetRequestElementSet('id')) && (isGetRequestElementSet('mode'))) { // Check for selected sponsor $result_main = SQL_QUERY_ESC("SELECT `company`, `position`, `gender`, `surname`, `family`, @@ -53,86 +52,55 @@ if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET('mode'))) { `phone`, `fax`, `cell`, `email`, `url`, `tax_ident`, `receive_warnings`, `warning_interval` FROM - `{!_MYSQL_PREFIX!}_sponsor_data` + `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load sponsor details - $DATA = SQL_FETCHARRAY($result_main); + $content = SQL_FETCHARRAY($result_main); // Prepare all data for the template // Sponsor's ID - define('__SPONSOR_ID' , bigintval(REQUEST_GET('id'))); - - // Company's data - define('__COMPANY' , $DATA['company']); - define('__POSITION' , $DATA['position']); - define('__TAX_IDENT' , $DATA['tax_ident']); - - // Personal data - switch ($DATA['gender']) { - case 'M': - define('__GENDER_M', ' selected="selected"'); - define('__GENDER_F', ''); - define('__GENDER_C', ''); - break; - - case 'F': - define('__GENDER_M', ''); - define('__GENDER_F', ' selected="selected"'); - define('__GENDER_C', ''); - break; - - case 'C': - define('__GENDER_M', ''); - define('__GENDER_F', ''); - define('__GENDER_C', ' selected="selected"'); - break; - } - define('__SURNAME' , $DATA['surname']); - define('__FAMILY' , $DATA['family']); - define('__STREET1' , $DATA['street_nr1']); - define('__STREET2' , $DATA['street_nr2']); - define('__ZIP' , $DATA['zip']); - define('__CITY' , $DATA['city']); - define('__COUNTRY' , $DATA['country']); - // Contact data - define('__PHONE' , $DATA['phone']); - define('__FAX' , $DATA['fax']); - define('__CELL' , $DATA['cell']); - define('__EMAIL' , $DATA['email']); - define('__URL' , $DATA['url']); + $content['id'] = bigintval(getRequestElement('id')); + + // Init gender + foreach (array('m', 'f', 'c') as $gender) { + $content['gender_' . $gender] = ''; + } // END - foreach + + // Check for gender selection + $content['gender_' . strtolower($content['gender'])] = ' selected="selected"'; // Warning because low points - define('__REC_WARNING', ADD_SELECTION('yn', $DATA['receive_warnings'], 'receive_warning')); - define('__INTERVAL' , createTimeSelections($DATA['warning_interval'], 'warning_interval', 'MWDh')); + $content['receive_warnings'] = addSelectionBox('yn', $content['receive_warnings'], 'receive_warning'); + $content['interval'] = createTimeSelections($content['warning_interval'], 'warning_interval', 'MWDh'); // Init variables here - $TPL = sprintf("admin_edit_sponsor_%s", REQUEST_GET('mode')); - INIT_SQLS(); + $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('mode')); + initSqls(); // Sponsor was found - if ((isFormSent()) || (REQUEST_ISSET_POST('edit'))) { + if ((isFormSent()) || (isPostRequestElementSet('edit'))) { // Perform action on mode - switch (REQUEST_GET('mode')) { + switch (getRequestElement('mode')) { case 'add_points': // Add points - if (strval(REQUEST_POST('points')) > 0) { + if (bigintval(postRequestElement('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $POINTS = strval(convertCommaToDot(REQUEST_POST('points'))); + $points = bigintval(convertCommaToDot(postRequestElement('points'))); // Add points to account - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`='%s' LIMIT 1", - array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`='%s' LIMIT 1", + array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remember points /reason for the template - define('__POINTS' , translateComma($POINTS)); - define('__REASON' , REQUEST_POST('reason')); + $content['points'] = translateComma($points); + $content['reason'] = secureString(postRequestElement('reason')); // Send email - $message = LOAD_EMAIL_TEMPLATE('sponsor_add_points', REQUEST_POST('reason'), true); - sendEmail(constant('__EMAIL'), getMessage('ADMIN_SPONSOR_ADD_POINTS_SUBJ'), $message); + $message = loadEmailTemplate('sponsor_add_points', $content); + sendEmail($content['email'], getMessage('ADMIN_SPONSOR_ADD_POINTS_SUBJ'), $message); $message = getMessage('ADMIN_SPONSOR_POINTS_ADDED'); } else { // No points entered to add! @@ -141,21 +109,21 @@ LIMIT 1", break; case 'sub_points': // Subtract points - if (strval(REQUEST_POST('points')) > 0) { + if (bigintval(postRequestElement('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $POINTS = strval(convertCommaToDot(REQUEST_POST('points'))); + $points = bigintval(convertCommaToDot(postRequestElement('points'))); // Add points to account - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`='%s' LIMIT 1", - array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`='%s' LIMIT 1", + array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); // Remember points /reason for the template - define('__POINTS' , translateComma($POINTS)); - define('__REASON' , REQUEST_POST('reason')); + $content['points'] = translateComma($points); + $content['reason'] = secureString(postRequestElement('reason')); // Send email - $message = LOAD_EMAIL_TEMPLATE('sponsor_sub_points', REQUEST_POST('reason'), true); - sendEmail(constant('__EMAIL'), getMessage('ADMIN_SPONSOR_SUB_POINTS_SUBJ'), $message); + $message = loadEmailTemplate('sponsor_sub_points', $content); + sendEmail($content['email'], getMessage('ADMIN_SPONSOR_SUB_POINTS_SUBJ'), $message); $message = getMessage('ADMIN_SPONSOR_POINTS_SUBTRACTED'); } else { // No points entered to add! @@ -165,62 +133,62 @@ LIMIT 1", case 'edit': // Edit sponsor account $PASS = true; - if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) || ((!REQUEST_ISSET_POST('pass1')) && (!REQUEST_ISSET_POST('pass1')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) || ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass1')))) { // Remove passwords - REQUEST_UNSET_POST('pass1'); - REQUEST_UNSET_POST('pass2'); + unsetPostRequestElement('pass1'); + unsetPostRequestElement('pass2'); $PASS = false; } // END - if // Convert time selection $DATA = array(); $id = 'warning_interval_ye'; $skip = false; - convertSelectionsToTimestamp(REQUEST_POST_ARRAY(), $DATA, $id, $skip); + convertSelectionsToTimestamp(postRequestArray(), $DATA, $id, $skip); // Save the sponsor - SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY()); + handlSponsorRequest(postRequestArray()); // Convert some data for the email template - REQUEST_POST('gender' , translateGender(REQUEST_POST('gender'))); - REQUEST_POST('warning_interval', createFancyTime(REQUEST_POST('warning_interval'))); + postRequestElement('gender' , translateGender(postRequestElement('gender'))); + postRequestElement('warning_interval', createFancyTime(postRequestElement('warning_interval'))); - if ($PASS === false) REQUEST_SET_POST('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); + if ($PASS === false) setRequestPostElement('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); // Load email template and send the mail away - $message = LOAD_EMAIL_TEMPLATE('admin_sponsor_edit', REQUEST_POST_ARRAY(), false); - sendEmail(REQUEST_POST('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); + $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); + sendEmail(postRequestElement('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); break; default: // Unknown mode - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", REQUEST_GET('mode'))); - $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), REQUEST_GET('mode')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode'))); + $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), getRequestElement('mode')); break; } if (!empty($message)) { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if } elseif (isFileReadable(sprintf("%stemplates/%s/html/admin/%s.tpl", getConfig('PATH'), getLanguage(), $TPL))) { // Create mailto link - define('__SPONSOR_VALUE', "<a href=\"" . generateEmailLink(constant('__EMAIL'), 'sponsor_data') . "\">{!__SURNAME!} {!__FAMILY!}</a>"); + $content['contact'] = "<a href=\"" . generateEmailLink($content['email'], 'sponsor_data') . "\">" . $content['surname'] . " " . $content['family'] . "</a>"; // Load mode template - LOAD_TEMPLATE($TPL); + loadTemplate($TPL); } else { // Template not found! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), REQUEST_GET('mode'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), getRequestElement('mode'))); } } else { // Sponsor not found! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id')))); } // Free result SQL_FREERESULT($result_main); } else { // Not called by what-list_sponsor.php - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 683a836cee..1288289943 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -17,7 +17,9 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * @TODO Add support for ext-country * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,49 +39,52 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Fix a notice $result_main = false; -if (REQUEST_ISSET_GET('uid')) { - // 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` -WHERE userid=%s +if (isGetRequestElementSet('userid')) { + // Load user entry + $result_main = SQL_QUERY_ESC("SELECT + `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`, + `email`, + `birth_day`, `birth_month`, `birth_year`, + `max_mails` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); -} + array( + bigintval(getRequestElement('userid')) + ), __FILE__, __LINE__); +} // END - if -if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid'))) -{ +if ((SQL_NUMROWS($result_main) == 1) || (!isGetRequestElementSet('userid'))) { // User found - if (!REQUEST_ISSET_GET('uid')) - { + if (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); - } - elseif (REQUEST_ISSET_POST('edit')) - { + addMemberSelectionBox(); + } elseif (isPostRequestElementSet('edit')) { // Ok, change the account... - $PASS = false; $add = ''; - if ((!REQUEST_ISSET_POST('pass1')) && (!REQUEST_ISSET_POST('pass2'))) { + $updateUser = false; $add = ''; + if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { // Don't change the password - $PASS = true; - } elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { + $updateUser = true; + } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) { // Change the password - $PASS = true; - $add = ", `password`='" . generateHash(REQUEST_POST('pass1')) . "'"; + $updateUser = true; + $add = ", `password`='" . generateHash(postRequestElement('pass1')) . "'"; } - if ($PASS) { + if ($updateUser === true) { // 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', @@ -89,17 +94,17 @@ if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid'))) `city`='%s', `email`='%s' ".$add." -WHERE userid=%s LIMIT 1", +WHERE `userid`=%s LIMIT 1", array( - substr(REQUEST_POST('gender'), 0, 1), - REQUEST_POST('surname'), - REQUEST_POST('family'), - REQUEST_POST('street_nr'), - REQUEST_POST('country'), - bigintval(REQUEST_POST('zip')), - REQUEST_POST('city'), - REQUEST_POST('email'), - bigintval(REQUEST_GET('uid')), + substr(postRequestElement('gender'), 0, 1), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + postRequestElement('country'), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(getRequestElement('userid')), ), __FILE__, __LINE__); $content = getMessage('USER_ACCOUNT_SAVED'); } else { @@ -108,46 +113,29 @@ WHERE userid=%s LIMIT 1", } // Load template - LOAD_TEMPLATE('admin_settings_saved', false, $content); + loadTemplate('admin_settings_saved', false, $content); } else { - // Display form to edit - list($gender, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main); + // Load entry + $content = SQL_FETCHARRAY($result_main); - // Transfer data to constants for the template - switch ($gender) { - case 'M': - define('_GENDER_M', ' selected="selected"'); - define('_GENDER_F', ''); - define('_GENDER_C', ''); - break; - - case 'F': - define('_GENDER_M', ''); - define('_GENDER_F', ' selected="selected"'); - define('_GENDER_C', ''); - break; - - case 'C': - define('_GENDER_M', ''); - define('_GENDER_F', ''); - define('_GENDER_C', ' selected="selected"'); - break; - } + // Init entries + foreach (array('gender_m','gender_f','gender_c') as $entry) { + $content[$entry] = ''; + } // END - foreach - define('_SURNAME', $surname); define('_FAMILY', $family); define('_CITY' , $city); - define('_STREET' , $street); define('_ZIP' , $zip); define('_MAX_MAILS', $max); - define('_COUNTRY', $country); define('_EMAIL' , $email); + // Prepare selections + $content['gender_' . strtolower($content['gender'])] = ' selected="selected"'; // Load template - LOAD_TEMPLATE('admin_edit_user', false, bigintval(REQUEST_GET('uid'))); + loadTemplate('admin_edit_user', false, $content); } } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } // Free the result SQL_FREERESULT($result_main); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 9adac2ca55..6474a7a1a4 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,54 +40,59 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -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` - WHERE `data_type`='SEND' OR `data_type`='DELETED' - ORDER BY timestamp DESC"; +addMenuDescription('admin', __FILE__); + +// Init SQL string +$sql = "SELECT + `id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `cat_id` +FROM + `{?_MYSQL_PREFIX?}_pool` +WHERE + `data_type`='SEND' OR `data_type`='DELETED' +ORDER BY + `timestamp` DESC"; // Check for maximum pages -$result_normal = SQL_QUERY($sql, __FILE__, __LINE__); +$result_maximum = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!REQUEST_ISSET_GET('page')) REQUEST_SET_GET('page' , '1'); -if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', getConfig('mails_page')); +if (!isGetRequestElementSet('page')) setRequestGetElement('page' , '1'); +if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page')); // Add limitation to SQL string -$sql .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset'); +$sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')).", ".getRequestElement('offset'); // Run SQL query for normal mails $result = SQL_QUERY($sql, __FILE__, __LINE__); // Calculate pages -$PAGES = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.5); -SQL_FREERESULT($result_normal); +$pages = round(SQL_NUMROWS($result_maximum) / getConfig('mails_page') + 0.5); + +// Free the result which we don't need +SQL_FREERESULT($result_maximum); if (SQL_NUMROWS($result) > 0) { // Mail orders are in pool so we can display them // Add navigation table rows - if ($PAGES > 1) { - define('__TOP_EMAIL_NAV' , ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), true , '3', true)); - define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, '3', true)); - } else { - define('__TOP_EMAIL_NAV' , ''); - define('__BOTTOM_EMAIL_NAV', ''); - } + $content['top_email_nav'] = ''; + $content['bottom_email_nav'] = ''; + if ($pages > 1) { + $content['top_email_nav'] = addEmailNavigation($pages, getConfig('mails_page'), true , '3', true); + $content['bottom_email_nav'] = addEmailNavigation($pages, getConfig('mails_page'), false, '3', true); + } // END - if $OUT = ''; $SW = 2; + // @TODO Rewrite to SQL_FETCHARRAY() 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", - array(bigintval($pool[0])), __FILE__, __LINE__); + $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); @@ -96,42 +101,44 @@ if (SQL_NUMROWS($result) > 0) { if ($unconfirmed > 0) { // Add link to list_unconfirmed what-file $unconfirmed = "<strong><a href=\"{?URL?}/modules.php?module=admin&what=list_unconfirmed&mid=".$pool[0]."\">".$unconfirmed."</a></strong>"; - } + } // END - if // Prepare data for the row template - $content = array( + $row = array( 'sw' => $SW, 'u_link' => generateUserProfileLink($pool[1]), - 'subj' => COMPILE_CODE($pool[2]), - 'text' => COMPILE_CODE($pool[3]), + 'subj' => $pool[2], + 'text' => $pool[3], 'pay' => getPaymentTitlePrice($pool[5]), 'cat' => getCategory($pool[10]), 'sent' => $sent, - 'ruids' => str_replace(';', ", ", $pool[4]), + 'ruserids' => str_replace(';', ", ", $pool[4]), 'unconfirmed' => $unconfirmed, 'type' => translatePoolType($pool[6]), 'tsend' => $pool[9], - 'frametester' => FRAMETESTER($pool[8]), - 'url' => COMPILE_CODE($pool[8]), + 'frametester' => generateFrametesterUrl($pool[8]), + 'url' => $pool[8], 'stamp' => generateDateTime($pool[7], '0'), 'mid' => $pool[0], ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_email_archiv_row", true, $content); + $OUT .= loadTemplate('admin_email_archiv_row', true, $row); $SW = 3 - $SW; - } + } // END - while - // Free memory - SQL_FREERESULT($result); - define('__EMAIL_ROWS', $OUT); + // Remmber generated rows in array + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_email_archiv"); + loadTemplate('admin_email_archiv', false, $content); } else { // No mail orders fond - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); } -// +// Free memory +SQL_FREERESULT($result); + +// [EOF] ?> diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index ed59720397..a71abbac3a 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,47 +47,46 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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"; -$WHO = _ALL; +$WHO = getMessage('_ALL'); $SQL2 = ''; -if (REQUEST_ISSET_GET(('mid'))) { +if (isGetRequestElementSet(('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` - WHERE `id`='".bigintval(REQUEST_GET('mid'))."' + FROM `{?_MYSQL_PREFIX?}_pool` + WHERE `id`='".bigintval(getRequestElement('mid'))."' LIMIT 1"; - $WHO = MAIL_ID.": ".REQUEST_GET('mid'); -} elseif (REQUEST_ISSET_GET('uid')) { + $WHO = getMessage('MAIL_ID').": ".getRequestElement('mid'); +} elseif (isGetRequestElementSet('userid')) { // 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(REQUEST_GET('uid'))."' +FROM `{?_MYSQL_PREFIX?}_pool` +WHERE sender='".bigintval(getRequestElement('userid'))."' ORDER by timestamp DESC"; - $WHO = USER_ID.": ".REQUEST_GET('uid'); + $WHO = getMessage('USER_ID').": ".getRequestElement('userid'); } -if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) { +if ((isExtensionActive('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='N' ORDER BY timestamp DESC"; @@ -99,22 +98,22 @@ ORDER BY timestamp DESC"; $result_normal = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!REQUEST_ISSET_GET('page')) REQUEST_SET_GET('page', '1'); +if (!isGetRequestElementSet('page')) setRequestGetElement('page', '1'); -if (!REQUEST_ISSET_GET('offset')) { +if (!isGetRequestElementSet('offset')) { if (isConfigEntrySet('mails_page')) { // Set config entry - REQUEST_SET_GET('offset', getConfig('mails_page')); + setRequestGetElement('offset', getConfig('mails_page')); } else { // Set default one - REQUEST_SET_GET('offset', 10); + setRequestGetElement('offset', 10); } } // END - if // Add limitation to SQL string -if (!REQUEST_ISSET_GET(('mid'))) { +if (!isGetRequestElementSet(('mid'))) { // Create limitation line - $add = " LIMIT ".(bigintval(REQUEST_GET('offset')) * bigintval(REQUEST_GET('page')) - bigintval(REQUEST_GET('offset'))).", ".bigintval(REQUEST_GET('offset')); + $add = " LIMIT ".(bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))).", ".bigintval(getRequestElement('offset')); // For normal mails $sql .= $add; @@ -144,7 +143,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); @@ -162,18 +161,15 @@ if (SQL_NUMROWS($result_list) > 0) { // Prepare content $content = $pool; $content['sender_link'] = generateUserProfileLink($pool['sender']); - $content['subject'] = COMPILE_CODE($pool['subject']); - $content['text'] = COMPILE_CODE($pool['text']); $content['payment'] = getPaymentTitlePrice($pool['payment_id']); $content['category'] = getCategory($pool['cat_id']); $content['receivers'] = str_replace(';', ", ", $pool['receivers']); $content['type'] = translatePoolType($pool['data_type']); - $content['frametester'] = FRAMETESTER($pool['url']); - $content['url'] = COMPILE_CODE($pool['url']); + $content['frametester'] = generateFrametesterUrl($pool['url']); $content['timestamp'] = generateDateTime($pool['timestamp'], '0'); // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_emails_row", true, $content); + $OUT .= loadTemplate('admin_list_emails_row', true, $content); } // END - while // Free memory @@ -181,23 +177,23 @@ if (SQL_NUMROWS($result_list) > 0) { // Add navigation (with change box and colspan=3) $content['nav'] = ''; - if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, '3', true); + if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true); // Prepare content $content['rows'] = $OUT; $content['who'] = $WHO; // Mail orders are in pool so we can display them - LOAD_TEMPLATE("admin_list_emails", false, $content); + loadTemplate('admin_list_emails', false, $content); $MAIL = true; - if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) { + if ((isExtensionActive('bonus')) && ($WHO == _ALL)) { // Check only if bonus extension is active - if (SQL_NUMROWS($result_bonus) > 0) OUTPUT_HTML("<br /><br />"); + if (SQL_NUMROWS($result_bonus) > 0) outputHtml('<br /><br />'); } } -if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) { +if ((isExtensionActive('bonus')) && ($WHO == _ALL)) { // Load bonus mails only when extension is active if (SQL_NUMROWS($result_bonus) > 0) { // Calculate pages @@ -221,29 +217,29 @@ if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) { $content['category'] = getCategory($content['cat_id']); $content['receivers'] = str_replace(';', ", ", $content['receivers']); $content['type'] = translatePoolType($content['data_type']); - $content['frametester'] = FRAMETESTER($content['url']); + $content['frametester'] = generateFrametesterUrl($content['url']); $content['timestamp'] = generateDateTime($content['timestamp'], '0'); // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_bonus_emails_row", true, $content); + $OUT .= loadTemplate('admin_list_bonus_emails_row', true, $content); } // END - while // Add navigation (without change box but with colspan=3) $content['nav'] = ''; - if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, '3', true); + if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true); // Prepare content $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_list_bonus_emails", false, $content); + loadTemplate('admin_list_bonus_emails', false, $content); $MAIL = true; } // END - if } // END - if -if (!$MAIL) { +if ($MAIL === false) { // No mail orders fond - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); } // END - if // diff --git a/inc/modules/admin/what-email_stats.php b/inc/modules/admin/what-email_stats.php index 52289aedbe..3acfbb572a 100644 --- a/inc/modules/admin/what-email_stats.php +++ b/inc/modules/admin/what-email_stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,14 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// +// @TODO Unused at the moment + +// [EOF] ?> diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index b159ab3d45..5c5ca685c3 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,214 +37,227 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Normally we want the overview of all registered extensions $do = 'overview'; $SEL = 0; // Are some extensions submitted? -if (REQUEST_ISSET_POST('sel')) { +if (isPostRequestElementSet('sel')) { // Then count all $SEL = countPostSelection(); } // END - if -if (REQUEST_ISSET_GET('reg_ext')) { +if (isGetRequestElementSet('reg_ext')) { // We are about to register a new extension - $do = 'register'; $ext_id = bigintval(REQUEST_GET('reg_ext')); + $do = 'register'; $ext_id = bigintval(getRequestElement('reg_ext')); // The ID comes from task management and it is - of course - *not* the extension's name! -} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((isPostRequestElementSet('change')) && ($SEL > 0) && (!isDemoModeActive())) { // De-/activate extensions - foreach (REQUEST_POST('sel') as $ext_id => $active) { + foreach (postRequestElement('sel') as $ext_id => $active) { // Shall we keep the extension always active? - if ((isset($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)])) && ($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)] == 'Y') && ($active == 'N')) { + if ((isset($GLOBALS['cache_array']['active_extensions'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['active_extensions'][getExtensionName($ext_id)] == 'Y') && ($active != 'Y')) { // Keep this extension active! } else { // 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", + $ACT = 'N'; getExtensionMode('deactivate'); + if ($active != 'Y') { $ACT = 'Y'; setExtensionMode('activate'); } + 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 - EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE); + doExtensionSqls($ext_id, getExtensionMode()); } } -} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST(('modify')))) && ($SEL > 0) && (!IS_DEMO())) { +} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet(('modify')))) && ($SEL > 0) && (!isDemoModeActive())) { // Change settings like CSS file load - if (REQUEST_ISSET_POST(('modify'))) { + if (isPostRequestElementSet(('modify'))) { // Change entries $cache_update = 0; - foreach (REQUEST_POST('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Secure ID $ext_id = bigintval($ext_id); // Change this extension? if ($sel == 1) { // Load mode is modify - $EXT_LOAD_MODE = 'modify'; + getExtensionMode('modify'); // Get entry for 'active' - $active = REQUEST_POST('active', $ext_id); + $active = postRequestElement('active', $ext_id); // Update extension's record - if (GET_EXT_VERSION('sql_patches') >= '0.0.6') { + if (getExtensionVersion('sql_patches') >= '0.0.6') { // Update also CSS column when extensions sql_patches is newer or exact v0.0.6 - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1", - array(REQUEST_POST('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1", + array(postRequestElement('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); } else { // When extension is older than v0.0.6 there is no column for the CSS information - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1", - array($active, $ext_id), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1", + array($active, $ext_id), __FILE__, __LINE__); } // Run SQLs on activation / deactivation switch ($active) { - case 'Y': $EXT_LOAD_MODE = 'activate'; break; - case 'N': $EXT_LOAD_MODE = 'deactivate'; break; - } + case 'Y': getExtensionMode('activate'); break; + case 'N': getExtensionMode('deactivate'); break; + } // END - if // Run embeded SQL commands - EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE); + doExtensionSqls($ext_id, getExtensionMode()); } } // Extensions changed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXT_CHANGED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_EXT_CHANGED')); } else { // Edit selected entries $SW = 2; $OUT = ''; - foreach (REQUEST_POST('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Edit this extension? - if (($sel == 'Y') || ($sel == 'N')) { + if (($sel == 'Y') || ($sel != 'Y')) { + // Default is no CSS for non-updated mailers + $css = '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", - array(bigintval($ext_id)), __FILE__, __LINE__); - list($name, $css, $active) = SQL_FETCHROW($result); + if (getExtensionVersion('sql_patches') >= '0.0.6') { + $result = SQL_QUERY_ESC("SELECT ext_has_css, ext_active FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1", + array(bigintval($ext_id)), __FILE__, __LINE__); + list($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", - array(bigintval($ext_id)), __FILE__, __LINE__); - list($name, $active) = SQL_FETCHROW($result); + $result = SQL_QUERY_ESC("SELECT ext_active FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1", + array(bigintval($ext_id)), __FILE__, __LINE__); + list($active) = SQL_FETCHROW($result); SQL_FREERESULT($result); $css = 'X'; } // Output row $cssSelection = '---'; - if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION('yn', $css, 'css', $ext_id); + if (getExtensionVersion('sql_patches') >= '0.0.6') $cssSelection = addSelectionBox('yn', $css, 'css', $ext_id); // Prepare data for the row template $content = array( 'sw' => $SW, 'id' => $ext_id, - 'name' => $name, - 'active' => ADD_SELECTION('yn', $active, 'active', $ext_id), + 'name' => getExtensionName($ext_id), + 'active' => addSelectionBox('yn', $active, 'active', $ext_id), 'css' => $cssSelection, ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_extensions_edit_row', true, $content); + $OUT .= loadTemplate('admin_extensions_edit_row', true, $content); $SW = 3 - $SW; } } // END - foreach - // @TODO Rewrite this constant - define('__EXTENSIONS_ROWS', $OUT); - // Load template - LOAD_TEMPLATE('admin_extensions_edit'); + loadTemplate('admin_extensions_edit', false, $OUT); $do = 'edit'; } -} elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((isPostRequestElementSet('delete')) && ($SEL > 0) && (!isDemoModeActive())) { // List extensions and when verbose is enabled SQL statements which will be executed $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $ext_id => $sel) { + foreach (postRequestElement('sel') as $ext_id => $sel) { // Init variables $VERBOSE_OUT = ''; - INIT_SQLS(); + initSqls(); // Secure id number $ext_id = bigintval($ext_id); - // Get extension name - $ext_name = GET_EXT_NAME($ext_id); - - if (getConfig('verbose_sql') == 'Y') { - // Load SQL commands in remove mode - if (LOAD_EXTENSION($ext_name, 'remove', '', true)) { - // Generate extra table with loaded SQL commands - $VERBOSE_OUT = EXTENSION_VERBOSE_TABLE(); + // Is the id valid? + if (isExtensionIdValid($ext_id)) { + // Get extension name + $ext_name = getExtensionName($ext_id); + + if (getConfig('verbose_sql') == 'Y') { + // Load SQL commands in remove mode + if (loadExtension($ext_name, 'remove', '', true)) { + // Generate extra table with loaded SQL commands + $VERBOSE_OUT = addExtensionVerboseSqlTable(); + } // END - if } // END - if - } // END - if - // Prepare data for the row template - $content = array( - 'sw' => $SW, - 'id' => $ext_id, - 'ext_name' => $ext_name, - 'ext_ver' => GET_EXT_VERSION($ext_name), - 'verbose' => $VERBOSE_OUT - ); - - // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_extensions_delete_row', true, $content); + // Prepare data for the row template + $content = array( + 'sw' => $SW, + 'id' => $ext_id, + 'ext_name' => $ext_name, + 'ext_ver' => getExtensionVersion($ext_name), + 'verbose' => $VERBOSE_OUT + ); + + // Load row template and switch color + $OUT .= loadTemplate('admin_extensions_delete_row', true, $content); + } else { + // Prepare data for the row template + $content = array( + 'sw' => $SW, + 'id' => $ext_id + ); + + // Not valid! + $OUT .= loadTemplate('admin_extensions_delete_row_404', true, $content); + } $SW = 3 - $SW; } // END - foreach - define('__EXTENSIONS_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_extensions_delete'); + loadTemplate('admin_extensions_delete', false, $OUT); $do = 'delete'; -} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((isPostRequestElementSet('remove')) && ($SEL > 0) && (!isDemoModeActive())) { // Remove extensions from DB (you have to delete all files manually!) $cache_update = 0; - foreach (REQUEST_POST('sel') as $ext_id => $active) { + foreach (postRequestElement('sel') as $ext_id => $active) { // Secure ID number $ext_id = bigintval($ext_id); - // Is this extension selected? - if ($active == 1) { + // Is this extension selected and id valid? + if (($active == 1) && (isExtensionIdValid($ext_id))) { // Run embeded SQL commands - EXTENSION_RUN_SQLS($ext_id, 'remove'); + doExtensionSqls($ext_id, 'remove'); } // END - if } // END - foreach -} elseif ((REQUEST_ISSET_GET('do')) && (!IS_DEMO())) { + + // Extensions removed + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSIONS_REMOVED'), $SEL)); +} elseif ((isGetRequestElementSet('do')) && (!isDemoModeActive())) { // Other things to do - $do = SQL_ESCAPE(strip_tags(REQUEST_GET('do'))); -} elseif (REQUEST_ISSET_GET('do')) { + $do = SQL_ESCAPE(secureString(getRequestElement('do'))); +} elseif (isGetRequestElementSet('do')) { // Demo mode active! $do = 'demo'; } // Shall we display active/inactive extensions? $where = ''; -if (REQUEST_ISSET_GET(('active'))) { - $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(strip_tags(REQUEST_GET('active')))); +if (isGetRequestElementSet(('active'))) { + $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestElement('active')))); } // END - if // Case selection switch ($do) { case 'overview': // List all registered extensions - if (GET_EXT_VERSION('sql_patches') >= '0.0.6') { + if (getExtensionVersion('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` + $result = SQL_QUERY("SELECT `id` AS ext_id, `ext_name`, `ext_active`, `ext_has_css` AS ext_css, `ext_version` +FROM `{?_MYSQL_PREFIX?}_extensions` ".$where." -ORDER BY ext_name", __FILE__, __LINE__); +ORDER BY `ext_name` ASC", __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` + $result = SQL_QUERY("SELECT `id` AS ext_id, `ext_name`, `ext_active`, `id`, `ext_version` +FROM `{?_MYSQL_PREFIX?}_extensions` ".$where." -ORDER BY ext_name", __FILE__, __LINE__); +ORDER BY `ext_name` ASC", __FILE__, __LINE__); } // Are there some entries? @@ -254,41 +267,38 @@ ORDER BY ext_name", __FILE__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { // Prepare CSS selection output $cssSelection = '---'; - if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']); + if (getExtensionVersion('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']); // Prepare data for the row template $content = array( - 'sw' => $SW, - 'id' => $content['ext_id'], - 'name' => $content['ext_name'], - 'active' => translateYesNo($content['ext_active']), - 'act_val' => $content['ext_active'], - 'css' => $cssSelection, - 'ver' => $content['ext_version'], + 'sw' => $SW, + 'id' => $content['ext_id'], + 'name' => $content['ext_name'], + 'active' => translateYesNo($content['ext_active']), + 'act_val' => $content['ext_active'], + 'css' => $cssSelection, + 'ver' => $content['ext_version'], ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_extensions_row", true, $content); + $OUT .= loadTemplate('admin_extensions_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // Remember rows in constant for the template - define('__EXT_ROWS', $OUT); - // Load template - LOAD_TEMPLATE("admin_extensions"); + loadTemplate('admin_extensions', false, $OUT); } else { // No extensions are registered - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED')); } 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", - array(getCurrentAdminId()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1", + array(getCurrentAdminId()), __FILE__, __LINE__); $task_found = SQL_NUMROWS($result); // Free result @@ -297,8 +307,8 @@ ORDER BY ext_name", __FILE__, __LINE__); // 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", - array(bigintval($ext_id)), __FILE__, __LINE__); + $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); @@ -309,63 +319,70 @@ ORDER BY ext_name", __FILE__, __LINE__); $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1)); // Test the extension for deprecation - LOAD_EXTENSION($ext_name, 'test'); + loadExtension($ext_name, 'test'); // Is the extension deprecated? - if (EXT_GET_DEPRECATED() == 'N') { + if (!isExtensionDeprecated()) { // ... so we can finally register and load it in registration mode - if (REGISTER_EXTENSION($ext_name, $ext_id)) { - // Extension was found and successfully registered - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED')); - - // Show next link - if (EXT_IS_ACTIVE('task')) { - LOAD_TEMPLATE('admin_next_link', false, array( - 'url' => 'modules.php?module=admin&what=list_task', - 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK') - )); + if (registerExtension($ext_name, $ext_id)) { + // Errors? + if (getTotalFatalErrors() == 0) { + // Extension was found and successfully registered + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_REGISTERED'), $ext_name)); + + // Show next link + if (isExtensionActive('task')) { + loadTemplate('admin_next_link', false, array( + 'url' => 'modules.php?module=admin&what=list_task', + 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK') + )); + } else { + loadTemplate('admin_next_link', false, array( + 'url' => 'modules.php?module=admin', + 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK') + )); + } } else { - LOAD_TEMPLATE('admin_next_link', false, array( - 'url' => 'modules.php?module=admin', - 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK') - )); + // Errors detected! + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_NOT_REGISTERED'), $ext_name)); } // Do we need to update cache file? // @TODO Rewrite this to a filter - if ((EXT_IS_ACTIVE('cache')) && ($GLOBALS['cache_mode'] != 'no')) { + if (isExtensionActive('cache')) { // Remove cache file (will be auto-created again!) - if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->removeCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile(); } // END - if - } elseif (GET_EXT_VERSION($ext_name) != '') { + } elseif (getExtensionVersion($ext_name) != '') { // Notify the admin that we have a problem here... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY')); } else { // Notify the admin that we have a problem here... - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name)); } } else { // Motify the admin that we have a problem here... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED')); } } else { // Extension was not found in task management - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404')); } } elseif ($task_found == '0') { // No longer assigned or old task - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED')); } else { // ID is invalid - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID')); } break; case 'demo': - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); break; } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 871cd7039d..f23636efd3 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,18 +37,17 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!REQUEST_ISSET_POST('title')) || (!REQUEST_ISSET_POST(('menu')))) && (isFormSent())) { +if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet(('menu')))) && (isFormSent())) { // Abort adding the menu entry - REQUEST_UNSET_POST('ok'); + unsetPostRequestElement('ok'); } // END - if if (!isFormSent()) { @@ -56,7 +55,7 @@ if (!isFormSent()) { $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 // @TODO Cant this be rewritten? @@ -95,7 +94,7 @@ if (!isFormSent()) { // 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) { @@ -159,38 +158,39 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", } $OUT .= "</select>"; - define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('guest', 'what', "name")); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', 'action', "menu")); + // Prepare selections for template + $content['below_selection'] = $OUT; + $content['what_selection'] = adminAddMenuSelectionBox('member', 'what' , 'name'); + $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu'); // Display form - LOAD_TEMPLATE("admin_guest_add"); -} elseif (!IS_DEMO()) { + loadTemplate('admin_guest_add', false, $content); +} elseif (!isDemoModeActive()) { // Insert new menu entry - if (REQUEST_ISSET_POST(('menu'))) { - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", + if (isPostRequestElementSet(('menu'))) { + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - REQUEST_POST('menu'), - REQUEST_POST('name'), - REQUEST_POST('title'), - bigintval(REQUEST_POST('sort')), - REQUEST_POST('visible'), - REQUEST_POST('active'), + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + bigintval(postRequestElement('sort')), + postRequestElement('visible'), + postRequestElement('active'), ), __FILE__, __LINE__); } else { - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')", array( - REQUEST_POST('name'), - REQUEST_POST('title'), - bigintval(REQUEST_POST('sort')), - REQUEST_POST('visible'), - REQUEST_POST('active'), + postRequestElement('name'), + postRequestElement('title'), + bigintval(postRequestElement('sort')), + postRequestElement('visible'), + postRequestElement('active'), ), __FILE__, __LINE__); } - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } else { // Demo mode! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); } // diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 6d079701ee..a49c13b302 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,236 +37,240 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (REQUEST_ISSET_GET('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub')); - $SUB = REQUEST_GET('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); + $SUB = getRequestElement('sub'); } // END - if // Get count of (maybe) selected menu points $chk = 0; -if (REQUEST_ISSET_POST('sel')) $chk = countPostSelection(); +if (isPostRequestElementSet('sel')) $chk = countPostSelection(); // List all menu points and make them editable -if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { +if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Edit menu entries - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $cnt = 0; $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... - list($menu, $act, $wht) = SQL_FETCHROW($result); + $DATA = SQL_FETCHARRAY($result); + + // Prepapre content $DATA = array( 'cnt' => $cnt, 'sel' => $sel, - 'action' => ADMIN_MAKE_MENU_SELECTION('guest', 'action', 'sel_action[' . $sel . ']', $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('guest', 'what', 'sel_what[' . $sel . ']', $wht), - 'menu' => $menu, + 'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $DATA['action']), + 'what' => adminAddMenuSelectionBox('guest', 'what' , 'sel_what[' . $sel . ']', $DATA['what']), + 'menu' => $DATA['title'], 'sw' => $SW, ); - $OUT .= LOAD_TEMPLATE('admin_gmenu_edit_row', true, $DATA); + + // Load row template + $OUT .= loadTemplate('admin_gmenu_edit_row', true, $DATA); } else { - // Entry not found? - $content = array( + // Entry not found + $DATA = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $DATA); } + + // Free result and switch color SQL_FREERESULT($result); $SW = 3 - $SW; } // END - if } // END - foreach - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_gmenu_edit_form'); -} elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) { + loadTemplate('admin_gmenu_edit_form', false, $content); +} elseif ((isPostRequestElementSet('del')) && (!isDemoModeActive())) { // Del menu entries with or without confirmation - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $cnt = 0; $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... - list($menu) = SQL_FETCHROW($result); + $DATA = SQL_FETCHARRAY($result); $DATA = array( 'cnt' => $cnt, - 'menu' => $menu, + 'menu' => $DATA['title'], 'sel' => $sel, 'sw' => $SW, ); - $OUT .= LOAD_TEMPLATE('admin_gmenu_delete_row', true, $DATA); + $OUT .= loadTemplate('admin_gmenu_delete_row', true, $DATA); } else { // Entry not found? - $content = array( + $DATA = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $DATA); } SQL_FREERESULT($result); $SW = 3 - $SW; } } - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_gmenu_delete'); -} elseif ((isFormSent()) && (!IS_DEMO())) { + loadTemplate('admin_gmenu_delete', false, $content); +} elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... - switch (REQUEST_POST('ok')) { + switch (postRequestElement('ok')) { case 'edit': // Edit menu - foreach (REQUEST_POST('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { // Secure selector $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", - array($menu, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel), $sel),__FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array($menu, postRequestElement('sel_action', $sel), postRequestElement('sel_what', $sel), $sel),__FILE__, __LINE__); } // END - foreach - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; case 'del': // Delete menu - foreach (REQUEST_POST('sel') as $sel => $menu) { + foreach (postRequestElement('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__); } // END - foreach - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; case 'status': // Change access levels - foreach (REQUEST_POST('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { // Secure selector $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", - array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array(postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__); } // END - foreach - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; default: // Unexpected action - define('__OK_VALUE', REQUEST_POST('ok')); - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok'))); - LOAD_TEMPLATE('admin_menu_unknown_okay'); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); + loadTemplate('admin_menu_unknown_okay', false, postRequestElement('ok')); break; } // END - switch -} elseif ((REQUEST_ISSET_POST('status')) && ($chk > 0) && (!IS_DEMO())) { +} elseif ((isPostRequestElementSet('status')) && ($chk > 0) && (!isDemoModeActive())) { // Change status (visible / locked) - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; // Load template $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... - list($menu, $vis, $locked) = SQL_FETCHROW($result); - $content = array( + $data = SQL_FETCHARRAY($result); + $data = array( 'cnt' => $cnt, - 'menu' => $menu, + 'menu' => $data['title'], 'sel' => $sel, 'sw' => $SW, - 'visible' => ADD_SELECTION('yn', $vis , 'visible', $sel), - 'locked' => ADD_SELECTION('yn', $locked, 'locked' , $sel), + 'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel), + 'locked' => addSelectionBox('yn', $data['locked'] , 'locked' , $sel), ); // Load template - $OUT .= LOAD_TEMPLATE('admin_menu_status_row', true, $content); + $OUT .= loadTemplate('admin_menu_status_row', true, $data); } else { // Entry not found? - $content = array( + $data = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $data); } SQL_FREERESULT($result); $SW = 3 - $SW; } // END - if } // END - foreach - define('__CNT_VALUE', $cnt); - define('__MENU_ROWS', $OUT); + $content['cnt'] = $cnt; + $content['rows'] = $OUT; // Load template - LOAD_TEMPLATE('admin_gmenu_status'); + loadTemplate('admin_gmenu_status', false, $content); } else { - if ((REQUEST_ISSET_GET('act')) && (REQUEST_ISSET_GET('tid')) && (REQUEST_ISSET_GET('fid'))) { + if ((isGetRequestElementSet('act')) && (isGetRequestElementSet('tid')) && (isGetRequestElementSet('fid'))) { // Get IDs - if (REQUEST_ISSET_GET('w')) { + if (isGetRequestElementSet('w')) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(getRequestElement('act'), bigintval(getRequestElement('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", - array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(getRequestElement('act'), bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } 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", - array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", + array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", + array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); } // END - if } // END - if // 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__); } @@ -274,8 +278,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { $max = SQL_NUMROWS($result); if ($max > 0) { // Set sub value - // @TODO Rewrite this constant - define('__SUB_VALUE', $SUB); + $content['sub'] = $SUB; // Init variables $SW = 2; @@ -283,50 +286,49 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { $OUT = ''; // Process all menu entries - while ($content = SQL_FETCHARRAY($result)) { + while ($data = SQL_FETCHARRAY($result)) { $cnt++; - if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) { + if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) { // Is highest position - $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } elseif ($cnt == $max) { // Is lowest position - $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>"; - } elseif ($content['sort'] > 0) { + $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>"; + } elseif ($data['sort'] > 0) { // Anything else between highest and lowest - $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } - if (empty($content['action'])) $content['action'] = ' '; - if (empty($content['what'])) $content['what'] = ' '; - if (empty($content['title'])) $content['title'] = ' '; + if (empty($data['action'])) $data['action'] = ' '; + if (empty($data['what'])) $data['what'] = ' '; + if (empty($data['title'])) $data['title'] = ' '; // Prepapre content - $content = array( + $row = array( 'sw' => $SW, - 'id' => $content['id'], - 'action' => $content['action'], - 'what' => $content['what'], - 'title' => $content['title'], + 'id' => $row['id'], + 'action' => $row['action'], + 'what' => $row['what'], + 'title' => $row['title'], 'navi' => $NAVI, 'mode' => 'guest' ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_menu_overview_row', true, $content); + $OUT .= loadTemplate('admin_menu_overview_row', true, $row); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - define('__MENU_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_gmenu_edit'); + loadTemplate('admin_gmenu_edit', false, $content); } else { // Menu entries are missing... (???) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-holiday_list.php b/inc/modules/admin/what-holiday_list.php index 2b3cc13041..23f96cdba1 100644 --- a/inc/modules/admin/what-holiday_list.php +++ b/inc/modules/admin/what-holiday_list.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,12 +37,14 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } + // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +// @TODO Unused at the moment -// +// [EOF] ?> diff --git a/inc/modules/admin/what-holiday_remove.php b/inc/modules/admin/what-holiday_remove.php index 026a9557e0..2b6188975b 100644 --- a/inc/modules/admin/what-holiday_remove.php +++ b/inc/modules/admin/what-holiday_remove.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index 57b6a3f8bc..3d9cc2f772 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Exclude default referal id if set $EXCLUDE_LIST = ''; @@ -53,16 +52,16 @@ if (getConfig('def_refid') > 0) { // Check for more extensions // @TODO Rewrite those lines to filter -if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; -if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; -if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; -if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'"; +if (isExtensionActive('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid').""; +if (isExtensionActive('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid').""; +if (isExtensionActive('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid').""; +if (isExtensionInstalledAndNewer('holiday', '0.1.3')) $EXCLUDE_LIST .= " AND d.holiday_active='N'"; // Check for all accounts -$result = SQL_QUERY_ESC("SELECT DISTINCT +$result = SQL_QUERY_ESC("SELECT 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 + `{?_MYSQL_PREFIX?}_user_data` AS d WHERE d.`status`='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND @@ -82,35 +81,34 @@ if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - // @TODO Rewritings: sname->surname,fname->family in templates + // @TODO Rewritings: surname->surname,family->family in templates $content = array( - 'sw' => $SW, - 'uid' => generateUserProfileLink($content['userid']), - 'gender' => translateGender($content['gender']), - 'sname' => $content['surname'], - 'fname' => $content['family'], - 'email' => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>", - 'joined' => generateDateTime($content['joined'], '2'), - 'last' => generateDateTime($content['last_online'], '2'), - 'notified' => generateDateTime($content['ap_notified'], '2'), + 'sw' => $SW, + 'userid' => generateUserProfileLink($content['userid']), + 'gender' => translateGender($content['gender']), + 'surname' => $content['surname'], + 'family' => $content['family'], + 'email' => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>", + 'joined' => generateDateTime($content['joined'], '2'), + 'last_online' => generateDateTime($content['last_online'], '2'), + 'notified' => generateDateTime($content['ap_notified'], '2'), ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_autopurge_row', true, $content); + $OUT .= loadTemplate('admin_list_autopurge_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__AUTOPURGE_ROWS', $OUT); + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE('admin_list_autopurge'); + loadTemplate('admin_list_autopurge', false, $content); } else { // All members are active or you don't have any registered - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_AUTOPURGE_ALL_ACTIVE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_AUTOPURGE_ALL_ACTIVE')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 383fa29bd7..fd98fec21d 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,50 +37,49 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check if there is enougth selected $show = true; -if ((REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) { +if ((isPostRequestElementSet('id')) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { // Okay, which button was pressed? - if (REQUEST_ISSET_POST('change')) { + if (isPostRequestElementSet('change')) { // Change permissions - ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), 'bank_packages', 'package_active'); - } elseif (REQUEST_ISSET_POST('edit')) { + adminChangeActivationStatus(postRequestElement('id'), 'bank_packages', 'package_active'); + } elseif (isPostRequestElementSet('edit')) { // Delete entries (with confirmation) - ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminEditEntriesConfirm( + postRequestElement('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') ); $show = false; - } elseif (REQUEST_ISSET_POST('do_edit')) { + } elseif (isPostRequestElementSet('do_edit')) { // Delete entries (with confirmation) - ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); - } elseif (REQUEST_ISSET_POST('delete')) { + adminEditEntriesConfirm(postRequestElement('id'), 'bank_packages', array(), array(), array(), true); + } elseif (isPostRequestElementSet('delete')) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); + adminDeleteEntriesConfirm(postRequestElement('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); $show = false; - } elseif (REQUEST_ISSET_POST('remove')) { + } elseif (isPostRequestElementSet('remove')) { // Delete entries (with confirmation) - ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'bank_packages', array(), array(), array(), true); + adminDeleteEntriesConfirm(postRequestElement('id'), 'bank_packages', array(), array(), array(), true); } } // END - if // Skip showing old entries? -if (!$show) return; +if ($show === false) 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? @@ -96,18 +95,15 @@ if (SQL_NUMROWS($result) > 0) { $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_bank_package_row', true, $content); + $OUT .= loadTemplate('admin_list_bank_package_row', true, $content); $SW = 3 - $SW; } // END - while - // Prepare row(s) for output to template - define('__BANK_PACKAGE_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_list_bank_package'); + loadTemplate('admin_list_bank_package', false, $OUT); } else { // No packages found! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND')); } // Free the result diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 0ffdfb9a07..fa28e4411d 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,26 +37,26 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } + // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (getConfig('beg_rallye') == 'Y') { // Shall I withdraw now? - if (REQUEST_ISSET_POST(('withdraw'))) { + if (isPostRequestElementSet(('withdraw'))) { // Okay, let's prepare... $curr = date('m', time()) - 1; if (strlen($curr) == 1) $curr = '0'.$curr; updateConfiguration('last_month', $curr); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED')); } // END - if // Autopurge installed? $lastOnline = "%s"; $ONLINE = ''; - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); @@ -64,7 +64,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".$lastOnline." ORDER BY beg_points DESC, last_online DESC, userid", array($ONLINE), __FILE__, __LINE__); @@ -82,16 +82,16 @@ ORDER BY beg_points DESC, last_online DESC, userid", } // END - if // Prepare content - // @TODO Rewrite templates so s/fname will be replaced by surname/family - // @TODO to shorten this block. Please also do so with uid->userid + // @TODO Rewrite templates so s/family will be replaced by surname/family + // @TODO to shorten this block. Please also do so with userid->userid $content = array( - 'uid' => $content['userid'], + 'userid' => $content['userid'], 'email' => generateEmailLink($content['email'], 'user_data'), 'gender' => translateGender($content['gender']), - 'sname' => $content['surname'], - 'fname' => $content['family'], + 'surname' => $content['surname'], + 'family' => $content['family'], 'turbo' => translateComma($content['beg_points']), - 'last' => generateDateTime($content['last_online'], '2'), + 'last_online' => generateDateTime($content['last_online'], '2'), 'sw' => $SW, 'win1' => $WIN1, 'win2' => $WIN2, @@ -99,38 +99,39 @@ ORDER BY beg_points DESC, last_online DESC, userid", ); // Load template and add it - $OUT .= LOAD_TEMPLATE("admin_list_beg_rows", true, $content); + $OUT .= loadTemplate('admin_list_beg_rows', true, $content); $SW = 3 - $SW; $cnt++; $total += $content['beg_points']; } - define('__BEG_ROWS', $OUT); - define('__TOTAL', translateComma($total)); + + $content['rows'] = $OUT; + $content['total'] = translateComma($total); // Check if we need to display form or not with manuel withdraw if (getConfig('last_month') == date('m', time())) { // Load form - define('__BEG_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_beg_form", true)); + $content['withdraw_form'] = loadTemplate('admin_list_beg_form', true); } else { // Display message "no manual withdraw possible" - define('__BEG_WITHDRAW_FORM', "<div class=\"admin_failed\">{--ADMIN_BEG_ALREADY_WITHDRAW--}</div>"); + $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, "<div class=\"admin_failed\">{--ADMIN_BEG_ALREADY_WITHDRAW--}</div>"); } // Prepare constant for timemark - if (EXT_IS_ACTIVE('autopurge')) { - define('__AUTOPURGE_TIMEOUT', generateDateTime(time() - getConfig('ap_inactive_since'), '2')); + if (isExtensionActive('autopurge')) { + $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), '2'); } else { - define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge')); + $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge')); } // Load final template - LOAD_TEMPLATE("admin_list_beg"); + loadTemplate('admin_list_beg', false, $content); } else { // No one has joined the begging rallye... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_NO_RALLYE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BEG_NO_RALLYE')); } } else { // Rallye deactivated - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_RALLYE_DEACTIVATED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BEG_RALLYE_DEACTIVATED')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 8978037e58..9e3167b567 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,24 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (getConfig('bonus_active') == 'Y') { // Shall I withdraw now? - if (REQUEST_ISSET_POST(('withdraw'))) { + if (isPostRequestElementSet(('withdraw'))) { // Okay, let's prepare... $curr = date('m', time()) - 1; if (strlen($curr) == 1) $curr = '0'.$curr; updateConfiguration('last_month', $curr); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED')); } // END - if - if (GET_EXT_VERSION('bonus') >= '0.6.9') { + if (getExtensionVersion('bonus') >= '0.6.9') { // Add more bonus points here $USE = '(0'; if (getConfig('bonus_click_yn') == 'Y') $USE .= " + `turbo_bonus`"; @@ -71,17 +70,17 @@ if (getConfig('bonus_active') == 'Y') { // Autopurge installed? $lastOnline = "%s"; $ONLINE = ''; - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); } // 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` + $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS points, `last_online` +FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline." -ORDER BY points DESC, last_online DESC, userid", +ORDER BY `points` DESC, `last_online` DESC, `userid` ASC", array($ONLINE), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { @@ -100,49 +99,50 @@ ORDER BY points DESC, last_online DESC, userid", } // Prepare content - $content['uid'] = generateUserProfileLink($content['uid']); + $content['userid'] = generateUserProfileLink($content['userid']); $content['email'] = generateEmailLink($content['email'], 'user_data'); $content['gender'] = translateGender($content['gender']); $content['points'] = translateComma($content['points']); - $content['last'] = generateDateTime($content['last'], '2'); + $content['last_online'] = generateDateTime($content['last_online'], '2'); $content['sw'] = $SW; $content['win1'] = $WIN1; $content['win2'] = $WIN2; $content['cnt'] = $cnt; // Load template and add it - $OUT .= LOAD_TEMPLATE("admin_list_bonus_rows", true, $content); + $OUT .= loadTemplate('admin_list_bonus_rows', true, $content); $SW = 3 - $SW; $cnt++; - } - define('__BONUS_ROWS', $OUT); - define('__TOTAL', translateComma($total)); + } // END - while + + $content['rows'] = $OUT; + $content['total'] = translateComma($total); // Check if we need to display form or not with manuel withdraw if (getConfig('last_month') == date('m', time())) { // Load form - define('__BONUS_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_bonus_form", true)); + $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', true); } else { // Display message "no manual withdraw possible" - define('__BONUS_WITHDRAW_FORM', "<div class=\"admin_failed\">{--ADMIN_BONUS_ALREADY_WITHDRAW--}</div>"); + $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, "<div class=\"admin_failed\">{--ADMIN_BONUS_ALREADY_WITHDRAW--}</div>"); } // Prepare constant for timemark - if (EXT_IS_ACTIVE('autopurge')) { - define('__AUTOPURGE_TIMEOUT', generateDateTime(time() - getConfig('ap_inactive_since'), '2')); + if (isExtensionActive('autopurge')) { + $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), '2'); } else { - define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge')); + $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge')); } // Load final template - LOAD_TEMPLATE("admin_list_bonus"); + loadTemplate('admin_list_bonus', false, $content); } else { // No one has become an "activity bonus"... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_NO_ACTIVE_RALLYE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_NO_ACTIVE_RALLYE')); } } else { // Aktive-Rallye not activated - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_RALLYE_DEACTIVATED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_RALLYE_DEACTIVATED')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index fc2c06cbbd..7aaf18c3f9 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,39 +38,37 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // Check if the user already exists - $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Loads surname, family's name and the email address - list($sname, $fname, $email) = SQL_FETCHROW($result); - SQL_FREERESULT($result); + $content = SQL_FETCHARRAY($result); // Prepare constants - define('__CATS_BASE' , "<a href=\"{?URL?}/modules.php?module=admin&uid="); - define('__UID' , bigintval(REQUEST_GET('uid'))); - define('__MEMBER_LINKS', generateMemberAdminActionLinks(constant('__UID'))); - define('__EMAIL' , "<a href=\"".generateEmailLink($email, 'user_data')."\">".$sname." ".$fname."</a>"); + // @TODO No longer needed? define('__CATS_BASE' , "<a href=\"{?URL?}/modules.php?module=admin&userid="); + $content['userid'] = bigintval(getRequestElement('userid')); + $content['member_links'] = generateMemberAdminActionLinks($content['userid']); + $content['email'] = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>"; // Ok, list categories of this user - $result_cats = SQL_QUERY("SELECT `id`, `cat` FROM `{!_MYSQL_PREFIX!}_cats` ORDER BY `sort` ASC", __FILE__, __LINE__); + $result_cats = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats` ORDER BY `sort` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result_cats) > 0) { // List categories $cnt = 1; $OUT = ''; $SW = 2; - while ($content = SQL_FETCHARRAY($result_cats)) { + while ($content = merge_array($content, SQL_FETCHARRAY($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", - array(bigintval(REQUEST_GET('uid')), bigintval($content['id'])), __FILE__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", + array(bigintval(getRequestElement('userid')), bigintval($content['id'])), __FILE__, __LINE__); // Set selection $selection = "<font color=\"#ee0000\">{--NO--}</div>"; @@ -82,30 +80,33 @@ if (REQUEST_ISSET_GET('uid')) { $content['sel'] = $selection; // Load row template and switch colors + count up - $OUT .= LOAD_TEMPLATE('admin_list_cats_row', true, $content); + $OUT .= loadTemplate('admin_list_cats_row', true, $content); $SW = 3 - $SW; $cnt++; } // END - while // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__CATS_ROWS', $OUT); + // Remember all rows in the array + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE('admin_list_cats'); + loadTemplate('admin_list_cats', false, $content); } else { // No categories selected! :-( - LOAD_TEMPLATE('admin_list_cats_404'); + loadTemplate('admin_list_cats_404', false, $content); } } else { // User not found - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), constant('__UID'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $content['userid'])); } + + // Free result + SQL_FREERESULT($result); } else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index d560b9faa9..86ba650fe5 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,59 +37,58 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Add new code? -if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ISSET_POST(('descr')))) { +if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && (isPostRequestElementSet(('descr')))) { // Check if country code does already exist - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_countries` WHERE code='%s' LIMIT 1", - array(strtoupper(REQUEST_POST('code'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1", + array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // 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(REQUEST_POST('code'), 0, 2)), - REQUEST_POST('descr'), - REQUEST_POST('is_active') + strtoupper(substr(postRequestElement('code'), 0, 2)), + postRequestElement('descr'), + postRequestElement('is_active') ), __FILE__, __LINE__); // Country added - $message = sprintf(getMessage('ADMIN_COUNTRY_ADDED'), strtoupper(REQUEST_POST('descr'))); + $message = sprintf(getMessage('ADMIN_COUNTRY_ADDED'), strtoupper(postRequestElement('descr'))); } else { // Free memory SQL_FREERESULT($result); // Does already exist - $message = sprintf(getMessage('ADMIN_COUNTRY_ALREADY'), strtoupper(REQUEST_POST('code'))); + $message = sprintf(getMessage('ADMIN_COUNTRY_ALREADY'), strtoupper(postRequestElement('code'))); } // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $message); -} elseif ((REQUEST_ISSET_POST('change')) && (REQUEST_ISSET_POST('id'))) { + loadTemplate('admin_settings_saved', false, $message); +} elseif ((isPostRequestElementSet('change')) && (isPostRequestElementSet('id'))) { // Change all status - ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), 'countries', 'is_active'); + adminChangeActivationStatus(postRequestElement('id'), 'countries', 'is_active'); // Show next link - LOAD_TEMPLATE('admin_next_link', false, array( + loadTemplate('admin_next_link', false, array( 'url' => 'modules.php?module=admin&what=list_country', 'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK') )); -} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('delete'))) && (REQUEST_ISSET_POST('id'))) { - if (count(REQUEST_POST('id')) > 0) { - if (REQUEST_ISSET_POST('edit')) { +} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) { + if (count(postRequestElement('id')) > 0) { + if (isPostRequestElementSet('edit')) { // Edit template $row = 'admin_list_country_edit_row'; $post = 'modify'; $class = 'admin_submit'; $submit = getMessage('ADMIN_COUNTRY_EDIT_NOW'); $title = getMessage('ADMIN_COUNTRY_EDIT_TITLE'); - $reset = '<input type="reset" class="admin_reset" value="{!UNDO_SELECTIONS!}" /> *'; + $reset = '<input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> *'; } else { // Delete template $row = 'admin_list_country_del_row'; @@ -102,9 +101,9 @@ if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_IS // Edit all selected country codes $OUT = ''; $SW = 2; - foreach (REQUEST_POST('id') as $id => $status) { + foreach (postRequestElement('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 @@ -128,68 +127,65 @@ if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_IS } // Insert row template and switch color - $OUT .= LOAD_TEMPLATE($row, true, $content); + $OUT .= loadTemplate($row, true, $content); $SW = 3 - $SW; } } - define('__COUNTRY_ROWS' , $OUT); - define('__COUNTRY_MODE' , $post); - define('__COUNTRY_CLASS' , $class); - define('__COUNTRY_SUBMIT', $submit); - define('__COUNTRY_TITLE' , $title); - define('__COUNTRY_RESET' , $reset); + + // Prepare content for template + $content = array( + 'rows' => $OUT, + 'mode' => $post, + 'class' => $class, + 'title' => $title, + 'submit' => $submit, + 'reset' => $reset, + ); // Load main template - LOAD_TEMPLATE('admin_list_country_form'); + loadTemplate('admin_list_country_form', false, $content); } } else { // Shall we modify / remove entries now? - $message = ''; INIT_SQLS(); - if ((REQUEST_ISSET_POST(('modify'))) && (REQUEST_ISSET_POST('id'))) { + $message = ''; initSqls(); + if ((isPostRequestElementSet(('modify'))) && (isPostRequestElementSet('id'))) { // Modify - foreach (REQUEST_POST('id') as $id => $sel) { - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET `code`='".REQUEST_POST('code', $id)."', `descr`='".REQUEST_POST('descr', $id)."', `is_active`='".REQUEST_POST('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestElement('id') as $id => $sel) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='".postRequestElement('code', $id)."', `descr`='".postRequestElement('descr', $id)."', `is_active`='".postRequestElement('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1"); } // Create message $message = getMessage('ADMIN_COUNTRIES_MODIFIED'); - } elseif ((REQUEST_ISSET_POST('remove')) && (REQUEST_ISSET_POST('id'))) { + } elseif ((isPostRequestElementSet('remove')) && (isPostRequestElementSet('id'))) { // Remove - $IDs = implode(',', array_keys(REQUEST_POST('id'))); - ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(REQUEST_POST('id')).""); + $IDs = implode(',', array_keys(postRequestElement('id'))); + addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id')).""); // Create message $message = getMessage('ADMIN_COUNTRIES_REMOVED'); } - if ((!empty($message)) && (COUNT_SQLS() > 0)) { + if ((!empty($message)) && (countSqls() > 0)) { // Run SQL commands runFilterChain('run_sqls'); // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // Load currenty setup country codes to list - $result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY code', + $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; while ($content = SQL_FETCHARRAY($result)) { // Prepare array for the template - // @TODO Rewritings: name->descr,status->is_active in template - $content = array( - 'id' => $content['id'], - 'code' => $content['code'], - 'name' => $content['descr'], - 'active' => translateYesNo($content['is_active']), - 'sw' => $SW, - 'status' => $content['is_active'], - ); + $content['active'] = translateYesNo($content['is_active']); + $content['sw'] = $SW; // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_list_country_row', true, $content); + $OUT .= loadTemplate('admin_list_country_row', true, $content); $SW = 3 - $SW; } @@ -197,18 +193,18 @@ if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_IS SQL_FREERESULT($result); } else { // No code setup so far (not possible by this software! 'DE' for 'Deutschland' is default - $OUT = LOAD_TEMPLATE('admin_list_country_no_row', true); + $OUT = loadTemplate('admin_list_country_no_row', true); } // Add list to constant for the template - define('__COUNTRY_ROWS', $OUT); + $content['rows'] = $OUT; // Include add template - define('__ADD_COUNTRY_FORM', LOAD_TEMPLATE('admin_add_country', true)); + $content['add_form'] = loadTemplate('admin_add_country', true); // Load main template - LOAD_TEMPLATE('admin_list_country'); + loadTemplate('admin_list_country', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 6ba8c6ddc8..7d13119640 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,95 +37,82 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (!REQUEST_ISSET_GET('mode')) { +if (!isGetRequestElementSet('mode')) { // Chosse the overview page as default - REQUEST_GET('mode', 'overview'); + setRequestGetElement('mode', 'overview'); } else { // Set table title automatically - if (!REQUEST_ISSET_GET(('select'))) REQUEST_GET('select', "all"); - $eval = "define('__ADMIN_DOUBLER_LIST_".strtoupper(REQUEST_GET('mode'))."', getMessage('ADMIN_DOUBLER_LIST_".strtoupper(REQUEST_GET('mode'))."_".strtoupper(REQUEST_GET('select'))."'));"; - eval($eval); + if (!isGetRequestElementSet('select')) setRequestGetElement('select', 'all'); + + // Prepare header + $content['list_' . strtolower(getRequestElement('mode'))] = getMessage('ADMIN_DOUBLER_LIST_' . strtoupper(getRequestElement('mode')) . '_' . strtoupper(getRequestElement('select')).''); } // Load data for the template -// @TODO Try to rewrite this into include files -switch (REQUEST_GET('mode')) { +switch (getRequestElement('mode')) { case 'already': // Already payed out points break; case 'overview': // General overview page - $SUM_ALREADY = 0; $SUM_WAITING = 0; + // Prepare links + foreach (array('already_direct','already_ref','waiting_direct','waiting_ref') as $entry) { + $content[$entry . '_link'] = '0'; + } // END - switch + + // Init sums + $sumAlready = 0; $sumWaiting = 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__); - list($cnt) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - if ((empty($cnt)) || ($cnt == '0')) { - // Nothing payed out so far - // @TODO Rewrite all these constants - define('__DOUBLER_ALREADY_DIRECT_LINK', '0'); - } else { + $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'"); + + if ($cnt > 0) { // Something was payed out - $SUM_ALREADY += $cnt; - define('__DOUBLER_ALREADY_DIRECT_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=direct\">".$cnt."</a>"); - } - - $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); - - if ((empty($cnt)) || ($cnt == '0')) { - // Nothing payed out so far - define('__DOUBLER_ALREADY_REF_LINK', '0'); - } else { - // Something was payed out - $SUM_ALREADY += $cnt; - define('__DOUBLER_ALREADY_REF_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=ref\">".$cnt."</a>"); - } - define('__DOUBLER_ALREADY_ALL_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=all\">".$SUM_ALREADY."</a>"); - - // 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__); - list($cnt) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - if ((empty($cnt)) || ($cnt == '0')) { - // Nothing payed out so far - define('__DOUBLER_WAITING_DIRECT_LINK', '0'); - } else { - // Something was payed out - $SUM_WAITING += $cnt; - define('__DOUBLER_WAITING_DIRECT_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=direct\">".$cnt."</a>"); - } - - $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); - - if ((empty($cnt)) || ($cnt == '0')) { - // Nothing payed out so far - define('__DOUBLER_WAITING_REF_LINK', '0'); - } else { - // Something was payed out - $SUM_WAITING += $cnt; - define('__DOUBLER_WAITING_REF_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=ref\">".$cnt."</a>"); - } - define('__DOUBLER_WAITING_ALL_LINK', "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=all\">".$SUM_WAITING."</a>"); - - // All data is loaded here... - break; -} + $sumAlready += $cnt; + $content['already_direct_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=direct\">".$cnt."</a>"; + } // END - if + + $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='Y'"); + + if ($cnt > 0) { + // Something was payed out + $sumAlready += $cnt; + $content['already_ref_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=ref\">".$cnt."</a>"; + } // END - if + + // And the same for waiting pouts (direct and referal) + $cnt = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='N'"); + + if ($cnt > 0) { + // Something was payed out + $sumWaiting += $cnt; + $content['waiting_direct_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=direct\">".$cnt."</a>"; + } // END - if + + $cnt = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='Y'"); + + if ($cnt > 0) { + // Something was payed out + $sumWaiting += $cnt; + $content['waiting_ref_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=ref\">".$cnt."</a>"; + } // END - if + + // Links for all + $content['already_all_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=already&select=all\">".$sumAlready."</a>"; + $content['waiting_all_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=list_doubler&mode=waiting&select=all\">".$sumWaiting."</a>"; + + // All data is loaded here... + break; +} // END - switch // Load mode template -LOAD_TEMPLATE('admin_list_doubler_' . REQUEST_GET('mode')); +loadTemplate('admin_list_doubler_' . getRequestElement('mode'), false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 0dc684b149..5afce11932 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,18 +37,17 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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__); @@ -63,31 +62,28 @@ if (SQL_NUMROWS($result) > 0) { $content = array( 'sw' => $SW, 'id' => $content['id'], - 'uid' => generateUserProfileLink($content['userid']), + 'userid' => generateUserProfileLink($content['userid']), 'start' => generateDateTime($content['holiday_start'], '3'), 'end' => generateDateTime($content['holiday_end'], '3'), 'comments' => wordwrap($content['comments'], 15), 'status' => translateUserStatus($content['status']), - 'last' => generateDateTime($content['last_online'], '3'), + 'last_online' => generateDateTime($content['last_online'], '3'), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_list_holiday_row", true, $content); + $OUT .= loadTemplate('admin_list_holiday_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__HOLIDAY_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE("admin_list_holiday"); + loadTemplate('admin_list_holiday', false, $OUT); } else { // No holiday requests found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 8bddc32dac..6e9ad7d1e2 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : List unconfirmed mails of a member * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Unbestaetigte Mails eines Mitgliedes auflisten * + * Kurzbeschreibung : Unbestätigte Mails eines Mitgliedes auflisten * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,39 +37,38 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('mailid')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('mailid')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (!REQUEST_ISSET_GET('del')) REQUEST_SET_GET('del', ''); +if (!isExtensionActive('mailid')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mailid')); + return; +} // END - if -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // Check if the user already exists - $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Loads surname, family's name and the email address - list($sname, $fname, $email) = SQL_FETCHROW($result); + list($surname, $family, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Grab user's all unconfirmed mails - if (EXT_IS_ACTIVE('bonus')) { + if (isExtensionActive('bonus')) { // Load bonus ID - $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id`", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } else { // Load stats ID (2nd will be ignored later! But it is needed for the same fetchrow command) - $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } // Get number of rows from the query @@ -77,17 +76,17 @@ if (REQUEST_ISSET_GET('uid')) { if ($nums > 0) { // Some unconfirmed mails left - if (REQUEST_GET('del') == "all") { + if (getRequestElement('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", - array(bigintval(REQUEST_GET('uid')), $nums), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s LIMIT %s", + array(bigintval(getRequestElement('userid')), $nums), __FILE__, __LINE__); // Prepare mail and send it away - $message = LOAD_EMAIL_TEMPLATE('admin-del_links', $nums, bigintval(REQUEST_GET('uid'))); + $message = loadEmailTemplate('admin-del_links', $nums, bigintval(getRequestElement('userid'))); sendEmail($email, getMessage('ADMIN_DEL_LINK_SUBJ'), $message); // Display message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_LINKS_DELETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_LINKS_DELETED')); } else { // Init variables $OUT = ''; $SW = 2; @@ -105,22 +104,22 @@ if (REQUEST_ISSET_GET('uid')) { // @TODO Rewrite this to includes/filter 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 = getMessage('NORMAL_MAIL_PROBLEM'); - $LINK = "<a href=\"{?URL?}/mailid.php?uid=".REQUEST_GET('uid')."&mailid=".$id."\" target=\"_blank\">".$id."</a>"; + $LINK = "<a href=\"{?URL?}/mailid.php?userid=".getRequestElement('userid')."&mailid=".$id."\" target=\"_blank\">".$id."</a>"; 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 = getMessage('BONUS_MAIL_PROBLEM'); - $LINK = "<a href=\"{?URL?}/mailid.php?uid=".REQUEST_GET('uid')."&bonusid=".$id2."\" target=\"_blank\">".$id2."</a>"; + $LINK = "<a href=\"{?URL?}/mailid.php?userid=".getRequestElement('userid')."&bonusid=".$id2."\" target=\"_blank\">".$id2."</a>"; break; default: // Problem in application detected! // Log the error - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type)); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type)); break; } @@ -140,10 +139,10 @@ if (REQUEST_ISSET_GET('uid')) { ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_links_row', true, $content); + $OUT .= loadTemplate('admin_list_links_row', true, $content); } else { // Load template for error - $OUT .= LOAD_TEMPLATE('admin_list_links_problem', + $OUT .= loadTemplate('admin_list_links_problem', array( 'sw' => $SW, 'problem' => $PROBLEM, @@ -158,28 +157,28 @@ if (REQUEST_ISSET_GET('uid')) { SQL_FREERESULT($result); // Remember list in constant for the template - define('__SNAME_VALUE', $sname); - define('__FNAME_VALUE', $fname); - define('__EMAIL_VALUE', "<a href=\"" . generateEmailLink($email, 'user_data') . "\">".$email."</a>"); - define('__EMAIL_LIST' , $OUT); - define('__NUMS_VALUE' , $nums); - define('__UID' , bigintval(REQUEST_GET('uid'))); + $content['surname'] = $surname; + $content['family'] = $family; + $content['email'] = "<a href=\"" . generateEmailLink($email, 'user_data') . "\">".$email."</a>"; + $content['rows'] = $OUT; + $content['nums'] = $nums; + $content['userid'] = bigintval(getRequestElement('userid')); // Load final template - LOAD_TEMPLATE('admin_list_links'); + loadTemplate('admin_list_links', false, $content); } } else { // No mails left to confirm - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_LINKS'), REQUEST_GET('uid'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_LINKS'), getRequestElement('userid'))); } } else { // User not found - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))); } } else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_newsletter.php b/inc/modules/admin/what-list_newsletter.php index 762ea9db95..f551ef47b7 100644 --- a/inc/modules/admin/what-list_newsletter.php +++ b/inc/modules/admin/what-list_newsletter.php @@ -1,69 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 03/04/2005 * - * =============== Last change: 03/05/2005 * - * * - * -------------------------------------------------------------------- * - * File : what-list_newsletter.php * - * -------------------------------------------------------------------- * - * Short description : Handle HTML or text newsletter * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Verwalten von HTML- oder Text-Newslettern * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Add description as navigation point -ADD_DESCR('admin', __FILE__); - -if ((REQUEST_ISSET_POST('uid')) && (REQUEST_ISSET_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", - array(bigintval(REQUEST_POST('uid'))), __FILE__, __LINE__); - - // Next the task system... - runFilterChain('solve_task', bigintval(REQUEST_POST('id'))); - - // Send mail to user - $message = LOAD_EMAIL_TEMPLATE('member_newsletter_done', true, bigintval(REQUEST_POST('uid'))); - sendEmail(bigintval(REQUEST_POST('uid')), getMessage('NL_MEMBER_DONE_SUBJECT'), $message); - - // Output message to admin - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NL_MEMBER_DONE')); -} else { - // @TODO Currently under construction! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('UNDER_CONSTRUCTION')); -} - -// +// @DEPRECATED ?> diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 0b92ed0464..1858732639 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,27 +37,26 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init variables -$WHO = _ALL; $SQL2 = ''; +$result_max = false; // Set offset an current page to default values -if (!REQUEST_ISSET_GET('page')) REQUEST_SET_GET('page' , '1'); -if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', getConfig('mails_page')); +if (!isGetRequestElementSet('page')) setRequestGetElement('page' , '1'); +if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page')); -if ((EXT_IS_ACTIVE('bonus')) && ($WHO == getMessage('_ALL'))) { +if (isExtensionActive('bonus')) { // 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"; @@ -65,15 +64,16 @@ ORDER BY timestamp DESC"; $result_max = SQL_QUERY($SQL2, __FILE__, __LINE__); } else { // Bonus extension required! + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), 'bonus')); } // Create limitation line -$add = " LIMIT ".(bigintval(REQUEST_GET('offset')) * bigintval(REQUEST_GET('page')) - bigintval(REQUEST_GET('offset'))).", ".bigintval(REQUEST_GET('offset')); +$add = " LIMIT ".(bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))).", ".bigintval(getRequestElement('offset')); // Add limitation if (!empty($SQL2)) $SQL2 .= $add; -if ((EXT_IS_ACTIVE('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2))) { +if ((isExtensionActive('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2))) { // Run SQL query for notification mails $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__); @@ -100,24 +100,27 @@ if ((EXT_IS_ACTIVE('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2) $content['category'] = getCategory($content['cat_id']); $content['receivers'] = str_replace(';', ", ", $content['receivers']); $content['type'] = translatePoolType($content['data_type']); - $content['frametester'] = FRAMETESTER($content['url']); + $content['frametester'] = generateFrametesterUrl($content['url']); $content['timestamp'] = generateDateTime($content['timestamp'], '0'); // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_notify_emails_row", true, $content); + $OUT .= loadTemplate('admin_list_notify_emails_row', true, $content); } // Add navigation (without change box but with colspan=3) $content['nav'] = ''; - if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, '3', true); + if ($PAGES > 1) $content['nav'] = addEmailNavigation($PAGES, getConfig('mails_page'), false, '3', true); // Prepare content $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE("admin_list_notify_emails", false, $content); + loadTemplate('admin_list_notify_emails', false, $content); } +} elseif ((SQL_NUMROWS($result_max) === 0) && (is_resource($result_max))) { + // No notifications found + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_NOTIFICATIONS')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 5aae95abe2..ec39c96dd5 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,53 +37,49 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET(('pid'))) { +if (isGetRequestElementSet(('pid'))) { // First let's get the member's ID - $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1", - array(REQUEST_GET('pid')), __FILE__, __LINE__); - list($uid, $tuid, $points, $tstamp, $tpass) = SQL_FETCHROW($result); + $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", + array(getRequestElement('pid')), __FILE__, __LINE__); + list($userid, $tuserid, $points, $tstamp, $tpass) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Obtain some data - if (!REQUEST_ISSET_GET(('task')) && (!empty($uid)) && ($uid > 0)) { + if (!isGetRequestElementSet(('task')) && (!empty($userid)) && ($userid > 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", - array(bigintval($uid)), __FILE__, __LINE__); + $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($userid)), __FILE__, __LINE__); list($task) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (empty($task)) $task = 0; - } elseif ((empty($uid)) || ($uid == '0')) { + } elseif ((empty($userid)) || ($userid == '0')) { // Cannot obtain member ID! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID')); } else { // Get task ID from URL - $task = REQUEST_GET('task'); + $task = getRequestElement('task'); } - if ((!empty($task)) && (!empty($uid)) && ($uid > 0)) { + if ((!empty($task)) && (!empty($userid)) && ($userid > 0)) { // Load user's data - $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `email`, `gender`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); list($email, $gender, $surname, $family) = SQL_FETCHROW($result); SQL_FREERESULT($result); - // Konstante bauen - define('PAYOUT_USERDATA_VALUE', "<a href=\"".generateEmailLink($email, 'user_data')."\">".translateGender($gender)." ".$surname." ".$family."</a>"); - - if ((REQUEST_GET('do') == 'accept') && (!empty($email))) { + if ((getRequestElement('do') == 'accept') && (!empty($email))) { // Ok, now we can output the form or execute accepting if (isFormSent()) { // Obtain payout type and other data - $result = SQL_QUERY_ESC("SELECT `payout_id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `payout_id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); list($ptype) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -91,17 +87,17 @@ if (REQUEST_ISSET_GET(('pid'))) { // 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` + `{?_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); + list($fuserid, $fpass, $eurl, $eok, $failed, $eenc, $allow) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (!empty($eurl)) { // Ok, run URL... - $eurl = COMPILE_CODE($eurl); + $eurl = compileCode($eurl); switch ($eenc) { case 'md5': $fpass = md5($fpass); @@ -119,6 +115,7 @@ LIMIT 1", $reason = encodeString(getMessage('PAYOUT_REASON_PAYOUT'), false); // Run code... + // @TODO Do we need this time-consuming eval() here? eval($eval); // Execute transfer @@ -135,19 +132,19 @@ LIMIT 1", } // Clear payout request - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Send out mail - $message = LOAD_EMAIL_TEMPLATE('member_payout_accepted', REQUEST_POST('text'), $uid); + $message = loadEmailTemplate('member_payout_accepted', postRequestElement('text'), $userid); // Output message if ($allow == 'Y') { // Banner / Textlink request - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_BANNER_ACCEPTED_NOTIFIED')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_BANNER_ACCEPTED_NOTIFIED')); } else { // Normal request - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ACCEPTED_NOTIFIED')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_ACCEPTED_NOTIFIED')); } // Finally send mail @@ -155,23 +152,24 @@ LIMIT 1", } else { // Something goes wrong... :-( $content = implode("<br />", $ret); - LOAD_TEMPLATE('admin_payout_failed_transfer', false, $content); + loadTemplate('admin_payout_failed_transfer', false, $content); } } else { // Cannot load payout id - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>"); } } else { // Prepare content $content = array( 'task' => $task, - 'pid' => bigintval(REQUEST_GET('pid')) + 'pid' => bigintval(getRequestElement('pid')), + 'user' => "<a href=\"".generateEmailLink($email, 'user_data')."\">".translateGender($gender)." ".$surname." ".$family."</a>", ); // Load template - LOAD_TEMPLATE('admin_payout_accept_form', false, $content); + loadTemplate('admin_payout_accept_form', false, $content); } - } elseif ((REQUEST_GET('do') == 'reject') && (!empty($email))) { + } elseif ((getRequestElement('do') == 'reject') && (!empty($email))) { // Ok, now we can output the form or execute rejecting if (isFormSent()) { if ($task > 0) { @@ -180,14 +178,14 @@ LIMIT 1", } // END - if // Clear payout request - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); // Send out mail - $message = LOAD_EMAIL_TEMPLATE('member_payout_rejected', REQUEST_POST('text'), $uid); + $message = loadEmailTemplate('member_payout_rejected', postRequestElement('text'), $userid); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_REJECTED_NOTIFIED')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_REJECTED_NOTIFIED')); // Finally send mail sendEmail($email, getMessage('PAYOUT_REJECTED_SUBJECT'), $message); @@ -195,38 +193,39 @@ LIMIT 1", // Prepare content $content = array( 'task' => $task, - 'pid' => bigintval(REQUEST_GET('pid')) + 'pid' => bigintval(getRequestElement('pid')), + 'user' => "<a href=\"".generateEmailLink($email, 'user_data')."\">".translateGender($gender)." ".$surname." ".$family."</a>", ); // Load template - LOAD_TEMPLATE('admin_payout_reject_form', false, $content); + loadTemplate('admin_payout_reject_form', false, $content); } } else { // Cannot load user data - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA')); } } elseif ((empty($task)) || ($task == '0')) { // Failed loading task ID - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID')); } } else { - if (!REQUEST_ISSET_GET('do')) REQUEST_SET_GET('do', ''); + if (!isGetRequestElementSet('do')) setRequestGetElement('do', ''); - if (REQUEST_GET('do') == 'delete') { + if (getRequestElement('do') == 'delete') { // Delete all requests - $result = SQL_QUERY("TRUNCATE `{!_MYSQL_PREFIX!}_user_payouts`", __FILE__, __LINE__); + $result = SQL_QUERY("TRUNCATE `{?_MYSQL_PREFIX?}_user_payouts`", __FILE__, __LINE__); } // END - if // Search for payouts $result = SQL_QUERY("SELECT - p.id, p.userid AS uid, p.payout_total, p.target_account, + p.id, p.userid, 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?}_user_payouts` AS p LEFT JOIN - `{!_MYSQL_PREFIX!}_payout_types` AS t + `{?_MYSQL_PREFIX?}_payout_types` AS t ON p.payout_id=t.id ORDER BY @@ -250,14 +249,14 @@ ORDER BY // Banner/Textlink views/clicks request if (!empty($content['banner'])) { // Load template for the banner - $content['target_account'] = LOAD_TEMPLATE('admin_list_payouts_banner', true, $content); + $content['target_account'] = loadTemplate('admin_list_payouts_banner', true, $content); } else { // Textlink - $content['target_account'] = LOAD_TEMPLATE('admin_list_payouts_txt', true, $content); + $content['target_account'] = loadTemplate('admin_list_payouts_txt', true, $content); } // Admins can addionally test the URL for framekillers - $content['target_bank'] = "<a href=\"".FRAMETESTER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>"; + $content['target_bank'] = "<a href=\"".generateFrametesterUrl($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>"; } else { // e-currency payout request if (empty($content['target_account'])) $content['target_account'] = '---'; @@ -268,7 +267,7 @@ ORDER BY $content = array( 'sw' => $SW, 'ulink' => generateUserProfileLink($content['userid']), - 'ptype' => translateComma($content['payout_total'])." ".COMPILE_CODE($content['type']), + 'ptype' => translateComma($content['payout_total']) . ' ' . $content['type'], 'account' => $content['target_account'], 'bank' => $content['target_bank'], 'tstamp' => generateDateTime($content['payout_timestamp'], '2'), @@ -276,19 +275,18 @@ ORDER BY ); // Add row and switch color - $OUT .= LOAD_TEMPLATE('admin_list_payouts_row', true, $content); + $OUT .= loadTemplate('admin_list_payouts_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__PAYOUT_ROWS', $OUT); // Load final template - LOAD_TEMPLATE('admin_list_payouts'); + loadTemplate('admin_list_payouts', false, $OUT); } else { // No payout requests are sent so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ADMIN_NO_REQUESTS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_ADMIN_NO_REQUESTS_FOUND')); } } diff --git a/inc/modules/admin/what-list_primera.php b/inc/modules/admin/what-list_primera.php index e062ed0f6b..c43eaa5077 100644 --- a/inc/modules/admin/what-list_primera.php +++ b/inc/modules/admin/what-list_primera.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,16 +37,15 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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? @@ -55,31 +54,31 @@ if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Translate some data and add color - $content['sw'] = $SW; - $content['link'] = generateUserProfileLink($content['userid']); - $content['primera_amount'] = translateComma($content['primera_amount']); - $content['primera_timestamp'] = generateDateTime($content['primera_timestamp'], '2'); - $content['raw_type'] = strtolower($content['primera_type']); - $content['primera_type'] = PRIMERA_TRANSFER_STATUS($content['primera_type']); + $content['sw'] = $SW; + $content['link'] = generateUserProfileLink($content['userid']); + $content['primera_amount'] = translateComma($content['primera_amount']); + $content['primera_timestamp'] = generateDateTime($content['primera_timestamp'], '2'); + $content['raw_type'] = strtolower($content['primera_type']); + $content['primera_type'] = PRIMERA_TRANSFER_STATUS($content['primera_type']); // Fix empty message and status if (empty($content['primera_api_message'])) $content['primera_api_message'] = '---'; - if (empty($content['primera_api_status'])) $content['primera_api_status'] = "OK"; + if (empty($content['primera_api_status'])) $content['primera_api_status'] = 'OK'; // Append it and switch colors - $OUT .= LOAD_TEMPLATE("admin_list_primera_row", true, $content); + $OUT .= loadTemplate('admin_list_primera_row', true, $content); $SW = 3 - $SW; } // END - while // Load main template - LOAD_TEMPLATE("admin_list_primera_main", false, $OUT); + loadTemplate('admin_list_primera_main', false, $OUT); } else { // Nothing to display! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_ADMIN_NO_TRANSFERS')); + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_ADMIN_NO_TRANSFERS')); } // Free the result SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index f461570727..42324c4602 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,77 +37,76 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (!REQUEST_ISSET_GET('sub')) REQUEST_SET_GET('sub', ''); +if (!isGetRequestElementSet('sub')) setRequestGetElement('sub', ''); $message = ''; // Quick actions on a rallye -if (REQUEST_ISSET_GET(('rallye'))) { +if (isGetRequestElementSet(('rallye'))) { // Init SQL queries - INIT_SQLS(); + initSqls(); - if (REQUEST_ISSET_GET(('activate'))) { + if (isGetRequestElementSet(('activate'))) { // Activate / deactivate - switch (REQUEST_GET('activate')) + switch (getRequestElement('activate')) { case '1': // Activate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1"); break; case '0': // Deactivate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1"); break; } - } elseif (REQUEST_ISSET_GET('notify')) { + } elseif (isGetRequestElementSet('notify')) { // Automatic notification - switch (REQUEST_GET('notify')) + switch (getRequestElement('notify')) { case '1': // Activate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1"); break; case '0': // Deactivate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1"); break; } - } elseif (REQUEST_ISSET_GET(('auto'))) { + } elseif (isGetRequestElementSet(('auto'))) { // Automatic adding of new members - switch (REQUEST_GET('auto')) + switch (getRequestElement('auto')) { case '1': // Activate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1"); break; case '0': // Deactivate - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1"); break; } } // Run SQL command runFilterChain('run_sqls'); -} elseif (REQUEST_ISSET_POST('remove')) { +} elseif (isPostRequestElementSet('remove')) { // Delete rallyes $SEL = countPostSelection(); if ($SEL > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // Delete selected rallyes and all it's data - foreach (REQUEST_POST('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Remove selected rallye entirely... - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s", array(bigintval($id)), __FILE__, __LINE__, false)); - ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s", + addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s", array(bigintval($id)), __FILE__, __LINE__, false)); } // END - foreach @@ -120,24 +119,24 @@ if (REQUEST_ISSET_GET(('rallye'))) { // No rallye selected to delete! $message = getMessage('RALLYE_DELETE_NOTHING_SELECTED'); } -} elseif (REQUEST_ISSET_POST('change')) { +} elseif (isPostRequestElementSet('change')) { // Change rallye - $SEL = countSelection(REQUEST_POST('title')); + $SEL = countSelection(postRequestElement('title')); if ($SEL > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // Change selected rallyes and all it's data - foreach (REQUEST_POST('title') as $id => $title) { + foreach (postRequestElement('title') as $id => $title) { // Secure ID number $id = bigintval($id); // Generate timestamps - $START = mktime(REQUEST_POST('start_hour', $id), REQUEST_POST('start_min', $id), REQUEST_POST('start_sec', $id), REQUEST_POST('start_month', $id), REQUEST_POST('start_day', $id), REQUEST_POST('start_year', $id)); - $END = mktime(REQUEST_POST('end_hour', $id) , REQUEST_POST('end_min', $id) , REQUEST_POST('end_sec', $id) , REQUEST_POST('end_month', $id) , REQUEST_POST('end_day', $id) , REQUEST_POST('end_year', $id) ); + $START = mktime(postRequestElement('start_hour', $id), postRequestElement('start_min', $id), postRequestElement('start_sec', $id), postRequestElement('start_month', $id), postRequestElement('start_day', $id), postRequestElement('start_year', $id)); + $END = mktime(postRequestElement('end_hour', $id) , postRequestElement('end_min', $id) , postRequestElement('end_sec', $id) , postRequestElement('end_month', $id) , postRequestElement('end_day', $id) , postRequestElement('end_year', $id) ); // Update entry - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET title='%s', descr='%s', template='%s', @@ -148,12 +147,12 @@ min_prices='%s' WHERE `id`='".$id."' LIMIT 1", array( $title, - REQUEST_POST('descr', $id), - REQUEST_POST('templ', $id), + postRequestElement('descr', $id), + postRequestElement('templ', $id), bigintval($START), bigintval($END), - bigintval(REQUEST_POST('min_users', $id)), - bigintval(REQUEST_POST('min_prices', $id)), + bigintval(postRequestElement('min_users', $id)), + bigintval(postRequestElement('min_prices', $id)), $id ), __FILE__, __LINE__, false)); } @@ -166,16 +165,16 @@ WHERE `id`='".$id."' LIMIT 1", } } -if (REQUEST_ISSET_POST('edit')) { +if (isPostRequestElementSet('edit')) { // Check for selections $SEL = countPostSelection(); if ($SEL > 0) { // Make all selected and deactivated rallyes editable $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $selected) { + foreach (postRequestElement('sel') as $id => $selected) { // Load rallye basic data $result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices -FROM `{!_MYSQL_PREFIX!}_rallye_data` +FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -186,209 +185,206 @@ LIMIT 1", SQL_FREERESULT($result); // Starting day - $content['s_sec'] = ADD_SELECTION('sec' , date('s', $content['start_time']), 'start', $id); - $content['s_min'] = ADD_SELECTION('min' , date('i', $content['start_time']), 'start', $id); - $content['s_hour'] = ADD_SELECTION('hour' , date('G', $content['start_time']), 'start', $id); - $content['s_day'] = ADD_SELECTION('day' , date('d', $content['start_time']), 'start', $id); - $content['s_month'] = ADD_SELECTION('month', date('m', $content['start_time']), 'start', $id); - $content['s_year'] = ADD_SELECTION('year' , date('Y', $content['start_time']), 'start', $id); + $content['s_sec'] = addSelectionBox('sec' , date('s', $content['start_time']), 'start', $id); + $content['s_min'] = addSelectionBox('min' , date('i', $content['start_time']), 'start', $id); + $content['s_hour'] = addSelectionBox('hour' , date('G', $content['start_time']), 'start', $id); + $content['s_day'] = addSelectionBox('day' , date('d', $content['start_time']), 'start', $id); + $content['s_month'] = addSelectionBox('month', date('m', $content['start_time']), 'start', $id); + $content['s_year'] = addSelectionBox('year' , date('Y', $content['start_time']), 'start', $id); // Ending day - $content['e_sec'] = ADD_SELECTION('sec' , date('s', $content['end_time']) , 'end' , $id); - $content['e_min'] = ADD_SELECTION('min' , date('i', $content['end_time']) , 'end' , $id); - $content['e_hour'] = ADD_SELECTION('hour' , date('G', $content['end_time']) , 'end' , $id); - $content['e_day'] = ADD_SELECTION('day' , date('d', $content['end_time']) , 'end' , $id); - $content['e_month'] = ADD_SELECTION('month', date('m', $content['end_time']) , 'end' , $id); - $content['e_year'] = ADD_SELECTION('year' , date('Y', $content['end_time']) , 'end' , $id); + $content['e_sec'] = addSelectionBox('sec' , date('s', $content['end_time']) , 'end' , $id); + $content['e_min'] = addSelectionBox('min' , date('i', $content['end_time']) , 'end' , $id); + $content['e_hour'] = addSelectionBox('hour' , date('G', $content['end_time']) , 'end' , $id); + $content['e_day'] = addSelectionBox('day' , date('d', $content['end_time']) , 'end' , $id); + $content['e_month'] = addSelectionBox('month', date('m', $content['end_time']) , 'end' , $id); + $content['e_year'] = addSelectionBox('year' , date('Y', $content['end_time']) , 'end' , $id); // Remember other values - $content['templ'] = RALLYE_TEMPLATE_SELECTION('templ['.$id.']', $content['template']); + $content['templ'] = addReferalRallyeTemplateSelection('templ['.$id.']', $content['template']); $content['sw'] = $SW; $content['id'] = $id; // Output row - $OUT .= LOAD_TEMPLATE('admin_edit_rallyes_row', true, $content); + $OUT .= loadTemplate('admin_edit_rallyes_row', true, $content); // Color switching $SW = 3 - $SW; } - // Remember rows in constant - define('__RALLYE_ROWS', $OUT); - // Load final template - LOAD_TEMPLATE('admin_edit_rallyes'); + loadTemplate('admin_edit_rallyes', false, $OUT); } else { // Nothing selected to edit - LOAD_TEMPLATE('admin_settings_saved', false, LOAD_TEMPLATE('admin_list_rallye_noselect', true)); + loadTemplate('admin_settings_saved', false, loadTemplate('admin_list_rallye_noselect', true)); } -} elseif ((REQUEST_GET('sub') == 'users') && (REQUEST_GET('rallye') > 0)) { +} elseif ((getRequestElement('sub') == 'users') && (getRequestElement('rallye') > 0)) { // List users and their refs before start and current - $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC", - array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC", + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; - // @TODO Rewrite this constant - define('__RALLYE_VALUE', REQUEST_GET('rallye')); - while ($content = SQL_FETCHARRAY($result)) { + $content['rallye'] = getRequestElement('rallye'); + while ($row = SQL_FETCHARRAY($result)) { // Check for referal count - $cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']); + $cnt = getReferalRallyeRefsCount($row['userid'], $row['refs']); // Init variables $bl = ''; $br = ''; // Output row - if (($content['curr_points'] > 0) && ($cnt > 0)) { $bl = "<strong>"; $br = "</strong>"; } - if (($content['refs'] > 0) || ($cnt > 0)) { + if (($row['curr_points'] > 0) && ($cnt > 0)) { $bl = "<strong>"; $br = "</strong>"; } + if (($row['refs'] > 0) || ($cnt > 0)) { // Insert link to referal list - //* DEBUG: */ OUTPUT_HTML('-'.$content['userid'].'/'.$cnt.'/'.$content['refs']."-<br />"); - $cnt = generateUserProfileLink($content['userid'], $cnt, 'list_refs'); - $content['refs'] = generateUserProfileLink($content['userid'], $content['refs'], 'list_refs'); + //* DEBUG: */ outputHtml('-'.$row['userid'].'/'.$cnt.'/'.$row['refs']."-<br />"); + $cnt = generateUserProfileLink($row['userid'], $cnt, 'list_refs'); + $row['refs'] = generateUserProfileLink($row['userid'], $row['refs'], 'list_refs'); } // END - if // Get user points - $points = GET_TOTAL_DATA($content['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1"); - //* DEBUG: */ OUTPUT_HTML(basename(__FILE__).":uid={$content['userid']},points={$points},opoints={$content['curr_points']}<br />"); + $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1"); + //* DEBUG: */ outputHtml(basename(__FILE__).":userid={$row['userid']},points={$points},opoints={$row['curr_points']}<br />"); // Prepare content - // @TODO Rewritings: uid->userid,opoints->curr_points,old->refs in template - $content = array( + // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template + $row = array( 'sw' => $SW , - 'uid' => $content['userid'], + 'userid' => $row['userid'], 'bold_l' => $bl , 'bold_r' => $br , - 'old' => $content['refs'], + 'old' => $row['refs'], 'cnt' => $cnt, - 'opoints' => translateComma($points - $content['curr_points']), + 'opoints' => translateComma($points - $row['curr_points']), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_list_rallye_usr_row', true, $content); + $OUT .= loadTemplate('admin_list_rallye_usr_row', true, $row); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - define('__RALLYE_USER_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_list_rallye_usr'); + loadTemplate('admin_list_rallye_usr', false, $OUT); } else { // No entries found? - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ADMIN_USERS_404')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ADMIN_USERS_404')); } } else { // 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) { // List found rallyes $OUT = ''; $SW = 2; - while ($content = SQL_FETCHARRAY($result)) { + while ($row = SQL_FETCHARRAY($result)) { // Load admin login - $content['alogin'] = getAdminLogin($content['admin_id']); + $row['alogin'] = getAdminLogin($row['admin_id']); // Count joined userids - $joined = GET_TOTAL_DATA($content['id'], "rallye_users", 'id', "rallye_id", true); + $joined = countSumTotalData($row['id'], "rallye_users", 'id', "rallye_id", true); // Did some users joined this rallye? if ($joined > 0) { // List joined users - $joined = "<a href=\"{?URL?}/modules.php?module=admin&what=list_rallyes&sub=users&rallye=".$content['id']."\" title=\"{--RALLYE_LIST_USERS_TITLE--}\">".$joined."</a>"; + $joined = "<a href=\"{?URL?}/modules.php?module=admin&what=list_rallyes&sub=users&rallye=".$row['id']."\" title=\"{--RALLYE_LIST_USERS_TITLE--}\">".$joined."</a>"; } // END - if // Alter some variables - if (empty($content['alogin'])) $content['alogin'] = '???'; - if (empty($content['template'])) $content['template'] = '---'; - if (empty($content['descr'])) $content['descr'] = '---'; + if (empty($row['alogin'])) $row['alogin'] = '???'; + if (empty($row['template'])) $row['template'] = '---'; + if (empty($row['descr'])) $row['descr'] = '---'; // Transfer data into array for the template - // @TODO Rewritings: aid->admin_id in template - $content = array( - 'select' => "<input type=\"checkbox\" name=\"sel[".$content['id']."]\" class=\"admin_normal\" value=\"1\" />", - 'aid' => $content['admin_id'], - 'email_link' => generateEmailLink($content['admin_id']), - 'alogin' => $content['alogin'], - 'id' => $content['id'], + // @TODO Rewritings: admin_id->admin_id in template + $row = array( + 'select' => "<input type=\"checkbox\" name=\"sel[".$row['id']."]\" class=\"admin_normal\" value=\"1\" />", + 'admin_id' => $row['admin_id'], + 'email_link' => generateEmailLink($row['admin_id']), + 'alogin' => $row['alogin'], + 'id' => $row['id'], 'sw' => $SW, - 'title' => $content['title'], - 'template' => $content['template'], + 'title' => $row['title'], + 'template' => $row['template'], 'joined' => $joined, - 'start_date' => generateDateTime($content['start_time'], '2'), - 'end_date' => generateDateTime($content['end_time'] , '2'), - 'active_lnk' => translateYesNo($content['is_active']), - 'notify_lnk' => translateYesNo($content['send_notify']), - 'auto_lnk' => translateYesNo($content['auto_add_new_user']), - 'notified' => translateYesNo($content['notified']), - 'prices_cnt' => translateComma(GET_TOTAL_DATA($content['id'], 'rallye_prices', 'id', 'rallye_id', true)), - 'descr' => COMPILE_CODE($content['descr']), - 'min_users' => $content['min_users'], - 'min_prices' => $content['min_prices'], + 'start_date' => generateDateTime($row['start_time'], '2'), + 'end_date' => generateDateTime($row['end_time'] , '2'), + 'active_lnk' => translateYesNo($row['is_active']), + 'notify_lnk' => translateYesNo($row['send_notify']), + 'auto_lnk' => translateYesNo($row['auto_add_new_user']), + 'notified' => translateYesNo($row['notified']), + 'prices_cnt' => translateComma(countSumTotalData($row['id'], 'rallye_prices', 'id', 'rallye_id', true)), + 'descr' => $row['descr'], + 'min_users' => $row['min_users'], + 'min_prices' => $row['min_prices'], ); // Is the rallye active or not? - switch ($content['is_active']) + switch ($row['is_active']) { case 'Y': // Rallye is active so do not edit it! - $content['select'] = "<div class=\"big\">".$content['id']."</div>"; - $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW'); - $content['active'] = 0; + $row['select'] = "<div class=\"big\">".$row['id']."</div>"; + $row['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW'); + $row['active'] = 0; break; case 'N': - $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW'); - $content['active'] = '1'; + $row['active_title'] = getMessage('RALLYE_ACTIVATE_NOW'); + $row['active'] = '1'; break; } // Notification to members? - switch ($content['send_notify']) + switch ($row['send_notify']) { case 'Y': - $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW'); - $content['notify'] = 0; + $row['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW'); + $row['notify'] = 0; break; case 'N': - $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW'); - $content['notify'] = '1'; + $row['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW'); + $row['notify'] = '1'; break; } // Auto-add of new joined members? - switch ($content['auto_add_new_user']) + switch ($row['auto_add_new_user']) { case 'Y': - $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW'); - $content['auto'] = 0; + $row['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW'); + $row['auto'] = 0; break; case 'N': - $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW'); - $content['auto'] = '1'; + $row['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW'); + $row['auto'] = '1'; break; } // Output row - $OUT .= LOAD_TEMPLATE('admin_list_rallyes_row', true, $content); + $OUT .= loadTemplate('admin_list_rallyes_row', true, $row); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__RALLYE_ROWS', $OUT); + + // Remember rows in array + $content['rows'] = $OUT; // Load template - LOAD_TEMPLATE('admin_list_rallyes'); + loadTemplate('admin_list_rallyes', false, $content); } else { // No rallyes setup so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP')); + loadTemplate('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP')); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 08cc89941d..7a80938a64 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -18,7 +18,7 @@ * Highly modified by Roland Haeder * * * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // Secure userid - $uid = bigintval(REQUEST_GET('uid')); + $userid = bigintval(getRequestElement('userid')); // Check if the user already exists - $result_user = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array($uid), __FILE__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array($userid), __FILE__, __LINE__); // Fix missing variable $result_levels = false; @@ -60,17 +59,17 @@ if (REQUEST_ISSET_GET('uid')) { // User found? if (SQL_NUMROWS($result_user) == 1) { // Get total refs - $menge = GET_TOTAL_DATA($uid, 'user_data', 'userid', 'refid', true); - $menge_lck = GET_TOTAL_DATA($uid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); + $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); + $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); // Output info message - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(REQUEST_GET('uid')), $menge, $menge_lck)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck)); // Load all referal levels $result_levels = SQL_QUERY("SELECT `level`, `percents` FROM - `{!_MYSQL_PREFIX!}_refdepths` + `{?_MYSQL_PREFIX?}_refdepths` WHERE `level` > 0 ORDER BY @@ -85,20 +84,20 @@ ORDER BY $levels['sw'] = $SW; // Is the refback still active? ;-) - if (EXT_IS_ACTIVE('refback')) { + if (isExtensionActive('refback')) { // Load all refs of this user - $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE `userid`=%s AND `level`='%s' ORDER BY refid ASC", - array($uid, $levels['level']), __FILE__, __LINE__); - //* DEBUG: */ OUTPUT_HTML($uid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)."<br />"); + $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' ORDER BY refid ASC", + array($userid, $levels['level']), __FILE__, __LINE__); + //* DEBUG: */ outputHtml($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)."<br />"); // Do we have levels? if (SQL_NUMROWS($result_refs) > 0) { // Count entries - $menge = GET_TOTAL_DATA($uid, 'user_data', 'userid', 'refid', true); - $menge_lck = GET_TOTAL_DATA($uid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); + $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); + $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); // Output info message - $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($uid), $menge, $menge_lck); + $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck); // Init variables $OUT_REFS = ''; $SW = 2; @@ -106,7 +105,7 @@ ORDER BY // Load all refs while ($content = SQL_FETCHARRAY($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($content['refid']), __FILE__, __LINE__); // Is the data there? @@ -115,7 +114,7 @@ ORDER BY $data = SQL_FETCHARRAY($result_user); // Check for referals - $refs_cnt = GET_TOTAL_DATA($data['userid'], 'refsystem', 'counter'); + $refs_cnt = countSumTotalData($data['userid'], 'refsystem', 'counter'); // Prepare data for the template $content = array( @@ -134,10 +133,10 @@ ORDER BY if ($refs_cnt > 0) $content['refs_link'] = generateUserProfileLink($data['userid'], $refs_cnt, "list_refs"); // Load template for level one - $OUT_REFS .= LOAD_TEMPLATE('admin_list_refs_row', true, $content); + $OUT_REFS .= loadTemplate('admin_list_refs_row', true, $content); } else { // No refs found - $OUT_REFS = LOAD_TEMPLATE('admin_list_refs_nodata', true, $content['refid']); + $OUT_REFS = loadTemplate('admin_list_refs_nodata', true, $content['refid']); } // Free result @@ -151,20 +150,20 @@ ORDER BY } // END - while } else { // Output info message - $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($uid), '0', '0'); + $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), '0', '0'); // No refs found - $levels['rows'] = LOAD_TEMPLATE('admin_list_refs_norefs', true, array('uid' => $uid)); + $levels['rows'] = loadTemplate('admin_list_refs_norefs', true, array('userid' => $userid)); } // Free result SQL_FREERESULT($result_refs); // Load level template - $OUT .= LOAD_TEMPLATE('admin_list_refs_level', true, $levels); + $OUT .= loadTemplate('admin_list_refs_level', true, $levels); } else { // Check for referals - $refs_cnt = GET_TOTAL_DATA($levels['userid'], 'user_data', 'userid', 'refid', true); + $refs_cnt = countSumTotalData($levels['userid'], 'user_data', 'userid', 'refid', true); // Prepare data for the template $content = array( @@ -183,7 +182,7 @@ ORDER BY if ($refs_cnt > 0) $content['refs_link'] = generateUserProfileLink($levels['userid'], $refs_cnt, 'list_refs'); // Load template for level one - $OUT .= LOAD_TEMPLATE('admin_list_refs_row', true, $content); + $OUT .= loadTemplate('admin_list_refs_row', true, $content); // Switch colors $SW = 3 - $SW; @@ -193,35 +192,35 @@ ORDER BY // Prepare content $content = array( 'rows' => $OUT, - 'uid' => generateUserProfileLink(REQUEST_GET('uid')) + 'userid' => generateUserProfileLink(getRequestElement('userid')) ); // Load main template - if (EXT_IS_ACTIVE('refback')) { - LOAD_TEMPLATE('admin_list_refs2', false, $content); + if (isExtensionActive('refback')) { + loadTemplate('admin_list_refs2', false, $content); } else { - LOAD_TEMPLATE('admin_list_refs', false, $content); + loadTemplate('admin_list_refs', false, $content); } - } elseif (EXT_IS_ACTIVE('refback')) { + } elseif (isExtensionActive('refback')) { // No levels found, very bad! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_REF_LEVELS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_REF_LEVELS')); } else { // No refs made so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('USER_REF_404')); + loadTemplate('admin_settings_saved', false, getMessage('USER_REF_404')); } // Free result SQL_FREERESULT($result_levels); } else { // User not found - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))); } // Free memory SQL_FREERESULT($result_user); } else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } // [EOF] diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 334dbf8af7..22f892f7c2 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,90 +37,70 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('id')) { +if (isGetRequestElementSet('id')) { // Show detailed informations to a sponsor $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, 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(REQUEST_GET('id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load sponsor details - $DATA = SQL_FETCHARRAY($result); + $content = SQL_FETCHARRAY($result); SQL_FREERESULT($result); // Check if an entry is empty - foreach ($DATA as $k => $v) { - if (empty($v)) $DATA[$k] = '---'; + foreach ($content as $k => $v) { + if (empty($v)) $content[$k] = '---'; } // Check for sponsor's orders (only count) - $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s'", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE sponsorid='%s'", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); list($orders) = SQL_FETCHROW($result_orders); SQL_FREERESULT($result_orders); if (empty($orders)) $orders = 0; // Prepare all data for the template - // @TODO Rewrite this huge amount of constants // Sponsor's ID - define('__SPONSOR_ID' , REQUEST_GET('id')); - // Company's data - define('__SPONSOR_COMPANY' , $DATA['company']); - define('__SPONSOR_POSITION' , $DATA['position']); - define('__SPONSOR_TAX_IDENT' , $DATA['tax_ident']); + $content['id'] = getRequestElement('id'); // Personal data - define('__SPONSOR_GENDER' , translateGender($DATA['gender'])); - define('__SPONSOR_SURNAME' , $DATA['surname']); - define('__SPONSOR_FAMILY' , $DATA['family']); - define('__SPONSOR_STREET1' , $DATA['street_nr1']); - define('__SPONSOR_STREET2' , $DATA['street_nr2']); - define('__SPONSOR_ZIP' , $DATA['zip']); - define('__SPONSOR_CITY' , $DATA['city']); - define('__SPONSOR_COUNTRY' , $DATA['country']); + $content['gender'] = translateGender($content['gender']); // Contact data - define('__SPONSOR_PHONE' , $DATA['phone']); - define('__SPONSOR_FAX' , $DATA['fax']); - define('__SPONSOR_CELL' , $DATA['cell']); - define('__SPONSOR_EMAIL' , generateEmailLink($DATA['email'], 'sponsor_data')); - define('__SPONSOR_EMAIL_VALUE', $DATA['email']); - define('__SPONSOR_URL' , DEREFERER($DATA['url'])); + $content['email_link'] = generateEmailLink($content['email'], 'sponsor_data'); + $content['url'] = generateDerefererUrl($content['url']); // Timestamps - define('__SPONSOR_CREATED' , generateDateTime($DATA['sponsor_created'], '2')); - define('__SPONSOR_LAST_ONLINE', generateDateTime($DATA['last_online'], '2')); - define('__SPONSOR_LAST_CHANGE', generateDateTime($DATA['last_change'], '2')); + $content['created'] = generateDateTime($content['sponsor_created'], '2'); + $content['last_online'] = generateDateTime($content['last_online'], '2'); + $content['last_change'] = generateDateTime($content['last_change'], '2'); // Sponsor points - define('__SPONSOR_AMOUNT' , translateComma($DATA['points_amount'])); - define('__SPONSOR_USED' , translateComma($DATA['points_used'])); + $content['points_amount'] = translateComma($content['points_amount']); + $content['points_used'] = translateComma($content['points_used']); // Warning because low points - define('__SPONSOR_REC_WARNING', translateYesNo($DATA['receive_warnings'])); - define('__SPONSOR_INTERVAL' , createFancyTime($DATA['warning_interval'])); + $content['receive_warnings'] = translateYesNo($content['receive_warnings']); + $content['warning_interval'] = createFancyTime($content['warning_interval']); // Orders total - define('__SPONSOR_ORDERS' , $orders); + $content['orders'] = $orders; // Other data - define('__SPONSOR_STATUS' , sponsorTranslateUserStatus($DATA['status'])); - define('__SPONSOR_REFID' , $DATA['refid']); - define('__SPONSOR_REMOTE_ADR' , $DATA['remote_addr']); - define('__SPONSOR_REFS' , $DATA['ref_count']); + $content['status'] = sponsorTranslateUserStatus($content['status']); // Load template - LOAD_TEMPLATE("admin_list_sponsor_details"); + loadTemplate('admin_list_sponsor_details', false, $content); } else { // Sponsor not found - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), REQUEST_GET('id'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), getRequestElement('id'))); } -} elseif (REQUEST_ISSET_GET('rid')) { +} elseif (isGetRequestElementSet('rid')) { // Search for sponsor - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", + array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Free memory SQL_FREERESULT($result); @@ -131,12 +111,12 @@ WHERE `id`='%s' LIMIT 1", `sponsor_created`, `last_online`, `points_amount`, `points_used`, `remote_addr`, `ref_count` FROM - `{!_MYSQL_PREFIX!}_sponsor_data` + `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `refid`='%s' ORDER BY `id` ASC", - array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List refs now @@ -144,11 +124,11 @@ ORDER BY SQL_FREERESULT($result); } else { // No refs made so far - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_REFS_404'), "<a href=\"{?URL?}/modules.php?module=admin&what=list_sponsor&id=".bigintval(REQUEST_GET('rid'))."\">".bigintval(REQUEST_GET('rid'))."</a>")); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_REFS_404'), "<a href=\"{?URL?}/modules.php?module=admin&what=list_sponsor&id=".bigintval(getRequestElement('rid'))."\">".bigintval(getRequestElement('rid'))."</a>")); } } else { // Sponsor not found - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('rid')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('rid')))); } } else { // List all sponsors @@ -156,7 +136,7 @@ ORDER BY `id`, `gender`, `surname`, `family`, `email`, `status`, `sponsor_created`, `last_online`, `points_amount`, `points_used`, `remote_addr` FROM - `{!_MYSQL_PREFIX!}_sponsor_data` + `{?_MYSQL_PREFIX?}_sponsor_data` ORDER BY `id` ASC", __FILE__, __LINE__); @@ -165,39 +145,36 @@ ORDER BY $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_main)) { // Transfer data to array - // @TODO Rewritings: sname->surname,fname->family,ip->remote_addr in template + // @TODO Rewritings: surname->surname,family->family,ip->remote_addr in template $content = array( 'id' => $content['id'], 'sw' => $SW, 'gender' => translateGender($content['gender']), - 'sname' => $content['surname'], - 'fname' => $content['family'], + 'surname' => $content['surname'], + 'family' => $content['family'], 'email' => generateEmailLink($content['email'], 'sponsor_data'), 'status' => sponsorTranslateUserStatus($content['status']), 'created' => generateDateTime($content['sponsor_created'], '2'), - 'last' => generateDateTime($content['last_online'], '2'), + 'last_online' => generateDateTime($content['last_online'], '2'), 'points' => translateComma($content['points_amount'] - $content['points_used']), 'ip' => $content['remote_addr'], ); // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_sponsor_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result_main); - // @TODO Rewrite this constant - define('__SPONSOR_ROWS', $OUT); - // Load final template - LOAD_TEMPLATE('admin_list_sponsor'); + loadTemplate('admin_list_sponsor', false, $OUT); } else { // No sponsors registered so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_REGISTERED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_REGISTERED')); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 476b21863c..ad8ff06b09 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,43 +37,42 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); $message = ''; -if (REQUEST_ISSET_POST('add')) { +if (isPostRequestElementSet('add')) { // Check input variables - if (!REQUEST_ISSET_POST('pay_name')) REQUEST_UNSET_POST('add'); - if ((round(REQUEST_POST('pay_rate')) == 0) || (!REQUEST_ISSET_POST('pay_rate'))) REQUEST_UNSET_POST('add'); + if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add'); + if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add'); - REQUEST_SET_POST('pay_min_count', bigintval(REQUEST_POST('pay_min_count'))); + setRequestPostElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); - if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST('pay_min_count'))) REQUEST_UNSET_POST('add'); - if (!REQUEST_ISSET_POST('pay_currency')) REQUEST_UNSET_POST('add'); + if ((postRequestElement('pay_min_count') == 0) || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add'); + if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add'); -} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST('change')) || (REQUEST_ISSET_POST('remove'))) { +} elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) { // Check if at least one entry was selected - if (!REQUEST_ISSET_POST('id')) { + if (!isPostRequestElementSet('id')) { // Nothing selected for editing / deleting??? - REQUEST_UNSET_POST('edit'); - REQUEST_UNSET_POST('del'); - REQUEST_UNSET_POST('change'); - REQUEST_UNSET_POST('remove'); - } elseif (REQUEST_ISSET_POST('change')) { + unsetPostRequestElement('edit'); + unsetPostRequestElement('del'); + unsetPostRequestElement('change'); + unsetPostRequestElement('remove'); + } elseif (isPostRequestElementSet('change')) { // Change entries here... - foreach (REQUEST_POST('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Secure ID $id = bigintval($id); // Save entry SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_sponsor_paytypes` + `{?_MYSQL_PREFIX?}_sponsor_paytypes` SET `pay_name`='%s', `pay_rate`='%s', @@ -83,21 +82,21 @@ WHERE `id`='%s' LIMIT 1", array( - REQUEST_POST('name', $id), - REQUEST_POST('rate', $id), - bigintval(REQUEST_POST('min', $id)), - REQUEST_POST('curr', $id), + postRequestElement('name', $id), + postRequestElement('rate', $id), + bigintval(postRequestElement('min', $id)), + postRequestElement('curr', $id), $id ), __FILE__, __LINE__); } // Generate message $message = getMessage('SPONSOR_PAY_ENTRIES_CHANGED'); - } elseif (REQUEST_ISSET_POST('remove')) { + } elseif (isPostRequestElementSet('remove')) { // Remove entries here... - foreach (REQUEST_POST('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Remove entry - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } @@ -107,42 +106,42 @@ LIMIT 1", if (!empty($message)) { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if } -if (REQUEST_ISSET_POST('add')) { +if (isPostRequestElementSet('add')) { // Check if entry with same name does exists - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1", - array(REQUEST_POST('pay_name')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1", + array(postRequestElement('pay_name')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // No entry found so add this line - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')", array( - REQUEST_POST('pay_name'), - convertCommaToDot(REQUEST_POST('pay_rate')), - bigintval(REQUEST_POST('pay_min_count')), - REQUEST_POST('pay_currency') + postRequestElement('pay_name'), + convertCommaToDot(postRequestElement('pay_rate')), + bigintval(postRequestElement('pay_min_count')), + postRequestElement('pay_currency') ), __FILE__, __LINE__); // Payment type added! - $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), REQUEST_POST('pay_name')); + $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), postRequestElement('pay_name')); } else { // Free memory SQL_FREERESULT($result); // Entry does already exists - $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY'), REQUEST_POST('pay_name')); + $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY'), postRequestElement('pay_name')); } // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); -} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del'))) { + loadTemplate('admin_settings_saved', false, $message); +} elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del'))) { // Load all data $OUT = ''; $SW = 2; - foreach (REQUEST_POST('id') as $id => $sel) { + foreach (postRequestElement('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 @@ -159,36 +158,33 @@ if (REQUEST_ISSET_POST('add')) { 'curr' => htmlspecialchars($curr) ); - if (REQUEST_ISSET_POST('edit')) { + if (isPostRequestElementSet('edit')) { // Edit entry - $OUT .= LOAD_TEMPLATE('admin_list_sponsor_pay_edit_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', true, $content); } else { // Delete entry - $OUT .= LOAD_TEMPLATE('admin_list_sponsor_pay_del_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_del_row', true, $content); } } else { // Entry invalid - $OUT .= LOAD_TEMPLATE('admin_list_sponsor_pay_404', true, $id); + $OUT .= loadTemplate('admin_list_sponsor_pay_404', true, $id); } // Switch colors $SW = 3 - $SW; } // END - foreach - // Remember content in constant - define('__SPONSOR_ROWS', $OUT); - // Load main template depending on mode (edit/delete) - if (REQUEST_ISSET_POST('edit')) { + if (isPostRequestElementSet('edit')) { // Load main edit template - LOAD_TEMPLATE('admin_list_sponsor_pay_edit'); + loadTemplate('admin_list_sponsor_pay_edit', false, $OUT); } else { // Load main delete template - LOAD_TEMPLATE('admin_list_sponsor_pay_del'); + loadTemplate('admin_list_sponsor_pay_del', false, $OUT); } } 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` ASC", + $result = SQL_QUERY("SELECT `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC", __FILE__, __LINE__); // Do we have some paytypes setup? @@ -209,7 +205,7 @@ if (REQUEST_ISSET_POST('add')) { ); // Add row - $OUT .= LOAD_TEMPLATE('admin_list_sponsor_pay_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_row', true, $content); // Switch colors $SW = 3 - $SW; @@ -218,22 +214,19 @@ if (REQUEST_ISSET_POST('add')) { // Free memory SQL_FREERESULT($result); - // Remember rows in constant for the template - define('__LIST_ROWS', $OUT); - // Load list template - define('__LIST_CONTENT', LOAD_TEMPLATE('admin_list_sponsor_pay', true)); + $content['list_out'] = loadTemplate('admin_list_sponsor_pay', true, $OUT); } else { // Noting setup so far! - define('__LIST_CONTENT', LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_SPONSOR_NO_PAYTYPES'))); + $content['list_out'] = loadTemplate('admin_settings_saved', true, getMessage('ADMIN_SPONSOR_NO_PAYTYPES')); } // Add new payment types here - define('__ADD_CONTENT', LOAD_TEMPLATE('admin_add_sponsor_paytype', true)); + $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', true); // Load final template - LOAD_TEMPLATE('admin_sponsor_paytypes'); + loadTemplate('admin_sponsor_paytypes', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index b6bdbe3dea..eef988c563 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,29 +37,28 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ... // Free memory SQL_FREERESULT($result); } else { // Sponsor not found! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id')))); } } else { // Not called by what-list_sponsor.php - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); } // diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index 6ef9aef155..a715f5548f 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,16 +38,15 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!is_admin())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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? @@ -72,17 +71,17 @@ if (SQL_NUMROWS($result) > 0) { $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_surfbar_actions_row", true, $content); + $OUT .= loadTemplate('admin_list_surfbar_actions_row', true, $content); // Switch color $SW = 3 - $SW; } // END - while // Load main template - LOAD_TEMPLATE("admin_list_surfbar_actions", false, $OUT); + loadTemplate('admin_list_surfbar_actions', false, $OUT); } else { // No entries found, very bad! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_ACTIONS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_ACTIONS')); } // Free result diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 3f18edd999..3f739df789 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,74 +37,73 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // By default show the list... $show = true; // Check for 'id' element -if ((REQUEST_POST_COUNT() > 0) && ((!REQUEST_ISSET_POST('id')) || (!is_array(REQUEST_POST('id'))) || (count(REQUEST_POST('id')) == 0))) { +if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == 0))) { // Not found so output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS')); // Abort here return; } // END - if // Edit or delete button hit? -if (REQUEST_ISSET_POST('edit')) { +if (isPostRequestElementSet('edit')) { // Show entries for editing - ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminEditEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array('id', 'userid', 'url'), - array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''), + array('bigintval', 'addMemberSelectionBox', ''), array('', array(false, true, true), '') ); $show = false; -} elseif (REQUEST_ISSET_POST('do_edit')) { +} elseif (isPostRequestElementSet('do_edit')) { // Change data of entries - ADMIN_EDIT_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminEditEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array(), array(), array(), true ); -} elseif (REQUEST_ISSET_POST('delete')) { +} elseif (isPostRequestElementSet('delete')) { // Show entries for deletion - ADMIN_DELETE_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminDeleteEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered'), array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''), array('', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST('do_delete')) { +} elseif (isPostRequestElementSet('do_delete')) { // Remove entries from database - ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), 'surfbar_urls', array(), array(), array(), true); -} elseif (REQUEST_ISSET_POST('lock')) { + adminDeleteEntriesConfirm(postRequestElement('id'), 'surfbar_urls', array(), array(), array(), true); +} elseif (isPostRequestElementSet('lock')) { // Un-/lock selected URLs. This does not work for pending URLs - ADMIN_LOCK_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminLockEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered', 'status'), - array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), + array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'translateSurfbarUrlStatus'), array('', '', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST('do_lock')) { +} elseif (isPostRequestElementSet('do_lock')) { // Un-/lock selected URLs. This does not work for pending URLs - ADMIN_LOCK_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminLockEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array(), array(), @@ -112,20 +111,20 @@ if (REQUEST_ISSET_POST('edit')) { array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), true ); -} elseif (REQUEST_ISSET_POST('undelete')) { +} elseif (isPostRequestElementSet('undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) - ADMIN_UNDELETE_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminUndeleteEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered', 'status'), - array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'), + array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'translateSurfbarUrlStatus'), array('', '', '', '', '') ); $show = false; -} elseif (REQUEST_ISSET_POST('do_undelete')) { +} elseif (isPostRequestElementSet('do_undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) - ADMIN_UNDELETE_ENTRIES_CONFIRM( - REQUEST_POST('id'), + adminUndeleteEntriesConfirm( + postRequestElement('id'), 'surfbar_urls', array(), array(), @@ -139,9 +138,15 @@ if (REQUEST_ISSET_POST('edit')) { if ($show === false) 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` -ORDER BY `id` ASC", __FILE__, __LINE__); +$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` +ORDER BY + `id` ASC", __FILE__, __LINE__); // Do we have some URLs left? if (SQL_NUMROWS($result) > 0) { @@ -151,29 +156,29 @@ if (SQL_NUMROWS($result) > 0) { // "Translate"/add content $content['sw'] = $SW; $content['userid'] = generateUserProfileLink($content['userid']); - $content['url'] = FRAMETESTER($content['url']); + $content['url'] = generateFrametesterUrl($content['url']); $content['views_total'] = translateComma($content['views_total']); - $content['status'] = surfbarTranslateUserStatus($content['status']); + $content['status'] = translateSurfbarUrlStatus($content['status']); $content['registered'] = generateDateTime($content['registered'], 2); $content['last_locked'] = generateDateTime($content['last_locked'], 2); if (empty($content['lock_reason'])) $content['lock_reason'] = '---'; // Load row template - $OUT .= LOAD_TEMPLATE('admin_list_surfbar_urls_row', true, $content); + $OUT .= loadTemplate('admin_list_surfbar_urls_row', true, $content); // Switch color $SW = 3 - $SW; } // END - while // Load main template - LOAD_TEMPLATE('admin_list_surfbar_urls', false, $OUT); + loadTemplate('admin_list_surfbar_urls', false, $OUT); } else { // No URLs in surfbar - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND')); } // Free result SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index d56d74d9b1..6f9674c308 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,99 +37,118 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('task')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('task')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('task')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task')); + return; +} // END - if $whereStatement = ''; -if (!REQUEST_ISSET_GET(('type'))) REQUEST_SET_GET('type', "your"); +if (!isGetRequestElementSet(('type'))) setRequestGetElement('type', 'your'); -switch (REQUEST_GET('type')) -{ - case "your": // List only your own open (new) tasks - $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'"; +switch (getRequestElement('type')) { + case 'your': // List only your own open (new) tasks + $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'"; break; - case "updates": // List only updates assigned to you - $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND task_type = 'EXTENSION_UPDATE'"; + case 'updates': // List only updates assigned to you + $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'"; break; - case "solved": // List only solved tasks assigned to you + case 'solved': // List only solved tasks assigned to you $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='SOLVED'"; break; - case "unassigned": // List unassigned (but not deleted) tasks + case 'unassigned': // List unassigned (but not deleted) tasks $whereStatement = "`assigned_admin`=0 AND `status` != 'DELETED'"; break; - case "deleted": // List all deleted + case 'deleted': // List all deleted $whereStatement = "`status`='DELETED'"; break; - case "closed": // List all closed + case 'closed': // List all closed $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='CLOSED'"; break; default: // Unknown type - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", REQUEST_GET('type'))); - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), getRequestElement('type'))); break; } if (!empty($whereStatement)) { $SEL = 0; - if (REQUEST_ISSET_POST(('task'))) $SEL = countSelection(REQUEST_POST('task')); + if (isPostRequestElementSet(('task'))) $SEL = countSelection(postRequestElement('task')); - if ((REQUEST_ISSET_POST(('assign'))) && ($SEL > 0)) { + if ((isPostRequestElementSet(('assign'))) && ($SEL > 0)) { // Assign / do tasks loadIncludeOnce("inc/modules/admin/overview-inc.php"); if (empty($dmy)) $dmy = ''; - OUTPUT_SELECTED_TASKS(REQUEST_POST_ARRAY(), $dmy); + outputSeletectedTasks(postRequestArray(), $dmy); } 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` -WHERE ".$whereStatement." -ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __LINE__); - if (($SEL > 0) && (!IS_DEMO())) { + $result_tasks = SQL_QUERY('SELECT + `id`, `assigned_admin`, `userid`, `task_type`, `subject`, `text`, `task_created` +FROM + `{?_MYSQL_PREFIX?}_task_system` +WHERE + '.$whereStatement.' +ORDER BY + `userid` DESC, + `task_type` DESC, + `subject` ASC, + `task_created` DESC', + __FILE__, __LINE__); + if (($SEL > 0) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (REQUEST_ISSET_POST(('unassign'))) { + if (isPostRequestElementSet('unassign')) { // Unassign from tasks - foreach (REQUEST_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", - array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); + foreach (postRequestElement('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", + array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } - } elseif (REQUEST_ISSET_POST('del')) { + } elseif (isPostRequestElementSet('del')) { // Delete tasks - foreach (REQUEST_POST('task') as $id => $sel) { - if (REQUEST_GET('type') == "deleted") { + foreach (postRequestElement('task') as $id => $sel) { + if (getRequestElement('type') == 'deleted') { // Delete task immediately - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1", - array(bigintval($id)),__FILE__, __LINE__); + 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) - ADMIN_DELETE_TASK($id); + // Mark task as to be deleted (purged by autopurge extension) + adminDeleteTask($id); } } + } else { + // Unknown action performed + debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), true))); } // 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` ASC, + `task_created` DESC', __FILE__, __LINE__); } // There are uncompleted jobs! - $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(REQUEST_GET('type')).'_TYPE'); + $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(getRequestElement('type')).'_TYPE'); // @TODO Rewrite these templates to one and add $OUT - LOAD_TEMPLATE("admin_overview_header_task", false, array( + loadTemplate('admin_overview_header_task', false, array( 'message' => $type, - 'type' => REQUEST_GET('type') + 'type' => getRequestElement('type') )); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_tasks)) { @@ -143,13 +162,12 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L $content['task_type_msg'] = getMessage('ADMIN_TASK_IS_'.strtoupper($content['task_type']).''); // Generate infos - switch ($content['task_type']) - { + switch ($content['task_type']) { case 'EXTENSION': case 'EXTENSION_UPDATE': $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1); break; - } + } // END - switch // Member assigned with task? if ($content['userid'] > 0) { @@ -157,28 +175,28 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L $content['userid'] = generateUserProfileLink($content['userid']); } else { // Is a system task! - $content['userid'] = "<em>{--ADMIN_IS_SYSTEM_TASK--}</em>"; + $content['userid'] = '<em>{--ADMIN_IS_SYSTEM_TASK--}</em>'; } // Prepare content - // @TODO Rewritings: admin->assigned_admin,uid->userid,type->task_type_msg in template + // @TODO Rewritings: admin->assigned_admin,userid->userid,type->task_type_msg in template $content = merge_array($content, array( 'sw' => $SW, 'admin' => $content['assigned_admin'], - 'uid' => $content['userid'], + 'userid' => $content['userid'], 'type' => $content['task_type_msg'], 'created' => generateDateTime($content['task_created'], '2') )); // Do we have an extension task? - if (($content['task_type'] == 'EXTENSION') && (GET_EXT_VERSION($content['infos']) == '')) { + if (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos']))) { // Load extension row template // @TODO Rewrite this to $OUT .= ..., true, ... - LOAD_TEMPLATE("admin_list_task_ext_rows", false, $content); + loadTemplate('admin_list_task_ext_rows', false, $content); } else { // Load default row template // @TODO Rewrite this to $OUT .= ..., true, ... - LOAD_TEMPLATE("admin_list_task_rows", false, $content); + loadTemplate('admin_list_task_rows', false, $content); } // Switch colors @@ -189,14 +207,15 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L SQL_FREERESULT($result_tasks); // Load footer template - if (REQUEST_GET('type') == "deleted") { + if (getRequestElement('type') == 'deleted') { // Delete now button - LOAD_TEMPLATE("admin_overview_footer_task"); + loadTemplate('admin_overview_footer_task'); } else { // Normal footer - LOAD_TEMPLATE("admin_overview_footer"); + loadTemplate('admin_overview_footer'); } } } -// + +// [EOF] ?> diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 16720437e9..a845887000 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,16 +37,15 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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_userid, 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) { // Output rows @@ -55,16 +54,16 @@ if (SQL_NUMROWS($result) > 0) { // Prepare data for the row template $content = array( 'sw' => $SW, - 'idx' => $content['trans_id'], + 'trans_id' => $content['trans_id'], 'stamp' => generateDateTime($content['time_trans'], '3'), 'from_link' => generateUserProfileLink($content['userid']), - 'to_link' => generateUserProfileLink($content['to_uid']), + 'to_link' => generateUserProfileLink($content['to_userid']), 'reason' => wordwrap($content['reason'], 15), 'points' => translateComma($content['points']), ); // Load row template add points and switch color - $OUT .= LOAD_TEMPLATE('admin_list_transfer_row', true, $content); + $OUT .= loadTemplate('admin_list_transfer_row', true, $content); $total += $content['points']; $SW = 3 - $SW; } @@ -74,29 +73,28 @@ if (SQL_NUMROWS($result) > 0) { // Nothing for in and out $OUT = "<tr> <td colspan=\"6\" align=\"center\" class=\"bottom2\" height=\"70\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." </td> </tr>"; } // ... and add them to a constant for the template -// @TODO Rewrite these constants -define('__TRANSFER_ROWS', $OUT); +$content['rows'] = $OUT; // Remeber total amount -define('__TRANSFER_TOTAL_VALUE', translateComma($total)); +$content['total'] = translateComma($total); // Set title -define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL')); +$content['title'] = getMessage('TRANSFER_LIST_ALL'); // Set "balance" word -define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE')); +$content['balance'] = getMessage('TRANSFER_TOTAL_BALANCE'); // Don't show a delete button -define('__TRANSFER_DELETE', ' '); +$content['delete'] = ' '; // Load final template -LOAD_TEMPLATE('admin_list_transfer'); +loadTemplate('admin_list_transfer', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 083b193efc..7c4e3c6ca7 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,66 +37,67 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('mailid')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('mailid')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('mailid')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mailid')); + return; +} // END - if // Don't load the admin_list_unconfirmed template by default $listed = false; // List confirmation links from normal or bonus mails -if (REQUEST_ISSET_GET('mid')) { +if (isGetRequestElementSet('mid')) { // SQL query for mail data $sql = "SELECT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec FROM - `{!_MYSQL_PREFIX!}_pool` AS p + `{?_MYSQL_PREFIX?}_pool` AS p LEFT JOIN - `{!_MYSQL_PREFIX!}_user_stats` AS s + `{?_MYSQL_PREFIX?}_user_stats` AS s ON p.id=s.pool_id WHERE - p.id='".REQUEST_GET('mid')."' + p.id='".getRequestElement('mid')."' LIMIT 1"; // Column, type and ID for member's mail $col = 'stats_id'; $type = 'NORMAL'; $ID = '-1'; // Load admin_list_unconfirmed template - $listed = true; $DATA = REQUEST_GET('mid'); $LINK = 'mailid'; -} elseif ((REQUEST_ISSET_GET('bid')) && (EXT_IS_ACTIVE('bonus'))) { - // @TODO This constant might be unused? - define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS')); + $listed = true; $DATA = getRequestElement('mid'); $LINK = 'mailid'; +} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { + // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', getMessage('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`='".REQUEST_GET('bid')."' LIMIT 1"; + $sql = "SELECT `id`, `id`, `subject`, `text`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`='".getRequestElement('bid')."' LIMIT 1"; // Column, type and ID for member's mail - $col = 'bonus_id'; $type = 'BONUS'; $ID = REQUEST_GET('bid'); + $col = 'bonus_id'; $type = 'BONUS'; $ID = getRequestElement('bid'); // Load admin_list_unconfirmed template $listed = true; $DATA = $ID; $LINK = 'bonusid'; } else { // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY')); } // Shall I display links or not? if ($listed === true) { // Load mail data - $result = SQL_QUERY($sql, __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { + $result_master = SQL_QUERY($sql, __FILE__, __LINE__); + + // Do we have an entry? + if (SQL_NUMROWS($result_master) == 1) { // Mail order / bonus mail found! // @TODO Rewrite this to $content = SQL_FETCHARRAY(), look some lines above for two differrent queries - list($stats_id, $sender, $subj, $text, $url, $stamp, $max) = SQL_FETCHROW($result); - SQL_FREERESULT($result); + list($stats_id, $sender, $subj, $text, $url, $stamp, $max) = SQL_FETCHROW($result_master); // Transfer data to constants for the template if (($stats_id > 0) && ($ID == '-1')) $ID = $stats_id; @@ -108,9 +109,9 @@ if ($listed === true) { $result = SQL_QUERY_ESC("SELECT l.userid, u.status, u.surname, u.family, u.gender, u.email FROM - `{!_MYSQL_PREFIX!}_user_links` AS l + `{?_MYSQL_PREFIX?}_user_links` AS l LEFT JOIN - `{!_MYSQL_PREFIX!}_user_data` AS u + `{?_MYSQL_PREFIX?}_user_data` AS u ON l.userid=u.userid WHERE @@ -125,11 +126,11 @@ WHERE $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - // @TODO Rewritings: uid->userid + // @TODO Rewritings: userid->userid $content = array( 'sw' => $SW, 'u_link' => generateUserProfileLink($content['userid']), - 'uid' => $content['userid'], + 'userid' => $content['userid'], 'link' => $LINK, 'id' => $ID, 'email' => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender'])." ".$content['surname']." ".$content['family']."</a>", @@ -137,59 +138,62 @@ WHERE ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_list_unconfirmed_row', true, $content); + $OUT .= loadTemplate('admin_list_unconfirmed_row', true, $content); $SW = 3 - $SW; } // Render it in our new listing - $OUT = LOAD_TEMPLATE('admin_list_unconfirmed_list', true, $OUT); + $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT); // Free memory SQL_FREERESULT($result); } else { // All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm. - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_UNCONFIRMED_NO_LINK_LEFT')); + $OUT = loadTemplate('admin_settings_saved', true, getMessage('ADMIN_UNCONFIRMED_NO_LINK_LEFT')); } // Prepare content $content = array( - 'sender_link' => ADMIN_CREATE_USERID_LINK($sender), + 'sender_link' => adminCreateUserLink($sender), 'sender_userid' => $sender, - 'subject' => COMPILE_CODE($subj), - 'text' => COMPILE_CODE($text), - 'url' => FRAMETESTER($url), + 'subject' => $subj, + 'text' => $text, + 'url' => generateFrametesterUrl($url), 'unconfirmed' => $unconfirmed, 'stamp' => generateDateTime($stamp, '2'), 'rows' => $OUT ); // Load final template - LOAD_TEMPLATE('admin_list_unconfirmed', false, $content); - } elseif (REQUEST_GET('mid') > 0) { + loadTemplate('admin_list_unconfirmed', false, $content); + } elseif (getRequestElement('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) { // pool table - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID)); } elseif (SQL_NUMROWS($result2) == 1) { // user_stats table - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_STATS_MISSING'), $ID)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_STATS_MISSING'), $ID)); } else { // both or link is invalid - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK')); } // Free memory SQL_FREERESULT($result1); SQL_FREERESULT($result2); - } elseif (REQUEST_ISSET_GET('bid')) { + } elseif (isGetRequestElementSet('bid')) { // Data in bonus table not found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK')); } + + // Free result + SQL_FREERESULT($result_master); } // diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 86d2c0a55e..480eea6662 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,191 +37,192 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('user')) || (GET_EXT_VERSION('user') == '')) { - // Missing extension! - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('user')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); - -// Init title with "all accounts" -$listHeader = getMessage('ADMIN_ALL_ACCOUNTS'); -if (REQUEST_ISSET_GET(('status'))) { - // Set title according to the 'status' - $listHeader = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(REQUEST_GET(('status'))))); -} elseif (REQUEST_ISSET_GET('mode')) { - // Set title according to the "mode" - $listHeader = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(REQUEST_GET('mode')))); -} +addMenuDescription('admin', __FILE__); -// Remember it -define('__TITLE', $listHeader); +if ((!isExtensionInstalled('user')) || (!isExtensionActive('user'))) { + // Missing extension! + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + return; +} // END - if // Init variables -$MORE = ", userid"; $colspan = "4"; +$MORE = ''; +$colspan = '4'; // Add nickname if extension is found&active -if (EXT_IS_ACTIVE('nickname')) { $MORE = ", nickname"; } +// @TODO Rewrite these if-blocks in a filter +if (isExtensionActive('nickname')) { + // Add nickname + $MORE .= ", `nickname`"; +} else { + $MORE .= ", `userid`"; +} // Add random confirmed if extension version matches -if (GET_EXT_VERSION('user') >= '0.3.4') { +if (getExtensionVersion('user') >= '0.3.4') { // Add it... - $MORE .= ", rand_confirmed"; + $MORE .= ", `rand_confirmed`"; // Add lock reason? - if (GET_EXT_VERSION('user') >= '0.3.5') { + if (getExtensionVersion('user') >= '0.3.5') { // Add them... - $MORE .= ", lock_reason, UNIX_TIMESTAMP(`lock_timestamp`) AS lock_timestamp"; + $MORE .= ", `lock_reason`, UNIX_TIMESTAMP(`lock_timestamp`) AS lock_timestamp"; } // END - if } // END - if // Is the extension 'country' installed? -if (EXT_IS_ACTIVE('country')) { +if (isExtensionActive('country')) { // Add country code - $MORE .= ", country_code"; + $MORE .= ", `country_code`"; } else { // Add direct value - $MORE .= ", country"; + $MORE .= ", `country`"; } // Init unset data -if (!REQUEST_ISSET_GET('letter')) { REQUEST_SET_GET('letter', getMessage('_ALL2')); } -if (!REQUEST_ISSET_GET('sortby')) { REQUEST_SET_GET('sortby', 'userid'); } -if (!REQUEST_ISSET_GET('page')) { REQUEST_SET_GET('page' , '1'); } +if (!isGetRequestElementSet('letter')) { setRequestGetElement('letter', getMessage('_ALL2')); } +if (!isGetRequestElementSet('sortby')) { setRequestGetElement('sortby', 'userid'); } +if (!isGetRequestElementSet('page')) { setRequestGetElement('page' , '1'); } // Set base URL -$base = "[<a href=\"{?URL?}/modules.php?module=admin"; +$base = '[<a href="{?URL?}/modules.php?module=admin'; -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // Secure the user ID - $uid = bigintval(REQUEST_GET('uid')); + $userid = bigintval(getRequestElement('userid')); // 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` -WHERE userid=%s + $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` +WHERE + `userid`=%s LIMIT 1", - array($uid), __FILE__, __LINE__); + array($userid), __FILE__, __LINE__); + + // User found? if (SQL_NUMROWS($result_user) == 1) { // Account found! - $DATA = SQL_FETCHARRAY($result_user); + $content = SQL_FETCHARRAY($result_user); // Get count/sum of refs, selected categories, unconfirmed mails - $REFS = GET_TOTAL_DATA($uid, 'refsystem', 'counter'); - $CATS = GET_TOTAL_DATA($uid, 'user_cats', 'id', 'userid', true); - $LINKS = GET_TOTAL_DATA($uid, 'user_links', 'id', 'userid', true); + $content['refs'] = countSumTotalData($userid, 'refsystem' , 'counter'); + $content['cats'] = countSumTotalData($userid, 'user_cats' , 'id', 'userid', true); + $content['links'] = countSumTotalData($userid, 'user_links', 'id', 'userid', true); // Add links to the numbers - if ($LINKS > 0) $LINKS = $base."&what=list_links&uid=".$uid."\">".$LINKS."</a>]"; - if ($DATA['refid'] > 0) $DATA['refid'] = $base."&what=list_user&uid=".$DATA['refid']."\">".$DATA['refid']."</a>]"; - if (empty($DATA['last_module'])) $DATA['last_module'] = '---'; - if ($REFS > 0) $REFS = $base."&what=list_refs&uid=".$uid."\">".$REFS."</a>]"; - if ($CATS > 0) $CATS = $base."&what=list_cats&uid=".$uid."\">".$CATS."</a>]"; + if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '">' . $content['links'] . '</a>]'; + if ($content['refid'] > 0) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '">'.$content['refid'] . '</a>]'; + if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '">' . $content['refs'] . '</a>]'; + if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '">' . $content['cats'] . '</a>]'; + + // Fix empty module + if (empty($content['last_module'])) $content['last_module'] = '---'; // Calculate timestamp for birthday - $stamp = mktime(0, 0, 0, $DATA['birth_month'], $DATA['birth_day'], $DATA['birth_year']); + $stamp = mktime(0, 0, 0, $content['birth_month'], $content['birth_day'], $content['birth_year']); // Is this above zero? if ($stamp > 0) { // Then use it - define('_BIRTHDAY', generateDateTime($stamp, '3')); + $content['birthday'] = generateDateTime($stamp, '3'); } else { // Zero or below so set zero! - define('_BIRTHDAY', generateDateTime(0, '3')); + $content['birthday'] = generateDateTime(0, '3'); } // Prepare data for template - define('_REFS' , $REFS); - define('_CATS' , $CATS); - define('_LINKS', $LINKS); - define('_ADMIN_LINKS', generateMemberAdminActionLinks($uid, $DATA['status'])); - $DATA['gender'] = translateGender($DATA['gender']); - $DATA['email_link'] = generateEmailLink($DATA['email'], 'user_data'); - $DATA['status'] = translateUserStatus($DATA['status']); - $DATA['last_online'] = generateDateTime($DATA['last_online'], '0'); - $DATA['used_points'] = translateComma($DATA['used_points']); - if ($DATA['emails_sent'] > 0) $DATA['emails_sent'] = $base."&what=email_details&uid=".$uid."\">".translateComma($DATA['emails_sent'])."</a>]"; - $DATA['joined'] = generateDateTime($DATA['joined'], '0'); - $DATA['last_update'] = generateDateTime($DATA['last_update'], '0'); - $DATA['last_profile_sent'] = generateDateTime($DATA['last_profile_sent'], '0'); - $DATA['total'] = translateComma(GET_TOTAL_DATA($uid, 'user_points', 'points')); - $DATA['locked'] = translateComma(GET_TOTAL_DATA($uid, 'user_points', 'locked_points')); - $DATA['lock_timestamp'] = generateDateTime($DATA['lock_timestamp'], '2'); + $content['admin_links'] = generateMemberAdminActionLinks($userid, $content['status']); + $content['gender'] = translateGender($content['gender']); + $content['email_link'] = generateEmailLink($content['email'], 'user_data'); + $content['status'] = translateUserStatus($content['status']); + $content['last_online'] = generateDateTime($content['last_online'], '0'); + $content['used_points'] = translateComma($content['used_points']); + if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $userid . '">' . translateComma($content['emails_sent']) . '</a>]'; + $content['joined'] = generateDateTime($content['joined'], '0'); + $content['last_update'] = generateDateTime($content['last_update'], '0'); + $content['last_profile_sent'] = generateDateTime($content['last_profile_sent'], '0'); + $content['total'] = translateComma(countSumTotalData($userid, 'user_points', 'points')); + $content['locked'] = translateComma(countSumTotalData($userid, 'user_points', 'locked_points')); + $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2'); // Is the lock reason not set? - if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = '---'; + if (!isset($content['lock_reason'])) $content['lock_reason'] = '---'; // Nickname inclusion? // @TODO Rewrite these to filters - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('nickname')) { // Nickname not set or invalid? Then - if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = '---'; + if ((empty($content['nickname'])) || ($content['nickname'] == $userid)) $content['nickname'] = '---'; } else { // Extension not found - $DATA['nickname'] = getMessage('EXT_NICKNAME_404'); + $content['nickname'] = getMessage('EXT_NICKNAME_404'); } // Is the user extension newer? - if (GET_EXT_VERSION('user') >= '0.3.4') { + if (getExtensionVersion('user') >= '0.3.4') { // Then "translate" the number - $DATA['rand_confirmed'] = translateComma($DATA['rand_confirmed']); + $content['rand_confirmed'] = translateComma($content['rand_confirmed']); } // END - if // Clickrate - $DATA['click_rate'] = 0; - if ($DATA['emails_received'] > 0) { - $DATA['click_rate'] = translateComma($DATA['mails_confirmed'] / $DATA['emails_received'] * 100); + $content['click_rate'] = 0; + if ($content['emails_received'] > 0) { + $content['click_rate'] = translateComma($content['mails_confirmed'] / $content['emails_received'] * 100); } // END - if // "Translate" more data - $DATA['mails_confirmed'] = translateComma($DATA['mails_confirmed']); - $DATA['emails_received'] = translateComma($DATA['emails_received']); + $content['mails_confirmed'] = translateComma($content['mails_confirmed']); + $content['emails_received'] = translateComma($content['emails_received']); // Is the extension 'country' installed? - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Then overwrite country information - $DATA['country'] = COUNTRY_GENERATE_INFO($DATA['country_code']); - } elseif ($DATA['country'] == 0) { + $content['country'] = generateCountryInfo($content['country_code']); + } elseif ($content['country'] == 0) { // Zero ID??? - $DATA['country'] = '???'; + $content['country'] = '???'; } + // Add userid + $content['userid'] = $userid; + // Load user-details template - LOAD_TEMPLATE('admin_user_details', false, $uid); + loadTemplate('admin_user_details', false, $content); } else { // Account does not exist! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $uid)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $userid)); } // Free the result SQL_FREERESULT($result_user); } else { $whereStatement = ''; - if ((REQUEST_GET('letter') != getMessage('_ALL2')) && (REQUEST_GET('letter') != getMessage('_OTHERS')) && (REQUEST_ISSET_GET('letter'))) { + if ((getRequestElement('letter') != getMessage('_ALL2')) && (getRequestElement('letter') != getMessage('_OTHERS')) && (isGetRequestElementSet('letter'))) { // List only persons w - $whereStatement = " WHERE family LIKE '".REQUEST_GET('letter') . "%'"; + $whereStatement = " WHERE `family` LIKE '".getRequestElement('letter') . "%'"; } // END - if - if (REQUEST_GET('sortby') == 'family_name') REQUEST_SET_GET('sortby', 'family'); // Parse the status or mode parameter - if (REQUEST_ISSET_GET(('status'))) { + if (isGetRequestElementSet(('status'))) { // Is a WHERE statement already there? if (!empty($whereStatement)) { // Then append the status column - $whereStatement .= sprintf(" AND `status`='%s'", SQL_ESCAPE(strip_tags(strtoupper(REQUEST_GET('status'))))); + $whereStatement .= sprintf(" AND `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestElement('status'))))); } else { // Start a new one - $whereStatement = sprintf(" WHERE `status`='%s'", SQL_ESCAPE(strip_tags(strtoupper(REQUEST_GET('status'))))); + $whereStatement = sprintf(" WHERE `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestElement('status'))))); } - } elseif (REQUEST_ISSET_GET('mode')) { + } elseif (isGetRequestElementSet('mode')) { // Choose what we need to list - switch (REQUEST_GET('mode')) { - case "norefs": // Users w/o refs + switch (getRequestElement('mode')) { + case 'norefs': // Users w/o refs if (!empty($whereStatement)) { // Add AND statement $whereStatement .= " AND `refid`=0"; @@ -232,14 +233,14 @@ LIMIT 1", break; default: // Invalid list mode - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", REQUEST_GET('mode'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", getRequestElement('mode'))); break; - } - } // END = if + } // END - switch + } // END - if // Generate master query string - $sql = sprintf("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 `%s` ASC", - REQUEST_GET('sortby') + $sql = sprintf("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 `%s` ASC", + getRequestElement('sortby') ); // Prepare SQL and run it @@ -248,38 +249,34 @@ LIMIT 1", // Calculate page count (0.5 fixes a bug with page count) if (getConfig('user_limit') == 0) { setConfigEntry('user_limit', 100); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('EXTENSION_WARNING_USER_LIMIT')); + loadTemplate('admin_settings_saved', false, getMessage('EXTENSION_WARNING_USER_LIMIT')); } // END - if // Activate the extension please! $PAGES = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5); - if (!REQUEST_ISSET_GET('page')) REQUEST_SET_GET('page' , '1'); - if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', getConfig('user_limit')); + if (!isGetRequestElementSet('page')) setRequestGetElement('page' , '1'); + if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('user_limit')); // Add limitation to SQL string and run him again - $sql .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset'); + $sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')).", ".getRequestElement('offset'); $result = SQL_QUERY($sql, __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); + // Count all confirmed users + $user_count = countSumTotalData('CONFIRMED','user_data','userid','status',true); + // Are there some entries? if (SQL_NUMROWS($result_master) > 0) { - // Free memory - SQL_FREERESULT($result_master); - // We have some (new?) registrations! - define('__COLSPAN1' , $colspan); define('__COLSPAN2' , ($colspan + 2)); define('__USER_CNT' , $user_count); // Sorting links - define('__ALPHA_SORT', alpha(REQUEST_GET('sortby'), $colspan, true)); - define('__SORT_LINKS', SortLinks(REQUEST_GET('letter'), REQUEST_GET('sortby'), $colspan, true)); + define('__ALPHA_SORT', alpha(getRequestElement('sortby'), $colspan, true)); + define('__SORT_LINKS', addSortLinks(getRequestElement('letter'), getRequestElement('sortby'), $colspan, true)); if ($PAGES > 1) { - define('__PAGE_NAV', ADD_PAGENAV($PAGES, getConfig('user_limit'), true, $colspan, true)); + define('__PAGE_NAV', addPageNavigation($PAGES, getConfig('user_limit'), true, $colspan, true)); } else { // No page navigation is required define('__PAGE_NAV', ''); @@ -287,7 +284,7 @@ LIMIT 1", // Column with nickname when nickname extension is present // @TODO Rewrite this into a filter - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('nickname')) { // Nickname extension found define('__NICKNAME_TH', " <td class=\"admin_title bottom2\" align=\"center\">{--NICKNAME--}</td>"); } else { @@ -302,17 +299,17 @@ LIMIT 1", if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']); // Get number of unconfirmed mails - $LINKS = GET_TOTAL_DATA($content['userid'], 'user_links', 'id', 'userid', true); - if ($LINKS > 0) $LINKS = $base."&what=list_links&uid=".$content['userid']."\">".translateComma($LINKS)."</a>]"; + $content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true); + if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $content['userid'] . '">' . translateComma($content['links']) . '</a>]'; // Set link to sent mails if present - if ($content['emails_sent'] > 0) $content['emails_sent'] = $base."&what=email_details&uid=".$content['userid']."\">".translateComma($content['emails_sent'])."</a>]"; + if ($content['emails_sent'] > 0) $content['emails_sent'] = $base . '&what=email_details&userid=' . $content['userid'] . '">' . translateComma($content['emails_sent']) . '</a>]'; // Add nickname - if (empty($content['nickname']) || $content['nickname'] == $content['userid']) $content['nickname'] = '---'; + if ((empty($content['nickname'])) || ($content['nickname'] == $content['userid'])) $content['nickname'] = '---'; // Calculate total points - $pointsTotal = GET_TOTAL_DATA($content['userid'], 'user_points', 'points') - GET_TOTAL_DATA($content['userid'], 'user_data', 'used_points'); + $pointsTotal = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points'); // Clickrate $clickRate = 0; @@ -321,56 +318,67 @@ LIMIT 1", } // END - if // Transfer data to array - $content['sw'] = $SW; - $content['uid'] = generateUserProfileLink($content['userid']); - $content['gender'] = translateGender($content['gender']); - $content['email'] = "[<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>]"; - $content['addr'] = $content['REMOTE_ADDR']; - $content['links'] = $LINKS; - $content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']); - $content['points'] = translateComma($pointsTotal); - $content['rate'] = translateComma($clickRate); - $content['locked'] = translateComma(GET_TOTAL_DATA($content['userid'], 'user_points', 'locked_points')); + $content['sw'] = $SW; + $content['userid_link'] = generateUserProfileLink($content['userid']); + $content['gender'] = translateGender($content['gender']); + $content['email'] = '[<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>]'; + $content['alinks'] = generateMemberAdminActionLinks($content['userid'], $content['status']); + $content['points'] = translateComma($pointsTotal); + $content['rate'] = translateComma($clickRate); + $content['locked'] = translateComma(countSumTotalData($content['userid'], 'user_points', 'locked_points')); $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2'); - $content['status'] = translateUserStatus($content['status']); - $content['refs'] = 0; + $content['status'] = translateUserStatus($content['status']); + $content['refs'] = countSumTotalData($content['userid'], 'refsystem', 'counter'); - // Get total refs - $refs = GET_TOTAL_DATA($content['userid'], 'refsystem', 'counter'); - if ($refs > 0) $content['refs'] = $base."&what=list_refs&uid=".$content['userid']."\">".$refs."</a>]"; + // If we have at least one referal, make it clickable to referal list + if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $content['userid'] . '">' . $content['refs'] . '</a>]'; // Is the lock reason not set? if (!isset($content['lock_reason'])) $content['lock_reason'] = '---'; // Is the extension 'country' installed? // @TODO Rewrite this into a filter - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Then overwrite country information - $content['country'] = COUNTRY_GENERATE_INFO($content['country_code']); + $content['country'] = generateCountryInfo($content['country_code']); } elseif ($content['country'] == '') { // Zero ID??? $content['country'] = '???'; } // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_list_user_row', true, $content); + $OUT .= loadTemplate('admin_list_user_row', true, $content); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - define('__USER_ROWS', $OUT); - - // Load main template - LOAD_TEMPLATE('admin_list_user'); - // Free some memory SQL_FREERESULT($result_master); + + // Remember all rows + $content['rows'] = $OUT; + + // Init title with "all accounts" + $content['title'] = getMessage('ADMIN_ALL_ACCOUNTS'); + if (isGetRequestElementSet(('status'))) { + // Set title according to the 'status' + $content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestElement(('status'))))); + } elseif (isGetRequestElementSet('mode')) { + // Set title according to the "mode" + $content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestElement('mode')))); + } + + // Load main template + loadTemplate('admin_list_user', false, $content); } else { // No one as registered so far! :-( - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_NONE_REGISTERED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_NONE_REGISTERED')); } + + // Free memory + SQL_FREERESULT($result_master); } // [EOF] diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index 999906f7c8..30e320ec4f 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,17 +37,22 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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", -__FILE__, __LINE__); +$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? if (SQL_NUMROWS($result) > 0) { @@ -55,31 +60,31 @@ if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Translate some data and add color - $content['sw'] = $SW; - $content['link'] = generateUserProfileLink($content['userid']); - $content['wernis_amount'] = translateComma($content['wernis_amount']); - $content['wernis_timestamp'] = generateDateTime($content['wernis_timestamp'], '2'); - $content['raw_type'] = strtolower($content['wernis_type']); - $content['wernis_type'] = WERNIS_TRANSFER_STATUS($content['wernis_type']); + $content['sw'] = $SW; + $content['link'] = generateUserProfileLink($content['userid']); + $content['wernis_amount'] = translateComma($content['wernis_amount']); + $content['wernis_timestamp'] = generateDateTime($content['wernis_timestamp'], '2'); + $content['raw_type'] = strtolower($content['wernis_type']); + $content['wernis_type'] = WERNIS_TRANSFER_STATUS($content['wernis_type']); // Fix empty message and status if (empty($content['wernis_api_message'])) $content['wernis_api_message'] = '---'; - if (empty($content['wernis_api_status'])) $content['wernis_api_status'] = "OK"; + if (empty($content['wernis_api_status'])) $content['wernis_api_status'] = 'OK'; // Append it and switch colors - $OUT .= LOAD_TEMPLATE("admin_list_wernis_row", true, $content); + $OUT .= loadTemplate('admin_list_wernis_row', true, $content); $SW = 3 - $SW; } // Load main template - LOAD_TEMPLATE("admin_list_wernis_main", false, $OUT); + loadTemplate('admin_list_wernis_main', false, $OUT); } else { // Nothing to display! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_ADMIN_NO_TRANSFERS')); + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_ADMIN_NO_TRANSFERS')); } // Free the result SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index c5b3a4d8f9..52a6398194 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -36,40 +36,41 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('yoomedia')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('yoomedia')); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('yoomedia')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('yoomedia')); return; -} elseif (!EXT_IS_ACTIVE('bonus')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bonus')); +} elseif (!isExtensionActive('bonus')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); return; } -// Add description as navigation point -ADD_DESCR('admin', __FILE__); - // Do actions here if (isFormSent()) { // Prepare mail for delivery - YOOMEDIA_PREPARE_MAIL_DELIVERY(REQUEST_POST_ARRAY()); + YOOMEDIA_PREPARE_MAIL_DELIVERY(postRequestArray()); return; -} elseif (REQUEST_ISSET_POST('sent')) { +} elseif (isPostRequestElementSet('sent')) { // Sent mail - YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), 'normal'); -} elseif (REQUEST_ISSET_POST('remove')) { + YOOMEDIA_SEND_BONUS_MAIL(postRequestArray(), 'normal'); +} elseif (isPostRequestElementSet('remove')) { // Add mail to exclude list - YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), 'normal'); -} elseif (REQUEST_ISSET_POST('unlist')) { + YOOMEDIA_EXCLUDE_MAIL(postRequestArray(), 'normal'); +} elseif (isPostRequestElementSet('unlist')) { // Remove mail from exclude list - YOOMEDIA_UNLIST_MAIL(REQUEST_POST_ARRAY(), 'normal'); + YOOMEDIA_UNLIST_MAIL(postRequestArray(), 'normal'); } // Enougth queries left? if (getConfig('yoomedia_requests_remain') == 0) { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED')); // Abort here! return false; @@ -81,14 +82,14 @@ $result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS(); // Sanity-check on result array if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) { // Invalid result - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT')); return false; } elseif (count($result[0]) < 7) { // Error received so prepare error code $code = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($result); // Output message - LOAD_TEMPLATE('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(yoomediaTranslateError($code)))); + loadTemplate('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(translateYooMediaError($code)))); return false; } @@ -127,10 +128,10 @@ foreach ($result as $entry) { } // Load row template for displaying - $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_already', true, $entry); + $OUT .= loadTemplate('admin_list_yoomedia_tm_already', true, $entry); } else { // Load row template with buttons - $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_row', true, $entry); + $OUT .= loadTemplate('admin_list_yoomedia_tm_row', true, $entry); } // Switch color @@ -138,7 +139,7 @@ foreach ($result as $entry) { } // END - if // Load main template -LOAD_TEMPLATE('admin_list_yoomedia_tm', false, $OUT); +loadTemplate('admin_list_yoomedia_tm', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index fcda54a4f5..152cb1a397 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,73 +37,71 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); $message = ''; -if (REQUEST_ISSET_GET('id')) { +if (isGetRequestElementSet('id')) { // Check for selected sponsor - $result_sponsor = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email`, `status` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); + $result_sponsor = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email`, `status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", + array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_sponsor) == 1) { // Get sponsor's current status and let only confirmed and locked status pass - $DATA = SQL_FETCHARRAY($result_sponsor); + $content = SQL_FETCHARRAY($result_sponsor); - if (($DATA['status'] == 'CONFIRMED') || ($DATA['status'] == 'LOCKED')) { + if (($content['status'] == 'CONFIRMED') || ($content['status'] == 'LOCKED')) { // Transfer data to constants - define('__GENDER' , translateGender($DATA['gender'])); - define('__SURNAME', $DATA['surname']); - define('__FAMILY' , $DATA['family']); - define('__ID' , bigintval(REQUEST_GET('id'))); + $content['gender'] = translateGender($content['gender']); + $content['id'] = bigintval(getRequestElement('id')); + $content['reason'] = secureString(postRequestElement('reason')); if (isFormSent()) { // Create messages - if ($DATA['status'] == 'CONFIRMED') { + if ($content['status'] == 'CONFIRMED') { // Message when sponsor's account got lock - define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_LOCKED')); + $content['message'] = getMessage('SPONSOR_ACCOUNT_LOCKED'); $subject = getMessage('SPONSOR_SUBJECT_LOCKED'); - $DATA['status'] = 'LOCKED'; + $content['status'] = 'LOCKED'; } else { // Message when sponsor's account got unlock - define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_UNLOCKED')); + $content['message'] = getMessage('SPONSOR_ACCOUNT_UNLOCKED'); $subject = getMessage('SPONSOR_SUBJECT_UNLOCKED'); - $DATA['status'] = 'CONFIRMED'; + $content['status'] = 'CONFIRMED'; } // Load email message - $message = LOAD_EMAIL_TEMPLATE('lock_sponsor', REQUEST_POST('reason'), bigintval(REQUEST_GET('id'))); + $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestElement('id'))); // And send it away - sendEmail($DATA['email'], $subject, $message); + sendEmail($content['email'], $subject, $message); // Update sponsor's account - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='".$DATA['status']."' WHERE `id`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); - } elseif (REQUEST_ISSET_POST('no')) { + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`='%s' LIMIT 1", + array($content['status'], bigintval(getRequestElement('id'))), __FILE__, __LINE__); + } elseif (isPostRequestElementSet('no')) { // No don't lock / unlock now! - redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(REQUEST_GET('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestElement('id'))); } else { // Create header and text messages - if ($DATA['status'] == 'CONFIRMED') { + if ($content['status'] == 'CONFIRMED') { // Messages when sponsor's account is confirmed - define('__HEADER_MESSAGE', getMessage('SPONSOR_LOCK_SPONSOR_HEADER')); - define('__TEXT_MESSAGE' , getMessage('SPONSOR_LOCK_SPONSOR_TEXT')); + $content['header_message'] = getMessage('SPONSOR_LOCK_SPONSOR_HEADER'); + $content['text_message'] = getMessage('SPONSOR_LOCK_SPONSOR_TEXT'); } else { // Messages when sponsor's account is locked - define('__HEADER_MESSAGE', getMessage('SPONSOR_UNLOCK_SPONSOR_HEADER')); - define('__TEXT_MESSAGE' , getMessage('SPONSOR_UNLOCK_SPONSOR_TEXT')); + $content['header_message'] = getMessage('SPONSOR_UNLOCK_SPONSOR_HEADER'); + $content['text_message'] = getMessage('SPONSOR_UNLOCK_SPONSOR_TEXT'); } // Create email link - define('__EMAIL_LINK', '<a href="' . generateEmailLink($DATA['email'], 'sponsor_data') . '">{!__GENDER!} {!__SURNAME!} {!__FAMILY!}</a>'); + $content['email_link'] = '<a href="' . generateEmailLink($content['email'], 'sponsor_data') . '">' . $content['gender'] . ' ' . $content['surname'] . ' ' . $content['family'] . '</a>'; // Display form - LOAD_TEMPLATE('admin_lock_sponsor'); + loadTemplate('admin_lock_sponsor', false, $content); } } else { // Cannot change status on unconfirmed or pending accounts! @@ -111,7 +109,7 @@ if (REQUEST_ISSET_GET('id')) { } } else { // Sponsor not found! - $message = sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))); + $message = sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id'))); } // Free result @@ -123,8 +121,8 @@ if (REQUEST_ISSET_GET('id')) { if (!empty($message)) { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if -// +// [EOF] ?> diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 06bdeca120..bf998d8863 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,58 +37,57 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is a userid set? -if (REQUEST_ISSET_GET('uid')) { +if (isGetRequestElementSet('userid')) { // 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", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); $ACT = false; if (SQL_NUMROWS($result_user) == 1) { // User found - list($status, $gender, $sname, $fname, $email) = SQL_FETCHROW($result_user); + list($status, $gender, $surname, $family, $email) = SQL_FETCHROW($result_user); // Free result SQL_FREERESULT($result_user); // Is a lock reason set? - if ((REQUEST_ISSET_POST('lock')) && ($status != 'LOCKED')) { + if ((isPostRequestElementSet('lock')) && ($status != 'LOCKED')) { // Ok, lock the account! - if (GET_EXT_VERSION('user') >= '0.3.5') { + if (getExtensionVersion('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", - array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE `userid`=%s LIMIT 1", + array(postRequestElement('reason'), bigintval(getRequestElement('userid'))), __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", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED' WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } // Entry updated? if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off - $message = LOAD_EMAIL_TEMPLATE('lock-user', array('text' => REQUEST_POST('reason')), bigintval(REQUEST_GET('uid'))); + $message = loadEmailTemplate('lock-user', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); // Send away... - sendEmail(bigintval(REQUEST_GET('uid')), ADMIN_LOCKED_SUBJ, $message); + sendEmail(bigintval(getRequestElement('userid')), ADMIN_LOCKED_SUBJ, $message); } // END - if // Prepare message - $message = sprintf(getMessage('USER_ACCOUNT_LOCKED'), REQUEST_GET('uid')); + $message = sprintf(getMessage('USER_ACCOUNT_LOCKED'), getRequestElement('userid')); $ACT = true; - } elseif ((REQUEST_ISSET_POST(('unlock'))) && ($status == 'LOCKED')) { + } elseif ((isPostRequestElementSet(('unlock'))) && ($status == 'LOCKED')) { // Ok, unlock the account! - if (GET_EXT_VERSION('user') >= '0.3.5') { + if (getExtensionVersion('user') >= '0.3.5') { // Reset lock reason as well SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED', `lock_reason`='', @@ -96,39 +95,39 @@ SET WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } else { // No lock reason to reset - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); } // Entry updated? if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off - $message = LOAD_EMAIL_TEMPLATE('unlock-user', array('text' => REQUEST_POST('reason')), bigintval(REQUEST_GET('uid'))); + $message = loadEmailTemplate('unlock-user', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); // Send away... - sendEmail(bigintval(REQUEST_GET('uid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $message); - if (EXT_IS_ACTIVE('rallye')) { - RALLYE_AUTOADD_USER(REQUEST_GET('uid')); + sendEmail(bigintval(getRequestElement('userid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $message); + if (isExtensionActive('rallye')) { + addUserToReferalRallye(getRequestElement('userid')); } // END - if } // END - if // Prepare message - $message = sprintf(getMessage('USER_ACCOUNT_UNLOCKED'), REQUEST_GET('uid')); + $message = sprintf(getMessage('USER_ACCOUNT_UNLOCKED'), getRequestElement('userid')); $ACT = true; - } elseif (REQUEST_ISSET_POST('del')) { + } elseif (isPostRequestElementSet('del')) { // Delete the account $ACT = true; loadIncludeOnce('inc/modules/admin/what-del_user.php'); - } elseif (REQUEST_ISSET_POST('no')) { + } elseif (isPostRequestElementSet('no')) { // Do not lock him... - $URL = ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid')); + $URL = adminCreateUserLink(getRequestElement('userid')); } else { // Load user data we need - $result = SQL_QUERY_ESC("SELECT `email`, `surname`, `family` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `email`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -137,38 +136,37 @@ LIMIT 1", // Transfer data to constants for the template // @TODO Rewrite these all constants - define('__EMAIL', generateEmailLink($DATA['email'], 'user_data')); - define('__SNAME', $DATA['surname']); - define('__FNAME', $DATA['family']); - define('__UID' , bigintval(REQUEST_GET('uid'))); + $content['email'] = generateEmailLink($DATA['email'], 'user_data'); + $content['surname'] = $DATA['surname']; + $content['fname'] = $DATA['family']; + $content['userid'] = bigintval(getRequestElement('userid')); // Realy want to lock? - switch ($status) - { + switch ($status) { case 'CONFIRMED': // Yes, lock him down... ;-) - define('__OK_VALUE' , 'lock'); - define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID'))); - define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID'))); + $content['ok'] = 'lock'; + $content['header'] = sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), $content['userid']); + $content['text'] = sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), $content['userid']); break; case 'LOCKED': // Unlock the user - define('__OK_VALUE' , 'unlock'); - define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID'))); - define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID'))); + $content['ok'] = $lock; + $content['header'] = sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), $content['userid']); + $content['text'] = sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), $content['userid']); break; case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked! - define('__OK_VALUE' , 'del'); - define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID'))); - define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID'))); + $content['ok'] = 'del'; + $content['header'] = sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), $content['userid']); + $content['text'] = sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), $content['userid']); break; } // Output form - LOAD_TEMPLATE('admin_lock_user'); + loadTemplate('admin_lock_user', false, $content); } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } // Free result @@ -182,18 +180,18 @@ LIMIT 1", } elseif ($ACT) { // An action was performed... if (!empty($message)) { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".$message."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_green\">".$message."</div>"); } else { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>"); } } } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } } else { // List all users - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } // diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index c69492f710..51ff5dfbb3 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,17 +37,16 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (REQUEST_ISSET_GET('access')) { +if (isGetRequestElementSet('access')) { // Secure input and construct FQFN - $access = SQL_ESCAPE(strip_tags(REQUEST_GET('access'))); + $access = SQL_ESCAPE(secureString(getRequestElement('access'))); $target = sprintf("%slogs/%s", getConfig('PATH'), $access); // Is the file valid and readable? @@ -73,10 +72,10 @@ if (REQUEST_ISSET_GET('access')) { sendHeader('Content-Type: text/plain'); } else { // Restore old content - OUTPUT_HTML($OUTPUT); + outputHtml($OUTPUT); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT'), $access)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT'), $access)); return; } @@ -85,13 +84,13 @@ if (REQUEST_ISSET_GET('access')) { shutdown(); } else { // Not readable! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access)); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access)); } } else { // Is the directory there? if (isDirectory(getConfig('PATH') . getConfig('logs_base'))) { // Logs directory does exist so begin the list - OUTPUT_HTML('<ol>'); + outputHtml('<ol>'); // Read all files $files = getArrayFromDirectory(getConfig('logs_base'), 'access'); @@ -102,14 +101,14 @@ if (REQUEST_ISSET_GET('access')) { $file = basename($file); // Okay, add it - OUTPUT_HTML("<li><a href=\"{?URL?}/modules.php?module=admin&what=".getWhat()."&access=".urlencode($file)."\">".$file."</a></li>"); + outputHtml("<li><a href=\"{?URL?}/modules.php?module=admin&what=".getWhat()."&access=".urlencode($file)."\">".$file."</a></li>"); } // END - foreach // Finish list - OUTPUT_HTML('</ol>'); + outputHtml('</ol>'); } else { // logs directory does not exist - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_LOGS_DIR_404'), getConfig('logs_base'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_LOGS_DIR_404'), getConfig('logs_base'))); } } diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index 56794823c5..7372bf6071 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,18 +37,16 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { // De- or activate maintenance mode - switch (getConfig('maintenance')) - { + switch (getConfig('maintenance')) { case 'Y': $target_mode = 'N'; $out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED'); @@ -64,21 +62,21 @@ if (isFormSent()) { updateConfiguration('maintenance', $target_mode); // Load template - LOAD_TEMPLATE('admin_settings_saved', false, $out); + loadTemplate('admin_settings_saved', false, $out); } else { - switch (getConfig('maintenance')) - { + switch (getConfig('maintenance')) { case 'Y': // Maintenance mode is active - define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE')); + $message = getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'); break; case 'N': // Maintenance mode is inactive - define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE')); + $message = getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'); break; } + // Display form - LOAD_TEMPLATE("admin_maintenance_form"); + loadTemplate('admin_maintenance_form', false, $message); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 4be4117ab8..1762487215 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,16 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add desciption as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if ((!REQUEST_ISSET_POST('title')) && (isFormSent())) { - REQUEST_UNSET_POST('ok'); +if ((!isPostRequestElementSet('title')) && (isFormSent())) { + unsetPostRequestElement('ok'); } // END - if if (!isFormSent()) { @@ -58,7 +57,7 @@ if (!isFormSent()) { $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` ASC", + $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Read menu structure @@ -99,7 +98,7 @@ if (!isFormSent()) { // 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) { // Initialize arrays @@ -162,38 +161,39 @@ if (!isFormSent()) { } $OUT .= "</select>"; - define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('member', 'what' , 'name')); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('member', 'action', 'menu')); + // Prepare selection boxes for template + $content['below_selection'] = $OUT; + $content['what_selection'] = adminAddMenuSelectionBox('member', 'what' , 'name'); + $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu'); // Display form - LOAD_TEMPLATE('admin_member_add'); -} elseif (!IS_DEMO()) { + loadTemplate('admin_member_add', false, $content); +} elseif (!isDemoModeActive()) { // Insert new menu entry - if (REQUEST_ISSET_POST('menu')) { - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", + if (isPostRequestElementSet('menu')) { + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - REQUEST_POST('menu'), - REQUEST_POST('name'), - REQUEST_POST('title'), - REQUEST_POST('visible'), - REQUEST_POST('active'), - bigintval(REQUEST_POST('sort')), + postRequestElement('menu'), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('visible'), + postRequestElement('active'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__); } else { - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( - REQUEST_POST('name'), - REQUEST_POST('title'), - REQUEST_POST('visible'), - REQUEST_POST('active'), - bigintval(REQUEST_POST('sort')), + postRequestElement('name'), + postRequestElement('title'), + postRequestElement('visible'), + postRequestElement('active'), + bigintval(postRequestElement('sort')), ), __FILE__, __LINE__); } - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } else { // Demo mode! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED')); } // diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index cac4ef6629..195ae9510a 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,79 +37,78 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (REQUEST_ISSET_GET('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub')); - $SUB = REQUEST_GET('sub'); +if (isGetRequestElementSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); + $SUB = getRequestElement('sub'); } // END - if // Get count of (maybe) selected menu points $chk = 0; -if (REQUEST_ISSET_POST('sel')) $chk = countPostSelection(); +if (isPostRequestElementSet('sel')) $chk = countPostSelection(); // List all menu points and make them editable -if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { +if ((isPostRequestElementSet('edit')) && ($chk > 0) && (!isDemoModeActive())) { // Edit menu entries - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... - list($menu, $act, $wht, $descr) = SQL_FETCHROW($result); - $content = array( + $data = SQL_FETCHARRAY($result); + $data = array( 'cnt' => $cnt, 'sel' => $sel, - 'menu' => $menu, + 'menu' => $data['title'], 'sw' => $SW, - 'act' => ADMIN_MAKE_MENU_SELECTION('member', 'act' , 'sel_act[' . $sel . ']', $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('member', 'what', 'sel_what[' . $sel . ']', $wht), + 'act' => adminAddMenuSelectionBox('member', 'act' , 'sel_act[' . $sel . ']', $data['action']), + 'what' => adminAddMenuSelectionBox('member', 'what', 'sel_what[' . $sel . ']', $data['what']), ); // Load template - $OUT .= LOAD_TEMPLATE('admin_mmenu_edit_row', true, $content); + $OUT .= loadTemplate('admin_mmenu_edit_row', true, $data); } else { // Entry not found? - $content = array( + $data = array( 'sw' => $SW, 'sel' => $sel ); // Load template - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $data); } SQL_FREERESULT($result); $SW = 3 - $SW; } } - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_mmenu_edit'); -} elseif ((REQUEST_ISSET_POST('del')) && ($chk > 0) && (!IS_DEMO())) { + loadTemplate('admin_mmenu_edit', false, $content); +} elseif ((isPostRequestElementSet('del')) && ($chk > 0) && (!isDemoModeActive())) { // Del menu entries with or without confirmation - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... @@ -121,7 +120,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { ); // Load template - $OUT .= LOAD_TEMPLATE('admin_mmenu_delete_row', true, $content); + $OUT .= loadTemplate('admin_mmenu_delete_row', true, $content); } else { // Entry not found? $content = array( @@ -130,127 +129,127 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { ); // Load template - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $content); } SQL_FREERESULT($result); } // END - if } // END - foreach - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_mmenu_delete'); -} elseif ((REQUEST_ISSET_POST('status')) && ($chk > 0) && (!IS_DEMO())) { + loadTemplate('admin_mmenu_delete', false, $content); +} elseif ((isPostRequestElementSet('status')) && ($chk > 0) && (!isDemoModeActive())) { // Change status (visible / locked) - define('__SUB_VALUE', $SUB); - define('__CHK_VALUE', $chk); + $content['sub'] = $SUB; + $content['chk'] = $chk; $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) { + foreach (postRequestElement('sel') as $sel => $confirm) { 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) { // Entry found so we load the stuff... - list($menu, $vis, $locked) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $content = array( + $data = SQL_FETCHARRAY($result); + $data = array( 'cnt' => $cnt, - 'menu' => $menu, + 'menu' => $data['title'], 'sel' => $sel, 'sw' => $SW, - 'visible' => ADD_SELECTION('yn', $vis , 'visible', $sel), - 'locked' => ADD_SELECTION('yn', $locked, 'locked' , $sel), + 'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel), + 'locked' => addSelectionBox('yn', $data['locked'] , 'locked' , $sel), ); // Load template - $OUT .= LOAD_TEMPLATE('admin_menu_status_row', true, $content); + $OUT .= loadTemplate('admin_menu_status_row', true, $data); } else { // Entry not found? - $content = array( + $data = array( 'sw' => $SW, 'sel' => $sel ); // Load template - $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', true, $data); } + SQL_FREERESULT($result); $SW = 3 - $SW; } // END - if } // END - foreach - define('__MENU_ROWS', $OUT); - define('__CNT_VALUE', $cnt); + $content['rows'] = $OUT; + $content['cnt'] = $cnt; // Load template - LOAD_TEMPLATE('admin_mmenu_status'); -} elseif ((isFormSent()) && (!IS_DEMO())) { + loadTemplate('admin_mmenu_status', false, $content); +} elseif ((isFormSent()) && (!isDemoModeActive())) { // An act is done... - foreach (REQUEST_POST('sel') as $sel => $menu) { + foreach (postRequestElement('sel') as $sel => $menu) { $AND = "(`what` = '' OR `what` IS NULL)"; $sel = bigintval($sel); if (!empty($SUB)) $AND = "`action`='".$SUB."'"; - switch (REQUEST_POST('ok')) { + switch (postRequestElement('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", - array($menu, REQUEST_POST('sel_act', $sel), REQUEST_POST('sel_what', $sel), $sel), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", + array($menu, postRequestElement('sel_act', $sel), postRequestElement('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", - array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", + array(postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__); break; } // END - switch break; } // END - foreach // Load template - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); + loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } else { - if ((REQUEST_ISSET_GET('act')) && (REQUEST_ISSET_GET('tid')) && (REQUEST_ISSET_GET('fid'))) { + if ((isGetRequestElementSet('act')) && (isGetRequestElementSet('tid')) && (isGetRequestElementSet('fid'))) { // Init $tid = ''; $fid = ''; // Get IDs - if (REQUEST_ISSET_GET('w')) { + if (isGetRequestElementSet('w')) { // Sub menus selected - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('act')), bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('act')), bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", + array(bigintval(getRequestElement('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", - array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__); - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", - array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1", + array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); } // END - -fi } 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__); } // Get total menu entries @@ -259,52 +258,51 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { // Some are there? if ($max > 0) { // Set sub value - // @TODO Rewrite this constant - define('__SUB_VALUE', $SUB); + $content['sub'] = $SUB; $SW = 2; $cnt = 0; $OUT = ''; - while ($content = SQL_FETCHARRAY($result)) { + while ($data = SQL_FETCHARRAY($result)) { // Init navigation - $content['navi'] = ''; + $data['navi'] = ''; $cnt++; - if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) { + if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) { // Is highest position - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } elseif ($cnt == $max) { // Is lowest position - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>"; - } elseif ($content['sort'] > 0) { + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>"; + } elseif ($data['sort'] > 0) { // Anything else between highest and lowest - $content['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']-1)."&fid=".$content['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>"; + $data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']-1)."&fid=".$data['sort']."\">{--HIGHER--}</a>/<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>"; } // Fix empty values for Firefox - if (empty($content['action'])) $content['action'] = ' '; - if (empty($content['what'])) $content['what'] = ' '; - if (empty($content['title'])) $content['title'] = ' '; + if (empty($data['action'])) $data['action'] = ' '; + if (empty($data['what'])) $data['what'] = ' '; + if (empty($data['title'])) $data['title'] = ' '; // Add more entries - $content['sw'] = $SW; - $content['mode'] = 'mem'; + $data['sw'] = $SW; + $data['mode'] = 'mem'; // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_menu_overview_row', true, $content); + $OUT .= loadTemplate('admin_menu_overview_row', true, $data); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__MENU_ROWS', $OUT); + // Remember rows in array + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE('admin_mmenu_overview'); + loadTemplate('admin_mmenu_overview', false, $content); } else { // Menu entries are missing... (???) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND')); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index bdcbe49127..622a148e89 100644 --- a/inc/modules/admin/what-optimize.php +++ b/inc/modules/admin/what-optimize.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,38 +37,36 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Optimize and repair database and return the result as a multi-dimensional array -$DATA = REPAIR_OPTIMIZE_DB(); +$DATA = repairOptimizeDatabase(); // Output rows $SW = 2; $gain_tabs = 0; $OUT = ''; -foreach ($DATA['tables'] as $row_array) -{ +foreach ($DATA['tables'] as $row_array) { // Init variables $B1 = ''; $B2 = ''; // Fixes a bug which causes a parser error on eval'd code - if (empty($row_array[1])) $row_array[1] = "NONE"; + if (empty($row_array[1])) $row_array[1] = 'NONE'; // Get optimization status - $REP = getMessage('OPTIMIZE_STATUS_'.strtoupper($row_array[1]).''); + $REP = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[1]).''); - $OPT = OPTIMIZE_STATUS_UNSUPPORTED; + $OPT = getMessage('OPTIMIZE_STATUS_UNSUPPORTED'); if ($row_array[4] > 0) { - $OPT = OPTIMIZE_STATUS_OPTIMIZED; - $B1 = "<strong>"; $B2 = "<strong>"; + $OPT = getMessage('OPTIMIZE_STATUS_OPTIMIZED'); + $B1 = '<strong>'; $B2 = '<strong>'; $gain_tabs++; - } elseif (count(explode(" ", $row_array[2])) == 0) { - $OPT = getMessage('OPTIMIZE_STATUS_'.strtoupper($row_array[2]).''); + } elseif (count(explode(' ', $row_array[2])) == 0) { + $OPT = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[2]).''); } // Prepare data for the row template @@ -84,21 +82,23 @@ foreach ($DATA['tables'] as $row_array) ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_optimize_row", true, $content); + $OUT .= loadTemplate('admin_optimize_row', true, $content); $SW = 3 - $SW; -} -define('__ROWS', $OUT); +} // END - foreach + +// Remember rows +$content['rows'] = $OUT; // Prepare data for the template -define('__TOTAL_TABS' , $DATA['total_tabs']); -define('__TOTAL_SIZE' , translateComma($DATA['total_size'])); -define('__TOTAL_CALLS' , $DATA['total_rows']); -define('__TOTAL_OPTIMIZED', translateComma($DATA['total_opti'])); -define('__NOW_OPTIMIZED' , $gain_tabs); -define('__NOW_SAVED' , translateComma($DATA['total_gain'])); +$content['total_tabs'] = $DATA['total_tabs']; +$content['total_size'] = translateComma($DATA['total_size']); +$content['total_rows'] = $DATA['total_rows']; +$content['total_optimized'] = translateComma($DATA['total_opti']); +$content['now_optimized'] = $gain_tabs; +$content['now_saved'] = translateComma($DATA['total_gain']); // Load main template -LOAD_TEMPLATE("admin_optimize"); +loadTemplate('admin_optimize', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php index e3204cb0d0..59c55b245f 100644 --- a/inc/modules/admin/what-overview.php +++ b/inc/modules/admin/what-overview.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -// In Opera browsers the menu is being displayed double: ADD_DESCR('admin', __FILE__); +// In Opera browsers the menu is being displayed double: addMenuDescription('admin', __FILE__); // Otherwise load include file 'overview-inc' (old standard overview page) loadIncludeOnce('inc/modules/admin/overview-inc.php'); @@ -53,20 +52,20 @@ $taskExt = false; // Default is that 'task' is not installed // When the admin is logging in check several things first (new jobs to complete and so on) if (getAction() == 'login') { - if (EXT_IS_ACTIVE('task')) { + if (isExtensionActive('task')) { // When task extension is registered output advanced overview page - $jobsDone = OUTPUT_ADVANCED_OVERVIEW($result_tasks); // This function is provided by the extension 'task' + $jobsDone = outputAdvancedOverview($result_tasks); // This function is provided by the extension 'task' $taskExt = true; } else { // Output standart overview (provided by overview-inc.php) - $jobsDone = OUTPUT_STANDARD_OVERVIEW($result_tasks); + $jobsDone = outputStandardOverview($result_tasks); } } // END - if // Are we in 'welcome' page and are there jobs to be done? if (!ifAdminMenuHasEntries(getAction())) { // This menu is empty and so no content is displayed - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), getAction())); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), getAction())); } elseif ($jobsDone === true) { // Generate overview of all main menus if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) { @@ -79,21 +78,21 @@ if (!ifAdminMenuHasEntries(getAction())) { ); // Load row template - $OUT .= LOAD_TEMPLATE("admin_menu_hints_row", true, $content); + $OUT .= loadTemplate('admin_menu_hints_row', true, $content); } // END - foreach // Load base template - LOAD_TEMPLATE("admin_menu_hints", false, $OUT); + loadTemplate('admin_menu_hints', false, $OUT); } -} elseif (!$taskExt) { - if (EXT_IS_ACTIVE('task')) { +} elseif ($taskExt === false) { + if (isExtensionActive('task')) { // Output warning message - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('EXTENSION_WARNING_EXT_INACTIVE'), 'task')); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('EXTENSION_WARNING_EXT_INACTIVE'), 'task')); } // List selected tasks on overview when task management is not active - OUTPUT_SELECTED_TASKS(REQUEST_POST_ARRAY(), $result_tasks); + outputSeletectedTasks(postRequestArray(), $result_tasks); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index a0422882c2..4204e12df1 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Payments (points) for confirmed mails * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Verguetungen fuer bestaetigte Mails * + * Kurzbeschreibung : Verguetungen fuer bestätigte Mails * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,27 +37,26 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET('do')) && (REQUEST_GET('do') == 'add')) { - REQUEST_UNSET_POST('ok'); +if (((!isPostRequestElementSet(('t_wait'))) || (!isPostRequestElementSet(('payment')))) && (isGetRequestElementSet('do')) && (getRequestElement('do') == 'add')) { + unsetPostRequestElement('ok'); } if (isFormSent()) { - switch (REQUEST_GET('do')) { + switch (getRequestElement('do')) { case 'add': - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')"); - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1", - array(REQUEST_POST('t_wait')), __FILE__, __LINE__); + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (time, payment, mail_title, price) VALUES ('".postRequestElement('t_wait')."','".postRequestElement('payment')."','".postRequestElement('title')."','".postRequestElement('price')."')"); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payments` WHERE time='%s' LIMIT 1", + array(postRequestElement('t_wait')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Re-init the array here - INIT_SQLS(); + initSqls(); // Free memory SQL_FREERESULT($result); @@ -65,20 +64,20 @@ if (isFormSent()) { break; case 'edit': - foreach (REQUEST_POST('time') as $id => $value) { - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".REQUEST_POST('pay', $id)."', price='".REQUEST_POST('price', $id)."', mail_title='".REQUEST_POST('title', $id)."' WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestElement('time') as $id => $value) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_payments` SET time='".$value."', payment='".postRequestElement('pay', $id)."', price='".postRequestElement('price', $id)."', mail_title='".postRequestElement('title', $id)."' WHERE `id`='".$id."' LIMIT 1"); } break; case 'del': - foreach (REQUEST_POST('id') as $id => $value) { - ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestElement('id') as $id => $value) { + addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`='".$id."' LIMIT 1"); } break; } // Save settings - if (COUNT_SQLS() > 0) { + if (countSqls() > 0) { // Run all queries runFilterChain('run_sqls'); $content = "<span class=\"admin_failed\">".SETTINGS_SAVED."</span>"; @@ -88,12 +87,12 @@ if (isFormSent()) { } // Output template - LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif ((REQUEST_ISSET_POST('del')) && (countPostSelection() > 0)) { + loadTemplate('admin_settings_saved', false, $content); +} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { // Delete entries here $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { - $result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $value) { + $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); @@ -107,18 +106,17 @@ if (isFormSent()) { ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_del_payments_row", true, $content); + $OUT .= loadTemplate('admin_del_payments_row', true, $content); $SW = 3 - $SW; } - define('__PAYMENT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_del_payments"); -} elseif ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) { + loadTemplate('admin_del_payments', false, $OUT); +} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { - $result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $value) { + $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); @@ -134,16 +132,15 @@ if (isFormSent()) { ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_edit_payments_row", true, $content); + $OUT .= loadTemplate('admin_edit_payments_row', true, $content); $SW = 3 - $SW; } - define('__PAYMENT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_edit_payments"); + loadTemplate('admin_edit_payments', false, $OUT); } 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 $OUT = ''; $SW = 2; @@ -162,21 +159,20 @@ if (isFormSent()) { ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_payments_list_row", true, $content); + $OUT .= loadTemplate('admin_payments_list_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - define('__PAYMENT_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_list_payments"); + loadTemplate('admin_list_payments', false, $OUT); } // Form for adding new referal levels - LOAD_TEMPLATE("admin_add_payment"); + loadTemplate('admin_add_payment'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index cab32b9311..4059096dc8 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,40 +37,38 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init variable $SEL = 0; // Some sanity-check -if ((!REQUEST_ISSET_POST('url')) || (!REQUEST_ISSET_POST(('alternate')))) { - REQUEST_UNSET_POST('ok'); +if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet(('alternate')))) { + unsetPostRequestElement('ok'); } // Check selection count -if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection(); +if (isPostRequestElementSet('sel')) $SEL = countPostSelection(); if (isFormSent()) { // Fix older calls from add-new-banner-form - if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', 'add'); + if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', 'add'); $sql = ''; - switch (REQUEST_GET('mode')) - { + switch (getRequestElement('mode')) { case 'add': // Check if banner is already added - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1", - array(REQUEST_POST('url')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1", + array(postRequestElement('url')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // 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(REQUEST_POST('url'), REQUEST_POST('alternate'), REQUEST_POST('visible')), __FILE__, __LINE__); + array(postRequestElement('url'), postRequestElement('alternate'), postRequestElement('visible')), __FILE__, __LINE__); } else { // Free memory SQL_FREERESULT($result); @@ -78,16 +76,16 @@ VALUES ('%s','%s','%s')", break; case 'edit': // Update banner - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Secure ID $id = bigintval($id); // Update entry - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1", array( - REQUEST_POST('url', $id), - REQUEST_POST('alternate', $id), - REQUEST_POST('visible'), + postRequestElement('url', $id), + postRequestElement('alternate', $id), + postRequestElement('visible'), $id ), __FILE__, __LINE__); } @@ -99,13 +97,13 @@ VALUES ('%s','%s','%s')", } else { $content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>"; } - LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif (($SEL > 0) && (REQUEST_ISSET_POST('edit'))) { + loadTemplate('admin_settings_saved', false, $content); +} elseif (($SEL > 0) && (isPostRequestElementSet('edit'))) { // Edit banner $SW = 2; $OUT = ''; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('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); @@ -116,30 +114,27 @@ VALUES ('%s','%s','%s')", 'id' => $id, 'url' => $url, 'alt' => $alt, - 'vis' => ADD_SELECTION('yn', $vis , 'visible'), + 'vis' => addSelectionBox('yn', $vis , 'visible'), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('admin_refbanner_edit_row', true, $content); + $OUT .= loadTemplate('admin_refbanner_edit_row', true, $content); $SW = 3 - $SW; } - // @TODO Rewrite this constant - define('__BANNER_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_refbanner_edit'); + loadTemplate('admin_refbanner_edit', false, $OUT); } else { - if (($SEL > 0) && (REQUEST_ISSET_POST('del'))) { + if (($SEL > 0) && (isPostRequestElementSet('del'))) { // Delete banner - foreach (REQUEST_POST('sel') as $id => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1", + foreach (postRequestElement('sel') as $id => $sel) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach } // END - if // 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__); // Entries found? if (SQL_NUMROWS($result) > 0) { @@ -159,23 +154,20 @@ VALUES ('%s','%s','%s')", ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_refbanner_row", true, $content); + $OUT .= loadTemplate('admin_refbanner_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__BANNER_ROWS', $OUT); - // Load main template - LOAD_TEMPLATE('admin_refbanner'); + loadTemplate('admin_refbanner', false, $OUT); } // Form for adding new referal levels - LOAD_TEMPLATE('admin_add_banner'); + loadTemplate('admin_add_banner'); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-repair_amnu.php b/inc/modules/admin/what-repair_amnu.php index 1c523a6868..267d0e0212 100644 --- a/inc/modules/admin/what-repair_amnu.php +++ b/inc/modules/admin/what-repair_amnu.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,24 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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 ($content = SQL_FETCHARRAY($result_fix)) { // Store act value for later usage in sorting sub menus $ACTIONS[] = $content['action']; // 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, $content['id']), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -64,16 +63,16 @@ while ($content = SQL_FETCHARRAY($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`", - array($act), __FILE__, __LINE__); +foreach ($ACTIONS as $action) { + $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($action), __FILE__, __LINE__); $cnt = 1; while ($content = SQL_FETCHARRAY($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, $content['id']), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -82,9 +81,6 @@ foreach ($ACTIONS as $act) { } } -// @TODO This causes the whole (!) menu cache being rebuilded -cachePurgeAdminMenu(); - // Repair finished if ($REP > 0) { $message = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REP); @@ -93,7 +89,7 @@ if ($REP > 0) { } // Output message -LOAD_TEMPLATE('admin_settings_saved', false, $message); +loadTemplate('admin_settings_saved', false, $message); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-repair_cats.php b/inc/modules/admin/what-repair_cats.php index f0e0168ee1..1c3ce00b96 100644 --- a/inc/modules/admin/what-repair_cats.php +++ b/inc/modules/admin/what-repair_cats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,24 +37,23 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -$result = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` ORDER BY `userid` ASC", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_cats` ORDER BY `userid` ASC", __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 ($content = SQL_FETCHARRAY($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($content['userid'])), __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($content['userid'])), __FILE__, __LINE__); $REMOVED += SQL_AFFECTEDROWS(); } else { @@ -79,7 +78,7 @@ if (SQL_NUMROWS($result) > 0) { } // Load template -LOAD_TEMPLATE('admin_settings_saved', false, $content); +loadTemplate('admin_settings_saved', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-repair_gmnu.php b/inc/modules/admin/what-repair_gmnu.php index 50fc21ed3f..2d284b37d5 100644 --- a/inc/modules/admin/what-repair_gmnu.php +++ b/inc/modules/admin/what-repair_gmnu.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,40 +37,40 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); $ACTIONS = array(); // First fix all main menus (what = '')... -$result_fix = SQL_QUERY("SELECT id, action FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__); +$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 ($content = SQL_FETCHARRAY($result_fix)) { // Store act value for later usage in sorting sub menus $ACTIONS[] = $content['action']; // Fix weight - $result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='".$cnt."' WHERE `id`='".$content['id']."' LIMIT 1", __FILE__, __LINE__); + $result_sort = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET sort='".$cnt."' WHERE `id`='".$content['id']."' LIMIT 1", __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); // Count one up $cnt++; -} +} // END - while + // 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`", - array($act), __FILE__, __LINE__); +foreach ($ACTIONS as $action) { + $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($action), __FILE__, __LINE__); $cnt = 1; while ($content = SQL_FETCHARRAY($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, $content['id']), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -87,7 +87,7 @@ if ($REP > 0) { } // Output message -LOAD_TEMPLATE('admin_settings_saved', false, $message); +loadTemplate('admin_settings_saved', false, $message); // ?> diff --git a/inc/modules/admin/what-repair_mmnu.php b/inc/modules/admin/what-repair_mmnu.php index a6afa5cfdd..142ddc1ce8 100644 --- a/inc/modules/admin/what-repair_mmnu.php +++ b/inc/modules/admin/what-repair_mmnu.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,25 +37,24 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('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 ($content = SQL_FETCHARRAY($result_fix)) { // Store action value for later usage in sorting sub menus $ACTIONS[] = $content['action']; // 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, $content['id']), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -64,16 +63,16 @@ while ($content = SQL_FETCHARRAY($result_fix)) { } // 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`", - array($act), __FILE__, __LINE__); +foreach ($ACTIONS as $action) { + $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($action), __FILE__, __LINE__); $cnt = 1; while ($content = SQL_FETCHARRAY($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, $content['id']), __FILE__, __LINE__); $REP += SQL_AFFECTEDROWS(); @@ -90,7 +89,7 @@ if ($REP > 0) { } // Output message -LOAD_TEMPLATE('admin_settings_saved', false, $message); +loadTemplate('admin_settings_saved', false, $message); // ?> diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 120b6d63c3..785acaa6ca 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,56 +37,55 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('order')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('order')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('order')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + return; +} // END - if // Set empty mode to "select" -if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', "select"); +if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', "select"); if (isFormSent()) { // Deliver bonus mail - addNewBonusMail(REQUEST_POST_ARRAY(), REQUEST_GET('mode')); + addNewBonusMail(postRequestArray(), getRequestElement('mode')); } else { // Get all available users - define('__ALL_VALUE', translateComma(getTotalReceivers(REQUEST_GET('mode')))); + $content['all'] = translateComma(getTotalReceivers(getRequestElement('mode'))); // Prepare option lines - define('__OPTION_LINES', generateCategoryOptionsList(REQUEST_GET('mode'))); + $content['options_lines'] = generateCategoryOptionsList(getRequestElement('mode')); // Store send mode - define('__MODE', REQUEST_GET('mode')); + $content['mode'] = getRequestElement('mode'); - if (EXT_IS_ACTIVE('html_mail')) { + $content['html_select'] = ''; + if (isExtensionActive('html_mail')) { // If HTML extension is active - define('__HTML_SELECT', LOAD_TEMPLATE("admin_send_bonus_html", true)); - } else { - // And if not - define('__HTML_SELECT', ''); - } + $content['html_select'] = loadTemplate('admin_send_bonus_html', true); + } // END - if // Select template - switch(REQUEST_GET('mode')) { + switch(getRequestElement('mode')) { case 'html': // HTML mails case 'normal': // Normal mails - $template = "admin_send_bonus_form"; + $template = 'admin_send_bonus_form'; break; - case "select": // Selection - $template = "admin_send_bonus_select"; + case 'select': // Selection + $template = 'admin_send_bonus_select'; break; - } + } // END - if // Load template - LOAD_TEMPLATE($template); + loadTemplate($template); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index cf3f963066..863c326e82 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); if (isFormSent()) { $result = SQL_QUERY("SELECT `userid`, `email` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `nl_receive`='Y' ORDER BY @@ -61,42 +60,41 @@ ORDER BY $template = 'newsletter'; // Check for extension and sending-mode - if (!EXT_IS_ACTIVE('html_mail', true) && (REQUEST_POST('mode') == 'html')) { + if (!isExtensionActive('html_mail', true) && (postRequestElement('mode') == 'html')) { // Set mode to text mode - REQUEST_POST('mode') == 'text'; - } elseif (REQUEST_POST('mode') == 'html') { + postRequestElement('mode') == 'text'; + } elseif (postRequestElement('mode') == 'html') { // Set HTML templates $template = 'newsletter_html'; } // Compile message - REQUEST_SET_POST('text', COMPILE_CODE(REQUEST_POST('text'))); + setRequestPostElement('text', compileCode(postRequestElement('text'))); // Load template - $message = LOAD_EMAIL_TEMPLATE($template, array('text' => REQUEST_POST('text')), $content['userid']); + $message = loadEmailTemplate($template, array('text' => postRequestElement('text')), $content['userid']); // ... and send it away! - SEND_NEWSLETTER($content['email'], REQUEST_POST('subject'), $message, REQUEST_POST('mode')); + sendNewsletter($content['email'], postRequestElement('subject'), $message, postRequestElement('mode')); } // Free memory SQL_FREERESULT($result); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NL_SEND_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NL_SEND_DONE')); } } else { // Copy data into constants for the template and load it - // @TODO Rewrite this constant - define('_DATESTAMP', generateDateTime(time(), '3')); - if (EXT_IS_ACTIVE('html_mail')) { + $content['datestamp'] = generateDateTime(time(), '3'); + if (isExtensionActive('html_mail')) { // Load template with HTML mode - LOAD_TEMPLATE('admin_newsletter'); + loadTemplate('admin_newsletter', false, $content); } else { // Load template with only text mode - LOAD_TEMPLATE('admin_newsletter_nohtml'); + loadTemplate('admin_newsletter_nohtml', false, $content); } } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 517ef6349d..16b0a5144e 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,39 +37,32 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // If var is empty set it to empty -if (!REQUEST_ISSET_GET('mod')) REQUEST_SET_GET('mod', ''); +if (!isGetRequestElementSet('mod')) setRequestGetElement('mod', ''); // Check if module was selected -if ((REQUEST_GET('mod') == 'index') || (REQUEST_GET('mod') == 'login')) { +if ((getRequestElement('mod') == 'index') || (getRequestElement('mod') == 'login')) { // Select menu system $mod = ''; - switch (REQUEST_GET('mod')) { - case 'index': $mod = 'guest' ; break; - case 'login': $mod = 'member'; break; - default: // Unknown - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mod %s detected.", REQUEST_GET('mod'))); - break; - } // END - switch + $mod = mapModuleToTable($mod); // Load module's detail statistic - $result = SQL_QUERY_ESC("SELECT action, title, counter FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY counter DESC", - array($mod), __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__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Add color switch $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE('admin_mods_stats2_row', true, $content); + $OUT .= loadTemplate('admin_mods_stats2_row', true, $content); // Switch colors $SW = 3 - $SW; @@ -77,13 +70,12 @@ if ((REQUEST_GET('mod') == 'index') || (REQUEST_GET('mod') == 'login')) { // Free memory SQL_FREERESULT($result); - define('__MODS_ROWS', $OUT); // Load final template - LOAD_TEMPLATE('admin_mods_stats2'); + loadTemplate('admin_mods_stats2', false, $OUT); } 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__); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { if (empty($content['title'])) $content['title'] = '---'; @@ -97,16 +89,15 @@ if ((REQUEST_GET('mod') == 'index') || (REQUEST_GET('mod') == 'login')) { $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE('admin_mods_stats_row', true, $content); + $OUT .= loadTemplate('admin_mods_stats_row', true, $content); } // END - while // Free memory SQL_FREERESULT($result); - define('__MODS_ROWS', $OUT); // Load final template - LOAD_TEMPLATE('admin_mods_stats'); + loadTemplate('admin_mods_stats', false, $OUT); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 2aa5efa154..f4348b36d7 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,36 +37,31 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); -// Fix a notice -if (!REQUEST_ISSET_GET('uid')) REQUEST_SET_GET('uid', ''); - -if (REQUEST_GET('uid') == "all") { +if (getRequestElement('userid') == 'all') { // Add points to all accounts - // @TODO Rewrite this constant - define('__POINTS_VALUE', REQUEST_POST('points')); + $content['points'] = bigintval(postRequestElement('points')); // Is the form sent? - if ((isFormSent()) && (REQUEST_POST('points') > 0)) { - $result_main = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", + if ((isFormSent()) && (postRequestElement('points') > 0)) { + $result_main = SQL_QUERY("SELECT userid, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FILE__, __LINE__); - while ($content = SQL_FETCHARRAY($result_main)) { + while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) { // Ok, add points to used points and send an email to him... - SUB_POINTS("admin_all", $content['userid'], REQUEST_POST('points')); + subtractPoints('admin_all', $content['userid'], postRequestElement('points')); // Add more content - $content['text'] = SQL_ESCAPE(REQUEST_POST('reason')); - $content['points'] = bigintval(REQUEST_POST('points')); + $content['text'] = SQL_ESCAPE(postRequestElement('reason')); + $content['points'] = bigintval(postRequestElement('points')); // Load message and send it away - $message = LOAD_EMAIL_TEMPLATE('sub-points', $content, bigintval($content['userid'])); + $message = loadEmailTemplate('sub-points', $content, bigintval($content['userid'])); sendEmail($content['email'], getMessage('ADMIN_SUB_SUBJ'), $message); } // END - while @@ -74,52 +69,52 @@ if (REQUEST_GET('uid') == "all") { SQL_FREERESULT($result_main); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_SUBTRACTED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_SUBTRACTED')); } else { // Display form add points - LOAD_TEMPLATE('admin_sub_points_all'); + loadTemplate('admin_sub_points_all'); } -} elseif (REQUEST_ISSET_GET('uid')) { +} elseif (isGetRequestElementSet('userid')) { // 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", - array(bigintval(REQUEST_GET('uid'))),__FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array(bigintval(getRequestElement('userid'))),__FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Selected user does exist $content = SQL_FETCHARRAY($result); - if ((isFormSent()) && (REQUEST_ISSET_POST(('points')))) { + if ((isFormSent()) && (isPostRequestElementSet(('points')))) { // Ok, add to used points and send an email to him... - SUB_POINTS('admin_single', bigintval(REQUEST_GET('uid')), REQUEST_POST('points')); + subtractPoints('admin_single', bigintval(getRequestElement('userid')), postRequestElement('points')); // Add more content - $content['text'] = SQL_ESCAPE(REQUEST_POST('reason')); - $content['points'] = bigintval(REQUEST_POST('points')); + $content['text'] = SQL_ESCAPE(postRequestElement('reason')); + $content['points'] = bigintval(postRequestElement('points')); // Load email and send it away - $message = LOAD_EMAIL_TEMPLATE('sub-points', $content, bigintval(REQUEST_GET('uid'))); + $message = loadEmailTemplate('sub-points', $content, bigintval(getRequestElement('userid'))); sendEmail($content['email'], getMessage('ADMIN_SUB_SUBJ'), $message); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_SUBTRACTED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_SUBTRACTED')); } else { - // @TODO Rewrite these constants - define('__USER_VALUE', "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>"); - define('__UID', bigintval(REQUEST_GET('uid'))); + // Prepare content + $content['user'] = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>"; + $content['userid'] = bigintval(getRequestElement('userid')); // Load form - LOAD_TEMPLATE('admin_sub_points'); + loadTemplate('admin_sub_points', false, $content); } } else { // User not found! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>"); } // Free result SQL_FREERESULT($result); } else { // Output selection form with all confirmed user accounts listed - ADD_MEMBER_SELECTION_BOX('0', true); + addMemberSelectionBox('0', true); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index 7db1aaf511..6818b12e48 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,22 +37,21 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is the 'url_id' set? -if (REQUEST_ISSET_GET(('url_id'))) { +if (isGetRequestElementSet(('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` + $result = SQL_QUERY_ESC("SELECT `userid`,`count` AS `total_visits`, UNIX_TIMESTAMP(`last_surfed`) AS `last_surfed` +FROM `{?_MYSQL_PREFIX?}_surfbar_stats` WHERE `url_id`=%s ORDER BY `userid` ASC", - array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('url_id'))), __FILE__, __LINE__); // Entries found? if (SQL_NUMROWS($result) > 0) { @@ -65,11 +64,11 @@ ORDER BY `userid` ASC", // "Translate" some data $content['userid'] = generateUserProfileLink($content['userid']); $content['total_visits'] = translateComma($content['total_visits']); - $content['last_online'] = generateDateTime($content['last_online'], '2'); + $content['last_surfed'] = generateDateTime($content['last_surfed'], '2'); $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE("admin_surfbar_url_stats_row", true, $content); + $OUT .= loadTemplate('admin_surfbar_url_stats_row', true, $content); $cnt++; $SW = 3 - $SW; } // END - while @@ -82,17 +81,21 @@ ORDER BY `userid` ASC", // Load main template - LOAD_TEMPLATE("admin_surfbar_url_stats", false, $content); + loadTemplate('admin_surfbar_url_stats', false, $content); } else { // No statistics so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URL_STATS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URL_STATS')); } } 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` -GROUP BY `userid` -ORDER BY `userid` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT + `userid`, COUNT(`url_id`) AS `visited_urls`, SUM(`count`) AS `total_visits` +FROM + `{?_MYSQL_PREFIX?}_surfbar_stats` +GROUP BY + `userid` +ORDER BY + `userid` ASC", __FILE__, __LINE__); // Entries found? if (SQL_NUMROWS($result) > 0) { @@ -110,7 +113,7 @@ ORDER BY `userid` ASC", __FILE__, __LINE__); $content['sw'] = $SW; // Load row template - $OUT .= LOAD_TEMPLATE("admin_surfbar_stats_row", true, $content); + $OUT .= loadTemplate('admin_surfbar_stats_row', true, $content); $SW = 3 - $SW; } // END - while @@ -123,10 +126,10 @@ ORDER BY `userid` ASC", __FILE__, __LINE__); // Load main template - LOAD_TEMPLATE("admin_surfbar_stats", false, $content); + loadTemplate('admin_surfbar_stats', false, $content); } else { // No statistics so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_STATS')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_STATS')); } } diff --git a/inc/modules/admin/what-theme_check.php b/inc/modules/admin/what-theme_check.php index f7023c2402..4dd8d5b418 100644 --- a/inc/modules/admin/what-theme_check.php +++ b/inc/modules/admin/what-theme_check.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Normally we want the overview of all registered theme_check $mode = 'overview'; @@ -55,7 +54,7 @@ $response = sendGetRequest('check-themes.php'); // Are theme_check found? if (($response[count($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) { // Ok, mark found and create the array - $THEMES = array( + $themes = array( 'fname' => array(), // File names 'fsize' => array(), // File size 'fctime' => array(), // File creation timestamp @@ -76,84 +75,85 @@ if (($response[count($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) { $ver = trim(substr($response[$idx + 3], 4)); // Load version - $cver = THEME_GET_VERSION($name); + $cver = getThemeVersion($name); // Is the theme already installed or not? if (($ver != $cver) && ($cver != '?') && ($cver != '!')) { // No, it isn't. So let's add this one! - $THEMES['fname'][] = $name; - $THEMES['fsize'][] = $response[$idx + 1]; - $THEMES['fctime'][] = $response[$idx + 2]; - $THEMES['ver'][] = $ver; - $THEMES['cver'][] = $cver; + $themes['fname'][] = $name; + $themes['fsize'][] = $response[$idx + 1]; + $themes['fctime'][] = $response[$idx + 2]; + $themes['ver'][] = $ver; + $themes['cver'][] = $cver; // Extract language strings from reponse - $LANG_DUMMY = explode("[nl]", $response[$idx + 4]); - $LANG = array(); - $INFO = getMessage('ADMIN_EXT_NO_INFO_FOUND'); + $langDummy = explode('[nl]', $response[$idx + 4]); + $languages = array(); + $themeInfo = getMessage('ADMIN_EXT_NO_INFO_FOUND'); // Trim every data line - foreach ($LANG_DUMMY as $k => $v) { + foreach ($langDummy as $k => $v) { $v = trim($v); if (substr($v, 3) == '') $v = '---'; - $LANG_DUMMY[$k] = $v; - if ($v == "xx:xx") break; - $LANG[] = $v; + $langDummy[$k] = $v; + if ($v == 'xx:xx') break; + $languages[] = $v; } // END - foreach // If language is found stop searching on matching line - foreach($LANG as $search) { - if (substr($search, 0, 3) == (getLanguage().':')) { $INFO = substr($search, 3); break; } + foreach($languages as $search) { + if (substr($search, 0, 3) == (getLanguage().':')) { $themeInfo = substr($search, 3); break; } } // END - foreach // Add informations to array - $THEMES['infos'][] = $INFO; + $themes['infos'][] = $themeInfo; } // END - if } // END - if } // END - foreach // Ok, themes are on our server but maybe you have already installed them? - if (count($THEMES['fname']) > 0) { + if (count($themes['fname']) > 0) { // Sort array (I missed ver and cver here) - array_pk_sort($THEMES, array("cver", "fname"), 0, 1); + array_pk_sort($themes, array('cver', 'fname'), 0, 1); // Extensions where found which are not downloaded and installed - $OUT = ''; $SW = 2; $TSIZE = 0; - foreach ($THEMES['fname'] as $idx => $name) { - // Generate download link - $LINK = SERVER_URL."/themes/theme-".$name.".zip"; - - // @TODO Move this HTML code to a template "admin_theme_row" - $OUT .= "<tr> - <td align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".($idx + 1).".</td> - <td align=\"center\" class=\"switch_sw".$SW." bottom2 right2\"><a href=\"".$LINK."\">".$name."</a></td> - <td align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".generateDateTime($THEMES['fctime'][$idx], '2')."</td> - <td align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".translateComma(round($THEMES['fsize'][$idx] / 1.024) / 1000)." ".KBYTES."</td> - <td align=\"center\" class=\"switch_sw".$SW." bottom2\">".$THEMES['ver'][$idx]." (".$THEMES['cver'][$idx].")</td> -</tr> -<tr> - <td class=\"switch_sw".$SW." bottom2\"> </td> - <td colspan=\"4\" class=\"switch_sw".$SW." bottom2\"> - <div class=\"tiny\">".$THEMES['infos'][$idx]."</div> - </td> -</tr>\n"; - $TSIZE += $THEMES['fsize'][$idx]; + $OUT = ''; $SW = 2; $totalSize = 0; + foreach ($themes['fname'] as $idx => $name) { + // Prepare data + $content = array( + 'sw' => $SW, + 'index' => ($idx + 1), + 'name' => $name, + 'created' => generateDateTime($themes['fctime'][$idx], '2'), + 'size' => translateComma(round($themes['fsize'][$idx] / 1.024) / 1000), + 'version' => $themes['ver'][$idx], + 'current' => $themes['cver'][$idx], + 'infos' => $themes['infos'][$idx], + ); + + // Load row template + $OUT .= loadTemplate('admin_list_theme_row', true, $content); + + // Add total size + $totalSize += $themes['fsize'][$idx]; + + // Switch color $SW = 3 - $SW; } - define('__THEMES_ROWS', $OUT); - define('__TKBYTES_VALUE', translateComma(round($TSIZE / 1.024) / 1000)); - define('__TTHEME_VALUE', count($THEMES['fname'])); + $content['rows'] = $OUT; + $content['total'] = count($themes['fname']); + $content['kbytes'] = translateComma(round($totalSize / 1.024) / 1000); // Load template - LOAD_TEMPLATE("admin_theme_list"); + loadTemplate('admin_list_theme', false, $content); } else { // All Themes are downloaded and installed - LOAD_TEMPLATE("admin_theme_installed", false, $count); + loadTemplate('admin_theme_installed', false, $count); } } else { // No theme where found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_THEME_NOTHING_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_THEME_NOTHING_FOUND')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index baf8be84e4..da8e61225e 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,36 +37,37 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('theme')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('theme')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('theme')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + return; +} // END - if // Check for selected themes $SEL = 0; -if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection(); +if (isPostRequestElementSet('sel')) $SEL = countPostSelection(); if ($SEL > 0) { $OUT = ''; - foreach (REQUEST_POST('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { $sql = ''; // Shall I de-/activate or delete themes? - if (REQUEST_ISSET_POST(('status'))) { + if (isPostRequestElementSet(('status'))) { // Change status - if (REQUEST_POST('active', $id) == 'Y') { - $sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE `id`='".$id."' LIMIT 1"; + if (postRequestElement('active', $id) == 'Y') { + $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 = getMessage('ADMIN_THEMES_UPDATED'); - } elseif (REQUEST_ISSET_POST('del')) { + } elseif (isPostRequestElementSet('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 = getMessage('ADMIN_THEMES_DELETED'); } @@ -76,25 +77,25 @@ if ($SEL > 0) { $result = SQL_QUERY($sql, __FILE__, __LINE__); // Rebuild cache - rebuildCacheFiles("themes", "them"); + rebuildCacheFile('themes', 'them'); } // END - if } // Output generated? if (empty($OUT)) $OUT = getMessage('ADMIN_THEME_NO_OUTPUT'); -} elseif (REQUEST_ISSET_GET(('default_theme'))) { +} elseif (isGetRequestElementSet(('default_theme'))) { // Escape string from input - $POST['default_theme'] = REQUEST_GET(('default_theme')); + $postData['default_theme'] = getRequestElement('default_theme'); // Set session - setSession('mxchange_theme', $POST['default_theme']); + setTheme($postData['default_theme']); // Set it in config and current theme as well - $GLOBALS['curr_theme'] = $POST['default_theme']; - setConfigEntry('default_theme', $POST['default_theme']); + $GLOBALS['curr_theme'] = $postData['default_theme']; + setConfigEntry('default_theme', $postData['default_theme']); // Save theme - ADMIN_SAVE_SETTINGS($POST); + adminSaveSettings($postData); } // Switch to testing mode @@ -102,14 +103,14 @@ $GLOBALS['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 ($content = SQL_FETCHARRAY($result)) { // Construct IFN - $INC = sprintf("theme/%s/theme.php", $content['theme_path']); + $inc = sprintf("theme/%s/theme.php", $content['theme_path']); // Load theme in test mode - loadInclude($INC); + loadInclude($inc); // Is the loaded theme name != current theme name? $LINK = $content['theme_path']; @@ -124,13 +125,13 @@ if (SQL_NUMROWS($result) > 0) { 'name' => $content['theme_name'], 'is_act' => translateYesNo($content['theme_active']), 'email' => "<a href=\"mailto:".$GLOBALS['theme_data']['email']."?Subject=[Theme:] ".$GLOBALS['theme_data']['name']." (".$content['theme_path'].")'.'\">".$GLOBALS['theme_data']['author']."</a>", - 'url_link' => DEREFERER($GLOBALS['theme_data']['url']), + 'url_link' => generateDerefererUrl($GLOBALS['theme_data']['url']), 'url_title' => $GLOBALS['theme_data']['url'], 'ver' => $content['theme_ver'], ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_theme_edit_row", true, $content); + $OUT .= loadTemplate('admin_theme_edit_row', true, $content); $SW = 3 - $SW; } @@ -140,15 +141,13 @@ if (SQL_NUMROWS($result) > 0) { // No themes found??? $OUT .= "<tr> <td colspan=\"7\" class=\"bottom2\" height=\"60\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))." + ".loadTemplate('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))." </td> </tr>\n"; } -define('__THEME_LIST', $OUT); - // Load template -LOAD_TEMPLATE("admin_theme_edit"); +loadTemplate('admin_theme_edit', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 11061669b6..f783bd04a9 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,57 +37,58 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('theme')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('theme')); - return; -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); + +if (!isExtensionActive('theme')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + return; +} // END - if // Switch to testing mode $GLOBALS['theme_mode'] = 'test'; // Import selected theme if not present -if (REQUEST_ISSET_POST('theme')) { +if (isPostRequestElementSet('theme')) { // Check if theme is there - if (!ifThemeExists(REQUEST_POST('theme'))) { + if (!ifThemeExists(postRequestElement('theme'))) { // Import theme - $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE(REQUEST_POST('theme'))); + $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE(postRequestElement('theme'))); // Is the theme readable? - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // Load the theme header file - loadInclude($INC); + loadInclude($inc); // 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( - REQUEST_POST('theme'), + postRequestElement('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name'] ), __FILE__, __LINE__); // Destroy cache - rebuildCacheFiles('themes', 'them'); + rebuildCacheFile('themes', 'them'); // Prepare message - $message = sprintf(getMessage('ADMIN_THEME_IMPORTED'), REQUEST_POST('theme')); + $message = sprintf(getMessage('ADMIN_THEME_IMPORTED'), postRequestElement('theme')); } else { // Include file not found! - $message = sprintf(getMessage('ADMIN_THEME_INC_404'), REQUEST_POST('theme')); + $message = sprintf(getMessage('ADMIN_THEME_INC_404'), postRequestElement('theme')); } } else { // Theme already imported - $message = sprintf(getMessage('ADMIN_THEME_ALREADY_INSTALLED'), REQUEST_POST('theme')); + $message = sprintf(getMessage('ADMIN_THEME_ALREADY_INSTALLED'), postRequestElement('theme')); } // Output message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if // Initialize array @@ -104,12 +105,12 @@ $THEMES = array( $includes = getArrayFromDirectory('theme/', '', false, true, array('css', 'images')); // Walk through all entries and add it -foreach ($includes as $INC) { +foreach ($includes as $inc) { // Get directory from it - $dir = basename(dirname($INC)); + $dir = basename(dirname($inc)); // Load include file - loadInclude($INC); + loadInclude($inc); // Add found theme to array $THEMES['theme_unix'][] = $dir; @@ -132,7 +133,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { // Check if current theme is already imported or not if (!ifThemeExists($unix)) { // Theme not installed - $formContent = LOAD_TEMPLATE('admin_theme_import_form', true, $unix); + $formContent = loadTemplate('admin_theme_import_form', true, $unix); } // END - if // Prepare content @@ -142,14 +143,14 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { 'name' => $THEMES['theme_name'][$key], 'email' => $THEMES['theme_email'][$key], 'author' => $THEMES['theme_author'][$key], - 'link' => DEREFERER($THEMES['theme_url'][$key]), + 'link' => generateDerefererUrl($THEMES['theme_url'][$key]), 'url' => $THEMES['theme_url'][$key], 'version' => $THEMES['theme_ver'][$key], 'form' => $formContent ); // Add row template - $OUT .= LOAD_TEMPLATE('admin_theme_import_row', true, $content); + $OUT .= loadTemplate('admin_theme_import_row', true, $content); // Switch color $SW = 3 - $SW; @@ -157,14 +158,11 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { if (empty($OUT)) { // No themes found??? - $OUT .= LOAD_TEMPLATE('admin_theme_import_none', true, LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))); + $OUT .= loadTemplate('admin_theme_import_none', true, loadTemplate('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))); } // END - if -// Set the generated list -define('__THEME_LIST', $OUT); - // Load template -LOAD_TEMPLATE('admin_theme_import'); +loadTemplate('admin_theme_import', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index e264875512..de718c1dc3 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,38 +37,41 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Define some variables 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` -WHERE `data_type`='ADMIN' -ORDER BY `timestamp` ASC", __FILE__, __LINE__); +$result_main = SQL_QUERY("SELECT + `id`,`sender`,`subject`,`payment_id` AS `payment`,`timestamp`,`url`,`target_send`,`cat_id` AS category +FROM + `{?_MYSQL_PREFIX?}_pool` +WHERE + `data_type`='ADMIN' +ORDER BY + `timestamp` ASC", __FILE__, __LINE__); -if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST('lock'))) { +if ((SQL_NUMROWS($result_main) > 0) || (isPostRequestElementSet('lock'))) { // Count checked checkboxes $SEL = 0; - if (REQUEST_ISSET_POST('sel')) { + if (isPostRequestElementSet('sel')) { // Are there checked boxes? - if (count(REQUEST_POST('sel')) > 0) { + if (count(postRequestElement('sel')) > 0) { // Count now... We use an own function for now $SEL = countPostSelection(); } // END - if } // END - if - if (REQUEST_ISSET_POST('accept')) { + if (isPostRequestElementSet('accept')) { if ($SEL > 0) { // Accept mail orders - foreach (REQUEST_POST('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure ID number $id = bigintval($id); @@ -76,9 +79,9 @@ if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST('lock'))) { $result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment, po.payment_id FROM - `{!_MYSQL_PREFIX!}_pool` AS po + `{?_MYSQL_PREFIX?}_pool` AS po INNER JOIN - `{!_MYSQL_PREFIX!}_payments` AS pay + `{?_MYSQL_PREFIX?}_payments` AS pay ON po.payment_id=pay.id WHERE @@ -95,29 +98,30 @@ LIMIT 1", SQL_FREERESULT($result); // Is the surfbar installed? - if ((EXT_IS_ACTIVE('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { + // @TODO Rewrite these if-blocks to a filter + if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { // Then "migrate" the URL to the surfbar SURFBAR_ADMIN_MIGRATE_URL($DATA['url'], $DATA['sender']); } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus - if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) { + if ((getExtensionVersion('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 - BONUS_POINTS_HANDLER(getConfig('bonus_order')); + handleBonusPoints(getConfig('bonus_order')); } // END - if // Load email template - $message_user = LOAD_EMAIL_TEMPLATE('order-accept', array(), $DATA['sender']); + $message_user = loadEmailTemplate('order-accept', array(), $DATA['sender']); // Send email sendEmail($DATA['sender'], MEMBER_ORDER_ACCEPTED, $message_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,17 +134,17 @@ LIMIT 1", } // Mails unlocked for mail delivery - LOAD_TEMPLATE('admin_settings_saved', false, $message); - } elseif (REQUEST_ISSET_POST(('reject'))) { + loadTemplate('admin_settings_saved', false, $message); + } elseif (isPostRequestElementSet(('reject'))) { if ($SEL > 0) { // Reject mail orders $OUT = ''; $SW = 2; - foreach (REQUEST_POST('sel') as $id => $value) { + foreach (postRequestElement('sel') as $id => $value) { // Secure ID number $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 @@ -150,47 +154,46 @@ LIMIT 1", SQL_FREERESULT($result); // Load email template and send it away - $message_user = LOAD_EMAIL_TEMPLATE('order-reject', array(), $DATA['sender']); + $message_user = loadEmailTemplate('order-reject', array(), $DATA['sender']); sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!REQUEST_ISSET_POST(('redirect'))) || (REQUEST_POST('redirect') == 'http://')) REQUEST_SET_POST('redirect', getConfig('URL')); + if ((!isPostRequestElementSet(('redirect'))) || (postRequestElement('redirect') == 'http://')) setRequestPostElement('redirect', getConfig('URL')); // Redirect URL - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", - array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", + array(postRequestElement('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( 'sw' => $SW, 'id' => $id, - 'url' => REQUEST_POST('url', $id), + 'url' => postRequestElement('url', $id), ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_unlock_emails_redir_row', true, $content); + $OUT .= loadTemplate('admin_unlock_emails_redir_row', true, $content); $SW = 3 - $SW; } - define('__URL_ROWS', $OUT); // Load main template - LOAD_TEMPLATE('admin_unlock_emails_redir'); + loadTemplate('admin_unlock_emails_redir', false, $OUT); } else { // Nothing selected - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); } - } elseif ((REQUEST_ISSET_POST('lock')) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) { + } elseif ((isPostRequestElementSet('lock')) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) { // Lock URLs - foreach (REQUEST_POST('sel') as $id => $url) { + foreach (postRequestElement('sel') as $id => $url) { // Secure id number $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 @@ -199,55 +202,53 @@ LIMIT 1", } // END - foreach // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED')); - } elseif ((!REQUEST_ISSET_POST('lock')) && (!REQUEST_ISSET_POST('accept')) && (!REQUEST_ISSET_POST(('reject'))) && (getConfig('url_blacklist') == 'Y')) { + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED')); + } elseif ((!isPostRequestElementSet('lock')) && (!isPostRequestElementSet('accept')) && (!isPostRequestElementSet(('reject'))) && (getConfig('url_blacklist') == 'Y')) { // Mail orders are in pool so we can display them $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_main)) { // Prepare data for the template + // @TODO Rewrite in template: subj->subject,ordered->timestamp,tsend->target_send $content = array( 'sw' => $SW, 'id' => $content['id'], 'sender' => $content['sender'], 'u_link' => generateUserProfileLink($content['sender']), - 'subj' => COMPILE_CODE($content['subject']), - 'tester' => FRAMETESTER($content['url']), + 'subj' => $content['subject'], + 'tester' => generateFrametesterUrl($content['url']), 'url' => $content['url'], - 'cat_title' => str_replace("\"", """, getCategory($content['category'])), + 'cat_title' => str_replace("\"", '"', getCategory($content['category'])), 'cat_link' => $content['category'], - 'pay_title' => str_replace("\"", """, getPaymentTitlePrice($content['payment'], true)), + 'pay_title' => str_replace("\"", '"', getPaymentTitlePrice($content['payment'], true)), 'pay_link' => $content['payment'], 'ordered' => generateDateTime($content['timestamp'], '2'), 'tsend' => $content['target_send'], ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_unlock_emails_row', true, $content); + $OUT .= loadTemplate('admin_unlock_emails_row', true, $content); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result_main); - define('__UNLOCK_ROWS', $OUT); - // Prepare rejection URL - $REJECT = 'http://'; - if (GET_EXT_VERSION('other') >= '0.1.6') $REJECT = getConfig('reject_url'); - define('__REJECT_URL', $REJECT); + // Remember in array + $content['rows'] = $OUT; // Load main template - LOAD_TEMPLATE('admin_unlock_emails'); - } elseif ((REQUEST_ISSET_POST('lock')) && (getConfig('url_blacklist') != 'Y')) { + loadTemplate('admin_unlock_emails', false, $content); + } elseif ((isPostRequestElementSet('lock')) && (getConfig('url_blacklist') != 'Y')) { // URL blacklist not activated - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); } else { // Wrong call! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL')); } } else { // No mail orders fond - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 16eecaa2bb..1684b2ae8a 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,20 +37,19 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Check if admin has submitted form if (isFormSent()) { // Does he have selected at least one sponsor? - if (countSelection(REQUEST_POST('id')) > 0) { + if (countSelection(postRequestElement('id')) > 0) { // At least one entry selected - foreach (REQUEST_POST('id') as $id => $selected) { + foreach (postRequestElement('id') as $id => $selected) { // Secure ID number and init $content $content = array( 'id' => bigintval($id), @@ -59,7 +58,7 @@ if (isFormSent()) { // 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($content['id']), __FILE__, __LINE__); @@ -68,10 +67,10 @@ WHERE `status`='PENDING' AND id='%s' LIMIT 1", $content = SQL_FETCHARRAY($result_main); // Check for open payments and close them - $result = SQL_QUERY_ESC("SELECT DISTINCT so.aid, so.pay_count, so.pay_ordered, so.pay_status, + $result = SQL_QUERY_ESC("SELECT so.admin_id, 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", @@ -84,25 +83,25 @@ ORDER BY sp.pay_name", // Set default email $content['email'] = getMessage('SPONSOR_NO_ADMIN'); - if ($content['aid'] > '0') { + if ($content['admin_id'] > '0') { // Load admin's email address for contact - $content['email'] = getAdminEmail($content['aid']); + $content['email'] = getAdminEmail($content['admin_id']); } // END - if // Transfer data to array $data = array( - 'aid' => $content['email'], + 'admin_id' => $content['email'], 'order' => ($content['pay_count'] * $content['pay_rate'])." ".$content['pay_currency'], 'stamp' => generateDateTime($content['pay_ordered'], '2'), 'pname' => $content['pay_name'], ); // Load email template - $content['msg'] = LOAD_EMAIL_TEMPLATE("sponsor_unlock_sponsor_pay", $data, $content['id']); + $content['message'] = loadEmailTemplate('sponsor_unlock_sponsor_pay', $data, $content['id']); } } else { // No payments found - $content['msg'] = getMessage('SPONSOR_NO_PAYMENTS_FOUND'); + $content['message'] = getMessage('SPONSOR_NO_PAYMENTS_FOUND'); } // Free memory @@ -113,24 +112,28 @@ 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($content['id']), __FILE__, __LINE__); // Update, if applyable, referal count and points if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) { // Update referal account - 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($content['refid'])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE + `{?_MYSQL_PREFIX?}_sponsor_data` +SET + `points_amount`=`points_amount`+{?sponsor_ref_points?}, `ref_count`=`ref_count`+1 +WHERE + `id`='%s' +LIMIT 1", + array(bigintval($content['refid'])), __FILE__, __LINE__); // Whas that update fine? if (SQL_AFFECTEDROWS() == 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($content['refid'])), __FILE__, __LINE__); $REFERRAL = SQL_FETCHARRAY($result); @@ -143,7 +146,7 @@ WHERE `id`='%s' LIMIT 1", $REFERRAL['gender'] = translateGender($REFERRAL['gender']); // Send notification to referal - $REF_MSG = LOAD_EMAIL_TEMPLATE("sponsor_ref_notify", $REFERRAL); + $REF_MSG = loadEmailTemplate('sponsor_ref_notify', $REFERRAL); sendEmail($REFERRAL['email'], getMessage('SPONSOR_REF_NOTIFY_SUBJ'), $REF_MSG); } @@ -158,23 +161,23 @@ WHERE `id`='%s' LIMIT 1", $content['points'] = translateComma($content['points_amount']); // So let's send the email away - $message = LOAD_EMAIL_TEMPLATE('sponsor_unlocked', $content); + $message = loadEmailTemplate('sponsor_unlocked', $content); sendEmail($content['email'], getMessage('SPONSOR_UNLOCKED_SUBJ'), $message); } } else { // Nothing selected - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK')); } // Add seperator - OUTPUT_HTML('<br />'); + outputHtml('<br />'); } // 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` + `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='PENDING' ORDER BY @@ -198,20 +201,19 @@ if (SQL_NUMROWS($result) > 0) { ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('admin_unlock_sponsor_row', true, $content); + $OUT .= loadTemplate('admin_unlock_sponsor_row', true, $content); $SW = 3 - $SW; } - define('__SPONSOR_ROWS', $OUT); // Load template - LOAD_TEMPLATE('admin_unlock_sponsor'); + loadTemplate('admin_unlock_sponsor', false, $OUT); } else { // No pending accounts found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_PENDING')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_PENDING')); } // Free memory SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index 56ac755543..104e443f0f 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,40 +37,43 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is the form sent? -if ((REQUEST_ISSET_POST(('unlock'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) { +if ((isPostRequestElementSet(('unlock'))) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { // Unlock selected URLs - if (SURFBAR_ADMIN_UNLOCK_URL_IDS(REQUEST_POST('id'))) { + if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestElement('id'))) { // Unlock done! :-) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); } else { // Unlock failed! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED')); } -} elseif ((REQUEST_ISSET_POST(('reject'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) { +} elseif ((isPostRequestElementSet(('reject'))) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { // Reject selected URLs - if (SURFBAR_ADMIN_REJECT_URL_IDS(REQUEST_POST('id'))) { + if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestElement('id'))) { // Unlock done! :-) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); } else { // Unlock failed! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED')); } } // List all URLs -$result = SQL_QUERY("SELECT id, userid, url, UNIX_TIMESTAMP(registered) AS registered -FROM `{!_MYSQL_PREFIX!}_surfbar_urls` -WHERE `status`='PENDING' -ORDER BY `id` ASC", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT + `id`, `userid`, `url`, UNIX_TIMESTAMP(`registered`) AS registered +FROM + `{?_MYSQL_PREFIX?}_surfbar_urls` +WHERE + `status`='PENDING' +ORDER BY + `id` ASC", __FILE__, __LINE__); // Do we have some URLs left? if (SQL_NUMROWS($result) > 0) { @@ -80,25 +83,25 @@ if (SQL_NUMROWS($result) > 0) { // "Translate"/add content $content['sw'] = $SW; $content['userid'] = generateUserProfileLink($content['userid']); - $content['framekiller'] = FRAMETESTER($content['url']); + $content['framekiller'] = generateFrametesterUrl($content['url']); $content['registered'] = generateDateTime($content['registered'], 2); // Load row template - $OUT .= LOAD_TEMPLATE("admin_unlock_surfbar_urls_row", true, $content); + $OUT .= loadTemplate('admin_unlock_surfbar_urls_row', true, $content); // Switch color $SW = 3 - $SW; } // END - while // Load main template - LOAD_TEMPLATE("admin_unlock_surfbar_urls", false, $OUT); + loadTemplate('admin_unlock_surfbar_urls', false, $OUT); } else { // No URLs in surfbar - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND')); } // Free result SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 14aba0e9a7..96de642c72 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,13 +37,12 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Init array $ONLINE['code'] = '???'; @@ -56,7 +55,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ $response = array('', '', ''); } else { // Analyse header for response code - if (eregi("200 OK", $response[0])) { + if (eregi('200 OK', $response[0])) { // Found, kill header $pos = 0; foreach($response as $k => $v) { @@ -79,46 +78,8 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ 'version' => str_replace("\n", '', $response[0]), 'changed' => str_replace("\n", '', $response[1]), 'revision' => str_replace("\n", '', $response[2]), + 'code' => '200 OK' ); - - // Array for available patches - $PATCHES = array( - 'fname' => array(), - 'fsize' => array(), - 'ctime' => array() - ); - - if (($response[3] != "[EOF]") && ($ONLINE['version'] == getConfig('FULL_VERSION'))) { - // We have found new patches (newer than FULL_VERSION) - $max = str_replace("\n", '', $response[count($response) - 2]); $totalSize = 0; - - // Maximum of available pacthes extracted (above). Now we can get all informations - for ($idx = 0; $idx < $max; $idx++) { - // List only newer patches - $TEST = substr(str_replace("\n", '', $response[$idx * 5 + 2]), 0, strlen(getConfig('patch_level'))); - - // I have removed the addional test for the stored timemark in database or you cannot find - // new updates on my server when you haven't installed it before I upload a patch... :-( - if (bigintval($TEST) > getConfig(('patch_level'))) { - // Copy every data from the response array - $PATCHES['fname'][] = str_replace("\n", '', $response[$idx * 5 + 2]); - $PATCHES['fsize'][] = str_replace("\n", '', $response[$idx * 5 + 3]); - $PATCHES['ctime'][] = str_replace("\n", '', $response[$idx * 5 + 4]); - switch (getLanguage()) { - case 'de': $PATCHES['descr'][] = str_replace("\n", '', $response[$idx * 5 + 5]); break; // Load german description - default : $PATCHES['descr'][] = str_replace("\n", '', $response[$idx * 5 + 6]); break; // Load english description as default - } - - // Add patch's size to total - $totalSize += $PATCHES['fsize'][$idx]; - } - } - - array_pk_sort($PATCHES, array("ctime", "fname")); - - // All done here! - $ONLINE['code'] = "200 OK"; - } } else { // 404 / 403 error from server $ONLINE['code'] = $response[0]; @@ -128,19 +89,17 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ // Is a newer version available? if (empty($ONLINE['version'])) { // Disconnected? - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>"); } elseif (($ONLINE['version'] != getConfig('FULL_VERSION')) || ($ONLINE['revision'] != getConfig('CURR_SVN_REVISION'))) { // New full-version available (all previous released patches are included in this version!) - define('__ONLINE_VERSION', $ONLINE['version']); - define('__ONLINE_CHANGE' , generateDateTime($ONLINE['changed'], '2')); - define('__ONLINE_REVISION', $ONLINE['revision']); + $ONLINE['changed'] = generateDateTime($ONLINE['changed'], '2'); // Load template - LOAD_TEMPLATE('admin_update_download'); + loadTemplate('admin_update_download', false, $ONLINE); } else { // You have the latest version! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NO_UPDATES_AVAILABLE')); + loadTemplate('admin_settings_saved', false, getMessage('NO_UPDATES_AVAILABLE')); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 97b0e6f1b6..a2b8eb36a5 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,41 +37,40 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Base directory (should be moved to database) $usage = getConfig('usage_base') . '/'; -if (REQUEST_ISSET_GET('image')) { - if (REQUEST_GET('type') == 'usage') { +if (isGetRequestElementSet('image')) { + if (getRequestElement('type') == 'usage') { $FQFN = sprintf("%s%s/usage.png", getConfig('PATH'), getConfig('usage_base') ); } else { - if (strpos(REQUEST_GET('image'), "\\") > 0) REQUEST_SET_GET('image', substr(REQUEST_GET('image'), 0, strpos(REQUEST_GET('image'), "\\"))); + if (strpos(getRequestElement('image'), "\\") > 0) setRequestGetElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); $FQFN = sprintf("%s%s/%s_usage_%s.png", getConfig('PATH'), getConfig('usage_base'), - REQUEST_GET('type'), - REQUEST_GET('image') + getRequestElement('type'), + getRequestElement('image') ); } if (isFileReadable($FQFN)) { $image = imagecreatefrompng($FQFN); - sendHeader('Content-type: image/png'); + sendHeader('Content-Type: image/png'); imagepng($image); imagedestroy($image); } shutdown(); -} elseif (!REQUEST_ISSET_GET('usage')) { +} elseif (!isGetRequestElementSet('usage')) { $FQFN = sprintf("%s%s/index.html", getConfig('PATH'), getConfig('usage_base') @@ -80,16 +79,13 @@ if (REQUEST_ISSET_GET('image')) { $FQFN = sprintf("%s%s/usage_%s.html", getConfig('PATH'), getConfig('usage_base'), - REQUEST_GET('usage') + getRequestElement('usage') ); } if ((!empty($FQFN)) && (isFileReadable($FQFN))) { - // @TODO This code is double, see LOAD_TEMPLATE and LOAD_EMAIL_TEMPLATE in functions.php - $tmpl_file = readFromFile($FQFN); - $tmpl_file = SQL_ESCAPE($tmpl_file); - $tmpl_file = "\$content=\"".$tmpl_file."\";"; - eval($tmpl_file); + // @TODO This code is double, see LOAD_TEMPLATE and loadEmailTemplate in functions.php + eval("\$content=\"".SQL_ESCAPE(readFromFile($FQFN))."\";"); // Until here... // Replace URLs @@ -99,7 +95,7 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) { $content = str_replace('ctry_usage_' , '{?URL?}/modules.php?module=admin&what='.getWhat().'&type=ctry&image=' , $content); $content = str_replace('usage_' , '{?URL?}/modules.php?module=admin&what='.getWhat().'&usage=' , str_replace('.html', '', $content)); - // Disabled due to too much trouble + // @TODO Disabled due to too much trouble //$content = str_replace("HREF=\"http://", "href=\"{?URL?}/modules.php?module=loader&url=http://", $content); $test = strtolower($content); @@ -111,10 +107,10 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) { } // END - if // Output code - OUTPUT_HTML($content); + outputHtml($content); } else { // Nothing to load, then we have no directory 'usage' - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base'))); } // diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 0124834861..fe0b2bb582 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,18 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Is a user id given? -if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { +if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 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", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Is a user account found? if (SQL_NUMROWS($result) == 1) { @@ -57,32 +56,32 @@ if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { $content = SQL_FETCHARRAY($result); // Including user ID - $content['uid'] = bigintval(REQUEST_GET('uid')); + $content['userid'] = bigintval(getRequestElement('userid')); // Shall we send the email? if (isFormSent()) { // Insert text - $content['text'] = trim(strip_tags(REQUEST_POST('text'))); + $content['text'] = trim(secureString(postRequestElement('text'))); // Send contact form out - $message = LOAD_EMAIL_TEMPLATE('member_contct', $content); + $message = loadEmailTemplate('member_contct', $content); sendEmail($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $message); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); } else { // Load contact form template - LOAD_TEMPLATE('admin_contct_user_form', false, $content); + loadTemplate('admin_contct_user_form', false, $content); } } else { // Not found? - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('USER_ACCOUNT_404'), bigintval(REQUEST_GET('uid')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('USER_ACCOUNT_404'), bigintval(getRequestElement('userid')))); } // Free result SQL_FREERESULT($result); } else { // Display selection box - ADD_MEMBER_SELECTION_BOX(); + addMemberSelectionBox(); } -// +// [EOF] ?> diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index 404bf3f0c1..eb9e1dbb93 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,35 +37,30 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // Online stats are only working if extension ext-online is installed -if (EXT_IS_ACTIVE('online')) { +if (isExtensionActive('online')) { // Count guests, members and admins - // @TODO Rewrite these constants // @TODO Add a filter for sponsor - define('_GUESTS_ONLINE' , GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'")); - define('_ADMINS_ONLINE' , GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'")); - define('_MEMBERS_ONLINE', GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true)); + $content['guests_online'] = countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'"); + $content['admins_online'] = countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'"); + $content['members_online'] = countSumTotalData('N', 'online', 'id', 'is_admin', true); // Load template - LOAD_TEMPLATE('admin_mini_online'); + loadTemplate('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 - LOAD_TEMPLATE('admin_online_header'); - // List all online users - $SW = 2; + $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Fix empty action/what if (empty($content['action'])) $content['action'] = '---'; @@ -74,7 +69,7 @@ if (EXT_IS_ACTIVE('online')) { if ($content['is_admin'] == 'Y') { // Is an administrator $content['userid'] = getMessage('_IS_ADMIN'); - } elseif (($content['is_member'] == 'N') && ($content['is_admin'] == 'N')) { + } elseif (($content['is_member'] != 'Y') && ($content['is_admin'] != 'Y')) { // Is a guest $content['userid'] = getMessage('_IS_GUEST'); } elseif ($content['userid'] > 0) { @@ -88,32 +83,29 @@ if (EXT_IS_ACTIVE('online')) { $content['refid'] = generateUserProfileLink($content['refid']); } // END - if - OUTPUT_HTML("<tr> - <td align=\"center\" width=\"5%\" class=\"switch_sw".$SW." bottom right\">".$content['id']."</td> - <td align=\"center\" width=\"15%\" class=\"switch_sw".$SW." bottom right\">".$content['userid']."</td> - <td align=\"center\" width=\"10%\" class=\"switch_sw".$SW." bottom right\">".$content['ip']."</td> - <td align=\"center\" width=\"5%\" class=\"switch_sw".$SW." bottom right\">".$content['refid']."</td> - <td align=\"center\" width=\"10%\" class=\"switch_sw".$SW." bottom right\">".$content['module']."</td> - <td align=\"center\" width=\"10%\" class=\"switch_sw".$SW." bottom right\">".$content['action']."</td> - <td align=\"center\" width=\"5%\" class=\"switch_sw".$SW." bottom right\">".$content['what']."</td> - <td align=\"center\" width=\"10%\" class=\"switch_sw".$SW." bottom\">".generateDateTime($content['timestamp'], '2')."</td> -</tr>"); + // Add more content + $content['sw'] = $SW; + $content['timestamp'] = generateDateTime($content['timestamp'], '2'); + + // Load row template and switch color + $OUT .= loadTemplate('admin_list_online_row', true, $content); $SW = 3 - $SW; } // END - while // Free memory SQL_FREERESULT($result); - // @TODO Rewrite this constant - define('__FANCY_ONLINE_TIMEOUT', createFancyTime(getConfig('online_timeout'))); + // Remember rows and fancy time in array + $content['rows'] = $OUT; + $content['online_timeout'] = createFancyTime(getConfig('online_timeout')); // Load footer template - LOAD_TEMPLATE('admin_online_footer'); + loadTemplate('admin_list_online', false, $content); } // END - if } else { // Online statistics deactivated! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ONLINE_STATISTICS_DEACTIVATED')); + loadTemplate('admin_settings_saved', false, getMessage('ONLINE_STATISTICS_DEACTIVATED')); } -// +// [EOF] ?> diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index a2330df0c2..526da23c4d 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Initial message part @@ -47,17 +46,17 @@ $message = "<strong>{--VALIDATING_LOGIN--}</strong>"; if (isUserIdSet() && (isSessionVariableSet('u_hash'))) { // Is 'theme' installed and activated? - if (EXT_IS_ACTIVE('theme')) { + if (isExtensionActive('theme')) { // Login failures are supported since 0.4.7 // Do we have 0.4.7 of sql_patches or later? $add = ''; - if (GET_EXT_VERSION('sql_patches') >= '0.6.1') { + if (getExtensionVersion('sql_patches') >= '0.6.1') { // Load them here $add = ", `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure"; } // 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(getUserId()), __FILE__, __LINE__); // Load data @@ -67,12 +66,12 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) { SQL_FREERESULT($result); // Change to new theme - setSession('mxchange_theme', $data['curr_theme']); + setTheme($data['curr_theme']); // Remmeber login failures if available - if (GET_EXT_VERSION('sql_patches') >= '0.6.1') { + if (getExtensionVersion('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", @@ -86,9 +85,9 @@ LIMIT 1", // Bonus is not given by default ;-) $bonus = false; - if ((GET_EXT_VERSION('sql_patches') >= '0.2.8') && (GET_EXT_VERSION('bonus') >= '0.2.1') && (getConfig('bonus_login_yn') == 'Y')) { + if ((getExtensionVersion('sql_patches') >= '0.2.8') && (getExtensionVersion('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", @@ -100,25 +99,25 @@ LIMIT 1", if (SQL_AFFECTEDROWS() == 1) $bonus = true; } // END - if - if (($bonus === true) && (REQUEST_GET('mode') == 'bonus') && (EXT_IS_ACTIVE('bonus'))) { + if (($bonus === true) && (getRequestElement('mode') == 'bonus') && (isExtensionActive('bonus'))) { // Output message with added points $message .= "<div class=\"tiny\"> ".sprintf(getMessage('BONUS_LOGIN_BONUS_ADDED'), translateComma(getConfig('login_bonus')))." </div>"; - } elseif (EXT_IS_ACTIVE('bonus')) { + } elseif (isExtensionActive('bonus')) { // No login bonus added! $message .= "<div class=\"member_failed\">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>"; } // Redirect to member area - $message .= LOAD_TEMPLATE("member_login_js", true); + $message .= loadTemplate('member_login_js', true); } else { // Login failed! - $message .= LOAD_TEMPLATE("login_failed_js", true); + $message .= loadTemplate('login_failed_js', true); } // Output final message -LOAD_TEMPLATE('admin_settings_saved', false, $message); +loadTemplate('admin_settings_saved', false, $message); -// +// [EOF] ?> diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index ef0af22105..5779deb1bf 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if $mode = 'guest'; -if (REQUEST_ISSET_GET('order')) { +if (isGetRequestElementSet('order')) { // Order number placed, is he also logged in? - if (IS_MEMBER()) { + if (isMember()) { // Ok, test passed... :) - $result = SQL_QUERY_ESC("SELECT `subject`, `url` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1", - array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__); + $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(getRequestElement('order')), getUserId()), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_NUMROWS($result) == 1) { @@ -57,7 +56,7 @@ if (REQUEST_ISSET_GET('order')) { list($sub, $url) = SQL_FETCHROW($result); // This fixes a white page - REQUEST_SET_POST('url', $url); + setRequestPostElement('url', $url); // Mode is member $mode = 'member'; @@ -74,19 +73,19 @@ if (REQUEST_ISSET_GET('order')) { } } // END - if -if ((REQUEST_ISSET_POST('url')) || (REQUEST_ISSET_GET('url')) || (REQUEST_ISSET_GET('frame'))) { +if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGetRequestElementSet('frame'))) { // Default URL is ours $url = getConfig('URL'); // Decode URL if set in GET parameters - if (REQUEST_ISSET_GET('url')) $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url'))))); + if (isGetRequestElementSet('url')) $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); // Use URL from POST data if set - if (REQUEST_ISSET_POST('url')) $url = REQUEST_POST('url'); + if (isPostRequestElementSet('url')) $url = postRequestElement('url'); // Add missing element $frame = ''; - if (REQUEST_ISSET_GET('frame')) $frame = REQUEST_GET('frame'); + if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); switch ($frame) { case '': @@ -94,28 +93,28 @@ if ((REQUEST_ISSET_POST('url')) || (REQUEST_ISSET_GET('url')) || (REQUEST_ISSET_ { case 'member': // Build frameset - define('__ORDER_VALUE', bigintval(REQUEST_GET('order'))); - define('__URL_VALUE' , DEREFERER($url)); - LOAD_TEMPLATE('member_order_frametester'); + $content['order'] = bigintval(getRequestElement('order')); + $content['url'] = generateDerefererUrl($url); + loadTemplate('member_order_frametester', false, $content); break; case 'guest': - define('__URL_VALUE' , DEREFERER($url)); - LOAD_TEMPLATE('guest_frametester'); + $content['url'] = generateDerefererUrl($url); + loadTemplate('guest_frametester', false, $content); break; } break; case 'test_top': - LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>'); + loadTemplate('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>'); break; case 'back': // Back buttom - LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order')); + loadTemplate('member_order_back', false, getRequestElement('order')); break; case 'send': // Send mail away - LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order')); + loadTemplate('member_order_send', false, getRequestElement('order')); break; } } else { diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index cf4f43962a..c865842667 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('')); + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('')); return; -} elseif ($BLOCK_MODE) { +} elseif (isBlockModeEnabled()) { // Block mode detected return; } -// Add description as navigation point -ADD_DESCR('guest', __FILE__); - // Load the include file -$INC = sprintf("inc/modules/guest/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/guest/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the guest action module - loadInclude($INC); -} elseif ($IS_VALID) { - addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_404_ACTION'), getWhat())); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_LOCKED_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/guest/action-admin.php b/inc/modules/guest/action-admin.php index 4a1a72dbac..246108d811 100644 --- a/inc/modules/guest/action-admin.php +++ b/inc/modules/guest/action-admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Only when one admin link is clicked... -$INC = sprintf("inc/modules/guest/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/guest/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the guest action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_WHAT'), getWhat()); } diff --git a/inc/modules/guest/action-main.php b/inc/modules/guest/action-main.php index 9e3f95d37d..553806dc6a 100644 --- a/inc/modules/guest/action-main.php +++ b/inc/modules/guest/action-main.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load the include file -$INC = sprintf("inc/modules/guest/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/guest/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the guest action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_WHAT'), getWhat()); } diff --git a/inc/modules/guest/action-members.php b/inc/modules/guest/action-members.php index a3261d0b41..77e976a534 100644 --- a/inc/modules/guest/action-members.php +++ b/inc/modules/guest/action-members.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load the include file -$INC = sprintf("inc/modules/guest/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/guest/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the guest action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_WHAT'), getWhat()); } diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index d3844e778e..f2f36dec20 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('online')) && (!IS_ADMIN())) { + die(); +} elseif ((!isExtensionActive('online')) && (!isAdmin())) { // Just skip this extension return; } // Total visitors online -$total = GET_TOTAL_DATA('', 'online', 'id', 'userid', true); +$total = countSumTotalData('', 'online', 'id', 'userid', true); if (getConfig('mad_count') < $total) { // Update counter @@ -55,17 +54,17 @@ if (getConfig('mad_count') < $total) { // Prepare content $content = array( - 'guests' => translateComma(GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'")), - 'members' => translateComma(GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'")), - 'admins' => translateComma(GET_TOTAL_DATA('Y', 'online', 'id', 'is_admin', true)), + 'guests' => translateComma(countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'")), + 'members' => translateComma(countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'")), + 'admins' => translateComma(countSumTotalData('Y', 'online', 'id', 'is_admin', true)), 'total' => translateComma($total) ); // Output table -LOAD_TEMPLATE('online_now', false, $content); +$GLOBALS['rows'] .= loadTemplate('online_now', true, $content); // Add more links in this block runFilterChain('online_extra_links'); -// +// [EOF] ?> diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index bcb2b6e7eb..6cffad8374 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -37,24 +37,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; + die(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load the include file -$INC = sprintf("inc/modules/guest/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/guest/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the guest action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_WHAT'), getWhat()); } diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 1edf21289c..8b4ee7ff02 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,36 +38,39 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('theme')); + die(); +} // END - if + +// Add description as navigation point +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('theme')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); return; -} +} // END - if // Get total num -if (IS_ADMIN()) { +if (isAdmin()) { // Load only active designs for user - $num_themes = GET_TOTAL_DATA('Y', 'themes', 'id', 'theme_active', true); + $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true); } else { // Load all themes for admin - $num_themes = GET_TOTAL_DATA('', 'themes', 'id', '', true); + $num_themes = countSumTotalData('', 'themes', 'id', '', true); } if ($num_themes > 1) { // If more than 1 is installed output selection box $OUT = generateThemeSelectionBox(); -} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) { +} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) { // If there's only one just output it's name - define('__THEME_NAME', getCurrentThemeName()); - $OUT = LOAD_TEMPLATE('theme_one', true); -} elseif (IS_ADMIN()) { + $OUT = loadTemplate('theme_one', true, getCurrentThemeName()); +} elseif (isAdmin()) { // If there is no theme installed and there's an admin notify him! - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>"); + $OUT = loadTemplate('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>"); } // Load final box template -LOAD_TEMPLATE('theme_select_box', false, $OUT); +$GLOBALS['rows'] .= loadTemplate('theme_select_box', true, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/guest/what- b/inc/modules/guest/what- index 4bcc4e7367..b6c4ee061c 100644 --- a/inc/modules/guest/what- +++ b/inc/modules/guest/what- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load default template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index d41f722fe4..b9dfc392ef 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,62 +38,64 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('active')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('active')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); -// Extra field to include is by default uid +if ((!isExtensionActive('active')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('active')); + return; +} // END - if + +// Extra field to include is by default userid $add = 'userid'; // If nickname is installed the extra field is the nickname of the user -if (EXT_IS_ACTIVE('nickname')) $add = 'nickname'; +if (isExtensionActive('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` -WHERE last_online >= %s AND `status`='CONFIRMED' -ORDER BY last_online DESC LIMIT %s", -array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__); +$result = SQL_QUERY("SELECT + `userid`, `".$add."`, `last_online` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `last_online` >= {?START_TDAY?} AND `status`='CONFIRMED' +ORDER BY + `last_online` DESC +LIMIT {?active_limit?}", __FILE__, __LINE__); // Entries found? if (SQL_NUMROWS($result) > 0) { // At least one member was online so let's load them all $OUT = ''; $SW = 2; - while (list($uid, $nick, $last) = SQL_FETCHROW($result)) { + while (list($userid, $nick, $last) = SQL_FETCHROW($result)) { $nick2 = '---'; - if (($nick != $uid) && (!empty($nick))) $nick2 = $nick; + if (($nick != $userid) && (!empty($nick))) $nick2 = $nick; // Transfer data to array $content = array( - 'sw' => $SW, - 'uid' => $uid, - 'nick' => $nick2, - 'points' => translateComma(GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points')), - 'last' => generateDateTime($last, '2'), + 'sw' => $SW, + 'userid' => $userid, + 'nickname' => $nick2, + 'points' => translateComma(countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points')), + 'last_online' => generateDateTime($last, '2'), ); // Load template - $OUT .= LOAD_TEMPLATE('guest_active_row', true, $content); + $OUT .= loadTemplate('guest_active_row', true, $content); // Switch colors $SW = 3 - $SW; } } else { // No member was online today! :-( - $OUT = LOAD_TEMPLATE('guest_active_none_row', true); + $OUT = loadTemplate('guest_active_none_row', true); } -// Remember output in constant -define('__ACTIVE_ROWS', $OUT); - // Load template -LOAD_TEMPLATE('guest_active_table'); +loadTemplate('guest_active_table', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-admin.php b/inc/modules/guest/what-admin.php index 36861d1077..467a676f2f 100644 --- a/inc/modules/guest/what-admin.php +++ b/inc/modules/guest/what-admin.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // A simple redirect... redirectToUrl('modules.php?module=admin'); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-agb.php b/inc/modules/guest/what-agb.php index 55b423c7ed..4158cd3a32 100644 --- a/inc/modules/guest/what-agb.php +++ b/inc/modules/guest/what-agb.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR ('guest', basename(__FILE__)); +addMenuDescription('guest', basename(__FILE__)); // Load default template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 6a224c3c0b..557f9ae292 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,33 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('beg')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('beg')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + return; +} // END - if // Prepare constants -define('__BEG_POINTS' , translateComma(getConfig('beg_points'))); -define('__BEG_POINTS_MAX', translateComma(getConfig('beg_points_max'))); -if ($GLOBALS['refid'] > 0) { - // Take referal ID from URL/Cookie - define('__BEG_UID' , $GLOBALS['refid']); -} else { - // Take default referal ID - define('__BEG_UID' , getConfig('def_refid')); -} +$content['points'] = translateComma(getConfig('beg_points')); +$content['points_max'] = translateComma(getConfig('beg_points_max')); +$content['userid'] = determineReferalId(); // Selection boxes are now the default -define('__BEG_TIMEOUT' , createFancyTime(getConfig('beg_timeout'))); -define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_uid_timeout'))); +$content['timeout'] = createFancyTime(getConfig('beg_timeout')); +// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout'))); // Load final template -LOAD_TEMPLATE("guest_".substr(basename(__FILE__), 5, -4)); +loadTemplate('guest_beg', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 12dace12c6..1562cc006e 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,45 +38,47 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +// Init content +$content = array( + 'message' => getMessage('GUEST_CONFIRMED_FAILED'), + 'userid' => '0', +); -if (REQUEST_ISSET_GET('hash')) { +if (isGetRequestElementSet('hash')) { // Initialize the user ID - $uid = 0; + $userid = 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", - array(REQUEST_GET('hash')), __FILE__, __LINE__); + $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(getRequestElement('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); + list ($userid, $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", - array(getConfig('ref_payout'), REQUEST_GET('hash')), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED', ref_payout={?ref_payout?}, `user_hash`=NULL WHERE `user_hash`='%s' AND `status`='UNCONFIRMED' LIMIT 1", + array(getRequestElement('hash')), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { - $message = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => getConfig('points_register')), bigintval($uid)); + $message = loadEmailTemplate('confirm-member', array('points' => getConfig('points_register')), bigintval($userid)); // And send him right away the confirmation mail sendEmail($email, getMessage('GUEST_THANX_CONFIRM'), $message); // Maybe he got "referaled"? - if (($rid > 0) && ($rid != $uid)) { + if (($rid > 0) && ($rid != $userid)) { // Select the referal userid - $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval($rid)), __FILE__, __LINE__); + $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... updateReferalCounter($rid); - // Ok, write the ref-points to this user and his parent-ref - unset($GLOBALS['ref_level']); - // Shall I 'pay' the referal points imidiately? if (getConfig('ref_payout') == '0') { // Yes, 'pay' it now @@ -87,89 +89,93 @@ if (REQUEST_ISSET_GET('hash')) { } // If version matches add ref bonus to refid's account - if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) { + if ((getExtensionVersion('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", - array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_ref`=`bonus_ref`+{?bonus_ref?} WHERE `userid`=%s LIMIT 1", + array(bigintval($rid)), __FILE__, __LINE__); // Subtract points from system - BONUS_POINTS_HANDLER(getConfig('bonus_ref')); + handleBonusPoints(getConfig('bonus_ref')); } // END - if // Add one-time referal bonus over referal system or directly + // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM('referal_bonus', $rid, getConfig('points_ref'), true, bigintval($uid), $locked, getConfig('reg_points_mode')); + addPointsThroughReferalSystem('referal_bonus', $rid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode')); } // END - if } // END - if - if (EXT_IS_ACTIVE('rallye')) { + if (isExtensionActive('rallye')) { // Add user to rallye (or not?) - RALLYE_AUTOADD_USER(bigintval($uid)); + addUserToReferalRallye(bigintval($userid)); } // END - if // Account confirmed! - if (EXT_IS_ACTIVE('lead')) { + if (isExtensionActive('lead')) { // Set special lead cookie - setSession('lead_uid', bigintval($uid)); + setSession('lead_userid', bigintval($userid)); // Lead-Code mode enabled redirectToUrl('lead-confirm.php'); } else { - define('__CONFIRM_MSG', getMessage('GUEST_CONFIRMED_DONE')); - define('__UID', bigintval($uid)); - LOAD_TEMPLATE('guest_confirm_table'); + $content['message'] = getMessage('GUEST_CONFIRMED_DONE'); + $content['userid'] = bigintval($userid); } - } elseif (EXT_IS_ACTIVE('lead')) { + } elseif (isExtensionActive('lead')) { // Set special lead cookie - setSession('lead_uid', bigintval($uid)); + setSession('lead_userid', bigintval($userid)); // Lead-Code mode enabled redirectToUrl('lead-confirm.php'); } else { // Nobody was found unter this hash key... or our new member want's to confirm twice? - define('__CONFIRM_MSG', getMessage('GUEST_CONFIRMED_TWICE')); - define('__UID', '0'); - LOAD_TEMPLATE('guest_confirm_table'); + $content['message'] = getMessage('GUEST_CONFIRMED_TWICE'); } } else { // Nobody was found unter this hash key... or our new member want's to confirm twice? - define('__CONFIRM_MSG', getMessage('GUEST_CONFIRMED_TWICE')); - define('__UID', '0'); - LOAD_TEMPLATE('guest_confirm_table'); + $content['message'] = getMessage('GUEST_CONFIRMED_TWICE'); } -} elseif ((isFormSent()) && (REQUEST_ISSET_POST('email'))) { + + // Load template + loadTemplate('guest_confirm_table', false, $content); +} elseif ((isFormSent()) && (isPostRequestElementSet('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", - array(REQUEST_POST('email')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `status`, `user_hash` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `email`='%s' LIMIT 1", + array(postRequestElement('email')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Email address found - $DATA = SQL_FETCHROW($result); - switch ($DATA[1]) { + $content = SQL_FETCHARRAY($result); + switch ($content['status']) { case 'UNCONFIRMED': // Account not confirmed - $message = LOAD_EMAIL_TEMPLATE('guest_request_confirm', array('hash' => $DATA[2]), $DATA[0]); - sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message); - $content = getMessage('CONFIRM_LINK_SENT'); + // Load email template + $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']); + + // Send email + sendEmail(postRequestElement('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message); + + // And set message + $content['message'] = getMessage('CONFIRM_LINK_SENT'); break; case 'CONFIRMED': // Account already confirmed - $content = getMessage('LOGIN_ID_CONFIRMED'); + $content['message'] = getMessage('LOGIN_ID_CONFIRMED'); break; case 'LOCKED': // Account is locked - $content = getMessage('LOGIN_ID_LOCKED'); + $content['message'] = getMessage('LOGIN_ID_LOCKED'); break; } // END - switch } else { // Email address not registered - $content = getMessage('EMAIL_ADDY_404'); + $content['message'] = getMessage('EMAIL_ADDRESS_404'); } - define('__CONFIRM_MSG', $content); - LOAD_TEMPLATE('guest_confirm_table'); + // Load template + loadTemplate('admin_settings_saved', false, $content['message']); } else { // No hash found, the guest may want to enter his email address to re-get his confirmation link? - LOAD_TEMPLATE('guest_confirm_link'); + loadTemplate('guest_confirm_link'); } -// +// [EOF] ?> diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index 3c08ac964f..b4018382a4 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,54 +38,44 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('doubler')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('doubler')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('doubler')); + return; +} // END - if // Percent values etc. -define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100)); -define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100)); -define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points'))); -define('__MIN_VALUE' , translateComma(getConfig('doubler_min'))); -define('__MAX_VALUE' , translateComma(getConfig('doubler_max'))); +$content['charge'] = translateComma(getConfig('doubler_charge') * 100); +$content['ref'] = translateComma(getConfig('doubler_ref') * 100); +$content['total'] = translateComma(getConfig('doubler_points')); +$content['min'] = translateComma(getConfig('doubler_min')); +$content['max'] = translateComma(getConfig('doubler_max')); // Transfer referal ID -define('__REFID', $GLOBALS['refid']); - -// Usage counter -define('__DOUBLER_COUNTER', getConfig('doubler_counter')); +$content['refid'] = determineReferalId(); // Which mail-send-mode did the admin setup? -switch (getConfig('doubler_send_mode')) { - case 'DIRECT': - define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT); - break; - - case 'RESET': - define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET); - break; -} +$content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode')); // Generate table with already payed out doubles -define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC')); +$content['payout_history'] = generateDoublerTable('0', 'Y', 'N', 'DESC'); // Generate table with next-to-run payouts -define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE()); +$content['next_table'] = generateDoublerTable(); // Generate timemark -define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout'))); +$content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout')); // Points left to double -define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT()); +$content['left'] = translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()); // Load template -LOAD_TEMPLATE('guest_doubler'); +loadTemplate('guest_doubler', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-impressum.php b/inc/modules/guest/what-impressum.php index 024a5fb396..cbfbaba85a 100644 --- a/inc/modules/guest/what-impressum.php +++ b/inc/modules/guest/what-impressum.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load template template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-infos.php b/inc/modules/guest/what-infos.php index 9ee69e0041..db0320149f 100644 --- a/inc/modules/guest/what-infos.php +++ b/inc/modules/guest/what-infos.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Load default template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 56085111a2..03c05a6a87 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,21 +39,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('user')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('user')); - return; + die(); } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); -global $DATA; +if ((!isExtensionActive('user')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); + return; +} // END - if // Initialize variables $errorCode = 0; -$uid = false; +$userid = false; $hash = ''; $URL = ''; $add = ''; @@ -61,119 +60,85 @@ $add = ''; // Already logged in? if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it - $uid = getUserId(); -} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST('password')) && (isFormSent())) { + $userid = getUserId(); +} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) { // Set userid and crypt password when login data was submitted - if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE(REQUEST_POST('id')))) { + if ((isExtensionActive('nickname')) && (isNicknameOrUserid(postRequestElement('id')))) { // Nickname entered - $uid = SQL_ESCAPE(REQUEST_POST('id')); + $userid = SQL_ESCAPE(postRequestElement('id')); } else { // Direct userid entered - $uid = bigintval(REQUEST_POST('id')); + $userid = bigintval(postRequestElement('id')); } -} elseif (REQUEST_ISSET_POST('new_pass')) { +} elseif (isPostRequestElementSet('new_pass')) { // New password requested - $uid = 0; - if (REQUEST_ISSET_POST('id')) $uid = REQUEST_POST('id'); + $userid = 0; + if (isPostRequestElementSet('id')) $userid = bigintval(postRequestElement('id')); } else { // Not logged in - $uid = 0; $hash = ''; + $userid = 0; $hash = ''; } -// Set unset variables -if (!REQUEST_ISSET_POST('new_pass')) REQUEST_SET_POST('new_pass', ''); -if (!REQUEST_ISSET_GET('login')) REQUEST_SET_GET('login' , ''); - -if (IS_MEMBER()) { +if (isMember()) { // Login immidiately... $URL = 'modules.php?module=login'; -} elseif ((isFormSent()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) { +} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); } elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) - $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password')); -} elseif ((REQUEST_ISSET_POST('new_pass')) && (isset($uid))) { + $URL = doUserLogin(postRequestElement('id'), postRequestElement('password')); +} elseif ((isPostRequestElementSet('new_pass')) && (isset($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $errorCode = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid); + $errorCode = doNewUserPassword(postRequestElement('email'), $userid); } // Login problems? -if (REQUEST_ISSET_GET('login')) { +if (isGetRequestElementSet('login')) { // Use code from URL - $errorCode = REQUEST_GET('login'); + $errorCode = getRequestElement('login'); } // END - if +// No problems, no output by detault +$content['message'] = ''; + // Login problems? if (!empty($errorCode)) { - // Ok, which one now? + // @TODO Move this HTML code into a template $message = "<tr> <td width=\"10\" class=\"seperator\"> </td> <td colspan=\"7\" align=\"center\"> <span class=\"guest_failed\">"; - switch ($errorCode) { - case getCode('WRONG_PASS'): - $message .= getMessage('LOGIN_WRONG_PASS'); - break; - - case getCode('WRONG_ID'): - $message .= getMessage('LOGIN_WRONG_ID'); - break; - - case getCode('ID_LOCKED'): - $message .= getMessage('LOGIN_ID_LOCKED'); - break; + // Convert the code to message + $message .= getMessageFromErrorCode($errorCode); - case getCode('ID_UNCONFIRMED'): - $message .= getMessage('LOGIN_ID_UNCONFIRMED'); - break; - - case getCode('NO_COOKIES'): - $message .= getMessage('LOGIN_NO_COOKIES'); - break; - - case getCode('EXTENSION_PROBLEM'): - if (IS_ADMIN()) { - $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'nickname'); - } else { - $message .= getMessage('LOGIN_WRONG_ID'); - } - break; - - default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode)); - $message .= getMessage('LOGIN_WRONG_ID'); - break; - } + // Continue with HTML $message .= "</span> </td> <td width=\"10\" class=\"seperator\"> </td> </tr>\n"; - define('LOGIN_FAILURE_MSG', $message); -} else { - // No problems, no output - define('LOGIN_FAILURE_MSG', ''); -} + $content['message'] = $message; +} // END - if // Display login form with resend-password form -if (EXT_IS_ACTIVE('nickname')) { - LOAD_TEMPLATE('guest_nickname_login'); +if (isExtensionActive('nickname')) { + loadTemplate('guest_nickname_login', false, $content); } else { - LOAD_TEMPLATE('guest_login'); + loadTemplate('guest_login', false, $content); } // Was an URL constructed? if (!empty($URL)) { // URL was constructed - if (getTotalFatalErrors()) { - // Fatal errors! - loadIncludeOnce('inc/fatal_errors.php'); + if (getTotalFatalErrors() > 0) { + // Handle fatal errors + handleFatalErrors(); } else { // Load URL redirectToUrl($URL); } } // END - if -// +// [EOF] ?> diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 61e30b224c..258509fb8a 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -13,9 +13,16 @@ * mod_media - By Robert Niedziela * * (c)2003 www.megacomputing.net * * -------------------------------------------------------------------- * - * Rewritten by Roland Haeder, 2003 - 2008 * + * Rewritten by Roland Haeder, 2003 - 2009 * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -36,127 +43,121 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('mediadata')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('mediadata')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); -// @TODO Rewrite all constants -define('value', 'value'); -define('lang', 'lang'); -define('rows', 'rows'); +if ((!isExtensionActive('mediadata')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mediadata')); + return; +} // END - if // Get total confirmed user IDs... -define('user_confirmed' , round(GET_TOTAL_DATA('CONFIRMED' , 'user_data', 'userid', 'status', true))); -define('user_unconfirmed', round(GET_TOTAL_DATA('UNCONFIRMED', 'user_data', 'userid', 'status', true))); -define('user_locked' , round(GET_TOTAL_DATA('LOCKED' , 'user_data', 'userid', 'status', true))); -define('user_count' , (constant('user_confirmed') + constant('user_unconfirmed') + constant('user_locked'))); +$content['user_confirmed'] = round(countSumTotalData('CONFIRMED' , 'user_data', 'userid', 'status', true)); +$content['user_unconfirmed'] = round(countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true)); +$content['user_locked'] = round(countSumTotalData('LOCKED' , 'user_data', 'userid', 'status', true)); +$content['user_count'] = ($content['user_confirmed'] + $content['user_unconfirmed'] + $content['user_locked']); // Start of this exchange -define('__MT_START', generateDateTime(getConfig('mt_start'), '3')); - -// Projected number of members -define('__MT_STAGE', getConfig('mt_stage')); +$content['mt_start'] = generateDateTime(getConfig('mt_start'), '3'); // Project timestamp when number of members are reached $PROJECTED = 0; -if (constant('user_count')> 0) { +if ($content['user_count'] > 0) { // @TODO Find a better formular than this one - $PROJECTED = round((time() - getConfig('mt_start')) / constant('user_count') * getConfig('mt_stage') + getConfig('mt_start')); -} + $PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start')); +} // END - if // Generate timestamp $TEST = makeTime(0, 0, 0, $PROJECTED); if ($TEST > time()) { - define('__MT_PROJECTED', generateDateTime($PROJECTED, '3')); + $content['projected'] = generateDateTime($PROJECTED, '3'); } else { - define('__MT_PROJECTED', getMessage('USER_PROJECTION_UNKNOWN')); + $content['projected'] = getMessage('USER_PROJECTION_UNKNOWN'); } // User who can receive mails -define('user_max_mails', GET_TOTAL_DATA('CONFIRMED', 'user_data' 'max_mails', 'status', true, " AND `max_mails` > 0")); +$content['user_max_mails'] = countSumTotalData('CONFIRMED', 'user_data', 'max_mails', 'status', true, " AND `max_mails` > 0"); // Users who can receive mails today -define('user_max_rec', GET_TOTAL_DATA('CONFIRMED', 'user_data', 'receive_mails', 'status', true, " AND `receive_mails` > 0")); +$content['user_max_rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', true, " AND `receive_mails` > 0"); // Max mails per day -define('max', GET_TOTAL_DATA('CONFIRMED', 'user_data', 'max_mails', 'status', false, " AND `max_mails` > 0")); +$content['max'] = countSumTotalData('CONFIRMED', 'user_data', 'max_mails', 'status', false, " AND `max_mails` > 0"); // Max mails for this day -define('rec', GET_TOTAL_DATA('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0")); +$content['rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0"); // Initial lots of variables $bmails = 0; $sent = 0; $max = 0; $rec = 0; $clicks = 0; // Mail orders (only current) -$nmails = MEDIA_GET_ENTRY('normal_orders'); +$nmails = getMediadataEntry('normal_orders'); if (empty($nmails)) $nmails = 0; // Mails sent so far -$clicks = MEDIA_GET_ENTRY('normal_clicks'); -$sent = MEDIA_GET_ENTRY('normal_send'); +$clicks = getMediadataEntry('normal_clicks'); +$sent = getMediadataEntry('normal_send'); if (empty($sent)) $sent = 0; if (empty($clicks)) $clicks = 0; // Bonus mails -if (EXT_IS_ACTIVE('bonus')) { - $bmails = MEDIA_GET_ENTRY('bonus_orders'); +if (isExtensionActive('bonus')) { + $bmails = getMediadataEntry('bonus_orders'); if (empty($bmails)) $bmails = 0; // Count bonus mails clicks / sent mails - $dmy = MEDIA_GET_ENTRY('bonus_clicks'); - $dmy2 = MEDIA_GET_ENTRY('bonus_send'); + $dmy = getMediadataEntry('bonus_clicks'); + $dmy2 = getMediadataEntry('bonus_send'); if (empty($dmy)) $dmy = 0; if (empty($dmy2)) $dmy2 = 0; $sent += $dmy2; $clicks += $dmy; } // END - if -define('user_stats', ($nmails + $bmails)); -define('sent' , $sent); +$content['user_stats'] = ($nmails + $bmails); +$content['sent'] = $sent; // All clicks -define('user_links', abs($sent - $clicks)); +$content['user_links'] = abs($sent - $clicks); $clr = '0.00000'; if ($sent > 0) $clr = $clicks / $sent * 100; -define('_clr', translateComma($clr).'%'); +$content['_clr'] = translateComma($clr) . '%'; // Load jackpot -$jackpot = GET_JACKPOT_POINTS(); +$jackpot = 0; +if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints(); if (empty($jackpot)) $jackpot = 0; -define('jackpot', translateComma($jackpot)); +$content['jackpot'] = translateComma($jackpot); // Total referal link clicks, total logins -$result = SQL_QUERY("SELECT DISTINCT +$result = SQL_QUERY("SELECT SUM(d.ref_clicks), SUM(d.total_logins) FROM - `{!_MYSQL_PREFIX!}_user_data` AS d", __FILE__, __LINE__); + `{?_MYSQL_PREFIX?}_user_data` AS d", __FILE__, __LINE__); list($ref, $logins) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Get total points -$points = MEDIA_GET_ENTRY('total_points'); +$points = getMediadataEntry('total_points'); if (empty($points)) $points = 0; if (empty($ref)) $ref = 0; if (empty($logins)) $logins = 0; -define('__TOTAL_POINTS' , translateComma($points)); -define('__TOTAL_REFCLICKS', $ref); -define('__TOTAL_LOGINS' , $logins); +$content['total_points'] = translateComma($points); +$content['total_refclicks'] = $ref; +$content['total_logins'] = $logins; // Referal banner -$total = GET_TOTAL_DATA('Y', 'refbanner', 'id', 'visible', true); +$total = countSumTotalData('Y', 'refbanner', 'id', 'visible', true); // Total views and clicks -$result = SQL_QUERY("SELECT SUM(`counter`) AS cnt, SUM(`clicks`) AS clx FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `visible`='Y'", __FILE__, __LINE__); +$result = SQL_QUERY("SELECT SUM(`counter`) AS cnt, SUM(`clicks`) AS clx FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y'", __FILE__, __LINE__); list($views, $clicks) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -164,9 +165,9 @@ if (empty($total)) $total = 0; if (empty($views)) $views = 0; if (empty($clicks)) $clicks = 0; -define('__REF_TOTAL' , $total); -define('__REF_VIEWS' , $views); -define('__REF_CLICKS', $clicks); +$content['ref_total'] = $total; +$content['ref_views'] = $views; +$content['ref_clicks'] = $clicks; // // Extra mediadata depending on installed extensions @@ -178,98 +179,90 @@ $OUT_POINTS = ''; $ROWS_POINTS = 2; $OUT_USER = ''; $ROWS_USER = 6; $OUT_SPECIAL = ''; // We don't need row count here -// @TODO Rewrite these all if-blocks to filters -if (EXT_IS_ACTIVE('beg')) { +// @TODO Rewrite all these if-blocks to filters +if (isExtensionActive('beg')) { // Clicks on beg links - $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; - $content = array( - 'lang' => MEDIA_BEG_CLICKS, - 'value' => $extra + $data = array( + 'lang' => getMessage('MEDIA_BEG_CLICKS'), + 'value' => countSumTotalData(1, 'user_data', 'beg_clicks', 1, false, " AND `beg_clicks` > 0") ); - $OUT_EXTRA .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); + $OUT_EXTRA .= loadTemplate('mediadata_extra_row', true, $data); $ROWS_EXTRA++; } -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__); - 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__); - list($count2, $points2) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - if (empty($count1)) $count1 = 0; - if (empty($count2)) $count2 = 0; - if (empty($points1)) $points1 = 0; - if (empty($points2)) $points2 = 0; - +if (isExtensionActive('doubler')) { // Add header - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_hrow', true, getMessage('MEDIA_DOUBLER_HEADER')); + $OUT_SPECIAL .= loadTemplate('mediadata_extra_hrow', true, getMessage('MEDIA_DOUBLER_HEADER')); // Add first line (count) - $content = array( + $data = array( 'lang' => getMessage('MEDIA_DOUBLER_COUNT'), - 'value' => $count1, + 'value' => countSumTotalData('Y','doubler','id','completed', true, " AND `points` > 0"), 'rows' => '4' ); // Add points - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row2', true, $data); + $data = array( 'lang' => getMessage('MEDIA_DOUBLER_CPOINTS'), - 'value' => translateComma($points1) + 'value' => translateComma(countSumTotalData('Y','doubler','id','completed', false, " AND `points` > 0")) ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); + $data = array( 'lang' => getMessage('MEDIA_DOUBLER_WAITING'), - 'value' => translateComma($count2) + 'value' => translateComma(countSumTotalData('N','doubler','id','completed', true, " AND `points` > 0")) ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); + $data = array( 'lang' => getMessage('MEDIA_DOUBLER_WPOINTS'), - 'value' => translateComma($points2) + 'value' => translateComma(countSumTotalData('N','doubler','id','completed', false, " AND `points` > 0")) ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); } -if (EXT_IS_ACTIVE('holiday')) { +if (isExtensionActive('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 -ON h.userid=d.userid -WHERE d.`holiday_active`='Y'", + $result = SQL_QUERY("SELECT + COUNT(h.userid) AS count_holidays +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__); list($holiday) = SQL_FETCHROW($result); SQL_FREERESULT($result); if (empty($holiday)) $holiday = 0; - $content = array( + $data = array( 'lang' => getMessage('MEDIA_HOLIDAY_COUNT'), 'value' => $holiday ); - $OUT_USER .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); + $OUT_USER .= loadTemplate('mediadata_extra_row', true, $data); $ROWS_USER++; } -if (EXT_IS_ACTIVE('transfer')) { +if (isExtensionActive('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 -ON t.userid=d.userid", - __FILE__, __LINE__); + $result = SQL_QUERY("SELECT + COUNT(t.id) AS cnt, SUM(t.points) AS points +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); SQL_FREERESULT($result); if (empty($count_in)) $count_in = 0; 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 + $result = SQL_QUERY("SELECT COUNT(t.id), SUM(t.points) +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); @@ -278,44 +271,43 @@ ON t.userid=d.userid", if (empty($points_out)) $points_out = 0; // Add header - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_hrow', true, getMessage('MEDIA_TRANSFER_HEADER')); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_hrow', true, getMessage('MEDIA_TRANSFER_HEADER')); + $data = array( 'lang' => getMessage('MEDIA_TRANSFER_IN_COUNT'), 'value' => $count_in, 'rows' => '4' ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row2', true, $data); + $data = array( 'lang' => getMessage('MEDIA_TRANSFER_IN_POINTS'), 'value' => translateComma($points_in) ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); + $data = array( 'lang' => getMessage('MEDIA_TRANSFER_OUT_COUNT'), 'value' => $count_out ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); - $content = array( + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); + $data = array( 'lang' => getMessage('MEDIA_TRANSFER_OUT_POINTS'), 'value' => translateComma($points_out) ); - $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content); + $OUT_SPECIAL .= loadTemplate('mediadata_extra_row', true, $data); } // END - if -define('__EXTRA_MEDIADATA' , $OUT_EXTRA); -define('__POINTS_MEDIADATA' , $OUT_POINTS); -define('__USER_MEDIADATA' , $OUT_USER); -define('__SPECIAL_MEDIADATA', $OUT_SPECIAL); -define('__ROWSPAN_EXTRA' , $ROWS_EXTRA); -define('__ROWSPAN_POINTS' , $ROWS_POINTS); -define('__ROWSPAN_USER' , $ROWS_USER); +$content['out_extra'] = $OUT_EXTRA; +$content['out_points'] = $OUT_POINTS; +$content['out_user'] = $OUT_USER; +$content['out_special'] = $OUT_SPECIAL; +$content['rowspan_extra'] = $ROWS_EXTRA; +$content['rowspan_points'] = $ROWS_POINTS; +$content['rowspan_user'] = $ROWS_USER; -// Patch level and it's timespamp -define('__PATCH_LEVEL', getConfig('patch_level')); -define('__PATCH_CTIME', generateDateTime(getConfig('patch_ctime'), '2')); +// Patch timespamp +$contentp['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), '2'); // Load template -LOAD_TEMPLATE('mediadata'); +loadTemplate('mediadata', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 5825e0c642..c2788fbc05 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('rallye')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('rallye')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('rallye')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('rallye')); + return; +} // END - if // Open div tag -OUTPUT_HTML("<div align=\"center\">"); +outputHtml("<div align=\"center\">"); // Check for possible running rallyes $ADMIN = " AND d.is_active='Y'"; -if (IS_ADMIN()) $ADMIN = ''; +if (isAdmin()) $ADMIN = ''; -$result = SQL_QUERY("SELECT DISTINCT +$result = SQL_QUERY("SELECT 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?}_rallye_data` AS d INNER JOIN - `{!_MYSQL_PREFIX!}_admins` AS a + `{?_MYSQL_PREFIX?}_admins` AS a ON d.admin_id=a.id WHERE @@ -71,63 +72,64 @@ LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Found some (normally one... - list($id, $aid, $login, $title, $descr, $templ, $start, $end, $min_users, $min_prices) = SQL_FETCHROW($result); + list($id, $adminId, $login, $title, $descr, $templ, $start, $end, $min_users, $min_prices) = SQL_FETCHROW($result); $expired = false; if ($end < time()) { // Rallye is expired - define('__RALLYE_EXTRAS', getMessage('RALLYE_HAS_EXPIRED')); + $content['extras'] = getMessage('RALLYE_HAS_EXPIRED'); $expired = true; - } elseif (time() >= ($end - getConfig('one_day'))) { + } elseif (time() >= ($end - getConfig('ONE_DAY'))) { // Rallye will expire in less one day! - define('__RALLYE_EXTRAS', getMessage('RALLYE_EXPIRE_ONE_DAY')); + $content['extras'] = getMessage('RALLYE_EXPIRE_ONE_DAY'); } else { - define('__RALLYE_EXTRAS', "<a href=\"{?URL?}/modules.php?module=index&what=register\">{--RALLYE_REGISTER_NOW--}</a>"); + $content['extras'] = "<a href=\"{?URL?}/modules.php?module=index&what=register\">{--RALLYE_REGISTER_NOW--}</a>"; } + // Set admin line (currently set to impressum, later to contact form) - define('__RALLYE_ADMIN', "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$aid."\">".$login."</a>"); + // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$adminId."\">".$login."</a>"; // Set title - define('__RALLYE_TITLE', COMPILE_CODE($title)); + $content['title'] = $title; // Handle description... if ((empty($descr)) && (!empty($templ))) { // Use description from template - define('__RALLYE_DESCR', LOAD_TEMPLATE('rallye_' . $templ, true)); + $content['descr'] = loadTemplate('rallye_' . $templ, true); } else { // Use description from database - define('__RALLYE_DESCR', COMPILE_CODE($descr)); + $content['descr'] = $descr; } // Set start and end time - define('__RALLYE_START', generateDateTime($start, '1')); - define('__RALLYE_END' , generateDateTime($end , '1')); + $content['start'] = generateDateTime($start, '1'); + $content['end'] = generateDateTime($end , '1'); // Determine min_users - define('__RALLYE_MAX_USERS', RALLYE_DETERMINE_MIN_USERS($min_users)); + $content['min_users'] = determineReferalRallyeMinimumUsers($min_users); // Determine min prices (now in function) - define('__RALLYE_MIN_PRICES', RALLYE_DETERMINE_MIN_PRICES()); + $content['min_prices'] = determineReferalRallyeMinimumPrices(); if ($expired === true) { - define('__RALLYE_PRICES', RALLYE_LIST_WINNERS($id)); - define('__RALLYE_TOP_USERS', "<div align=\"center\" class=\"big\">{!__RALLYE_EXTRAS!}</div>"); - define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_OUR_WINNERS_ARE')); + $content['prices'] = addReferalRallyeWinners($id); + $content['top_users'] = "<div align=\"center\" class=\"big\">".$content['extras']."</div>"; + $content['can_win_this'] = getMessage('RALLYE_OUR_WINNERS_ARE'); } else { - define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, 'html')); - define('__RALLYE_TOP_USERS', RALLYE_ADD_TOPUSERS($id, getUserId())); - define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_YOU_CAN_WIN')); + $content['prices'] = addReferalRallyePrices($id, 'html'); + $content['top_users'] = addReferalRallyeTopUsers($id, getUserId()); + $content['can_win_this'] = getMessage('RALLYE_YOU_CAN_WIN'); } // And load final template - LOAD_TEMPLATE('guest_rallye_show'); + loadTemplate('guest_rallye_show', false, $content); } else { // No rallye found so far - LOAD_TEMPLATE('guest_no_rallyes'); + loadTemplate('guest_no_rallyes'); } // Close the div tag -OUTPUT_HTML('</div>'); +outputHtml('</div>'); // [EOF] ?> diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 000990b292..ee33a91fde 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,61 +38,42 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('register'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('register')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); -global $DATA; +if (!isExtensionActive('register')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('register')); + return; +} elseif (!isExtensionActive('country')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('country')); + return; +} // Initialize variables $isFailed = false; -$shortPass = false; +$shortPass = false; $cats = 0; $ipTimedOut = false; -/** - * @TODO Commented out, do we need this ugly code? -if (!isFormSent()) REQUEST_UNSET_POST('ok'); - -if (!REQUEST_ISSET_POST('agree')) REQUEST_SET_POST('agree' , ''); -if (!REQUEST_ISSET_POST('addy')) REQUEST_SET_POST('addy' , ''); -if (!REQUEST_ISSET_POST('surname')) REQUEST_SET_POST('surname' , ''); -if (!REQUEST_ISSET_POST('family')) REQUEST_SET_POST('family' , ''); -if (!REQUEST_ISSET_POST('pass1')) REQUEST_SET_POST('pass1' , ''); -if (!REQUEST_ISSET_POST('pass2')) REQUEST_SET_POST('pass2' , ''); -if (!REQUEST_ISSET_POST('day')) REQUEST_SET_POST('day' , ''); -if (!REQUEST_ISSET_POST('month')) REQUEST_SET_POST('month' , ''); -if (!REQUEST_ISSET_POST('year')) REQUEST_SET_POST('year' , ''); -if (!REQUEST_ISSET_POST('max_mails')) REQUEST_SET_POST('max_mails' , ''); -if (!REQUEST_ISSET_POST('street_nr')) REQUEST_SET_POST('street_nr' , ''); -if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , ''); -if (!REQUEST_ISSET_POST('city')) REQUEST_SET_POST('city' , ''); -if (!REQUEST_ISSET_POST('cntry')) REQUEST_SET_POST('cntry' , ''); -if (!REQUEST_ISSET_POST('country_code')) REQUEST_SET_POST('country_code', '1'); -*/ - // Default refid is zero -REQUEST_SET_POST('refid', 0); -if ($GLOBALS['refid'] > 0) { +setRequestPostElement('refid', 0); +if (determineReferalId() > 0) { // Test if the refid is valid - $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(determineReferalId()), __FILE__, __LINE__); // Userid found? - //* DEBUG: */ die("refid={$GLOBALS['refid']}/numRows=".SQL_NUMROWS($result).""); + //* DEBUG: */ die("refid={determineReferalId()}/numRows=".SQL_NUMROWS($result).""); if (SQL_NUMROWS($result) == 0) { // Not found so we set your refid! - REQUEST_SET_POST('refid', getConfig('def_refid')); + setRequestPostElement('refid', getConfig('def_refid')); setSession('refid', getConfig('def_refid')); } else { // Use the refid here - REQUEST_SET_POST('refid', $GLOBALS['refid']); + setRequestPostElement('refid', determineReferalId()); } } // END - if @@ -100,59 +81,59 @@ if (isFormSent()) { // First we only check the submitted data then we continue... :) // // Did he agree to our Terms Of Usage? - if (REQUEST_POST('agree') != 'Y') { - REQUEST_SET_POST('agree', '!'); + if (postRequestElement('agree') != 'Y') { + setRequestPostElement('agree', '!'); $isFailed = true; } // END - if // Did he enter a valid email address? (we really don't care about // that, he has to click on a confirmation link :P ) - if ((!REQUEST_ISSET_POST('addy')) || (!isEmailValid(REQUEST_POST('addy')))) { - REQUEST_SET_POST('addy', '!'); + if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) { + setRequestPostElement('email', '!'); $isFailed = true; } // END - if // And what about surname and family's name? - if (!REQUEST_ISSET_POST('surname')) { - REQUEST_SET_POST('surname', '!'); + if (!isPostRequestElementSet('surname')) { + setRequestPostElement('surname', '!'); $isFailed = true; } // END - if - if (!REQUEST_ISSET_POST('family')) { - REQUEST_SET_POST('family', '!'); + if (!isPostRequestElementSet('family')) { + setRequestPostElement('family', '!'); $isFailed = true; } // END - if // Get temporary array for modification - $postArray = REQUEST_POST_ARRAY(); + $postArray = postRequestArray(); // Check for required fields if ($isFailed === false) $isFailed = ifRequiredRegisterFieldsAreSet($postArray); // Set it back in request - REQUEST_SET_POST_ARRAY($postArray); + setPostRequestArray($postArray); // Did he enter his password twice? - if (((!REQUEST_ISSET_POST('pass1')) || (!REQUEST_ISSET_POST('pass2'))) || ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')))) { - if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2'))) { - REQUEST_SET_POST('pass1', '!'); - REQUEST_SET_POST('pass2', '!'); + if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { + setRequestPostElement('pass1', '!'); + setRequestPostElement('pass2', '!'); } else { - if (!REQUEST_ISSET_POST('pass1')) { REQUEST_SET_POST('pass1', '!'); } else { REQUEST_SET_POST('pass1', ''); } - if (!REQUEST_ISSET_POST('pass2')) { REQUEST_SET_POST('pass2', '!'); } else { REQUEST_SET_POST('pass2', ''); } + if (!isPostRequestElementSet('pass1')) { setRequestPostElement('pass1', '!'); } else { setRequestPostElement('pass1', ''); } + if (!isPostRequestElementSet('pass2')) { setRequestPostElement('pass2', '!'); } else { setRequestPostElement('pass2', ''); } } $isFailed = true; } // END - if // Is the password long enouth? - if ((strlen(REQUEST_POST('pass1')) < getConfig('pass_len')) && ($isFailed === false)) { + if ((strlen(postRequestElement('pass1')) < getConfig('pass_len')) && ($isFailed === false)) { $shortPass = true; $isFailed = true; } // END - if // No admin? Admins can always register! - if (!IS_ADMIN()) { + if (!isAdmin()) { // Do this check only when no admin is logged in - foreach (REQUEST_POST('cat') as $id => $answer) { + foreach (postRequestElement('cat') as $id => $answer) { if ($answer == 'Y') $cats++; } // END - foreach @@ -162,11 +143,11 @@ if (isFormSent()) { } // END - if } // END - if - if ((REQUEST_POST('addy') != '!') && (getConfig('check_double_email') == 'Y')) { + if ((postRequestElement('email') != '!') && (getConfig('check_double_email') == 'Y')) { // Does the email address already exists in our database? - $CHK = isEmailTaken(REQUEST_POST('addy')); + $CHK = isEmailTaken(postRequestElement('email')); if ($CHK === true) { - REQUEST_SET_POST('addy', '?'); + setRequestPostElement('email', '?'); $isFailed = true; } // END - if } // END - if @@ -174,8 +155,15 @@ if (isFormSent()) { // 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", - array(detectRemoteAddr(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT + `userid` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `REMOTE_ADDR`='%s' AND + (`joined` > (UNIX_TIMESTAMP() - {?ip_timeout?}) OR `last_update` > (UNIX_TIMESTAMP() - {?ip_timeout?})) +LIMIT 1", + array(detectRemoteAddr()), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Same IP in timeout range and different email address entered... Eat this, faker! ;-) // But admins are allowed to fake their own exchange service. @@ -186,88 +174,88 @@ if (isFormSent()) { // Free memory SQL_FREERESULT($result); -} +} // END - if -if ((isFormSent()) && (($isFailed === false) || (IS_ADMIN()))) { +if ((isFormSent()) && (($isFailed === false) || (isAdmin()))) { // Prepapre month and day of birth - if (strlen(REQUEST_POST('day')) == 1) REQUEST_SET_POST('day' , '0'.REQUEST_POST('day')); - if (strlen(REQUEST_POST('month')) == 1) REQUEST_SET_POST('month', '0'.REQUEST_POST('month')); + if (strlen(postRequestElement('day')) == 1) setRequestPostElement('day' , '0'.postRequestElement('day')); + if (strlen(postRequestElement('month')) == 1) setRequestPostElement('month', '0'.postRequestElement('month')); // Get total ... // ... confirmed, ... - $confirmedUsers = GET_TOTAL_DATA('CONFIRMED' , 'user_data', 'userid', 'status', true); + $confirmedUsers = countSumTotalData('CONFIRMED' , 'user_data', 'userid', 'status', true); // ... unconfirmed ... - $unconfirmedUsers = GET_TOTAL_DATA('UNCONFIRMED', 'user_data', 'userid', 'status', true); + $unconfirmedUsers = countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true); // ... and locked users! - $lockedUsers = GET_TOTAL_DATA('LOCKED' , 'user_data', 'userid', 'status', true); + $lockedUsers = countSumTotalData('LOCKED' , 'user_data', 'userid', 'status', true); // Generate hash which will be inserted into confirmation mail - $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').REQUEST_POST('month') . '-'.REQUEST_POST('day') . '-'.REQUEST_POST('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('RAND_NUMBER'))); + $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').postRequestElement('month') . '-'.postRequestElement('day') . '-'.postRequestElement('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('CACHE_BUSTER'))); // Add design when extension sql_patches is v0.2.7 or greater // @TODO Rewrite these all to a single filter $ADD1 = ''; $ADD2 = ''; - if (GET_EXT_VERSION('theme') >= '0.0.8') { + if (getExtensionVersion('theme') >= '0.0.8') { // Okay, add design here - $ADD1 = ", `curr_theme`"; + $ADD1 = ', `curr_theme`'; $ADD2 = ", '".getCurrentTheme()."'"; } // END - if // Check if I shall disable sending mail to newly registered members out about active/begging rallye // // First comes first: begging rallye - if (GET_EXT_VERSION('beg') >= '0.1.7') { + if (getExtensionVersion('beg') >= '0.1.7') { // Okay, shall I disable now? if (getConfig('beg_new_mem_notify') != 'Y') { - $ADD1 .= ", `beg_ral_notify`, `beg_ral_en_notify`"; - $ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()"; + $ADD1 .= ', `beg_ral_notify`, `beg_ral_en_notify`'; + $ADD2 .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()'; } // END - if } // END - if // Second: active rallye - if (GET_EXT_VERSION('bonus') >= '0.7.7') { + if (getExtensionVersion('bonus') >= '0.7.7') { // Okay, shall I disable now? if (getConfig('bonus_new_mem_notify') != 'Y') { - $ADD1 .= ", `bonus_ral_notify`, `bonus_ral_en_notify`"; - $ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()"; + $ADD1 .= ', `bonus_ral_notify`, `bonus_ral_en_notify`'; + $ADD2 .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()'; } // END - if } // END - if // Write user data to table - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Save with new selectable country code - $countryRow = "`country_code`"; - $countryData = bigintval(REQUEST_POST('country_code')); + $countryRow = '`country_code`'; + $countryData = bigintval(postRequestElement('country_code')); } else { // Old way with enterable two-char-code - $countryRow = "`country`"; - $countryData = substr(REQUEST_POST('cntry'), 0, 2); + $countryRow = '`country`'; + $countryData = substr(postRequestElement('cntry'), 0, 2); } ////////////////////////////// // 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, - substr(REQUEST_POST('gender'), 0, 1), - REQUEST_POST('surname'), - REQUEST_POST('family'), - REQUEST_POST('street_nr'), + substr(postRequestElement('gender'), 0, 1), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), $countryData, - bigintval(REQUEST_POST('zip')), - REQUEST_POST('city'), - REQUEST_POST('addy'), - bigintval(REQUEST_POST('day')), - bigintval(REQUEST_POST('month')), - bigintval(REQUEST_POST('year')), - generateHash(REQUEST_POST('pass1')), - bigintval(REQUEST_POST('max_mails')), - bigintval(REQUEST_POST('max_mails')), - bigintval(REQUEST_POST('refid')), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + generateHash(postRequestElement('pass1')), + bigintval(postRequestElement('max_mails')), + bigintval(postRequestElement('max_mails')), + bigintval(postRequestElement('refid')), $hash, detectRemoteAddr(), ), __FILE__, __LINE__); @@ -278,139 +266,143 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // Did this work? if ($userid == 0) { // Something bad happened! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED')); + loadTemplate('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED')); return; } // END - if // Is the refback extension there? // @TODO Rewrite this to a filter - if (EXT_IS_ACTIVE('refback')) { + if (isExtensionActive('refback')) { // Update refback table updateRefbackTable($userid); } // 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')", + + // Pay him later. First he has to confirm some mails! + if (getConfig('ref_payout') > 0) $locked = 'locked_points'; + + // @TODO Rewrite this to addPointsDirectly() + 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 - if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($locked == 'points')) { + if ((getExtensionVersion('mediadata') >= '0.0.4') && ($locked == 'points')) { // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'add', getConfig('points_register')); + updateMediadataEntry(array('total_points'), 'add', getConfig('points_register')); } // END - if } // END - if // Write catgories - if ((is_array(REQUEST_POST('cat'))) && (count(REQUEST_POST('cat')))) { - foreach (REQUEST_POST('cat') as $cat => $joined) { + if ((is_array(postRequestElement('cat'))) && (count(postRequestElement('cat')))) { + foreach (postRequestElement('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 } // END - if // Rewrite gender - $gender = translateGender(REQUEST_POST('gender')); + $gender = translateGender(postRequestElement('gender')); // ... rewrite a zero referal ID to the main title - if (REQUEST_POST('refid') == '0') REQUEST_SET_POST('refid', getConfig('MAIN_TITLE')); + if (postRequestElement('refid') == '0') setRequestPostElement('refid', getConfig('MAIN_TITLE')); // Is ZIP code set? - if (REQUEST_ISSET_POST('zip')) { + if (isPostRequestElementSet('zip')) { // Prepare data array for the email template // Start with the gender... - $DATA = array( + $content = array( 'hash' => $hash, - 'uid' => $userid, + 'userid' => $userid, 'gender' => $gender, - 'surname' => SQL_ESCAPE(REQUEST_POST('surname')), - 'family' => SQL_ESCAPE(REQUEST_POST('family')), - 'email' => SQL_ESCAPE(REQUEST_POST('addy')), - 'street' => SQL_ESCAPE(REQUEST_POST('street_nr')), - 'city' => SQL_ESCAPE(REQUEST_POST('city')), - 'zip' => bigintval(REQUEST_POST('zip')), + 'surname' => SQL_ESCAPE(postRequestElement('surname')), + 'family' => SQL_ESCAPE(postRequestElement('family')), + 'email' => SQL_ESCAPE(postRequestElement('email')), + 'street' => SQL_ESCAPE(postRequestElement('street_nr')), + 'city' => SQL_ESCAPE(postRequestElement('city')), + 'zip' => bigintval(postRequestElement('zip')), 'country' => $countryData, - 'refid' => SQL_ESCAPE(REQUEST_POST('refid')), - 'pass' => SQL_ESCAPE(REQUEST_POST('pass1')), + 'refid' => SQL_ESCAPE(postRequestElement('refid')), + 'pass' => SQL_ESCAPE(postRequestElement('pass1')), ); } else { // No ZIP code entered - $DATA = array( + $content = array( 'hash' => $hash, - 'uid' => $userid, + 'userid' => $userid, 'gender' => $gender, - 'surname' => SQL_ESCAPE(REQUEST_POST('surname')), - 'family' => SQL_ESCAPE(REQUEST_POST('family')), - 'email' => SQL_ESCAPE(REQUEST_POST('addy')), - 'street' => SQL_ESCAPE(REQUEST_POST('street_nr')), - 'city' => SQL_ESCAPE(REQUEST_POST('city')), - 'zip' => "", + 'surname' => SQL_ESCAPE(postRequestElement('surname')), + 'family' => SQL_ESCAPE(postRequestElement('family')), + 'email' => SQL_ESCAPE(postRequestElement('email')), + 'street' => SQL_ESCAPE(postRequestElement('street_nr')), + 'city' => SQL_ESCAPE(postRequestElement('city')), + 'zip' => '', 'country' => $countryData, - 'refid' => SQL_ESCAPE(REQUEST_POST('refid')), - 'pass' => SQL_ESCAPE(REQUEST_POST('pass1')), + 'refid' => SQL_ESCAPE(postRequestElement('refid')), + 'pass' => SQL_ESCAPE(postRequestElement('pass1')), ); } // Continue with birthday... switch (getLanguage()) { case 'de': - $DATA['birthday'] = bigintval(REQUEST_POST('day')) . '.' . bigintval(REQUEST_POST('month')) . '.' . bigintval(REQUEST_POST('year')); + $content['birthday'] = bigintval(postRequestElement('day')) . '.' . bigintval(postRequestElement('month')) . '.' . bigintval(postRequestElement('year')); break; default: - $DATA['birthday'] = bigintval(REQUEST_POST('month')) . '/' . bigintval(REQUEST_POST('day')) . '/' . bigintval(REQUEST_POST('year')); + $content['birthday'] = bigintval(postRequestElement('month')) . '/' . bigintval(postRequestElement('day')) . '/' . bigintval(postRequestElement('year')); break; } // END - switch // Display information to the user that he got mail and send it away - $messageGuest = LOAD_EMAIL_TEMPLATE('register-member', $DATA, $userid); + $messageGuest = loadEmailTemplate('register-member', $content, $userid); // Send mail to user (confirmation link!) - $email = $DATA['email']; - sendEmail($DATA['email'], getMessage('GUEST_CONFIRM_LINK'), $messageGuest); - $DATA['email'] = $email; + $email = $content['email']; + sendEmail($content['email'], getMessage('GUEST_SUBJECT_CONFIRM_LINK'), $messageGuest); + $content['email'] = $email; // Send mail to admin - sendAdminNotification(getMessage('ADMIN_NEW_ACCOUNT'), 'register-admin', $DATA, $userid); + sendAdminNotification(getMessage('ADMIN_SUBJECT_NEW_ACCOUNT'), 'register-admin', $content, $userid); // Output success registration - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTRATION_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE')); } else { - if (REQUEST_POST('agree') == '!') { + if (postRequestElement('agree') == '!') { registerOutputFailedMessage('HAVE_TO_AGREE'); } // END - if - if (REQUEST_POST('addy') == '!') { + if (postRequestElement('email') == '!') { registerOutputFailedMessage('ENTER_EMAIL'); - REQUEST_SET_POST('addy', ''); - } elseif (REQUEST_POST('addy') == '?') { + setRequestPostElement('email', ''); + } elseif (postRequestElement('email') == '?') { registerOutputFailedMessage('EMAIL_ALREADY_DB'); - REQUEST_SET_POST('addy', ''); + setRequestPostElement('email', ''); } - if (REQUEST_POST('surname') == '!') { + if (postRequestElement('surname') == '!') { registerOutputFailedMessage('ENTER_SURNAME'); - REQUEST_SET_POST('surname', ''); + setRequestPostElement('surname', ''); } // END - if - if (REQUEST_POST('family') == '!') { + if (postRequestElement('family') == '!') { registerOutputFailedMessage('ENTER_FAMILY'); - REQUEST_SET_POST('family', ''); + setRequestPostElement('family', ''); } // END - if - if ((REQUEST_POST('pass1') == '!') && (REQUEST_POST('pass2') == '!')) { + if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) { registerOutputFailedMessage('ENTER_BOTH_PASSWORDS'); - } elseif (REQUEST_POST('pass1') == '!') { + } elseif (postRequestElement('pass1') == '!') { registerOutputFailedMessage('ENTER_PASS1'); - } elseif (REQUEST_POST('pass2') == '!') { + } elseif (postRequestElement('pass2') == '!') { registerOutputFailedMessage('ENTER_PASS2'); } @@ -429,68 +421,54 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // Generate birthday selection switch (getLanguage()) { case 'de': // German date format - define('BIRTHDAY_SELECTION', ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('year', REQUEST_POST('year'))); + $content['birthday_selection'] = addSelectionBox('day', postRequestElement('day')).addSelectionBox('month', postRequestElement('month')).addSelectionBox('year', postRequestElement('year')); break; default: // Default is the US date format... :) - define('BIRTHDAY_SELECTION', ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('year', REQUEST_POST('year'))); + $content['birthday_selection'] = addSelectionBox('month', postRequestElement('month')).addSelectionBox('day', postRequestElement('day')).addSelectionBox('year', postRequestElement('year')); break; } // Adds a table for the guests with all visible categories - define('CATEGORY_SELECTION', registerGenerateCategoryTable('guest', true)); + $content['category_selection'] = registerGenerateCategoryTable('guest', true); // Adds maximum receiveable mails list... :) - define('MAX_RECEIVE_LIST', addMaxReceiveList('guest', '', true)); + $content['max_receive_list'] = addMaxReceiveList('guest', '', true); // Shall I display the refid or shall I make it editable? if (getConfig('display_refid') == 'Y') { // Load "hide" form template - define('REFID_CONTENT', LOAD_TEMPLATE('guest_register_refid_hide', true, $GLOBALS['refid'])); + $content['refid_content'] = loadTemplate('guest_register_refid_hide', true, determineReferalId()); } else { // Load template to enter it - define('REFID_CONTENT', LOAD_TEMPLATE('guest_register_refid', true, $GLOBALS['refid'])); + $content['refid_content'] = loadTemplate('guest_register_refid', true, determineReferalId()); } // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-) - define('REGISTER_HEADER_CONTENT', LOAD_TEMPLATE('register_header', true)); - - // Please select at least x categories - define('LEAST_CATS_VALUE', getConfig('least_cats')); + $content['header_content'] = loadTemplate('register_header', true); // Other values - define('__SURNAME', SQL_ESCAPE(REQUEST_POST('surname'))); - define('__FAMILY', SQL_ESCAPE(REQUEST_POST('family'))); - define('__STREET', SQL_ESCAPE(REQUEST_POST('street_nr'))); - define('__COUNTRY', SQL_ESCAPE(REQUEST_POST('cntry'))); - if ((REQUEST_ISSET_POST('zip')) && (REQUEST_POST('zip') != '')) { - define('__ZIP', bigintval(REQUEST_POST('zip'))); - } else { - define('__ZIP', ''); - } - define('__CITY', SQL_ESCAPE(REQUEST_POST('city'))); - define('__ADDY', SQL_ESCAPE(REQUEST_POST('addy'))); - - // Shall I add a counrty selection box or the old input box? - if (EXT_IS_ACTIVE('country')) { - // New variant, good! - $OUT = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n"; - $whereStatement = "WHERE `is_active`='Y'"; - if (IS_ADMIN()) $whereStatement = ''; - $OUT .= generateOptionList('countries', 'id', 'descr', REQUEST_POST('country_code'), 'code', $whereStatement); - $OUT .= "</select>"; - define('__COUNTRY_CONTENT', $OUT); - } else { - // Old out-dated variant - define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"guest_normal\" size=\"2\" maxlength=\"3\" value=\"{!__COUNTRY!}\" />"); - } - - // Set MUST_??? constants - if ((EXT_IS_ACTIVE('register')) && (GET_EXT_VERSION('register') > '0.0')) registerMustFillout(); + $content['surname'] = SQL_ESCAPE(postRequestElement('surname')); + $content['family'] = SQL_ESCAPE(postRequestElement('family')); + $content['street_nr'] = SQL_ESCAPE(postRequestElement('street_nr')); + $content['zip'] = bigintval(postRequestElement('zip')); + $content['city'] = SQL_ESCAPE(postRequestElement('city')); + $content['email'] = SQL_ESCAPE(postRequestElement('email')); + + // Prepare country selection box + $OUT = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n"; + $whereStatement = "WHERE `is_active`='Y'"; + if (isAdmin()) $whereStatement = ''; + $OUT .= generateOptionList('countries', 'id', 'descr', postRequestElement('country_code'), 'code', $whereStatement); + $OUT .= "</select>"; + $content['country'] = $OUT; + + // Set must-fillout fields + $content = runFilterChain('register_must_fillout', $content); // Display registration form - LOAD_TEMPLATE('guest_register'); + loadTemplate('guest_register', false, $content); } -// +// [EOF] ?> diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index 05d1ea5826..38cc054f75 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,15 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if -// +// [EOF] ?> diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 7b20ab7fb4..0e72d18ace 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,25 +38,26 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if // Init both results (see footer of this file) $result_act = false; $result_pay = false; // 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 +$result_act = SQL_QUERY("SELECT 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 WHERE m.`action`='actions' AND r.is_active='Y' ORDER BY m.sort ASC", __FILE__, __LINE__); @@ -73,12 +75,12 @@ if (SQL_NUMROWS($result_act) > 0) { ); // Load row template and switch color - $OUT_ACT .= LOAD_TEMPLATE("guest_sponsor_act_row", true, $content); + $OUT_ACT .= loadTemplate('guest_sponsor_act_row', true, $content); $SW = 3 - $SW; } // 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; @@ -95,17 +97,17 @@ if (SQL_NUMROWS($result_act) > 0) { ); // Load row template and switch color - $OUT_PAY .= LOAD_TEMPLATE("guest_sponsor_pay_row", true, $content); + $OUT_PAY .= loadTemplate('guest_sponsor_pay_row', true, $content); $SW = 3 - $SW; } } else { // No pay types setuped so far! - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } } else { // No actions activated so far! - $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_ACT = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = loadTemplate('guest_sponsor_infos_none_row', loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } // Free memory @@ -119,7 +121,7 @@ $content = array( ); // Load main template -LOAD_TEMPLATE("guest_sponsor_infos", false, $content); +loadTemplate('guest_sponsor_infos', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 865d076cb8..2a7df6cfac 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,36 +38,39 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if $mode = ''; -if (REQUEST_ISSET_GET('mode')) { +if (isGetRequestElementSet('mode')) { // A "special" mode of the login system was requested - switch (REQUEST_GET('mode')) - { + switch (getRequestElement('mode')) { case 'activate' : $mode = 'activate'; break; // Activation link requested case 'lost_pass': $mode = 'lost_pass'; break; // Request new password - } + } // END - switch } // END - if // Check if hash for confirmation of email address is given... -if (REQUEST_ISSET_GET('hash')) { +if (isGetRequestElementSet('hash')) { // Lookup sponsor - $result = SQL_QUERY_ESC("SELECT id, status, gender, surname, family, -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` -WHERE hash='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') -LIMIT 1", array(REQUEST_GET('hash')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT + `id`, `status`, `gender`, `surname`, `family`, + `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` +WHERE + `hash='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') +LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Sponsor found, load his data... $SPONSOR = SQL_FETCHARRAY($result); @@ -79,46 +83,46 @@ LIMIT 1", array(REQUEST_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']), REQUEST_GET('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { // Prepare mail and send it to the sponsor - $message = LOAD_EMAIL_TEMPLATE('sponsor_pending', $SPONSOR); + $message = loadEmailTemplate('sponsor_pending', $SPONSOR); sendEmail($SPONSOR['email'], getMessage('SPONSOR_ACCOUNT_PENDING_SUBJ'), $message); // Send email to admin sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), 'admin_sponsor_pending', $SPONSOR); // Sponsor account set to pending - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_PENDING')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_PENDING')); } else { // Could not unlock account! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED')); } } 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']), REQUEST_GET('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { // Sponsor account is unlocked again - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN')); } else { // Could not unlock account! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED')); } } else { /// ??? Other status? - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED')); } } else { // No sponsor found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_NOT_FOUND')); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestElement('hash'))); } // Free memory @@ -127,15 +131,15 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", // Send activation link again if (isFormSent()) { // Check submitted data - if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); } if (isFormSent()) { // 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(REQUEST_POST('email')), __FILE__, __LINE__); + array(postRequestElement('email')), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -149,39 +153,39 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", // Prepare email and send it to the sponsor if ($SPONSOR['status'] == 'UNCONFIRMED') { // Unconfirmed accounts - $message_sponsor = LOAD_EMAIL_TEMPLATE('sponsor_activate', $SPONSOR); + $message_sponsor = loadEmailTemplate('sponsor_activate', $SPONSOR); } else { // Confirmed email address - $message_sponsor = LOAD_EMAIL_TEMPLATE('sponsor_email', $SPONSOR); + $message_sponsor = loadEmailTemplate('sponsor_email', $SPONSOR); } - sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); + sendEmail(postRequestElement('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); } else { // No account found or not UNCONFIRMED - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_404')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_404')); } // Free memory SQL_FREERESULT($result); } else { // Load form - LOAD_TEMPLATE('guest_sponsor_activate'); + loadTemplate('guest_sponsor_activate'); } } elseif ($mode == 'lost_pass') { // Send new password if (isFormSent()) { // Check submitted data - if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); } // END - if if (isFormSent()) { // 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(REQUEST_POST('email'), bigintval(REQUEST_POST('id'))), __FILE__, __LINE__); + array(postRequestElement('email'), bigintval(postRequestElement('id'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -196,40 +200,40 @@ WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1", $DATA['password'] = generatePassword(); // Prepare email and send it to the sponsor - $message_sponsor = LOAD_EMAIL_TEMPLATE('sponsor_lost', $DATA); - sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor); + $message_sponsor = loadEmailTemplate('sponsor_lost', $DATA); + sendEmail(postRequestElement('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_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($DATA['password']), bigintval($DATA['id'])), __FILE__, __LINE__); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT')); } else { // No account found or not UNCONFIRMED - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_404')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_404')); } // Free memory SQL_FREERESULT($result); } else { // Load form - LOAD_TEMPLATE('guest_sponsor_lost'); + loadTemplate('guest_sponsor_lost'); } } elseif (isFormSent()) { // 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(REQUEST_POST('sponsorid')), md5(REQUEST_POST('pass'))), __FILE__, __LINE__); + array(bigintval(postRequestElement('sponsorid')), md5(postRequestElement('pass'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Okay, first login data check passed, now has he/she an approved (CONFIRMED) account? list($status) = SQL_FETCHROW($result); if ($status == 'CONFIRMED') { // Is confirmed so both is fine and we can continue with login procedure - $login = ((setSession('sponsorid' , bigintval(REQUEST_POST('sponsorid')))) && - (setSession('sponsorpass', md5(REQUEST_POST('pass')) )) + $login = ((setSession('sponsorid' , bigintval(postRequestElement('sponsorid')))) && + (setSession('sponsorpass', md5(postRequestElement('pass')) )) ); if ($login === true) { @@ -237,32 +241,32 @@ WHERE `id`='%s' AND password='%s' LIMIT 1", redirectToUrl('modules.php?module=sponsor'); } else { // Cookie setup failed! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED')); // Login formular and other links - LOAD_TEMPLATE('guest_sponsor_login'); + loadTemplate('guest_sponsor_login'); } } else { // Status is not fine - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_' . strtoupper($status) . '')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_' . strtoupper($status) . '')); // Login formular and other links - LOAD_TEMPLATE('guest_sponsor_login'); + loadTemplate('guest_sponsor_login'); } } else { // Account missing or wrong pass! We shall not find this out for the "cracker folks"... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS')); // Login formular and other links - LOAD_TEMPLATE('guest_sponsor_login'); + loadTemplate('guest_sponsor_login'); } // Free memory SQL_FREERESULT($result); } else { // Login formular and other links - LOAD_TEMPLATE('guest_sponsor_login'); + loadTemplate('guest_sponsor_login'); } -// +// [EOF] ?> diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 642264f4a7..35fdaeec1e 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,15 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; + die(); } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if // Create array for form errors (= missing data) $FORM_ERRORS = array(); @@ -55,145 +57,145 @@ if (isFormSent()) { // Check submitted form data // // 1. Salutation / Surname / family name - if (!REQUEST_ISSET_POST('gender')) { + if (!isPostRequestElementSet('gender')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_NO_GENDER_SELECTED'); } // END - if - if (!REQUEST_ISSET_POST('surname')) { + if (!isPostRequestElementSet('surname')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_SURNAME_IS_EMPTY'); } // END - if - if (!REQUEST_ISSET_POST('family')) { + if (!isPostRequestElementSet('family')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_FAMILY_IS_EMPTY'); } // END - if // 2. Company name // 012 3 32 23 4 43 3 4 4321 12 3 32 2 3 3210 - if (((!REQUEST_ISSET_POST('company')) && ((REQUEST_ISSET_POST('tax_ident')) || (REQUEST_ISSET_POST('position')))) || ((REQUEST_ISSET_POST('company')) && (!REQUEST_ISSET_POST('tax_ident')))) { - if (!REQUEST_ISSET_POST('company')) { + if (((!isPostRequestElementSet('company')) && ((isPostRequestElementSet('tax_ident')) || (isPostRequestElementSet('position')))) || ((isPostRequestElementSet('company')) && (!isPostRequestElementSet('tax_ident')))) { + if (!isPostRequestElementSet('company')) { // Company name is empty $FORM_ERRORS[] = getMessage('SPONSOR_COMPANY_IS_EMPTY'); - } elseif (!REQUEST_ISSET_POST('tax_ident')) { + } elseif (!isPostRequestElementSet('tax_ident')) { // Tax ident number name is empty $FORM_ERRORS[] = getMessage('SPONSOR_TAX_IDENT_IS_EMPTY'); } - if (!REQUEST_ISSET_POST('position')) { + if (!isPostRequestElementSet('position')) { // Not fatal but not nice: position in company is empty $FORM_ERRORS[] = getMessage('SPONSOR_POSITION_IS_EMPTY'); } // END - if } // END - if // 3. Street and number - if (!REQUEST_ISSET_POST('street_nr1')) { + if (!isPostRequestElementSet('street_nr1')) { // Street name and house number are empty $FORM_ERRORS[] = getMessage('SPONSOR_STREET_NR1_IS_EMPTY'); - } elseif ((REQUEST_ISSET_POST('street_nr2')) && (!REQUEST_ISSET_POST('street_nr1'))) { + } elseif ((isPostRequestElementSet('street_nr2')) && (!isPostRequestElementSet('street_nr1'))) { // 1st line for street is empty, but 2nd line not $FORM_ERRORS[] = getMessage('SPONSOR_STREET_NR1_IS_EMPTY_2_NOT'); } // 4. Country code - if (!REQUEST_ISSET_POST('country')) { + if (!isPostRequestElementSet('country')) { // Country code is empty $FORM_ERRORS[] = getMessage('SPONSOR_COUNTRY_IS_EMPTY'); - } elseif (strlen(REQUEST_POST('country')) != 2) { + } elseif (strlen(postRequestElement('country')) != 2) { // Country code is invalid $FORM_ERRORS[] = getMessage('SPONSOR_COUNTRY_IS_INVALID'); } // 3. ZIP code - if (!REQUEST_ISSET_POST('zip')) { + if (!isPostRequestElementSet('zip')) { // ZIP code is empty $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_EMPTY'); - } elseif (bigintval(REQUEST_POST('zip')) != REQUEST_POST('zip')) { + } elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) { // ZIP is invalid $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID'); - REQUEST_SET_POST('zip', ''); + setRequestPostElement('zip', ''); } // 4. City - if (!REQUEST_ISSET_POST('city')) { + if (!isPostRequestElementSet('city')) { // City is empty $FORM_ERRORS[] = getMessage('SPONSOR_CITY_IS_EMPTY'); } // END - if // 5. Phone number - if (!REQUEST_ISSET_POST('phone')) { + if (!isPostRequestElementSet('phone')) { // City is empty $FORM_ERRORS[] = getMessage('SPONSOR_PHONE_IS_EMPTY'); } // END - if // 6. Homepage URL - if (!REQUEST_ISSET_POST('url')) { + if (!isPostRequestElementSet('url')) { // Homepage URL is empty $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_EMPTY'); - } elseif (!isUrlValid(REQUEST_POST('url'))) { + } elseif (!isUrlValid(postRequestElement('url'))) { // Homepage URL is invalid $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_INVALID'); - REQUEST_SET_POST('url', ''); + setRequestPostElement('url', ''); } // 7. Light validation of email address - if ((!REQUEST_ISSET_POST('email')) || (REQUEST_POST('email') == '@')) { + if ((!isPostRequestElementSet('email')) || (postRequestElement('email') == '@')) { // Email is invalid/empty $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_INVALID'); - } elseif (SPONSOR_FOUND_EMAIL_DB(REQUEST_POST('email'))) { + } elseif (isSponsorRegisteredWithEmail(postRequestElement('email'))) { // Email already found in database! $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_ALREADY_REGISTERED'); - REQUEST_SET_POST('email', ''); + setRequestPostElement('email', ''); } // 8. Pay type selected? - if (!REQUEST_ISSET_POST('pay_type')) { + if (!isPostRequestElementSet('pay_type')) { // Not pay type selected $FORM_ERRORS[] = getMessage('SPONSOR_NO_PAYTYPE_SELECTED'); } // END - if // 9. Interval of mails - if (!REQUEST_ISSET_POST('warning_interval')) { + if (!isPostRequestElementSet('warning_interval')) { // No warning interval selected $FORM_ERRORS[] = getMessage('SPONSOR_NO_WARNING_INTERVAL_SELECTED'); } // END - if // 10. Mail notifications disabled/enabled - if (!REQUEST_ISSET_POST('receive_warnings')) { + if (!isPostRequestElementSet('receive_warnings')) { // Option not selected! $FORM_ERRORS[] = getMessage('SPONSOR_NO_RECEIVE_WARNINGS_SELECTED'); } // END - if // Did he enter his password twice? - if (((!REQUEST_ISSET_POST('pass1')) || (!REQUEST_ISSET_POST('pass2'))) || ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')))) { - if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2'))) { + if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { + if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { // Passwords missmatch $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORDS_MISMATCH'); } else { - if (!REQUEST_ISSET_POST('pass1')) { + if (!isPostRequestElementSet('pass1')) { // Password 1 is empty $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD1_EMPTY'); } - if (!REQUEST_ISSET_POST('pass2')) { + if (!isPostRequestElementSet('pass2')) { // Password 2 is empty $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD2_EMPTY'); } } - } elseif (strlen(REQUEST_POST('pass1')) < getConfig('pass_len')) { + } elseif (strlen(postRequestElement('pass1')) < getConfig('pass_len')) { // Password is to short! $FORM_ERRORS[] = sprintf(getMessage('SPONSOR_PASSWORD_TOO_SHORT'), getConfig('pass_len')); } // Check if he has accepted the terms&conditions - if (!REQUEST_ISSET_POST('terms')) { + if (!isPostRequestElementSet('terms')) { // Homepage URL is empty $FORM_ERRORS[] = getMessage('SPONSOR_TERMS_NOT_ACCEPTED'); } // END - if // If there is something wrong/missing stop registration - if (count($FORM_ERRORS) > 0) REQUEST_UNSET_POST('ok'); + if (count($FORM_ERRORS) > 0) unsetPostRequestElement('ok'); } if ((isFormSent()) && (count($FORM_ERRORS) == 0)) { @@ -205,46 +207,46 @@ if ((isFormSent()) && (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(REQUEST_POST('pay_type')), __FILE__, __LINE__); + array(postRequestElement('pay_type')), __FILE__, __LINE__); list($points, $pay, $curr) = SQL_FETCHROW($result); // Free memory SQL_FREERESULT($result); // Add points to array - REQUEST_POST('points_amount', $points); - REQUEST_POST('points_used' , '0.00000'); - REQUEST_POST('last_pay' , $pay); - REQUEST_POST('last_curr' , $curr); + postRequestElement('points_amount', $points); + postRequestElement('points_used' , '0.00000'); + postRequestElement('last_pay' , $pay); + postRequestElement('last_curr' , $curr); // Register sponsor but never ever update here! - $STATUS = SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY(), true, $messageArray, true); + $STATUS = handlSponsorRequest(postRequestArray(), true, $messageArray, true); // Check the status of the registration process switch ($STATUS) { 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", - array(REQUEST_POST('email')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `email`='%s' LIMIT 1", + array(postRequestElement('email')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ID found so let's load it for the confirmation email list($id, $hash) = SQL_FETCHROW($result); // Prepare data for the email template - define('__ID' , $id); - define('__HASH' , $hash); - define('__EMAIL' , REQUEST_POST('email')); - define('__SURNAME' , REQUEST_POST('surname')); - define('__FAMILY' , REQUEST_POST('family')); - define('__GENDER' , translateGender(REQUEST_POST('gender'))); - define('__TIMESTAMP', generateDateTime(time(), 0)); - define('__PASSWORD' , REQUEST_POST('pass1')); + $content['id'] = $id; + $content['hash'] = $hash; + $content['email'] = secureString(postRequestElement('email')); + $content['surname'] = secureString(postRequestElement('surname')); + $content['family'] = secureString(postRequestElement('family')); + $content['gender'] = translateGender(postRequestElement('gender')); + $content['timestamp'] = generateDateTime(time(), '0'); + $content['password'] = secureString(postRequestElement('pass1')); // Generate email and send it to the new sponsor - $EMAIL_MSG = LOAD_EMAIL_TEMPLATE('sponsor_confirm', $hash); - sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $EMAIL_MSG); + $message = loadEmailTemplate('sponsor_confirm', $hash); + sendEmail(postRequestElement('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $message); // Send mail to admin sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), 'admin_sponsor_reg', $hash); @@ -253,7 +255,7 @@ WHERE `id`='%s' LIMIT 1", $message = $messageArray['added']; } else { // Sponsor account not found??? - $message = sprintf(getMessage('SPONSOR_EMAIL_404'), REQUEST_POST('email')); + $message = sprintf(getMessage('SPONSOR_EMAIL_404'), postRequestElement('email')); } // Free memory @@ -261,8 +263,8 @@ WHERE `id`='%s' LIMIT 1", break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS)); - if (!IS_ADMIN()) { + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS)); + if (!isAdmin()) { // Message for testing admin $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS); } else { @@ -273,11 +275,11 @@ WHERE `id`='%s' LIMIT 1", } // Display message - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } 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... @@ -290,121 +292,73 @@ ORDER BY `pay_name`", __FILE__, __LINE__); $content['res'] = translateComma($content['pay_rate'] * $content['pay_min_count']); // Load row template and switch color - $OUT .= LOAD_TEMPLATE('guest_sponsor_payment_row', false, $content); + $OUT .= loadTemplate('guest_sponsor_payment_row', false, $content); $SW = 3 - $SW; } $OUT .= "</table>\n"; - // @TODO Rewrite this constant - define('__PAYMENT_LIST', $OUT); + // Remember the list in table + $content['payment_list'] = $OUT; + + // Init a lot array elements + foreach (array('company','position','tax_ident','gender_m','gender_f','gender_c','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url','rec_y','rec_n','form_errors','refid') as $entry) { + $content[$entry] = ''; + } // END - foreach // Check for invalid entries if (count($FORM_ERRORS) > 0) { // Some found... :-( - // @TODO Rewrite these constants - define('__COMPANY' , COMPILE_CODE(REQUEST_POST('company'))); - define('__POSITION' , COMPILE_CODE(REQUEST_POST('position'))); - define('__TAX_IDENT', COMPILE_CODE(REQUEST_POST('tax_ident'))); - define('__SURNAME' , COMPILE_CODE(REQUEST_POST('surname'))); - define('__FAMILY' , COMPILE_CODE(REQUEST_POST('family'))); - define('__STREET1' , COMPILE_CODE(REQUEST_POST('street_nr1'))); - define('__STREET2' , COMPILE_CODE(REQUEST_POST('street_nr2'))); - define('__COUNTRY' , COMPILE_CODE(REQUEST_POST('country'))); - define('__ZIP' , COMPILE_CODE(REQUEST_POST('zip'))); - define('__CITY' , COMPILE_CODE(REQUEST_POST('city'))); - define('__PHONE' , COMPILE_CODE(REQUEST_POST('phone'))); - define('__FAX' , COMPILE_CODE(REQUEST_POST('fax'))); - define('__CELL' , COMPILE_CODE(REQUEST_POST('cell'))); - define('__EMAIL' , COMPILE_CODE(REQUEST_POST('email'))); - define('__URL' , COMPILE_CODE(REQUEST_POST('url'))); + foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url') as $entry) { + $content[$entry] = secureString(postRequestElement($entry)); + } // END - foreach + + // Init gender + foreach (array('m', 'f', 'c') as $gender) { + $content['gender_' . $gender] = ''; + } // END - foreach // Check for gender selection - switch (REQUEST_POST('gender')) { - case 'M': // Male - define('__GENDER_M' , ' selected="selected"'); - define('__GENDER_F' , ''); - define('__GENDER_C' , ''); - break; - - case 'F': // Female - define('__GENDER_M' , ''); - define('__GENDER_F' , ' selected="selected"'); - define('__GENDER_C' , ''); - break; - - case 'C': // Company - define('__GENDER_M' , ''); - define('__GENDER_F' , ''); - define('__GENDER_C' , ' selected="selected"'); - break; - } // END - if + $content['gender_' . strtolower(postRequestElement('gender'))] = ' selected="selected"'; - // Check for receive_warnings - switch (REQUEST_POST('receive_warnings')) { - case 'Y': - define('__REC_Y' , ' selected="selected"'); - define('__REC_N' , ''); - break; - - case 'N': - define('__REC_Y' , ''); - define('__REC_N' , ' selected="selected"'); - break; - } // END - if + // Init receive selection + $content['rec_y'] = ''; + $content['rec_n'] = ''; - // Errors found - $OUT = "<P align=\"center\"> - <strong><div class=\"guest_failed\">".SPONSOR_REGISTER_SOMETHING_MISSING.":</div></strong><br /> -</P> + // Check for receive_warnings + $content['rec_' . strtolower(postRequestElement('receive_warnings'))] = ' selected="selected"'; + $OUT = ''; + + // Errors found? + if (count($FORM_ERRORS) > 0) { + $OUT = "<div align=\"center\"> + <strong><div class=\"guest_failed\">".getMessage('SPONSOR_REGISTER_SOMETHING_MISSING').":</div></strong><br /> +</div> <ol>\n"; - foreach ($FORM_ERRORS as $error) { - $OUT .= "<li>".$error."</li>\n"; + foreach ($FORM_ERRORS as $error) { + $OUT .= "<li>".$error."</li>\n"; + } // END - foreach + + $OUT .= "</ol><br />\n"; } // END - if - $OUT .= "</ol><br />\n"; - define('__SPONSOR_FORM_ERRORS', $OUT); - define('__SPONSOR_REFID', REQUEST_POST('refid')); - } else { - // None found, first call - define('__COMPANY' , ''); - define('__POSITION' , ''); - define('__TAX_IDENT', ''); - define('__GENDER_M' , ''); - define('__GENDER_F' , ''); - define('__GENDER_C' , ''); - define('__SURNAME' , ''); - define('__FAMILY' , ''); - define('__STREET1' , ''); - define('__STREET2' , ''); - define('__COUNTRY' , ''); - define('__ZIP' , ''); - define('__CITY' , ''); - define('__PHONE' , ''); - define('__FAX' , ''); - define('__CELL' , ''); - define('__EMAIL' , ''); - define('__URL' , ''); - define('__REC_Y' , ''); - define('__REC_N' , ''); - - // No errors found so far - define('__SPONSOR_FORM_ERRORS', ''); - } + $content['form_errors'] = $OUT; + $content['refid'] = bigintval(postRequestElement('refid')); + } // END - if // Prepare referal things - if (!REQUEST_ISSET_GET('refid')) { - // No referal link - define('__SPONSOR_REFID', '0'); - } else { + if (isGetRequestElementSet('refid')) { // Referal ID transmitted, we don't care here if it is right or not - define('__SPONSOR_REFID', bigintval(REQUEST_GET('refid'))); + $content['refid'] = bigintval(getRequestElement('refid')); + } else { + // No referal link + $content['refid'] = '0'; } // Display registration form - LOAD_TEMPLATE('guest_sponsor_reg'); + loadTemplate('guest_sponsor_reg', false, $content); } else { // Nothing added so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY')); + loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY')); } // Free memory diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 24cb58bfd3..44770bda67 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,53 +38,57 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); // Derterminate which stats we want and set mode and title for the link below stats block -if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', strtolower(getConfig('guest_stats'))); +if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', strtolower(getConfig('guest_stats'))); + +// Set config temporarily +setConfigEntry('guest_stats', strtoupper(getRequestElement('mode'))); -switch (REQUEST_GET('mode')) { +switch (getRequestElement('mode')) { case 'members' : - setConfigEntry('guest_stats', 'MEMBERS'); $lmode = 'modules'; - $ltitle = getMessage('GUEST_STATS_MODULES'); break; case 'modules' : - setConfigEntry('guest_stats', 'MODULES'); $lmode = 'members'; - $ltitle = getMessage('GUEST_STATS_MEMBERS'); break; case 'inactive': - setConfigEntry('guest_stats', 'INACTIVE'); $lmode = 'inactive'; - $ltitle = getMessage('GUEST_STATS_INACTIVE'); + break; + + default: + // Unsupported mode + debug_report_bug(sprintf("Unsupported mode <strong>%s</strong> detected.", secureString(getRequestElement('mode')))); break; } -switch (getConfig('guest_stats')) -{ +// Set link title +$ltitle = getMessage('GUEST_STATS_' . strtoupper($lmode)); + +// @TODO This can be rewritten in a dynamic include +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 >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__)); - $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__)); + $ymem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__)); + $tmem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__)); // Yesterday / today registered - $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_YDAY')." AND joined < ".getConfig('START_TDAY'), __FILE__, __LINE__)); - $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_TDAY'), __FILE__, __LINE__)); + $yreg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= ".getConfig('START_YDAY')." AND `joined` < ".getConfig('START_TDAY'), __FILE__, __LINE__)); + $treg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= ".getConfig('START_TDAY'), __FILE__, __LINE__)); // Only males / females - $male = GET_TOTAL_DATA('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); - $female = GET_TOTAL_DATA('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); + $male = countSumTotalData('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); + $female = countSumTotalData('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); // 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; @@ -99,38 +103,38 @@ switch (getConfig('guest_stats')) if ($idx < 10) $month = '0'.$idx; // Count months - $months[$month] = GET_TOTAL_DATA(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'"); - } + $months[$month] = countSumTotalData(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'"); + } // END - for // 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` ASC", __FILE__, __LINE__); // Load categories first $cats = array(); $cat_cnt = array(); + // @TODO This can be somehow rewritten while ($content = SQL_FETCHARRAY($result)) { // Simple... $cats[$content['id']] = $content['cat']; - } + } // END - while // Now we have all categories loaded, count members foreach ($cats as $id => $dummy) { // We only need id and nothing more to count... - $cat_cnt[$id] = GET_TOTAL_DATA(bigintval($id), 'user_cats', 'id', 'cat_id', true); - } + $cat_cnt[$id] = countSumTotalData(bigintval($id), 'user_cats', 'id', 'cat_id', true); + } // END - foreach // Prepare data for the template - // @TODO Rewrite all these constants - define('__TOTAL_USERS' , $total); - define('__UNCONFIRMED' , $unconfirmed); - define('__MALE_COUNT' , $male); - define('__FEMALE_COUNT', $female); - define('__TMEM_COUNT' , $tmem); - define('__YMEM_COUNT' , $ymem); - define('__TREG_COUNT' , $treg); - define('__YREG_COUNT' , $yreg); - define('__LMODE_VALUE' , $lmode); - define('__LINK_TITLE' , $ltitle); + $content['total_users'] = $total; + $content['unconfirmed'] = $unconfirmed; + $content['total_males'] = $male; + $content['total_females'] = $female; + $content['tmem_count'] = $tmem; + $content['ymem_count'] = $ymem; + $content['treg_count'] = $treg; + $content['yreg_count'] = $yreg; + $content['lmode'] = $lmode; + $content['ltitle'] = $ltitle; // Generate monthly stats $SW = 2; $r2 = ' right2'; $l = 'll'; $r = 'lr'; $OUT = ''; @@ -138,16 +142,16 @@ switch (getConfig('guest_stats')) if ($SW == 2) $OUT .= "<tr>\n"; // Prepare data for template - $content = array( - 'l_class' => $l, - 'm_descr' => $GLOBALS['month_descr'][$month], - 'r_class' => $r, - 'r2_class' => $r2, - 'cnt' => $cnt + $data = array( + 'l_class' => $l, + 'm_descr' => $GLOBALS['month_descr'][$month], + 'r_class' => $r, + 'r2_class' => $r2, + 'cnt' => $cnt ); // Load row template - $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content); + $OUT .= loadTemplate('guest_stats_month_row', true, $data); if ($SW == 2) { $r2 = ''; @@ -159,88 +163,84 @@ switch (getConfig('guest_stats')) } $SW = 3 - $SW; } - define('__MONTH_STATS_ROWS', $OUT); + $content['month_rows'] = $OUT; // Generate category stats $OUT = ''; $SW = 2; foreach ($cat_cnt as $id => $cnt) { // Prepare data for the template - $content = array( - 'sw' => $SW, - 'cat' => $cats[$id], - 'cnt' => $cnt, + $data = array( + 'sw' => $SW, + 'cat' => $cats[$id], + 'cnt' => $cnt, ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('guest_stats_cats_row', true, $content); + $OUT .= loadTemplate('guest_stats_cats_row', true, $data); $SW = 3 - $SW; } - define('__CATS_STATS_ROWS', $OUT); + $content['cats_rows'] = $OUT; // Load final template - LOAD_TEMPLATE('guest_stats_member'); + loadTemplate('guest_stats_member', false, $content); break; 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__); - $OUT = ''; - if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) { - // Output header - // @TODO Rewrite this to one template and $OUT .= .... - OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\"> -<tr> - <td align=\"center\" class=\"guest_stats_title bottom2\" colspan=\"2\"><strong>{--GUEST_TOPTEN_STATS--}</strong></td> -</tr>"); - } + // Admins may see all menus + $AND = " AND `locked`='N' AND `visible`='Y'"; + if (isAdmin()) $AND = ''; + + // Query for guest and member menus + $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__); + $OUT = ''; if (SQL_NUMROWS($guest_t10) > 0) { // Guest clicks - OUTPUT_HTML("<tr> - <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_GUEST_STATS--}</td> -</tr>"); + $OUT .= loadTemplate('guest_stats_header', true, getMessage('GUEST_TOP_GUEST_STATS')); $SW = 2; while ($content = SQL_FETCHARRAY($guest_t10)) { - OUTPUT_HTML("<tr> - <td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']." </td> - <td class=\"switch_sw".$SW." bottom2\" width=\"50\"> ".$content['counter']."</td> -</tr>"); + $content['sw'] = $SW; + + // Load row template + $OUT .= loadTemplate('guest_stats_row', true, $content); $SW = 3 - $SW; - } - } + } // END - while + } // END - if - if (SQL_NUMROWS($guest_t10) > 0) { - // Guest clicks - OUTPUT_HTML("<tr> - <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_MEMBER_STATS--}</td> -</tr>"); + if (SQL_NUMROWS($mem_t10) > 0) { + // Member clicks + $OUT .= loadTemplate('guest_stats_header', true, getMessage('GUEST_TOP_MEMBER_STATS')); $SW = 2; while ($content = SQL_FETCHARRAY($mem_t10)) { - OUTPUT_HTML("<tr> - <td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']." </td> - <td class=\"switch_sw".$SW." bottom2\" width=\"50\"> ".$content['counter']."</td> -</tr>"); + $content['sw'] = $SW; + + // Load row template + $OUT .= loadTemplate('guest_stats_row', true, $content); $SW = 3 - $SW; - } - } + } // END - while + } // END - if if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) { - // Output footer - OUTPUT_HTML("<tr> - <td align=\"center\" class=\"guest_stats_footer\" colspan=\"2\"> - <a href=\"{?URL?}/modules.php?module=index&what=stats&mode=".$lmode."\">".$ltitle."</a> - </td> -</tr> -</table>"); + // Prepare content + $content = array( + 'rows' => $OUT, + 'lmode' => $lmode, + 'ltitle' => $ltitle + ); + + // Load final template + loadTemplate('guest_stats_table', false, $content); + } else { + // No clicks detected + loadTemplate('admin_settings_saved', false, getMessage('GUEST_STATS_NO_CLICKS')); } break; case 'INACTIVE': // Deactivated stats - LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>"); + loadTemplate('admin_settings_saved', false, getMessage('GUEST_STATS_DEACTIVATED')); break; } -// +// [EOF] ?> diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 569721e6d7..d3c8a06673 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,31 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('top10')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('top10')); - return; -} + die(); +} // END - if // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('top10')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('top10')); + return; +} // END - if + +// Init array +$rows = array(); //// TOP logins -$result = SQL_QUERY_ESC(" -SELECT - userid, total_logins, last_online +$result = SQL_QUERY("SELECT + `userid`, `total_logins`, `last_online` FROM - {!_MYSQL_PREFIX!}_user_data + `{?_MYSQL_PREFIX?}_user_data` WHERE - total_logins > 0 AND + `total_logins` > 0 AND `status`='CONFIRMED' ORDER BY - total_logins DESC -LIMIT %s", -array(getConfig('top10_max')), __FILE__, __LINE__); + `total_logins` DESC +LIMIT {?top10_max?}", __FILE__, __LINE__); $OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { @@ -68,22 +70,21 @@ while ($content = SQL_FETCHARRAY($result)) { $content['nickname'] = '---'; // Get nickname - if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']); // Prepare data for template - // @TODO Rewritings: uid->userid,nick->nickname,logins->total_logins in template $content = array( - 'sw' => $SW, - 'cnt' => $cnt, - 'uid' => $content['userid'], - 'nick' => $content['nickname'], - 'logins' => $content['total_logins'], - 'points' => translateComma(GET_TOTAL_DATA($content['userid'], 'user_points', 'points')), - 'last' => generateDateTime($content['last_online'], '3'), + 'sw' => $SW, + 'cnt' => $cnt, + 'userid' => $content['userid'], + 'nickname' => $content['nickname'], + 'total_logins' => $content['total_logins'], + 'points' => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')), + 'last_online' => generateDateTime($content['last_online'], '3'), ); // Load row template - $OUT .= LOAD_TEMPLATE("guest_top10_row_login", true, $content); + $OUT .= loadTemplate('guest_top10_row_login', true, $content); // Switch colors and count one up $SW = 3 - $SW; $cnt++; @@ -94,32 +95,31 @@ if ($cnt < getConfig('top10_max')) { for ($i = $cnt; $i <= getConfig('top10_max'); $i++) { // Prepare data for template $content = array( - 'sw' => $SW, - 'idx' => $i + 'sw' => $SW, + 'index' => $i ); // Load row template - $OUT .= LOAD_TEMPLATE('guest_top10_empty5', true, $content); + $OUT .= loadTemplate('guest_top10_empty5', true, $content); $SW = 3 - $SW; } // END - for } // END - if -// @TODO Rewrite this constant -define('__TOP_LOGINS_ROWS', $OUT); +// Remember the rows in array +$rows['logins_out'] = $OUT; // Free result SQL_FREERESULT($result); //// TOP earners -$result = SQL_QUERY_ESC(" -SELECT DISTINCT +$result = SQL_QUERY("SELECT d.userid, - (SUM(p.points) - d.used_points) AS tpoints, + (SUM(p.points) - d.used_points) AS points, 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 @@ -128,10 +128,9 @@ WHERE GROUP BY p.userid ORDER BY - tpoints DESC, + points DESC, d.last_online DESC -LIMIT %s", -array(getConfig('top10_max')), __FILE__, __LINE__); +LIMIT {?top10_max?}", __FILE__, __LINE__); $OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { @@ -139,21 +138,20 @@ while ($content = SQL_FETCHARRAY($result)) { $content['nickname'] = '---'; // Get nickname - if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']); // Prepare data for template - // @TODO Rewritings: nick->nickname,uid->userid in template $content = array( - 'sw' => $SW, - 'cnt' => $cnt, - 'uid' => $content['userid'], - 'nick' => $content['nickname'], - 'points' => translateComma($content['points']), - 'last' => generateDateTime($content['last_online'], '3') + 'sw' => $SW, + 'cnt' => $cnt, + 'userid' => $content['userid'], + 'nickname' => $content['nickname'], + 'points' => translateComma($content['points']), + 'last_online' => generateDateTime($content['last_online'], '3') ); // Load row template - $OUT .= LOAD_TEMPLATE('guest_top10_row_earner', true, $content); + $OUT .= loadTemplate('guest_top10_row_earner', true, $content); // Switch colors and count one up $SW = 3 - $SW; $cnt++; @@ -164,32 +162,31 @@ if ($cnt < getConfig('top10_max')) { for ($i = $cnt; $i <= getConfig('top10_max'); $i++) { // Prepare data for template $content = array( - 'sw' => $SW, - 'idx' => $i + 'sw' => $SW, + 'index' => $i ); // Load row template - $OUT .= LOAD_TEMPLATE('guest_top10_empty4', true, $content); + $OUT .= loadTemplate('guest_top10_empty4', true, $content); $SW = 3 - $SW; } // END - for } // END - if -// @TODO Rewrite this constant -define('__TOP_POINTS_ROWS', $OUT); +// Remember the rows in array +$rows['points_out'] = $OUT; // Free result SQL_FREERESULT($result); //// TOP referal "hunter" -$result = SQL_QUERY_ESC(" -SELECT DISTINCT +$result = SQL_QUERY("SELECT d.userid, 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 @@ -200,8 +197,7 @@ GROUP BY ORDER BY refs DESC, d.last_online DESC -LIMIT %s", -array(getConfig('top10_max')), __FILE__, __LINE__); +LIMIT {?top10_max?}", __FILE__, __LINE__); $OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { @@ -209,22 +205,21 @@ while ($content = SQL_FETCHARRAY($result)) { $content['nickname'] = '---'; // Get nickname - if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']); // Prepare data for template - // @TODO Rewritings: nick->nickname,uid->userid in template $content = array( - 'sw' => $SW, - 'cnt' => $cnt, - 'uid' => $content['userid'], - 'refs' => $content['refs'], - 'nick' => $content['nickname'], - 'points' => translateComma(GET_TOTAL_DATA($content['userid'], 'user_points', 'points')), - 'last' => generateDateTime($content['last_online'], '3') + 'sw' => $SW, + 'cnt' => $cnt, + 'userid' => $content['userid'], + 'refs' => $content['refs'], + 'nickname' => $content['nickname'], + 'points' => translateComma(countSumTotalData($content['userid'], 'user_points', 'points')), + 'last_online' => generateDateTime($content['last_online'], '3') ); // Load row template - $OUT .= LOAD_TEMPLATE("guest_top10_row_refs", true, $content); + $OUT .= loadTemplate('guest_top10_row_refs', true, $content); // Switch colors and count one up $SW = 3 - $SW; $cnt++; @@ -235,28 +230,24 @@ if ($cnt < getConfig('top10_max')) { for ($i = $cnt; $i <= getConfig('top10_max'); $i++) { // Prepare data for template $content = array( - 'sw' => $SW, - 'idx' => $i + 'sw' => $SW, + 'index' => $i ); // Load row template - $OUT .= LOAD_TEMPLATE("guest_top10_empty5", true, $content); + $OUT .= loadTemplate('guest_top10_empty5', true, $content); $SW = 3 - $SW; } // END - for } // END - if -// @TODO Rewrite this constant -define('__TOP_REFERRAL_ROWS', $OUT); +// Remember the rows in array +$rows['referals_out'] = $OUT; // Free result SQL_FREERESULT($result); -// Remember other values in constants -// @TODO Rewrite this constant -define('__TOP10_MAX', getConfig('top10_max')); - // Load final template -LOAD_TEMPLATE("guest_top10"); +loadTemplate('guest_top10', false, $rows); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-welcome.php b/inc/modules/guest/what-welcome.php index dfb9c4e4d4..61a1331060 100644 --- a/inc/modules/guest/what-welcome.php +++ b/inc/modules/guest/what-welcome.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('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); @@ -62,7 +61,7 @@ $content = array( ); // Load default template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4), false, $content); +loadTemplate(substr(basename(__FILE__), 5, -4), false, $content); -// +// [EOF] ?> diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index ae6f2430c5..994bd8d72d 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,24 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('wernis')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('wernis')); - return; -} + die(); +} // END - if // Special file -loadIncludeOnce('inc/rdf.class.php'); +loadIncludeOnce('inc/classes/rdf.class.php'); // Add description as navigation point -ADD_DESCR('guest', __FILE__); +addMenuDescription('guest', __FILE__); + +if ((!isExtensionActive('wernis')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis')); + return; +} // END - if -OUTPUT_HTML('<div style="padding-left: 10px; padding-right: 10px">'); +outputHtml('<div style="padding-left: 10px; padding-right: 10px">'); $rdf = new fase4_rdf(); $rdf->use_dynamic_display(false); -$rdf->set_CacheDir(getConfig('PATH') . 'inc/cache/'); +$rdf->set_CacheDir(getConfig('CACHE_PATH') . ''); $rdf->set_salt(md5(getConfig('SITE_KEY'))); $rdf->set_max_item(10); $rdf->set_Options( @@ -81,8 +82,8 @@ if ((getConfig('proxy_host') != '') && (getConfig('proxy_port') > 0)) { $rdf->parse_RDF('http://www.wds66.com/rss.xml'); // Fix to avoid 'headers already sent' bug. Thanks to Profi-Concept -OUTPUT_HTML($rdf->finish(true)); -OUTPUT_HTML('</div>'); +outputHtml($rdf->finish(true)); +outputHtml('</div>'); -// +// [EOF] ?> diff --git a/inc/modules/index.php b/inc/modules/index.php index 7c13b54fa4..128dc6e3a7 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('sql_patches')) { + die(); +} elseif (!isExtensionActive('sql_patches')) { // The extension 'sql_patches' *MUST* be activated or you have lot's of problems! redirectToUrl('modules.php?module=admin&ext_missing=sql_patches'); } -// Load adverstising template -define('__GUEST_ADVERT', LOAD_TEMPLATE('guest_advert', true)); - // Generate a tableset for the menu title and content -LOAD_TEMPLATE('guest_header'); +loadTemplate('guest_header'); // Add code-message here handleCodeMessage(); // Some of you needs this to be extracted into a template... ??? -LOAD_TEMPLATE('guest_menu_td'); +loadTemplate('guest_menu_td'); // When no what value is provided take the "home" value if (!isWhatSet()) setWhatFromConfig('index_home'); @@ -67,45 +63,45 @@ if (!isActionSet()) { } // END - if // Add the guest's menu here... -if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { +if ((getConfig('guest_menu') == 'Y') || (!isExtensionActive('sql_patches', true))) { // Show only when guest menu is active - ADD_MENU('guest', getAction(), getWhat()); + addMenu('guest', getAction(), getWhat()); } // END - if // TDs between menu and content -LOAD_TEMPLATE('guest_menu_content'); +loadTemplate('guest_menu_content'); // Disable block-mode by default enableBlockMode(false); // Construct FQFN -$INC = sprintf("inc/modules/guest/action-%s.php", getAction()); +$inc = sprintf("inc/modules/guest/action-%s.php", getAction()); // Is the file there? -if ((isIncludeReadable($INC)) && (isMenuActionValid('guest', getAction(), getWhat()))) { +if ((isIncludeReadable($inc)) && (isMenuActionValid('guest', getAction(), getWhat()))) { // Requested module is available so we load it - loadIncludeOnce($INC); + loadIncludeOnce($inc); } else { // Invalid module specified or not found... redirectToUrl('modules.php?module=index'); } -if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { +if ((getConfig('guest_menu') == 'Y') || (!isExtensionActive('sql_patches'))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) - LOAD_TEMPLATE('guest_content_footer'); + loadTemplate('guest_content_footer'); // Some advertising stuff? - LOAD_TEMPLATE('guest_advert2'); + loadTemplate('guest_advert2'); - OUTPUT_HTML(" </td> + outputHtml(" </td> </tr>"); // Goto TOP template - LOAD_TEMPLATE('guest_goto_top'); + loadTemplate('guest_goto_top'); } // END - if // Footer template (Thanx to Mr. Glaus!) -LOAD_TEMPLATE('guest_footer'); +loadTemplate('guest_footer'); -// +// [EOF] ?> diff --git a/inc/modules/loader.php b/inc/modules/loader.php index 17eefbfadd..217b4426fa 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if -if (REQUEST_ISSET_GET('url')) { +// Is an URL specified? +if (isGetRequestElementSet('url')) { // Decode URL - $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url'))))); + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); // Validate the URL if (isUrlValid($url)) { - // Prepare data for the template - define('__URL', $url); - // Generate a JavaScript that redirects us - LOAD_TEMPLATE('loader'); + loadTemplate('loader', false, $url); } else { // URL invalid redirectToUrl('index.php'); @@ -62,5 +59,5 @@ if (REQUEST_ISSET_GET('url')) { redirectToUrl('index.php'); } -// +// [EOF] ?> diff --git a/inc/modules/login.php b/inc/modules/login.php index e703758342..bc46bfb49e 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,11 +38,10 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { $URL = 'modules.php?module=index'; - if (checkModulePermissions('login') == 'mem_only') $URL .= '&msg=' . getCode('MODULE_MEM_ONLY') . '&mod=' . getModule(); + if (checkModulePermissions('login') == 'mem_only') $URL .= '&code=' . getCode('MODULE_MEM_ONLY') . '&mod=' . getModule(); redirectToUrl($URL); } @@ -54,63 +53,60 @@ if ($GLOBALS['status'] != 'CONFIRMED') { redirectToUrl('modules.php?module=index&what=login&login=' . $errorCode); } // END - if -// Load adverstising template -define('__MEMBER_ADVERT', LOAD_TEMPLATE('member_banner', true)); - // Disable block mode by default enableBlockMode(false); // Generate a tableset for the menu title and content -LOAD_TEMPLATE('member_header'); +loadTemplate('member_header'); // Begin menu block here -OUTPUT_HTML("<tr> +outputHtml("<tr> <td class=\"member_menu\">"); // Adding the main content module here if (!isActionSet()) { if (!isWhatSet()) setWhat('welcome'); } else { - $act = getAction(); + $action = getAction(); } // Add the member's menu here... -if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { - ADD_MENU('member', getModeAction('member', getWhat()), getWhat()); +if ((getConfig('member_menu') == 'Y') || (!isExtensionActive('sql_patches', true))) { + addMenu('member', getModeAction('member', getWhat()), getWhat()); } // END - if // Disable block-mode again enableBlockMode(false); // Menu -> content -OUTPUT_HTML(" </td> +outputHtml(" </td> <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">"); -$INC = sprintf("inc/modules/member/action-%s.php", $act); -if ((isIncludeReadable($INC)) && (isMenuActionValid('member', getAction(), getWhat()))) { +$inc = sprintf("inc/modules/member/action-%s.php", $action); +if ((isIncludeReadable($inc)) && (isMenuActionValid('member', getAction(), getWhat()))) { // Requested module is available so we load it - loadInclude($INC); + loadInclude($inc); } else { // Invalid module specified or not found... redirectToUrl('modules.php?module=login'); } -if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { +if ((getConfig('member_menu') == 'Y') || (!isExtensionActive('sql_patches', true))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) - LOAD_TEMPLATE('member_content_right'); + loadTemplate('member_content_right'); // Some advertising stuff? - LOAD_TEMPLATE('member_advert'); + loadTemplate('member_advert'); } -OUTPUT_HTML(" </td> +outputHtml(" </td> </tr>"); // Load same template for 'Goto TOP' -LOAD_TEMPLATE('member_goto_top'); +loadTemplate('member_goto_top'); // Footer template (Thanx to Mr. Glaus!) -LOAD_TEMPLATE('member_footer'); +loadTemplate('member_footer'); // ?> diff --git a/inc/modules/member/action- b/inc/modules/member/action- index da78c8466d..6eee351e8b 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_LOGGED_IN()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('')); - return; -} elseif ($BLOCK_MODE) { + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); +} elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('')); + return; +} // END - if // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_ACTION'), getWhat()); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index d044aa5db5..63e66f12be 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index 5d89820fc1..305391daba 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // END - if // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index fa0601962e..b80d246ff5 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index 85a5775f14..dd4c5bdd6a 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index 8f5950640f..80d999dc81 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 37d2377e9e..1dfce0a9f4 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('order')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('order')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + return; +} // END - if // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index 779013e7c9..a6ba127a4a 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index edc8248f8c..ce1bf17134 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index 4470b082fc..212bd73c91 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,30 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if // Load the include file -$INC = sprintf("inc/modules/member/what-%s.php", getWhat()); -if (isIncludeReadable($INC)) { +$inc = sprintf("inc/modules/member/what-%s.php", getWhat()); +if (isIncludeReadable($inc)) { // Ok, we finally load the member action module - loadInclude($INC); + loadInclude($inc); } else { addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat())); } -// +// [EOF] ?> diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index 86ad7ff2c1..7dadc2abda 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,41 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('theme')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } +// Add description as navigation point +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('theme')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + return; +} // END - if + // Get total num -if (IS_ADMIN()) { +if (isAdmin()) { // Load only active designs for user - $num_themes = GET_TOTAL_DATA('Y', 'themes', 'id', 'theme_active', true); + $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true); } else { // Load all themes for admin - $num_themes = GET_TOTAL_DATA('', 'themes', 'id', '', true); + $num_themes = countSumTotalData('', 'themes', 'id', '', true); } if ($num_themes > 1) { // If more than 1 is installed output selection box $OUT = generateThemeSelectionBox(); -} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) { +} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) { // If there's only one just output it's name - define('__THEME_NAME', getCurrentThemeName()); - $OUT = LOAD_TEMPLATE('theme_one', true); -} elseif (IS_ADMIN()) { + $OUT = loadTemplate('theme_one', true, getCurrentThemeName()); +} elseif (isAdmin()) { // If there is no theme installed and there's an admin notify him! - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>"); + $OUT = loadTemplate('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>"); } // Load final box template -LOAD_TEMPLATE('theme_select_box', false, $OUT); +$GLOBALS['rows'] .= loadTemplate('theme_select_box', true, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/member/what- b/inc/modules/member/what- index bfa72febd1..e34ed03e53 100644 --- a/inc/modules/member/what- +++ b/inc/modules/member/what- @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_LOGGED_IN()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); // ?> diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 23366aa516..bf04a3cfb5 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // END - if // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 6b995fd5b7..7c3b5d6de2 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // END - if // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index 2707a6f156..52cfcfe184 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index 2707a6f156..bf04a3cfb5 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // END - if // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index 2707a6f156..52cfcfe184 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bank')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bank')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bank')); + return; +} // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index ede146da64..f28f4964f6 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('beg')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('beg')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + return; +} // END - if + +// Get userid +$userid = getUserId(); -$uid = getUserId(); -if (EXT_IS_ACTIVE('nickname')) { +if (isExtensionActive('nickname')) { // Load nickname $data = 'nickname'; } else { @@ -60,30 +63,33 @@ if (EXT_IS_ACTIVE('nickname')) { } // Run SQL command -$result = SQL_QUERY_ESC("SELECT ".$data.", `beg_clicks` -FROM `{!_MYSQL_PREFIX!}_user_data` -WHERE `userid`=%s -LIMIT 1", array($uid), __FILE__, __LINE__); +$result = SQL_QUERY_ESC("SELECT + `".$data."`, `beg_clicks` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `userid`=%s +LIMIT 1", array($userid), __FILE__, __LINE__); -list($uid, $clicks) = SQL_FETCHROW($result); +list($userid, $clicks) = SQL_FETCHROW($result); // Free result SQL_FREERESULT($result); // Set User-ID when no nickname was found $nickname = true; -if (empty($uid)) { $uid = getUserId(); $nickname = false; } +if (empty($userid)) { $userid = getUserId(); $nickname = false; } // Prepare constants -define('__BEG_UID' , $uid); -define('__BEG_CLICKS' , $clicks); -define('__BEG_POINTS' , translateComma(getConfig('beg_points'))); -define('__BEG_POINTS_MAX' , translateComma(getConfig('beg_points_max'))); -define('__BEG_TIMEOUT' , createFancyTime(getConfig('beg_timeout'))); -define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_uid_timeout'))); +$content['userid'] = $userid; +$content['clicks'] = $clicks; +$content['points'] = translateComma(getConfig('beg_points')); +$content['points_max'] = translateComma(getConfig('beg_points_max')); +$content['timeout'] = createFancyTime(getConfig('beg_timeout')); +// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout'))); // Load template -LOAD_TEMPLATE('member_' . substr(basename(__FILE__), 5, -4)); +loadTemplate('member_' . substr(basename(__FILE__), 5, -4), false, $content); -// +// [EOF] ?> diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 99ffbfe1cc..b37ce18446 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,24 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('beg')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('beg')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg')); + return; +} // END - if // Autopurge installed? $lastOnline = "%s"; $ONLINE = ''; -if (EXT_IS_ACTIVE('autopurge')) { +if (isExtensionActive('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); @@ -64,7 +65,7 @@ if (EXT_IS_ACTIVE('autopurge')) { $result = SQL_QUERY_ESC("SELECT `userid`, `beg_points` AS beg, `last_online` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `beg_points` > 0 AND `status`='CONFIRMED'".$lastOnline." ORDER BY @@ -84,30 +85,30 @@ if (SQL_NUMROWS($result) > 0) { $content = array( 'sw' => $SW, 'cnt' => $cnt, - 'uid' => bigintval($content['userid']), + 'userid' => bigintval($content['userid']), 'points' => translateComma($content['beg']), - 'last' => generateDateTime($content['last_online'], '2'), + 'last_online' => generateDateTime($content['last_online'], '2'), ); // Load row template - $OUT .= LOAD_TEMPLATE('member_list_beg_row', true, $content); + $OUT .= loadTemplate('member_list_beg_row', true, $content); // Count one up and switch colors $cnt++; $SW = 3 - $SW; } } else { // No one is interested in our "active rallye" ! :-( - $OUT = LOAD_TEMPLATE('member_beg_404', true); + $OUT = loadTemplate('member_beg_404', true); } +// Prepare content +$content['rows'] = $OUT; + // Free memory SQL_FREERESULT($result); -// Remeber row(s) for the template -define('__BEG_ROWS', $OUT); - // Load final template -LOAD_TEMPLATE('member_list_beg'); +loadTemplate('member_list_beg', false, $content); // ?> diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index e99e0c64f0..256f418a8c 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,19 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('bonus')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('bonus')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('bonus')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); + return; +} // END - if -if (GET_EXT_VERSION('bonus') >= '0.6.9') { +if (getExtensionVersion('bonus') >= '0.6.9') { // Add more bonus points here // @TODO Rewrite this to a filter $USE = "(0"; @@ -67,7 +68,7 @@ if (GET_EXT_VERSION('bonus') >= '0.6.9') { // Autopurge installed? $lastOnline = "%s"; $ONLINE = ''; -if (EXT_IS_ACTIVE('autopurge')) { +if (isExtensionActive('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); @@ -77,7 +78,7 @@ if (EXT_IS_ACTIVE('autopurge')) { $result = SQL_QUERY_ESC("SELECT `userid`, `".$USE."` AS points, `last_online` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `".$USE."` > 0 AND `status`='CONFIRMED'".$lastOnline." ORDER BY @@ -100,30 +101,30 @@ if (SQL_NUMROWS($result) > 0) { $content = array( 'sw' => $SW, 'cnt' => $cnt, - 'uid' => bigintval($content['uid']), + 'userid' => bigintval($content['userid']), 'points' => translateComma($content['points']), - 'last' => generateDateTime($content['last'], '2') + 'last_online' => generateDateTime($content['last_online'], '2') ); // Load row template - $OUT .= LOAD_TEMPLATE('member_bonus_row', true, $content); + $OUT .= loadTemplate('member_bonus_row', true, $content); // Count one up and switch colors $cnt++; $SW = 3 - $SW; } } else { // No one is interested in our "active rallye" ! :-( - $OUT = LOAD_TEMPLATE('member_bonus_404', true); + $OUT = loadTemplate('member_bonus_404', true); } // Free memory SQL_FREERESULT($result); -// Remeber row(s) for the template -define('__BONUS_ROWS', $OUT); +// Prepare content array +$content['rows'] = $OUT; // Load final template -LOAD_TEMPLATE('member_bonus'); +loadTemplate('member_bonus', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index c74bf25aa4..24b550ea4e 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,46 +38,45 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); $UID = getUserId(); $whereStatement = " WHERE `visible`='Y'"; -if (IS_ADMIN()) $whereStatement = ''; +if (isAdmin()) $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) { $LEAST = false; if (isFormSent()) { $cnt = 0; - foreach (REQUEST_POST('cat') as $cat => $joined) { - if ($joined == 'N') $cnt++; + foreach (postRequestElement('cat') as $cat => $joined) { + if ($joined != 'Y') $cnt++; } if (($cats - $cnt) < getConfig('least_cats')) { - REQUEST_UNSET_POST('ok'); + unsetPostRequestElement('ok'); $LEAST = true; } } if (isFormSent()) { - foreach (REQUEST_POST('cat') as $cat => $joined) { + foreach (postRequestElement('cat') as $cat => $joined) { switch ($joined) { 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 { // Free memory SQL_FREERESULT($result_user); @@ -85,7 +84,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; } @@ -96,17 +95,18 @@ if ($cats > 0) { } // Categories saved... - LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_CATS_SAVED')); + loadTemplate('admin_settings_saved', true, getMessage('MEMBER_CATS_SAVED')); } else { if ($LEAST) { // Also here we have to secure it... :( - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats'))); } + // Put some data into constants for the template - define('__ROWS', ($cats*2+4)); + $content['rows'] = ($cats*2+4); // Load header template - LOAD_TEMPLATE("member_cats_header"); + loadTemplate('member_cats_header', false, $content); // Start switching colors and load all visible categories // @TODO Rewrite this to use $OUT .= ... @@ -117,15 +117,15 @@ if ($cats > 0) { $content['jy'] = ''; // When we found an entry don't read it, just change the jx elements - if (REQUEST_ISSET_POST(('cat'))) { + if (isPostRequestElementSet(('cat'))) { // Form sent? - if (REQUEST_POST('cat', $content['id']) =='Y') { + if (postRequestElement('cat', $content['id']) =='Y') { $content['jy'] = ' checked="checked"'; $content['jn'] = ''; } } else { // Check if he has an entry - if (GET_TOTAL_DATA($UID, "user_cats", 'id', 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) { + if (countSumTotalData($UID, 'user_cats', 'id', 'userid', true, sprintf(" AND `cat_id`=%s", bigintval($content['id']))) == 1) { $content['jn'] = ''; $content['jy'] = ' checked="checked"'; } @@ -135,16 +135,16 @@ if ($cats > 0) { $content['sw'] = $SW; // Load row template and switch colors - LOAD_TEMPLATE("member_cat_row", false, $content); + loadTemplate('member_cat_row', false, $content); $SW = 3 - $SW; } // Load footer template - LOAD_TEMPLATE("member_cats_footer"); + loadTemplate('member_cats_footer'); } } else { // No cateogries are defined yet - LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_CATS')); + loadTemplate('admin_settings_saved', true, getMessage('MEMBER_NO_CATS')); } // Free result diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index 16781e74d6..5e172781a4 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,79 +38,60 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('doubler')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('doubler')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('doubler')); + return; +} // END - if // Percent values etc. -// @TODO Rewrite these all constants -define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100)); -define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100)); -define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points'))); -define('__MIN_VALUE' , translateComma(getConfig('doubler_min'))); -define('__MAX_VALUE' , translateComma(getConfig('doubler_max'))); +$content['charge'] = translateComma(getConfig('doubler_charge') * 100); +$content['ref'] = translateComma(getConfig('doubler_ref') * 100); +$content['total'] = translateComma(getConfig('doubler_points')); +$content['min'] = translateComma(getConfig('doubler_min')); +$content['max'] = translateComma(getConfig('doubler_max')); + +// Default refid is the userid +$content['userid'] = getUserId(); // Transfer referal ID -if (EXT_IS_ACTIVE('nickname')) { +if (isExtensionActive('nickname')) { // Load nickname from DB - $nick = NICKNAME_GET_NICK(getUserId()); + $nick = getNickname(getUserId()); if (!empty($nick)) { // Set nickname - define('__USERID', $nick); - } else { - // Use direct userid - define('__USERID', getUserId()); - } -} else { - // Use direct userid - define('__USERID', getUserId()); -} - -// Usage counter -define('__DOUBLER_COUNTER', translateComma(getConfig('doubler_counter'))); + $content['userid'] = $nick; + } // END - if +} // END - if // Which mail-send-mode did the admin setup? -switch (getConfig('doubler_send_mode')) { - case 'DIRECT': - define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT')); - break; - - case 'RESET': - define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET')); - break; - - default: - define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode'))); - DEBUG_LOG(__FILE__, __LINE__, getMessage('DOUBLER_PAYOUT_TIME')); - break; -} +$content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode')); // Generate table with already payed out doubles -define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE(getUserId(), 'Y', 'N', 'DESC')); +$content['payout_history'] = generateDoublerTable(getUserId(), 'Y', 'N', 'DESC'); // Generate table with next-to-run payouts -define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE(getUserId())); +$content['next_table'] = generateDoublerTable(getUserId()); // Generate table with refferal payouts -define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE(getUserId(), 'N', 'Y', 'DESC')); +$content['payout_ref'] = generateDoublerTable(getUserId(), 'N', 'Y', 'DESC'); // Generate timemark -define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout'))); +$content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout')); // Points left to double -define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT())); +$content['left'] = translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()); // Load template -LOAD_TEMPLATE('member_doubler'); +loadTemplate('member_doubler', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/member/what-guest.php b/inc/modules/member/what-guest.php index bded579f07..34736b22b5 100644 --- a/inc/modules/member/what-guest.php +++ b/inc/modules/member/what-guest.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,16 +38,16 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Simply redirect... -redirectToUrl('modules.php?module=index'); -// +redirectToIndexMemberOnlyModule(); + +// [EOF] ?> diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 11f17185ff..b233e861a4 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,26 +38,27 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('holiday')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('holiday')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } +// Add description as navigation point +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('holiday')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('holiday')); + return; +} // END - if + // Init content array $content = array(); -// Add description as navigation point -ADD_DESCR('member', __FILE__); - // Check for running mail orders in pool $result1 = SQL_QUERY_ESC("SELECT `timestamp` FROM - `{!_MYSQL_PREFIX!}_pool` + `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s ORDER BY @@ -68,7 +69,7 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); $result2 = SQL_QUERY_ESC("SELECT `timestamp_ordered` FROM - `{!_MYSQL_PREFIX!}_user_stats` + `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid`=%s ORDER BY @@ -86,8 +87,8 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { if ((($content['timestamp'] + getConfig('holiday_lock')) > time()) || (($content['timestamp_ordered'] + getConfig('holiday_lock')) > time())) { // Mail order is to close away! - REQUEST_UNSET_POST('ok'); - REQUEST_UNSET_POST('stop'); + unsetPostRequestElement('ok'); + unsetPostRequestElement('stop'); if (($content['timestamp'] + getConfig('holiday_lock')) > time()) { // Mail found in pool @@ -98,7 +99,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { } // Display message and exit here - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), generateDateTime($stamp, '1'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), generateDateTime($stamp, '1'))); return; } } // END - if @@ -109,22 +110,22 @@ SQL_FREERESULT($result2); if (isFormSent()) { // Check holiday request... - $START = mktime(0, 0, 0, REQUEST_POST('start_month'), REQUEST_POST('start_day'), REQUEST_POST('start_year')); - $content['holiday_end'] = mktime(0, 0, 0, REQUEST_POST('end_month') , REQUEST_POST('end_day') , REQUEST_POST('end_year') ); + $START = mktime(0, 0, 0, postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); + $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); // Test both values $TEST = $content['holiday_end'] - $START; - if (($TEST < 0) || ($TEST > (getConfig('one_day') * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) { + if (($TEST < 0) || ($TEST > (getConfig('ONE_DAY') * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) { // Time test failed - REQUEST_UNSET_POST('ok'); + unsetPostRequestElement('ok'); } else { // Everything went okay so let's store his request and send mails - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')", - array(getUserId(), $START, $content['holiday_end'], REQUEST_POST('comments')), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')", + array(getUserId(), $START, $content['holiday_end'], postRequestElement('comments')), __FILE__, __LINE__); // Activate holiday system SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` SET `holiday_active`='N', `holiday_activated`=UNIX_TIMESTAMP() WHERE @@ -133,35 +134,36 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); // Prepare constants - define('_START_DAY' , REQUEST_POST('start_day')); - define('_START_MONTH', $GLOBALS['month_descr'][REQUEST_POST('start_month')]); - define('_START_YEAR' , REQUEST_POST('start_year')); - define('_END_DAY' , REQUEST_POST('end_day')); - define('_END_MONTH' , $GLOBALS['month_descr'][REQUEST_POST('end_month')]); - define('_END_YEAR' , REQUEST_POST('end_year')); + $content['start_day'] = bigintval(postRequestElement('start_day')); + $content['start_month'] = $GLOBALS['month_descr'][postRequestElement('start_month')]; + $content['start_year'] = bigintval(postRequestElement('start_year')); + $content['end_day'] = bigintval(postRequestElement('end_day')); + $content['end_month'] = $GLOBALS['month_descr'][postRequestElement('end_month')]; + $content['end_year'] = bigintval(postRequestElement('end_year')); + $content['comments'] = secureString(postRequestElement('comments')); // Send mail to member - $message = LOAD_EMAIL_TEMPLATE('member_holiday_request', REQUEST_POST('comments'), getUserId()); + $message = loadEmailTemplate('member_holiday_request', $content, getUserId()); sendEmail(getUserId(), getMessage('HOLIDAY_MEMBER_SUBJECT'), $message); // Send mail to all admins - sendAdminNotification(getMessage('HOLIDAY_ADMIN_SUBJECT'), 'admin_holiday_request', REQUEST_POST('comments'), getUserId()); + sendAdminNotification(getMessage('HOLIDAY_ADMIN_SUBJECT'), 'admin_holiday_request', $content, getUserId()); // Create task createNewTask('{--HOLIDAY_ADMIN_SUBJECT--}', $message, 'HOLIDAY_REQUEST', getUserId()); // Display message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW')); } } // END - if // Holiday shall be ended now -if (REQUEST_ISSET_POST('stop')) { +if (isPostRequestElementSet('stop')) { // Okay, end the holiday here... $result = SQL_QUERY_ESC("SELECT `holiday_active`, `holiday_activated` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -173,7 +175,7 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); $result = SQL_QUERY_ESC("SELECT `holiday_start`, `holiday_end` FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -183,47 +185,49 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); SQL_FREERESULT($result); // Prepare it for the template - define('__HOLIDAY_START', generateDateTime($content['holiday_start'], '3')); - define('__HOLIDAY_END' , generateDateTime($content['holiday_end'] , '3')); + $content['start'] = generateDateTime($content['holiday_start'], '3'); + $content['end'] = generateDateTime($content['holiday_end'] , '3'); // Deactivate it now - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `holiday_active`='N', `holiday_activated`=0 WHERE `userid`=%s -LIMIT 1", array(getUserId()), __FILE__, __LINE__); +LIMIT 1", + array(getUserId()), __FILE__, __LINE__); // Remove entry SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s -LIMIT 1", array(getUserId()), __FILE__, __LINE__); +LIMIT 1", + array(getUserId()), __FILE__, __LINE__); // Send email to admin - sendAdminNotification(getMessage('HOLIDAY_ADMIN_DEAC_SUBJ'), 'admin_holiday_deactivated', array(), getUserId()); + sendAdminNotification(getMessage('HOLIDAY_ADMIN_DEAC_SUBJ'), 'admin_holiday_deactivated', $content, getUserId()); // Display message to user - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW')); } else { // Display message to user - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE')); } } elseif ($content['holiday_active'] == 'Y') { // To fast! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); } } // END - if // If something is wrong or link in menu is just clicked display form -if ((!isFormSent()) && (!REQUEST_ISSET_POST('stop'))) { +if ((!isFormSent()) && (!isPostRequestElementSet('stop'))) { // Check if user is in holiday... $result = SQL_QUERY_ESC("SELECT `holiday_active`, `holiday_activated` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -240,7 +244,7 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); $result = SQL_QUERY_ESC("SELECT `holiday_start`, `holiday_end` FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -250,19 +254,19 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); SQL_FREERESULT($result); // Prepare it for the template - define('__HOLIDAY_START', generateDateTime($content['holiday_start'] , '3')); - define('__HOLIDAY_END' , generateDateTime($content['holiday_end'] , '3')); - define('__HOLIDAY_LOCK' , generateDateTime($content['holiday_activated'], '1')); + $content['start'] = generateDateTime($content['holiday_start'] , '3'); + $content['end'] = generateDateTime($content['holiday_end'] , '3'); + $content['lock'] = generateDateTime($content['holiday_activated'], '1'); // Load template - LOAD_TEMPLATE('member_holiday_deactivate'); + loadTemplate('member_holiday_deactivate', false, $content); } else { // Free memory SQL_FREERESULT($result); // Remove entry and reload URL SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` SET `holiday_active`='N' WHERE @@ -275,30 +279,27 @@ LIMIT 1", array(getUserId()), __FILE__, __LINE__); case 'N': // Display activation form // Starting day - define('_START_DAY' , ADD_SELECTION('day' , date('d', (time() + getConfig('one_day'))), 'start')); - define('_START_MONTH', ADD_SELECTION('month', date('m', (time() + getConfig('one_day'))), 'start')); - define('_START_YEAR' , ADD_SELECTION('year' , date('Y', (time() + getConfig('one_day'))), 'start')); + $content['start_day'] = addSelectionBox('day' , date('d', (time() + getConfig('ONE_DAY'))), 'start'); + $content['start_month'] = addSelectionBox('month', date('m', (time() + getConfig('ONE_DAY'))), 'start'); + $content['start_year'] = addSelectionBox('year' , date('Y', (time() + getConfig('ONE_DAY'))), 'start'); // Calcualte ending date - $D = date('d', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max'))); - $M = date('m', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max'))); - $Y = date('Y', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max'))); + $D = date('d', time() + getConfig('ONE_DAY') + (getConfig('ONE_DAY') * getConfig('holiday_max'))); + $M = date('m', time() + getConfig('ONE_DAY') + (getConfig('ONE_DAY') * getConfig('holiday_max'))); + $Y = date('Y', time() + getConfig('ONE_DAY') + (getConfig('ONE_DAY') * getConfig('holiday_max'))); // Ending day - define('_END_DAY' , ADD_SELECTION('day' , $D, 'end')); - define('_END_MONTH', ADD_SELECTION('month', $M, 'end')); - define('_END_YEAR' , ADD_SELECTION('year' , $Y, 'end')); - - // Copy value from configuration - define('__HOLIDAY_MAX', getConfig('holiday_max')); + $content['end_day'] = addSelectionBox('day' , $D, 'end'); + $content['end_month'] = addSelectionBox('month', $M, 'end'); + $content['end_year'] = addSelectionBox('year' , $Y, 'end'); // Output form - LOAD_TEMPLATE('member_holiday_form'); + loadTemplate('member_holiday_form'); break; } } else { // To fast! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); } } // END - if diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 07e592301c..7ca346b0d2 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,27 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('html_mail')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('html_mail')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('html_mail')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('html_mail')); + return; +} // END - if // Class was found and loaded if (isFormSent()) { // Save settings - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1", - array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__); - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED')); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1", + array(postRequestElement('html'), getUserId()), __FILE__, __LINE__); + loadTemplate('admin_settings_saved', false, getMessage('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(getUserId()), __FILE__, __LINE__); // Get the mode @@ -68,16 +69,12 @@ if (isFormSent()) { SQL_FREERESULT($result); // Prepare it - if ($content['html'] == 'Y') { - $content['html_y'] = ' checked="checked"'; - $content['html_n'] = ''); - } else { - $content['html_n'] = ' checked="checked"'; - $content['html_y'] = ''; - } + $content['html_y'] = ''; + $content['html_n'] = ''; + $content['html_' . strtolower($content['html'])] = ' checked="checked"'; // Load main template - LOAD_TEMPLATE('member_html_mail_settings'); + loadTemplate('member_html_mail_settings'); } // [EOF] diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index fa02eecd8d..ff32b7155d 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Base URL for redirection (both cases) -$URL = 'modules.php?module=index&msg='; +$URL = 'modules.php?module=index&code='; if (destroyUserSession()) { // Remove theme cookie as well - setSession('mxchange_theme', ''); + setTheme(); // Logout completed $URL .= getCode('LOGOUT_DONE'); @@ -61,5 +60,5 @@ if (destroyUserSession()) { // Load the URL redirectToUrl($URL); -// +// [EOF] ?> diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index d4768332dd..c18d46bc83 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,205 +38,213 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('mydata')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('mydata')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('mydata')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('mydata')); + return; +} // END - if -// @TODO Try to rewrite this constant -define('UID_VALUE', getUserId()); +// Remember userid +$content['userid'] = getUserId(); // Init variable to prevent notices $URL = ''; // Detect what the member wants to do $mode = 'show'; // Show his data -if (REQUEST_ISSET_POST('save')) $mode = 'save'; // Save entered data -if (REQUEST_ISSET_POST('edit')) $mode = 'edit'; // Edit data -if (REQUEST_ISSET_POST('notify')) $mode = 'notify'; // Switch off notification +if (isPostRequestElementSet('save')) $mode = 'save'; // Save entered data +if (isPostRequestElementSet('edit')) $mode = 'edit'; // Edit data +if (isPostRequestElementSet('notify')) $mode = 'notify'; // Switch off notification switch ($mode) { case 'show': // Show his data - if (EXT_IS_ACTIVE('country', true)) { + if (isExtensionActive('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(getUserId()), __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(getUserId()), __FILE__, __LINE__); } - $DATA = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result, 0, false); SQL_FREERESULT($result); - // Translate / add some things - $DATA[10] = translateGender($DATA[10]); - $DATA[13] = generateDateTime($DATA[13], '0'); + // Translate some things + $content['gender'] = translateGender($content['gender']); + $content['last_update'] = generateDateTime($content['last_update'], '0'); // How far is last change on his profile away from now? - if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) { + if ((($content['last_update'] + getConfig('profile_lock')) > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { // You cannot change your account - define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($DATA[13] + getConfig('profile_lock'), '0'))."</div>"); + $content['change'] = loadTemplate('admin_settings_saved', true, "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($content['last_update'] + getConfig('profile_lock'), '0'))."</div>"); } else { // He is allowed to change his profile - define('CHANGE', LOAD_TEMPLATE('member_mydata_button', true)); + $content['change'] = loadTemplate('member_mydata_button', true); } - if (strlen($DATA[7]) == 1) $DATA[7] = '0'.$DATA[7]; - if (strlen($DATA[8]) == 1) $DATA[8] = '0'.$DATA[8]; + if (strlen($content['birth_day']) == 1) $content['birth_day'] = '0' . $content['birth_day']; + if (strlen($content['birth_month']) == 1) $content['birth_month'] = '0' . $content['birth_month']; switch (getLanguage()) { - case 'de': define('DOB', $DATA[7] . '.' . $DATA[8] . '.' . $DATA[9]); break; - default : define('DOB', $DATA[8] . '-' . $DATA[7] . '-' . $DATA[9]); break; + case 'de': $content['dob'] = $content['birth_day'] . '.' . $content['birth_month'] . '.' . $content['birth_year']; break; + default : $content['dob'] = $content['birth_month'] . '-' . $content['birth_day'] . '-' . $content['birth_year']; break; } // END - switch - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Load country's description and code - $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]); + $content['country'] = generateCountryInfo($content['country_code']); } // END - if + // Merge data in + $content = merge_array($content, $content); + // Load template - LOAD_TEMPLATE('member_mydata_overview'); + loadTemplate('member_mydata_overview', false, $content); break; 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", + if (isExtensionActive('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", array(getUserId()), __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", + // 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", array(getUserId()), __FILE__, __LINE__); } - $DATA = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result, 0, false); SQL_FREERESULT($result); - $DATA[13] = $DATA[12] + getConfig('profile_lock'); + $content['update_check'] = $content['last_update'] + getConfig('profile_lock'); // How far is last change on his profile away from now? - if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) { - $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0'); + if (($content['update_check'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { + $content['update_check'] = generateDateTime($content['update_check'] + getConfig('profile_lock'), '0'); // You cannot change your account - LOAD_TEMPLATE('member_mydata_locked'); + loadTemplate('member_mydata_locked', false, $content); } else { // He is allowed to change his profile - switch ($DATA[10]) - { - case 'M': - define('M_DEFAULT', ' selected="selected"'); - define('F_DEFAULT', ''); - define('C_DEFAULT', ''); - break; + foreach (array('gender_m','gender_f','gender_c') as $entry) { + $content[$entry] = ''; + } // END - foreach - case 'F': - define('M_DEFAULT', ''); - define('F_DEFAULT', ' selected="selected"'); - define('C_DEFAULT', ''); - break; + $content['gender_' . strtolower($content['gender'])] = ' selected="selected"'; + $content['dob'] = ''; - case 'C': - define('M_DEFAULT', ''); - define('F_DEFAULT', ''); - define('C_DEFAULT', ' selected="selected"'); - break; - } - $DOB = ''; switch (getLanguage()) { case 'de': // German date format // Day - $DOB .= ADD_SELECTION('day', $DATA[7]); + $content['dob'] .= addSelectionBox('day', $content['birth_day']); // Month - $DOB .= ADD_SELECTION('month', $DATA[8]); + $content['dob'] .= addSelectionBox('month', $content['birth_month']); // Year - $DOB .= ADD_SELECTION('year', $DATA[9]); + $content['dob'] .= addSelectionBox('year', $content['birth_year']); break; default: // Default is the US date format... :) + // Month + $content['dob'] .= addSelectionBox('month', $content['birth_month']); + + // Day + $content['dob'] .= addSelectionBox('day', $content['birth_day']); + + // Year + $content['dob'] .= addSelectionBox('year', $content['birth_year']); break; } // END - if - define('DOB', $DOB); - define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true)); + $content['max_receive_list'] = addMaxReceiveList('member', $content['max_mails'], true); - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Generate selection box $OUT = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n"; $whereStatement = "WHERE `is_active`='Y'"; - if (IS_ADMIN()) $whereStatement = ''; - $OUT .= generateOptionList('countries', 'id', 'descr', $DATA[3], 'code', $whereStatement); + if (isAdmin()) $whereStatement = ''; + $OUT .= generateOptionList('countries', 'id', 'descr', $content['country_code'], 'code', $whereStatement); $OUT .= "</select>"; - define('__COUNTRY_CONTENT', $OUT); + $content['country'] = $OUT; } else { // Ouput default input box - define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />"); + $content['country'] = "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$content['country']."\" />"; } + // Merge data in + $content = merge_array($content, $content); + // Load template - LOAD_TEMPLATE('member_mydata_edit'); + loadTemplate('member_mydata_edit', false, $content); } break; 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(getUserId()), __FILE__, __LINE__); - $DATA = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result, 0, false); SQL_FREERESULT($result); - $DATA[3] = $DATA[2] + getConfig('profile_lock'); + $content['last_change'] = $content['last_update'] + getConfig('profile_lock'); // How far is last change on his profile away from now? - if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) { - $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0'); + if (($content['last_change'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) { + $content['last_change'] = generateDateTime($content['last_change'] + getConfig('profile_lock'), '0'); // You cannot change your account - LOAD_TEMPLATE('member_mydata_locked'); - } elseif (!isEmailValid(REQUEST_POST('addy'))) { + loadTemplate('member_mydata_locked'); + } elseif ((!isEmailValid(postRequestElement('email'))) && (!isAdmin())) { // Invalid email address! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED')); + loadTemplate('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED')); } else { // Generate hash - $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40)); - if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST('pass1'))) { + $hash = generateHash(postRequestElement('pass1'), substr($content['password'], 0, -40)); + if ((($hash == $content['password']) || (postRequestElement('pass1') == postRequestElement('pass2'))) && (isPostRequestElementSet('pass1'))) { // Only on simple changes normal mode is active = no email or password changed $mode = 'normal'; $AND = ''; // Did the user changed the password? - if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; } + if ($hash != $content['password']) { $AND = ", `password`='".$hash."'"; $mode = 'pass'; } // Or did he changed his password? - if (REQUEST_POST('addy') != $DATA[0]) { + if (postRequestElement('email') != $content['email']) { // Jupp if ($mode == 'normal') { $mode = 'email'; } else { - $mode .= ";email"; + $mode .= ';email'; } - REQUEST_SET_POST('old_addy', $DATA[0]); + setRequestPostElement('old_email', $content['email']); } // END - if // Update member's profile - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // New way SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` SET `gender`='%s', `surname`='%s', `family`='%s', `street_nr`='%s', `country_code`=%s, `zip`=%s, `city`='%s', `email`='%s', `birth_day`=%s, `birth_month`=%s, `birth_year`=%s, - `max_mails`=%s, + `max_mails`='%s', `last_update`=UNIX_TIMESTAMP()".$AND.", `notified`='N', `last_profile_sent`=UNIX_TIMESTAMP() @@ -244,24 +252,24 @@ WHERE `userid`=%s LIMIT 1", array( - REQUEST_POST('gender'), - REQUEST_POST('surname'), - REQUEST_POST('family'), - REQUEST_POST('street_nr'), - bigintval(REQUEST_POST('country_code')), - bigintval(REQUEST_POST('zip')), - REQUEST_POST('city'), - REQUEST_POST('addy'), - bigintval(REQUEST_POST('day')), - bigintval(REQUEST_POST('month')), - bigintval(REQUEST_POST('year')), - bigintval(REQUEST_POST('max_mails')), + postRequestElement('gender'), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + bigintval(postRequestElement('country_code')), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + bigintval(postRequestElement('max_mails')), getUserId() ), __FILE__, __LINE__); } else { // Old way SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` SET `gender`='%s', `surname`='%s', `family`='%s', `street_nr`='%s', @@ -276,18 +284,18 @@ WHERE `userid`=%s LIMIT 1", array( - REQUEST_POST('gender'), - REQUEST_POST('surname'), - REQUEST_POST('family'), - REQUEST_POST('street_nr'), - REQUEST_POST('cntry'), - bigintval(REQUEST_POST('zip')), - REQUEST_POST('city'), - REQUEST_POST('addy'), - bigintval(REQUEST_POST('day')), - bigintval(REQUEST_POST('month')), - bigintval(REQUEST_POST('year')), - bigintval(REQUEST_POST('max_mails')), + postRequestElement('gender'), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + postRequestElement('cntry'), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(postRequestElement('day')), + bigintval(postRequestElement('month')), + bigintval(postRequestElement('year')), + bigintval(postRequestElement('max_mails')), getUserId() ), __FILE__, __LINE__); } @@ -301,26 +309,26 @@ LIMIT 1", sendModeMails ('mydata', $modes); } else { // Something went wrong - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_UPDATE_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_UPDATE_FAILED')); } } else { // Entered wrong pass for updating profile - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG')); + loadTemplate('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG')); } } 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(getUserId()), __FILE__, __LINE__); - $URL = 'modules.php?module=login&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED')); + $URL = 'modules.php?module=login&what=welcome&code=' . urlencode(getMessage('PROFILE_UPDATED')); break; -} +} // END - switch if (!empty($URL)) { // Load generated URL redirectToUrl($URL); } // END - if -// +// [EOF] ?> diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index cfb079145b..aa3d6f531a 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,72 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('newsletter')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('newsletter')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -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", - array(getUserId()), __FILE__, __LINE__); -list($status, $until, $span) = SQL_FETCHROW($result); -SQL_FREERESULT($result); - -// Remember charge value -define('__CHARGE_VALUE', translateComma(getConfig('nl_charge'))); - -if ((isFormSent()) && ($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", - array(getUserId()), __FILE__, __LINE__); - - // Load admin message - $admin_msg = LOAD_EMAIL_TEMPLATE('admin_newsletter_request', array(), getUserId()); - - // Add task - createNewTask('{--ADMIN_NL_SUBJECT--}', $admin_msg, 'NL_UNSUBSCRIBE', getUserId()); - - // Send mail to member - $message = LOAD_EMAIL_TEMPLATE('member_newsletter_request', array(), getUserId()); - sendEmail(getUserId(), getMessage('NL_MEMBER_SUBJECT'), $message); +addMenuDescription('member', __FILE__); - // Send mail to all admins - sendAdminNotification(getMessage('NL_ADMIN_SUBJECT'), 'admin_newsletter_request', array(), getUserId()); - - // Display message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_DONE')); -} elseif ($span > 0) { - // Already ordered - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_ALREADY')); -} else { - // Load template for the note - define('NL_MEMBER_NOTE', LOAD_TEMPLATE('member_newsletter_note', true)); - - // Set status message and submit button - switch ($status) { - case 'Y': // Receives the newsletter - define('__STATUS_VALUE', getMessage('NL_MEMBER_ON')); - define('__UNTIL_VALUE' , ''); - define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF')); - break; - - case 'N': // Does not receive the newsletter - define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF')); - define('__UNTIL_VALUE' , generateDateTime($until, '2')); - define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON')); - break; - } // END - switch - - // Load template and member settings - LOAD_TEMPLATE('member_newsletter'); -} +if ((!isExtensionActive('newsletter')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('newsletter')); + return; +} // END - if // [EOF] ?> diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index a086dfd3fe..bcda07e5be 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,39 +38,41 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('nickname')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('nickname')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('nickname')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('nickname')); + return; +} // END - if + $isValid = false; if (isFormSent()) { // Nickname was submitted so let's check if it is not already in use - if (REQUEST_ISSET_POST('nickname')) { + if (isPostRequestElementSet('nickname')) { // Check if nickname is valid $PATTERN = '[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}'; - if (ereg($PATTERN, REQUEST_POST('nickname'), $array)) { + if (ereg($PATTERN, postRequestElement('nickname'), $array)) { // Entered nickname is valid? - $isValid = ($array[0] == REQUEST_POST('nickname')); + $isValid = ($array[0] == postRequestElement('nickname')); } // END - if } // END - if } // END - if if ($isValid === true) { // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !) - $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1", - array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1", + array(postRequestElement('nickname'), getUserId()), __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", - array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", + array(postRequestElement('nickname'), getUserId()), __FILE__, __LINE__); $content = getMessage('NICKNAME_SAVED'); } else { // Free result @@ -81,15 +83,15 @@ if ($isValid === true) { } // Load template - LOAD_TEMPLATE('admin_settings_saved', false, $content); + loadTemplate('admin_settings_saved', false, $content); } else { // Do we have already submit the form? - if (REQUEST_ISSET_POST('nickname')) { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div"); + if (isPostRequestElementSet('nickname')) { + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div"); } // END - if // Load Template - LOAD_TEMPLATE('member_nickname_form', false, NICKNAME_GET_NICK(getUserId())); + loadTemplate('member_nickname_form', false, getNickname(getUserId())); } // diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index bf76b4b286..491160aa2d 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,45 +38,42 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('order')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('order')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); + return; +} // END - if $URL = ''; $id = 0; $whereStatement = " WHERE `visible`='Y'"; // Set undefined array elements -if (!REQUEST_ISSET_GET('msg')) REQUEST_SET_GET('msg' , ''); -if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , ''); -if (!REQUEST_ISSET_POST('html')) REQUEST_SET_POST('html' , ''); -if (!REQUEST_ISSET_POST('receiver')) REQUEST_SET_POST('receiver', ''); -if (IS_ADMIN()) $whereStatement = ''; +if (isAdmin()) $whereStatement = ''; // Minimum mails / order -define('__MIN_VALUE', getConfig('order_min')); +$content['min'] = getConfig('order_min'); // Count unconfirmed mails -$links = GET_TOTAL_DATA(getUserId(), "user_links", 'id', 'userid', true); +$links = countSumTotalData(getUserId(), 'user_links', 'id', 'userid', true); // Does the user has more than 0 mails per day set? $HOLIDAY = 'userid'; -if (GET_EXT_VERSION('holiday') >= '0.1.3') { +if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) { // Fetch also holiday activation data - $HOLIDAY = "holiday_active"; + $HOLIDAY = '`holiday_active`'; } // END - if -$result_mmails = SQL_QUERY_ESC("SELECT userid, receive_mails, mail_orders, ".$HOLIDAY." -FROM `{!_MYSQL_PREFIX!}_user_data` -WHERE userid=%s AND max_mails > 0 LIMIT 1", -array(getUserId()), __FILE__, __LINE__); +$result_mmails = SQL_QUERY_ESC("SELECT `userid`, `receive_mails`, `mail_orders`, ".$HOLIDAY." +FROM `{?_MYSQL_PREFIX?}_user_data` +WHERE `userid`=%s AND `max_mails` > 0 LIMIT 1", + array(getUserId()), __FILE__, __LINE__); $mmails = SQL_NUMROWS($result_mmails); list($DMY, $MAXI, $ORDERS, $HOLIDAY) = SQL_FETCHROW($result_mmails); @@ -87,24 +84,24 @@ $ALLOWED = $MAXI - $ORDERS; if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI; // Now check his points amount -$total = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points');; +$total = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points');; -if (($HOLIDAY == 'Y') && (GET_EXT_VERSION('holiday') >= '0.1.3')) { +if (($HOLIDAY == 'Y') && (getExtensionVersion('holiday') >= '0.1.3')) { // Holiday is active! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); -} elseif ((REQUEST_ISSET_POST(('frametester'))) && ($ALLOWED > 0) && (REQUEST_POST('receiver') > 0)) { + loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); +} elseif ((isPostRequestElementSet(('frametester'))) && ($ALLOWED > 0) && (postRequestElement('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back... $result = SQL_QUERY_ESC("SELECT `id`, `data_type` FROM - `{!_MYSQL_PREFIX!}_pool` + `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `url`='%s' AND `timestamp` > (UNIX_TIMESTAMP() - %s) LIMIT 1", array( getUserId(), - REQUEST_POST('url'), + postRequestElement('url'), getConfig('url_tlock') ), __FILE__, __LINE__); @@ -123,43 +120,43 @@ LIMIT 1", $URL = ''; if (getConfig('test_text') == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) - if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) { + if ((strpos(strtolower(postRequestElement('text')), "https://") > -1) || (strpos(strtolower(postRequestElement('text')), 'http://') > -1) || (strpos(strtolower(postRequestElement('text')), "www") > -1)) { // URL found! - $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", '', str_replace("\r", '', REQUEST_POST('text'))); + $TEST = str_replace("\n", '', str_replace("\r", '', postRequestElement('text'))); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { // Text is too long! - $URL = 'modules.php?module=login&what=order&msg=' . getCode('OVERLENGTH'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('OVERLENGTH'); } // END - if } // END - if // Shall I test the subject line against URLs? if (getConfig('test_subj') == 'Y') { // Check the subject line for issues - REQUEST_SET_POST('subject', str_replace("\\", '[nl]', substr(REQUEST_POST('subject'), 0, 200))); - if ((strpos(strtolower(REQUEST_POST('subject')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) { + setRequestPostElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); + if ((strpos(strtolower(postRequestElement('subject')), 'http://') > -1) || (strpos(strtolower(postRequestElement('subject')), "www") > -1)) { // URL in subject found - $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('SUBJ_URL'); } // END - if } // END - if // 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", - array(REQUEST_POST('url')), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1", + array(postRequestElement('url')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Jupp, we got one listed list($blist) = SQL_FETCHROW($result); // Create redirect-URL - $URL = 'modules.php?module=login&what=order&msg=' . getCode('BLIST_URL') . '&blist=' . $blist; + $URL = 'modules.php?module=login&what=order&code=' . getCode('BLIST_URL') . '&blist=' . $blist; } // END - if // Free result @@ -167,52 +164,52 @@ LIMIT 1", } // END - if // Enougth receivers entered? - if ((REQUEST_POST('receiver') < getConfig('order_min')) && (!IS_ADMIN())) { + if ((postRequestElement('receiver') < getConfig('order_min')) && (!isAdmin())) { // Less than allowed receivers entered! - $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS3'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS3'); } // END - if // Validate URL - if (!isUrlValid(REQUEST_POST('url'))) { + if (!isUrlValid(postRequestElement('url'))) { // URL is invalid! - $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_URL'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_URL'); } // END - if // Probe for HTML extension - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // HTML or regular text mail? - if (REQUEST_POST('html') == 'Y') { + if (postRequestElement('html') == 'Y') { // Chek for valid HTML tags - REQUEST_SET_POST('text', HTML_CHECK_TAGS(REQUEST_POST('text'))); + setRequestPostElement('text', checkHtmlTags(postRequestElement('text'))); // Maybe invalid tags found? - if (!REQUEST_ISSET_POST('text')) $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_TAGS')."&id=".$id; + if (!isPostRequestElementSet('text')) $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code - REQUEST_SET_POST('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', REQUEST_POST('text')))); + setRequestPostElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); } } - } elseif (!IS_ADMIN()) { + } elseif (!isAdmin()) { // He has already sent a mail within a specific time - $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_TLOCK') . '&id=' . $id; + $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_TLOCK') . '&id=' . $id; } // Still no error? if (empty($URL)) { // Check if category and number of receivers is okay $add = ''; - if ((getConfig('order_multi_page') == 'Y') && (REQUEST_ISSET_POST('zip'))) { + if ((getConfig('order_multi_page') == 'Y') && (isPostRequestElementSet('zip'))) { // Choose recipients by ZIP code - $add = " AND d.zip LIKE '".bigintval(REQUEST_POST('zip'))."{PER}'"; + $add = " AND d.zip LIKE '".bigintval(postRequestElement('zip'))."{PER}'"; } // END - if // Check for userids $result = SQL_QUERY_ESC("SELECT c.userid FROM - `{!_MYSQL_PREFIX!}_user_cats` AS c + `{?_MYSQL_PREFIX?}_user_cats` AS c LEFT JOIN - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS d ON c.userid=d.userid WHERE @@ -220,17 +217,17 @@ WHERE ORDER BY d.%s %s", array( - bigintval(REQUEST_POST('cat')), + bigintval(postRequestElement('cat')), getUserId(), getConfig('order_select'), getConfig('order_mode'), ), __FILE__, __LINE__); // Do we enougth receivers left? - if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) { + if (SQL_NUMROWS($result) >= postRequestElement('receiver')) { // Check for holiday extensions $HOLIDAY = false; - if (GET_EXT_VERSION('holiday') >= '0.1.3') { + if (getExtensionVersion('holiday') >= '0.1.3') { // Include checking for users in holiday $HOLIDAY = true; } // END - if @@ -243,7 +240,7 @@ ORDER BY $result_holiday = SQL_QUERY_ESC("SELECT `id` FROM - `{!_MYSQL_PREFIX!}_user_holidays` + `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s AND `holiday_start` < UNIX_TIMESTAMP() AND `holiday_end` > UNIX_TIMESTAMP() LIMIT 1", @@ -271,17 +268,17 @@ LIMIT 1", $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 - if ($MAX_SEND > REQUEST_POST('receiver')) $MAX_SEND = REQUEST_POST('receiver'); + if ($MAX_SEND > postRequestElement('receiver')) $MAX_SEND = bigintval(postRequestElement('receiver')); // Calculate used points - $USED = $MAX_SEND * getPaymentPoints(bigintval(REQUEST_POST('type'))); + $USED = $MAX_SEND * getPaymentPoints(bigintval(postRequestElement('type'))); // Fix empty zip code - if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip', '0'); + if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', '0'); // Check if he has enougth points for this order and selected more than 0 receivers if (($USED > 0) && ($USED <= $total) && ($MAX_SEND > 0)) { @@ -290,46 +287,46 @@ LIMIT 1", if (($id == '0') || ($type != 'TEMP')) { // New order $id = 0; - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // HTML extension is active - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`, `html_msg`) + 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( getUserId(), - REQUEST_POST('subject'), - REQUEST_POST('text'), + postRequestElement('subject'), + postRequestElement('text'), $RECEIVER, - bigintval(REQUEST_POST('type')), + bigintval(postRequestElement('type')), $TIME, - REQUEST_POST('url'), - bigintval(REQUEST_POST('cat')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $MAX_SEND, - bigintval(REQUEST_POST('zip')), - REQUEST_POST('html') + bigintval(postRequestElement('zip')), + postRequestElement('html') ), __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( getUserId(), - REQUEST_POST('subject'), - REQUEST_POST('text'), + postRequestElement('subject'), + postRequestElement('text'), $RECEIVER, - bigintval(REQUEST_POST('type')), + bigintval(postRequestElement('type')), $TIME, - REQUEST_POST('url'), - bigintval(REQUEST_POST('cat')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $MAX_SEND, - bigintval(REQUEST_POST('zip')), + bigintval(postRequestElement('zip')), ), __FILE__, __LINE__); } } else { // Change current order - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // HTML extension is active SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_pool` + `{?_MYSQL_PREFIX?}_pool` SET `subject`='%s', `text`='%s', @@ -345,21 +342,21 @@ WHERE `id`=%s LIMIT 1", array( - REQUEST_POST('subject'), - REQUEST_POST('text'), + postRequestElement('subject'), + postRequestElement('text'), $RECEIVER, - bigintval(REQUEST_POST('type')), - REQUEST_POST('url'), - bigintval(REQUEST_POST('cat')), + bigintval(postRequestElement('type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $MAX_SEND, - bigintval(REQUEST_POST('zip')), - REQUEST_POST('html'), + bigintval(postRequestElement('zip')), + postRequestElement('html'), bigintval($id) ), __FILE__, __LINE__); } else { // No HTML extension is active SQL_QUERY_ESC("UPDATE - `{!_MYSQL_PREFIX!}_pool` + `{?_MYSQL_PREFIX?}_pool` SET `subject`='%s', `text`='%s', @@ -374,14 +371,14 @@ WHERE `id`=%s LIMIT 1", array( - REQUEST_POST('subject'), - REQUEST_POST('text'), + postRequestElement('subject'), + postRequestElement('text'), $RECEIVER, - bigintval(REQUEST_POST('type')), - REQUEST_POST('url'), - bigintval(REQUEST_POST('cat')), + bigintval(postRequestElement('type')), + postRequestElement('url'), + bigintval(postRequestElement('cat')), $MAX_SEND, - bigintval(REQUEST_POST('zip')), + bigintval(postRequestElement('zip')), bigintval($id) ), __FILE__, __LINE__); } @@ -390,11 +387,11 @@ LIMIT 1", // 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( getUserId(), - REQUEST_POST('subject'), - bigintval(REQUEST_POST('type')), + postRequestElement('subject'), + bigintval(postRequestElement('type')), $TIME ), __FILE__, __LINE__); @@ -406,28 +403,28 @@ LIMIT 1", $URL = 'modules.php?module=frametester&order=' . $id; } elseif ($MAX_SEND == 0) { // Not enougth receivers found which can receive mails - $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS2'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS2'); } else { // No enougth points left! - $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_POINTS'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_POINTS'); } } else { // Ordered more mails than he can send in this category - $URL = 'modules.php?module=login&what=order&msg=' . getCode('NO_RECS_LEFT'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT'); } } -} elseif (REQUEST_POST('receiver') == '0') { +} elseif (postRequestElement('receiver') == '0') { // Not enougth receivers selected - $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS1'); + $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); } elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) { // No more mail orders allowed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); } elseif (($links < getConfig('unconfirmed')) && ($mmails == '1')) { // Display order form $result_cats = SQL_QUERY("SELECT `id`, `cat` FROM - `{!_MYSQL_PREFIX!}_cats` + `{?_MYSQL_PREFIX?}_cats` ".$whereStatement." ORDER BY `sort` ASC", __FILE__, __LINE__); @@ -435,16 +432,16 @@ ORDER BY if ($total > 0) { // Initialize array... $CATS = array( - 'id' => array(), - 'name' => array(), - 'uids' => array() + 'id' => array(), + 'name' => array(), + 'userids' => array() ); // Enable HTML checking // @TODO Rewrite this to a filter $HTML = ''; $HOLIDAY = false; $HOL_STRING = ''; - if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) $HTML = " AND `html`='Y'"; - if (GET_EXT_VERSION('holiday') >= '0.1.3') { + if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) $HTML = " AND `html`='Y'"; + if (getExtensionVersion('holiday') >= '0.1.3') { // Extension's version is fine $HOLIDAY = true; $HOL_STRING = " AND `holiday_active`='N'"; } // END - if @@ -455,19 +452,19 @@ ORDER BY $CATS['name'][] = $content['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` ASC", + $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC", array(bigintval($content['id']), getUserId()), __FILE__, __LINE__); - $uid_cnt = 0; - while (list($ucat) = SQL_FETCHROW($result_uids)) { + $userid_cnt = 0; + while (list($ucat) = SQL_FETCHROW($result_userids)) { // Check for holiday system $HOL_ACTIVE = false; if ($HOLIDAY) { // Check user's holiday status $result_holiday = SQL_QUERY_ESC("SELECT - d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d + d.userid FROM `{?_MYSQL_PREFIX?}_user_data` AS d LEFT JOIN - `{!_MYSQL_PREFIX!}_user_holidays` AS h + `{?_MYSQL_PREFIX?}_user_holidays` AS h ON d.userid=h.userid WHERE @@ -475,133 +472,52 @@ WHERE h.holiday_start < UNIX_TIMESTAMP() AND h.holiday_end > UNIX_TIMESTAMP() LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); - if (SQL_NUMROWS($result_holiday) == 1) { - // Holiday is active! - $HOL_ACTIVE = true; - } // END - if + + // Is holiday is active? + $HOL_ACTIVE = (SQL_NUMROWS($result_holiday) == 1); // Free memory SQL_FREERESULT($result_holiday); } // END - if - if (!$HOL_ACTIVE) { + if ($HOL_ACTIVE === false) { // 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) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) { + if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestElementSet('zip')) && (getConfig('order_multi_page') == 'Y')) { list($zip) = SQL_FETCHROW($result_ver); SQL_FREERESULT($result_ver); - if (substr($zip, 0, strlen(REQUEST_POST('zip'))) == REQUEST_POST('zip')) { + if (substr($zip, 0, strlen(postRequestElement('zip'))) == postRequestElement('zip')) { // Ok, ZIP part is found - $uid_cnt++; + $userid_cnt++; } // END - if } else { // Count numbers up! - $uid_cnt += SQL_NUMROWS($result_ver); + $userid_cnt += SQL_NUMROWS($result_ver); } } // END - if } // END - while // Free memory - SQL_FREERESULT($result_uids); - $CATS['uids'][] = $uid_cnt; + SQL_FREERESULT($result_userids); + $CATS['userids'][] = $userid_cnt; } // END - while // Free memory 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` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `price`, `payment`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `payment` ASC", __FILE__, __LINE__); $typeS = array(); if (SQL_NUMROWS($result) > 0) { // Check for message ID in URL - $message = ''; - switch (REQUEST_GET('msg')) { - case getCode('URL_TLOCK'): - $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); - - // Load timestamp from last order - list($LORDER) = SQL_FETCHROW($result); - $LORDER = generateDateTime($LORDER, '1'); - - // Free memory - SQL_FREERESULT($result); - - // Calculate hours... - $STD = round(getConfig('url_tlock') / 60 / 60); - - // Minutes... - $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60); - - // And seconds - $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60; - - // Finally contruct the message - // @TODO Rewrite this old lost code to a template - $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD." - {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br /> - {--MEMBER_LAST_TLOCK--}: ".$LORDER; - break; - - case getCode('OVERLENGTH'): - $message = getMessage('MEMBER_TEXT_OVERLENGTH'); - break; - - case getCode('URL_FOUND'): - $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); - break; - - case getCode('SUBJ_URL'): - $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); - break; - - case getCode('BLIST_URL'): - $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0'); - break; - - case getCode('NO_RECS_LEFT'): - $message = getMessage('MEMBER_SELECTED_MORE_RECS'); - break; - - case getCode('INVALID_TAGS'): - $message = getMessage('MEMBER_HTML_INVALID_TAGS'); - break; - - case getCode('MORE_POINTS'): - $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); - break; - - case getCode('MORE_RECEIVERS1'): - $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); - break; - - case getCode('MORE_RECEIVERS2'): - $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); - break; - - case getCode('MORE_RECEIVERS3'): - $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); - break; - - case getCode('INVALID_URL'): - $message = getMessage('MEMBER_ENTER_INVALID_URL'); - break; - - case '': // When no error code is included in the URL we do not need to output an error message as well... - break; - - default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg'))); - $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg')); - break; - } // END - switch + $message = getMessageFromErrorCode(getRequestElement('code')); if (!empty($message)) { // We got system message so we drop it out to the user - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } // END - if // Load all email types... @@ -613,35 +529,38 @@ LIMIT 1", SQL_FREERESULT($result); // Output user's points - $total = translateComma($total); + $content['total'] = translateComma($total); // Check how many mail orders he has placed today and how many he's allowed to send switch (getConfig('order_max_full')) { case 'MAX': // He is allowed to send as much as possible - define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX')); + $content['order_max_full'] = getMessage('MEMBER_ORDER_ALLOWED_MAX'); break; case 'ORDER': // He is allowed to send as much as he setup the receiving value - define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI)); + $content['order_max_full'] = sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI); break; default: // Unknown/invalid - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full'))); - define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full'))); + $content['order_max_full'] = sprintf(getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'), getConfig('order_max_full')); break; } // END - switch // Load final template - LOAD_TEMPLATE('member_order_points', false, $total); + loadTemplate('member_order_points', false, $content); // Reset variables - $OLD_ORDER = false; $subject = ''; $text = ''; $target = ''; + $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` + `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `data_type`='TEMP' LIMIT 1", @@ -652,7 +571,7 @@ LIMIT 1", $content = SQL_FETCHARRAY($result); // Fix max receivers when it is too much - if ((isset($CATS['uids'][$content['cat_id']])) && ($content['target_send'] > $CATS['uids'][$content['cat_id']])) $content['target_send'] = $CATS['uids'][$content['cat_id']]; + if ((isset($CATS['userids'][$content['cat_id']])) && ($content['target_send'] > $CATS['userids'][$content['cat_id']])) $content['target_send'] = $CATS['userids'][$content['cat_id']]; // Old order is grabbed $OLD_ORDER = true; @@ -664,13 +583,13 @@ LIMIT 1", // Free result SQL_FREERESULT($result); - if ((REQUEST_ISSET_POST('data')) || ((getConfig('order_multi_page') != 'Y') && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE('html_mail'))))) { + if ((isPostRequestElementSet('data')) || ((getConfig('order_multi_page') != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { // Pre-output categories $CAT = ''; foreach ($CATS['id'] as $key => $value) { $CAT .= " <option value=\"".$value."\""; if (($OLD_ORDER) && ($content['cat_id'] == $value)) $CAT .= ' selected="selected"'; - $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n"; + $CAT .= ">".$CATS['name'][$key]." (".$CATS['userids'][$key]." {--USER_IN_CAT--})</option>\n"; } // END - foreach // Mail type @@ -686,84 +605,80 @@ LIMIT 1", } // END - foreach // Put all in constants for the template - define('CATEGORY_SELECTION', $CAT); - define('TYPE_SELECTION', $type); - define('TARGET', $content['target_send']); - define('SUBJECT', $content['subject']); - define('TEXT', COMPILE_CODE($content['text'])); - define('T_URL', $content['url']); - - if (REQUEST_ISSET_POST('zip')) { + $content['category_selection'] = $CAT; + $content['type_selection'] = $type; + + if (isPostRequestElementSet('zip')) { // Output entered ZIP code - define('ZIP_OUTPUT', LOAD_TEMPLATE('member_order-zip', true, REQUEST_POST('zip'))); + $content['zip_content'] = loadTemplate('member_order-zip', true, postRequestElement('zip')); } else { - define('ZIP_OUTPUT', "<tr><td colspan=\"5\" height=\"5\" class=\"seperator\"> </td></tr>"); + $content['zip_content'] = "<tr><td colspan=\"5\" height=\"5\" class=\"seperator\"> </td></tr>"; } // HTML extension - if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) { + if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) { // Extension is active so output valid HTML tags - define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE('member_order-html_ext', true, HTML_ADD_VALID_TAGS())); + $content['html_extension'] = loadTemplate('member_order-html_ext', true, addValidHtmlTags()); } else { // Extension not active and/or class not uploaded - define('MEMBER_HTML_EXTENSION', "<tr><td colspan=\"5\"><input type=\"hidden\" name=\"html\" value=\"N\"> /</td></tr>"); + $content['html_extension'] = "<tr><td colspan=\"5\"><input type=\"hidden\" name=\"html\" value=\"N\"> /</td></tr>"; } // Output form for page 2 - LOAD_TEMPLATE('member_order_page2'); + loadTemplate('member_order_page2'); } else { // Remember maybe entered ZIP code in constant $add = ''; - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // Add some content when html extension is active - if ((getConfig('order_multi_page') == 'Y') || (IS_ADMIN())) $add = "<tr><td colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </td></tr>\n"; - define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE('member_order-html_intro', true)); + if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) $add = "<tr><td colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </td></tr>\n"; + $content['html_extension'] = loadTemplate('member_order-html_intro', true); } else { // No HTML extension installed - define('MEMBER_HTML_EXTENSION', "<tr><td colspan=\"2\"><input type=\"hidden\" name=\"html\" value=\"N\" /></td></tr>"); + $content['html_extension'] = "<tr><td colspan=\"2\"><input type=\"hidden\" name=\"html\" value=\"N\" /></td></tr>"; } + // Default is no ZIP code + $content['zip_content'] = ''; + // Do we want ZIP code or not? - if ((getConfig('order_multi_page') == 'Y') || (IS_ADMIN())) { + if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) { // Yes - if (REQUEST_POST('zip') > 0) { - $content = array( - 'zip' => bigintval(REQUEST_POST('zip')), + if (postRequestElement('zip') > 0) { + $data = array( + 'zip' => bigintval(postRequestElement('zip')), 'add' => $add ); } else { - $content = array( - 'zip' => "", + $data = array( + 'zip' => '', 'add' => $add ); } - define('MEMBER_ZIP_CONTENT', LOAD_TEMPLATE('member_order-zip1', true, $content)); - } else { - // No - define('MEMBER_ZIP_CONTENT', ''); - } + $content['zip_content'] = loadTemplate('member_order-zip1', true, $data); + } // END - if // Output form for page 1 (ZIP code or HTML) - LOAD_TEMPLATE('member_order_page1'); + loadTemplate('member_order_page1', false, $content); } } else { // No mail types defined - LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>"); + loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>"); } } else { // No points left - LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>"); + loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>"); } } else { // No cateogries are defined yet - LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>"); + loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>"); } } elseif ($mmails == '0') { // Please set more than 0 mails per day - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS')); } else { // Please confirm some mails first - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed'))); } if (!empty($URL)) { diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 18a3b449e9..10ad466fa8 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,24 +39,25 @@ // Some security stuff... if (!defined('__SECURITY')) { // Don't call this directly! - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // Not logged in - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('payout')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('payout')); - return; + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('payout')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('payout')); + return; +} // END - if -$result_depths = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); -$TPTS = 0; +$result_depths = SQL_QUERY("SELECT level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__); +$totalPoints = 0; while ($content = SQL_FETCHARRAY($result_depths)) { // Load referal points - $result_points = SQL_QUERY_ESC("SELECT points FROM `{!_MYSQL_PREFIX_user_points!}` WHERE userid=%s AND ref_depth=%d LIMIT 1", + $result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_dept`h=%d LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); // Entry found? @@ -65,7 +66,7 @@ while ($content = SQL_FETCHARRAY($result_depths)) { list($points) = SQL_FETCHROW($result_points); // Add them to total - $TPTS += $points; + $totalPoints += $points; } // END - if // Free result @@ -76,33 +77,33 @@ while ($content = SQL_FETCHARRAY($result_depths)) { SQL_FREERESULT($result_depths); // Get used points -$USED = GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); +$usedPoints = countSumTotalData(getUserId(), 'user_data', 'used_points'); // Translate point into comma -$TPTS = translateComma($TPTS - $USED); +$totalPoints = ($totalPoints - $usedPoints); // Sanity check... -if (empty($TPTS)) $TPTS = '0.00000'; +if (empty($totalPoints)) $totalPoints = '0.00000'; -if (!REQUEST_ISSET_GET(('payout'))) { +if (!isGetRequestElementSet('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 ASC", - array(convertCommaToDot($TPTS)), __FILE__, __LINE__); + array($totalPoints), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Free memory SQL_FREERESULT($result); // 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 banner -FROM `{!_MYSQL_PREFIX!}_user_payouts` AS p -LEFT JOIN `{!_MYSQL_PREFIX!}_payout_types` AS t + $result_payouts = SQL_QUERY_ESC("SELECT 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 banner +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", - array(getUserId()), __FILE__, __LINE__); + array(getUserId()), __FILE__, __LINE__); if (SQL_NUMROWS($result_payouts) > 0) { // List all his requests $OUT = ''; $SW = 2; @@ -121,7 +122,7 @@ ORDER BY p.payout_timestamp DESC", // Textlink $content['target_account'] = $content['alt']; } - $content['target_bank'] = "<a href=\"".DEREFERER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>"; + $content['target_bank'] = "<a href=\"".generateDerefererUrl($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>"; } else { // e-currency payout request if (empty($content['target_account'])) $content['target_account'] = '---'; @@ -133,35 +134,31 @@ ORDER BY p.payout_timestamp DESC", $content = array( 'sw' => $SW, 'acc' => $content['target_account'], - 'points' => translateComma($content['payout_total'])." ".COMPILE_CODE($content['type']), + 'points' => translateComma($content['payout_total']) . ' ' . $content['type'], 'bank' => $content['target_bank'], 'stamp' => generateDateTime($content['payout_timestamp'], '2'), 'status' => $content['status'] ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('member_payout_row', true, $content); + $OUT .= loadTemplate('member_payout_row', true, $content); $SW = 3 - $SW; } - // Remember rows in constant - // @TODO Rewrite this constant - define('__PAYOUT_ROWS', $OUT); - // Load template - LOAD_TEMPLATE('member_payout'); + loadTemplate('member_payout', false, $OUT); } // Free memory SQL_FREERESULT($result_payouts); // Output payout list - PAYOUT_OUTPUT_PAYOUT_LIST($TPTS); + outputPayoutList($totalPoints); } } else { // Chedk if he can get paid by selected type - $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url AS allow FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('payout'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url AS allow FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('payout'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ID is valid so load the data @@ -169,71 +166,68 @@ ORDER BY p.payout_timestamp DESC", SQL_FREERESULT($result); // Calculate maximum value - $max = round($TPTS * $content['rate'] - 0.5); + $max = round($totalPoints * $content['rate'] - 0.5); + $PAY_MAX = 0; // Calulcate points from submitted amount - $PAYOUT = 0; - if (REQUEST_ISSET_POST(('payout'))) { - $PAYOUT = bigintval(REQUEST_POST('payout')) / $content['rate']; + $points = 0; + if (isPostRequestElementSet('payout')) { + $points = bigintval(postRequestElement('payout')) / $content['rate']; $PAY_MAX = $max / $content['rate']; } - // Move variables into constants for templates - // @TODO Rewrite these constants - define('PAYOUT_MAX_VALUE' , $max); - define('PAYOUT_TYPE_VALUE', COMPILE_CODE($content['type'])); - - if (convertCommaToDot($TPTS) >= $content['min_points']) { + // Has enougth points to payout? + if ($totalPoints >= $content['min_points']) { // Ok, he can get be paid - if ((isFormSent()) && ($PAYOUT <= $PAY_MAX) && ($PAYOUT >= $content['min_points'])) { - // Calculate exact value - // @TODO Rewrite this constant - define('PAYOUT_POINTS_VALUE', $PAYOUT); + if ((isFormSent()) && ($points <= $PAY_MAX) && ($points >= $content['min_points'])) { + // Remember points in array + setRequestPostElement('payout_points', translateComma($points)); + setRequestPostElement('type' , $content['type']); // Subtract points from member's account - SUB_POINTS('payout', getUserId(), $PAYOUT); + subtractPoints('payout', getUserId(), $points); // Add entry to his tranfer history if ($content['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( getUserId(), - bigintval(REQUEST_POST('payout')), - bigintval(REQUEST_GET('payout')), - REQUEST_POST('turl'), - REQUEST_POST('alt'), - REQUEST_POST('banner') + bigintval(postRequestElement('payout')), + bigintval(getRequestElement('payout')), + postRequestElement('turl'), + postRequestElement('alt'), + postRequestElement('banner') ), __FILE__, __LINE__); // Load templates - $message_mem = LOAD_EMAIL_TEMPLATE('member_payout_request_banner', REQUEST_POST_ARRAY(), getUserId()); - if (GET_EXT_VERSION('admins') >= '0.4.1') { + $message_mem = loadEmailTemplate('member_payout_request_banner', postRequestArray(), getUserId()); + if (getExtensionVersion('admins') >= '0.4.1') { $adm_tpl = 'admin_payout_request_banner'; } else { - $message_adm = LOAD_EMAIL_TEMPLATE('admin_payout_request_banner', REQUEST_POST_ARRAY(), getUserId()); + $message_adm = loadEmailTemplate('admin_payout_request_banner', postRequestArray(), getUserId()); } } 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( getUserId(), - bigintval(REQUEST_POST('payout')), - bigintval(REQUEST_POST('account')), - REQUEST_POST('bank'), - bigintval(REQUEST_GET('payout')), - REQUEST_POST('pass') + bigintval(postRequestElement('payout')), + bigintval(postRequestElement('account')), + postRequestElement('bank'), + bigintval(getRequestElement('payout')), + postRequestElement('pass') ), __FILE__, __LINE__); // Load templates - $message_mem = LOAD_EMAIL_TEMPLATE('member_payout_request', REQUEST_POST_ARRAY(), getUserId()); - $message_adm = LOAD_EMAIL_TEMPLATE('admin_payout_request', REQUEST_POST_ARRAY(), getUserId()); + $message_mem = loadEmailTemplate('member_payout_request', postRequestArray(), getUserId()); + $message_adm = loadEmailTemplate('admin_payout_request', postRequestArray(), getUserId()); $admin_tpl = ''; // @TODO Rewrite this to a filter - if (GET_EXT_VERSION('admins') >= '0.4.1') { + if (getExtensionVersion('admins') >= '0.4.1') { $admin_tpl = 'admin_payout_request'; } // END - if } @@ -245,36 +239,40 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", sendEmail(getUserId(), getMessage('PAYOUT_REQUEST_MEMBER'), $message_mem); // To admin(s) - sendAdminNotification(getMessage('PAYOUT_REQUEST_ADMIN'), $admin_tpl, REQUEST_POST_ARRAY(), getUserId()); + sendAdminNotification(getMessage('PAYOUT_REQUEST_ADMIN'), $admin_tpl, postRequestArray(), getUserId()); // Load template and output it - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_REQUEST_SENT')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_REQUEST_SENT')); } elseif ($content['allow'] == 'Y') { // Prepare content $content = array( - 'payout' => bigintval(REQUEST_GET('payout')) + 'max' => $max, + 'type' => $content['type'], + 'payout' => bigintval(getRequestElement('payout')) ); // Generate banner order form - LOAD_TEMPLATE('member_payout_form_banner', false, $content); + loadTemplate('member_payout_form_banner', false, $content); } else { // Prepare content $content = array( - 'payout' => bigintval(REQUEST_GET('payout')) + 'max' => $max, + 'type' => $content['type'], + 'payout' => bigintval(getRequestElement('payout')) ); // Generate normal form - LOAD_TEMPLATE('member_payout_form', false, $content); + loadTemplate('member_payout_form', false, $content); } } else { // Not enougth points - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_POINTS_NOT_ENOUGTH')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_POINTS_NOT_ENOUGTH')); } } else { // ID is invalid - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ID_INVALID')); + loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_ID_INVALID')); } } -// +// [EOF] ?> diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 86f2fdd762..3bfde38da0 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,90 +38,97 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); -$result_depths = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__); +// Query for referal levels and percents +$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC", __FILE__, __LINE__); $depths = SQL_NUMROWS($result_depths); // Add many more rows for the login/turbo/ref/order bonus // @TODO Should we rewrite this to a filter? -if (!EXT_IS_ACTIVE('bonus')) $depths += 1; -if (GET_EXT_VERSION('bonus') >= '0.2.2') $depths += 6; -if (GET_EXT_VERSION('bonus') >= '0.4.4') $depths += 4; +if (!isExtensionActive('bonus')) $depths += 1; +if (getExtensionVersion('bonus') >= '0.2.2') $depths += 6; +if (getExtensionVersion('bonus') >= '0.4.4') $depths += 4; // Remember row count in constant -define('__ROWS_VALUE', ($depths*2+15)); +$content['rowspan'] = ($depths*2+15); // Init some vars... -$TPTS = 0; $TREF = 0; $TLOCK = 0; $OUT = ''; +$totalPoints = 0; $TREF = 0; $TLOCK = 0; $OUT = ''; // Load ref levels -while ($content = SQL_FETCHARRAY($result_depths)) { +while ($data = SQL_FETCHARRAY($result_depths)) { + // Merge it together + $content = merge_array($content, $data); + // Initialize ref-count $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(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); + $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_points) == 1) { - list($points, $locked) = SQL_FETCHROW($result_points); - SQL_FREERESULT($result_points); + list($points, $locked) = SQL_FETCHROW($result_points); // Also count locked points - $TPTS += $points; $TLOCK += $locked; + $totalPoints += $points; $TLOCK += $locked; } else { $points = '0.00000'; $locked = '0.00000'; } + // Free result + SQL_FREERESULT($result_points); + // Load referal counts - $result_refs = SQL_QUERY_ESC("SELECT counter FROM `{!_MYSQL_PREFIX!}_refsystem` WHERE userid=%s AND level='%s' LIMIT 1", - array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); + $result_refs = SQL_QUERY_ESC("SELECT counter FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s AND level='%s' LIMIT 1", + array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_refs) == 1) { list($REFS) = SQL_FETCHROW($result_refs); - SQL_FREERESULT($result_refs); $TREF += $REFS; } else { $REFS = 0; } + // Free result + SQL_FREERESULT($result_refs); + // Transfer data to array for template - $content = array( - 'lvl' => $content['level'], - 'per' => translateComma($content['percents']), - 'points' => translateComma($points), - 'refs' => translateComma($REFS), + $row = array( + 'level' => $content['level'], + 'percents' => translateComma($content['percents']), + 'points' => translateComma($points), + 'refs' => translateComma($REFS), ); // Output row - $OUT .= LOAD_TEMPLATE("member_points_row", true, $content); -} + $OUT .= loadTemplate('member_points_row', true, $row); +} // END - while // Free memory SQL_FREERESULT($result_depths); // Put rows to constant for the main template -define('__REF_LEVEL_ROWS', $OUT); +$content['rows'] = $OUT; -$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", -array(getUserId()), __FILE__, __LINE__); -list($USED, $PAY) = SQL_FETCHROW($result); +$result = SQL_QUERY_ESC("SELECT `used_points`, `ref_payout` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(getUserId()), __FILE__, __LINE__); +list($usedPoints, $PAY) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Initialize variables $CONFIRMED = '---'; $SENT = '---'; $RECEIVED = '---'; // Only user >= v0.1.2: Fetch confirmed mails counter -if (GET_EXT_VERSION('user') >= '0.1.2') { +if (getExtensionVersion('user') >= '0.1.2') { $add = ''; - if (GET_EXT_VERSION('user') >= '0.1.4') { - $add = ", emails_sent, emails_received"; + if (getExtensionVersion('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(getUserId()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `mails_confirmed`".$add." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); list($CONFIRMED, $SENT, $RECEIVED) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -137,76 +144,78 @@ if (GET_EXT_VERSION('user') >= '0.1.2') { if ($TLOCK == '0') $TLOCK = '0.00000'; // Remember several values in constants -define('__USED_VALUE' , translateComma($USED)); -define('__TPTS_VALUE' , translateComma($TPTS - $USED)); -define('__TREF_VALUE' , $TREF); -define('__TLOCK_VALUE', translateComma($TLOCK)); +$content['used'] = translateComma($usedPoints); +$content['tpts'] = translateComma($totalPoints - $usedPoints); +$content['tref'] = $TREF; +$content['tlock'] = translateComma($TLOCK); // Fixes a bug when there is no bonus extension installed -if (EXT_VERSION_IS_OLDER('bonus', '0.4.4')) setConfigEntry('bonus_active', "X"); +if (isExtensionOlder('bonus', '0.4.4')) setConfigEntry('bonus_active', "X"); + +// Members shall see no special rows here +$content['special_rows'] = ''; // Display login bonus and turbo-click bonus -if ((GET_EXT_VERSION('bonus') >= '0.2.2') && (EXT_IS_ACTIVE('bonus')) && (getConfig('bonus_active') == 'Y')) { +if ((getExtensionVersion('bonus') >= '0.2.2') && (isExtensionActive('bonus')) && (getConfig('bonus_active') == 'Y')) { $add = ", 0, 0, 0"; - if (GET_EXT_VERSION('bonus') >= '0.4.4') $add = ", bonus_ref, bonus_order, bonus_stats"; + if (getExtensionVersion('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", - array(getUserId()), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `login_bonus`, `turbo_bonus`".$add." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(getUserId()), __FILE__, __LINE__); // We don't add this points now. This will be done after each month list($login, $turbo, $ref, $order, $stats) = SQL_FETCHROW($result); + + // Free result SQL_FREERESULT($result); // Prepare constants - define('__TURBO_VALUE', translateComma($turbo)); - define('__LOGIN_VALUE', translateComma($login)); + $content['turbo'] = translateComma($turbo); + $content['login'] = translateComma($login); - if (GET_EXT_VERSION('bonus') >= '0.4.4') { + if (getExtensionVersion('bonus') >= '0.4.4') { // Add referal, stats and order bonys - define('__REF_VALUE' , translateComma($ref)); - define('__ORDER_VALUE', translateComma($order)); - define('__STATS_VALUE', translateComma($stats)); - } + $content['ref'] = translateComma($ref); + $content['order'] = translateComma($order); + $content['stats'] = translateComma($stats); + } // END - if // Total bonus points - define('__TTOTAL_VALUE', translateComma($turbo + $login + $ref + $order + $stats)); + $content['ttotal'] = translateComma($turbo + $login + $ref + $order + $stats); // Output rows - define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_rows", true)); + $content['special_rows'] = loadTemplate('member_points_bonus_rows', true, $content); } elseif (getConfig('bonus_active') != 'Y') { // Bonus active rallye deactivated - define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_disabled", true)); -} elseif ((IS_ADMIN()) && (EXT_VERSION_IS_OLDER('bonus', '0.2.2')) && (EXT_IS_ACTIVE('bonus'))) { + $content['special_rows'] = loadTemplate('member_points_bonus_disabled', true); +} elseif ((isAdmin()) && (isExtensionOlder('bonus', '0.2.2')) && (isExtensionActive('bonus'))) { // Please upgrade your bonus extension to v0.2.2 or newer! - define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_upgrade")); -} else { - // Members shall see no special rows here - define('__SPECIAL_ROWS', ''); + $content['special_rows'] = loadTemplate('member_points_upgrade'); } // Remeber values for the final template -define('__PAY_VALUE' , $PAY); -define('__CONFIRMED_VALUE', $CONFIRMED); -define('__RECEIVE_VALUE' , $RECEIVED); -define('__SENT_VALUE' , $SENT); +$content['receive'] = $RECEIVED; +$content['pay'] = $PAY; +$content['confirmed'] = $CONFIRMED; +$content['sent'] = $SENT; // Load final template -if (EXT_IS_ACTIVE('user')) { +if (isExtensionActive('user')) { // Load template when required extension is there - LOAD_TEMPLATE("member_points"); -} elseif (IS_ADMIN()) { + loadTemplate('member_points', false, $content); +} elseif (isAdmin()) { // Missing extension - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('user')); + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('user')); } else { // Message for user - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE')); + loadTemplate('admin_settings_saved', false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE')); } -if (EXT_IS_ACTIVE('payout')) { +if (isExtensionActive('payout')) { // Payput extension is installed and active so we can check if the user has enougth points - PAYOUT_OUTPUT_PAYOUT_LIST(convertCommaToDot(($TPTS - $USED))); -} + outputPayoutList(convertCommaToDot(($totalPoints - $usedPoints))); +} // END - if -// +// [EOF] ?> diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index a1770d8fd5..4088ab3b1a 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,24 +38,25 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // User is not logged in - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('primera')) && (!IS_ADMIN())) { - // Extension 'primera' is not activated - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('primera')); - return; + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('primera')) && (!isAdmin())) { + // Extension 'primera' is not activated + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('primera')); + return; +} // END - if // Check if the admin has entered the data if ((getConfig('primera_api_name') == '') || (getConfig('primera_api_md5') == '')) { // Something important is missing... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_API_DATA_MISSING')); + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_API_DATA_MISSING')); return; } // END - if @@ -64,12 +65,12 @@ $content = array(); $points = false; // Is the mode set (payout only) -if (!REQUEST_ISSET_GET('mode')) { +if (!isGetRequestElementSet('mode')) { // Get referal id $content['refid'] = 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(getUserId()), __FILE__, __LINE__); // Are there some entries? @@ -82,12 +83,12 @@ if (!REQUEST_ISSET_GET('mode')) { SQL_FREERESULT($result); // Is there an ID? - if ((!empty($content['primera_nickname'])) && (!REQUEST_ISSET_GET('mode'))) { + if ((!empty($content['primera_nickname'])) && (!isGetRequestElementSet('mode'))) { // Then use an other "mode" - REQUEST_SET_GET('mode', 'list'); + setRequestGetElement('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(getUserId()), __FILE__, __LINE__); // Load all rows @@ -104,7 +105,7 @@ if (!REQUEST_ISSET_GET('mode')) { ); // Load row template - $content['rows'] .= LOAD_TEMPLATE('member_primera_mode_list_row', true, $rowContent); + $content['rows'] .= loadTemplate('member_primera_mode_list_row', true, $rowContent); $SW = 3 - $SW; } @@ -112,13 +113,13 @@ if (!REQUEST_ISSET_GET('mode')) { SQL_FREERESULT($result); } else { // Mode pay - REQUEST_SET_GET('mode', 'pay'); + setRequestGetElement('mode', 'pay'); } } // END - if -if (REQUEST_GET('mode') == 'pay') { +if (getRequestElement('mode') == 'pay') { // Get total points and check if the user can request a payout - $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); // No dots here... $points = explode('.', $points); @@ -130,7 +131,7 @@ if (REQUEST_GET('mode') == 'pay') { // Is this enougth for a payout? if ($points < getConfig('primera_min_payout')) { // No, then abort here - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), translateComma(getConfig('primera_min_payout')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), translateComma(getConfig('primera_min_payout')))); return; } @@ -140,7 +141,7 @@ if (REQUEST_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(getUserId()), __FILE__, __LINE__); // Are there some entries? @@ -153,37 +154,37 @@ if (REQUEST_GET('mode') == 'pay') { SQL_FREERESULT($result); } else { // Invalid mode! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET('mode'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), getRequestElement('mode'))); return; } // Is the formular sent? -if ((isFormSent()) && (REQUEST_ISSET_GET('mode'))) { +if ((isFormSent()) && (isGetRequestElementSet('mode'))) { // Check input data depending on the mode and execute the requested mode - switch (REQUEST_GET('mode')) { + switch (getRequestElement('mode')) { case 'pay': // Payout this exchange -> Primus // Is the user ID and password set? - if (!REQUEST_ISSET_POST(('primera_nickname'))) { + if (!isPostRequestElementSet(('primera_nickname'))) { // Nothing entered in Primus nickname - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME')); - } elseif (!REQUEST_ISSET_POST(('primera_password'))) { + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME')); + } elseif (!isPostRequestElementSet(('primera_password'))) { // Nothing entered in Primera password - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD')); - } elseif (!REQUEST_ISSET_POST(('amount'))) { + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD')); + } elseif (!isPostRequestElementSet(('amount'))) { // Nothing entered in amount - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT')); - } elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) { + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT')); + } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) { // Only numbers in amount! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT')); - } elseif (REQUEST_POST('amount') < getConfig('primera_min_payout')) { + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT')); + } elseif (postRequestElement('amount') < getConfig('primera_min_payout')) { // Not enougth entered! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout')))); - } elseif (REQUEST_POST('amount') > $points) { + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout')))); + } elseif (postRequestElement('amount') > $points) { // Not enougth points left! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points))); } else { // All is fine here so do the payout - $success = PRIMERA_EXECUTE_PAYOUT(REQUEST_POST('primera_nickname'), md5(REQUEST_POST('primera_password')), REQUEST_POST('amount')); + $success = executePrimeraPayout(postRequestElement('primera_nickname'), md5(postRequestElement('primera_password')), postRequestElement('amount')); if ($success) { // Default is locked! $locked = true; @@ -195,37 +196,37 @@ if ((isFormSent()) && (REQUEST_ISSET_GET('mode'))) { } // END - if // Remove points from account - SUB_POINTS('primera_payout', getUserId(), REQUEST_POST('amount')); + subtractPoints('primera_payout', getUserId(), postRequestElement('amount')); // Update primera nickname - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `primera_userid`=%s WHERE `userid`=%s LIMIT 1", - array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `primera_userid`=%s WHERE `userid`=%s LIMIT 1", + array(postRequestElement('primera_nickname'), getUserId()), __FILE__, __LINE__); // All done! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE')); return; } elseif ((GET_PRIMERA_ERROR_CODE() == 'user_failed') || (GET_PRIMERA_ERROR_CODE() == 'own_failed') || (GET_PRIMERA_ERROR_CODE() == 'amount_failed') || (GET_PRIMERA_ERROR_CODE() == 'api_amount_failed')) { // Wrong login data - LOAD_TEMPLATE('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); + loadTemplate('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE()); } else { // Something went wrong - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE())); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE())); } } break; default: // Invalid mode! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode'))); - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET('mode'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), getRequestElement('mode'))); return; } } // END - if // Prepare mode for template name -$mode = sprintf("member_primera_mode_%s", REQUEST_GET('mode')); +$mode = sprintf("member_primera_mode_%s", getRequestElement('mode')); // Load the template -LOAD_TEMPLATE($mode, false, $content); +loadTemplate($mode, false, $content); // ?> diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index a7a6fdb315..3daa41edce 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,29 +38,28 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('rallye')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('rallye')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); -OUTPUT_HTML("<div align=\"center\">"); +if ((!isExtensionActive('rallye')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('rallye')); + return; +} // END - if // Check for possible running rallyes $ADMIN = " AND d.is_active='Y'"; -if (IS_ADMIN()) $ADMIN = ''; +if (isAdmin()) $ADMIN = ''; $result = SQL_QUERY("SELECT 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?}_rallye_data` AS d INNER JOIN - `{!_MYSQL_PREFIX!}_admins` AS a + `{?_MYSQL_PREFIX?}_admins` AS a ON d.admin_id=a.id WHERE @@ -76,60 +75,52 @@ if (SQL_NUMROWS($result) == 1) { $expired = false; if ($content['end_time'] < time()) { // Rallye is expired - define('__RALLYE_EXTRAS', getMessage('RALLYE_HAS_EXPIRED')); + $content['extras'] = getMessage('RALLYE_HAS_EXPIRED'); $expired = true; - } elseif (time() >= ($content['end_time'] - getConfig('one_day'))) { + } elseif (time() >= ($content['end_time'] - getConfig('ONE_DAY'))) { // Rallye will expire in less one day! - define('__RALLYE_EXTRAS', getMessage('RALLYE_EXPIRE_ONE_DAY')); + $content['extras'] = getMessage('RALLYE_EXPIRE_ONE_DAY'); } else { - define('__RALLYE_EXTRAS', "<a href=\"{?URL?}/modules.php?module=login&what=reflinks\">{--RALLYE_GET_REFLINK--}</a>"); + // Link to referal links page + $content['extras'] = "<a href=\"{?URL?}/modules.php?module=login&what=reflinks\">{--RALLYE_GET_REFLINK--}</a>"; } // Set admin line (currently set to impressum, later to contact form) - define('__RALLYE_ADMIN', "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$content['admin_id']."\">".$content['login']."</a>"); - - // Set title - define('__RALLYE_TITLE', COMPILE_CODE($content['title'])); + // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$content['admin_id']."\">".$content['login']."</a>"; // Handle description... if ((empty($content['descr'])) && (!empty($content['template']))) { // Use description from template - define('__RALLYE_DESCR', LOAD_TEMPLATE('rallye_' . $content['template'], true)); - } else { - // Use description from database - define('__RALLYE_DESCR', COMPILE_CODE($content['descr'])); - } + $content['descr'] = loadTemplate('rallye_' . $content['template'], true); + } // END - if // Determine min_users/prices - define('__RALLYE_MAX_USERS' , RALLYE_DETERMINE_MIN_USERS($content['min_users'])); - define('__RALLYE_MAX_PRICES', RALLYE_DETERMINE_MIN_PRICES($content['min_prices'])); + $content['min_users'] = determineReferalRallyeMinimumUsers($content['min_users']); + $content['min_prices'] = determineReferalRallyeMinimumPrices($content['min_prices']); // Set start and end time - define('__RALLYE_START', generateDateTime($content['start_time'], '1')); - define('__RALLYE_END' , generateDateTime($content['end_time'] , '1')); + $content['start'] = generateDateTime($content['start_time'], '1'); + $content['end'] = generateDateTime($content['end_time'] , '1'); if ($expired === true) { - define('__RALLYE_PRICES', RALLYE_LIST_WINNERS($content['id'])); - define('__RALLYE_TOP_USERS', "<div align=\"center\" class=\"big\">{!__RALLYE_EXTRAS!}</div>"); - define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_OUR_WINNERS_ARE')); + $content['prices'] = addReferalRallyeWinners($content['id']); + $content['top_users'] = "<div align=\"center\" class=\"big\">".$content['extras']."</div>"; + $content['can_win_this'] = getMessage('RALLYE_OUR_WINNERS_ARE'); } else { - define('__RALLYE_PRICES', RALLYE_ADD_PRICES($content['id'], 'html')); - define('__RALLYE_TOP_USERS', RALLYE_ADD_TOPUSERS($content['id'], getUserId())); - define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_YOU_CAN_WIN')); + $content['prices'] = addReferalRallyePrices($content['id'], 'html'); + $content['top_users'] = addReferalRallyeTopUsers($content['id'], getUserId()); + $content['can_win_this'] = getMessage('RALLYE_YOU_CAN_WIN'); } // And load final template - LOAD_TEMPLATE('guest_rallye_show'); + loadTemplate('guest_rallye_show', false, $content); } else { // No rallye found so far - LOAD_TEMPLATE('guest_no_rallyes'); + loadTemplate('guest_no_rallyes'); } // Free result SQL_FREERESULT($result); -// -OUTPUT_HTML('</div>'); - // [EOF] ?> diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 6ca744e646..1c0f3442ba 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,59 +38,60 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // User is not logged in - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('refback')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('refback')); - return; + redirectToIndexMemberOnlyModule(); } // Is the refback system enabled? if (getConfig('refback_enabled') != 'Y') { // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DISABLED')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DISABLED')); // Abort here return false; } // END - if // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('refback')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('refback')); + return; +} // END - if // Was the form submitted? -if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('id'))) { +if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) { // Okay, has the user entered some values? - if (REQUEST_ISSET_POST('percents')) { + if (isPostRequestElementSet('percents')) { // Revert german commta for testing - $percents = convertCommaToDot(REQUEST_POST('percents')); + $percents = convertCommaToDot(postRequestElement('percents')); // Validate percents if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) { // Change ref-back for this direct id - $status = REFBACK_CHANGE_MEMBER_PERCENTS(REQUEST_POST('id'), REQUEST_POST('percents')); + $status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('percents')); // Check status if (isset($status['ok'])) { // No message found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DONE')); } elseif (isset($status['message'])) { // Something went wrong with error message - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message'])); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message'])); } else { // No message found - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE')); } } else { // Percents out-of-bounds ;-) - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc'))); } // Insert line } else { // Read data from refback table - $content = GET_USER_REF_ENTRY(REQUEST_POST('id')); + $content = getArrayFromUserRefbackData(postRequestElement('id')); // Translate comma $content['refback'] = translateComma($content['refback']); @@ -98,13 +99,13 @@ if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('id'))) { $content['max'] = translateComma(getConfig('refback_max_perc').".0"); // Load form for editing - LOAD_TEMPLATE("member_refback_edit", false, $content); + loadTemplate('member_refback_edit', false, $content); } } // END - if // 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(getUserId()), __FILE__, __LINE__); @@ -120,7 +121,7 @@ if (SQL_NUMROWS($result) > 0) { $SW = 2; // Check for users ref in this level - foreach (GET_USER_REFS(getUserId(), $content['level']) as $refRow) { + foreach (getArrayFromRefbackUserRefs(getUserId(), $content['level']) as $refRow) { // Not-deleted account is default $deleted = false; if (is_null($refRow['status'])) $deleted = true; @@ -134,9 +135,9 @@ if (SQL_NUMROWS($result) > 0) { // Load row template if ($deleted) { - $rows .= LOAD_TEMPLATE("member_refback_list_row_deleted", true, $refRow); + $rows .= loadTemplate('member_refback_list_row_deleted', true, $refRow); } else { - $rows .= LOAD_TEMPLATE("member_refback_list_row", true, $refRow); + $rows .= loadTemplate('member_refback_list_row', true, $refRow); } // Count this ref and switch color @@ -150,14 +151,14 @@ if (SQL_NUMROWS($result) > 0) { $content['rows'] = $rows; // Load level template - $OUT .= LOAD_TEMPLATE("member_refback_list_level", true, $content); + $OUT .= loadTemplate('member_refback_list_level', true, $content); } // END - while // Load main template - LOAD_TEMPLATE("member_refback_list", false, $OUT); + loadTemplate('member_refback_list', false, $OUT); } else { // No entries - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES')); } // Free result diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index 8ef3a61acb..d8e75ca552 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,47 +38,46 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('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(getUserId()), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); SQL_FREERESULT($result); -OUTPUT_HTML("<div class=\"tiny\">{--YOUR_PERSONAL_REFLINK--}:<br /> +outputHtml("<div class=\"tiny\">{--YOUR_PERSONAL_REFLINK--}:<br /> <strong><a href=\"{?URL?}/ref.php?refid=".getUserId()."\" target=\"_blank\">{?URL?}/ref.php?ref=".getUserId()."</a></strong><br /> <br />"); -if (EXT_IS_ACTIVE('nickname')) { +if (isExtensionActive('nickname')) { // Add nickname link when nickname is entered - $nick = NICKNAME_GET_NICK(getUserId()); + $nick = getNickname(getUserId()); if (!empty($nick)) { // Display nickname link - OUTPUT_HTML("{--NICKNAME_YOUR_REFLINK--}:<br /> + outputHtml("{--NICKNAME_YOUR_REFLINK--}:<br /> <strong><a href=\"{?URL?}/ref.php?ref=".$nick."\" target=\"_blank\">{?URL?}/ref.php?ref=".$nick."</a></strong><br /> <br />"); } else { // Display link to nickname form - OUTPUT_HTML("<div class=\"guest_note\">{--NO_NICKNAME_SET--}</strong><br /> + outputHtml("<div class=\"guest_note\">{--NO_NICKNAME_SET--}</strong><br /> <a class=\"tiny\" href=\"{?URL?}/modules.php?module=login&what=nickname\">{--PLEASE_CLICK_NICKNAME_FORM--}</a>"); } } // Clicks on your reflink -OUTPUT_HTML("{--YOUR_REFCLICKS--}: <strong>".$content['ref_clicks']."</strong> {--CLICKS--}</div><br /><br />"); +outputHtml("{--YOUR_REFCLICKS--}: <strong>".$content['ref_clicks']."</strong> {--CLICKS--}</div><br /><br />"); $whereStatement = " WHERE `visible`='Y'"; -if (IS_ADMIN()) $whereStatement = ''; -$result = SQL_QUERY("SELECT `id`, `url`, `alternate`, `counter`, `clicks` FROM `{!_MYSQL_PREFIX!}_refbanner`", __FILE__, __LINE__); +if (isAdmin()) $whereStatement = ''; +$result = SQL_QUERY("SELECT `id`, `url`, `alternate`, `counter`, `clicks` FROM `{?_MYSQL_PREFIX?}_refbanner`", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List available ref banners @@ -107,19 +106,17 @@ if (SQL_NUMROWS($result) > 0) { $content['userid'] = getUserId(); // Add row - $OUT .= LOAD_TEMPLATE('member_reflinks_row', true, $content); + $OUT .= loadTemplate('member_reflinks_row', true, $content); // Switchcolors $SW = 3 - $SW; } // END - while - define('__REFLINKS_ROWS', $OUT); - // Load final template - LOAD_TEMPLATE('member_reflinks_table', false, getUserId()); + loadTemplate('member_reflinks_table', false, $OUT); } else { // No refbanner found! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_NO_REFBANNER_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_NO_REFBANNER_FOUND')); } // Free result diff --git a/inc/modules/member/what-reflist.php b/inc/modules/member/what-reflist.php index 1418fca9f6..b49e0bd751 100644 --- a/inc/modules/member/what-reflist.php +++ b/inc/modules/member/what-reflist.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,19 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // User is not logged in - redirectToUrl('modules.php?module=index'); + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('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(getUserId()), __FILE__, __LINE__); @@ -76,7 +75,7 @@ if (SQL_NUMROWS($result) > 0) { if (empty($refRow['nickname'])) $refRow['nickname'] = '---'; // Load row template - $rows .= LOAD_TEMPLATE("member_ref_list_row", true, $refRow); + $rows .= loadTemplate('member_ref_list_row', true, $refRow); // Count this ref and switch color $counter++; @@ -89,14 +88,14 @@ if (SQL_NUMROWS($result) > 0) { $content['rows'] = $rows; // Load level template - $OUT .= LOAD_TEMPLATE("member_ref_list_level", true, $content); + $OUT .= loadTemplate('member_ref_list_level', true, $content); } // END - while // Load main template - LOAD_TEMPLATE("member_ref_list", false, $OUT); + loadTemplate('member_ref_list', false, $OUT); } else { // No entries - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES')); } // Free result diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index 08150b9578..23cae9a4d5 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,20 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('sponsor')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('sponsor')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + return; +} // END - if // Loads the name-matching template -LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); +loadTemplate(substr(basename(__FILE__), 5, -4)); -// +// [EOF] ?> diff --git a/inc/modules/member/what-stats.php b/inc/modules/member/what-stats.php index 110701133d..14178a2238 100644 --- a/inc/modules/member/what-stats.php +++ b/inc/modules/member/what-stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,20 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Init output $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(getUserId()), __FILE__, __LINE__); @@ -66,13 +65,14 @@ if (SQL_NUMROWS($result) > 0) { if (empty($data['zip'])) $data['zip'] = '---'; // Prepare content for output + // @TODO Rewrite in template subj->subject,stamp->timestamp,recs->target_send $content = array( 'sw' => $SW, 'id' => $data['id'], 'cat' => getCategory($data['cat_id']), 'pay' => getPaymentTitlePrice($data['payment_id']), - 'subj' => COMPILE_CODE($data['subject']), - 'url' => DEREFERER($data['url']), + 'subj' => $data['subject'], + 'url' => generateDerefererUrl($data['url']), 'stamp' => generateDateTime($data['timestamp'], '2'), 'recs' => $data['target_send'], 'type' => translatePoolType($data['data_type']), @@ -80,17 +80,17 @@ if (SQL_NUMROWS($result) > 0) { ); // Load template - $OUT .= LOAD_TEMPLATE("member_pool_row", true, $content); + $OUT .= loadTemplate('member_pool_row', true, $content); // Switch color $SW = 3 - $SW; } // END - if // Load main template - $main_content['pool'] = LOAD_TEMPLATE("member_pool_table", true, $OUT); + $main_content['pool'] = loadTemplate('member_pool_table', true, $OUT); } else { // No mails in pool! - $main_content['pool'] = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_POOL')); + $main_content['pool'] = loadTemplate('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_POOL')); } // Free result @@ -100,7 +100,7 @@ SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id`, `cat_id`, `payment_id`, `subject`, `url`, `timestamp_ordered`, `max_rec`, `timestamp_send`, `clicks` FROM - `{!_MYSQL_PREFIX!}_user_stats` + `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid`=%s ORDER BY @@ -112,36 +112,36 @@ if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the template + // @TODO Rewrite in template: stamp->timestamp_ordered,recs->max_rec,clix->clicks,perc->percents $content = array( 'sw' => $SW, 'cat' => getCategory($content['cat_id']), 'pay' => getPaymentTitlePrice($content['payment_id']), - 'subj' => COMPILE_CODE($content['subject']), - 'url' => DEREFERER($content['url']), + 'url' => generateDerefererUrl($content['url']), 'stamp' => generateDateTime($content['timestamp_ordered'], '2'), 'recs' => $content['max_rec'], 'sent' => generateDateTime($content['timestamp_send'], '2'), 'clix' => $content['clicks'], - 'perc' => COMPILE_CODE($content['clicks'] / $content['max_rec'] * 100)."%", + 'perc' => ($content['clicks'] / $content['max_rec'] * 100)."%", ); // Load row template and switch colors - $OUT .= LOAD_TEMPLATE('member_stats_row', true, $content); + $OUT .= loadTemplate('member_stats_row', true, $content); $SW = 3 - $SW; } // Load main template - $main_content['stats'] = LOAD_TEMPLATE('member_stats_table', true, $OUT); + $main_content['stats'] = loadTemplate('member_stats_table', true, $OUT); } else { // No mail orders fond - $main_content['stats'] = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_STATS')); + $main_content['stats'] = loadTemplate('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_STATS')); } // Free result SQL_FREERESULT($result); // Load main template -LOAD_TEMPLATE('member_stats_pool', false, $main_content); +loadTemplate('member_stats_pool', false, $main_content); -// +// [EOF] ?> diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 1d2a0c4507..a2cfff4929 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,32 +38,33 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()){ - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('support')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('support')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('support')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('support')); + return; +} // END - if -if ((!isFormSent()) || (!REQUEST_ISSET_POST(('qsummary')))) { +if ((!isFormSent()) || (!isPostRequestElementSet(('qsummary')))) { // Output form - LOAD_TEMPLATE('member_support_form'); + loadTemplate('member_support_form'); } else { // Load mail template based on your member's decision - if (GET_EXT_VERSION('admins') >= '0.4.1') { - $a_tpl = 'admin_support-' . REQUEST_POST('qsummary'); + if (getExtensionVersion('admins') >= '0.4.1') { + $a_tpl = 'admin_support-' . postRequestElement('qsummary'); } else { - $message_a = LOAD_EMAIL_TEMPLATE('admin_support-' . REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), getUserId()); + $message_a = loadEmailTemplate('admin_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId()); } - $message_m = LOAD_EMAIL_TEMPLATE('member_support-' . REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), getUserId()); + $message_m = loadEmailTemplate('member_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getUserId()); // Select right subject - switch (REQUEST_POST('qsummary')) { + switch (postRequestElement('qsummary')) { case 'ordr': $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER'); $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER'); @@ -81,16 +82,16 @@ if ((!isFormSent()) || (!REQUEST_ISSET_POST(('qsummary')))) { } // END - switch // Send mail to admin - sendAdminNotification($subj_a, $a_tpl, array('text' => REQUEST_POST('qdetails')), getUserId()); + sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getUserId()); // Send mail to user sendEmail(getUserId(), $subj_m, $message_m); // Drop a message in the admin's area - createNewTask($subj_a, REQUEST_POST('qsummary') . ' : ' . REQUEST_POST('qdetails'), 'SUPPORT_MEMBER', getUserId()); + createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'SUPPORT_MEMBER', getUserId()); // Form sent - LOAD_TEMPLATE('member_support_contcted'); + loadTemplate('member_support_contcted'); } // [EOF] diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 3b11b1a449..a2f13980d5 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,32 +38,33 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // Redirect - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar')); - return; + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if // Still allowed to book more URLs? if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED')); -} elseif ((isFormSent()) && (REQUEST_ISSET_POST(('limited')))) { + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED')); +} elseif ((isFormSent()) && (isPostRequestElementSet(('limited')))) { // Is limitation "no" and "limit" is > 0? - if ((REQUEST_POST('limited') == 'N') && ((REQUEST_ISSET_POST(('limit'))) && (REQUEST_POST('limit') > 0)) || (!REQUEST_ISSET_POST(('limit')))) { + if ((postRequestElement('limited') != 'Y') && ((isPostRequestElementSet(('limit'))) && (postRequestElement('limit') > 0)) || (!isPostRequestElementSet(('limit')))) { // Set it to unlimited - REQUEST_SET_POST('limit', 0); + setRequestPostElement('limit', 0); } // END - if // Register the new URL - $insertId = SURFBAR_MEMBER_ADD_URL(REQUEST_POST('url'), REQUEST_POST('limit')); + $insertId = SURFBAR_MEMBER_ADD_URL(postRequestElement('url'), postRequestElement('limit')); // By default something went wrong $message = getMessage('MEMBER_SURFBAR_URL_NOT_ADDED'); @@ -75,7 +76,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { } // END - if // Load message template - LOAD_TEMPLATE('admin_settings_saved', false, $message); + loadTemplate('admin_settings_saved', false, $message); } else { // Prepare some content $content = array( @@ -86,7 +87,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { ); // Load surfbar order form - LOAD_TEMPLATE(sprintf("member_surfbar_book_%s", strtolower(getConfig('surfbar_pay_model'))), false, $content); + loadTemplate(sprintf("member_surfbar_book_%s", strtolower(getConfig('surfbar_pay_model'))), false, $content); } // diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 05709980a4..1cd2ffc5c4 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,33 +38,34 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if // Load user URLs $URLs = SURFBAR_GET_USER_URLS(); // Are there entries or form is submitted? -if ((isFormSent()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST('id'))) { +if ((isFormSent()) && (isPostRequestElementSet(('action'))) && (isPostRequestElementSet('id'))) { // Process the form - if (SURFBAR_MEMBER_DO_FORM(REQUEST_POST_ARRAY(), $URLs)) { + if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $URLs)) { // Action performed but shall we display it? - if (((REQUEST_POST('action') != 'edit') && (REQUEST_POST('action') != "delete")) || (REQUEST_ISSET_POST(('execute')))) { + if (((postRequestElement('action') != 'edit') && (postRequestElement('action') != "delete")) || (isPostRequestElementSet(('execute')))) { // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_DONE')); } // END - if } else { // Something went wrong - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_FAILED')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_FAILED')); } } elseif (count($URLs) > 0) { // List all URLs @@ -72,7 +73,7 @@ if ((isFormSent()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST('i foreach ($URLs as $id => $content) { // "Translate"/insert data $content['sw'] = $SW; - $content['url'] = DEREFERER($content['url']); + $content['url'] = generateDerefererUrl($content['url']); if ($content['views_total'] > 0) { // Include link to stats $content['views_total'] = "[<a href=\"{?URL?}/modules.php?module=login&what=surfbar_list\">".translateComma($content['views_total'])."</a>]"; @@ -80,24 +81,24 @@ if ((isFormSent()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST('i $content['registered'] = generateDateTime($content['registered'], '2'); $content['last_locked'] = generateDateTime($content['last_locked'], '2'); $content['actions'] = SURFBAR_MEMBER_ACTIONS($content['id'], $content['status']); - $content['status'] = surfbarTranslateUserStatus($content['status']); + $content['status'] = translateSurfbarUrlStatus($content['status']); if (empty($content['lock_reason'])) { // Fixes some HTML problems with empty cells $content['lock_reason'] = '---'; } // END - if // Load row template - $OUT .= LOAD_TEMPLATE("member_surfbar_list_row", true, $content); + $OUT .= loadTemplate('member_surfbar_list_row', true, $content); // Switch color $SW = 3 - $SW; } // END - if // Load main template - LOAD_TEMPLATE("member_surfbar_list", false, $OUT); + loadTemplate('member_surfbar_list', false, $OUT); } else { // No URLs booked so far - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_URLS_FOUND')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_URLS_FOUND')); } // diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index 23033cd603..8fae67e5f5 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,18 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - // Not logged in - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if // Prepare content for output $content = array( @@ -67,7 +67,7 @@ if (getConfig('surfbar_pay_model') == 'DYNAMIC') { 'surfbar_total_urls' => SURFBAR_GET_TOTAL_URLS('ACTIVE', '0'), 'surfbar_user_urls' => SURFBAR_GET_TOTAL_USER_URLS(), 'surfbar_total_online' => SURFBAR_DETERMINE_TOTAL_ONLINE(), - 'surfbar_total_users' => translateComma(GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true)), + 'surfbar_total_users' => translateComma(countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)), 'surfbar_min_reward' => translateComma(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()), 'surfbar_max_reward' => translateComma(SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE()), 'surfbar_min_time' => createFancyTime(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()), @@ -79,10 +79,10 @@ if (getConfig('surfbar_pay_model') == 'DYNAMIC') { } // END - if // Load the template -LOAD_TEMPLATE('member_surfbar_start_' . strtolower(getConfig('surfbar_pay_model')), false, $content); +loadTemplate('member_surfbar_start_' . strtolower(getConfig('surfbar_pay_model')), false, $content); // Load surfbar link template -LOAD_TEMPLATE('member_surfbar_link'); +loadTemplate('member_surfbar_link'); // ?> diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index aa613d75ba..b4bb0d6461 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if -// +// [EOF] ?> diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index e485499aa3..bc4276c120 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,32 +38,33 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('theme')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('theme')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('theme')); + return; +} // END - if -if (REQUEST_ISSET_POST('member_theme')) { +if (isPostRequestElementSet('member_theme')) { // Save theme to member's profile - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `curr_theme`='%s' WHERE `userid`=%s LIMIT 1", - array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `curr_theme`='%s' WHERE `userid`=%s LIMIT 1", + array(postRequestElement('member_theme'), getUserId()), __FILE__, __LINE__); // Set new theme for guests - $newTheme = SQL_ESCAPE(REQUEST_POST('member_theme')); + $newTheme = SQL_ESCAPE(postRequestElement('member_theme')); // Change to new theme - setSession('mxchange_theme', $newTheme); + setTheme($newTheme); // Theme saved! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_THEME_SAVED')); -} + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_THEME_SAVED')); +} // END - if // Initialize array $THEMES = array( @@ -79,14 +80,14 @@ $THEMES = array( $includes = getArrayFromDirectory('theme/', '', false, true, array('css', 'images')); // Walk through all entries and add it -foreach ($includes as $INC) { +foreach ($includes as $inc) { // Get directory from it - $dir = basename(dirname($INC)); + $dir = basename(dirname($inc)); // Is the theme active, then include it if (isThemeActive($dir)) { // Found a valid directory so let's load it's theme.php file - loadInclude($INC); + loadInclude($inc); // Add found theme to array $THEMES['theme_unix'][] = $dir; @@ -108,7 +109,7 @@ array_pk_sort($THEMES, array('theme_name')); $OUT = ''; $SW = 2; foreach ($THEMES['theme_unix'] as $key => $unix) { $default = ''; - if (getSession('mxchange_theme') == $unix) $default = ' selected="selected"'; + if (getCurrentTheme() == $unix) $default = ' selected="selected"'; // Add row $OUT .= "<tr> @@ -120,7 +121,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { <a href=\"mailto:".$THEMES['theme_email'][$key]."?Subject=[Theme:] ".$THEMES['theme_name'][$key]." (".$unix.")'.'\">".$THEMES['theme_author'][$key]."</a> </td> <td class=\"switch_sw".$SW." bottom2 right2\" align=\"center\"> - <a href=\"".DEREFERER($THEMES['theme_url'][$key])."\" target=\"_blank\">".$THEMES['theme_url'][$key]."</a> + <a href=\"".generateDerefererUrl($THEMES['theme_url'][$key])."\" target=\"_blank\">".$THEMES['theme_url'][$key]."</a> </td> <td class=\"switch_sw".$SW." bottom2\" align=\"center\">v".$THEMES['theme_ver'][$key]."</td> </tr>\n"; @@ -131,14 +132,13 @@ if (empty($OUT)) { // No themes found??? $OUT = "<tr> <td colspan=\"5\" class=\"bottom2\" height=\"80\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))." + ".loadTemplate('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))." </td> </tr>\n"; } // END - if -define('__THEME_LIST', $OUT); // Load template -LOAD_TEMPLATE("member_themes"); +loadTemplate('member_themes', false, $OUT); -// +// [EOF] ?> diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index ec88ffb434..0d4ba2e0fa 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,313 +38,304 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('transfer')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('transfer')); - return; + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('transfer')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('transfer')); + return; +} // END - if // 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(getUserId()), __FILE__, __LINE__); list($opt_in) = SQL_FETCHROW($result); // Free memory SQL_FREERESULT($result); +// Check for mode in GET $mode = ''; -if (REQUEST_ISSET_GET('mode')) $mode = REQUEST_GET('mode'); +if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode'); // Check for "faker" -if (($opt_in == 'N') && ($mode == 'new')) $mode = ''; +if (($opt_in != 'Y') && ($mode == 'new')) $mode = ''; switch ($mode) { case 'new': // Start new transfer // Get total points and subtract the balance amount from it = maximum transferable points - $total = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $total = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); // Remember maximum value for template - define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5)); + $content['max_transferable'] = round($total - getConfig('transfer_balance') - 0.5); if (isFormSent()) { // Add new transfer if (getConfig('transfer_code') > 0) { // Check for code - $code = generateRandomCode(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE')); - $valid_code = ($code == REQUEST_POST('code')); + $code = generateRandomCode(getConfig('transfer_code'), postRequestElement('code_chk'), getUserId(), $content['max_transferable']); + $valid_code = ($code == postRequestElement('code')); } else { // Zero length (= disabled) is always valid! $valid_code = true; } // Test password - $valid_pass = ($pass == generateHash(REQUEST_POST('password'), $pass)); + $valid_pass = ($pass == generateHash(postRequestElement('password'), $pass)); // Test transfer amount - $valid_amount = ((REQUEST_ISSET_POST('points')) && (REQUEST_POST('points') <= constant('__TRANSFER_MAX_VALUE'))); + $valid_amount = ((isPostRequestElementSet('points')) && (postRequestElement('points') <= $content['max_transferable'])); // Test reason for transfer - $valid_reason = (REQUEST_ISSET_POST('reason')); + $valid_reason = (isPostRequestElementSet('reason')); // Test if a recipient is selected - $valid_recipient = (REQUEST_POST('to_uid') > 0); + $valid_recipient = (postRequestElement('to_userid') > 0); // Check for nickname extension and set additional data - $nick = false; $add = ', `userid`'; - if (EXT_IS_ACTIVE('nickname')) { + // @TODO Rewrite this to a filter + $add = ''; + if (isExtensionActive('nickname')) { $add = ', `nickname`'; - $nick = true; - } + } // END - if // 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` ASC LIMIT 2", - array(getUserId(), bigintval(REQUEST_POST('to_uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email`".$add." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED' LIMIT 2", + array( + getUserId(), + bigintval(postRequestElement('to_userid')) + ), __FILE__, __LINE__); + + // Do we have two entries? $valid_data = (SQL_NUMROWS($result) == 2); - if ($valid_code && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) { + // Final check if all is fine + if ($valid_code && $valid_data && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) { // Let's start the transfer and load user data - list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result); - list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - // @TODO Rewrite all these constants to array elements - if ($uid1 == getUserId()) { - // Data row 1 is sender's data - define('__SENDER_GENDER' , translateGender($gender1)); - define('__SENDER_NICK' , $nick1); - define('__SENDER_SNAME' , $sname1); - define('__SENDER_FNAME' , $fname1); - define('__SENDER_EMAIL' , $email1); - // Data row 2 is recpient's data - define('__RECIPIENT_GENDER', translateGender($gender2)); - define('__RECIPIENT_NICK' , $nick2); - define('__RECIPIENT_SNAME' , $sname2); - define('__RECIPIENT_FNAME' , $fname2); - define('__RECIPIENT_EMAIL' , $email2); - - // Prepare variables for testing - $TEST_NICK_SENDER = $nick1; - $TEST_NICK_REC = $nick2; - } else { - // Data row 2 is sender's data - define('__SENDER_GENDER' , translateGender($gender2)); - define('__SENDER_NICK' , $nick2); - define('__SENDER_SNAME' , $sname2); - define('__SENDER_FNAME' , $fname2); - define('__SENDER_EMAIL' , $email2); - // Data row 1 is recpient's data - define('__RECIPIENT_GENDER', translateGender($gender1)); - define('__RECIPIENT_NICK' , $nick1); - define('__RECIPIENT_SNAME' , $sname1); - define('__RECIPIENT_FNAME' , $fname1); - define('__RECIPIENT_EMAIL' , $email1); - - // Prepare variables for testing - $TEST_NICK_SENDER = $nick2; - $TEST_NICK_REC = $nick1; - } - - // Sender's UID is always currently stored in cookie userid... - define('__SENDER_UID' , getUserId()); - define('__RECIPIENT_UID' , REQUEST_POST('to_uid')); - - $SENDER = constant('__SENDER_UID'); - $RECIPIENT = constant('__RECIPIENT_UID'); - if ($nick) { - if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) { - $SENDER = constant('__SENDER_NICK'); + $content['sender'] = SQL_FETCHARRAY($result); + $content['recipient'] = SQL_FETCHARRAY($result); + + // Is the nickname extension not installed? + if (!isExtensionActive('nickname')) { + // Fix empty nicknames + $content['sender']['nickname'] = ''; + $content['recipient']['nickname'] = ''; + } // END - if + + // Translate some data + $content['sender']['gender'] = translateGender($content['sender']['gender']); + $content['recipient']['gender'] = translateGender($content['recipient']['gender']); + + // Prepare variables for testing + $TEST_NICK_SENDER = $content['sender']['nickname']; + $TEST_NICK_REC = $content['recipient']['nickname']; + + // Default is userids for subject line + $SENDER = getUserId(); + $RECIPIENT = bigintval(postRequestElement('to_userid')); + + // If nickname is installed we can set the nickname + // @TODO Rewrite this to a filter + if (isExtensionActive('nickname')) { + if (($TEST_NICK_SENDER != getUserId()) && (!empty($TEST_NICK_SENDER))) { + $SENDER = $content['sender']['nickname']; } - if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) { - $RECIPIENT = constant('__RECIPIENT_NICK'); + if (($TEST_NICK_REC != postRequestElement('to_userid')) && (!empty($TEST_NICK_REC))) { + $RECIPIENT = $content['recipient']['nickname']; } - } + } // END - if // Remember transfer reason and fancy date/time in constants - define('__TRANSFER_REASON', REQUEST_POST('reason')); - define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age'))); + $content['reason'] = secureString(postRequestElement('reason')); + $content['expires'] = createFancyTime(getConfig('transfer_age')); // Generate tranafer id - define('__TRANS_ID', bigintval(generateRandomCode("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason')))); + $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getUserId(), postRequestElement('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')", - array(bigintval(REQUEST_POST('to_uid')), getUserId(), bigintval(REQUEST_POST('points')), REQUEST_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')", - array(getUserId(), bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')), REQUEST_POST('reason'), __TRANS_ID), - __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_in` (`userid`, `from_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", + array(bigintval(postRequestElement('to_userid')), getUserId(), bigintval(postRequestElement('points')), postRequestElement('reason'), $content['trans_id']), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_out` (`userid`, `to_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", + array(getUserId(), bigintval(postRequestElement('to_userid')), bigintval(postRequestElement('points')), postRequestElement('reason'), $content['trans_id']), __FILE__, __LINE__); // Add points to account *directly* ... - ADD_POINTS_REFSYSTEM_DIRECT('member_transfer', bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points'))); + addPointsDirectly('member_transfer', bigintval(postRequestElement('to_userid')), bigintval(postRequestElement('points'))); // ... and add it to current user's used points - SUB_POINTS('transfer', getUserId(), REQUEST_POST('points')); + subtractPoints('transfer', getUserId(), postRequestElement('points')); // First send email to recipient - $message = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID')); - sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $message); + $message = loadEmailTemplate('member_transfer_recipient', $content, postRequestElement('to_userid')); + sendEmail($content['recipient']['email'], getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $message); // Second send email to sender - $message = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID')); - sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $message); + $message = loadEmailTemplate('member_transfer_sender', $content, getUserId()); + sendEmail($content['sender']['email'], getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $message); // At last send admin mail(s) $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT); - sendAdminNotification($ADMIN_SUBJ, 'admin_transfer_points'); + sendAdminNotification($ADMIN_SUBJ, 'admin_transfer_points', $content); // Transfer is completed - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{?URL?}/modules.php?module=login&what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>"); - } elseif (!$valid_code) { + loadTemplate('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED') . "<br /><a href=\"{?URL?}/modules.php?module=login&what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>"); + } elseif ($valid_code === false) { // Invalid Touring code! - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>"); - REQUEST_UNSET_POST('ok'); - } elseif (!$valid_pass) { + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>"); + unsetPostRequestElement('ok'); + } elseif ($valid_pass === false) { // Wrong password entered - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>"); - REQUEST_UNSET_POST('ok'); - } elseif (!$valid_amount) { + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>"); + unsetPostRequestElement('ok'); + } elseif ($valid_amount === false) { // Too much points entered - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>"); - REQUEST_UNSET_POST('ok'); - } elseif (!$valid_reason) { + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>"); + unsetPostRequestElement('ok'); + } elseif ($valid_reason === false) { // No transfer reason entered - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>"); - REQUEST_UNSET_POST('ok'); - } elseif (!$valid_recipient) { + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>"); + unsetPostRequestElement('ok'); + } elseif ($valid_recipient === false) { // No recipient selected - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>"); - REQUEST_UNSET_POST('ok'); - } elseif (!$valid_data) { - // No recipient selected - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>"); - REQUEST_UNSET_POST('ok'); + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>"); + unsetPostRequestElement('ok'); + } elseif ($valid_data === false) { + // No recipient/sender selected + loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>"); + unsetPostRequestElement('ok'); } - } + + // Free result + SQL_FREERESULT($result); + } // END - if if (!isFormSent()) { // Load member list - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('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` ASC", + $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` ASC", array(getUserId()), __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` ASC", + $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` ASC", array(getUserId()), __FILE__, __LINE__); } if (SQL_NUMROWS($result) > 0) { // Load list - $OUT = "<select name=\"to_uid\" size=\"1\" class=\"member_select\"> + $OUT = "<select name=\"to_userid\" size=\"1\" class=\"member_select\"> <option value=\"0\">{--SELECT_NONE--}</option>\n"; // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries - while (list($uid, $nick) = SQL_FETCHROW($result)) { - $OUT .= " <option value=\"".$uid."\""; - if ((REQUEST_ISSET_POST(('to_uid'))) && (REQUEST_POST('to_uid') == $uid)) $OUT .= ' selected="selected"'; + while (list($userid, $nick) = SQL_FETCHROW($result)) { + $OUT .= " <option value=\"".$userid."\""; + if ((isPostRequestElementSet(('to_userid'))) && (postRequestElement('to_userid') == $userid)) $OUT .= ' selected="selected"'; $OUT .= ">"; - if (($nick != $uid) && (!empty($nick))) { + if (($nick != $userid) && (!empty($nick))) { // Output nickname $OUT .= $nick; } else { // Output userid - $OUT .= $uid; + $OUT .= $userid; } $OUT .= "</option>\n"; } $OUT .= "</select>\n"; - define('__TRANSFER_TO_DISABLED', ''); + $content['to_disabled'] = ''; // Free memory SQL_FREERESULT($result); } else { // No one else is opt-in - $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN'); - define('__TRANSFER_TO_DISABLED', ' disabled="disabled"'); + $OUT = loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN')); + $content['to_disabled'] = ' disabled="disabled"'; } // Transfer output to constant for the template - define('__TRANSFER_USERID_SELECTION', $OUT); + $content['userid_selection'] = $OUT; // Generate Code if (getConfig('transfer_code') > 0) { $rand = mt_rand(0, 99999); - $code = generateRandomCode(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE')); - $img = GENERATE_IMAGE($code, false); - define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} /> ".$img); + $code = generateRandomCode(getConfig('transfer_code'), $rand, getUserId(), $content['max_transferable']); + $img = generateImageOrCode($code, false); + $content['captcha_code'] = "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"".$content['to_disabled']." /> " . $img; } else { $code = '00000'; - define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE')); + $content['captcha_code'] = loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_CODE')); } + // Init points/reason + $content['points'] = ''; + $content['reason'] = ''; + // Transfer maybe already entered valued' - if (REQUEST_ISSET_GET('ok')) { + if (isGetRequestElementSet('ok')) { // Get values from form - define('__TRANSFER_POINTS_VALUE', bigintval(REQUEST_POST('points'))); - define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason'))); - } else { - // Set empty values - define('__TRANSFER_POINTS_VALUE', ''); - define('__TRANSFER_REASON_VALUE', ''); - } + $content['points'] = bigintval(postRequestElement('points')); + $content['reason'] = secureString(postRequestElement('reason')); + } // END - if + + // Translate some array elements for template + $content['max_transferable'] = translateComma($content['max_transferable']); // Output form - LOAD_TEMPLATE('member_transfer_new'); - } + loadTemplate('member_transfer_new', false, $content); + } // END - if break; case 'list_in': // List only incoming transactions case 'list_out': // List only outgoing transactions // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command - switch ($mode) - { + $nothingMessage = ''; + 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'); - // @TODO Rewrite these constants - $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS'); - define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING')); - define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING')); + $sql = "SELECT `trans_id`, `from_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT ".getConfig('transfer_max'); + $nothingMessage = getMessage('TRANSFER_NO_INCOMING_TRANSFERS'); + $content['balance'] = getMessage('TRANSFER_TOTAL_INCOMING'); + $content['title'] = getMessage('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'); - // @TODO Rewrite these constants - $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS'); - define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING')); - define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING')); + $sql = "SELECT `trans_id`, `to_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT ".getConfig('transfer_max'); + $nothingMessage = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS'); + $content['balance'] = getMessage('TRANSFER_TOTAL_OUTGOING'); + $content['title'] = getMessage('TRANSFER_LIST_OUTGOING'); break; - } + } // END - switch - // Run the SQL command - $total = 0; + // Run the SQL command and set total points to zero + $totalPoints = 0; $result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__); + + // Do we have entries? if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; - // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries - while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) { + // @TODO This should be somehow rewritten to $row = SQL_FETCHARRAY(), see switch() block above for SQL queries + while (list($tid, $userid, $points, $reason, $stamp) = SQL_FETCHROW($result)) { // Rewrite points - if ($type == 'OUT') $points = $points.'-'; + if ($type == 'OUT') $points = $points . '-'; // Prepare content for template - $content = array( - 'sw' => $SW, - 'tid' => $id, - 'stamp' => generateDateTime($stamp, '3'), - 'uid' => $uid, - 'reason' => $reason, - 'points' => translateComma($points) + // @TODO Rewrite: tid->trans_id,stamp->time_trans + $row = array( + 'sw' => $SW, + 'tid' => $tid, + 'stamp' => generateDateTime($stamp, '3'), + 'userid' => $userid, + 'reason' => $reason, + 'points' => translateComma($points) ); // Load row template - $OUT .= LOAD_TEMPLATE('member_transfer_row2', true, $content); + $OUT .= loadTemplate('member_transfer_row2', true, $row); // Add points and switch color - $total += $points; + $totalPoints += $points; $SW = 3 - $SW; } // END - while @@ -354,20 +345,19 @@ switch ($mode) { // Nothing for in or out $OUT = "<tr> <td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, $NOTHING)." + ".loadTemplate('admin_settings_saved', true, $nothingMessage)." </td> </tr>"; } // ... and add them to a constant for the template - // @TODO Rewrite these constants - define('__TRANSFER_ROWS', $OUT); + $content['rows'] = $OUT; // Remeber total amount - define('__TRANSFER_TOTAL_VALUE', $total); + $content['total'] = translateComma($totalPoints); // Load final template - LOAD_TEMPLATE('member_transfer_list'); + loadTemplate('member_transfer_list', false, $content); break; case 'list_all': // List all transactions @@ -376,35 +366,35 @@ switch ($mode) { // 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', +`party_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `points` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', `reason` VARCHAR(255) NOT NULL DEFAULT '', `time_trans` VARCHAR(10) NOT NULL DEFAULT '0', `trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN', -KEY(`party_uid`) +KEY (`party_userid`) ) 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` ASC LIMIT %s", + $result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT %s", array(getUserId(), 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_userid`, `points`, `reason`, `time_trans`, `trans_type`) VALUES ('".$DATA."')", __FILE__, __LINE__); } // END - while // 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_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `userid`=%s ORDER BY `id` LIMIT %s", array(getUserId(), 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_userid`, `points`, `reason`, `time_trans`, `trans_type`) VALUES ('".$DATA."')", __FILE__, __LINE__); } // END - while // Free memory @@ -413,7 +403,7 @@ KEY(`party_uid`) $total = 0; if (SQL_NUMROWS($result) > 0) { // Search for entries - $result = SQL_QUERY("SELECT `party_uid`, `trans_id`, `points`, `reason`, `time_trans`, `trans_type` FROM `{!_MYSQL_PREFIX!}_transfers_tmp` ORDER BY `time_trans` DESC", + $result = SQL_QUERY("SELECT `party_userid`, `trans_id`, `points`, `reason`, `time_trans`, `trans_type` FROM `{?_MYSQL_PREFIX?}_transfers_tmp` ORDER BY `time_trans` DESC", __FILE__, __LINE__); // Output rows @@ -428,7 +418,7 @@ KEY(`party_uid`) $content['points'] = translateComma($content['points']); // Load row template - $OUT .= LOAD_TEMPLATE('member_transfer_row', true, $content); + $OUT .= loadTemplate('member_transfer_row', true, $content); // Add points and switch color $total += $content['points']; @@ -441,85 +431,86 @@ KEY(`party_uid`) // Nothing for in and out $OUT = "<tr> <td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\"> - ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." + ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." </td> </tr>"; } // ... and add them to a constant for the template - // @TODO Rewrite all these constants - define('__TRANSFER_ROWS', $OUT); + $content['rows'] = $OUT; // Remeber total amount - define('__TRANSFER_TOTAL_VALUE', $total); + $content['total'] = translateComma($total); // Set title - define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL')); + $content['title'] = getMessage('TRANSFER_LIST_ALL'); // Set "balance" word - define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE')); - - // Load final template - LOAD_TEMPLATE('member_transfer_list'); + $content['balance'] = getMessage('TRANSFER_TOTAL_BALANCE'); // 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__); + + // Load final template + loadTemplate('member_transfer_list', false, $content); // Free some memory... SQL_FREERESULT($result); break; - case '': // Overview page + default: // Overview page // Check incoming transfers - $total = GET_TOTAL_DATA(getUserId(), 'user_transfers_in', 'id', 'userid', true); + $total = countSumTotalData(getUserId(), 'user_transfers_in', 'id', 'userid', true); + $content['in_link'] = $total; if ($total > 0) { - define('__TRANSFER_IN_LINK', "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_in\">".$dmy."</a>"); - } else { - define('__TRANSFER_IN_LINK', $dmy); - } + $content['in_link'] = "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_in\">".$total."</a>"; + } // END - if // Check outgoing transfers - $dmy = GET_TOTAL_DATA(getUserId(), 'user_transfers_out', 'id', 'userid', true); + $dmy = countSumTotalData(getUserId(), 'user_transfers_out', 'id', 'userid', true); // Add to total amount $total += $dmy; + $content['out_link'] = $dmy; if ($dmy > 0) { - define('__TRANSFER_OUT_LINK', "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_out\">".$dmy."</a>"); - } else { - define('__TRANSFER_OUT_LINK', $dmy); - } + $content['out_link'] = "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_out\">".$dmy."</a>"; + } // END - if // Total transactions + $content['all_link'] = $total; if ($total > 0) { - define('__TRANSFER_ALL_LINK', "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_all\">".$total."</a>"); - } else { - define('__TRANSFER_ALL_LINK', $total); - } + $content['all_link'] = "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=list_all\">".$total."</a>"; + } // END - if if (isFormSent()) { // Save settings - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `opt_in`='%s' WHERE `userid`=%s LIMIT 1", - array(REQUEST_POST('opt_in'), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `opt_in`='%s' WHERE `userid`=%s LIMIT 1", + array(postRequestElement('opt_in'), getUserId()), __FILE__, __LINE__); // Rember for next switch() command - $opt_in = REQUEST_POST('opt_in'); + $opt_in = substr(postRequestElement('opt_in'), 0, 1); // "Settings saved..." - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>"); } // END - if + // Init entries + foreach (array('allow_y','allow_n') as $entry) { + $content[$entry] = ''; + } // END - foreach + + // Set current selection + $content['allow_' . strtolower($opt_in)] = ' checked="checked"'; + + // Set 'new transfer' link according to above option switch ($opt_in) { case 'Y': - define('__TRANSFER_ALLOW_Y', ' checked="checked"'); - define('__TRANSFER_ALLOW_N', ''); - define('__TRANSFER_NEW_LINK', "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=new\">{--TRANSFER_NOW_LINK--}</a>"); + $content['new_link'] = "<a href=\"{?URL?}/modules.php?module=login&what=transfer&mode=new\">{--TRANSFER_NOW_LINK--}</a>"; break; case 'N': - define('__TRANSFER_ALLOW_Y', ''); - define('__TRANSFER_ALLOW_N', ' checked="checked"'); - define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN')); + $content['new_link'] = getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'); break; } // END - switch @@ -527,29 +518,34 @@ KEY(`party_uid`) $result = SQL_QUERY_ESC("SELECT `time_trans` FROM - `{!_MYSQL_PREFIX!}_user_transfers_out` + `{?_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'), getUserId()), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 0) { - // Load template - define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE('member_transfer_settings', true)); - } else { + array( + getConfig('transfer_timeout'), + getUserId() + ), __FILE__, __LINE__); + + // Do we have an entry? + if (SQL_NUMROWS($result) == 1) { // Load newest transaction list($newest) = SQL_FETCHROW($result); - define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3'))); + $content['settings'] = sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3')); + } else { + // Load template + $content['settings'] = loadTemplate('member_transfer_settings', true); } // Free result SQL_FREERESULT($result); // Load template - LOAD_TEMPLATE('member_transfer_overview'); + loadTemplate('member_transfer_overview', false, $content); break; } // END - switch -// +// [EOF] ?> diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index b10c723aa5..6f9e35d92c 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Unconfirmed mails * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Unbestaetigte Mails * + * Kurzbeschreibung : Unbestätigte Mails * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,38 +38,35 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('mailid')) && (!IS_ADMIN())) { + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); +} elseif ((!isExtensionActive('mailid')) && (!isAdmin())) { redirectToUrl('modules.php?module=login'); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); // Shall we display a mail? -if ((REQUEST_ISSET_GET(('bonusid'))) && (EXT_IS_ACTIVE('bonus'))) { +if ((isGetRequestElementSet(('bonusid'))) && (isExtensionActive('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(REQUEST_GET('bonusid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('bonusid'))), __FILE__, __LINE__); // Load data $content = SQL_FETCHARRAY($result_data); // Translate some data - $content['subject'] = COMPILE_CODE($content['subject']); - $content['text'] = COMPILE_CODE($content['text']); $content['timestamp'] = generateDateTime($content['timestamp'], '2'); $content['category'] = getCategory($content['cat_id']); $content['points'] = translateComma($content['points']); $content['is_notify'] = translateYesNo($content['is_notify']); $content['sender'] = getMessage('_ADMIN_SHORT'); $content['time'] = createFancyTime($content['time']); - $content['uid'] = getUserId(); + $content['userid'] = getUserId(); // Get timestamp from insert $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'), @@ -77,32 +74,30 @@ WHERE `id`=%s LIMIT 1", ); // Display it depending on mail (data) type - LOAD_TEMPLATE('member_mail_bonus_'.strtolower($content['data_type']), false, $content); + loadTemplate('member_mail_bonus_'.strtolower($content['data_type']), false, $content); // Free result SQL_FREERESULT($result_data); -} elseif (REQUEST_ISSET_GET(('mailid'))) { +} elseif (isGetRequestElementSet(('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(REQUEST_GET('mailid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('mailid'))), __FILE__, __LINE__); // Load data $content = SQL_FETCHARRAY($result_data); // Translate some data - $content['subject'] = COMPILE_CODE($content['subject']); - $content['text'] = COMPILE_CODE($content['text']); $content['timestamp'] = generateDateTime($content['timestamp'], '2'); $content['category'] = getCategory($content['cat_id']); $content['points'] = translateComma($content['points']); $content['time'] = createFancyTime($content['time']); - $content['uid'] = getUserId(); + $content['userid'] = getUserId(); // Get timestamp from insert $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'), @@ -110,19 +105,19 @@ WHERE s.id=%s LIMIT 1", ); // Display it depending on mail (data) type - LOAD_TEMPLATE('member_mail_normal_'.strtolower($content['data_type']), false, $content); + loadTemplate('member_mail_normal_'.strtolower($content['data_type']), false, $content); // Free result SQL_FREERESULT($result_data); } -if (EXT_IS_ACTIVE('bonus')) { +if (isExtensionActive('bonus')) { // Load bonus ID - $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY 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(getUserId()), __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(getUserId()), __FILE__, __LINE__); } @@ -131,6 +126,9 @@ if (SQL_NUMROWS($result) > 0) { // Please confirm these mails! $sum = 0; $OUT = ''; $SW = 2; + // Init content + $content = array(); + // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() while (list($id, $id2, $type) = SQL_FETCHROW($result)) { // Load data from stats table... @@ -139,8 +137,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", @@ -149,13 +147,13 @@ 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 = getMessage('BONUS_MAIL_PROBLEM'); break; default: // Unknown type detected! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type)); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type)); break; } @@ -168,10 +166,7 @@ LIMIT 1", if (empty($subject)) { // No subject line! $subject = getMessage('DEFAULT_SUBJECT_LINE'); - } else { - // Compile it - $subject = COMPILE_CODE($subject); - } + } // END - if // Prepare sender id if (($sender > 0) && ($type == 'mailid')) { @@ -188,7 +183,7 @@ LIMIT 1", // Prepare data for template $content = array( 'sw' => $SW, - 'uid' => getUserId(), + 'userid' => getUserId(), 'data' => bigintval($DATA), 'type' => $type, 'subject' => $subject, @@ -200,9 +195,9 @@ LIMIT 1", // Load row template if (getConfig('show_points_unconfirmed') == 'Y') { - $OUT .= LOAD_TEMPLATE('member_unconfirmed_row', true, $content); + $OUT .= loadTemplate('member_unconfirmed_row', true, $content); } else { - $OUT .= LOAD_TEMPLATE('member_unconfirmed_row_nopoints', true, $content); + $OUT .= loadTemplate('member_unconfirmed_row_nopoints', true, $content); } // Count points @@ -217,9 +212,9 @@ LIMIT 1", // Display points or not? if (getConfig('show_points_unconfirmed') == 'Y') { - $OUT .= LOAD_TEMPLATE('member_unconfirmed_404', true, $content); + $OUT .= loadTemplate('member_unconfirmed_404', true, $content); } else { - $OUT .= LOAD_TEMPLATE('member_unconfirmed_404_nopoints', true, $content); + $OUT .= loadTemplate('member_unconfirmed_404_nopoints', true, $content); } } @@ -234,21 +229,21 @@ LIMIT 1", SQL_FREERESULT($result); // Remember total points - define('__TOTAL_POINTS', translateComma($sum)); + $content['total_points'] = translateComma($sum); // Remember all generated rows in constant for the template - define('__UNCONFIRMED_ROWS', $OUT); + $content['rows'] = $OUT; // Load main template if (getConfig('show_points_unconfirmed') == 'Y') { - LOAD_TEMPLATE('member_unconfirmed_table'); + loadTemplate('member_unconfirmed_table', false, $content); } else { - LOAD_TEMPLATE('member_unconfirmed_table_nopoints'); + loadTemplate('member_unconfirmed_table_nopoints', false, $content); } } else { // No mails left to confirm... :) - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_NO_MAILS_TO_CONFIRM')); + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_NO_MAILS_TO_CONFIRM')); } -// +// [EOF] ?> diff --git a/inc/modules/member/what-welcome.php b/inc/modules/member/what-welcome.php index dde69a5310..76e25415ba 100644 --- a/inc/modules/member/what-welcome.php +++ b/inc/modules/member/what-welcome.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,41 +38,40 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { - redirectToUrl('modules.php?module=index'); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR ('member', basename(__FILE__)); +addMenuDescription('member', basename(__FILE__)); // Export data for template $content = array( - 'last_online' => generateDateTime($GLOBALS['last']['online']), - 'last_module' => getModuleDescription('member', $GLOBALS['last']['module']) + 'last_online' => generateDateTime($GLOBALS['last_online']['online']), + 'last_module' => getModuleDescription('member', $GLOBALS['last_online']['module']) ); // Load header template -LOAD_TEMPLATE("member_welcome_header", false, $content); +loadTemplate('member_welcome_header', false, $content); // 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", -array(getUserId()), __FILE__, __LINE__); +$result = SQL_QUERY_ESC("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_data` WHERE notified='Y' AND `userid`=%s LIMIT 1", + array(getUserId()), __FILE__, __LINE__); -if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('profile'))) { +if ((SQL_NUMROWS($result) == 1) && (isExtensionActive('profile'))) { // Yes, he is so let's place him his wanted buttons - LOAD_TEMPLATE("profile-update"); + loadTemplate('profile-update'); } else { // Load the template below this default data - LOAD_TEMPLATE("member_welcome"); + loadTemplate('member_welcome'); } // Free memory SQL_FREERESULT($result); // Load footer template -LOAD_TEMPLATE("member_welcome_footer"); +loadTemplate('member_welcome_footer'); -// +// [EOF] ?> diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 507c6801c9..8a50f51406 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,23 +38,24 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!IS_MEMBER()) { + die(); +} elseif (!isMember()) { // User is not logged in - redirectToUrl('modules.php?module=index'); -} elseif ((!EXT_IS_ACTIVE('wernis')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('wernis')); - return; + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR('member', __FILE__); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('wernis')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('wernis')); + return; +} // END - if // Check if the admin has entered the data if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) { // Something important is missing... - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_API_DATA_MISSING')); + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_API_DATA_MISSING')); return; } // END - if @@ -62,13 +63,13 @@ if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) { $content = array(); $points = false; // Is the mode set (withdraw or payout) -if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { +if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')) { // Let the user choose what he wants to do $content['refid'] = getConfig(('wernis_refid')); $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(getUserId()), __FILE__, __LINE__); // Are there some entries? @@ -81,12 +82,12 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { SQL_FREERESULT($result); // Is there an ID? - if ((!empty($content['wds66_id'])) && (!REQUEST_ISSET_GET('mode'))) { + if ((!empty($content['wds66_id'])) && (!isGetRequestElementSet('mode'))) { // Then use an other "mode" - REQUEST_SET_GET('mode', 'list'); + setRequestGetElement('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(getUserId()), __FILE__, __LINE__); // Load all rows @@ -103,7 +104,7 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { ); // Load row template - $content['rows'] .= LOAD_TEMPLATE('member_wernis_mode_list_row', true, $rowContent); + $content['rows'] .= loadTemplate('member_wernis_mode_list_row', true, $rowContent); $SW = 3 - $SW; } @@ -127,11 +128,11 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { } // END - if // Mode chooser! ;-) - REQUEST_SET_GET('mode', 'choose'); + setRequestGetElement('mode', 'choose'); } -} elseif ((REQUEST_GET('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) { +} elseif ((getRequestElement('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) { // Get total points and check if the user can request a payout - $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); // Remove the registration fee $points = $points - getConfig('points_register'); @@ -142,7 +143,7 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { // Is this enougth for a payout? if ($points < getConfig('wernis_min_payout')) { // No, then abort here - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MIN_PAYOUT'), translateComma(getConfig('wernis_min_payout')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MIN_PAYOUT'), translateComma(getConfig('wernis_min_payout')))); return; } // END - if @@ -159,7 +160,7 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_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(getUserId()), __FILE__, __LINE__); // Are there some entries? @@ -170,9 +171,9 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { // Free result SQL_FREERESULT($result); -} elseif ((REQUEST_GET('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) { +} elseif ((getRequestElement('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) { // Get total points for just displaying them - $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); // Prepare data for the template $content['points'] = translateComma($points); @@ -183,7 +184,7 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_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(getUserId()), __FILE__, __LINE__); // Are there some entries? @@ -196,104 +197,103 @@ if ((!REQUEST_ISSET_GET('mode')) || (REQUEST_GET('mode') == 'choose')) { SQL_FREERESULT($result); } else { // Invalid mode! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET('mode'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode'))); return; } // Is the formular sent? -if ((isFormSent()) && (REQUEST_ISSET_GET('mode'))) { +if ((isFormSent()) && (isGetRequestElementSet('mode'))) { // Is the user ID and password set? - if (!REQUEST_ISSET_POST(('wds66_id'))) { + if (!isPostRequestElementSet(('wds66_id'))) { // Nothing entered in WDS66 user ID - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME')); - } elseif (!REQUEST_ISSET_POST(('wds66_password'))) { + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME')); + } elseif (!isPostRequestElementSet(('wds66_password'))) { // Nothing entered in WDS66 password - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD')); - } elseif (!REQUEST_ISSET_POST(('amount'))) { + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD')); + } elseif (!isPostRequestElementSet(('amount'))) { // Nothing entered in amount - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT')); - } elseif (REQUEST_POST('wds66_id') != bigintval(REQUEST_POST('wds66_id'))) { + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT')); + } elseif (postRequestElement('wds66_id') != bigintval(postRequestElement('wds66_id'))) { // Only numbers in account ID! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_USERNAME')); - } elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) { + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_USERNAME')); + } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) { // Only numbers in amount! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT')); + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT')); } else { // Check input data depending on the mode and execute the requested mode - switch (REQUEST_GET('mode')) { + switch (getRequestElement('mode')) { case "withdraw": // Widthdraws WDS66 -> This exchange - if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) { + if (postRequestElement('amount') < getConfig('wernis_min_withdraw')) { // Not enougth entered! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw')))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw')))); } else { // All is fine here so do the withdraw - $success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount')); + $success = WERNIS_EXECUTE_WITHDRAW(postRequestElement('wds66_id'), md5(postRequestElement('wds66_password')), postRequestElement('amount')); if ($success === true) { // Add it to this amount - unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM_DIRECT('wernis_withdraw', getUserId(), bigintval(REQUEST_POST('amount'))); + addPointsDirectly('wernis_withdraw', getUserId(), bigintval(postRequestElement('amount'))); // Update the user data as well.. - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1", + array(bigintval(postRequestElement('wds66_id')), getUserId()), __FILE__, __LINE__); // All done! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE')); return; } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed")) { // Wrong login data - LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); } } break; case 'payout': // Payout this exchange -> WDS66 - if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) { + if (postRequestElement('amount') < getConfig('wernis_min_payout')) { // Not enougth entered! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout')))); - } elseif (REQUEST_POST('amount') > $points) { + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout')))); + } elseif (postRequestElement('amount') > $points) { // Not enougth points left! - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points))); } else { // All is fine here so do the withdraw - $success = WERNIS_EXECUTE_PAYOUT(REQUEST_POST('wds66_id'), REQUEST_POST('amount')); + $success = WERNIS_EXECUTE_PAYOUT(postRequestElement('wds66_id'), postRequestElement('amount')); if ($success === true) { // Sub points - SUB_POINTS('wernis_payout', getUserId(), REQUEST_POST('amount')); + subtractPoints('wernis_payout', getUserId(), postRequestElement('amount')); // Update WDS66 id - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1", + array(bigintval(postRequestElement('wds66_id')), getUserId()), __FILE__, __LINE__); // All done! - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE')); + loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE')); return; } elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed') || (GET_WERNIS_ERROR_CODE() == 'api_amount_failed')) { // Wrong login data - LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); + loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); } } break; default: // Invalid mode! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode'))); - LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET('mode'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode'))); return; } } } // END - if // Prepare mode for template name -$mode = sprintf("member_wernis_mode_%s", REQUEST_GET('mode')); +$mode = sprintf("member_wernis_mode_%s", getRequestElement('mode')); // Load the template -LOAD_TEMPLATE($mode, false, $content); +loadTemplate($mode, false, $content); -// +// [EOF] ?> diff --git a/inc/modules/order.php b/inc/modules/order.php index 5dcc041bde..6fca97ea81 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,15 +39,14 @@ // Some security stuff... $URL = ''; if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('order')); + die(); +} elseif ((!isExtensionActive('order')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order')); return; -} elseif (!IS_MEMBER()) { +} elseif (!isMember()) { // Sorry, no guest access! $URL = 'modules.php?module=index'; -} elseif (!REQUEST_ISSET_GET('order')) { +} elseif (!isGetRequestElementSet('order')) { // You cannot call this module directly! $URL = 'modules.php?module=login&what=order'; } @@ -57,37 +56,37 @@ if (empty($URL)) { // Is the auto-send mechanism active or inactive? if (getConfig('autosend_active') == 'Y') { // Auto-send is active - define('ADMIN_AUTOSEND', getMessage('ADMIN_AUTOSEND_ACTIVE')); - define('MEMBER_AUTOSEND', getMessage('MEMBER_AUTOSEND_ACTIVE')); + $content['admin_autosend'] = getMessage('ADMIN_AUTOSEND_ACTIVE'); + $content['member_autosend'] = getMessage('MEMBER_AUTOSEND_ACTIVE'); $type = 'NEW'; } else { // Auto-send is inactive - define('ADMIN_AUTOSEND', getMessage('ADMIN_AUTOSEND_INACTIVE')); - define('MEMBER_AUTOSEND', getMessage('MEMBER_AUTOSEND_INACTIVE')); + $content['admin_autosend'] = getMessage('ADMIN_AUTOSEND_INACTIVE'); + $content['member_autosend'] = getMessage('MEMBER_AUTOSEND_INACTIVE'); $type = 'ADMIN'; } // 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", - array($type, bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__); + 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(getRequestElement('order')), getUserId()), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_AFFECTEDROWS() == 1) { // @TODO Unused: 2,4 // 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", - array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__); - $content = SQL_FETCHARRAY($result); + $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(getRequestElement('order')), getUserId()), __FILE__, __LINE__); + $content = merge_array($content, SQL_FETCHARRAY($result)); SQL_FREERESULT($result); if (empty($content['subject'])) $content['subject'] = getMessage('DEFAULT_SUBJECT_LINE'); // Calculate used points - $USED = $content['target_send'] * getPaymentPoints($content['payment_id']); + $usedPoints = $content['target_send'] * getPaymentPoints($content['payment_id']); // Update used points $add = ''; if (getConfig('order_max_full') == 'ORDER') $add = ', mail_orders=mail_orders+1'; - SUB_POINTS('order', getUserId(), $USED); + subtractPoints('order', getUserId(), $usedPoints); // Compile content $content['block'] = getConfig('max_send'); @@ -95,14 +94,14 @@ if (empty($URL)) { $content['category'] = getCategory($content['cat_id']); // Send an email to the user - $message_mem = LOAD_EMAIL_TEMPLATE('order-member', $content, getUserId()); + $message_mem = loadEmailTemplate('order-member', $content, getUserId()); sendEmail(getUserId(), getMessage('MEMBER_NEW_QUEUE'), $message_mem); // Notify admins about this sendAdminNotification(getMessage('ADMIN_NEW_QUEUE'), 'order-admin', $content, getUserId()); // Output back bottom - LOAD_TEMPLATE('member_order-back', false); + loadTemplate('member_order-back', false); } else { // Matching line not found or already 'placed' in send queue redirectToUrl('modules.php?module=login'); diff --git a/inc/modules/sponsor.php b/inc/modules/sponsor.php index 4f88a06f9e..409fcc0de0 100644 --- a/inc/modules/sponsor.php +++ b/inc/modules/sponsor.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -37,12 +37,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); + die(); +} elseif ((!isExtensionActive('sponsor'))) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; @@ -53,25 +52,25 @@ if (!defined('__SECURITY')) { // A valid sponsor login and we are allowed to enter this module so let's // update his cookies and online time -UPDATE_SPONSOR_LOGIN(); +updateSponsorLogin(); // Generate menu -define('__SPONSOR_MENU', GENERATE_SPONSOR_MENU(getWhat())); +$content['menu'] = addSponsorMenu(getWhat()); // Generate right-side output -define('__SPONSOR_CONTENT', GENERATE_SPONSOR_CONTENT(getWhat())); +$content['content'] = addSponsorContent(getWhat()); // Load header template -define('__SPONSOR_HEADER', LOAD_TEMPLATE('sponsor_header', true)); +$content['header'] = loadTemplate('sponsor_header', true); // Load footer template -define('__SPONSOR_FOOTER', LOAD_TEMPLATE('sponsor_footer', true)); +$content['footer'] = loadTemplate('sponsor_footer', true); // 'You are here' navigation -define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', getWhat(), false, false)); +$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), false, false); // Load main sponsor template -LOAD_TEMPLATE('sponsor_main'); +loadTemplate('sponsor_main', false, $content); -// +// [EOF] ?> diff --git a/inc/modules/sponsor/.php b/inc/modules/sponsor/.php index 8b34a5729b..3b466a8d08 100644 --- a/inc/modules/sponsor/.php +++ b/inc/modules/sponsor/.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,17 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif ((!EXT_IS_ACTIVE('sponsor'))) { + die(); +} elseif ((!isExtensionActive('sponsor'))) { addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; } // Put all HTML code into $OUT! -// E.g.: $OUT = LOAD_TEMPLATE("sponsor_template", true); +// E.g.: $OUT = loadTemplate('sponsor_template', true); + +// [EOF] ?> diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index 078d7f6e1f..526e3983ed 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('sponsor')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); + die(); +} elseif (!isExtensionActive('sponsor')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; @@ -53,7 +53,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(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__); @@ -65,22 +65,22 @@ if (SQL_NUMROWS($result) == 1) { // Check if form was submitted or not if (isFormSent()) { // Check passwords - if (!REQUEST_ISSET_POST('pass_old')) { + if (!isPostRequestElementSet('pass_old')) { // No current password entered $message = getMessage('SPONSOR_NO_CURRENT_PASSWORD_ENTERED'); - } elseif (md5(REQUEST_POST('pass_old')) != getSession('sponsorpass')) { + } elseif (md5(postRequestElement('pass_old')) != getSession('sponsorpass')) { // Entered password didn't match password in DB $message = getMessage('SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB'); - } elseif ((REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')) && (REQUEST_POST('pass1') != REQUEST_POST('pass2'))) { + } elseif ((isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') != postRequestElement('pass2'))) { // Both new passwords did not match $message = getMessage('SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH'); - } elseif ((!REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2'))) { + } elseif ((!isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { // No password one entered $message = getMessage('SPONSOR_PASSWORD_ONE_EMPTY'); - } elseif ((REQUEST_ISSET_POST('pass1')) && (!REQUEST_ISSET_POST('pass2'))) { + } elseif ((isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { // No password two entered $message = getMessage('SPONSOR_PASSWORD_TWO_EMPTY'); - } elseif ((REQUEST_ISSET_POST('pass1')) && (strlen(REQUEST_POST('pass1')) < getConfig('pass_len'))) { + } elseif ((isPostRequestElementSet('pass1')) && (strlen(postRequestElement('pass1')) < getConfig('pass_len'))) { // Too short password $message = sprintf(getMessage('SPONSOR_PASSWORD_TOO_SHORT'), getConfig('pass_len')); } else { @@ -88,10 +88,10 @@ if (SQL_NUMROWS($result) == 1) { $PASS_AND = ''; $PASS_DATA = ''; // Check if we want to change password or not - if ((REQUEST_POST('pass1') == REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_POST('pass1') != REQUEST_POST('pass_old'))) { + if ((postRequestElement('pass1') == postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (postRequestElement('pass1') != postRequestElement('pass_old'))) { // Change current password - $PASS_AND = ", password='%s'"; - $PASS_DATA = md5(REQUEST_POST('pass1')); + $PASS_AND = ", `password`='%s'"; + $PASS_DATA = md5(postRequestElement('pass1')); } // Unsecure data which we don't want here @@ -99,61 +99,47 @@ if (SQL_NUMROWS($result) == 1) { // Remove all (maybe spoofed) unsafe data from array foreach ($UNSAFE as $remove) { - REQUEST_UNSET_POST($remove); + unsetPostRequestElement($remove); } // Set last change timestamp - REQUEST_SET_POST('last_change', "UNIX_TIMESTAMP()"); + setRequestPostElement('last_change', 'UNIX_TIMESTAMP()'); // Save data - $message = SPONSOR_SAVE_DATA(REQUEST_POST_ARRAY(), $content); + $message = saveSponsorData(postRequestArray(), $content); } if (!empty($message)) { // Output message - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, $message); + $OUT = loadTemplate('admin_settings_saved', true, $message); } else { // No message generated - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED')); + $OUT = loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED')); } } else { - // Check for gender selection - switch ($content['gender']) - { - case 'M': // Male - define('__GENDER_M', ' selected="selected"'); - define('__GENDER_F', ''); - define('__GENDER_C', ''); - break; - - case 'F': // Female - define('__GENDER_M', ''); - define('__GENDER_F', ' selected="selected"'); - define('__GENDER_C', ''); - break; + // Init gender + foreach (array('m', 'f', 'c') as $gender) { + $content['gender_' . $gender] = ''; + } // END - foreach - case 'C': // Company - define('__GENDER_M', ''); - define('__GENDER_F', ''); - define('__GENDER_C', ' selected="selected"'); - break; - } + // Check for gender selection + $content['gender_' . strtolower($content['gender'])] = ' selected="selected"'; // Output formular - $OUT = LOAD_TEMPLATE('sponsor_account_form', true, $content); + $OUT = loadTemplate('sponsor_account_form', true, $content); } } else { // Locked or so? $STATUS = sponsorTranslateUserStatus($content['status']); - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS)); + $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS)); } } else { // Sponsor account not found! - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid'))); + $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid'))); } // Free memory SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 5fadab96fb..eea9919374 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,22 +38,32 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('sponsor')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); + die(); +} elseif (!isExtensionActive('sponsor')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; } +// Init message +$message = ''; + // Data for the formular -$result = SQL_QUERY_ESC("SELECT status, receive_warnings, warning_interval, email, surname, family, gender -FROM `{!_MYSQL_PREFIX!}_sponsor_data` -WHERE `id`='%s' AND password='%s' LIMIT 1", -array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__); +$result = SQL_QUERY_ESC("SELECT + `status`, `receive_warnings`, `warning_interval`, `email`, `surname`, `family`, `gender` +FROM + `{?_MYSQL_PREFIX?}_sponsor_data` +WHERE + `id`='%s' AND `password`='%s' +LIMIT 1", + array( + bigintval(getSession('sponsorid')), + getSession('sponsorpass') + ), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) { // Load sponsor data $content = SQL_FETCHARRAY($result); @@ -60,69 +71,63 @@ if (SQL_NUMROWS($result) == 1) { // Check if form was submitted or not if (isFormSent()) { // Check passwords - if (!REQUEST_ISSET_POST('password')) { + if (!isPostRequestElementSet('password')) { // No current password entered $message = SPONSOR_NO_CURRENT_PASSWORD_ENTERED; - } elseif (md5(REQUEST_POST('password')) != getSession('sponsorpass')) { + } elseif (md5(postRequestElement('password')) != getSession('sponsorpass')) { // Entered password didn't match password in DB $message = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB; } else { // Unsecure data which we don't want here - $UNSAFE = array('company', 'position', 'tax_ident', 'gender', 'surname', 'family', - 'street_nr1', 'street_nr2', 'zip', 'city', 'country', 'phone', 'fax', 'cell', - 'email', 'url'); + $UNSAFE = array( + 'company', 'position', 'tax_ident', 'gender', 'surname', 'family', + 'street_nr1', 'street_nr2', 'zip', 'city', 'country', 'phone', 'fax', 'cell', + 'email', 'url' + ); // Remove all (maybe spoofed) unsafe data from array foreach ($UNSAFE as $remove) { - REQUEST_UNSET_POST($remove); - } + unsetPostRequestElement($remove); + } // END - if // Set last change timestamp - REQUEST_SET_POST('last_change', "UNIX_TIMESTAMP()"); + setRequestPostElement('last_change', 'UNIX_TIMESTAMP()'); // Save data - $message = SPONSOR_SAVE_DATA(REQUEST_POST_ARRAY(), $content); + $message = saveSponsorData(postRequestArray(), $content); } if (!empty($message)) { // Output message - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, $message); + $OUT = loadTemplate('admin_settings_saved', true, $message); } else { // No message generated - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED')); + $OUT = loadTemplate('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED')); } } else { // Make yes/no selection - switch ($content['receive_warnings']) { - case 'Y': - define('__YES', ' checked="checked"'); - define('__NO', ''); - break; - - case 'N': - define('__YES', ''); - define('__NO', ' checked="checked"'); - break; - } + $content['receive_warnings_y'] = ''; + $content['receive_warnings_n'] = ''; + $content['receive_warnings_' . strtolower($content['receive_warnings'])] = ' checked="checked"'; // Translate current interval into fancy string - define('__CURRENT', createFancyTime($content['warning_interval'])); + $content['current'] = createFancyTime($content['warning_interval']); // Output formular - $OUT = LOAD_TEMPLATE("sponsor_settings_form", true, $content); + $OUT = loadTemplate('sponsor_settings_form', true, $content); } } else { // Locked or so? $STATUS = sponsorTranslateUserStatus($content['status']); - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS)); + $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS)); } } else { // Sponsor account not found! - $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid'))); + $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid'))); } // Free memory SQL_FREERESULT($result); -// +// [EOF] ?> diff --git a/inc/modules/sponsor/welcome.php b/inc/modules/sponsor/welcome.php index fd4d4fbf0e..40340de92c 100644 --- a/inc/modules/sponsor/welcome.php +++ b/inc/modules/sponsor/welcome.php @@ -17,12 +17,13 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * - * This program is free software. You can redistribute it and/or modify * + * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -37,35 +38,32 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('sponsor')) { - addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor')); + die(); +} elseif (!isExtensionActive('sponsor')) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); return; -} elseif (!IS_SPONSOR()) { +} elseif (!isSponsor()) { // No sponsor! addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED')); return; } // Load some data -$result = SQL_QUERY_ESC("SELECT gender, surname, family, (points_amount - points_used) AS points -FROM `{!_MYSQL_PREFIX!}_sponsor_data` -WHERE `id`='%s' AND password='%s' LIMIT 1", -array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__); -list($gender, $surname, $family, $points) = SQL_FETCHROW($result); +$result = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, (`points_amount` - `points_used`) AS points +FROM `{?_MYSQL_PREFIX?}_sponsor_data` +WHERE `id`='%s' AND `password`='%s' LIMIT 1", + array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__); +$content = SQL_FETCHARRAY($result); // Free memory SQL_FREERESULT($result); // Prepare data for the template -define('__GENDER' , translateGender($gender)); -define('__SURNAME', $surname); -define('__FAMILY' , $family); -define('__POINTS' , translateComma($points)); +$content['gender'] = translateGender($content['gender']); +$content['points'] = translateComma($content['points']); // Load main template -$OUT = LOAD_TEMPLATE("sponsor_welcome", true); +$OUT = loadTemplate('sponsor_welcome', true, $content); -// +// [EOF] ?> diff --git a/inc/modules/welcome.php b/inc/modules/welcome.php index b1b1403f6f..f551ef47b7 100644 --- a/inc/modules/welcome.php +++ b/inc/modules/welcome.php @@ -1,46 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 09/05/2004 * - * =============== Last change: 09/05/2004 * - * * - * -------------------------------------------------------------------- * - * File : welcome.php * - * -------------------------------------------------------------------- * - * Short description : Welcome entry points * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Willkommensseite * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// +// @DEPRECATED ?> diff --git a/inc/monthly/monthly_ b/inc/monthly/monthly_ index 4b38382eec..d8ff8cd6ff 100644 --- a/inc/monthly/monthly_ +++ b/inc/monthly/monthly_ @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('')) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + die(); +} elseif (!isExtensionActive('')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (isResetModeEnabled())) return; -// +// [EOF] ?> diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index 628986e0b9..f994926277 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('beg')) { + die(); +} elseif (!isExtensionActive('beg')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') != 'Y')) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Get current month (2 digits) $curr = date('m', time()); @@ -57,13 +56,13 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC $whereStatement1 = ''; // Shall we exclude webmaster's own userid? - if ((getConfig('beg_include_own') != 'Y') && (getConfig('beg_uid') > 0)) { + if ((getConfig('beg_include_own') != 'Y') && (getConfig('beg_userid') > 0)) { // Exclude it - $whereStatement1 = sprintf(" AND `userid` != %s", getConfig('beg_uid')); + $whereStatement1 = sprintf(" AND `userid` != %s", getConfig('beg_userid')); } // END - if // Let's check if there are some points left we can 'pay'... - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Use last online stamp only when autopurge for inactive members is activated if ((getConfig('ap_inactive_since') > 0) && (getConfig('beg_active') == 'Y')) { // Okay, include last online timestamp @@ -72,33 +71,33 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC } // END - if // SQL string to check for accounts - $result_main = SQL_QUERY_ESC("SELECT `userid`, `email`, `gender`, `surname`, `family`, `beg_points` AS points + $result_main = SQL_QUERY("SELECT + `userid`, `email`, `gender`, `surname`, `family`, `beg_points` AS points FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED'" . $whereStatement1 . " AND `beg_points` > 0 ORDER BY `beg_points` DESC, `userid` ASC -LIMIT %s", - array(getConfig('beg_ranks')), __FILE__, __LINE__); +LIMIT {?beg_ranks?}", __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // Load our winners... while ($content = SQL_FETCHARRAY($result_main)) { // Add points to user's account directly - ADD_POINTS_REFSYSTEM_DIRECT('monthly_beg', $content['userid'], $content['points']); + addPointsDirectly('monthly_beg', $content['userid'], $content['points']); // Translate gender/points $content['gender'] = translateGender($content['gender']); $content['points'] = translateComma($content['points']); // Load email template and email it away - $message = LOAD_EMAIL_TEMPLATE('member_beg', $content, bigintval($content['userid'])); + $message = loadEmailTemplate('member_beg', $content, bigintval($content['userid'])); sendEmail($content['email'], getMessage('BEG_MONTHLY_RALLYE'), $message); } // 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 cfd712948b..446b3e26dd 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('bonus')) { + die(); +} elseif (!isExtensionActive('bonus')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Get current month (2 digits) $curr = date('m', time()); @@ -57,7 +56,7 @@ if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (get $whereStatement2 = getConfig('bonus_ranks'); // Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...) - if (EXT_IS_ACTIVE('autopurge')) { + if (isExtensionActive('autopurge')) { // Use last online stamp only when autopurge for inactive members is activated if (getConfig('ap_inactive_since') > 0) { // Okay, include last online timestamp @@ -83,7 +82,7 @@ if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && (get // 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` + `{?_MYSQL_PREFIX?}_user_data` ".$whereStatement1."".$add." ORDER BY `points` DESC, @@ -98,20 +97,20 @@ LIMIT %s", // Make sure zero points are not mailed if ($content['points'] > 0) { // Add points to user's account directly - ADD_POINTS_REFSYSTEM_DIRECT('monthly_bonus', $content['uid'], $content['points']); + addPointsDirectly('monthly_bonus', $content['userid'], $content['points']); // Translate gender/points $content['gender'] = translateGender($content['gender']); $content['points'] = translateComma($content['points']); // Load email template and email it away - $message = LOAD_EMAIL_TEMPLATE('member_bonus', $content['points'], bigintval($content['uid'])); + $message = loadEmailTemplate('member_bonus', $content['points'], bigintval($content['userid'])); sendEmail($content['email'], getMessage('BONUS_MONTHLY_ONLINE_BONUS'), $message); } // END - if } // 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 ca8e2baf42..e4d6d79410 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,41 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('newsletter')) { + die(); +} elseif (!isExtensionActive('newsletter')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); -// Get current month (2 digits) -$curr = date('m', time()); - -if (getConfig('last_month') != $curr) { - // Check for unsubscribed members - $result = SQL_QUERY("SELECT `userid`, `email`, `nl_until` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `nl_receive`='N' ORDER BY `userid` ASC", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) { - // Some unsubscriptions are found so we reset them to receive newsletters - while ($content = SQL_FETCHARRAY($result)) { - // Update account - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `nl_receive`='Y', `nl_until`=0 WHERE `userid`=%s LIMIT 1", - array(bigintval($content['userid'])), __FILE__, __LINE__); - - // Send email to him - $message = LOAD_EMAIL_TEMPLATE('member_newsletter_reset', true, bigintval($content['userid'])); - sendEmail($content['email'], getMessage('NL_MEMBER_RESET_SUBJECT'), $message); - - // Send email to admin - sendAdminNotification(getMessage('NL_ADMIN_SUBJECT'), 'admin_newsletter_reset', array(), getUserId()); - } // END - if - - // Free memory - SQL_FREERESULT($result); - } -} - -// +// [EOF] ?> diff --git a/inc/monthly/monthly_surfbar.php b/inc/monthly/monthly_surfbar.php index 02a35f38c7..a18ee5467f 100644 --- a/inc/monthly/monthly_surfbar.php +++ b/inc/monthly/monthly_surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('surfbar')) { + die(); +} elseif (!isExtensionActive('surfbar')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Reset surfbar counter updateConfiguration('surfbar_monthly_counter', '0'); diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 3eac524730..741122f5a8 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,11 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // Load more function libraries or includes -foreach (array('functions', 'request-functions', 'session-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'handler', 'hooks') as $lib) { +foreach (array('functions', 'request-functions', 'session-functions', 'code-functions', 'language-functions', 'sql-functions', 'filter-functions', 'filters', 'mysql-manager', 'extensions-functions', 'handler', 'hooks') as $lib) { // Load special functions loadIncludeOnce('inc/' . $lib . '.php'); } // END - foreach @@ -66,23 +65,26 @@ if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0; // Init fatal messages initFatalMessages(); +// Init message system +initMessages(); + // Check if this file is writeable or read-only and warn the user -if ((!isInstalling()) && (isInstalled())) { +if ((!isInstalling()) && (!isInstallationPhase())) { // Load "databases" aka static arrays loadIncludeOnce('inc/databases.php'); - // Load configuration file(s) here - loadIncludeOnce('inc/load_config.php'); - // Load database layer here loadIncludeOnce('inc/db/lib.php'); - // Check for write-permission for config.php and inc directory - if (!isModuleSet()) setModule(REQUEST_GET('module')); + // Set missing module + if (!isModuleSet()) setModule(getRequestElement('module')); if (!isModuleSet()) setModule('index'); + // Load configuration file(s) here + loadIncludeOnce('inc/load_config.php'); + // CSS array - EXT_INIT_CSS_FILES(); + initExtensionCssFiles(); if ((!empty($GLOBALS['mysql']['host'])) && (!empty($GLOBALS['mysql']['login'])) && (!empty($GLOBALS['mysql']['password'])) && (!empty($GLOBALS['mysql']['dbase']))) { // Connect to DB @@ -96,87 +98,44 @@ if ((!isInstalling()) && (isInstalled())) { // Is it a valid resource? if (SQL_SELECT_DB($GLOBALS['mysql']['dbase'], __FILE__, __LINE__) === true) { // This is required for extension 'optimize' to work - define('__DB_NAME', $GLOBALS['mysql']['dbase']); + setConfigEntry('__DB_NAME', $GLOBALS['mysql']['dbase']); // Remove MySQL array from namespace unset($GLOBALS['mysql']); - // Load configuration stuff - loadConfiguration(); - - // Init session - loadIncludeOnce('inc/session.php'); + // Administrative functions + loadIncludeOnce('inc/load_cache.php'); - // Load versions - loadIncludeOnce('inc/versions.php'); + // Init filter system + initFilterSystem(); - // Loading patching system is required here... - loadIncludeOnce('inc/patch-system.php'); - - // Run daily reset - loadIncludeOnce('inc/check-reset.php'); - - // Load admin include file if he is admin - if (IS_ADMIN()) { - // Administrative functions - loadIncludeOnce('inc/modules/admin/admin-inc.php'); - } // END - if - //* DEBUG: */ ADD_POINTS_REFSYSTEM('test', 36, 1000); - //* DEBUG: */ die(); + // Run the init filter chain + runFilterChain('init'); - // Get all values - if ((getOutputMode() != 1) && (getOutputMode() != -1)) { - if (!isModuleSet()) setModule('empty'); - if (!isWhatSet()) setWhat(getWhatFromModule(getModule())); - if (!isActionSet()) setAction(getModeAction(getModule(), getWhat())); + // Is the extension sql_patches installed and at least 0.3.6? + if ((isExtensionActive('sql_patches')) && (getExtensionVersion('sql_patches') >= '0.3.6')) { + // Generate random number + setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getUserId(), '')); } else { - // Set action/what to empty - setAction(''); - setWhat(''); + // Generate weak (!!!) code + setConfigEntry('RAND_NUMBER', mt_rand(1000000, 9999999)); } - // Run the init filter chain - runFilterChain('init'); + // Check module for permissions + $checkModule = checkModulePermissions(); - // Set default 'what' value - //* DEBUG: */ OUTPUT_HTML('-'.getModule().'/'.getWhat()."-<br />"); - if ((!isWhatSet()) && (!isActionSet()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { - if (getModule() == 'admin') { - // Set 'action' value to 'login' in admin menu - setAction(getModeAction(getModule(), getWhat())); - } elseif ((getModule() == 'index') || (getModule() == 'login')) { - // Set 'what' value to 'welcome' in guest and member menu - setWhat('welcome'); - if (getConfig('index_home') != '') setWhatFromConfig('index_home'); - } else { - // Anything else like begging link - setWhat(''); - } - } // END - if - - // Update sending pool - if ((getOutputMode() != '1') && (getOutputMode() != '-1')) loadIncludeOnce('inc/pool-update.php'); // Sends out mails in configureable steps + // Cound module here + countModuleHit(getModule()); - // Check module for permissions - $checkModule = checkModulePermissions(getModule()); - if ($checkModule != 'done') { + // Admin module should be accessable by guests to login + if ((getModule() == 'admin') && ($checkModule == 'admin_only')) { + // This is fine and can be ignored + } elseif ($checkModule != 'done') { // Not fine! - DEBUG_LOG(__FILE__, __LINE__, sprintf("Check of module %s results in unpexted value: %s", + logDebugMessage(__FILE__, __LINE__, sprintf("Check of module %s results in unexpected value: %s", getModule(), $checkModule )); - } // END - if - - // Shall we activate the exchange? - if (getConfig('activate_xchange') > 0) activateExchange(); - - // Is the extension sql_patches installed and at least 0.3.6? - if (GET_EXT_VERSION('sql_patches') >= '0.3.6') { - // Generate random number - setConfigEntry('RAND_NUMBER', generateRandomCode(10, mt_rand(10000, 32766), getUserId(), '')); - } else { - // Generate weak (!!!) code - setConfigEntry('RAND_NUMBER', mt_rand(1000000, 9999999)); } } else { // Wrong database? @@ -207,57 +166,33 @@ if ((!isInstalling()) && (isInstalled())) { // Set other missing variables if (!isOutputModeSet()) setOutputMode('0'); - // Include databases.php - loadIncludeOnce('inc/databases.php'); + // Include more + foreach (array('inc/databases.php','inc/db/lib.php','inc/session.php','inc/versions.php','inc/install-functions.php','inc/load_config.php') as $inc) { + // Load the include + loadIncludeOnce($inc); + } // END - foreach - // Init session - loadIncludeOnce('inc/session.php'); + // Init filter system here + initFilterSystem(); - // Load versions - loadIncludeOnce('inc/versions.php'); - - // Check if we are in installation routine + // Are we installation routine? if ((!isInstalling()) && (getOutputMode() != '1') && (getOutputMode() != -1)) { - // Redirect to the installation system + // You have to install first! redirectToUrl('install.php'); } // END - if - // Double-check installation mode - if ((!isInstalled()) || (!isAdminRegistered())) { - // Check for file permissions - if (!isIncludeWriteable('config')) { - addFatalMessage(__FILE__, __LINE__, getMessage('CONFIG_IS_WRITE_PROTECTED')); - } // END - if - if (!isIncludeWriteable('dummy')) { - addFatalMessage(__FILE__, __LINE__, getMessage('DUMMY_IS_WRITE_PROTECTED')); - } // END - if - if (!isIncludeWriteable('.secret/dummy')) { - addFatalMessage(__FILE__, __LINE__, getMessage('SECRET_IS_WRITE_PROTECTED')); - } // END - if - } // END - if + // Administrative functions + loadIncludeOnce('inc/load_cache.php'); // Run the init filter chain runFilterChain('init'); - // Load extension 'sql_patches' - LOAD_EXTENSION('sql_patches'); - // Load configuration file(s) here loadIncludeOnce('inc/load_config.php'); } -// Init session -loadIncludeOnce('inc/session.php'); - -// Load versions -loadIncludeOnce('inc/versions.php'); - -if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!isInstalling()) && (getOutputMode() != '1')) { - // One or more fatal error(s) occur during connect... - loadIncludeOnce('inc/header.php'); - loadIncludeOnce('inc/fatal_errors.php'); - loadIncludeOnce('inc/footer.php'); -} // END - if +// Handle fatal errors +handleFatalErrors(); -// +// [EOF] ?> diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 95e7178b4e..754ca58d90 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,41 +38,47 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // "Getter" for module title function getModuleTitle ($mod) { // Init variables - $name = ''; + $title = ''; $result = false; // Is the script installed? if (isInstalled()) { // Check if cache is valid - if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) { + if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) { // Load from cache - $name = $GLOBALS['cache_array']['modules']['title'][$mod]; + $title = $GLOBALS['cache_array']['modules']['title'][$mod]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1", - array($mod), __FUNCTION__, __LINE__); - list($name) = SQL_FETCHROW($result); + $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", + array($mod), __FUNCTION__, __LINE__); + + // Is the entry there? + if (SQL_NUMROWS($result)) { + // Get the title from database + list($title) = SQL_FETCHROW($result); + } // END - if + + // Free the result SQL_FREERESULT($result); } } // END - if // Trim name - $name = trim($name); + $title = trim($title); // Still no luck or empty title? - if (empty($name)) { + if (empty($title)) { // No name found - $name = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod); + $title = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod); if (SQL_NUMROWS($result) == 0) { // Add module to database $dummy = checkModulePermissions($mod); @@ -80,23 +86,23 @@ function getModuleTitle ($mod) { } // END - if // Return name - return $name; + return $title; } // "Getter" for module description -function getModuleDescription ($mode, $wht, $column = 'what') { +// @TODO Can we cache this? +function getModuleDescription ($mode, $what, $column = 'what') { // Fix empty 'what' - if (empty($wht)) { - $wht = 'welcome'; - if (getConfig('index_home') != '') $wht = getConfig('index_home'); + if (empty($what)) { + $what = getConfig('index_home'); } // END - if // Default is not found - $ret = '??? (' . $wht . ')'; + $ret = '??? (' . $what . ')'; // Look for title - $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1", - array($mode, $column, $wht), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE %s='%s' LIMIT 1", + array($mode, $column, $what), __FUNCTION__, __LINE__); // Is there an entry? if (SQL_NUMROWS($result) == 1) { @@ -106,22 +112,33 @@ function getModuleDescription ($mode, $wht, $column = 'what') { // Free result SQL_FREERESULT($result); + + // Return it return $ret; } // Check validity of a given module name (no file extension) -function checkModulePermissions ($mod) { +function checkModulePermissions ($mod = '') { + // Is it empty (default), then take the current one + if (empty($mod)) $mod = getModule(); + + // Do we have cache? + if (isset($GLOBALS['module_status'][$mod])) { + // Then use it + return $GLOBALS['module_status'][$mod]; + } // END - if + // Filter module name (names with low chars and underlines are fine!) $mod = preg_replace('/[^a-z_]/', '', $mod); // Check for prefix is a extension... - $modSplit = explode("_", $mod); + $modSplit = explode('_', $mod); $extension = ''; $mod_chk = $mod; - //* DEBUG: */ OUTPUT_HTML(__LINE__."*".count($modSplit)."*/".$mod."*<br />"); + //* DEBUG: */ outputHtml(__LINE__."*".count($modSplit)."*/".$mod."*<br />"); if (count($modSplit) == 2) { // Okay, there is a seperator (_) in the name so is the first part a module? - //* DEBUG: */ OUTPUT_HTML(__LINE__."*".$modSplit[0]."*<br />"); - if (EXT_IS_ACTIVE($modSplit[0])) { + //* DEBUG: */ outputHtml(__LINE__."*".$modSplit[0]."*<br />"); + if (isExtensionActive($modSplit[0])) { // The prefix is an extension's name, so let's set it $extension = $modSplit[0]; $mod = $modSplit[1]; } // END - if @@ -131,7 +148,7 @@ function checkModulePermissions ($mod) { $ret = 'major'; // Check if script is installed if not return a 'done' to prevent some errors - if ((!isInstalled()) || (isInstalling()) || (!isAdminRegistered())) { + if ((isInstallationPhase()) || (!isAdminRegistered())) { // Not installed or no admin registered or in installation phase return 'done'; } // END - if @@ -144,73 +161,64 @@ function checkModulePermissions ($mod) { $found = false; // Check if cache is latest version - if (GET_EXT_VERSION('cache') >= '0.1.2') { + if (isExtensionInstalledAndNewer('cache', '0.1.2')) { // Is the cache there? - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Using cache.'); - if (!isset($GLOBALS['cache_array']['modules'])) { - // This happens when a new extension is registered while ext-cache is installed - $ret = 'cache_miss'; - } // END - if - - // Is the module cached? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using cache.'); if (isset($GLOBALS['cache_array']['modules']['locked'][$mod_chk])) { // Check cache - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Cache found.'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cache found.'); $locked = $GLOBALS['cache_array']['modules']['locked'][$mod_chk]; $hidden = $GLOBALS['cache_array']['modules']['hidden'][$mod_chk]; $admin = $GLOBALS['cache_array']['modules']['admin_only'][$mod_chk]; $mem = $GLOBALS['cache_array']['modules']['mem_only'][$mod_chk]; // Update cache hits - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); $found = true; } else { // No, then we have to update it! $ret = 'cache_miss'; } - } elseif (!EXT_IS_ACTIVE('cache')) { + } elseif (!isExtensionActive('cache')) { // Check for module in database - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Using database.'); - $result = SQL_QUERY_ESC("SELECT `locked`, `hidden`, `admin_only`, `mem_only` FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1", + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using 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), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Read data - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'Entry found.'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Entry found.'); list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result); $found = true; } elseif (isDebugModeEnabled()) { // Debug message only in debug-mode... - DEBUG_LOG(__FUNCTION__, __LINE__, 'Module ' . $mod_chk . ' not found!'); + logDebugMessage(__FUNCTION__, __LINE__, 'Module ' . $mod_chk . ' not found!'); } // Free result SQL_FREERESULT($result); } - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'ret=' . $ret); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . $ret); // Is the module found? if ($found === true) { // Check returned values against current access permissions // // Admin access ----- Guest access ----- --- Guest or member? --- - if ((IS_ADMIN()) || (($locked == 'N') && ($admin == 'N') && (($mem == 'N') || (IS_MEMBER())))) { - // Count module - countModuleHit($mod_chk); - + if ((isAdmin()) || (($locked != 'Y') && ($admin != 'Y') && (($mem != 'Y') || (isMember())))) { // If you are admin you are welcome for everything! $ret = 'done'; } elseif ($locked == 'Y') { // Module is locked $ret = 'locked'; - } elseif (($mem == 'Y') && (!IS_MEMBER())) { + } elseif (($mem == 'Y') && (!isMember())) { // You have to login first! $ret = 'mem_only'; - } elseif (($admin == 'Y') && (!IS_ADMIN())) { + } elseif (($admin == 'Y') && (!isAdmin())) { // Only the Admin is allowed to enter this module! $ret = 'admin_only'; } else { // @TODO Nothing helped??? - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s", + logDebugMessage(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s", $ret, $locked, $admin, @@ -220,19 +228,19 @@ function checkModulePermissions ($mod) { } // END - if // Still no luck or not found? - if (($found === false) && (!EXT_IS_ACTIVE('cache')) && ($ret != 'done')) { + if (($found === false) && (!isExtensionActive('cache')) && ($ret != 'done')) { // ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name --- if ((isIncludeReadable(sprintf("inc/modules/%s.php", $mod))) || (isIncludeReadable(sprintf("%s.php", $mod))) || (isIncludeReadable(sprintf("%s/%s.php", $extension, $mod)))) { // Data is missing so we add it - if (GET_EXT_VERSION('sql_patches') >= '0.3.6') { + if (isExtensionInstalledAndNewer('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), __FUNCTION__, __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), __FUNCTION__, __LINE__); } @@ -245,36 +253,39 @@ function checkModulePermissions ($mod) { // Destroy cache here // @TODO Rewrite this to a filter - rebuildCacheFiles('modreg', 'modreg'); + if (getOutputMode() == '0') rebuildCacheFile('modreg', 'modreg'); // And reload data + unset($GLOBALS['module_status'][$mod]); $ret = checkModulePermissions($mod_chk); } else { // Module not found we don't add it to the database $ret = '404'; } - } elseif (($ret == 'cache_miss') && (getOutputMode() > -1)) { + } elseif (($ret == 'cache_miss') && (getOutputMode() == 0)) { // Rebuild the cache files - rebuildCacheFiles('modreg', 'modreg'); + rebuildCacheFile('modreg', 'modreg'); } elseif ($found === false) { // Problem with module detected - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s", + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s, output_mode=%s", $mod, $ret, $locked, $hidden, $mem, - $admin + $admin, + getOutputMode() )); } // Return the value - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, 'ret=' . $ret); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . $ret); + $GLOBALS['module_status'][$mod] = $ret; return $ret; } // Add menu description pending on given file name (without path!) -function ADD_DESCR ($accessLevel, $FQFN, $return = false, $output = true) { +function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = true) { // Use only filename of the FQFN... $file = basename($FQFN); @@ -313,7 +324,7 @@ function ADD_DESCR ($accessLevel, $FQFN, $return = false, $output = true) { case 'guest': case 'member': $modCheck = getModule(); - if (!IS_ADMIN()) { + if (!isAdmin()) { $AND = " AND `visible`='Y' AND `locked`='N'"; } break; @@ -336,11 +347,11 @@ function ADD_DESCR ($accessLevel, $FQFN, $return = false, $output = true) { } // Begin the navigation line - if ((!isset($GLOBALS['nav_depth'])) && (!$return)) { + if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) { $GLOBALS['nav_depth'] = 0; $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--} <strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=".getModule().$LINK_ADD."\">Home</a></strong>"; } else { - if (!$return) $GLOBALS['nav_depth']++; + if ($return === false) $GLOBALS['nav_depth']++; $prefix = ''; } @@ -353,7 +364,7 @@ function ADD_DESCR ($accessLevel, $FQFN, $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($accessLevel, $type, $search), __FUNCTION__, __LINE__); // Menu found? @@ -365,14 +376,14 @@ function ADD_DESCR ($accessLevel, $FQFN, $return = false, $output = true) { if ($return === true) { // Return title return $ret; - } elseif (((GET_EXT_VERSION('sql_patches') >= '0.2.3') && (getConfig('youre_here') == 'Y')) || ((IS_ADMIN()) && ($modCheck == 'admin'))) { + } elseif (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) { // Output HTML code $OUT = $prefix . "<strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=" . $modCheck . '&' . $type . '=' . $search.$LINK_ADD . "\">" . $ret . "</a></strong>\n"; // Can we close the you-are-here navigation? - //* DEBUG: */ OUTPUT_HTML(__LINE__."*".$type.'/'.getWhat()."*<br />"); + //* DEBUG: */ outputHtml(__LINE__."*".$type.'/'.getWhat()."*<br />"); if (($type == 'what') || (($type == 'action') && ((!isWhatSet()) || (getWhat() == 'overview')))) { - //* DEBUG: */ OUTPUT_HTML(__LINE__.'+'.$type."+<br />"); + //* DEBUG: */ outputHtml(__LINE__.'+'.$type."+<br />"); // Add closing div and br-tag $OUT .= "</div><br />\n"; $GLOBALS['nav_depth'] = '0'; @@ -390,56 +401,55 @@ function ADD_DESCR ($accessLevel, $FQFN, $return = false, $output = true) { // Return or output HTML code? if ($output) { // Output HTML code here - OUTPUT_HTML($OUT); + outputHtml($OUT); } else { // Return HTML code return $OUT; } } -// -function ADD_MENU ($mode, $act, $wht) { +// Adds a menu (mode = guest/member/admin/sponsor) to output +function addMenu ($mode, $action, $what) { // Init some variables $main_cnt = 0; $AND = ''; - $main_action = ''; - $sub_what = ''; // is the menu action valid? - if (!isMenuActionValid($mode, $act, $wht, true)) { + if (!isMenuActionValid($mode, $action, $what, true)) { return getCode('MENU_NOT_VALID'); } // END - if // Non-admin shall not see all menus - if (!IS_ADMIN()) { + if (!isAdmin()) { $AND = " AND `visible`='Y' AND `locked`='N'"; } // END - if // 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` ASC", + $result_main = SQL_QUERY_ESC("SELECT `title`, `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort` ASC", array($mode), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.getWhat()."*<br />"); + + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.':'.getWhat()."*<br />"); if (SQL_NUMROWS($result_main) > 0) { - OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">"); // There are menus available, so we simply display them... :) + $GLOBALS['rows'] = ''; while ($content = SQL_FETCHARRAY($result_main)) { - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$sub_what.':'.getWhat()."*<br />"); + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].':'.getWhat()."*<br />"); // Init variables enableBlockMode(false); - $act = $content['action']; + $action = $content['action']; // Load menu header template - LOAD_TEMPLATE($mode . '_menu_title', false, $content); + $GLOBALS['rows'] .= loadTemplate($mode . '_menu_title', true, $content); // Sub menu - $result_sub = SQL_QUERY_ESC("SELECT `title` AS sub_title, `what` AS sub_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` AS sub_title, `what` AS sub_what FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`", array($mode, $content['action']), __FUNCTION__, __LINE__); // Get number of rows - $ctl = SQL_NUMROWS($result_sub); + $totalWhats = SQL_NUMROWS($result_sub); // Do we have some entries? - if ($ctl > 0) { + if ($totalWhats > 0) { // Init counter $cnt = 0; @@ -452,34 +462,38 @@ function ADD_MENU ($mode, $act, $wht) { $OUT = ''; // Full file name for checking menu - //* DEBUG: */ OUTPUT_HTML(__LINE__.":!!!!".$content['sub_what']."!!!<br />"); - $INC = sprintf("inc/modules/%s/what-%s.php", $mode, $content['sub_what']); - if (isIncludeReadable($INC)) { - if ((!empty($wht)) && (($wht == $content['sub_what']))) { + //* DEBUG: */ outputHtml(__LINE__.":!!!!".$content['sub_what']."!!!<br />"); + $inc = sprintf("inc/modules/%s/what-%s.php", $mode, $content['sub_what']); + if (isIncludeReadable($inc)) { + // Mark currently selected menu - open + if ((!empty($what)) && (($what == $content['sub_what']))) { $OUT = "<strong>"; - } + } // END - if // Navigation link $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{?URL?}/modules.php?module=".getModule()."&what=".$content['sub_what']."\" target=\"_self\">"; } else { - $OUT .= "<em>"; + // Not found! - open + $OUT .= "<em style=\"cursor:help\" class=\"admin_note\" title=\"{--MENU_WHAT_404--}\">"; } // Menu title $OUT .= getConfig('menu_blur_spacer') . $content['sub_title']; - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { $OUT .= "</a>"; + + // Mark currently selected menu - close + if ((!empty($what)) && (($what == $content['sub_what']))) { + $OUT .= "</strong>"; + } // END - if } else { + // Not found! - close $OUT .= "</em>"; } - if ((!empty($wht)) && (($wht == $content['sub_what']))) { - $OUT .= "</strong>"; - } // END - if - - // Remember 'what' for next round and count it up - $wht = $content['sub_what']; $cnt++; + // Cunt it up + $cnt++; // Rewrite array $content = array( @@ -488,10 +502,10 @@ function ADD_MENU ($mode, $act, $wht) { ); // Add regular menu row or bottom row? - if ($cnt < $ctl) { - LOAD_TEMPLATE($mode . '_menu_row', false, $content); + if ($cnt < $totalWhats) { + $GLOBALS['rows'] .= loadTemplate($mode . '_menu_row', true, $content); } else { - LOAD_TEMPLATE($mode . '_menu_bottom', false, $content); + $GLOBALS['rows'] .= loadTemplate($mode . '_menu_bottom', true, $content); } } } else { @@ -499,44 +513,68 @@ function ADD_MENU ($mode, $act, $wht) { enableBlockMode(); // Load menu block - $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']); - if (isFileReadable($INC_BLOCK)) { + $inc_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']); + if (isFileReadable($inc_BLOCK)) { // Load include file - if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("<tr> - - <td class=\"".$mode."_menu_whats\">"); - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); - loadInclude($INC_BLOCK); - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); - if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML(" </td> -</tr>"); + if ((!isExtensionActive($content['action'])) || ($content['action'] == 'online')) $GLOBALS['rows'] .= loadTemplate('menu_what_begin', true, $mode); + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); + loadInclude($inc_BLOCK); + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); + if ((!isExtensionActive($content['action'])) || ($content['action'] == 'online')) $GLOBALS['rows'] .= loadTemplate('menu_what_end', true); } - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); } + $main_cnt++; - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); + + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); if (SQL_NUMROWS($result_main) > $main_cnt) { - OUTPUT_HTML("<tr><td class=\"".$mode."_menu_seperator\"></td></tr>"); + // Add seperator + $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode); + + // Should we display adverts in this menu? + if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y') && ($action != 'admin')) { + // Display advert template + $GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_' . $action, true); + + // Add seperator again + $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode); + } // END - if } // END - if - } + } // END - while // Free memory SQL_FREERESULT($result_main); - // Close table - //* DEBUG: */ OUTPUT_HTML(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); - OUTPUT_HTML("</table>"); + // Should we display adverts in this menu? + if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y')) { + // Add seperator again + $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode); + + // Display advert template + $GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_end', true); + } // END - if + + // Prepare data + $content = array( + 'rows' => $GLOBALS['rows'], + 'mode' => $mode + ); + + // Load main template + //* DEBUG: */ outputHtml(__LINE__.'/'.$main_cnt.'/'.$content['action'].'/'.$content['sub_what'].':'.getWhat()."*<br />"); + loadTemplate('menu_table', false, $content); } // END - if } // Checks wether the current user is a member -function IS_MEMBER () { +function isMember () { // By default no member $ret = false; - // Fix missing 'last' array, damn stupid code :((( + // Fix missing 'last_online' array, damn stupid code :((( // @TODO Try to rewrite this to one or more functions - if ((!isset($GLOBALS['last'])) || (!is_array($GLOBALS['last']))) $GLOBALS['last'] = array(); + if ((!isset($GLOBALS['last_online'])) || (!is_array($GLOBALS['last_online']))) $GLOBALS['last_online'] = array(); // is the cache entry there? if (isset($GLOBALS['is_member'])) { @@ -553,7 +591,7 @@ function IS_MEMBER () { // Are cookies set? if ((isUserIdSet()) && (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(getUserId()), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data from cookies @@ -563,10 +601,10 @@ function IS_MEMBER () { $valPass = generatePassString($password); // Transfer last module and online time - if ((!empty($mod)) && (empty($GLOBALS['last']['module']))) { + if ((!empty($mod)) && (empty($GLOBALS['last_online']['module']))) { // @TODO Try to rewrite this to one or more functions - $GLOBALS['last']['module'] = $mod; - $GLOBALS['last']['online'] = $onl; + $GLOBALS['last_online']['module'] = $mod; + $GLOBALS['last_online']['online'] = $onl; } // END - if // So did we now have valid data and an unlocked user? @@ -575,12 +613,12 @@ function IS_MEMBER () { $ret = true; } else { // Maybe got locked etc. - //* DEBUG: */ OUTPUT_HTML(__LINE__."!!!<br />"); + //* DEBUG: */ outputHtml(__LINE__."!!!<br />"); destroyUserSession(); } } else { // Cookie data is invalid! - //* DEBUG: */ OUTPUT_HTML(__LINE__."***<br />"); + //* DEBUG: */ outputHtml(__LINE__."***<br />"); destroyUserSession(); } @@ -588,7 +626,7 @@ function IS_MEMBER () { SQL_FREERESULT($result); } else { // Cookie data is invalid! - //* DEBUG: */ OUTPUT_HTML(__LINE__."///<br />"); + //* DEBUG: */ outputHtml(__LINE__."///<br />"); destroyUserSession(); } @@ -600,10 +638,10 @@ function IS_MEMBER () { } // This patched function will reduce many SELECT queries for the specified or current admin login -function IS_ADMIN ($admin = '') { +function isAdmin ($admin = '') { // Init variables $ret = false; $passCookie = ''; $valPass = ''; - //* DEBUG: */ OUTPUT_HTML(__LINE__."ADMIN:".$admin."<br />"); + //* DEBUG: */ outputHtml(__LINE__."ADMIN:".$admin."<br />"); // If admin login is not given take current from cookies... if ((empty($admin)) && (isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5'))) { @@ -611,25 +649,25 @@ function IS_ADMIN ($admin = '') { $admin = getSession('admin_login'); $passCookie = getSession('admin_md5'); } - //* DEBUG: */ OUTPUT_HTML(__LINE__."ADMIN:".$admin.'/'.$passCookie."<br />"); + //* DEBUG: */ outputHtml(__LINE__."ADMIN:".$admin.'/'.$passCookie."<br />"); // Search in array for entry - if (isset($GLOBALS['cache_array']['admin_hash'])) { + if (isset($GLOBALS['admin_hash'])) { // Use cached string - $valPass = $GLOBALS['cache_array']['admin_hash']; + $valPass = $GLOBALS['admin_hash']; } elseif ((!empty($passCookie)) && (isset($GLOBALS['cache_array']['admins']['password'][$admin])) && (!empty($admin))) { // Login data is valid or not? $valPass = generatePassString($GLOBALS['cache_array']['admins']['password'][$admin]); // Cache it away - $GLOBALS['cache_array']['admin_hash'] = $valPass; + $GLOBALS['admin_hash'] = $valPass; // Count cache hits - incrementConfigEntry('cache_hits'); - } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE('cache'))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) { + incrementStatsEntry('cache_hits'); + } elseif ((!empty($admin)) && ((!isExtensionActive('cache'))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) { // Search for admin - $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", - array($admin), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1", + array($admin), __FUNCTION__, __LINE__); // Is he admin? $passDB = ''; @@ -650,12 +688,11 @@ function IS_ADMIN ($admin = '') { if (!empty($valPass)) { // Check if password is valid - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."*".$valPass.'/'.$passCookie."*<br />"); - $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == "*FAILED*") && (!EXT_IS_ACTIVE('cache')))); + //* DEBUG: */ outputHtml(__FUNCTION__."*".$valPass.'/'.$passCookie."*<br />"); + $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == "*FAILED*") && (!isExtensionActive('cache')))); } // END - if // Return result of comparision - //* DEBUG: */ if (!$ret) OUTPUT_HTML(__LINE__."OK!<br />"); return $ret; } @@ -667,18 +704,18 @@ function addMaxReceiveList ($mode, $default = '', $return = false) { switch ($mode) { 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", + $result = SQL_QUERY("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value > 0 ORDER BY value", __FUNCTION__, __LINE__); break; 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", + $result = SQL_QUERY("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY value", __FUNCTION__, __LINE__); break; default: // Invalid! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $mode)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $mode)); break; } @@ -687,15 +724,14 @@ function addMaxReceiveList ($mode, $default = '', $return = false) { $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { $OUT .= " <option value=\"".$content['value']."\""; - if (REQUEST_POST('max_mails') == $content['value']) $OUT .= ' selected="selected"'; + if (postRequestElement('max_mails') == $content['value']) $OUT .= ' selected="selected"'; $OUT .= ">".$content['value']." {--PER_DAY--}"; if (!empty($content['comment'])) $OUT .= " (".$content['comment'].')'; $OUT .= "</option>\n"; } - define('__MAX_RECEIVE_OPTIONS', $OUT); // Load template - $OUT = LOAD_TEMPLATE($mode . '_receive_table', true); + $OUT = loadTemplate(($mode . '_receive_table'), true, $OUT); } else { // Maybe the admin has to setup some maximum values? debug_report_bug('Nothing is being done here?'); @@ -709,15 +745,15 @@ function addMaxReceiveList ($mode, $default = '', $return = false) { return $OUT; } else { // Output directly (default) - OUTPUT_HTML($OUT); + outputHtml($OUT); } } // Checks wether the given email address is used. function isEmailTaken ($email) { // Query the database - $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", - array($email), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", + array($email), __FUNCTION__, __LINE__); // Is the email there? $ret = (SQL_NUMROWS($result) == 1); @@ -730,14 +766,14 @@ function isEmailTaken ($email) { } // Validate the given menu action -function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) { +function isMenuActionValid ($mode, $action, $what, $UPDATE=false) { // Is the cache entry there and we shall not update? - if ((isset($GLOBALS['cache_array']['action_valid'][$mode][$act][$wht])) && ($UPDATE === false)) { + if ((isset($GLOBALS['action_valid'][$mode][$action][$what])) && ($UPDATE === false)) { // Count cache hit - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); // Then use this cache - return $GLOBALS['cache_array']['action_valid'][$mode][$act][$wht]; + return $GLOBALS['action_valid'][$mode][$action][$what]; } // END - if // By default nothing is valid @@ -745,21 +781,21 @@ function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) { // Look in all menus or only unlocked $add = ''; - if ((!IS_ADMIN()) && ($mode != 'admin')) $add = " AND `locked`='N'"; + if ((!isAdmin()) && ($mode != 'admin')) $add = " AND `locked`='N'"; - //* DEBUG: */ OUTPUT_HTML(__LINE__.':'.$mode.'/'.$act.'/'.$wht."*<br />"); + //* DEBUG: */ outputHtml(__LINE__.':'.$mode.'/'.$action.'/'.$what."*<br />"); if (($mode != 'admin') && ($UPDATE === true)) { // 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", - array($mode, $act, $wht), __FUNCTION__, __LINE__, false); - } elseif (($wht != 'overview') && (!empty($wht))) { + $sql = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1", + array($mode, $action, $what), __FUNCTION__, __LINE__, false); + } elseif (($what != 'overview') && (!empty($what))) { // Other actions - $sql = SQL_QUERY_ESC("SELECT `id`, `what` FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY `action` DESC LIMIT 1", - array($mode, $act, $wht), __FUNCTION__, __LINE__, false); + $sql = SQL_QUERY_ESC("SELECT `id`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY `action` DESC LIMIT 1", + array($mode, $action, $what), __FUNCTION__, __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", - array($mode, $act), __FUNCTION__, __LINE__, false); + $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, $action), __FUNCTION__, __LINE__, false); } // Run SQL command @@ -776,7 +812,7 @@ function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) { SQL_FREERESULT($result); // Set cache entry - $GLOBALS['cache_array']['action_valid'][$mode][$act][$wht] = $ret; + $GLOBALS['action_valid'][$mode][$action][$what] = $ret; // Return result return $ret; @@ -784,10 +820,8 @@ function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) { // function sendModeMails ($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(getUserId()), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load hash from database @@ -798,57 +832,53 @@ function sendModeMails ($mod, $modes) { // Now let's compare passwords $hash = generatePassString($hashDB); - if (($hash == getSession('u_hash')) || (REQUEST_POST('pass1') == REQUEST_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", - array(getUserId(), $hashDB), __FUNCTION__, __LINE__); + if (($hash == getSession('u_hash')) || (postRequestElement('pass1') == postRequestElement('pass2'))) { + // Load user's data 0 1 2 3 4 5 6 7 + $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(getUserId(), $hashDB), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load the data - $DATA = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result, 0, false); // Free result SQL_FREERESULT($result); // Translate gender - $DATA[0] = translateGender($DATA[0]); + $content['gender'] = translateGender($content['gender']); // Clear/init the content variable - $content = ''; - $DATA['info'] = ''; + $content['info'] = ''; - switch ($mod) - { + switch ($mod) { case 'mydata': foreach ($modes as $mode) { - switch ($mode) - { + switch ($mode) { case 'normal': break; // Do not add any special lines - case 'email': // Email was changed! - $content = getMessage('MEMBER_CHANGED_EMAIL').": ".REQUEST_POST('old_addy')."\n"; + $content['message'] = getMessage('MEMBER_CHANGED_EMAIL').": ".postRequestElement('old_email')."\n"; break; case 'pass': // Password was changed - $content = getMessage('MEMBER_CHANGED_PASS')."\n"; + $content['message'] = getMessage('MEMBER_CHANGED_PASS')."\n"; break; default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode)); - $content = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n"; + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode)); + $content['message'] = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n"; break; } // END - switch } // END - if - if (EXT_IS_ACTIVE('country')) { + if (isExtensionActive('country')) { // Replace code with description - $DATA[4] = COUNTRY_GENERATE_INFO(REQUEST_POST('country_code')); + $content['country'] = generateCountryInfo(postRequestElement('country_code')); } // END - if // Merge content with data from POST - $content = merge_array($content, REQUEST_POST_ARRAY()); + $content = merge_array($content, postRequestArray()); // Load template - $message = LOAD_EMAIL_TEMPLATE('member_mydata_notify', $content, getUserId()); + $message = loadEmailTemplate('member_mydata_notify', $content, getUserId()); if (getConfig('admin_notify') == 'Y') { // The admin needs to be notified about a profile change @@ -868,7 +898,7 @@ function sendModeMails ($mod, $modes) { break; default: // Unsupported module! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod)); $content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>"; break; } // END - switch @@ -888,7 +918,7 @@ function sendModeMails ($mod, $modes) { // Send email to user if required if ((!empty($sub_mem)) && (!empty($message))) { // Send member mail - sendEmail($DATA[7], $sub_mem, $message); + sendEmail($content['email'], $sub_mem, $message); } // END - if // Send only if no other error has occured @@ -906,36 +936,35 @@ function sendModeMails ($mod, $modes) { } // END - if // Load template - LOAD_TEMPLATE('admin_settings_saved', false, $content); + loadTemplate('admin_settings_saved', false, $content); } // Update module counter function countModuleHit($mod) { // 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), __FUNCTION__, __LINE__); } // Get action value from mode (admin/guest/member) and what-value -function getModeAction ($mode, $wht) { +function getModeAction ($mode, $what) { // Init status $ret = ''; - //* DEBUG: */ OUTPUT_HTML(__LINE__.'='.$mode.'/'.$wht.'/'.getAction()."=<br />"); - if ((empty($wht)) && ($mode != 'admin')) { - $wht = 'welcome'; - if (getConfig('index_home') != '') $wht = getConfig('index_home'); + //* DEBUG: */ outputHtml(__LINE__.'='.$mode.'/'.$what.'/'.getAction()."=<br />"); + if ((empty($what)) && ($mode != 'admin')) { + $what = getConfig('index_home'); } // END - if if ($mode == 'admin') { // Action value for admin area - if (REQUEST_ISSET_GET('action')) { + if (isGetRequestElementSet('action')) { // Use from request! - return REQUEST_GET('action'); + return getRequestElement('action'); } elseif (isActionSet()) { // Get it directly from URL return getAction(); - } elseif (($wht == 'overview') || (!isWhatSet())) { + } elseif (($what == 'overview') || (!isWhatSet())) { // Default value for admin area $ret = 'login'; } @@ -943,22 +972,19 @@ function getModeAction ($mode, $wht) { // Get it directly from URL return getAction(); } - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />"); // Does the module have a menu? - if (MODULE_HAS_MENU($mode)) { + if (ifModuleHasMenu($mode)) { // Rewriting modules to menu - switch ($mode) { - case 'index': $mode = 'guest'; break; - case 'login': $mode = 'member'; break; - } // END - switch + $mode = mapModuleToTable($mode); // Guest and member menu is 'main' as the default if (empty($ret)) $ret = 'main'; // Load from database - $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1", - array($mode, $wht), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what`='%s' LIMIT 1", + array($mode, $what), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load action value and pray that this one is the right you want... ;-) list($ret) = SQL_FETCHROW($result); @@ -966,7 +992,7 @@ function getModeAction ($mode, $wht) { // Free memory SQL_FREERESULT($result); - } elseif ((GET_EXT_VERSION('sql_patches') == '') && ($mode != 'admin')) { + } elseif ((!isExtensionInstalled('sql_patches')) && ($mode != 'admin')) { // No sql_patches installed, but maybe we need to register an admin? if (isAdminRegistered()) { // Redirect @@ -990,7 +1016,7 @@ function getCategory ($cid) { $ret = getMessage('_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)), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Category found... :-) @@ -1011,11 +1037,11 @@ function getPaymentTitlePrice ($pid, $full=false) { $ret = getMessage('_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)), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Payment type found... :-) - if (!$full) { + if ($full === false) { // Return only title list($ret) = SQL_FETCHROW($result); } else { @@ -1038,7 +1064,7 @@ function getPaymentPoints ($pid, $lookFor = 'price') { $ret = '-1'; // Search for it in database - $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), __FUNCTION__, __LINE__); // Is the entry there? @@ -1055,12 +1081,12 @@ function getPaymentPoints ($pid, $lookFor = 'price') { } // Remove a receiver's ID from $receivers and add a link for him to confirm -function removeReceiver (&$receivers, $key, $uid, $pool_id, $stats_id = '', $bonus = false) { +function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $bonus = false) { // Default is not removed $ret = 'failed'; // Is the userid valid? - if ($uid > 0) { + if ($userid > 0) { // Remove entry from array unset($receivers[$key]); @@ -1071,14 +1097,14 @@ function removeReceiver (&$receivers, $key, $uid, $pool_id, $stats_id = '', $bon if ($bonus) { $type = 'BONUS'; $rowName = 'bonus_id'; } // Try to look the entry up - $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), __FUNCTION__, __LINE__); + $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($userid), $type), __FUNCTION__, __LINE__); // Was it *not* found? if (SQL_NUMROWS($result) == 0) { // So we add one! - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')", - array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')", + array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__); $ret = 'done'; } else { // Already found @@ -1095,29 +1121,29 @@ function removeReceiver (&$receivers, $key, $uid, $pool_id, $stats_id = '', $bon } // Calculate sum (default) or count records of given criteria -function GET_TOTAL_DATA ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') { +function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') { $ret = 0; - //* DEBUG: */ OUTPUT_HTML($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />'); + //* DEBUG: */ outputHtml($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />'); if ((empty($search)) && ($search != '0')) { // Count or sum whole table? if ($countRows === true) { // Count whole table - $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add, + $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{?_MYSQL_PREFIX?}_%s`".$add, array($lookFor, $tableName), __FUNCTION__, __LINE__); } else { // Sum whole table - $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add, + $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{?_MYSQL_PREFIX?}_%s`".$add, array($lookFor, $tableName), __FUNCTION__, __LINE__); } } elseif (($countRows === true) || ($lookFor == 'userid')) { // Count rows - //* DEBUG: */ OUTPUT_HTML("COUNT!<br />"); - $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add, + //* DEBUG: */ outputHtml("COUNT!<br />"); + $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add, array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__); } else { // Add all rows - //* DEBUG: */ OUTPUT_HTML("SUM!<br />"); - $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add, + //* DEBUG: */ outputHtml("SUM!<br />"); + $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add, array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__); } @@ -1145,7 +1171,7 @@ function getReferalLevelPercents ($level) { $per = 0; // Do we have cache? - if ((isset($GLOBALS['cache_array']['ref_depths']['level'])) && (EXT_IS_ACTIVE('cache'))) { + if ((isset($GLOBALS['cache_array']['ref_depths']['level'])) && (isExtensionActive('cache'))) { // First look for level $key = array_search($level, $GLOBALS['cache_array']['ref_depths']['level']); if ($key !== false) { @@ -1153,21 +1179,21 @@ function getReferalLevelPercents ($level) { $per = $GLOBALS['cache_array']['ref_depths']['percents'][$key]; // Count cache hit - incrementConfigEntry('cache_hits'); + incrementStatsEntry('cache_hits'); } - } elseif (!EXT_IS_ACTIVE('cache')) { + } elseif (!isExtensionActive('cache')) { // Get referal data - $result_lvl = SQL_QUERY_ESC("SELECT percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1", - array(bigintval($level)), __FUNCTION__, __LINE__); + $result_level = SQL_QUERY_ESC("SELECT percents FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE level='%s' LIMIT 1", + array(bigintval($level)), __FUNCTION__, __LINE__); // Entry found? - if (SQL_NUMROWS($result_lvl) == 1) { + if (SQL_NUMROWS($result_level) == 1) { // Get percents - list($per) = SQL_FETCHROW($result_lvl); + list($per) = SQL_FETCHROW($result_level); } // END - if // Free result - SQL_FREERESULT($result_lvl); + SQL_FREERESULT($result_level); } // Return percent @@ -1179,115 +1205,113 @@ function getReferalLevelPercents ($level) { * Dynamic referal system, can also send mails! * * subject = Subject line, write in lower-case letters and underscore is allowed - * uid = Referal ID wich should receive... + * userid = Referal ID wich should receive... * points = ... xxx points - * send_notify = shall I send the referal an email or not? - * rid = inc/modules/guest/what-confirm.php need this (DEPRECATED???) + * sendNotify = shall I send the referal an email or not? + * rid = inc/modules/guest/what-confirm.php need this * locked = Shall I pay it to normal (false) or locked (true) points ammount? - * add_mode = Add points only to $uid or also refs? (WARNING! Changing 'ref' to 'direct' + * add_mode = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct' * for default value will cause no referal will get points ever!!!) */ -function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify = false, $rid = '0', $locked = false, $add_mode = 'ref') { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); - global $DATA; - +function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = '0', $locked = false, $add_mode = 'ref') { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Convert mode to lower-case $add_mode = strtolower($add_mode); - // When $uid = 0 add points to jackpot - if ($uid == '0') { + // When $userid = 0 add points to jackpot + if (($userid == '0') && (isExtensionActive('jackpot'))) { // Add points to jackpot - ADD_JACKPOT($points); + addPointsToJackpot($points); return; } // END - if - // Add booking record if extension is installed - if (EXT_IS_ACTIVE('booking')) { - // Add record - ADD_BOOKING_RECORD($subject, $uid, $points, 'add'); - } // END - if + // Prepare data for the filter + $filterData = array( + 'subject' => $subject, + 'userid' => $userid, + 'points' => $points, + 'notify' => $notify, + 'rid' => $rid, + 'locked' => $locked, + 'mode' => 'add', + 'sub_mode' => $add_mode, + ); + + // Filter it now + runFilterChain('add_points', $filterData); // Count up referal depth if (!isset($GLOBALS['ref_level'])) { // Initialialize referal system - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal system initialized!<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal system initialized!<br />"); $GLOBALS['ref_level'] = 0; } else { // Increase referal level $GLOBALS['ref_level']++; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal level increased. DEPTH={$GLOBALS['ref_level']}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal level increased. DEPTH={$GLOBALS['ref_level']}<br />"); } // Default is 'normal' points $data = 'points'; // Which points, locked or normal? - if ($locked) $data = 'locked_points'; + if ($locked === true) $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", - array(bigintval($uid)), __FUNCTION__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT `refid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array(bigintval($userid)), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />"); if (SQL_NUMROWS($result_user) == 1) { // This is the user and his ref list($ref, $email) = SQL_FETCHROW($result_user); - $GLOBALS['cache_array']['add_uid'][$ref] = $uid; + $GLOBALS['cache_array']['add_userid'][$ref] = $userid; // Get percents $per = getReferalLevelPercents($GLOBALS['ref_level']); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},points={$points},depth={$GLOBALS['ref_level']},per={$per},mode={$add_mode}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},points={$points},depth={$GLOBALS['ref_level']},per={$per},mode={$add_mode}<br />"); // Some percents found? if ($per > 0) { // Calculate new points - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},points={$points},per={$per},depth={$GLOBALS['ref_level']}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},points={$points},per={$per},depth={$GLOBALS['ref_level']}<br />"); $ref_points = $points * $per / 100; // Pay refback here if level > 0 and in ref-mode - if ((EXT_IS_ACTIVE('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_uid'][$uid]))) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},data={$GLOBALS['cache_array']['add_uid'][$uid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - BEFORE!<br />"); - $ref_points = ADD_REFBACK_POINTS($GLOBALS['cache_array']['add_uid'][$uid], $uid, $points, $ref_points); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},data={$GLOBALS['cache_array']['add_uid'][$uid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - AFTER!<br />"); + if ((isExtensionActive('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_userid'][$userid]))) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - BEFORE!<br />"); + $ref_points = addRefbackPoints($GLOBALS['cache_array']['add_userid'][$userid], $userid, $points, $ref_points); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - AFTER!<br />"); } // 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", - array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />"); + 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($userid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />"); // 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)", - array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />"); - } // END - if - - // Update mediadata as well - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { - // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $ref_points); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`,`ref_depth`,`%s`) VALUES (%s,'%s',%s)", + array($data, bigintval($userid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />"); } // END - if // Points updated, maybe I shall send him an email? - if (($send_notify) && ($ref > 0) && (!$locked)) { + if (($sendNotify === true) && ($ref > 0) && ($locked === false)) { // Prepare content $content = array( - 'percent' => $per, - 'level' => bigintval($GLOBALS['ref_level']), - 'points' => $ref_points, - 'refid' => bigintval($ref) + 'percents' => $per, + 'level' => bigintval($GLOBALS['ref_level']), + 'points' => $ref_points, + 'refid' => bigintval($ref) ); // Load email template - $message = LOAD_EMAIL_TEMPLATE('confirm-referal', $content, bigintval($uid)); + $message = loadEmailTemplate('confirm-referal', $content, bigintval($userid)); sendEmail($email, THANX_REFERRAL_ONE, $message); - } elseif (($send_notify) && ($ref == 0) && (!$locked) && ($add_mode == 'direct') && (!defined('__POINTS_VALUE'))) { - // Direct payment shall be notified about - define('__POINTS_VALUE', $ref_points); - + } elseif (($sendNotify) && ($ref == 0) && ($locked === false) && ($add_mode == 'direct')) { // Prepare content $content = array( 'text' => getMessage('REASON_DIRECT_PAYMENT'), @@ -1295,87 +1319,82 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify = false, $r ); // Load message - $message = LOAD_EMAIL_TEMPLATE('add-points', $content, $uid); + $message = loadEmailTemplate('add-points', $content, $userid); // And sent it away sendEmail($email, getMessage('SUBJECT_DIRECT_PAYMENT'), $message); - if (!REQUEST_ISSET_GET('mid')) LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED')); + if (!isGetRequestElementSet('mid')) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED')); } // Maybe there's another ref? - if (($ref > 0) && ($points > 0) && ($ref != $uid) && ($add_mode == 'ref')) { + if (($ref > 0) && ($points > 0) && ($ref != $userid) && ($add_mode == 'ref')) { // Then let's credit him here... - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref},points={$points} - ADVANCE!<br />"); - ADD_POINTS_REFSYSTEM(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), $ref, $points, $send_notify, $ref, $locked); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref},points={$points} - ADVANCE!<br />"); + addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), $ref, $points, $sendNotify, $ref, $locked); } // END - if } // END - if } // END - if // Free result SQL_FREERESULT($result_user); - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); -} - -// Wrapper function for ADD_POINTS_REFSYSTEM() -function ADD_POINTS_REFSYSTEM_DIRECT ($subject, $uid, $points) { - return ADD_POINTS_REFSYSTEM($subject, $uid, $points, false, 0, false, 'direct'); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); } // Updates the referal counter -function updateReferalCounter ($uid) { +function updateReferalCounter ($userid) { // Make it sure referal level zero (member him-/herself) is at least selected - if (empty($GLOBALS['cache_array']['ref_level'][$uid])) $GLOBALS['cache_array']['ref_level'][$uid] = 1; - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['ref_level'][$uid]}<br />"); + if (empty($GLOBALS['cache_array']['ref_level'][$userid])) $GLOBALS['cache_array']['ref_level'][$userid] = 1; + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['cache_array']['ref_level'][$userid]}<br />"); // Update counter - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1", - array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1", + array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__); // When no entry was updated then we have to create it here - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />"); if (SQL_AFFECTEDROWS() < 1) { // First count! - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)", - array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />"); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)", + array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid}<br />"); } // END - if // Check for his referal - $result = SQL_QUERY_ESC("SELECT `refid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($uid)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FUNCTION__, __LINE__); // Load refid list($ref) = SQL_FETCHROW($result); // Free memory SQL_FREERESULT($result); - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref}<br />"); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref}<br />"); // When he has a referal... - if (($ref > 0) && ($ref != $uid)) { + if (($ref > 0) && ($ref != $userid)) { // Move to next referal level and count his counter one up! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />"); - $GLOBALS['cache_array']['ref_level'][$uid]++; updateReferalCounter($ref); - } elseif ((($ref == $uid) || ($ref == 0)) && (GET_EXT_VERSION('cache') >= '0.1.2')) { + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />"); + $GLOBALS['cache_array']['ref_level'][$userid]++; updateReferalCounter($ref); + } elseif ((($ref == $userid) || ($ref == 0)) && (getExtensionVersion('cache') >= '0.1.2')) { // Remove cache here - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />"); - rebuildCacheFiles('refsystem', 'refsystem'); + //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />"); + rebuildCacheFile('refsystem', 'refsystem'); } // "Walk" back here - $GLOBALS['cache_array']['ref_level'][$uid]--; + $GLOBALS['cache_array']['ref_level'][$userid]--; // Handle refback here if extension is installed - if (EXT_IS_ACTIVE('refback')) { - updateRefbackTable($uid); + if (isExtensionActive('refback')) { + updateRefbackTable($userid); } // END - if } // Sends out mail to all administrators. This function is no longer obsolete // because we need it when there is no ext-admins installed -function SEND_ADMIN_EMAILS ($subj, $message) { +function sendAdminEmails ($subj, $message) { // Load all admin email addresses - $result = SQL_QUERY("SELECT `email` FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id` ASC", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC", __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { // Send the email out sendEmail($content['email'], $subj, $message); @@ -1388,21 +1407,21 @@ function SEND_ADMIN_EMAILS ($subj, $message) { } // Get ID number from administrator's login name -function GET_ADMIN_ID ($login) { +function getAdminId ($login) { // By default no admin is found $ret = '-1'; // Check cache - if (isset($GLOBALS['cache_array']['admins']['aid'][$login])) { + if (isset($GLOBALS['cache_array']['admins']['admin_id'][$login])) { // Use it if found to save SQL queries - $ret = $GLOBALS['cache_array']['admins']['aid'][$login]; + $ret = $GLOBALS['cache_array']['admins']['admin_id'][$login]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1", - array($login), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1", + array($login), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($ret) = SQL_FETCHROW($result); } // END - if @@ -1415,37 +1434,43 @@ function GET_ADMIN_ID ($login) { // "Getter" for current admin id function getCurrentAdminId () { - // Get the admin login from session - $adminLogin = getSession('admin_login'); + // Do we have cache? + if (!isset($GLOBALS['current_admin_id'])) { + // Get the admin login from session + $adminLogin = getSession('admin_login'); + + // "Solve" it into an id + $adminId = getAdminId($adminLogin); - // "Solve" it into an id - $adminId = GET_ADMIN_ID($adminLogin); + // Remember in cache securely + $GLOBALS['current_admin_id'] = bigintval($adminId); + } // END - if - // Secure and return it - return bigintval($adminId); + // Return it + return $GLOBALS['current_admin_id']; } // Get password hash from administrator's login name -function GET_ADMIN_HASH ($aid) { +function getAdminHash ($adminId) { // By default an invalid hash is returned $ret = '-1'; - if (isset($GLOBALS['cache_array']['admins']['password'][$aid])) { + if (isset($GLOBALS['cache_array']['admins']['password'][$adminId])) { // Check cache - $ret = $GLOBALS['cache_array']['admins']['password'][$aid]; + $ret = $GLOBALS['cache_array']['admins']['password'][$adminId]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1", - array($aid), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT password FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array($adminId), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Fetch data list($ret) = SQL_FETCHROW($result); // Set cache - $GLOBALS['cache_array']['admins']['password'][$aid] = $ret; + $GLOBALS['cache_array']['admins']['password'][$adminId] = $ret; } // END - if // Free result @@ -1455,26 +1480,26 @@ function GET_ADMIN_HASH ($aid) { } // "Getter" for admin login -function getAdminLogin ($aid) { +function getAdminLogin ($adminId) { // By default a non-existent login is returned (other functions react on this!) $ret = '***'; - if (isset($GLOBALS['cache_array']['admins']['login'][$aid])) { + if (isset($GLOBALS['cache_array']['admins']['login'][$adminId])) { // Get cache - $ret = $GLOBALS['cache_array']['admins']['login'][$aid]; + $ret = $GLOBALS['cache_array']['admins']['login'][$adminId]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result = SQL_QUERY_ESC("SELECT login FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1", - array(bigintval($aid)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT login FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array(bigintval($adminId)), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Fetch data list($ret) = SQL_FETCHROW($result); // Set cache - $GLOBALS['cache_array']['admins']['login'][$aid] = $ret; + $GLOBALS['cache_array']['admins']['login'][$adminId] = $ret; } // END - if // Free memory @@ -1484,30 +1509,30 @@ function getAdminLogin ($aid) { } // Get email address of admin id -function getAdminEmail ($aid) { +function getAdminEmail ($adminId) { // By default an invalid emails is returned $ret = '***'; - if (isset($GLOBALS['cache_array']['admins']['email'][$aid])) { + if (isset($GLOBALS['cache_array']['admins']['email'][$adminId])) { // Get cache - $ret = $GLOBALS['cache_array']['admins']['email'][$aid]; + $ret = $GLOBALS['cache_array']['admins']['email'][$adminId]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result_aid = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1", - array(bigintval($aid)), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result_aid) == 1) { + $result_admin_id = SQL_QUERY_ESC("SELECT email FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array(bigintval($adminId)), __FUNCTION__, __LINE__); + if (SQL_NUMROWS($result_admin_id) == 1) { // Get data - list($ret) = SQL_FETCHROW($result_aid); + list($ret) = SQL_FETCHROW($result_admin_id); // Set cache - $GLOBALS['cache_array']['admins']['email'][$aid] = $ret; + $GLOBALS['cache_array']['admins']['email'][$adminId] = $ret; } // END - if // Free result - SQL_FREERESULT($result_aid); + SQL_FREERESULT($result_admin_id); } // Return email @@ -1515,34 +1540,34 @@ function getAdminEmail ($aid) { } // Get default ACL of admin id -function getAdminDefaultAcl ($aid) { +function getAdminDefaultAcl ($adminId) { // By default an invalid ACL value is returned $ret = '***'; // Is sql_patches there and was it found in cache? - if (!EXT_IS_ACTIVE('sql_patches')) { + if (!isExtensionActive('sql_patches')) { // Not found, which is bad, so we need to allow all $ret = 'allow'; - } elseif (isset($GLOBALS['cache_array']['admins']['def_acl'][$aid])) { + } elseif (isset($GLOBALS['cache_array']['admins']['def_acl'][$adminId])) { // Use cache - $ret = $GLOBALS['cache_array']['admins']['def_acl'][$aid]; + $ret = $GLOBALS['cache_array']['admins']['def_acl'][$adminId]; // Update cache hits - incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE('cache')) { + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { // Load from database - $result_aid = SQL_QUERY_ESC("SELECT default_acl FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1", - array(bigintval($aid)), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result_aid) == 1) { + $result_admin_id = SQL_QUERY_ESC("SELECT `default_acl` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", + array(bigintval($adminId)), __FUNCTION__, __LINE__); + if (SQL_NUMROWS($result_admin_id) == 1) { // Fetch data - list($ret) = SQL_FETCHROW($result_aid); + list($ret) = SQL_FETCHROW($result_admin_id); // Set cache - $GLOBALS['cache_array']['admins']['def_acl'][$aid] = $ret; + $GLOBALS['cache_array']['admins']['def_acl'][$adminId] = $ret; } // Free result - SQL_FREERESULT($result_aid); + SQL_FREERESULT($result_admin_id); } // Return email @@ -1568,7 +1593,7 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher 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), __FUNCTION__, __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 @@ -1593,21 +1618,21 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher return $ret; } // Activate exchange -function activateExchange () { +function FILTER_ACTIVATE_EXCHANGE () { // Is the extension 'user' there? - if (!EXT_IS_ACTIVE('user')) { + if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == 0)) { // Silently abort here return false; } // END - if // Check total amount of users - $totalUsers = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true, ' AND max_mails > 0'); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, ' AND max_mails > 0'); if ($totalUsers >= getConfig('activate_xchange')) { // Activate System - SET_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", + setSqlsArray(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", )); // Run SQLs @@ -1617,199 +1642,118 @@ function activateExchange () { updateConfiguration('activate_xchange' ,0); // Rebuild cache - rebuildCacheFiles('modreg', 'modreg'); + rebuildCacheFile('modreg', 'modreg'); } // END - if } // Deletes a user account with given reason -function deleteUserAccount ($uid, $reason) { +function deleteUserAccount ($userid, $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)), __FUNCTION__, __LINE__); +WHERE p.userid=%s", array(bigintval($userid)), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Save his points to add them to the jackpot list($points) = SQL_FETCHROW($result); // Delete points entries as well - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_points` WHERE `userid`=%s", array(bigintval($uid)), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s", array(bigintval($userid)), __FUNCTION__, __LINE__); // Update mediadata as well - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'sub', $points); + updateMediadataEntry(array('total_points'), 'sub', $points); } // END - if // Now, when we have all his points adds them do the jackpot! - ADD_JACKPOT($points); + if (isExtensionActive('jackpot')) addPointsToJackpot($points); } // END - if // Free the result SQL_FREERESULT($result); // Delete category selections as well... - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE `userid`=%s", - array(bigintval($uid)), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s", + array(bigintval($userid)), __FUNCTION__, __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)), __FUNCTION__, __LINE__); + if (isExtensionActive('rallye')) { + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `userid`=%s", + array(bigintval($userid)), __FUNCTION__, __LINE__); } // END - if // Now a mail to the user and that's all... - $message = LOAD_EMAIL_TEMPLATE('del-user', array('text' => $reason), $uid); - sendEmail($uid, getMessage('ADMIN_DEL_ACCOUNT'), $message); + $message = loadEmailTemplate('del-user', array('text' => $reason), $userid); + sendEmail($userid, getMessage('ADMIN_DEL_ACCOUNT'), $message); // Ok, delete the account! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __FUNCTION__, __LINE__); } // Generates meta description for given module and 'what' value -function generateMetaDescriptionCode ($mod, $wht) { +function generateMetaDescriptionCode ($mod, $what) { // 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')) . ' ' . addMenuDescription('guest', 'what-'.$what, true); // Output it directly - OUTPUT_HTML('<meta name="description" content="' . $DESCR . '" />'); + outputHtml('<meta name="description" content="' . $DESCR . '" />'); } // END - if // Remove depth unset($GLOBALS['ref_level']); } -function GET_JACKPOT_POINTS () { - // Default is zero - $jackpot = '0.00000'; - - // Read them - $result = SQL_QUERY("SELECT `points` FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__); - - // Do we have an entry? - if (SQL_NUMROWS($result) == 0) { - // No, so create line - SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); - } else { - // Read the line - list($jackpot) = SQL_FETCHROW($result); - } - - // Free result - SQL_FREERESULT($result); - - // Return them - return $jackpot; -} - -// Adds points to the jackpot -function ADD_JACKPOT ($points) { - // Get jackpot points for dummy - $jackpot = GET_JACKPOT_POINTS(); - - // Update points - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET `points`=`points`+%s WHERE `ok`='ok' LIMIT 1", - array($points), __FUNCTION__, __LINE__); -} - -// Subtracts points from the jackpot -function SUB_JACKPOT ($points) { - // First failed - $ret = '-1'; - - // Get jackpot points for dummy - $jackpot = GET_JACKPOT_POINTS(); - - // Enougth points i jackpot? - 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", - array($points), __FUNCTION__, __LINE__); - $ret = $jackpot - $points; - } // END - if - - // Free memory - SQL_FREERESULT($result); - - // Return the result - return $ret; -} - -// Checks wether the extension demo is actuve and the admin login is demo (password needs to be demo, too!) -function IS_DEMO () { - return ((EXT_IS_ACTIVE('demo')) && (getSession('admin_login') == 'demo')); -} - // Gets the matching what name from module function getWhatFromModule ($modCheck) { // Is the request element set? - if (REQUEST_ISSET_GET('what')) { + if (isGetRequestElementSet('what')) { // Then return this! - return REQUEST_GET('what'); + return getRequestElement('what'); } // END - if // Default is empty - $wht = ''; + $what = ''; - //* DEBUG: */ OUTPUT_HTML(__LINE__.'!'.$modCheck."!<br />"); + //* DEBUG: */ outputHtml(__LINE__.'!'.$modCheck."!<br />"); switch ($modCheck) { case 'admin': - $wht = 'overview'; + $what = 'overview'; break; case 'login': case 'index': - $wht = 'welcome'; - if (($modCheck == 'index') && (getConfig('index_home') != '')) $wht = getConfig('index_home'); + $what = getConfig('index_home'); break; default: - $wht = ''; + $what = ''; break; } // END - switch // Return what value - return $wht; + return $what; } // Subtract points from database and mediadata cache -function SUB_POINTS ($subject, $uid, $points) { +function subtractPoints ($subject, $userid, $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", - array($points, bigintval($uid)), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `used_points`=`used_points`+%s WHERE `userid`=%s LIMIT 1", + array($points, bigintval($userid)), __FUNCTION__, __LINE__); + + // Prepare filter data + $filterData = array( + 'subject' => $subject, + 'userid' => $userid, + 'points' => $points, + 'mode' => 'sub' + ); // Insert booking record - // @TODO Rewrite this to a filter - if (EXT_IS_ACTIVE('booking')) { - // Add record - ADD_BOOKING_RECORD($subject, $uid, $points, 'sub'); - } // END - if - - // Update mediadata as well - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { - // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'sub', $points); - } // END - if -} - -// Prepares an SQL statement part for HTML mail and/or holiday depency -// @TODO Can this be rewritten to a filter? -function PREPARE_SQL_HTML_HOLIDAY ($mode) { - // Exclude no users by default - $MORE = ''; - - // HTML mail? - if ($mode == 'html') $MORE = " AND `html`='Y'"; - if (GET_EXT_VERSION('holiday') >= '0.1.3') { - // Add something for the holiday extension - $MORE .= " AND `holiday_active`='N'"; - } // END - if - - // Return result - return $MORE; + runFilterChain('sub_points', $filterData); } // "Getter" for total available receivers @@ -1818,9 +1762,9 @@ function getTotalReceivers ($mode='normal') { $result_all = SQL_QUERY("SELECT `userid` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND `receive_mails` > 0 ".PREPARE_SQL_HTML_HOLIDAY($mode), + `status`='CONFIRMED' AND `receive_mails` > 0 ".runFilterChain('exclude_users', $mode), __FUNCTION__, __LINE__); // Get num rows @@ -1837,17 +1781,17 @@ WHERE function generateCategoryOptionsList ($mode) { // Prepare WHERE statement $whereStatement = " WHERE `visible`='Y'"; - if (IS_ADMIN()) $whereStatement = ''; + if (isAdmin()) $whereStatement = ''; // Initialize array... $CATS = array( 'id' => array(), 'name' => array(), - 'uids' => array() + 'userids' => array() ); // Get categories - $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FUNCTION__, __LINE__); + $result = SQL_QUERY("SELECT id, cat FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort`", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // ... and begin loading stuff while ($content = SQL_FETCHARRAY($result)) { @@ -1856,34 +1800,34 @@ function generateCategoryOptionsList ($mode) { $CATS['name'][] = $content['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_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s", array(bigintval($content['id'])), __FUNCTION__, __LINE__); // Start adding all - $uid_cnt = 0; + $userid_cnt = 0; // @TODO Rewrite this to $content = SQL_FETCHARRAY() - while (list($ucat) = SQL_FETCHROW($result_uids)) { + while (list($ucat) = SQL_FETCHROW($result_userids)) { $result_ver = SQL_QUERY_ESC("SELECT `userid` FROM - `{!_MYSQL_PREFIX!}_user_data` + `{?_MYSQL_PREFIX?}_user_data` WHERE - `userid`=%s AND `status`='CONFIRMED' AND `receive_mails` > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." + `userid`=%s AND `status`='CONFIRMED' AND `receive_mails` > 0".runFilterChain('exclude_users', $mode)." LIMIT 1", array(bigintval($ucat)), __FUNCTION__, __LINE__); // Add user count - $uid_cnt += SQL_NUMROWS($result_ver); + $userid_cnt += SQL_NUMROWS($result_ver); // Free memory SQL_FREERESULT($result_ver); } // END - while // Free memory - SQL_FREERESULT($result_uids); + SQL_FREERESULT($result_userids); // Add counter - $CATS['uids'][] = $uid_cnt; + $CATS['userids'][] = $userid_cnt; } // END - while // Free memory @@ -1893,11 +1837,11 @@ LIMIT 1", $OUT = ''; foreach ($CATS['id'] as $key => $value) { if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."..."; - $OUT .= ' <option value="' . $value . '">' . $CATS['name'][$key] . ' (' . $CATS['uids'][$key] . ' {--USER_IN_CAT--})</option>'; + $OUT .= ' <option value="' . $value . '">' . $CATS['name'][$key] . ' (' . $CATS['userids'][$key] . ' {--USER_IN_CAT--})</option>'; } // END - foreach } else { // No cateogries are defined yet - $OUT = '<option class="member_failed">{!MEMBER_NO_CATS!}</option>'; + $OUT = '<option class="member_failed">{--MEMBER_NO_CATS--}</option>'; } // Return HTML code @@ -1907,10 +1851,10 @@ LIMIT 1", // Add bonus mail to queue function addBonusMailToQueue ($subject, $text, $receiverList, $points, $seconds, $url, $cat, $mode='normal', $receiver=0) { // Is admin or bonus extension there? - if (!IS_ADMIN()) { + if (!isAdmin()) { // Abort here return false; - } elseif (!EXT_IS_ACTIVE('bonus')) { + } elseif (!isExtensionActive('bonus')) { // Abort here return false; } @@ -1925,7 +1869,7 @@ function addBonusMailToQueue ($subject, $text, $receiverList, $points, $seconds, } // END - if // HTML extension active? - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('html_mail')) { // No HTML by default $HTML = 'N'; @@ -1933,7 +1877,7 @@ function addBonusMailToQueue ($subject, $text, $receiverList, $points, $seconds, 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( @@ -1950,7 +1894,7 @@ VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s ), __FUNCTION__, __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( @@ -1988,23 +1932,23 @@ function generateReceiverList ($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 // Exclude users in holiday? - if (GET_EXT_VERSION('holiday') >= '0.1.3') { + if (getExtensionVersion('holiday') >= '0.1.3') { // Add something for the holiday extension $CAT_WHERE .= " AND d.`holiday_active`='N'"; } // END - if - if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) { + if ((isExtensionActive('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), __FUNCTION__, __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), __FUNCTION__, __LINE__); } @@ -2028,17 +1972,17 @@ function generateReceiverList ($cat, $receiver, $mode = '') { } // Get timestamp for given stats type and data -function getTimestampFromUserStats ($type, $data, $uid = 0) { +function getTimestampFromUserStats ($type, $data, $userid = 0) { // Default timestamp is zero $stamp = 0; // User id set? - if ((isUserIdSet()) && ($uid == 0)) { - $uid = getUserId(); + if ((isUserIdSet()) && ($userid == 0)) { + $userid = getUserId(); } // END - if // Is the extension installed and updated? - if ((!EXT_IS_ACTIVE('sql_patches')) || (EXT_VERSION_IS_OLDER('sql_patches', '0.5.6'))) { + if ((!isExtensionActive('sql_patches')) || (isExtensionOlder('sql_patches', '0.5.6'))) { // Return zero here return $stamp; } // END - if @@ -2047,12 +1991,12 @@ function getTimestampFromUserStats ($type, $data, $uid = 0) { $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`inserted`) AS stamp FROM - `{!_MYSQL_PREFIX!}_user_stats_data` + `{?_MYSQL_PREFIX?}_user_stats_data` WHERE `userid`=%s AND `stats_type`='%s' AND `stats_data`='%s' LIMIT 1", array( - bigintval($uid), + bigintval($userid), $type, $data ), __FUNCTION__, __LINE__); @@ -2071,33 +2015,33 @@ LIMIT 1", } // Inserts user stats -function insertUserStatsRecord ($uid, $type, $data) { +function insertUserStatsRecord ($userid, $type, $data) { // Is the extension installed and updated? - if ((!EXT_IS_ACTIVE('sql_patches')) || (EXT_VERSION_IS_OLDER('sql_patches', '0.5.6'))) { + if ((!isExtensionActive('sql_patches')) || (isExtensionOlder('sql_patches', '0.5.6'))) { // Return zero here return false; } // END - if // Does it exist? - if ((!getTimestampFromUserStats($type, $data, $uid)) && (!is_array($data))) { + if ((!getTimestampFromUserStats($type, $data, $userid)) && (!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')", - array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')", + array(bigintval($userid), $type, $data), __FUNCTION__, __LINE__); } elseif (is_array($data)) { // Invalid data! - DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$uid},type={$type},data={".gettype($data).": Invalid statistics data type!"); + logDebugMessage(__FUNCTION__, __LINE__, "userid={$userid},type={$type},data={".gettype($data).": Invalid statistics data type!"); } } // "Getter" for array for user refs and points in given level -function getUserReferalPoints ($uid, $level) { - //* DEBUG: */ OUTPUT_HTML("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); +function getUserReferalPoints ($userid, $level) { + //* DEBUG: */ outputHtml("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n"); // Default is no refs and no nickname $add = ''; $refs = array(); // Do we have nickname extension installed? - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('nickname')) { $add = ', ud.nickname'; } // END - if @@ -2105,20 +2049,20 @@ function getUserReferalPoints ($uid, $level) { $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 + `{?_MYSQL_PREFIX?}_user_refs` AS ur LEFT JOIN - `{!_MYSQL_PREFIX!}_user_points` AS up + `{?_MYSQL_PREFIX?}_user_points` AS up ON ur.refid=up.userid AND ur.level=0 LEFT JOIN - `{!_MYSQL_PREFIX!}_user_data` AS ud + `{?_MYSQL_PREFIX?}_user_data` AS ud ON ur.refid=ud.userid WHERE ur.userid=%s AND ur.level=%s ORDER BY ur.refid ASC", array( - bigintval($uid), + bigintval($userid), bigintval($level) ), __FUNCTION__, __LINE__); @@ -2127,10 +2071,10 @@ ORDER BY ur.refid ASC", // Fetch all entries while ($row = SQL_FETCHARRAY($result)) { // Get total points of this user - $row['points'] = GET_TOTAL_DATA($row['refid'], 'user_points', 'points') - GET_TOTAL_DATA($row['refid'], 'user_data', 'used_points'); + $row['points'] = countSumTotalData($row['refid'], 'user_points', 'points') - countSumTotalData($row['refid'], 'user_data', 'used_points'); // Get unconfirmed mails - $row['unconfirmed'] = GET_TOTAL_DATA($row['refid'], 'user_links', 'id', 'userid', true); + $row['unconfirmed'] = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true); // Init clickrate with zero $row['clickrate'] = 0; @@ -2145,7 +2089,7 @@ ORDER BY ur.refid ASC", $row['activity'] = getMessage('MEMBER_ACTIVITY_ACTIVE'); // Is autopurge installed and the user inactive? - if ((EXT_IS_ACTIVE('autopurge')) && ((time() - getConfig('ap_inactive_since')) >= $row['last_online'])) { + if ((isExtensionActive('autopurge')) && ((time() - getConfig('ap_inactive_since')) >= $row['last_online'])) { // Inactive user! $row['activity'] = getMessage('MEMBER_ACTIVITY_INACTIVE'); } // END - if @@ -2164,14 +2108,14 @@ ORDER BY ur.refid ASC", SQL_FREERESULT($result); // Return result - //* DEBUG: */ OUTPUT_HTML("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); + //* DEBUG: */ outputHtml("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />"); return $refs; } // Recuce the amount of received emails for the receipients for given email function reduceRecipientReceivedMails ($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), __FUNCTION__, __LINE__); // Are there entries? @@ -2179,12 +2123,12 @@ function reduceRecipientReceivedMails ($column, $id, $count) { // Now load all userids for one big query! // @TODO This can be somehow rewritten $UIDs = array(); - while (list($uid) = SQL_FETCHROW($result)) { - $UIDs[$uid] = $uid; + while (list($userid) = SQL_FETCHROW($result)) { + $UIDs[$userid] = $userid; } // 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)), __FUNCTION__, __LINE__); } // END - if @@ -2192,77 +2136,11 @@ function reduceRecipientReceivedMails ($column, $id, $count) { SQL_FREERESULT($result); } -// Init SQLs array -function INIT_SQLS () { - SET_SQLS(array()); -} - -// Checks wether the sqls array is initialized -function IS_SQLS_INITIALIZED () { - return ((isset($GLOBALS['sqls'])) && (is_array($GLOBALS['sqls']))); -} - -// Setter for SQLs array -function SET_SQLS ($SQLs) { - $GLOBALS['sqls'] = (array) $SQLs; -} - -// Remover for SQLs array -function UNSET_SQLS () { - unset($GLOBALS['sqls']); -} - -// Getter for SQLs array -function GET_SQLS () { - return $GLOBALS['sqls']; -} - -// Add an SQL to the list -function ADD_SQL ($sql) { - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, COUNT_SQLS())); - $GLOBALS['sqls'][] = (string) $sql; -} - -// Setter for SQLs key -function SET_SQL_KEY ($key, $value) { - $GLOBALS['sqls'][$key] = (string) $value; -} - -// Merge SQLs together -function MERGE_SQLS ($SQLs) { - SET_SQLS(merge_array(GET_SQLS(), $SQLs)); -} - -// Counter for SQLs array -function COUNT_SQLS () { - // Default is false - $count = false; - - // Is the array there? - if (IS_SQLS_INITIALIZED()) { - // Then count it - $count = count($GLOBALS['sqls']); - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("count=%d", $count)); - } // END - if - - // Return it - return $count; -} - -// Checks wether the SQLs array is filled -function IS_SQLS_VALID () { - return ( - (IS_SQLS_INITIALIZED()) - && - (COUNT_SQLS() > 0) - ); -} - // Creates a new task -function createNewTask($subject, $notes, $taskType, $userid = 0, $admin_id = 0, $strip = true) { +function createNewTask ($subject, $notes, $taskType, $userid = 0, $adminId = 0, $strip = true) { // Insert the task data into the database - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())", - array($admin_id, $userid, $taskType, $subject, $notes), __FUNCTION__, __LINE__, true, $strip); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())", + array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip); } // [EOF] diff --git a/inc/patch-system.php b/inc/patch-system.php index dfa90beaa6..f551ef47b7 100644 --- a/inc/patch-system.php +++ b/inc/patch-system.php @@ -1,54 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 03/05/2005 * - * =============== Last change: 03/05/2005 * - * * - * -------------------------------------------------------------------- * - * File : patch-system.php * - * -------------------------------------------------------------------- * - * Short description : Handles patch level * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Verwalyet die Patch-Level * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Check for patch level differences between databases and current hard-coded -if ((getConfig('CURR_SVN_REVISION') > getConfig('patch_level')) || (getConfig('patch_level') == 'CURR_SVN_REVISION') || (getConfig('patch_ctime') == 'UNIX_TIMES')) { - // Update database and CONFIG array - updateConfiguration(array('patch_level', 'patch_ctime'), array(getConfig('CURR_SVN_REVISION'), 'UNIX_TIMESTAMP()')); - setConfigEntry('patch_level', getConfig('CURR_SVN_REVISION')); - setConfigEntry('patch_ctime', time()); -} // END - if - -// +// @DEPRECATED ?> diff --git a/inc/pool-update.php b/inc/pool-update.php index 30eb9f4e06..f551ef47b7 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -1,65 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 11/08/2003 * - * =============== Last change: 07/01/2005 * - * * - * -------------------------------------------------------------------- * - * File : pool-update.php * - * -------------------------------------------------------------------- * - * Short description : Sends queued mails from the pool * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Sendet freigegebene Mails aus den Pool * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Don't run on daily reset -if (isResetModeEnabled()) { - // Skip here - return false; -} // END - if - -// Init counter -$GLOBALS['pool_cnt'] = 0; - -// Init & set the include pool -INIT_INC_POOL(); -SET_INC_POOL(getArrayFromDirectory('inc/pool/', 'pool-')); - -// Run the filter -runFilterChain('load_includes'); - -// Remove counter again -unset($GLOBALS['pool_cnt']); - -// +// @DEPRECATED ?> diff --git a/inc/pool/pool- b/inc/pool/pool- new file mode 100644 index 0000000000..aac04bd95e --- /dev/null +++ b/inc/pool/pool- @@ -0,0 +1,54 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : pool- * + * -------------------------------------------------------------------- * + * Short description : Sends queued * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Sendet * + * -------------------------------------------------------------------- * + * $Revision:: 1161 $ * + * $Date:: 2009-10-06 22:04:31 +0200 (Tue, 06 Oct 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} + +// Don't run on daily reset +if (isResetModeEnabled()) { + // Skip here + return false; +} elseif (!isExtensionActive('foo')) { + // Abort if extension foo is not active + return false; +} + +// [EOF] +?> diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index 6793f63f4b..a93fa52e7d 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Don't run on daily reset if (isResetModeEnabled()) { // Skip here return false; -} elseif (!EXT_IS_ACTIVE('bonus')) { +} elseif (!isExtensionActive('bonus')) { // Abort if extension bonus is not active return false; } @@ -55,23 +54,20 @@ if (isResetModeEnabled()) { // Only send bonus mail when bonus extension is active and maximum send-mails is not reached if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { // Do we need to send out bonus mails? - if (EXT_IS_ACTIVE('html_mail')) { + if (isExtensionActive('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) { // Send these mails away... $cnt2 = ''; while ($DATA = SQL_FETCHARRAY($result_bonus)) { - // Compile URL - $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,20 +85,20 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { // Now, if we are good little boys and girls Santa left us some user-ids. // We can now send mails to them... - foreach ($RECEIVERS as $key => $uid) { + foreach ($RECEIVERS as $key => $userid) { // Load personal data - //* DEBUG: */ OUTPUT_HTML("*L:".__LINE__.'/'.$uid."*<br />"); - $result_user = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `userid`=%s LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); + //* DEBUG: */ outputHtml("*L:".__LINE__.'/'.$userid."*<br />"); + $result_user = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); // Is his data available? if (SQL_NUMROWS($result_user) == 1) { // The final receiver does exists so we can continue... - list($sname, $fname, $email) = SQL_FETCHROW($result_user); - //* DEBUG: */ OUTPUT_HTML("OK!/L:".__LINE__."<br />"); + list($surname, $family, $email) = SQL_FETCHROW($result_user); + //* DEBUG: */ outputHtml("OK!/L:".__LINE__."<br />"); // Mark this user as "spammed" ;-) And place a line for him... - if (removeReceiver($dummy, $key, $uid, $DATA['id'], $DATA['id'], true) == 'done') { + if (removeReceiver($dummy, $key, $userid, $DATA['id'], $DATA['id'], true) == 'done') { // Replace text variables foreach ($GLOBALS['replacer'] as $key => $value) { if (isset($DATA[$key])) $DATA['text'] = str_replace($value, $DATA[$key], $DATA['text']); @@ -119,7 +115,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { ); // Prepare the mail - $mailText = LOAD_EMAIL_TEMPLATE('bonus-mail', $content, $uid); + $mailText = loadEmailTemplate('bonus-mail', $content, $userid); // Send mail away if (isset($DATA['html_msg'])) { @@ -133,16 +129,16 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { // Count one up and remove entry from dummy array $GLOBALS['pool_cnt']++; unset($dummy[$key]); - if (GET_EXT_VERSION('user') >= '0.1.4') { + if (getExtensionVersion('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", - array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET emails_received=emails_received+1 WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); } // END - if // Do we have send maximum mails? if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) { // Yes, we have - //* DEBUG: */ OUTPUT_HTML("*EXIT/L:".__LINE__."<br />"); + //* DEBUG: */ outputHtml("*EXIT/L:".__LINE__."<br />"); break; } // END - if } // END - if @@ -153,35 +149,35 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { } // Update mediadata if version is 0.0.4 or higher - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update entry (or add missing $P = $GLOBALS['pool_cnt']; if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2; - //* DEBUG: */ OUTPUT_HTML("+MEDIA/L:".__LINE__.'/'.$P."+<br />"); - MEDIA_UPDATE_ENTRY(array("total_send", "bonus_send"), 'add', $P); + //* DEBUG: */ outputHtml("+MEDIA/L:".__LINE__.'/'.$P."+<br />"); + updateMediadataEntry(array("total_send", "bonus_send"), 'add', $P); } // END - if // Close sending system - //* DEBUG: */ OUTPUT_HTML("-L:".__LINE__.'/'.countSelection($dummy)."-<br />"); + //* DEBUG: */ outputHtml("-L:".__LINE__.'/'.countSelection($dummy)."-<br />"); if (countSelection($dummy) == 0) { // Queue reached! - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1", + 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: */ OUTPUT_HTML("*L:".__LINE__."*<br />"); + //* DEBUG: */ outputHtml("*L:".__LINE__."*<br />"); // Update mediadata if version is 0.0.4 or higher - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update entry (or add missing) - //* DEBUG: */ OUTPUT_HTML("*MEDIA/L:".__LINE__."*<br />"); - MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), 'add', 1); + //* DEBUG: */ outputHtml("*MEDIA/L:".__LINE__."*<br />"); + updateMediadataEntry(array("total_orders", "bonus_orders"), 'add', 1); } // 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(countSelection($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__); - //* DEBUG: */ OUTPUT_HTML("*L:".__LINE__."<pre>"); - //* DEBUG: */ OUTPUT_HTML(print_r($dummy, true)); - //* DEBUG: */ OUTPUT_HTML("</pre>\n!!!<br />"); + //* DEBUG: */ outputHtml("*L:".__LINE__."<pre>"); + //* DEBUG: */ outputHtml(print_r($dummy, true)); + //* DEBUG: */ outputHtml("</pre>\n!!!<br />"); break; } } diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 80fc955451..29e87ddafd 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,53 +38,50 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Don't run on daily reset if (isResetModeEnabled()) { // Skip here return false; -} elseif (!EXT_IS_ACTIVE('user')) { +} elseif (!isExtensionActive('user')) { // Abort here if extension user is not active return false; } // Need this here // Check for freed mail orders to send out -if (EXT_IS_ACTIVE('html_mail')) { +if (isExtensionActive('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 $cnt2 = 0; $lastSentId = 0; $cnt_back = array('0'); $pointsBack = array('0'); if (SQL_NUMROWS($result_main) > 0) { // Parse all mails - while ($DATA = SQL_FETCHROW($result_main)) { + while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) { // 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", - array($DATA[0]), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='ACTIVE' WHERE `id`=%s AND `data_type`='NEW' LIMIT 1", + array($DATA['id']), __FILE__, __LINE__); // Check fetched data for HTML - $HTML = $DATA[10]; if ($HTML == $DATA[0]) $HTML = 'N'; - - // Compile URL and subject line - $DATA[7] = COMPILE_CODE($DATA[7]); + $HTML = 'N'; + if (isset($DATA['html_msg'])) $HTML = $DATA['html_msg']; // Entry updated? if (SQL_AFFECTEDROWS() == 1) { // "Explode" all receivers into an array - if (ereg(';', $DATA[4])) { + if (ereg(';', $DATA['receivers'])) { // There's more than one receiver in the list... - $RECEIVERS = explode(';', $DATA[4]); - } elseif (!empty($DATA[4])) { + $RECEIVERS = explode(';', $DATA['receivers']); + } elseif (!empty($DATA['receivers'])) { // Only one user left - $RECEIVERS = array($DATA[4]); + $RECEIVERS = array($DATA['receivers']); } else { // No users left $RECEIVERS = array('0'); @@ -93,129 +90,129 @@ if (SQL_NUMROWS($result_main) > 0) { // Now, if we are good little boys and girls Santa left us some user-ids. // We can now send mails to them... - foreach ($RECEIVERS as $key => $uid) { + foreach ($RECEIVERS as $key => $userid) { // Lookup user ID - $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__); + $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); // Is his data available? - //* DEBUG: */ OUTPUT_HTML("*L:".__LINE__.'/'.SQL_NUMROWS($result_user)."*<br />"); + //* DEBUG: */ outputHtml("*L:".__LINE__.'/'.SQL_NUMROWS($result_user)."*<br />"); if (SQL_NUMROWS($result_user) == 1) { // The final receiver does exists so we can continue... - list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user); + list($gender, $surname, $family, $email) = SQL_FETCHROW($result_user); // Free memory 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", - array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__); + $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['id'], $DATA['sender'], $DATA['timestamp']), __FILE__, __LINE__); // If there's no stats entry add it! - //* DEBUG: */ OUTPUT_HTML("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />"); + //* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />"); if (SQL_NUMROWS($result_stats) == 0) { // No entry was found, so we add him! - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())", - array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())", + array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__); // 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", - array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__); + $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['id']), bigintval($DATA['sender']), bigintval($DATA['timestamp'])), __FILE__, __LINE__); } // END - if - //* DEBUG: */ OUTPUT_HTML("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />"); + //* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />"); if (SQL_NUMROWS($result_stats) == 1) { // We got one! list($stats_id) = SQL_FETCHROW($result_stats); // Mark this user as "spammed" ;-) And place a line for him... - //* DEBUG: */ OUTPUT_HTML("?L:".__LINE__.'/'.$dummy.'/'.$key.'/'.$uid.'('.$DATA[1].")/".$DATA[0].'/'.$stats_id."?<br />"); - switch (removeReceiver($dummy, $key, bigintval($uid), bigintval($DATA[0]), bigintval($stats_id))) { + //* DEBUG: */ outputHtml("?L:".__LINE__.'/'.$dummy.'/'.$key.'/'.$userid.'('.['sender'].")/".$DATA['id'].'/'.$stats_id."?<br />"); + switch (removeReceiver($dummy, $key, bigintval($userid), bigintval($DATA['id']), bigintval($stats_id))) { case 'done': // Prepare the mail - $DATA[11] = bigintval($stats_id); - $DATA[12] = $sname; - $DATA[13] = $fname; - $DATA[14] = translateGender($gender); + $DATA['stats_id'] = bigintval($stats_id); + $DATA['surname'] = $surname; + $DATA['family'] = $family; + $DATA['gender'] = translateGender($gender); // Replace text variables foreach ($GLOBALS['replacer'] as $key => $value) { - if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]); + if (isset($DATA[$key])) $DATA['text'] = str_replace($value, $DATA[$key], $DATA['text']); } // END - if // Prepare content $content = array( - 'id' => $DATA[11], - 'url' => $DATA[7], - 'sender_uid' => $DATA[1], - 'category' => getCategory($DATA[9]), - 'time' => createFancyTime(getPaymentPoints($DATA[5], "time")), - 'points' => translateComma(getPaymentPoints($DATA[5], "payment")), - 'text' => $DATA[3] + 'id' => $DATA['stats_id'], + 'url' => $DATA['url'], + 'sender_userid' => $DATA['sender'], + 'category' => getCategory($DATA['cat_id']), + 'time' => createFancyTime(getPaymentPoints($DATA['payment_id'], 'time')), + 'points' => translateComma(getPaymentPoints($DATA['payment_id'], 'payment')), + 'text' => $DATA['text'] ); // Load message template - $mailText = LOAD_EMAIL_TEMPLATE("normal-mail", $content, bigintval($uid)); + $mailText = loadEmailTemplate('normal-mail', $content, bigintval($userid)); // Send mail away - sendEmail($email, $DATA[2], $mailText, $HTML); + sendEmail($email, $DATA['subject'], $mailText, $HTML); // Count sent mails... - 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__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET emails_sent=emails_sent+1 WHERE `userid`=%s LIMIT 1", + array(bigintval($DATA['sender'])), __FILE__, __LINE__); - if (GET_EXT_VERSION('user') >= '0.1.4') { + if (getExtensionVersion('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", - array(bigintval($uid)), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET emails_received=emails_received+1 WHERE `userid`=%s LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); } // END - if // Update mediadata if version is 0.0.4 or higher - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update entry (or add missing) - //* DEBUG: */ OUTPUT_HTML("*MEDIA/L:".__LINE__."*<br />"); - MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1); + //* DEBUG: */ outputHtml("*MEDIA/L:".__LINE__."*<br />"); + updateMediadataEntry(array('total_send', 'normal_send'), 'add', 1); } // END - if // And count up the mail $GLOBALS['pool_cnt']++; - //* DEBUG: */ OUTPUT_HTML("*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />"); + //* DEBUG: */ outputHtml("*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />"); break; case 'already': // Entry already found, but we still count one up! $GLOBALS['pool_cnt']++; - //* DEBUG: */ OUTPUT_HTML("*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />"); + //* DEBUG: */ outputHtml("*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />"); break; } } // Do we have reached the maximum to send mails? || (getConfig('max_send') >= $GLOBALS['pool_cnt']) - //* DEBUG: */ OUTPUT_HTML("*L:".__LINE__.'/'.$GLOBALS['pool_cnt'].">=".$DATA[8].'/'.getConfig('max_send').">=".$GLOBALS['pool_cnt'].'/'.$lastSentId."!=".$DATA[0]."*<br />"); - if ((($GLOBALS['pool_cnt'] >= $DATA[8])) && ($lastSentId != $DATA[0])) { + //* DEBUG: */ outputHtml("*L:".__LINE__.'/'.$GLOBALS['pool_cnt'].">=".$DATA['target_send'].'/'.getConfig('max_send').">=".$GLOBALS['pool_cnt'].'/'.$lastSentId."!=".$DATA['id']."*<br />"); + if ((($GLOBALS['pool_cnt'] >= $DATA['target_send'])) && ($lastSentId != $DATA['id'])) { // Prepare content $content = array( - 'sender_uid' => $DATA[1], - 'category' => getCategory($DATA[9]), - 'text' => $DATA[3], - 'url' => $DATA[7], - 'expiration' => createFancyTime(getPaymentPoints($DATA[5], "time")) + 'sender_userid' => $DATA['sender'], + 'category' => getCategory($DATA['cat_id']), + 'text' => $DATA['text'], + 'url' => $DATA['url'], + 'expiration' => createFancyTime(getPaymentPoints($DATA['payment_id'], "time")) ); // Yes we do, so we notify admin and sender about fully sent mail! - sendAdminNotification(getMessage('ADMIN_SUBJ_SEND_DONE'), 'done-admin', $content, $uid); + sendAdminNotification(getMessage('ADMIN_SUBJ_SEND_DONE'), 'done-admin', $content, $userid); // Get sender's data - $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__); + $result_sender = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array(bigintval($DATA['sender'])), __FILE__, __LINE__); // Is the sender found? if (SQL_NUMROWS($result_sender) == 1) { // Load data and prepare mail - list($sname, $fname, $email) = SQL_FETCHROW($result_sender); + list($surname, $family, $email) = SQL_FETCHROW($result_sender); // Load email template - $mailText = LOAD_EMAIL_TEMPLATE('done-member', $content, $DATA[1]); + $mailText = loadEmailTemplate('done-member', $content, $DATA['sender']); // Send it also waway sendEmail($email, MEMBER_SUBJ_SEND_DONE, $mailText); @@ -225,35 +222,35 @@ 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", - array(bigintval($DATA[0])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1", + array(bigintval($DATA['id'])), __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", - array(bigintval($DATA[0])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1", + array(bigintval($DATA['id'])), __FILE__, __LINE__); - $lastSentId = $DATA[0]; $GLOBALS['pool_cnt'] = 0; + $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = 0; $cnt2 += $GLOBALS['pool_cnt']; // Update mediadata if version is 0.0.4 or higher - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update entry (or add missing) - //* DEBUG: */ OUTPUT_HTML("*MEDIA/L:".__LINE__."*<br />"); - MEDIA_UPDATE_ENTRY(array("total_orders", "normal_orders"), 'add', 1); + //* DEBUG: */ outputHtml("*MEDIA/L:".__LINE__."*<br />"); + updateMediadataEntry(array('total_orders', 'normal_orders'), 'add', 1); } // END - if - //* DEBUG: */ OUTPUT_HTML("*EXIT/L:".__LINE__.'/'.$P."<br />"); + //* DEBUG: */ outputHtml("*EXIT/L:".__LINE__.'/'.$P."<br />"); break; } // Do we have send maximum mails? elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) { // 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", - array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__); + if ($GLOBALS['pool_cnt'] <= $DATA['target_send']) $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", + array(implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__); - //* DEBUG: */ OUTPUT_HTML("*EXIT/L:".__LINE__."*<br />"); + //* DEBUG: */ outputHtml("*EXIT/L:".__LINE__."*<br />"); break; } @@ -261,31 +258,31 @@ if (SQL_NUMROWS($result_main) > 0) { SQL_FREERESULT($result_stats); } else { // User does not exists so we have add the sender's points back to sender's account - if (($RECEIVERS[0] == '0') || (empty($RECEIVERS[0]))) { + if (($RECEIVERS['id'] == '0') || (empty($RECEIVERS['id']))) { // List was empty - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1", - array(bigintval($DATA[0])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1", + array(bigintval($DATA['id'])), __FILE__, __LINE__); } else { // Is the userid set? - if ($uid > 0) { + if ($userid > 0) { // User does not exists, pay points back - $points = getPaymentPoints($DATA[5]); - ADD_POINTS_REFSYSTEM_DIRECT('pool_payback', $DATA[1], $points); + $points = getPaymentPoints($DATA['payment_id']); + addPointsDirectly('pool_payback', $DATA['sender'], $points); // Add points together and remove user - $pointsBack[$DATA[1]] += $points; + $pointsBack[$DATA['sender']] += $points; } // END - if // Count up - $cnt_back[$DATA[1]]++; + $cnt_back[$DATA['sender']]++; } // Remove entry from list unset($dummy[$key]); // Update receivers - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET receivers='%s' WHERE `id`=%s LIMIT 1", - array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `receivers`='%s' WHERE `id`=%s LIMIT 1", + array(implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__); } } } @@ -294,36 +291,38 @@ if (SQL_NUMROWS($result_main) > 0) { // Do we have points to "pay back"? if ((count($pointsBack) > 0) && (!empty($pointsBack[0]))) { // Walk through all points - foreach ($pointsBack as $uid => $PB) { + foreach ($pointsBack as $userid => $PB) { // Add points only when we have points left to add and a valid user ID - if (($PB > 0) && ($uid > 0)) { + if (($PB > 0) && ($userid > 0)) { // Prepare content $content = array( - 'points' => translateComma($DATA[10]) + 'points' => translateComma($PB) ); // 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", - array(bigintval($uid)), __FILE__, __LINE__); - $DATA[10] = $PB; $DATA[11] = $cnt_back[$uid]; + $result = SQL_QUERY_ESC("SELECT `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array(bigintval($userid)), __FILE__, __LINE__); // User found? if (SQL_NUMROWS($result) == 1) { + // Get email list($email) = SQL_FETCHROW($result); - SQL_FREERESULT($result); // User account does exists, so we can safely pay back! - $mailText = LOAD_EMAIL_TEMPLATE("back-member", $content, bigintval($uid)); + $mailText = loadEmailTemplate('back-member', $content, bigintval($userid)); // Send mail out to member - sendEmail($email, getMessage('MEMBER_BACK_JACKPOT')." (".$uid.')', $mailText); - } else { + sendEmail($email, getMessage('MEMBER_BACK_JACKPOT') . ' (' . $userid . ')', $mailText); + } elseif (isExtensionActive('jackpot')) { // Add to jackpot - ADD_JACKPOT($PB); + addPointsToJackpot($PB); // Send mail out to admin - sendAdminNotification(getMessage('ADMIN_BACK_JACKPOT')." (".$uid.')', "back-admin", $content, 'admin'); + sendAdminNotification(getMessage('ADMIN_BACK_JACKPOT') . ' (' . $userid . ')', 'back-admin', $content, 'admin'); } + + // Free result + SQL_FREERESULT($result); } // END - if } // END - foreach } // END - if diff --git a/inc/profile-updte.php b/inc/profile-updte.php index 6920842fd5..f551ef47b7 100644 --- a/inc/profile-updte.php +++ b/inc/profile-updte.php @@ -1,93 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 02/29/2004 * - * =============== Last change: 04/12/2004 * - * * - * -------------------------------------------------------------------- * - * File : profile-updte.php * - * -------------------------------------------------------------------- * - * Short description : Sends out notifications to keep profiles updated * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Sendet Erinnerngen aus, damit die Profile * - * von den Mitgliedern aktuell gehalten werden * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -if ((getConfig('send_prof_update') == 'Y') && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) { - // Load personal data - $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `last_update`, `joined` -FROM - `{!_MYSQL_PREFIX!}_user_data` -WHERE - (`last_update` < (UNIX_TIMESTAMP() - %s) AND `last_update` != 0 AND `last_profile_sent` < (UNIX_TIMESTAMP() - %s)) -OR - (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - %s)) -ORDER BY - `userid` ASC", - array( - getConfig('profile_update'), - getConfig('resend_profile_update'), - getConfig('profile_update') - ), __FILE__, __LINE__); - - // Do we have some notifications to sent? - if (SQL_NUMROWS($result) > 0) { - // We need to send-out notifications... - while ($content = SQL_FETCHARRAY($result)) { - // Translate timestamp - $content['joined'] = generateDateTime($content['joined'], '0'); - - if (round($content['last_update']) == '0') { - // Has never changed his accont - $content['last_update'] = getMessage('PROFILE_NEVER_CHANGED'); - } else { - // Has changed his account - $content['last_update'] = generateDateTime($content['last_update'], '0'); - } - - // Load email template and send mail away - $message = LOAD_EMAIL_TEMPLATE('profile-updte', '', bigintval($content['userid'])); - sendEmail($content['email'], getMessage('PROFILE_OUTDATED'), $message); - - // Update profile data - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_profile_sent`=UNIX_TIMESTAMP(), `notified`='Y' WHERE `userid`=%s LIMIT 1", - array(bigintval($content['userid'])), __FILE__, __LINE__); - } // END - while - } // END - if - - // Free result - SQL_FREERESULT($result); -} - -// +// @DEPRECATED ?> diff --git a/inc/rdf.class.php b/inc/rdf.class.php index 33d82dbc67..f551ef47b7 100644 --- a/inc/rdf.class.php +++ b/inc/rdf.class.php @@ -1,1383 +1,3 @@ <?php -/* $Id$ */ - -// -// +----------------------------------------------------------------------+ -// | rss Parser | -// | Copyright (c) 2001 Stefan Saasen | -// +----------------------------------------------------------------------+ -// | The contents of this file are subject to the Mozilla Public License | -// | Version 1.1 (the "License"); you may not use this file except in | -// | compliance with the License. You may obtain a copy of the License at | -// | http://www.mozilla.org/MPL/ | -// | | -// | Software distributed under the License is distributed on an "AS IS" | -// | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | -// | the License for the specific language governing rights and | -// | limitations under the License. | -// +----------------------------------------------------------------------+ -// | | -// | Maintainer and initial developer: | -// | Stefan Saasen <s@fase4.com> | -// | | -// | Proxy and authentication methods added by: | -// | Marco Kraus <marco.kraus@siemens.com> | -// | | -// | Decoding of data by htmlentities or utf8_decode added by: | -// | Roland Haeder <webmaster@mxchange.org> | -// | | -// +----------------------------------------------------------------------+ -// | Ref: | -// | @link http://www.fase4.com/rdf/ Latest release | -// +----------------------------------------------------------------------+ - -/** - * Class RSS Parser - * - * This class offers methods to parse RSS Files - * - * @link http://www.fase4.com/rdf/ Latest release of this class - * @package rss - * @copyright Copyright (c) 2001 fase4.com. All rights reserved. - * @author Stefan Saasen <s@fase4.com> - * @author Roland Haeder <webmaster@mxchange.org> - * @version 1.7 ($Date$Revision: 856 $ - * @access public - */ - -class fase4_rdf { - - /** - * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br! - * - * @access private - * @var integer - */ - var $_word_wrap = 0; - - /** - * Wether to recode \n -> <br /> or not in description - * - * @access private - * @var boolean - */ - var $_use_nl2br = true; - - /** - * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!) - * - * "htmlentities" - Use the function htmlentities() - * "utf8_decode" - Use the function ut8_decode() when you have UTF8 encoded text - * - * @access private - * @var string - */ - var $_decoding_mode = "utf8_decode"; - - /** - * If $_link_target is set a target='xxx' attribute in each <a /> and <form /> html tag will be added - * - * Possible values are "_blank", "_content", "_parent", "_self", "_top" - * - * @access private - * @var string - */ - var $_link_target = "_blank"; - - /** - * vars for proxy settings - Prox Host - * - * @access private - * @var string - */ - var $_phost = ""; - - /** - * vars for proxy settings - Prox Port - * - * @access private - * @var string - */ - var $_pport = ""; - - /** - * vars for proxy settings - Prox Username - * - * @access private - * @var string - */ - var $_pname = ""; - - /** - * vars for proxy settings - Prox Password - * - * @access private - * @var string - */ - var $_ppasswd = ""; - - /** - * just a flag for checking if proxy-support should be enabled - * set default to false (will be enabled if set_proxy is called) - * - * @access private - * @see set_proxy() - * @var bool - */ - var $_use_proxy = false; - - /** - * just a flag for checking if proxy-support with authentication - * should be enabled - * set default to false (will be enabled if set_proxy is called) - * - * @access private - * @see set_proxy() - * @var boolean - */ - var $_use_proxy_auth = false; - - /** - * The time the Files will be cached (in seconds). - * - * @access private - * @var int - */ - var $_refresh = 60; // int - - /** - * The Name of the cached File. - * - * @access private - * @var string - */ - var $_cached_file = ""; // String - - /** - * Indicates whether the cached or the remote file was used. - * - * @access private - * @var boolean - */ - var $_use_cached_file = true; - - /** - * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast' - * - * @access private - * @var string - */ - var $_cache_type = "fast"; - - /** - * The Name of the Remote File. - * - * @access private - * @var string - */ - var $_remote_file = ""; - - /** - * Path to the Cache Directory. - * - * @access private - * @var string - */ - var $_cache_dir = "cache/"; // String - - /** - * Indicates whether the Creating of the Cache Directory needs to be done or not. - * - * @access private - * @var boolean - */ - var $_cache_dir_ok = false; - - /** - * Type of the file to be parsed (RSS or RDF). - * - * The Type depends on the root node - * - * @access private - * @var string - */ - var $_type = "rss"; // string (rss or rdf) - - /** - * Array of Display Settings. - * - * Specific Parameters can be set to hidden. These are: - * image, channel and textinput. If set to "hidden" those elements won't be displayed. - * - * @access private - * @var array - */ - var $_display_opt = array( - 'build' => "", - 'image' => "", - 'channel' => "", - 'textinput' => "", - 'cache_update' => "", - 'sitelink' => "", - 'refid' => "", - 'reflink' => "", - ); - - /** - * Defines the width attribute in the table that holds the rdf/rss representation - * - * @access private - * @var int - * @see see_table_width() - */ - var $_table_width = "100%"; - - /** - * Indicates whether or not to use dynamic Display Settings - * - * @access private - * @var array - */ - var $_use_dynamic_display = false; - - /** - * <item> count - * - * @access private - * @var int - */ - var $_item_count = 0; - - /** - * No of max <item>s - * - * @access private - * @var boolean - */ - var $_max_count = false; - - /** - * Array containing the content of <channel /> - * - * @access private - * @var array - */ - var $_array_channel = array(); - - /** - * Array containing the content of each <item /> - * - * @access private - * @var array - */ - var $_array_item = array(); - - /** - * Array containing the content of <textinput /> - * - * @access private - * @var array - */ - var $_array_textinput = array(); - - /** - * Array containing the content of <image /> - * - * @access private - * @var array - */ - var $_array_image = array(); - - /** - * Array containing the Channel content. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_citem = array(); - - /** - * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_cdepth = array(); - - /** - * Array containing the Channel tags. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_ctags = array( "x" ); - - /** - * Array containing the Channel content. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_item = array(); // Array - - /** - * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_depth = array(); // Array - - /** - * Array containing the tags. Just For internal XML Parser Purposes. - * - * @access private - * @var array - */ - var $_tags = array( "x" ); // Array - - /** - * Garbage collection: probability in percent - * - * @var integer 0 => never - * @access public - */ - var $gc_probability = 1; - - /** - * HTML Output - * - * @var string - * @access private - */ - var $_output = ""; - - /** - * @var string - */ - var $_parse_mode = ""; - - // Output variable - var $out = ""; - - // Salt for hashing - var $salt = ""; - - /** - * Constructor of our Class - * - * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path. - * Additionally the Refresh Time is set to a default Value of 1200s (20 min). - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @see _refresh - */ - function fase4_rdf() - { - // default Value, to be overwritten in set_refresh() - $this->_refresh = (time() - 1200); - $this->_clear_cItems(); - $this->_clear_Items(); - } - - /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @return string Displays RDF Content ( using _display() ) - * @see _remote_file, cache() - */ - function parse_RDF( $rdf ) - { - unset($this->_array_item); - $this->_remote_file = $rdf; - $this->out .= "<!-- http://www.fase4.com/rdf/ -->"; - $this->out .= "<table width=\"".$this->_table_width."\">"; - $this->out .= $this->cache(); - $this->out .= "</table>"; - $this->_output = ""; - $this->_item_count = 0; - return true; - } - - /** - * This Method is called when all parsing is finished to use the garbage collection - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @return string Displays RDF Content ( using _display() ) - * @see _remote_file, cache() - */ - function finish($return = false) - { - if (!$return) { - echo $this->out; - } else { - return $this->out; - } - flush(); - $this->_garbage_collection(); - } - - /** - * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache. - * - * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored. - * In this case you can not modify the display settings. - * processing time: ( 1.4792) --> remote file - * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on. - * processing time: ( 0.0019) --> using 'fast cache' - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @return string Displays RDF Content ( using _display() ) - * @see _remote_file, cache() - */ - function use_dynamic_display( $bool ) - { - $this->_use_dynamic_display = $bool; - return true; - } - - /** - * This Method avtually parses the XML data. - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param string $data RDF File XML Data - * @see _clear_Items() - */ - function _parse_xRDF( $data ) - { - $this->_clear_Items(); - $xml_parser = xml_parser_create(); - xml_set_object($xml_parser,$this); - xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0); - xml_set_element_handler($xml_parser, "_startElement", "_endElement"); - xml_set_character_data_handler($xml_parser, "_parseData"); - if (!xml_parse($xml_parser, trim($data))) { - $this->_throw_exception(sprintf("XML error: %s at line %d", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))."<br /><br />Exception in function parse_RDF()."); - } - xml_parser_free($xml_parser); - } - - - /** - * This Methods allows you to set the Refresh Time - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param int $seconds time files will be cached (in seconds). - * @return boolean - * @see _refresh - */ - function set_refresh( $seconds ) - { - $this->_refresh = (time() - $seconds); - return true; - } - - function set_salt( $saltPara ) - { - $this->salt = $saltPara; - return true; - } - - /** - * This Methods allows you to set the No. of <item>s to display - * - * @access public - * @param int $int No of max <item>s - * @author Stefan Saasen <s@fase4.com> - * @return boolean - * @see _max_count, _endElement() - */ - function set_max_item( $int ) - { - $this->_max_count = $int; - return true; - } - - /** - * This Methods allows you to set the Cache Directory - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $dir Path to Directory. - * @return boolean - * @see _cache_dir - */ - function set_CacheDir( $dir ) - { - if(substr($dir, -1) != "/") { - $dir = $dir."/"; - } - $this->_cache_dir = $dir; - } - - /** - * This Method displays Error Messages and terminates the Execution of the Script - * - * @access private - * @param string $msg Message to display on failure - * @author Stefan Saasen <s@fase4.com> - */ - function _throw_exception( $msg ) - { - $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>"; - return true; - } - - /** - * This Method clears the Array containig the Items. - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @see _item - */ - function _clear_Items( ) { - $this->_item = array( - 'title'=>"", - 'link'=>"", - 'description'=>"", - 'url'=>"", - 'language'=>"", - 'pubDate'=>"", - 'lastBuildDate'=>"", - 'width'=>"", - 'height'=>"" - ); - } - /** - * This Method clears the Array containig the Channel Items. - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @see _item - */ - function _clear_cItems( ) { - $this->_citem = array( - 'title'=>"", - 'link'=>"", - 'description'=>"", - 'url'=>"", - 'language'=>"", - 'copyright'=>"", - 'managingEditor'=>"", - 'webMaster'=>"", - 'pubDate'=>"", - 'lastBuildDate'=>"", - 'category'=>"", - 'generator'=>"", - 'docs'=>"", - 'cloud'=>"", - 'ttl'=>"", - 'image'=>"", - 'textinput'=>"", - 'skipHours'=>"", - 'skipDays' =>"", - 'sitelink'=>"", - 'refid'=>"", - 'reflink'=>"", - ); - } - - /** - * XML Parser Start Element Handler - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param mixed $parser a reference to the XML parser calling the handler. - * @param string $name contains the name of the element for which this handler is called. - * @param string $attrs contains an associative array with the element's attributes (if any). - * @see _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags - */ - function _startElement($parser, $name, $attrs) { - // We have to determine, which type of xml data we have to parse - if($name == "rss") { - $this->_type = "rss"; - } elseif($name == "rdf:RDF" OR $name == "rdf") { - $this->_type = "rdf"; - } - - - if ( $name == "channel" AND $this->_type != "rdf" ) { - $this->_parse_mode = "channel"; - } elseif ( ($name=="item") - ||($name=="image") - ||($name=="textinput") - ||(($name=="channel") && ($this->_type != "rss")) ) { - if($this->_parse_mode=="channel") { - $this->_get_ChannelData( $parser ); - } - $this->_parse_mode = "all"; - } - - if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) { - $this->_depth[$this->get_parser_id($parser)] = 0; - } - $this->_depth[$this->get_parser_id($parser)]++; - array_push($this->_tags, $name); - - if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) { - $this->_cdepth[$this->get_parser_id($parser)] = 0; - } - $this->_cdepth[$this->get_parser_id($parser)]++; - array_push($this->_ctags, $name); - } // END _startElement() - - /** - * Retrives the Channel Data in <rss> File - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param mixed $parser a reference to the XML parser calling the handler. - * @see _output, _display_opt, _citem - */ - function _get_ChannelData( $parser ) - { - $this->_citem["link"] = trim($this->_citem["link"]); - if (($this->_display_opt["sitelink"] == $this->_citem["link"]) && (!empty($this->_display_opt["reflink"])) && (!empty($this->_display_opt["refid"]))) - { - $this->_citem["link"] .= $this->_display_opt["reflink"].$this->_display_opt["refid"]; - } - - if( empty($this->_display_opt["channel"]) OR - $this->_display_opt["channel"] != "hidden") { - $this->_output .= "<tr><td>\n"; - $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n"; - $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem["title"])."</div></td></tr>\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem["description"], "<a>, <img>")."</td></tr>\n"; - $this->_output .= "<tr><td> </td></tr>\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; - if(isset($this->_display_opt["build"]) && $this->_display_opt["build"] != "hidden") { - if($this->_citem["lastBuildDate"]){$this->_output .= "build: ". $this->_citem["lastBuildDate"]."<br />";} - } - if(isset($this->_display_opt["cache_update"]) && $this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) { - $this->_output .= "cache update: ".$_update."<br />\n"; - } - $this->_output .= "<a href=\"".$this->_citem["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= ">".$this->_cut_string($this->_citem["link"])."</a>"; - $this->_output .= "</td></tr>\n"; - $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n"; - $this->_output .= "</table></td></tr>"; - } - $this->_array_channel = array( "title"=>$this->_citem["title"], - "link"=>$this->_citem["link"], - "description"=>$this->_citem["description"], - "lastBuildDate"=>$this->_citem["lastBuildDate"]); - } - - /** - * XML Parser End Element Handler - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param mixed $parser a reference to the XML parser calling the handler. - * @param string $name contains the name of the element for which this handler is called. - * @see _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt - */ - function _endElement($parser, $name) { - array_pop($this->_tags); - $this->_depth[$this->get_parser_id($parser)]--; - array_pop($this->_ctags); - $this->_cdepth[$this->get_parser_id($parser)]--; - $this->_item["link"] = trim($this->_item["link"]); - if ((!empty($this->_display_opt["refid"])) && (!empty($this->_item["link"]))) - { - if (!ereg("refid=", $this->_item["link"])) $this->_item["link"] .= "?refid=" . $this->_display_opt["refid"]; - } - switch ($name) { - case "item": - if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) { - if($this->_item["title"] != $this->_item["description"] - AND $this->_item["description"]) { - - // word-wrapping added by Roland Haeder <webmaster@mxchange.org> - if (($this->_word_wrap > 0) && (strlen($this->_item["description"]) > $this->_word_wrap)) - { - // Switch off _use_nl2br - $this->_use_nl2br = false; - // First remove all \n - $this->_item["description"] = str_replace("\n", ' ', $this->_item["description"]); - // Wrap with <br />\n - $this->_item["description"] = wordwrap($this->_item["description"], $this->_word_wrap, "*<br>\n"); - } - elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br)) - { - // Strip tags out instead when word-wrap is disabled - $this->_item["description"] = strip_tags($this->_item["description"], "<a>, <img>"); - } - - // nl2br added by Roland Haeder <webmaster@mxchange.org> - if ($this->_use_nl2br) $this->_item["description"] = nl2br($this->_item["description"]); - - $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= ">".strip_tags($this->_item["title"], "<a>, <img>")."</a> (".$this->_item["pubDate"].")</div></td></tr>\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item["description"]."</td></tr>\n"; - // we just display the <hr> if there is a description - $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n"; - } else { - $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; - $this->_output .= "<a href=\"".$this->_item["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n"; - } - $this->_array_item[] = array( "title"=>$this->_item["title"], - "link"=>$this->_item["link"], - "description"=>$this->_item["description"]); - ++$this->_item_count; - } - $this->_clear_Items(); - break; - case "image": - if(isset($this->_display_opt["image"]) && ($this->_display_opt["image"] != "hidden") && $this->_item["url"]) { - $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; - $this->_output .= "<a href=\"".$this->_item["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= "><img src=\"".$this->_item["url"]."\""; - if(isset($this->_item["width"]) && isset($this->_item["height"])) { - $this->_output .= " width=\"".$this->_item["width"]."\" height=\"".$this->_item["height"]."\""; - } - $this->_output .= " alt=\"".$this->_item["title"]."\" border=\"0\" /></a></td></tr>\n"; - - $this->_array_image[] = array( "url"=>$this->_item["url"], - "link"=>$this->_item["link"], - "width"=>$this->_item["width"], - "height"=>$this->_item["height"]); - $this->_clear_Items(); - } elseif( isset($this->_display_opt["image"] ) && ($this->_display_opt["image"] == "hidden") ) { - $this->_clear_Items(); - } - - break; - case "channel": - if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') { - $this->_output .= "<tr><td>\n"; - $this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item["description"], "<a>, <img>")."</td></tr>\n"; - $this->_output .= "<tr><td> </td></tr>\n"; - $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; - if($this->_display_opt["build"] != "hidden") { - if($this->_item["lastBuildDate"]){$this->_output .= "build: ". $this->_item["lastBuildDate"]."<br />";} - } - if($this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) { - $this->_output .= "cache update: ".$_update."<br />\n"; - } - $this->_output .= "<a href=\"".$this->_item["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= ">".$this->_cut_string($this->_item["link"])."</a>\n"; - $this->_output .= "</td></tr>\n"; - $this->_output .= "</table></td></tr>\n"; - } - $this->_array_channel = array( "title"=>$this->_item["title"], - "link"=>$this->_item["link"], - "description"=>$this->_item["description"], - "lastBuildDate"=>$this->_item["lastBuildDate"]); - $this->_clear_Items(); - $this->_clear_cItems(); - break; - case "textinput": - if(isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] != "hidden") && $this->_item["name"] && $this->_item["link"]) { - $this->_output .= "<tr><td class=\"fase4_rdf\">\n"; - $this->_output .= "<form action=\"".$this->_item["link"]."\" "; - if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; } - $this->_output .= "method=\"get\">\n"; - $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item["title"]."</div>"; - $this->_output .= strip_tags($this->_item["description"], "<a>, <img>")."<br><br>\n"; - $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item["name"]."\"> \n"; - $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">"; - $this->_output .= "</form>\n"; - $this->_output .= "</td></tr>\n"; - $this->_array_textinput = array( "title"=>$this->_item["title"], - "name"=>$this->_item["name"], - "link"=>$this->_item["link"], - "description"=>$this->_item["description"]); - $this->_clear_Items(); - } elseif( isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] == "hidden") ) { - $this->_clear_Items(); - } - - break; - } - } - - /** - * This Method returns the data from the <channel /> paragraph. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array - * @see _array_channel - */ - function get_array_channel( ) - { - return $this->_array_channel; - } - - /** - * This Method returns the data from each <item /> paragraph. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array - * @see _array_item - */ - function get_array_item( ) - { - return $this->_array_item; - } - - /** - * This Method returns the data from <textinput />. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array - * @see _array_textinput - */ - function get_array_textinput( ) - { - return $this->_array_textinput; - } - - /** - * Getter for parser id from resource - * - * @access private - * @author Roland Haeder <webmaster@mxchange.org> - * @return int - */ - function get_parser_id ($parser) { - // Default is zero - $id = 0; - - // Is it a resource? - if (is_resource($parser)) { - // Cast the resource into id - $id = (int) $parser; - } // END - if - - // Return the id - return $id; - } - - /** - * This Method returns the data from <image />. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array - * @see _array_image - */ - function get_array_image( ) - { - return $this->_array_image; - } - - /** - * XML Parser Data Handler - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param mixed $parser a reference to the XML parser calling the handler. - * @param string $text contains the character data as a string. - * @see _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth - */ - function _parseData($parser, $text) - { - // Deocing mode added by Roland Haeder <webmaster@mxchange.org> - switch ($this->_decoding_mode) - { - case "utf8_decode": - $text = utf8_decode($text); - break; - - case "htmlentities": - $text = htmlentities($text); - break; - } - - $clean = preg_replace("/\s/", "", $text); - if ($clean) { - $text = preg_replace("/^\s+/", "", $text)."\n"; - if($this->_parse_mode == "all") { - if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) && - $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) { - $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text; - } else { - $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text; - } - } elseif (isset($this->_parse_mode) && $this->_parse_mode == "channel") { - if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) { - $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text; - } else { - $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text; - } - } - } - } - - /** - * This Method allows you to choose if specific Parameters are displayed or not. These are: - * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param array $options - * @see _display_opt - */ - function set_Options( $options = "" ) - { - if(is_array( $options )) { - $this->_display_opt = $options; - return true; - } else { - unset($this->_display_opt); - return false; - } - } - - /** - * This Method allows you to define the width of the table that holds the representation of the rdf/rss file. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param int $width attribute width in tag <table> - * @see _table_width - */ - function set_table_width( $width = 400 ) - { - $this->_table_width = $width; - return true; - } - - /** - * This Method returns an assocative Array with available Options. - * - * The Keys are the Name of the Options to be set. - * The Values are short Description of available Options. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array $options - * @see _display_opt - */ - function get_Options() - { - $options = array( "image"=>"If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.", - "channel"=>"If 'channel' is set to \"hidden\" the Channel Meta Data (i.e the Title and the short description regarding the RDF Publisher will not be displayed", - "textinput"=>"If set to \"hidden\" no Input Form will be displayed", - "build"=>"If set to \"hidden\" the Build Date (if provided) of the RDF File will not be displayed", - "cache_update"=>"If set to \"hidden\" the Update Date/Time of the cached Rdf File will not be displayed"); - return $options; - } - - /** - * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @return string XML Presentation of parsed RDF File - * @see _cached_file, _remote_file, _cache_dir, _refresh, _update_cache() - */ - function cache() - { - // checks if the cache directory already exists - // if not, the cache directory will be created - if(!$this->_cache_dir_ok) { - $this->_create_cache_dir(); - } - if($this->_use_dynamic_display == true) { - $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file) . '.cache'; - $this->_cache_type = "normal"; - } else { - $this->_cached_file = md5($this->salt.$this->_remote_file) . '.cache'; - $this->_cache_type = "fast"; - } - - $_cache_f = $this->_cache_dir.$this->_cached_file; - - if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) { - // We have to parse the remote file - $this->_use_cached_file = false; - // --> we want to provide proper Information for Use in - // get_cache_update_time() - clearstatcache(); - if($this->_use_dynamic_display == true) { - $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy - if(!$_rdf) { - $this->_throw_exception( $this->_remote_file." is not available" ); - } - $this->_parse_xRDF( $_rdf ); - $this->_update_cache( $_rdf ); - $data = $this->_output; - } else { - $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy - if(!$_rdf) { - $this->_throw_exception( $this->_remote_file." is not available" ); - } - $this->_parse_xRDF( $_rdf ); - $this->_update_cache( $this->_output ); - $data = $this->_output; - } - } else { - // we can use the cached file - $this->_use_cached_file = true; - if($this->_use_dynamic_display == true) { - $this->_parse_xRDF( implode(" ", file($_cache_f)) ); - $data = $this->_output; - } else { - $data = @implode(" ", file($_cache_f)); - } - } - return trim($data); - } // END cache() - - /** - * This Methods creates the Cache Directory if the specified Directory does not exist. - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param string $dir Path to Directory. - * @return boolean - * @see _cache_dir, _cache_dir_ok - */ - function _create_cache_dir() - { - $path = ""; - if(!@is_dir($this->_cache_dir)) { - $arr = explode("/", $this->_cache_dir); - $c = count($arr); - if($arr[0]=="") { - $path = "/"; - } - for($i = 0;$i<$c;$i++) - { - if($arr[$i]!="") { - $path .= $arr[$i]."/"; - if(!@is_dir($path)) { - if(!@mkdir($path, 0777)) { - $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__); - return false; - } - } - } - } - $this->_cache_dir_ok = true; - return true; - } else { - $this->_cache_dir_ok = true; - return true; - } - } // END _create_cache_dir() - - /** - * This Method updates the cached RDF Files and synchronises them with their remote Counterparts. - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @see _cache_dir, _cached_file, _throw_exception() - */ - function _update_cache( $content = "" ) - { - $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' ); - if(!$_local) { - $this->_throw_exception( "Cannot open ".$this->_cached_file."<br /><br />Exception at Line: ".__LINE__ ); - return false; - } - if (fwrite( $_local, $content) === false) { - $this->_throw_exception( "Cannot write to ".$this->_cached_file."<br /<br />Exeception at Line: ".__LINE__); - return false; - } - fclose( $_local ); - @chmod( $this->_cache_dir.$this->_cached_file, 0666); - return true; - } // END _update_cache() - - /** - * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File. - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return string Date/Time of last Update - * @see _cache_dir, _cached_file - */ - function get_cache_update_time() - { - return (file_exists($this->_cache_dir.$this->_cached_file))?date("d.m.Y H:i:s", filemtime($this->_cache_dir.$this->_cached_file)):"Cachemiss"; - } // END get_cache_update_time() - - /** - * This Method returns the Type of Cache that was used ('normal' or 'fast') - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @param string $rdf RDF File (Location) - * @return string Displays RDF Content ( using _display() ) - * @see _remote_file, cache() - */ - function get_CacheType() - { - return $this->_cache_type; - } - - /** - * Returns true if cached file was used, otherwise false - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @return array $options - * @see _use_cached_file - */ - function is_cachedFile() - { - return $this->_use_cached_file; - } - - /** - * This Method deletes all the cached Files. - * - * Please keep in mind to use this method just as a 'manual garbage collection' - * You should cache the rss/rdf files locally to avoid unnecessary traffic. - * (Both for your visitors and the Publisher) - * - * @access public - * @author Stefan Saasen <s@fase4.com> - * @see _cache_dir - */ - function clear_cache() - { - $dir = dir($this->_cache_dir); - while($file=$dir->read()) { - // Exclude directories - if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log") { - if(!@unlink($dir->path.$file)) { - $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ ); - return false; - } // END - if - } // END - if - } // END - while - $dir->close(); - return true; - } // END clear_cache() - - /** - * Cuts the String $string after $str_len and adds "... " - * - * @access private - * @param string $string String to be shortened - * @param int $str_len length of the returned String (overall length including "... ") - * @return string Cut String - */ - function _cut_string( $string, $str_len = "30" ) - { - if(strlen(trim($string))>$str_len) { - $string = substr( trim($string) , 0, $str_len - 4); - $string .= " ..."; - } - return $string; - } // END _cut_string() - - /** - * this Method implements simple Garbage Collection - * - * @access private - * @author Stefan Saasen <s@fase4.com> - * @see _cache_dir, gc_probability, gc_maxlifetime - */ - function _garbage_collection() - { - srand((double) microtime() * 1000000); - if (mt_rand(1, 100) <= $this->gc_probability) { - $dir = dir($this->_cache_dir); - while($file=$dir->read()) { - if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh ) { - @unlink($dir->path.$file); - } // END - if - } - $dir->close(); - } // END if - } - - /* ==== Proxy/Auth methods ==== */ - - /** - * this method sets a proxy server - * - * @access public - * @param string $phost Proxy Host - * @param string $pport Prox Port - * @author Marco Kraus <marco.kraus@siemens.com> - */ - function set_proxy($phost, $pport) - { - $this->_use_proxy = true; - - if ($phost != '') - $this->_phost = $phost; - - if ($pport != '') - $this->_pport = $pport; - } - - /** - * this method sets a proxy server authentification - * - * @access public - * @param string $pname Username - * @param string $ppaswd Password - * @author Marco Kraus <marco.kraus@siemens.com> - */ - function set_proxy_auth( $pname, $ppasswd ) - { - $this->_use_proxy_auth = true; - - if ($pname != '') - $this->_pname = $pname; - - if ($ppasswd != '') - $this->_ppasswd = $ppasswd; - } - - - /** - * gets _remote_file into an array - * - * needed, cause if you use a proxy, you have to open - * a raw-tcp-socket to get the data - * - * @access private - * @author Marco Kraus <Marco.Kraus@siemens.com> - * @return array - * @see _use_proxy, cache() - */ - function _rdf_data() - { - if ( $this->_use_proxy == true ) - { - // we need a raw socket here to connect to proxy - $fp = fsockopen($this->_phost,$this->_pport); - - if (!$fp) { - $this->_throw_exception( $this->_remote_file." is not available with proxy" ); - } else { - if ( $this->_use_proxy_auth == true ) { - fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n"); - } else { - fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n"); - } - } - - - for ( $i = 0; !feof ($fp) ; $i++) - { - $usable_data[$i] = ""; - $usable_data[$i] = fgets($fp,4096); - - // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank - - // strstr did not fit (ask Rasmus why), so we compare each character - if ( ($usable_data[$i][0] == "<" ) && - ($usable_data[$i][1] == "?" ) && - ($usable_data[$i][2] == "x" ) && - ($usable_data[$i][3] == "m" ) && - ($usable_data[$i][4] == "l" ) ) { - $usable_data[0] = $usable_data[$i]; // save current field - $i = 1; // just reset array to start - } - - // there seems to be proxystuff after the <?xml....we delete this - if ( ( - ($usable_data[$i][0] == "<" ) && - ($usable_data[$i][1] == "r" ) && - ($usable_data[$i][2] == "d" ) && - ($usable_data[$i][3] == "f" ) && - ($usable_data[$i][4] == ":" ) - ) - || - ( - ($usable_data[$i][0] == "<" ) && - ($usable_data[$i][1] == "r" ) && - ($usable_data[$i][2] == "s" ) && - ($usable_data[$i][3] == "s" ) - ) - ) { - - $usable_data[1] = $usable_data[$i]; // save current field - $usable_data[2] = "\n"; - $i = 2; // just reset array to start - } - } - - fclose($fp); - return $usable_data; - } else { - if (substr($this->_remote_file, 0, 7) != "http://") { - $this->_throw_exception( "Cannot find http:// in ".$this->_remote_file."!" ); - return ""; - } else { - // Extract host information - $host = substr($this->_remote_file, 7); - // Extract the GET part - $get = "/"; - if (strpos($host, "/") > 0) { - $get = substr($host, strpos($host, "/")); - $host = substr($host, 0, strpos($host, "/")); - } - // Extract port - $port = "80"; - if (strpos($host, ":") > 0) { - $port = substr($host, (strpos($host, ":") + 1)); - $host = substr($host, 0, (strpos($host, ":") - 1)); - } - - // Start connection to server - $fp = fsockopen($host, $port); - if (!$fp) { - $this->_throw_exception( $this->_remote_file." is maybe not available." ); - return ""; - } - // Repare request line - $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host); - // Send request out - fputs($fp, $request); - $reply = ""; $isContent = false; $dummy = ""; - // Read reply - $i=0; - while ( !feof($fp) ) { - $read = trim(fgets($fp, 4096)); - if (substr($read, 0, 5) == "<?xml" || $isContent) { - // Add content - $reply[] = $read; - $isContent = true; - } else { - // Put in dummy - $dummy[] = $read; - } - $i++; - } - if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) { - // Transfer content from dummy - $reply = $content; - } - fclose($fp); - //die(htmlentities($reply)); - return $reply; - } - } - } // END _rdf_data() -} // END class +// @DEPRECATED ?> diff --git a/inc/request-functions.php b/inc/request-functions.php index bf045e11fe..f67df00b8a 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if +// Initialize the request elements +function initRequest () { + $GLOBALS['raw_request']['get'] = $_GET; + $GLOBALS['raw_request']['post'] = $_POST; +} + // Wrapper for elements in $_GET -function REQUEST_GET ($element) { +function getRequestElement ($element) { // By default no element is there $value = null; @@ -51,7 +56,7 @@ function REQUEST_GET ($element) { if (isset($GLOBALS['cache_request']['request_get'][$element])) { // Then use the cache $value = $GLOBALS['cache_request']['request_get'][$element]; - } elseif (REQUEST_ISSET_GET($element)) { + } elseif (isGetRequestElementSet($element)) { // Then get it directly $value = SQL_ESCAPE($GLOBALS['raw_request']['get'][$element]); @@ -64,7 +69,7 @@ function REQUEST_GET ($element) { } // Checks if an element in $_GET exists -function REQUEST_ISSET_GET ($element, $subElement = '') { +function isGetRequestElementSet ($element, $subElement = '') { if (empty($subElement)) { return ((isset($GLOBALS['raw_request']['get'][$element])) && (!empty($GLOBALS['raw_request']['get'][$element]))); } else { @@ -73,22 +78,22 @@ function REQUEST_ISSET_GET ($element, $subElement = '') { } // Removes an element from $_GET -function REQUEST_UNSET_GET ($element) { +function unsetGetRequestElement ($element) { unset($GLOBALS['raw_request']['get'][$element]); } // Getter for whole $_GET array -function REQUEST_GET_ARRAY () { +function getRequestArray () { return $GLOBALS['raw_request']['get']; } // Counts entries in $_GET or returns false if not an array -function REQUEST_GET_COUNT () { +function countRequestGet () { // By default this is not an array $count = false; // Get the array - $GET = REQUEST_GET_ARRAY(); + $GET = getRequestArray(); // Is it an array? if (is_array($GET)) { @@ -100,7 +105,7 @@ function REQUEST_GET_COUNT () { } // Setter for element in $_GET -function REQUEST_SET_GET ($element, $value) { +function setRequestGetElement ($element, $value) { // Escape both $element = SQL_ESCAPE($element); $value = SQL_ESCAPE($value); @@ -113,7 +118,7 @@ function REQUEST_SET_GET ($element, $value) { } // Wrapper for elements in $_POST -function REQUEST_POST ($element, $subElement=null) { +function postRequestElement ($element, $subElement=null) { // By default no element is there $value = null; @@ -121,12 +126,12 @@ function REQUEST_POST ($element, $subElement=null) { if (isset($GLOBALS['cache_request']['request_post'][$element][$subElement])) { // Then use it $value = $GLOBALS['cache_request']['request_post'][$element][$subElement]; - } elseif (REQUEST_ISSET_POST($element)) { + } elseif (isPostRequestElementSet($element)) { // Then use it $value = $GLOBALS['raw_request']['post'][$element]; // Is $subElement set? - if ((!is_null($subElement)) && (REQUEST_ISSET_POST($element, $subElement))) { + if ((!is_null($subElement)) && (isPostRequestElementSet($element, $subElement))) { // Then use this $value = SQL_ESCAPE($value[$subElement]); } elseif (!is_array($value)) { @@ -143,7 +148,7 @@ function REQUEST_POST ($element, $subElement=null) { } // Checks if an element in $_POST exists -function REQUEST_ISSET_POST ($element, $subElement=null) { +function isPostRequestElementSet ($element, $subElement=null) { if (is_null($subElement)) { return ((isset($GLOBALS['raw_request']['post'][$element])) && (!empty($GLOBALS['raw_request']['post'][$element]))); } else { @@ -152,39 +157,39 @@ function REQUEST_ISSET_POST ($element, $subElement=null) { } // Removes an element from $_POST -function REQUEST_UNSET_POST ($element) { +function unsetPostRequestElement ($element) { unset($GLOBALS['raw_request']['post'][$element]); } // Getter for whole $_POST array -function REQUEST_POST_ARRAY () { +function postRequestArray () { return $GLOBALS['raw_request']['post']; } // Setter for whole $_POST array -function REQUEST_SET_POST_ARRAY (array $POST) { - $GLOBALS['raw_request']['post'] = $POST; +function setPostRequestArray (array $postData) { + $GLOBALS['raw_request']['post'] = $postData; } // Counts entries in $_POST or returns false if not an array -function REQUEST_POST_COUNT () { +function countRequestPost () { // By default this is not an array $count = false; // Get the array - $POST = REQUEST_POST_ARRAY(); + $postData = postRequestArray(); // Is it an array? - if (is_array($POST)) { + if (is_array($postData)) { // Then count it - $count = count($POST); + $count = count($postData); } // END - if // Return value } // Setter for element in $_POST -function REQUEST_SET_POST ($element, $value) { +function setRequestPostElement ($element, $value) { // Is $element or $value an array? if (is_array($element)) { // Set array @@ -220,14 +225,23 @@ function REQUEST_SET_POST ($element, $value) { // Checks wether a form was sent. If so, the $_POST['ok'] element must be set function isFormSent () { // Simply wrap it! - return REQUEST_ISSET_POST('ok'); + return isPostRequestElementSet('ok'); } -// Initialize the request elements -function initRequest () { - $GLOBALS['raw_request']['get'] = $_GET; - $GLOBALS['raw_request']['post'] = $_POST; +// Setter for content type +function setContentType ($contentType) { + $GLOBALS['content_type'] = (string) $contentType; +} + +// Getter for content type +function getContentType () { + return $GLOBALS['content_type']; +} + +// Getter for request URI +function getRequestUri () { + return $_SERVER['REQUEST_URI']; } -// +// [EOF] ?> diff --git a/inc/reset/reset_ b/inc/reset/reset_ index b3a9eaad84..25292ee860 100644 --- a/inc/reset/reset_ +++ b/inc/reset/reset_ @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,14 +38,13 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('')) { + die(); +} elseif (!isExtensionActive('')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; -// +// [EOF] ?> diff --git a/inc/reset/reset_100_bonus.php b/inc/reset/reset_100_bonus.php new file mode 100644 index 0000000000..ab6e348bb1 --- /dev/null +++ b/inc/reset/reset_100_bonus.php @@ -0,0 +1,90 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * =============== Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : reset_100_bonus.php * + * -------------------------------------------------------------------- * + * Short description : Check for 100% clickrate order * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Nach Mailbestaetigungen mit 100% Klickrate s. * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('bonus')) { + return; +} + +// Do not execute when script is in CSS mode or no daily reset +if ((getOutputMode() != 0) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); + +// Check for 100% klickrate mails +$result_bonus = SQL_QUERY("SELECT + `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url` +FROM + `{?_MYSQL_PREFIX?}_user_stats` +WHERE + `max_rec`=`clicks` AND `clicks` > 0 AND `bonus_stats_active`='N' +ORDER BY + `userid` ASC", __FILE__, __LINE__); + +if (SQL_NUMROWS($result_bonus) > 0) { + // Remember stats bonus in constant + $content['points'] = translateComma(getConfig('bonus_stats')); + + // We found some mail orders... + while ($content = merge_array($content, SQL_FETCHARRAY($result_bonus))) { + // Add points + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_stats`=`bonus_stats`+{?bonus_stats?} WHERE `userid`=%s LIMIT 1", + array(bigintval($content['userid'])), __FILE__, __LINE__); + + // Translate some data + $content['timestamp'] = generateDateTime($content['timestamp_ordered'], '2'); + + // Load email template and send email + $message = loadEmailTemplate('member_stats_bonus', $content, bigintval($content['userid'])); + sendEmail($content['userid'], getMessage('BONUS_MEMBER_STATS_SUBJECT'), $message); + + // Update database + $result_update = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `bonus_stats_active`='Y' WHERE `id`=%s LIMIT 1", + array(bigintval($content['id'])), __FILE__, __LINE__); + } // END - while + + // Handle bonus points + handleBonusPoints(getConfig('bonus_stats')); +} // END - if + +// Free memory +SQL_FREERESULT($result_bonus); + +// [EOF] +?> diff --git a/inc/reset/reset_autopurge.php b/inc/reset/reset_autopurge.php new file mode 100644 index 0000000000..cdb7959a91 --- /dev/null +++ b/inc/reset/reset_autopurge.php @@ -0,0 +1,60 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/27/2009 * + * =============== Last change: 10/27/2009 * + * * + * -------------------------------------------------------------------- * + * File : reset_autopurge.php * + * -------------------------------------------------------------------- * + * Short description : Automatical purging of outdated mail links * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links * + * -------------------------------------------------------------------- * + * $Revision:: 1004 $ * + * $Date:: 2009-04-03 09:32:14 +0000 (Fri, 03 Apr 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: quix0r $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('autopurge')) { + return; +} + +// Do not execute when script is in CSS mode or no daily reset +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; + +// Init & set the include pool +initIncludePool('autopurge'); +setIncludePool('autopurge', getArrayFromDirectory('inc/autopurge/', 'purge-')); + +// Run the filter +runFilterChain('load_includes', 'autopurge'); + +// Run filters for extra autopurge +runFilterChain('extra_autopurge'); + +// [EOF] +?> diff --git a/inc/reset/reset_beg.php b/inc/reset/reset_beg.php index e14cf05433..dc59885448 100644 --- a/inc/reset/reset_beg.php +++ b/inc/reset/reset_beg.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,19 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('beg')) { + die(); +} elseif (!isExtensionActive('beg')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // 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__); -// +// [EOF] ?> diff --git a/inc/reset/reset_birthday.php b/inc/reset/reset_birthday.php new file mode 100644 index 0000000000..dfadfaca9f --- /dev/null +++ b/inc/reset/reset_birthday.php @@ -0,0 +1,120 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : reset_birthday.php * + * -------------------------------------------------------------------- * + * Short description : Sends out birthday mails on reset * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Versendet Geburtstagsmails beim Reset * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('birthday')) { + return; +} + +// Do not execute when script is in CSS mode +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); + +// Get current day (01 to 31), month (01 to 12) and year (4-digits year) +$day = date('d', time()); +$month = date('m', time()); +$year = date('Y', time()); + +// Shall I include only active members? +$add = "%s"; $value = ''; +if ((getConfig('birthday_active')) && (isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { + $add = " AND `last_online` >= (UNIX_TIMESTAP() - %s)"; + $value = getConfig('ap_inactive_since'); +} // END - if + +// Only confirmed members shall receive birthday mails... +$result_birthday = SQL_QUERY_ESC("SELECT `userid`, `email`, `birth_year` +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` ASC", + array($day, $month, $value), __FILE__, __LINE__); + +if (SQL_NUMROWS($result_birthday) > 0) { + // Start sending out birthday mails + while ($content = SQL_FETCHARRAY($result_birthday)) { + // Calculate own timestamp for birthday and today + $bd = $content['birth_year'] + 12 * $month + 365 * $day; + $now = $year + 12 * $month + 365 * $day; + + // Simply subtract both values and you got the age... :) + $age = $now - $bd; + + if (getConfig('birthday_points') > 0) { + // Add more entries to the array + $content['age'] = $age; + $content['points'] = translateComma(getConfig('birthday_points')); + $content['check'] = ''; + + // @TODO 4 is hard-coded here, should we move it out in config? + for ($idx = 0; $idx < 4; $idx++) { + $content['check'] .= generateRandomCode("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1))); + } // END - for + + // Insert row into database + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )", + array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__); + + // Load email template with confirmation link + $message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid'])); + } else { + // Load default email template and fill in the age + $message = loadEmailTemplate('member_birthday', $age, $content['userid']); + } + + // Send email + sendEmail($content['email'], getMessage('HAPPY_BIRTHDAY'), $message); + + // 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", + array(bigintval($content['userid'])), __FILE__, __LINE__); + } // END - while + + // Free memory + SQL_FREERESULT($result); +} + +// [EOF] +?> diff --git a/inc/reset/reset_bonus.php b/inc/reset/reset_bonus.php index 2d2cb237bd..e8a52fda58 100644 --- a/inc/reset/reset_bonus.php +++ b/inc/reset/reset_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,22 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('bonus')) { + die(); +} elseif (!isExtensionActive('bonus')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Purge expired entries in _bonus_turbo -BONUS_PURGE_EXPIRED_TURBO_BONUS(); +purgeExpiredTurboBonus(); // 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__); -// +// [EOF] ?> diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index 47ae3478de..eb1dc15b3d 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,57 +38,56 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('sql_patches')) { + die(); +} elseif (!isExtensionActive('sql_patches')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Update user profiles -if (GET_EXT_VERSION('order') >= '0.1.1') { +if ((isExtensionActive('order')) && (getExtensionVersion('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` ASC", __FILE__, __LINE__); +$result_daily = SQL_QUERY("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_data` WHERE ref_payout=0 AND `status`='CONFIRMED' ORDER BY `userid` ASC", __FILE__, __LINE__); -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__).":payout=0;daily|numRows=".SQL_NUMROWS($result_daily)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__).":payout=0;daily|numRows=".SQL_NUMROWS($result_daily)."<br />"); if (SQL_NUMROWS($result_daily) > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // Start checking accounts which are on 0 confirmed-to-go mails while ($content = SQL_FETCHARRAY($result_daily)) { - //* DEBUG: */ OUTPUT_HTML(basename(__FILE__).":uid={$content['userid']}<br />"); - $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($content['userid'])), __FILE__, __LINE__); + //* DEBUG: */ outputHtml(basename(__FILE__).":userid={$content['userid']}<br />"); + $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` ASC", + array(bigintval($content['userid'])), __FILE__, __LINE__); - //* DEBUG: */ OUTPUT_HTML(basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."<br />"); + //* DEBUG: */ outputHtml(basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."<br />"); if (SQL_NUMROWS($result_points) > 0) { // Ok transfer points while ($content2 = SQL_FETCHARRAY($result_points)) { // Merge both arrays $content = merge_array($content, $content2); - //* DEBUG: */ OUTPUT_HTML(basename(__FILE__).":uid={$content['userid']},depth={$content['ref_depth']},locked={$content['locked_points']}<br />"); - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+%s, locked_points=0.00000 -WHERE userid=%s AND ref_depth=%d + //* DEBUG: */ outputHtml(basename(__FILE__).":userid={$content['userid']},depth={$content['ref_depth']},locked={$content['locked_points']}<br />"); + addSql(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($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false)); // Update mediadata as well - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update database - MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $content['locked_points']); + updateMediadataEntry(array('total_points'), 'add', $content['locked_points']); } // END - if } // END - while } // END - if @@ -104,5 +103,5 @@ LIMIT 1", // Free memory SQL_FREERESULT($result_daily); -// +// [EOF] ?> diff --git a/inc/reset/reset_doubler.php b/inc/reset/reset_doubler.php new file mode 100644 index 0000000000..036b4d6346 --- /dev/null +++ b/inc/reset/reset_doubler.php @@ -0,0 +1,54 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : reset_doubler.php * + * -------------------------------------------------------------------- * + * Short description : Things to be done on daily reset * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Dinge, die beim taeglichen Reset erledigt werden * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('doubler')) { + return; +} + +// Do not execute when script is in CSS mode or no daily reset +if ((getOutputMode() != 0) || (!isResetModeEnabled()) || (getConfig('doubler_send_mode') != 'RESET')) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); + +// Include it +loadIncludeOnce('inc/mails/doubler_mails.php'); + +// [EOF] +?> diff --git a/inc/reset/reset_engine.php b/inc/reset/reset_engine.php index 0c1b2f8820..ba15bfcb99 100644 --- a/inc/reset/reset_engine.php +++ b/inc/reset/reset_engine.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('engine')) { + die(); +} elseif (!isExtensionActive('engine')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); -// +// [EOF] ?> diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index 3fd392a602..998e929438 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,19 +38,18 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('holiday')) { + die(); +} elseif (!isExtensionActive('holiday')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // 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` +FROM `{?_MYSQL_PREFIX?}_user_data` WHERE holiday_activated > 0 AND holiday_activated < UNIX_TIMESTAMP() AND `holiday_active`='N' ORDER BY holiday_activated", __FILE__, __LINE__); @@ -58,14 +57,14 @@ __FILE__, __LINE__); // Entries found? if (SQL_NUMROWS($result_main) > 0) { // Init SQLs - INIT_SQLS(); + initSqls(); // We have found at least one useraccount so let's check it... while ($content = SQL_FETCHARRAY($result_main)) { // Check if his holiday can be activated $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() +FROM `{?_MYSQL_PREFIX?}_user_holidays` +WHERE `userid`=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_holiday) == 1) { @@ -80,11 +79,11 @@ LIMIT 1", ); // Send email to user - $message = LOAD_EMAIL_TEMPLATE('member_holiday_activated', $content, $content['userid']); + $message = loadEmailTemplate('member_holiday_activated', $content, $content['userid']); sendEmail($content['userid'], getMessage('HOLIDAY_MEMBER_ACTIVATED_SUBJ'), $message); // Update account - ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `holiday_active`='Y' WHERE `userid`=%s LIMIT 1", @@ -103,7 +102,7 @@ LIMIT 1", SQL_FREERESULT($result_main); // Stop currently activated holidays -HOLIDAY_STOP_HOLIDAYS(); +stopHolidays(); -// +// [EOF] ?> diff --git a/inc/reset/reset_profile.php b/inc/reset/reset_profile.php new file mode 100644 index 0000000000..d1ed8e4b65 --- /dev/null +++ b/inc/reset/reset_profile.php @@ -0,0 +1,98 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/24/2009 * + * =============== Last change: 10/24/2009 * + * * + * -------------------------------------------------------------------- * + * File : reset_profile.php * + * -------------------------------------------------------------------- * + * Short description : Sends out notifications to keep profiles updated * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Sendet Erinnerngen aus, damit die Profile * + * von den Mitgliedern aktuell gehalten werden * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} elseif (!isExtensionActive('profile')) { + return; +} + +// Do not execute when script is in CSS mode or no daily reset +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); + +if ((getConfig('send_prof_update') == 'Y') && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) { + // Load personal data + $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `last_update`, `joined` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + (`last_update` < (UNIX_TIMESTAMP() - %s) AND `last_update` != 0 AND `last_profile_sent` < (UNIX_TIMESTAMP() - %s)) +OR + (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - %s)) +ORDER BY + `userid` ASC", + array( + getConfig('profile_update'), + getConfig('resend_profile_update'), + getConfig('profile_update') + ), __FILE__, __LINE__); + + // Do we have some notifications to sent? + if (SQL_NUMROWS($result) > 0) { + // We need to send-out notifications... + while ($content = SQL_FETCHARRAY($result)) { + // Translate timestamp + $content['joined'] = generateDateTime($content['joined'], '0'); + + if (round($content['last_update']) == '0') { + // Has never changed his accont + $content['last_update'] = getMessage('PROFILE_NEVER_CHANGED'); + } else { + // Has changed his account + $content['last_update'] = generateDateTime($content['last_update'], '0'); + } + + // Load email template and send mail away + $message = loadEmailTemplate('profile-updte', '', bigintval($content['userid'])); + sendEmail($content['email'], getMessage('PROFILE_OUTDATED'), $message); + + // Update profile data + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_profile_sent`=UNIX_TIMESTAMP(), `notified`='Y' WHERE `userid`=%s LIMIT 1", + array(bigintval($content['userid'])), __FILE__, __LINE__); + } // END - while + } // END - if + + // Free result + SQL_FREERESULT($result); +} + +// [EOF] +?> diff --git a/inc/reset/reset_surfbar.php b/inc/reset/reset_surfbar.php index d44a6f60a7..7b063c9538 100644 --- a/inc/reset/reset_surfbar.php +++ b/inc/reset/reset_surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,20 +38,19 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('surfbar')) { + die(); +} elseif (!isExtensionActive('surfbar')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Reset surfbar counter updateConfiguration(array("surfbar_daily_counter", "surfbar_yester_counter"), array(0, getConfig('surfbar_daily_counter'))); setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter')); setConfigEntry('surfbar_daily_counter' , 0); -// +// [EOF] ?> diff --git a/inc/reset/reset_yoomedia.php b/inc/reset/reset_yoomedia.php index 93810c7448..1fc70986e8 100644 --- a/inc/reset/reset_yoomedia.php +++ b/inc/reset/reset_yoomedia.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,17 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('yoomedia')) { + die(); +} elseif (!isExtensionActive('yoomedia')) { return; } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Simply reset the requests here updateConfiguration('yoomedia_requests_remain', getConfig('yoomedia_requests_total')); -// +// [EOF] ?> diff --git a/inc/security.php b/inc/security.php index 19cff33338..f551ef47b7 100644 --- a/inc/security.php +++ b/inc/security.php @@ -1,71 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 09/05/2003 * - * =============== Last change: 11/10/2004 * - * * - * -------------------------------------------------------------------- * - * File : security.php * - * -------------------------------------------------------------------- * - * Short description : Access denied! * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Zugriff verweigert! * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -print("<pre>"); -debug_print_backtrace(); -die("</pre>"); - -print("<html> -<head> -<title>Protected file ".basename($_SERVER['PHP_SELF'])." - ACCESS DENIED!</title> -</head> -<body bgcolor=\"#880000\" text=\"#FFFFFF\"> -<div align=\"center\"> -<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> -<tr> - <td align=\"center\"><u><strong><big><big>A C C E S S D E N I E D !</big></big></strong></u></td> -</tr> -<tr><td height=\"10\"></td></tr> -<tr> - <td align=\"center\"> - You have tried to open a protected file! Your access has been logged in the server's logfile with your IP number: - </td> -</tr> -<tr><td height=\"10\"></td></tr> -<tr> - <td align=\"center\"> - <strong>".detectRemoteAddr()."</strong> - </td> -</tr> -</table> -</div> -</body> -</html>\n"); -shutdown(); -// +// @DEPRECATED ?> diff --git a/inc/session-functions.php b/inc/session-functions.php index 6a47b648dd..9b9aa1f6d4 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Unset/set session variables @@ -51,32 +50,32 @@ function setSession ($var, $value) { $var = trim(SQL_ESCAPE($var)); $value = trim($value); // Is the session variable set? - if (("".$value."" == '') && (isSessionVariableSet($var))) { + if ((''.$value.'' == '') && (isSessionVariableSet($var))) { // Remove the session - //* DEBUG: */ OUTPUT_HTML("UNSET:".$var.'='.getSession($var)."<br />"); - unset($_SESSION[$var]); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UNSET:".$var.'='.getSession($var)); + unset($GLOBALS['_SESSION'][$var]); return session_unregister($var); } elseif (("".$value."" != '') && (!isSessionVariableSet($var))) { // Set session - //* DEBUG: */ OUTPUT_HTML("SET:".$var.'='.$value."<br />"); - $_SESSION[$var] = $value; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "SET:".$var.'='.$value); + $GLOBALS['_SESSION'][$var] = $value; return session_register($var); } elseif (!empty($value)) { // Update session - //* DEBUG: */ OUTPUT_HTML("UPDATE:".$var.'='.$value."<br />"); - $_SESSION[$var] = $value; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UPDATE:".$var.'='.$value); + $GLOBALS['_SESSION'][$var] = $value; return true; } // Ignored (but valid) - //* DEBUG: */ OUTPUT_HTML("IGNORED:".$var.'='.$value."<br />"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "IGNORED:".$var.'='.$value); return true; } // Check wether a session variable is set function isSessionVariableSet ($var) { - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):var={$var}<br />"); - return (isset($_SESSION[$var])); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "var={$var}"); + return (isset($GLOBALS['_SESSION'][$var])); } // Returns wether the value of the session variable or NULL if not set @@ -84,18 +83,10 @@ function getSession ($var) { // Default is not found! ;-) $value = null; - // Is the variable there or cached values? - if (isset($GLOBALS['cache_array']['session'][$var])) { - // Get cached value (skips a lot SQL_ESCAPE() calles! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ".$var."-CACHE!<br />"); - $value = $GLOBALS['cache_array']['session'][$var]; - } elseif (isSessionVariableSet($var)) { + // Is the variable there? + if (isSessionVariableSet($var)) { // Then get it secured! - //* DEBUG: */ OUTPUT_HTML(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ".$var."-RESOLVE!<br />"); - $value = SQL_ESCAPE($_SESSION[$var]); - - // Cache the value - $GLOBALS['cache_array']['session'][$var] = $value; + $value = SQL_ESCAPE($GLOBALS['_SESSION'][$var]); } // END - if // Return the value diff --git a/inc/session.php b/inc/session.php index ec9dff751e..591cb1c4ee 100644 --- a/inc/session.php +++ b/inc/session.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Set session save path if set @@ -48,17 +47,16 @@ if (getConfig('session_save_path') != '') { session_save_path(getConfig('session_save_path')); } // END - if -// Start the session -session_start(); +if (session_id() == '') { + // Start the session + session_start(); +} // END - if // Load language file(s) loadLanguageFile(); -// Load extensions here -loadIncludeOnce('inc/load_extensions.php'); - // Determine and set referal id -DETERMINE_REFID(); +determineReferalId(); // Transfer userid from session and validate it if (isSessionVariableSet('userid')) { @@ -66,7 +64,7 @@ if (isSessionVariableSet('userid')) { setUserId(getSession('userid')); // Is it valid? - if (!IS_MEMBER()) { + if (!isMember()) { // Then destroy the user id destroyUserSession(); @@ -75,7 +73,5 @@ if (isSessionVariableSet('userid')) { } // END - if } // END - if -//* DEBUG: */ print('<pre>'.print_r($_SESSION, true).'</pre>'); - -// +// [EOF] ?> diff --git a/inc/sql-functions.php b/inc/sql-functions.php new file mode 100644 index 0000000000..e662138762 --- /dev/null +++ b/inc/sql-functions.php @@ -0,0 +1,128 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/23/2009 * + * =============== Last change: 10/23/2009 * + * * + * -------------------------------------------------------------------- * + * File : sql-functions.php * + * -------------------------------------------------------------------- * + * Short description : All MySQL-related functions * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Alle MySQL-Relevanten Funktionen * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Init SQLs array +function initSqls () { + setSqlsArray(array()); +} + +// Checks wether the sqls array is initialized +function isSqlsInitialized () { + return ((isset($GLOBALS['sqls'])) && (is_array($GLOBALS['sqls']))); +} + +// Setter for SQLs array +function setSqlsArray ($SQLs) { + $GLOBALS['sqls'] = (array) $SQLs; +} + +// Remover for SQLs array +function unsetSqls () { + unset($GLOBALS['sqls']); +} + +// Getter for SQLs array +function getSqls () { + return $GLOBALS['sqls']; +} + +// Add an SQL to the list +function addSql ($sql) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, countSqls())); + $GLOBALS['sqls']['generic'][] = (string) $sql; +} + +// Merge SQLs together +function mergeSqls ($SQLs, $type = '') { + // Should we merge full array or partial? + if (empty($type)) { + // Merge full array (may kill entries) + setSqlsArray(merge_array(getSqls(), $SQLs)); + } else { + // Merge sub array, so get it + $array = getSqls(); + + // Is the sub array there? + if (isset($array[$type])) { + // Then get it and merge it with the new one + $array[$type] = merge_array($array[$type], $SQLs); + } else { + // Use new array + $array[$type] = $SQLs; + } + + // Call again.. + mergeSqls($array); + } +} + +// Counter for SQLs array +function countSqls () { + // Default is false + $count = 0; + + // Is the array there? + if (isSqlsInitialized()) { + // Then count it + $count = count($GLOBALS['sqls']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("count=%d", $count)); + } // END - if + + // Return it + return $count; +} + +// Checks wether the SQLs array is filled +function isSqlsValid () { + //* DEBUG: */ print __FUNCTION__.':'.intval(isSqlsInitialized()).'/'.countSqls().'/'.getCurrentExtensionName().'<br />'; + return ( + ( + isSqlsInitialized() + ) && ( + countSqls() > 0 + ) + ); +} + +// [EOF] +?> diff --git a/inc/sql_error.php b/inc/sql_error.php index 7918cd1a45..f551ef47b7 100644 --- a/inc/sql_error.php +++ b/inc/sql_error.php @@ -1,46 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 08/25/2003 * - * =============== Last change: 10/15/2003 * - * * - * -------------------------------------------------------------------- * - * File : sql_error.php * - * -------------------------------------------------------------------- * - * Short description : Outputs sql errors * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Gibt MySQL-Fehler aus * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// +// @DEPRECATED ?> diff --git a/inc/stats-functions.php b/inc/stats-functions.php new file mode 100644 index 0000000000..da5815c182 --- /dev/null +++ b/inc/stats-functions.php @@ -0,0 +1,121 @@ +<?php +/************************************************************************ + * MXChange v0.2.1 Start: 10/25/2009 * + * =============== Last change: 10/25/2009 * + * * + * -------------------------------------------------------------------- * + * File : stats-functions.php * + * -------------------------------------------------------------------- * + * Short description : Automatical purging of outdated mail links * + * -------------------------------------------------------------------- * + * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links * + * -------------------------------------------------------------------- * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * + * -------------------------------------------------------------------- * + * Copyright (c) 2003 - 2009 by Roland Haeder * + * For more information visit: http://www.mxchange.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ************************************************************************/ + +// Some security stuff... +if (!defined('__SECURITY')) { + die(); +} // END - if + +// Init stats system +function initStatsSystem () { + // Is stats cache loaded? + if ((!isset($GLOBALS['stats_loaded'])) && (getConfig('STATS_ENABLED') == 'Y')) { + // Load stats cache + $GLOBALS['stats_fqfn'] = sprintf("%sinc/cache/stats.cache", getConfig('PATH')); + + // Is the file readable? + if (isFileReadable($GLOBALS['stats_fqfn'])) { + // Yes, so load it and eval + eval(readFromFile($GLOBALS['stats_fqfn'])); + } else { + // Generate it only + touch($GLOBALS['stats_fqfn']); + } + + // Stats are loaded! + $GLOBALS['stats_loaded'] = true; + } // END - if +} + +// Checks if we have a statistics entry +function isStatsEntrySet ($entry) { + // Do we have the entry? + return (isset($GLOBALS['stats'][$entry])); +} + +// Increments a statistics entry +function incrementStatsEntry ($entry, $amount=1) { + // Is it there? + if (isStatsEntrySet($entry)) { + // Then increment it + $GLOBALS['stats'][$entry] += $amount; + } else { + // Write it + $GLOBALS['stats'][$entry] = $amount; + } +} + +// Getter for stats +function getStatsEntry ($entry) { + // Default is zero + $stats = 0; + + // Is it there? + if (isStatsEntrySet($entry)) { + // Then use it + $stats = $GLOBALS['stats'][$entry]; + } // END - if + + // Return the value + return $stats; +} + +// Setter for stats +function setStatsEntry ($entry, $value) { + $GLOBALS['stats'][$entry] = $value; +} + +// Filter for flushing statistics +function FILTER_FLUSH_STATS () { + // Now do we have stats? + if ((isset($GLOBALS['stats'])) && (getConfig('STATS_ENABLED') == 'Y')) { + // Then prepare it for writing + foreach ($GLOBALS['stats'] as $key=>$value) { + $stats[] = '$GLOBALS[\'stats\'][\'' . $key . '\'] = ' . $value . ';'; + } // END - foreach + + // Add empty line + $stats[] = ''; + + // And flush all out + writeToFile($GLOBALS['stats_fqfn'], implode("\n", $stats), true); + } // END - if +} + +// [EOF] +?> diff --git a/inc/stats_bonus.php b/inc/stats_bonus.php index b184358c7d..f551ef47b7 100644 --- a/inc/stats_bonus.php +++ b/inc/stats_bonus.php @@ -1,85 +1,3 @@ <?php -/************************************************************************ - * MXChange v0.2.1 Start: 03/18/2005 * - * =============== Last change: 03/18/2005 * - * * - * -------------------------------------------------------------------- * - * File : stats_bonus.php * - * -------------------------------------------------------------------- * - * Short description : Check for 100% clickrate order * - * -------------------------------------------------------------------- * - * Kurzbeschreibung : Nach Mailbestaetigungen mit 100% Klickrate s. * - * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * - * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * - * For more information visit: http://www.mxchange.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ************************************************************************/ - -// Some security stuff... -if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} - -// Check for 100% klickrate mails -$result_bonus = SQL_QUERY("SELECT - `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url` -FROM - `{!_MYSQL_PREFIX!}_user_stats` -WHERE - `max_rec`=`clicks` AND `clicks` > 0 AND `bonus_stats_active`='N' -ORDER BY - `userid` ASC", __FILE__, __LINE__); - -if (SQL_NUMROWS($result_bonus) > 0) { - // Remember stats bonus in constant - define('__STATS_BONUS', translateComma(getConfig('bonus_stats'))); - - // We found some mail orders... - while ($content = SQL_FETCHARRAY($result_bonus)) { - // Add points - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `bonus_stats`=`bonus_stats`+%s WHERE `userid`=%s LIMIT 1", - array(getConfig('bonus_stats'), bigintval($content['userid'])), __FILE__, __LINE__); - - // Translate some data - $content['timestamp'] = generateDateTime($content['timestamp_ordered'], '2'); - - // Load email template and send email - $message = LOAD_EMAIL_TEMPLATE('member_stats_bonus', $content, bigintval($content['userid'])); - sendEmail($content['userid'], getMessage('BONUS_MEMBER_STATS_SUBJECT'), $message); - - // Update database - $result_update = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET `bonus_stats_active`='Y' WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__); - } // END - while - - // Handle bonus points - BONUS_POINTS_HANDLER(getConfig('bonus_stats')); -} - -// Free memory -SQL_FREERESULT($result_bonus); - -// [EOF] +// @DEPRECATED ?> diff --git a/inc/stylesheet.php b/inc/stylesheet.php index 87c64c2e48..219918f6b2 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // Default styles @@ -48,7 +47,7 @@ $STYLES = array( ); // Add stylesheet for installation -if ((isInstalling()) || (!isInstalled())) $STYLES[] = 'install.css'; +if ((isInstallationPhase())) $STYLES[] = 'install.css'; // When no CSS output-mode is set, set it to file-output if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE'); @@ -56,7 +55,7 @@ if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE'); // Output CSS files or content or link to css.php ? if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) { // Load CSS files - $STYLES = merge_array($STYLES, EXT_GET_CSS_FILES()); + $STYLES = merge_array($STYLES, getExtensionCssFiles()); // Generate base path $basePath = sprintf("%stheme/%s/css/", getConfig('PATH'), getCurrentTheme()); @@ -70,11 +69,11 @@ if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) { if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) { switch (getConfig('css_php')) { case 'DIRECT': // Just link them (unsupported) - OUTPUT_HTML('<link rel="stylesheet" type="text/css" href="{?URL?}/theme/' . getCurrentTheme() . '/' . $value . '" />'); + outputHtml('<link rel="stylesheet" type="text/css" href="{?URL?}/theme/' . getCurrentTheme() . '/' . $value . '" />'); break; case 'FILE': // Output contents - OUTPUT_HTML(readFromFile($FQFN)); + outputHtml(readFromFile($FQFN)); break; default: // Invalid mode! @@ -83,17 +82,44 @@ if ((getOutputMode() == '1') || (getConfig('css_php') == 'DIRECT')) { } // END - switch } // END - if } // END - foreach +} elseif ((getOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) { + // Load CSS files + $STYLES = merge_array($STYLES, getExtensionCssFiles()); + + // Generate base path + $basePath = sprintf("%stheme/%s/css/", getConfig('PATH'), getCurrentTheme()); + + // Output inclusion lines + $OUT = ''; + foreach ($STYLES as $value) { + // Only include found CSS files (to reduce 404 requests) + $FQFN = $basePath . $value; + + // Do include only existing files and whose are not empty + if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) { + // Load CSS content + $OUT .= readFromFile($FQFN); + } // END - if + } // END - foreach + + // Load template + loadTemplate('css_inline', false, $OUT); } else { // Now we load all CSS files from css.php! - OUTPUT_HTML('<link rel="stylesheet" type="text/css" href="{?URL?}/css.php', false); - if ((isInstalling()) || (!isInstalled())) { + outputHtml('<link rel="stylesheet" type="text/css" href="{?URL?}/css.php', false); + if ((isInstallationPhase())) { // Default theme first $newTheme = 'default'; - if (REQUEST_ISSET_GET('theme')) $newTheme = REQUEST_GET('theme'); - if (REQUEST_ISSET_POST('theme')) $newTheme = SQL_ESCAPE(REQUEST_POST('theme')); - OUTPUT_HTML('?theme=' . $newTheme . '&installing=1', false); - } // END - if - OUTPUT_HTML('" />'); + if (isGetRequestElementSet('theme')) $newTheme = getRequestElement('theme'); + if (isPostRequestElementSet('theme')) $newTheme = SQL_ESCAPE(postRequestElement('theme')); + outputHtml('?theme=' . $newTheme . '&installing=1', false); + } else { + // Add SVN revision to bypass caching problems + outputHtml('?rev=' . getConfig('CURR_SVN_REVISION')); + } + + // Close tag + outputHtml('" />'); } // [EOF] diff --git a/inc/versions.php b/inc/versions.php index 5441305956..eec7db5ef5 100644 --- a/inc/versions.php +++ b/inc/versions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // If you understand regular expressions ^^^ you may know how I versionize... ;-) @@ -49,5 +48,5 @@ setConfigEntry('FULL_VERSION', getActualVersion('Tag')); setConfigEntry('CURR_SVN_REVISION', getActualVersion('Revision')); setConfigEntry('CURR_SVN_DATE' , getActualVersion('Date')); -// +// [EOF] ?> diff --git a/inc/weekly/weekly_ b/inc/weekly/weekly_ index 4b64b8208e..3e966516f4 100644 --- a/inc/weekly/weekly_ +++ b/inc/weekly/weekly_ @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('')) { + die(); +} elseif (!isExtensionActive('')) { return; } diff --git a/inc/weekly/weekly_surfbar.php b/inc/weekly/weekly_surfbar.php index 305de9010b..34e046f75e 100644 --- a/inc/weekly/weekly_surfbar.php +++ b/inc/weekly/weekly_surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,15 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} elseif (!EXT_IS_ACTIVE('surfbar')) { + die(); +} elseif (!isExtensionActive('surfbar')) { return; } // Do not execute when script is in CSS mode or no daily reset if ((getOutputMode() == 1) || (!isResetModeEnabled())) return; -//* DEBUG: */ OUTPUT_HTML(basename(__FILE__)."<br />"); +//* DEBUG: */ outputHtml(basename(__FILE__)."<br />"); // Reset the surfbar counter updateConfiguration('surfbar_weekly_counter', '0'); diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index c59e12c923..f7ef134aff 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,8 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); + die(); } // END - if // Read a given file @@ -71,11 +70,11 @@ function readFromFile ($FQFN, $sqlPrepare = false) { } // Writes content to a file -function writeToFile ($FQFN, $content) { +function writeToFile ($FQFN, $content, $aquireLock = false) { // Is the file writeable? if ((isFileReadable($FQFN)) && (!is_writeable($FQFN)) && (!changeMode($FQFN, 0644))) { // Not writeable! - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("File %s not writeable.", basename($FQFN))); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("File %s not writeable.", basename($FQFN))); // Failed! :( return false; @@ -86,20 +85,33 @@ function writeToFile ($FQFN, $content) { // Is the function there? if (function_exists('file_put_contents')) { - // Write it directly - $return = file_put_contents($FQFN, $content); + // With lock? + if ($aquireLock === true) { + // Write it directly with lock + $return = file_put_contents($FQFN, $content, LOCK_EX); + } else { + // Write it directly + $return = file_put_contents($FQFN, $content); + } } else { // Write it with fopen $fp = fopen($FQFN, 'w') or app_die(__FUNCTION__, __LINE__, "Cannot write file ".basename($FQFN).'!'); + + // Aquire lock + if ($aquireLock === true) flock($fp, LOCK_EX); + + // Write content fwrite($fp, $content); - fclose($fp); - // Set CHMOD rights - $return = changeMode($FQFN, 0644); + // Close stream + fclose($fp); } + // Mark it as readable + $GLOBALS['file_readable'][$FQFN] = true; + // Return status - return $return; + return changeMode($FQFN, 0644); } // Clears the output buffer. This function does *NOT* backup sent content. @@ -111,43 +123,6 @@ function clearOutputBuffer () { } // END - if } -// Loads an include file and logs any missing files for debug purposes -function loadInclude ($INC) { - // Add the path. This is why we need a trailing slash in config.php - $FQFN = getConfig('PATH') . $INC; - - // Is the include file there? - if (!isIncludeReadable($INC)) { - // Not there so log it - debug_report_bug(sprintf("Include file %s not found.", $INC)); - return false; - } // END - if - - // Try to load it - require($FQFN); -} - -// Loads an include file once -function loadIncludeOnce ($INC) { - // Is it not loaded? - if (!isset($GLOBALS['load_once'][$INC])) { - // Mark it as loaded - $GLOBALS['load_once'][$INC] = 'loaded'; - - // Then try to load it - loadInclude($INC); - } // END - if -} - -// Checks wether an include file (non-FQFN better) is readable -function isIncludeReadable ($INC) { - // Construct FQFN - $FQFN = getConfig('PATH') . $INC; - - // Is it readable? - return isFileReadable($FQFN); -} - // Encode strings // @TODO Implement $compress function encodeString ($str, $compress = true) { @@ -164,8 +139,17 @@ function decodeString ($str, $decompress = true) { // Smartly adds slashes function smartAddSlashes ($unquoted) { - $unquoted = str_replace("\\", '', $unquoted); - return addslashes($unquoted); + // Do we have cache? + if (!isset($GLOBALS['smart_addslashes'][$unquoted])) { + // Remove slashe + $unquoted = str_replace("\\", '', $unquoted); + + // Put it in cache and add slashes + $GLOBALS['smart_addslashes'][$unquoted] = addslashes($unquoted); + } // END - if + + // Return result + return $GLOBALS['smart_addslashes'][$unquoted]; } // Decode entities in a nicer way @@ -185,10 +169,10 @@ function merge_array ($array1, $array2) { debug_report_bug(__FUNCTION__ . ': No arrays provided!'); } elseif (!is_array($array1)) { // Left one is not an array - debug_report_bug(__FUNCTION__, sprintf("array1 is not an array. array != %s", gettype($array1))); + debug_report_bug(sprintf("[%s:%s] array1 is not an array. array != %s", __FUNCTION__, __LINE__, gettype($array1))); } elseif (!is_array($array2)) { // Right one is not an array - debug_report_bug(__FUNCTION__, sprintf("array2 is not an array. array != %s", gettype($array2))); + debug_report_bug(sprintf("[%s:%s] array2 is not an array. array != %s", __FUNCTION__, __LINE__, gettype($array2))); } // Merge all together @@ -197,20 +181,29 @@ function merge_array ($array1, $array2) { // Check if given FQFN is a readable file function isFileReadable ($FQFN) { - // Check all... - return ((file_exists($FQFN)) && (is_file($FQFN)) && (is_readable($FQFN))); + // Do we have cache? + if (!isset($GLOBALS['file_readable'][$FQFN])) { + // Check all... + $GLOBALS['file_readable'][$FQFN] = ((file_exists($FQFN)) && (is_file($FQFN)) && (is_readable($FQFN))); + } // END - if + + // Return result + return $GLOBALS['file_readable'][$FQFN]; } -// Checks wether the given FQFN is a directory and not .,.. or .svn +// Checks wether the given FQFN is a directory and not ., .. or .svn function isDirectory ($FQFN) { - // Generate baseName - $baseName = basename($FQFN); + // Do we have cache? + if (!isset($GLOBALS['is_directory'][$FQFN])) { + // Generate baseName + $baseName = basename($FQFN); - // Check it - $isDirectory = ((is_dir($FQFN)) && ($baseName != '.') && ($baseName != '..') && ($baseName != '.svn')); + // Check it + $GLOBALS['is_directory'][$FQFN] = ((is_dir($FQFN)) && ($baseName != '.') && ($baseName != '..') && ($baseName != '.svn')); + } // END - if // Return the result - return $isDirectory; + return $GLOBALS['is_directory'][$FQFN]; } // "Getter" for remote IP number @@ -219,9 +212,9 @@ function detectRemoteAddr () { $remoteAddr = determineRealRemoteAddress(); // Is removeip installed? - if (EXT_IS_ACTIVE('removeip')) { + if (isExtensionActive('removeip')) { // Then anonymize it - $remoteAddr = GET_ANONYMOUS_REMOTE_ADDR($remoteAddr); + $remoteAddr = getAnonymousRemoteAddress($remoteAddr); } // END - if // Return it @@ -234,9 +227,9 @@ function detectRemoteHostname () { $remoteHost = getenv('REMOTE_HOST'); // Is removeip installed? - if (EXT_IS_ACTIVE('removeip')) { + if (isExtensionActive('removeip')) { // Then anonymize it - $remoteHost = GET_ANONYMOUS_REMOTE_HOST($remoteHost); + $remoteHost = getAnonymousRemoteHost($remoteHost); } // END - if // Return it @@ -249,9 +242,9 @@ function detectUserAgent () { $userAgent = getenv('HTTP_USER_AGENT'); // Is removeip installed? - if (EXT_IS_ACTIVE('removeip')) { + if (isExtensionActive('removeip')) { // Then anonymize it - $userAgent = GET_ANONYMOUS_USER_AGENT($userAgent); + $userAgent = getAnonymousUserAgent($userAgent); } // END - if // Return it @@ -264,9 +257,9 @@ function detectReferer () { $referer = getenv('HTTP_REFERER'); // Is removeip installed? - if (EXT_IS_ACTIVE('removeip')) { + if (isExtensionActive('removeip')) { // Then anonymize it - $referer = GET_ANONYMOUS_REFERER($referer); + $referer = getAnonymousReferer($referer); } // END - if // Return it @@ -275,35 +268,46 @@ function detectReferer () { // Check wether we are installing function isInstalling () { - $installing = ((isset($GLOBALS['mxchange_installing'])) || (REQUEST_ISSET_GET('installing'))); - //* DEBUG: */ var_dump($installing); - return $installing; + // Determine wether we are installing + if (!isset($GLOBALS['mxchange_installing'])) { + // Check URL (css.php/js.php need this) + $GLOBALS['mxchange_installing'] = isGetRequestElementSet('installing'); + } // END - if + + // Return result + return $GLOBALS['mxchange_installing']; } // Check wether this script is installed function isInstalled () { - return ( - ( - // New config file found and loaded - isIncludeReadable('inc/cache/config-local.php') - ) || ( - // Fall-back to config - getConfig('MXCHANGE_INSTALLED') == 'Y' - ) || ( + // Do we have cache? + if (!isset($GLOBALS['is_installed'])) { + // Determine wether this script is installed + $GLOBALS['is_installed'] = ( ( - // New config file found, but not yet read - isIncludeReadable('inc/cache/config-local.php') - ) && ( + // First is config + getConfig('MXCHANGE_INSTALLED') == 'Y' + ) || ( + // New config file found and loaded + isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php') + ) || ( ( - // Only new config file is found - !isIncludeReadable('inc/config.php') - ) || ( - // Is installation mode - isInstalling() + // New config file found, but not yet read + isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php') + ) && ( + ( + // Only new config file is found + !isIncludeReadable('inc/config.php') + ) || ( + // Is installation mode + !isInstalling() + ) ) - ) - ) - ); + )); + } // END - if + + // Then use the cache + return $GLOBALS['is_installed']; } // Check wether an admin is registered @@ -357,7 +361,10 @@ function copyFileVerified ($source, $dest, $chmod = '') { if (!copy($source, $dest)) { // Something went wrong debug_report_bug('copy() has failed to copy the file.'); - } // END - if + } else { + // Reset cache + $GLOBALS['file_readable'][$dest] = true; + } // If there are chmod rights set, apply them if (!empty($chmod)) { @@ -402,6 +409,9 @@ function changeMode ($FQFN, $mode) { function removeFile ($FQFN) { // Is the file there? if (isFileReadable($FQFN)) { + // Reset cache first + $GLOBALS['file_readable'][$FQFN] = false; + // Yes, so remove it return unlink($FQFN); } // END - if @@ -413,7 +423,7 @@ function removeFile ($FQFN) { // Wrapper for $_POST['sel'] function countPostSelection () { - return countSelection(REQUEST_POST('sel')); + return countSelection(postRequestElement('sel')); } // Checks wether the config-local.php is loaded @@ -432,7 +442,7 @@ function isNicknameUsed ($userid) { $isUsed = $GLOBALS['cache_probe_nicknames'][$userid]; } else { // Determine it - $isUsed = ((EXT_IS_ACTIVE('nickname')) && (('' . round($userid) . '') != $userid)); + $isUsed = ((isExtensionActive('nickname')) && (('' . round($userid) . '') != $userid)); // And write it to the cache $GLOBALS['cache_probe_nicknames'][$userid] = $isUsed; @@ -538,7 +548,8 @@ function getModule () { // Setter for 'module' value function setModule ($newModule) { - $GLOBALS['module'] = SQL_ESCAPE($newModule); + // Secure it and make all modules lower-case + $GLOBALS['module'] = SQL_ESCAPE(strtolower($newModule)); } // Checks wether module is set and optionally aborts on miss @@ -549,6 +560,9 @@ function isModuleSet ($abortOnMiss = false) { // Should we abort here? if (($abortOnMiss === true) && ($isset === false)) { // Output backtrace + print '<pre>'; + debug_print_backtrace(); + die('</pre'); debug_report_bug('module is empty.'); } // END - if @@ -608,5 +622,73 @@ function isBlockModeEnabled () { return $GLOBALS['block_mode']; } +// Wrapper function for addPointsThroughReferalSystem() +function addPointsDirectly ($subject, $userid, $points) { + // Reset level here + unset($GLOBALS['ref_level']); + + // Call more complicated method (due to more parameters) + return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, false, 'direct'); +} + +// Wrapper function to redirect from member-only modules to index +function redirectToIndexMemberOnlyModule () { + // Do the redirect here + redirectToUrl('modules.php?module=index&code=' . getCode('MODULE_MEM_ONLY') . '&mod=' . getModule()); +} + +// Wrapper function for checking if extension is installed and newer or same version +function isExtensionInstalledAndNewer ($ext_name, $version) { + // Return it + return ((isExtensionInstalled($ext_name)) && (getExtensionVersion($ext_name) >= $version)); +} + +// Wrapper function for checking if extension is installed and older than given version +function isExtensionInstalledAndOlder ($ext_name, $version) { + // Return it + return ((isExtensionInstalled($ext_name)) && (isExtensionOlder($ext_name, $version))); +} + +// Set username +function setUsername ($userName) { + $GLOBALS['username'] = (string) $userName; +} + +// Get username +function getUsername () { + return $GLOBALS['username']; +} + +// Wrapper function for installation phase +function isInstallationPhase () { + // Do we have cache? + if (!isset($GLOBALS['installation_phase'])) { + // Determine it + $GLOBALS['installation_phase'] = ((!isInstalled()) || (isInstalling())); + } // END - if + + // Return result + return $GLOBALS['installation_phase']; +} + +// Checks wether the extension demo is actuve and the admin login is demo (password needs to be demo, too!) +function isDemoModeActive () { + return ((isExtensionActive('demo')) && (getSession('admin_login') == 'demo')); +} + +// Wrapper function to redirect to de-refered URL +function redirectToDereferedUrl ($URL) { + // De-refer the URL + $URL = generateDerefererUrl($URL); + + // Redirect to to + redirectToUrl($URL); +} + +// Getter for PHP caching value +function getPhpCaching () { + return $GLOBALS['php_caching']; +} + // [EOF] ?> diff --git a/index.php b/index.php index e13c8536ac..e9a77ff4f3 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -52,11 +52,8 @@ $GLOBALS['output_mode'] = '0'; // Load config.php require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if +// Set content type +setContentType('text/html'); // Header loadIncludeOnce('inc/header.php'); @@ -77,14 +74,16 @@ if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == 0) || (get } // Template laden - LOAD_TEMPLATE('index'); + loadTemplate('index'); // Shall I insert an automated forward? if (getConfig('index_delay') > 0) { // This will be a JavaScript-redirect! - define('__DELAY_VALUE', (getConfig('index_delay') * 1000 + 500)); - define('__MOD_VALUE' , 'index'); - LOAD_TEMPLATE('index_forward'); + $content['delay'] = (getConfig('index_delay') * 1000 + 500); + $content['mod'] = 'index'; + + // Load template + loadTemplate('index_forward', false, $content); } // END - if } else { // Redirect to main page diff --git a/install.php b/install.php index 99c1f76593..79e5d2f6d0 100644 --- a/install.php +++ b/install.php @@ -27,7 +27,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,6 +46,9 @@ * MA 02110-1301 USA * ************************************************************************/ +// XDEBUG call +//* DEBUG: */ xdebug_start_trace(); + // Load security system require('inc/libs/security_functions.php'); @@ -64,34 +67,37 @@ $GLOBALS['module'] = 'install'; // Load config file require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Reload page to page=welcome when it is not specified -if (!REQUEST_ISSET_GET('page')) { +if (!isGetRequestElementSet('page')) { redirectToUrl('install.php?page=welcome'); } // END - if +// Set username +setUsername('{--USERNAME_INSTALLER--}'); + // Already installed? -if ((isInstalled()) && (REQUEST_GET('page' != 'finished'))) { +if ((isInstalled()) && (getRequestElement('page' != 'finished'))) { // Add fatal message addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED')); } // END - if -// Does something goes wrong? -if (getTotalFatalErrors() > 0) { - // Output fatal messages - loadInclude('inc/fatal_errors.php'); -} // END - if - // Load header here loadIncludeOnce('inc/header.php'); -// Add main installation table -LOAD_TEMPLATE('install_header'); +// Handle fatal errors +handleFatalErrors(); // Here start's our installtion stuff loadIncludeOnce('inc/install-inc.php'); -// Close main installation table -LOAD_TEMPLATE('install_footer'); +// Handle fatal errors again +handleFatalErrors(); + +// Load main installation table +loadTemplate('install_main', false, $GLOBALS['install_content']); // Footer loadIncludeOnce('inc/footer.php'); diff --git a/install/menu-de.sql b/install/menu-de.sql index 73611c1ea9..4bcd8a4d2b 100644 --- a/install/menu-de.sql +++ b/install/menu-de.sql @@ -1,93 +1,92 @@ -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('login',NULL,'Willkommen','Eingangsseite zum Admin-Bereich',0); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('logout',NULL,'Ausloggen','Ausloggen aus dem Admin-Bereich. Dadurch wird Ihre Session gelöscht und Sie müssen sich erneut anmelden.',999); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_details','Email-Details ansehen','Sehen Sie sich jedes Details bereits gebuchter Mails an.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_secure','Sicherheitseinstellungen','Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.',9); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_email','Versand, Empfang','Hier können Sie die maximal empfangbaren Mails usw. einstellen.',8); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cats','Kategorien einrichten','Ändern oder löschen Sie bereits bestehende Kategorien oder fügen Sie weitere hinzu.',7); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_points','{!POINTS!}','Stellen Sie hier die Willkommensgutschrift, Referal-Gutschrift (einmalige) usw. ein.',10); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_reg','Anmeldeformular','Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!',8); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats',NULL,'Statistiken','Sonstige Statistiken, die nirgenswo reinpassen',6); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','refbanner','Referal-Banner','Fügen Sie neue Banner hinzu, die dann die Mitglieder verlinken können, um neue Mitglieder zu werben. Oder editieren / löschen Sie bestehende. Hier sehen Sie auch die Anzahl der Klicks auf den jeweiligen Banner!',12); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','payments','{!POINTS!}-Vergütungen','Fügen Sie neue {!POINTS!}-Vergütungen hinzu oder ändern / löschen Sie bestende.',11); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('login',NULL,'Willkommen','Eingangsseite zum Admin-Bereich',0); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('logout',NULL,'Ausloggen','Ausloggen aus dem Admin-Bereich. Dadurch wird Ihre Session gelöscht und Sie müssen sich erneut anmelden.',999); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_details','Email-Details ansehen','Sehen Sie sich jedes Details bereits gebuchter Mails an.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_secure','Sicherheitseinstellungen','Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.',9); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_email','Versand, Empfang','Hier können Sie die maximal empfangbaren Mails usw. einstellen.',8); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cats','Kategorien einrichten','Ändern oder löschen Sie bereits bestehende Kategorien oder fügen Sie weitere hinzu.',7); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_points','{?POINTS?}','Stellen Sie hier die Willkommensgutschrift, Referal-Gutschrift (einmalige) usw. ein.',10); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats',NULL,'Statistiken','Sonstige Statistiken, die nirgenswo reinpassen',6); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','refbanner','Referal-Banner','Fügen Sie neue Banner hinzu, die dann die Mitglieder verlinken können, um neue Mitglieder zu werben. Oder editieren / löschen Sie bestehende. Hier sehen Sie auch die Anzahl der Klicks auf den jeweiligen Banner!',12); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','payments','{?POINTS?}-Vergütungen','Fügen Sie neue {?POINTS?}-Vergütungen hinzu oder ändern / löschen Sie bestende.',11); -INSERT INTO `{!prefix!}_cats` VALUES (1,'Mix / Alles Senden --> keine Erotik!','Y',0); -INSERT INTO `{!prefix!}_cats` VALUES (2,'Mix / Alles Senden --> ohne PopUps, keine Erotik','Y',1); -INSERT INTO `{!prefix!}_cats` VALUES (3,'Traffic, Reflinks, Kostenloses, KEIN MLM!','Y',2); -INSERT INTO `{!prefix!}_cats` VALUES (4,'Geldverdienen, Beruf, Arbeit, KEIN MLM!','Y',3); -INSERT INTO `{!prefix!}_cats` VALUES (5,'Download, PC- Software, HP-Design','Y',4); -INSERT INTO `{!prefix!}_cats` VALUES (6,'Investment, Banken, Börse, Versicherungen, KEIN MLM','Y',5); -INSERT INTO `{!prefix!}_cats` VALUES (7,'Politik, Wissenschaft','Y',6); -INSERT INTO `{!prefix!}_cats` VALUES (8,'Handy, SMS, ISDN, DSL,','Y',7); -INSERT INTO `{!prefix!}_cats` VALUES (9,'Elektronik, Technik, Server, PC-Hardware, Hosting','Y',8); -INSERT INTO `{!prefix!}_cats` VALUES (10,'Auto, Motorrad','Y',9); -INSERT INTO `{!prefix!}_cats` VALUES (11,'Reise,Touristik','Y',10); -INSERT INTO `{!prefix!}_cats` VALUES (12,'Kunst, Kultur, Bildung','Y',11); -INSERT INTO `{!prefix!}_cats` VALUES (13,'Gesundheit, Fitness, Sport, KEIN MLM!','Y',12); -INSERT INTO `{!prefix!}_cats` VALUES (14,'Lifestyle, Mode, Kosmetik, KEIN MLM!','Y',13); -INSERT INTO `{!prefix!}_cats` VALUES (15,'Auktionen, Shopping, Verkauf, KEIN MLM!','Y',14); -INSERT INTO `{!prefix!}_cats` VALUES (16,'Medien, Musik, Film, TV, Video & DVD','Y',15); -INSERT INTO `{!prefix!}_cats` VALUES (17,'Singles, Flirten, Partnerschaft','Y',16); -INSERT INTO `{!prefix!}_cats` VALUES (18,'Gewinnspiele, Wetten, Lotto, KEIN MLM!','Y',17); -INSERT INTO `{!prefix!}_cats` VALUES (19,'Haus, Garten, Freizeit, Hobbys','Y',18); -INSERT INTO `{!prefix!}_cats` VALUES (20,'Erotik --> Keine Hardcore !','Y',19); -INSERT INTO `{!prefix!}_cats` VALUES (21,'Multi Level Marketing (alle Arten)','Y',20); -INSERT INTO `{!prefix!}_cats` VALUES (22,'Klammlose-Seiten','Y',21); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (1,'Mix / Alles Senden --> keine Erotik!','Y',0); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (2,'Mix / Alles Senden --> ohne PopUps, keine Erotik','Y',1); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (3,'Traffic, Reflinks, Kostenloses, KEIN MLM!','Y',2); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (4,'Geldverdienen, Beruf, Arbeit, KEIN MLM!','Y',3); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (5,'Download, PC- Software, HP-Design','Y',4); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (6,'Investment, Banken, Börse, Versicherungen, KEIN MLM','Y',5); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (7,'Politik, Wissenschaft','Y',6); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (8,'Handy, SMS, ISDN, DSL,','Y',7); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (9,'Elektronik, Technik, Server, PC-Hardware, Hosting','Y',8); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (10,'Auto, Motorrad','Y',9); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (11,'Reise,Touristik','Y',10); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (12,'Kunst, Kultur, Bildung','Y',11); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (13,'Gesundheit, Fitness, Sport, KEIN MLM!','Y',12); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (14,'Lifestyle, Mode, Kosmetik, KEIN MLM!','Y',13); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (15,'Auktionen, Shopping, Verkauf, KEIN MLM!','Y',14); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (16,'Medien, Musik, Film, TV, Video & DVD','Y',15); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (17,'Singles, Flirten, Partnerschaft','Y',16); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (18,'Gewinnspiele, Wetten, Lotto, KEIN MLM!','Y',17); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (19,'Haus, Garten, Freizeit, Hobbys','Y',18); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (20,'Erotik --> Keine Hardcore !','Y',19); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (21,'Multi Level Marketing (alle Arten)','Y',20); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (22,'Klammlose-Seiten','Y',21); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen',1,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Hauptmenü',0,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','register','Anmeldung',2,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','confirm','Bestätigungslink',3,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members',NULL,'Mitglieder',1,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','login','Einloggen',3,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','impressum','Impressum',5,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','agb','AGBs',4,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','infos','Infos',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Hauptmenü',0,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','register','Anmeldung',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','confirm','Bestätigungslink',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members',NULL,'Mitglieder',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','login','Einloggen',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','impressum','Impressum',5,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','agb','AGBs',4,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','infos','Infos',2,'Y','N'); -INSERT INTO `{!prefix!}_max_receive` VALUES (1,0,'Urlaub'); -INSERT INTO `{!prefix!}_max_receive` VALUES (2,50,'Bonus möglich!'); -INSERT INTO `{!prefix!}_max_receive` VALUES (3,90,'Bonus möglich!'); -INSERT INTO `{!prefix!}_max_receive` VALUES (4,5,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (5,10,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (6,15,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (7,20,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (8,25,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (9,30,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (10,35,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (11,40,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (12,45,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (1,0,'Urlaub'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (2,50,'Bonus möglich!'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (3,90,'Bonus möglich!'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (4,5,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (5,10,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (6,15,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (7,20,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (8,25,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (9,30,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (10,35,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (11,40,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (12,45,''); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Mitgliedsmenü',0,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen!',1,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout','logout','Ausloggen',999,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mydata','Profildaten ändern',2,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout',NULL,'Ausloggen',1,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{!POINTS!}-Guthaben',4,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien auswählen',3,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Mitgliedsmenü',0,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen!',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout','logout','Ausloggen',999,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mydata','Profildaten ändern',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout',NULL,'Ausloggen',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{?POINTS?}-Guthaben',4,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien auswählen',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); -INSERT INTO `{!prefix!}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); -INSERT INTO `{!prefix!}_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); -INSERT INTO `{!prefix!}_payments` VALUES (3,30,30.000,'Klick-Mail 30 Sek.',29.000); -INSERT INTO `{!prefix!}_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000); -INSERT INTO `{!prefix!}_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (3,30,30.000,'Klick-Mail 30 Sek.',29.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <strong>Nur bei Normal-Mails:</strong> {!POINTS!} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <strong>Nur bei Normal-Mails:</strong> {?POINTS?} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin','admin','Zum Admin-Bereich','4','N','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin','admin','Zum Admin-Bereich','4','N','N'); diff --git a/install/menu-en.sql b/install/menu-en.sql index 73611c1ea9..4bcd8a4d2b 100644 --- a/install/menu-en.sql +++ b/install/menu-en.sql @@ -1,93 +1,92 @@ -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('login',NULL,'Willkommen','Eingangsseite zum Admin-Bereich',0); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('logout',NULL,'Ausloggen','Ausloggen aus dem Admin-Bereich. Dadurch wird Ihre Session gelöscht und Sie müssen sich erneut anmelden.',999); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_details','Email-Details ansehen','Sehen Sie sich jedes Details bereits gebuchter Mails an.',5); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_secure','Sicherheitseinstellungen','Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.',9); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_email','Versand, Empfang','Hier können Sie die maximal empfangbaren Mails usw. einstellen.',8); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cats','Kategorien einrichten','Ändern oder löschen Sie bereits bestehende Kategorien oder fügen Sie weitere hinzu.',7); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_points','{!POINTS!}','Stellen Sie hier die Willkommensgutschrift, Referal-Gutschrift (einmalige) usw. ein.',10); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_reg','Anmeldeformular','Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!',8); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats',NULL,'Statistiken','Sonstige Statistiken, die nirgenswo reinpassen',6); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','refbanner','Referal-Banner','Fügen Sie neue Banner hinzu, die dann die Mitglieder verlinken können, um neue Mitglieder zu werben. Oder editieren / löschen Sie bestehende. Hier sehen Sie auch die Anzahl der Klicks auf den jeweiligen Banner!',12); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','payments','{!POINTS!}-Vergütungen','Fügen Sie neue {!POINTS!}-Vergütungen hinzu oder ändern / löschen Sie bestende.',11); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('login',NULL,'Willkommen','Eingangsseite zum Admin-Bereich',0); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('logout',NULL,'Ausloggen','Ausloggen aus dem Admin-Bereich. Dadurch wird Ihre Session gelöscht und Sie müssen sich erneut anmelden.',999); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email',NULL,'Email-Management','Gebuchte Mails umleiten, Details zu den Buchungen anzeigen, Emails freigeben, registrierte Email-Adress auf Verfügbarkeit testen (Mass-Mailing!), Newsletter versenden, Email-Adressen sperren (Email-Backlist), gebuchte URLs sperren (URL-Blacklist)',4); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup',NULL,'Einstellungen','Interessen ändern, News schreiben, allgmeine Einstellungen (Auto-Versand usw.). Auto-Lock Funktion einrichten, manueller Lock des Versandes einrichten, Teile der Homepage sperren (wegen Wartungsarbeiten)',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc',NULL,'Verschiedenes','Verschiedene Einstellungen / Info-Seiten, die sonst nirgenswo reinpassten...',6); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','newsletter','Newsletter versenden','Text- oder HTML-Newsletter verschicken.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_stats','Email-Statistiken','Schauen Sie sich detailierte Statistiken zu den bereits versanden Mails an.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','edit_emails','Email-Daten ändern','Hier können Sie u.a. die gebuchte URL der Emails umändern, usw.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','unlock_emails','Emails freigeben','Geben Sie bei manuellem Versand gebuchte Mails hier frei.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_details','Email-Details ansehen','Sehen Sie sich jedes Details bereits gebuchter Mails an.',5); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_secure','Sicherheitseinstellungen','Stellen Sie ein, wie lange das Passwort eines Mitgliedes mindestens sein muss uvm.',9); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_email','Versand, Empfang','Hier können Sie die maximal empfangbaren Mails usw. einstellen.',8); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cats','Kategorien einrichten','Ändern oder löschen Sie bereits bestehende Kategorien oder fügen Sie weitere hinzu.',7); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_points','{?POINTS?}','Stellen Sie hier die Willkommensgutschrift, Referal-Gutschrift (einmalige) usw. ein.',10); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats',NULL,'Statistiken','Sonstige Statistiken, die nirgenswo reinpassen',6); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','refbanner','Referal-Banner','Fügen Sie neue Banner hinzu, die dann die Mitglieder verlinken können, um neue Mitglieder zu werben. Oder editieren / löschen Sie bestehende. Hier sehen Sie auch die Anzahl der Klicks auf den jeweiligen Banner!',12); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','payments','{?POINTS?}-Vergütungen','Fügen Sie neue {?POINTS?}-Vergütungen hinzu oder ändern / löschen Sie bestende.',11); -INSERT INTO `{!prefix!}_cats` VALUES (1,'Mix / Alles Senden --> keine Erotik!','Y',0); -INSERT INTO `{!prefix!}_cats` VALUES (2,'Mix / Alles Senden --> ohne PopUps, keine Erotik','Y',1); -INSERT INTO `{!prefix!}_cats` VALUES (3,'Traffic, Reflinks, Kostenloses, KEIN MLM!','Y',2); -INSERT INTO `{!prefix!}_cats` VALUES (4,'Geldverdienen, Beruf, Arbeit, KEIN MLM!','Y',3); -INSERT INTO `{!prefix!}_cats` VALUES (5,'Download, PC- Software, HP-Design','Y',4); -INSERT INTO `{!prefix!}_cats` VALUES (6,'Investment, Banken, Börse, Versicherungen, KEIN MLM','Y',5); -INSERT INTO `{!prefix!}_cats` VALUES (7,'Politik, Wissenschaft','Y',6); -INSERT INTO `{!prefix!}_cats` VALUES (8,'Handy, SMS, ISDN, DSL,','Y',7); -INSERT INTO `{!prefix!}_cats` VALUES (9,'Elektronik, Technik, Server, PC-Hardware, Hosting','Y',8); -INSERT INTO `{!prefix!}_cats` VALUES (10,'Auto, Motorrad','Y',9); -INSERT INTO `{!prefix!}_cats` VALUES (11,'Reise,Touristik','Y',10); -INSERT INTO `{!prefix!}_cats` VALUES (12,'Kunst, Kultur, Bildung','Y',11); -INSERT INTO `{!prefix!}_cats` VALUES (13,'Gesundheit, Fitness, Sport, KEIN MLM!','Y',12); -INSERT INTO `{!prefix!}_cats` VALUES (14,'Lifestyle, Mode, Kosmetik, KEIN MLM!','Y',13); -INSERT INTO `{!prefix!}_cats` VALUES (15,'Auktionen, Shopping, Verkauf, KEIN MLM!','Y',14); -INSERT INTO `{!prefix!}_cats` VALUES (16,'Medien, Musik, Film, TV, Video & DVD','Y',15); -INSERT INTO `{!prefix!}_cats` VALUES (17,'Singles, Flirten, Partnerschaft','Y',16); -INSERT INTO `{!prefix!}_cats` VALUES (18,'Gewinnspiele, Wetten, Lotto, KEIN MLM!','Y',17); -INSERT INTO `{!prefix!}_cats` VALUES (19,'Haus, Garten, Freizeit, Hobbys','Y',18); -INSERT INTO `{!prefix!}_cats` VALUES (20,'Erotik --> Keine Hardcore !','Y',19); -INSERT INTO `{!prefix!}_cats` VALUES (21,'Multi Level Marketing (alle Arten)','Y',20); -INSERT INTO `{!prefix!}_cats` VALUES (22,'Klammlose-Seiten','Y',21); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (1,'Mix / Alles Senden --> keine Erotik!','Y',0); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (2,'Mix / Alles Senden --> ohne PopUps, keine Erotik','Y',1); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (3,'Traffic, Reflinks, Kostenloses, KEIN MLM!','Y',2); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (4,'Geldverdienen, Beruf, Arbeit, KEIN MLM!','Y',3); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (5,'Download, PC- Software, HP-Design','Y',4); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (6,'Investment, Banken, Börse, Versicherungen, KEIN MLM','Y',5); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (7,'Politik, Wissenschaft','Y',6); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (8,'Handy, SMS, ISDN, DSL,','Y',7); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (9,'Elektronik, Technik, Server, PC-Hardware, Hosting','Y',8); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (10,'Auto, Motorrad','Y',9); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (11,'Reise,Touristik','Y',10); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (12,'Kunst, Kultur, Bildung','Y',11); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (13,'Gesundheit, Fitness, Sport, KEIN MLM!','Y',12); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (14,'Lifestyle, Mode, Kosmetik, KEIN MLM!','Y',13); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (15,'Auktionen, Shopping, Verkauf, KEIN MLM!','Y',14); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (16,'Medien, Musik, Film, TV, Video & DVD','Y',15); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (17,'Singles, Flirten, Partnerschaft','Y',16); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (18,'Gewinnspiele, Wetten, Lotto, KEIN MLM!','Y',17); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (19,'Haus, Garten, Freizeit, Hobbys','Y',18); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (20,'Erotik --> Keine Hardcore !','Y',19); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (21,'Multi Level Marketing (alle Arten)','Y',20); +INSERT INTO `{?_MYSQL_PREFIX?}_cats` VALUES (22,'Klammlose-Seiten','Y',21); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen',1,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Hauptmenü',0,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','register','Anmeldung',2,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','confirm','Bestätigungslink',3,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members',NULL,'Mitglieder',1,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','login','Einloggen',3,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','impressum','Impressum',5,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','agb','AGBs',4,'Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','infos','Infos',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Hauptmenü',0,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','register','Anmeldung',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','confirm','Bestätigungslink',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members',NULL,'Mitglieder',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('members','login','Einloggen',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','impressum','Impressum',5,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','agb','AGBs',4,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','infos','Infos',2,'Y','N'); -INSERT INTO `{!prefix!}_max_receive` VALUES (1,0,'Urlaub'); -INSERT INTO `{!prefix!}_max_receive` VALUES (2,50,'Bonus möglich!'); -INSERT INTO `{!prefix!}_max_receive` VALUES (3,90,'Bonus möglich!'); -INSERT INTO `{!prefix!}_max_receive` VALUES (4,5,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (5,10,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (6,15,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (7,20,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (8,25,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (9,30,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (10,35,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (11,40,''); -INSERT INTO `{!prefix!}_max_receive` VALUES (12,45,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (1,0,'Urlaub'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (2,50,'Bonus möglich!'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (3,90,'Bonus möglich!'); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (4,5,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (5,10,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (6,15,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (7,20,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (8,25,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (9,30,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (10,35,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (11,40,''); +INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` VALUES (12,45,''); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Mitgliedsmenü',0,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen!',1,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout','logout','Ausloggen',999,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mydata','Profildaten ändern',2,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout',NULL,'Ausloggen',1,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{!POINTS!}-Guthaben',4,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien auswählen',3,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); -INSERT INTO `{!prefix!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main',NULL,'Mitgliedsmenü',0,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','welcome','Willkommen!',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout','logout','Ausloggen',999,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mydata','Profildaten ändern',2,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('logout',NULL,'Ausloggen',1,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{?POINTS?}-Guthaben',4,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien auswählen',3,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); +INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); -INSERT INTO `{!prefix!}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); -INSERT INTO `{!prefix!}_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); -INSERT INTO `{!prefix!}_payments` VALUES (3,30,30.000,'Klick-Mail 30 Sek.',29.000); -INSERT INTO `{!prefix!}_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000); -INSERT INTO `{!prefix!}_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (3,30,30.000,'Klick-Mail 30 Sek.',29.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (4,40,40.000,'Klick-Mail 40 Sek.',39.000); +INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (5,50,50.000,'Klick-Mail 50 Sek.',49.000); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <strong>Nur bei Normal-Mails:</strong> {!POINTS!} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); -INSERT INTO `{!prefix!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','email_archiv','E-Mail Archiv','Sehen Sie sich hier bereits gesendete Mails an.','6'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','del_email','E-Mail löschen','Löschen Sie hierrüber E-Mails (sowohl Bonus- als auch Normal-Mails) aus Ihrem Mailtausch-System. <strong>Nur bei Normal-Mails:</strong> {?POINTS?} aus den unbestätigten Mails werden dem Werber wieder vergütet.','7'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); +INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); -INSERT INTO `{!prefix!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin','admin','Zum Admin-Bereich','4','N','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin','admin','Zum Admin-Bereich','4','N','N'); diff --git a/install/tables.sql b/install/tables.sql index 4e08999a3d..4169ca5415 100644 --- a/install/tables.sql +++ b/install/tables.sql @@ -1,5 +1,5 @@ -DROP TABLE IF EXISTS `{!prefix!}_admin_menu`; -CREATE TABLE `{!prefix!}_admin_menu` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admin_menu`; +CREATE TABLE `{?_MYSQL_PREFIX?}_admin_menu` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `action` VARCHAR(255) NOT NULL DEFAULT '', `what` VARCHAR(255) NULL DEFAULT NULL, @@ -7,27 +7,29 @@ CREATE TABLE `{!prefix!}_admin_menu` ( `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `descr` TEXT NOT NULL, PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_admins`; -CREATE TABLE `{!prefix!}_admins` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins`; +CREATE TABLE `{?_MYSQL_PREFIX?}_admins` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `login` VARCHAR(100) NOT NULL DEFAULT '', `password` VARCHAR(40) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) -) TYPE={!type!}; + `email` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY (`login`) +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_cats`; -CREATE TABLE `{!prefix!}_cats` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_cats`; +CREATE TABLE `{?_MYSQL_PREFIX?}_cats` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `cat` VARCHAR(255) NOT NULL DEFAULT '', `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y', `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_config`; -CREATE TABLE `{!prefix!}_config` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_config`; +CREATE TABLE `{?_MYSQL_PREFIX?}_config` ( `config` tinyint(1) NOT NULL DEFAULT 0, `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -41,13 +43,34 @@ CREATE TABLE `{!prefix!}_config` ( `max_tlength` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1000', `test_subj` ENUM('Y','N') NOT NULL DEFAULT 'Y', `autosend_active` ENUM('Y','N') NOT NULL DEFAULT 'N', - PRIMARY KEY (`config`) -) TYPE={!type!}; - -INSERT INTO `{!prefix!}_config` VALUES (0,5,2000,200,5,'Y','N','Y',86400,'Y',1000,'Y','N'); - -DROP TABLE IF EXISTS `{!prefix!}_guest_menu`; -CREATE TABLE `{!prefix!}_guest_menu` ( + `max_send` TINYINT(3) UNSIGNED NOT NULL DEFAULT '100', + `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y', + `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '14', + `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', + `last_update` VARCHAR(10) NOT NULL DEFAULT 0, + `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100', + `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400', + `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800', + `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, + `mad_count` BIGINT(20) UNSIGNED NOT NULL, + `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000', + `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y', + `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800', + `patch_level` VARCHAR(100) NOT NULL DEFAULT '78', + `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0, + `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, + `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS', + `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, + `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100, + `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y', + `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y', + `ip_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400, + `allow_direct_pay` ENUM('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`config`) +) TYPE={?_TABLE_TYPE?}; + +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_guest_menu`; +CREATE TABLE `{?_MYSQL_PREFIX?}_guest_menu` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `action` VARCHAR(255) NOT NULL DEFAULT '', `what` VARCHAR(255) NULL DEFAULT NULL, @@ -57,18 +80,18 @@ CREATE TABLE `{!prefix!}_guest_menu` ( `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y', `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_max_receive`; -CREATE TABLE `{!prefix!}_max_receive` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_max_receive`; +CREATE TABLE `{?_MYSQL_PREFIX?}_max_receive` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `value` MEDIUMINT(9) NOT NULL DEFAULT 0, `comment` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_member_menu`; -CREATE TABLE `{!prefix!}_member_menu` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_member_menu`; +CREATE TABLE `{?_MYSQL_PREFIX?}_member_menu` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `action` VARCHAR(255) NOT NULL DEFAULT '', `what` VARCHAR(255) NULL DEFAULT NULL, @@ -78,10 +101,10 @@ CREATE TABLE `{!prefix!}_member_menu` ( `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y', `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_mod_reg`; -CREATE TABLE `{!prefix!}_mod_reg` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mod_reg`; +CREATE TABLE `{?_MYSQL_PREFIX?}_mod_reg` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `module` VARCHAR(50) NOT NULL DEFAULT '', `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y', @@ -91,153 +114,114 @@ CREATE TABLE `{!prefix!}_mod_reg` ( `mem_only` ENUM('Y','N') NOT NULL DEFAULT 'N', `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; - -INSERT INTO `{!prefix!}_mod_reg` VALUES (1,'admin','N','N','Y','','N',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (2,'index','N','N','N','','N',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (3,'css','N','N','N','','Y',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (4,'login','N','N','N','','Y',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (5,'js','N','N','N','','Y',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (6,'frametester','N','Y','N','','N',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (7,'loader','N','Y','N','','N',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (8,'confirm','N','N','N','','N',0); -INSERT INTO `{!prefix!}_mod_reg` VALUES (9,'chk_login','N','N','N','','N',0); - -DROP TABLE IF EXISTS `{!prefix!}_payments`; -CREATE TABLE `{!prefix!}_payments` ( +) TYPE={?_TABLE_TYPE?}; + +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payments`; +CREATE TABLE `{?_MYSQL_PREFIX?}_payments` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `time` INT(7) NOT NULL DEFAULT 0, `payment` FLOAT(5,3) UNSIGNED NOT NULL DEFAULT '0.000', `mail_title` VARCHAR(255) NOT NULL DEFAULT '', `price` FLOAT(5,5) UNSIGNED NOT NULL DEFAULT '0.00000', PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_pool`; -CREATE TABLE `{!prefix!}_pool` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_pool`; +CREATE TABLE `{?_MYSQL_PREFIX?}_pool` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `sender` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(200) NOT NULL DEFAULT '', `text` LONGTEXT NOT NULL, `receivers` LONGTEXT NOT NULL, `payment_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, - `data_type` ENUM('TEMP','SEND','NEW','ADMIN') NOT NULL DEFAULT 'TEMP', + `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP', `timestamp` VARCHAR(10) NOT NULL DEFAULT 0, `url` TINYTEXT NOT NULL, `target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) TYPE={!type!}; - -DROP TABLE IF EXISTS `{!prefix!}_refbanner`; -CREATE TABLE `{!prefix!}_refbanner` ( + `zip` VARCHAR(6) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + INDEX (`sender`), + INDEX (`payment_id`), + INDEX (`cat_id`) +) TYPE={?_TABLE_TYPE?}; + +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_refbanner`; +CREATE TABLE `{?_MYSQL_PREFIX?}_refbanner` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `url` TEXT NOT NULL, `alternate` TEXT NOT NULL, `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y', `counter` BIGINT(22) NOT NULL DEFAULT 0, + `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_refdepths`; -CREATE TABLE `{!prefix!}_refdepths` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_refdepths`; +CREATE TABLE `{?_MYSQL_PREFIX?}_refdepths` ( `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT, `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, `percents` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) TYPE={!type!}; - -INSERT INTO `{!prefix!}_refdepths` VALUES (1,0,100); -INSERT INTO `{!prefix!}_refdepths` VALUES (2,1,30); -INSERT INTO `{!prefix!}_refdepths` VALUES (3,2,15); -INSERT INTO `{!prefix!}_refdepths` VALUES (4,3,10); -INSERT INTO `{!prefix!}_refdepths` VALUES (5,4,8); -INSERT INTO `{!prefix!}_refdepths` VALUES (6,5,5); +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_refsystem`; -CREATE TABLE `{!prefix!}_refsystem` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_refsystem`; +CREATE TABLE `{?_MYSQL_PREFIX?}_refsystem` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, + INDEX (`userid`), PRIMARY KEY (`id`) -) TYPE={!type!}; - -ALTER TABLE `{!prefix!}_config` ADD `max_send` TINYINT(3) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `{!prefix!}_config` ADD `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y'; -ALTER TABLE `{!prefix!}_config` ADD `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '14'; -ALTER TABLE `{!prefix!}_config` ADD `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y'; - -ALTER TABLE `{!prefix!}_pool` MODIFY `url` TINYTEXT NOT NULL; -ALTER TABLE `{!prefix!}_pool` CHANGE `url` `url` TINYTEXT NOT NULL; -ALTER TABLE `{!prefix!}_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'; +) TYPE={?_TABLE_TYPE?}; -ALTER TABLE `{!prefix!}_config` ADD `last_update` VARCHAR(10) NOT NULL DEFAULT 0; - -INSERT INTO `{!prefix!}_mod_reg` VALUES (NULL,'chk_login','N','N','N','','N',0); -ALTER TABLE `{!prefix!}_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'; -ALTER TABLE `{!prefix!}_config` ADD `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `{!prefix!}_config` ADD `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'; -ALTER TABLE `{!prefix!}_refbanner` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0; -ALTER TABLE `{!prefix!}_config` ADD `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'; - -ALTER TABLE `{!prefix!}_config` ADD `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0; -ALTER TABLE `{!prefix!}_config` ADD `mad_count` BIGINT(20) UNSIGNED NOT NULL; -ALTER TABLE `{!prefix!}_config` ADD `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000'; -ALTER TABLE `{!prefix!}_config` ADD `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y'; -ALTER TABLE `{!prefix!}_config` ADD `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800'; - -ALTER TABLE `{!prefix!}_config` ADD `patch_level` VARCHAR(100) NOT NULL DEFAULT '78'; -ALTER TABLE `{!prefix!}_config` ADD `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0; - -ALTER TABLE `{!prefix!}_admins` ADD `email` VARCHAR(255) NOT NULL; - -DROP TABLE IF EXISTS `{!prefix!}_task_system`; -CREATE TABLE `{!prefix!}_task_system` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_task_system`; +CREATE TABLE `{?_MYSQL_PREFIX?}_task_system` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW', - `task_type` ENUM('FIRST_USER','SUPPORT_MEMBER','SUPPORT_ADMIN','OTHERS','EXTENSION','EXTENSION_UPDATE') NOT NULL DEFAULT 'FIRST_USER', + `task_type` VARCHAR(255) NOT NULL DEFAULT 'FIRST_USER', `subject` VARCHAR(255) NOT NULL DEFAULT '', `text` LONGTEXT NOT NULL, `task_created` VARCHAR(10) NOT NULL DEFAULT 0, - KEY (`assigned_admin`), + INDEX (`assigned_admin`), + INDEX (`userid`), + INDEX (`assigned_admin`), PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -ALTER TABLE `{!prefix!}_pool` ADD INDEX (`sender`); -ALTER TABLE `{!prefix!}_pool` ADD INDEX (`payment_id`); -ALTER TABLE `{!prefix!}_pool` ADD INDEX (`cat_id`); -ALTER TABLE `{!prefix!}_refsystem` ADD INDEX (`userid`); -ALTER TABLE `{!prefix!}_task_system` ADD INDEX (`assigned_admin`); -ALTER TABLE `{!prefix!}_task_system` ADD INDEX (`userid`); - -ALTER TABLE `{!prefix!}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5; -ALTER TABLE `{!prefix!}_config` ADD `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS'; -ALTER TABLE `{!prefix!}_config` ADD `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5; - -DROP TABLE IF EXISTS `{!prefix!}_extensions`; -CREATE TABLE `{!prefix!}_extensions` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_extensions`; +CREATE TABLE `{?_MYSQL_PREFIX?}_extensions` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `ext_name` VARCHAR(255) NOT NULL DEFAULT '', `ext_active` ENUM('Y','N') NOT NULL DEFAULT 'N', `ext_version` VARCHAR(255) NOT NULL DEFAULT 'INVALID', PRIMARY KEY (`id`) -) TYPE={!type!}; +) TYPE={?_TABLE_TYPE?}; -DROP TABLE IF EXISTS `{!prefix!}_jackpot`; -CREATE TABLE `{!prefix!}_jackpot` ( +DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_jackpot`; +CREATE TABLE `{?_MYSQL_PREFIX?}_jackpot` ( `ok` CHAR(2) NOT NULL DEFAULT 'ok', `points` FLOAT(20,3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`ok`) -) TYPE={!type!}; - -ALTER TABLE `{!prefix!}_config` ADD `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100; -ALTER TABLE `{!prefix!}_config` ADD `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y'; -ALTER TABLE `{!prefix!}_config` ADD `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'; -ALTER TABLE `{!prefix!}_config` ADD `ip_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400; -ALTER TABLE `{!prefix!}_pool` ADD `zip` VARCHAR(6) NOT NULL DEFAULT ''; - -ALTER TABLE `{!prefix!}_task_system` CHANGE `task_type` `task_type` VARCHAR(255) NOT NULL DEFAULT 'FIRST_USER'; -ALTER TABLE `{!prefix!}_config` ADD `allow_direct_pay` ENUM('Y','N') NOT NULL DEFAULT 'N'; +) TYPE={?_TABLE_TYPE?}; + +INSERT INTO `{?_MYSQL_PREFIX?}_config` (`config`) VALUES (0); + +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('admin','N','N','Y','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('index','N','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('css','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('login','N','N','N','','Y'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('js','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('frametester','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('loader','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('confirm','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`title`,`mem_only`) VALUES ('chk_login','N','Y','N','','N'); + +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (0,100); +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (1,30); +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (2,15); +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (3,10); +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (4,8); +INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`,`percents`) VALUES (5,5); diff --git a/js.php b/js.php index c991ed3a83..88ae66ee00 100644 --- a/js.php +++ b/js.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -52,23 +52,23 @@ $GLOBALS['module'] = 'js'; // Load the required file(s) require('inc/config-global.php'); -// Is this script installed and a JavaScript tag is provied? -if ((isInstalled()) && (REQUEST_ISSET_GET('tag'))) { +// Is 'js' is provied? +if (isGetRequestElementSet('js')) { // Set header - sendHeader('Content-type: text/javascript'); + setContentType('text/javascript'); // Load header loadIncludeOnce('inc/header.php'); // Prepare include file for looking - $INC = sprintf("inc/js/js-%s.php", - REQUEST_GET('tag') + $inc = sprintf("inc/js/js-%s.php", + getRequestElement('js') ); // Is that file readable? - if (isIncludeReadable($INC)) { + if (isIncludeReadable($inc)) { // Include it - loadIncludeOnce($INC); + loadIncludeOnce($inc); } // END - if // Load footer diff --git a/lead-confirm.php b/lead-confirm.php index 379ee5b588..6f2b0ef79d 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,11 +51,8 @@ $GLOBALS['output_mode'] = '0'; // Load config.php require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if +// Set content type +setContentType('text/html'); // Is the extension active? redirectOnUninstalledExtension('lead'); @@ -65,27 +62,24 @@ loadIncludeOnce('inc/header.php'); // Initialize the array for the template $content = array( - 'lead_uid' => -1, + 'lead_userid' => -1, 'lead_email' => 'INVALID@EMAIL' ); // Is the cookie set? -if (isSessionVariableSet('lead_uid')) { +if (isSessionVariableSet('lead_userid')) { // 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", - array(bigintval(getSession('lead_uid'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", + array(bigintval(getSession('lead_userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Secure the ID number - $content['lead_uid'] = bigintval(getSession('lead_uid')); + $content['lead_userid'] = bigintval(getSession('lead_userid')); // Load the email address list($email) = SQL_FETCHROW($result); - - // Compile email - $content['lead_email'] = COMPILE_CODE($email); } else { // Not found! - $content['lead_uid'] = 0; + $content['lead_userid'] = 0; } } else { // Maybe spider? @@ -93,7 +87,7 @@ if (isSessionVariableSet('lead_uid')) { } // Load the lead template -LOAD_TEMPLATE('lead_code', false, $content); +loadTemplate('lead_code', false, $content); // Footer loadIncludeOnce('inc/footer.php'); diff --git a/login.php b/login.php index 89cf5207b0..45fc27fc3d 100644 --- a/login.php +++ b/login.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,14 +48,8 @@ $GLOBALS['output_mode'] = '0'; // Load the required file(s) require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Is this a member? -if (IS_MEMBER()) { +if (isMember()) { // Then redirect into login area redirectToUrl('modules.php?module=login'); } else { diff --git a/mailid.php b/mailid.php index dfc023c055..a573a245ff 100644 --- a/mailid.php +++ b/mailid.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,36 +50,34 @@ $errorCode = ''; // Load the required file(s) require('inc/config-global.php'); -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if +// Set content type +setContentType('text/html'); // Is the extension active? redirectOnUninstalledExtension('mailid'); // Init -$url_uid = 0; +$url_userid = 0; $url_bid = 0; $url_mid = 0; // Secure all data -if (REQUEST_ISSET_GET('uid')) $url_uid = bigintval(REQUEST_GET('uid')); -if (REQUEST_ISSET_GET('mailid')) $url_mid = bigintval(REQUEST_GET('mailid')); -if (REQUEST_ISSET_GET('bonusid')) $url_bid = bigintval(REQUEST_GET('bonusid')); +if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid')); +if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid')); +if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid')); // 01 1 12 3 32 21 1 22 10 -if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { +if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { // 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_userid), __FILE__, __LINE__); $type = 'mailid'; $urlId = $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_userid), __FILE__, __LINE__); $type = 'bonusid'; $urlId = $url_bid; } else { // Problem: No ID entered @@ -98,7 +96,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors { 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", + $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; @@ -107,7 +105,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors redirectOnUninstalledExtension('bonus'); // Bonus-Mails - $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", array($url_bid), __FILE__, __LINE__); break; @@ -123,17 +121,14 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // Free result SQL_FREERESULT($result); - // Compile extra title - $title = COMPILE_CODE($title); - // Set it setExtraTitle($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_userid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { - list($status, $gender, $sname, $fname) = SQL_FETCHROW($result); + list($status, $gender, $surname, $family) = SQL_FETCHROW($result); SQL_FREERESULT($result); if ($status == 'CONFIRMED') { // User has confirmed his account so we can procede... @@ -141,7 +136,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors 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__); if (SQL_NUMROWS($result) == 1) { list($pay) = SQL_FETCHROW($result); @@ -155,7 +150,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors break; case 'BONUS': - $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1", + $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); @@ -182,14 +177,14 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors if (($time > 0) && (($payment > 0) || ($points > 0))) { // Export data into constants for the template $content = array( - 'uid' => $url_uid, + 'userid' => $url_userid, 'type' => $type, 'data' => $urlId, - 'url' => DEREFERER($URL) + 'url' => generateDerefererUrl($URL) ); // Load template - LOAD_TEMPLATE('mailid_frames'); + loadTemplate('mailid_frames'); } else { $errorCode = getCode('DATA_INVALID'); } @@ -218,25 +213,31 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // Error code is set? if (!empty($errorCode)) { - // @TODO Rewrite this to a filter + // @TODO Rewrite this to a dynamic include or so switch (getConfig('mailid_error_redirect')) { case 'INDEX': // Redirect to index page - redirectToUrl('modules.php?module=index&msg=' . $errorCode . '&ext=mailid'); + redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=mailid'); break; case 'REJECT': // Redirect to rejection page - redirectToConfiguredUrl('reject_url'); + if (isExtensionActive('other')) { + // Redirect to configured URL + redirectToConfiguredUrl('reject_url'); + } else { + // Redirect to index + redirectToUrl('index.php'); + } break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect'))); - redirectToUrl('modules.php?module=index&msg=' . getCode('UNKNOWN_STATUS') . '&ext=mailid'); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect'))); + redirectToUrl('modules.php?module=index&code=' . getCode('UNKNOWN_STATUS') . '&ext=mailid'); break; - } -} else { - // Include footer - loadIncludeOnce('inc/footer.php'); -} + } // END - switch +} // END - if + +// Include footer +loadIncludeOnce('inc/footer.php'); // [EOF] ?> diff --git a/mailid_top.php b/mailid_top.php index 36d762fc6b..fa10da86cb 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,35 +49,33 @@ $GLOBALS['output_mode'] = 0; // Load the required file(s) require('inc/config-global.php'); -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if +// Set content type +setContentType('text/html'); // Is the extension active redirectOnUninstalledExtension('mailid'); // Secure all data -$url_uid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = ''; -if (REQUEST_ISSET_GET('uid')) $url_uid = bigintval(REQUEST_GET('uid')); -if (REQUEST_ISSET_GET('mailid')) $url_mid = bigintval(REQUEST_GET('mailid')); -if (REQUEST_ISSET_GET('bonusid')) $url_bid = bigintval(REQUEST_GET('bonusid')); -if (REQUEST_ISSET_GET('code')) $code = bigintval(REQUEST_GET('code')); -if (REQUEST_ISSET_GET('mode')) $mode = REQUEST_GET('mode'); +$url_userid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = ''; +if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid')); +if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid')); +if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid')); +if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code')); +if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode'); // 01 1 12 2 2 21 1 22 10 -if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { +if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { // No image? Then output header if ($mode != 'img') loadIncludeOnce('inc/header.php'); // 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", - array($url_mid, $url_uid), __FILE__, __LINE__); + $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_userid), __FILE__, __LINE__); $type = 'mailid'; $urlId = $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", - array($url_bid, $url_uid), __FILE__, __LINE__); + $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_userid), __FILE__, __LINE__); $type = 'bonusid'; $urlId = $url_bid; } @@ -89,13 +87,13 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // @TODO Rewrite this to a filter switch ($ltype) { case 'NORMAL': - $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__); + $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", - array($url_bid), __FILE__, __LINE__); + $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; default: // Unknown type @@ -118,27 +116,27 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors 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", - array($url_uid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", + array($url_userid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load data - list($status, $gender, $sname, $fname, $ref_pay) = SQL_FETCHROW($result); + list($status, $gender, $surname, $family, $ref_pay) = SQL_FETCHROW($result); // Free some memory SQL_FREERESULT($result); 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", - array($url_uid), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_online`=UNIX_TIMESTAMP(), `last_module`='mailid_top' WHERE `userid`=%s LIMIT 1", + array($url_userid), __FILE__, __LINE__); // User has confirmed his account so we can procede... // @TODO Rewrite this to a filter 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__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -153,8 +151,8 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors break; case 'BONUS': - $result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval($pool)), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `time`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + array(bigintval($pool)), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -177,7 +175,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors if (($time > 0) && ($payment > 0)) { if (!empty($code)) { // Generate code - $img_code = generateRandomCode(getConfig('code_length'), $code, $url_uid, $urlId); + $img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId); } // END - if // @TODO Rewrite this to a filter @@ -188,61 +186,60 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // Count clicks // @TODO Rewrite this to a filter - switch ($ltype) - { + switch ($ltype) { case 'NORMAL': - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1", - array($url_mid), __FILE__, __LINE__); + 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 - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update database - MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1); - } + updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'add', 1); + } // END - if $stats_data = $url_mid; break; case 'BONUS': - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + 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 - if (GET_EXT_VERSION('mediadata') >= '0.0.4') { + if (getExtensionVersion('mediadata') >= '0.0.4') { // Update database - MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks'), 'add', 1); - } + updateMediadataEntry(array('total_clicks', 'bonus_clicks'), 'add', 1); + } // END - if $stats_data = $url_bid; break; default: // Unknown type debug_report_bug('Unknown mail type ' . $ltype . ' detected.'); break; - } + } // END - switch // Export data into constants for the template $content['points'] = translateComma($payment); - $content['banner'] = LOAD_TEMPLATE('mailid_banner', true); + $content['banner'] = loadTemplate('mailid_banner', true); // Only when user extension = v0.1.2: Update mails-confirmed counter // @TODO Rewrite these blocks to filter - if (GET_EXT_VERSION('user') >= '0.1.2') { + if (getExtensionVersion('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", - array($url_uid), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE `userid`=%s LIMIT 1", + array($url_userid), __FILE__, __LINE__); // Update random confirmed as well? - if (GET_EXT_VERSION('user') >= '0.3.4') { + if (getExtensionVersion('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", - array($url_uid), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE `userid`=%s LIMIT 1", + array($url_userid), __FILE__, __LINE__); } // END - if } // END - if // Insert stats record - insertUserStatsRecord($url_uid, $type, $stats_data); + insertUserStatsRecord($url_userid, $type, $stats_data); // Right code entered? - if (bigintval(REQUEST_POST('gfx_check')) == $img_code) { + if (bigintval(postRequestElement('gfx_check')) == $img_code) { // Add points over referal system is the default $locked = false; $template = 'mailid_points_done'; @@ -255,26 +252,27 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors } // 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", - array($url_uid), __FILE__, __LINE__); + 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_userid), __FILE__, __LINE__); // Add points + // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked); + addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment, false, '0', $locked); // Shall I add bonus points for "turbo clickers" ? - if (GET_EXT_VERSION('bonus') >= '0.2.2') { + if (getExtensionVersion('bonus') >= '0.2.2') { // Is an active-rallye running and this is not a notification mail? - if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) { + if ((getConfig('bonus_active') == 'Y') && ($notify != 'Y')) { // Shall I exclude the webmaster's own userid from the active-rallye? - if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) { + if ((((getConfig('bonus_userid') == $url_userid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_userid') != $url_userid)) && (getConfig('def_refid') != $url_userid)) { // Add points and remember ranking are done in this function.... - BONUS_ADD_TURBO_POINTS($payment, $url_uid, $type); + addTurboBonus($payment, $url_userid, $type); // Set template to mailid_points_done2 which contains a link to the ranking list $template = 'mailid_points_done2'; if ($locked) $template = 'mailid_points_locked2'; - $content['uid'] = $url_uid; + $content['userid'] = $url_userid; $content['type'] = $type; $content['data'] = translateComma($payment); } // END - if @@ -283,41 +281,40 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // Load total points $content['total'] = translateComma( - GET_TOTAL_DATA($url_uid, 'user_points', 'points') - - GET_TOTAL_DATA($url_uid, 'user_data', 'used_points') + countSumTotalData($url_userid, 'user_points', 'points') - + countSumTotalData($url_userid, 'user_data', 'used_points') ); // Load template - LOAD_TEMPLATE($template); + loadTemplate($template, false, $content); } else { // Wrong image code! So add points to sender's account - unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment); + addPointsDirectly('mailid_payback', $sender, $payment); // Load template - LOAD_TEMPLATE('mailid_points_failed'); + loadTemplate('mailid_points_failed', false, $content); } // 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; case 'img': - GENERATE_IMAGE($img_code); + generateImageOrCode($img_code); break; case 'confirm': if ($code > 0) { // Export data into constants for the template $content['code'] = $code; - $content['uid'] = $url_uid; + $content['userid'] = $url_userid; $content['type'] = $type; $content['data'] = $urlId; - $content['banner'] = LOAD_TEMPLATE('mailid_banner', true); + $content['banner'] = loadTemplate('mailid_banner', true); if (getConfig('code_length') > 0) { // Generate Code - $content['image'] = generateCaptchaCode($code, $type, $urlId, $url_uid); + $content['image'] = generateCaptchaCode($code, $type, $urlId, $url_userid); $templ = 'mailid_enter_code'; } else { // Disabled code @@ -326,23 +323,23 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors } // Load template - LOAD_TEMPLATE($templ); + loadTemplate($templ, false, $content); } break; case '': // Ok, all data is valid and loaded. Finally let's output the timer... :-) // Export data into constants for the template - $content['time'] = $time; - $content['tim2'] = strlen($time); - $content['uid'] = $url_uid; - $content['type'] = $type; - $content['data'] = $urlId; - $content['rand'] = mt_rand(0, 99999); - $content['banner'] = LOAD_TEMPLATE('mailid_banner', true); + $content['time'] = $time; + $content['tim2'] = strlen($time); + $content['userid'] = $url_userid; + $content['type'] = $type; + $content['data'] = $urlId; + $content['rand'] = mt_rand(0, 99999); + $content['banner'] = loadTemplate('mailid_banner', true); // Load template - LOAD_TEMPLATE('mailid_timer'); + loadTemplate('mailid_timer', false, $content); break; default: // Unknown mode @@ -350,30 +347,30 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors break; } // END - switch } else { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>"); $mode = 'failed'; } } else { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>"); $mode = 'failed'; } } else { - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>"); $mode = 'failed'; } } else { SQL_FREERESULT($result); - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>"); $mode = 'failed'; } } else { SQL_FREERESULT($result); - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>"); $mode = 'failed'; } } else { SQL_FREERESULT($result); - LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>"); + loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>"); $mode = 'failed'; } diff --git a/modules.php b/modules.php index 2eb272b2be..4034faef7d 100644 --- a/modules.php +++ b/modules.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ ************************************************************************/ // XDEBUG call -//xdebug_start_trace(); +//* DEBUG: */ xdebug_start_trace(); // Load security stuff here require('inc/libs/security_functions.php'); @@ -52,38 +52,41 @@ $GLOBALS['module'] = ''; // Needed include files require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Fix missing module to 'index' -if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index'); +if (!isGetRequestElementSet('module')) setRequestGetElement('module', 'index'); // The header file loadIncludeOnce('inc/header.php'); // Modules are by default not valid! -$isModuleValid = false; $check = 'failed'; +$isModuleValid = false; +$URL = ''; +$check = 'failed'; // Is the maintenance mode active or goes all well? -if ((EXT_IS_ACTIVE('maintenance')) && (getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && (getModule() != 'admin')) { +if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (!isAdmin()) && (getModule() != 'admin')) { // Maintain mode is active and you are no admin addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE')); } elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) { // Construct module name - $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", SQL_ESCAPE(getModule())); + $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); - // Did we found the module listed in allowed modules and are we successfully connected? - $check = checkModulePermissions(getModule()); + // Check module permission (again) + $check = checkModulePermissions(); switch ($check) { case 'cache_miss': // The cache is gone case 'admin_only': // Admin-only access case 'mem_only': // Member-only access case 'done': // All fine! // Does the module exists on local file system? - if ((isFileReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == 0)) { + if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == 0)) { // Module is valid, active and located on the local disc... $isModuleValid = true; - } elseif (!empty($URL)) { - // An URL was specified so we load the de-referrer module - redirectToUrl(DEREFERER($URL)); } elseif (getTotalFatalErrors() == 0) { + // Module not found! addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule())); } break; @@ -93,7 +96,7 @@ if ((EXT_IS_ACTIVE('maintenance')) && (getConfig('maintenance') == 'Y') && (!IS_ break; case 'locked': - if (!isFileReadable($GLOBALS['module_inc'])) { + if (!isIncludeReadable($GLOBALS['module_inc'])) { // Module does addionally not exists addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule())); } // END - if @@ -103,26 +106,22 @@ if ((EXT_IS_ACTIVE('maintenance')) && (getConfig('maintenance') == 'Y') && (!IS_ break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, getModule())); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, getModule())); addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check)); break; - } + } // END - switch } elseif (getTotalFatalErrors() == 0) { // MySQL problems! addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS')); } if (($isModuleValid === true) && (isset($GLOBALS['module_inc']))) { - ///////////////////////////////////////////// - // Main including line DO NOT REMOVE/EDIT! // - ///////////////////////////////////////////// - // // Everything is okay so we can load the module loadIncludeOnce($GLOBALS['module_inc']); } // END - if -// Next-to-end add the footer +// Add the footer (this will call shutdown()) loadIncludeOnce('inc/footer.php'); -// +// [EOF] ?> diff --git a/ref.php b/ref.php index 08398c7efc..451bb7eaa3 100644 --- a/ref.php +++ b/ref.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,12 +46,6 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -// Redirect only to registration page when this script is installed -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Base URL for redirection switch (getConfig('refid_target')) { case 'register': @@ -63,15 +57,21 @@ switch (getConfig('refid_target')) { break; } +// No refid and we add our refid (don't forget to set $def_refid!) +$URL = 'index.php'; + // Get referal ID from ref or refid variable -if (REQUEST_ISSET_GET('ref')) $ref = REQUEST_GET('ref'); - elseif (REQUEST_ISSET_GET('refid')) $ref = REQUEST_GET('refid'); +if (isGetRequestElementSet('ref')) $ref = getRequestElement('ref'); + elseif (isGetRequestElementSet('refid')) $ref = getRequestElement('refid'); if (!empty($ref)) { + // Invalid request by default + $ref = 0; + // Test if nickname or numeric id - if (EXT_IS_ACTIVE('nickname')) { + if (isExtensionActive('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 @@ -79,10 +79,7 @@ if (!empty($ref)) { // Free result SQL_FREERESULT($result); - } else { - // Invalid request! - $ref = 0; - } + } // END - if // Also edit this 0 ! if (empty($ref)) $ref = 0; @@ -96,13 +93,10 @@ if (!empty($ref)) { // 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 { - // No refid and we add our refid (don't forget to set $def_refid!) - $URL = 'index.php'; -} +} // END - if // Load the URL redirectToUrl($URL); diff --git a/robots.txt b/robots.txt index 7b26c7d62e..5d2c9ad204 100644 --- a/robots.txt +++ b/robots.txt @@ -5,13 +5,16 @@ User-agent: * Disallow: /css/ Disallow: /inc/ Disallow: /images/ -Disallow: /sql-upgrades/ Disallow: /templates/ -Disallow: /upgrade.php Disallow: /install.php Disallow: /cms/index/wht/impressum -User-agent: * +User-agent: Googlebot +Disallow: /css/ +Disallow: /inc/ +Disallow: /images/ +Disallow: /templates/ +Disallow: /install.php Disallow: /cms/index/wht/impressum User-agent: grub-client @@ -383,28 +386,13 @@ Disallow: / User-agent: searchpreview Disallow: / +# This is for my webpages User-agent: * -Disallow: /guestbook - -User-agent: Googlebot -Disallow: /guestbook - -User-agent: * +Disallow: /guestbook/ Disallow: /blacklist.txt - -User-agent: Googlebot -Disallow: /blacklist.txt - -User-agent: * Disallow: /whitelist.txt User-agent: Googlebot +Disallow: /guestbook/ +Disallow: /blacklist.txt Disallow: /whitelist.txt - -User-agent: * -Disallow: /inc/ -Disallow: /templates/ - -User-agent: Googlebot -Disallow: /inc/ -Disallow: /templates/ diff --git a/show_bonus.php b/show_bonus.php index 0615d85176..616973e472 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,22 +49,19 @@ $GLOBALS['output_mode'] = 0; // Load the required file(s) require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Is the 'bonus' extension active? redirectOnUninstalledExtension('bonus'); -// List only rankings when script is installed -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Include header loadIncludeOnce('inc/header.php'); -if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET('t'))) { +if ((getRequestElement('userid') > 0) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) { // Set row name $t = ''; - switch (REQUEST_GET('t')) { + switch (getRequestElement('t')) { case 'bonusid': // Bonus mail $t = 'bonus_id'; break; @@ -74,7 +71,7 @@ if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET('t' break; default: // Invalid type - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid type %s detected.", REQUEST_GET('t'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid type %s detected.", getRequestElement('t'))); break; } // END - switch @@ -83,15 +80,15 @@ if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET('t' // Check for data $result = SQL_QUERY_ESC("SELECT d.gender, d.surname, d.family, b.level, b.points FROM - `{!_MYSQL_PREFIX!}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS d RIGHT JOIN - `{!_MYSQL_PREFIX!}_bonus_turbo` AS b + `{?_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", - array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid')), $t, bigintval(getRequestElement('d'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -101,42 +98,38 @@ LIMIT 1", // Prepare constants for the pre-template $content['gender'] = translateGender($content['gender']); $content['points'] = translateComma($content['points']); - $content['mailid'] = bigintval(REQUEST_GET('d')); - $content['rows'] = BONUS_MAKE_RANK_ROWS(bigintval(REQUEST_GET('d')), $t, bigintval(REQUEST_GET('uid'))); - - // Constant created within previous function which contains informations for current user's ranking position: - // @TODO Rewrite this constant - // __YOUR_RANKING_LINE + $content['mailid'] = bigintval(getRequestElement('d')); + $content['rows'] = addBonusRanks(bigintval(getRequestElement('d')), $t, bigintval(getRequestElement('userid'))); // Load pre-template - $content['msg'] = LOAD_TEMPLATE('show_bonus_msg', true, $content); + $content['message'] = loadTemplate('show_bonus_msg', true, $content); } else { // No data found - $content['msg'] = "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>"; + $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>"; } // Free memory SQL_FREERESULT($result); } else { // Wrong type entered - $content['msg'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>"; + $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>"; } } else { // Wrong call! - $content['msg'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>"; + $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>"; } // Load send_bonus header template (for your banners, e.g.?) -$content['header'] = LOAD_TEMPLATE('show_bonus_header', true); +$content['header'] = loadTemplate('show_bonus_header', true); // Load show_bonus footer template (for your banners, e.g.?) -$content['footer'] = LOAD_TEMPLATE('show_bonus_footer', true); +$content['footer'] = loadTemplate('show_bonus_footer', true); // Total ranks who can win $content['total_ranks'] = getConfig('bonus_ranks'); // Load final template -LOAD_TEMPLATE('show_bonus', false, $content); +loadTemplate('show_bonus', false, $content); // Include footer loadIncludeOnce('inc/footer.php'); diff --git a/sponsor_confirm.php b/sponsor_confirm.php index 69d458077d..d1335e3793 100644 --- a/sponsor_confirm.php +++ b/sponsor_confirm.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -47,21 +47,14 @@ $GLOBALS['output_mode'] = '0'; // Load the required file(s) require('inc/config-global.php'); -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if +// No hash provided by default +$URL = 'modules.php?module=index'; -// Base URL for redirection -$URL = 'modules.php?module=index&what=sponsor_login&hash='; -if (!REQUEST_ISSET_GET('hash')) { - // No refid and we add our refid (don't forget to set $def_refid!) - $URL = 'modules.php?module=index'; -} else { +// Is there a hash? +if (isGetRequestElementSet('hash')) { // We have an refid here. So we simply add it - $URL .= REQUEST_GET('hash'); -} + $URL = 'modules.php?module=index&what=sponsor_login&hash=' . getRequestElement('hash'); +} // END - if // Load the URL redirectToUrl($URL); diff --git a/sponsor_ref.php b/sponsor_ref.php index 1e58d05fa9..702b6b505f 100644 --- a/sponsor_ref.php +++ b/sponsor_ref.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -47,19 +47,13 @@ $GLOBALS['output_mode'] = '0'; // Load the required file(s) require('inc/config-global.php'); -// Redirect only to registration page when this script is installed -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Base URL for redirection $URL = 'modules.php?module=index&what=sponsor_reg&refid='; // Get referal ID from ref or refid variable $ref = 0; -if (REQUEST_ISSET_GET('ref')) $ref = bigintval(REQUEST_GET('ref')); - elseif (REQUEST_ISSET_GET('refid')) $ref = bigintval(REQUEST_GET('refid')); +if (isGetRequestElementSet('ref')) $ref = bigintval(getRequestElement('ref')); + elseif (isGetRequestElementSet('refid')) $ref = bigintval(getRequestElement('refid')); if (!empty($ref)) { // We have an refid here. So we simply add it diff --git a/surfbar.php b/surfbar.php index ec7ce0e6f1..8760cb332c 100644 --- a/surfbar.php +++ b/surfbar.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,36 +44,32 @@ $GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'surfbar'; -$GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = 0; $GLOBALS['header_sent'] = 3; // Load the required file(s) require('inc/config-global.php'); +// Set content type +setContentType('text/html'); + // Is a frame active? -if (REQUEST_ISSET_GET('frame')) { +if (isGetRequestElementSet('frame')) { // Then we need to set header_sent to 0 $GLOBALS['header_sent'] = 0; } // END - if -// Is the script installed? -if (!isInstalled()) { - // You have to install first! - redirectToUrl('install.php'); -} // END - if - // Only logged in users may use this surfbar! redirectOnUninstalledExtension('surfbar'); // No member? -if (!IS_MEMBER()) { +if (!isMember()) { // Should we display login window or redirect to main page? - if ((getConfig('surfbar_guest_login_form') == 'Y') && (EXT_IS_ACTIVE('user'))) { + if ((getConfig('surfbar_guest_login_form') == 'Y') && (isExtensionActive('user'))) { // Is the form sent? - if ((isFormSent()) && (REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST('password'))) { + if ((isFormSent()) && (isPostRequestElementSet('id')) && (isPostRequestElementSet('password'))) { // Do the login procedure - $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password'), basename(__FILE__)); + $URL = doUserLogin(postRequestElement('id'), postRequestElement('password'), basename(__FILE__), basename(__FILE__) . '?code='); // And redirect to the URL redirectToUrl($URL); @@ -81,8 +77,14 @@ if (!IS_MEMBER()) { // Load header loadIncludeOnce('inc/header.php'); + // Is there a 'code' provided? + if (isGetRequestElementSet('code')) { + // Then generate an error message + loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestElement('code'))); + } // END - if + // Display login form - LOAD_TEMPLATE('surfbar_login_form'); + loadTemplate('surfbar_login_form'); // Allow footer here $GLOBALS['header_sent'] = 2; @@ -103,24 +105,24 @@ SURFBAR_INIT(); SURFBAR_HANDLE_SELF_MAINTENANCE(); // Is there a check value? -if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array(REQUEST_GET('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) { +if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_array(getRequestElement('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) { // Reload-lock is full, surfbar stopped so... // Load header loadIncludeOnce('inc/header.php'); // Load template - if (((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stop')) || (!REQUEST_ISSET_GET('frame'))) { + if (((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stop')) || (!isGetRequestElementSet('frame'))) { // Load template for "start" page - LOAD_TEMPLATE('surfbar_frame_start'); + loadTemplate('surfbar_frame_start'); // Load banner - LOAD_TEMPLATE('surfbar_start_banner'); + loadTemplate('surfbar_start_banner'); // This makes the footer appear again - REQUEST_UNSET_GET('frame'); - } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stats')) { + unsetGetRequestElement('frame'); + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stats')) { // Get total points amount - $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points'); + $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points'); // Prepare content $content = array( @@ -135,8 +137,8 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( ); // Load template for "stats" page - LOAD_TEMPLATE('surfbar_frame_stats', false, $content); - } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'textlinks')) { + loadTemplate('surfbar_frame_stats', false, $content); + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'textlinks')) { // Prepare content $content = array( 'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(), @@ -144,7 +146,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( ); // Load template for "stats" page - LOAD_TEMPLATE('surfbar_frame_textlinks', false, $content); + loadTemplate('surfbar_frame_textlinks', false, $content); } else { // Prepare content $content = array( @@ -154,16 +156,16 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( ); // Load template for stopped surfbar - LOAD_TEMPLATE('surfbar_stopped', false, $content); + loadTemplate('surfbar_stopped', false, $content); } -} elseif ((REQUEST_ISSET_GET('check')) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET('salt'))) { +} elseif ((isGetRequestElementSet('check')) && (isGetRequestElementSet('id')) && (isGetRequestElementSet('salt'))) { // Dummy next id get - SURFBAR_DETERMINE_NEXT_ID(REQUEST_GET('id')); + SURFBAR_DETERMINE_NEXT_ID(getRequestElement('id')); // Check reload lock and validation code - if ((!SURFBAR_CHECK_RELOAD_LOCK(REQUEST_GET('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(REQUEST_GET('id'), REQUEST_GET('check'), REQUEST_GET('salt')))) { + if ((!SURFBAR_CHECK_RELOAD_LOCK(getRequestElement('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(getRequestElement('id'), getRequestElement('check'), getRequestElement('salt')))) { // Lock the URL (id) down - SURFBAR_LOCKDOWN_ID(REQUEST_GET('id')); + SURFBAR_LOCKDOWN_ID(getRequestElement('id')); // Code is valid so pay points here SURFBAR_PAY_POINTS(); @@ -191,7 +193,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( $isFrameset = true; // Frame "top" set? - if ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'top')) { + if ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'top')) { // Determine next id $nextId = SURFBAR_DETERMINE_NEXT_ID(); @@ -216,9 +218,9 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( // Load new URL SURFBAR_RELOAD_TO_STOP_PAGE('stop2'); } - } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'start')) { + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'start')) { // Starter frame found so let the footer display - REQUEST_UNSET_GET('frame'); + unsetGetRequestElement('frame'); } // Load header @@ -226,7 +228,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( // Load that template //* DEBUG: */ die("templateName={$templateName}<br />\n<strong>content</strong>=<pre>".print_r($content, true)."</pre>"); - LOAD_TEMPLATE($templateName, false, $content); + loadTemplate($templateName, false, $content); } // Load footer diff --git a/templates/.htaccess b/templates/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/.htaccess +++ b/templates/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/.htaccess b/templates/de/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/.htaccess +++ b/templates/de/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/emails/add-points.tpl b/templates/de/emails/add-points.tpl index 161a803a0c..c933636b21 100644 --- a/templates/de/emails/add-points.tpl +++ b/templates/de/emails/add-points.tpl @@ -7,7 +7,7 @@ Grund dazu war folgender: $content[text] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/admin-del_links.tpl b/templates/de/emails/admin-del_links.tpl index 8d9547666b..1f8d36f1b1 100644 --- a/templates/de/emails/admin-del_links.tpl +++ b/templates/de/emails/admin-del_links.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Einer unserer Administratoren hat soeben Ihre unbestaetigten Mails geloescht! +Einer unserer Administratoren hat soeben Ihre unbestätigten Mails geloescht! ------------------------------------ Anzahl geloeschter Mails: $content @@ -10,7 +10,7 @@ Ihre User-ID bei uns lautet: $UID Die {?POINTS?} sind somit verloren gegangen! Bitte seien Sie bald wieder aktiver, damit unsere Klickrate nicht unnoetigt sinkt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/admin/admin_autopurge_del_mails.tpl b/templates/de/emails/admin/admin_autopurge_del_mails.tpl index 506a2c52d8..1fe2ba684e 100644 --- a/templates/de/emails/admin/admin_autopurge_del_mails.tpl +++ b/templates/de/emails/admin/admin_autopurge_del_mails.tpl @@ -1,8 +1,8 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden $content Mailbuchungen von bereits geloeschten Mitgliedern entfernt! +In Ihrem {?mt_word?} wurden $content Mailbuchungen von bereits geloeschten Mitgliedern entfernt! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_delete.tpl b/templates/de/emails/admin/admin_autopurge_delete.tpl index cbc3850945..4b727727e5 100644 --- a/templates/de/emails/admin/admin_autopurge_delete.tpl +++ b/templates/de/emails/admin/admin_autopurge_delete.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden Mitglieder geloescht, die seit {!__INACTIVE_SINCE!} Tagen nicht mehr aktiv waren! +In Ihrem {?mt_word?} wurden Mitglieder geloescht, die seit $content[since] Tagen nicht mehr aktiv waren! Hier alle geloeschten Mitglieder: -------------------------------- @@ -9,7 +9,7 @@ $content Ihre Mitglieder wurden automatisch benachrichtigt! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_inactive.tpl b/templates/de/emails/admin/admin_autopurge_inactive.tpl index 39a4350439..18addfe3db 100644 --- a/templates/de/emails/admin/admin_autopurge_inactive.tpl +++ b/templates/de/emails/admin/admin_autopurge_inactive.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden Mitglieder gefunden, die seit {!__INACTIVE_SINCE!} Tagen nicht mehr aktiv waren! Sollten diese Mitglieder weitere {!__INACTIVE_TIME!} Tage inaktiv bleiben, werden sie automatisch geloescht! +In Ihrem {?mt_word?} wurden Mitglieder gefunden, die seit $content[since] Tagen nicht mehr aktiv waren! Sollten diese Mitglieder weitere {!__INACTIVE_TIME!} Tage inaktiv bleiben, werden sie automatisch geloescht! Hier alle inaktiven Mitglieder: -------------------------------- @@ -9,7 +9,7 @@ $content Ihre Mitglieder wurden automatisch benachrichtigt! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_points.tpl b/templates/de/emails/admin/admin_autopurge_points.tpl index 5e0ea790ed..7636a9d5e5 100644 --- a/templates/de/emails/admin/admin_autopurge_points.tpl +++ b/templates/de/emails/admin/admin_autopurge_points.tpl @@ -2,7 +2,7 @@ Hallo Administrator, Es wurden soeben $content {?POINTS?} durch die automatische Loeschung von Bestaetigungslinks in den Jackpot transferiert! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_tsks.tpl b/templates/de/emails/admin/admin_autopurge_tsks.tpl index a3aa367d38..83889620e1 100644 --- a/templates/de/emails/admin/admin_autopurge_tsks.tpl +++ b/templates/de/emails/admin/admin_autopurge_tsks.tpl @@ -1,8 +1,8 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden $content Aufgaben geloescht. +In Ihrem {?mt_word?} wurden $content Aufgaben geloescht. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_turbo.tpl b/templates/de/emails/admin/admin_autopurge_turbo.tpl index 17a49f2671..76d84f622f 100644 --- a/templates/de/emails/admin/admin_autopurge_turbo.tpl +++ b/templates/de/emails/admin/admin_autopurge_turbo.tpl @@ -1,8 +1,8 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden $content veraltete Bonus-Eintraege geloescht. +In Ihrem {?mt_word?} wurden $content veraltete Bonus-Eintraege geloescht. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_autopurge_unconfirmed.tpl b/templates/de/emails/admin/admin_autopurge_unconfirmed.tpl index 718978695f..ab7dde84a5 100644 --- a/templates/de/emails/admin/admin_autopurge_unconfirmed.tpl +++ b/templates/de/emails/admin/admin_autopurge_unconfirmed.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -In Ihrem {?MT_WORD?} wurden Mitglieder geloescht, die seit {!__INACTIVE_SINCE!} Tagen nicht ihre EMail-Adresse bestaetigt hatten! +In Ihrem {?mt_word?} wurden Mitglieder geloescht, die seit $content[time] Tagen nicht ihre EMail-Adresse bestätigt hatten! Hier alle geloeschten Mitglieder: -------------------------------- @@ -9,7 +9,7 @@ $content Ihre Mitglieder wurden automatisch benachrichtigt! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_del_surfbar_urls.tpl b/templates/de/emails/admin/admin_del_surfbar_urls.tpl index 09edc7ac7b..372d9b9b8c 100644 --- a/templates/de/emails/admin/admin_del_surfbar_urls.tpl +++ b/templates/de/emails/admin/admin_del_surfbar_urls.tpl @@ -21,7 +21,7 @@ Sperrgrund: $content[lock_reason] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_edit_surfbar_urls.tpl b/templates/de/emails/admin/admin_edit_surfbar_urls.tpl index 077ffd1473..26879f942e 100644 --- a/templates/de/emails/admin/admin_edit_surfbar_urls.tpl +++ b/templates/de/emails/admin/admin_edit_surfbar_urls.tpl @@ -4,21 +4,21 @@ Es wurde eine URL aus der Surfbar geändert. Hier sind alle Daten dazu: ------------------------------------------ -Gebuchte URL: $DATA[url] +Gebuchte URL: $content[url] Neue URL: $content[url] ------------------------------------------ Framekiller-Test: $content[frametester] ------------------------------------------ -Alte User-ID: $DATA[userid] +Alte User-ID: $content[userid] Neue User-ID: $content[userid] ------------------------------------------ -Angemeldet: $DATA[registered] +Angemeldet: $content[registered] ------------------------------------------ -ID in der Surfbar: $DATA[id] +ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_ext_deactivated.tpl b/templates/de/emails/admin/admin_ext_deactivated.tpl index 82e4dcb79d..3ece3e3327 100644 --- a/templates/de/emails/admin/admin_ext_deactivated.tpl +++ b/templates/de/emails/admin/admin_ext_deactivated.tpl @@ -4,7 +4,7 @@ es wurde soeben die Erweiterung $content[ext_name] automatisch deaktiviert, da s Bitte deinstallieren Sie bald diese Erweiterung. Sie wird von mxchange.org nicht mehr unterstützt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/admin/admin_holiday_deactivated.tpl b/templates/de/emails/admin/admin_holiday_deactivated.tpl index e89e7954fe..e202c9915b 100644 --- a/templates/de/emails/admin/admin_holiday_deactivated.tpl +++ b/templates/de/emails/admin/admin_holiday_deactivated.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben seinen Urlaub beendet! +Ein Mitglied aus Ihrem {?mt_word?} hat soeben seinen Urlaub beendet! ------------------------------ Die Mitglieder-ID ist: $UID @@ -13,9 +13,9 @@ IP-Nummer: $REMOTE_ADDR ------------------------------ Browser: $HTTP_USER_AGENT ------------------------------ -Anfang des Urlaubes: {!__HOLIDAY_START!} +Anfang des Urlaubes: $content[start] ------------------------------ -Ende des Urlaubes: {!__HOLIDAY_END!} +Ende des Urlaubes: $content[end] ------------------------------ $content @@ -24,7 +24,7 @@ $content Die Urlaubsschaltung ist somit wieder aufgehoben. Das Mitglied kann wieder Werbebuchungen durchfuehren. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_holiday_request.tpl b/templates/de/emails/admin/admin_holiday_request.tpl index a0a3bdfa8e..92fb68f855 100644 --- a/templates/de/emails/admin/admin_holiday_request.tpl +++ b/templates/de/emails/admin/admin_holiday_request.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben Urlaub beantragt! +Ein Mitglied aus Ihrem {?mt_word?} hat soeben Urlaub beantragt! ------------------------------ Die Mitglieder-ID ist: $UID @@ -13,18 +13,18 @@ IP-Nummer: $REMOTE_ADDR ------------------------------ Browser: $HTTP_USER_AGENT ------------------------------ -Anfang des Urlaubes: {!_START_DAY!}.{!_START_MONTH!}.{!_START_YEAR!} +Anfang des Urlaubes: $content[start_day].$content[start_month].$content[start_year] ------------------------------ -Ende des Urlaubes: {!_END_DAY!}.{!_END_MONTH!}.{!_END_YEAR!} +Ende des Urlaubes: $content[end_day].$content[end_month].$content[end_year] ------------------------------ -$content +$content[comments] ------------------------------ Die Urlaubsschaltung ist aktiviert und wird nach der Urlaubszeit automatisch wieder entfernt. Sie koennen die Urlaubsschaltung im Admin-Bereich jederzeit loeschen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_holiday_unlock.tpl b/templates/de/emails/admin/admin_holiday_unlock.tpl index e60aa27396..5d1bc9e165 100644 --- a/templates/de/emails/admin/admin_holiday_unlock.tpl +++ b/templates/de/emails/admin/admin_holiday_unlock.tpl @@ -6,7 +6,7 @@ Es wurden folgende Mitglieder-Account durch die Urlaubsschaltung wieder freigege $content -------------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_lock_active_surfbar_urls.tpl b/templates/de/emails/admin/admin_lock_active_surfbar_urls.tpl index ec3e770552..a508fc6e2b 100644 --- a/templates/de/emails/admin/admin_lock_active_surfbar_urls.tpl +++ b/templates/de/emails/admin/admin_lock_active_surfbar_urls.tpl @@ -20,7 +20,7 @@ Angemeldet: $content[registered] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl b/templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl index cac4a73be8..2bcfc5f0d9 100644 --- a/templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl +++ b/templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl @@ -20,7 +20,7 @@ Angemeldet: $content[registered] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_mydata_notify.tpl b/templates/de/emails/admin/admin_mydata_notify.tpl index a1eb706380..ba3f4e28f1 100644 --- a/templates/de/emails/admin/admin_mydata_notify.tpl +++ b/templates/de/emails/admin/admin_mydata_notify.tpl @@ -5,23 +5,23 @@ Hallo Administrator, ------------------------------------------ {--MEMBER_UID--}: $UID ------------------------------------------ -{--GENDER--}: $DATA[0] -{--SURNAME--}: $DATA[1] -{--FAMILY_NAME--}: $DATA[2] -{--STREET_NR--}: $DATA[3] -{--COUNTRY--}: $DATA[4] -{--ZIP--}: $DATA[5] -{--CITY--}: $DATA[6] -{--ADDY--}: $DATA[7] +{--GENDER--}: $content[gender] +{--SURNAME--}: $content[surname] +{--FAMILY_NAME--}: $content[family] +{--STREET_NR--}: $content[street_nr] +{--COUNTRY--}: $content[country] +{--ZIP--}: $content[zip] +{--CITY--}: $content[city] +{--EMAIL_ADDRESS--}: $content[email] ------------------------------------------ -$DATA[info] +$content[info] ------------------------------------------ IP-Nummer: $REMOTE_ADDR ------------------------------------------ Browser: $HTTP_USER_AGENT ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_newsletter_request.tpl b/templates/de/emails/admin/admin_newsletter_request.tpl index 85d720267a..84d1ed3b8c 100644 --- a/templates/de/emails/admin/admin_newsletter_request.tpl +++ b/templates/de/emails/admin/admin_newsletter_request.tpl @@ -1,22 +1 @@ -Hallo Administrator, - -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben die Abbestellung Ihres Newsletters beantragt! - ------------------------------- -Die Mitglieder-ID ist: $UID ------------------------------- -E-Mail Adresse: $content[email] ------------------------------- -Vor-, Nachname: $content[gender] $content[surname] $content[family] ------------------------------- -IP-Nummer: $REMOTE_ADDR ------------------------------- -Browser: $HTTP_USER_AGENT ------------------------------- - -Ihr Mitglied hat Ihre Kontoverbindung zugeschickt bekommen und wird bald den geforderten Betrag von {!__CHARGE_VALUE!} {!__CURRENCY!} ueberweisen. - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Script - -{?URL?}/admin.php \ No newline at end of file +@DEPRECATED diff --git a/templates/de/emails/admin/admin_newsletter_reset.tpl b/templates/de/emails/admin/admin_newsletter_reset.tpl index 59edb5a7fb..a354396f22 100644 --- a/templates/de/emails/admin/admin_newsletter_reset.tpl +++ b/templates/de/emails/admin/admin_newsletter_reset.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} wurde zum Newsletterempfang wieder freigegeben. +Ein Mitglied aus Ihrem {?mt_word?} wurde zum Newsletterempfang wieder freigegeben. ------------------------------ Die Mitglieder-ID ist: $UID @@ -16,7 +16,7 @@ Browser: $HTTP_USER_AGENT Das Mitglied wurde ebenfalls darueber in Kenntnis gesetzt! Die zugehoerige Aufgabe wurde nicht geloescht. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_payout_request.tpl b/templates/de/emails/admin/admin_payout_request.tpl index ca09e6a824..a849a7f44f 100644 --- a/templates/de/emails/admin/admin_payout_request.tpl +++ b/templates/de/emails/admin/admin_payout_request.tpl @@ -19,7 +19,7 @@ Vorname: $content[surname] Nachname: $content[family] Email-Adresse: $content[email] ------------------------------ -Auszahlungsart: {--PAYOUT_TYPE_VALUE--} +Auszahlungsart: $content[type] Auszahlungshoehe: $content[payout] An Konto: $content[account] Bei Bank/Webseite: $content[bank] @@ -27,11 +27,11 @@ Bei Bank/Webseite: $content[bank] Bitte ueberpruefen Sie diese Daten und ueberweisen Sie dann den geforderten Betrag. -Die {--PAYOUT_POINTS_VALUE--} {?POINTS?} wurden dem Mitglied bereits abgebucht. +Die $content[payout_points] {?POINTS?} wurden dem Mitglied bereits abgebucht. Bitte vergessen Sie nicht, das Mitglied ueber die Auszahlung zu informieren, da dies nicht automatisch erfolgt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_payout_request_banner.tpl b/templates/de/emails/admin/admin_payout_request_banner.tpl index 0e063424a6..a572256654 100644 --- a/templates/de/emails/admin/admin_payout_request_banner.tpl +++ b/templates/de/emails/admin/admin_payout_request_banner.tpl @@ -19,7 +19,7 @@ Vorname: $content[surname] Nachname: $content[family] Email-Adresse: $content[email] ------------------------------ -Auszahlungsart: {--PAYOUT_TYPE_VALUE--} +Auszahlungsart: $content[type] Auszahlungshoehe: $content[payout] ------------------------------ Ziel-URL: $content[turl] @@ -29,11 +29,11 @@ Banner-URL: $content[banner] Bitte ueberpruefen Sie diese Daten und ueberweisen Sie dann den geforderten Betrag. -Die {--PAYOUT_POINTS_VALUE--} {?POINTS?} wurden dem Mitglied bereits abgebucht. +Die $content[payout_points] {?POINTS?} wurden dem Mitglied bereits abgebucht. Bitte vergessen Sie nicht, das Mitglied ueber die Auszahlung zu informieren, da dies nicht automatisch erfolgt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_rallye_expired.tpl b/templates/de/emails/admin/admin_rallye_expired.tpl index 844d03519d..d8daaf0521 100644 --- a/templates/de/emails/admin/admin_rallye_expired.tpl +++ b/templates/de/emails/admin/admin_rallye_expired.tpl @@ -19,7 +19,7 @@ Wichtige Hinweise: - $DATA[min_prices] ----------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_rallye_expired_no.tpl b/templates/de/emails/admin/admin_rallye_expired_no.tpl index be22805ee7..3e5cba05f6 100644 --- a/templates/de/emails/admin/admin_rallye_expired_no.tpl +++ b/templates/de/emails/admin/admin_rallye_expired_no.tpl @@ -19,7 +19,7 @@ $content Die {?POINTS?} wurden bereits aufgebucht. Bitte nicht erneut aufbauen! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_rallye_no_notify.tpl b/templates/de/emails/admin/admin_rallye_no_notify.tpl index a20a1f6a89..2d22708327 100644 --- a/templates/de/emails/admin/admin_rallye_no_notify.tpl +++ b/templates/de/emails/admin/admin_rallye_no_notify.tpl @@ -12,10 +12,10 @@ Server-Zeit: $DATA[now_t] Uhr ------------------------------ $content -Die automatische Benachrichtigung war abgeschaltet. Bitte teilen Sie Ihren $DATA[uid_cnt] Mitgliedern mit, dass die Rallye am Laufen ist! +Die automatische Benachrichtigung war abgeschaltet. Bitte teilen Sie Ihren $DATA[userid_cnt] Mitgliedern mit, dass die Rallye am Laufen ist! ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_rallye_notify.tpl b/templates/de/emails/admin/admin_rallye_notify.tpl index 2a92868b58..059c22552a 100644 --- a/templates/de/emails/admin/admin_rallye_notify.tpl +++ b/templates/de/emails/admin/admin_rallye_notify.tpl @@ -12,10 +12,10 @@ Server-Zeit: $DATA[now_t] Uhr ------------------------------ $content -Es wurden bereits alle Ihre $DATA[uid_cnt] Mitglieder informiert! +Es wurden bereits alle Ihre $DATA[userid_cnt] Mitglieder informiert! ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_rallye_purged.tpl b/templates/de/emails/admin/admin_rallye_purged.tpl index 442b24f25d..b37b30c5c9 100644 --- a/templates/de/emails/admin/admin_rallye_purged.tpl +++ b/templates/de/emails/admin/admin_rallye_purged.tpl @@ -4,16 +4,16 @@ Soeben ist eine Rallye automatisch aus der Datenbank entfernt worden. Hier alle Infos zur Rallye: ------------------------------ -Titel: $DATA[title] +Titel: $content[title] ------------------------------ -Beginn der Rallye: $DATA[start] Uhr -Ende der Rallye: $DATA[end] Uhr -Server-Zeit: $DATA[now_t] Uhr +Beginn der Rallye: $content[start_time] Uhr +Ende der Rallye: $content[end_time] Uhr +Server-Zeit: $content[now_time] Uhr ------------------------------ Diese Rallye kann somit nicht mehr von Ihren Mitgliedern eingesehen werden. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script -{?URL?}/admin.php \ No newline at end of file +{?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_refback.tpl b/templates/de/emails/admin/admin_refback.tpl index 32966d11d9..1b03fcfeab 100644 --- a/templates/de/emails/admin/admin_refback.tpl +++ b/templates/de/emails/admin/admin_refback.tpl @@ -8,7 +8,7 @@ Mitglied-ID: $content[refid] (der den Ref-Back bekommt) Ref-Back: $content[percents]% ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/admin/admin_reset_password.tpl b/templates/de/emails/admin/admin_reset_password.tpl index b159364f92..dfd4cd6850 100644 --- a/templates/de/emails/admin/admin_reset_password.tpl +++ b/templates/de/emails/admin/admin_reset_password.tpl @@ -18,7 +18,7 @@ IP-Nummer: $REMOTE_ADDR Browser: $HTTP_USER_AGENT ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_sponsor_change_data.tpl b/templates/de/emails/admin/admin_sponsor_change_data.tpl index 93b00ffa0a..89ff3f17e4 100644 --- a/templates/de/emails/admin/admin_sponsor_change_data.tpl +++ b/templates/de/emails/admin/admin_sponsor_change_data.tpl @@ -4,22 +4,22 @@ einer unserer Sponsoren hat soeben seine Daten geaendert! Hier sind alle neuen (und in Klammern alten) Daten: ------------------------------ -{--SPONSOR_ENTER_COMPANY_TITLE--}: $DATA[company] ($content[company]) -{--SPONSOR_ENTER_COMPANY_POSITION--}: $DATA[position] ($content[position]) -{--SPONSOR_ENTER_TAX_IDENT--}: $DATA[tax_ident] ($content[tax_ident]) +{--SPONSOR_ENTER_COMPANY_TITLE--}: $content[new_data][company] ($content[company]) +{--SPONSOR_ENTER_COMPANY_POSITION--}: $content[new_data][position] ($content[position]) +{--SPONSOR_ENTER_TAX_IDENT--}: $content[new_data][tax_ident] ($content[tax_ident]) ------------------------------ -{--GUEST_GENDER--}: $DATA[gender] ($content[gender]) -{--SURNAME_FAMILY--}: $DATA[surname] $DATA[family] ($content[surname] $content[family]) -{--SPONSOR_EMAIL_STREET_NR1--}: $DATA[street_nr1] ($content[street_nr1]) -{--SPONSOR_EMAIL_STREET_NR2--}: $DATA[street_nr2] ($content[street_nr2]) -{--SPONSOR_EMAIL_CNTRY_ZIP_CITY--}: $DATA[country]-$DATA[zip] $DATA[city] ($content[country]-$content[zip] $content[city]) +{--GUEST_GENDER--}: $content[new_data][gender] ($content[gender]) +{--SURNAME_FAMILY--}: $content[new_data][surname] $content[new_data][family] ($content[surname] $content[family]) +{--SPONSOR_EMAIL_STREET_NR1--}: $content[new_data][street_nr1] ($content[street_nr1]) +{--SPONSOR_EMAIL_STREET_NR2--}: $content[new_data][street_nr2] ($content[street_nr2]) +{--SPONSOR_EMAIL_CNTRY_ZIP_CITY--}: $content[new_data][country]-$content[new_data][zip] $content[new_data][city] ($content[country]-$content[zip] $content[city]) ------------------------------ -{--SPONSOR_ENTER_PHONE--}: $DATA[phone] ($content[phone]) -{--SPONSOR_ENTER_FAX--}: $DATA[fax] ($content[fax]) -{--SPONSOR_ENTER_CELL--}: $DATA[cell] ($content[cell]) +{--SPONSOR_ENTER_PHONE--}: $content[new_data][phone] ($content[phone]) +{--SPONSOR_ENTER_FAX--}: $content[new_data][fax] ($content[fax]) +{--SPONSOR_ENTER_CELL--}: $content[new_data][cell] ($content[cell]) ------------------------------ -{--SPONSOR_ENTER_EMAIL--}: $DATA[email] ($content[email]) -{--SPONSOR_ENTER_URL--}: $DATA[url] ($content[url]) +{--SPONSOR_ENTER_EMAIL--}: $content[new_data][email] ($content[email]) +{--SPONSOR_ENTER_URL--}: $content[new_data][url] ($content[url]) ------------------------------ ------------------------------ @@ -28,7 +28,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_sponsor_change_email.tpl b/templates/de/emails/admin/admin_sponsor_change_email.tpl index f2331480d3..1f3634cb53 100644 --- a/templates/de/emails/admin/admin_sponsor_change_email.tpl +++ b/templates/de/emails/admin/admin_sponsor_change_email.tpl @@ -4,22 +4,22 @@ einer unserer Sponsoren hat soeben seine EMail-Adresse geaendert! Hier sind alle neuen (und in Klammern alten) Daten: ------------------------------ -{--SPONSOR_ENTER_COMPANY_TITLE--}: $DATA[company] ($content[company]) -{--SPONSOR_ENTER_COMPANY_POSITION--}: $DATA[position] ($content[position]) -{--SPONSOR_ENTER_TAX_IDENT--}: $DATA[tax_ident] ($content[tax_ident]) +{--SPONSOR_ENTER_COMPANY_TITLE--}: $content[new_data][company] ($content[company]) +{--SPONSOR_ENTER_COMPANY_POSITION--}: $content[new_data][position] ($content[position]) +{--SPONSOR_ENTER_TAX_IDENT--}: $content[new_data][tax_ident] ($content[tax_ident]) ------------------------------ -{--GUEST_GENDER--}: $DATA[gender] ($content[gender]) -{--SURNAME_FAMILY--}: $DATA[surname] $DATA[family] ($content[surname] $content[family]) -{--SPONSOR_EMAIL_STREET_NR1--}: $DATA[street_nr1] ($content[street_nr1]) -{--SPONSOR_EMAIL_STREET_NR2--}: $DATA[street_nr2] ($content[street_nr2]) -{--SPONSOR_EMAIL_CNTRY_ZIP_CITY--}: $DATA[country]-$DATA[zip] $DATA[city] ($content[country]-$content[zip] $content[city]) +{--GUEST_GENDER--}: $content[new_data][gender] ($content[gender]) +{--SURNAME_FAMILY--}: $content[new_data][surname] $content[new_data][family] ($content[surname] $content[family]) +{--SPONSOR_EMAIL_STREET_NR1--}: $content[new_data][street_nr1] ($content[street_nr1]) +{--SPONSOR_EMAIL_STREET_NR2--}: $content[new_data][street_nr2] ($content[street_nr2]) +{--SPONSOR_EMAIL_CNTRY_ZIP_CITY--}: $content[new_data][country]-$content[new_data][zip] $content[new_data][city] ($content[country]-$content[zip] $content[city]) ------------------------------ -{--SPONSOR_ENTER_PHONE--}: $DATA[phone] ($content[phone]) -{--SPONSOR_ENTER_FAX--}: $DATA[fax] ($content[fax]) -{--SPONSOR_ENTER_CELL--}: $DATA[cell] ($content[cell]) +{--SPONSOR_ENTER_PHONE--}: $content[new_data][phone] ($content[phone]) +{--SPONSOR_ENTER_FAX--}: $content[new_data][fax] ($content[fax]) +{--SPONSOR_ENTER_CELL--}: $content[new_data][cell] ($content[cell]) ------------------------------ -{--SPONSOR_ENTER_EMAIL--}: $DATA[email] ($content[email]) -{--SPONSOR_ENTER_URL--}: $DATA[url] ($content[url]) +{--SPONSOR_ENTER_EMAIL--}: $content[new_data][email] ($content[email]) +{--SPONSOR_ENTER_URL--}: $content[new_data][url] ($content[url]) ------------------------------ ------------------------------ @@ -28,7 +28,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_sponsor_edit.tpl b/templates/de/emails/admin/admin_sponsor_edit.tpl index b20bdfe0fc..38e38c7c1d 100644 --- a/templates/de/emails/admin/admin_sponsor_edit.tpl +++ b/templates/de/emails/admin/admin_sponsor_edit.tpl @@ -1,7 +1,7 @@ Hallo $content[gender] $content[surname] $content[family], ------------------------------ -Ihre Sponsor-ID lautet: {!__SPONSOR_ID!} +Ihre Sponsor-ID lautet: $content[id] ------------------------------ Einer unserer Administratoren hat soeben Ihren Sponsorenaccount geaendert. @@ -30,7 +30,7 @@ Es sind nun folgende Daten gesetzt: {--PASS_1--}: $content[pass1] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/admin/admin_sponsor_pending.tpl b/templates/de/emails/admin/admin_sponsor_pending.tpl index f5a89f2335..e302a7506d 100644 --- a/templates/de/emails/admin/admin_sponsor_pending.tpl +++ b/templates/de/emails/admin/admin_sponsor_pending.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -soeben hat ein neuer Sponsor seine EMail-Adresse bestaetigt. Dies wurde von der IP-Nummer $REMOTE_ADDR aus durchgefuehrt. +soeben hat ein neuer Sponsor seine EMail-Adresse bestätigt. Dies wurde von der IP-Nummer $REMOTE_ADDR aus durchgefuehrt. Bitte setzen Sie sich mit ihm in Verbindung (die EMail-Adresse finden Sie weiter unten) und teilen Sie ihm Ihre Kontoverbindung mit! @@ -45,7 +45,7 @@ Faxnummer: $content[fax] Handynummer: $content[cell] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_sponsor_reg.tpl b/templates/de/emails/admin/admin_sponsor_reg.tpl index 5e18a436dd..86eb82ec05 100644 --- a/templates/de/emails/admin/admin_sponsor_reg.tpl +++ b/templates/de/emails/admin/admin_sponsor_reg.tpl @@ -1,30 +1,30 @@ Hallo Administrator, -soeben hat sich ein neuer Sponsor zu unserem {?MT_WORD?} mit der IP-Nummer $REMOTE_ADDR angemeldet. Er wird -als naechstes seine EMail-Adresse bestaetigen. +soeben hat sich ein neuer Sponsor zu unserem {?mt_word?} mit der IP-Nummer $REMOTE_ADDR angemeldet. Er wird +als naechstes seine EMail-Adresse bestätigen. Folgende Daten wurden dabei uebermittelt: ------------------------------ -Sponsor-ID: {!__ID!} +Sponsor-ID: $content[id] ------------------------------ Verwendeter Browser: $HTTP_USER_AGENT ------------------------------ IP-Nummer: $REMOTE_ADDR ------------------------------ -Hash-Wert: {!__HASH!} +Hash-Wert: $content[hash] ------------------------------ -Angemeldet am: {!__TIMESTAMP!} +Angemeldet am: $content[timestamp] ------------------------------ -Anrede: {!__GENDER!} +Anrede: $content[gender] ------------------------------ -Vorname: {!__SURNAME!} +Vorname: $content[surname] ------------------------------ -Nachname: {!__FAMILY!} +Nachname: $content[family] ------------------------------ Die restliche Daten koennen Sie im Admin-Bereich einsehen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_sponsor_settings.tpl b/templates/de/emails/admin/admin_sponsor_settings.tpl index 0d0acfba79..bfb0f08f30 100644 --- a/templates/de/emails/admin/admin_sponsor_settings.tpl +++ b/templates/de/emails/admin/admin_sponsor_settings.tpl @@ -4,8 +4,8 @@ einer unserer Sponsoren hat soeben seine Einstellungen geaendert! Hier sind alle neuen (und in Klammern alten) Daten: ------------------------------ -{--SPONSOR_RECEIVE_WARNINGS--}: $DATA[receive] ($content[receive]) -{--SPONSOR_WARNING_INTERVAL--}: $DATA[interval] ($content[interval]) +{--SPONSOR_RECEIVE_WARNINGS--}: $content[new_data][receive] ($content[receive]) +{--SPONSOR_WARNING_INTERVAL--}: $content[new_data][interval] ($content[interval]) ------------------------------ ------------------------------ @@ -14,7 +14,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_support-ordr.tpl b/templates/de/emails/admin/admin_support-ordr.tpl index 4ce1b17d0c..06c603b502 100644 --- a/templates/de/emails/admin/admin_support-ordr.tpl +++ b/templates/de/emails/admin/admin_support-ordr.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zum Mailversand. +Ein Mitglied aus Ihrem {?mt_word?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zum Mailversand. ------------------------------ Seine Mitglieder-ID ist: $UID @@ -20,7 +20,7 @@ $content[text] Alternativ zum direkten Mailkontakt koennen Sie sich in den Admin-Bereich einloggen und das Support-System nutzen! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_support-reflink.tpl b/templates/de/emails/admin/admin_support-reflink.tpl index 6a080b9817..5cf5051cf3 100644 --- a/templates/de/emails/admin/admin_support-reflink.tpl +++ b/templates/de/emails/admin/admin_support-reflink.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zu seinem Referal-Link. +Ein Mitglied aus Ihrem {?mt_word?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zu seinem Referal-Link. ------------------------------ Seine Mitglieder-ID ist: $UID @@ -20,7 +20,7 @@ $content[text] Alternativ zum direkten Mailkontakt koennen Sie sich in den Admin-Bereich einloggen und das Support-System nutzen! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_support-unconfirmed.tpl b/templates/de/emails/admin/admin_support-unconfirmed.tpl index 189bd51e8e..afee62f9d6 100644 --- a/templates/de/emails/admin/admin_support-unconfirmed.tpl +++ b/templates/de/emails/admin/admin_support-unconfirmed.tpl @@ -1,6 +1,6 @@ Hallo Administrator, -Ein Mitglied aus Ihrem {?MT_WORD?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zu seinen unbestaetigten Mails. +Ein Mitglied aus Ihrem {?mt_word?} hat soeben das Support-Formular ausgefuellt und hat eine Frage zu seinen unbestätigten Mails. ------------------------------ Seine Mitglieder-ID ist: $UID @@ -20,7 +20,7 @@ $content[text] Alternativ zum direkten Mailkontakt koennen Sie sich in den Admin-Bereich einloggen und das Support-System nutzen! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl b/templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl index a955c57c2b..773781d524 100644 --- a/templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl @@ -32,7 +32,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_active_pending.tpl b/templates/de/emails/admin/admin_surfbar_url_active_pending.tpl index e22bfe56ca..daf9de17ab 100644 --- a/templates/de/emails/admin/admin_surfbar_url_active_pending.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_active_pending.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] (Neu: $content[edit][limit]) Davon übrig: $content[views_max] (Neu: $content[edit][limit]) ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl b/templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl index a21a3ebdd6..429c1bcc85 100644 --- a/templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] Davon übrig: $content[views_max] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_confirmed.tpl b/templates/de/emails/admin/admin_surfbar_url_confirmed.tpl index 4c77c1b5b7..5e6bcdb524 100644 --- a/templates/de/emails/admin/admin_surfbar_url_confirmed.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_confirmed.tpl @@ -9,7 +9,7 @@ Gebuchte URL: $content[url] Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ Angemeldet: $content[registered] ------------------------------------------ @@ -18,7 +18,7 @@ Status: $content[status] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_depleted.tpl b/templates/de/emails/admin/admin_surfbar_url_depleted.tpl index 5a1e76bbe2..b07e2f9828 100644 --- a/templates/de/emails/admin/admin_surfbar_url_depleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_depleted.tpl @@ -11,7 +11,7 @@ Email: $content[email] Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ URL angemeldet: $content[registered] ------------------------------------------ @@ -28,7 +28,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_locked_deleted.tpl b/templates/de/emails/admin/admin_surfbar_url_locked_deleted.tpl index 44c5f73c89..acb02c7613 100644 --- a/templates/de/emails/admin/admin_surfbar_url_locked_deleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_locked_deleted.tpl @@ -36,7 +36,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_locked_pending.tpl b/templates/de/emails/admin/admin_surfbar_url_locked_pending.tpl index 2366553af0..d3881eb2e6 100644 --- a/templates/de/emails/admin/admin_surfbar_url_locked_pending.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_locked_pending.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] Davon übrig: $content[views_max] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_migrate.tpl b/templates/de/emails/admin/admin_surfbar_url_migrate.tpl index 3c6271c248..6c37726a32 100644 --- a/templates/de/emails/admin/admin_surfbar_url_migrate.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_migrate.tpl @@ -6,19 +6,19 @@ Hier sind alle Daten dazu: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Email: $DATA[email] +Email: $content[email] ------------------------------------------ Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[insert_id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_migrated_deleted.tpl b/templates/de/emails/admin/admin_surfbar_url_migrated_deleted.tpl index 5894bf9cf3..f3243c0c04 100644 --- a/templates/de/emails/admin/admin_surfbar_url_migrated_deleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_migrated_deleted.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] Davon übrig: $content[views_max] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_migrated_migrated.tpl b/templates/de/emails/admin/admin_surfbar_url_migrated_migrated.tpl index b290b83c60..46fcfd13ec 100644 --- a/templates/de/emails/admin/admin_surfbar_url_migrated_migrated.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_migrated_migrated.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] (Neu: $content[edit][limit]) Davon übrig: $content[views_max] (Neu: $content[edit][limit]) ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_migrated_pending.tpl b/templates/de/emails/admin/admin_surfbar_url_migrated_pending.tpl index 07da3678b6..17b530b00c 100644 --- a/templates/de/emails/admin/admin_surfbar_url_migrated_pending.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_migrated_pending.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] Davon übrig: $content[views_max] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_pending.tpl b/templates/de/emails/admin/admin_surfbar_url_pending.tpl index 7e7534b851..c315d74ed2 100644 --- a/templates/de/emails/admin/admin_surfbar_url_pending.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_pending.tpl @@ -11,7 +11,7 @@ Email: $content[email] Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ URL angemeldet: $content[registered] ------------------------------------------ @@ -24,7 +24,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl b/templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl index d82e749b4e..95e1115346 100644 --- a/templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl @@ -32,7 +32,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_reg.tpl b/templates/de/emails/admin/admin_surfbar_url_reg.tpl index 87d655cc3f..c0e8399cbd 100644 --- a/templates/de/emails/admin/admin_surfbar_url_reg.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_reg.tpl @@ -6,12 +6,12 @@ Hier sind alle Daten dazu: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Email: $DATA[email] +Email: $content[email] ------------------------------------------ Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ Anzahl Aufrufe: $content[limit] ------------------------------------------ @@ -20,7 +20,7 @@ Status: $content[status] ID in der Surfbar: $content[insert_id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_rejected.tpl b/templates/de/emails/admin/admin_surfbar_url_rejected.tpl index 90aa5a2129..5609ede595 100644 --- a/templates/de/emails/admin/admin_surfbar_url_rejected.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_rejected.tpl @@ -9,7 +9,7 @@ Gebuchte URL: $content[url] Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] +User-ID: $content[userid] ------------------------------------------ Angemeldet: $content[registered] ------------------------------------------ @@ -18,7 +18,7 @@ Status: $content[status] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl b/templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl index 2be42cdb1a..d39e605dd5 100644 --- a/templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] Davon übrig: $content[views_max] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl b/templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl index 3b09b66768..3e7c296cbd 100644 --- a/templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl @@ -32,7 +32,7 @@ Kosten/Aufruf: $content[costs] {?POINTS?} ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl b/templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl index e33dd61bca..a73cad68b9 100644 --- a/templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl @@ -27,7 +27,7 @@ Maximale Einblendungen: $content[views_allowed] (Neu: $content[edit][limit]) Davon übrig: $content[views_max] (Neu: $content[edit][limit]) ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl index be425d9418..e90cf6aa15 100644 --- a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl @@ -16,7 +16,7 @@ Anzahl Aufrufe: $content[limit] ID in der Surfbar: $content[insert_id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_transfer_ap.tpl b/templates/de/emails/admin/admin_transfer_ap.tpl index 8ce58de5e6..35117369ab 100644 --- a/templates/de/emails/admin/admin_transfer_ap.tpl +++ b/templates/de/emails/admin/admin_transfer_ap.tpl @@ -2,7 +2,7 @@ Hallo Administrator, Soeben wurden $content Transfer-Eintraege aus der Datenbank automatisch geloescht! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/admin/admin_transfer_points.tpl b/templates/de/emails/admin/admin_transfer_points.tpl index ff54fb7021..6d43759135 100644 --- a/templates/de/emails/admin/admin_transfer_points.tpl +++ b/templates/de/emails/admin/admin_transfer_points.tpl @@ -1,32 +1,32 @@ Hallo Administrator, -Soeben ist ein {?POINTS?}-Transfer in Ihrem {?MT_WORD?} zwischen 2 Ihrer Mitglieder durchgefuehrt worden. +Soeben ist ein {?POINTS?}-Transfer in Ihrem {?mt_word?} zwischen 2 Ihrer Mitglieder durchgeführt worden. Hier alle Infos zum Transfer: ------------------------------ -- Daten des Empfaengers: -- ------------------------------ -Mitglieder-ID: {!__RECIPIENT_UID!} -Vollst. Name: {!__RECIPIENT_GENDER!} {!__RECIPIENT_SNAME!} {!__RECIPIENT_FNAME!} -Email-Adresse: {!__RECIPIENT_EMAIL!} +Mitglieder-ID: $content[recipient][userid] +Vollst. Name: $content[recipient][gender] $content[recipient][surname] $content[recipient][family] +Email-Adresse: $content[recipient][email] ------------------------------ -- Daten des Absenders: -- ------------------------------ -Mitglieder-ID: {!__SENDER_UID!} -Vollst. Name: {!__SENDER_GENDER!} {!__SENDER_SNAME!} {!__SENDER_FNAME!} -Email-Adresse: {!__SENDER_EMAIL!} +Mitglieder-ID: $content[sender][userid] +Vollst. Name: $content[sender][gender] $content[sender][surname] $content[sender][family] +Email-Adresse: $content[sender][email] ------------------------------ IP-Nummer: $REMOTE_ADDR Browser : $HTTP_USER_AGENT ------------------------------ -Verwendungszweck: {!__TRANSFER_REASON!} +Verwendungszweck: $content[reason] ------------------------------ -Transaktionsnummer: {!__TRANS_ID!} +Transaktionsnummer: $content[trans_id] ------------------------------ -Diese beiden Mitglieder koennen sich die Ueberweisung noch {!__TRANSFER_EXPIRES!} in ihrem Mitgliedsbereich ansehen. Danach wird der Eintrag bei installierter autopurge-Erweiterung automatisch entfernt. +Diese beiden Mitglieder können sich die Ueberweisung noch $content[expires] in ihrem Mitgliedsbereich ansehen. Danach wird der Eintrag bei installierter autopurge-Erweiterung automatisch entfernt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script -{?URL?}/admin.php \ No newline at end of file +{?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_undelete_active_surfbar_urls.tpl b/templates/de/emails/admin/admin_undelete_active_surfbar_urls.tpl index 288df3a894..c329ec4df4 100644 --- a/templates/de/emails/admin/admin_undelete_active_surfbar_urls.tpl +++ b/templates/de/emails/admin/admin_undelete_active_surfbar_urls.tpl @@ -20,7 +20,7 @@ Angemeldet: $content[registered] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admin/admin_wernis_request.tpl b/templates/de/emails/admin/admin_wernis_request.tpl index 5ec6c16410..1248c63d25 100644 --- a/templates/de/emails/admin/admin_wernis_request.tpl +++ b/templates/de/emails/admin/admin_wernis_request.tpl @@ -29,7 +29,7 @@ Die {!WERNIS_POINTS_VALUE!} Wernis wurden dem Mitglied bereits abgebucht. Bitte vergessen Sie nicht, das Mitglied ueber die Auszahlung zu informieren, da dies nicht automatisch erfolgt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admins/admins_mail_contct_admin.tpl b/templates/de/emails/admins/admins_mail_contct_admin.tpl index b72a6be560..89070e658b 100644 --- a/templates/de/emails/admins/admins_mail_contct_admin.tpl +++ b/templates/de/emails/admins/admins_mail_contct_admin.tpl @@ -10,7 +10,7 @@ IP-Nummer: $REMOTE_ADDR Browser: $HTTP_USER_AGENT ------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/admins/admins_msg_contct_admin.tpl b/templates/de/emails/admins/admins_msg_contct_admin.tpl index 82d5fd4ab4..bea8671a50 100644 --- a/templates/de/emails/admins/admins_msg_contct_admin.tpl +++ b/templates/de/emails/admins/admins_msg_contct_admin.tpl @@ -10,7 +10,7 @@ IP-Nummer: $REMOTE_ADDR Browser: $HTTP_USER_AGENT ------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php \ No newline at end of file diff --git a/templates/de/emails/back-admin.tpl b/templates/de/emails/back-admin.tpl index 436f3cb794..365bf1e292 100644 --- a/templates/de/emails/back-admin.tpl +++ b/templates/de/emails/back-admin.tpl @@ -1,8 +1,8 @@ Hallo Administrator, -soeben wurden in Ihrem {?MT_WORD?} $content[points] {?POINTS?} aus nicht versendeten Mails in den Jackpot getan! +soeben wurden in Ihrem {?mt_word?} $content[points] {?POINTS?} aus nicht versendeten Mails in den Jackpot getan! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/back-member.tpl b/templates/de/emails/back-member.tpl index df3f42656b..a1a1c53d63 100644 --- a/templates/de/emails/back-member.tpl +++ b/templates/de/emails/back-member.tpl @@ -2,7 +2,7 @@ Hallo $content[gender] $content[surname] $content[family], Eine Buchung von Ihnen konnte nich vollstaendig ausgesendet werden. Wir haben Ihnen $content[points] {?POINTS?} wieder gutgeschrieben! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/beg/beg_di_notify.tpl b/templates/de/emails/beg/beg_di_notify.tpl index 9c1fe754e4..5836213213 100644 --- a/templates/de/emails/beg/beg_di_notify.tpl +++ b/templates/de/emails/beg/beg_di_notify.tpl @@ -7,7 +7,7 @@ Ihre Mitglied-ID lautet: $UID Soeben haben wir von {?MAIN_TITLE?} die laufende Bettel-Rallye wieder angehalten. Vielleicht werden wir bald wieder eine neuen Bettel-Rallye starten. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/beg/beg_en_notify.tpl b/templates/de/emails/beg/beg_en_notify.tpl index a5dba22143..f7f7ec7805 100644 --- a/templates/de/emails/beg/beg_en_notify.tpl +++ b/templates/de/emails/beg/beg_en_notify.tpl @@ -3,25 +3,25 @@ Hallo $content[gender] $content[surname] $content[family], ------------------------------ Ihre Mitglied-ID lautet: $UID ------------------------------ -Ihr Bettel-Link lautet: {?URL?}/beg.php?uid=$UID +Ihr Bettel-Link lautet: {?URL?}/beg.php?userid=$UID ------------------------------ Soeben haben wir von {?MAIN_TITLE?} eine Bettel-Rallye gestartet. Hier alle Infos zur Bettel-Rallye: ------------------------------ -Minimale {?POINTS?} pro erfolgreichem Betteln: {!__BEG_MIN_POINTS!} +Minimale {?POINTS?} pro erfolgreichem Betteln: $content[min_points] ------------------------------ -Maximale {?POINTS?} pro erfolgreichem Betteln: {!__BEG_MAX_POINTS!} +Maximale {?POINTS?} pro erfolgreichem Betteln: $content[min_points] ------------------------------ -Maximale Gewinner dieser Bettel-Rallye: {!__BEG_MAX_WINNERS!} +Maximale Gewinner dieser Bettel-Rallye: $content[max_winner] ------------------------------ -IP-Sperre: {!__BEG_IP_LOCKER!} +IP-Sperre: $content[ip_locker] ------------------------------ Wir wuenschen Ihnen viel Erfolg in der Bettel-Rallye. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +{?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/beg/beg_en_notify_body.tpl b/templates/de/emails/beg/beg_en_notify_body.tpl index a2a1d8124f..7bd5ec8a69 100644 --- a/templates/de/emails/beg/beg_en_notify_body.tpl +++ b/templates/de/emails/beg/beg_en_notify_body.tpl @@ -1,18 +1,18 @@ ------------------------------ -Ihr Bettel-Link lautet: {?URL?}/beg.php?uid=$UID +Ihr Bettel-Link lautet: {?URL?}/beg.php?userid=$UID ------------------------------ Soeben haben wir von {?MAIN_TITLE?} eine Bettel-Rallye gestartet. Hier alle Infos zur Bettel-Rallye: ------------------------------ -Minimale {?POINTS?} pro erfolgreichem Betteln: {!__BEG_MIN_POINTS!} +Minimale {?POINTS?} pro erfolgreichem Betteln: $content[min_points] ------------------------------ -Maximale {?POINTS?} pro erfolgreichem Betteln: {!__BEG_MAX_POINTS!} +Maximale {?POINTS?} pro erfolgreichem Betteln: $content[max_points] ------------------------------ -Maximale Gewinner dieser Bettel-Rallye: {!__BEG_MAX_WINNERS!} +Maximale Gewinner dieser Bettel-Rallye: $content[max_winner] ------------------------------ -IP-Sperre: {!__BEG_IP_LOCKER!} +IP-Sperre: $content[ip_locker] ------------------------------ Wir wuenschen Ihnen viel Erfolg in der Bettel-Rallye. diff --git a/templates/de/emails/bonus-mail.tpl b/templates/de/emails/bonus-mail.tpl index 1a14f35c4a..392ea398f5 100644 --- a/templates/de/emails/bonus-mail.tpl +++ b/templates/de/emails/bonus-mail.tpl @@ -20,19 +20,19 @@ Beworbene URL: $content[url] Hinweis: Angesammelte {?POINTS?} können versteigert oder verkauft werden, jedoch muß der Käufer bei {?MAIN_TITLE?} Mitglied sein oder werden. Um Ihre $content[points] {?POINTS?} gutgeschrieben zu bekommen, klicken Sie bitte auf folgenden Link: -{?URL?}/mailid.php!uid=$UID&bonusid=$content[id] +{?URL?}/mailid.php!userid=$UID&bonusid=$content[id] Wichtig! Achten Sie darauf das Ihr Mailserver immer empfangbereit ist. Sollte Ihr Mailserver nicht empfangbereit sein (z.B. voll usw.), werden wir Ihren Account sperren! Sie haben nun innerhalb von 10 Tagen die möglichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gelöscht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, prüfen Sie Ihren Account! ---------------- Bitte bestätigen Sie diese Mail, anderfalls geht sie und die {?POINTS?} nach der evtl. angezeigten Verfallszeit verloren! Sollte keine Verfallszeit angezeigt werden, besteht sie solgange, bis wir unserem Server aufräumen! -Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgrund Ihrer Mitgliedschaft bei unserem {?MT_WORD?}-Service {?MAIN_TITLE?} ({?URL?}). Wenn Sie keine weiteren Emails empfangen möchten, melden Sie sich bitte unter {?WEBMASTER?} mit Ihrer Mitglieder ID ab. Sie werden dann keine weiteren Mails mehr erhalten, und Ihr Account wird gelöscht. +Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgrund Ihrer Mitgliedschaft bei unserem {?mt_word?}-Service {?MAIN_TITLE?} ({?URL?}). Wenn Sie keine weiteren Emails empfangen möchten, melden Sie sich bitte unter {?WEBMASTER?} mit Ihrer Mitglieder ID ab. Sie werden dann keine weiteren Mails mehr erhalten, und Ihr Account wird gelöscht. {?MAIN_TITLE?} distanziert sich von jeglichen Inhalte und Links innerhalb dieser E-Mail. Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/bonus/bonus_di_notify.tpl b/templates/de/emails/bonus/bonus_di_notify.tpl index 9dc482bf7c..88cfbc4903 100644 --- a/templates/de/emails/bonus/bonus_di_notify.tpl +++ b/templates/de/emails/bonus/bonus_di_notify.tpl @@ -7,7 +7,7 @@ Ihre Mitglied-ID lautet: $UID Soeben haben wir von {?MAIN_TITLE?} die laufende Aktiv-Rallye wieder angehalten. Vielleicht werden wir bald wieder eine neuen Aktiv-Rallye starten. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/bonus/bonus_en_notify.tpl b/templates/de/emails/bonus/bonus_en_notify.tpl index 0dcff4c8d7..4adaf6fe4e 100644 --- a/templates/de/emails/bonus/bonus_en_notify.tpl +++ b/templates/de/emails/bonus/bonus_en_notify.tpl @@ -18,7 +18,7 @@ Alle weiteren Infos finden Sie dazu im Mitgliedsbereich. Der Rechtsweg ist ausge Wir wuenschen Ihnen viel Erfolg in der Aktiv-Rallye? -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/confirm-member.tpl b/templates/de/emails/confirm-member.tpl index 14f00097b6..d45cd8c5ce 100644 --- a/templates/de/emails/confirm-member.tpl +++ b/templates/de/emails/confirm-member.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben soeben Ihre Email-Adresse bestätigt und sind somit für den {?MT_WORD?} {?MAIN_TITLE?} freigeschaltet! +Sie haben soeben Ihre Email-Adresse bestätigt und sind somit für den {?mt_word?} {?MAIN_TITLE?} freigeschaltet! Sie können sich nun hier einloggen: @@ -11,7 +11,7 @@ für Ihre Anmeldung werden wir Ihnen als Willkommensgutschrift $content[poin Wir wünschen Ihnen viel Spass und Erfolg beim Mail-Versand! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +{?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/confirm-referral.tpl b/templates/de/emails/confirm-referral.tpl index 538e44077c..9cc2b61f99 100644 --- a/templates/de/emails/confirm-referral.tpl +++ b/templates/de/emails/confirm-referral.tpl @@ -1,10 +1,10 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben heute ein neues Mitglied für unseren {?MT_WORD?} geworben! +Sie haben heute ein neues Mitglied für unseren {?mt_word?} geworben! Hier sehen Sie genau, in welcher Ebene Sie ihn geworben haben: ----------------- -Referal-Ebene ($content[percent]%): $content[level] +Referal-Ebene ($content[percents]%): $content[level] {?POINTS?}: $content[points] ID des Mitgliedes: $content[refid] ----------------- @@ -13,7 +13,7 @@ Sie werden nun auch weiterhin {?POINTS?} über diese geworbene Person erhalt Vielen Dank für Ihr Mitwerben! Wir wünschen Ihnen noch weiterhin viele neue Referals! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/del-user.tpl b/templates/de/emails/del-user.tpl index fc3d278ad5..37c92fe6e4 100644 --- a/templates/de/emails/del-user.tpl +++ b/templates/de/emails/del-user.tpl @@ -13,7 +13,7 @@ Wir wuenschen Ihnen weiterhin noch alles Gute und koennen Sie vielleicht irgentw Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/del_sponsor.tpl b/templates/de/emails/del_sponsor.tpl index 85d961f403..8f1aa27a4e 100644 --- a/templates/de/emails/del_sponsor.tpl +++ b/templates/de/emails/del_sponsor.tpl @@ -1,10 +1,10 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, +Hallo $content[gender] $content[surname] $content[family], Einer unserer Administratoren hat soeben Ihren Account geloescht! Grund der Loeschung war folgender: ------------------------------------ -$content +$content[reason] ------------------------------------ Ihre Sponsor-ID war: $UID ------------------------------------ @@ -13,7 +13,7 @@ Wir wuenschen Ihnen weiterhin noch alles Gute und koennen Sie vielleicht irgentw Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/done-admin.tpl b/templates/de/emails/done-admin.tpl index 74f59ed9e2..69586ed88c 100644 --- a/templates/de/emails/done-admin.tpl +++ b/templates/de/emails/done-admin.tpl @@ -7,7 +7,7 @@ $content[text] - - - - - Werbetext-Ende: - - - - - ------------------------------ -Werber: $content[sender_uid] +Werber: $content[sender_userid] ------------------------------ Verfallszeit: $content[expiration] ------------------------------ @@ -18,7 +18,7 @@ Beworbene URL: $content[url] Sollte diese Buchung nicht Ihren AGBs entsprechen, loggen Sie sich bitte in den Admin-Bereich ein und aendern die Mail. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/done-member.tpl b/templates/de/emails/done-member.tpl index c7c94a0745..6414191767 100644 --- a/templates/de/emails/done-member.tpl +++ b/templates/de/emails/done-member.tpl @@ -7,7 +7,7 @@ $content[text] - - - - - Werbetext-Ende: - - - - - ---------------- -Werber: $content[sender_uid] +Werber: $content[sender_userid] ---------------- Verfallszeit: $content[expiration] ---------------- @@ -22,7 +22,7 @@ Den weiteren Verlauf dieser Werbebuchung koennen Sie im Mitgliedsbereich unter S Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/guest/guest_request_confirm.tpl b/templates/de/emails/guest/guest_request_confirm.tpl index 7e3614ed8f..c25e42c413 100644 --- a/templates/de/emails/guest/guest_request_confirm.tpl +++ b/templates/de/emails/guest/guest_request_confirm.tpl @@ -1,13 +1,13 @@ Hallo $content[gender] $content[surname] $content[family], -Sie hatten sich zu unserem {?MT_WORD?} {?MAIN_TITLE?} angemeldet und heute Ihren Bestätigungslink erneut angefordert, jedoch bis jetzt noch nicht Ihre eMail-Adresse bestätigt. Diesen Schritt koennen Sie jetzt nachholen, damit Sie sich einloggen koennen. +Sie hatten sich zu unserem {?mt_word?} {?MAIN_TITLE?} angemeldet und heute Ihren Bestätigungslink erneut angefordert, jedoch bis jetzt noch nicht Ihre eMail-Adresse bestätigt. Diesen Schritt koennen Sie jetzt nachholen, damit Sie sich einloggen koennen. Hier ist Ihr Bestätigungslink: {?URL?}/confirm.php?hash=$content[hash] Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/lock-user.tpl b/templates/de/emails/lock-user.tpl index 61c765f10a..636e182dbf 100644 --- a/templates/de/emails/lock-user.tpl +++ b/templates/de/emails/lock-user.tpl @@ -15,7 +15,7 @@ Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns ({? Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/lock_sponsor.tpl b/templates/de/emails/lock_sponsor.tpl index 28ea57b7e1..494255b7b2 100644 --- a/templates/de/emails/lock_sponsor.tpl +++ b/templates/de/emails/lock_sponsor.tpl @@ -1,21 +1,21 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, +Hallo $content[gender] $content[surname] $content[family], -------------------------- Ihre Sponsor-ID bei uns: $UID -------------------------- -{!__EMAIL_MSG!} +$content[message] Grund der Sperrung war: -------------------------- -$content +$content[reason] -------------------------- Sollten Sie damit nicht einverstanden sein, so melden Sie sich bitte bei uns ({?WEBMASTER?}). Wir kommen dann mit Ihnen bald in Kontakt. Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_autopurge_inactive.tpl b/templates/de/emails/member/member_autopurge_inactive.tpl index 51ef13ddf9..1c7b9f0f87 100644 --- a/templates/de/emails/member/member_autopurge_inactive.tpl +++ b/templates/de/emails/member/member_autopurge_inactive.tpl @@ -4,16 +4,16 @@ Hallo $content[gender] $content[surname] $content[family], Ihre Mitglied-ID lautet: $UID ------------------------------ -Sie sind seit geraumer Zeit in unserem {?MT_WORD?} nicht mehr aktiv gewesen. Sie waren seit dem $content nicht mehr eingeloggt oder haben keine Mail bestaetigt! +Sie sind seit geraumer Zeit in unserem {?mt_word?} nicht mehr aktiv gewesen. Sie waren seit dem $content[last_online] nicht mehr eingeloggt oder haben keine Mail bestätigt! -Sollten Sie weitere {!__INACTIVE_TIME!} Tage nicht mehr aktiv sein, wird Ihr Account automatisch geloescht! Alle Ihre angesammelten {?POINTS?} gehen verloren! +Sollten Sie weitere $content[time] Tage nicht mehr aktiv sein, wird Ihr Account automatisch geloescht! Alle Ihre angesammelten {?POINTS?} gehen verloren! -Unserer {?MT_WORD?} lebt davon, dass seine Mitglieder aktiv bleiben - oder Urlaub koennen Sie auch beantragen - und Mails bestaetigen. Bitte loggen Sie sich bald zu unserem {?MT_WORD?} wieder ein! +Unserer {?mt_word?} lebt davon, dass seine Mitglieder aktiv bleiben - oder Urlaub koennen Sie auch beantragen - und Mails bestätigen. Bitte loggen Sie sich bald zu unserem {?mt_word?} wieder ein! Hier koennen Sie sich einloggen: URL: {?URL?}/login.php -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file +{?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_autopurge_points.tpl b/templates/de/emails/member/member_autopurge_points.tpl index 6ab2b50185..2cffd1aea3 100644 --- a/templates/de/emails/member/member_autopurge_points.tpl +++ b/templates/de/emails/member/member_autopurge_points.tpl @@ -6,7 +6,7 @@ Bei der automatischen Loeschung von Bestaetigungslinks wurden Ihnen $content {?P Ihre Mitglied-ID lautet: $UID ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_autopurge_unconfirmed.tpl b/templates/de/emails/member/member_autopurge_unconfirmed.tpl index 44a526795e..cdfed933a6 100644 --- a/templates/de/emails/member/member_autopurge_unconfirmed.tpl +++ b/templates/de/emails/member/member_autopurge_unconfirmed.tpl @@ -1,3 +1,5 @@ -Sie hatten sich vor laengerer Zeit zu unserem {?MT_WORD?} {?MAIN_TITLE?} ({?URL?}) angemeldet, aber bis heute noch nicht Ihre EMail-Adresse bestaetigt! +Sie hatten sich vor laengerer Zeit zu unserem {?mt_word?} {?MAIN_TITLE?} ({?URL?}) angemeldet, aber bis heute noch nicht Ihre EMail-Adresse bestätigt! -Ihre Anmeldung ist bei uns am $content eingegangen. Ihr Account ist hier unwiederruflich geloescht! \ No newline at end of file +Sie hatten dazu $content[time] Stunden Zeit. + +Ihre Anmeldung ist bei uns am $content[joined] eingegangen. Ihr Account ist hier unwiederruflich geloescht! \ No newline at end of file diff --git a/templates/de/emails/member/member_beg.tpl b/templates/de/emails/member/member_beg.tpl index b78b9ef770..45a8305b42 100644 --- a/templates/de/emails/member/member_beg.tpl +++ b/templates/de/emails/member/member_beg.tpl @@ -8,7 +8,7 @@ Herzlichen Glueckwunsch! Ihre Mitglied-ID lautet: $UID ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_birthday.tpl b/templates/de/emails/member/member_birthday.tpl index 71dd13fdca..a26c838e30 100644 --- a/templates/de/emails/member/member_birthday.tpl +++ b/templates/de/emails/member/member_birthday.tpl @@ -4,7 +4,7 @@ Wir das Team von {?MAIN_TITLE?} wuenschen Ihnen alles Gute und Gesundheit zu Ihr Diese Mail wurde automatisch versandt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_birthday_confirm.tpl b/templates/de/emails/member/member_birthday_confirm.tpl index 87c5ef5daf..d80ca6ab5d 100644 --- a/templates/de/emails/member/member_birthday_confirm.tpl +++ b/templates/de/emails/member/member_birthday_confirm.tpl @@ -5,12 +5,12 @@ Wir das Team von {?MAIN_TITLE?} wuenschen Ihnen alles Gute und Gesundheit zu Ihr Wenn Sie den folgenden Link anklicken, erhalten Sie $content[points] {?POINTS?} Ihrem Account sofort gutgeschrieben? ---------------------------------------------------------------------- -{?URL?}/birthday_confirm.php?uid=$UID&check=$content[check] +{?URL?}/birthday_confirm.php?userid=$UID&check=$content[check] ---------------------------------------------------------------------- Diese Mail wurde automatisch versandt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_bonus.tpl b/templates/de/emails/member/member_bonus.tpl index e417868453..5584993598 100644 --- a/templates/de/emails/member/member_bonus.tpl +++ b/templates/de/emails/member/member_bonus.tpl @@ -8,7 +8,7 @@ Herzlichen Glueckwunsch! Ihre Mitglied-ID lautet: $UID ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_contct.tpl b/templates/de/emails/member/member_contct.tpl index 3733f76cf2..fb2349c53a 100644 --- a/templates/de/emails/member/member_contct.tpl +++ b/templates/de/emails/member/member_contct.tpl @@ -1,7 +1,7 @@ Hallo $content[gender] $content[surname] $content[family], ------------------------------ -Ihre Mitglied-ID lautet: $content[uid] +Ihre Mitglied-ID lautet: $content[userid] ------------------------------ Einer unserer Administratoren hat Ihnen folgende Nachricht zugeschickt: @@ -10,7 +10,7 @@ Einer unserer Administratoren hat Ihnen folgende Nachricht zugeschickt: $content[text] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_del_surfbar_urls.tpl b/templates/de/emails/member/member_del_surfbar_urls.tpl index 48921cb3d8..3006ea7eaa 100644 --- a/templates/de/emails/member/member_del_surfbar_urls.tpl +++ b/templates/de/emails/member/member_del_surfbar_urls.tpl @@ -15,7 +15,7 @@ Angemeldet: $content[registered] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_doubler.tpl b/templates/de/emails/member/member_doubler.tpl index 89fefc4dda..98d7e85e39 100644 --- a/templates/de/emails/member/member_doubler.tpl +++ b/templates/de/emails/member/member_doubler.tpl @@ -8,7 +8,7 @@ Doppler-Transaktionsnummer: $content[id] Ihre IP-Nummer lautete: $content[ip] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_edit_surfbar_urls.tpl b/templates/de/emails/member/member_edit_surfbar_urls.tpl index 6e7ea51849..4d0f200753 100644 --- a/templates/de/emails/member/member_edit_surfbar_urls.tpl +++ b/templates/de/emails/member/member_edit_surfbar_urls.tpl @@ -4,18 +4,18 @@ wir haben soeben Ihre in unserer Surfbar gebuchte URL geändert. Hier sind alle Daten dazu: ------------------------------------------ -Gebuchte URL: $DATA[url] +Gebuchte URL: $content[url] ------------------------------------------ -Aufrufe gesamt: $DATA[views_total] +Aufrufe gesamt: $content[views_total] ------------------------------------------ -Angemeldet: $DATA[registered] +Angemeldet: $content[registered] ------------------------------------------ -Ihre User-ID: $DATA[userid] +Ihre User-ID: $content[userid] ------------------------------------------ -ID in der Surfbar: $DATA[id] +ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_holiday_activated.tpl b/templates/de/emails/member/member_holiday_activated.tpl index 3cb82074e0..329b8ff419 100644 --- a/templates/de/emails/member/member_holiday_activated.tpl +++ b/templates/de/emails/member/member_holiday_activated.tpl @@ -23,7 +23,7 @@ Urlaubsschaltung von anderen Mitgliedern gebucht. Wir wuenschen Ihnen einen schoenen und hoffentlich auch erholsamen Urlaub und wuerden uns freuen, Sie nach Ihrem Urlaub wieder bei uns begruessen zu duerfen! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_holiday_removed.tpl b/templates/de/emails/member/member_holiday_removed.tpl index 44fcdf5533..787dcedf17 100644 --- a/templates/de/emails/member/member_holiday_removed.tpl +++ b/templates/de/emails/member/member_holiday_removed.tpl @@ -16,7 +16,7 @@ Ende Ihres Urlaubes: $content[end] Ihre Urlaubsschaltung ist hiermit wieder aufgehoben. Sie koennen wieder Mails buchen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_holiday_request.tpl b/templates/de/emails/member/member_holiday_request.tpl index b712712bc0..3b447a9d41 100644 --- a/templates/de/emails/member/member_holiday_request.tpl +++ b/templates/de/emails/member/member_holiday_request.tpl @@ -9,18 +9,18 @@ E-Mail Adresse: $content[email] ------------------------------ Vor-, Nachname: $content[gender] $content[surname] $content[family] ------------------------------ -Anfang Ihres Urlaubes: {!_START_DAY!}.{!_START_MONTH!}.{!_START_YEAR!} +Anfang Ihres Urlaubes: $content[start_day].$content[start_month].$content[start_year] ------------------------------ -Ende Ihres Urlaubes: {!_END_DAY!}.{!_END_MONTH!}.{!_END_YEAR!} +Ende Ihres Urlaubes: $content[end_day].$content[end_month].$content[end_year] ------------------------------ -$content +$content[comments] ------------------------------ Ihre Urlaubsschaltung ist hiermit beantragt worden und wird zum gewuenschten Zeitpunkt aktiviert! Bis zum gebuchten Zeitpunkt koennen Sie jedoch weiterhin Mails empfangen und auch selber versenden - solange Ihr Guthaben ausreichend ist und auch genuegend Mitglieder vorhanden sind. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_holiday_unlock.tpl b/templates/de/emails/member/member_holiday_unlock.tpl index ca96dd82a1..462e657fa2 100644 --- a/templates/de/emails/member/member_holiday_unlock.tpl +++ b/templates/de/emails/member/member_holiday_unlock.tpl @@ -20,7 +20,7 @@ $content[holiday_comments] Ihre Urlaubsschaltung ist hiermit wieder aufgehoben. Sie koennen sich wieder in Ihren Mitglieder-Account einloggen. Verwenden Sie den unten stehenden Link dazu. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_lock_active_surfbar_urls.tpl b/templates/de/emails/member/member_lock_active_surfbar_urls.tpl index 96d9bf3087..74288ec868 100644 --- a/templates/de/emails/member/member_lock_active_surfbar_urls.tpl +++ b/templates/de/emails/member/member_lock_active_surfbar_urls.tpl @@ -13,7 +13,7 @@ Ihre User-ID: $content[userid] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_lock_locked_surfbar_urls.tpl b/templates/de/emails/member/member_lock_locked_surfbar_urls.tpl index 1b855522f6..162fb2ef1e 100644 --- a/templates/de/emails/member/member_lock_locked_surfbar_urls.tpl +++ b/templates/de/emails/member/member_lock_locked_surfbar_urls.tpl @@ -15,7 +15,7 @@ Ihre User-ID: $content[userid] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_mydata_notify.tpl b/templates/de/emails/member/member_mydata_notify.tpl index 580a8453ba..df4b39df45 100644 --- a/templates/de/emails/member/member_mydata_notify.tpl +++ b/templates/de/emails/member/member_mydata_notify.tpl @@ -1,17 +1,17 @@ -Hallo $DATA[1] $DATA[2], +Hallo $content[surname] $content[family], {--MEMBER_HAVE_CHANGED_DATA--} {--YOUR_NEW_DATA--}: ------------------------------------------ -{--GENDER--}: $DATA[0] -{--SURNAME--}: $DATA[1] -{--FAMILY_NAME--}: $DATA[2] -{--STREET_NR--}: $DATA[3] -{--COUNTRY--}: $DATA[4] -{--ZIP--}: $DATA[5] -{--CITY--}: $DATA[6] -{--ADDY--}: $DATA[7] +{--GENDER--}: $content[gender] +{--SURNAME--}: $content[surname] +{--FAMILY_NAME--}: $content[family] +{--STREET_NR--}: $content[street_nr] +{--COUNTRY--}: $content[country] +{--ZIP--}: $content[zip] +{--CITY--}: $content[city] +{--EMAIL_ADDRESS--}: $content[email] {--PASS_1--}: $content[pass1] ------------------------------------------ IP-Nummer: $REMOTE_ADDR @@ -22,10 +22,10 @@ Browser: $HTTP_USER_AGENT {--PLEASE_NOTIFY_ABUSE_MYDATA--} ------------------------------------------ -$DATA[info] +$content[info] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_newsletter_done.tpl b/templates/de/emails/member/member_newsletter_done.tpl index fe7f5fa099..84d1ed3b8c 100644 --- a/templates/de/emails/member/member_newsletter_done.tpl +++ b/templates/de/emails/member/member_newsletter_done.tpl @@ -1,20 +1 @@ -Hallo $content[gender] $content[surname] $content[family], - -Sie hatten bei uns die Abbestellung unseres Newsletters beantragt. Diese wurde nun durchgefuehrt. Hier sind nochmals Ihre an uns uebermittelten Daten: - ------------------------------- -Ihr Mitglieder-ID ist: $UID ------------------------------- -E-Mail Adresse: $content[email] ------------------------------- -Vor-, Nachname: $content[gender] $content[surname] $content[family] ------------------------------- - -Sie werden automatisch um 00:00 Uhr des Folgeabends wieder zum Newsletter-Empfang freigegeben, sobald die gebuchte Zeitspanne von 1 Monat abgelaufen ist. - -Sie erhalten dann eine Mitteilung, dass Sie wieder den Newsletter empfangen. - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file +@DEPRECATED diff --git a/templates/de/emails/member/member_newsletter_request.tpl b/templates/de/emails/member/member_newsletter_request.tpl index 76effc6101..84d1ed3b8c 100644 --- a/templates/de/emails/member/member_newsletter_request.tpl +++ b/templates/de/emails/member/member_newsletter_request.tpl @@ -1,26 +1 @@ -Hallo $content[gender] $content[surname] $content[family], - -Sie hatten bei uns die Abbestellung unseres Newsletters beantragt. Folgende Daten wurden dabei an uns uebermittelt: - ------------------------------- -Ihr Mitglieder-ID ist: $UID ------------------------------- -E-Mail Adresse: $content[email] ------------------------------- -Vor-, Nachname: $content[gender] $content[surname] $content[family] ------------------------------- - -Bitte ueberweisen Sie {!__CHARGE_VALUE!} {!__CURRENCY!} auf folgendes Konto: - -------------------------- -Kontonummer: 1234 5678 90 -BLZ: 111 111 111 -Verwendungszweck: NL-Abmeldung $UID -------------------------- - -Sobald wir den geforderten Betrag auf unserem Konto sehen, werden wir den Newsletterempfang fuer Sie fuer die gebuchte Dauer deaktivieren. - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file +@DEPRECATED diff --git a/templates/de/emails/member/member_newsletter_reset.tpl b/templates/de/emails/member/member_newsletter_reset.tpl index 2e099b3a34..84d1ed3b8c 100644 --- a/templates/de/emails/member/member_newsletter_reset.tpl +++ b/templates/de/emails/member/member_newsletter_reset.tpl @@ -1,18 +1 @@ -Hallo $content[gender] $content[surname] $content[family], - -Sie hatten bei uns die Abbestellung unseres Newsletters beantragt. Die gebuchte Zeitspanne ist nun abgelaufen. Hier sind nochmals Ihre Daten: - ------------------------------- -Ihr Mitglieder-ID ist: $UID ------------------------------- -E-Mail Adresse: $content[email] ------------------------------- -Vor-, Nachname: $content[gender] $content[surname] $content[family] ------------------------------- - -Sie wurden automatisch wieder zum Newsletter-Empfang freigegeben. - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file +@DEPRECATED diff --git a/templates/de/emails/member/member_payout_accepted.tpl b/templates/de/emails/member/member_payout_accepted.tpl index 8a43f3b06e..5aab00765e 100644 --- a/templates/de/emails/member/member_payout_accepted.tpl +++ b/templates/de/emails/member/member_payout_accepted.tpl @@ -19,7 +19,7 @@ $content Ihre Anfrage wurde hiermit angenommen! Wir werden baldmoeglichst den geforderten Betrag an Ihre angegebene Kontoverbindung ueberweisen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_payout_rejected.tpl b/templates/de/emails/member/member_payout_rejected.tpl index 7102fbce02..df7a8b6589 100644 --- a/templates/de/emails/member/member_payout_rejected.tpl +++ b/templates/de/emails/member/member_payout_rejected.tpl @@ -19,7 +19,7 @@ $content Ihre Anfrage wurde hiermit abgelehnt. Bitte beachten Sie unsere AGBs. Ihre {?POINTS?} werden wir gesondert zurueckbuchen oder bei schwerwiegenden Faellen uns vorbehalten, dies nicht zu tun oder Ihren Account bei uns zu sperren. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_payout_request.tpl b/templates/de/emails/member/member_payout_request.tpl index 083c268a0a..0b1000ebd4 100644 --- a/templates/de/emails/member/member_payout_request.tpl +++ b/templates/de/emails/member/member_payout_request.tpl @@ -11,17 +11,17 @@ Vorname: $content[surname] Nachname: $content[family] Email-Adresse: $content[email] ------------------------------ -Auszahlungsart: {--PAYOUT_TYPE_VALUE--} +Auszahlungsart: $content[type] Auszahlungshoehe: $content[payout] An Konto: $content[account] Bei Bank/Webseite: $content[bank] ------------------------------ -Die dazu noetigen {!PAYOUT_POINTS_VALUE!} haben wir Ihnen bereits abgezogen. +Die dazu noetigen $content[payout_points] haben wir Ihnen bereits abgezogen. Sobald wir Ihre Anfrage readaktionell geprueft haben und diese auch korrekt ausgefuellt wurde, werden wir die Uerberweisung dann auch taetigen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_payout_request_banner.tpl b/templates/de/emails/member/member_payout_request_banner.tpl index d5f806e1a5..bcb6a9f0bd 100644 --- a/templates/de/emails/member/member_payout_request_banner.tpl +++ b/templates/de/emails/member/member_payout_request_banner.tpl @@ -11,7 +11,7 @@ Vorname: $content[surname] Nachname: $content[family] Email-Adresse: $content[email] ------------------------------ -Auszahlungsart: {--PAYOUT_TYPE_VALUE--} +Auszahlungsart: $content[type] Auszahlungshoehe: $content[payout] ------------------------------ Ziel-URL: $content[turl] @@ -19,11 +19,11 @@ Linktext: $content[alt] Banner-URL: $content[banner] ------------------------------ -Die dazu noetigen {!PAYOUT_POINTS_VALUE!} haben wir Ihnen bereits abgezogen. +Die dazu noetigen $content[payout_points] haben wir Ihnen bereits abgezogen. Sobald wir Ihre Anfrage readaktionell geprueft haben und diese auch korrekt ausgefuellt wurde, werden wir die Uerberweisung dann auch taetigen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_rallye_expired.tpl b/templates/de/emails/member/member_rallye_expired.tpl index 4c4b9558a7..4dc0f5f5a9 100644 --- a/templates/de/emails/member/member_rallye_expired.tpl +++ b/templates/de/emails/member/member_rallye_expired.tpl @@ -28,7 +28,7 @@ Wichtige Hinweise: - $DATA[min_prices] -------------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_rallye_expired_bronce.tpl b/templates/de/emails/member/member_rallye_expired_bronce.tpl index 2b45ef7d2d..a0501d8248 100644 --- a/templates/de/emails/member/member_rallye_expired_bronce.tpl +++ b/templates/de/emails/member/member_rallye_expired_bronce.tpl @@ -28,7 +28,7 @@ Wichtige Hinweise: - $DATA[min_prices] ----------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_rallye_expired_gold.tpl b/templates/de/emails/member/member_rallye_expired_gold.tpl index 6c85f9d2a6..025c83a872 100644 --- a/templates/de/emails/member/member_rallye_expired_gold.tpl +++ b/templates/de/emails/member/member_rallye_expired_gold.tpl @@ -28,7 +28,7 @@ Wichtige Hinweise: - $DATA[min_prices] ----------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_rallye_expired_silver.tpl b/templates/de/emails/member/member_rallye_expired_silver.tpl index c75da9f3a5..be2b41405e 100644 --- a/templates/de/emails/member/member_rallye_expired_silver.tpl +++ b/templates/de/emails/member/member_rallye_expired_silver.tpl @@ -28,7 +28,7 @@ Wichtige Hinweise: - $DATA[min_prices] ----------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_rallye_notify.tpl b/templates/de/emails/member/member_rallye_notify.tpl index 742d50eef2..c5f9f42586 100644 --- a/templates/de/emails/member/member_rallye_notify.tpl +++ b/templates/de/emails/member/member_rallye_notify.tpl @@ -32,7 +32,7 @@ Wichtig: - $DATA[min_prices] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_refback.tpl b/templates/de/emails/member/member_refback.tpl index f3717425ba..b6c595f66a 100644 --- a/templates/de/emails/member/member_refback.tpl +++ b/templates/de/emails/member/member_refback.tpl @@ -8,7 +8,7 @@ Ihr Mitglieder-ID ist: $content[refid] Ref-Back: $content[percents]% ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_stats_bonus.tpl b/templates/de/emails/member/member_stats_bonus.tpl index ccc3cb39da..ebb9b3ab14 100644 --- a/templates/de/emails/member/member_stats_bonus.tpl +++ b/templates/de/emails/member/member_stats_bonus.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben soeben {!__STATS_BONUS!} {?POINTS?} auf Ihr Aktiv-Konto gutgeschrieben bekommen, da die folgende Werbebuchung 100% Klickrate erreicht hat: +Sie haben soeben $content[points] {?POINTS?} auf Ihr Aktiv-Konto gutgeschrieben bekommen, da die folgende Werbebuchung 100% Klickrate erreicht hat: ------------------------------ Ihre Mitglied-ID lautet: $UID @@ -16,7 +16,7 @@ Gebuchte Empfaenger: $content[clicks] Fuer diese Werbebuchung erhalten Sie nur einmal diese Gutschrift! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_support-ordr.tpl b/templates/de/emails/member/member_support-ordr.tpl index 36b0132bc6..4f3683c0fd 100644 --- a/templates/de/emails/member/member_support-ordr.tpl +++ b/templates/de/emails/member/member_support-ordr.tpl @@ -16,7 +16,7 @@ $content[text] Einer unserer Mitarbeiter wird sich bald bei Ihnen direkt oder per Support-System melden. In beiden Faelllen erhalten Sie eine Mail! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_support-reflink.tpl b/templates/de/emails/member/member_support-reflink.tpl index 70cf35cb07..ba1ed96be2 100644 --- a/templates/de/emails/member/member_support-reflink.tpl +++ b/templates/de/emails/member/member_support-reflink.tpl @@ -16,7 +16,7 @@ $content[text] Einer unserer Mitarbeiter wird sich bald bei Ihnen direkt oder per Support-System melden. In beiden Faelllen erhalten Sie eine Mail! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_support-unconfirmed.tpl b/templates/de/emails/member/member_support-unconfirmed.tpl index 1b2dc0ce2a..839ce471a1 100644 --- a/templates/de/emails/member/member_support-unconfirmed.tpl +++ b/templates/de/emails/member/member_support-unconfirmed.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie hatten uns wegen Ihrer unbestaetigten Mails kontaktiert. Folgendes wurde an den Support weitergeleitet: +Sie hatten uns wegen Ihrer unbestätigten Mails kontaktiert. Folgendes wurde an den Support weitergeleitet: ------------------------------ Ihr Mitglieder-ID ist: $UID @@ -16,7 +16,7 @@ $content[text] Einer unserer Mitarbeiter wird sich bald bei Ihnen direkt oder per Support-System melden. In beiden Faelllen erhalten Sie eine Mail! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_low_points.tpl b/templates/de/emails/member/member_surfbar_low_points.tpl index 891e64e9ef..65320fcc64 100644 --- a/templates/de/emails/member/member_surfbar_low_points.tpl +++ b/templates/de/emails/member/member_surfbar_low_points.tpl @@ -4,7 +4,7 @@ Sie haben in unserer Surfbar mindestens eine URL gebucht. Ihr {?POINTS?}-Stand i Hier sind alle Daten: ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Ihr aktuelles Guthaben: $content[points] {?POINTS?} ------------------------------------------ @@ -15,7 +15,7 @@ Zuletzt wegen niedrigem Kontostand gewarnt: $content[notified] Mindestversendeinterval dieser Mail: $content[interval] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_active_deleted.tpl b/templates/de/emails/member/member_surfbar_url_active_deleted.tpl index 985ddd9d91..c2ba9eb2d9 100644 --- a/templates/de/emails/member/member_surfbar_url_active_deleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_active_deleted.tpl @@ -13,7 +13,7 @@ ID in der Surfbar: $content[id] URL angemeldet: $content[registered] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/member/member_surfbar_url_active_pending.tpl b/templates/de/emails/member/member_surfbar_url_active_pending.tpl index d6eec8ce65..cb951e9b66 100644 --- a/templates/de/emails/member/member_surfbar_url_active_pending.tpl +++ b/templates/de/emails/member/member_surfbar_url_active_pending.tpl @@ -19,7 +19,7 @@ Sperrgrund: $content[lock_reason] Neue maximale Einblendungen: $content[edit][limit] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_active_stopped.tpl b/templates/de/emails/member/member_surfbar_url_active_stopped.tpl index 5475de43e8..90063392d7 100644 --- a/templates/de/emails/member/member_surfbar_url_active_stopped.tpl +++ b/templates/de/emails/member/member_surfbar_url_active_stopped.tpl @@ -17,7 +17,7 @@ Zuletzt gesperrt: $content[last_locked] Sperrgrund: $content[lock_reason] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_confirmed.tpl b/templates/de/emails/member/member_surfbar_url_confirmed.tpl index 420fd2a14e..df2830476b 100644 --- a/templates/de/emails/member/member_surfbar_url_confirmed.tpl +++ b/templates/de/emails/member/member_surfbar_url_confirmed.tpl @@ -6,14 +6,14 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_depleted.tpl b/templates/de/emails/member/member_surfbar_url_depleted.tpl index e2f62a19a9..58277a1253 100644 --- a/templates/de/emails/member/member_surfbar_url_depleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_depleted.tpl @@ -6,7 +6,7 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ @@ -25,7 +25,7 @@ ID in der Surfbar: $content[id] Wenn Sie die URL dennoch weiterlaufen wollen, so loggen Sie sich bitte im Mitgliedsbereich ein und stellen Sie erneut Einblendungen oder auf unendlich ein. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_locked_deleted.tpl b/templates/de/emails/member/member_surfbar_url_locked_deleted.tpl index 20dd29e95f..c19dd5b917 100644 --- a/templates/de/emails/member/member_surfbar_url_locked_deleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_locked_deleted.tpl @@ -17,7 +17,7 @@ Zuletzt gesperrt: $content[last_locked] Sperrgrund: $content[lock_reason] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/member/member_surfbar_url_locked_pending.tpl b/templates/de/emails/member/member_surfbar_url_locked_pending.tpl index b07eff2b67..7eebf5f2b9 100644 --- a/templates/de/emails/member/member_surfbar_url_locked_pending.tpl +++ b/templates/de/emails/member/member_surfbar_url_locked_pending.tpl @@ -17,7 +17,7 @@ Zuletzt gesperrt: $content[last_locked] Sperrgrund: $content[lock_reason] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_migrate.tpl b/templates/de/emails/member/member_surfbar_url_migrate.tpl index 523bd05e23..ad00ed83c3 100644 --- a/templates/de/emails/member/member_surfbar_url_migrate.tpl +++ b/templates/de/emails/member/member_surfbar_url_migrate.tpl @@ -6,7 +6,7 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ @@ -17,7 +17,7 @@ Die URL ist jetzt noch nicht in der Surfbar freigeschaltet. Möchten Sie die Sollten Sie diesem nicht zustimmen, so brauchen Sie jetzt nichts weiteres unternehmen. Ihre URL wird dann automatisch entfernt. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_migrated_deleted.tpl b/templates/de/emails/member/member_surfbar_url_migrated_deleted.tpl index d977d785e6..a2859bbfd0 100644 --- a/templates/de/emails/member/member_surfbar_url_migrated_deleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_migrated_deleted.tpl @@ -13,7 +13,7 @@ ID in der Surfbar: $content[id] URL angemeldet: $content[registered] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_migrated_migrated.tpl b/templates/de/emails/member/member_surfbar_url_migrated_migrated.tpl index 469ede6c04..b07f4c732d 100644 --- a/templates/de/emails/member/member_surfbar_url_migrated_migrated.tpl +++ b/templates/de/emails/member/member_surfbar_url_migrated_migrated.tpl @@ -15,7 +15,7 @@ URL angemeldet: $content[registered] Neue maximale Einblendungen: $content[edit][limit] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_migrated_pending.tpl b/templates/de/emails/member/member_surfbar_url_migrated_pending.tpl index 0a9f2e4a77..21d3c20346 100644 --- a/templates/de/emails/member/member_surfbar_url_migrated_pending.tpl +++ b/templates/de/emails/member/member_surfbar_url_migrated_pending.tpl @@ -13,7 +13,7 @@ ID in der Surfbar: $content[id] URL angemeldet: $content[registered] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_pending.tpl b/templates/de/emails/member/member_surfbar_url_pending.tpl index 3b50e4e93d..51d97f7880 100644 --- a/templates/de/emails/member/member_surfbar_url_pending.tpl +++ b/templates/de/emails/member/member_surfbar_url_pending.tpl @@ -6,7 +6,7 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ @@ -19,7 +19,7 @@ ID in der Surfbar: $content[id] Wir werden Ihre URL bald kontrollieren und dann freigeben. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_pending_deleted.tpl b/templates/de/emails/member/member_surfbar_url_pending_deleted.tpl index 9f38f42c40..5a777d649d 100644 --- a/templates/de/emails/member/member_surfbar_url_pending_deleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_pending_deleted.tpl @@ -13,7 +13,7 @@ ID in der Surfbar: $content[id] URL angemeldet: $content[registered] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/member/member_surfbar_url_reg.tpl b/templates/de/emails/member/member_surfbar_url_reg.tpl index 9a6d4a44e3..3ea660dfa7 100644 --- a/templates/de/emails/member/member_surfbar_url_reg.tpl +++ b/templates/de/emails/member/member_surfbar_url_reg.tpl @@ -6,7 +6,7 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Anzahl Aufrufe: $content[limit] ------------------------------------------ @@ -15,7 +15,7 @@ Status: $content[status] ID in der Surfbar: $content[insert_id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_rejected.tpl b/templates/de/emails/member/member_surfbar_url_rejected.tpl index b611f46811..8179020c4c 100644 --- a/templates/de/emails/member/member_surfbar_url_rejected.tpl +++ b/templates/de/emails/member/member_surfbar_url_rejected.tpl @@ -6,14 +6,14 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_stopped_continued.tpl b/templates/de/emails/member/member_surfbar_url_stopped_continued.tpl index f0e33fb6e0..3ebc658d9c 100644 --- a/templates/de/emails/member/member_surfbar_url_stopped_continued.tpl +++ b/templates/de/emails/member/member_surfbar_url_stopped_continued.tpl @@ -19,7 +19,7 @@ Sperrgrund: $content[lock_reason] Neue maximale Einblendungen: $content[edit][limit] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl b/templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl index c03899c092..b2b39c6167 100644 --- a/templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl @@ -13,7 +13,7 @@ ID in der Surfbar: $content[id] URL angemeldet: $content[registered] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/member/member_surfbar_url_stopped_pending.tpl b/templates/de/emails/member/member_surfbar_url_stopped_pending.tpl index f6c46c00cf..deb2307fb1 100644 --- a/templates/de/emails/member/member_surfbar_url_stopped_pending.tpl +++ b/templates/de/emails/member/member_surfbar_url_stopped_pending.tpl @@ -19,7 +19,7 @@ Sperrgrund: $content[lock_reason] Neue maximale Einblendungen: $content[edit][limit] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_surfbar_url_unlock.tpl b/templates/de/emails/member/member_surfbar_url_unlock.tpl index b424cb44fb..9281110c4f 100644 --- a/templates/de/emails/member/member_surfbar_url_unlock.tpl +++ b/templates/de/emails/member/member_surfbar_url_unlock.tpl @@ -6,7 +6,7 @@ Hier sind alle Daten: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Ihre User-ID: $content[uid] +Ihre User-ID: $content[userid] ------------------------------------------ Status: $content[status] ------------------------------------------ @@ -15,7 +15,7 @@ Anzahl Aufrufe: $content[limit] ID in der Surfbar: $content[insert_id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_transfer_recipient.tpl b/templates/de/emails/member/member_transfer_recipient.tpl index 749646d1ef..62601e4888 100644 --- a/templates/de/emails/member/member_transfer_recipient.tpl +++ b/templates/de/emails/member/member_transfer_recipient.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben soeben eine {?POINTS?}-Ueberweisung von einem unserer Mitglieder erhalten! +Sie haben soeben eine {?POINTS?}-Überweisung von einem unserer Mitglieder erhalten! Hier sind nochmals alle Transaktionsdaten: ------------------------------ @@ -8,16 +8,16 @@ Ihr Mitglieder-ID ist: $UID ------------------------------ -- Daten des Absenders: -- ------------------------------ -Mitglieder-ID: {!__SENDER_UID!} +Mitglieder-ID: $content[sender][userid] ($content[sender][nickname]) ------------------------------ -Verwendungszweck: {!__TRANSFER_REASON!} +Verwendungszweck: $content[reason] ------------------------------ -Transaktionsnummer: {!__TRANS_ID!} +Transaktionsnummer: $content[trans_id] ------------------------------ -Sie koennen diese Transaktion {!__TRANSFER_EXPIRES!} noch im Mitgliedsbereich unter "{?POINTS?}-Transfer" nachvollziehen. +Sie können diese Transaktion $content[expires] noch im Mitgliedsbereich unter "{?POINTS?}-Transfer" nachvollziehen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file +{?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_transfer_sender.tpl b/templates/de/emails/member/member_transfer_sender.tpl index 507c329f8e..88469285dd 100644 --- a/templates/de/emails/member/member_transfer_sender.tpl +++ b/templates/de/emails/member/member_transfer_sender.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben soeben eine {?POINTS?}-Ueberweisung an eines unserer Mitglieder abgeschlossen! +Sie haben soeben eine {?POINTS?}-Überweisung an eines unserer Mitglieder abgeschlossen! Hier sind nochmals alle Transaktionsdaten: ------------------------------ @@ -8,16 +8,16 @@ Ihr Mitglieder-ID ist: $UID ------------------------------ -- Daten des Empfaengers: -- ------------------------------ -Mitglieder-ID: {!__RECIPIENT_UID!} +Mitglieder-ID: $content[recipient][userid] ($content[recipient][nickname]) ------------------------------ -Verwendungszweck: {!__TRANSFER_REASON!} +Verwendungszweck: $content[reason] ------------------------------ -Transaktionsnummer: {!__TRANS_ID!} +Transaktionsnummer: $content[trans_id] ------------------------------ -Sie koennen diese Transaktion {!__TRANSFER_EXPIRES!} noch im Mitgliedsbereich unter "{?POINTS?}-Transfer" nachvollziehen. +Sie können diese Transaktion $content[expires] noch im Mitgliedsbereich unter "{?POINTS?}-Transfer" nachvollziehen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_undelete_active_surfbar_urls.tpl b/templates/de/emails/member/member_undelete_active_surfbar_urls.tpl index 8fe6cf4d9d..4a315ff84f 100644 --- a/templates/de/emails/member/member_undelete_active_surfbar_urls.tpl +++ b/templates/de/emails/member/member_undelete_active_surfbar_urls.tpl @@ -15,7 +15,7 @@ Ihre User-ID: $content[userid] ID in der Surfbar: $content[id] ------------------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/member/member_wernis_accepted.tpl b/templates/de/emails/member/member_wernis_accepted.tpl index 58777d11bd..4098cb40a9 100644 --- a/templates/de/emails/member/member_wernis_accepted.tpl +++ b/templates/de/emails/member/member_wernis_accepted.tpl @@ -19,7 +19,7 @@ $content Ihre Anfrage wurde hiermit angenommen. Wir werden baldmoeglichst den geforderten Betrag an Ihre angegebene Kontoverbindung ueberweisen. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_wernis_rejected.tpl b/templates/de/emails/member/member_wernis_rejected.tpl index 7c8b62d512..e86e04defc 100644 --- a/templates/de/emails/member/member_wernis_rejected.tpl +++ b/templates/de/emails/member/member_wernis_rejected.tpl @@ -19,7 +19,7 @@ $content Ihre Anfrage wurde hiermit abgelehnt! Bitte beachten Sie unsere AGBs. Ihre Wernis werden wir gesondert zurueckbuchen oder bei schwerwiegenden Faellen uns vorbehalten, dies nicht zu tun oder Ihren Account bei uns zu sperren. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/member/member_wernis_request.tpl b/templates/de/emails/member/member_wernis_request.tpl index 25b0bcfdf1..4e49d4d5bc 100644 --- a/templates/de/emails/member/member_wernis_request.tpl +++ b/templates/de/emails/member/member_wernis_request.tpl @@ -19,7 +19,7 @@ Die dazu noetigen {!WERNIS_POINTS_VALUE!} Wernis haben wir Ihnen bereits abgezog Sie sollten soeben eine Aufbuchung auf Ihrem WDS66-Hauptaccount erhalten haben! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/new-pass.tpl b/templates/de/emails/new-pass.tpl index 0d25ac1b1a..20cdde8dbd 100644 --- a/templates/de/emails/new-pass.tpl +++ b/templates/de/emails/new-pass.tpl @@ -14,7 +14,7 @@ Browser: $HTTP_USER_AGENT Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +{?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/newsletter.tpl b/templates/de/emails/newsletter.tpl index 7543777cd5..7e4e850ba5 100644 --- a/templates/de/emails/newsletter.tpl +++ b/templates/de/emails/newsletter.tpl @@ -4,7 +4,7 @@ Hallo $content[gender] $content[surname] $content[family], Ihre User-ID bei uns: $UID -------------- -Sie erhalten diesen Newsletter von uns, weil Sie Mitglied bei unserem {?MT_WORD?}-Dienst {?MAIN_TITLE?} ({?URL?}) sind. Dies ist somit kein Spam! Eine Abmeldemoeglichkeit finden Sie am Ende dieses Newsletters. +Sie erhalten diesen Newsletter von uns, weil Sie Mitglied bei unserem {?mt_word?}-Dienst {?MAIN_TITLE?} ({?URL?}) sind. Dies ist somit kein Spam! Eine Abmeldemoeglichkeit finden Sie am Ende dieses Newsletters. ============================================================ $content[text] @@ -12,7 +12,7 @@ $content[text] Moechten Sie keine weiteren Newsletter mehr von uns erhalten, melden Sie sich bitte bei uns ({?WEBMASTER?}) und wir loeschen dann Ihren Account bei uns. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/newsletter_html.tpl b/templates/de/emails/newsletter_html.tpl index 180f0f4a3c..566e528e54 100644 --- a/templates/de/emails/newsletter_html.tpl +++ b/templates/de/emails/newsletter_html.tpl @@ -4,7 +4,7 @@ Hallo $content[gender] $content[surname] $content[family], Ihre User-ID bei uns: $UID -------------- -Sie erhalten diesen Newsletter von uns, weil Sie Mitglied bei unserem {?MT_WORD?}-Dienst {?MAIN_TITLE?} ({?URL?}) sind. Dies ist somit kein Spam! Eine Abmeldemöglichkeit finden Sie am Ende dieses Newsletters. +Sie erhalten diesen Newsletter von uns, weil Sie Mitglied bei unserem {?mt_word?}-Dienst {?MAIN_TITLE?} ({?URL?}) sind. Dies ist somit kein Spam! Eine Abmeldemöglichkeit finden Sie am Ende dieses Newsletters. ============================================================ $content[text] @@ -12,7 +12,7 @@ $content[text] Möchten Sie keine weiteren Newsletter mehr von uns erhalten, melden Sie sich bitte bei uns ({?WEBMASTER?}) und wir löschen dann Ihren Account bei uns. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/normal-mail.tpl b/templates/de/emails/normal-mail.tpl index 68743aaa04..8caa3e7bf4 100644 --- a/templates/de/emails/normal-mail.tpl +++ b/templates/de/emails/normal-mail.tpl @@ -7,7 +7,7 @@ $content[text] - - - - - Werbetext-Ende: - - - - - ---------------- -Werber: $content[sender_uid] +Werber: $content[sender_userid] ---------------- Verfallszeit: $content[expiration] ---------------- @@ -20,19 +20,19 @@ Beworbene URL: $content[url] Hinweis: Angesammelte {?POINTS?} können versteigert oder verkauft werden, jedoch muß der Käufer bei {?MAIN_TITLE?} Mitglied sein oder werden. Um Ihre $content[points] {?POINTS?} gutgeschrieben zu bekommen, klicken Sie bitte auf folgenden Link: -{?URL?}/mailid.php?uid=$UID&mailid=$content[id] +{?URL?}/mailid.php?userid=$UID&mailid=$content[id] Wichtig! Achten Sie darauf das Ihr Mailserver immer empfangbereit ist. Sollte Ihr Mailserver nicht empfangbereit sein (z.B. voll usw.), werden wir Ihren Account sperren! Sie haben nun innerhalb von 10 Tagen die möglichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gelöscht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, prüfen Sie Ihren Account! ---------------- Bitte bestätigen Sie diese Mail, anderfalls geht sie und die {?POINTS?} nach der evtl. angezeigten Verfallszeit verloren! Sollte keine Verfallszeit angezeigt werden, besteht sie solgange, bis wir unserem Server aufräumen! -Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgrund Ihrer Mitgliedschaft bei unserem {?MT_WORD?}-Service {?MAIN_TITLE?} ({?URL?}). Wenn Sie keine weiteren Emails empfangen möchten, melden Sie sich bitte unter {?WEBMASTER?} mit Ihrer Mitglieder ID ab. Sie werden dann keine weiteren Mails mehr erhalten, und Ihr Account wird gelöscht. +Diese Email ist kein SPAM! Sie erhalten diese Mail von unseren Mitgliedern aufgrund Ihrer Mitgliedschaft bei unserem {?mt_word?}-Service {?MAIN_TITLE?} ({?URL?}). Wenn Sie keine weiteren Emails empfangen möchten, melden Sie sich bitte unter {?WEBMASTER?} mit Ihrer Mitglieder ID ab. Sie werden dann keine weiteren Mails mehr erhalten, und Ihr Account wird gelöscht. {?MAIN_TITLE?} distanziert sich von jeglichen Inhalte und Links innerhalb dieser E-Mail. Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/order-accept.tpl b/templates/de/emails/order-accept.tpl index c65d410748..b6df7dd488 100644 --- a/templates/de/emails/order-accept.tpl +++ b/templates/de/emails/order-accept.tpl @@ -8,11 +8,11 @@ Beworbene URL: $DATA[url] Betreffzeile: $DATA[subject] ----------------------------- -Sie koennen den Versand-Fortschritt im Mitgliedsmenue unter "Unbestaetigte Mails" verfolgen. Sobald die Mail vollstaendig versendet wurde, erhalten Sie eine weitere Mail! +Sie koennen den Versand-Fortschritt im Mitgliedsmenue unter "Unbestätigte Mails" verfolgen. Sobald die Mail vollstaendig versendet wurde, erhalten Sie eine weitere Mail! Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/order-admin.tpl b/templates/de/emails/order-admin.tpl index f08db0d5cb..b122222b3d 100644 --- a/templates/de/emails/order-admin.tpl +++ b/templates/de/emails/order-admin.tpl @@ -27,9 +27,9 @@ $content[text] Sie werden bald nochmals benachrichtig, sobald der Versand vollstaendig beendet wurde. -{--ADMIN_AUTOSEND--} +$content[admin_autosend] -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/order-deleted.tpl b/templates/de/emails/order-deleted.tpl index 04ae823b5d..1f7a0d9f02 100644 --- a/templates/de/emails/order-deleted.tpl +++ b/templates/de/emails/order-deleted.tpl @@ -11,7 +11,7 @@ Ihre Mailbuchung wurde somit gelöscht. Sollten Sie Fragen hierzu haben, so Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/order-member.tpl b/templates/de/emails/order-member.tpl index c519e3b1a0..40b2a356d8 100644 --- a/templates/de/emails/order-member.tpl +++ b/templates/de/emails/order-member.tpl @@ -17,11 +17,11 @@ $content[text] Sobald Ihre Mailbuchung vollständig gesendet wurde, erhalten Sie eine zweite Mail! Sie können bereits eine weitere Mailbuchung durchführen! -{--MEMBER_AUTOSEND--} +$content[member_autosend] Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/order-reject.tpl b/templates/de/emails/order-reject.tpl index 463e2be990..5b159601a8 100644 --- a/templates/de/emails/order-reject.tpl +++ b/templates/de/emails/order-reject.tpl @@ -12,7 +12,7 @@ Ihre Mailbuchung wurde somit gelöscht. Sollten Sie Fragen hierzu haben, so Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/profile-updte.tpl b/templates/de/emails/profile-updte.tpl index 9399cc88b9..4f37ae52f6 100644 --- a/templates/de/emails/profile-updte.tpl +++ b/templates/de/emails/profile-updte.tpl @@ -2,23 +2,23 @@ Hallo $content[gender] $content[surname] $content[family], Haben Sie Neuigkeiten fuer uns? -Sie hatten sich vor laengerer Zeit zu unserem {?MT_WORD?}-Service {?MAIN_TITLE?} angemeldet. Dabei haben Sie persoenliche Daten, wie Ihre komplette Anschrift usw. angegeben. Sind Sie vielleicht mittlerweile umngezogen oder haben geheiratet und haben einen anderen Namen? Oder moechten Sie vielleicht aus der einen oder anderen Kategorie noch Mails empfangen? +Sie hatten sich vor laengerer Zeit zu unserem {?mt_word?}-Service {?MAIN_TITLE?} angemeldet. Dabei haben Sie persoenliche Daten, wie Ihre komplette Anschrift usw. angegeben. Sind Sie vielleicht mittlerweile umngezogen oder haben geheiratet und haben einen anderen Namen? Oder moechten Sie vielleicht aus der einen oder anderen Kategorie noch Mails empfangen? -Bitte loggen Sie sich zu unserem {?MT_WORD?}-System ein und aktualisieren Sie Ihre Daten! +Bitte loggen Sie sich zu unserem {?mt_word?}-System ein und aktualisieren Sie Ihre Daten! ------------------ Ihre User-ID war: $UID ------------------ -Angemeldet seit: $DATA[6] +Angemeldet seit: $DATA[joined] ------------------ -Letzte Profilaenderung: $DATA[5] +Letzte Profilaenderung: $DATA[last_update] ------------------ -Sollten Sie diese Mail irrtuemlich erhalten haben, weil sich bei Ihnen nichts geaendert hat, bitten wir Sie dies zu entschuldigen und sich dennoch einmal einzuloggen und auf "Benachrichtigung abschalten" zu klicken. +Sollten Sie diese Mail irrtuemlich erhalten haben, weil sich bei Ihnen nichts geändert hat, bitten wir Sie dies zu entschuldigen und sich dennoch einmal einzuloggen und auf "Benachrichtigung abschalten" zu klicken. Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?}/login.php ({?WEBMASTER?}) diff --git a/templates/de/emails/register-admin.tpl b/templates/de/emails/register-admin.tpl index 356fc14281..38918c558e 100644 --- a/templates/de/emails/register-admin.tpl +++ b/templates/de/emails/register-admin.tpl @@ -20,7 +20,7 @@ Browser: $HTTP_USER_AGENT Geworben von: $content[refid] ------------------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Script {?URL?}/admin.php diff --git a/templates/de/emails/register-member.tpl b/templates/de/emails/register-member.tpl index 9dbe71e472..87f2c0099c 100644 --- a/templates/de/emails/register-member.tpl +++ b/templates/de/emails/register-member.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -vielen Dank, dass Sie sich für unseren {?MT_WORD?} entschieden haben! Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns! +vielen Dank, dass Sie sich für unseren {?mt_word?} entschieden haben! Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns! Hier sind nochmals zur Überprüfung Ihre persönlichen Daten: ----------------------------------------------- @@ -21,7 +21,7 @@ Geworben von: $content[refid] Hier ist Ihr persönlicher Referal-Link, mit dem Sie bereits jetzt schon neue Mitglieder werben können: -{?URL?}/ref.php?refid=$content[uid] +{?URL?}/ref.php?refid=$content[userid] Bevor Sie sich jedoch in den Mitgliesbereich einloggen können, müssen Sie noch Ihre Email-Adresse bestätigen. Im Mitgliedsbereich finden Sie dann auch weitere Verlinkungsmöglichkeiten. Kopieren Sie dazu folgenden Link in die Adresszeile Ihres Browsers oder klicken Sie auf diesen einfach drauf. @@ -30,7 +30,7 @@ Ihr Bestätigungslink: Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_activate.tpl b/templates/de/emails/sponsor/sponsor_activate.tpl index 0a4f54dc79..ceb0dfd7cc 100644 --- a/templates/de/emails/sponsor/sponsor_activate.tpl +++ b/templates/de/emails/sponsor/sponsor_activate.tpl @@ -25,7 +25,7 @@ Angemeldet am: $content[sponsor_created] IP-Nummer bei Anmeldung $content[remote_addr] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_add_points.tpl b/templates/de/emails/sponsor/sponsor_add_points.tpl index 73fa3d1751..339d3c6402 100644 --- a/templates/de/emails/sponsor/sponsor_add_points.tpl +++ b/templates/de/emails/sponsor/sponsor_add_points.tpl @@ -1,13 +1,13 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, +Hallo $content[gender] $content[surname] $content[family], -Einer unserer Administratoren hat Ihnen soeben {!__POINTS!} {?POINTS?} Ihrem Sponsoren-Account mit der ID {!__ID!} gutgeschrieben! +Einer unserer Administratoren hat Ihnen soeben $content[points] {?POINTS?} Ihrem Sponsoren-Account mit der ID $content[id] gutgeschrieben! Grund dazu war folgender: ------------------------------ -$content +$content[reason] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_change_data.tpl b/templates/de/emails/sponsor/sponsor_change_data.tpl index fd5ec7095f..c0f97124c2 100644 --- a/templates/de/emails/sponsor/sponsor_change_data.tpl +++ b/templates/de/emails/sponsor/sponsor_change_data.tpl @@ -30,7 +30,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/sponsor/sponsor_change_email.tpl b/templates/de/emails/sponsor/sponsor_change_email.tpl index ccb4699388..88305f5c20 100644 --- a/templates/de/emails/sponsor/sponsor_change_email.tpl +++ b/templates/de/emails/sponsor/sponsor_change_email.tpl @@ -13,7 +13,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/sponsor/sponsor_confirm.tpl b/templates/de/emails/sponsor/sponsor_confirm.tpl index 49e457fb11..e7a4c97729 100644 --- a/templates/de/emails/sponsor/sponsor_confirm.tpl +++ b/templates/de/emails/sponsor/sponsor_confirm.tpl @@ -1,18 +1,18 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, +Hallo $content[gender] $content[surname] $content[family], -Sie (oder ein anderer mit der IP-Nummer $REMOTE_ADDR) haben sich soeben als Sponsor zu unserem {?MT_WORD?} +Sie (oder ein anderer mit der IP-Nummer $REMOTE_ADDR) haben sich soeben als Sponsor zu unserem {?mt_word?} angemeldet. Sie haben somit den ersten Schritt zu uns getan wofuer wir uns sehr bedanken. -Als naechstes muessen Sie Ihre EMail-Adresse bestaetigen. Dieser Schritt ist erforderlich, um sicher zu gehen, +Als naechstes muessen Sie Ihre EMail-Adresse bestätigen. Dieser Schritt ist erforderlich, um sicher zu gehen, dass auch kein anderer Sie angemeldet hat. Hier ist Ihr Link: ------------------------------ -{?URL?}/sponsor_confirm.php?hash={!__HASH!} +{?URL?}/sponsor_confirm.php?hash=$content[hash] ------------------------------ -Ihre Sponsor-ID lautet: {!__ID!} +Ihre Sponsor-ID lautet: $content[id] ------------------------------ -Passwort zum Login: {!__PASSWORD!} +Passwort zum Login: $content[password] ------------------------------ Sollten Sie diesen nicht anklicken koennen, kopieren Sie ihn bitte in die Adresszeile Ihres Browsers. @@ -26,10 +26,10 @@ Verwendeter Browser: $HTTP_USER_AGENT ------------------------------ IP-Nummer: $REMOTE_ADDR ------------------------------ -Angemeldet am: {!__TIMESTAMP!} +Angemeldet am: $content[timestamp] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_email.tpl b/templates/de/emails/sponsor/sponsor_email.tpl index 2bf60facad..670f3fb663 100644 --- a/templates/de/emails/sponsor/sponsor_email.tpl +++ b/templates/de/emails/sponsor/sponsor_email.tpl @@ -1,7 +1,7 @@ Hallo $content[gender] $content[surname] $content[family], -Sie hatten bei uns Ihre EMail-Adresse geaendert und den Bestaetigungslink erneut angefordert. Hier sind nun -alle noetigen Daten dazu. +Sie hatten bei uns Ihre EMail-Adresse geändert und den Bestätigungslink erneut angefordert. Hier sind nun +alle nötigen Daten dazu. Hier ist Ihr Link: ------------------------------ @@ -10,7 +10,7 @@ Hier ist Ihr Link: Ihre Sponsor-ID lautet: $content[id] ------------------------------ -Sollten Sie diesen nicht anklicken koennen, kopieren Sie ihn bitte in die Adresszeile Ihres Browsers. +Sollten Sie diesen nicht anklicken können, kopieren Sie ihn bitte in die Adresszeile Ihres Browsers. ------------------------------ Verwendeter Browser: $HTTP_USER_AGENT @@ -18,7 +18,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +{?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/sponsor/sponsor_lost.tpl b/templates/de/emails/sponsor/sponsor_lost.tpl index ff9feb496d..1520046072 100644 --- a/templates/de/emails/sponsor/sponsor_lost.tpl +++ b/templates/de/emails/sponsor/sponsor_lost.tpl @@ -22,7 +22,7 @@ Angemeldet am: $content[sponsor_created] IP-Nummer bei Anmeldung $content[remote_addr] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_pending.tpl b/templates/de/emails/sponsor/sponsor_pending.tpl index 547723c3ff..dd107b67f0 100644 --- a/templates/de/emails/sponsor/sponsor_pending.tpl +++ b/templates/de/emails/sponsor/sponsor_pending.tpl @@ -1,6 +1,6 @@ Hallo $content[gender] $content[surname] $content[family], -Sie haben soeben Ihre EMail-Adresse bestaetigt. Dies wurde von der IP-Nummer $REMOTE_ADDR aus durchgefuehrt. +Sie haben soeben Ihre EMail-Adresse bestätigt. Dies wurde von der IP-Nummer $REMOTE_ADDR aus durchgefuehrt. Wir werden uns bald mit Ihnen in Verbindung setzen und Ihnen unsere Kontodaten mitteilen. Zu unserer Sicherheit haben wir diese hier nicht aufgelistet. Bitte notieren Sie sich vorab folgende Daten: @@ -51,7 +51,7 @@ Faxnummer: $content[fax] Handynummer: $content[cell] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_ref_notify.tpl b/templates/de/emails/sponsor/sponsor_ref_notify.tpl index b2c93fd461..cbdd17db1a 100644 --- a/templates/de/emails/sponsor/sponsor_ref_notify.tpl +++ b/templates/de/emails/sponsor/sponsor_ref_notify.tpl @@ -10,7 +10,7 @@ $content[ref_points] {?POINTS?} gutgeschrieben. Sie haben jetzt ein Guthaben von $content[points] {?POINTS?} und uns schon $content[refs] neue Sponsoren gebracht. Vielen Dank fuer Ihre Mitarbeit! -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_settings.tpl b/templates/de/emails/sponsor/sponsor_settings.tpl index 37305ab026..9277e57612 100644 --- a/templates/de/emails/sponsor/sponsor_settings.tpl +++ b/templates/de/emails/sponsor/sponsor_settings.tpl @@ -16,7 +16,7 @@ Verwendeter Browser: $HTTP_USER_AGENT IP-Nummer: $REMOTE_ADDR ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) diff --git a/templates/de/emails/sponsor/sponsor_sub_points.tpl b/templates/de/emails/sponsor/sponsor_sub_points.tpl index de5908b437..eef8765954 100644 --- a/templates/de/emails/sponsor/sponsor_sub_points.tpl +++ b/templates/de/emails/sponsor/sponsor_sub_points.tpl @@ -1,13 +1,13 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, +Hallo $content[gender] $content[surname] $content[family], -Einer unserer Administratoren hat Ihnen soeben {!__POINTS!} {?POINTS?} von Ihrem Sponsoren-Account mit der ID {!__ID!} abgezogen! +Einer unserer Administratoren hat Ihnen soeben $content[points] {?POINTS?} von Ihrem Sponsoren-Account mit der ID $content[id] abgezogen! Grund dazu war folgender: ------------------------------ -$content +$content[reason] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_unlock.tpl b/templates/de/emails/sponsor/sponsor_unlock.tpl index 0a4f54dc79..ceb0dfd7cc 100644 --- a/templates/de/emails/sponsor/sponsor_unlock.tpl +++ b/templates/de/emails/sponsor/sponsor_unlock.tpl @@ -25,7 +25,7 @@ Angemeldet am: $content[sponsor_created] IP-Nummer bei Anmeldung $content[remote_addr] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor/sponsor_unlocked.tpl b/templates/de/emails/sponsor/sponsor_unlocked.tpl index 270ab3270d..4292e5aea7 100644 --- a/templates/de/emails/sponsor/sponsor_unlocked.tpl +++ b/templates/de/emails/sponsor/sponsor_unlocked.tpl @@ -10,10 +10,10 @@ zum Buchen von Aktionen benutzen. Hinweis: ------------------------------ -$content[msg] +$content[message] ------------------------------ -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/sponsor_add_points.tpl b/templates/de/emails/sponsor_add_points.tpl index 73fa3d1751..11f5d85d80 100644 --- a/templates/de/emails/sponsor_add_points.tpl +++ b/templates/de/emails/sponsor_add_points.tpl @@ -1,13 +1 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, - -Einer unserer Administratoren hat Ihnen soeben {!__POINTS!} {?POINTS?} Ihrem Sponsoren-Account mit der ID {!__ID!} gutgeschrieben! - -Grund dazu war folgender: ------------------------------- -$content ------------------------------- - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/emails/sponsor_confirm.tpl b/templates/de/emails/sponsor_confirm.tpl index 49e457fb11..11f5d85d80 100644 --- a/templates/de/emails/sponsor_confirm.tpl +++ b/templates/de/emails/sponsor_confirm.tpl @@ -1,35 +1 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, - -Sie (oder ein anderer mit der IP-Nummer $REMOTE_ADDR) haben sich soeben als Sponsor zu unserem {?MT_WORD?} -angemeldet. Sie haben somit den ersten Schritt zu uns getan wofuer wir uns sehr bedanken. - -Als naechstes muessen Sie Ihre EMail-Adresse bestaetigen. Dieser Schritt ist erforderlich, um sicher zu gehen, -dass auch kein anderer Sie angemeldet hat. - -Hier ist Ihr Link: ------------------------------- -{?URL?}/sponsor_confirm.php?hash={!__HASH!} ------------------------------- -Ihre Sponsor-ID lautet: {!__ID!} ------------------------------- -Passwort zum Login: {!__PASSWORD!} ------------------------------- - -Sollten Sie diesen nicht anklicken koennen, kopieren Sie ihn bitte in die Adresszeile Ihres Browsers. - -Sollten Sie sich nicht angemeldet haben, bitten wir diese Unangenehmlichkeit zu entschuligen. Leiten Sie dann -einfach diese EMail komplett weiter an {?WEBMASTER?}. Wir werden dann diese Anmeldung volstaendig aus unserer -Datenbank loeschen. - ------------------------------- -Verwendeter Browser: $HTTP_USER_AGENT ------------------------------- -IP-Nummer: $REMOTE_ADDR ------------------------------- -Angemeldet am: {!__TIMESTAMP!} ------------------------------- - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/emails/sponsor_pending.tpl b/templates/de/emails/sponsor_pending.tpl index 547723c3ff..11f5d85d80 100644 --- a/templates/de/emails/sponsor_pending.tpl +++ b/templates/de/emails/sponsor_pending.tpl @@ -1,57 +1 @@ -Hallo $content[gender] $content[surname] $content[family], - -Sie haben soeben Ihre EMail-Adresse bestaetigt. Dies wurde von der IP-Nummer $REMOTE_ADDR aus durchgefuehrt. - -Wir werden uns bald mit Ihnen in Verbindung setzen und Ihnen unsere Kontodaten mitteilen. Zu unserer -Sicherheit haben wir diese hier nicht aufgelistet. Bitte notieren Sie sich vorab folgende Daten: - ------------------------------- -Verwendungszweck: SPONSOR: $content[id],$content[points] ------------------------------- -Zu ueberweisender Betrag: $content[pay] $content[curr] ------------------------------- - -Hier sind nochmals alle Ihre Daten aus der Anmeldung: - ------------------------------- -Ihre Sponsor-ID lautet: $content[id] ------------------------------- --- Persoenliche Daten: -- ------------------------------- -Anrede: $content[gender] ------------------------------- -Vorname: $content[surname] ------------------------------- -Nachname: $content[family] ------------------------------- --- Firmendaten: -- ------------------------------- -Firmenname: $content[company] ------------------------------- -Position: $content[position] ------------------------------- -Ust-Ident-Nr.: $content[tax_ident] ------------------------------- --- Kontaktdaten: -- ------------------------------- -Strasse, Zeile 1: $content[street_nr1] ------------------------------- -Strasse, Zeile 2: $content[street_nr2] ------------------------------- -Ländercode: $content[country] ------------------------------- -Postleitzahl: $content[zip] ------------------------------- -Wohnort: $content[city] ------------------------------- -Telefonnummer: $content[phone] ------------------------------- -Faxnummer: $content[fax] ------------------------------- -Handynummer: $content[cell] ------------------------------- - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/emails/sponsor_sub_points.tpl b/templates/de/emails/sponsor_sub_points.tpl index de5908b437..11f5d85d80 100644 --- a/templates/de/emails/sponsor_sub_points.tpl +++ b/templates/de/emails/sponsor_sub_points.tpl @@ -1,13 +1 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}, - -Einer unserer Administratoren hat Ihnen soeben {!__POINTS!} {?POINTS?} von Ihrem Sponsoren-Account mit der ID {!__ID!} abgezogen! - -Grund dazu war folgender: ------------------------------- -$content ------------------------------- - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/emails/sponsor_unlocked.tpl b/templates/de/emails/sponsor_unlocked.tpl index 270ab3270d..11f5d85d80 100644 --- a/templates/de/emails/sponsor_unlocked.tpl +++ b/templates/de/emails/sponsor_unlocked.tpl @@ -1,19 +1 @@ -Hallo $content[gender] $content[surname] $content[family], - ------------------------------- -Ihre Sponsor-ID lautet: $content[sponsor] ------------------------------- - -Wir haben soeben Ihr Sponsoren-Account freigegeben! Sie koennen sich nun mit der Sponsor-ID und Ihrem Passwort -(welches hier nicht genannt werden kann) im Sponsorenbereich einloggen und Ihre $content[points] {?POINTS?} -zum Buchen von Aktionen benutzen. - -Hinweis: ------------------------------- -$content[msg] ------------------------------- - -Mit freundlichem Gruss, - Ihr {?MAIN_TITLE?} Team - -{?URL?} ({?WEBMASTER?}) \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/emails/sub-points.tpl b/templates/de/emails/sub-points.tpl index 5a428c3d4a..5d5c9d9c81 100644 --- a/templates/de/emails/sub-points.tpl +++ b/templates/de/emails/sub-points.tpl @@ -7,7 +7,7 @@ Grund dazu war folgender: $content[text] ---------------- -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/emails/unlock-user.tpl b/templates/de/emails/unlock-user.tpl index 5f03534efa..2bb105eb7f 100644 --- a/templates/de/emails/unlock-user.tpl +++ b/templates/de/emails/unlock-user.tpl @@ -18,7 +18,7 @@ Bitte beachten Sie beim naechsten Mal auf unsere AGBs, damit Ihnen diese Unangen Vielen Dank. -Mit freundlichem Gruss, +Mit freundlichen Grüßen, Ihr {?MAIN_TITLE?} Team {?URL?} ({?WEBMASTER?}) \ No newline at end of file diff --git a/templates/de/html/.htaccess b/templates/de/html/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/.htaccess +++ b/templates/de/html/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/admin/.htaccess b/templates/de/html/admin/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/admin/.htaccess +++ b/templates/de/html/admin/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/admin/admin_add_bank_package.tpl b/templates/de/html/admin/admin_add_bank_package.tpl index 1e2a073abe..b300a3c396 100644 --- a/templates/de/html/admin/admin_add_bank_package.tpl +++ b/templates/de/html/admin/admin_add_bank_package.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=add_bank_package" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_bank_package" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30" colspan="3" align="center"> - <strong>{--ADMIN_ADD_BANK_PACKAGE_TITLE--}</strong></td> + <strong>{--ADMIN_ADD_BANK_PACKAGE_TITLE--}</strong> + </td> </tr> <tr> <td height="8" colspan="3" class="seperator"> </td> @@ -10,28 +11,33 @@ <tr> <td align="right" width="350">{--ADMIN_BANK_PACKAGE_TITLE--}</td> <td width="10" class="seperator"> </td> - <td width="240"><input class="admin_normal" type="text" - name="title" size="28" maxlength="255"></td> + <td width="240"> + <input type="text" class="admin_normal" name="title" size="28" maxlength="255" /> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> </tr> <tr> <td align="right" valign="top" style="padding-top: 2px"> - {--ADMIN_BANK_PACKAGE_DESCRIPTION--}</td> + {--ADMIN_BANK_PACKAGE_DESCRIPTION--} + </td> <td width="10" class="seperator"> </td> - <td><textarea class="admin_normal" name="description" rows="5" - cols="28"></textarea></td> + <td> + <textarea class="admin_normal" name="description" rows="5" cols="28"></textarea> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> </tr> <tr> <td align="right" valign="top" style="padding-top: 2px"> - {--ADMIN_BANK_PACKAGE_ACCOUNT_FEE--}</td> + {--ADMIN_BANK_PACKAGE_ACCOUNT_FEE--} + </td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="account_fee" - size="8" maxlength="20" value="0,00000"> {?POINTS?}</td> + <td> + <input type="text" class="admin_normal" name="account_fee" size="8" maxlength="20" value="0,00000" /> <span class="tiny">({?POINTS?})</span> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -39,8 +45,9 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_FREE_TRANSFERS--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="free_transfers" - size="4" maxlength="20" value="0"></td> + <td> + <input type="text" class="admin_normal" name="free_transfers" size="4" maxlength="20" value="0" /> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -48,12 +55,13 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_OUTPUT_MODE--}</td> <td width="10" class="seperator"> </td> - <td><select class="admin_select" name="output_system_mode" - size="1"> - <option value="LOGIN">{--BANK_OUTPUT_MODE_LOGIN--}</option> - <option value="EMAIL">{--BANK_OUTPUT_MODE_EMAIL--}</option> - <option value="DISABLED">{--BANK_OUTPUT_MODE_DISABLED--}</option> - </select></td> + <td> + <select class="admin_select" name="output_system_mode" size="1"> + <option value="LOGIN">{--BANK_OUTPUT_MODE_LOGIN--}</option> + <option value="EMAIL">{--BANK_OUTPUT_MODE_EMAIL--}</option> + <option value="DISABLED">{--BANK_OUTPUT_MODE_DISABLED--}</option> + </select> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -61,9 +69,10 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_FREE_MONTHS_FEE--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" - name="free_months_no_fee" size="3" maxlength="20" value="0"> - {--_MONTHS--}</td> + <td> + <input type="text" class="admin_normal" name="free_months_no_fee" size="3" maxlength="20" value="0" /> + {--_MONTHS--} + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -71,8 +80,9 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_INTEREST_PLUS--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="interest_plus" - size="4" maxlength="10" value="0,00"> %</td> + <td> + <input type="text" class="admin_normal" name="interest_plus" size="4" maxlength="10" value="0,00" /> % + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -80,8 +90,9 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_INTEREST_MINUS--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="interest_minus" - size="4" maxlength="10" value="0,00"> %</td> + <td> + <input type="text" class="admin_normal" name="interest_minus" size="4" maxlength="10" value="0,00" /> % + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -89,8 +100,9 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_FIRST_PAYMENT--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="first_payment" - size="4" maxlength="20" value="1,00"> {?POINTS?}</td> + <td> + <input type="text" class="admin_normal" name="first_payment" size="4" maxlength="20" value="1,00" /> <span class="tiny">({?POINTS?})</span> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -98,19 +110,21 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" - name="free_account_income" size="4" maxlength="20" value="0,00"> - {?POINTS?}</td> + <td> + <input type="text" class="admin_normal" name="free_account_income" size="4" maxlength="20" value="0,00" /> <span class="tiny">({?POINTS?})</span> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> </tr> <tr> <td align="right" valign="top" style="padding-top: 2px"> - {--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_STUFF--}</td> + {--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_STUFF--} + </td> <td width="10" class="seperator"> </td> - <td><textarea class="admin_normal" name="free_account_stuff" - rows="5" cols="28"></textarea></td> + <td> + <textarea class="admin_normal" name="free_account_stuff" rows="5" cols="28"></textarea> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -118,29 +132,31 @@ <tr> <td align="right">{--ADMIN_BANK_PACKAGE_TAN_LOCK--}</td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="text" name="tan_lock" - size="4" maxlength="20" value="0"></td> + <td> + <input type="text" class="admin_normal" name="tan_lock" size="4" maxlength="20" value="0" /> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> </tr> <tr> <td align="right" valign="top" style="padding-top: 2px"> - {--ADMIN_BANK_PACKAGE_ACTIVE--}</td> + {--ADMIN_BANK_PACKAGE_ACTIVE--} + </td> <td width="10" class="seperator"> </td> - <td><input class="admin_normal" type="radio" - name="package_active" value="Y" checked="checked" /> {--YES--}<br /> - <input class="admin_normal" type="radio" name="package_active" - value="N"> {--NO--}</td> + <td> + <input type="radio" class="admin_normal" name="package_active" value="Y" checked="checked" /> {--YES--}<br /> + <input type="radio" class="admin_normal" name="package_active" value="N" /> {--NO--} + </td> </tr> <tr> <td height="5" colspan="3" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" class="admin_submit" name="ok" - value="{--ADMIN_ADD_BANK_PACKAGE--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_ADD_BANK_PACKAGE--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_add_banner.tpl b/templates/de/html/admin/admin_add_banner.tpl index ac37ebbefb..64a0b380c7 100644 --- a/templates/de/html/admin/admin_add_banner.tpl +++ b/templates/de/html/admin/admin_add_banner.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=refbanner" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=refbanner" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="410"> <tr> <td class="admin_title bottom2" colspan="3" align="center" height="30"> diff --git a/templates/de/html/admin/admin_add_cat.tpl b/templates/de/html/admin/admin_add_cat.tpl index 0dc30fc63d..dd9d75d861 100644 --- a/templates/de/html/admin/admin_add_cat.tpl +++ b/templates/de/html/admin/admin_add_cat.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_cats" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_cats" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" width="10" height="30"> </td> @@ -18,7 +18,7 @@ </td> <td class="seperator" width="7"> </td> <td> - <input type="text" name="catname" size="30" maxlength="255" class="admin_normal" /> + <input type="text" class="admin_normal" name="catname" size="30" maxlength="255" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -32,7 +32,7 @@ </td> <td class="seperator" width="7"> </td> <td><select name="parent" size="1" class="admin_select"> - {--CATS--} + $content[cats] <option value="-1">{--IS_TOP_CATEGORY--}</option> </select></td> <td class="seperator" width="10"> </td> @@ -46,9 +46,10 @@ <strong>{--CAT_IS_VISIBLE--}</strong> </td> <td class="seperator" width="7"> </td> - <td>{--YES--}: <input type="radio" name="visible" value="Y" - class="admin_normal" checked="checked" /> {--NO--}: <input - type="radio" name="visible" value="N" class="admin_normal"></td> + <td> + {--YES--}: <input type="radio" class="admin_normal" name="visible" value="Y" checked="checked" /> + {--NO--}: <input type="radio" class="admin_normal" name="visible" value="N" /> + </td> <td class="seperator" width="10"> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_add_country.tpl b/templates/de/html/admin/admin_add_country.tpl index 39e1261f7b..158c38e528 100644 --- a/templates/de/html/admin/admin_add_country.tpl +++ b/templates/de/html/admin/admin_add_country.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_country" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_country" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="430"> <tr> <td class="admin_title bottom2" width="10" height="30"> </td> diff --git a/templates/de/html/admin/admin_add_max.tpl b/templates/de/html/admin/admin_add_max.tpl index 6f98aab7fb..4eada40a15 100644 --- a/templates/de/html/admin/admin_add_max.tpl +++ b/templates/de/html/admin/admin_add_max.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_email" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_email" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> diff --git a/templates/de/html/admin/admin_add_payment.tpl b/templates/de/html/admin/admin_add_payment.tpl index aad66f3cad..b7dff1ae38 100644 --- a/templates/de/html/admin/admin_add_payment.tpl +++ b/templates/de/html/admin/admin_add_payment.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=payments&do=add" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=payments&do=add" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="410"> <tr> <td class="admin_title bottom2" colspan="3" align="center" height="30"> @@ -21,7 +21,7 @@ <td align="right">{--ENTER_PAY_PAYMENT--}:</td> <td width="10" class="seperator"> </td> <td><input type="text" name="payment" class="admin_normal" - size="3" maxlength="3"> {?POINTS?}</td> + size="3" maxlength="3"> <span class="tiny">({?POINTS?})</span></td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> @@ -30,7 +30,7 @@ <td align="right">{--ENTER_PAY_PRICE--}:</td> <td width="10" class="seperator"> </td> <td><input type="text" name="price" class="admin_normal" size="3" - maxlength="3"> {?POINTS?}</td> + maxlength="3"> <span class="tiny">({?POINTS?})</span></td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> diff --git a/templates/de/html/admin/admin_add_points.tpl b/templates/de/html/admin/admin_add_points.tpl index ac404efd6d..66a0087b35 100644 --- a/templates/de/html/admin/admin_add_points.tpl +++ b/templates/de/html/admin/admin_add_points.tpl @@ -1,13 +1,13 @@ -<form action="{?URL?}/modules.php?module=admin&what=add_points&uid={!__UID!}" method="post" style="margin-bottom: 0px"> -<table border="0" cellspacing="0" cellpadding="0" width="500" - align="center" class="admin_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_points&userid=$content[userid]" method="post" style="margin-bottom: 0px"> +<table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td class="admin_title seperator" height="10" colspan="3"> </td> </tr> <tr> <td class="admin_title" colspan="3" align="center"> - {--ADMIN_ADD_POINTS_TO_USER--}:<br /> - <strong>{!__USER_VALUE!}</strong></td> + {--ADMIN_ADD_POINTS_TO_USER--}:<br /> + <strong>$content[user]</strong> + </td> </tr> <tr> <td class="admin_title seperator bottom2" height="10" colspan="3"> </td> @@ -18,8 +18,9 @@ <tr> <td align="right">{--ENTER_POINTS_ADD--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points" size="6" maxlength="7" - class="admin_normal"></td> + <td> + <input type="text" class="admin_normal" name="points" size="6" maxlength="7" /> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -27,8 +28,9 @@ <tr> <td align="right">{--ENTER_ADD_REASON--}:</td> <td width="10" class="seperator"> </td> - <td><textarea name="reason" class="admin_normal" rows="5" - cols="20"></textarea></td> + <td> + <textarea name="reason" class="admin_normal" rows="5" cols="20"></textarea> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -37,10 +39,9 @@ <td height="5" colspan="3" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" align="center" class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" class="admin_submit" name="ok" - value="{--ADMIN_ADD_POINTS--}" /> + <td colspan="3" align="center" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_ADD_POINTS--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_add_points_all.tpl b/templates/de/html/admin/admin_add_points_all.tpl index 0649cd68e0..63bdd645f8 100644 --- a/templates/de/html/admin/admin_add_points_all.tpl +++ b/templates/de/html/admin/admin_add_points_all.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=add_points&uid=all" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_points&userid=all" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> diff --git a/templates/de/html/admin/admin_add_rallye.tpl b/templates/de/html/admin/admin_add_rallye.tpl index df36c6b46d..54749de101 100644 --- a/templates/de/html/admin/admin_add_rallye.tpl +++ b/templates/de/html/admin/admin_add_rallye.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=add_rallye" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_rallye" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="admin_table dashed"> <tr> @@ -33,7 +33,7 @@ <tr> <td align="right">{--RALLYE_TEMPLATE--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{--_TEMPLATES--}</td> + <td align="center">$content[templates_selection]</td> </tr> <tr> <td colspan="3" height="3" class="seperator bottom2"> </td> @@ -44,9 +44,10 @@ <tr> <td width="200" align="right" valign="top">{--RALLYE_START_DAY--}:</td> <td width="10" class="seperator"> </td> - <td width="290" align="center">{--_START_DAY--}. - {--_START_MONTH--}. {--_START_YEAR--}<br /> - {--_START_HOUR--}: {--_START_MIN--}: {--_START_SEC--}</td> + <td width="290" align="center"> + $content[start_day].$content[start_month].$content[start_year]<br /> + $content[start_hour]:$content[start_min]:$content[start_sec] + </td> </tr> <tr> <td colspan="3" height="3" class="seperator bottom2"> </td> @@ -57,9 +58,10 @@ <tr> <td align="right" valign="top">{--RALLYE_END_DAY--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{--_END_DAY--}. {--_END_MONTH--}. - {--_END_YEAR--}<br /> - {--_END_HOUR--}: {--_END_MIN--}: {--_END_SEC--}</td> + <td align="center"> + $content[end_day].$content[end_month].$content[end_year]<br /> + $content[end_hour]:$content[end_min]:$content[end_sec] + </td> </tr> <tr> <td colspan="3" height="3" class="seperator bottom2"> </td> @@ -70,10 +72,11 @@ <tr> <td align="right">{--RALLYE_IS_ACTIVE--}:</td> <td width="10" class="seperator"> </td> - <td align="center"><select name="active" size="1" - class="admin_select"> - {--_ACTIVE_OPTIONS--} - </select></td> + <td align="center"> + <select name="active" size="1" class="admin_select"> + $content[active_options] + </select> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -81,10 +84,11 @@ <tr> <td align="right">{--RALLYE_AUTO_ADD_USER--}:</td> <td width="10" class="seperator"> </td> - <td align="center"><select name="auto_add" size="1" - class="admin_select"> - {--_AUTO_ADD_OPTIONS--} - </select></td> + <td align="center"> + <select name="auto_add" size="1" class="admin_select"> + $content[auto_add_options] + </select> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -92,10 +96,11 @@ <tr> <td align="right">{--RALLYE_SEND_NOTIFY--}:</td> <td width="10" class="seperator"> </td> - <td align="center"><select name="notify" size="1" - class="admin_select"> - {--_NOTIFY_OPTIONS--} - </select></td> + <td align="center"> + <select name="notify" size="1" class="admin_select"> + $content[notify_options] + </select> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> diff --git a/templates/de/html/admin/admin_add_rallye_prices.tpl b/templates/de/html/admin/admin_add_rallye_prices.tpl index 9448239c0a..01c9dad1df 100644 --- a/templates/de/html/admin/admin_add_rallye_prices.tpl +++ b/templates/de/html/admin/admin_add_rallye_prices.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="480" class="admin_table dashed"> <tr> diff --git a/templates/de/html/admin/admin_add_reflevel.tpl b/templates/de/html/admin/admin_add_reflevel.tpl new file mode 100644 index 0000000000..fbb4b5f87d --- /dev/null +++ b/templates/de/html/admin/admin_add_reflevel.tpl @@ -0,0 +1,43 @@ +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=add" method="post" style="margin-bottom: 0px"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> + <tr> + <td class="admin_title bottom2" width="10" height="30"> </td> + <td class="admin_title bottom2" colspan="3" align="center"><strong>{--ADD_NEW_REFDEPTH--}</strong> + </td> + <td class="admin_title bottom2" width="10"> </td> + </tr> + <tr> + <td class="seperator" colspan="5" height="7"> </td> + </tr> + <tr> + <td class="seperator" width="10"> </td> + <td align="right" width="200">{--ENTER_REF_LVL--}:</td> + <td class="seperator" width="10"> </td> + <td><input type="text" name="level" class="admin_normal" size="3" + maxlength="3"></td> + <td class="seperator" width="10"> </td> + </tr> + <tr> + <td class="seperator" colspan="5" height="7"> </td> + </tr> + <tr> + <td class="seperator" width="10"> </td> + <td align="right" width="200">{--ENTER_REF_PERCENTS--}:</td> + <td class="seperator" width="10"> </td> + <td><input type="text" name="perc" class="admin_normal" size="3" + maxlength="3">%</td> + <td class="seperator" width="10"> </td> + </tr> + <tr> + <td class="seperator bottom2" colspan="5" height="7"> </td> + </tr> + <tr> + <td class="admin_footer seperator" width="10"> </td> + <td class="admin_footer" colspan="3" align="center"><input + type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" + value="{--ADD_DEPTH--}" /></td> + <td class="admin_footer seperator" width="10"> </td> + </tr> +</table> +</form> \ No newline at end of file diff --git a/templates/de/html/admin/admin_add_reflvl.tpl b/templates/de/html/admin/admin_add_reflvl.tpl index e417c5b28d..11f5d85d80 100644 --- a/templates/de/html/admin/admin_add_reflvl.tpl +++ b/templates/de/html/admin/admin_add_reflvl.tpl @@ -1,43 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=add" method="post" style="margin-bottom: 0px"> -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> - <tr> - <td class="admin_title bottom2" width="10" height="30"> </td> - <td class="admin_title bottom2" colspan="3" align="center"><strong>{--ADD_NEW_REFDEPTH--}</strong> - </td> - <td class="admin_title bottom2" width="10"> </td> - </tr> - <tr> - <td class="seperator" colspan="5" height="7"> </td> - </tr> - <tr> - <td class="seperator" width="10"> </td> - <td align="right" width="200">{--ENTER_REF_LVL--}:</td> - <td class="seperator" width="10"> </td> - <td><input type="text" name="lvl" class="admin_normal" size="3" - maxlength="3"></td> - <td class="seperator" width="10"> </td> - </tr> - <tr> - <td class="seperator" colspan="5" height="7"> </td> - </tr> - <tr> - <td class="seperator" width="10"> </td> - <td align="right" width="200">{--ENTER_REF_PERCENTS--}:</td> - <td class="seperator" width="10"> </td> - <td><input type="text" name="perc" class="admin_normal" size="3" - maxlength="3">%</td> - <td class="seperator" width="10"> </td> - </tr> - <tr> - <td class="seperator bottom2" colspan="5" height="7"> </td> - </tr> - <tr> - <td class="admin_footer seperator" width="10"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--ADD_DEPTH--}" /></td> - <td class="admin_footer seperator" width="10"> </td> - </tr> -</table> -</form> \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_add_sponsor.tpl b/templates/de/html/admin/admin_add_sponsor.tpl index 514a2d6127..17ac321005 100644 --- a/templates/de/html/admin/admin_add_sponsor.tpl +++ b/templates/de/html/admin/admin_add_sponsor.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=add_sponsor" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_sponsor" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="530"> <tr> <td class="admin_title bottom2" width="10" height="30"> </td> @@ -257,12 +257,12 @@ <td> <select name="warning_interval" class="admin_select" size="1"> <option value="0">{--SELECT_NONE--}</option> - <option value="{--({?one_day?}*1)--}">1 {--DAYS--}</option> - <option value="{--({?one_day?}*3)--}">3 {--DAYS--}</option> - <option value="{--({?one_day?}*7)--}" selected="selected">1 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*14)--}">2 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*28)--}">4 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*56)--}">8 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*1)--}">1 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*3)--}">3 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*7)--}" selected="selected">1 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*14)--}">2 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*28)--}">4 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*56)--}">8 {--LIFE_WEEKS--}</option> </select> </td> <td class="seperator" width="10"> </td> @@ -275,7 +275,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="points_amount" class="admin_normal" size="6" maxlength="20" value="{!__SPONSOR_MIN_VALUE!}" /> + <input type="text" name="points_amount" class="admin_normal" size="6" maxlength="20" value="{?sponsor_min_points?}" /> </td> <td class="seperator" width="10"> </td> </tr> diff --git a/templates/de/html/admin/admin_add_sponsor_already.tpl b/templates/de/html/admin/admin_add_sponsor_already.tpl index dfc34b6705..011638ddf8 100644 --- a/templates/de/html/admin/admin_add_sponsor_already.tpl +++ b/templates/de/html/admin/admin_add_sponsor_already.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=add_sponsor&force=1" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_sponsor&force=1" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" width="10" height="30"> </td> @@ -11,7 +11,7 @@ <tr> <td width="10" height="30"> </td> <td align="center"> - {--ADMIN_SPONSOR_DO_YOU_REALLY_WANT_ADDING--} + Ein Sponsor existiert bereits mit der eingegeben EMail-Adresse <strong>$content[email]</strong>. Wollen Sie ihn dennoch hinzufügen? </td> <td width="10"> </td> </tr> @@ -19,7 +19,7 @@ <tr> <td class="admin_footer seperator" width="10"> </td> <td class="admin_footer"> - {!__HIDDEN_DATA!} + $content[hidden] <input type="submit" name="ok" class="admin_submit" value="{--ADD_SPONSOR--}" /> </td> <td class="admin_footer seperator" width="10"> </td> diff --git a/templates/de/html/admin/admin_add_sponsor_paytype.tpl b/templates/de/html/admin/admin_add_sponsor_paytype.tpl index ea71169623..9b820d7e47 100644 --- a/templates/de/html/admin/admin_add_sponsor_paytype.tpl +++ b/templates/de/html/admin/admin_add_sponsor_paytype.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="560" align="center" class="admin_table dashed"> <tr> <td class="admin_title bottom2" colspan="3" align="center" height="30"> @@ -9,7 +9,7 @@ <tr> <td width="350" align="right">{--SPONSOR_PAYTYPE_NAME--}:<br /><div class="tiny">{--SPONSOR_PAYTYPE_NAME_HINT--}</div></td> <td width="10" class="seperator"> </td> - <td width="200"><input type="text" name="pay_name" size="10" maxlength="255" class="admin_normal" /></td> + <td width="200"><input type="text" class="admin_normal" name="pay_name" size="10" maxlength="255" /></td> </tr> <tr><td height="8" colspan="3" class="seperator"> </td></tr> <tr> diff --git a/templates/de/html/admin/admin_add_surfbar_url.tpl b/templates/de/html/admin/admin_add_surfbar_url.tpl index 60b9aeed9b..6ade46c293 100644 --- a/templates/de/html/admin/admin_add_surfbar_url.tpl +++ b/templates/de/html/admin/admin_add_surfbar_url.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=add_surfbar_url" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=add_surfbar_url" method="post"> <div class="admin_table dashed" style="width:600px;margin-top:10px;"> <div class="admin_title bottom2" style="padding-top:5px;padding-bottom:5px;"> <strong>URL in Surfbar hinzufügen:</strong> diff --git a/templates/de/html/admin/admin_admin_add.tpl b/templates/de/html/admin/admin_admin_add.tpl index ac2ce57b34..50f12083b0 100644 --- a/templates/de/html/admin/admin_admin_add.tpl +++ b/templates/de/html/admin/admin_admin_add.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admin_add" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admin_add" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td height="8" colspan="5"></td> @@ -7,9 +7,9 @@ <td width="10"> </td> <td align="right" width="245">{--ENTER_TITLE--}:</td> <td width="10"> </td> - <td class="admin_table" width="245" align="center"><input - type="text" name="title" class="admin_normal" size="30" - maxlength="50"></td> + <td class="admin_table" width="245" align="center"> + <input type="text" name="title" class="admin_normal" size="30" maxlength="50" /> + </td> <td width="10"> </td> </tr> <tr> @@ -19,8 +19,10 @@ <td width="10"> </td> <td align="right">{--SELECT_WHAT_NAME--}:</td> <td width="10"> </td> - <td class="admin_table" align="center">{!__WHAT_SELECTION!}<br /> - <span class="admin_note">({--CREATE_WHAT_FIRST--})</span></td> + <td class="admin_table" align="center"> + $content[what_selection]<br /> + <span class="admin_note">({--CREATE_WHAT_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -30,8 +32,10 @@ <td width="10"> </td> <td align="right">{--SELECT_PARENT_MENU--}:</td> <td width="10"> </td> - <td class="admin_table" align="center">{!__ACTION_SELECTION!}<br /> - <span class="admin_note">({--CREATE_ACTION_FIRST--})</span></td> + <td class="admin_table" align="center"> + $content[action_selection]<br /> + <span class="admin_note">({--CREATE_ACTION_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -41,8 +45,9 @@ <td width="10"> </td> <td align="right">{--ENTER_DESCR--}:</td> <td width="10"> </td> - <td class="admin_table" align="center"><textarea name="descr" - rows="10" cols="30" class="admin_normal"></textarea></td> + <td class="admin_table" align="center"> + <textarea name="descr" rows="10" cols="30" class="admin_normal"></textarea> + </td> <td width="10"> </td> </tr> <tr> @@ -52,7 +57,7 @@ <td width="10"> </td> <td align="right">{--SELECT_BELOW_MENU--}:</td> <td width="10"> </td> - <td class="admin_table" align="center">{!-__BELOW_SELECTION!}</td> + <td class="admin_table" align="center">$content[below_selection]</td> <td width="10"> </td> </tr> <tr> @@ -63,10 +68,9 @@ </tr> <tr> <td class="admin_table" width="10"> </td> - <td class="admin_table" align="center" colspan="3"><input - type="reset" class="admin_reset" class="admin_normal" - value="{--CLEAR_FORM--}" /> <input type="submit" - class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> + <td class="admin_table" align="center" colspan="3"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> </td> <td class="admin_table" width="10"> </td> </tr> diff --git a/templates/de/html/admin/admin_admins_add.tpl b/templates/de/html/admin/admin_admins_add.tpl index 0dd733b6b6..c81191522c 100644 --- a/templates/de/html/admin/admin_admins_add.tpl +++ b/templates/de/html/admin/admin_admins_add.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_add" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_add" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="480" class="admin_table dashed" align="center"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_admins_add_acl.tpl b/templates/de/html/admin/admin_admins_add_acl.tpl index 2897f07925..e4b9a4595f 100644 --- a/templates/de/html/admin/admin_admins_add_acl.tpl +++ b/templates/de/html/admin/admin_admins_add_acl.tpl @@ -1,6 +1,5 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_admins" method="post" style="margin-bottom: 0px"> -<table border="0" cellspacing="0" cellpadding="0" width="480" - class="admin_table dashed" align="center"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_admins" method="post" style="margin-bottom: 0px"> +<table border="0" cellspacing="0" cellpadding="0" width="480" class="admin_table dashed" align="center"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> <strong>{--ADMIN_ADMINS_ADD_ACL--}:</strong></td> @@ -11,10 +10,11 @@ <tr> <td width="235" align="right">{--ADMIN_ADMINS_SELECT_LOGIN--}:</td> <td width="10" class="seperator"> </td> - <td width="235"><select name="admin_id" size="1" - class="admin_select"> - {--_ADMINS_SELECTION--} - </select></td> + <td width="235"> + <select name="admin_id" size="1" class="admin_select"> + $content[admins_selection] + </select> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> @@ -22,7 +22,7 @@ <tr> <td align="right">{--ADMIN_ADMINS_SELECT_ACTION--}:</td> <td width="10" class="seperator"> </td> - <td>{--_ACTION_SELECTION--}</td> + <td>$content[action_selection]</td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> @@ -30,7 +30,7 @@ <tr> <td align="right">{--ADMIN_ADMINS_SELECT_WHAT--}:</td> <td width="10" class="seperator"> </td> - <td>{--_WHAT_SELECTION--}</td> + <td>$content[what_selection]</td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> @@ -38,18 +38,20 @@ <tr> <td align="right">{--ADMIN_ADMINS_SELECT_MODE--}:</td> <td width="10" class="seperator"> </td> - <td><select name="mode" size="1" class="admin_select"> - {--_MODE_OPTIONS--} - </select></td> + <td> + <select name="mode" size="1" class="admin_select"> + $content[mode_options] + </select> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="add" class="admin_submit" - value="{--ADMIN_ADMINS_ADD_ADMIN--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="add" class="admin_submit" value="{--ADMIN_ADMINS_ADD_ADMIN--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_admins_contct_form.tpl b/templates/de/html/admin/admin_admins_contct_form.tpl index 22cea5e5eb..03ce95ccfa 100644 --- a/templates/de/html/admin/admin_admins_contct_form.tpl +++ b/templates/de/html/admin/admin_admins_contct_form.tpl @@ -1,9 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_contct&admin={!__ADMIN!}" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_contct&admin=$content[admin]" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed"> <tr> <td width="195" class="admin_header bottom2" align="right" height="28"><strong>{--ADMINS_ADMIN_ID--}:</strong></td> <td width="10" class="admin_header bottom2 seperator"> </td> - <td width="195" class="admin_header bottom2" align="left"><strong>{!__ADMIN!}</strong></td> + <td width="195" class="admin_header bottom2" align="left"><strong>$content[admin]</strong></td> </tr> <tr> <td colspan="3" class="seperator"> </td> @@ -17,16 +17,17 @@ <tr> <td colspan="3" class="seperator bottom2"> </td> </tr> - {--ADMINS_MESSAGING_SELECTION--} + $content[message_selection] <tr> <td colspan="3" class="seperator"> </td> </tr> <tr> - <td class="admin_footer top2" align="right"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}"> + <td class="admin_footer top2" align="right"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <td width="10" class="admin_footer top2 seperator"> </td> - <td class="admin_footer top2"><input type="submit" name="ok" - class="admin_submit" value="{--ADMINS_CONTACT_SUBMIT--}"></td> + <td class="admin_footer top2"> + <input type="submit" name="ok" class="admin_submit" value="{--ADMINS_CONTACT_SUBMIT--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_admins_contct_select.tpl b/templates/de/html/admin/admin_admins_contct_select.tpl index 5cfd450cbf..518fd4e18c 100644 --- a/templates/de/html/admin/admin_admins_contct_select.tpl +++ b/templates/de/html/admin/admin_admins_contct_select.tpl @@ -1,15 +1,17 @@ <tr> <td colspan="3" align="center" class="admin_title bottom2" height="28"> - {--ADMINS_SELECT_CONTACT_TYPE--}</td> + {--ADMINS_SELECT_CONTACT_TYPE--} + </td> </tr> <tr> <td colspan="3" class="seperator"> </td> </tr> <tr> - <td align="right"><input type="radio" name="type" - class="admin_normal" value="mail" checked="checked" /> {--ADMINS_CONTACT_TYPE_MAIL--} + <td align="right"> + <input type="radio" name="type" class="admin_normal" value="mail" checked="checked" /> {--ADMINS_CONTACT_TYPE_MAIL--} </td> <td width="10" class="seperator"> </td> - <td><input type="radio" name="type" class="admin_normal" - value="msg"> {--ADMINS_CONTACT_TYPE_MSG--}</td> + <td> + <input type="radio" name="type" class="admin_normal" value="message" /> {--ADMINS_CONTACT_TYPE_MSG--} + </td> </tr> diff --git a/templates/de/html/admin/admin_admins_mails_edit.tpl b/templates/de/html/admin/admin_admins_mails_edit.tpl index 2db82cedf4..c331913b4b 100644 --- a/templates/de/html/admin/admin_admins_mails_edit.tpl +++ b/templates/de/html/admin/admin_admins_mails_edit.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_mails" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_mails" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="admin_table dashed"> <tr> @@ -11,7 +11,7 @@ <td class="admin_title bottom2" align="center"><strong>{--ADMIN_ADMINS_CONTACT--}:</strong> </td> </tr> - {!__ADMINS_ROWS!} + $content <tr> <td colspan="2" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_admins_mails_list.tpl b/templates/de/html/admin/admin_admins_mails_list.tpl index 6b0ac8de18..23de125690 100644 --- a/templates/de/html/admin/admin_admins_mails_list.tpl +++ b/templates/de/html/admin/admin_admins_mails_list.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_mails" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_mails" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title" height="30"><strong>{--ADMINS_MAILS_TITLE--}</strong> @@ -12,7 +12,7 @@ <td width="235" class="admin_title bottom2" align="center"><strong>{--ADMIN_ADMINS_CONTACT--}:</strong> </td> </tr> - {!__MAILS_ROWS!} + $content <tr> <td colspan="3" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_amenu_delete.tpl b/templates/de/html/admin/admin_amenu_delete.tpl index 7362811b36..1626e33bb0 100644 --- a/templates/de/html/admin/admin_amenu_delete.tpl +++ b/templates/de/html/admin/admin_amenu_delete.tpl @@ -1,21 +1,23 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=adminedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="2" class="admin_header" height="40"> - <strong>{--DEL_ADMIN_MENU--}</strong></td> + <strong>{--DEL_ADMIN_MENU--}</strong> + </td> </tr> <tr> <td align="center" colspan="2" class="admin_header bottom2"> - {--DEL_MENU_1--}{!__CHK_VALUE!}{--DEL_MENU_2--}</td> + {--DEL_MENU_1--}$content[chk]{--DEL_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td colspan="2" class="admin_footer"><input - type="hidden" name="ok" value="del"> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}"> <input - type="submit" class="admin_delete submit" name="submit" - value="{--DEL_ENTRIES--}"></td> + <td colspan="2" class="admin_footer"> + <input type="hidden" name="ok" value="del" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="submit" class="admin_delete submit" name="submit" value="{--DEL_ENTRIES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_amenu_edit.tpl b/templates/de/html/admin/admin_amenu_edit.tpl index 8ea1f213dd..32a8c13bc1 100644 --- a/templates/de/html/admin/admin_amenu_edit.tpl +++ b/templates/de/html/admin/admin_amenu_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=adminedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 right2" align="center" width="30" height="30"><strong>{--ID_SELECT--}</strong></td> @@ -8,10 +8,10 @@ <td class="admin_title bottom2 right2" align="center"><strong>{--DISPLAY_TITLE--}</strong></td> <td class="admin_title bottom2" align="center"><strong>{--SORT_NAVIGATION--}</strong></td> </tr> -{!__MENU_ROWS!} +$content[rows] <tr> <td colspan="5" class="admin_footer"> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" class="admin_normal" /> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> <input type="submit" class="admin_submit" name="edit" value="{--EDIT_MENUS--}" /> <input type="submit" class="admin_delete submit" name="del" value="{--DEL_MENUS--}" /> </td> diff --git a/templates/de/html/admin/admin_amenu_edit_form.tpl b/templates/de/html/admin/admin_amenu_edit_form.tpl index 1caedbe6a5..44e8b173e7 100644 --- a/templates/de/html/admin/admin_amenu_edit_form.tpl +++ b/templates/de/html/admin/admin_amenu_edit_form.tpl @@ -1,23 +1,24 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}" method="post" target="_self"> -<table border="0" cellspacing="0" cellpadding="0" - class="admin_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=adminedit&sub=$content[sub]" method="post" target="_self"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> - <td align="center" colspan="2" class="admin_title" height="40"><strong>{--EDIT_ADMIN_MENU--}</strong> + <td align="center" colspan="2" class="admin_title" height="40"> + <strong>{--EDIT_ADMIN_MENU--}</strong> </td> </tr> <tr> <td align="center" colspan="2" class="admin_title bottom2"> - {--EDIT_MENU_1--}{!__CHK_VALUE!}{--EDIT_MENU_2--}</td> + {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td colspan="2" class="admin_footer"><input - type="hidden" name="ok" value="edit" /> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}" /> <input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" class="admin_submit" name="submit" - value="{--SUBMIT_CHANGES--}" /></td> + <td colspan="2" class="admin_footer"> + <input type="hidden" name="ok" value="edit" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="submit" value="{--SUBMIT_CHANGES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_cache_stats.tpl b/templates/de/html/admin/admin_cache_stats.tpl index 3b388b0975..6659f50045 100644 --- a/templates/de/html/admin/admin_cache_stats.tpl +++ b/templates/de/html/admin/admin_cache_stats.tpl @@ -3,27 +3,32 @@ class="admin_table dashed"> <tr> <td colspan="2" class="admin_title bottom2" align="center" height="30"> - <strong>{--ADMIN_CACHE_STATS_TITLE--}</strong></td> + <strong>{--ADMIN_CACHE_STATS_TITLE--}</strong> + </td> </tr> <tr> <td width="320" class="bottom2 right2" align="right">{--ADMIN_CACHE_DB_HITS--}</td> - <td width="100" class="bottom2" style="padding-right: 2px" - align="right">{!__DB_HITS!}</td> + <td width="100" class="bottom2" style="padding-right: 2px" align="right"> + $content[db_hits] + </td> </tr> <tr> <td width="320" class="bottom2 right2" align="right">{--ADMIN_CACHE_HITS--}</td> - <td width="100" class="bottom2" style="padding-right: 2px" - align="right">+{!__CACHE_HITS!}</td> + <td width="100" class="bottom2" style="padding-right: 2px" align="right"> + +$content[cache_hits] + </td> </tr> <tr> <td width="320" class="bottom2 right2" align="right">{--ADMIN_TOTAL_HITS--}</td> - <td width="100" class="bottom2" style="padding-right: 2px" - align="right">={!__TOTAL_HITS!}</td> + <td width="100" class="bottom2" style="padding-right: 2px" align="right"> + =$content[total_hits] + </td> </tr> <tr> <td width="320" class="admin_footer right2" align="right"><strong>{--ADMIN_CACHE_PERCENTS--}</strong></td> - <td width="100" class="admin_footer" style="padding-right: 2px" - align="center"><strong>{!__CACHE_PERC!}%</strong></td> + <td width="100" class="admin_footer" style="padding-right: 2px" align="center"> + <strong>$content[cache_perc]%</strong> + </td> </tr> </table> diff --git a/templates/de/html/admin/admin_config_active.tpl b/templates/de/html/admin/admin_config_active.tpl index 2dd25e91b5..145bfe897e 100644 --- a/templates/de/html/admin/admin_config_active.tpl +++ b/templates/de/html/admin/admin_config_active.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_active" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_active" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" height="30" width="10"> </td> @@ -14,9 +14,9 @@ <td width="10" class="seperator"> </td> <td align="right" width="275">{--ADMIN_ACTIVE_LIMIT--}:</td> <td width="10" class="seperator"> </td> - <td align="center" width="275"><input type="input" - name="active_limit" class="admin_normal" value="{!__LIMIT_VALUE!}" - size="5" maxlength="20"></td> + <td align="center" width="275"> + <input type="input" name="active_limit" class="admin_normal" value="{?active_limit?}" size="5" maxlength="20" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -24,10 +24,10 @@ </tr> <tr> <td width="10" class="admin_footer seperator"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td class="admin_footer" colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td width="10" class="admin_footer seperator"> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_config_admin.tpl b/templates/de/html/admin/admin_config_admin.tpl index 4c78881311..91d08e932d 100644 --- a/templates/de/html/admin/admin_config_admin.tpl +++ b/templates/de/html/admin/admin_config_admin.tpl @@ -1,26 +1,27 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_admin" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_admin" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_CONFIG_ADMIN_MENU_HEADER--}</strong></td> + <strong>{--ADMIN_CONFIG_ADMIN_MENU_HEADER--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> - <td width="200" align="right" valign="top" - style="padding-top: 3px; padding-right: 20px"> - {--ADMIN_SELECT_MENU_TYPE--}:</td> + <td width="200" align="right" valign="top" style="padding-top: 3px; padding-right: 20px"> + {--ADMIN_SELECT_MENU_TYPE--}: + </td> <td width="40" align="center" valign="top" style="padding-top: 3px"> - <input type="radio" name="admin_menu" class="admin_normal" value="NEW"{!__ADMIN_MENU_NEW!}> + <input type="radio" name="admin_menu" class="admin_normal" value="NEW"$content[admin_menu_new] /> </td> <td width="360">{--ADMIN_MENU_NEW--}</td> </tr> <tr> <td width="200" class="seperator"> </td> <td width="40" align="center" valign="top" style="padding-top: 3px"> - <input type="radio" name="admin_menu" class="admin_normal" value="OLD"{!__ADMIN_MENU_OLD!}> + <input type="radio" name="admin_menu" class="admin_normal" value="OLD"$content[admin_menu_old] /> </td> <td width="360">{--ADMIN_MENU_OLD--}</td> </tr> @@ -28,10 +29,10 @@ <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_admins.tpl b/templates/de/html/admin/admin_config_admins.tpl index 73adcbc0c4..6e485358ef 100644 --- a/templates/de/html/admin/admin_config_admins.tpl +++ b/templates/de/html/admin/admin_config_admins.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed"> <tr> @@ -13,7 +13,7 @@ <td align="center" class="admin_title bottom2 right2" width="204"><strong>{--MENU_WHAT--}:</strong></td> <td align="center" class="admin_title bottom2" width="120"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> </tr> - {!__ACL_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_admins_del.tpl b/templates/de/html/admin/admin_config_admins_del.tpl index 223b839829..3abd87c934 100644 --- a/templates/de/html/admin/admin_config_admins_del.tpl +++ b/templates/de/html/admin/admin_config_admins_del.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> @@ -13,7 +13,7 @@ <td align="center" class="admin_title bottom2 right2" width="204"><strong>{--MENU_WHAT--}:</strong></td> <td align="center" class="admin_title bottom2" width="120"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> </tr> - {!__ACL_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_config_admins_edit.tpl b/templates/de/html/admin/admin_config_admins_edit.tpl index 49ccbd85d1..8ec5ca5f4b 100644 --- a/templates/de/html/admin/admin_config_admins_edit.tpl +++ b/templates/de/html/admin/admin_config_admins_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_admins" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> @@ -13,7 +13,7 @@ <td align="center" class="admin_title bottom2 right2" width="204"><strong>{--MENU_WHAT--}:</strong></td> <td align="center" class="admin_title bottom2" width="120"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> </tr> - {!__ACL_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_config_autopurge.tpl b/templates/de/html/admin/admin_config_autopurge.tpl index a632c45398..4f90b66e62 100644 --- a/templates/de/html/admin/admin_config_autopurge.tpl +++ b/templates/de/html/admin/admin_config_autopurge.tpl @@ -1,13 +1,15 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_autopurge" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_autopurge" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="510" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_AUTOPURGE_CONFIGURATION--}</strong></td> + <strong>{--ADMIN_AUTOPURGE_CONFIGURATION--}</strong> + </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_INACTIVE_TITLE--}</td> + {--ADMIN_AUTOPURGE_INACTIVE_TITLE--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="10"> </td> @@ -15,7 +17,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_INACTIVE--}</td> <td width="10" class="seperator"> </td> - <td>{!__AP_INACTIVE_SELECTION!}</td> + <td>$content[ap_inactive_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -23,7 +25,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_INACTIVE_SINCE--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_IN_SINCE!}</td> + <td>$content[ap_in_since]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -31,14 +33,15 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_INACTIVE_TIME--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_IN_TIME!}</td> + <td>$content[ap_in_time]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="10"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_UNCONFIRMED_TITLE--}</td> + {--ADMIN_AUTOPURGE_UNCONFIRMED_TITLE--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="10"> </td> @@ -46,7 +49,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_UNCONFIRMED--}</td> <td width="10" class="seperator"> </td> - <td>{!__AP_UNCONFIRMED_SELECTION!}</td> + <td>$content[ap_unconfirmed_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -54,14 +57,15 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_UNCONFIRMED_TIME--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_UN_TIME!}</td> + <td>$content[ap_un_time]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="10"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_TASKS_TITLE--}</td> + {--ADMIN_AUTOPURGE_TASKS_TITLE--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="10"> </td> @@ -69,7 +73,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_TASKS--}</td> <td width="10" class="seperator"> </td> - <td>{!__AP_TASKS_SELECTION!}</td> + <td>$content[ap_tasks_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -77,14 +81,15 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_TASKS_TIME--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_TASK_TIME!}</td> + <td>$content[ap_task_time]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_MAILID_TITLE--}</td> + {--ADMIN_AUTOPURGE_MAILID_TITLE--} + </td> </tr> <tr> <td colspan="3" height="7" class="seperator"> </td> @@ -92,10 +97,10 @@ <tr> <td align="right">{--ADMIN_OPTION_AUTOPURGE_ACTIVE--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="auto_purge_active" value="Y"{--_CFG_AP_ACTIVE_Y--}> - {--NO--}: <input type="radio" name="auto_purge_active" value="N"{--_CFG_AP_ACTIVE_N--}> - </span></td> + <td> + {--YES--}: <input type="radio" name="auto_purge_active" value="Y"$content[auto_purge_active_y] /> + {--NO--}: <input type="radio" name="auto_purge_active" value="N"$content[auto_purge_active_n] /> + </td> </tr> <tr> <td colspan="3" height="7" class="seperator"> </td> @@ -103,19 +108,20 @@ <tr> <td align="right">{--ADMIN_OPTION_MAIL_LIFETIME--}:</td> <td width="10" class="seperator"> </td> - <td>{!_CFG_AUTO_PURGE!}</td> + <td>$content[auto_purge]</td> </tr> <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_NOTIFY_DEL_MAILS--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_NOTIFY_DEL_MAILS!}</td> + <td>$content[ap_notify_del_mails]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="10"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_DEL_MAILS_TITLE--}</td> + {--ADMIN_AUTOPURGE_DEL_MAILS_TITLE--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="10"> </td> @@ -123,7 +129,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_DEL_MAILS--}</td> <td width="10" class="seperator"> </td> - <td>{!__AP_DEL_MAILS_SELECTION!}</td> + <td>$content[ap_del_mails_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -131,14 +137,15 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_DEL_MAILS_TIME--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_DEL_MAILS_TIME!}</td> + <td>$content[ap_del_mails_time]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="10"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - {--ADMIN_AUTOPURGE_NOTIFICATION_TITLE--}</td> + {--ADMIN_AUTOPURGE_NOTIFICATION_TITLE--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -146,7 +153,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_NOTIFY_INACTIVE--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_NOTIFY_INACTIVE!}</td> + <td>$content[ap_notify_inactive]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -154,7 +161,7 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_NOTIFY_UNCONFIRMED--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_NOTIFY_UNCONFIRMED!}</td> + <td>$content[ap_notify_unconfirmed]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -162,16 +169,16 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_NOTIFY_TASKS--}:</td> <td width="10" class="seperator"> </td> - <td>{!__AP_NOTIFY_TASKS!}</td> + <td>$content[ap_notify_tasks]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="10"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_beg.tpl b/templates/de/html/admin/admin_config_beg.tpl index 2b340baaa7..e358aff85e 100644 --- a/templates/de/html/admin/admin_config_beg.tpl +++ b/templates/de/html/admin/admin_config_beg.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_beg" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_beg" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -44,7 +44,7 @@ <td align="right" height="20"> {--ADMIN_CONFIG_BEG_UID_TIMEOUT--}:</td> <td class="seperator" width="5"> </td> - <td align="center">$content[uid_timeout]</td> + <td align="center">$content[userid_timeout]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -101,8 +101,8 @@ <td align="right" height="20">{--ADMIN_BEG_RALLYE_ACTIVE--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_rallye" class="admin_normal" value="Y"$content[rallye_yes] /> {--YES--}<br /> - <input type="radio" name="beg_rallye" class="admin_normal" value="N"$content[rallye_no] /> {--NO--} + <input type="radio" name="beg_rallye" class="admin_normal" value="Y"$content[rallye_y] /> {--YES--}<br /> + <input type="radio" name="beg_rallye" class="admin_normal" value="N"$content[rallye_n] /> {--NO--} </td> </tr> <tr> @@ -112,8 +112,8 @@ <td align="right" height="20">{--ADMIN_BEG_INCLUDE_OWN--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_include_own" class="admin_normal" value="Y"$content[include_own_yes] /> {--YES--}<br /> - <input type="radio" name="beg_include_own" class="admin_normal" value="N"$content[include_own_no] /> {--NO--} + <input type="radio" name="beg_include_own" class="admin_normal" value="Y"$content[include_own_y] /> {--YES--}<br /> + <input type="radio" name="beg_include_own" class="admin_normal" value="N"$content[include_own_n] /> {--NO--} </td> </tr> <tr> @@ -123,7 +123,7 @@ <td align="right" height="20">{--ADMIN_BEG_RANKS--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="text" name="beg_ranks" class="admin_normal" size="3" maxlength="7" value="$content[ranks]" /> + <input type="text" name="beg_ranks" class="admin_normal" size="3" maxlength="7" value="{?beg_ranks?}" /> </td> </tr> <tr> @@ -135,8 +135,8 @@ </td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_active" class="admin_normal" value="Y"$content[active_yes] /> {--YES--}<br /> - <input type="radio" name="beg_active" class="admin_normal" value="N"$content[active_no] /> {--NO--} + <input type="radio" name="beg_active" class="admin_normal" value="Y"$content[active_y] /> {--YES--}<br /> + <input type="radio" name="beg_active" class="admin_normal" value="N"$content[active_n] /> {--NO--} </td> </tr> <tr> @@ -171,8 +171,8 @@ <td align="right" height="20">{--ADMIN_BEG_RAL_EN_NOTIFY--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="Y"$content[ral_enable_notify_yes] /> {--YES--}<br /> - <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="N"$content[ral_enable_notify_no] /> {--NO--} + <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="Y"$content[ral_enable_notify_y] /> {--YES--}<br /> + <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="N"$content[ral_enable_notify_n] /> {--NO--} </td> </tr> <tr> @@ -182,8 +182,8 @@ <td align="right" height="20">{--ADMIN_BEG_RAL_DI_NOTIFY--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="Y"$content[ral_disable_notify_yes] /> {--YES--}<br /> - <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="N"$content[ral_disable_notify_no] /> {--NO--} + <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="Y"$content[ral_disable_notify_y] /> {--YES--}<br /> + <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="N"$content[ral_disable_notify_n] /> {--NO--} </td> </tr> <tr> @@ -193,8 +193,8 @@ <td align="right" height="20">{--ADMIN_BEG_NEW_MEMBER_NOTIFY--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="Y"$content[new_member_notify_yes] /> {--YES--}<br /> - <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="N"$content[new_member_notify_no] /> {--NO--} + <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="Y"$content[new_member_notify_y] /> {--YES--}<br /> + <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="N"$content[new_member_notify_n] /> {--NO--} </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_config_birthday.tpl b/templates/de/html/admin/admin_config_birthday.tpl index 8bb602114c..12eabe5b4d 100644 --- a/templates/de/html/admin/admin_config_birthday.tpl +++ b/templates/de/html/admin/admin_config_birthday.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_birthday" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_birthday" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -14,7 +14,7 @@ <span class="admin_note">({--ADMIN_BIRTHDAY_POINTS_NOTE--})</span></td> <td class="seperator" width="5"> </td> <td width="170"> - <input type="text" name="birthday_points" class="admin_normal" value="{!__POINTS_VALUE!}" size="4" maxlength="6" /> + <input type="text" name="birthday_points" class="admin_normal" value="{?birthday_points?}" size="4" maxlength="6" /> <div class="tiny">({?POINTS?})</div> </td> </tr> @@ -28,8 +28,8 @@ <td align="right" height="20">{--ADMIN_BIRTHDAY_ONLY_ACTIVE--}</td> <td class="seperator" width="5"> </td> <td align="center"> - <input type="radio" name="birthday_active" class="admin_normal" value="Y"$content[active_yes] /> {--YES--}<br /> - <input type="radio" name="birthday_active" class="admin_normal" value="N"$content[active_no] /> {--NO--} + <input type="radio" name="birthday_active" class="admin_normal" value="Y"$content[active_y] /> {--YES--}<br /> + <input type="radio" name="birthday_active" class="admin_normal" value="N"$content[active_n] /> {--NO--} </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_config_bonus.tpl b/templates/de/html/admin/admin_config_bonus.tpl index 32797e2ccd..466879194b 100644 --- a/templates/de/html/admin/admin_config_bonus.tpl +++ b/templates/de/html/admin/admin_config_bonus.tpl @@ -1,19 +1,21 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_bonus" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_bonus" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_ACTIVATE_BONUS_SETTINGS--}</strong></td> + <strong>{--ADMIN_ACTIVATE_BONUS_SETTINGS--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_IS_ACTIVE--}</td> + {--ADMIN_BONUS_RALLYE_IS_ACTIVE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_active" class="admin_normal" value="Y"{!__BONUS_ACTIVE_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_active" class="admin_normal" value="N"{!__BONUS_ACTIVE_N!} /> {--NO--} + <td width="195" align="center"> + <input type="radio" name="bonus_active" class="admin_normal" value="Y"$content[active_y] /> {--YES--}<br /> + <input type="radio" name="bonus_active" class="admin_normal" value="N"$content[active_n] /> {--NO--} </td> </tr> <tr> @@ -21,12 +23,13 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_INCLUDE_OWN--}</td> + {--ADMIN_BONUS_INCLUDE_OWN--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_include_own" class="admin_normal" value="Y"{!__BONUS_INCLUDE_OWN_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_include_own" class="admin_normal" - value="N"{!__BONUS_INCLUDE_OWN_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_include_own" class="admin_normal" value="Y"$content[include_own_y] /> {--YES--}<br /> + <input type="radio" name="bonus_include_own" class="admin_normal" value="N"$content[include_own_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -36,12 +39,13 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_CLICK_INCLUDE--}</td> + {--ADMIN_BONUS_RALLYE_CLICK_INCLUDE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_click_yn" class="admin_normal" value="Y"{!__BONUS_CLICK_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_click_yn" class="admin_normal" - value="N"{!__BONUS_CLICK_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_click_yn" class="admin_normal" value="Y"$content[click_y] /> {--YES--}<br /> + <input type="radio" name="bonus_click_yn" class="admin_normal" value="N"$content[click_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -51,12 +55,13 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_LOGIN_INCLUDE--}</td> + {--ADMIN_BONUS_RALLYE_LOGIN_INCLUDE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_login_yn" class="admin_normal" value="Y"{!__BONUS_LOGIN_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_login_yn" class="admin_normal" - value="N"{!__BONUS_LOGIN_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_login_yn" class="admin_normal" value="Y"$content[login_y] /> {--YES--}<br /> + <input type="radio" name="bonus_login_yn" class="admin_normal" value="N"$content[login_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -66,12 +71,13 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_ORDER_INCLUDE--}</td> + {--ADMIN_BONUS_RALLYE_ORDER_INCLUDE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_order_yn" class="admin_normal" value="Y"{!__BONUS_ORDER_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_order_yn" class="admin_normal" - value="N"{!__BONUS_ORDER_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_order_yn" class="admin_normal" value="Y"$content[order_y] /> {--YES--}<br /> + <input type="radio" name="bonus_order_yn" class="admin_normal" value="N"$content[order_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -81,12 +87,13 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_STATS_INCLUDE--}</td> + {--ADMIN_BONUS_RALLYE_STATS_INCLUDE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_stats_yn" class="admin_normal" value="Y"{!__BONUS_STATS_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_stats_yn" class="admin_normal" - value="N"{!__BONUS_STATS_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_stats_yn" class="admin_normal" value="Y"$content[stats_y] /> {--YES--}<br /> + <input type="radio" name="bonus_stats_yn" class="admin_normal" value="N"$content[stats_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -96,11 +103,12 @@ </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_REF_INCLUDE--}</td> + {--ADMIN_BONUS_RALLYE_REF_INCLUDE--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_ref_yn" class="admin_normal" value="Y"{!__BONUS_REF_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_ref_yn" class="admin_normal" value="N"{!__BONUS_REF_N!} /> {--NO--} + <td width="195" align="center"> + <input type="radio" name="bonus_ref_yn" class="admin_normal" value="Y"$content[ref_y] /> {--YES--}<br /> + <input type="radio" name="bonus_ref_yn" class="admin_normal" value="N"$content[ref_n] /> {--NO--} </td> </tr> <tr> @@ -108,18 +116,20 @@ </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EDIT_BONUS_SETTINGS--}</strong></td> + <strong>{--ADMIN_EDIT_BONUS_SETTINGS--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_ORDER_BONUS--}:</td> + {--ADMIN_BONUS_ORDER_BONUS--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="text" - name="bonus_order" class="admin_normal" size="8" maxlength="20" - value="{!__ORDER_VALUE!}"> <span class="admin_note">({?POINTS?})</span> + <td width="195" align="center"> + <input type="text" name="bonus_order" class="admin_normal" size="8" maxlength="20" value="$content[order]" /> + <div class="admin_note">({?POINTS?})</div> </td> </tr> <tr> @@ -127,11 +137,12 @@ </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_REF_BONUS--}:</td> + {--ADMIN_BONUS_REF_BONUS--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="text" - name="bonus_ref" class="admin_normal" size="8" maxlength="20" - value="{!__REF_VALUE!}"> <span class="admin_note">({?POINTS?})</span> + <td width="195" align="center"> + <input type="text" name="bonus_ref" class="admin_normal" size="8" maxlength="20" value="$content[ref]" /> + <div class="admin_note">({?POINTS?})</div> </td> </tr> <tr> @@ -139,11 +150,12 @@ </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_STATS_BONUS--}:</td> + {--ADMIN_BONUS_STATS_BONUS--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="text" - name="bonus_stats" class="admin_normal" size="8" maxlength="20" - value="{!__STATS_VALUE!}"> <span class="admin_note">({?POINTS?})</span> + <td width="195" align="center"> + <input type="text" name="bonus_stats" class="admin_normal" size="8" maxlength="20" value="$content[stats]" /> + <div class="admin_note">({?POINTS?})</div> </td> </tr> <tr> @@ -151,11 +163,12 @@ </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_LOGIN_BONUS--}:</td> + {--ADMIN_BONUS_LOGIN_BONUS--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="text" - name="login_bonus" class="admin_normal" size="8" maxlength="20" - value="{!__LOGIN_VALUE!}"> <span class="admin_note">({?POINTS?})</span> + <td width="195" align="center"> + <input type="text" name="login_bonus" class="admin_normal" size="8" maxlength="20" value="$content[login]" /> + <div class="admin_note">({?POINTS?})</div> </td> </tr> <tr> @@ -163,7 +176,8 @@ </tr> <tr> <td colspan="3" class="admin_title bottom2" align="center" height="30"> - <strong>{--ADMIN_BONUS_TURBO_BONUS_TITLE--}:</strong></td> + <strong>{--ADMIN_BONUS_TURBO_BONUS_TITLE--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -171,9 +185,9 @@ <tr> <td align="right" height="20">{--ADMIN_BONUS_TURBO_BONUS--}:</td> <td class="seperator" width="5"> </td> - <td align="center"><input type="text" name="turbo_bonus" - class="admin_normal" size="10" maxlength="20" - value="{!__TURBO_VALUE!}"> <span class="admin_note">({?POINTS?})</span> + <td align="center"> + <input type="text" name="turbo_bonus" class="admin_normal" size="10" maxlength="20" value="$content[turbo]" /> + <div class="admin_note">({?POINTS?})</div> </td> </tr> <tr> @@ -181,28 +195,27 @@ </tr> <tr> <td align="right" height="20" valign="top"> - {--ADMIN_BONUS_TURBO_RATES--}:<br /> - <br /> - <div align="left"> - <ol> - <LH> - <strong>{--ADMIN_BONUS_TURBO_RATES_NOTE1--}:</strong> - </LH> - <li>{--ADMIN_BONUS_TURBO_RATES_NOTE2--}</li> - <li>{--ADMIN_BONUS_TURBO_RATES_NOTE3--}</li> - <li>{--ADMIN_BONUS_TURBO_RATES_NOTE4--}</li> - </ol> - </div> + {--ADMIN_BONUS_TURBO_RATES--}:<br /> + <br /> + <div align="left"> + <ol> + <li><strong>{--ADMIN_BONUS_TURBO_RATES_NOTE1--}:</strong></li> + <li>{--ADMIN_BONUS_TURBO_RATES_NOTE2--}</li> + <li>{--ADMIN_BONUS_TURBO_RATES_NOTE3--}</li> + <li>{--ADMIN_BONUS_TURBO_RATES_NOTE4--}</li> + </ol> + </div> </td> <td class="seperator" width="5"> </td> - <td align="center" valign="top">{!__TRATES_LIST!}</td> + <td align="center" valign="top">$content[trates_list]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> </tr> <tr> <td colspan="3" class="admin_title bottom2" align="center" height="30"> - <strong>{--ADMIN_BONUS_TURBO_TIMEOUT_TITLE--}:</strong></td> + <strong>{--ADMIN_BONUS_TURBO_TIMEOUT_TITLE--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -210,7 +223,7 @@ <tr> <td align="right" height="20">{--ADMIN_CONFIG_LOGIN_TIMEOUT--}:</td> <td class="seperator" width="5"> </td> - <td align="center">{!__LOGIN_TIMEOUT_SELECTION!}</td> + <td align="center">$content[login_timeout_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -218,14 +231,15 @@ <tr> <td align="right" height="20">{--ADMIN_CONFIG_BONUS_TIMEOUT--}:</td> <td class="seperator" width="5"> </td> - <td align="center">{!__BONUS_TIMEOUT_SELECTION!}</td> + <td align="center">$content[bonus_timeout_selection]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> </tr> <tr> <td colspan="3" class="admin_title bottom2" align="center" height="30"> - <strong>{--ADMIN_BONUS_TURBO_MISC_TITLE--}:</strong></td> + <strong>{--ADMIN_BONUS_TURBO_MISC_TITLE--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -233,9 +247,9 @@ <tr> <td align="right" height="20">{--ADMIN_BONUS_TURBO_RANKS--}:</td> <td class="seperator" width="5"> </td> - <td align="center"><input type="text" name="bonus_ranks" - class="admin_normal" size="3" maxlength="5" - value="{!__TRANKS_VALUE!}"></td> + <td align="center"> + <input type="text" name="bonus_ranks" class="admin_normal" size="3" maxlength="5" value="{?bonus_ranks?}" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -243,9 +257,9 @@ <tr> <td align="right" height="20">{--ADMIN_BONUS_TURBO_LINES--}:</td> <td class="seperator" width="5"> </td> - <td align="center"><input type="text" name="bonus_lines" - class="admin_normal" size="3" maxlength="5" - value="{!__TLINES_VALUE!}"></td> + <td align="center"> + <input type="text" name="bonus_lines" class="admin_normal" size="3" maxlength="5" value="{?bonus_lines?}" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -254,7 +268,7 @@ <td align="right" height="20">{--ADMIN_BONUS_USERID--}:</td> <td class="seperator" width="5"> </td> <td align="center"> - {!__MEMBER_SELECTION!} + $content[member_selection] </td> </tr> <tr> @@ -262,61 +276,68 @@ </tr> <tr> <td colspan="3" class="admin_title bottom2" align="center" height="30"> - <strong>{--ADMIN_BONUS_RALLYE_NOTIFTICATIONS--}:</strong></td> + <strong>{--ADMIN_BONUS_RALLYE_NOTIFTICATIONS--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_EN_NOTIFY--}</td> + {--ADMIN_BONUS_RALLYE_EN_NOTIFY--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_en_notify" class="admin_normal" value="Y"{!__BONUS_EN_NOTIFY_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_en_notify" class="admin_normal" - value="N"{!__BONUS_EN_NOTIFY_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_en_notify" class="admin_normal" value="Y"$content[en_notify_y] /> {--YES--}<br /> + <input type="radio" name="bonus_en_notify" class="admin_normal" value="N"$content[en_notify_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_DI_NOTIFY--}</td> + {--ADMIN_BONUS_RALLYE_DI_NOTIFY--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_di_notify" class="admin_normal" value="Y"{!__BONUS_DI_NOTIFY_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_di_notify" class="admin_normal" - value="N"{!__BONUS_DI_NOTIFY_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_di_notify" class="admin_normal" value="Y"$content[di_notify_y] /> {--YES--}<br /> + <input type="radio" name="bonus_di_notify" class="admin_normal" value="N"$content[di_notify_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td width="300" align="right" height="20"> - {--ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY--}</td> + {--ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY--} + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="radio" - name="bonus_new_mem_notify" class="admin_normal" value="Y"{!__BONUS_NEW_MEMBER_NOTIFY_Y!} /> {--YES--}<br /> - <input type="radio" name="bonus_new_mem_notify" class="admin_normal" - value="N"{!__BONUS_NEW_MEMBER_NOTIFY_N!} /> {--NO--}</td> + <td width="195" align="center"> + <input type="radio" name="bonus_new_mem_notify" class="admin_normal" value="Y"$content[new_member_notify_y] /> {--YES--}<br /> + <input type="radio" name="bonus_new_mem_notify" class="admin_normal" value="N"$content[new_member_notify_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_RALLYE_NOTIFY_POINTS--}:</td> + {--ADMIN_BONUS_RALLYE_NOTIFY_POINTS--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" align="center"><input type="text" - name="bonus_notify_points" class="admin_normal" size="8" - maxlength="20" value="{!__NOTIFY_VALUE!}"> <span class="admin_note">({?POINTS?})</span></td> + <td width="195" align="center"> + <input type="text" name="bonus_notify_points" class="admin_normal" size="8" maxlength="20" value="$content[notify]" /> + <div class="admin_note">({?POINTS?})</div> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_BONUS_RALLYE_NOTIFY_WAIT--}:</td> + {--ADMIN_BONUS_RALLYE_NOTIFY_WAIT--}: + </td> <td class="seperator" width="5"> </td> <td width="195" align="center">$content[wait_selection]</td> </tr> @@ -330,4 +351,4 @@ </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_cache.tpl b/templates/de/html/admin/admin_config_cache.tpl index 33b0f559e7..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_cache.tpl +++ b/templates/de/html/admin/admin_config_cache.tpl @@ -1,137 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_cache" method="post"> -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> - <tr> - <td colspan="2" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_CONFIG_CACHE_SETTINGS--}</strong></td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_ADMINS--}</td> - <td width="150" style="padding-left: 10px"><input - type="radio" name="cache_admins" value="Y" class="admin_normal"{!__ADMINS_Y!} /> {--YES--} - <input type="radio" name="cache_admins" value="N" class="admin_normal"{!__ADMINS_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_ACLS--}</td> - <td width="150" style="padding-left: 10px"><input - type="radio" name="cache_acls" value="Y" class="admin_normal"{!__ACLS_Y!} /> {--YES--} - <input type="radio" name="cache_acls" value="N" class="admin_normal"{!__ACLS_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20">{--ADMIN_CACHE_EXTS--} - </td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_exts" value="Y" class="admin_normal"{!__EXTS_Y!} /> {--YES--} - <input type="radio" name="cache_exts" value="N" class="admin_normal"{!__EXTS_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_CONFIG--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_config" value="Y" class="admin_normal"{!__CONFIG_Y!} /> {--YES--} - <input type="radio" name="cache_config" value="N" class="admin_normal"{!__CONFIG_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_MODREG--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_modreg" value="Y" class="admin_normal"{!__MODREG_Y!} /> {--YES--} - <input type="radio" name="cache_modreg" value="N" class="admin_normal"{!__MODREG_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_REFDEPTH--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_refdepth" value="Y" class="admin_normal"{!__REFDEPTH_Y!} /> {--YES--} - <input type="radio" name="cache_refdepth" value="N" - class="admin_normal"{!__REFDEPTH_N!} /> {--NO--} </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_REFSYS--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_refsys" value="Y" class="admin_normal"{!__REFSYS_Y!} /> {--YES--} - <input type="radio" name="cache_refsys" value="N" class="admin_normal"{!__REFSYS_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_FILTER--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_filter" value="Y" class="admin_normal"{!__FILTER_Y!} /> {--YES--} - <input type="radio" name="cache_filter" value="N" class="admin_normal"{!__FILTER_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_THEMES--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_themes" value="Y" class="admin_normal"{!__THEMES_Y!} /> {--YES--} - <input type="radio" name="cache_themes" value="N" class="admin_normal"{!__THEMES_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_ADMIN_MENU--}</td> - <td width="150" style="padding-left: 10px"><input type="radio" - name="cache_admin_menu" value="Y" class="admin_normal"{!__ADMIN_MENU_Y!} /> {--YES--} - <input type="radio" name="cache_admin_menu" value="N" class="admin_normal"{!__ADMIN_MENU_N!} /> {--NO--} - </td> - </tr> - <tr> - <td colspan="2" class="seperator" height="10"> </td> - </tr> - <tr> - <td align="right" width="350" height="20"> - {--ADMIN_CACHE_PATH--}:</td> - <td width="150" style="padding-left: 10px"><input type="text" - name="cache_path" class="admin_normal" value="{!__PATH!}" size="10" - maxlength="255"></td> - </tr> - <tr> - <td colspan="2" class="bottom2 seperator" height="10"> </td> - </tr> - <tr> - <td colspan="2" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> - </tr> -</table> -</form> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_config_cats.tpl b/templates/de/html/admin/admin_config_cats.tpl index 7829805b6f..65cbed9c70 100644 --- a/templates/de/html/admin/admin_config_cats.tpl +++ b/templates/de/html/admin/admin_config_cats.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_cats" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_cats" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td align="center" colspan="4" class="admin_header bottom2" @@ -11,7 +11,7 @@ <td class="admin_title bottom2 right2" width="120" align="center"><strong>{--IS_VISIBLE--}</strong></td> <td class="admin_title bottom2" width="120" align="center"><strong>{--SORTING_KEY--}</strong></td> </tr> - {!__CAT_ROWS!} + $content <tr> <td class="admin_footer" colspan="4"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_cats_row.tpl b/templates/de/html/admin/admin_config_cats_row.tpl index f5f477048a..b452df8a7c 100644 --- a/templates/de/html/admin/admin_config_cats_row.tpl +++ b/templates/de/html/admin/admin_config_cats_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" /> </td> <td class="bottom2 right2 switch_sw$content[sw]"> $content[cat] diff --git a/templates/de/html/admin/admin_config_doubler.tpl b/templates/de/html/admin/admin_config_doubler.tpl index 9dab39768f..0f6e978705 100644 --- a/templates/de/html/admin/admin_config_doubler.tpl +++ b/templates/de/html/admin/admin_config_doubler.tpl @@ -1,85 +1,93 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_doubler" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_doubler" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EDIT_DOUBLER_SETTINGS--}</strong></td> + <strong>{--ADMIN_EDIT_DOUBLER_SETTINGS--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_CHARGE--}:</td> + {--ADMIN_DOUBLER_CHARGE--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_charge" class="admin_normal" size="5" maxlength="10" - value="{!__DOUBLER_CHARGE!}"> (%)</td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_charge" class="admin_normal" size="5" maxlength="10" value="$content[charge]" /> (%) + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_REFERRAL--}:</td> + {--ADMIN_DOUBLER_REFERRAL--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_ref" class="admin_normal" size="5" maxlength="10" - value="{!__DOUBLER_REFERRAL!}"> (%)</td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_ref" class="admin_normal" size="5" maxlength="10" value="$content[referal]" /> (%) + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_MINIMUM--}:</td> + {--ADMIN_DOUBLER_MINIMUM--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_min" class="admin_normal" size="9" maxlength="20" - value="{!__DOUBLER_MINIMUM!}"> ({?POINTS?})</td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_min" class="admin_normal" size="9" maxlength="20" value="$content[minmum]" /> ({?POINTS?}) + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_MAXIMUM--}:</td> + {--ADMIN_DOUBLER_MAXIMUM--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_max" class="admin_normal" size="9" maxlength="20" - value="{!__DOUBLER_MAXIMUM!}"> ({?POINTS?})</td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_max" class="admin_normal" size="9" maxlength="20" value="$content[maximum]" /> ({?POINTS?}) + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_LEFT--}:</td> + {--ADMIN_DOUBLER_LEFT--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_left" class="admin_normal" size="9" maxlength="20" - value="{!__DOUBLER_LEFT!}"> ({?POINTS?})</td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_left" class="admin_normal" size="9" maxlength="20" value="$content[left]"> ({?POINTS?}) + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_GROUP_SENT--}:</td> + {--ADMIN_DOUBLER_GROUP_SENT--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_group_sent" class="admin_normal" size="2" maxlength="4" - value="{!__DOUBLER_GROUP_SENT!}"></td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_group_sent" class="admin_normal" size="2" maxlength="4" value="{?doubler_group_sent?}" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="300" height="20"> - {--ADMIN_DOUBLER_MAX_SENT--}:</td> + {--ADMIN_DOUBLER_MAX_SENT--}: + </td> <td class="seperator" width="5"> </td> - <td width="195" style="padding-left: 5px"><input type="text" - name="doubler_max_sent" class="admin_normal" size="2" maxlength="4" - value="{!__DOUBLER_MAX_SENT!}"></td> + <td width="195" style="padding-left: 5px"> + <input type="text" name="doubler_max_sent" class="admin_normal" size="2" maxlength="4" value="{?doubler_max_sent?}" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -87,11 +95,10 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_SENT_ALL--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><input type="radio" - name="doubler_sent_all" class="admin_normal" value="Y"{!__DOUBLER_SENT_ALL_Y!} /> {--YES--}<br /> - <input type="radio" name="doubler_sent_all" class="admin_normal" - - value="N"{!__DOUBLER_SENT_ALL_N!} /> {--NO--}</td> + <td style="padding-left: 5px"> + <input type="radio" name="doubler_sent_all" class="admin_normal" value="Y"$content[sent_all_y] /> {--YES--}<br /> + <input type="radio" name="doubler_sent_all" class="admin_normal" value="N"$content[sent_all_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -99,10 +106,10 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_JACKPOT--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><input type="radio" - name="doubler_jackpot" class="admin_normal" value="Y"{!__DOUBLER_JACKPOT_Y!} /> {--YES--}<br /> - <input type="radio" name="doubler_jackpot" class="admin_normal" - value="N"{!__DOUBLER_JACKPOT_N!} /> {--NO--}</td> + <td style="padding-left: 5px"> + <input type="radio" name="doubler_jackpot" class="admin_normal" value="Y"$content[jackpot_y] /> {--YES--}<br /> + <input type="radio" name="doubler_jackpot" class="admin_normal" value="N"$content[jackpot_n] /> {--NO--} + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -110,9 +117,9 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_OWN--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><input type="radio" - name="doubler_own" class="admin_normal" value="Y"{!__DOUBLER_OWN_Y!} /> {--YES--}<br /> - <input type="radio" name="doubler_own" class="admin_normal" value="N"{!__DOUBLER_OWN_N!} /> {--NO--} + <td style="padding-left: 5px"> + <input type="radio" name="doubler_own" class="admin_normal" value="Y"$content[own_y] /> {--YES--}<br /> + <input type="radio" name="doubler_own" class="admin_normal" value="N"$content[own_n] /> {--NO--} </td> </tr> <tr> @@ -121,7 +128,8 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_TIMEOUT--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px" align="left">{!__DOUBLER_TIMEOUT!} + <td style="padding-left: 5px" align="left"> + $content[timeout_selection] </td> </tr> <tr> @@ -131,7 +139,7 @@ <td align="right" height="20">{--ADMIN_DOUBLER_USERID--}:</td> <td class="seperator" width="5"> </td> <td style="padding-left: 5px"> - {!__MEMBER_SELECTION!} + $content[member_selection] </td> </tr> <tr> @@ -139,24 +147,26 @@ </tr> <tr> <td align="center" height="30" colspan="3" class="admin_title bottom2"> - <strong>{--ADMIN_DOUBLER_SEND_MODE--}:</strong></td> + <strong>{--ADMIN_DOUBLER_SEND_MODE--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="center" height="20" valign="top"> - {--ADMIN_DOUBLER_SEND_DIRECT--}</td> + {--ADMIN_DOUBLER_SEND_DIRECT--} + </td> <td class="seperator" width="5"> </td> <td align="center" valign="top">{--ADMIN_DOUBLER_SEND_RESET--}</td> </tr> <tr> - <td align="center" height="20"><input type="radio" - name="doubler_send_mode" class="admin_normal" value="DIRECT"{!__DOUBLER_SEND_DIRECT!}><br /> + <td align="center" height="20"> + <input type="radio" name="doubler_send_mode" class="admin_normal" value="DIRECT"$content[send_mode_direct] /> </td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><input type="radio" - name="doubler_send_mode" class="admin_normal" value="RESET"{!__DOUBLER_SEND_RESET!}><br /> + <td style="padding-left: 5px"> + <input type="radio" name="doubler_send_mode" class="admin_normal" value="RESET"$content[send_mode_reset] /> </td> </tr> <tr> @@ -164,7 +174,8 @@ </tr> <tr> <td align="center" height="30" colspan="3" class="admin_title bottom2"> - <strong>{--ADMIN_DOUBLER_DISPLAY_SETTINGS--}:</strong></td> + <strong>{--ADMIN_DOUBLER_DISPLAY_SETTINGS--}:</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -172,10 +183,11 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_DISPLAY_NEW--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><select name="doubler_display_new" - size="1" class="admin_select"> - {!__DOUBLER_DISPLAY_NEW!} - </select></td> + <td style="padding-left: 5px"> + <select name="doubler_display_new" size="1" class="admin_select"> + $content[display_new] + </select> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -183,10 +195,11 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_DISPLAY_PAY--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><select name="doubler_display_pay" - size="1" class="admin_select"> - {!__DOUBLER_DISPLAY_PAY!} - </select></td> + <td style="padding-left: 5px"> + <select name="doubler_display_pay" size="1" class="admin_select"> + $content[display_pay] + </select> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -194,19 +207,20 @@ <tr> <td align="right" height="20">{--ADMIN_DOUBLER_DISPLAY_OLD--}:</td> <td class="seperator" width="5"> </td> - <td style="padding-left: 5px"><select name="doubler_display_old" - size="1" class="admin_select"> - {!__DOUBLER_DISPLAY_OLD!} - </select></td> + <td style="padding-left: 5px"> + <select name="doubler_display_old" size="1" class="admin_select"> + $content[display_old] + </select> + </td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_email.tpl b/templates/de/html/admin/admin_config_email.tpl index 92f3cd570e..f2fd699c01 100644 --- a/templates/de/html/admin/admin_config_email.tpl +++ b/templates/de/html/admin/admin_config_email.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_email" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_email" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> @@ -11,7 +11,7 @@ <td class="admin_title bottom2 right2" width="275" align="center"><strong>{--MAX_VALUE!}</strong></td> <td class="admin_title bottom2" width="275" align="center"><strong>{--MAX_COMMENT--}</strong></td> </tr> - {!__ROWS!} + $content[rows] <tr> <td align="center" colspan="3" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_email_del.tpl b/templates/de/html/admin/admin_config_email_del.tpl index a051836030..98ca746705 100644 --- a/templates/de/html/admin/admin_config_email_del.tpl +++ b/templates/de/html/admin/admin_config_email_del.tpl @@ -1,11 +1,11 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_email&do=del" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_email&do=del" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" height="30" class="bottom"><strong>{--DELETE_MRECEIVE--}:</strong></td> </tr> - {!__ROWS!} + $content[rows] <tr> <td align="center"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input type="submit" diff --git a/templates/de/html/admin/admin_config_email_edit.tpl b/templates/de/html/admin/admin_config_email_edit.tpl index f8918da857..0c3232b997 100644 --- a/templates/de/html/admin/admin_config_email_edit.tpl +++ b/templates/de/html/admin/admin_config_email_edit.tpl @@ -1,10 +1,10 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_email&do=edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_email&do=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" colspan="2" height="30" class="bottom"><strong>{--EDIT_MRECEIVE--}:</strong></td> </tr> - {!__ROWS!} + $content[rows] <tr> <td align="center" colspan="2"> <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_config_email_row.tpl b/templates/de/html/admin/admin_config_email_row.tpl index 88b03796c3..921be1d1a0 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 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" /> </td> <td class="bottom2 right2 switch_sw$content[sw]"> $content[value] diff --git a/templates/de/html/admin/admin_config_extensions.tpl b/templates/de/html/admin/admin_config_extensions.tpl index c26debf4a2..48a7dbe3df 100644 --- a/templates/de/html/admin/admin_config_extensions.tpl +++ b/templates/de/html/admin/admin_config_extensions.tpl @@ -1,22 +1,24 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_extensions" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_extensions" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_CONFIG_EXTENSIONS_SETTINGS--}</strong></td> + <strong>{--ADMIN_CONFIG_EXTENSIONS_SETTINGS--}</strong> + </td> </tr> <tr> <td class="bottom2" align="right" width="350" height="20"> - {--ADMIN_VERBOSE_SQL--}:</td> - <td class="bottom2" width="150" align="right"><input type="radio" - name="verbose_sql" value="Y" class="admin_normal"{!__VERBOSE_Y!} /> {--YES--} - <input type="radio" name="verbose_sql" value="N" class="admin_normal"{!__VERBOSE_N!} /> {--NO--} + {--ADMIN_VERBOSE_SQL--}: + </td> + <td class="bottom2" width="150" align="right"> + <input type="radio" name="verbose_sql" value="Y" class="admin_normal"$content[verbose_y] /> {--YES--} + <input type="radio" name="verbose_sql" value="N" class="admin_normal"$content[verbose_n] /> {--NO--} </td> </tr> <tr> - <td colspan="2" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="2" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_holiday.tpl b/templates/de/html/admin/admin_config_holiday.tpl index 66eddd9aef..ed10333bfb 100644 --- a/templates/de/html/admin/admin_config_holiday.tpl +++ b/templates/de/html/admin/admin_config_holiday.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_holiday" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_holiday" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -11,8 +11,10 @@ <tr> <td width="300" style="padding-left: 5px">{--HOLIDAY_ADMIN_MAX_HOLIDAY--}:</td> <td class="seperator" width="10"> </td> - <td width="270"><input type="text" name="holiday_max" - class="admin_normal" value="{!__MAX_VALUE!}" size="4" maxlength="6"> <div class="tiny">({--DAYS--})</div></td> + <td width="270"> + <input type="text" name="holiday_max" class="admin_normal" value="{?holiday_max?}" size="4" maxlength="6" /> + <div class="tiny">({--DAYS--})</div> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -20,7 +22,7 @@ <tr> <td width="300" style="padding-left: 5px">{--HOLIDAY_ADMIN_LOCKED--}:</td> <td class="seperator" width="10"> </td> - <td width="270">{!__LOCKED!}</td> + <td width="270">$content[locked]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -28,12 +30,12 @@ <tr> <td width="300" style="padding-left: 5px">{--HOLIDAY_ADMIN_MODE--}:</td> <td class="seperator" width="10"> </td> - <td width="270"><input type="radio" name="holiday_mode" - class="admin_normal" value="RESET"{!__RESET_DEFAULT!}"> - {--HOLIDAY_ADMIN_MODE_RESET--}<br /> - <input type="radio" name="holiday_mode" class="admin_normal" - value="DIRECT"{!__DIRECT_DEFAULT!}"> - {--HOLIDAY_ADMIN_MODE_DIRECT--}</td> + <td width="270"> + <input type="radio" name="holiday_mode" class="admin_normal" value="RESET"$content[holidy_mode_reset] /> + {--HOLIDAY_ADMIN_MODE_RESET--}<br /> + <input type="radio" name="holiday_mode" class="admin_normal" value="DIRECT"$content[holidy_mode_direct] /> + {--HOLIDAY_ADMIN_MODE_DIRECT--} + </td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> diff --git a/templates/de/html/admin/admin_config_home.tpl b/templates/de/html/admin/admin_config_home.tpl index f8e0bf3fed..2bf7bf6d3d 100644 --- a/templates/de/html/admin/admin_config_home.tpl +++ b/templates/de/html/admin/admin_config_home.tpl @@ -9,7 +9,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--MENU_WHAT--}</strong></td> <td align="center" class="admin_title bottom2"><strong>{--HOME_ACTION--}</strong></td> </tr> - {!__HOME_ROWS!} + $content <tr> <td colspan="3" class="admin_footer"> <div class="admin_note">{--HOME_BOTTOM_NOTE--}</div> diff --git a/templates/de/html/admin/admin_config_home_row.tpl b/templates/de/html/admin/admin_config_home_row.tpl index a48ef35053..5e6f82dee3 100644 --- a/templates/de/html/admin/admin_config_home_row.tpl +++ b/templates/de/html/admin/admin_config_home_row.tpl @@ -1,6 +1,6 @@ <tr> - <td class="switch_sw$content[sw] bottom right"> $content[id]</td> - <td class="switch_sw$content[sw] bottom right"> $content[title]</td> + <td class="switch_sw$content[sw] bottom right">$content[id]</td> + <td class="switch_sw$content[sw] bottom right">$content[title]</td> <td class="switch_sw$content[sw] bottom" align="center"> $content[link] </td> diff --git a/templates/de/html/admin/admin_config_home_settings.tpl b/templates/de/html/admin/admin_config_home_settings.tpl index 646b62989b..744a94cf61 100644 --- a/templates/de/html/admin/admin_config_home_settings.tpl +++ b/templates/de/html/admin/admin_config_home_settings.tpl @@ -1,31 +1,34 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_home&sub=settings" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_home&sub=settings" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="510"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EDIT_HOME_SETTINGS--}</strong></td> + <strong>{--ADMIN_EDIT_HOME_SETTINGS--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> <td align="right" width="320" height="20"> - {--ADMIN_CONFIG_INDEX_DELAY--}:</td> + {--ADMIN_CONFIG_INDEX_DELAY--}: + </td> <td class="seperator" width="5"> </td> - <td width="185" align="center"><select name="index_delay" - size="1" class="admin_select"> - <option value="-1"$content[-1]>{--ADMIN_INDEX_NO_DELAY--}</option> - <option value="0"$content[0]>{--ADMIN_INDEX_MANUAL_FORWARD--}</option> - <!-- Fuehren Sie dies einfach so weiter, wenn Sie mehr Werte brauchen //--> - <option value="1"$content[1]>1 {--_SECONDS--}</option> - <option value="2"$content[2]>2 {--_SECONDS--}</option> - <option value="3"$content[3]>3 {--_SECONDS--}</option> - <option value="4"$content[4]>4 {--_SECONDS--}</option> - <option value="5"$content[5]>5 {--_SECONDS--}</option> - <option value="10"$content[10]>10 {--_SECONDS--}</option> - <option value="15"$content[15]>15 {--_SECONDS--}</option> - <option value="30"$content[30]>30 {--_SECONDS--}</option> - <!-- Laenger sollte es aber nun nicht dauern! //--> - </select></td> + <td width="185" align="center"> + <select name="index_delay" size="1" class="admin_select"> + <option value="-1"$content[-1]>{--ADMIN_INDEX_NO_DELAY--}</option> + <option value="0"$content[0]>{--ADMIN_INDEX_MANUAL_FORWARD--}</option> + <!-- Fuehren Sie dies einfach so weiter, wenn Sie mehr Werte brauchen //--> + <option value="1"$content[1]>1 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="2"$content[2]>2 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="3"$content[3]>3 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="4"$content[4]>4 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="5"$content[5]>5 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="10"$content[10]>10 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="15"$content[15]>15 {--_SECONDS--} (JavaScript+HTML)</option> + <option value="30"$content[30]>30 {--_SECONDS--} (JavaScript+HTML)</option> + <!-- Laenger sollte es aber nun nicht dauern! //--> + </select> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -33,16 +36,16 @@ <tr> <td align="right" height="20">{--ADMIN_CONFIG_INDEX_COOKIE--}</td> <td class="seperator" width="5"> </td> - <td align="center">{!__INDEX_COOKIE_SELECTION!}</td> + <td align="center">$content[cookie_selection]</td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> 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 435556c7eb..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_home_settings_pro.tpl +++ b/templates/de/html/admin/admin_config_home_settings_pro.tpl @@ -1,44 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_home&sub=settings" method="post"> -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="510"> - <tr> - <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EDIT_HOME_SETTINGS--}</strong></td> - </tr> - <tr> - <td colspan="3" class="seperator" height="5"> </td> - </tr> - <tr> - <td align="right" width="320" height="20"> - {--ADMIN_CONFIG_INDEX_DELAY--}:</td> - <td class="seperator" width="5"> </td> - <td width="185" align="center"><select name="index_delay" - size="1" class="admin_select"> - <option value="-1"$content[-1]>{--ADMIN_INDEX_MANUAL_FORWARD--}</option> - <option value="0"$content[0]>{--ADMIN_INDEX_NO_DELAY--}</option> - <option value="1"$content[1]>1 {--_SECONDS--}</option> - <option value="2"$content[2]>2 {--_SECONDS--}</option> - <option value="3"$content[3]>3 {--_SECONDS--}</option> - <option value="4"$content[4]>4 {--_SECONDS--}</option> - <option value="5"$content[5]>5 {--_SECONDS--}</option> - <option value="10"$content[10]>10 {--_SECONDS--}</option> - </select></td> - </tr> - <tr> - <td colspan="3" class="seperator" height="5"> </td> - </tr> - <tr> - <td align="right" height="20">{--ADMIN_CONFIG_INDEX_COOKIE--}</td> - <td class="seperator" width="5"> </td> - <td align="center">{!__INDEX_COOKIE_SELECTION!}</td> - </tr> - <tr> - <td colspan="3" class="bottom2 seperator" height="5"> </td> - </tr> - <tr> - <td colspan="3" class="admin_footer"> - <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" class="admin_submit" name="ok" value="{--SAVE_SETTINGS--}" /> - </td> - </tr> -</table> -</form> \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_config_mediadata.tpl b/templates/de/html/admin/admin_config_mediadata.tpl index 859a15e31b..0d30c410a1 100644 --- a/templates/de/html/admin/admin_config_mediadata.tpl +++ b/templates/de/html/admin/admin_config_mediadata.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_mediadata" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_mediadata" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" height="30" width="10"> </td> @@ -13,7 +13,7 @@ <td width="10" class="seperator"> </td> <td align="right" width="275">{--ADMIN_MEDIADATA_MT_START--}:</td> <td width="10" class="seperator"> </td> - <td align="center" width="275">{!__MT_START!}</td> + <td align="center" width="275">{?__MT_START?}</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -24,7 +24,7 @@ <td align="right" width="275">{--ADMIN_MEDIADATA_MT_STAGE--}:</td> <td width="10" class="seperator"> </td> <td align="center" width="275"><input type="text" name="mt_stage" - class="admin_normal" value="{!__MT_STAGE!}" size="6" maxlength="20"> + class="admin_normal" value="{?__MT_STAGE?}" size="6" maxlength="20" /> </td> <td width="10" class="seperator"> </td> </tr> diff --git a/templates/de/html/admin/admin_config_menu.tpl b/templates/de/html/admin/admin_config_menu.tpl new file mode 100644 index 0000000000..cc4688edd8 --- /dev/null +++ b/templates/de/html/admin/admin_config_menu.tpl @@ -0,0 +1,36 @@ +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_menu" method="post"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> + <tr> + <td colspan="2" align="center" class="admin_title bottom2" height="30"> + <strong>{--ADMIN_CONFIG_MENU_TITLE--}</strong> + </td> + </tr> + <tr><td colspan="2" class="seperator" height="5"> </td></tr> + <tr> + <td width="80%" align="right" style="padding-right:10px"> + {--ADMIN_CONFIG_GUEST_MENU_ADVERT_ENABLED--} + </td> + <td width="20%"> + <input type="radio" name="guest_menu_advert_enabled" value="Y"$content[guest_menu_advert_enabled_y] /> {--YES--}<br /> + <input type="radio" name="guest_menu_advert_enabled" value="N"$content[guest_menu_advert_enabled_n] /> {--NO--} + </td> + </tr> + <tr><td colspan="2" class="seperator" height="5"> </td></tr> + <tr> + <td width="80%" align="right" style="padding-right:10px"> + {--ADMIN_CONFIG_MEMBER_MENU_ADVERT_ENABLED--} + </td> + <td width="20%"> + <input type="radio" name="member_menu_advert_enabled" value="Y"$content[member_menu_advert_enabled_y] /> {--YES--}<br /> + <input type="radio" name="member_menu_advert_enabled" value="N"$content[member_menu_advert_enabled_n] /> {--NO--} + </td> + </tr> + <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> + <tr> + <td colspan="2" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--SAVE_SETTINGS--}" /> + </td> + </tr> +</table> +</form> diff --git a/templates/de/html/admin/admin_config_newsletter.tpl b/templates/de/html/admin/admin_config_newsletter.tpl index 71e2038259..61bd617cdd 100644 --- a/templates/de/html/admin/admin_config_newsletter.tpl +++ b/templates/de/html/admin/admin_config_newsletter.tpl @@ -1,32 +1,22 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_newsletter" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_newsletter" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" width="10" height="30"> </td> - <td class="admin_title bottom2" colspan="3" align="center"><strong>{--ADMIN_NEWSLETTER_SETTINGS--}</strong> + <td class="admin_title bottom2" colspan="3" align="center"> + <strong>{--ADMIN_NEWSLETTER_SETTINGS--}</strong> </td> <td class="admin_title bottom2 seperator" width="10"> </td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> </tr> - <tr> - <td width="10" class="seperator"> </td> - <td align="right" width="280">{--ADMIN_NL_CHARGE--}:</td> - <td width="10" class="seperator"> </td> - <td><input type="text" name="nl_charge" class="admin_normal" - size="3" maxlength="3" value="{!__CHARGE_VALUE!}"></td> - <td width="10" class="seperator"> </td> - </tr> - <tr> - <td colspan="5" height="7" class="seperator bottom2"> </td> - </tr> <tr> <td class="admin_footer seperator" width="10"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td class="admin_footer" colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td class="admin_footer seperator" width="10"> </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_nickname.tpl b/templates/de/html/admin/admin_config_nickname.tpl index 3d4ea04311..4c94f12ad1 100644 --- a/templates/de/html/admin/admin_config_nickname.tpl +++ b/templates/de/html/admin/admin_config_nickname.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_nickname" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_nickname" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index df155ac024..c6c12ea58d 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_order" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_order" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" height="30" width="10"> </td> @@ -30,12 +30,12 @@ <tr> <td width="10" class="seperator"> </td> - <td align="center" width="275">{--ADMIN_ORDER_MAX--}: <input - type="radio" name="order_max_full" class="admin_normal" value="MAX"{!__MAX_DEFAULT!}> + <td align="center" width="275"> + {--ADMIN_ORDER_MAX--}: <input type="radio" name="order_max_full" class="admin_normal" value="MAX"$content[order_max_full_max] /> </td> <td width="10" class="seperator"> </td> - <td align="center" width="275">{--ADMIN_ORDER_ORDER--}: <input - type="radio" name="order_max_full" class="admin_normal" value="ORDER"{!__ORDER_DEFAULT!}> + <td align="center" width="275"> + {--ADMIN_ORDER_ORDER--}: <input type="radio" name="order_max_full" class="admin_normal" value="ORDER"$content[order_max_full_order] /> </td> <td width="10" class="seperator"> </td> </tr> @@ -50,12 +50,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340"> - {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:</td> + <td align="right" width="340">{--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:</td> <td width="10" class="seperator"> </td> - <td width="160"><input type="text" name="unconfirmed" - class="admin_normal" size="10" maxlength="10" - value="{--_CFG_UNCONFIRMED--}"></td> + <td width="160"> + <input type="text" name="unconfirmed" class="admin_normal" size="10" maxlength="10" value="{?unconfirmed?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -67,8 +66,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_MAX_TEXT_LENGTH--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="max_tlength" class="admin_normal" - size="10" maxlength="100" value="{--_CFG_MAX_TLENGTH--}"></td> + <td> + <input type="text" name="max_tlength" class="admin_normal" size="10" maxlength="100" value="{?max_tlength?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -80,10 +80,12 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="test_text" value="N"{--_CFG_TEST_TEXT_N--}> - {--NO--}: <input type="radio" name="test_text" value="Y"{--_CFG_TEST_TEXT_Y--}> - </span></td> + <td> + <span class="nobr"> + {--YES--}: <input type="radio" name="test_text" value="N"$content[test_text_y] /> + {--NO--}: <input type="radio" name="test_text" value="Y"$content[test_text_n] /> + </span> + </td> <td width="10" class="seperator"> </td> </tr> @@ -95,10 +97,12 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="test_subj" value="N"{--_CFG_TEST_SUBJ_N--}> - {--NO--}: <input type="radio" name="test_subj" value="Y"{--_CFG_TEST_SUBJ_Y--}> - </span></td> + <td> + <span class="nobr"> + {--YES--}: <input type="radio" name="test_subj" value="Y"$content[test_subj_y] /> + {--NO--}: <input type="radio" name="test_subj" value="N"$content[test_subj_n] /> + </span> + </td> <td width="10" class="seperator"> </td> </tr> @@ -110,10 +114,12 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_URL_BLACKLIST--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="url_blacklist" value="Y"{--_CFG_URL_BLIST_Y--}> - {--NO--}: <input type="radio" name="url_blacklist" value="N"{--_CFG_URL_BLIST_N--}> - </span></td> + <td> + <span class="nobr"> + {--YES--}: <input type="radio" name="url_blacklist" value="Y"$content[url_blacklist_y] /> + {--NO--}: <input type="radio" name="url_blacklist" value="N"$content[url_blacklist_n] /> + </span> + </td> <td width="10" class="seperator"> </td> </tr> @@ -127,9 +133,9 @@ <td width="10" class="seperator"> </td> <td align="center" width="275"> <select name="repay_deleted_mails" class="admin_select" size="1"> - <option value="REPAY"{--_CFG_REPAY_POINTS_REPAY--}">{--ADMIN_CFG_REPAY_POINTS_REPAY--}</option> - <option value="JACKPOT"{--_CFG_REPAY_POINTS_JACKPOT--}">{--ADMIN_CFG_REPAY_POINTS_JACKPOT--}</option> - <option value="SHRED"{--_CFG_REPAY_POINTS_SHRED--}">{--ADMIN_CFG_REPAY_POINTS_SHRED--}</option> + <option value="REPAY"$content[repay_deleted_mails_repay]>{--ADMIN_CFG_REPAY_POINTS_REPAY--}</option> + <option value="JACKPOT"$content[repay_deleted_mails_jackpot]>{--ADMIN_CFG_REPAY_POINTS_JACKPOT--}</option> + <option value="SHRED"$content[repay_deleted_mails_shred]>{--ADMIN_CFG_REPAY_POINTS_SHRED--}</option> </select> </td> <td width="10" class="seperator"> </td> @@ -140,7 +146,8 @@ </tr> <tr> <td colspan="5" height="30" class="admin_title bottom2" align="center"> - <strong>{--ADMIN_ORDER_SELECTION_SETTINGS--}:</strong></td> + <strong>{--ADMIN_ORDER_SELECTION_SETTINGS--}:</strong> + </td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> @@ -148,12 +155,14 @@ <tr> <td width="10" class="seperator"> </td> <td align="right" width="275"> - {--ADMIN_ORDER_SELECTION_COLUMN--}:</td> + {--ADMIN_ORDER_SELECTION_COLUMN--}: + </td> <td width="10" class="seperator"> </td> - <td align="center" width="275"><select name="order_select" - class="admin_select" size="1"> - {!__ORDER_SELECT!} - </select></td> + <td align="center" width="275"> + <select name="order_select" class="admin_select" size="1"> + $content[order_selection] + </select> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -165,8 +174,8 @@ <td width="10" class="seperator"> </td> <td align="center" width="275"> <select name="order_mode" class="admin_select" size="1"> - <option value="ASC"{!__ASC_DEFAULT!}">{--SORT_ASCENDING--}</option> - <option value="DESC"{!__DESC_DEFAULT!}">{--SORT_DESCENDING--}</option> + <option value="ASC"$content[order_mode_asc]">{--SORT_ASCENDING--}</option> + <option value="DESC"$content[order_mode_desc]">{--SORT_DESCENDING--}</option> </select> </td> <td width="10" class="seperator"> </td> @@ -176,7 +185,8 @@ </tr> <tr> <td colspan="5" height="30" class="admin_title bottom2" align="center"> - <strong>{--ADMIN_ORDER_MISC_SETTINGS--}:</strong></td> + <strong>{--ADMIN_ORDER_MISC_SETTINGS--}:</strong> + </td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> @@ -184,11 +194,12 @@ <tr> <td width="10" class="seperator"> </td> <td align="right" width="275"> - {--ADMIN_ORDER_MIN_RECEIVER_PER_ORDER--}:</td> + {--ADMIN_ORDER_MIN_RECEIVER_PER_ORDER--}: + </td> <td width="10" class="seperator"> </td> - <td align="center" width="275"><input type="input" - name="order_min" class="admin_normal" value="{!__MIN_VALUE!}" - size="5" maxlength="20"></td> + <td align="center" width="275"> + <input type="input" name="order_min" class="admin_normal" value="{?order_min?}" size="5" maxlength="20" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -196,10 +207,10 @@ </tr> <tr> <td width="10" class="admin_footer seperator"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td class="admin_footer" colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td width="10" class="admin_footer seperator"> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_config_order_form.tpl b/templates/de/html/admin/admin_config_order_form.tpl index 64b289026d..7b76963b91 100644 --- a/templates/de/html/admin/admin_config_order_form.tpl +++ b/templates/de/html/admin/admin_config_order_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_order" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_order" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" height="30" width="10"> </td> @@ -24,11 +24,11 @@ <tr> <td width="10" class="seperator"> </td> <td align="center" width="275">{--ADMIN_ORDER_MAX--}: <input - type="radio" name="order_max_full" class="admin_normal" value="MAX"{!__MAX_DEFAULT!} /> + type="radio" name="order_max_full" class="admin_normal" value="MAX"$content[order_max_full_max] /> </td> <td width="10" class="seperator"> </td> <td align="center" width="275">{--ADMIN_ORDER_ORDER--}: <input - type="radio" name="order_max_full" class="admin_normal" value="ORDER"{!__ORDER_DEFAULT!} /> + type="radio" name="order_max_full" class="admin_normal" value="ORDER"$content[order_max_full_order] /> </td> <td width="10" class="seperator"> </td> </tr> @@ -50,7 +50,7 @@ </td> <td width="10" class="seperator"> </td> <td align="center" width="275"> - <input type="input" name="order_min" class="admin_normal" value="{!__MIN_VALUE!}" size="5" maxlength="20" /> + <input type="input" name="order_min" class="admin_normal" value="{?order_min?}" size="5" maxlength="20" /> </td> <td width="10" class="seperator"> </td> </tr> diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index cbb42c6200..9d19efb8ed 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -1,11 +1,12 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_other" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_other" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="5" height="7" class="seperator admin_title"> </td> </tr> <tr> <td width="10" class="seperator admin_title"> </td> - <td colspan="3" align="center" class="admin_title"><strong>{--ADMIN_OTHER_SETTINGS--}</strong> + <td colspan="3" align="center" class="admin_title"> + <strong>{--ADMIN_OTHER_SETTINGS--}</strong> </td> <td width="10" class="seperator admin_title"> </td> </tr> @@ -19,10 +20,12 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right">{--ADMIN_OPTION_CODE_LENGTH--}:</td> + <td align="right" width="300">{--ADMIN_OPTION_CODE_LENGTH--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="code_length" class="admin_normal" - size="3" maxlength="5" value="{--_CFG_CODE_LENGTH--}"><div class="tiny">{--ADMIN_CODE_LENGTH_NOTE--}</div></td> + <td> + <input type="text" name="code_length" class="admin_normal" size="3" maxlength="5" value="{?code_length?}" /> + <div class="tiny">{--ADMIN_CODE_LENGTH_NOTE--}</div> + </td> <td width="10" class="seperator"> </td> </tr> @@ -32,12 +35,12 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340"> + <td align="right"> {--ADMIN_OPTION_ACTIVATE_EXCHANGE--}: </td> <td width="10" class="seperator"> </td> <td> - <input type="text" name="activate_xchange" class="admin_normal" size="10" maxlength="10" value="{--_CFG_ACT_SYSTEM--}" /> + <input type="text" name="activate_xchange" class="admin_normal" size="10" maxlength="10" value="{?activate_xchange?}" /> </td> <td width="10" class="seperator"> </td> </tr> @@ -48,12 +51,12 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340"> + <td align="right"> {--ADMIN_OPTION_MINIMUM_AGE--}: </td> <td width="10" class="seperator"> </td> <td> - <input type="text" name="min_age" class="admin_normal" size="3" maxlength="3" value="{--_CFG_MIN_AGE--}" /> + <input type="text" name="min_age" class="admin_normal" size="3" maxlength="3" value="{?min_age?}" /> </td> <td width="10" class="seperator"> </td> </tr> @@ -64,10 +67,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_POINTS_WORD--}:</td> + <td align="right">{--ADMIN_OPTION_POINTS_WORD--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points_word" class="admin_normal" - size="7" maxlength="255" value="{?POINTS?}"></td> + <td> + <input type="text" name="points_word" class="admin_normal" size="7" maxlength="255" value="{?POINTS?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -77,10 +81,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_MT_WORD--}:</td> + <td align="right">{--ADMIN_OPTION?mt_word?-}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="mt_word" class="admin_normal" - size="15" maxlength="255" value="{?MT_WORD?}"></td> + <td> + <input type="text" name="mt_word" class="admin_normal" size="15" maxlength="255" value="{?mt_word?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -90,10 +95,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_MT_WORD2--}:</td> + <td align="right">{--ADMIN_OPTION?mt_word?--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="mt_word2" class="admin_normal" - size="15" maxlength="255" value="{?MT_WORD2?}"></td> + <td> + <input type="text" name="mt_word2" class="admin_normal" size="15" maxlength="255" value="{?mt_word2?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -103,10 +109,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_MT_WORD3--}:</td> + <td align="right">{--ADMIN_OPTION?mt_word?--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="mt_word3" class="admin_normal" - size="15" maxlength="255" value="{?MT_WORD3?}"></td> + <td> + <input type="text" name="mt_word3" class="admin_normal" size="15" maxlength="255" value="{?mt_word3?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -116,16 +123,18 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_MAX_COMMA--}:</td> + <td align="right">{--ADMIN_OPTION_MAX_COMMA--}:</td> <td width="10" class="seperator"> </td> - <td><select name="max_comma" size="1" class="admin_select"> - <option value="0"{--_COMMA_DEF_0--}>0</option> - <option value="1"{--_COMMA_DEF_1--}>1</option> - <option value="2"{--_COMMA_DEF_2--}>2</option> - <option value="3"{--_COMMA_DEF_3--}>3</option> - <option value="4"{--_COMMA_DEF_4--}>4</option> - <option value="5"{--_COMMA_DEF_5--}>5</option> - </select></td> + <td> + <select name="max_comma" size="1" class="admin_select"> + <option value="0"$content[comma_def_0]>0</option> + <option value="1"$content[comma_def_1]>1</option> + <option value="2"$content[comma_def_2]>2</option> + <option value="3"$content[comma_def_3]>3</option> + <option value="4"$content[comma_def_4]>4</option> + <option value="5"$content[comma_def_5]>5</option> + </select> + </td> <td width="10" class="seperator"> </td> </tr> @@ -135,10 +144,11 @@ <tr> <td width="10" class="seperator"> </td> - <td align="right" width="340">{--ADMIN_OPTION_REJECT_URL--}:</td> + <td align="right">{--ADMIN_OPTION_REJECT_URL--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="reject_url" class="admin_normal" - size="15" maxlength="255" value="{--_CFG_REJECT_URL--}"></td> + <td> + <input type="text" name="reject_url" class="admin_normal" size="15" maxlength="255" value="{?reject_url?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -150,10 +160,11 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_CSS_PHP--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> <input type="radio" name="css_php" - value="DIRECT"{--_CFG_CSS_PHP_DIRECT--}> {--ADMIN_CSS_PHP_DIRECT--}<br /> - <input type="radio" name="css_php" value="FILE"{--_CFG_CSS_PHP_FILE--}> {--ADMIN_CSS_PHP_FILE--} - </span></td> + <td> + <input type="radio" name="css_php" value="DIRECT"$content[css_php_direct]/ > {--ADMIN_CSS_PHP_DIRECT--}<br /> + <input type="radio" name="css_php" value="FILE"$content[css_php_file] /> {--ADMIN_CSS_PHP_FILE--}<br /> + <input type="radio" name="css_php" value="INLINE"$content[css_php_inline] /> {--ADMIN_CSS_PHP_INLINE--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -165,10 +176,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_GUEST_MENU--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> <input type="radio" - name="guest_menu" value="Y"{--_CFG_GUEST_MENU_ACTIVE--}> {--ADMIN_GUEST_MENU_ACTIVE--}<br /> - <input type="radio" name="guest_menu" value="N"{--_CFG_GUEST_MENU_INACTIVE--}> {--ADMIN_GUEST_MENU_INACTIVE--} - </span></td> + <td> + <input type="radio" name="guest_menu" value="Y"$content[guest_menu_y] /> {--ADMIN_GUEST_MENU_ACTIVE--}<br /> + <input type="radio" name="guest_menu" value="N"$content[guest_menu_n] /> {--ADMIN_GUEST_MENU_INACTIVE--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -180,10 +191,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_MEMBER_MENU--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> <input type="radio" - name="member_menu" value="Y"{--_CFG_MEMBER_MENU_ACTIVE--}> {--ADMIN_MEMBER_MENU_ACTIVE--}<br /> - <input type="radio" name="member_menu" value="N"{--_CFG_MEMBER_MENU_INACTIVE--}> {--ADMIN_MEMBER_MENU_INACTIVE--} - </span></td> + <td> + <input type="radio" name="member_menu" value="Y"$content[member_menu_y] /> {--ADMIN_MEMBER_MENU_ACTIVE--}<br /> + <input type="radio" name="member_menu" value="N"$content[member_menu_n] /> {--ADMIN_MEMBER_MENU_INACTIVE--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -195,10 +206,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_YOURE_HERE--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> <input type="radio" - name="youre_here" value="Y"{--_CFG_YOURE_HERE_ACTIVE--}> {--ADMIN_YOURE_HERE_ACTIVE--}<br /> - <input type="radio" name="youre_here" value="N"{--_CFG_YOURE_HERE_INACTIVE--}> {--ADMIN_YOURE_HERE_INACTIVE--} - </span></td> + <td> + <input type="radio" name="youre_here" value="Y"$content[youre_here_y] /> {--ADMIN_YOURE_HERE_ACTIVE--}<br /> + <input type="radio" name="youre_here" value="N"$content[youre_here_n] /> {--ADMIN_YOURE_HERE_INACTIVE--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -210,10 +221,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_SHOW_TIMINGS--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> - <input type="radio" name="show_timings" value="Y"{--_CFG_SHOW_TIMINGS_Y--} /> {--YES--}<br /> - <input type="radio" name="show_timings" value="N"{--_CFG_SHOW_TIMINGS_N--} /> {--NO--} - </span></td> + <td> + <input type="radio" name="show_timings" value="Y"$content[show_timings_y] /> {--YES--}<br /> + <input type="radio" name="show_timings" value="N"$content[show_timings_n] /> {--NO--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -225,10 +236,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_SHOW_POINTS_UNCONFIRMED--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> - <input type="radio" name="show_points_unconfirmed" value="Y"{--_CFG_SHOW_POINTS_UNCONFIRMED_Y--} /> {--YES--}<br /> - <input type="radio" name="show_points_unconfirmed" value="N"{--_CFG_SHOW_POINTS_UNCONFIRMED_N--} /> {--NO--} - </span></td> + <td> + <input type="radio" name="show_points_unconfirmed" value="Y"$content[show_points_unconfirmed_y] /> {--YES--}<br /> + <input type="radio" name="show_points_unconfirmed" value="N"$content[show_points_unconfirmed_n] /> {--NO--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -240,10 +251,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_MAILID_REDIRECT--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> <input type="radio" - name="mailid_error_redirect" value="INDEX"{--_CFG_MAILID_REDIRECT_INDEX--}> {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}<br /> - <input type="radio" name="mailid_error_redirect" value="REJECT"{--_CFG_MAILID_REDIRECT_REJECT--}> {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--} - </span></td> + <td> + <input type="radio" name="mailid_error_redirect" value="INDEX"$content[mailid_error_redirect_index] /> {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}<br /> + <input type="radio" name="mailid_error_redirect" value="REJECT"$content[mailid_error_redirect_reject] /> {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--} + </td> <td width="10" class="seperator"> </td> </tr> @@ -256,7 +267,8 @@ </tr> <tr> <td width="10" class="seperator admin_title"> </td> - <td colspan="3" align="center" class="admin_title"><strong>{--ADMIN_SENDING_SETTINGS--}</strong> + <td colspan="3" align="center" class="admin_title"> + <strong>{--ADMIN_SENDING_SETTINGS--}</strong> </td> <td width="10" class="seperator admin_title"> </td> </tr> @@ -272,8 +284,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_POOL_MAX_SEND--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="max_send" class="admin_normal" - size="10" maxlength="100" value="{--_CFG_MAX_SEND--}"></td> + <td align="center"> + <input type="text" name="max_send" class="admin_normal" size="10" maxlength="100" value="{?max_send?}" /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -285,10 +298,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_ZIPCODE_ACTIVE--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="order_multi_page" value="Y"{--_CFG_ORDER_MULTI_Y--}> - {--NO--}: <input type="radio" name="order_multi_page" value="N"{--_CFG_ORDER_MULTI_N--}> - </span></td> + <td align="center"> + {--YES--}: <input type="radio" name="order_multi_page" value="Y"$content[order_multi_page_y] /> + {--NO--}: <input type="radio" name="order_multi_page" value="N"$content[order_multi_page_n] /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -300,10 +313,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_AUTOSEND_ACTIVE--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="autosend_active" value="Y"{--_CFG_AUTOSEND_ACTIVE_Y--}> - {--NO--}: <input type="radio" name="autosend_active" value="N"{--_CFG_AUTOSEND_ACTIVE_N--}> - </span></td> + <td align="center"> + {--YES--}: <input type="radio" name="autosend_active" value="Y"$content[autosend_active_y] /> + {--NO--}: <input type="radio" name="autosend_active" value="N"$content[autosend_active_n] /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -316,7 +329,8 @@ </tr> <tr> <td width="10" class="seperator admin_title"> </td> - <td colspan="3" align="center" class="admin_title"><strong>{--ADMIN_NOTIFY_SETTINGS--}</strong> + <td colspan="3" align="center" class="admin_title"> + <strong>{--ADMIN_NOTIFY_SETTINGS--}</strong> </td> <td width="10" class="seperator admin_title"> </td> </tr> @@ -332,10 +346,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_SEND_UPDATE--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="send_prof_update" value="Y"{--_CFG_SEND_UPDATE_Y--}> - {--NO--}: <input type="radio" name="send_prof_update" value="N"{--_CFG_SEND_UPDATE_N--}> - </span></td> + <td align="center"> + {--YES--}: <input type="radio" name="send_prof_update" value="Y"$content[send_prof_update_y] /> + {--NO--}: <input type="radio" name="send_prof_update" value="N"$content[send_prof_update_n] /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -347,10 +361,10 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_NOTIFY_ADMIN--}:</td> <td width="10" class="seperator"> </td> - <td><span class="nobr"> {--YES--}: <input - type="radio" name="admin_notify" value="Y"{--_CFG_ADMIN_NOTIFY_Y--}> - {--NO--}: <input type="radio" name="admin_notify" value="N"{--_CFG_ADMIN_NOTIFY_N--}> - </span></td> + <td align="center"> + {--YES--}: <input type="radio" name="admin_notify" value="Y"$content[admin_notify_y] /> + {--NO--}: <input type="radio" name="admin_notify" value="N"$content[admin_notify_n] /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -379,7 +393,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_MAX_ONLINETIME--}:</td> <td width="10" class="seperator"> </td> - <td>{--_CFG_ONLINE_TIMEOUT--}</td> + <td>$content[online_timeout]</td> <td width="10" class="seperator"> </td> </tr> @@ -391,7 +405,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_URL_TIME_LOCK--}:</td> <td width="10" class="seperator"> </td> - <td>{--_CFG_URL_TLOCK--}</td> + <td>$content[url_tlock]</td> <td width="10" class="seperator"> </td> </tr> @@ -404,7 +418,8 @@ </tr> <tr> <td width="10" class="seperator admin_title"> </td> - <td colspan="3" align="center" class="admin_title"><strong>{--ADMIN_PROFILE_TIME_SETTINGS--}</strong> + <td colspan="3" align="center" class="admin_title"> + <strong>{--ADMIN_PROFILE_TIME_SETTINGS--}</strong> </td> <td width="10" class="seperator admin_title"> </td> </tr> @@ -420,7 +435,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_LOCK_PROFILE_TIME--}:</td> <td width="10" class="seperator"> </td> - <td>{--_CFG_PROFILE_LOCK--}</td> + <td>$content[profile_lock]</td> <td width="10" class="seperator"> </td> </tr> @@ -432,7 +447,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_PROFILE_UPDATE--}:</td> <td width="10" class="seperator"> </td> - <td>{--_CFG_PROFILE_UPDATE--}</td> + <td>$content[profile_update]</td> <td width="10" class="seperator"> </td> </tr> @@ -444,7 +459,40 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_OPTION_PROFILE_REUPDATE--}:</td> <td width="10" class="seperator"> </td> - <td>{--_CFG_PROF_REUPDATE--}</td> + <td>$content[profile_reupdate]</td> + <td width="10" class="seperator"> </td> + </tr> + + <tr> + <td colspan="5" height="7" class="seperator"> </td> + </tr> + + <tr> + <td colspan="5" height="5" class="seperator admin_title top2"> </td> + </tr> + <tr> + <td width="10" class="seperator admin_title"> </td> + <td colspan="3" align="center" class="admin_title"> + <strong>{--ADMIN_SQL_SETTINGS--}</strong> + </td> + <td width="10" class="seperator admin_title"> </td> + </tr> + <tr> + <td colspan="5" height="5" class="seperator admin_title bottom2"> </td> + </tr> + + <tr> + <td colspan="5" height="7" class="seperator"> </td> + </tr> + + <tr> + <td width="10" class="seperator"> </td> + <td align="right">{--ADMIN_DISPLAY_DEBUG_SQLS--}:</td> + <td width="10" class="seperator"> </td> + <td align="center"> + {--YES--}: <input type="radio" name="display_debug_sqls" value="Y"$content[display_debug_sqls_y] /> + {--NO--}: <input type="radio" name="display_debug_sqls" value="N"$content[display_debug_sqls_n] /> + </td> <td width="10" class="seperator"> </td> </tr> @@ -457,14 +505,14 @@ <tr> <td width="10" class="seperator admin_title"> </td> - <td colspan="3" align="center" class="admin_title"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" align="center" class="admin_title"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td width="10" class="seperator admin_title"> </td> </tr> <tr> <td colspan="5" height="7" class="seperator admin_title"> </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_payouts.tpl b/templates/de/html/admin/admin_config_payouts.tpl index cfaab3a0bc..5429971fe9 100644 --- a/templates/de/html/admin/admin_config_payouts.tpl +++ b/templates/de/html/admin/admin_config_payouts.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_payouts" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_payouts" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="5" align="center" class="admin_title bottom2" height="30"> @@ -12,7 +12,7 @@ <td width="150" class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_PAYOUT_RATE2--}</strong></td> <td width="150" class="admin_title bottom2" align="center"><strong>{--ADMIN_PAYOUT_MIN_POINTS2--}</strong></td> </tr> - {!__PAYOUT_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_payouts_del.tpl b/templates/de/html/admin/admin_config_payouts_del.tpl index 47b73c6b8f..a56e92eb93 100644 --- a/templates/de/html/admin/admin_config_payouts_del.tpl +++ b/templates/de/html/admin/admin_config_payouts_del.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_payouts&ok=ok" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_payouts&ok=ok" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="650" class="admin_table dashed"> <tr> @@ -12,11 +12,11 @@ <td width="150" class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_PAYOUT_RATE2--}</strong></td> <td width="100" class="admin_title bottom2" align="center"><strong>{--ADMIN_PAYOUT_MIN_POINTS2--}</strong></td> </tr> - {!__PAYOUT_ROWS!} + $content <tr> <td colspan="4" class="admin_footer"><input type="submit" name="del" class="admin_delete" - value="{--ADMIN_PAYOUT_DELETE--}"></td> + value="{--ADMIN_PAYOUT_DELETE--}" /></td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_payouts_edit.tpl b/templates/de/html/admin/admin_config_payouts_edit.tpl index 8f3e03e51b..f6b772b6e8 100644 --- a/templates/de/html/admin/admin_config_payouts_edit.tpl +++ b/templates/de/html/admin/admin_config_payouts_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_payouts&ok=ok" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_payouts&ok=ok" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="650" class="admin_table dashed"> <tr> @@ -13,7 +13,7 @@ <td width="100" class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_PAYOUT_MIN_POINTS2--}</strong></td> <td width="180" class="admin_title bottom2" align="center"><strong>{--ADMIN_PAYOUT_ALLOW_URLS--}</strong></td> </tr> - {!__PAYOUT_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_config_point_settings.tpl b/templates/de/html/admin/admin_config_point_settings.tpl index 90916f241a..829e4a0b52 100644 --- a/templates/de/html/admin/admin_config_point_settings.tpl +++ b/templates/de/html/admin/admin_config_point_settings.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=settings" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=settings" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -12,10 +12,10 @@ {--ADMIN_CONFIG_DIRECT_PAY--}</td> <td width="240" align="right"> {--ADMIN_CONFIG_POINTS_DIRECT--} <input type="radio" - name="allow_direct_pay" value="Y" class="admin_normal"{!__DIRECT_Y!} /><br /> + name="allow_direct_pay" value="Y" class="admin_normal"$content[allow_direct_pay_y] /><br /> <hr noshade width="220"> {--ADMIN_CONFIG_POINTS_MAILS--} <input type="radio" - name="allow_direct_pay" value="N" class="admin_normal"{!__DIRECT_N!} /> + name="allow_direct_pay" value="N" class="admin_normal"$content[allow_direct_pay_n] /> </td> </tr> <tr> @@ -28,10 +28,10 @@ <td align="right" height="20">{--ADMIN_CONFIG_REFMODE--}</td> <td align="right" style="padding-right: 10px"> {--ADMIN_CONFIG_REFMODE_REF--} <input type="radio" - name="reg_points_mode" value="ref" class="admin_normal"{!__MODE_REF!}> + name="reg_points_mode" value="ref" class="admin_normal"$content[reg_points_mode_ref] /> <hr noshade width="220"> {--ADMIN_CONFIG_REFMODE_DIRECT--} <input type="radio" - name="reg_points_mode" value="direct" class="admin_normal"{!__MODE_DIRECT!}> + name="reg_points_mode" value="direct" class="admin_normal"$content[reg_points_mode_direct] /> </td> </tr> <tr> @@ -44,7 +44,7 @@ <td align="right">{--REF_PAYOUT--}</td> <td align="center"><input type="text" name="ref_payout" class="admin_normal" size="3" maxlength="3" - value="{!__REF_PAYOUT!}"></td> + value="{?ref_payout?}" /></td> </tr> <tr> <td colspan="2" class="bottom2 seperator" height="5"> </td> diff --git a/templates/de/html/admin/admin_config_primera.tpl b/templates/de/html/admin/admin_config_primera.tpl index 91bca9921d..60d78c1edf 100644 --- a/templates/de/html/admin/admin_config_primera.tpl +++ b/templates/de/html/admin/admin_config_primera.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_primera" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_primera" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -12,7 +12,7 @@ <td width="300" align="right">{--PRIMERA_ADMIN_API_NAME--}:</td> <td class="seperator" width="10"> </td> <td width="270"><input type="text" name="primera_api_name" - class="admin_normal" value="$content[api_name]" size="10" + class="admin_normal" value="{?primera_api_name?}" size="10" maxlength="255" /></td> </tr> <tr> @@ -32,14 +32,14 @@ <tr> <td colspan="3" class="admin_title bottom2" align="center"> Gespeicherter Hash:<br /> - »<em>$content[api_md5]</em>« + »<em>{?primera_api_md5]</em>« </td> </tr> <tr> <td width="300" align="right">{--PRIMERA_ADMIN_REFID--}:</td> <td class="seperator" width="10"> </td> <td width="270"><input type="text" name="primera_refid" - class="admin_normal" value="$content[refid]" size="10" + class="admin_normal" value="{?primera_refid?}" size="10" maxlength="255" /></td> </tr> <tr> @@ -52,7 +52,7 @@ <td width="300" align="right">{--PRIMERA_ADMIN_MIN_PAYOUT--}:</td> <td class="seperator" width="10"> </td> <td width="270"><input type="text" name="primera_min_payout" - class="admin_normal" value="$content[min_payout]" size="5" + class="admin_normal" value="{?primera_min_payout?}" size="5" maxlength="20" /> Wernis</td> </tr> <tr> @@ -62,7 +62,7 @@ <td width="300" align="right">{--PRIMERA_ADMIN_MIN_WITHDRAW--}:</td> <td class="seperator" width="10"> </td> <td width="270"><input type="text" name="primera_min_withdraw" - class="admin_normal" value="$content[min_withdraw]" size="5" + class="admin_normal" value="{?primera_min_withdraw?}" size="5" maxlength="20" /> Wernis</td> </tr> <tr> diff --git a/templates/de/html/admin/admin_config_proxy.tpl b/templates/de/html/admin/admin_config_proxy.tpl index f7db6bf7a5..da6af12454 100644 --- a/templates/de/html/admin/admin_config_proxy.tpl +++ b/templates/de/html/admin/admin_config_proxy.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_proxy" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_proxy" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_config_rallye_del.tpl b/templates/de/html/admin/admin_config_rallye_del.tpl index 4e77e3db36..2c10dab84d 100644 --- a/templates/de/html/admin/admin_config_rallye_del.tpl +++ b/templates/de/html/admin/admin_config_rallye_del.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye={!__RALLYE_ID!}" method="post" style="margin-bottom: 10px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content[rallye]" method="post" style="margin-bottom: 10px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" align="center" class="admin_title" height="30"><strong>{--RALLYE_REMOVE_PRICES--}</strong> @@ -7,19 +7,23 @@ </tr> <tr> <td align="center" width="10" class="admin_title bottom2 right2"> - <strong>{--ID_SELECT--}</strong></td> + <strong>{--ID_SELECT--}</strong> + </td> <td align="center" width="50" class="admin_title bottom2 right2"> - <strong>{--RALLYE_LEVEL--}:</strong></td> + <strong>{--RALLYE_LEVEL--}:</strong> + </td> <td align="center" width="200" class="admin_title bottom2 right2"> - <strong>{--RALLYE_PRICE_POINTS--}:</strong></td> - <td align="center" width="320" class="admin_title bottom2"><strong>{--RALLYE_PRICE_INFO--}:</strong> + <strong>{--RALLYE_PRICE_POINTS--}:</strong> + </td> + <td align="center" width="320" class="admin_title bottom2"> + <strong>{--RALLYE_PRICE_INFO--}:</strong> </td> </tr> - {!__PRICE_ROWS!} + $content[rows] <tr> - <td colspan="4" class="admin_footer"><input - type="submit" name="remove" class="admin_delete" - value="{--RALLYE_REMOVE_PRICES--}"></td> + <td colspan="4" class="admin_footer"> + <input type="submit" name="remove" class="admin_delete" value="{--RALLYE_REMOVE_PRICES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_rallye_edit.tpl b/templates/de/html/admin/admin_config_rallye_edit.tpl index d9ff97e298..0675ed7ca2 100644 --- a/templates/de/html/admin/admin_config_rallye_edit.tpl +++ b/templates/de/html/admin/admin_config_rallye_edit.tpl @@ -1,29 +1,31 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye={!__RALLYE_ID!}" method="post" style="margin-bottom: 10px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content[rallye]" method="post" style="margin-bottom: 10px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="admin_table dashed"> <tr> - <td colspan="4" align="center" class="admin_title" height="30"><strong>{--RALLYE_EDIT_SELECTED_PRICES--}</strong> + <td colspan="4" align="center" class="admin_title" height="30"> + <strong>{--RALLYE_EDIT_SELECTED_PRICES--}</strong> </td> </tr> <tr> - <td width="120" align="center" width="50" - class="admin_title bottom2 right2"><strong>{--RALLYE_ID--}:</strong> + <td width="120" align="center" class="admin_title bottom2 right2"> + <strong>{--RALLYE_ID--}:</strong> </td> - <td width="65" align="center" width="50" - class="admin_title bottom2 right2"><strong>{--RALLYE_LEVEL--}:</strong> + <td width="65" align="center" class="admin_title bottom2 right2"> + <strong>{--RALLYE_LEVEL--}:</strong> </td> - <td width="185" align="center" width="200" - class="admin_title bottom2 right2"><strong>{--RALLYE_PRICE_POINTS--}:</strong> + <td width="185" align="center" class="admin_title bottom2 right2"> + <strong>{--RALLYE_PRICE_POINTS--}:</strong> + </td> + <td width="130" align="center" class="admin_title bottom2"> + <strong>{--RALLYE_PRICE_INFO--}:</strong> </td> - <td width="130" align="center" width="320" class="admin_title bottom2"> - <strong>{--RALLYE_PRICE_INFO--}:</strong></td> </tr> - {!__PRICE_ROWS!} + $content[rows] <tr> - <td colspan="4" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="change" class="admin_submit" - value="{--RALLYE_CHANGE_PRICES--}" /></td> + <td colspan="4" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="change" class="admin_submit" value="{--RALLYE_CHANGE_PRICES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_rallye_prices.tpl b/templates/de/html/admin/admin_config_rallye_prices.tpl index df08fc8d08..0be00c9dac 100644 --- a/templates/de/html/admin/admin_config_rallye_prices.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye={!__RALLYE_ID!}" method="post" style="margin-bottom: 10px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rallye_prices&rallye=$content[rallye]" method="post" style="margin-bottom: 10px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" align="center" class="admin_title" height="30"><strong>{--RALLYE_EDIT_DEL_PRICES--}</strong> @@ -7,21 +7,24 @@ </tr> <tr> <td align="center" width="10" class="admin_title bottom2 right2"> - <strong>{--ID_SELECT--}</strong></td> + <strong>{--ID_SELECT--}</strong> + </td> <td align="center" width="50" class="admin_title bottom2 right2"> - <strong>{--RALLYE_LEVEL--}:</strong></td> + <strong>{--RALLYE_LEVEL--}:</strong> + </td> <td align="center" width="200" class="admin_title bottom2 right2"> - <strong>{--RALLYE_PRICE_POINTS--}:</strong></td> - <td align="center" width="320" class="admin_title bottom2"><strong>{--RALLYE_PRICE_INFO--}:</strong> + <strong>{--RALLYE_PRICE_POINTS--}:</strong> + </td> + <td align="center" width="320" class="admin_title bottom2"> + <strong>{--RALLYE_PRICE_INFO--}:</strong> </td> </tr> - {!__PRICE_ROWS!} + $content[rows] <tr> - <td colspan="4" class="admin_footer"><input - type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="edit" class="admin_submit" - value="{--RALLYE_EDIT_PRICES--}"> <input type="submit" - name="del" class="admin_delete" value="{--RALLYE_DELETE_PRICES--}" /> + <td colspan="4" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--RALLYE_EDIT_PRICES--}" /> + <input type="submit" name="del" class="admin_delete" value="{--RALLYE_DELETE_PRICES--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_config_refback.tpl b/templates/de/html/admin/admin_config_refback.tpl index e104694667..de279c8dd5 100644 --- a/templates/de/html/admin/admin_config_refback.tpl +++ b/templates/de/html/admin/admin_config_refback.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_refback" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_refback" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_config_refid.tpl b/templates/de/html/admin/admin_config_refid.tpl index feaf2a73f5..562c8abf25 100644 --- a/templates/de/html/admin/admin_config_refid.tpl +++ b/templates/de/html/admin/admin_config_refid.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_refid" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_refid" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="450" class="admin_table dashed"> <tr> <td class="admin_title2 bottom2" colspan="2" align="center"> @@ -11,7 +11,7 @@ <tr> <td align="right" width="200" style="padding-right:5px">{--ADMIN_SELECT_DEF_REFID--}:</td> <td align="center"> - {!__MEMBER_SELECTION!} + $content[member_selection] </td> </tr> @@ -21,8 +21,8 @@ <td align="right" width="200" style="padding-right:5px">{--ADMIN_SELECT_REFID_TARGRT--}:</td> <td align="center"> <select name="refid_target" size="1" class="admin_select"> - <option value="register"{!__DEF_RT_REGISTER!}">{--ADMIN_REF_TARGET_REGISTER--}</option> - <option value="index"{!__DEF_RT_INDEX!}">{--ADMIN_REF_TARGET_INDEX--}</option> + <option value="register"$content[refid_target_register]">{--ADMIN_REF_TARGET_REGISTER--}</option> + <option value="index"$content[refid_target_index]">{--ADMIN_REF_TARGET_INDEX--}</option> </select> </td> </tr> @@ -34,8 +34,8 @@ <td align="right" width="200" style="padding-right:5px">{--ADMIN_RANDOM_ZERO_REFID--}:</td> <td align="center"> <select name="select_user_zero_refid" size="1" class="admin_select"> - <option value="Y"{!__RAND_REFID_Y!}">{--ADMIN_RAND_REFID_ENABLED--}</option> - <option value="N"{!__RAND_REFID_N!}">{--ADMIN_RAND_REFID_DISABLED--}</option> + <option value="Y"$content[select_user_zero_refid_y]">{--ADMIN_RAND_REFID_ENABLED--}</option> + <option value="N"$content[select_user_zero_refid_n]">{--ADMIN_RAND_REFID_DISABLED--}</option> </select> </td> </tr> @@ -45,7 +45,7 @@ <tr> <td align="right" width="200" style="padding-right:5px">{--ADMIN_RANDOM_MIN_CONFIRMED--}:</td> <td align="center"> - <input type="text" name="user_min_confirmed" class="admin_normal" size="3" maxlength="3" value="$content[user_min_confirmed]" /> + <input type="text" name="user_min_confirmed" class="admin_normal" size="3" maxlength="3" value="{?user_min_confirmed?}" /> </td> </tr> diff --git a/templates/de/html/admin/admin_config_reg_pro.tpl b/templates/de/html/admin/admin_config_reg_pro.tpl index 74f38ac125..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_reg_pro.tpl +++ b/templates/de/html/admin/admin_config_reg_pro.tpl @@ -1,53 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_reg" method="post"> -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="430"> - <tr> - <td class="admin_title bottom2 seperator" height="30" width="10"> </td> - <td class="admin_title bottom2" colspan="3" align="center"><strong>{--EDIT_REGFORM_SETTINGS--}</strong> - </td> - <td class="admin_title bottom2 seperator" width="10"> </td> - </tr> - <tr> - <td colspan="6" height="7" class="seperator"> </td> - </tr> - <tr> - <td width="10" class="seperator"> </td> - <td align="right" width="250">{--LEAST_CATS--}:</td> - <td width="10" class="seperator"> </td> - <td align="center" width="150"><input type="text" - name="least_cats" class="admin_normal" size="6" maxlength="6" - value="{--LEAST_CATS_VALUE!}"></td> - <td width="10" class="seperator"> </td> - </tr> - <tr> - <td colspan="6" height="7" class="seperator"> </td> - </tr> - <tr> - <td width="10" class="seperator"> </td> - <td align="right">{--DISPLAY_REFID--}:</td> - <td width="10" class="seperator"> </td> - <td align="center">{!__CFG_SHOW_REFID!}</td> - <td width="10" class="seperator"> </td> - </tr> - <tr> - <td colspan="6" height="7" class="seperator"> </td> - </tr> - <tr> - <td width="10" class="seperator"> </td> - <td align="right">{--IP_TIMEOUT--}:</td> - <td width="10" class="seperator"> </td> - <td>{!__TIMEOUT_SELECTION!}</td> - <td width="10" class="seperator"> </td> - </tr> - <tr> - <td colspan="6" height="7" class="seperator bottom2"> </td> - </tr> - <tr> - <td width="10" class="admin_footer seperator"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> - <td width="10" class="admin_footer seperator"> </td> - </tr> -</table> -</form> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_config_register.tpl b/templates/de/html/admin/admin_config_register.tpl index 7efdec7639..f92d10ea12 100644 --- a/templates/de/html/admin/admin_config_register.tpl +++ b/templates/de/html/admin/admin_config_register.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_register" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_register" method="post"> <table border="0" cellpadding="0" cellspacing="0" width="450" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title" height="30"><strong>{--REGISTER_MUST_HEADER--}:</strong> @@ -10,7 +10,7 @@ <td width="325" class="admin_title bottom2 right2" align="center">{--REGISTER_FIELD_NAME--}:</td> <td width="105" class="admin_title bottom2" align="center">{--REGISTER_FIELD_REQUIRED--}</td> </tr> - {!__REGISTER_ROWS!} + $content <tr> <td colspan="3" class="admin_footer"> <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_register2.tpl b/templates/de/html/admin/admin_config_register2.tpl index 2cbc50993a..8f885b6b05 100644 --- a/templates/de/html/admin/admin_config_register2.tpl +++ b/templates/de/html/admin/admin_config_register2.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_register2" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_register2" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="430"> <tr> <td class="admin_title bottom2 seperator" height="30" width="10"> </td> - <td class="admin_title bottom2" colspan="3" align="center"><strong>{--EDIT_REGFORM_SETTINGS--}</strong> + <td class="admin_title bottom2" colspan="3" align="center"> + <strong>{--EDIT_REGFORM_SETTINGS--}</strong> </td> <td class="admin_title bottom2 seperator" width="10"> </td> </tr> @@ -13,9 +14,9 @@ <td width="10" class="seperator"> </td> <td align="right" width="250">{--LEAST_CATS--}:</td> <td width="10" class="seperator"> </td> - <td align="center" width="150"><input type="text" - name="least_cats" class="admin_normal" size="6" maxlength="6" - value="{!LEAST_CATS_VALUE!}"></td> + <td align="center" width="150"> + <input type="text" name="least_cats" class="admin_normal" size="6" maxlength="6" value="{?least_cats?}" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -25,7 +26,7 @@ <td width="10" class="seperator"> </td> <td align="right" width="250">{--ADMIN_CFG_REGISTER_DEFAULT--}:</td> <td width="10" class="seperator"> </td> - <td align="center" width="150">{!__CFG_CAT_DEFAULT!}</td> + <td align="center" width="150">$content[register_default]</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -35,7 +36,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--ADMIN_CFG_REGISTER_DISPLAY_REFID--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__CFG_SHOW_REFID!}</td> + <td align="center">$content[display_refid]</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -45,7 +46,7 @@ <td width="10" class="seperator"> </td> <td align="right">{--IP_TIMEOUT--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__TIMEOUT_SELECTION!}</td> + <td align="center">$content[ip_timeout]</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -55,7 +56,7 @@ <td width="10" class="seperator"> </td> <td align="right" width="280">{--REJECT_DOUBLE_EMAIL--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__CFG_DBL_EMAIL!}</td> + <td align="center">$content[check_double_email]</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -65,7 +66,7 @@ <td width="10" class="seperator"> </td> <td align="right" width="280">{--REJECT_DOUBLE_PASS--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__CFG_DBL_PASS!}</td> + <td align="center">$content[check_double_pass]</td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -73,10 +74,10 @@ </tr> <tr> <td width="10" class="admin_footer seperator"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td class="admin_footer" colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td width="10" class="admin_footer seperator"> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_config_removeip.tpl b/templates/de/html/admin/admin_config_removeip.tpl index 12691bc8fe..7f506d6f73 100644 --- a/templates/de/html/admin/admin_config_removeip.tpl +++ b/templates/de/html/admin/admin_config_removeip.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_removeip" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_removeip" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -11,8 +11,8 @@ {--ADMIN_CONFIG_REMOVEIP_ANON_IP--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_anon_ip" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_IP_Y!} /> {--YES--} - <input type="radio" name="removeip_anon_ip" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_IP_N!} /> {--NO--} + <input type="radio" name="removeip_anon_ip" value="Y" class="admin_normal"$content[removeip_anon_ip_y] /> {--YES--} + <input type="radio" name="removeip_anon_ip" value="N" class="admin_normal"$content[removeip_anon_ip_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -22,8 +22,8 @@ {--ADMIN_CONFIG_REMOVEIP_ANON_HOST--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_anon_host" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_HOST_Y!} /> {--YES--} - <input type="radio" name="removeip_anon_host" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_HOST_N!} /> {--NO--} + <input type="radio" name="removeip_anon_host" value="Y" class="admin_normal"$content[removeip_anon_host_y] /> {--YES--} + <input type="radio" name="removeip_anon_host" value="N" class="admin_normal"$content[removeip_anon_host_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -33,8 +33,8 @@ {--ADMIN_CONFIG_REMOVEIP_ANON_UA--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_anon_ua" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_UA_Y!} /> {--YES--} - <input type="radio" name="removeip_anon_ua" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_UA_N!} /> {--NO--} + <input type="radio" name="removeip_anon_ua" value="Y" class="admin_normal"$content[removeip_anon_ua_y] /> {--YES--} + <input type="radio" name="removeip_anon_ua" value="N" class="admin_normal"$content[removeip_anon_ua_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -44,8 +44,8 @@ {--ADMIN_CONFIG_REMOVEIP_ANON_REF--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_anon_ref" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ANON_REF_Y!} /> {--YES--} - <input type="radio" name="removeip_anon_ref" value="N" class="admin_normal"{!__CFG_REMOVEIP_ANON_REF_N!} /> {--NO--} + <input type="radio" name="removeip_anon_ref" value="Y" class="admin_normal"$content[removeip_anon_ref_y] /> {--YES--} + <input type="radio" name="removeip_anon_ref" value="N" class="admin_normal"$content[removeip_anon_ref_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -56,9 +56,9 @@ </td> <td width="150" style="padding-left: 10px"> <select name="anonymous_ip" class="admin_select" size="1"> - <option value="127.0.0.1"{!__CFG_ANONYMOUS_IP_LOCAL!}>{--ADMIN_CONFIG_REMOVEIP_LOCAL--}</option> - <option value="0.0.0.0"{!__CFG_ANONYMOUS_IP_ZERO!}>{--ADMIN_CONFIG_REMOVEIP_ZERO--}</option> - <option value="RANDOM"{!__CFG_ANONYMOUS_IP_RANDOM!}>{--ADMIN_CONFIG_REMOVEIP_RANDOM--}</option> + <option value="LOCAL"$content[anonymous_ip_local]>{--ADMIN_CONFIG_REMOVEIP_LOCAL--}</option> + <option value="ZERO"$content[anonymous_ip_zero]>{--ADMIN_CONFIG_REMOVEIP_ZERO--}</option> + <option value="RANDOM"$content[anonymous_ip_random]>{--ADMIN_CONFIG_REMOVEIP_RANDOM--}</option> </select> </td> </tr> @@ -69,8 +69,8 @@ {--ADMIN_CONFIG_REMOVEIP_ADMIN_SHOW--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_admin_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_ADMIN_SHOW_Y!} /> {--YES--} - <input type="radio" name="removeip_admin_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_ADMIN_SHOW_N!} /> {--NO--} + <input type="radio" name="removeip_admin_show" value="Y" class="admin_normal"$content[removeip_admin_show_y] /> {--YES--} + <input type="radio" name="removeip_admin_show" value="N" class="admin_normal"$content[removeip_admin_show_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -80,8 +80,8 @@ {--ADMIN_CONFIG_REMOVEIP_GUEST_SHOW--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_guest_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_GUEST_SHOW_Y!} /> {--YES--} - <input type="radio" name="removeip_guest_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_GUEST_SHOW_N!} /> {--NO--} + <input type="radio" name="removeip_guest_show" value="Y" class="admin_normal"$content[removeip_guest_show_y] /> {--YES--} + <input type="radio" name="removeip_guest_show" value="N" class="admin_normal"$content[removeip_guest_show_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -91,8 +91,8 @@ {--ADMIN_CONFIG_REMOVEIP_MEMBER_SHOW--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_member_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_MEMBER_SHOW_Y!} /> {--YES--} - <input type="radio" name="removeip_member_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_MEMBER_SHOW_N!} /> {--NO--} + <input type="radio" name="removeip_member_show" value="Y" class="admin_normal"$content[removeip_member_show_y] /> {--YES--} + <input type="radio" name="removeip_member_show" value="N" class="admin_normal"$content[removeip_member_show_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> @@ -102,8 +102,8 @@ {--ADMIN_CONFIG_REMOVEIP_SPONSOR_SHOW--} </td> <td width="150" style="padding-left: 10px"> - <input type="radio" name="removeip_sponsor_show" value="Y" class="admin_normal"{!__CFG_REMOVEIP_SPONSOR_SHOW_Y!} /> {--YES--} - <input type="radio" name="removeip_sponsor_show" value="N" class="admin_normal"{!__CFG_REMOVEIP_SPONSOR_SHOW_N!} /> {--NO--} + <input type="radio" name="removeip_sponsor_show" value="Y" class="admin_normal"$content[removeip_sponsor_show_y] /> {--YES--} + <input type="radio" name="removeip_sponsor_show" value="N" class="admin_normal"$content[removeip_sponsor_show_n] /> {--NO--} </td> </tr> <tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr> diff --git a/templates/de/html/admin/admin_config_rewrite.tpl b/templates/de/html/admin/admin_config_rewrite.tpl index 8932cfe7f0..c905ef57ca 100644 --- a/templates/de/html/admin/admin_config_rewrite.tpl +++ b/templates/de/html/admin/admin_config_rewrite.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_rewrite" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_rewrite" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_header bottom2 right2" align="center" height="30"> @@ -12,7 +12,7 @@ <strong>{--MODULE_SKIPPED--}</strong> </td> </tr> - {!__MODULE_ROWS!} + $content <tr> <td colspan="3" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_config_secure.tpl b/templates/de/html/admin/admin_config_secure.tpl index 2dfc6609f6..2b38e4928a 100644 --- a/templates/de/html/admin/admin_config_secure.tpl +++ b/templates/de/html/admin/admin_config_secure.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_secure" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_secure" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" width="10" height="30"> </td> @@ -14,7 +14,7 @@ <td align="right" width="280">{--MIN_PASS_LENGTH--}:</td> <td width="10" class="seperator"> </td> <td><input type="text" name="pass_len" class="admin_normal" - size="3" maxlength="3" value="{!__PASS_LEN!}"></td> + size="3" maxlength="3" value="{?pass_len?}"></td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -25,7 +25,7 @@ <td align="right" width="280">{--ADMIN_SALT_LENGTH--}:</td> <td width="10" class="seperator"> </td> <td><input type="text" name="salt_length" class="admin_normal" - size="3" maxlength="3" value="{!__SALT_LENGTH!}"></td> + size="3" maxlength="3" value="{?salt_length?}"></td> <td width="10" class="seperator"> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_config_session.tpl b/templates/de/html/admin/admin_config_session.tpl index b18f8cef4d..a0f03ac64e 100644 --- a/templates/de/html/admin/admin_config_session.tpl +++ b/templates/de/html/admin/admin_config_session.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_proxy" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_proxy" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="700"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_config_sponsor.tpl b/templates/de/html/admin/admin_config_sponsor.tpl index e93721842b..631d3fc2d7 100644 --- a/templates/de/html/admin/admin_config_sponsor.tpl +++ b/templates/de/html/admin/admin_config_sponsor.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_sponsor" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_sponsor" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -11,7 +11,7 @@ {--ADMIN_SPONSOR_MIN_POINTS--}: </td> <td width="150" align="center"> - <input type="text" class="admin_normal" name="sponsor_min_points" size="12" maxlength="20" value="{!__SPONSOR_MIN_POINTS!}" /> + <input type="text" class="admin_normal" name="sponsor_min_points" size="12" maxlength="20" value="{?sponsor_min_points?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -20,7 +20,7 @@ {--ADMIN_SPONSOR_REF_POINTS--}: </td> <td width="150" align="center"> - <input type="text" class="admin_normal" name="sponsor_ref_points" size="12" maxlength="20" value="{!__SPONSOR_REF_POINTS!}" /> + <input type="text" class="admin_normal" name="sponsor_ref_points" size="12" maxlength="20" value="{?sponsor_ref_points?}" /> </td> </tr> <tr><td colspan="2" class="seperator bottom2" height="5"> </td></tr> diff --git a/templates/de/html/admin/admin_config_stats.tpl b/templates/de/html/admin/admin_config_stats.tpl index f34746613b..287eccc130 100644 --- a/templates/de/html/admin/admin_config_stats.tpl +++ b/templates/de/html/admin/admin_config_stats.tpl @@ -1,18 +1,21 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_stats" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_stats" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed" align="center"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_SETUP_STATS_TITLE--}</strong></td> + <strong>{--ADMIN_SETUP_STATS_TITLE--}</strong> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> </tr> <tr> <td width="340" height="40" align="right"><strong>{--ADMIN_GSTATS_MEMBERS--}:</strong><br /> - <div class="tiny">({--ADMIN_GSTATS_MEMBERS_NOTE--})</div></td> + <div class="tiny">({--ADMIN_GSTATS_MEMBERS_NOTE--})</div> + </td> <td width="10" class="seperator"> </td> - <td width="50"><input type="radio" name="guest_stats" - class="admin_normal" value="members"{!__MEMBERS_RADIO!}></td> + <td width="50"> + <input type="radio" name="guest_stats" class="admin_normal" value="members"$content[guest_stats_members] /> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator bottom2"> </td> @@ -22,10 +25,12 @@ </tr> <tr> <td height="40" align="right"><strong>{--ADMIN_GSTATS_MODULES--}:</strong><br /> - <div class="tiny">({--ADMIN_GSTATS_MODULES_NOTE--})</div></td> + <div class="tiny">({--ADMIN_GSTATS_MODULES_NOTE--})</div> + </td> <td class="seperator"> </td> - <td><input type="radio" name="guest_stats" class="admin_normal" - value="modules"{!__MODULES_RADIO!}></td> + <td> + <input type="radio" name="guest_stats" class="admin_normal" value="modules"$content[guest_stats_modules] /> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator bottom2"> </td> @@ -35,17 +40,20 @@ </tr> <tr> <td height="40" align="right"><strong>{--ADMIN_GSTATS_INACTIVE--}:</strong><br /> - <div class="tiny">({--ADMIN_GSTATS_INACTIVE_NOTE--})</div></td> + <div class="tiny">({--ADMIN_GSTATS_INACTIVE_NOTE--})</div> + </td> <td class="seperator"> </td> - <td><input type="radio" name="guest_stats" class="admin_normal" - value="inactive"{!__INACTIVE_RADIO!}></td> + <td> + <input type="radio" name="guest_stats" class="admin_normal" value="inactive"$content[guest_stats_inactive] /> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator bottom2"> </td> </tr> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_MEMBER_STATS_TITLE--}</strong></td> + <strong>{--ADMIN_MEMBER_STATS_TITLE--}</strong> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> @@ -53,17 +61,18 @@ <tr> <td height="40" align="right">{--ADMIN_MEMBER_STATS_LIMIT--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="stats_limit" class="admin_normal" - value="{!__STATS_LIMIT!}" size="4" maxlength="20"></td> + <td> + <input type="text" name="stats_limit" class="admin_normal" value="{?stats_limit?}" size="4" maxlength="20" /> + </td> </tr> <tr> <td colspan="3" height="5" class="seperator"> </td> </tr> <tr> - <td colspan="3" align="center" class="admin_footer top2"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" align="center" class="admin_footer top2"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_sub_points.tpl b/templates/de/html/admin/admin_config_sub_points.tpl index 4c9cf10193..607ae7ba9b 100644 --- a/templates/de/html/admin/admin_config_sub_points.tpl +++ b/templates/de/html/admin/admin_config_sub_points.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=points" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=points" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 seperator" width="10" height="30"> </td> - <td class="admin_title bottom2" colspan="3" align="center"><strong>{--EDIT_POINTS_SETTINGS--}</strong> + <td class="admin_title bottom2" colspan="3" align="center"> + <strong>{--EDIT_POINTS_SETTINGS--}</strong> </td> <td class="admin_title bottom2 seperator" width="10"> </td> </tr> @@ -13,8 +14,8 @@ <td class="seperator" width="10"> </td> <td align="right" width="200">{--POINTS_REGISTER--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="points_register" - class="admin_normal" size="6" maxlength="6" value="{--P_REG_VALUE!}"> + <td> + <input type="text" name="points_register" class="admin_normal" size="6" maxlength="6" value="{?points_register?}" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -25,8 +26,9 @@ <td class="seperator" width="10"> </td> <td align="right" width="200">{--POINTS_REF--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="points_ref" class="admin_normal" - size="6" maxlength="6" value="{--P_REF_VALUE!}"></td> + <td> + <input type="text" name="points_ref" class="admin_normal" size="6" maxlength="6" value="{?points_ref?}" /> + </td> <td class="seperator" width="10"> </td> </tr> <tr> @@ -34,11 +36,11 @@ </tr> <tr> <td class="admin_footer seperator" width="10"> </td> - <td class="admin_footer" colspan="3" align="center"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td class="admin_footer" colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> <td class="admin_footer seperator" width="10"> </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl index 964b1228b3..c6938d5734 100644 --- a/templates/de/html/admin/admin_config_surfbar.tpl +++ b/templates/de/html/admin/admin_config_surfbar.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_surfbar" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_surfbar" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="550" class="admin_table dashed" align="center"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -11,7 +11,7 @@ {--ADMIN_CONFIG_SURFBAR_STATIC_REWARD--} </td> <td width="40%"> - <input type="text" name="surfbar_static_reward" size="6" maxlength="20" value="$content[surfbar_static_reward]" /> {?POINTS?} + <input type="text" name="surfbar_static_reward" size="6" maxlength="20" value="$content[surfbar_static_reward]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr><td height="3" colspan="2" class="seperator"> </td></tr> @@ -20,7 +20,7 @@ {--ADMIN_CONFIG_SURFBAR_STATIC_COSTS--} </td> <td style="padding-left:5px"> - <input type="text" name="surfbar_static_costs" size="6" maxlength="20" value="$content[surfbar_static_costs]" /> {?POINTS?} + <input type="text" name="surfbar_static_costs" size="6" maxlength="20" value="$content[surfbar_static_costs]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr><td height="3" colspan="2" class="seperator"> </td></tr> @@ -107,7 +107,7 @@ {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC--} </td> <td style="padding-left:5px"> - <input type="radio" name="surfbar_pay_model" value="STATIC"{!__CONFIG_SURFBAR_PAY_MODEL_STATIC!} /> + <input type="radio" name="surfbar_pay_model" value="STATIC"$content[surfbar_pay_model_static] /> </td> </tr> <tr> @@ -115,7 +115,7 @@ {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--} </td> <td style="padding-left:5px"> - <input type="radio" name="surfbar_pay_model" value="DYNAMIC"{!__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC!} /> + <input type="radio" name="surfbar_pay_model" value="DYNAMIC"$content[surfbar_pay_model_dynamic] /> </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> @@ -130,7 +130,7 @@ {--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL--} </td> <td style="padding-left:5px"> - <input type="radio" name="surfbar_pause_mode" value="INTERNAL"{!__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL!} /> + <input type="radio" name="surfbar_pause_mode" value="INTERNAL"$content[surfbar_pause_mode_internal] /> </td> </tr> <tr> @@ -138,7 +138,7 @@ {--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL--} </td> <td style="padding-left:5px"> - <input type="radio" name="surfbar_pause_mode" value="EXTERNAL"{!__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL!} /> + <input type="radio" name="surfbar_pause_mode" value="EXTERNAL"$content[surfbar_pause_mode_external] /> </td> </tr> <tr><td height="3" colspan="2" class="seperator"> </td></tr> @@ -157,8 +157,8 @@ {--ADMIN_CONFIG_SURFBAR_AUTOSTART--} </td> <td align="center"> - <input type="radio" name="surfbar_autostart" value="Y"{!__CONFIG_SURFBAR_AUTOSTART_Y!} /> {--YES--} - <input type="radio" name="surfbar_autostart" value="N"{!__CONFIG_SURFBAR_AUTOSTART_N!} /> {--NO--} + <input type="radio" name="surfbar_autostart" value="Y"$content[surfbar_autostart_y] /> {--YES--} + <input type="radio" name="surfbar_autostart" value="N"$content[surfbar_autostart_n] /> {--NO--} </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> @@ -168,8 +168,8 @@ {--ADMIN_CONFIG_SURFBAR_NOTIFY_LIMITS--} </td> <td align="center"> - <input type="radio" name="surfbar_notify_limits" value="Y"{!__CONFIG_SURFBAR_NOTIFY_LIMITS_Y!} /> {--YES--} - <input type="radio" name="surfbar_notify_limits" value="N"{!__CONFIG_SURFBAR_NOTIFY_LIMITS_N!} /> {--NO--} + <input type="radio" name="surfbar_notify_limits" value="Y"$content[surfbar_notify_limits_y] /> {--YES--} + <input type="radio" name="surfbar_notify_limits" value="N"$content[surfbar_notify_limits_n] /> {--NO--} </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> @@ -179,8 +179,8 @@ {--ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK--} </td> <td align="center"> - <input type="radio" name="surfbar_notify_admin_unlock" value="Y"{!__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y!} /> {--YES--} - <input type="radio" name="surfbar_notify_admin_unlock" value="N"{!__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N!} /> {--NO--} + <input type="radio" name="surfbar_notify_admin_unlock" value="Y"$content[surfbar_notify_admin_unlock_y] /> {--YES--} + <input type="radio" name="surfbar_notify_admin_unlock" value="N"$content[surfbar_notify_admin_unlock_n] /> {--NO--} </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> @@ -191,8 +191,8 @@ </td> <td align="center"> <select name="surfbar_notification_mode" class="admin_select" size="1"> - <option value="INSTANT"{!__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT!}>{--ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT--}</option> - <option value="RESET"{!__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET!}>{--ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET--}</option> + <option value="INSTANT"$content[surfbar_notification_mode_instant]>{--ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT--}</option> + <option value="RESET"$content[surfbar_notification_mode_reset]>{--ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET--}</option> </select> </td> </tr> @@ -203,7 +203,7 @@ {--ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS--} </td> <td style="padding-left:5px"> - <input type="text" name="surfbar_warn_low_points" size="5" maxlength="20" value="$content[surfbar_warn_low_points]" /> {?POINTS?} + <input type="text" name="surfbar_warn_low_points" size="5" maxlength="20" value="$content[surfbar_warn_low_points]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr><td height="3" colspan="2" class="seperator"> </td></tr> @@ -222,8 +222,8 @@ {--ADMIN_CONFIG_SURFBAR_MIGRATE_ORDER--} </td> <td align="center"> - <input type="radio" name="surfbar_migrate_order" value="Y"{!__CONFIG_SURFBAR_MIGRATE_ORDER_Y!} /> {--YES--} - <input type="radio" name="surfbar_migrate_order" value="N"{!__CONFIG_SURFBAR_MIGRATE_ORDER_N!} /> {--NO--} + <input type="radio" name="surfbar_migrate_order" value="Y"$content[surfbar_migrate_order_y] /> {--YES--} + <input type="radio" name="surfbar_migrate_order" value="N"$content[surfbar_migrate_order_n] /> {--NO--} </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> @@ -233,8 +233,8 @@ {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM--} </td> <td align="left" style="padding-left: 5px"> - <input type="radio" name="surfbar_guest_login_form" value="Y"{!__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y!} /> {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y--}<br /> - <input type="radio" name="surfbar_guest_login_form" value="N"{!__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N!} /> {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N--} + <input type="radio" name="surfbar_guest_login_form" value="Y"$content[surfbar_guest_login_form_y] /> {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y--}<br /> + <input type="radio" name="surfbar_guest_login_form" value="N"$content[surfbar_guest_login_form_n] /> {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N--} </td> </tr> <tr><td height="3" colspan="2" class="seperator bottom2"> </td></tr> diff --git a/templates/de/html/admin/admin_config_title.tpl b/templates/de/html/admin/admin_config_title.tpl index 1d617ce42f..c6c83d519d 100644 --- a/templates/de/html/admin/admin_config_title.tpl +++ b/templates/de/html/admin/admin_config_title.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_title" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_title" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -11,7 +11,7 @@ <tr> <td width="400" align="right">{--ADMIN_TITLE_ENABLE_DECORATIONS--}:</td> <td class="seperator" width="10"> </td> - <td width="170">{!__CFG_TITLE_DECOS!}</td> + <td width="170">$content[enable_title_deco]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -19,7 +19,7 @@ <tr> <td align="right">{--ADMIN_TITLE_ENABLE_MODULE_TITLE--}:</td> <td class="seperator" width="10"> </td> - <td>{!__CFG_TITLE_MOD_SHOW!}</td> + <td>$content[enable_mod_title]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -27,7 +27,7 @@ <tr> <td align="right">{--ADMIN_TITLE_ENABLE_WHAT_TITLE--}:</td> <td class="seperator" width="10"> </td> - <td>{!__CFG_TITLE_WHAT_SHOW!}</td> + <td>$content[enable_what_title]</td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> @@ -42,8 +42,9 @@ <tr> <td align="right">{--ADMIN_TITLE_LEFT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="title_left" class="admin_normal" - value="{!__CFG_TITLE_LEFT!}" size="4" maxlength="10"></td> + <td> + <input type="text" name="title_left" class="admin_normal" value="{?title_left?}" size="4" maxlength="10" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -51,8 +52,9 @@ <tr> <td align="right">{--ADMIN_TITLE_MIDDLE--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="title_middle" class="admin_normal" - value="{!__CFG_TITLE_MIDDLE!}" size="4" maxlength="10"></td> + <td> + <input type="text" name="title_middle" class="admin_normal" value="{?title_middle?}" size="4" maxlength="10" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -60,17 +62,18 @@ <tr> <td align="right">{--ADMIN_TITLE_RIGHT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="title_right" class="admin_normal" - value="{!__CFG_TITLE_RIGHT!}" size="4" maxlength="10"></td> + <td> + <input type="text" name="title_right" class="admin_normal" value="{?title_right?}" size="4" maxlength="10" /> + </td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_top10.tpl b/templates/de/html/admin/admin_config_top10.tpl index 1914701bcc..429c37b35a 100644 --- a/templates/de/html/admin/admin_config_top10.tpl +++ b/templates/de/html/admin/admin_config_top10.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_top10" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_top10" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> @@ -12,7 +12,7 @@ <td width="400" align="right">{--TOP10_ADMIN_MAX_TOP10--}:</td> <td class="seperator" width="10"> </td> <td width="170"><input type="text" name="top10_max" - class="admin_normal" value="{!__MAX_VALUE!}" size="4" maxlength="6"></td> + class="admin_normal" value="$content[max]" size="4" maxlength="6" /></td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> diff --git a/templates/de/html/admin/admin_config_transfer.tpl b/templates/de/html/admin/admin_config_transfer.tpl index 46030533f8..bcc451dee3 100644 --- a/templates/de/html/admin/admin_config_transfer.tpl +++ b/templates/de/html/admin/admin_config_transfer.tpl @@ -1,9 +1,10 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_transfer" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_transfer" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_CONFIG_TRANSFER_HEADER--}</strong></td> + <strong>{--ADMIN_CONFIG_TRANSFER_HEADER--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -11,9 +12,9 @@ <tr> <td width="360" align="right">{--ADMIN_TRANSFER_MAX--}:</td> <td class="seperator" width="10"> </td> - <td width="210"><input type="text" name="transfer_max" - class="admin_normal" value="{!__TRANS_MAX_VALUE!}" size="4" - maxlength="6"></td> + <td width="210"> + <input type="text" name="transfer_max" class="admin_normal" value="{?transfer_max?}" size="4" maxlength="6" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -21,7 +22,7 @@ <tr> <td align="right">{--ADMIN_TRANSFER_AGE--}:</td> <td class="seperator" width="10"> </td> - <td>{!__TRANS_AGE_SELECTION!}</td> + <td>$content[age_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -29,7 +30,7 @@ <tr> <td align="right">{--ADMIN_TRANSFER_TIMEOUT--}:</td> <td class="seperator" width="10"> </td> - <td>{!__TRANS_TIMEOUT_SELECTION!}</td> + <td>$content[timeout_selection]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -37,19 +38,22 @@ <tr> <td align="right">{--ADMIN_TRANSFER_BALANCE--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="transfer_balance" - class="admin_normal" value="{!__TRANS_BALANCE_VALUE!}" size="4" - maxlength="6"> <div class="tiny">({?POINTS?})</div></td> + <td> + <input type="text" name="transfer_balance" class="admin_normal" value="{?transfer_balance?}" size="4" maxlength="6" /> <span class="tiny">({?POINTS?})</span> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> </tr> <tr> - <td align="right">{--ADMIN_TRANSFER_CODE--}:<br /> - <div class="admin_note">({--ADMIN_TRANSFER_CODE_NOTE--})</div></td> + <td align="right"> + {--ADMIN_TRANSFER_CODE--}:<br /> + <div class="admin_note">({--ADMIN_TRANSFER_CODE_NOTE--})</div> + </td> <td class="seperator" width="10"> </td> - <td><input type="text" name="transfer_code" class="admin_normal" - value="{!__TRANS_CODE_VALUE!}" size="4" maxlength="6"></td> + <td> + <input type="text" name="transfer_code" class="admin_normal" value="{?transfer_code?}" size="4" maxlength="6" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -57,19 +61,21 @@ <tr> <td align="right" width="250">{--ADMIN_AUTOPURGE_TRANSFER--}</td> <td width="10" class="seperator"> </td> - <td><select name="ap_transfer" size="1" class="admin_select"> - <option value="Y"{!__YES_AP!} />{--YES--}</option> - <option value="N"{!__NO_AP!} />{--NO--}</option> - </select></td> + <td> + <select name="ap_transfer" size="1" class="admin_select"> + <option value="Y"$content[ap_transfer_y]>{--YES--}</option> + <option value="N"$content[ap_transfer_n]>{--NO--}</option> + </select> + </td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_user.tpl b/templates/de/html/admin/admin_config_user.tpl index 8ce836404d..9a22134cdc 100644 --- a/templates/de/html/admin/admin_config_user.tpl +++ b/templates/de/html/admin/admin_config_user.tpl @@ -1,9 +1,10 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_user" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_user" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--USER_ADMIN_CONFIG_HEADER--}</strong></td> + <strong>{--USER_ADMIN_CONFIG_HEADER--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -11,9 +12,9 @@ <tr> <td width="400" align="right">{--USER_ADMIN_LIMIT_USER--}:</td> <td class="seperator" width="10"> </td> - <td width="170"><input type="text" name="user_limit" - class="admin_normal" value="{!__LIMIT_VALUE!}" size="4" - maxlength="6"></td> + <td width="170"> + <input type="text" name="user_limit" class="admin_normal" value="{?user_limit?}" size="4" maxlength="6" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -21,18 +22,18 @@ <tr> <td width="400" align="right">{--USER_ADMIN_ALPHA_USER--}:</td> <td class="seperator" width="10"> </td> - <td width="170"><input type="text" name="user_alpha" - class="admin_normal" value="{!__ALPHA_VALUE!}" size="4" - maxlength="6"></td> + <td width="170"> + <input type="text" name="user_alpha" class="admin_normal" value="{?user_alpha?}" size="4" maxlength="6" /> + </td> </tr> <tr> <td colspan="3" class="bottom2 seperator" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_wernis.tpl b/templates/de/html/admin/admin_config_wernis.tpl index d2faf9eda5..3220aa864e 100644 --- a/templates/de/html/admin/admin_config_wernis.tpl +++ b/templates/de/html/admin/admin_config_wernis.tpl @@ -1,9 +1,10 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_wernis" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_wernis" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--WERNIS_ADMIN_CONFIG_TITLE--}</strong></td> + <strong>{--WERNIS_ADMIN_CONFIG_TITLE--}</strong> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -11,9 +12,9 @@ <tr> <td width="300" height="30" align="right">{--WERNIS_ADMIN_API_ID--}:</td> <td class="seperator" width="10"> </td> - <td width="270"><input type="text" name="wernis_api_id" - class="admin_normal" value="$content[api_id]" size="2" - maxlength="20" /></td> + <td width="270"> + <input type="text" name="wernis_api_id" class="admin_normal" value="{?wernis_api_id?}" size="2" maxlength="20" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -21,9 +22,9 @@ <tr> <td width="300" height="30" align="right">{--WERNIS_ADMIN_API_MD5--}:</td> <td class="seperator" width="10"> </td> - <td width="270"><input type="text" name="wernis_api_md5" - class="admin_normal" value="$content[api_md5]" size="32" - maxlength="32" /></td> + <td width="270"> + <input type="text" name="wernis_api_md5" lass="admin_normal" value="{?wernis_api_md5?}" size="32" axlength="32" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -31,9 +32,9 @@ <tr> <td width="300" height="30" align="right">{--WERNIS_ADMIN_API_URL--}:</td> <td class="seperator" width="10"> </td> - <td width="270"><input type="text" name="wernis_api_url" - class="admin_normal" value="$content[api_url]" size="25" - maxlength="255" /></td> + <td width="270"> + <input type="text" name="wernis_api_url" lass="admin_normal" value="{?wernis_api_url?}" size="25" axlength="255" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -42,7 +43,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_REFID--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_refid" class="admin_normal" value="$content[refid]" size="5" maxlength="20" /> + <input type="text" name="wernis_refid" class="admin_normal" value="{?wernis_refid?}" size="5" maxlength="20" /> </td> </tr> <tr> @@ -62,7 +63,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_MIN_PAYOUT--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_min_payout" class="admin_normal" value="$content[min_payout]" size="5" maxlength="20" /> Wernis + <input type="text" name="wernis_min_payout" class="admin_normal" value="{?wernis_min_payout?}" size="5" maxlength="20" /> Wernis </td> </tr> <tr> @@ -72,7 +73,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_MIN_WITHDRAW--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_min_withdraw" class="admin_normal" value="$content[min_withdraw]" size="5" maxlength="20" /> Wernis + <input type="text" name="wernis_min_withdraw" class="admin_normal" value="{?wernis_min_withdraw?}" size="5" maxlength="20" /> Wernis </td> </tr> <tr> @@ -82,7 +83,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FACTOR--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_payout_factor" class="admin_normal" value="$content[payout_factor]" size="5" maxlength="20" /> + <input type="text" name="wernis_payout_factor" class="admin_normal" value="{?wernis_payout_factor?}" size="5" maxlength="20" /> </td> </tr> <tr> @@ -92,7 +93,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FACTOR--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_withdraw_factor" class="admin_normal" value="$content[withdraw_factor]" size="5" maxlength="20" /> + <input type="text" name="wernis_withdraw_factor" class="admin_normal" value="{?wernis_withdraw_factor?}" size="5" maxlength="20" /> </td> </tr> <tr> @@ -102,7 +103,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FEE_PERCENT--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_payout_fee_percent" class="admin_normal" value="$content[payout_fee_percent]" size="5" maxlength="20" /> + <input type="text" name="wernis_payout_fee_percent" class="admin_normal" value="{?wernis_payout_fee_percent?}" size="5" maxlength="20" /> </td> </tr> <tr> @@ -112,7 +113,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FEE_PERCENT--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_withdraw_fee_percent" class="admin_normal" value="$content[withdraw_fee_percent]" size="5" maxlength="20" />% + <input type="text" name="wernis_withdraw_fee_percent" class="admin_normal" value="{?wernis_withdraw_fee_percent?}" size="5" maxlength="20" />% </td> </tr> <tr> @@ -122,7 +123,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_FEE_FIX--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_payout_fee_fix" class="admin_normal" value="$content[payout_fee_fix]" size="5" maxlength="20" /> {?POINTS?} + <input type="text" name="wernis_payout_fee_fix" class="admin_normal" value="{?wernis_payout_fee_fix?}" size="5" maxlength="20" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr> @@ -132,7 +133,7 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_FEE_FIX--}:</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="text" name="wernis_withdraw_fee_fix" class="admin_normal" value="$content[withdraw_fee_fix]" size="5" maxlength="20" /> {?POINTS?} + <input type="text" name="wernis_withdraw_fee_fix" class="admin_normal" value="{?wernis_withdraw_fee_fix?}" size="5" maxlength="20" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr> @@ -145,8 +146,8 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_PAYOUT_ACTIVE--}</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="radio" name="wernis_payout_active" value="Y"{!__CFG_WERNIS_PAYOUT_ACTIVE_Y!} /> {--YES--} - <input type="radio" name="wernis_payout_active" value="N"{!__CFG_WERNIS_PAYOUT_ACTIVE_N!} /> {--NO--} + <input type="radio" name="wernis_payout_active" value="Y"$content[wernis_payout_active_y] /> {--YES--} + <input type="radio" name="wernis_payout_active" value="N"$content[wernis_payout_active_n] /> {--NO--} </td> </tr> <tr> @@ -156,18 +157,18 @@ <td width="300" height="30" align="right">{--WERNIS_ADMIN_WITHDRAW_ACTIVE--}</td> <td class="seperator" width="10"> </td> <td width="270"> - <input type="radio" name="wernis_withdraw_active" value="Y"{!__CFG_WERNIS_WITHDRAW_ACTIVE_Y!} /> {--YES--} - <input type="radio" name="wernis_withdraw_active" value="N"{!__CFG_WERNIS_WITHDRAW_ACTIVE_N!} /> {--NO--} + <input type="radio" name="wernis_withdraw_active" value="Y"$content[wernis_withdraw_active_y] /> {--YES--} + <input type="radio" name="wernis_withdraw_active" value="N"$content[wernis_withdraw_active_n] /> {--NO--} </td> </tr> <tr> <td colspan="3" class="seperator bottom2" height="5"> </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--SAVE_SETTINGS--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_config_yoomedia.tpl b/templates/de/html/admin/admin_config_yoomedia.tpl index df7194c541..3518c3d416 100644 --- a/templates/de/html/admin/admin_config_yoomedia.tpl +++ b/templates/de/html/admin/admin_config_yoomedia.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_yoomedia" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_yoomedia" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -11,7 +11,7 @@ {--ADMIN_CONFIG_YOOMEDIA_ID--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_id" value="$content[yoomedia_id]" /> + <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_id" value="{?yoomedia_id?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -20,7 +20,7 @@ {--ADMIN_CONFIG_YOOMEDIA_SID--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_sid" value="$content[yoomedia_sid]" /> + <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_sid" value="{?yoomedia_sid?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -29,7 +29,7 @@ {--ADMIN_CONFIG_YOOMEDIA_PASSWD--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="20" maxlength="255" name="yoomedia_passwd" value="$content[yoomedia_passwd]" /> + <input type="text" class="admin_normal" size="20" maxlength="255" name="yoomedia_passwd" value="{?yoomedia_passwd?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -38,7 +38,7 @@ {--ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_max_reload" value="$content[yoomedia_tm_max_reload]" /> + <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_max_reload" value="{?yoomedia_tm_max_reload?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -47,7 +47,7 @@ {--ADMIN_CONFIG_YOOMEDIA_TM_MIN_WAIT--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_wait" value="$content[yoomedia_tm_min_wait]" /> + <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_wait" value="{?yoomedia_tm_min_wait?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -56,7 +56,7 @@ {--ADMIN_CONFIG_YOOMEDIA_TM_CLICKS_REMAIN--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_tm_clicks_remain" value="$content[yoomedia_tm_clicks_remain]" /> + <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_tm_clicks_remain" value="{?yoomedia_tm_clicks_remain?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -65,7 +65,7 @@ {--ADMIN_CONFIG_YOOMEDIA_TM_MIN_PAY--} </td> <td width="200" style="padding-left: 10px"> - <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_pay" value="$content[yoomedia_tm_min_pay]" /> + <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_pay" value="{?yoomedia_tm_min_pay?}" /> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> @@ -75,9 +75,9 @@ </td> <td width="200" style="padding-left: 10px"> <select name="yoomedia_erotic_allowed" class="admin_select" size="1"> - <option value="0"{!__CFG_YOOMEDIA_EROTIC_NONE!}>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE--}</option> - <option value="1"{!__CFG_YOOMEDIA_EROTIC_INCLUDE!}>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE--}</option> - <option value="2"{!__CFG_YOOMEDIA_EROTIC_ONLY!} />{--ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY--}</option> + <option value="0"$content[yoomedia_erotic_allowed_0]>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE--}</option> + <option value="1"$content[yoomedia_erotic_allowed_1]>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE--}</option> + <option value="2"$content[yoomedia_erotic_allowed_2]>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY--}</option> </select> </td> </tr> diff --git a/templates/de/html/admin/admin_contct_user_form.tpl b/templates/de/html/admin/admin_contct_user_form.tpl index 8ee7d64be4..945bef7305 100644 --- a/templates/de/html/admin/admin_contct_user_form.tpl +++ b/templates/de/html/admin/admin_contct_user_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=user_contct&uid=$content[uid]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=user_contct&userid=$content[userid]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed" align="center"> <tr> <td align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_del_admins.tpl b/templates/de/html/admin/admin_del_admins.tpl index 319144d37b..76436e32b7 100644 --- a/templates/de/html/admin/admin_del_admins.tpl +++ b/templates/de/html/admin/admin_del_admins.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="5" align="center" class="admin_title bottom2" height="30"> @@ -11,7 +11,7 @@ <td align="center" class="admin_title bottom2 right2" width="160"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> <td align="center" class="admin_title bottom2" width="160"><strong>{--ADMIN_LA_MODE--}:</strong></td> </tr> - {!__ADMINS_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_del_bank_packages.tpl b/templates/de/html/admin/admin_del_bank_packages.tpl index 0fb2e37acc..b9ca77b323 100644 --- a/templates/de/html/admin/admin_del_bank_packages.tpl +++ b/templates/de/html/admin/admin_del_bank_packages.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="5" align="center" class="admin_title" height="30"><strong>{--ADMIN_DELETE_BANK_PACKAGES--}:</strong> diff --git a/templates/de/html/admin/admin_del_cats.tpl b/templates/de/html/admin/admin_del_cats.tpl index 200c1b0342..ef57ae2068 100644 --- a/templates/de/html/admin/admin_del_cats.tpl +++ b/templates/de/html/admin/admin_del_cats.tpl @@ -1,15 +1,14 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_cats&do=del" method="post"> -<table border="0" cellspacing="0" cellpadding="0" - class="admin_table dashed" width="500"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_cats&do=del" method="post"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" height="30" class="admin_header bottom2"><strong>{--DELETE_CATEGORIES--}:</strong></td> </tr> - {!__CAT_ROWS!} + $content <tr> - <td class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_delete" - value="{--REMOVE_CATS--}" /></td> + <td class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_delete" value="{--REMOVE_CATS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_del_email_bonus.tpl b/templates/de/html/admin/admin_del_email_bonus.tpl index b844db4e95..2d0dec0b15 100644 --- a/templates/de/html/admin/admin_del_email_bonus.tpl +++ b/templates/de/html/admin/admin_del_email_bonus.tpl @@ -12,12 +12,12 @@ <td class="bottom2" align="center"><strong>{--EMAIL_DELETE_COUNT--}</strong></td> </tr> <tr> - <td class="right2 admin_misc" align="center">{!__ID!}</td> - <td class="right2 admin_misc" align="center">{!__SUBJECT!}</td> + <td class="right2 admin_misc" align="center">$content[id]</td> + <td class="right2 admin_misc" align="center">$content[subject]</td> <td class="right2 admin_misc" align="center"> - <a href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</a> + <a href="$content[url]" target="_blank">{--ADMIN_TEST_URL--}</a> </td> - <td class="right2 admin_misc" align="center">{!__ORDERED!}</td> - <td class="admin_misc" align="center">{!__CNT!}</td> + <td class="right2 admin_misc" align="center">$content[ordered]</td> + <td class="admin_misc" align="center">$content[cnt]</td> </tr> </table> diff --git a/templates/de/html/admin/admin_del_email_normal.tpl b/templates/de/html/admin/admin_del_email_normal.tpl index 4918cc205c..15fc8780cf 100644 --- a/templates/de/html/admin/admin_del_email_normal.tpl +++ b/templates/de/html/admin/admin_del_email_normal.tpl @@ -13,11 +13,11 @@ <td class="top2 right2" align="center"><strong>{--EMAIL_TIMESTAMP--}</strong></td> </tr> <tr> - <td class="top2 right2 admin_misc" align="center">{!__ID!}</td> - <td class="top2 right2 admin_misc" align="center">{!__SENDER!}</td> - <td class="top2 right2 admin_misc" align="center">{!__SUBJECT!}</td> + <td class="top2 right2 admin_misc" align="center">$content[id]</td> + <td class="top2 right2 admin_misc" align="center">$content[sender]</td> + <td class="top2 right2 admin_misc" align="center">$content[subject]</td> <td class="top2 right2 admin_misc" align="center"><a - href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</a></td> - <td class="top2 right2 admin_misc" align="center">{!__ORDERED!}</td> + href="$content[url]" target="_blank">{--ADMIN_TEST_URL--}</a></td> + <td class="top2 right2 admin_misc" align="center">$content[ordered]</td> </tr> </table> diff --git a/templates/de/html/admin/admin_del_email_notify.tpl b/templates/de/html/admin/admin_del_email_notify.tpl index 710f72e098..1e01861400 100644 --- a/templates/de/html/admin/admin_del_email_notify.tpl +++ b/templates/de/html/admin/admin_del_email_notify.tpl @@ -12,11 +12,11 @@ <td class="bottom2" align="center"><strong>{--EMAIL_DELETE_COUNT--}</strong></td> </tr> <tr> - <td class="right2 admin_misc" align="center">{!__ID!}</td> - <td class="right2 admin_misc" align="center">{!__SUBJECT!}</td> + <td class="right2 admin_misc" align="center">$content[id]</td> + <td class="right2 admin_misc" align="center">$content[subject]</td> <td class="right2 admin_misc" align="center"><a - href="{!__URL!}" target="_blank">{--ADMIN_TEST_URL--}</a></td> - <td class="right2 admin_misc" align="center">{!__ORDERED!}</td> - <td class="admin_misc" align="center">{!__CNT!}</td> + href="$content[url]" target="_blank">{--ADMIN_TEST_URL--}</a></td> + <td class="right2 admin_misc" align="center">$content[ordered]</td> + <td class="admin_misc" align="center">$content[cnt]</td> </tr> </table> diff --git a/templates/de/html/admin/admin_del_payments.tpl b/templates/de/html/admin/admin_del_payments.tpl index 3e3d24bf5d..b411f186d0 100644 --- a/templates/de/html/admin/admin_del_payments.tpl +++ b/templates/de/html/admin/admin_del_payments.tpl @@ -1,9 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=payments&do=del" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=payments&do=del" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" height="30" class="admin_title bottom"><strong>{--DELETE_PAYMENT--}:</strong></td> </tr> - {!__PAYMENT_ROWS!} + $content <tr> <td class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input diff --git a/templates/de/html/admin/admin_del_sponsor.tpl b/templates/de/html/admin/admin_del_sponsor.tpl index ac4929a997..4c54738aa6 100644 --- a/templates/de/html/admin/admin_del_sponsor.tpl +++ b/templates/de/html/admin/admin_del_sponsor.tpl @@ -1,19 +1,21 @@ -<form action="{?URL?}/modules.php?module=admin&what=del_sponsor&id={!__UID!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=del_sponsor&id=$content[userid]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td align="center" class="admin_title bottom2" height="28"> - <div class="admin_done">{--ADMIN_HEADER_DEL_SPONSOR_1--}{!__UID!}{--ADMIN_HEADER_DEL_SPONSOR_2--}</div> + <div class="admin_done">{--ADMIN_HEADER_DEL_SPONSOR_1--}$content[userid]{--ADMIN_HEADER_DEL_SPONSOR_2--}</div> </td> </tr> <tr><td height="5" class="seperator"> </td></tr> <tr> <td align="center"> - {--ADMIN_TEXT_DEL_SPONSOR_1--}{!__UID!}{--ADMIN_TEXT_DEL_SPONSOR_2--} + {--ADMIN_TEXT_DEL_SPONSOR_1--}$content[userid]{--ADMIN_TEXT_DEL_SPONSOR_2--} </td> </tr> <tr><td height="5" class="seperator"> </td></tr> <tr> - <td align="center"><a href="mailto:{!__EMAIL!}">{!__SNAME!} {!__FNAME!}</a>({!__EMAIL!})</td> + <td align="center"> + $content[gender] <a href="mailto:$content[email]">$content[surname] $content[family]</a>($content[email]) + </td> </tr> <tr><td height="5" class="seperator"> </td></tr> <tr> diff --git a/templates/de/html/admin/admin_del_surfbar_urls.tpl b/templates/de/html/admin/admin_del_surfbar_urls.tpl index 7a8b07ce16..e86e475343 100644 --- a/templates/de/html/admin/admin_del_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_del_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="3" class="admin_title" height="30"> 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 4cf9fa410d..b21ae5b505 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 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> <input type="hidden" name="id[$content[id]]" value="1" /> - <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" /> + <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid]" /> $content[userid] </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> diff --git a/templates/de/html/admin/admin_del_transfer_row.tpl b/templates/de/html/admin/admin_del_transfer_row.tpl index 8351fd1b2f..878ba33c1f 100644 --- a/templates/de/html/admin/admin_del_transfer_row.tpl +++ b/templates/de/html/admin/admin_del_transfer_row.tpl @@ -1,15 +1,15 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[idx]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[trans_id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2"> $content[stamp] </td> <td class="switch_sw$content[sw] bottom2 right2"> - $content[uid_from] + $content[userid_from] </td> <td class="switch_sw$content[sw] bottom2 right2"> - $content[uid_to] + $content[userid_to] </td> <td class="switch_sw$content[sw] bottom2 right2"> $content[reason] diff --git a/templates/de/html/admin/admin_del_user.tpl b/templates/de/html/admin/admin_del_user.tpl index 40e10de8da..7c90646966 100644 --- a/templates/de/html/admin/admin_del_user.tpl +++ b/templates/de/html/admin/admin_del_user.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=del_user&uid=$content[userid]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=del_user&userid=$content[userid]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> diff --git a/templates/de/html/admin/admin_edit_admins.tpl b/templates/de/html/admin/admin_edit_admins.tpl index ab411fdda8..50d215539b 100644 --- a/templates/de/html/admin/admin_edit_admins.tpl +++ b/templates/de/html/admin/admin_edit_admins.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed" align="center"> <tr> <td colspan="6" align="center" class="admin_title bottom2" height="30"> @@ -12,7 +12,7 @@ <td align="center" class="admin_title bottom2 right2" width="100"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> <td align="center" class="admin_title bottom2" width="100"><strong>{--ADMIN_LA_MODE--}:</strong></td> </tr> - {!__ADMINS_ROWS!} + $content <tr> <td colspan="6" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_edit_bank_packages.tpl b/templates/de/html/admin/admin_edit_bank_packages.tpl index e8da10ba3e..5b44b7e960 100644 --- a/templates/de/html/admin/admin_edit_bank_packages.tpl +++ b/templates/de/html/admin/admin_edit_bank_packages.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="90%" class="admin_table dashed" align="center"> <tr> <td colspan="4" align="center" class="admin_title bottom2" height="30"> 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 ff48bff305..1c674bc968 100644 --- a/templates/de/html/admin/admin_edit_bank_packages_row.tpl +++ b/templates/de/html/admin/admin_edit_bank_packages_row.tpl @@ -9,7 +9,7 @@ </td> <td width="33%" align="center" valign="top" style="padding:2px" class="switch_sw$content[sw] bottom2"> {--ADMIN_BANK_PACKAGE_ACCOUNT_FEE--}:<br /> - <input type="text" name="account_fee[$content[id]]" size="5" maxlength="10" value="$content[account_fee]" /> {?POINTS?} + <input type="text" name="account_fee[$content[id]]" size="5" maxlength="10" value="$content[account_fee]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr> @@ -19,7 +19,7 @@ </td> <td align="center" valign="top" style="padding:2px" class="switch_sw$content[sw] bottom2 right2"> {--ADMIN_BANK_PACKAGE_TRANSFER_FEE--}:<br /> - <input type="text" name="transfer_fee[$content[id]]" size="5" maxlength="10" value="$content[transfer_fee]" /> {?POINTS?} + <input type="text" name="transfer_fee[$content[id]]" size="5" maxlength="10" value="$content[transfer_fee]" /> <span class="tiny">({?POINTS?})</span> </td> <td align="center" valign="top" style="padding:2px" class="switch_sw$content[sw] bottom2"> {--ADMIN_BANK_PACKAGE_OUTPUT_MODE--}:<br /> @@ -51,7 +51,7 @@ </td> <td align="center" valign="top" style="padding:2px" class="switch_sw$content[sw] bottom2"> {--ADMIN_BANK_PACKAGE_FREE_ACCOUNT_INCOME--}:<br /> - <input type="text" name="free_account_income[$content[id]]" size="10" maxlength="20" value="$content[free_account_income]" /> {?POINTS?} + <input type="text" name="free_account_income[$content[id]]" size="10" maxlength="20" value="$content[free_account_income]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_edit_cats.tpl b/templates/de/html/admin/admin_edit_cats.tpl index 51f72c2e89..eaa60d97d0 100644 --- a/templates/de/html/admin/admin_edit_cats.tpl +++ b/templates/de/html/admin/admin_edit_cats.tpl @@ -1,11 +1,11 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_cats&do=edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_cats&do=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="3" height="30" class="admin_header bottom2"> <strong>{--EDIT_CATEGORIES--}:</strong> </td> </tr> -{!__CAT_ROWS!} +$content <tr> <td align="center" colspan="3" class="admin_footer"> <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_edit_email.tpl b/templates/de/html/admin/admin_edit_email.tpl index b8cfdbc4e1..fcb4225e4b 100644 --- a/templates/de/html/admin/admin_edit_email.tpl +++ b/templates/de/html/admin/admin_edit_email.tpl @@ -1,9 +1,10 @@ -<form action="{?URL?}/modules.php?module=admin&what=edit_emails" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_emails" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td width="10" height="30" class="admin_title seperator"> </td> - <td align="center" colspan="3" class="admin_title"><strong>{--ADMIN_EDIT_EMAIL--}:</strong> - ({!__ID_VALUE!})</td> + <td align="center" colspan="3" class="admin_title"> + <strong>{--ADMIN_EDIT_EMAIL--}:</strong> ($content[id]) + </td> <td width="10" class="admin_title seperator"> </td> </tr> <tr> @@ -11,9 +12,9 @@ <td align="right" class="top2"><strong>{--EDIT_URL--}:</strong> </td> <td width="5" class="top2 seperator"> </td> - <td class="top2"><input type="text" name="url" - class="admin_normal" size="30" maxlength="255" - value="{!__URL_VALUE!}"></td> + <td class="top2"> + <input type="text" name="url" class="admin_normal" size="30" maxlength="255" value="$content[url]" /> + </td> <td width="10" class="top2 seperator"> </td> </tr> <tr> @@ -21,9 +22,9 @@ <td align="right" class="top2"><strong>{--EMAIL_EDIT_SUBJ--}:</strong> </td> <td width="5" class="top2" seperator> </td> - <td class="top2"><input type="text" name="subj" - class="admin_normal" size="30" maxlength="255" - value="{!__SUBJ_VALUE!}"></td> + <td class="top2"> + <input type="text" name="subj" class="admin_normal" size="30" maxlength="255" value="$content[subject]" /> + </td> <td width="10" class="top2" seperator> </td> </tr> <tr> @@ -31,14 +32,15 @@ <td align="right" class="top2"><strong>{--EMAIL_EDIT_TEXT--}:</strong> </td> <td width="5" class="top2 seperator"> </td> - <td class="top2"><textarea name="text" class="admin_normal" - rows="8" cols="28">{!__TEXT_VALUE!}</textarea></td> + <td class="top2"> + <textarea name="text" class="admin_normal" rows="8" cols="28">$content[text]</textarea> + </td> <td width="10" class="top2 seperator"> </td> </tr> <tr> <td width="10" class="admin_footer seperator top2" height="35"> </td> <td align="center" height="30" colspan="3" class="admin_footer top2"> - <input type="hidden" name="id" value="{!__ID_VALUE!}"/ > + <input type="hidden" name="id" value="$content[id]"/ > <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input type="submit" name="save" class="admin_submit" value="{--ADMIN_CHANGE_EMAIL--}" /> </td> diff --git a/templates/de/html/admin/admin_edit_email_row.tpl b/templates/de/html/admin/admin_edit_email_row.tpl index dd0cee6b0b..f958cd02c8 100644 --- a/templates/de/html/admin/admin_edit_email_row.tpl +++ b/templates/de/html/admin/admin_edit_email_row.tpl @@ -6,7 +6,7 @@ <td class="switch_sw$content[sw] top2" width="5"> </td> <td class="switch_sw$content[sw] top2"> $content[subj] - ({--EMAIL_SENDER--}: $content[uid]; $content[pay]; $content[cat]) + ({--EMAIL_SENDER--}: $content[userid]; $content[pay]; $content[cat]) </td> <td class="switch_sw$content[sw] top2" width="10"> </td> </tr> diff --git a/templates/de/html/admin/admin_edit_email_select.tpl b/templates/de/html/admin/admin_edit_email_select.tpl index 8912b69cb0..0d06ccccdd 100644 --- a/templates/de/html/admin/admin_edit_email_select.tpl +++ b/templates/de/html/admin/admin_edit_email_select.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=edit_emails" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_emails" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td width="10" height="30" class="admin_title seperator"> </td> @@ -6,7 +6,7 @@ </td> <td width="10" class="admin_title seperator"> </td> </tr> - {!__EMAIL_SELECT_ROWS!} + $content <tr> <td width="10" class="admin_footer seperator top2"> </td> <td align="center" height="30" colspan="3" class="admin_footer top2"> diff --git a/templates/de/html/admin/admin_edit_payments.tpl b/templates/de/html/admin/admin_edit_payments.tpl index 6d6879877c..9d62b608bc 100644 --- a/templates/de/html/admin/admin_edit_payments.tpl +++ b/templates/de/html/admin/admin_edit_payments.tpl @@ -1,9 +1,9 @@ -<form action="{?URL?}/modules.php?module=admin&what=payments&do=edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=payments&do=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" colspan="2" class="admin_title bottom2" height="30"><strong>{--EDIT_PAYMENT--}:</strong></td> </tr> - {!__PAYMENT_ROWS!} + $content <tr> <td class="admin_footer" colspan="2"> <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_edit_payments_row.tpl b/templates/de/html/admin/admin_edit_payments_row.tpl index bd49851a18..3c5fb22304 100644 --- a/templates/de/html/admin/admin_edit_payments_row.tpl +++ b/templates/de/html/admin/admin_edit_payments_row.tpl @@ -1,15 +1,16 @@ <tr> <td class="admin_title bottom" colspan="2" align="center" height="20"> - <strong>{--PAYMENT_ID--} $content[id]:</strong></td> + <strong>{--PAYMENT_ID--} $content[id]:</strong> + </td> </tr> <tr> <td colspan="2" height="5" class="switch_sw$content[sw] seperator"> </td> </tr> <tr> <td class="switch_sw$content[sw]" align="right">{--PAY_TIME--}: </td> - <td class="switch_sw$content[sw]"><input type="text" - name="time[$content[id]]" class="admin_normal" value="$content[time]" - size="3" maxlength="5">{--_SECONDS--}</td> + <td class="switch_sw$content[sw]"> + <input type="text" name="time[$content[id]]" class="admin_normal" value="$content[time]" size="3" maxlength="5" />{--_SECONDS--} + </td> </tr> <tr> <td colspan="2" height="5" class="switch_sw$content[sw] seperator"> </td> @@ -17,27 +18,27 @@ <tr> <td class="switch_sw$content[sw]" align="right">{--PAY_PAYMENT--}: </td> - <td class="switch_sw$content[sw]"><input type="text" - name="pay[$content[id]]" class="admin_normal" value="$content[pay]" - size="5" maxlength="8">{?POINTS?}</td> + <td class="switch_sw$content[sw]"> + <input type="text" name="pay[$content[id]]" class="admin_normal" value="$content[pay]" size="5" maxlength="8" />{?POINTS?} + </td> </tr> <tr> <td colspan="2" height="5" class="switch_sw$content[sw] seperator"> </td> </tr> <tr> <td class="switch_sw$content[sw]" align="right">{--PAY_PRICE--}: </td> - <td class="switch_sw$content[sw]"><input type="text" - name="price[$content[id]]" class="admin_normal" - value="$content[price]" size="5" maxlength="8">{?POINTS?}</td> + <td class="switch_sw$content[sw]"> + <input type="text" name="price[$content[id]]" class="admin_normal" value="$content[price]" size="5" maxlength="8" /> <span class="tiny">({?POINTS?})</span> + </td> </tr> <tr> <td colspan="2" height="5" class="switch_sw$content[sw] seperator"> </td> </tr> <tr> <td class="switch_sw$content[sw]" align="right">{--PAY_TITLE--}: </td> - <td class="switch_sw$content[sw]"><input type="text" - name="title[$content[id]]" class="admin_normal" - value="$content[title]" size="25" maxlength="255" class="seperator"> </td> + <td class="switch_sw$content[sw]"> + <input type="text" name="title[$content[id]]" class="admin_normal" value="$content[title]" size="25" maxlength="255" /> + </td> </tr> <tr> <td colspan="2" height="5" class="switch_sw$content[sw] bottom"> </td> diff --git a/templates/de/html/admin/admin_edit_rallyes.tpl b/templates/de/html/admin/admin_edit_rallyes.tpl index b376c727db..9c324692e3 100644 --- a/templates/de/html/admin/admin_edit_rallyes.tpl +++ b/templates/de/html/admin/admin_edit_rallyes.tpl @@ -1,15 +1,15 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> <strong>{--RALLYE_EDIT_RALLYES--}:</strong></td> </tr> - {!__RALLYE_ROWS!} + $content <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="change" class="admin_submit" - value="{--RALLYE_CHANGE_ADMIN--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="change" class="admin_submit" value="{--RALLYE_CHANGE_ADMIN--}" /> + </td> </tr> </table> </form> 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 821b1ff679..82a973c94e 100644 --- a/templates/de/html/admin/admin_edit_sponsor_add_points.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_add_points.tpl @@ -1,10 +1,10 @@ -<form action="{?URL?}/modules.php?module=admin&what=edit_sponsor&mode=add_points&id={!__SPONSOR_ID!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_sponsor&mode=add_points&id=$content[id]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr><td class="admin_title seperator" height="10" colspan="3"> </td></tr> <tr> <td class="admin_title" colspan="3" align="center"> {--ADMIN_ADD_POINTS_TO_SPONSOR--}:<br /> - <strong>{!__SPONSOR_VALUE!}</strong> + <strong>$content[contact]</strong> </td> </tr> <tr><td class="admin_title seperator bottom2" height="10" colspan="3"> </td></tr> @@ -12,7 +12,7 @@ <tr> <td align="right">{--ADMIN_SUM_SPONSOR_POINTS--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points" size="6" maxlength="7" class="admin_normal" /></td> + <td><input type="text" class="admin_normal" name="points" size="6" maxlength="7" /></td> </tr> <tr><td height="5" colspan="3" class="seperator"> </td></tr> <tr> diff --git a/templates/de/html/admin/admin_edit_sponsor_edit.tpl b/templates/de/html/admin/admin_edit_sponsor_edit.tpl index 69869cbadd..1f45b7eff2 100644 --- a/templates/de/html/admin/admin_edit_sponsor_edit.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_edit.tpl @@ -1,8 +1,8 @@ -<div align="center"><form action="{?URL?}/modules.php?module=admin&what=edit_sponsor&id={!__SPONSOR_ID!}&mode=edit" method="post"> +<div align="center"><form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="5" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_SPONSOR_ENTER_COMPANY_DATA--}: ({!__SPONSOR_ID!})</strong> + <strong>{--ADMIN_SPONSOR_ENTER_COMPANY_DATA--}: ($content[id])</strong> </td> </tr> <tr> @@ -20,7 +20,7 @@ </td> <td class="seperator" width="10"> </td> <td width="255"> - <input type="text" name="company" class="admin_normal" size="20" maxlength="255" value="{!__COMPANY!}" /> + <input type="text" name="company" class="admin_normal" size="20" maxlength="255" value="$content[company]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -31,7 +31,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="position" class="admin_normal" size="20" maxlength="255" value="{!__POSITION!}" /> + <input type="text" name="position" class="admin_normal" size="20" maxlength="255" value="$content[position]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -42,7 +42,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="tax_ident" class="admin_normal" size="20" maxlength="255" value="{!__TAX_IDENT!}" /> + <input type="text" name="tax_ident" class="admin_normal" size="20" maxlength="255" value="$content[tax_ident]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -63,9 +63,9 @@ <td class="seperator" width="10"> </td> <td width="255"> <select name="gender" class="admin_select" size="1"> - <option value="M"{!__GENDER_M!}">{--GENDER_M--}</option> - <option value="F"{!__GENDER_F!}">{--GENDER_F--}</option> - <option value="C"{!__GENDER_C!}">{--GENDER_C--}</option> + <option value="M"$content[gender_m]>{--GENDER_M--}</option> + <option value="F"$content[gender_f]>{--GENDER_F--}</option> + <option value="C"$content[gender_c]>{--GENDER_C--}</option> </select> </td> <td width="10"> </td> @@ -78,8 +78,8 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="surname" class="admin_normal" size="8" maxlength="255" value="{!__SURNAME!}" /> - <input type="text" name="family" class="admin_normal" size="8" maxlength="255" value="{!__FAMILY!}" /> + <input type="text" name="surname" class="admin_normal" size="8" maxlength="255" value="$content[surname]" /> + <input type="text" name="family" class="admin_normal" size="8" maxlength="255" value="$content[family]" /> </td> <td width="10"> </td> </tr> @@ -91,7 +91,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="street_nr1" class="admin_normal" size="20" maxlength="255" value="{!__STREET1!}" /> + <input type="text" name="street_nr1" class="admin_normal" size="20" maxlength="255" value="$content[street_nr1]" /> </td> <td width="10"> </td> </tr> @@ -102,7 +102,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="street_nr2" class="admin_normal" size="20" maxlength="255" value="{!__STREET2!}" /> + <input type="text" name="street_nr2" class="admin_normal" size="20" maxlength="255" value="$content[street_nr2]" /> </td> <td width="10"> </td> </tr> @@ -114,8 +114,8 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="country" class="admin_normal" size="2" maxlength="3" value="{!__COUNTRY!}" />-<input type="text" name="zip" class="admin_normal" size="5" maxlength="6" value="{!__ZIP!}" /> - <input type="text" name="city" class="admin_normal" size="15" maxlength="255" value="{!__CITY!}" /> + <input type="text" name="country" class="admin_normal" size="2" maxlength="3" value="$content[country]" />-<input type="text" name="zip" class="admin_normal" size="5" maxlength="6" value="$content[zip]" /> + <input type="text" name="city" class="admin_normal" size="15" maxlength="255" value="$content[city]" /> </td> <td width="10"> </td> </tr> @@ -127,7 +127,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="phone" class="admin_normal" size="20" maxlength="255" value="{!__PHONE!}" /> + <input type="text" name="phone" class="admin_normal" size="20" maxlength="255" value="$content[phone]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -138,7 +138,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="fax" class="admin_normal" size="20" maxlength="255" value="{!__FAX!}" /> + <input type="text" name="fax" class="admin_normal" size="20" maxlength="255" value="$content[fax]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -149,7 +149,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="cell" class="admin_normal" size="20" maxlength="255" value="{!__CELL!}" /> + <input type="text" name="cell" class="admin_normal" size="20" maxlength="255" value="$content[cell]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -157,11 +157,11 @@ <tr> <td width="10"> </td> <td align="right"> - {--ADDY--}: + {--EMAIL_ADDRESS--}: </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="email" class="admin_normal" size="30" maxlength="255" value="{!__EMAIL!}" /> + <input type="text" name="email" class="admin_normal" size="30" maxlength="255" value="$content[email]" /> </td> <td width="10"> </td> </tr> @@ -172,7 +172,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="url" class="admin_normal" size="30" maxlength="255" value="{!__URL!}" /> + <input type="text" name="url" class="admin_normal" size="30" maxlength="255" value="$content[url]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -218,10 +218,7 @@ </td> <td class="seperator" width="10"> </td> <td style="padding-left: 15px"> - <select name="receive_warnings" class="admin_select" size="1"> - <option value="Y">{--YES--}</option> - <option value="N">{--NO--}</option> - </select> + $content[receive_warnings] </td> <td class="seperator" width="10"> </td> </tr> @@ -232,7 +229,7 @@ </td> <td class="seperator" width="10"> </td> <td> - {!__INTERVAL!} + $content[interval] </td> <td class="seperator" width="10"> </td> </tr> 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 b90133c540..c01fbff8ab 100644 --- a/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl +++ b/templates/de/html/admin/admin_edit_sponsor_sub_points.tpl @@ -1,10 +1,10 @@ -<form action="{?URL?}/modules.php?module=admin&what=edit_sponsor&mode=sub_points&id={!__SPONSOR_ID!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_sponsor&mode=sub_points&id=$content[id]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr><td class="admin_title seperator" height="10" colspan="3"> </td></tr> <tr> <td class="admin_title" colspan="3" align="center"> {--ADMIN_SUB_POINTS_FROM_SPONSOR--}:<br /> - <strong>{!__SPONSOR_VALUE!}</strong> + <strong>$content[contact]</strong> </td> </tr> <tr><td class="admin_title seperator bottom2" height="10" colspan="3"> </td></tr> @@ -12,7 +12,7 @@ <tr> <td align="right">{--ADMIN_SUM_SPONSOR_POINTS--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points" size="6" maxlength="7" class="admin_normal" /></td> + <td><input type="text" class="admin_normal" name="points" size="6" maxlength="7" /></td> </tr> <tr><td height="5" colspan="3" class="seperator"> </td></tr> <tr> diff --git a/templates/de/html/admin/admin_edit_surfbar_urls.tpl b/templates/de/html/admin/admin_edit_surfbar_urls.tpl index 58d57437cc..80456c8ad2 100644 --- a/templates/de/html/admin/admin_edit_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_edit_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="2" class="admin_title" height="30"> diff --git a/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl index 1c9d9149da..9ccb996a0e 100644 --- a/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ <tr> <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]"> <input type="hidden" name="id[$content[id]]" value="1" /> - <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" /> + <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid]" /> $content[userid] </td> <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]"> diff --git a/templates/de/html/admin/admin_edit_user.tpl b/templates/de/html/admin/admin_edit_user.tpl index 9404c0488c..0c6abc2591 100644 --- a/templates/de/html/admin/admin_edit_user.tpl +++ b/templates/de/html/admin/admin_edit_user.tpl @@ -1,83 +1,94 @@ -<form action="{?URL?}/modules.php?module=admin&what=edit_user&uid=$content" method="post"> -<table border="0" cellspacing="0" cellpadding="0" width="400" - class="admin_table dashed" align="center"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=edit_user&userid=$content[userid]" method="post"> +<table border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed" align="center"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EDIT_USER_PROFILE--}: ($content)</strong></td> + <strong>{--ADMIN_EDIT_USER_PROFILE--}: ($content)</strong> + </td> </tr> <tr> <td width="195" align="right" height="21">{--GENDER--}:</td> <td class="seperator" width="10"> </td> - <td width="195"><select name="gender" class="admin_select" - size="1"> - <option value="M"{!_GENDER_M!}">{--GENDER_M--}</option> - <option value="F"{!_GENDER_F!}">{--GENDER_F--}</option> - <option value="C"{!_GENDER_C!}">{--GENDER_C--}</option> - </select></td> + <td width="195"> + <select name="gender" class="admin_select" size="1"> + <option value="M"$content[gender_m]">{--GENDER_M--}</option> + <option value="F"$content[gender_f]">{--GENDER_F--}</option> + <option value="C"$content[gender_c]">{--GENDER_C--}</option> + </select> + </td> </tr> <tr> <td align="right">{--SURNAME--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="surname" class="admin_normal" - size="15" maxlength="255" value="{!_SURNAME!}"></td> + <td> + <input type="text" name="surname" class="admin_normal" size="15" maxlength="255" value="$content[surname]" /> + </td> </tr> <tr> <td align="right">{--FAMILY_NAME--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="family" class="admin_normal" - size="15" maxlength="255" value="{!_FAMILY!}"></td> + <td> + <input type="text" name="family" class="admin_normal" size="15" maxlength="255" value="$content[family]" /> + </td> </tr> <tr> <td align="right">{--STREET_NR--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="street_nr" class="admin_normal" - size="20" maxlength="255" value="{!_STREET!}"></td> + <td> + <input type="text" name="street_nr" class="admin_normal" size="20" maxlength="255" value="$content[street_nr]" /> + </td> </tr> <tr> <td align="right">{--COUNTRY--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="country" class="admin_normal" - size="2" maxlength="3" value="{!_COUNTRY!}"></td> + <td> + <input type="text" name="country" class="admin_normal" size="2" maxlength="3" value="$content[country]" /> + </td> </tr> <tr> <td align="right">{--ZIP--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="zip" class="admin_normal" size="5" - maxlength="6" value="{!_ZIP!}"></td> + <td> + <input type="text" name="zip" class="admin_normal" size="5" maxlength="6" value="$content[zip]" /> + </td> </tr> <tr> <td align="right">{--CITY--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="city" class="admin_normal" size="15" - maxlength="255" value="{!_CITY!}"></td> + <td> + <input type="text" name="city" class="admin_normal" size="15" maxlength="255" value="$content[city]" /> + </td> </tr> <tr> - <td class="bottom2" align="right">{--ADDY--}:</td> + <td class="bottom2" align="right">{--EMAIL_ADDRESS--}:</td> <td class="bottom2 seperator" width="10"> </td> - <td class="bottom2"><input type="text" name="email" - class="admin_normal" size="20" maxlength="255" value="{!_EMAIL!}"> + <td class="bottom2"> + <input type="text" name="email" class="admin_normal" size="20" maxlength="255" value="$content[email]" /> </td> </tr> <tr> - <td colspan="3" align="center" class="admin_footer bottom2"><div class="tiny">{--ADMIN_EDIT_USER_PASSWORD_NOTE--}</div></td> + <td colspan="3" align="center" class="admin_footer bottom2"> + <div class="tiny">{--ADMIN_EDIT_USER_PASSWORD_NOTE--}</div> + </td> </tr> <tr> <td align="right">{--ADMIN_PASS1--}:</td> <td class="seperator" width="10"> </td> - <td><input type="password" name="pass1" class="admin_normal" - size="5" maxlength="255"></td> + <td> + <input type="password" name="pass1" class="admin_normal" size="5" maxlength="255" /> + </td> </tr> <tr> <td class="bottom2" align="right">{--ADMIN_PASS2--}:</td> <td class="bottom2 seperator" width="10"> </td> - <td class="bottom2"><input type="password" name="pass2" - class="admin_normal" size="5" maxlength="255"></td> + <td class="bottom2"> + <input type="password" name="pass2" class="admin_normal" size="5" maxlength="255" /> + </td> </tr> <tr> - <td colspan="3" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="edit" class="admin_submit" - value="{--CHANGE_PROFILE--}" /></td> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--CHANGE_PROFILE--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_email_archiv.tpl b/templates/de/html/admin/admin_email_archiv.tpl index 0985632de0..1962170fff 100644 --- a/templates/de/html/admin/admin_email_archiv.tpl +++ b/templates/de/html/admin/admin_email_archiv.tpl @@ -4,5 +4,7 @@ <td colspan="3" align="center" height="25" class="admin_title"><strong class="admin_done">{--ADMIN_POOL_CONTENT--}</strong></td> </tr> - {!__TOP_EMAIL_NAV!} {!__EMAIL_ROWS!} {!__BOTTOM_EMAIL_NAV!} + $content[top_email_nav] + $content[rows] + $content[bottom_email_nav] </table> diff --git a/templates/de/html/admin/admin_email_archiv_row.tpl b/templates/de/html/admin/admin_email_archiv_row.tpl index 7205c2f0a5..1dd1e5d46b 100644 --- a/templates/de/html/admin/admin_email_archiv_row.tpl +++ b/templates/de/html/admin/admin_email_archiv_row.tpl @@ -32,7 +32,7 @@ <td align="center" class="switch_sw$content[sw] top bottom right"> {--EMAIL_RECEIVERS--}:<br /> <strong class="admin_misc">$content[sent]</strong> ({--EMAIL_RUIDS--}: - <strong class="admin_misc">$content[ruids]</strong>) + <strong class="admin_misc">$content[ruserids]</strong>) </td> <td align="center" class="switch_sw$content[sw] top bottom right"> {--USERS_LINKS--}:<br /> @@ -70,7 +70,7 @@ <div><strong class="admin_misc">$content[url]</strong></div> </td> <td align="center" class="switch_sw$content[sw] top"> - {--__UNUSED--}:<br /> + {--_UNUSED--}:<br /> <strong class="admin_misc">---</strong> </td> </tr> diff --git a/templates/de/html/admin/admin_email_nav_row.tpl b/templates/de/html/admin/admin_email_nav_row.tpl index bf4b1b41a2..efcd70bab2 100644 --- a/templates/de/html/admin/admin_email_nav_row.tpl +++ b/templates/de/html/admin/admin_email_nav_row.tpl @@ -1,13 +1,13 @@ <tr> - <td class="admin_title{!__NAV_TOP!}" colspan="{!__NAV_COLSPAN!}" align="center"> + <td class="admin_title$content[top]" colspan="$content[span]" align="center"> <table border="0" cellspacing="0" cellpadding="0"> - {!__NAV_SEP!} + $content[sep] <tr> <td class="admin_pagenav" align="left"> - [ {--EMAILS_PAGENAV--}: {!__NAV_OUTPUT!} ]</td> + [ {--EMAILS_PAGENAV--}: $content[nav] ]</td> </tr> <tr> - <td colspan="{!__NAV_COLSPAN!}" class="seperator"> </td> + <td colspan="$content[span]" class="seperator"> </td> </tr> </table> </td> diff --git a/templates/de/html/admin/admin_ext_reg_form.tpl b/templates/de/html/admin/admin_ext_reg_form.tpl index 80b21d2371..e0e861554d 100644 --- a/templates/de/html/admin/admin_ext_reg_form.tpl +++ b/templates/de/html/admin/admin_ext_reg_form.tpl @@ -1,4 +1,4 @@ <a name="ext_$content[ext_name]"></a> -<form action="{?URL?}/modules.php?module=admin&what=extensions&reg_ext=$content[id]" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=extensions&reg_ext=$content[id]" method="post" style="margin-bottom: 0px"> <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_REGISTER_EXTENSION--}" /> </form> diff --git a/templates/de/html/admin/admin_ext_sql_table.tpl b/templates/de/html/admin/admin_ext_sql_table.tpl index 9634e11aec..3622b731e0 100644 --- a/templates/de/html/admin/admin_ext_sql_table.tpl +++ b/templates/de/html/admin/admin_ext_sql_table.tpl @@ -5,6 +5,6 @@ <strong>$content[title]:</strong> </td> </tr> -$content[out] +$content[rows] </table> </div> diff --git a/templates/de/html/admin/admin_extensions.tpl b/templates/de/html/admin/admin_extensions.tpl index 7769b73a87..e3deede0c4 100644 --- a/templates/de/html/admin/admin_extensions.tpl +++ b/templates/de/html/admin/admin_extensions.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=extensions" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=extensions" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="510" align="center" class="admin_table dashed"> <tr> <td colspan="5" align="center" class="admin_title" height="30"> @@ -12,7 +12,7 @@ <td align="center" class="admin_title bottom2 right2" width="90"><strong>{--ADMIN_EXT_ACTIVE--}</strong></td> <td align="center" class="admin_title bottom2" width="90"><strong>{--ADMIN_EXT_VERSION--}</strong></td> </tr> - {!__EXT_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"> <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_extensions_delete.tpl b/templates/de/html/admin/admin_extensions_delete.tpl index ef48f2b68b..d437b20929 100644 --- a/templates/de/html/admin/admin_extensions_delete.tpl +++ b/templates/de/html/admin/admin_extensions_delete.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=extensions" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=extensions" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" align="center" class="admin_title" height="30"><strong>{--ADMIN_REMOVING_THESE_EXTENSIONS--}</strong> @@ -10,7 +10,7 @@ <td align="center" class="admin_title bottom2" width="80"><strong>{--ADMIN_EXT_VERSION--}</strong></td> <td align="center" class="admin_title bottom2" width="220"> </td> </tr> - {!__EXTENSIONS_ROWS!} + $content <tr> <td colspan="4" class="admin_footer"><input type="submit" name="remove" class="admin_delete" diff --git a/templates/de/html/admin/admin_extensions_delete_row_404.tpl b/templates/de/html/admin/admin_extensions_delete_row_404.tpl new file mode 100644 index 0000000000..93a1652f67 --- /dev/null +++ b/templates/de/html/admin/admin_extensions_delete_row_404.tpl @@ -0,0 +1,8 @@ +<tr> + <td class="switch_sw$content[sw] bottom2 right2" align="center"> + <strong>$content[id]</strong> + </td> + <td class="switch_sw$content[sw] bottom2" colspan="3" align="center"> + Erweiterung nicht auffindbar! + </td> +</tr> diff --git a/templates/de/html/admin/admin_extensions_edit.tpl b/templates/de/html/admin/admin_extensions_edit.tpl index 14b52933c9..3188411e08 100644 --- a/templates/de/html/admin/admin_extensions_edit.tpl +++ b/templates/de/html/admin/admin_extensions_edit.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=extensions" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=extensions" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="370" align="center" class="admin_table dashed"> <tr> @@ -11,7 +11,7 @@ <td align="center" class="admin_title bottom2 right2" width="80"><strong>{--ADMIN_EXT_CSSFILE--}</strong></td> <td align="center" class="admin_title bottom2 right2" width="80"><strong>{--ADMIN_EXT_ACTIVE--}</strong></td> </tr> - {!__EXTENSIONS_ROWS!} + $content <tr> <td colspan="4" class="admin_footer"><input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> @@ -19,4 +19,4 @@ value="{--SAVE_SETTINGS--}" /></td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_extensions_list.tpl b/templates/de/html/admin/admin_extensions_list.tpl index d3e7149976..11f5d85d80 100644 --- a/templates/de/html/admin/admin_extensions_list.tpl +++ b/templates/de/html/admin/admin_extensions_list.tpl @@ -1,22 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> -<tr> - <td colspan="5" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EXT_NEW_FOUND_TITLE--}:</strong></td> -</tr> -<tr> - <td align="center" width="5%" class="admin_title bottom2 right2">{--ID_SELECT--}</td> - <td align="center" width="35%" class="admin_title bottom2 right2">{--ADMIN_EXT_DOWNLOAD_LINK--}</td> - <td align="center" width="30%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_CTIME--}</td> - <td align="center" width="15%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_SIZE--}</td> - <td align="center" width="15%" class="admin_title bottom2">{--ADMIN_EXT_FILE_VERSION--}</td> -</tr> -{!__EXTENSIONS_ROWS!} -<tr> - <td colspan="2" align="center" class="admin_title right2"> - {--ADMIN_EXT_TOTAL_FOUND--}: <strong>{!__TEXT_VALUE!}</strong> - </td> - <td colspan="3" align="right" class="admin_title right2"> - {--ADMIN_EXT_TOTAL_FSIZE--}: <strong>{!__TKBYTES_VALUE!} {--KBYTES--}</strong> - </td> -</tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_gmenu_delete.tpl b/templates/de/html/admin/admin_gmenu_delete.tpl index 8d68c528db..cbd2258585 100644 --- a/templates/de/html/admin/admin_gmenu_delete.tpl +++ b/templates/de/html/admin/admin_gmenu_delete.tpl @@ -1,21 +1,23 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=guestedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="2" class="admin_header" height="40"> - <strong>{--DEL_GUEST_MENU--}</strong></td> + <strong>{--DEL_GUEST_MENU--}</strong> + </td> </tr> <tr> <td align="center" colspan="2" class="admin_header bottom2"> - {--DEL_MENU_1--}{!__CHK_VALUE!}{--DEL_MENU_2--}</td> + {--DEL_MENU_1--}$content[chk]{--DEL_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td colspan="2" class="admin_footer"><input - type="hidden" name="ok" value="del"> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}"> <input - type="submit" class="admin_delete" name="submit" - value="{--DEL_ENTRIES--}"></td> + <td colspan="2" class="admin_footer"> + <input type="hidden" name="ok" value="del" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="submit" class="admin_delete" name="submit" value="{--DEL_ENTRIES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_gmenu_edit.tpl b/templates/de/html/admin/admin_gmenu_edit.tpl index 792783eb37..0b5ef92266 100644 --- a/templates/de/html/admin/admin_gmenu_edit.tpl +++ b/templates/de/html/admin/admin_gmenu_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=guestedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 right2" align="center" width="30" height="30"><strong>{--ID_SELECT--}</strong></td> @@ -8,10 +8,10 @@ <td class="admin_title bottom2 right2" align="center"><strong>{--DISPLAY_TITLE--}</strong></td> <td class="admin_title bottom2" align="center"><strong>{--SORT_NAVIGATION--}</strong></td> </tr> -{!__MENU_ROWS!} +$content[rows] <tr> <td colspan="5" class="admin_footer"> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" class="admin_normal" /> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> <input type="submit" class="admin_submit" name="edit" value="{--EDIT_MENUS--}" /> <input type="submit" class="admin_submit" name="status" value="{--CHANGE_MENUS--}" /> <input type="submit" class="admin_delete submit" name="del" value="{--DEL_MENUS--}" /> diff --git a/templates/de/html/admin/admin_gmenu_edit_form.tpl b/templates/de/html/admin/admin_gmenu_edit_form.tpl index 8307296a76..66f5f43a14 100644 --- a/templates/de/html/admin/admin_gmenu_edit_form.tpl +++ b/templates/de/html/admin/admin_gmenu_edit_form.tpl @@ -1,22 +1,24 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=guestedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="2" class="admin_header" height="40"> - <strong>{--EDIT_GUEST_MENU--}</strong></td> + <strong>{--EDIT_GUEST_MENU--}</strong> + </td> </tr> <tr> <td align="center" colspan="2" class="admin_header bottom2"> - {--EDIT_MENU_1--}{!__CHK_VALUE!}{--EDIT_MENU_2--}</td> + {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td class="admin_footer" colspan="2"><input - type="hidden" name="ok" value="edit"> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}"> <input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" class="admin_submit" name="submit" - value="{--SUBMIT_CHANGES--}" /></td> + <td class="admin_footer" colspan="2"> + <input type="hidden" name="ok" value="edit" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="submit" value="{--SUBMIT_CHANGES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_gmenu_status.tpl b/templates/de/html/admin/admin_gmenu_status.tpl index aabde93d0b..97ff77a633 100644 --- a/templates/de/html/admin/admin_gmenu_status.tpl +++ b/templates/de/html/admin/admin_gmenu_status.tpl @@ -1,25 +1,26 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=guestedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" height="5" class="admin_title seperator"> </td> </tr> <tr> - <td align="center" colspan="4" class="admin_title"><strong>{--CHANGE_GUEST_MENU--}</strong><br /> - <br /> - {--CHANGE_MENU_1--}{!__CHK_VALUE!}{--CHANGE_MENU_2--}</td> + <td align="center" colspan="4" class="admin_title"> + <strong>{--CHANGE_GUEST_MENU--}</strong><br /> + <br /> + {--CHANGE_MENU_1--}$content[chk]{--CHANGE_MENU_2--} + </td> </tr> <tr> <td colspan="4" height="5" class="admin_title seperator bottom2"> </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> <td colspan="4" align="center" height="40" class="admin_footer"> - <input type="hidden" name="ok" value="status" /> <input - type="hidden" name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}" /> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" - class="admin_normal" /> <input type="submit" - class="admin_submit" name="submit" value="{--CHANGE_ENTRIES--}" /> + <input type="hidden" name="ok" value="status" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" class="admin_submit" name="submit" value="{--CHANGE_ENTRIES--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_guest_add.tpl b/templates/de/html/admin/admin_guest_add.tpl index 6c87a889f5..0ae80ab423 100644 --- a/templates/de/html/admin/admin_guest_add.tpl +++ b/templates/de/html/admin/admin_guest_add.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=guest_add" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=guest_add" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td height="8" colspan="5"></td> @@ -7,9 +7,9 @@ <td width="10"> </td> <td align="right" width="245">{--ENTER_TITLE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table" width="245"><input - type="text" name="title" class="admin_normal" size="30" - maxlength="50"></td> + <td align="center" class="admin_table" width="245"> + <input type="text" name="title" class="admin_normal" size="30" maxlength="50" /> + </td> <td width="10"> </td> </tr> <tr> @@ -19,8 +19,10 @@ <td width="10"> </td> <td align="right">{--SELECT_WHAT_NAME--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__WHAT_SELECTION!}<br /> - <span class="admin_note">({--CREATE_WHAT_FIRST--})</span></td> + <td align="center" class="admin_table"> + $content[what_selection]<br /> + <span class="admin_note">({--CREATE_WHAT_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -30,8 +32,10 @@ <td width="10"> </td> <td align="right">{--SELECT_PARENT_MENU--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__ACTION_SELECTION!}<br /> - <span class="admin_note">({--CREATE_ACTION_FIRST--})</span></td> + <td align="center" class="admin_table"> + $content[action_selection]<br /> + <span class="admin_note">({--CREATE_ACTION_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -41,7 +45,7 @@ <td width="10"> </td> <td align="right">{--SELECT_BELOW_MENU--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__BELOW_SELECTION!}</td> + <td align="center" class="admin_table">$content[below_selection]</td> <td width="10"> </td> </tr> <tr> @@ -51,11 +55,12 @@ <td width="10"> </td> <td align="right">{--MENU_IS_VISIBLE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table"><select - class="admin_select" name="visible" size="1"> - <option value="Y">{--YES--}</option> - <option value="N">{--NO--}</option> - </select></td> + <td align="center" class="admin_table"> + <select class="admin_select" name="visible" size="1"> + <option value="Y">{--YES--}</option> + <option value="N">{--NO--}</option> + </select> + </td> <td width="10"> </td> </tr> <tr> @@ -65,11 +70,12 @@ <td width="10"> </td> <td align="right">{--MENU_IS_ACTIVE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table"><select - class="admin_select" name="active" size="1"> - <option value="N">{--YES--}</option> - <option value="Y">{--NO--}</option> - </select></td> + <td align="center" class="admin_table"> + <select class="admin_select" name="active" size="1"> + <option value="N">{--YES--}</option> + <option value="Y">{--NO--}</option> + </select> + </td> <td width="10"> </td> </tr> <tr> @@ -80,10 +86,9 @@ </tr> <tr> <td class="admin_table" width="10"> </td> - <td align="center" class="admin_table" align="center" colspan="3"> - <input type="reset" class="admin_reset" class="admin_normal" - value="{--CLEAR_FORM--}" /> <input type="submit" - class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> + <td align="center" class="admin_table" colspan="3"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> </td> <td class="admin_table" width="10"> </td> </tr> diff --git a/templates/de/html/admin/admin_list_admins.tpl b/templates/de/html/admin/admin_list_admins.tpl index 19c2cadd4a..0c84ea1396 100644 --- a/templates/de/html/admin/admin_list_admins.tpl +++ b/templates/de/html/admin/admin_list_admins.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=admins_edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="640" class="admin_table dashed" align="center"> <tr> @@ -12,7 +12,7 @@ <td align="center" class="admin_title bottom2 right2" width="160"><strong>{--ADMIN_ADMINS_ACCESS_MODE--}:</strong></td> <td align="center" class="admin_title bottom2" width="160"><strong>{--ADMIN_LA_MODE--}:</strong></td> </tr> - {!__ADMINS_ROWS!} + $content <tr> <td colspan="5" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_list_autopurge.tpl b/templates/de/html/admin/admin_list_autopurge.tpl index 109518c3a6..a91540a3c9 100644 --- a/templates/de/html/admin/admin_list_autopurge.tpl +++ b/templates/de/html/admin/admin_list_autopurge.tpl @@ -5,12 +5,12 @@ <td class="admin_title bottom2 right2" align="center"><strong>{--GENDER--}</strong></td> <td class="admin_title bottom2 right2" align="center"><strong>{--SURNAME--}</strong></td> <td class="admin_title bottom2 right2" align="center"><strong>{--FAMILY_NAME--}</strong></td> - <td class="admin_title bottom2 right2" align="center"><strong>{--ADDY--}</strong></td> + <td class="admin_title bottom2 right2" align="center"><strong>{--EMAIL_ADDRESS--}</strong></td> <td class="admin_title bottom2 right2" align="center"><strong>{--MEMBER_JOINED--}</strong></td> <td class="admin_title bottom2 right2" align="center"><strong>{--LAST_SEEN--}</strong></td> <td class="admin_title bottom2" align="center"><strong>{--AUTOPURGE_NOTIFIED--}</strong></td> </tr> - {!__AUTOPURGE_ROWS!} + $content[rows] <tr> <td colspan="8" class="admin_footer seperator"> </td> </tr> diff --git a/templates/de/html/admin/admin_list_autopurge_row.tpl b/templates/de/html/admin/admin_list_autopurge_row.tpl index 61509d5978..c6380cd1c0 100644 --- a/templates/de/html/admin/admin_list_autopurge_row.tpl +++ b/templates/de/html/admin/admin_list_autopurge_row.tpl @@ -1,10 +1,10 @@ <tr> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[uid]</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[userid]</td> <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[gender]</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[sname]</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[fname]</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[surname]</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[family]</td> <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[email]</td> <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[joined]</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[last]</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[last_online]</td> <td align="center" class="switch_sw$content[sw] bottom2">$content[notified]</td> </tr> diff --git a/templates/de/html/admin/admin_list_bank_package.tpl b/templates/de/html/admin/admin_list_bank_package.tpl index dc68c97ba5..740c813d00 100644 --- a/templates/de/html/admin/admin_list_bank_package.tpl +++ b/templates/de/html/admin/admin_list_bank_package.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_bank_package" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="8" align="center" class="admin_title" height="30"><strong>{--ADMIN_LIST_BANK_PACKAGES--}:</strong> @@ -14,7 +14,7 @@ <td width="80" align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_LIST_BANK_PACKAGES_ACCOUNT_INTEREST_MINUS--}</strong></td> <td width="120" align="center" class="admin_title bottom2"><strong>{--ADMIN_LIST_BANK_PACKAGES_STATUS--}</strong></td> </tr> - {!__BANK_PACKAGE_ROWS!} + $content <tr> <td colspan="8" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_list_beg.tpl b/templates/de/html/admin/admin_list_beg.tpl index 0e6a8f2a67..c696dad62f 100644 --- a/templates/de/html/admin/admin_list_beg.tpl +++ b/templates/de/html/admin/admin_list_beg.tpl @@ -2,27 +2,34 @@ class="admin_table dashed"> <tr> <td class="admin_header bottom2 right2" align="center" width="60"> - <strong>{--BEG_RANK--}</strong></td> + <strong>{--BEG_RANK--}</strong> + </td> <td class="admin_header bottom2 right2" align="center" width="90"> - <strong>{--_UID--}:</strong></td> - <td class="admin_header bottom2 right2" align="center"><strong>{--SURNAME_FAMILY--}:</strong> + <strong>{--_UID--}:</strong> + </td> + <td class="admin_header bottom2 right2" align="center"> + <strong>{--SURNAME_FAMILY--}:</strong> </td> - <td class="admin_header bottom2 right2" align="center"><strong>{--BEG_TOTAL--}:</strong> + <td class="admin_header bottom2 right2" align="center"> + <strong>{--BEG_TOTAL--}:</strong> </td> - <td class="admin_header bottom2" align="center" width="160"><strong>{--ADMIN_LAST_ONLINE--}:</strong> + <td class="admin_header bottom2" align="center" width="160"> + <strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__BEG_ROWS!} + $content[rows] <tr> - <td colspan="3" class="admin_header bottom2 right2" height="28" - align="right"><u>{--BEG_MEMBER_TOTAL--}:</u> </td> - <td class="admin_header bottom2 right2" height="28"> <u>{!__TOTAL!} - {?POINTS?}</u></td> + <td colspan="3" class="admin_header bottom2 right2" height="28" align="right"> + <u>{--BEG_MEMBER_TOTAL--}:</u> + </td> + <td class="admin_header bottom2 right2" height="28"> + <u>$content[total] {?POINTS?}</u> + </td> <td class="admin_header bottom2"> </td> </tr> <tr> <td colspan="5" class="admin_header" align="center" height="55"> - {!__BEG_WITHDRAW_FORM!} + $content[withdraw_form] </td> </tr> </table> @@ -31,6 +38,6 @@ <strong>{--ADMIN_BEG_WINNER_HIGLIGHTED--}</strong> <div class="admin_note"> - {--ADMIN_BEG_TIMEOUT_1--} <strong>{!__AUTOPURGE_TIMEOUT!}</strong> {--ADMIN_BEG_TIMEOUT_2--} + {--ADMIN_BEG_TIMEOUT_1--} <strong>$content[autopurge_timeout]</strong> {--ADMIN_BEG_TIMEOUT_2--} </div> </div> diff --git a/templates/de/html/admin/admin_list_beg_form.tpl b/templates/de/html/admin/admin_list_beg_form.tpl index 52516c9de1..7bb6a6c03a 100644 --- a/templates/de/html/admin/admin_list_beg_form.tpl +++ b/templates/de/html/admin/admin_list_beg_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_beg" method="post" style="margin-bottom: 5px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_beg" method="post" style="margin-bottom: 5px"> <input type="submit" name="withdraw" class="admin_submit" value="{--ADMIN_BEG_WITHDRAW_NOW--}" /> </form> diff --git a/templates/de/html/admin/admin_list_beg_rows.tpl b/templates/de/html/admin/admin_list_beg_rows.tpl index 921b13de24..b54f954e7e 100644 --- a/templates/de/html/admin/admin_list_beg_rows.tpl +++ b/templates/de/html/admin/admin_list_beg_rows.tpl @@ -1,11 +1,11 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[win1]$content[cnt]$content[win2]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[win1]<a - href="{?URL?}/modules.php?module=admin&what=list_user&uid=$content[uid]">$content[uid]</a>$content[win2]</td> + href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[userid]</a>$content[win2]</td> <td class="switch_sw$content[sw] bottom2 right2"> $content[win1]<a - href="$content[email]">$content[gender] $content[sname] - $content[fname]</a>$content[win2]</td> + href="$content[email]">$content[gender] $content[surname] + $content[family]</a>$content[win2]</td> <td class="switch_sw$content[sw] bottom2 right2"> $content[turbo] {?POINTS?}</td> - <td class="switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> \ No newline at end of file diff --git a/templates/de/html/admin/admin_list_bonus.tpl b/templates/de/html/admin/admin_list_bonus.tpl index 0e35d47451..aa6310776e 100644 --- a/templates/de/html/admin/admin_list_bonus.tpl +++ b/templates/de/html/admin/admin_list_bonus.tpl @@ -1,33 +1,38 @@ -<table border="0" cellspacing="0" cellpadding="0" width="90%" - class="admin_table dashed"> +<table border="0" cellspacing="0" cellpadding="0" width="90%" class="admin_table dashed"> <tr> <td class="admin_header bottom2 right2" align="center" width="60"> - <strong>{--BONUS_RANK--}</strong></td> + <strong>{--BONUS_RANK--}</strong> + </td> <td class="admin_header bottom2 right2" align="center" width="90"> - <strong>{--_UID--}:</strong></td> - <td class="admin_header bottom2 right2" align="center"><strong>{--SURNAME_FAMILY--}:</strong> + <strong>{--_UID--}:</strong> + </td> + <td class="admin_header bottom2 right2" align="center"> + <strong>{--SURNAME_FAMILY--}:</strong> </td> - <td class="admin_header bottom2 right2" align="center"><strong>{--BONUS_TURBO_TOTAL2--}:</strong> + <td class="admin_header bottom2 right2" align="center"> + <strong>{--BONUS_TURBO_TOTAL2--}:</strong> </td> - <td class="admin_header bottom2" align="center" width="160"><strong>{--ADMIN_LAST_ONLINE--}:</strong> + <td class="admin_header bottom2" align="center" width="160"> + <strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__BONUS_ROWS!} + $content[rows] <tr> - <td colspan="3" class="admin_header bottom2 right2" height="28" - align="right"><u>{--BONUS_MEMBER_TOTAL--}:</u> </td> - <td class="admin_header bottom2 right2" height="28"> <u>{!__TOTAL!} - {?POINTS?}</u></td> + <td colspan="3" class="admin_header bottom2 right2" height="28" align="right"> + <u>{--BONUS_MEMBER_TOTAL--}:</u> + </td> + <td class="admin_header bottom2 right2" height="28"> <u>$content[total] {?POINTS?}</u></td> <td class="admin_header bottom2"> </td> </tr> <tr> <td colspan="5" class="admin_header" align="center" height="55"> - {!__BONUS_WITHDRAW_FORM!}</td> + $content[withdraw_form] + </td> </tr> </table> <div class="admin_note"> <strong>{--ADMIN_BONUS_WINNER_HIGLIGHTED--}</strong><br /> <br /> - {--ADMIN_BONUS_TIMEOUT_1--}<strong>{!__AUTOPURGE_TIMEOUT!}</strong>{--ADMIN_BONUS_TIMEOUT_2--} + {--ADMIN_BONUS_TIMEOUT_1--}<strong>$content[autopurge_timeout]</strong>{--ADMIN_BONUS_TIMEOUT_2--} </div> diff --git a/templates/de/html/admin/admin_list_bonus_emails_row.tpl b/templates/de/html/admin/admin_list_bonus_emails_row.tpl index d178349c7b..171b8fdb12 100644 --- a/templates/de/html/admin/admin_list_bonus_emails_row.tpl +++ b/templates/de/html/admin/admin_list_bonus_emails_row.tpl @@ -61,7 +61,7 @@ <div><strong class="admin_misc">$content[url]</strong></div> </td> <td align="center" class="top"> - {--__UNUSED--}:<br /> + {--_UNUSED--}:<br /> <strong class="admin_misc">---</strong> </td> </tr> diff --git a/templates/de/html/admin/admin_list_bonus_form.tpl b/templates/de/html/admin/admin_list_bonus_form.tpl index bba9eaf75d..c270110cd4 100644 --- a/templates/de/html/admin/admin_list_bonus_form.tpl +++ b/templates/de/html/admin/admin_list_bonus_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_bonus" method="post" style="margin-bottom: 5px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_bonus" method="post" style="margin-bottom: 5px"> <input type="submit" name="withdraw" class="admin_submit" value="{--ADMIN_BONUS_WITHDRAW_NOW--}"/> </form> diff --git a/templates/de/html/admin/admin_list_bonus_rows.tpl b/templates/de/html/admin/admin_list_bonus_rows.tpl index 21b92f913b..c97190e9b1 100644 --- a/templates/de/html/admin/admin_list_bonus_rows.tpl +++ b/templates/de/html/admin/admin_list_bonus_rows.tpl @@ -1,7 +1,7 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[win1]$content[cnt]$content[win2]</td> - <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[win1]$content[uid]$content[win2]</td> + <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[win1]$content[userid]$content[win2]</td> <td class="switch_sw$content[sw] bottom2 right2"> $content[win1]<a href="$content[email]">$content[gender] $content[surname] $content[family]</a>$content[win2]</td> <td class="switch_sw$content[sw] bottom2 right2"> $content[points] {?POINTS?}</td> - <td class="switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> diff --git a/templates/de/html/admin/admin_list_cats.tpl b/templates/de/html/admin/admin_list_cats.tpl index cc97c8acc9..11dc114120 100644 --- a/templates/de/html/admin/admin_list_cats.tpl +++ b/templates/de/html/admin/admin_list_cats.tpl @@ -3,13 +3,14 @@ <tr> <td colspan="3" align="center" class="admin_header bottom2" height="50">{--USER_ID--}: <strong><a - href="{?URL?}/modules.php?module=admin&what=list_user&uid={!__UID!}">{!__UID!}</a></strong>({!__EMAIL!}) + href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[userid]</a></strong>($content[email]) </td> </tr> - {!__CATS_ROWS!} + $content[rows] <tr> - <td colspan="3" class="admin_footer" - style="padding-top: 10px; padding-bottom: 10px"><u>{--ADMIN_MEMBER_FUNCTIONS--}:</u><br /> - {!__MEMBER_LINKS!}</td> + <td colspan="3" class="admin_footer" style="padding-top: 10px; padding-bottom: 10px"> + <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u><br /> + $content[member_links] + </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_cats_404.tpl b/templates/de/html/admin/admin_list_cats_404.tpl index 93b532cbeb..e8b15adb7f 100644 --- a/templates/de/html/admin/admin_list_cats_404.tpl +++ b/templates/de/html/admin/admin_list_cats_404.tpl @@ -4,8 +4,8 @@ <td height="10" class="admin_header seperator"> </td> </tr> <tr> - <td align="center" class="admin_header"><strong>{--ADMIN_MEM_NO_CATS_1--}<a - href="{?URL?}/modules.php?module=admin&what=list_user&uid={!__UID!}">{!__UID!}</a>{--ADMIN_MEM_NO_CATS_2--}</strong> + <td align="center" class="admin_header"> + <strong>{--ADMIN_MEM_NO_CATS_1--}<a href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[userid]</a>{--ADMIN_MEM_NO_CATS_2--}</strong> </td> </tr> <tr> @@ -15,8 +15,10 @@ <td height="10" class="admin_header seperator"> </td> </tr> <tr> - <td align="center" class="admin_header"><u>{--ADMIN_MEMBER_FUNCTIONS--}:</u><br /> - {!__MEMBER_LINKS!}</td> + <td align="center" class="admin_header"> + <u>{--ADMIN_MEMBER_FUNCTIONS--}:</u><br /> + $content[member_links] + </td> </tr> <tr> <td height="10" class="admin_header seperator"> </td> diff --git a/templates/de/html/admin/admin_list_country.tpl b/templates/de/html/admin/admin_list_country.tpl index 519f88b7c7..4960fa468c 100644 --- a/templates/de/html/admin/admin_list_country.tpl +++ b/templates/de/html/admin/admin_list_country.tpl @@ -1,8 +1,9 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_country" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_country" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> - <td colspan="4" align="center" class="admin_title" height="30"><strong>{--ADMIN_LIST_COUNTRIES--}:</strong> + <td colspan="4" align="center" class="admin_title" height="30"> + <strong>{--ADMIN_LIST_COUNTRIES--}:</strong> </td> </tr> <tr> @@ -11,18 +12,19 @@ <td width="400" align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_COUNTRY_NAME--}:</strong></td> <td width="120" align="center" class="admin_title bottom2"><strong>{--ADMIN_COUNTRY_STATUS--}</strong></td> </tr> - {!__COUNTRY_ROWS!} + $content[rows] <tr> - <td colspan="4" class="admin_footer"><input - type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="change" class="admin_submit" - value="{--ADMIN_DE_ACTIVATE--}" /> <input type="submit" - name="edit" class="admin_submit" value="{--ADMIN_EDIT--}" /> - <input type="submit" name="delete" class="admin_delete" - value="{--ADMIN_DELETE_ENTRIES--}" /></td> + <td colspan="4" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="change" class="admin_submit" value="{--ADMIN_DE_ACTIVATE--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_EDIT--}" /> + <input type="submit" name="delete" class="admin_delete" value="{--ADMIN_DELETE_ENTRIES--}" /> + </td> </tr> </table> </form> +</div> - {!__ADD_COUNTRY_FORM!} +<div align="center"> + $content[add_form] </div> diff --git a/templates/de/html/admin/admin_list_country_form.tpl b/templates/de/html/admin/admin_list_country_form.tpl index 20af8f717a..f4661d68e0 100644 --- a/templates/de/html/admin/admin_list_country_form.tpl +++ b/templates/de/html/admin/admin_list_country_form.tpl @@ -1,8 +1,8 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_country" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_country" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="4" align="center" class="admin_title" height="30"> - <strong>{!__COUNTRY_TITLE!}:</strong> + <strong>$content[title]:</strong> </td> </tr> <tr> @@ -11,11 +11,11 @@ <td width="300" align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_COUNTRY_NAME--}:</strong></td> <td width="120" align="center" class="admin_title bottom2"><strong>{--ADMIN_COUNTRY_STATUS--}</strong></td> </tr> - {!__COUNTRY_ROWS!} + $content[rows] <tr> <td colspan="4" class="admin_footer"> - {!__COUNTRY_RESET!} <input type="submit" name="{!__COUNTRY_MODE!}" - class="{!__COUNTRY_CLASS!}" value="{!__COUNTRY_SUBMIT!}" /> + $content[reset] + <input type="submit" name="$content[mode]" class="$content[class]" value="$content[submit]" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_country_row.tpl b/templates/de/html/admin/admin_list_country_row.tpl index 51b1ccf6a6..76c8422f7a 100644 --- a/templates/de/html/admin/admin_list_country_row.tpl +++ b/templates/de/html/admin/admin_list_country_row.tpl @@ -1,12 +1,12 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2 right2"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="$content[status]" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="$content[is_active]" /> </td> <td align="center" class="switch_sw$content[sw] bottom2 right2"> $content[code] </td> <td align="center" class="switch_sw$content[sw] bottom2 right2"> - $content[name] + $content[descr] </td> <td align="center" class="switch_sw$content[sw] bottom2"> $content[active] diff --git a/templates/de/html/admin/admin_list_doubler_already.tpl b/templates/de/html/admin/admin_list_doubler_already.tpl index 50ec23bc02..4ae04096bf 100644 --- a/templates/de/html/admin/admin_list_doubler_already.tpl +++ b/templates/de/html/admin/admin_list_doubler_already.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="540" class="admin_table dashed"> <tr> <td class="admin_title" align="center" height="30" colspan="4"> - <div class="big">{!__ADMIN_DOUBLER_LIST_ALREADY!}</div> + <div class="big">$content[list_already]</div> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_list_doubler_overview.tpl b/templates/de/html/admin/admin_list_doubler_overview.tpl index a3c37bd89a..5eeef7635f 100644 --- a/templates/de/html/admin/admin_list_doubler_overview.tpl +++ b/templates/de/html/admin/admin_list_doubler_overview.tpl @@ -17,20 +17,26 @@ <table border="0" cellspacing="0" cellpadding="0" width="275" class="admin_table dashed"> <tr> <td class="switch_sw1 bottom2" align="right" width="245"> - {--ADMIN_DOUBLER_ALREADY_ALL--}: </td> - <td class="switch_sw1 bottom2" align="center" width="30"><strong>{!__DOUBLER_ALREADY_ALL_LINK!}</strong> + {--ADMIN_DOUBLER_ALREADY_ALL--}: + </td> + <td class="switch_sw1 bottom2" align="center" width="30"> + <strong>$content[already_all_link]</strong> </td> </tr> <tr> <td class="switch_sw2 bottom2" align="right"> - {--ADMIN_DOUBLER_ALREADY_DIRECT--}: </td> - <td class="switch_sw2 bottom2" align="center"><strong>{!__DOUBLER_ALREADY_DIRECT_LINK!}</strong> + {--ADMIN_DOUBLER_ALREADY_DIRECT--}: + /td> + <td class="switch_sw2 bottom2" align="center"> + <strong>$content[already_direct_link]</strong> </td> </tr> <tr> <td class="switch_sw1" align="right"> - {--ADMIN_DOUBLER_ALREADY_REF--}: </td> - <td class="switch_sw1" align="center"><strong>{!__DOUBLER_ALREADY_REF_LINK!}</strong> + {--ADMIN_DOUBLER_ALREADY_REF--}: + </td> + <td class="switch_sw1" align="center"> + <strong>$content[already_ref_link]</strong> </td> </tr> </table> @@ -39,20 +45,26 @@ <table border="0" cellspacing="0" cellpadding="0" width="275" class="admin_table dashed"> <tr> <td class="switch_sw1 bottom2" align="right" width="245"> - {--ADMIN_DOUBLER_WAITING_ALL--}: </td> - <td class="switch_sw1 bottom2" align="center" width="30"><strong>{!__DOUBLER_WAITING_ALL_LINK!}</strong> + {--ADMIN_DOUBLER_WAITING_ALL--}: + </td> + <td class="switch_sw1 bottom2" align="center" width="30"> + <strong>$content[waiting_all_link]</strong> </td> </tr> <tr> <td class="switch_sw2 bottom2" align="right"> - {--ADMIN_DOUBLER_WAITING_DIRECT--}: </td> - <td class="switch_sw2 bottom2" align="center"><strong>{!__DOUBLER_WAITING_DIRECT_LINK!}</strong> + {--ADMIN_DOUBLER_WAITING_DIRECT--}: + </td> + <td class="switch_sw2 bottom2" align="center"> + <strong>$content[waiting_direct_link]</strong> </td> </tr> <tr> <td class="switch_sw1" align="right"> - {--ADMIN_DOUBLER_WAITING_REF--}: </td> - <td class="switch_sw1" align="center"><strong>{!__DOUBLER_WAITING_REF_LINK!}</strong> + {--ADMIN_DOUBLER_WAITING_REF--}: + </td> + <td class="switch_sw1" align="center"> + <strong>$content[waiting_ref_link]</strong> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_doubler_waiting.tpl b/templates/de/html/admin/admin_list_doubler_waiting.tpl index 79f5c9ab8c..5e29622be2 100644 --- a/templates/de/html/admin/admin_list_doubler_waiting.tpl +++ b/templates/de/html/admin/admin_list_doubler_waiting.tpl @@ -1,18 +1,14 @@ <table border="0" cellspacing="0" cellpadding="0" width="540" class="admin_table dashed"> <tr> - <td class="admin_title" align="center" height="30" colspan="4"><strong - class="big">{!__ADMIN_DOUBLER_LIST_WAITING!}</strong></td> + <td class="admin_title" align="center" height="30" colspan="4"> + <strong class="big">$content[list_waiting]</strong> + </td> </tr> <tr> - <td class="admin_title bottom2 right2" align="center" height="25" - width="25%"><div class="medium">{--_UID--}:</strong></td> - <td class="admin_title bottom2 right2" align="center" width="25%"> - <div class="medium">{?POINTS?}:</strong></td> - <td class="admin_title bottom2 right2" align="center" width="25%"> - <div class="medium">{--ADMIN_DOUBLER_PAYMENT_TIMEMARK--}:</strong> - </td> - <td class="admin_title bottom2" align="center" width="25%"><strong - class="medium">{--REMOTE_IP--}:</strong></td> + <td class="admin_title bottom2 right2" align="center" height="25" width="25%"><strong>{--_UID--}:</strong></td> + <td class="admin_title bottom2 right2" align="center" width="25%"><strong>{?POINTS?}:</strong></td> + <td class="admin_title bottom2 right2" align="center" width="25%"><strong>{--ADMIN_DOUBLER_PAYMENT_TIMEMARK--}:</strong></td> + <td class="admin_title bottom2" align="center" width="25%"><strong class="medium">{--REMOTE_IP--}:</strong></td> </tr> {!__ROWS_CONTENT!} <tr> diff --git a/templates/de/html/admin/admin_list_extensions.tpl b/templates/de/html/admin/admin_list_extensions.tpl index d3e7149976..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_extensions.tpl +++ b/templates/de/html/admin/admin_list_extensions.tpl @@ -1,22 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> -<tr> - <td colspan="5" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_EXT_NEW_FOUND_TITLE--}:</strong></td> -</tr> -<tr> - <td align="center" width="5%" class="admin_title bottom2 right2">{--ID_SELECT--}</td> - <td align="center" width="35%" class="admin_title bottom2 right2">{--ADMIN_EXT_DOWNLOAD_LINK--}</td> - <td align="center" width="30%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_CTIME--}</td> - <td align="center" width="15%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_SIZE--}</td> - <td align="center" width="15%" class="admin_title bottom2">{--ADMIN_EXT_FILE_VERSION--}</td> -</tr> -{!__EXTENSIONS_ROWS!} -<tr> - <td colspan="2" align="center" class="admin_title right2"> - {--ADMIN_EXT_TOTAL_FOUND--}: <strong>{!__TEXT_VALUE!}</strong> - </td> - <td colspan="3" align="right" class="admin_title right2"> - {--ADMIN_EXT_TOTAL_FSIZE--}: <strong>{!__TKBYTES_VALUE!} {--KBYTES--}</strong> - </td> -</tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_list_extensions_row.tpl b/templates/de/html/admin/admin_list_extensions_row.tpl index 271da06e74..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_extensions_row.tpl +++ b/templates/de/html/admin/admin_list_extensions_row.tpl @@ -1,13 +1 @@ -<tr> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[id].</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="$content[link]">$content[name]</a></td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[last]</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[size] {--KBYTES--}</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[new_ver] ($content[old_ver])</td> -</tr> -<tr> - <td class="switch_sw$content[sw] bottom2"> </td> - <td colspan="4" class="switch_sw$content[sw] bottom2"> - <div class="tiny">$content[info]</div> - </td> -</tr> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_list_holiday.tpl b/templates/de/html/admin/admin_list_holiday.tpl index cc2a350cd0..d117f63643 100644 --- a/templates/de/html/admin/admin_list_holiday.tpl +++ b/templates/de/html/admin/admin_list_holiday.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=del_holiday" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=del_holiday" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td width="10" class="admin_title bottom2 right2" align="center" @@ -10,7 +10,7 @@ <td width="100" class="admin_title bottom2 right2" align="center"><strong>{--ACCOUNT_STATUS--}:</strong></td> <td width="160" class="admin_title bottom2" align="center"><strong>{--ADMIN_LAST_ONLINE--}:</strong></td> </tr> - {!__HOLIDAY_ROWS!} + $content <tr> <td colspan="7" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_list_holiday_row.tpl b/templates/de/html/admin/admin_list_holiday_row.tpl index 411b1e7a33..aa9ef009aa 100644 --- a/templates/de/html/admin/admin_list_holiday_row.tpl +++ b/templates/de/html/admin/admin_list_holiday_row.tpl @@ -3,7 +3,7 @@ <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" class="admin_normal" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[uid] + $content[userid] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[start] @@ -18,6 +18,6 @@ $content[status] </td> <td class="switch_sw$content[sw] bottom2" align="center"> - $content[last] + $content[last_online] </td> </tr> diff --git a/templates/de/html/admin/admin_list_imprint.tpl b/templates/de/html/admin/admin_list_imprint.tpl new file mode 100644 index 0000000000..74ddcb26c8 --- /dev/null +++ b/templates/de/html/admin/admin_list_imprint.tpl @@ -0,0 +1,27 @@ +<div align="center"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_imprint" method="post"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> + <tr> + <td colspan="3" align="center" class="admin_title" height="30"> + <strong>{--ADMIN_CONFIG_IMPRINT--}:</strong> + </td> + </tr> + <tr> + <td align="center" class="admin_title bottom2 right2" width="60"><strong>{--KEY_SELECT--}</strong></td> + <td align="center" class="admin_title bottom2 right2" width="110"><strong>{--ADMIN_IMPRINT_KEY--}:</strong></td> + <td align="center" class="admin_title bottom2"><strong>{--ADMIN_IMPRINT_VALUE--}:</strong></td> + </tr> + $content + <tr> + <td colspan="3" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_EDIT--}" /> + <input type="submit" name="delete" class="admin_delete" value="{--ADMIN_DELETE_ENTRIES--}" /> + </td> + </tr> +</table> +</form> +</div> + +<div align="center"> +</div> diff --git a/templates/de/html/admin/admin_list_imprint_row.tpl b/templates/de/html/admin/admin_list_imprint_row.tpl new file mode 100644 index 0000000000..6944336192 --- /dev/null +++ b/templates/de/html/admin/admin_list_imprint_row.tpl @@ -0,0 +1,11 @@ +<tr> + <td align="center" class="switch_sw$content[sw] bottom2 right2"> + <input type="checkbox" class="admin_normal" title="{--ADMIN_IMPRINT_SELECT_ROW--} - $content[imprint_key]" name="id[$content[imprint_key]]" value="1" /> + </td> + <td align="center" class="switch_sw$content[sw] bottom2 right2"> + $content[imprint_key] + </td> + <td class="switch_sw$content[sw] bottom2" style="padding-left:5px"> + $content[imprint_value] + </td> +</tr> diff --git a/templates/de/html/admin/admin_list_imprint_row_none.tpl b/templates/de/html/admin/admin_list_imprint_row_none.tpl new file mode 100644 index 0000000000..17dbc05422 --- /dev/null +++ b/templates/de/html/admin/admin_list_imprint_row_none.tpl @@ -0,0 +1,5 @@ +<tr> + <td align="center" class="bottom2" colspan="3" height="30"> + <strong>{--ADMIN_IMPRINT_NO_ROWS--}</strong> + </td> +</tr> diff --git a/templates/de/html/admin/admin_list_links.tpl b/templates/de/html/admin/admin_list_links.tpl index 7173bdfb79..f921d48779 100644 --- a/templates/de/html/admin/admin_list_links.tpl +++ b/templates/de/html/admin/admin_list_links.tpl @@ -1,14 +1,14 @@ <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td colspan="4" align="center" class="admin_header bottom2" height="40"> - <strong><a href="{?URL?}/modules.php?module=admin&what=list_user&uid={!__UID!}">{!__SNAME_VALUE!} {!__FNAME_VALUE!}</a></strong> ({!__EMAIL_VALUE!}): + <strong><a href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[surname] $content[family]</a></strong> ($content[email]): </td> </tr> - {!__EMAIL_LIST!} + $content[rows] <tr> <td colspan="4" height="40" class="admin_header" align="center"> - {--MEMBER_TOTAL_LINKS_1--}{!__NUMS_VALUE!}{--MEMBER_TOTAL_LINKS_2--}<br /> - <a href="{?URL?}/modules.php?module=admin&what=list_links&uid={!__UID!}&del=all" onclick="return confirm('{--ADMIN_REALLY_DELETE_ALL_MAILS--}')">{--ADMIN_DEL_UNCONFIRMED_LINKS--}</a> + {--MEMBER_TOTAL_LINKS_1--}$content[nums]{--MEMBER_TOTAL_LINKS_2--}<br /> + <a href="{?URL?}/modules.php?module=admin&what=list_links&userid=$content[userid]&del=all" onclick="return confirm('{--ADMIN_REALLY_DELETE_ALL_MAILS--}')">{--ADMIN_DEL_UNCONFIRMED_LINKS--}</a> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_mods.tpl b/templates/de/html/admin/admin_list_mods.tpl new file mode 100644 index 0000000000..6780b76983 --- /dev/null +++ b/templates/de/html/admin/admin_list_mods.tpl @@ -0,0 +1,24 @@ +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_mods" method="post"> +<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed"> + <tr> + <td align="center" class="admin_title bottom2 right2" height="25"><strong>{--ID_SELECT--}</strong></td> + <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_NAME--}</strong></td> + <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_TITLE--}</strong></td> + <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_LOCKED--}</strong></td> + <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_HIDDEN--}</strong></td> + <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_ADMIN--}</strong></td> + <td align="center" class="admin_title bottom2"><strong>{--MODS_IS_MEMBER--}</strong></td> + </tr> + $content + <tr> + <td colspan="7" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--MODS_EDIT--}" /> + </td> + </tr> +</table> +</form> + +<div class="admin_note"> + {--MODS_ADMIN_EDIT_NOTE--} +</div> diff --git a/templates/de/html/admin/admin_list_mods_row.tpl b/templates/de/html/admin/admin_list_mods_row.tpl new file mode 100644 index 0000000000..632ff4430c --- /dev/null +++ b/templates/de/html/admin/admin_list_mods_row.tpl @@ -0,0 +1,23 @@ +<tr> + <td class="switch_sw$content[sw] bottom2 right2" align="center"> + <input type="checkbox" title="{--ID_SELECT--} $content[id]" class="admin_normal" name="sel[$content[id]]" value="1" /> + </td> + <td class="switch_sw$content[sw] bottom2 right2"> + $content[mod] + </td> + <td class="switch_sw$content[sw] bottom2 right2"> + $content[title] + </td> + <td class="switch_sw$content[sw] bottom2 right2" align="center"> + $content[locked] + </td> + <td class="switch_sw$content[sw] bottom2 right2" align="center"> + $content[hidden] + </td> + <td class="switch_sw$content[sw] bottom2 right2" align="center"> + $content[admin] + </td> + <td class="switch_sw$content[sw] bottom2" align="center"> + $content[mem] + </td> +</tr> diff --git a/templates/de/html/admin/admin_list_notify_emails_row.tpl b/templates/de/html/admin/admin_list_notify_emails_row.tpl index 0fed1bba75..88cefa6665 100644 --- a/templates/de/html/admin/admin_list_notify_emails_row.tpl +++ b/templates/de/html/admin/admin_list_notify_emails_row.tpl @@ -61,7 +61,7 @@ <div><strong class="admin_misc">$content[url]</strong></div> </td> <td align="center" class="top"> - {--__UNUSED--}:<br /> + {--_UNUSED--}:<br /> <strong class="admin_misc">---</strong> </td> </tr> diff --git a/templates/de/html/admin/admin_list_online.tpl b/templates/de/html/admin/admin_list_online.tpl new file mode 100644 index 0000000000..928f5f0047 --- /dev/null +++ b/templates/de/html/admin/admin_list_online.tpl @@ -0,0 +1,32 @@ +<table border="0" cellspacing="0" cellpadding="0" width="99%" align="center" class="admin_table dashed"> +<tr> + <td colspan="6" height="7" class="seperator"> </td> +</tr> +<tr> + <td colspan="8" align="left"> + <table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr> + <td width="10"> </td> + <td><strong>{--ADMIN_ONLINE_DETAILS--}</strong></td> + </tr> + </table> + </td> +</tr> +<tr> + <td colspan="8" height="10" class="seperator bottom"> </td> +</tr> +<tr> + <td align="center" width="5%" class="admin_title bottom right"><strong>{--ID_SELECT--}</strong></td> + <td align="center" width="10%" class="admin_title bottom right"><strong>{--_UID--}:</strong></td> + <td align="center" width="10%" class="admin_title bottom right"><strong>{--REMOTE_IP--}:</strong></td> + <td align="center" width="5%" class="admin_title bottom right"><strong>{--_REFID--}:</strong></td> + <td align="center" width="10%" class="admin_title bottom right"><strong>{--_MODULE--}:</strong></td> + <td align="center" width="10%" class="admin_title bottom right"><strong>{--MENU_ACTION--}:</strong></td> + <td align="center" width="5%" class="admin_title bottom right"><strong>{--MENU_WHAT--}:</strong></td> + <td align="center" width="10%" class="admin_title bottom"><strong>{--LAST_SEEN--}:</strong></td> +</tr> +$content[rows] +<tr> + <td colspan="8" class="admin_footer">$content</td> +</tr> +</table> diff --git a/templates/de/html/admin/admin_list_online_row.tpl b/templates/de/html/admin/admin_list_online_row.tpl new file mode 100644 index 0000000000..4db0933a1b --- /dev/null +++ b/templates/de/html/admin/admin_list_online_row.tpl @@ -0,0 +1,10 @@ +<tr> + <td align="center" width="5%" class="switch_sw$content[sw] bottom right">$content[id]</td> + <td align="center" width="15%" class="switch_sw$content[sw] bottom right">$content[userid]</td> + <td align="center" width="10%" class="switch_sw$content[sw] bottom right">$content[ip]</td> + <td align="center" width="5%" class="switch_sw$content[sw] bottom right">$content[refid]</td> + <td align="center" width="10%" class="switch_sw$content[sw] bottom right">$content[module]</td> + <td align="center" width="10%" class="switch_sw$content[sw] bottom right">$content[action]</td> + <td align="center" width="5%" class="switch_sw$content[sw] bottom right">$content[what]</td> + <td align="center" width="10%" class="switch_sw$content[sw] bottom">$content[timestamp]</td> +</tr> diff --git a/templates/de/html/admin/admin_list_payments.tpl b/templates/de/html/admin/admin_list_payments.tpl index 9599039ba3..62348e052e 100644 --- a/templates/de/html/admin/admin_list_payments.tpl +++ b/templates/de/html/admin/admin_list_payments.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=payments" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=payments" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td align="center" colspan="5" class="admin_title" height="30"><strong>{--EDIT_DEL_PAYMENT--}</strong> @@ -11,13 +11,13 @@ <td class="admin_title bottom2 right2" align="center"><strong>{--PAY_PRICE--}:</strong></td> <td class="admin_title bottom2" align="center"><strong>{--PAY_TITLE--}:</strong></td> </tr> - {!__PAYMENT_ROWS!} + $content <tr> - <td class="admin_footer" colspan="5"><input - type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="edit" class="admin_submit" - value="{--EDIT_PAY--}" /> <input type="submit" - name="del" class="admin_delete" value="{--DEL_PAY--}" /></td> + <td class="admin_footer" colspan="5"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--EDIT_PAY--}" /> + <input type="submit" name="del" class="admin_delete" value="{--DEL_PAY--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_list_payouts.tpl b/templates/de/html/admin/admin_list_payouts.tpl index 0552281a1b..687ce44ff6 100644 --- a/templates/de/html/admin/admin_list_payouts.tpl +++ b/templates/de/html/admin/admin_list_payouts.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_payouts" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_payouts" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="6" align="center" class="admin_title" height="30"><strong>{--PAYOUT_ADMIN_LIST_PAYOUTS--}:</strong> @@ -12,10 +12,10 @@ <td width="120" align="center" class="admin_title bottom2 right2"><strong>{--PAYOUT_TIMESTAMP--}</strong></td> <td width="220" align="center" class="admin_title bottom2"><strong>{--PAYOUT_STATUS--}</strong></td> </tr> - {!__PAYOUT_ROWS!} + $content <tr> - <td colspan="6" class="admin_footer"><a - href="{?URL?}/modules.php?module=admin&what=list_payouts&do=delete">{--PAYOUT_DELETE_ALL_REQUESTS--}</a> + <td colspan="6" class="admin_footer"> + <a href="{?URL?}/modules.php?module=admin&what=list_payouts&do=delete">{--PAYOUT_DELETE_ALL_REQUESTS--}</a> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_rallye_prices.tpl b/templates/de/html/admin/admin_list_rallye_prices.tpl index 420787190b..8400d926c6 100644 --- a/templates/de/html/admin/admin_list_rallye_prices.tpl +++ b/templates/de/html/admin/admin_list_rallye_prices.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="5" align="center" class="admin_title" height="30"><strong>{--RALLYE_EDIT_DEL_RALLYES--}:</strong> @@ -11,13 +11,12 @@ <td align="center" width="200" class="admin_title bottom2 right2"><strong>{--RALLYE_TSTART--}:</strong></td> <td align="center" width="200" class="admin_title bottom2"><strong>{--RALLYE_TEND--}:</strong></td> </tr> - {!__RALLYE_ROWS!} + $content <tr> - <td colspan="5" class="admin_footer"><input - type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="edit" class="admin_submit" - value="{--RALLYE_EDIT_ADMIN--}" /> <input type="submit" - name="del" class="admin_delete" value="{--RALLYE_DELETE_ADMIN--}" /> + <td colspan="5" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--RALLYE_EDIT_ADMIN--}" /> + <input type="submit" name="del" class="admin_delete" value="{--RALLYE_DELETE_ADMIN--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_rallye_usr.tpl b/templates/de/html/admin/admin_list_rallye_usr.tpl index 9d9347ebfa..7c146e5d48 100644 --- a/templates/de/html/admin/admin_list_rallye_usr.tpl +++ b/templates/de/html/admin/admin_list_rallye_usr.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" align="center" class="admin_title" height="30"> - <strong>{--RALLYE_LIST_USERS_1--}{!__RALLYE_VALUE!}{--RALLYE_LIST_USERS_2--}:</strong> + <strong>{--RALLYE_LIST_USERS_1--}$content[rallye]{--RALLYE_LIST_USERS_2--}:</strong> </td> </tr> <tr> @@ -10,7 +10,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--RALLYE_NEW_REFS--}:</strong></td> <td align="center" class="admin_title bottom2"><strong>{--RALLYE_REF_POINTS--}:</strong></td> </tr> -{!__RALLYE_USER_ROWS!} +$content[rows] <tr> <td colspan="4" class="admin_footer"> <span class="admin_note">{--RALLYE_REF_POINTS_NOTE--}</span> diff --git a/templates/de/html/admin/admin_list_rallye_usr_row.tpl b/templates/de/html/admin/admin_list_rallye_usr_row.tpl index 3f36ddcb51..e16a2d0aff 100644 --- a/templates/de/html/admin/admin_list_rallye_usr_row.tpl +++ b/templates/de/html/admin/admin_list_rallye_usr_row.tpl @@ -1,7 +1,7 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2 right2"> $content[bold_l]<a - href="{?URL?}/modules.php?module=admin&what=list_user&uid=$content[uid]">$content[uid]</a>$content[bold_r] + href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[userid]</a>$content[bold_r] </td> <td align="center" class="switch_sw$content[sw] bottom2 right2"> $content[bold_l]$content[old]$content[bold_r]</td> diff --git a/templates/de/html/admin/admin_list_rallyes.tpl b/templates/de/html/admin/admin_list_rallyes.tpl index 7252d1bd59..e3a1d3cda2 100644 --- a/templates/de/html/admin/admin_list_rallyes.tpl +++ b/templates/de/html/admin/admin_list_rallyes.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_rallyes" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="730" class="admin_table dashed"> <tr> <td colspan="6" align="center" class="admin_title" height="30"><strong>{--RALLYE_EDIT_DEL_RALLYES--}:</strong> @@ -8,13 +8,12 @@ <td align="center" width="10" class="admin_title bottom2 right2"><strong>{--ID_SELECT--}</strong></td> <td align="center" class="admin_title bottom2" colspan="5"><strong>{--RALLYE_LIST_OVERVIEW_TITLE--}:</strong></td> </tr> - {!__RALLYE_ROWS!} + $content[rows] <tr> - <td colspan="6" class="admin_footer"><input - type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="edit" class="admin_submit" - value="{--RALLYE_EDIT_ADMIN--}" /> <input type="submit" - name="del" class="admin_delete" value="{--RALLYE_DELETE_ADMIN--}" /> + <td colspan="6" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="edit" class="admin_submit" value="{--RALLYE_EDIT_ADMIN--}" /> + <input type="submit" name="del" class="admin_delete" value="{--RALLYE_DELETE_ADMIN--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_rallyes_row2.tpl b/templates/de/html/admin/admin_list_rallyes_row2.tpl index 930ab730c4..c65bcb86f8 100644 --- a/templates/de/html/admin/admin_list_rallyes_row2.tpl +++ b/templates/de/html/admin/admin_list_rallyes_row2.tpl @@ -1,7 +1,7 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2 right2"> $content[bold_l]<a - href="{?URL?}/modules.php?module=admin&what=list_user&uid=$content[uid]">$content[uid]</a>$content[bold_r] + href="{?URL?}/modules.php?module=admin&what=list_user&userid=$content[userid]">$content[userid]</a>$content[bold_r] </td> <td align="center" class="switch_sw$content[sw] bottom2 right2"> $content[bold_l]$content[old]$content[bold_r]</td> diff --git a/templates/de/html/admin/admin_list_refs.tpl b/templates/de/html/admin/admin_list_refs.tpl index cb41a3ec4f..145b93e3dd 100644 --- a/templates/de/html/admin/admin_list_refs.tpl +++ b/templates/de/html/admin/admin_list_refs.tpl @@ -1,14 +1,14 @@ <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td colspan="6" class="admin_title" height="30"> - <strong>{--ADMIN_LIST_REFERRALS_1--}<u>$content[uid]</u>{--ADMIN_LIST_REFERRALS_2--}</strong> + <strong>{--ADMIN_LIST_REFERRALS_1--}<u>$content[userid]</u>{--ADMIN_LIST_REFERRALS_2--}</strong> </td> </tr> <tr> <td width="5%" align="center" class="admin_header bottom2 right2"><strong>{--_UID--}</strong></td> <td width="5%" align="center" class="admin_header bottom2 right2"><strong>{--REFS_COUNT--}</strong></td> <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--SURNAME_FAMILY--}</strong></td> - <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--ADDY--}</strong></td> + <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--EMAIL_ADDRESS--}</strong></td> <td width="10%" align="center" class="admin_header bottom2 right2"><strong>{--ACCOUNT_STATUS--}</strong></td> <td width="10%" align="center" class="admin_header bottom2"><strong>{--MEMBER_JOINED--}</strong></td> </tr> diff --git a/templates/de/html/admin/admin_list_refs2.tpl b/templates/de/html/admin/admin_list_refs2.tpl index 2007985222..76a1bfa910 100644 --- a/templates/de/html/admin/admin_list_refs2.tpl +++ b/templates/de/html/admin/admin_list_refs2.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30"> - <strong>{--ADMIN_LIST_REFERRALS_1--}<u>$content[uid]</u>{--ADMIN_LIST_REFERRALS_2--}</strong> + <strong>{--ADMIN_LIST_REFERRALS_1--}<u>$content[userid]</u>{--ADMIN_LIST_REFERRALS_2--}</strong> </td> </tr> <tr><td class="seperator" height="6"> </td></tr> diff --git a/templates/de/html/admin/admin_list_refs_level.tpl b/templates/de/html/admin/admin_list_refs_level.tpl index f3d5ed2403..fc2ba2e256 100644 --- a/templates/de/html/admin/admin_list_refs_level.tpl +++ b/templates/de/html/admin/admin_list_refs_level.tpl @@ -11,7 +11,7 @@ <td width="5%" align="center" class="admin_header bottom2 right2"><strong>{--_UID--}</strong></td> <td width="5%" align="center" class="admin_header bottom2 right2"><strong>{--REFS_COUNT--}</strong></td> <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--SURNAME_FAMILY--}</strong></td> - <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--ADDY--}</strong></td> + <td width="35%" align="center" class="admin_header bottom2 right2"><strong>{--EMAIL_ADDRESS--}</strong></td> <td width="10%" align="center" class="admin_header bottom2 right2"><strong>{--ACCOUNT_STATUS--}</strong></td> <td width="10%" align="center" class="admin_header bottom2"><strong>{--MEMBER_JOINED--}</strong></td> </tr> diff --git a/templates/de/html/admin/admin_list_refs_norefs.tpl b/templates/de/html/admin/admin_list_refs_norefs.tpl index bbf8478da4..9e22d36162 100644 --- a/templates/de/html/admin/admin_list_refs_norefs.tpl +++ b/templates/de/html/admin/admin_list_refs_norefs.tpl @@ -1,5 +1,5 @@ <tr> <td colspan="6" class="admin_title bottom2" height="20"> - <strong>{--ADMIN_LIST_USER_NOREFS_1--}<u>$content[uid]</u>{--ADMIN_LIST_USER_NOREFS_2--}</strong> + <strong>{--ADMIN_LIST_USER_NOREFS_1--}<u>$content[userid]</u>{--ADMIN_LIST_USER_NOREFS_2--}</strong> </td> </tr> diff --git a/templates/de/html/admin/admin_list_refs_row.tpl b/templates/de/html/admin/admin_list_refs_row.tpl index ea39604e51..2114096281 100644 --- a/templates/de/html/admin/admin_list_refs_row.tpl +++ b/templates/de/html/admin/admin_list_refs_row.tpl @@ -1,5 +1,5 @@ <tr> - <td align="center" class="bottom2 right2 switch_sw$content[sw]" align="right" valign="top">$content[u_link] </td> + <td align="right" class="bottom2 right2 switch_sw$content[sw]" valign="top">$content[u_link] </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[refs_link]</td> <td class="bottom2 right2 switch_sw$content[sw]"> $content[gender] $content[surname] $content[family]</td> <td class="bottom2 right2 switch_sw$content[sw]"> $content[email]</td> diff --git a/templates/de/html/admin/admin_list_sponsor.tpl b/templates/de/html/admin/admin_list_sponsor.tpl index e3b37c874d..2aac17ecdf 100644 --- a/templates/de/html/admin/admin_list_sponsor.tpl +++ b/templates/de/html/admin/admin_list_sponsor.tpl @@ -1,11 +1,11 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_sponsor" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_sponsor" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="4" align="center" class="admin_title bottom2" height="30"> <strong>{--ADMIN_LIST_SPONSOR_ACCOUNTS--}</strong> </td> </tr> -{!__SPONSOR_ROWS!} +$content <tr> <td colspan="4" class="admin_footer" style="padding: 5px"> <span class="admin_notes tiny">{--ADMIN_LIST_SPONSOR_NOTES--}</span> diff --git a/templates/de/html/admin/admin_list_sponsor_details.tpl b/templates/de/html/admin/admin_list_sponsor_details.tpl index 317ee71329..4cdc16d17c 100644 --- a/templates/de/html/admin/admin_list_sponsor_details.tpl +++ b/templates/de/html/admin/admin_list_sponsor_details.tpl @@ -6,7 +6,7 @@ </tr> <tr> <td align="right" class="bottom2 right2" height="25">{--SPONSOR_ID--}: </td> - <td class="bottom2"> {!__SPONSOR_ID!} [ <strong><a href="{?URL?}/modules.php?module=admin&what=lock_sponsor&id={!__SPONSOR_ID!}">{!__SPONSOR_STATUS!}</a></strong> ]</td> + <td class="bottom2"> $content[id] [ <strong><a href="{?URL?}/modules.php?module=admin&what=lock_sponsor&id=$content[id]">$content[status]</a></strong> ]</td> </tr> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -15,15 +15,15 @@ </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_COMPANY_TITLE--}: </td> - <td class="bottom2"> {!__SPONSOR_COMPANY!}</td> + <td class="bottom2"> $content[company]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_COMPANY_POSITION--}: </td> - <td class="bottom2"> {!__SPONSOR_POSITION!}</td> + <td class="bottom2"> $content[position]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_TAX_IDENT--}: </td> - <td class="bottom2"> {!__SPONSOR_TAX_IDENT!}</td> + <td class="bottom2"> $content[tax_ident]</td> </tr> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -32,39 +32,39 @@ </tr> <tr> <td align="right" class="bottom2 right2">{--SURNAME_FAMILY--}: </td> - <td class="bottom2"> {!__SPONSOR_GENDER!} {!__SPONSOR_SURNAME!} {!__SPONSOR_FAMILY!}</td> + <td class="bottom2"> $content[gender] $content[surname] $content[family]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_STREET_NR1--}: </td> - <td class="bottom2"> {!__SPONSOR_STREET1!}</td> + <td class="bottom2"> $content[street_nr1]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_STREET_NR2--}: </td> - <td class="bottom2"> {!__SPONSOR_STREET2!}</td> + <td class="bottom2"> $content[street_nr2]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_CNTRY_ZIP_CITY--}: </td> - <td class="bottom2"> {!__SPONSOR_COUNTRY!}-{!__SPONSOR_ZIP!} {!__SPONSOR_CITY!}</td> + <td class="bottom2"> $content[country]-$content[zip] $content[city]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_PHONE--}: </td> - <td class="bottom2"> {!__SPONSOR_PHONE!}</td> + <td class="bottom2"> $content[phone]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_FAX--}: </td> - <td class="bottom2"> {!__SPONSOR_FAX!}</td> + <td class="bottom2"> $content[fax]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_CELL--}: </td> - <td class="bottom2"> {!__SPONSOR_CELL!}</td> + <td class="bottom2"> $content[cell]</td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_EMAIL--}: </td> - <td class="bottom2"> <a href="{!__SPONSOR_EMAIL!}">{!__SPONSOR_EMAIL_VALUE!}</a> </td> + <td class="bottom2"> <a href="$content[email_link]">$content[email]</a> </td> </tr> <tr> <td align="right" class="bottom2 right2">{--SPONSOR_ENTER_URL--}: </td> - <td class="bottom2"> [ <a href="{!__SPONSOR_URL!}" target="_blank"><strong>{--ADMIN_TEST_URL--}</strong></a> ] </td> + <td class="bottom2"> [ <a href="$content[url]" target="_blank"><strong>{--ADMIN_TEST_URL--}</strong></a> ] </td> </tr> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -72,20 +72,20 @@ </td> </tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_RECEIVE_WARNINGS_SHORT--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_REC_WARNING!}</td> + <td align="right" class="bottom2 right2">{--SPONSOR_RECEIVE_WARNINGS_SHORT--}: </td> + <td align="center" class="bottom2">$content[receive_warnings]</td> <tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_WARNING_INTERVAL_SHORT--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_INTERVAL!}</td> + <td align="right" class="bottom2 right2">{--SPONSOR_WARNING_INTERVAL_SHORT--}: </td> + <td align="center" class="bottom2">$content[warning_interval]</td> <tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_POINTS_AMOUNT--}:</strong> </td> - <td align="center" class="bottom2"> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id={!__SPONSOR_ID!}&mode=add_points" title="{--ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE--}"><strong>{!__SPONSOR_AMOUNT!}</strong></a> ]</td> -<tr> + <td align="right" class="bottom2 right2">{--SPONSOR_POINTS_AMOUNT--}: </td> + <td align="center" class="bottom2"> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=add_points" title="{--ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE--}"><strong>$content[points_amount]</strong></a> ]</td> </tr> - <td align="right" class="bottom2 right2">{--SPONSOR_POINTS_USED--}:</strong> </td> - <td align="center" class="bottom2"> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id={!__SPONSOR_ID!}&mode=sub_points" title="{--ADMIN_SPONSOR_SUB_POINTS_LINK_TITLE--}"><strong>{!__SPONSOR_USED!}</strong></a> ]</td> +<tr> + <td align="right" class="bottom2 right2">{--SPONSOR_POINTS_USED--}: </td> + <td align="center" class="bottom2"> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=sub_points" title="{--ADMIN_SPONSOR_SUB_POINTS_LINK_TITLE--}"><strong>$content[points_used]</strong></a> ]</td> </tr> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> @@ -93,37 +93,37 @@ </td> </tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_CREATED--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_CREATED!}</td> + <td align="right" class="bottom2 right2">{--SPONSOR_CREATED--}: </td> + <td align="center" class="bottom2">$content[created]</td> </tr> <tr> - <td align="right" class="bottom2 right2">{--ADMIN_LAST_ONLINE--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_LAST_ONLINE!}</td> + <td align="right" class="bottom2 right2">{--ADMIN_LAST_ONLINE--}: </td> + <td align="center" class="bottom2">$content[last_online]</td> </tr> <tr> - <td align="right" class="bottom2 right2">{--ADMIN_LAST_CHANGE--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_LAST_CHANGE!}</td> + <td align="right" class="bottom2 right2">{--ADMIN_LAST_CHANGE--}: </td> + <td align="center" class="bottom2">$content[last_change]</td> </tr> <tr> - <td align="right" class="bottom2 right2">{--REMOTE_IP--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_REMOTE_ADR!}</td> + <td align="right" class="bottom2 right2">{--REMOTE_IP--}: </td> + <td align="center" class="bottom2">$content[remote_addr]</td> </tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_REFID--}:</strong> </td> - <td align="center" class="bottom2">{!__SPONSOR_REFID!}</td> + <td align="right" class="bottom2 right2">{--SPONSOR_REFID--}: </td> + <td align="center" class="bottom2">$content[refid]</td> </tr> <tr> - <td align="right" class="bottom2 right2">{--SPONSOR_REFERRALS--}:</strong> </td> - <td align="center" class="bottom2">[ <a href="{?URL?}/modules.php?module=admin&what=list_sponsor&rid={!__SPONSOR_ID!}"><strong>{!__SPONSOR_REFS!}</strong></a> ]</td> + <td align="right" class="bottom2 right2">{--SPONSOR_REFERRALS--}: </td> + <td align="center" class="bottom2">[ <a href="{?URL?}/modules.php?module=admin&what=list_sponsor&rid=$content[id]"><strong>$content[ref_count]</strong></a> ]</td> </tr> <tr> <td colspan="2" class="admin_footer" style="padding: 5px"> <div align="center"><strong>{--ADMIN_SPONSOR_ACTIONS--}:</strong></div> <ul> - <li> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id={!__SPONSOR_ID!}&mode=edit">{--ADMIN_SPONSOR_EDIT--}</a> ]</li> - <li> [ <a href="{?URL?}/modules.php?module=admin&what=del_sponsor&id={!__SPONSOR_ID!}">{--ADMIN_SPONSOR_DEL--}</a> ]</li> - <li> [ <a href="{?URL?}/modules.php?module=admin&what=lock_sponsor&id={!__SPONSOR_ID!}">{--ADMIN_SPONSOR_LOCK--}</a> ]</li> - <li> [ <a href="{?URL?}/modules.php?module=admin&what=list_sponsor_pays&id={!__SPONSOR_ID!}">{--ADMIN_LIST_SPONSOR_ORDERS--}</a> ] (<strong>{!__SPONSOR_ORDERS!}</strong>)</li> + <li> [ <a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=edit">{--ADMIN_SPONSOR_EDIT--}</a> ]</li> + <li> [ <a href="{?URL?}/modules.php?module=admin&what=del_sponsor&id=$content[id]">{--ADMIN_SPONSOR_DEL--}</a> ]</li> + <li> [ <a href="{?URL?}/modules.php?module=admin&what=lock_sponsor&id=$content[id]">{--ADMIN_SPONSOR_LOCK--}</a> ]</li> + <li> [ <a href="{?URL?}/modules.php?module=admin&what=list_sponsor_pays&id=$content[id]">{--ADMIN_LIST_SPONSOR_ORDERS--}</a> ] (<strong>$content[orders]</strong>)</li> </ul> </td> </tr> diff --git a/templates/de/html/admin/admin_list_sponsor_pay.tpl b/templates/de/html/admin/admin_list_sponsor_pay.tpl index ff4e309e53..1155afc962 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="640" class="admin_table dashed" align="center"> <tr> <td colspan="5" align="center" class="admin_title bottom2" height="30"> @@ -12,7 +12,7 @@ <td align="center" class="admin_title bottom2 right2" width="150"><strong>{--SPONSOR_PAYTYPE_MIN_COUNT2--}:</strong></td> <td align="center" class="admin_title bottom2" width="160"><strong>{--SPONSOR_PAYTYPE_CURRENCY--}:</strong></td> </tr> -{!__LIST_ROWS!} +$content <tr> <td colspan="5" class="admin_footer"> <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> 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 e1ddcecd11..b0347c45a7 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_del.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_del.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="640"> <tr> <td align="center" colspan="5" class="admin_header bottom2" height="40"> @@ -13,7 +13,7 @@ <td align="center" class="admin_title bottom2 right2" width="150"><strong>{--SPONSOR_PAYTYPE_MIN_COUNT2--}:</strong></td> <td align="center" class="admin_title bottom2" width="160"><strong>{--SPONSOR_PAYTYPE_CURRENCY--}:</strong></td> </tr> -{!__SPONSOR_ROWS!} +$content <tr> <td align="center" colspan="5" class="admin_footer"> <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> 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 257b9881ac..6bbe161cca 100644 --- a/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl +++ b/templates/de/html/admin/admin_list_sponsor_pay_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_sponsor_pay" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="640"> <tr> <td align="center" colspan="5" class="admin_header bottom2" height="40"> @@ -13,7 +13,7 @@ <td align="center" class="admin_title bottom2 right2" width="150"><strong>{--SPONSOR_PAYTYPE_MIN_COUNT2--}:</strong></td> <td align="center" class="admin_title bottom2" width="160"><strong>{--SPONSOR_PAYTYPE_CURRENCY--}:</strong></td> </tr> -{!__SPONSOR_ROWS!} +$content <tr> <td align="center" colspan="5" class="admin_footer"> <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/admin/admin_list_sponsor_row.tpl b/templates/de/html/admin/admin_list_sponsor_row.tpl index 6c5b2458d8..8d5d9982b2 100644 --- a/templates/de/html/admin/admin_list_sponsor_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_row.tpl @@ -8,7 +8,7 @@ [ <strong><a href="{?URL?}/modules.php?module=admin&what=list_sponsor&id=$content[id]" title="{--ADMIN_SPONSOR_DETAILS_LINK_TITLE--}">$content[id]</a></strong> ] </td> <td align="center" class="switch_sw$content[sw] bottom2 right2" width="240" colspan="2"> - <a href="$content[email]">$content[gender] $content[sname] $content[fname]</a> + <a href="$content[email]">$content[gender] $content[surname] $content[family]</a> </td> <td align="center" class="switch_sw$content[sw] bottom2" width="160"> [ <strong><a href="{?URL?}/modules.php?module=admin&what=edit_sponsor&id=$content[id]&mode=add_points" title="{--ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE--}">$content[points]</a></strong> ] @@ -30,7 +30,7 @@ $content[created] </td> <td align="center" class="switch_sw$content[sw] bottom2 right2" width="120"> - $content[last] + $content[last_online] </td> <td align="center" class="switch_sw$content[sw] bottom2" width="160"> $content[ip] diff --git a/templates/de/html/admin/admin_list_surfbar_actions.tpl b/templates/de/html/admin/admin_list_surfbar_actions.tpl index 07bc4b2846..66b689cc39 100644 --- a/templates/de/html/admin/admin_list_surfbar_actions.tpl +++ b/templates/de/html/admin/admin_list_surfbar_actions.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_actions" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_actions" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="600"> <tr> <td colspan="4" class="admin_header bottom2" height="30" align="center"> diff --git a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl index 39c40091c9..e603e08c31 100644 --- a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" /> </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> $content[status] diff --git a/templates/de/html/admin/admin_list_surfbar_urls.tpl b/templates/de/html/admin/admin_list_surfbar_urls.tpl index eca1de4a27..b16a8bedeb 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="800"> <tr> <td align="center" colspan="8" class="admin_title" height="30"> diff --git a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl index 40638c44f6..d3c621fa43 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" /> </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> $content[userid] 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 6b0d50b40a..8f3a8a6665 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 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2 left2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[admin] @@ -12,7 +12,7 @@ $content[infos] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[uid] + $content[userid] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[type] diff --git a/templates/de/html/admin/admin_list_task_rows.tpl b/templates/de/html/admin/admin_list_task_rows.tpl index 9a8e24ca67..f2827b30aa 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 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2 left2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[admin] @@ -12,7 +12,7 @@ $content[infos] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[uid] + $content[userid] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[type] diff --git a/templates/de/html/admin/admin_list_theme.tpl b/templates/de/html/admin/admin_list_theme.tpl new file mode 100644 index 0000000000..3f57482806 --- /dev/null +++ b/templates/de/html/admin/admin_list_theme.tpl @@ -0,0 +1,23 @@ +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> +<tr> + <td colspan="5" align="center" class="admin_title bottom2" height="30"> + <strong>{--ADMIN_THEME_NEW_FOUND_TITLE--}:</strong> + </td> +</tr> +<tr> + <td align="center" width="5%" class="admin_title bottom2 right2">{--ID_SELECT--}</td> + <td align="center" width="35%" class="admin_title bottom2 right2">{--ADMIN_EXT_DOWNLOAD_LINK--}</td> + <td align="center" width="30%" class="admin_title bottom2 right2">{--ADMIN_THEME_FILE_CTIME--}</td> + <td align="center" width="15%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_SIZE--}</td> + <td align="center" width="15%" class="admin_title bottom2">{--THEME_VERSION--}</td> +</tr> +$content[rows] +<tr> + <td colspan="2" align="center" class="admin_title right2"> + {--ADMIN_THEME_TOTAL_FOUND--}: <strong>$content[total]</strong> + </td> + <td colspan="3" align="right" class="admin_title right2"> + {--ADMIN_EXT_TOTAL_FSIZE--}: <strong>$content[kbytes] {--KBYTES--}</strong> + </td> +</tr> +</table> diff --git a/templates/de/html/admin/admin_list_theme_row.tpl b/templates/de/html/admin/admin_list_theme_row.tpl new file mode 100644 index 0000000000..f03c5921f5 --- /dev/null +++ b/templates/de/html/admin/admin_list_theme_row.tpl @@ -0,0 +1,13 @@ +<tr> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[index].</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="{?SERVER_URL?}/themes/theme-$content[name].zip">$content[name]</a></td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[created]</td> + <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[size] {--KBYTES--}</td> + <td align="center" class="switch_sw$content[sw] bottom2">$content[version] ($content[current])</td> +</tr> +<tr> + <td class="switch_sw$content[sw] bottom2"> </td> + <td colspan="4" class="switch_sw$content[sw] bottom2"> + <div class="tiny">$content[infos]</div> + </td> +</tr> diff --git a/templates/de/html/admin/admin_list_transfer.tpl b/templates/de/html/admin/admin_list_transfer.tpl index 550efb9833..923596eab3 100644 --- a/templates/de/html/admin/admin_list_transfer.tpl +++ b/templates/de/html/admin/admin_list_transfer.tpl @@ -1,9 +1,9 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=del_transfer" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=del_transfer" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="6" align="center" class="admin_title2 bottom2" height="30"> - <strong>{!__TRANSFER_TITLE!}</strong> + <strong>$content[title]</strong> </td> </tr> <tr> @@ -20,10 +20,10 @@ <td width="70" align="center" class="admin_title2 bottom2"><strong>{?POINTS?}</strong> </td> </tr> - {!__TRANSFER_ROWS!} + $content[rows] <tr> <td colspan="6" class="admin_footer"> - {!__TRANSFER_DELETE!} + $content[delete] </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_transfer_row.tpl b/templates/de/html/admin/admin_list_transfer_row.tpl index 6baf15b7bd..52331fd63f 100644 --- a/templates/de/html/admin/admin_list_transfer_row.tpl +++ b/templates/de/html/admin/admin_list_transfer_row.tpl @@ -1,5 +1,5 @@ <tr> - <td class="switch_sw$content[sw] bottom2 right2" align="center"><strong>$content[idx]</strong></td> + <td class="switch_sw$content[sw] bottom2 right2" align="center"><strong>$content[trans_id]</strong></td> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[stamp]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[from_link]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[to_link]</td> diff --git a/templates/de/html/admin/admin_list_unconfirmed.tpl b/templates/de/html/admin/admin_list_unconfirmed.tpl index ad86764024..c70f8e9c85 100644 --- a/templates/de/html/admin/admin_list_unconfirmed.tpl +++ b/templates/de/html/admin/admin_list_unconfirmed.tpl @@ -15,7 +15,7 @@ </td> <td align="center" class="bottom2"> {--EMAIL_TIMESTAMP--}:<br /> - <strong>$content[stamp] + <strong>$content[stamp]</strong> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_list_unconfirmed_list.tpl b/templates/de/html/admin/admin_list_unconfirmed_list.tpl index 0aeff00e1c..40eaa3628f 100644 --- a/templates/de/html/admin/admin_list_unconfirmed_list.tpl +++ b/templates/de/html/admin/admin_list_unconfirmed_list.tpl @@ -1,9 +1,9 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%" class="admin_table"> <tr> - <td width="10%" align="center" class="admin_title bottom2 top2 right2" height="26"><strong>{--ID_SELECT--}</td> - <td width="10%" align="center" class="admin_title bottom2 top2 right2"><strong>{--MAILID_LINK--}</td> - <td width="45%" align="center" class="admin_title bottom2 top2 right2"><strong>{--SURNAME_FAMILY--}</td> - <td width="35%" align="center" class="admin_title bottom2 top2"><strong>{--ACCOUNT_STATUS--}</td> + <td width="10%" align="center" class="admin_title bottom2 top2 right2" height="26"><strong>{--ID_SELECT--}</strong></td> + <td width="10%" align="center" class="admin_title bottom2 top2 right2"><strong>{--MAILID_LINK--}</strong></td> + <td width="45%" align="center" class="admin_title bottom2 top2 right2"><strong>{--SURNAME_FAMILY--}</strong></td> + <td width="35%" align="center" class="admin_title bottom2 top2"><strong>{--ACCOUNT_STATUS--}</strong></td> </tr> $content </table> diff --git a/templates/de/html/admin/admin_list_unconfirmed_row.tpl b/templates/de/html/admin/admin_list_unconfirmed_row.tpl index 7a374a88db..343db40ded 100644 --- a/templates/de/html/admin/admin_list_unconfirmed_row.tpl +++ b/templates/de/html/admin/admin_list_unconfirmed_row.tpl @@ -1,7 +1,7 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[u_link]</td> <td align="center" class="switch_sw$content[sw] bottom2 right2"><a - href="{?URL?}/mailid.php?uid=$content[uid]&$content[link]=$content[id]" + href="{?URL?}/mailid.php?userid=$content[userid]&$content[link]=$content[id]" target="_blank">{--CLICK_NOW--}</a></td> <td class="switch_sw$content[sw] bottom2 right2"> $content[email]</td> <td align="center" class="switch_sw$content[sw] bottom2">$content[status]</td> diff --git a/templates/de/html/admin/admin_list_user.tpl b/templates/de/html/admin/admin_list_user.tpl index 4ec8ea7917..b780f777e6 100644 --- a/templates/de/html/admin/admin_list_user.tpl +++ b/templates/de/html/admin/admin_list_user.tpl @@ -1,13 +1,12 @@ -<table border="0" cellspacing="0" cellpadding="0" width="95%" - align="center" class="admin_table dashed"> +<table border="0" cellspacing="0" cellpadding="0" width="95%" align="center" class="admin_table dashed"> <tr> <td class="admin_header bottom2" colspan="{!__COLSPAN2!}" height="30" align="center"> - <strong>{!__TITLE!}:</strong> + <strong>$content[title]:</strong> </td> </tr> {!__ALPHA_SORT!} {!__SORT_LINKS!} {!__PAGE_NAV!} - {!__USER_ROWS!} + $content[rows] {!__PAGE_NAV!} </table> diff --git a/templates/de/html/admin/admin_list_user_alpha.tpl b/templates/de/html/admin/admin_list_user_alpha.tpl index a65982ed8a..de20a34be8 100644 --- a/templates/de/html/admin/admin_list_user_alpha.tpl +++ b/templates/de/html/admin/admin_list_user_alpha.tpl @@ -3,7 +3,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="510"> <tr> <td class="admin_alpha"> - {--ADMIN_ALPHA_SELCTION--} [ {!__ALPHA_LIST!} ]</td> + {--ADMIN_ALPHA_SELCTION--} [ $content ]</td> </tr> </table> </td> diff --git a/templates/de/html/admin/admin_list_user_pagenav.tpl b/templates/de/html/admin/admin_list_user_pagenav.tpl index ad6968b286..1cba922898 100644 --- a/templates/de/html/admin/admin_list_user_pagenav.tpl +++ b/templates/de/html/admin/admin_list_user_pagenav.tpl @@ -3,7 +3,7 @@ <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="admin_pagenav"> - [ {--USER_PAGENAV--}: {!__PAGENAV_LIST!} ] + [ {--USER_PAGENAV--}: $content[list] ] </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_user_row.tpl b/templates/de/html/admin/admin_list_user_row.tpl index e3fd97f922..fccf3f1c24 100644 --- a/templates/de/html/admin/admin_list_user_row.tpl +++ b/templates/de/html/admin/admin_list_user_row.tpl @@ -8,7 +8,7 @@ </tr> <tr> <td width="5" class="switch_sw$content[sw] seperator bottom2"> </td> - <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[uid]</td> + <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[userid_link]</td> <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[gender]</td> <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[surname]</td> <td align="center" class="bottom2 right2 switch_sw$content[sw]">$content[family]</td> @@ -16,7 +16,7 @@ </tr> <tr> <td width="5" class="switch_sw$content[sw] seperator"> </td> - <td align="center" class="right2 switch_sw$content[sw]"><strong>{--ADDY--}:</strong></td> + <td align="center" class="right2 switch_sw$content[sw]"><strong>{--EMAIL_ADDRESS--}:</strong></td> <td align="center" class="right2 switch_sw$content[sw]"><strong>{--REMOTE_IP--}:</strong></td> <td align="center" class="right2 switch_sw$content[sw]"><strong>{--REF_UID--}:</strong></td> <td align="center" class="right2 switch_sw$content[sw]"><strong>{--ACCOUNT_STATUS--}:</strong></td> @@ -25,7 +25,7 @@ <tr> <td class="switch_sw$content[sw] seperator bottom2" width="5"> </td> <td align="center" class="right2 switch_sw$content[sw] bottom2">$content[email]</td> - <td align="center" class="right2 switch_sw$content[sw] bottom2">$content[addr]</td> + <td align="center" class="right2 switch_sw$content[sw] bottom2">$content[REMOTE_ADDR]</td> <td align="center" class="right2 switch_sw$content[sw] bottom2">$content[refid]</td> <td align="center" class="right2 switch_sw$content[sw] bottom2">$content[status]</td> <td align="center" class="switch_sw$content[sw] bottom2">$content[links]</td> @@ -50,9 +50,9 @@ <td width="5" class="switch_sw$content[sw] seperator"> </td> <td align="center" class="right2 switch_sw$content[sw]"><strong>{--LOCK_REASON--}:</strong></td> <td align="center" class="right2 switch_sw$content[sw]"><strong>{--LOCK_TIMESTAMP--}:</strong></td> - <td align="center" class="right2 switch_sw$content[sw]"><strong>{--__UNUSED--}:</strong></td> - <td align="center" class="right2 switch_sw$content[sw]"><strong>{--__UNUSED--}:</strong></td> - <td align="center" class="switch_sw$content[sw]"><strong>{--__UNUSED--}:</strong></td> + <td align="center" class="right2 switch_sw$content[sw]"><strong>{--_UNUSED--}:</strong></td> + <td align="center" class="right2 switch_sw$content[sw]"><strong>{--_UNUSED--}:</strong></td> + <td align="center" class="switch_sw$content[sw]"><strong>{--_UNUSED--}:</strong></td> </tr> <tr> <td class="switch_sw$content[sw] seperator bottom2" width="5"> </td> diff --git a/templates/de/html/admin/admin_list_user_sort.tpl b/templates/de/html/admin/admin_list_user_sort.tpl index 90d02fb5e7..34adbcb56e 100644 --- a/templates/de/html/admin/admin_list_user_sort.tpl +++ b/templates/de/html/admin/admin_list_user_sort.tpl @@ -2,7 +2,8 @@ <td class="bottom2" colspan="{!__COLSPAN2!}" align="center"> <table border="0" cellspacing="0" cellpadding="0"> <tr> - <td class="admin_sortlinks">{--SORT_BY--} <strong>[</strong> {!__SORT_LIST!} <strong>]</strong> + <td class="admin_sortlinks"> + {--SORT_BY--} <strong>[</strong> $content[list] <strong>]</strong> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_list_user_sort_form.tpl b/templates/de/html/admin/admin_list_user_sort_form.tpl index 87f903100d..fd997ac815 100644 --- a/templates/de/html/admin/admin_list_user_sort_form.tpl +++ b/templates/de/html/admin/admin_list_user_sort_form.tpl @@ -4,7 +4,7 @@ <tr> <td align="center"> <!-- - <form action="{?URL?}/modules.php?module=admin&what=list_user" method="post" style="margin-bottom: 0px"> + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_user" method="post" style="margin-bottom: 0px"> </form> //--> </td> diff --git a/templates/de/html/admin/admin_list_yoomedia_tm_already.tpl b/templates/de/html/admin/admin_list_yoomedia_tm_already.tpl index 2aa90b844d..b038fd160a 100644 --- a/templates/de/html/admin/admin_list_yoomedia_tm_already.tpl +++ b/templates/de/html/admin/admin_list_yoomedia_tm_already.tpl @@ -10,10 +10,10 @@ <tr> <td align="center"> $content[already] - <form action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px"> - <input type="hidden" name="id" value="$content[id]" /> - <input type="hidden" name="reload" value="$content[reload]" /> - <input type="submit" class="admin_delete" name="unlist" value="{--ADMIN_YOOMEDIA_UNLIST_MAIL--}" /> + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px"> + <input type="hidden" name="id" value="$content[id]" /> + <input type="hidden" name="reload" value="$content[reload]" /> + <input type="submit" class="admin_delete" name="unlist" value="{--ADMIN_YOOMEDIA_UNLIST_MAIL--}" /> </form> </td> </tr> diff --git a/templates/de/html/admin/admin_list_yoomedia_tm_row.tpl b/templates/de/html/admin/admin_list_yoomedia_tm_row.tpl index 8338f05834..5eb03fad94 100644 --- a/templates/de/html/admin/admin_list_yoomedia_tm_row.tpl +++ b/templates/de/html/admin/admin_list_yoomedia_tm_row.tpl @@ -6,7 +6,7 @@ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] €</td> <td class="switch_sw$content[sw] bottom2" align="center" style="padding-left:1px;padding-right:1px;padding-top:2px;padding-bottom:2px"> - <form action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px"> + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px"> <input type="hidden" name="id" value="$content[id]" /> <input type="hidden" name="name" value="$content[name]" /> <input type="hidden" name="wait" value="$content[wait]" /> diff --git a/templates/de/html/admin/admin_lock_sponsor.tpl b/templates/de/html/admin/admin_lock_sponsor.tpl index e62ebbd5a8..a513d9169f 100644 --- a/templates/de/html/admin/admin_lock_sponsor.tpl +++ b/templates/de/html/admin/admin_lock_sponsor.tpl @@ -1,20 +1,20 @@ -<form action="{?URL?}/modules.php?module=admin&what=lock_sponsor&id={!__ID!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=lock_sponsor&id=$content[id]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td align="center" class="admin_title bottom2"> - <div class="admin_done">{!__HEADER_MESSAGE!}</div> + <div class="admin_done">$content[header_message]</div> </td> </tr> <tr><td height="5" class="seperator"> </td></tr> <tr> <td align="center"> - {!__TEXT_MESSAGE!} + $content[text_message] </td> </tr> <tr><td height="5" class="seperator"> </td></tr> <tr> <td align="center"> - {!__EMAIL_LINK!} + $content[email_link] </td> </tr> <tr><td height="5" class="seperator"> </td></tr> diff --git a/templates/de/html/admin/admin_lock_surfbar_urls.tpl b/templates/de/html/admin/admin_lock_surfbar_urls.tpl index 02b7bd239c..4d88744870 100644 --- a/templates/de/html/admin/admin_lock_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_lock_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="5" class="admin_title" height="30"> diff --git a/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl b/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl index f79fcbbfed..7bb2990a8c 100644 --- a/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> <input type="hidden" name="id[$content[id]]" value="1" /> - <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" /> + <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid]" /> <input type="hidden" name="last_locked[$content[id]]" value="NOW()" /> $content[userid] </td> diff --git a/templates/de/html/admin/admin_lock_user.tpl b/templates/de/html/admin/admin_lock_user.tpl index f9a4e97593..8156394915 100644 --- a/templates/de/html/admin/admin_lock_user.tpl +++ b/templates/de/html/admin/admin_lock_user.tpl @@ -1,22 +1,23 @@ -<form action="{?URL?}/modules.php?module=admin&what=lock_user&uid={!__UID!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=lock_user&userid=$content[userid]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td align="center" class="admin_title bottom2"> - <div class="admin_done">{!__HEADER_VALUE!}</div> + <div class="admin_done">$content[header]</div> </td> </tr> <tr> <td height="5" class="seperator"> </td> </tr> <tr> - <td align="center">{!__TEXT_VALUE!}</td> + <td align="center">$content[text]</td> </tr> <tr> <td height="5" class="seperator"> </td> </tr> <tr> - <td align="center">[ <a href="{!__EMAIL!}">{!__SNAME!} - {!__FNAME!}</a> ]</td> + <td align="center"> + [ <a href="$content[email]">$content[surname] $content[family]</a> ] + </td> </tr> <tr> <td height="5" class="seperator"> </td> @@ -32,7 +33,7 @@ <tr> <td class="admin_footer"> <input type="submit" name="no" class="admin_no" value="{--NO--}" /> - <input type="submit" name="{!__OK_VALUE!}" class="admin_yes" value="{--YES--}" /> + <input type="submit" name="$content[ok]" class="admin_yes" value="{--YES--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_login_form.tpl b/templates/de/html/admin/admin_login_form.tpl index f88457acce..2e0c1441d7 100644 --- a/templates/de/html/admin/admin_login_form.tpl +++ b/templates/de/html/admin/admin_login_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&$content[target]=$content[value]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&$content[target]=$content[value]" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table register" align="center"> <tr> <td colspan="2" height="14" class="admin_title seperator"> </td> @@ -16,23 +16,23 @@ <tr> <td width="50%" align="right">{--ENTER_ADMIN_LOGIN--}: </td> <td width="50%"> - <input type="text" name="login" size="10" maxlength="100" class="admin_normal" value="{!__LOGIN_VALUE!}" /> + <input type="text" name="login" size="10" maxlength="100" class="admin_normal" value="$content[login]" /> </td> </tr> - {!__MSG_LOGIN!} + $content[login_message] <tr> <td colspan="2" height="14" class="seperator"> </td> </tr> <tr> <td width="50%" valign="top" align="right">{--ENTER_ADMIN_PASS--}: </td> <td width="50%" valign="top"> - <input type="password" name="pass" size="10" maxlength="100" class="admin_normal" /> + <input type="password" class="admin_normal" name="pass" size="10" maxlength="100" /> <div class="admin_note"> [<a href="{?URL?}/modules.php?module=admin&reset_pass=1">{--ADMIN_RESET_PASSWORD--}</a>] </div> </td> </tr> - {!__MSG_PASS!} + $content[pass_message] <tr> <td colspan="2" height="14" class="seperator"> </td> </tr> diff --git a/templates/de/html/admin/admin_logout_form.tpl b/templates/de/html/admin/admin_logout_form.tpl index 897e6e168b..0ddae08aca 100644 --- a/templates/de/html/admin/admin_logout_form.tpl +++ b/templates/de/html/admin/admin_logout_form.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&action=logout" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&action=logout" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="370"> <tr> <td align="center" class="admin_title bottom2" height="30"> diff --git a/templates/de/html/admin/admin_maintenance_form.tpl b/templates/de/html/admin/admin_maintenance_form.tpl index 6348c2de41..9b56d94919 100644 --- a/templates/de/html/admin/admin_maintenance_form.tpl +++ b/templates/de/html/admin/admin_maintenance_form.tpl @@ -1,23 +1,23 @@ -<form action="{?URL?}/modules.php?module=admin&what=maintenance" method="post"> -<table border="0" cellspacing="0" cellpadding="0" width="380" - class="admin_table dashed" align="center"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=maintenance" method="post"> +<table border="0" cellspacing="0" cellpadding="0" width="380" class="admin_table dashed" align="center"> <tr> <td align="center" class="admin_title bottom2" height="30"> - {--ADMIN_MAINTENANCE_MODE_INTRO--}</td> + {--ADMIN_MAINTENANCE_MODE_INTRO--} + </td> </tr> <tr> <td class="seperator" height="10"> </td> </tr> <tr> - <td align="center">{--ADMIN_MAINTENANCE_MODE--}</td> + <td align="center">$content</td> </tr> <tr> <td class="seperator bottom2" height="10"> </td> </tr> <tr> - <td class="admin_footer" height="30"><input - type="submit" name="ok" class="admin_delete" - value="{--ADMIN_CHANGE_MAINTENANCE_MODE--}"></td> + <td class="admin_footer" height="30"> + <input type="submit" name="ok" class="admin_delete" value="{--ADMIN_CHANGE_MAINTENANCE_MODE--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_member_add.tpl b/templates/de/html/admin/admin_member_add.tpl index a63925c528..240e0f3bbb 100644 --- a/templates/de/html/admin/admin_member_add.tpl +++ b/templates/de/html/admin/admin_member_add.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=mem_add" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=mem_add" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td height="8" colspan="5"></td> @@ -7,9 +7,9 @@ <td width="10"> </td> <td align="right" width="245">{--ENTER_TITLE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table" width="245"><input - type="text" name="title" class="admin_normal" size="30" - maxlength="50"></td> + <td align="center" class="admin_table" width="245"> + <input type="text" name="title" class="admin_normal" size="30" maxlength="50" /> + </td> <td width="10"> </td> </tr> <tr> @@ -19,8 +19,10 @@ <td width="10"> </td> <td align="right">{--SELECT_WHAT_NAME--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__WHAT_SELECTION!}<br /> - <span class="admin_note">({--CREATE_WHAT_FIRST--})</span></td> + <td align="center" class="admin_table"> + $content[what_selection]<br /> + <span class="admin_note">({--CREATE_WHAT_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -30,8 +32,10 @@ <td width="10"> </td> <td align="right">{--SELECT_PARENT_MENU--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__ACTION_SELECTION!}<br /> - <span class="admin_note">({--CREATE_ACTION_FIRST--})</span></td> + <td align="center" class="admin_table"> + $content[action_selection]<br /> + <span class="admin_note">({--CREATE_ACTION_FIRST--})</span> + </td> <td width="10"> </td> </tr> <tr> @@ -41,7 +45,7 @@ <td width="10"> </td> <td align="right">{--SELECT_BELOW_MENU--}:</td> <td width="10"> </td> - <td align="center" class="admin_table">{!__BELOW_SELECTION!}</td> + <td align="center" class="admin_table">$content[below_selection]</td> <td width="10"> </td> </tr> <tr> @@ -51,11 +55,12 @@ <td width="10"> </td> <td align="right">{--MENU_IS_VISIBLE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table"><select - class="admin_select" name="visible" size="1"> - <option value="Y">{--YES--}</option> - <option value="N">{--NO--}</option> - </select></td> + <td align="center" class="admin_table"> + <select class="admin_select" name="visible" size="1"> + <option value="Y">{--YES--}</option> + <option value="N">{--NO--}</option> + </select> + </td> <td width="10"> </td> </tr> <tr> @@ -65,11 +70,12 @@ <td width="10"> </td> <td align="right">{--MENU_IS_ACTIVE--}:</td> <td width="10"> </td> - <td align="center" class="admin_table"><select - class="admin_select" name="active" size="1"> - <option value="N">{--YES--}</option> - <option value="Y">{--NO--}</option> - </select></td> + <td align="center" class="admin_table"> + <select class="admin_select" name="active" size="1"> + <option value="N">{--YES--}</option> + <option value="Y">{--NO--}</option> + </select> + </td> <td width="10"> </td> </tr> <tr> @@ -80,10 +86,9 @@ </tr> <tr> <td class="admin_table" width="10"> </td> - <td align="center" class="admin_table" align="center" colspan="3"> - <input type="reset" class="admin_reset" class="admin_normal" - value="{--CLEAR_FORM--}" /> <input type="submit" - class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> + <td align="center" class="admin_table colspan="3"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_ADD_MENU--}" /> </td> <td class="admin_table" width="10"> </td> </tr> diff --git a/templates/de/html/admin/admin_member_selection_box.tpl b/templates/de/html/admin/admin_member_selection_box.tpl index d88556c98c..6672c307f2 100644 --- a/templates/de/html/admin/admin_member_selection_box.tpl +++ b/templates/de/html/admin/admin_member_selection_box.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php" method="get"> +<form accept-charset="utf-8" action="{?URL?}/modules.php" method="get"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="25"> @@ -11,10 +11,10 @@ <tr> <td align="center"> <input type="hidden" name="module" value="admin" /> - <input type="hidden" name="what" value="$content" /> + <input type="hidden" name="what" value="$content[what]" /> {--ADMIN_SELECT_USER--}: - <select name="uid" size="1" class="admin_select"> - {!_MEMBER_SELECTION!} + <select name="userid" size="1" class="admin_select"> + $content[member_selection] </select> </td> </tr> diff --git a/templates/de/html/admin/admin_menu_overview_row.tpl b/templates/de/html/admin/admin_menu_overview_row.tpl index ccb7a853f3..4632f6b2da 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 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> <a href="{?URL?}/modules.php?module=admin&what=$content[mode]edit&sub=$content[action]">$content[action]</a> diff --git a/templates/de/html/admin/admin_menu_unknown_okay.tpl b/templates/de/html/admin/admin_menu_unknown_okay.tpl index 5f7de79f94..23632a3adb 100644 --- a/templates/de/html/admin/admin_menu_unknown_okay.tpl +++ b/templates/de/html/admin/admin_menu_unknown_okay.tpl @@ -1,5 +1,4 @@ -<table border="0" cellspacing="0" cellpadding="0" width="450" - class="admin_table dashed"> +<table border="0" cellspacing="0" cellpadding="0" width="450" class="admin_table dashed"> <tr> <td class="admin_fatal seperator" height="14" colspan="3"> </td> </tr> @@ -12,9 +11,9 @@ <td class="admin_fatal seperator" height="7"> </td> </tr> <tr> - <td align="center"><strong>{!__OK_VALUE!}</strong></td> + <td align="center"><strong>$content</strong></td> </tr> <tr> <td class="admin_fatal seperator" height="14" colspan="3"> </td> </tr> -</table> \ No newline at end of file +</table> diff --git a/templates/de/html/admin/admin_mini_online.tpl b/templates/de/html/admin/admin_mini_online.tpl index f73ed3118d..9ac55c4adc 100644 --- a/templates/de/html/admin/admin_mini_online.tpl +++ b/templates/de/html/admin/admin_mini_online.tpl @@ -1,21 +1,22 @@ <table border="0" cellspacing="0" cellpadding="0" width="170" class="admin_table dashed"> <tr> <td colspan="3" class="admin_title bottom2" align="center" height="30"> - <strong>{--USER_NOW_ONLINE--}</strong></td> + <strong>{--USER_NOW_ONLINE--}</strong> + </td> </tr> <tr> <td width="85%" class="bottom2" align="right"><div class="medium">{--GUESTS_ONLINE--}:</div></td> <td width="5%" class="bottom2 seperator"> </td> - <td width="10%" class="bottom2"><strong>{!_GUESTS_ONLINE!}</strong></td> + <td width="10%" class="bottom2"><strong>$content[guests_online]</strong></td> </tr> <tr> <td class="bottom2" align="right"><div class="medium">{--MEMBERS_ONLINE--}:</div></td> <td class="bottom2 seperator"> </td> - <td class="bottom2"><strong>{!_MEMBERS_ONLINE!}</strong></td> + <td class="bottom2"><strong>$content[members_online]</strong></td> </tr> <tr> <td align="right"><div class="medium">{--ADMINS_ONLINE--}:</div></td> <td class"seperator"> </td> - <td><strong>{!_ADMINS_ONLINE!}</strong></td> + <td><strong>$content[admins_online]</strong></td> </tr> </table> diff --git a/templates/de/html/admin/admin_mmenu_delete.tpl b/templates/de/html/admin/admin_mmenu_delete.tpl index ff07fe467b..ca1e7eb909 100644 --- a/templates/de/html/admin/admin_mmenu_delete.tpl +++ b/templates/de/html/admin/admin_mmenu_delete.tpl @@ -1,22 +1,23 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}" method="post" target="_self"> -<table border="0" cellspacing="0" cellpadding="0" - class="admin_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=memedit&sub=$content[sub]" method="post" target="_self"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> - <td align="center" colspan="2"><strong>{--DEL_MEMBER_MENU--}</strong> + <td align="center" colspan="2"> + <strong>{--DEL_MEMBER_MENU--}</strong> </td> </tr> <tr> <td align="center" colspan="2"> - {--DEL_MENU_1--}{!__CHK_VALUE!}{--DEL_MENU_2--}</td> + {--DEL_MENU_1--}$content[chk]{--DEL_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td colspan="2" class="admin_footer"><input - type="hidden" name="ok" value="del"> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}"> <input - type="submit" class="admin_delete" name="submit" - value="{--DEL_ENTRIES--}"></td> + <td colspan="2" class="admin_footer"> + <input type="hidden" name="ok" value="del" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="submit" class="admin_delete" name="submit" value="{--DEL_ENTRIES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_mmenu_edit.tpl b/templates/de/html/admin/admin_mmenu_edit.tpl index be7ebd5853..406c672eae 100644 --- a/templates/de/html/admin/admin_mmenu_edit.tpl +++ b/templates/de/html/admin/admin_mmenu_edit.tpl @@ -1,22 +1,24 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=memedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="2" class="admin_header" height="40"> - <strong>{--EDIT_MEMBER_MENU--}</strong></td> + <strong>{--EDIT_MEMBER_MENU--}</strong> + </td> </tr> <tr> <td align="center" colspan="2" class="admin_header bottom2"> - {--EDIT_MENU_1--}{!__CHK_VALUE!}{--EDIT_MENU_2--}</td> + {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> - <td align="center" colspan="2" class="admin_footer"><input - type="hidden" name="ok" value="edit" /> <input type="hidden" - name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}" /> <input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" class="admin_submit" name="submit" - value="{--SUBMIT_CHANGES--}" /></td> + <td align="center" colspan="2" class="admin_footer"> + <input type="hidden" name="ok" value="edit" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="submit" value="{--SUBMIT_CHANGES--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_mmenu_overview.tpl b/templates/de/html/admin/admin_mmenu_overview.tpl index 8a6de4c464..b8c32ff9b8 100644 --- a/templates/de/html/admin/admin_mmenu_overview.tpl +++ b/templates/de/html/admin/admin_mmenu_overview.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=memedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2 right2" align="center" width="5%" height="30"><strong>{--ID_SELECT--}</strong></td> @@ -8,10 +8,10 @@ <td class="admin_title bottom2" align="center" width="25%"><strong>{--DISPLAY_TITLE--}</strong></td> <td class="admin_title bottom2" align="center" width="20%"><strong>{--SORT_NAVIGATION--}</strong></td> </tr> -{!__MENU_ROWS!} +$content[rows] <tr> <td colspan="5" class="admin_footer"> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" class="admin_normal" /> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> <input type="submit" class="admin_submit" name="edit" value="{--EDIT_MENUS--}" /> <input type="submit" class="admin_submit" name="status" value="{--CHANGE_MENUS--}" /> <input type="submit" class="admin_delete" name="del" value="{--DEL_MENUS--}" /> diff --git a/templates/de/html/admin/admin_mmenu_status.tpl b/templates/de/html/admin/admin_mmenu_status.tpl index 856f9dd18f..d2776dd92c 100644 --- a/templates/de/html/admin/admin_mmenu_status.tpl +++ b/templates/de/html/admin/admin_mmenu_status.tpl @@ -1,25 +1,26 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=memedit&sub=$content[sub]" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" height="5" class="admin_title seperator"> </td> </tr> <tr> - <td align="center" colspan="4" class="admin_title"><strong>{--CHANGE_MEMBER_MENU--}</strong><br /> - <br /> - {--CHANGE_MENU_1--}{!__CHK_VALUE!}{--CHANGE_MENU_2--}</td> + <td align="center" colspan="4" class="admin_title"> + <strong>{--CHANGE_MEMBER_MENU--}</strong><br /> + <br /> + {--CHANGE_MENU_1--}$content[chk]{--CHANGE_MENU_2--} + </td> </tr> <tr> <td colspan="4" height="5" class="admin_title seperator bottom2"> </td> </tr> - {!__MENU_ROWS!} + $content[rows] <tr> <td colspan="4" align="center" height="40" class="admin_footer"> - <input type="hidden" name="ok" value="status" /> <input - type="hidden" name="chk" value="{!__CHK_VALUE!}_{!__CNT_VALUE!}" /> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" - class="admin_normal" /> <input type="submit" - class="admin_submit" name="submit" value="{--CHANGE_ENTRIES--}" /> + <input type="hidden" name="ok" value="status" /> + <input type="hidden" name="chk" value="$content[chk]_$content[cnt]" /> + <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" class="admin_submit" name="submit" value="{--CHANGE_ENTRIES--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_mods_edit.tpl b/templates/de/html/admin/admin_mods_edit.tpl index 192b557155..488556533f 100644 --- a/templates/de/html/admin/admin_mods_edit.tpl +++ b/templates/de/html/admin/admin_mods_edit.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_mods" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_mods" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed"> <tr> <td align="center" class="admin_title bottom2 right2" height="25"><strong>{--MODS_NAME--}</strong></td> @@ -8,7 +8,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_ADMIN--}</strong></td> <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_MEMBER--}</strong></td> </tr> - {!__MODS_ROWS!} + $content <tr> <td colspan="6" class="admin_footer"><input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_mods_list.tpl b/templates/de/html/admin/admin_mods_list.tpl index 73e7511f6a..11f5d85d80 100644 --- a/templates/de/html/admin/admin_mods_list.tpl +++ b/templates/de/html/admin/admin_mods_list.tpl @@ -1,24 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_mods" method="post"> -<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed"> - <tr> - <td align="center" class="admin_title bottom2 right2" height="25"><strong>{--ID_SELECT--}</strong></td> - <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_NAME--}</strong></td> - <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_TITLE--}</strong></td> - <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_LOCKED--}</strong></td> - <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_HIDDEN--}</strong></td> - <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_IS_ADMIN--}</strong></td> - <td align="center" class="admin_title bottom2"><strong>{--MODS_IS_MEMBER--}</strong></td> - </tr> - {!__MODS_ROWS!} - <tr> - <td colspan="7" class="admin_footer"> - <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="edit" class="admin_submit" value="{--MODS_EDIT--}" /> - </td> - </tr> -</table> -</form> - -<div class="admin_note"> - {--MODS_ADMIN_EDIT_NOTE--} -</div> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_mods_list_row.tpl b/templates/de/html/admin/admin_mods_list_row.tpl index 632ff4430c..11f5d85d80 100644 --- a/templates/de/html/admin/admin_mods_list_row.tpl +++ b/templates/de/html/admin/admin_mods_list_row.tpl @@ -1,23 +1 @@ -<tr> - <td class="switch_sw$content[sw] bottom2 right2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" class="admin_normal" name="sel[$content[id]]" value="1" /> - </td> - <td class="switch_sw$content[sw] bottom2 right2"> - $content[mod] - </td> - <td class="switch_sw$content[sw] bottom2 right2"> - $content[title] - </td> - <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[locked] - </td> - <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[hidden] - </td> - <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[admin] - </td> - <td class="switch_sw$content[sw] bottom2" align="center"> - $content[mem] - </td> -</tr> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_mods_stats.tpl b/templates/de/html/admin/admin_mods_stats.tpl index 821a3fd943..b52f9be563 100644 --- a/templates/de/html/admin/admin_mods_stats.tpl +++ b/templates/de/html/admin/admin_mods_stats.tpl @@ -4,7 +4,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_TITLE--}</strong></td> <td align="center" class="admin_title bottom2"><strong>{--MODS_CLICKS--}</strong></td> </tr> - {!__MODS_ROWS!} + $content <tr> <td colspan="2" class="admin_footer"><div class="admin_note">{--MODS_ADMIN_EDIT_NOTE--}</div></td> </tr> diff --git a/templates/de/html/admin/admin_mods_stats2.tpl b/templates/de/html/admin/admin_mods_stats2.tpl index 36b196ecc8..69edf9de2e 100644 --- a/templates/de/html/admin/admin_mods_stats2.tpl +++ b/templates/de/html/admin/admin_mods_stats2.tpl @@ -4,7 +4,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--MODS_WHAT_ACTION--}</strong></td> <td align="center" class="admin_title bottom2"><strong>{--MODS_CLICKS--}</strong></td> </tr> - {!__MODS_ROWS!} + $content <tr> <td colspan="2" class="admin_footer"> </td> </tr> diff --git a/templates/de/html/admin/admin_newsletter.tpl b/templates/de/html/admin/admin_newsletter.tpl index aa6e4672b1..d5eaad0a41 100644 --- a/templates/de/html/admin/admin_newsletter.tpl +++ b/templates/de/html/admin/admin_newsletter.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=send_newsletter" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=send_newsletter" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center" width="430"> <tr> @@ -12,9 +12,9 @@ <td width="10" class="seperator"> </td> <td width="200">{--ENTER_NL_SUBJECT--}:</td> <td width="10" class="seperator"> </td> - <td width="200" align="center"><input type="text" name="subject" - class="admin_normal" size="30" maxlength="200" - value="{--NEWSLETTER_FROM--} {--_DATESTAMP--}"></td> + <td width="200" align="center"> + <input type="text" name="subject" class="admin_normal" size="30" maxlength="200" value="{--NEWSLETTER_FROM--} $content[datestamp]" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -28,13 +28,15 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="50%" align="right">{--NL_MODE_TEXT--}</td> - <td width="50%"> <input type="radio" name="mode" - class="admin_normal" value="text" checked="checked" /></td> + <td width="50%"> + <input type="radio" name="mode" class="admin_normal" value="text" checked="checked" /> + </td> </tr> <tr> <td align="right">{--NL_MODE_HTML--}</td> - <td> <input type="radio" name="mode" class="admin_normal" - value="html"></td> + <td> + <input type="radio" name="mode" class="admin_normal" value="html" /> + </td> </tr> </table> </td> diff --git a/templates/de/html/admin/admin_newsletter_nohtml.tpl b/templates/de/html/admin/admin_newsletter_nohtml.tpl index 3e8a6557e7..1fdda0ace4 100644 --- a/templates/de/html/admin/admin_newsletter_nohtml.tpl +++ b/templates/de/html/admin/admin_newsletter_nohtml.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=send_newsletter" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=send_newsletter" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center" width="430"> <tr> <td colspan="5" class="admin_title bottom2" align="center" height="30"> @@ -13,7 +13,7 @@ <td width="10" class="seperator"> </td> <td width="200" align="center"><input type="text" name="subject" class="admin_normal" size="30" maxlength="200" - value="{--NEWSLETTER_FROM--} {--_DATESTAMP--}"></td> + value="{--NEWSLETTER_FROM--} $content[datestamp]" /></td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -31,7 +31,7 @@ class="admin_normal" value="Y" checked="checked" /></td> <td width="30%">{--NO--}</td> <td width="20%"> <input type="radio" name="auto_urls" - class="admin_normal" value="N"></td> + class="admin_normal" value="N" /></td> </tr> </table> </td> diff --git a/templates/de/html/admin/admin_newsletter_tsk.tpl b/templates/de/html/admin/admin_newsletter_tsk.tpl index 3ce5886b59..11f5d85d80 100644 --- a/templates/de/html/admin/admin_newsletter_tsk.tpl +++ b/templates/de/html/admin/admin_newsletter_tsk.tpl @@ -1,5 +1 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_newsletter" method="post" style="margin-bottom: 0px"> - <input type="hidden" name="uid" value="$content[uid]" /> - <input type="hidden" name="id" value="$content[id]" /> - <input type="submit" name="unsub" class="admin_submit" value="{--ADMIN_NL_UNSUBSCRIBE--}" /> -</form> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_online_footer.tpl b/templates/de/html/admin/admin_online_footer.tpl index 17b6ebb6c7..11f5d85d80 100644 --- a/templates/de/html/admin/admin_online_footer.tpl +++ b/templates/de/html/admin/admin_online_footer.tpl @@ -1,4 +1 @@ -<tr> - <td colspan="8" class="admin_footer">$content</td> -</tr> -</table> \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_online_header.tpl b/templates/de/html/admin/admin_online_header.tpl index b966e9fdb7..11f5d85d80 100644 --- a/templates/de/html/admin/admin_online_header.tpl +++ b/templates/de/html/admin/admin_online_header.tpl @@ -1,28 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" width="99%" - align="center" class="admin_table dashed"> - <tr> - <td colspan="6" height="7" class="seperator"> </td> - </tr> - <tr> - <td colspan="8" align="left"> - <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr> - <td width="10"> </td> - <td><strong>{--ADMIN_ONLINE_DETAILS--}</strong></td> - </tr> - </table> - </td> - </tr> - <tr> - <td colspan="8" height="10" class="seperator bottom"> </td> - </tr> - <tr> - <td align="center" width="5%" class="admin_title bottom right"><strong>{--ID_SELECT--}</strong></td> - <td align="center" width="10%" class="admin_title bottom right"><strong>{--_UID--}:</strong></td> - <td align="center" width="10%" class="admin_title bottom right"><strong>{--REMOTE_IP--}:</strong></td> - <td align="center" width="5%" class="admin_title bottom right"><strong>{--_REFID--}:</strong></td> - <td align="center" width="10%" class="admin_title bottom right"><strong>{--_MODULE--}:</strong></td> - <td align="center" width="10%" class="admin_title bottom right"><strong>{--MENU_ACTION--}:</strong></td> - <td align="center" width="5%" class="admin_title bottom right"><strong>{--MENU_WHAT--}:</strong></td> - <td align="center" width="10%" class="admin_title bottom"><strong>{--LAST_SEEN--}:</strong></td> - </tr> \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_online_list.tpl b/templates/de/html/admin/admin_online_list.tpl new file mode 100644 index 0000000000..11f5d85d80 --- /dev/null +++ b/templates/de/html/admin/admin_online_list.tpl @@ -0,0 +1 @@ +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_online_row.tpl b/templates/de/html/admin/admin_online_row.tpl new file mode 100644 index 0000000000..11f5d85d80 --- /dev/null +++ b/templates/de/html/admin/admin_online_row.tpl @@ -0,0 +1 @@ +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_optimize.tpl b/templates/de/html/admin/admin_optimize.tpl index 828e0e6cd0..7551eaaea0 100644 --- a/templates/de/html/admin/admin_optimize.tpl +++ b/templates/de/html/admin/admin_optimize.tpl @@ -1,26 +1,20 @@ -<table border="0" cellspacing="0" cellpadding="0" - class="admin_table dashed"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> - <td width="120" class="admin_title bottom2 right2" align="center" - height="24"><strong>{--OPTIMIZE_DBNAME--}:</strong></td> + <td width="120" class="admin_title bottom2 right2" align="center"><strong>{--OPTIMIZE_DBNAME--}:</strong></td> <td width="110" class="admin_title bottom2 right2" align="center"><strong>{--OPTIMIZE_REPAIRED--}:</strong></td> <td width="110" class="admin_title bottom2 right2" align="center"><strong>{--OPTIMIZE_OPTIMIZED--}:</strong></td> <td width="120" class="admin_title bottom2 right2" align="center"><strong>{--OPTIMIZE_TOTAL_SIZE--}:</strong></td> <td width="120" class="admin_title bottom2" align="center"><strong>{--OPTIMIZE_GAIN_SIZE--}:</strong></td> </tr> - {!__ROWS!} + $content[rows] <tr> - <td colspan="5" class="admin_footer" - style="padding-top: 15px; padding-bottom: 15px";> - {--OPTIMIZE_DB_TOTAL_TABLES--}: <strong>{!__TOTAL_TABS!}</strong><br /> - {--OPTIMIZE_DB_TOTAL_SIZE--}: <strong>{!__TOTAL_SIZE!} - {--KBYTES--}</strong><br /> - {--OPTIMIZE_DB_TOTAL_OPTIMIZE--}: <strong>{!__TOTAL_CALLS!}</strong><br /> - {--OPTIMIZE_DB_TOTAL_OPTI--}: <strong>{!__TOTAL_OPTIMIZED!} - {--KBYTES--}</strong><br /> - {--OPTIMIZE_DB_TOTAL_GAIN_TABLES--}: <strong>{!__NOW_OPTIMIZED!}</strong><br /> - {--OPTIMIZE_DB_TOTAL_GAIN_SIZE--}: <strong>{!__NOW_SAVED!} - {--KBYTES--}</strong><br /> + <td colspan="5" class="admin_footer" style="padding-top: 15px; padding-bottom: 15px";> + {--OPTIMIZE_DB_TOTAL_TABLES--}: <strong>$content[total_tabs]</strong><br /> + {--OPTIMIZE_DB_TOTAL_SIZE--}: <strong>$content[total_size] {--KBYTES--}</strong><br /> + {--OPTIMIZE_DB_TOTAL_OPTIMIZE--}: <strong>$content[total_rows]</strong><br /> + {--OPTIMIZE_DB_TOTAL_OPTI--}: <strong>$content[total_optimized] {--KBYTES--}</strong><br /> + {--OPTIMIZE_DB_TOTAL_GAIN_TABLES--}: <strong>$content[now_optimized]</strong><br /> + {--OPTIMIZE_DB_TOTAL_GAIN_SIZE--}: <strong>$content[now_saved] {--KBYTES--}</strong><br /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_other_sqls.tpl b/templates/de/html/admin/admin_other_sqls.tpl new file mode 100644 index 0000000000..3b424c832f --- /dev/null +++ b/templates/de/html/admin/admin_other_sqls.tpl @@ -0,0 +1,8 @@ +<div class="sql_table top2 left2 right2"> + <div class="sql_header bottom2"> + SQL-Debugging: + </div> + <div class="sql_content"> + $content + </div> +</div> diff --git a/templates/de/html/admin/admin_other_sqls_row.tpl b/templates/de/html/admin/admin_other_sqls_row.tpl new file mode 100644 index 0000000000..c1bf53d4f9 --- /dev/null +++ b/templates/de/html/admin/admin_other_sqls_row.tpl @@ -0,0 +1,7 @@ +<div id="sql_row_$content[i]" class="sql_row switch_sw$content[sw] bottom2"> + SQL-Abfrage: <span class="sql_data">$content[sql_str]</span> + (numRows=<span class="sql_data">$content[num_rows]</span>,affected=<span class="sql_data">$content[affected]</span>) | + Script: <span class="sql_data">$content[file]</span> | + Zeile: <span class="sql_data">$content[line]</span> | + Zeit: <span class="sql_data">$content[timing]ms</span> +</div> diff --git a/templates/de/html/admin/admin_overview_footer.tpl b/templates/de/html/admin/admin_overview_footer.tpl new file mode 100644 index 0000000000..ec0a4594ed --- /dev/null +++ b/templates/de/html/admin/admin_overview_footer.tpl @@ -0,0 +1,12 @@ +<tr> + <td colspan="7" align="center" class="admin_footer bottom2 left2 right2"> + <input type="reset" value="{--ADMIN_UNSELECT_ALL--}" class="admin_reset" /> + <input type="submit" name="assign" value="{--ADMIN_ASSIGN_TASKS--}" class="admin_submit" /> + <input type="submit" name="unassign" value="{--ADMIN_UNASSIGN_TASKS--}" class="admin_submit" /> + <input type="submit" name="redir" value="{--ADMIN_REDIRECT_TASKS--}" class="admin_submit" /> + <input type="submit" name="del" value="{--ADMIN_DELETE_ENTRIES--}" class="admin_delete" /> + </td> +</tr> +</table> +</div> +</form> diff --git a/templates/de/html/admin/admin_overview_header_task.tpl b/templates/de/html/admin/admin_overview_header_task.tpl index f90033f49a..802938c926 100644 --- a/templates/de/html/admin/admin_overview_header_task.tpl +++ b/templates/de/html/admin/admin_overview_header_task.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_task&type=$content[type]" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_task&type=$content[type]" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="95%" align="center" class="admin_table"> <tr> <td colspan="7" align="center" class="admin_task_header top2 left2 right2"> diff --git a/templates/de/html/admin/admin_overview_list.tpl b/templates/de/html/admin/admin_overview_list.tpl index 1d8ddd136a..a3fcce4800 100644 --- a/templates/de/html/admin/admin_overview_list.tpl +++ b/templates/de/html/admin/admin_overview_list.tpl @@ -4,5 +4,5 @@ <strong class="admin_welcome">{--ADMIN_SELECTED_TASKS_ASSIGN--}:</strong> </td> </tr> -{!__TASK_ROWS!} +$content </table> 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 6b0d50b40a..3f7d02aa92 100644 --- a/templates/de/html/admin/admin_overview_list_ext_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_ext_rows.tpl @@ -1,9 +1,9 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2 left2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[admin] + $content[assigned_admin] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> <a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{?URL?}/modules.php?module=admin&what=extensions&reg_ext=$content[id]">{--ADMIN_REGISTER_EXTENSION--}</a> @@ -12,10 +12,10 @@ $content[infos] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[uid] + $content[userid] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[type] + $content[task_type_msg] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[created]] diff --git a/templates/de/html/admin/admin_overview_list_rows.tpl b/templates/de/html/admin/admin_overview_list_rows.tpl index 9a8e24ca67..ad858622a3 100644 --- a/templates/de/html/admin/admin_overview_list_rows.tpl +++ b/templates/de/html/admin/admin_overview_list_rows.tpl @@ -1,9 +1,9 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2 left2" align="center"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="task[$content[id]]" value="1" /> </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[admin] + $content[assigned_admin] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> --- @@ -12,10 +12,10 @@ $content[infos] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[uid] + $content[userid] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> - $content[type] + $content[task_type_msg] </td> <td class="switch_sw$content[sw] bottom2 right2" align="center"> $content[created]] diff --git a/templates/de/html/admin/admin_overview_row.tpl b/templates/de/html/admin/admin_overview_row.tpl index 1be52b1d12..5916d9b51d 100644 --- a/templates/de/html/admin/admin_overview_row.tpl +++ b/templates/de/html/admin/admin_overview_row.tpl @@ -3,8 +3,7 @@ <ul style="margin-left: 0px"> <li style="white-space: normal">{--ADMIN_TASK_SUBJECT--}: <strong>$content[subj]</strong></li> $content[add] - <li style="white-space: normal">{--ADMIN_TASK_TEXT--}: - $content[text]</li> + <li style="white-space: normal">{--ADMIN_TASK_TEXT--}: $content[text]</li> <li style="white-space: normal"> <div style="text-align: right"><a href="#ext_$content[extension]">{--TOP--}</a></div> diff --git a/templates/de/html/admin/admin_overview_table.tpl b/templates/de/html/admin/admin_overview_table.tpl index 1b16f64b93..f2ead0bf20 100644 --- a/templates/de/html/admin/admin_overview_table.tpl +++ b/templates/de/html/admin/admin_overview_table.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="95%" align="center" class="admin_table"> <tr> <td colspan="7" align="center" class="admin_task_header top2 left2 right2"> diff --git a/templates/de/html/admin/admin_overview_task.tpl b/templates/de/html/admin/admin_overview_task.tpl index 65d73b164f..d15daf2634 100644 --- a/templates/de/html/admin/admin_overview_task.tpl +++ b/templates/de/html/admin/admin_overview_task.tpl @@ -1,7 +1,8 @@ <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="2" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_TASK_OVERVIEW_HEADER--}</strong></td> + <strong>{--ADMIN_TASK_OVERVIEW_HEADER--}</strong> + </td> </tr> <tr> <td width="290" class="seperator" align="center"> </td> @@ -11,88 +12,101 @@ <td align="center" valign="top"> <table border="0" cellspacing="0" cellpadding="0" width="275" class="admin_table dashed"> <tr> - <td colspan="3" class="admin_title2 bottom2"><strong>{--ADMIN_TASK_OVERVIEW_MAILS--}:</strong> + <td colspan="3" class="admin_title2 bottom2"> + <strong>{--ADMIN_TASK_OVERVIEW_MAILS--}:</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_MAIL_ADMIN--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw1 bottom2"><strong>{!__MAIL_ADMIN_VALUE!}</strong> + <td width="25" align="center" class="switch_sw1 bottom2"> + <strong>$content[pending_mails]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw2 bottom2">{--ADMIN_TASK_MAIL_TEMP--}:</td> <td width="10" class="switch_sw2 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw2 bottom2"><strong>{!__MAIL_TEMP_VALUE!}</strong> + <td width="25" align="center" class="switch_sw2 bottom2"> + <strong>$content[canceled_mails]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_MAIL_SEND--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw1 bottom2"><strong>{!__MAIL_SEND_VALUE!}</strong> + <td width="25" align="center" class="switch_sw1 bottom2"> + <strong>$content[send_emails]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw2 bottom2">{--ADMIN_TASK_MAIL_DELETED--}:</td> <td width="10" class="switch_sw2 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw2 bottom2"><strong>{!__MAIL_DELETED_VALUE!}</strong> + <td width="25" align="center" class="switch_sw2 bottom2"> + <strong>$content[purged_mails]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_MAIL_BONUS_SEND--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw1 bottom2"><strong>{!__MAIL_BONUS_SEND_VALUE!}</strong> + <td width="25" align="center" class="switch_sw1 bottom2"> + <strong>$content[send_bonus_mails]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw2">{--ADMIN_TASK_MAIL_BONUS_AP--}:</td> <td width="10" class="switch_sw2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw2"><strong>{!__MAIL_BONUS_AP_VALUE!}</strong> + <td width="25" align="center" class="switch_sw2"> + <strong>$content[purged_bonus_mails]</strong> </td> </tr> </table> </td> <td align="center" valign="top"> - <table border="0" cellspacing="0" cellpadding="0" width="275" - class="admin_table dashed"> + <table border="0" cellspacing="0" cellpadding="0" width="275" class="admin_table dashed"> <tr> - <td colspan="3" class="admin_title2 bottom2"><strong>{--ADMIN_TASK_OVERVIEW_TASKS--}:</strong> + <td colspan="3" class="admin_title2 bottom2"> + <strong>{--ADMIN_TASK_OVERVIEW_TASKS--}:</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_NEW_TASKS--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw1 bottom2"><strong>{!__TASK_NEW_VALUE!}</strong> + <td width="25" align="center" class="switch_sw1 bottom2"> + <strong>$content[new_tasks]</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw2 bottom2">{--ADMIN_TASK_UPDATE_TASKS--}:</td> <td width="10" class="switch_sw2 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw2 bottom2"><strong>{!__TASK_UPDATE_VALUE!}</strong> + <td width="25" align="center" class="switch_sw2 bottom2"> + <strong>$content[update_tasks]</strong> </td> </tr> <tr> <td align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_CLOSED_TASKS--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td align="center" class="switch_sw1 bottom2"><strong>{!__TASK_CLOSED_VALUE!}</strong> + <td align="center" class="switch_sw1 bottom2"> + <strong>$content[closed_tasks]</strong> </td> </tr> <tr> <td align="right" class="switch_sw2 bottom2">{--ADMIN_TASK_YOUR_TASKS--}:</td> <td width="10" class="switch_sw2 bottom2 seperator" height="5"> </td> - <td align="center" class="switch_sw2 bottom2"><strong>{!__TASK_YOUR_VALUE!}</strong> + <td align="center" class="switch_sw2 bottom2"> + <strong>$content[your_tasks]</strong> </td> </tr> <tr> <td align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_DELETED_TASKS--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td align="center" class="switch_sw1 bottom2"><strong>{!__TASK_DELETED_VALUE!}</strong> + <td align="center" class="switch_sw1 bottom2"> + <strong>$content[deleted_tasks]</strong> </td> </tr> <tr> <td align="right" class="switch_sw2">{--ADMIN_TASK_SOLVED_TASKS--}:</td> <td width="10" class="switch_sw2 seperator" height="5"> </td> - <td align="center" class="switch_sw2"><strong>{!__TASK_SOLVED_VALUE!}</strong> + <td align="center" class="switch_sw2"> + <strong>$content[solved_tasks]</strong> </td> </tr> </table> @@ -103,33 +117,36 @@ </tr> <tr> <td align="center" valign="top"> - <table border="0" cellspacing="0" cellpadding="0" width="275" - class="admin_table dashed"> + <table border="0" cellspacing="0" cellpadding="0" width="275" class="admin_table dashed"> <tr> - <td colspan="3" class="admin_title2 bottom2"><strong>{--ADMIN_TASK_OVERVIEW_MEMBERS--}:</strong> + <td colspan="3" class="admin_title2 bottom2"> + <strong>{--ADMIN_TASK_OVERVIEW_MEMBERS--}:</strong> </td> </tr> <tr> <td width="240" align="right" class="switch_sw1 bottom2">{--ADMIN_TASK_CONFIRMED--}:</td> <td width="10" class="switch_sw1 bottom2 seperator" height="5"> </td> - <td width="25" align="center" class="switch_sw1 bottom2"><strong>{!__CONFIRMED_VALUE!}</strong> + <td width="25" align="center" class="switch_sw1 bottom2"> + <strong>$content[confirmed_members]</strong> </td> </tr> <tr> <td align="right" class="switch_sw2 bottom2">{--ADMIN_TASK_UNCONFIRMED--}:</td> <td width="10" class="switch_sw2 bottom2 seperator" height="5"> </td> - <td align="center" class="switch_sw2 bottom2"><strong>{!__UNCONFIRMED_VALUE!}</strong> + <td align="center" class="switch_sw2 bottom2"> + <strong>$content[unconfirmed_members]</strong> </td> </tr> <tr> <td align="right" class="switch_sw1">{--ADMIN_TASK_LOCKED--}:</td> <td width="10" class="switch_sw1 seperator" height="5"> </td> - <td align="center" class="switch_sw1"><strong>{!__LOCKED_VALUE!}</strong> + <td align="center" class="switch_sw1"> + <strong>$content[locked_members]</strong> </td> </tr> </table> </td> - <td align="center" valign="top">{!__OVERVIEW_EXTRA_TABLE!}</td> + <td align="center" valign="top">$content[extra_table]</td> </tr> <tr> <td colspan="2" class="seperator" align="center"> </td> diff --git a/templates/de/html/admin/admin_overview_task_rows.tpl b/templates/de/html/admin/admin_overview_task_rows.tpl index b211f48193..91441300b3 100644 --- a/templates/de/html/admin/admin_overview_task_rows.tpl +++ b/templates/de/html/admin/admin_overview_task_rows.tpl @@ -1,13 +1,5 @@ - -<!-- row template for extended overview --> <tr> - <td width="240" align="right" - class="switch_sw$content[row_sw] $content[bottom]">$content[row_descr]:</td> - <td width="10" - class="switch_sw$content[row_sw] $content[bottom] seperator" - height="5"> </td> - <td width="25" align="center" - class="switch_sw$content[row_sw] $content[bottom]"><strong>$content[row_link]</strong> - </td> + <td width="240" align="right" class="switch_sw$content[row_sw] $content[bottom]">$content[row_descr]:</td> + <td width="10" class="switch_sw$content[row_sw] $content[bottom] seperator" height="5"> </td> + <td width="25" align="center" class="switch_sw$content[row_sw] $content[bottom]"><strong>$content[row_link]</strong></td> </tr> -<!-- row template for extended overview --> diff --git a/templates/de/html/admin/admin_patches.tpl b/templates/de/html/admin/admin_patches.tpl index d664040e01..11f5d85d80 100644 --- a/templates/de/html/admin/admin_patches.tpl +++ b/templates/de/html/admin/admin_patches.tpl @@ -1,32 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" width="99%" - class="admin_table dashed" align="center"> - <tr> - <td height="10" colspan="5" class="seperator"> </td> - </tr> - <tr> - <td align="center" colspan="5"><strong>{--NEW_PATCHES_AVAILABLE--}</strong> - </td> - </tr> - <tr> - <td height="10" colspan="5" class="seperator"> </td> - </tr> - <tr> - <td width="10" class="seperator"> </td> - <td align="center" width="32%" class="admin_title bottom2 right2"><strong>{--PATCH_FNAME--}:</strong></td> - <td align="center" width="32%" class="admin_title bottom2 right2"><strong>{--PATCH_CTIME--}:</strong></td> - <td align="center" width="32%" class="admin_title bottom2"><strong>{--PATCH_FSIZE--}:</strong></td> - <td width="10" class="seperator"> </td> - </tr> - {!__PATCH_ROWS!} - <tr> - <td width="10" class="seperator"> </td> - <td colspan="2" align="right" class="bottom2 right2"><strong>{--ADMIN_TOTAL_PATCH_SIZES--}: </strong> - </td> - <td class="bottom2" align="center"><strong>{!__TOTAL_SIZE!} - {--KBYTES--}</strong></td> - <td width="10" class="seperator"> </td> - </tr> - <tr> - <td height="10" colspan="5" class="seperator"> </td> - </tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_patches_row.tpl b/templates/de/html/admin/admin_patches_row.tpl index 9449ffeee4..11f5d85d80 100644 --- a/templates/de/html/admin/admin_patches_row.tpl +++ b/templates/de/html/admin/admin_patches_row.tpl @@ -1,14 +1 @@ -<tr> - <td rowspan="2" width="10" class="seperator"> </td> - <td align="center" class="switch_sw$content[sw] bottom2 right2"><a - href="$content[patch_url]">$content[patch_title]</a></td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[patch_ctime]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[patch_size] - {--KBYTES--}</td> - <td rowspan="2" width="10" class="seperator"> </td> -</tr> -<tr> - <td colspan="3" class="switch_sw$content[sw] bottom2"> - <div align="center"><strong>{--PATCH_DESCRIPTION--}:</strong></div> - $content[patch_desc]</td> -</tr> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_payments_list_row.tpl b/templates/de/html/admin/admin_payments_list_row.tpl index c0c257877a..c7b9796661 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 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" /> </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> $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 fa87022ea8..3db74f5467 100644 --- a/templates/de/html/admin/admin_payout_accept_form.tpl +++ b/templates/de/html/admin/admin_payout_accept_form.tpl @@ -1,7 +1,8 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_payouts&do=accept&pid=$content[pid]&task=$content[task]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_payouts&do=accept&pid=$content[pid]&task=$content[task]" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="380" class="admin_table dashed" align="center"> <tr> - <td class="admin_title bottom2" align="center" height="30"><strong>{--PAYOUT_ACCEPT_PAYOUT_INTRO--}</strong> + <td class="admin_title bottom2" align="center" height="30"> + <strong>{--PAYOUT_ACCEPT_PAYOUT_INTRO--}</strong> </td> </tr> <tr> @@ -9,7 +10,8 @@ </tr> <tr> <td align="center">{--PAYOUT_RECEIVER_ACCEPT--}:<br /> - {--PAYOUT_USERDATA_VALUE--}</td> + $content[user] + </td> </tr> <tr> <td class="seperator bottom2" height="5"> </td> @@ -19,17 +21,17 @@ </tr> <tr> <td align="center">{--PAYOUT_OPTIONAL_TEXT--}:<br /> - <textarea name="text" class="admin_normal" rows="5" cols="30"></textarea> + <textarea name="text" class="admin_normal" rows="5" cols="30"></textarea> </td> </tr> <tr> <td class="seperator bottom2" height="5"> </td> </tr> <tr> - <td class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--PAYOUT_ACCEPT_PAYOUT--}" /></td> + <td class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--PAYOUT_ACCEPT_PAYOUT--}" /> + </td> </tr> </table> -</form> \ No newline at end of file +</form> diff --git a/templates/de/html/admin/admin_payout_add_new.tpl b/templates/de/html/admin/admin_payout_add_new.tpl index c86f83b8ab..0643fe4714 100644 --- a/templates/de/html/admin/admin_payout_add_new.tpl +++ b/templates/de/html/admin/admin_payout_add_new.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=config_payouts" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_payouts" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="3" align="center" class="admin_title bottom2" height="40"> diff --git a/templates/de/html/admin/admin_payout_overview_form.tpl b/templates/de/html/admin/admin_payout_overview_form.tpl index 3c11be476e..eaf474633a 100644 --- a/templates/de/html/admin/admin_payout_overview_form.tpl +++ b/templates/de/html/admin/admin_payout_overview_form.tpl @@ -1,7 +1,7 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_payouts&do=accept&pid=$content[pid]&task=$content[tid]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_payouts&do=accept&pid=$content[pid]&task=$content[tid]" method="post"> <input type="submit" class="admin_submit" value="{--PAYOUT_ACCEPT_PAYOUT--}" /> </form> <br /> -<form action="{?URL?}/modules.php?module=admin&what=list_payouts&do=reject&pid=$content[pid]&task=$content[tid]" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_payouts&do=reject&pid=$content[pid]&task=$content[tid]" method="post"> <input type="submit" class="admin_delete" value="{--PAYOUT_REJECT_PAYOUT--}" /> </form> diff --git a/templates/de/html/admin/admin_payout_reject_form.tpl b/templates/de/html/admin/admin_payout_reject_form.tpl index 2310209bae..e9a0f11838 100644 --- a/templates/de/html/admin/admin_payout_reject_form.tpl +++ b/templates/de/html/admin/admin_payout_reject_form.tpl @@ -1,8 +1,8 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_payouts&do=reject&pid=$content[pid]&task=$content[task]" method="post"> -<table border="0" cellspacing="0" cellpadding="0" width="380" - class="admin_table dashed" align="center"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_payouts&do=reject&pid=$content[pid]&task=$content[task]" method="post"> +<table border="0" cellspacing="0" cellpadding="0" width="380" class="admin_table dashed" align="center"> <tr> - <td class="admin_title bottom2" align="center" height="30"><strong>{--PAYOUT_REJECT_PAYOUT_INTRO--}</strong> + <td class="admin_title bottom2" align="center" height="30"> + <strong>{--PAYOUT_REJECT_PAYOUT_INTRO--}</strong> </td> </tr> <tr> @@ -10,7 +10,8 @@ </tr> <tr> <td align="center">{--PAYOUT_RECEIVER_REJECT--}:<br /> - {--PAYOUT_USERDATA_VALUE--}</td> + $content[user] + </td> </tr> <tr> <td class="seperator bottom2" height="5"> </td> @@ -20,17 +21,17 @@ </tr> <tr> <td align="center">{--PAYOUT_OPTIONAL_TEXT--}:<br /> - <textarea name="text" class="admin_normal" rows="5" cols="30"></textarea> + <textarea name="text" class="admin_normal" rows="5" cols="30"></textarea> </td> </tr> <tr> <td class="seperator bottom2" height="5"> </td> </tr> <tr> - <td class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_delete" - value="{--PAYOUT_REJECT_PAYOUT--}" /></td> + <td class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_delete" value="{--PAYOUT_REJECT_PAYOUT--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_points.tpl b/templates/de/html/admin/admin_points.tpl index a3d0cd6395..73592971a8 100644 --- a/templates/de/html/admin/admin_points.tpl +++ b/templates/de/html/admin/admin_points.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="3" class="admin_title" height="30"> @@ -11,7 +11,7 @@ <td class="admin_title bottom2 right2" width="275" align="center"><strong>{--REF_LEVEL--}:</strong></td> <td class="admin_title bottom2" width="275" align="center"><strong>{--REF_PERCENT--}:</strong></td> </tr> - {!__LEVEL_ROWS!} + $content <tr> <td class="admin_footer" colspan="3"> <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> diff --git a/templates/de/html/admin/admin_points_del.tpl b/templates/de/html/admin/admin_points_del.tpl index 35bf8f190e..5853d7f98d 100644 --- a/templates/de/html/admin/admin_points_del.tpl +++ b/templates/de/html/admin/admin_points_del.tpl @@ -1,14 +1,14 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=del" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=del" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="500"> <tr> <td align="center" height="30" class="bottom2 admin_title"><strong>{--DELETE_REF_DEPTHS--}:</strong></td> </tr> - {!__LEVEL_ROWS!} + $content <tr> - <td class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_delete" value="{--REMOVE_REF--}" /> + <td class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_delete" value="{--REMOVE_REF--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_points_del_row.tpl b/templates/de/html/admin/admin_points_del_row.tpl index 2241703e4d..1f6ceac2a4 100644 --- a/templates/de/html/admin/admin_points_del_row.tpl +++ b/templates/de/html/admin/admin_points_del_row.tpl @@ -1,9 +1,9 @@ <tr> - <td height="5" class="seperator"></td> + <td height="5" class="seperator"> </td> </tr> <tr> <td align="center" class="switch_sw$content[sw]"> - <strong>{--REF_LEVEL--} $content[lvl]:</strong> + <strong>{--REF_LEVEL--} $content[level]:</strong> </td> </tr> <tr> @@ -11,7 +11,7 @@ </tr> <tr> <td align="center" class="switch_sw$content[sw]"> - $content[per]% <span class="tiny">({--ID_SELECT--} $content[id])</span> + $content[percents]% <span class="tiny">({--ID_SELECT--} $content[id])</span> <input type="hidden" name="id[$content[id]]" value="1" size="35" /> </td> </tr> diff --git a/templates/de/html/admin/admin_points_edit.tpl b/templates/de/html/admin/admin_points_edit.tpl index 850f75a51b..ba93bdd2c7 100644 --- a/templates/de/html/admin/admin_points_edit.tpl +++ b/templates/de/html/admin/admin_points_edit.tpl @@ -1,16 +1,17 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=config_points&sub=ref&do=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="550"> <tr> <td align="center" colspan="2" height="30" class="bottom2 admin_title"> - <strong>{--EDIT_REF_DEPTHS--}:</strong></td> + <strong>{--EDIT_REF_DEPTHS--}:</strong> + </td> </tr> - {!__LEVEL_ROWS!} + $content <tr> - <td align="center" colspan="2" class="admin_footer"><input - type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="admin_submit" - value="{--CHANGE_REF--}" /></td> + <td align="center" colspan="2" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--CHANGE_REF--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_points_edit_row.tpl b/templates/de/html/admin/admin_points_edit_row.tpl index 20b2e0b3d7..91c5c3258b 100644 --- a/templates/de/html/admin/admin_points_edit_row.tpl +++ b/templates/de/html/admin/admin_points_edit_row.tpl @@ -8,8 +8,8 @@ <tr> <td class="switch_sw$content[sw]" width="50%" align="right">{--REF_LEVEL--}: </td> <td class="switch_sw$content[sw]" align="left" width="50%"><input - type="text" name="lvl[$content[id]]" class="admin_normal" - value="$content[lvl]" size="3" maxlength="5"></td> + type="text" name="level[$content[id]]" class="admin_normal" + value="$content[level]" size="3" maxlength="5"></td> </tr> <tr> <td class="switch_sw$content[sw]" colspan="2" height="5"></td> @@ -17,7 +17,7 @@ <tr> <td class="switch_sw$content[sw]" align="right">{--REF_PERCENT--}: </td> <td class="switch_sw$content[sw]" align="left"><input type="text" - name="perc[$content[id]]" class="admin_normal" value="$content[per]" + name="perc[$content[id]]" class="admin_normal" value="$content[percents]" size="3" maxlength="5">%</td> </tr> <tr> diff --git a/templates/de/html/admin/admin_points_row.tpl b/templates/de/html/admin/admin_points_row.tpl index 20081e5349..587496c8b7 100644 --- a/templates/de/html/admin/admin_points_row.tpl +++ b/templates/de/html/admin/admin_points_row.tpl @@ -1,11 +1,11 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="sel[$content[id]]" value="1" /> </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - $content[lvl] + $content[level] </td> <td align="center" class="bottom2 switch_sw$content[sw]"> - $content[per]% + $content[percents]% </td> </tr> diff --git a/templates/de/html/admin/admin_refbanner.tpl b/templates/de/html/admin/admin_refbanner.tpl index fd8f5b7eaf..cfef9665cb 100644 --- a/templates/de/html/admin/admin_refbanner.tpl +++ b/templates/de/html/admin/admin_refbanner.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=refbanner" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=refbanner" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td width="10" class="admin_title seperator bottom2"> </td> @@ -17,7 +17,7 @@ <td class="admin_header bottom2" align="center"><strong>{--REF_VIS--}:</strong></td> <td class="admin_header seperator bottom2" width="10"> </td> </tr> - {!__BANNER_ROWS!} + $content <tr> <td class="admin_footer seperator" width="10"> </td> <td class="admin_footer" colspan="6"><input diff --git a/templates/de/html/admin/admin_refbanner_edit.tpl b/templates/de/html/admin/admin_refbanner_edit.tpl index 1c639a2dbc..8855c768d5 100644 --- a/templates/de/html/admin/admin_refbanner_edit.tpl +++ b/templates/de/html/admin/admin_refbanner_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=refbanner&mode=edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=refbanner&mode=edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td width="10" class="admin_header bottom2 seperator"> </td> @@ -7,7 +7,7 @@ height="30"><strong>{--EDIT_REFBANNER--}</strong></td> <td width="10" class="admin_header bottom2 seperator"> </td> </tr> - {!__BANNER_ROWS!} + $content <tr> <td class="admin_footer seperator" width="10"> </td> <td class="admin_footer" colspan="3"><input diff --git a/templates/de/html/admin/admin_refbanner_row.tpl b/templates/de/html/admin/admin_refbanner_row.tpl index c7f5bf4f6e..5c92d3e963 100644 --- a/templates/de/html/admin/admin_refbanner_row.tpl +++ b/templates/de/html/admin/admin_refbanner_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom right2" colspan="2"> - <input type="checkbox" name="sel[$content[id]]" title="{--ID_SELECT--} $content[id]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" name="sel[$content[id]]" title="{--ID_SELECT--} $content[id]" value="1" /> </td> <td align="center" class="switch_sw$content[sw] bottom right2"> <img src="$content[url]" alt="$content[alt]" border="0" title="$content[alt]" /> diff --git a/templates/de/html/admin/admin_reg.tpl b/templates/de/html/admin/admin_reg.tpl index de57053d16..f2584c2638 100644 --- a/templates/de/html/admin/admin_reg.tpl +++ b/templates/de/html/admin/admin_reg.tpl @@ -1,7 +1,8 @@ <table border="0" cellspacing="0" cellpadding="0" width="99%" align="center" class="admin_table dashed"> <tr> - <td class="admin_header" colspan="8" align="center"><strong>{--ADMIN_UNCONFIRMED_ACCOUNTS--}:</strong> + <td class="admin_header" colspan="8" align="center"> + <strong>{--ADMIN_UNCONFIRMED_ACCOUNTS--}:</strong> </td> </tr> <tr> @@ -9,10 +10,10 @@ <td class="admin_header right2" align="center">{--GENDER--}</td> <td class="admin_header right2" align="center">{--SURNAME--}</td> <td class="admin_header right2" align="center">{--FAMILY_NAME--}</td> - <td class="admin_header right2" align="center">{--ADDY--}</td> + <td class="admin_header right2" align="center">{--EMAIL_ADDRESS--}</td> <td class="admin_header right2" align="center">{--REMOTE_IP--}</td> <td class="admin_header right2" align="center" width="20">{--REF_UID--}</td> <td class="admin_header" align="center">{--CONFIRM_ACCOUNT--}</td> </tr> - {!__REG_ROWS!} + $content </table> diff --git a/templates/de/html/admin/admin_reg_form.tpl b/templates/de/html/admin/admin_reg_form.tpl index 8a74710b51..7554a76029 100644 --- a/templates/de/html/admin/admin_reg_form.tpl +++ b/templates/de/html/admin/admin_reg_form.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table register"> <tr> <td colspan="2" align="center" class="admin_title"> @@ -12,20 +12,20 @@ <tr> <td align="right">{--ADMIN_LOGIN--}: </td> <td> - <input type="text" name="login" size="10" maxlength="100" class="admin_normal" value="{!__LOGIN_VALUE!}" /> + <input type="text" name="login" size="10" maxlength="100" class="admin_normal" value="$content[login]" /> </td> </tr> - {!__MSG_LOGIN!} + $content[login_message] <tr> <td colspan="2" height="14" class="seperator"> </td> </tr> <tr> <td align="right">{--ADMIN_PASS--}: </td> <td> - <input type="password" name="pass" size="10" maxlength="100" class="admin_normal" /> + <input type="password" class="admin_normal" name="pass" size="10" maxlength="100" /> </td> </tr> - {!__MSG_PASS!} + $content[pass_message] <tr> <td colspan="2" height="14" class="seperator"> </td> </tr> diff --git a/templates/de/html/admin/admin_reg_row.tpl b/templates/de/html/admin/admin_reg_row.tpl index bfd8eb1a2c..3ec4d156a3 100644 --- a/templates/de/html/admin/admin_reg_row.tpl +++ b/templates/de/html/admin/admin_reg_row.tpl @@ -1,8 +1,8 @@ <tr> <td align="center" class="switch_sw$content[sw] top2 right2">$content[link]</td> <td align="center" class="switch_sw$content[sw] top2 right2">$content[gender]</td> - <td align="center" class="switch_sw$content[sw] top2 right2">$content[sname]</td> - <td align="center" class="switch_sw$content[sw] top2 right2">$content[fname]</td> + <td align="center" class="switch_sw$content[sw] top2 right2">$content[surname]</td> + <td align="center" class="switch_sw$content[sw] top2 right2">$content[family]</td> <td align="center" class="switch_sw$content[sw] top2 right2">$content[email]</td> <td align="center" class="switch_sw$content[sw] top2 right2">$content[ip]</td> <td align="center" class="switch_sw$content[sw] top2 right2">$content[ref]</td> diff --git a/templates/de/html/admin/admin_reset_password.tpl b/templates/de/html/admin/admin_reset_password.tpl index a648f750f3..682066d912 100644 --- a/templates/de/html/admin/admin_reset_password.tpl +++ b/templates/de/html/admin/admin_reset_password.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30" colspan="2"> diff --git a/templates/de/html/admin/admin_reset_password_form.tpl b/templates/de/html/admin/admin_reset_password_form.tpl index 3008056426..6c173e563e 100644 --- a/templates/de/html/admin/admin_reset_password_form.tpl +++ b/templates/de/html/admin/admin_reset_password_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30" colspan="2"> diff --git a/templates/de/html/admin/admin_send_bonus_form.tpl b/templates/de/html/admin/admin_send_bonus_form.tpl index 7fc7f58e0c..3dc9876b27 100644 --- a/templates/de/html/admin/admin_send_bonus_form.tpl +++ b/templates/de/html/admin/admin_send_bonus_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=send_bonus&mode={!__MODE!}" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=send_bonus&mode=$content[mode]" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> <tr> <td colspan="5" height="10" class="seperator"> </td> @@ -7,11 +7,13 @@ <td width="10" class="seperator"> </td> <td align="right">{--SELECT_CATEGORY--}:</td> <td width="10" class="seperator"> </td> - <td><select name="cat" size="1" class="admin_select"> - <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option> - <option value="0">{--ALL_MEMBERS--} ({!__ALL_VALUE!})</option> - {!__OPTION_LINES!} - </select></td> + <td> + <select name="cat" size="1" class="admin_select"> + <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option> + <option value="0">{--ALL_MEMBERS--} ($content[all])</option> + $content[options_lines] + </select> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -21,8 +23,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_RECEIVER--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="receiver" class="admin_normal" - size="4" maxlength="5"></td> + <td> + <input type="text" name="receiver" class="admin_normal" size="4" maxlength="5" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -32,8 +35,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_POINTS--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points" class="admin_normal" - size="4" maxlength="5"></td> + <td> + <input type="text" name="points" class="admin_normal" size="4" maxlength="5" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -43,8 +47,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_SECONDS--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="seconds" class="admin_normal" - size="4" maxlength="5"></td> + <td> + <input type="text" name="seconds" class="admin_normal" size="4" maxlength="5" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -54,8 +59,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_SUBJECT--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="subject" class="admin_normal" - size="30" maxlength="150"></td> + <td> + <input type="text" name="subject" class="admin_normal" size="30" maxlength="150" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -65,8 +71,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_TEXT--}:</td> <td width="10" class="seperator"> </td> - <td><textarea name="text" class="admin_normal" rows="10" - cols="50"></textarea></td> + <td> + <textarea name="text" class="admin_normal" rows="10" cols="50"></textarea> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -76,8 +83,9 @@ <td width="10" class="seperator"> </td> <td align="right">{--MEMBER_ENTER_URL--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="url" class="admin_normal" size="40" - maxlength="350" value="http://"></td> + <td> + <input type="text" name="url" class="admin_normal" size="40" maxlength="350" value="http://" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -85,10 +93,10 @@ </tr> <tr> <td width="10" class="seperator"> </td> - <td colspan="3" align="center"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="admin_submit" - value="{--ADMIN_SEND_MAIL--}" /></td> + <td colspan="3" align="center"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_SEND_MAIL--}" /> + </td> <td width="10" class="seperator"> </td> </tr> <tr> diff --git a/templates/de/html/admin/admin_send_bonus_select.tpl b/templates/de/html/admin/admin_send_bonus_select.tpl index d3e4d28761..aa5b57d613 100644 --- a/templates/de/html/admin/admin_send_bonus_select.tpl +++ b/templates/de/html/admin/admin_send_bonus_select.tpl @@ -10,9 +10,9 @@ </tr> <tr> <td style="padding-left: 7px; padding-top: 5px; padding-bottom: 5px"> - <strong><big>·</big></strong> <a - href="{?URL?}/modules.php?module=admin&what=send_bonus&mode=html">{--ADMIN_SEND_BONUS_HTML--}</a><br /> - <br /> - <div class="admin_note">{--ADMIN_SEND_BONUS_HTML_NOTES--}</div></td> + <strong><big>·</big></strong> <a href="{?URL?}/modules.php?module=admin&what=send_bonus&mode=html">{--ADMIN_SEND_BONUS_HTML--}</a><br /> + <br /> + <div class="admin_note">{--ADMIN_SEND_BONUS_HTML_NOTES--}</div> + </td> </tr> </table> diff --git a/templates/de/html/admin/admin_send_reset_link.tpl b/templates/de/html/admin/admin_send_reset_link.tpl index 1399aa1481..c8075370d4 100644 --- a/templates/de/html/admin/admin_send_reset_link.tpl +++ b/templates/de/html/admin/admin_send_reset_link.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30" colspan="2"> diff --git a/templates/de/html/admin/admin_send_yoomedia.tpl b/templates/de/html/admin/admin_send_yoomedia.tpl index a4ce503631..0199765639 100644 --- a/templates/de/html/admin/admin_send_yoomedia.tpl +++ b/templates/de/html/admin/admin_send_yoomedia.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_yoomedia_tm" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed" align="center"> <tr> <td colspan="2" class="admin_title bottom2" height="30"> @@ -27,7 +27,7 @@ <tr> <td align="right" style="padding-right:5px">{--ENTER_POINTS--}:</td> <td> - <input type="text" name="points" class="admin_normal" size="4" maxlength="5" value="$content[reward]" /> {?POINTS?} + <input type="text" name="points" class="admin_normal" size="4" maxlength="5" value="$content[reward]" /> <span class="tiny">({?POINTS?})</span> </td> </tr> <tr><td colspan="2" class="seperator" height="5"> </td></tr> diff --git a/templates/de/html/admin/admin_sponsor_paytypes.tpl b/templates/de/html/admin/admin_sponsor_paytypes.tpl index 2c0e4f682c..35d15e4448 100644 --- a/templates/de/html/admin/admin_sponsor_paytypes.tpl +++ b/templates/de/html/admin/admin_sponsor_paytypes.tpl @@ -1,5 +1,5 @@ <div align="center"> - {!__LIST_CONTENT!}<br /> + $content[list_out]<br /> <br /> - {!__ADD_CONTENT!} + $content[add_out] </div> diff --git a/templates/de/html/admin/admin_sub_points.tpl b/templates/de/html/admin/admin_sub_points.tpl index 63119ea481..54c57da894 100644 --- a/templates/de/html/admin/admin_sub_points.tpl +++ b/templates/de/html/admin/admin_sub_points.tpl @@ -1,13 +1,13 @@ -<form action="{?URL?}/modules.php?module=admin&what=sub_points&uid={!__UID!}" method="post"> -<table border="0" cellspacing="0" cellpadding="0" width="500" - align="center" class="admin_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=sub_points&userid=$content[userid]" method="post"> +<table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> <td class="admin_title seperator" height="10" colspan="3"> </td> </tr> <tr> <td class="admin_title" colspan="3" align="center"> - {--ADMIN_SUB_POINTS_FROM_USER--}:<br /> - <strong>{!__USER_VALUE!}</strong></td> + {--ADMIN_SUB_POINTS_FROM_USER--}:<br /> + <strong>$content[user]</strong> + </td> </tr> <tr> <td class="admin_title seperator bottom2" height="10" colspan="3"> </td> @@ -18,8 +18,9 @@ <tr> <td align="right">{--ENTER_POINTS_SUB--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="points" size="6" maxlength="7" - class="admin_normal"></td> + <td> + <input type="text" class="admin_normal" name="points" size="6" maxlength="7" /> + </td> </tr> <tr> <td height="5" colspan="3" class="seperator"> </td> @@ -27,8 +28,9 @@ <tr> <td align="right">{--ENTER_SUB_REASON--}:</td> <td width="10" class="seperator"> </td> - <td><textarea name="reason" class="admin_normal" rows="5" - cols="20"></textarea></td> + <td> + <textarea name="reason" class="admin_normal" rows="5" cols="20"></textarea> + </td> </tr> <tr> <td height="3" colspan="3" class="seperator"> </td> @@ -37,10 +39,10 @@ <td height="5" colspan="3" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" align="center" class="admin_footer"><input type="reset" - class="admin_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" class="admin_submit" name="ok" - value="{--ADMIN_SUB_POINTS--}" /></td> + <td colspan="3" align="center" class="admin_footer"> + <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="admin_submit" name="ok" value="{--ADMIN_SUB_POINTS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/admin/admin_sub_points_all.tpl b/templates/de/html/admin/admin_sub_points_all.tpl index 98b871e7b2..f46390b372 100644 --- a/templates/de/html/admin/admin_sub_points_all.tpl +++ b/templates/de/html/admin/admin_sub_points_all.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=sub_points&uid=all" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=sub_points&userid=all" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="admin_table dashed"> <tr> diff --git a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl index b9e627cadb..903eba710b 100644 --- a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl +++ b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl @@ -1,5 +1,5 @@ <tr> <td align="center" class="switch_$content[sw] bottom2 right2">[<strong>$content[userid]</strong>]</td> <td align="center" class="switch_$content[sw] bottom2 right2">$content[total_visits]</td> - <td align="center" class="switch_$content[sw] bottom2">$content[last_online]</td> + <td align="center" class="switch_$content[sw] bottom2">$content[last_surfed]</td> </tr> diff --git a/templates/de/html/admin/admin_task_holiday.tpl b/templates/de/html/admin/admin_task_holiday.tpl index 3b694fe80a..1d1f0e4bb9 100644 --- a/templates/de/html/admin/admin_task_holiday.tpl +++ b/templates/de/html/admin/admin_task_holiday.tpl @@ -1 +1 @@ -<a href="{?URL?}/modules.php?module=admin&what=del_holiday&uid=$content">{--HOLIDAY_ADMIN_DEL_LINK--}</a> +<a href="{?URL?}/modules.php?module=admin&what=del_holiday&userid=$content">{--HOLIDAY_ADMIN_DEL_LINK--}</a> diff --git a/templates/de/html/admin/admin_theme_edit.tpl b/templates/de/html/admin/admin_theme_edit.tpl index 43cad96a0d..2a6306682a 100644 --- a/templates/de/html/admin/admin_theme_edit.tpl +++ b/templates/de/html/admin/admin_theme_edit.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=theme_edit" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=theme_edit" method="post"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td class="admin_title2 bottom2 right2" align="center">{--ID_SELECT--}</td> @@ -10,7 +10,7 @@ <td class="admin_title2 bottom2 right2" align="center">{--THEME_URL--}</td> <td class="admin_title2 bottom2" align="center">{--THEME_VERSION--}</td> </tr> - {!__THEME_LIST!} + $content <tr> <td colspan="7" class="admin_footer"><input type="reset" class="admin_reset" value="{--RESET_SELECT--}" /> diff --git a/templates/de/html/admin/admin_theme_import.tpl b/templates/de/html/admin/admin_theme_import.tpl index 84ce56ff8f..9e6693d5e2 100644 --- a/templates/de/html/admin/admin_theme_import.tpl +++ b/templates/de/html/admin/admin_theme_import.tpl @@ -9,7 +9,7 @@ <td class="admin_title2 bottom2 right2" align="center">{--THEME_VERSION--}</td> <td class="admin_title2 bottom2" align="center">{--THEME_INSTALL--}</td> </tr> - {!__THEME_LIST!} + $content <tr> <td colspan="6" class="admin_footer"> <div class="admin_note">{--ADMIN_THEME_LIST_NOTE--}</div> diff --git a/templates/de/html/admin/admin_theme_import_form.tpl b/templates/de/html/admin/admin_theme_import_form.tpl index 577438f5dd..58a6435170 100644 --- a/templates/de/html/admin/admin_theme_import_form.tpl +++ b/templates/de/html/admin/admin_theme_import_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=theme_import" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=theme_import" method="post"> <input type="hidden" name="theme" value="$content" /> <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_INSTALL_THEME--}" /> </form> diff --git a/templates/de/html/admin/admin_theme_list.tpl b/templates/de/html/admin/admin_theme_list.tpl index c1f3ee07d7..11f5d85d80 100644 --- a/templates/de/html/admin/admin_theme_list.tpl +++ b/templates/de/html/admin/admin_theme_list.tpl @@ -1,23 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center"> -<tr> - <td colspan="5" align="center" class="admin_title bottom2" height="30"> - <strong>{--ADMIN_THEME_NEW_FOUND_TITLE--}:</strong> - </td> -</tr> -<tr> - <td align="center" width="5%" class="admin_title bottom2 right2">{--ID_SELECT--}</td> - <td align="center" width="35%" class="admin_title bottom2 right2">{--ADMIN_EXT_DOWNLOAD_LINK--}</td> - <td align="center" width="30%" class="admin_title bottom2 right2">{--ADMIN_THEME_FILE_CTIME--}</td> - <td align="center" width="15%" class="admin_title bottom2 right2">{--ADMIN_EXT_FILE_SIZE--}</td> - <td align="center" width="15%" class="admin_title bottom2">{--THEME_VERSION--}</td> -</tr> -{!__THEMES_ROWS!} -<tr> - <td colspan="2" align="center" class="admin_title right2"> - {--ADMIN_THEME_TOTAL_FOUND--}: <strong>{!__TTHEME_VALUE!}</strong> - </td> - <td colspan="3" align="right" class="admin_title right2"> - {--ADMIN_EXT_TOTAL_FSIZE--}: <strong>{!__TKBYTES_VALUE!} {--KBYTES--}</strong> - </td> -</tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/admin/admin_undelete_surfbar_urls.tpl b/templates/de/html/admin/admin_undelete_surfbar_urls.tpl index 01fb5f1860..1b4b309768 100644 --- a/templates/de/html/admin/admin_undelete_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_undelete_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td align="center" colspan="4" class="admin_title" height="30"> diff --git a/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl b/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl index 8e10a5e78a..f322afdc07 100644 --- a/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> <input type="hidden" name="id[$content[id]]" value="1" /> - <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" /> + <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid]" /> $content[userid] </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> diff --git a/templates/de/html/admin/admin_unlock_emails.tpl b/templates/de/html/admin/admin_unlock_emails.tpl index 5bf7708e94..cdde833195 100644 --- a/templates/de/html/admin/admin_unlock_emails.tpl +++ b/templates/de/html/admin/admin_unlock_emails.tpl @@ -1,9 +1,8 @@ -<form actiom="{?URL?}/modules.php?module=admin&what=unlock_emails" method="post"> -<table border="0" cellspacing="0" cellpadding="0" - class="admin_table dashed" width="99%"> +<form accept-charset="utf-8" actiom="{?URL?}/modules.php?module=admin&what=unlock_emails" method="post"> +<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="99%"> <tr> - <td colspan="8" align="center" class="admin_header bottom2" - height="35"><div class="admin_misc">{--ADMIN_UNLOCK_EMAILS--}</div> + <td colspan="8" align="center" class="admin_header bottom2" height="35"> + <div class="admin_misc">{--ADMIN_UNLOCK_EMAILS--}</div> </td> </tr> <tr> @@ -16,19 +15,17 @@ <td class="admin_header right2" align="center"><strong>{--EMAIL_TIMESTAMP--}</strong></td> <td class="admin_header" style="white-space: nowrap" align="center"><strong>{--EMAIL_TSEND--}</strong></td> </tr> - {!__UNLOCK_ROWS!} + $content[rows] <tr> <td class="admin_footer top2" colspan="8" align="center" height="35"> - {--ADMIN_ENTER_REDIRECT_URL--}: <input type="text" name="redirect" - class="admin_normal" size="30" maxlength="255" - value="{!__REJECT_URL!}"></td> + {--ADMIN_ENTER_REDIRECT_URL--}: <input type="text" name="redirect" class="admin_normal" size="30" maxlength="255" value="{?reject_url?}" /> + </td> </tr> <tr> <td class="admin_footer top2" colspan="8" align="center" height="35"> - <input type="reset" class="admin_reset" value="{--RESET_SELECT--}" /> - <input type="submit" class="admin_submit" name="accept" - value="{--EMAIL_ACCEPT--}" /> <input type="submit" - class="admin_submit_reject" name="reject" value="{--EMAIL_REJECT--}" /> + <input type="reset" class="admin_reset" value="{--RESET_SELECT--}" /> + <input type="submit" class="admin_submit" name="accept" value="{--EMAIL_ACCEPT--}" /> + <input type="submit" class="admin_submit_reject" name="reject" value="{--EMAIL_REJECT--}" /> </td> </tr> </table> diff --git a/templates/de/html/admin/admin_unlock_emails_redir.tpl b/templates/de/html/admin/admin_unlock_emails_redir.tpl index 91f1fb991a..c1c204de22 100644 --- a/templates/de/html/admin/admin_unlock_emails_redir.tpl +++ b/templates/de/html/admin/admin_unlock_emails_redir.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&what=unlock_emails" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=unlock_emails" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> @@ -8,7 +8,7 @@ </td> <td class="admin_header bottom2" width="10"> </td> </tr> - {!__URL_ROWS!} + $content <tr> <td class="admin_header" width="10"> </td> <td class="admin_header" colspan="2" align="center" height="35"> diff --git a/templates/de/html/admin/admin_unlock_sponsor.tpl b/templates/de/html/admin/admin_unlock_sponsor.tpl index 1656d2e0b9..01e6427b67 100644 --- a/templates/de/html/admin/admin_unlock_sponsor.tpl +++ b/templates/de/html/admin/admin_unlock_sponsor.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=unlock_sponsor" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=unlock_sponsor" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td colspan="4" class="admin_title bottom2" height="30" align="center"> @@ -12,7 +12,7 @@ <td align="center" class="admin_title bottom2 right2"><strong>{--REMOTE_IP--}:</strong></td> <td align="center" class="admin_title bottom2"><strong>{--SPONSOR_CREATED--}:</strong></td> </tr> -{!__SPONSOR_ROWS!} +$content <tr> <td colspan="4" class="admin_footer" height="30" align="center"> <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" /> @@ -21,8 +21,6 @@ </tr> </table> </form> -</div> -<P align="center"> - <div class="admin_note">{--ADMIN_SPONSOR_UNLOCK_NOTES--}</strong> -</P> +<div class="admin_note">{--ADMIN_SPONSOR_UNLOCK_NOTES--}</div> +</div> diff --git a/templates/de/html/admin/admin_unlock_surfbar_urls.tpl b/templates/de/html/admin/admin_unlock_surfbar_urls.tpl index 9db6b6d9c8..efdfa90452 100644 --- a/templates/de/html/admin/admin_unlock_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_unlock_surfbar_urls.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=admin&what=unlock_surfbar_urls" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=unlock_surfbar_urls" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="600"> <tr> <td align="center" colspan="5" class="admin_title" height="30"> 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 4f865f7bc8..785c39a521 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 @@ <tr> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> - <input type="checkbox" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" class="admin_normal" /> + <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" /> </td> <td align="center" class="bottom2 right2 switch_sw$content[sw]"> $content[userid] diff --git a/templates/de/html/admin/admin_update_download.tpl b/templates/de/html/admin/admin_update_download.tpl index a9b544f11e..3937f792b3 100644 --- a/templates/de/html/admin/admin_update_download.tpl +++ b/templates/de/html/admin/admin_update_download.tpl @@ -12,12 +12,12 @@ <div style="clear:both"> <div style="float:left;padding:5px">{--ONLINE_VERSION_IS--}:</div> - <div style="float:right;padding:5px"><strong>v{!__ONLINE_VERSION!} {!__ONLINE_REVISION!}</strong></div> + <div style="float:right;padding:5px"><strong>v$content[version] $content[revision]</strong></div> </div> <div style="clear:both"> <div style="float:left;padding:5px">{--UPDATE_CREATE_TIME--}:</div> - <div style="float:right;padding:5px"><strong>{!__ONLINE_CHANGE!}</strong></div> + <div style="float:right;padding:5px"><strong>$content[changed]</strong></div> </div> <div style="clear:both;height:50px" class="top2"> diff --git a/templates/de/html/admin/admin_user_details.tpl b/templates/de/html/admin/admin_user_details.tpl index b24c9a0d1c..880461c981 100644 --- a/templates/de/html/admin/admin_user_details.tpl +++ b/templates/de/html/admin/admin_user_details.tpl @@ -1,109 +1,149 @@ <table border="0" cellspacing="0" cellpadding="0" width="99%" align="center" class="admin_table dashed"> <tr> - <td colspan="5" class="admin_title" align="center" - style="height: 30px"><strong class="admin_green big">{--_UID--} - $content</strong></td> + <td colspan="5" class="admin_title" align="center" style="height: 30px"> + <strong class="admin_green big">{--_UID--} $content[userid</strong> + </td> </tr> <tr> <td align="center" width="20%" class="top right">{--GENDER--}:<br /> - <strong>$DATA[gender]</strong></td> + <strong>$content[gender]</strong> + </td> <td align="center" width="20%" class="top right">{--SURNAME--}:<br /> - <strong>$DATA[surname]</strong></td> + <strong>$content[surname]</strong> + </td> <td align="center" width="20%" class="top right">{--FAMILY_NAME--}:<br /> - <strong>$DATA[family]</strong></td> + <strong>$content[family]</strong> + </td> <td align="center" width="20%" class="top right">{--STREET_NR--}:<br /> - <strong>$DATA[street_nr]</strong></td> + <strong>$content[street_nr]</strong> + </td> <td align="center" width="20%" class="top">{--BIRTHDAY2--}:<br /> - <strong>{!_BIRTHDAY!}</strong></td> + <strong>$content[birthday]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--COUNTRY--}:<br /> - <strong>$DATA[country]</strong></td> + <strong>$content[country]</strong> + </td> <td align="center" class="top right">{--ZIP--}:<br /> - <strong>$DATA[zip]</strong></td> + <strong>$content[zip]</strong> + </td> <td align="center" class="top right">{--CITY--}:<br /> - <strong>$DATA[city]</strong></td> - <td align="center" class="top right">{--ADDY--}:<br /> - <strong><a href="$DATA[email_link]">$DATA[email]</a></td> + <strong>$content[city]</strong> + </td> + <td align="center" class="top right">{--EMAIL_ADDRESS--}:<br /> + <strong><a href="$content[email_link]">$content[email]</a></strong> + </td> <td align="center" class="top">{--ACCOUNT_STATUS--}:<br /> - <strong>$DATA[status]</strong></td> + <strong>$content[status]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--RECEIVE_MAILS--}:<br /> - <strong>$DATA[receive_mails]</strong></td> + <strong>$content[receive_mails]</strong> + </td> <td align="center" class="top right">{--MAX_PER_DAY--}:<br /> - <strong>$DATA[max_mails]</td> + <strong>$content[max_mails]</strong> + </td> <td align="center" class="top right">{--REF_UID--}:<br /> - <strong>$DATA[refid]</strong></td> + <strong>$content[refid]</strong> + </td> <td align="center" class="top right">{--REF_CLICKS--}:<br /> - <strong>$DATA[ref_clicks]</strong></td> + <strong>$content[ref_clicks]</strong> + </td> <td align="center" class="top">{--TOTAL_LOGINS--}:<br /> - <strong>$DATA[total_logins]</strong></td> + <strong>$content[total_logins]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--REMOTE_IP--}:<br /> - <strong>$DATA[REMOTE_ADDR]</strong></td> + <strong>$content[REMOTE_ADDR]</strong> + </td> <td align="center" class="top right">{--ADMIN_LAST_ONLINE--}:<br /> - <strong>$DATA[last_online]</strong></td> + <strong>$content[last_online]</strong> + </td> <td align="center" class="top right">{--ADMIN_LAST_MODULE--}:<br /> - <strong>$DATA[last_module]</strong></td> + <strong>$content[last_module]</strong> + </td> <td align="center" class="top right">{--HAS_JOINED--}:<br /> - <strong>$DATA[joined]</strong></td> + <strong>$content[joined]</strong> + </td> <td align="center" class="top">{--MAILS_SENT--}:<br /> - <strong>$DATA[emails_sent]</strong></td> + <strong>$content[emails_sent]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--USED_POINTS--}:<br /> - <strong>$DATA[used_points]</strong></td> + <strong>$content[used_points]</strong> + </td> <td align="center" class="top right">{--TOTAL_POINTS--}:<br /> - <strong>$DATA[total]</strong></td> + <strong>$content[total]</strong> + </td> <td align="center" class="top right">{--TOTAL_REFERRALS--}:<br /> - <strong>{!_REFS!}</strong></td> + <strong>$content[refs]</strong> + </td> <td align="center" class="top right">{--TOTAL_CATS--}:<br /> - <strong>{!_CATS!}</strong></td> + <strong>$content[cats]</strong> + </td> <td align="center" class="top">{--UNCONFIRMED_LINKS--}:<br /> - <strong>{!_LINKS!}</strong></td> + <strong>$content[links]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--LOCKED_POINTS--}:<br /> - <strong>$DATA[locked]</strong></td> + <strong>$content[locked]</strong> + </td> <td align="center" class="top right">{--LAST_UPDATE--}:<br /> - <strong>$DATA[last_update]</strong></td> + <strong>$content[last_update]</strong> + </td> <td align="center" class="top right">{--LAST_PROFILE_SENT--}:<br /> - <strong>$DATA[last_profile_sent]</strong></td> + <strong>$content[last_profile_sent]</strong> + </td> <td align="center" class="top right">{--USER_REF_PAYOUT--}:<br /> - <strong>$DATA[ref_payout]</strong></td> + <strong>$content[ref_payout]</strong> + </td> <td align="center" class="top">{--USER_NICKNAME--}:<br /> - <strong>$DATA[nickname]</strong></td> + <strong>$content[nickname]</strong> + </td> </tr> <tr> <td align="center" class="top right">{--CLICK_RATE--}:<br /> - <strong>$DATA[click_rate]%</strong></td> + <strong>$content[click_rate]%</strong> + </td> <td align="center" class="top right">{--EMAILS_RECEIVED--}:<br /> - <strong>$DATA[emails_received]</strong></td> + <strong>$content[emails_received]</strong> + </td> <td align="center" class="top right">{--MAILS_CONFIRMED--}:<br /> - <strong>$DATA[mails_confirmed]</strong></td> + <strong>$content[mails_confirmed]</strong> + </td> <td align="center" class="top right">{--RAND_CONFIRMED--}:<br /> - <strong>$DATA[rand_confirmed]</strong></td> - <td align="center" class="top">{--__UNUSED--}:<br /> - <strong>---</strong></td> + <strong>$content[rand_confirmed]</strong> + </td> + <td align="center" class="top">{--_UNUSED--}:<br /> + <strong>---</strong> + </td> </tr> <tr> <td align="center" class="top right">{--LOCK_REASON--}:<br /> - <strong>$DATA[lock_reason]</strong></td> + <strong>$content[lock_reason]</strong> + </td> <td align="center" class="top right">{--LOCK_TIMESTAMP--}:<br /> - <strong>$DATA[lock_timestamp]</strong></td> - <td align="center" class="top right">{--__UNUSED--}:<br /> - <strong>---</strong></td> - <td align="center" class="top right">{--__UNUSED--}:<br /> - <strong>---</strong></td> - <td align="center" class="top">{--__UNUSED--}:<br /> - <strong>---</strong></td> + <strong>$content[lock_timestamp]</strong> + </td> + <td align="center" class="top right">{--_UNUSED--}:<br /> + <strong>---</strong> + </td> + <td align="center" class="top right">{--_UNUSED--}:<br /> + <strong>---</strong> + </td> + <td align="center" class="top">{--_UNUSED--}:<br /> + <strong>---</strong> + </td> </tr> <tr> <td align="center" class="admin_footer top" colspan="5"> <strong>{--ADMIN_MEMBER_FUNCTIONS--}:</strong><br /> - {!_ADMIN_LINKS!} + $content[admin_links] </td> </tr> </table> 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 08fe1bbb41..c468aaac72 100644 --- a/templates/de/html/admin/admin_validate_reset_hash_form.tpl +++ b/templates/de/html/admin/admin_validate_reset_hash_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&reset_pass=1" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed"> <tr> <td class="admin_title bottom2" height="30" colspan="2"> diff --git a/templates/de/html/agb.tpl b/templates/de/html/agb.tpl index 3d8f0fe7e4..1da604a7ce 100644 --- a/templates/de/html/agb.tpl +++ b/templates/de/html/agb.tpl @@ -3,7 +3,7 @@ {?MAIN_TITLE?}</div> <div class="agb_para">§1 {?MAIN_TITLE?} betreibt einen -{?MT_WORD?} und bietet Ihnen damit die Möglichkeit, durch das Lesen +{?mt_word?} und bietet Ihnen damit die Möglichkeit, durch das Lesen und Bestätigen (Besuch der beworbenen Webseiten) von Werbemails {?POINTS?} zu sammeln. Die auf diese Weise gesammelten {?POINTS?} können benutzt werden, um Werbung in E-Mails an andere Mitglieder @@ -11,7 +11,7 @@ durch {?MAIN_TITLE?} versenden zu lassen. Auf diese Weise können Sie legal Ihre Webseiten, Projekte, Produkte usw. bewerben.</div> <div class="agb_para">§2 Für die Teilnahme am -{?MT_WORD?} ist die Anmeldung bei {?MAIN_TITLE?} erforderlich. +{?mt_word?} ist die Anmeldung bei {?MAIN_TITLE?} erforderlich. Anmeldung, Mitgliedschaft und Kündigung sind kostenlos. Teilnahmeberechtigt ist jede Person die das 18. Lebensjahr vollendet hat. Bei der Anmeldung sind alle Felder des Anmeldeformulars korrekt @@ -174,7 +174,7 @@ Verdienstausfall vor.</div> <div class="agb_para">§16 Das Mitglied erklärt sich mit der Speicherung seiner personenbezogenen Daten durch {?MAIN_TITLE?} einverstanden. Die Nutzung der Daten dient ausschließlich der -Betreuung und Durchführung des {?MT_WORD2?} von {?MAIN_TITLE?}. +Betreuung und Durchführung des {?mt_word2?} von {?MAIN_TITLE?}. Eine Weitergabe der Daten an Dritte findet nicht statt.</div> <div class="agb_para">§16.a {?MAIN_TITLE?} verpflichtet sich, diff --git a/templates/de/html/beg/.htaccess b/templates/de/html/beg/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/beg/.htaccess +++ b/templates/de/html/beg/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/beg/beg_done.tpl b/templates/de/html/beg/beg_done.tpl index a1e443dfb1..8443dea174 100644 --- a/templates/de/html/beg/beg_done.tpl +++ b/templates/de/html/beg/beg_done.tpl @@ -1,8 +1,8 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"> - <P>{--BEG_UID_STEAL_1--}<strong>{!__BEG_UID!}</strong>{--BEG_UID_STEAL_2--}<strong>{!__BEG_POINTS!}</strong>{--BEG_UID_STEAL_3--}</P> - <P>{--BEG_CLICKS_1--}<strong>{!__BEG_CLICKS!}</strong>{--BEG_CLICKS_2--}</P> + <P>{--BEG_UID_STEAL_1--}<strong>$content[userid]</strong>{--BEG_UID_STEAL_2--}<strong>$content[points]</strong>{--BEG_UID_STEAL_3--}</P> + <P>{--BEG_CLICKS_1--}<strong>$content[clicks]</strong>{--BEG_CLICKS_2--}</P> <P align="right">{--BEG_THANKS_FOR_CLICK--}</P> </td> </tr> diff --git a/templates/de/html/beg/beg_failed.tpl b/templates/de/html/beg/beg_failed.tpl index 72a93a091b..4087772a02 100644 --- a/templates/de/html/beg/beg_failed.tpl +++ b/templates/de/html/beg/beg_failed.tpl @@ -1,8 +1,8 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"> - <P>{--BEG_SORRY_ANOTHER_WAS_HERE_1--}<strong>{!__BEG_UID!}</strong>{--BEG_SORRY_ANOTHER_WAS_HERE_2--}<strong>{!__BEG_POINTS!}</strong>{--BEG_SORRY_ANOTHER_WAS_HERE_3--}</P> - <P>{--BEG_CLICKS_1--}<strong>{!__BEG_CLICKS!}</strong>{--BEG_CLICKS_2--}</P> + <P>{--BEG_SORRY_ANOTHER_WAS_HERE_1--}<strong>$content[userid]</strong>{--BEG_SORRY_ANOTHER_WAS_HERE_2--}<strong>$content[points]</strong>{--BEG_SORRY_ANOTHER_WAS_HERE_3--}</P> + <P>{--BEG_CLICKS_1--}<strong>$content[clicks]</strong>{--BEG_CLICKS_2--}</P> <P align="right">{--BEG_THANKS_FOR_CLICK_AGAIN--}</P> </td> </tr> diff --git a/templates/de/html/beg/beg_link.tpl b/templates/de/html/beg/beg_link.tpl index f64e410627..6a7634ffeb 100644 --- a/templates/de/html/beg/beg_link.tpl +++ b/templates/de/html/beg/beg_link.tpl @@ -1,24 +1,27 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 100%"> <tr> <td height="10%" align="center"> - <div align="center">{!__BEG_BANNER!}</div> + <div align="center">$content[banner]</div> </td> </tr> <tr> <td height="80%" align="center"> <table border="0" cellspacing="0" cellpadding="0" class="beg_table dashed"> <tr> - <td align="center" height="50" class="bottom2"><div class="big">{--BEG_LINK_BY_1--}<strong>{?MAIN_TITLE?}</strong>{--BEG_LINK_BY_2--}</div><br /> - {--BEG_LINK_USERID_1--}<u>{!__BEG_UID!}</u>{--BEG_LINK_USERID_2--}</td> + <td align="center" height="50" class="bottom2"> + <div class="big">{--BEG_LINK_BY_1--}<strong>{?MAIN_TITLE?}</strong>{--BEG_LINK_BY_2--}</div> + <br /> + {--BEG_LINK_USERID_1--}<u>$content[userid]</u>{--BEG_LINK_USERID_2--} + </td> </tr> <tr> <td align="center" height="120" class="beg_msg bottom2"> - $content[msg] + $content[message] </td> </tr> <tr> - <td align="center" height="30"><a - href="{?URL?}/ref.php?ref={!__BEG_UID!}">{--BEG_CONTINUE_REGISTER--}</a> + <td align="center" height="30"> + <a href="{?URL?}/ref.php?ref=$content[userid]">{--BEG_CONTINUE_REGISTER--}</a> </td> </tr> </table> @@ -26,7 +29,7 @@ </tr> <tr> <td height="10%" align="center"> - <div align="center">{!__BEG_BANNER!}</div> + <div align="center">$content[banner]</div> </td> </tr> </table> diff --git a/templates/de/html/beg/beg_login.tpl b/templates/de/html/beg/beg_login.tpl index fc9405d8cf..5df7a1c1c3 100644 --- a/templates/de/html/beg/beg_login.tpl +++ b/templates/de/html/beg/beg_login.tpl @@ -1,8 +1,8 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"> - <P>{--BEG_SORRY_YOURE_LOGGED_IN_1--}<strong>{!__BEG_UID!}</strong>{--BEG_SORRY_YOURE_LOGGED_IN_2--}<strong>{!__BEG_POINTS!}</strong>{--BEG_SORRY_YOURE_LOGGED_IN_3--}</P> - <P>{--BEG_CLICKS_1--}<strong>{!__BEG_CLICKS!}</strong>{--BEG_CLICKS_2--}</P> + <P>{--BEG_SORRY_YOURE_LOGGED_IN_1--}<strong>$content[userid]</strong>{--BEG_SORRY_YOURE_LOGGED_IN_2--}<strong>$content[points]</strong>{--BEG_SORRY_YOURE_LOGGED_IN_3--}</P> + <P>{--BEG_CLICKS_1--}<strong>$content[clicks]</strong>{--BEG_CLICKS_2--}</P> <P align="right">{--BEG_THANKS_FOR_CLICK_AGAIN--}</P> </td> </tr> diff --git a/templates/de/html/beg/beg_pay_mode_both.tpl b/templates/de/html/beg/beg_pay_mode_both.tpl index f03ee93c2c..435200d58d 100644 --- a/templates/de/html/beg/beg_pay_mode_both.tpl +++ b/templates/de/html/beg/beg_pay_mode_both.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"> - {--BEG_LINK_PAY_BOTH_1--}$content[uid] + {--BEG_LINK_PAY_BOTH_1--}$content[userid] {--BEG_LINK_PAY_BOTH_2--}$content[points] {--BEG_LINK_PAY_BOTH_3--}$content[clicks] {--BEG_LINK_PAY_BOTH_4--} diff --git a/templates/de/html/birthday/.htaccess b/templates/de/html/birthday/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/birthday/.htaccess +++ b/templates/de/html/birthday/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/birthday/birthday_confirm.tpl b/templates/de/html/birthday/birthday_confirm.tpl index 5cc32235d5..eba8d27d63 100644 --- a/templates/de/html/birthday/birthday_confirm.tpl +++ b/templates/de/html/birthday/birthday_confirm.tpl @@ -6,7 +6,7 @@ </tr> <tr> <td height="80%" align="center"> - $content[msg] + $content[message] </td> </tr> <tr> diff --git a/templates/de/html/css_inline.tpl b/templates/de/html/css_inline.tpl new file mode 100644 index 0000000000..0841fd704f --- /dev/null +++ b/templates/de/html/css_inline.tpl @@ -0,0 +1,5 @@ +<style type="text/css"> +<!-- +$content +//--> +</style> diff --git a/templates/de/html/doubler/.htaccess b/templates/de/html/doubler/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/doubler/.htaccess +++ b/templates/de/html/doubler/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/doubler/doubler_index.tpl b/templates/de/html/doubler/doubler_index.tpl index 50fc458557..b7c793b877 100644 --- a/templates/de/html/doubler/doubler_index.tpl +++ b/templates/de/html/doubler/doubler_index.tpl @@ -1,22 +1,22 @@ <table border="0" cellspacing="0" cellpadding="0" class="doubler_table" width="100%"> <tr> - <td height="80" align="center">{!__DOUBLER_HEADER!}</td> + <td height="80" align="center">$content[header]</td> </tr> <tr> <td align="center" class="doubler_main"> <h3 class="huge">{?POINTS?}-{--DOUBLER_TITLE--} - {?MAIN_TITLE?}</h3> <br /> - {--DOUBLER_ENTER_LOGIN_DATA--}<br /> + $content[enter_login]<br /> {--DOUBLER_NOTE_FOR_PASSWORD--}<br /> <br /> - <form action="{?URL?}/doubler.php?refid={!__REFID!}" method="post" + <form accept-charset="utf-8" action="{?URL?}/doubler.php?refid=$content[refid]" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed"> <tr> <td colspan="2" class="guest_title2 bottom2" height="30"> <strong>{?POINTS?}-{--DOUBLER_TITLE--}</strong><br /> - <div class="doubler_error">{!__ERROR_MSG!}</div> + <div class="doubler_error">$content[message]</div> </td> </tr> <tr> @@ -52,45 +52,45 @@ </table> </form> <br /> - {--DOUBLER_ALREADY_PAYED_1--} <strong>{!__TOTAL_VALUE!} + {--DOUBLER_ALREADY_PAYED_1--} <strong>$content[total] {?POINTS?}</strong> {--DOUBLER_ALREADY_PAYED_2--}<br /> - {--DOUBLER_POINTS_LEFT_1--} <strong>{!__LEFT_VALUE!} + {--DOUBLER_POINTS_LEFT_1--} <strong>$content[left] {?POINTS?}</strong> {--DOUBLER_POINTS_LEFT_2--}<br /> - {--DOUBLER_USAGE_COUNTER_1--} <strong>{!__DOUBLER_COUNTER!}</strong> + {--DOUBLER_USAGE_COUNTER_1--} <strong>{?doubler_counter?}</strong> {--DOUBLER_USAGE_COUNTER_2--}<br /> <br /> - {--DOUBLER_MINIMUM_IS--} <strong>{!__MIN_VALUE!} {?POINTS?}</strong> - {--DOUBLER_MAXIMUM_IS--} <strong>{!__MAX_VALUE!} {?POINTS?}</strong><br /> + {--DOUBLER_MINIMUM_IS--} <strong>$content[min] {?POINTS?}</strong> + {--DOUBLER_MAXIMUM_IS--} <strong>$content[max] {?POINTS?}</strong><br /> {--DOUBLER_HAVE_FUN--}<br /> <br /> - {!DOUBLER_PAYOUT_TIME!}<br /> + $content[payout_time]<br /> <br /> - {--DOUBLER_POINTS_1--} <strong>{!__CHARGE_VALUE!}%</strong> + {--DOUBLER_POINTS_1--} <strong>$content[charge]%</strong> {--DOUBLER_POINTS_2--}<br /> <br /> {--DOUBLER_EXAMPLE_1--} <strong>500 {?POINTS?}</strong> »» {--DOUBLER_EXAMPLE_2--} <strong>1000 {?POINTS?}</strong>{--DOUBLER_EXAMPLE_3--}<br /> <br /> - <div class="big">{--DOUBLER_FULL_PAYOUT--}</strong><br /> + <div class="big">{--DOUBLER_FULL_PAYOUT--}</div><br /> <br /> - {--DOUBLER_REFERRAL_1--} <strong>{!__REF_VALUE!}%</strong> + {--DOUBLER_REFERRAL_1--} <strong>$content[ref]%</strong> {--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--} {--DOUBLER_REFERRAL_4--} {--DOUBLER_REFERRAL_5--} <strong>100 {?POINTS?}</strong> {--DOUBLER_REFERRAL_6--} <strong>100 {?POINTS?}</strong> {--DOUBLER_REFERRAL_8--} <strong>300 {?POINTS?}</strong> {--DOUBLER_REFERRAL_8--} {--DOUBLER_REFERRAL_LINK--}<br /> - {!__DOUBLER_MSG!}<br /> + $content[message]<br /> {--DOUBLER_NOT_YET_REGISTERED--} <a - href="{?URL?}/ref.php?refid={!__REFID!}">{--DOUBLER_REGISTER_NOW--}</a><br /> + href="{?URL?}/ref.php?refid=$content[refid]">{--DOUBLER_REGISTER_NOW--}</a><br /> <br /> {--DOUBLER_YOUR_ADVERTISING_HERE--} <a - href="{?URL?}/modules.php?module=index&what=impressum&refid={!__REFID!}">{--DOUBLER_CONTACT_US--}</a><br /> + href="{?URL?}/modules.php?module=index&what=impressum&refid=$content[refid]">{--DOUBLER_CONTACT_US--}</a><br /> <br /> - {!__DOUBLER_BANNER!}<br /> + $content[banner]<br /> <br /> - {!__DOUBLER_PAYOUT_HISTORY!}</td> + $content[payout_history]</td> </tr> <tr> - <td height="80" align="center">{!__DOUBLER_FOOTER!}</td> + <td height="80" align="center">$content[footer]</td> </tr> </table> diff --git a/templates/de/html/ext/.htaccess b/templates/de/html/ext/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/ext/.htaccess +++ b/templates/de/html/ext/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/ext/ext_autoreg.tpl b/templates/de/html/ext/ext_autoreg.tpl new file mode 100644 index 0000000000..1f969d6009 --- /dev/null +++ b/templates/de/html/ext/ext_autoreg.tpl @@ -0,0 +1,28 @@ +Mit dieser Erweiterung können Sie mit Ihrem {?mt_word?} an so genannten +Auto-Reggern teilnehmen lassen und Ihr Anmeldeformular vor unauthorisierte +Anmeldungen durch nicht eingetragene Auto-Regger schützen. Zudem +können Sie selbst einen Auto-Regger-Service hiermit anbieten.<br /> +<br /> +Zur Teilnahme an einem Auto-Regger-Service können Sie zur Erhöhung der +Sicherheit einen Autorisierungsschlüssel vergeben, der dem jeweiligen Auto- +Regger es gestatttet, Ihren {?mt_word?} Anmeldungen zuzuschicken. Ihr +Anmeldeformular wird dazu nicht benötigt, da ein seperates Script dies +erledigt.<br /> +<br /> +Ihr Anmeldescript wird bei Installierung dieser Erweiterung automatisch um ein +"durchsichtiges CAPTCHA" erweitert, was der Auto-Regger nicht +ausfüllen kann, da er den Wert im verdecken Feld nicht erraten kann.<br /> +<br /> +Anbieter von Auto-Reggern, die keinen Schlüssel (z.B. als Zusatzfeld) +unterstützen, werden auch unterstützt, da die IP-Adresse vom +anfragenden Server überprüft wird.<br /> +<br /> +Generell beschrieben ist ein Auto-Regger ein automatischer Anmeldeservice, der +die User mit nur einer Anmeldung bei vielen anderen {?mt_word?}-Anbietern +anmeldet. Dies kann mal nicht gewollt sein, da dies viele +"Anmeldeleichen" - also User, die sich anmelden, einmal aktiv werden +und dann inaktiv bleiben - produzieren kann. Sie sollten daher es nicht jedem +Anbieter gestatten und nur seriösen Anbietern Schlüssel vergeben.<br /> +<br /> +Beide möglichen Dienste, bei Auto-Reggern teilnehmen bzw. selber solch +einen Dienst anbieten, sind getrennt voneinander ein- und ausschaltbar. diff --git a/templates/de/html/ext/ext_bonus.tpl b/templates/de/html/ext/ext_bonus.tpl index b877d471a1..55218a0d30 100644 --- a/templates/de/html/ext/ext_bonus.tpl +++ b/templates/de/html/ext/ext_bonus.tpl @@ -1,7 +1,7 @@ Diese Erweiterung bietet Ihnen derzeit die Möglichkeit an, Bonus-Mails an Ihre Mitglieder zu senden und eine sehr detailiert einstellbare Aktiv-Rallye zu starten. Wenn Sie dereits -Bonus-Menüpunkte in Ihrem {?MT_WORD?} haben, löschen Sie diese +Bonus-Menüpunkte in Ihrem {?mt_word?} haben, löschen Sie diese bitte, da sie sonst doppelt vorhanden sind. Sie können nun auch HTML-Mails versenden! Laden Sie sich dazu unsere html_mail-Erweiterung neuster Version herunter. diff --git a/templates/de/html/ext/ext_cache.tpl b/templates/de/html/ext/ext_cache.tpl index affb0bb66a..32d7874f79 100644 --- a/templates/de/html/ext/ext_cache.tpl +++ b/templates/de/html/ext/ext_cache.tpl @@ -7,7 +7,7 @@ wird. <br /> <br /> <strong>Bitte löschen Sie immer die Cache-Dateien aus dem -Verzeichnis <u>/inc/cache/</u> vor Update/Neuinstallation der +Verzeichnis <u>/{?CACHE_PATH?}/</u> vor Update/Neuinstallation der Erweiterung----!</strong> <br /> <br /> diff --git a/templates/de/html/ext/ext_country.tpl b/templates/de/html/ext/ext_country.tpl index 96333c1ab5..fa24457126 100644 --- a/templates/de/html/ext/ext_country.tpl +++ b/templates/de/html/ext/ext_country.tpl @@ -1,5 +1,5 @@ Fügen Sie weitere Ländercodes hinzu, um auch internationale -Mitglieder in Ihren {?MT_WORD?} aufnehmen zu können. Das Eingeben +Mitglieder in Ihren {?mt_word?} aufnehmen zu können. Das Eingeben des zweistelligen Ländercodes durch Ihre Mitglieder ist dann nicht mehr nötig. Und generieren Sie mit dieser Erweiterung eine übersichtliche Länderstatistik (Aufteilung Ihrer Mitglieder diff --git a/templates/de/html/ext/ext_debug.tpl b/templates/de/html/ext/ext_debug.tpl index dc88c7bf8a..a8f13264ac 100644 --- a/templates/de/html/ext/ext_debug.tpl +++ b/templates/de/html/ext/ext_debug.tpl @@ -1,20 +1,20 @@ -Diese Erweiterung soll die Datei <strong>inc/cache/debug.log</strong> an den +Diese Erweiterung soll die Datei <strong>{?CACHE_PATH?}debug.log</strong> an den [<a href="{?SERVER_URL?}" rel="external" target="_blank">MXChange-Server</a>] übertragen bzw. dort empfangen. Sie können also auch selber <strong>debug.log</strong> Dateien empfangen und diese gebündelt an den [<a href="{?SERVER_URL?}" rel="external" target="_blank">MXChange-Server</a>] -weitersenden. Dazu müssen Sie Ihren {?MT_WORD?} am [<a +weitersenden. Dazu müssen Sie Ihren {?mt_word?} am [<a href="{?SERVER_URL?}" rel="external" target="_blank">MXChange-Server</a>] einfach nur über Ihren Administrationsbereich anmelden. Dabei wird Ihrem -{?MT_WORD?} ein Key zugewiesen, der Sie immer wieder eindeutig erkennbar +{?mt_word?} ein Key zugewiesen, der Sie immer wieder eindeutig erkennbar macht.<br /> <br /> <strong>Geben Sie den Key unter <u>keinen</u> Umständen an Fremde weiter! Auch MXChange.org wird Sie nicht nach diesen fragen!</strong><br /> <br /> -Wenn ein {?MT_WORD2?} die <strong>debug.log</strong> aussenden möchte, so -wird eine Liste an "Relays" - Ihr {?MT_WORD?}-Server kann als Relay -fungieren - an den anderen {?MT_WORD?} gesendet. Der andere {?MT_WORD?}-Admin +Wenn ein {?mt_word?} die <strong>debug.log</strong> aussenden möchte, so +wird eine Liste an "Relays" - Ihr {?mt_word?}-Server kann als Relay +fungieren - an den anderen {?mt_word?} gesendet. Der andere {?mt_word?}-Admin entscheidet dann, an welchen Server er das Logbuch aussenden will.<br /> <br /> Relays und auch der [<a href="{?SERVER_URL?}" rel="external" @@ -25,12 +25,12 @@ missbraucht werden sollte (z.B. zu Spamming-Attacken).<br /> Zudem kann das Empfangsscript so eingestellt werden, dass erstmal ein Eintrag freigegeben werden muss, bevor weitere gesendet werden können.<br /> <br /> -Es geht auch Vollmoderation. Dabei muss der {?MT_WORD?}-Admin (also z.B. Sie) +Es geht auch Vollmoderation. Dabei muss der {?mt_word?}-Admin (also z.B. Sie) sich am [<a href="{?SERVER_URL?}" rel="external" target="_blank">MXChange-Server</a>] anmelden. Dieser verteilt dann automatisch den Key an die Relays.<br /> <br /> Manipulationsversuche oder einfache Fehlversuche werden in einem Abuse-Log -geschrieben, damit diese nachvollziehbar sind und der vermeindliche {?MT_WORD?} +geschrieben, damit diese nachvollziehbar sind und der vermeindliche {?mt_word?} dann auf dem Relay und/oder [<a href="{?SERVER_URL?}" rel="external" target="_blank">MXChange-Server</a>] gesperrt werden kann. diff --git a/templates/de/html/ext/ext_demo.tpl b/templates/de/html/ext/ext_demo.tpl index a86c82ecb2..74f66678d5 100644 --- a/templates/de/html/ext/ext_demo.tpl +++ b/templates/de/html/ext/ext_demo.tpl @@ -4,7 +4,7 @@ Admin-Account (dieses muss heissen und sollte vorher angelegt sein!) die Möglichkeit an, dass Ihre Gäste sich Ihren Admin-Bereich ansehen können. Geben Sie Vollzugriff und sperren Sie dann wichtige Menüpunkte, oder jeder -kann Ihren {?MT_WORD?} (fast) komplett bedienen! +kann Ihren {?mt_word?} (fast) komplett bedienen! <br /> <br /> <strong>SIE HANDELN DABEI AUF EIGENE GEFAHR HIN! VORSICHT diff --git a/templates/de/html/ext/ext_imprint.tpl b/templates/de/html/ext/ext_imprint.tpl index 1d608cf600..1f650b58cb 100644 --- a/templates/de/html/ext/ext_imprint.tpl +++ b/templates/de/html/ext/ext_imprint.tpl @@ -1,2 +1,2 @@ Richten Sie mit dieser Erweiterung das Impressum komfortabel ein. Das Editieren -von Templates und lästiges Hochladen entfällt komplett. +von Templates und lästiges Hochladen entfällt somit komplett. diff --git a/templates/de/html/ext/ext_iso3166.tpl b/templates/de/html/ext/ext_iso3166.tpl new file mode 100644 index 0000000000..1809955751 --- /dev/null +++ b/templates/de/html/ext/ext_iso3166.tpl @@ -0,0 +1,2 @@ +Fügt nach ISO-3166 gültige Landeskürzel dem {?mt_word?}-Script +bei. diff --git a/templates/de/html/ext/ext_jackpot.tpl b/templates/de/html/ext/ext_jackpot.tpl new file mode 100644 index 0000000000..33ad2381b9 --- /dev/null +++ b/templates/de/html/ext/ext_jackpot.tpl @@ -0,0 +1,3 @@ +Verwalten Sie mit dieser Erweiterungen viele, verschiedene Jackpots in Ihrem +{?mt_word?}-System. Starten Sie Knack-Rallyes für z.B. eine Woche und +prämieren Sie die häfigsten Jackpot-Knacker! diff --git a/templates/de/html/ext/ext_lead.tpl b/templates/de/html/ext/ext_lead.tpl index efcd4913dc..b2e139adcd 100644 --- a/templates/de/html/ext/ext_lead.tpl +++ b/templates/de/html/ext/ext_lead.tpl @@ -8,12 +8,12 @@ Meistens müssen Sie irgentwelche eindeutigen Daten an den Lead-Code sein. Beides wird von diesem Script derzeit auch unterstützt.<br /> <br /> Wenn Sie die User-Id übertragen möchten, so verwenden Sie die -Template-Variable <u>lead_uid</u>, möchten Sie die Email-Adresse von der +Template-Variable <u>lead_userid</u>, möchten Sie die Email-Adresse von der Anmeldung übertragen, verwenden Sie <u>lead_email</u>. Dazu ein Beispielcode:<br /> <br /> <img border="0" alt="Lead" width="1" height="1" - src="http://some-sponsor-network/lead-image.php?campaign=xxx&user_data=$content[lead_uid]_$content[lead_email]" /> + src="http://some-sponsor-network/lead-image.php?campaign=xxx&user_data=$content[lead_userid]_$content[lead_email]" /> <br /> Sollten Sie dazu noch Fragen haben, so kommen Sie doch einfach <a target="_blank" href="http://forum.mxchange.org" title="Direkt-Link zum Support-Forum">in das diff --git a/templates/de/html/ext/ext_maintenance.tpl b/templates/de/html/ext/ext_maintenance.tpl index 4e3ac2ac5c..bd84396d6e 100644 --- a/templates/de/html/ext/ext_maintenance.tpl +++ b/templates/de/html/ext/ext_maintenance.tpl @@ -1,4 +1,4 @@ -Schalten Sie Ihren {?MT_WORD?} in den Wartungsmodus, wenn dieser mal nicht +Schalten Sie Ihren {?mt_word?} in den Wartungsmodus, wenn dieser mal nicht funktionieren sollte und Sie in Ruhe dran debuggen müssen. Bitte aktualisieren dann zuerst Ihre SVN-Version (SVN-Update) und falls Sie den Fehler nicht selber finden können, melden Sie sich bitte im diff --git a/templates/de/html/ext/ext_menu.tpl b/templates/de/html/ext/ext_menu.tpl index dfa5fda02a..a92bb2d0e0 100644 --- a/templates/de/html/ext/ext_menu.tpl +++ b/templates/de/html/ext/ext_menu.tpl @@ -1,5 +1,5 @@ <div style="padding-bottom:5px"> - Diese Erweiterung erlaubt es Ihnen, alle Menüsystem Ihres {?MT_WORD2?} + Diese Erweiterung erlaubt es Ihnen, alle Menüsysteme Ihres {?mt_word2?} zu ändern, in Gast- und Mitgliedsbereich Menüpunkte zu verdecken oder zu sperren und auch neue hinzuzufügen. Möchten Sie neue Menüpunkte zum Beispiel in's Gastmenü hinzufügen, so diff --git a/templates/de/html/ext/ext_mydata.tpl b/templates/de/html/ext/ext_mydata.tpl index 7b497ee5b0..03d2d6d833 100644 --- a/templates/de/html/ext/ext_mydata.tpl +++ b/templates/de/html/ext/ext_mydata.tpl @@ -1,3 +1,3 @@ Diese Erweiterung erlaubt es Ihren Mitgliedern, Ihre Profildaten zu -ändern. Sie sollte daher in keinem {?MT_WORD?} fehlen und immer +ändern. Sie sollte daher in keinem {?mt_word?} fehlen und immer aktiviert sein. diff --git a/templates/de/html/ext/ext_newsletter.tpl b/templates/de/html/ext/ext_newsletter.tpl index 91af0479cd..05572361a3 100644 --- a/templates/de/html/ext/ext_newsletter.tpl +++ b/templates/de/html/ext/ext_newsletter.tpl @@ -1,4 +1,36 @@ -Diese Erweiterung ist fester Bestandteil des Grundscriptes und bietet Ihnen die -Möglicheit, einen Newsletter an alle Ihre Mitglieder im {?MT_WORD?} zu -versenden. Ihre Mitglieder können - gegen eine von Ihnen einstellbare -Gebühr - auch den Newsletter-Empfang abschalten. +Diese Erweiterung ist fester Bestandteil des Grundscriptes und bietet Ihnen eine +professionelle Möglicheit, einen Newsletter zu erstellen - mehr dazu am +Ende dieser Beschreibung - und diesen an alle Ihre Mitglieder im {?mt_word?} zu +versenden. Zudem bietet diese Erweiterung eine Archivierungsmöglichkeit +mit Verfallsdatum der archivierten Newsletter, sowie Klick-Tracking auf die +vom Sponsor gebuchte Newsletterwerbung an.<br /> +<br /> +Ihre Mitglieder können den Newsletter jederzeit abbestellen und auch wieder +empfangen. Ihre Mitglieder erhalten dann jedes Mal eine Benachrichtigung +über den Ausgang des Vorganges per Mail zugesandt.<br /> +<br /> +Ihre Sponsoren erhalten hiermit die Möglichkeit, Werbeblöcke im +Newsletter zu buchen. Dabei können sie sich entscheiden, ob die Werbung im +Kopf-, Fuss- oder unter eines News-Abschnittes angezeigt wird.<br /> +<br /> +Das Erstellen des Newsletters ist dabei kinderlicht gehalten. Am Anfang vergeben +Sie eine Betreffzeile oder übernehmen die Standarteinstellung. Dann geben +Sie den Text für den Newsletterkopf ein, dort sollte ein kurzer rechtlicher +Hinweis kommen. Anschliessend richten Sie schon die Themenblöcke ein, +jeweils mit einer einzeiligen Zusammenfassung und den Rumpf. Dabei wird Ihnen +automatisch eine Zusammenfassung generiert, so eine Art Inhaltsverzeichnis, dass +an den Newsletterkopf angehängt wird.<br /> +<br /> +Kurz vor der Fertigstellung können Sie noch eine optionale Fusszeile +vergeben, wo Sie z.B. ausführliche rechtliche Hinweise einbinden. Diese und +die Kopfzeile kann auch als Standart gespeichert werden und brauch dann nicht +jedes Mal erneut eingegeben werden.<br /> +<br /> +Bevor Sie dann den Newsletter aussenden, stellen Sie eine Lagerfrist (wie lange +der Newsletter für die Statistik verfügbar ist und danach in's +Archiv verschoben wird) ein und ob der Newsletter archiviert werden soll +(Standarteinstellung) oder nicht.<br /> +<br /> +Dann versenden Sie den Newsletter an alle Ihre Mitglieder. Dabei wird wieder der +Sende-Pool des Scriptes genünutzt, um die Erreichbarkeit des Scriptes auch +bei grossen Mengen zu gewährleisten. diff --git a/templates/de/html/ext/ext_other.tpl b/templates/de/html/ext/ext_other.tpl index 5f9c4f590b..24734e1d21 100644 --- a/templates/de/html/ext/ext_other.tpl +++ b/templates/de/html/ext/ext_other.tpl @@ -1,2 +1,2 @@ -Weitere wichtige Einstellungen zu Ihrem {?MT_WORD?}. Diese Erweiterung sollte +Weitere wichtige Einstellungen zu Ihrem {?mt_word?}. Diese Erweiterung sollte immer installiert und aktiviert sein. diff --git a/templates/de/html/ext/ext_primera.tpl b/templates/de/html/ext/ext_primera.tpl index 2f3fdd5995..d80eb68b94 100644 --- a/templates/de/html/ext/ext_primera.tpl +++ b/templates/de/html/ext/ext_primera.tpl @@ -6,5 +6,5 @@ ein Primera-Account. Mehr dazu auf <a href="http://www.primusportal.de/r/Quix0r" target="_blank">www.primusportal.de</a>. Wenn Sie möchten, können Sie auch ganz zu Primera wechseln. Sie unter <a target="_blank" href="{?URL?}/modules.php?module=admin&what=config_other">Sonstige -Einstellungen</a> die Währung Ihres {?MT_WORD2?} von {?POINTS?} auf Primera +Einstellungen</a> die Währung Ihres {?mt_word2?} von {?POINTS?} auf Primera umstellen. diff --git a/templates/de/html/ext/ext_register.tpl b/templates/de/html/ext/ext_register.tpl index 234d37b04f..9a4bf8c297 100644 --- a/templates/de/html/ext/ext_register.tpl +++ b/templates/de/html/ext/ext_register.tpl @@ -1,2 +1,2 @@ -Das Anmeldeformular zu Ihrem {?MT_WORD?}. Bitte installieren Sie diese +Das Anmeldeformular zu Ihrem {?mt_word?}. Bitte installieren Sie diese Erweiterung und aktivieren Sie diese auch. diff --git a/templates/de/html/ext/ext_removeip.tpl b/templates/de/html/ext/ext_removeip.tpl index bbe5b458f4..30327c1c85 100644 --- a/templates/de/html/ext/ext_removeip.tpl +++ b/templates/de/html/ext/ext_removeip.tpl @@ -3,8 +3,8 @@ Anonymisierungserweiterung, die derzeit die IP-Nummer in je nach Einstellung, umwandelt, den User-Agent in eine anonyme Form bringt und den Referer entfernt. Auch sollten Sie über das Verlangen von personenbezogenen Daten im Anmeldeformular nachdenken, welche *wirklich* -für Ihren {?MT_WORD?} erforderlich sind. Sobald diese Erweiterung in Ihrem -{?MT_WORD?} installiert ist, wird im Gast-, Mitglieds- und Adminbereich der +für Ihren {?mt_word?} erforderlich sind. Sobald diese Erweiterung in Ihrem +{?mt_word?} installiert ist, wird im Gast-, Mitglieds- und Adminbereich der Hinweis eingeblendet, unter welcher IP-Nummer Ihre Aktivität gespeichert wird, falls sich Ihre Besucher anmelden oder Mitglieder einloggen sollten.<br /> <br /> diff --git a/templates/de/html/ext/ext_rewrite.tpl b/templates/de/html/ext/ext_rewrite.tpl index 9883ef6f0d..5303a0efc4 100644 --- a/templates/de/html/ext/ext_rewrite.tpl +++ b/templates/de/html/ext/ext_rewrite.tpl @@ -1,17 +1,4 @@ -Mit dieser Erweiterung werden alle Links, die Ihrem {?MT_WORD?} +Mit dieser Erweiterung werden alle Links, die Ihrem {?mt_word?} angehöhren, so umgeschrieben, dass diese von Suchmaschinen besser aufgerufen werden können. Wundern Sie sich also bitte nicht, wenn die Links etwas anders aussehen, als dass Sie es gewöhnt sind. :-) -<br /> -<br /> -<strong>Vorsicht!</strong> -Diese Erweiterung ist noch Alpha! Wenn Sie nicht funktionierende Links -finden, melden Sie sich bitte -<a href="http://www.mxchange.org/cms/index/wht/impressum" - target="_blank">bei mir direkt</a> -(Mail bevorzugt, wegen besserer Übertragung der fehlerhaften -Links). Danke für Ihre Mithilfe! :-) -<br /> -<br /> -Damit die Erweiterung auch (hoffentlich) funktioniert, müssen Sie -sich die neusten Patches herunterladen! diff --git a/templates/de/html/ext/ext_safe.tpl b/templates/de/html/ext/ext_safe.tpl index 1bf61633ad..21374cf718 100644 --- a/templates/de/html/ext/ext_safe.tpl +++ b/templates/de/html/ext/ext_safe.tpl @@ -1,6 +1,6 @@ Der Tresor kann von Ihren Mitgliedern zum Sichern von angesammelten {?POINTS?} benutzt werden. Zusätzlich erhalten Ihre Mitglieder, wenn Sie die -Erweiterung <strong>active</strong> in Ihrem {?MT_WORD?} installiert und die +Erweiterung <strong>active</strong> in Ihrem {?mt_word?} installiert und die Aktiv-Rallye aktiviert haben, jeden Monat Zinsen auf das gesicherte Guthaben. Die Zinsabstuffung können Sie im Adminbereich frei einstellen und dabei beliebig viele Zinsstufen einrichten. Eine Zinsstufe richtet sich nach einem diff --git a/templates/de/html/ext/ext_sponsor.tpl b/templates/de/html/ext/ext_sponsor.tpl index 9a475a17cb..c5cec1f2e0 100644 --- a/templates/de/html/ext/ext_sponsor.tpl +++ b/templates/de/html/ext/ext_sponsor.tpl @@ -1,15 +1,15 @@ -{--MT_WORD3--} "leben" von ihren Sponsoren. Mit dieser Erweiterung +{?mt_word?} "leben" von ihren Sponsoren. Mit dieser Erweiterung steht Ihnen eine professionelle Lösung bereit, mit der Sie neue Sponoren werben können.<br /> <br /> Die wichtigsten Funktionen des Sponsorbereiches: <ul> <li>Echtzeitstatistik im Sponsorenbereich für jede Sponsoraktion seperat und gemeinsam</li> -<li>Einfaches Nachbestellen von {?POINTS?}n (Konto auffüllen) und Ändern der Einstellungen des Sponsors (sowohl aus dem Adminbereich als auch vom Sponsor selber durchführbar)</li> +<li>Einfaches Nachbestellen von {?POINTS?} (Konto auffüllen) und Ändern der Einstellungen des Sponsors (sowohl aus dem Adminbereich als auch vom Sponsor selber durchführbar)</li> <li>Volle administrative Kontrolle (z.B. wird das Sponsorenaccount gesperrt, wenn er seine Email-Adresse ändert oder neue {?POINTS?} bestellt hat; jede vom Sponsor durchgeführte Sponsorenaktion (Mailbuchung, neue SignUp-Aktion erstellt oder bestehende geändert) muss von Ihnen freigegeben werden)</li> <li>Eigenes von anderen unabhängige Menüsystem</li> <li>Sie können (und sollten es auch) eigene Sponsoren-Accounts aus dem Adminbereich anlegen</li> -<li>Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {?MT_WORD?} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.</li> +<li>Installieren Sie eine zusätzliche Erweiterung mit Sponsor-Anteil Ihrem {?mt_word?} hinzu, wird automatisch ein entsprechender Menüpunkt in den Sponsorenbereich eingefügt.</li> <li>Einfache Werbemittel-Verwaltung: Die Sponsoren brauchen nur einmal eine URL bzw. einen Banner hinzufügen (ausser wenn diese gelöscht wurden).</li> <li>Später können die URLs und Banner beliebig Kampagnen zugewiesen werden.</li> <li>Kampagnen können entweder von einem Anfangsdatum bis zu einem Enddatum laufen oder bis das übertragene Guthaben an {?POINTS?} aufgebraucht ist.</li> diff --git a/templates/de/html/ext/ext_transfer.tpl b/templates/de/html/ext/ext_transfer.tpl index 9854ffe53e..6ed4c88e22 100644 --- a/templates/de/html/ext/ext_transfer.tpl +++ b/templates/de/html/ext/ext_transfer.tpl @@ -6,5 +6,5 @@ Gesamtübersicht und können Einträge auch manuell löschen. Zudem können Sie bestimmen, wie lang der Touring-Code (auch abschaltbar!) sein soll, wie viele Einträge maximal angezeigt werden soll und wie lange die Einträge gültig sind. Ist die -<a href="{?URL?}/extensions/ext-autopurge.zip">AutoPurge-Erweiterung</a> -installiert, werden um 00:00 Uhr veraltete Einträge entfernt. +<strong>ext-autopurge</strong>-Erweiterung installiert, werden um 00:00 Uhr +veraltete Einträge entfernt. diff --git a/templates/de/html/ext/ext_wernis.tpl b/templates/de/html/ext/ext_wernis.tpl index eb054a1b84..321b3b37b8 100644 --- a/templates/de/html/ext/ext_wernis.tpl +++ b/templates/de/html/ext/ext_wernis.tpl @@ -7,5 +7,5 @@ dazu auf <a href="http://www.wds66.com/ref.php?refid=10437" target="_blank">www.wds66.com</a>. Wenn Sie möchten, können Sie auch ganz zu Wernis wechseln. Sie unter <a target="_blank" href="{?URL?}/modules.php?module=admin&what=config_other">Sonstige -Einstellungen</a> die Währung Ihres {?MT_WORD2?} von {?POINTS?} auf Wernis +Einstellungen</a> die Währung Ihres {?mt_word2?} von {?POINTS?} auf Wernis umstellen. diff --git a/templates/de/html/ext/ext_yoomedia.tpl b/templates/de/html/ext/ext_yoomedia.tpl index 063f04672f..1423278950 100644 --- a/templates/de/html/ext/ext_yoomedia.tpl +++ b/templates/de/html/ext/ext_yoomedia.tpl @@ -2,4 +2,5 @@ Erweiterung zur Anbindung an die API (Interface 2.0!) von [<a href="http://www.yoomedia.de?ref=1715" target="_blank" rel="external" title="Referal-Link, bitte ID stehen lassen!">Yoo!Media</a>]. Diese Erweiterung muss aktiviert sein, damit die täglichen freien Abfragen wieder -zurückgesetzt werden. +zurückgesetzt werden. Diese Erweiterung benötigt iconv(), um das ISO +von Yoo!Media nach UTF-8 (quasi-Standart in MXChange) umzuwandeln. diff --git a/templates/de/html/fatal_errors.tpl b/templates/de/html/fatal_errors.tpl new file mode 100644 index 0000000000..e047fb2f3e --- /dev/null +++ b/templates/de/html/fatal_errors.tpl @@ -0,0 +1,7 @@ +<div class="fatal_box"> + $content[corr] + <br /> + <div class="fatal_footer"> + $content[rows] + </div> +</div> diff --git a/templates/de/html/fatal_footer.tpl b/templates/de/html/fatal_footer.tpl index ba6f794127..11f5d85d80 100644 --- a/templates/de/html/fatal_footer.tpl +++ b/templates/de/html/fatal_footer.tpl @@ -1,3 +1 @@ - <br /> - <div class="fatal_footer">$content</div> -</div> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/fatal_header.tpl b/templates/de/html/fatal_header.tpl index 33e64608b7..11f5d85d80 100644 --- a/templates/de/html/fatal_header.tpl +++ b/templates/de/html/fatal_header.tpl @@ -1 +1 @@ -<div class="fatal_box"> \ No newline at end of file +<!-- @DEPRECATED //--> diff --git a/templates/de/html/guest/.htaccess b/templates/de/html/guest/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/guest/.htaccess +++ b/templates/de/html/guest/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/guest/guest_active_row.tpl b/templates/de/html/guest/guest_active_row.tpl index 109edff57c..8da0ff6414 100644 --- a/templates/de/html/guest/guest_active_row.tpl +++ b/templates/de/html/guest/guest_active_row.tpl @@ -1,5 +1,5 @@ <tr> - <td class="active_row1 switch_sw$content[sw] bottom2 right2"> $content[uid] ($content[nick])</td> + <td class="active_row1 switch_sw$content[sw] bottom2 right2"> $content[userid] ($content[nickname])</td> <td class="active_row2 switch_sw$content[sw] bottom2 right2"> $content[points]</td> - <td class="active_row3 switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="active_row3 switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> diff --git a/templates/de/html/guest/guest_active_table.tpl b/templates/de/html/guest/guest_active_table.tpl index c86d27836f..48762fd895 100644 --- a/templates/de/html/guest/guest_active_table.tpl +++ b/templates/de/html/guest/guest_active_table.tpl @@ -13,7 +13,7 @@ <td class="guest_title2 bottom2"><strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__ACTIVE_ROWS!} + $content <tr> <td colspan="3" align="center" class="guest_footer" height="30"> <div class="member_note tiny">{--GUEST_ACTIVE_FOOTER--}</div></td> diff --git a/templates/de/html/guest/guest_beg.tpl b/templates/de/html/guest/guest_beg.tpl index 4d206e39a3..ab187e255a 100644 --- a/templates/de/html/guest/guest_beg.tpl +++ b/templates/de/html/guest/guest_beg.tpl @@ -17,10 +17,10 @@ </tr> <tr> <td align="left" class="beg_msg"> - <P>{--BEG_GUEST_EARN_1--} <strong>{!__BEG_POINTS!} - {?POINTS?}</strong> {--BEG_GUEST_EARN_2--} <strong>{!__BEG_POINTS_MAX!} + <P>{--BEG_GUEST_EARN_1--} <strong>$content[points] + {?POINTS?}</strong> {--BEG_GUEST_EARN_2--} <strong>$content[points_max] {?POINTS?}</strong> {--BEG_GUEST_EARN_3--}</P> - <P>{--BEG_GUEST_TIMEOUT_1--} <strong>{!__BEG_TIMEOUT!}</strong> + <P>{--BEG_GUEST_TIMEOUT_1--} <strong>$content[timeout]</strong> {--BEG_GUEST_TIMEOUT_2--}</P> <P align="right">{--BEG_GUEST_HAVE_FUN--}</P> </td> @@ -36,7 +36,7 @@ </tr> <tr> <td align="center" height="30" class="beg_msg"><a - href="{?URL?}/ref.php?ref={!__BEG_UID!}">{--BEG_CONTINUE_REGISTER--}</a> + href="{?URL?}/ref.php?ref=$content[userid]">{--BEG_CONTINUE_REGISTER--}</a> </td> </tr> <tr> diff --git a/templates/de/html/guest/guest_cat_table.tpl b/templates/de/html/guest/guest_cat_table.tpl index 32d6c9ac3e..6fb08728f4 100644 --- a/templates/de/html/guest/guest_cat_table.tpl +++ b/templates/de/html/guest/guest_cat_table.tpl @@ -1,3 +1,3 @@ <table border="0" cellspacing="0" cellpadding="1" class="list_categories"> - {!__CAT_ROWS!} +$content </table> diff --git a/templates/de/html/guest/guest_confirm_link.tpl b/templates/de/html/guest/guest_confirm_link.tpl index 75036604e3..5f278c1140 100644 --- a/templates/de/html/guest/guest_confirm_link.tpl +++ b/templates/de/html/guest/guest_confirm_link.tpl @@ -1,9 +1,10 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=index&what=confirm" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=confirm" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="480" class="admin_table dashed"> <tr> <td align="center" colspan="3" class="admin_title bottom2" height="30"> - <div class="big">{--REQUEST_CONFIRM_LINK_TITLE--}</div></td> + <div class="big">{--REQUEST_CONFIRM_LINK_TITLE--}</div> + </td> </tr> <tr> <td colspan="3" class="seperator" height="6"> </td> @@ -17,17 +18,18 @@ <tr> <td align="right" width="230">{--GUEST_ENTER_EMAIL--}:</td> <td width="10" class="seperator"> </td> - <td width="240"><input type="text" name="email" - class="guest_normal" size="30" maxlength="255"></td> + <td width="240"> + <input type="text" name="email" class="guest_normal" size="30" maxlength="255" /> + </td> </tr> <tr> <td colspan="3" class="seperator" height="6"> </td> </tr> <tr> - <td align="center" colspan="3" class="admin_footer top2"><input - type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="guest_submit" - value="{--REQUEST_CONFIRM_LINK--}" /></td> + <td align="center" colspan="3" class="admin_footer top2"> + <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="guest_submit" value="{--REQUEST_CONFIRM_LINK--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/guest/guest_confirm_table.tpl b/templates/de/html/guest/guest_confirm_table.tpl index eaf26cd637..11f5d85d80 100644 --- a/templates/de/html/guest/guest_confirm_table.tpl +++ b/templates/de/html/guest/guest_confirm_table.tpl @@ -1,3 +1 @@ -<div class="guest_table dashed"> - <div style="text-align:center" class="guest_done">{!__CONFIRM_MSG!}</div> -</div> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/guest/guest_doubler.tpl b/templates/de/html/guest/guest_doubler.tpl index 9a22586dca..4f15976ecc 100644 --- a/templates/de/html/guest/guest_doubler.tpl +++ b/templates/de/html/guest/guest_doubler.tpl @@ -1,42 +1,28 @@ <div align="center"> <table border="0" cellspacing="0" cellpadding="0" class="doubler_table dashed"> <tr> - <td align="center" class="doubler_header bottom2"><strong - class="big">{--DOUBLER_GENERAL_INFOS--}:</strong></td> + <td align="center" class="doubler_header bottom2"> + <strong class="big">{--DOUBLER_GENERAL_INFOS--}:</strong> + </td> </tr> <tr> - <td class="doubler_main bottom2" - style="padding-left: 0px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px"> - <ul> - - <li>{--DOUBLER_MINIMUM_IS--} <strong>{!__MIN_VALUE!} - {?POINTS?}</strong> {--DOUBLER_MAXIMUM_IS--} <strong>{!__MAX_VALUE!} - {?POINTS?}</strong></li> - <li>{--DOUBLER_ALREADY_PAYED_1--} <strong>{!__TOTAL_VALUE!} - {?POINTS?}</strong> {--DOUBLER_ALREADY_PAYED_2--}</li> - <li>{--DOUBLER_POINTS_LEFT_1--} <strong>{!__LEFT_VALUE!} - {?POINTS?}</strong> {--DOUBLER_POINTS_LEFT_2--}</li> - <li>{--DOUBLER_USAGE_COUNTER_1--} <strong>{!__DOUBLER_COUNTER!}</strong> - {--DOUBLER_USAGE_COUNTER_2--}</li> - <li>{!DOUBLER_PAYOUT_TIME!}</li> + <td class="doubler_main bottom2" style="padding-left: 0px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px"> + <ul> + <li>{--DOUBLER_MINIMUM_IS--} <strong>$content[min] {?POINTS?}</strong> {--DOUBLER_MAXIMUM_IS--} <strong>$content[max] {?POINTS?}</strong></li> + <li>{--DOUBLER_ALREADY_PAYED_1--} <strong>$content[total] {?POINTS?}</strong> {--DOUBLER_ALREADY_PAYED_2--}</li> + <li>{--DOUBLER_POINTS_LEFT_1--} <strong>$content[left] {?POINTS?}</strong> {--DOUBLER_POINTS_LEFT_2--}</li> + <li>{--DOUBLER_USAGE_COUNTER_1--} <strong>{?doubler_counter?}</strong> {--DOUBLER_USAGE_COUNTER_2--}</li> + <li>$content[payout_time]</li> <li><strong>{--DOUBLER_FULL_PAYOUT--}</strong></li> - <li>{--DOUBLER_POINTS_1--} <strong>{!__CHARGE_VALUE!}%</strong> - {--DOUBLER_POINTS_2--}</li> - <li>{--DOUBLER_EXAMPLE_1--} <strong>500 {?POINTS?}</strong> - »» {--DOUBLER_EXAMPLE_2--} <strong>1000 {?POINTS?}</strong>{--DOUBLER_EXAMPLE_3--}</li> - <li>{--DOUBLER_REFERRAL_1--} <strong>{!__REF_VALUE!}%</strong> - {--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--} - {--DOUBLER_REFERRAL_4--} - <li>{--DOUBLER_REFERRAL_5--} <strong>100 {?POINTS?}</strong> - {--DOUBLER_REFERRAL_6--} <strong>100 {?POINTS?}</strong> - {--DOUBLER_REFERRAL_8--} <strong>300 {?POINTS?}</strong> - {--DOUBLER_REFERRAL_8--}</li> + <li>{--DOUBLER_POINTS_1--} <strong>$content[charge]%</strong> {--DOUBLER_POINTS_2--}</li> + <li>{--DOUBLER_EXAMPLE_1--} <strong>500 {?POINTS?}</strong> »» {--DOUBLER_EXAMPLE_2--} <strong>1000 {?POINTS?}</strong>{--DOUBLER_EXAMPLE_3--}</li> + <li>{--DOUBLER_REFERRAL_1--} <strong>$content[ref]%</strong> {--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--} {--DOUBLER_REFERRAL_4--} + <li>{--DOUBLER_REFERRAL_5--} <strong>100 {?POINTS?}</strong> {--DOUBLER_REFERRAL_6--} <strong>100 {?POINTS?}</strong> {--DOUBLER_REFERRAL_8--} <strong>300 {?POINTS?}</strong> {--DOUBLER_REFERRAL_8--}</li> <li>{--DOUBLER_REFERRAL_LINK--}</li> - <li>{--DOUBLER_TIMEOUT_1--} <strong>{!__TIMEOUT_MARK!}</strong> - {--DOUBLER_TIMEOUT_2--}</li> + <li>{--DOUBLER_TIMEOUT_1--} <strong>$content[timeout_mark]</strong> {--DOUBLER_TIMEOUT_2--}</li> <li>{--DOUBLER_HAVE_FUN--}</li> <li><strong><a href="{?URL?}/doubler.php">{--DOUBLER_WANNA_TRY--}</a></strong></li> - </ol> + </ul> </td> </tr> <tr> @@ -44,23 +30,23 @@ class="big">{--DOUBLER_REGISTER_ADVERT--}:</strong></td> </tr> <tr> - <td class="doubler_main" - style="padding-left: 0px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px"> - <ul> - <li>{--DOUBLER_NOT_YET_REGISTERED--} <a - href="{?URL?}/ref.php?refid={!__REFID!}">{--DOUBLER_REGISTER_NOW--}</a></li> - <li>{--DOUBLER_YOUR_ADVERTISING_HERE--} <a - href="{?URL?}/modules.php?module=index&what=impressum&refid={!__REFID!}">{--DOUBLER_CONTACT_US--}</a></li> - </ol> + <td class="doubler_main" style="padding-left: 0px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px"> + <ul> + <li>{--DOUBLER_NOT_YET_REGISTERED--} <a href="{?URL?}/ref.php?refid=$content[refid]">{--DOUBLER_REGISTER_NOW--}</a></li> + <li>{--DOUBLER_YOUR_ADVERTISING_HERE--} <a href="{?URL?}/modules.php?module=index&what=impressum&refid=$content[refid]">{--DOUBLER_CONTACT_US--}</a></li> + </ul> </td> </tr> </table> -<div class="big">{--DOUBLER_ALREADY_PAYOUT--}:</div> -<br /> -{!__DOUBLER_PAYOUT_HISTORY!}</P> +<div class="big"> + {--DOUBLER_ALREADY_PAYOUT--}:</div> + <br /> + $content[payout_history] +</div> -<div class="big">{--DOUBLER_NEXT_PAYOUT--}:</div> -<br /> -{!__DOUBLER_PAYOUT_NEXT!} +<div class="big"> + {--DOUBLER_NEXT_PAYOUT--}:</div> + <br /> + $content[next_table] </div> diff --git a/templates/de/html/guest/guest_doubler_list_rows.tpl b/templates/de/html/guest/guest_doubler_list_rows.tpl index 93e750e61c..f12bfb203d 100644 --- a/templates/de/html/guest/guest_doubler_list_rows.tpl +++ b/templates/de/html/guest/guest_doubler_list_rows.tpl @@ -1,6 +1,6 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2" align="center" - width="100">$content[uid]</td> + width="100">$content[userid]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center" width="160">$content[points]</td> <td class="switch_sw$content[sw] bottom2" align="center" width="160"> diff --git a/templates/de/html/guest/guest_frametester.tpl b/templates/de/html/guest/guest_frametester.tpl index 1b4112a3e4..61af382ced 100644 --- a/templates/de/html/guest/guest_frametester.tpl +++ b/templates/de/html/guest/guest_frametester.tpl @@ -1,6 +1,4 @@ <frameset rows="80,*" frameborder="no" border="0" framespacing="0"> - <frame name="test_top" - src="{?URL?}/modules.php?module=frametester&frame=test_top" - frameborder="no" scrolling="no" noresize /> - <frame name="url" src="{!__URL_VALUE!}" frameborder="no" noresize /> -</frameset> \ No newline at end of file + <frame name="test_top" src="{?URL?}/modules.php?module=frametester&frame=test_top" frameborder="no" scrolling="no" noresize /> + <frame name="url" src="$content[url]" frameborder="no" noresize /> +</frameset> diff --git a/templates/de/html/guest/guest_login.tpl b/templates/de/html/guest/guest_login.tpl index f8437621bf..5395db35ae 100644 --- a/templates/de/html/guest/guest_login.tpl +++ b/templates/de/html/guest/guest_login.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed" width="480"> <tr> <td colspan="9" height="3" class="seperator"> </td> @@ -28,7 +28,7 @@ </td> <td width="10" class="seperator"> </td> </tr> - {!LOGIN_FAILURE_MSG!} + $content[message] <tr> <td colspan="9" height="3" class="seperator"> </td> </tr> @@ -71,7 +71,7 @@ </table> </form> -<form action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed"> <tr> <td colspan="5" height="3" class="seperator"> </td> diff --git a/templates/de/html/guest/guest_nickname_login.tpl b/templates/de/html/guest/guest_nickname_login.tpl index 576856b557..8ada63981a 100644 --- a/templates/de/html/guest/guest_nickname_login.tpl +++ b/templates/de/html/guest/guest_nickname_login.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="540"> <tr> <td width="10" class="guest_title2 bottom2 seperator" height="30"> </td> - <td colspan="8" class="guest_title2 bottom2"><strong>{--GUEST_WELCOME_MEMBER--}</strong> + <td colspan="7" class="guest_title2 bottom2"> + <strong>{--GUEST_WELCOME_MEMBER--}</strong> </td> <td width="10" class="guest_title2 bottom2 seperator"> </td> </tr> @@ -22,7 +23,7 @@ size="10" maxlength="255"></td> <td width="10" class="seperator"> </td> </tr> - {!LOGIN_FAILURE_MSG!} + $content[message] <tr> <td colspan="9" height="3" class="seperator"> </td> </tr> @@ -53,7 +54,7 @@ </tr> <tr> <td width="10" class="guest_footer seperator"> </td> - <td colspan="8" align="center" class="guest_footer"> + <td colspan="7" align="center" class="guest_footer"> <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> <input type="submit" name="ok" class="guest_submit" value="{--LOGIN_SUBMIT--}" /> </td> @@ -62,7 +63,7 @@ </table> </form> -<form action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=login" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="540"> <tr> <td width="10" class="guest_title2 bottom2 seperator"> </td> diff --git a/templates/de/html/guest/guest_rallye_footer.tpl b/templates/de/html/guest/guest_rallye_footer.tpl index 74d385d885..d9f60b24ff 100644 --- a/templates/de/html/guest/guest_rallye_footer.tpl +++ b/templates/de/html/guest/guest_rallye_footer.tpl @@ -2,8 +2,8 @@ <td colspan="3" class="guest_title2" height="10" style="padding-top: 5px; padding-bottom: 5px"> <ul> <li><div class="guest_note">Es werden nur aktive User gewertet.</div></li> - <li><div class="guest_note">{!__RALLYE_MAX_USERS!}</div></li> - <li><div class="guest_note">{!__RALLYE_MIN_PRICES!}</div></li> + <li><div class="guest_note">$content[min_users]</div></li> + <li><div class="guest_note">$content[min_prices]</div></li> <li><div class="guest_note">Der Rechtsweg ist ausgeschlossen.</div></li> </ul> </td> diff --git a/templates/de/html/guest/guest_rallye_show.tpl b/templates/de/html/guest/guest_rallye_show.tpl index c3ab204686..76c90b0e65 100644 --- a/templates/de/html/guest/guest_rallye_show.tpl +++ b/templates/de/html/guest/guest_rallye_show.tpl @@ -7,50 +7,52 @@ <tr> <td class="bottom2" align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 10px; margin-bottom: 10px"> <ul> - <li>Titel: <strong>{!__RALLYE_TITLE!}</strong></li> - <li>Start: <strong>{!__RALLYE_START!}</strong></li> - <li>Ende : <strong>{!__RALLYE_END!}</strong></li> + <li>Titel: <strong>$content[title]</strong></li> + <li>Start: <strong>$content[start]</strong></li> + <li>Ende : <strong>$content[end]</strong></li> </ul> </td> </tr> <tr> <td class="guest_title2 bottom2" height="25"> - <strong>...:: {!__RALLYE_TITLE!} ::...</strong> + <strong>...:: $content[title] ::...</strong> </td> </tr> <tr> <td class="bottom2"> - <div - style="margin-left: 5px; margin-right: 5px; margin-top: 3px; margin-bottom: 3px"> - {!__RALLYE_DESCR!}</div> + <div style="margin-left: 5px; margin-right: 5px; margin-top: 3px; margin-bottom: 3px"> + $content[descr] + </div> </td> </tr> <tr> - <td class="guest_title2 bottom2" height="25"><strong>{!__RALLYE_CAN_WIN_THIS!}:</strong> + <td class="guest_title2 bottom2" height="25"> + <strong>$content[can_win_this]:</strong> </td> </tr> <tr> <td class="bottom2"> - <div - style="margin-left: 5px; margin-right: 5px; margin-top: 10px; margin-bottom: 10px"> - {!__RALLYE_PRICES!}</div> + <div style="margin-left: 5px; margin-right: 5px; margin-top: 10px; margin-bottom: 10px"> + $content[prices] + </div> </td> </tr> <tr> - <td class="guest_title2 bottom2" height="25"><strong>Aktueller - Stand der Rallye:</strong></td> + <td class="guest_title2 bottom2" height="25"> + <strong>Aktueller Stand der Rallye:</strong> + </td> </tr> <tr> <td class="bottom2" align="center"> - <div - style="margin-left: 5px; margin-right: 5px; margin-top: 10px; margin-bottom: 10px" - align="center">{!__RALLYE_TOP_USERS!}</div> + <div style="margin-left: 5px; margin-right: 5px; margin-top: 10px; margin-bottom: 10px" align="center"> + $content[top_users] + </div> </td> </tr> <tr> <td class="guest_title2" height="25"> <div align="center" style="margin-left: 5px; margin-right: 5px; margin-top: 3px; margin-bottom: 3px"> - <strong>...:: {!__RALLYE_EXTRAS!} ::...</strong> + <strong>...:: $content[extras] ::...</strong> </div> </td> </tr> diff --git a/templates/de/html/guest/guest_receive_table.tpl b/templates/de/html/guest/guest_receive_table.tpl index 1229415f4f..cad81aa9db 100644 --- a/templates/de/html/guest/guest_receive_table.tpl +++ b/templates/de/html/guest/guest_receive_table.tpl @@ -5,7 +5,7 @@ <strong>{--MAX_PER_DAY--}:</strong> </td> <td width="40%" class="register_right"><select name="max_mails" size="1" class="register_select"> - {!__MAX_RECEIVE_OPTIONS!} + $content </select></td> </tr> </table> \ No newline at end of file diff --git a/templates/de/html/guest/guest_register.tpl b/templates/de/html/guest/guest_register.tpl index 63a99533ec..9bbc8db1a7 100644 --- a/templates/de/html/guest/guest_register.tpl +++ b/templates/de/html/guest/guest_register.tpl @@ -1,14 +1,15 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=index&what=register" method="post" name="register"> -<table border="0" cellspacing="0" cellpadding="0" width="640" - class="guest_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=register" method="post" name="register"> +<table border="0" cellspacing="0" cellpadding="0" width="640" class="guest_table dashed"> <tr> <td colspan="2" class="guest_title bottom2" height="70"> - {!REGISTER_HEADER_CONTENT!}</td> + $content[header_content] + </td> </tr> <tr> <td colspan="2" class="guest_title2 bottom2" height="30"> - {--REGISTER_PERSONAL_DATA--}:</td> + {--REGISTER_PERSONAL_DATA--}: + </td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> @@ -18,7 +19,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="50%" class="register_left"> - {--GUEST_GENDER--}{!MUST_GENDER!}: </td> + {--GUEST_GENDER--}$content[must_fillout_gender]: </td> <td width="50%" class="register_right"><select name="gender" size="1" class="guest_select"> <option value="M">{--GENDER_M--}</option> @@ -30,22 +31,21 @@ <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> - <td class="register_left">{--SURNAME--}{!MUST_SURNAME!}, - {--FAMILY_NAME--}{!MUST_FAMILY_NAME!}: </td> - <td class="register_right"><input type="text" name="surname" - class="guest_normal" size="15" maxlength="255" - value="{!__SURNAME!}"> <input type="text" - name="family" class="guest_normal" size="15" maxlength="255" - value="{!__FAMILY!}"></td> + <td class="register_left">{--SURNAME--}$content[must_fillout_surname], + {--FAMILY_NAME--}$content[must_fillout_family]: </td> + <td class="register_right"> + <input type="text" name="surname" lass="guest_normal" size="15" maxlength="255" value="$content[surname]" /> + <input type="text" name="family" class="guest_normal" size="15" maxlength="255" value="$content[family]" /> + </td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> <td class="register_left"> - {--STREET_NR--}{!MUST_STREET_NR!}: </td> - <td class="register_right"><input type="text" name="street_nr" - class="guest_normal" size="25" maxlength="255" value="{!__STREET!}"> + {--STREET_NR--}$content[must_fillout_street_nr]: </td> + <td class="register_right"> + <input type="text" name="street_nr" class="guest_normal" size="25" maxlength="255" value="$content[street_nr]" /> </td> </tr> <tr> @@ -53,38 +53,39 @@ </tr> <tr> <td align="right" width="50%" class="register_left"> - {--COUNTRY--}{!MUST_CNTRY!}, {--ZIP--}{!MUST_ZIP!}, - {--CITY--}{!MUST_CITY!}: </td> + {--COUNTRY--}$content[must_fillout_cntry], {--ZIP--}$content[must_fillout_zip], + {--CITY--}$content[must_fillout_city]: </td> <td width="50%" class="register_right"> - {!__COUNTRY_CONTENT!} <input type="text" name="zip" - class="guest_normal" size="5" maxlength="10" value="{!__ZIP!}"> + $content[country] <input type="text" name="zip" + class="guest_normal" size="5" maxlength="10" value="$content[zip]" /> <input type="text" name="city" class="guest_normal" size="20" - maxlength="255" value="{!__CITY!}"></td> + maxlength="255" value="$content[city]" /></td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> <td align="right" width="50%" class="register_left"> - {--ADDY--}{!MUST_ADDY!}: </td> - <td width="50%" class="register_right"><input type="text" - name="addy" class="guest_normal" size="30" maxlength="255" - value="{!__ADDY!}"></td> + {--EMAIL_ADDRESS--}$content[must_fillout_email]: + </td> + <td width="50%" class="register_right"> + <input type="text" name="email" class="guest_normal" size="30" maxlength="255" value="$content[email]" /> + </td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> <td align="right" width="50%" class="register_left"> - {--BIRTHDAY--}{!MUST_BIRTH!}: </td> - <td width="50%" class="register_right">{!BIRTHDAY_SELECTION!}</td> + {--BIRTHDAY--}$content[must_fillout_birthday]: </td> + <td width="50%" class="register_right">$content[birthday_selection]</td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> <td colspan="2" align="center"> - <div class="guest_failed">{!MUST_MARKER!} : {--REGISTER_MUST_SET_NOTE--}</div> + <div class="guest_failed">$content[must_fillout_marker] : {--REGISTER_MUST_SET_NOTE--}</div> </td> </tr> </table> @@ -95,41 +96,44 @@ </tr> <tr> <td colspan="2" class="guest_title2 bottom2" height="30"> - {--REGISTER_CATEGORIES--}:</td> + {--REGISTER_CATEGORIES--}: + </td> </tr> <tr> <td colspan="2" class="guest_title"> - {--GUEST_SELECT_LEAST_CATS_1--}{!LEAST_CATS_VALUE!}{--GUEST_SELECT_LEAST_CATS_2--} + {--GUEST_SELECT_LEAST_CATS_1--}{?least_cats?}{--GUEST_SELECT_LEAST_CATS_2--} </td> </tr> <tr> - <td colspan="2" class="bottom2">{!CATEGORY_SELECTION!}</td> + <td colspan="2" class="bottom2">$content[category_selection]</td> </tr> <tr> <td colspan="2" class="guest_title2 bottom2" height="30"> - {--REGISTER_MISC--}:</td> + {--REGISTER_MISC--}: + </td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> <td align="right" width="60%" class="register_left"> - {--PASS_1--}, {--PASS_2--}: </td> - <td width="40%" class="register_right"><input type="password" - name="pass1" class="guest_normal" size="10" maxlength="100"> - <input type="password" name="pass2" class="guest_normal" size="10" - maxlength="100"></td> + {--PASS_1--}, {--PASS_2--}: + </td> + <td width="40%" class="register_right"> + <input type="password" name="pass1" class="guest_normal" size="10" maxlength="100" /> + <input type="password" name="pass2" class="guest_normal" size="10" maxlength="100" /> + </td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> <tr> - <td colspan="2" align="center">{!MAX_RECEIVE_LIST!}</td> + <td colspan="2" align="center">$content[max_receive_list]/td> </tr> <tr> <td colspan="2" height="7" class="seperator"> </td> </tr> - {!REFID_CONTENT!} + $content[refid_content] <tr> <td colspan="2" height="7" class="seperator bottom2"> </td> </tr> @@ -143,20 +147,21 @@ </tr> <tr> <td align="right" width="60%" class="register_left"> - {--AGREE_TO_THIS--}: </td> - <td width="40%" class="register_right">{--YES--}: <input - type="radio" name="agree" class="guest_normal" value="Y"> - {--NO--}: <input type="radio" name="agree" class="guest_normal" - value="N" checked="checked" /></td> + {--AGREE_TO_THIS--}: + </td> + <td width="40%" class="register_right"> + {--YES--}: <input type="radio" name="agree" class="guest_normal" value="Y" /> + {--NO--}: <input type="radio" name="agree" class="guest_normal" value="N" checked="checked" /> + </td> </tr> <tr> <td colspan="2" height="7" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="2" class="guest_footer" height="30"><input - type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="guest_submit" - value="{--SUBMIT_REGISTER--}" /></td> + <td colspan="2" class="guest_footer" height="30"> + <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="guest_submit" value="{--SUBMIT_REGISTER--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/guest/guest_sponsor_activate.tpl b/templates/de/html/guest/guest_sponsor_activate.tpl index a3a455cd44..b02610ea57 100644 --- a/templates/de/html/guest/guest_sponsor_activate.tpl +++ b/templates/de/html/guest/guest_sponsor_activate.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=index&what=sponsor_login&mode=activate" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=sponsor_login&mode=activate" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="400"> <tr> <td class="guest_title2 bottom2" align="center" height="30" colspan="2"> diff --git a/templates/de/html/guest/guest_sponsor_infos_none_row.tpl b/templates/de/html/guest/guest_sponsor_infos_none_row.tpl index ee518ff2f7..8bb3c588aa 100644 --- a/templates/de/html/guest/guest_sponsor_infos_none_row.tpl +++ b/templates/de/html/guest/guest_sponsor_infos_none_row.tpl @@ -1,5 +1,5 @@ <tr> - <td colspan="2> + <td colspan="2"> $content </td> </tr> diff --git a/templates/de/html/guest/guest_sponsor_login.tpl b/templates/de/html/guest/guest_sponsor_login.tpl index 3d609e7fb2..3de213412a 100644 --- a/templates/de/html/guest/guest_sponsor_login.tpl +++ b/templates/de/html/guest/guest_sponsor_login.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=index&what=sponsor_login" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=sponsor_login" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="400"> <tr> <td class="guest_title2 bottom2" align="center" height="30" colspan="2"> @@ -23,7 +23,7 @@ <input type="password" name="pass" class="guest_normal" size="10" maxlength="255" /> </td> </tr> -<td colspan="2" height="5" class="bottom2 seperator"> </td></tr> +<tr><td colspan="2" height="5" class="bottom2 seperator"> </td></tr> <tr> <td colspan="2" align="center" class="guest_footer"> <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/guest/guest_sponsor_lost.tpl b/templates/de/html/guest/guest_sponsor_lost.tpl index fce96c24b7..bfa3697966 100644 --- a/templates/de/html/guest/guest_sponsor_lost.tpl +++ b/templates/de/html/guest/guest_sponsor_lost.tpl @@ -1,12 +1,12 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=index&what=sponsor_login&mode=lost_pass" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=sponsor_login&mode=lost_pass" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="400"> <tr> <td class="guest_title2 bottom2" align="center" height="30" colspan="2"> <strong>{--SPONSOR_SEND_LOST_PASSWORD--}</strong> </td> </tr> -<td colspan="2" height="5" class="seperator"> </td></tr> +<tr><td colspan="2" height="5" class="seperator"> </td></tr> <tr> <td width="200" align="right" style="padding-right: 10px" height="30"> {--SPONSOR_ENTER_ID--}: @@ -23,8 +23,7 @@ <input type="text" name="email" class="guest_normal" size="20" maxlength="255" /> </td> </tr> -<tr> -<td colspan="2" height="5" class="bottom2 seperator"> </td></tr> +<tr><td colspan="2" height="5" class="bottom2 seperator"> </td></tr> <tr> <td colspan="2" align="center" class="guest_footer"> <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> diff --git a/templates/de/html/guest/guest_sponsor_reg.tpl b/templates/de/html/guest/guest_sponsor_reg.tpl index c452218500..b093814b67 100644 --- a/templates/de/html/guest/guest_sponsor_reg.tpl +++ b/templates/de/html/guest/guest_sponsor_reg.tpl @@ -1,6 +1,9 @@ <div align="center"> <div class="big">{--GUEST_SPONSOR_TITLE--}</div> </div> +<div class="errors"> + $content[form_errors] +</div> <div> <ul> <li>Melden Sie sich als Sponsor von <strong>{?MAIN_TITLE?}</strong> an! Hier bekommen Sie für Ihr Geld die Zielgruppe, die Sie auch auf Ihren Produktseiten haben wollen!</li> @@ -9,7 +12,7 @@ </ul> </div> -<form action="{?URL?}/modules.php?module=index&what=sponsor_reg" method="post"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=index&what=sponsor_reg" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="530"> <tr> <td class="guest_title2 bottom2" width="10" height="30"> </td> @@ -33,7 +36,7 @@ </td> <td class="seperator" width="10"> </td> <td width="300"> - <input type="text" name="company" class="guest_normal" size="20" maxlength="255" value="{!__COMPANY!}" /> + <input type="text" name="company" class="guest_normal" size="20" maxlength="255" value="$content[company]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -45,7 +48,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="position" class="guest_normal" size="20" maxlength="255" value="{!__POSITION!}" /> + <input type="text" name="position" class="guest_normal" size="20" maxlength="255" value="$content[position]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -57,7 +60,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="tax_ident" class="guest_normal" size="20" maxlength="255" value="{!__TAX_IDENT!}" /> + <input type="text" name="tax_ident" class="guest_normal" size="20" maxlength="255" value="$content[tax_ident]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -78,9 +81,9 @@ <td class="seperator" width="10"> </td> <td> <select name="gender" class="guest_select" size="1"> - <option value="M"{!__GENDER_M!}>{--GENDER_M--}</option> - <option value="F"{!__GENDER_F!}>{--GENDER_F--}</option> - <option value="C"{!__GENDER_C!}>{--GENDER_C--}</option> + <option value="M"$content[gender_m]>{--GENDER_M--}</option> + <option value="F"$content[gender_f]>{--GENDER_F--}</option> + <option value="C"$content[gender_c]>{--GENDER_C--}</option> </select> </td> <td class="seperator" width="10"> </td> @@ -93,7 +96,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="surname" class="guest_normal" size="20" maxlength="255" value="{!__SURNAME!}" /> + <input type="text" name="surname" class="guest_normal" size="20" maxlength="255" value="$content[surname]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -105,7 +108,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="family" class="guest_normal" size="20" maxlength="255" value="{!__FAMILY!}" /> + <input type="text" name="family" class="guest_normal" size="20" maxlength="255" value="$content[family]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -125,7 +128,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="street_nr1" class="guest_normal" size="20" maxlength="255" value="{!__STREET1!}" /> + <input type="text" name="street_nr1" class="guest_normal" size="20" maxlength="255" value="$content[street_nr1]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -137,7 +140,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="street_nr2" class="guest_normal" size="20" maxlength="255" value="{!__STREET2!}" /> + <input type="text" name="street_nr2" class="guest_normal" size="20" maxlength="255" value="$content[street_nr2]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -149,8 +152,8 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="country" class="guest_normal" size="2" maxlength="2" value="{!__COUNTRY!}" />-<input type="text" name="zip" class="guest_normal" size="5" maxlength="6" value="{!__ZIP!}" /> - <input type="text" name="city" class="guest_normal" size="10" maxlength="255" value="{!__CITY!}" /> + <input type="text" name="country" class="guest_normal" size="2" maxlength="2" value="$content[country]" />-<input type="text" name="zip" class="guest_normal" size="5" maxlength="6" value="$content[zip]" /> + <input type="text" name="city" class="guest_normal" size="10" maxlength="255" value="$content[city]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -162,7 +165,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="phone" class="guest_normal" size="20" maxlength="255" value="{!__PHONE!}" /> + <input type="text" name="phone" class="guest_normal" size="20" maxlength="255" value="$content[phone]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -174,7 +177,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="fax" class="guest_normal" size="20" maxlength="255" value="{!__FAX!}" /> + <input type="text" name="fax" class="guest_normal" size="20" maxlength="255" value="$content[fax]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -186,7 +189,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="cell" class="guest_normal" size="20" maxlength="255" value="{!__CELL!}" /> + <input type="text" name="cell" class="guest_normal" size="20" maxlength="255" value="$content[cell]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -198,7 +201,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="email" class="guest_normal" size="20" maxlength="255" value="{!__EMAIL!}" /> + <input type="text" name="email" class="guest_normal" size="20" maxlength="255" value="$content[email]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -210,7 +213,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <input type="text" name="url" class="guest_normal" size="20" maxlength="255" value="{!__URL!}" /> + <input type="text" name="url" class="guest_normal" size="20" maxlength="255" value="$content[url]" /> </td> <td class="seperator" width="10"> </td> </tr> @@ -251,7 +254,7 @@ </td> <td class="seperator" width="10"> </td> <td> - <strong>{!__SPONSOR_REFID!}</strong> + <strong>$content[refid]</strong> </td> <td class="seperator" width="10"> </td> </tr> @@ -272,8 +275,8 @@ <td class="seperator" width="10"> </td> <td> <select name="receive_warnings" class="guest_select" size="1"> - <option value="Y"{!__REC_Y!} />{--YES--}</option> - <option value="N"{!__REC_N!} />{--NO--}</option> + <option value="Y"$content[rec_y]>{--YES--}</option> + <option value="N"$content[rec_n]>{--NO--}</option> </select> </td> <td class="seperator" width="10"> </td> @@ -288,12 +291,12 @@ <td> <select name="warning_interval" class="guest_select" size="1"> <option value="0">{--SELECT_NONE--}</option> - <option value="{--({?one_day?}*1)--}">1 {--DAYS--}</option> - <option value="{--({?one_day?}*3)--}">3 {--DAYS--}</option> - <option value="{--({?one_day?}*7)--}" selected="selected">1 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*14)--}">2 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*28)--}">4 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*56)--}">8 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*1)--}">1 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*3)--}">3 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*7)--}" selected="selected">1 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*14)--}">2 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*28)--}">4 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*56)--}">8 {--LIFE_WEEKS--}</option> </select> </td> <td class="seperator" width="10"> </td> @@ -314,7 +317,7 @@ </td> <td class="seperator" width="10"> </td> <td> - {!__PAYMENT_LIST!} + $content[payment_list] </td> <td class="seperator" width="10"> </td> </tr> @@ -342,7 +345,7 @@ <tr> <td class="guest_footer seperator" width="10"> </td> <td class="guest_footer" colspan="3" align="center"> - <input type="hidden" name="refid" value="{!__SPONSOR_REFID!}" /> + <input type="hidden" name="refid" value="$content[refid]" /> <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" /> <input type="submit" name="ok" class="guest_submit" value="{--REGISTER_SPONSOR--}" /> </td> diff --git a/templates/de/html/guest/guest_stats_header.tpl b/templates/de/html/guest/guest_stats_header.tpl new file mode 100644 index 0000000000..c9d86c2898 --- /dev/null +++ b/templates/de/html/guest/guest_stats_header.tpl @@ -0,0 +1,3 @@ +<tr> + <td align="center" class="guest_title2 bottom2" colspan="2">$content</td> +</tr> diff --git a/templates/de/html/guest/guest_stats_member.tpl b/templates/de/html/guest/guest_stats_member.tpl index d6f70e2295..128c1ab9ec 100644 --- a/templates/de/html/guest/guest_stats_member.tpl +++ b/templates/de/html/guest/guest_stats_member.tpl @@ -1,52 +1,54 @@ <div align="center"> -<table border="0" cellspacing="0" cellpadding="0" - class="guest_stats dashed"> +<table border="0" cellspacing="0" cellpadding="0" class="guest_stats dashed"> <tr> <td align="center" class="guest_stats_title bottom2" colspan="6"><strong>{--GUEST_STATS--}</strong></td> </tr> <tr> <td class="guest_stats_l bottom2">{--USERS_TOTAL--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2 right2">{!__TOTAL_USERS!}</td> + <td class="guest_stats_r bottom2 right2">$content[total_users]</td> <td class="guest_stats_l bottom2">{--UNCONFIRMED_USERIDS--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2">{!__UNCONFIRMED!}</td> + <td class="guest_stats_r bottom2">$content[unconfirmed]</td> </tr> <tr> <td class="guest_stats_l bottom2">{--GUEST_STATS_MALES--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2 right2">{!__MALE_COUNT!}</td> + <td class="guest_stats_r bottom2 right2">$content[total_males]</td> <td class="guest_stats_l bottom2">{--GUEST_STATS_FEMALES--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2">{!__FEMALE_COUNT!}</td> + <td class="guest_stats_r bottom2">$content[total_females]</td> </tr> - <!--<tr> - <td class="guest_stats_l bottom2">{--GUEST_STATS_TONLINE--}:</td> - <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2 right2">{!__TMEM_COUNT!}</td> - <td class="guest_stats_l bottom2">{--GUEST_STATS_YONLINE--}:</td> - <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2">{!__YMEM_COUNT!}</td> -</tr>//--> + <!-- + @TODO We have to fix these counters. + <tr> + <td class="guest_stats_l bottom2">{--GUEST_STATS_TONLINE--}:</td> + <td class="guest_stats_m bottom2 right2"> </td> + <td class="guest_stats_r bottom2 right2">$content[tmem_count]</td> + <td class="guest_stats_l bottom2">{--GUEST_STATS_YONLINE--}:</td> + <td class="guest_stats_m bottom2 right2"> </td> + <td class="guest_stats_r bottom2">$content[ymem_count]</td> + </tr> + //--> <tr> <td class="guest_stats_l bottom2">{--GUEST_STATS_TREGISTER--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2 right2">{!__TREG_COUNT!}</td> + <td class="guest_stats_r bottom2 right2">$content[treg_count]</td> <td class="guest_stats_l bottom2">{--GUEST_STATS_YREGISTER--}:</td> <td class="guest_stats_m bottom2 right2"> </td> - <td class="guest_stats_r bottom2">{!__YREG_COUNT!}</td> + <td class="guest_stats_r bottom2">$content[yreg_count]</td> </tr> <tr> <td align="center" class="guest_stats_title bottom2" colspan="6"><strong>{--GUEST_STATS_MONTHLY--}</strong></td> </tr> - {!__MONTH_STATS_ROWS!} + $content[month_rows] <tr> <td align="center" class="guest_stats_title bottom2" colspan="6"><strong>{--GUEST_STATS_CATS--}</strong></td> </tr> - {!__CATS_STATS_ROWS!} + $content[cats_rows] <tr> <td align="center" class="guest_stats_footer" colspan="6"><a - href="{?URL?}/modules.php?module=index&what=stats&mode={!__LMODE_VALUE!}">{!__LINK_TITLE!}</a> + href="{?URL?}/modules.php?module=index&what=stats&mode=$content[lmode]">$content[ltitle]</a> </td> </tr> </table> diff --git a/templates/de/html/guest/guest_stats_row.tpl b/templates/de/html/guest/guest_stats_row.tpl new file mode 100644 index 0000000000..4f0aeb30de --- /dev/null +++ b/templates/de/html/guest/guest_stats_row.tpl @@ -0,0 +1,4 @@ +<tr> + <td class="switch_sw$content[sw] bottom2 right2" align="right" width="250">$content[title] </td> + <td class="switch_sw$content[sw] bottom2" width="50"> $content[counter]</td> +</tr> diff --git a/templates/de/html/guest/guest_stats_table.tpl b/templates/de/html/guest/guest_stats_table.tpl new file mode 100644 index 0000000000..60aa89d711 --- /dev/null +++ b/templates/de/html/guest/guest_stats_table.tpl @@ -0,0 +1,11 @@ +<table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed" width="310"> +<tr> + <td align="center" class="guest_stats_title bottom2" colspan="2"><strong>{--GUEST_TOPTEN_STATS--}</strong></td> +</tr> +$content[rows] +<tr> + <td align="center" class="guest_stats_footer" colspan="2"> + <a href="{?URL?}/modules.php?module=index&what=stats&mode=$content[lmode]">$content[ltitle]</a> + </td> +</tr> +</table> diff --git a/templates/de/html/guest/guest_top10.tpl b/templates/de/html/guest/guest_top10.tpl index efc8de007a..92e85e18ce 100644 --- a/templates/de/html/guest/guest_top10.tpl +++ b/templates/de/html/guest/guest_top10.tpl @@ -3,7 +3,7 @@ class="guest_table dashed"> <tr> <td colspan="5" class="guest_title2 bottom2" height="30"> - <strong>TOP{!__TOP10_MAX!} - Logins</strong> + <strong>TOP{?top10_max?} - Logins</strong> </td> </tr> <tr> @@ -23,7 +23,7 @@ <strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__TOP_LOGINS_ROWS!} + $content[logins_out] <tr> <td colspan="5" align="center" class="guest_footer" height="30"> <div class="member_note tiny">Diese Liste zeigt Ihnen, wer am häufigsten eingeloggt hat.</div> @@ -39,7 +39,7 @@ class="guest_table dashed"> <tr> <td colspan="4" class="guest_title2 bottom2" height="30"> - <strong>TOP{!__TOP10_MAX!} - {?POINTS?}-Verdiener</strong> + <strong>TOP{?top10_max?} - {?POINTS?}-Verdiener</strong> </td> </tr> <tr> @@ -56,7 +56,7 @@ <strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__TOP_POINTS_ROWS!} + $content[points_out] <tr> <td colspan="5" align="center" class="guest_footer" height="30"> <div class="member_note tiny">Diese Liste zeigt Ihnen, wer die meisten {?POINTS?} verdient hat.</div> @@ -72,7 +72,7 @@ class="guest_table dashed"> <tr> <td colspan="5" class="guest_title2 bottom2" height="30"> - <strong>TOP{!__TOP10_MAX!} - Werber</strong> + <strong>TOP{?top10_max?} - Werber</strong> </td> </tr> <tr> @@ -92,7 +92,7 @@ <strong>{--ADMIN_LAST_ONLINE--}:</strong> </td> </tr> - {!__TOP_REFERRAL_ROWS!} + $content[referals_out] <tr> <td colspan="5" align="center" class="guest_footer" height="30"> <div class="member_note tiny">Diese Liste zeigt Ihnen, wer die meisten Mitglieder geworben hat.</div> diff --git a/templates/de/html/guest/guest_top10_empty4.tpl b/templates/de/html/guest/guest_top10_empty4.tpl index e81007ce6e..93ab94de71 100644 --- a/templates/de/html/guest/guest_top10_empty4.tpl +++ b/templates/de/html/guest/guest_top10_empty4.tpl @@ -1,6 +1,5 @@ <tr> - <td class="top10_row1 switch_sw$content[sw] bottom2 right2" - align="center">$content[idx]</td> + <td class="top10_row1 switch_sw$content[sw] bottom2 right2" align="center">$content[index]</td> <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> ---</td> <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> ---</td> <td class="top10_row4 switch_sw$content[sw] bottom2"> ---</td> diff --git a/templates/de/html/guest/guest_top10_empty5.tpl b/templates/de/html/guest/guest_top10_empty5.tpl index 2f870e90d6..f6709deb0a 100644 --- a/templates/de/html/guest/guest_top10_empty5.tpl +++ b/templates/de/html/guest/guest_top10_empty5.tpl @@ -1,6 +1,5 @@ <tr> - <td class="top10_row1 switch_sw$content[sw] bottom2 right2" - align="center">$content[idx]</td> + <td class="top10_row1 switch_sw$content[sw] bottom2 right2" align="center">$content[index]</td> <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> ---</td> <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> ---</td> <td class="top10_row4 switch_sw$content[sw] bottom2 right2"> ---</td> diff --git a/templates/de/html/guest/guest_top10_row_earner.tpl b/templates/de/html/guest/guest_top10_row_earner.tpl index 355c78b138..1cf6642fd6 100644 --- a/templates/de/html/guest/guest_top10_row_earner.tpl +++ b/templates/de/html/guest/guest_top10_row_earner.tpl @@ -1,7 +1,7 @@ <tr> <td class="top10_row1 switch_sw$content[sw] bottom2 right2" align="center">$content[cnt]</td> - <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[uid] ($content[nick])</td> + <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[userid] ($content[nickname])</td> <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> $content[points]</td> - <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> diff --git a/templates/de/html/guest/guest_top10_row_login.tpl b/templates/de/html/guest/guest_top10_row_login.tpl index e1cce8a29f..fb26955d72 100644 --- a/templates/de/html/guest/guest_top10_row_login.tpl +++ b/templates/de/html/guest/guest_top10_row_login.tpl @@ -1,8 +1,7 @@ <tr> - <td class="top10_row1 switch_sw$content[sw] bottom2 right2" - align="center">$content[cnt]</td> - <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[uid] ($content[nick])</td> - <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> $content[logins]</td> + <td class="top10_row1 switch_sw$content[sw] bottom2 right2" align="center">$content[cnt]</td> + <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[userid] ($content[nickname])</td> + <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> $content[total_logins]</td> <td class="top10_row4 switch_sw$content[sw] bottom2 right2"> $content[points]</td> - <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> diff --git a/templates/de/html/guest/guest_top10_row_refs.tpl b/templates/de/html/guest/guest_top10_row_refs.tpl index f03c354d7a..de34b2e4da 100644 --- a/templates/de/html/guest/guest_top10_row_refs.tpl +++ b/templates/de/html/guest/guest_top10_row_refs.tpl @@ -1,8 +1,8 @@ <tr> <td class="top10_row1 switch_sw$content[sw] bottom2 right2" align="center">$content[cnt]</td> - <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[uid] ($content[nick])</td> + <td class="top10_row2 switch_sw$content[sw] bottom2 right2"> $content[userid] ($content[nickname])</td> <td class="top10_row3 switch_sw$content[sw] bottom2 right2"> $content[refs]</td> <td class="top10_row4 switch_sw$content[sw] bottom2 right2"> $content[points]</td> - <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last]</td> + <td class="top10_row5 switch_sw$content[sw] bottom2"> $content[last_online]</td> </tr> diff --git a/templates/de/html/index.tpl b/templates/de/html/index.tpl index c7f45b54b1..d387a32db2 100644 --- a/templates/de/html/index.tpl +++ b/templates/de/html/index.tpl @@ -5,10 +5,9 @@ <td align="center" height="65%"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> - <td align="center"><a target="_parent" - href="{?URL?}/modules.php?module=index&what=welcome"> - <!-- <img src="{!THEME_URL!}/images/index_logo.jpg" alt="{?MAIN_TITLE?}" title="{?MAIN_TITLE?}" border="0"> //--> - <div class="big">{?MAIN_TITLE?}</div> </a></td> + <td align="center"> + <a target="_parent" href="{?URL?}/modules.php?module=index&what=welcome"><div class="big">{?MAIN_TITLE?}</div></a> + </td> </tr> <tr> <td align="center" height="30" class="seperator"> </td> @@ -20,9 +19,10 @@ </td> </tr> <tr> - <td align="center" height="26%"><div class="big">[ <a - target="_parent" - href="{?URL?}/modules.php?module=index&what=welcome">Weiter...</a> ]</div> + <td align="center" height="26%"> + <div class="big"> + [ <a target="_parent" href="{?URL?}/modules.php?module=index&what=welcome">Weiter...</a> ] + </div> </td> </tr> <tr> @@ -38,4 +38,4 @@ href="#" target="_blank">Disclaimer</a>!<br /> </div></td> </tr> -</table> \ No newline at end of file +</table> diff --git a/templates/de/html/index_forward.tpl b/templates/de/html/index_forward.tpl index 5f21c82123..900302beec 100644 --- a/templates/de/html/index_forward.tpl +++ b/templates/de/html/index_forward.tpl @@ -1,10 +1,9 @@ -<SCRIPT language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- -function Load() -{ - window.location.href='{?URL?}/modules.php?module={!__MOD_VALUE!}'; +function Load () { + window.location.href='{?URL?}/modules.php?module=$content[mode]'; } -window.setTimeout("Load()", {!__DELAY_VALUE!}); +window.setTimeout("Load()", $content[delay]); //--> -</SCRIPT> +</script> diff --git a/templates/de/html/install/.htaccess b/templates/de/html/install/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/install/.htaccess +++ b/templates/de/html/install/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/install/install_fatal_errors.tpl b/templates/de/html/install/install_fatal_errors.tpl index fb397fb55c..74f223b752 100644 --- a/templates/de/html/install/install_fatal_errors.tpl +++ b/templates/de/html/install/install_fatal_errors.tpl @@ -1,4 +1,4 @@ -<form action="{!__BURL_ACTION!}/install.php?page=2" method="post"> +<form accept-charset="utf-8" action="{?URL?}/install.php?page=2" method="post"> <table border="0" cellspacing="0" cellpadding="0" class="install_main"> <tr> <td align="center"> @@ -14,12 +14,12 @@ <tr> <td align="center"><strong> <ol> -{!__FATAL_ERROR_LI!} +$content[fatal_errors] </ol> -{!__MYSQL_DATA!} - <input type="hidden" name="spath" value="{!__SPATH_VALUE!}" /> - <input type="hidden" name="burl" value="{!__BURL_VALUE!}" /> - <input type="hidden" name="title" value="{!__TITLE_VALUE!}" /> +$content[mysql_hidden] + <input type="hidden" name="spath" value="$content[spath]" /> + <input type="hidden" name="burl" value="$content[burl]" /> + <input type="hidden" name="title" value="$content[title]" /> <input type="submit" class="admin_submit" name="ok" value="{--RETURN_MYSQL_PAGE--}" /> </strong></td> </tr> diff --git a/templates/de/html/install/install_finished.tpl b/templates/de/html/install/install_finished.tpl index cd24345613..c1a274f632 100644 --- a/templates/de/html/install/install_finished.tpl +++ b/templates/de/html/install/install_finished.tpl @@ -7,7 +7,7 @@ {--INSTALL_FIN_SECU--} </div> -<form action="modules.php" method="get"> +<form accept-charset="utf-8" action="modules.php" method="get"> <input type="hidden" name="module" value="admin" /> <input type="submit" class="admin_submit submit" value="{--CONTINUE_ADMIN--}" /> </form> diff --git a/templates/de/html/install/install_footer.tpl b/templates/de/html/install/install_footer.tpl index 04f5b84499..11f5d85d80 100644 --- a/templates/de/html/install/install_footer.tpl +++ b/templates/de/html/install/install_footer.tpl @@ -1 +1 @@ -</div> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/install/install_header.tpl b/templates/de/html/install/install_header.tpl index a106cbdbd8..11f5d85d80 100644 --- a/templates/de/html/install/install_header.tpl +++ b/templates/de/html/install/install_header.tpl @@ -1,5 +1 @@ -<div class="install_header"> - <strong>: : : {--INSTALLATION--} : : :</strong> -</div> - -<div class="install_main"> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/install/install_main.tpl b/templates/de/html/install/install_main.tpl new file mode 100644 index 0000000000..59adc58d0d --- /dev/null +++ b/templates/de/html/install/install_main.tpl @@ -0,0 +1,7 @@ +<div class="install_header"> + <strong>: : : {--INSTALLATION--} : : :</strong> +</div> + +<div class="install_main"> +$content +</div> diff --git a/templates/de/html/install/install_page1.tpl b/templates/de/html/install/install_page1.tpl index 58a7aa41f7..92fdb6525f 100644 --- a/templates/de/html/install/install_page1.tpl +++ b/templates/de/html/install/install_page1.tpl @@ -1,4 +1,4 @@ -<form action="{!__BURL_ACTION!}/install.php?page=2" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/install.php?page=2" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="install_main"> <tr> <td colspan="3" align="center"> @@ -26,7 +26,7 @@ <tr> <td align="right" class="install">{--BASE_URL--} : ({--BASE_URL_NOTE--})</td> - <td><input type="text" name="burl" size="20" value="{!__BURL_ACTION!}" class="install_normal" /></td> + <td><input type="text" name="burl" size="20" value="{?URL?}" class="install_normal" /></td> </tr> <tr> <td colspan="2" height="10" class="seperator"> </td> diff --git a/templates/de/html/install/install_page2.tpl b/templates/de/html/install/install_page2.tpl index bd7c752108..da49d791f5 100644 --- a/templates/de/html/install/install_page2.tpl +++ b/templates/de/html/install/install_page2.tpl @@ -1,4 +1,4 @@ -<form action="{!__BURL_ACTION--}/install.php?page=3" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/install.php?page=3" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="install_table"> <tr> <td colspan="2" align="center"> @@ -18,7 +18,7 @@ <tr> <td width="50%" align="right" class="install">{--MYSQL_HOST--} : </td> <td width="50%"> - <input type="text" name="mysql[host]" size="25" value="{!__MYSQL_HOST--}" class="install_normal" /> + <input type="text" name="mysql[host]" size="25" value="$content[mysql_host]" class="install_normal" /> </td> </tr> <tr> @@ -27,7 +27,7 @@ <tr> <td width="50%" align="right" class="install">{--MYSQL_DBASE--} : </td> <td width="50%"> - <input type="text" name="mysql[dbase]" size="25" value="{!__MYSQL_DBASE--}" class="install_normal" /> + <input type="text" name="mysql[dbase]" size="25" value="$content[mysql_dbase]" class="install_normal" /> </td> </tr> <tr> @@ -36,7 +36,7 @@ <tr> <td width="50%" align="right" class="install">{--MYSQL_PREFIX--} : </td> <td width="50%"> - <input type="text" name="mysql[prefix]" size="25" value="{!__MYSQL_PREFIX--}" class="install_normal" /> + <input type="text" name="mysql[prefix]" size="25" value="$content[mysql_prefix]" class="install_normal" /> </td> </tr> <tr> @@ -57,7 +57,7 @@ <tr> <td width="50%" align="right" class="install">{--MYSQL_LOGIN--} : </td> <td width="50%"> - <input type="text" name="mysql[login]" size="25" value="{!__MYSQL_LOGIN--}" class="install_normal" /> + <input type="text" name="mysql[login]" size="25" value="$content[mysql_login]" class="install_normal" /> </td> </tr> <tr> @@ -83,11 +83,11 @@ </tr> <tr> <td colspan="2" align="center"> - <input type="hidden" name="spath" value="{!__SPATH_VALUE!}" /> - <input type="hidden" name="burl" value="{!__BURL_VALUE!}" /> - <input type="hidden" name="title" value="{!__TITLE_VALUE!}" /> - <input type="hidden" name="slogan" value="{!__SLOGAN_VALUE!}" /> - <input type="hidden" name="email" value="{!__EMAIL_VALUE!}" /> + <input type="hidden" name="spath" value="$content[spath]" /> + <input type="hidden" name="burl" value="$content[burl]" /> + <input type="hidden" name="title" value="$content[title]" /> + <input type="hidden" name="slogan" value="$content[slogan]" /> + <input type="hidden" name="email" value="$content[email]" /> <input type="submit" class="admin_submit submit" value="{--NEXT_PAGE--}" /> </td> </tr> diff --git a/templates/de/html/install/install_page3.tpl b/templates/de/html/install/install_page3.tpl index d85f7e663e..8bdd4a52bd 100644 --- a/templates/de/html/install/install_page3.tpl +++ b/templates/de/html/install/install_page3.tpl @@ -1,4 +1,4 @@ -<form action="{!__BURL_ACTION--}/install.php?page=5" method="post" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/install.php?page=5" method="post" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="install_table"> <tr> <td colspan="2" align="center"> @@ -18,7 +18,7 @@ <tr> <td width="50%" align="right" class="install">{--TEXT_SMTP_HOST--} : </td> <td width="50%"> - <input type="text" name="smtp_host" size="25" value="{!__SMTP_HOST--}" class="install_normal" /> + <input type="text" name="smtp_host" size="25" value="$content[smtp_host]" class="install_normal" /> </td> </tr> <tr> @@ -27,7 +27,7 @@ <tr> <td width="50%" align="right" class="install">{--TEXT_SMTP_USER--} : </td> <td width="50%"> - <input type="text" name="smtp_user" size="25" value="{!__SMTP_USER--}" class="install_normal" /> + <input type="text" name="smtp_user" size="25" value="$content[smtp_user]" class="install_normal" /> </td> </tr> <tr> @@ -36,7 +36,7 @@ <tr> <td width="50%" align="right" class="install">{--TEXT_SMTP_PASS1--} : </td> <td width="50%"> - <input type="password" name="smtp_pass1" size="25" value="{!__SMTP_PASS1--}" class="install_normal" /> + <input type="password" name="smtp_pass1" size="25" value="$content[smtp_pass1]" class="install_normal" /> </td> </tr> <tr> @@ -45,7 +45,7 @@ <tr> <td width="50%" align="right" class="install">{--TEXT_SMTP_PASS2--} : </td> <td width="50%"> - <input type="password" name="smtp_pass2" size="25" value="{!__SMTP_PASS2--}" class="install_normal" /> + <input type="password" name="smtp_pass2" size="25" value="$content[smtp_pass2]" class="install_normal" /> </td> </tr> <tr> @@ -53,18 +53,18 @@ </tr> <tr> <td colspan="2" align="center"> - <input type="hidden" name="spath" value="{!__SPATH_VALUE!}" /> - <input type="hidden" name="burl" value="{!__BURL_VALUE!}" /> - <input type="hidden" name="title" value="{!__TITLE_VALUE!}" /> - <input type="hidden" name="slogan" value="{!__SLOGAN_VALUE!}" /> - <input type="hidden" name="email" value="{!__EMAIL_VALUE!}" /> - <input type="hidden" name="mysql[host]" value="{!__MYSQL_HOST!}" /> - <input type="hidden" name="mysql[dbase]" value="{!__MYSQL_DBASE!}" /> - <input type="hidden" name="mysql[prefix]" value="{!__MYSQL_PREFIX!}" /> - <input type="hidden" name="mysql[type]" value="{!__TABLE_TYPE!}" /> - <input type="hidden" name="mysql[login]" value="{!__MYSQL_LOGIN!}" /> - <input type="hidden" name="mysql[pass1]" value="{!__MYSQL_PASS1!}" /> - <input type="hidden" name="mysql[pass2]" value="{!__MYSQL_PASS2!}" /> + <input type="hidden" name="spath" value="$content[spath]" /> + <input type="hidden" name="burl" value="$content[burl]" /> + <input type="hidden" name="title" value="$content[title]" /> + <input type="hidden" name="slogan" value="$content[slogan]" /> + <input type="hidden" name="email" value="$content[email]" /> + <input type="hidden" name="mysql[host]" value="$content[mysql_host]" /> + <input type="hidden" name="mysql[dbase]" value="$content[mysql_dbase]" /> + <input type="hidden" name="mysql[prefix]" value="$content[mysql_prefix]" /> + <input type="hidden" name="mysql[type]" value="$content[table_type]" /> + <input type="hidden" name="mysql[login]" value="$content[mysql_login]" /> + <input type="hidden" name="mysql[pass1]" value="$content[mysql_pass1]" /> + <input type="hidden" name="mysql[pass2]" value="$content[mysql_pass2]" /> <input type="submit" class="admin_submit submit" value="{--NEXT_PAGE--}" /> </td> </tr> diff --git a/templates/de/html/install/install_page5.tpl b/templates/de/html/install/install_page5.tpl index 7fa76632ea..9f80c920e7 100644 --- a/templates/de/html/install/install_page5.tpl +++ b/templates/de/html/install/install_page5.tpl @@ -1,8 +1,8 @@ -<form action="{!__BURL_ACTION!}/install.php?page=finalize" method="POST" target="_self"> +<form accept-charset="utf-8" action="{?URL?}/install.php?page=finalize" method="POST" target="_self"> <table border="0" cellspacing="0" cellpadding="0" class="install_main"> <tr> <td colspan="2" align="center"> - <div class="install">{--HEADER_TEXT_PAGE5--}</strong> + <div class="install">{--HEADER_TEXT_PAGE5--}</div> </td> </tr> <tr><td colspan="2" height="21" class="seperator"> </td></tr> @@ -54,16 +54,16 @@ <tr><td colspan="2" height="21" class="seperator"> </td></tr> <tr> <td colspan="2" align="center"> - {!__MYSQL_DATA!} - <input type="hidden" name="spath" value="{!__SPATH_VALUE!}" /> - <input type="hidden" name="burl" value="{!__BURL_VALUE!}" /> - <input type="hidden" name="title" value="{!__TITLE_VALUE!}" /> - <input type="hidden" name="slogan" value="{!__SLOGAN_VALUE!}" /> - <input type="hidden" name="email" value="{!__EMAIL_VALUE!}" /> - <input type="hidden" name="smtp_host" value="{!__SMTP_HOST!}" /> - <input type="hidden" name="smtp_user" value="{!__SMTP_USER!}" /> - <input type="hidden" name="smtp_pass" value="{!__SMTP_PASS!}" /> - <input type="submit" class="admin_submit submit" name="finalize" value="{--NEXT_PAGE--}" class="install_submit" /> + $content[mysql_hidden] + <input type="hidden" name="spath" value="$content[spath]" /> + <input type="hidden" name="burl" value="$content[burl]" /> + <input type="hidden" name="title" value="$content[title]" /> + <input type="hidden" name="slogan" value="$content[slogan]" /> + <input type="hidden" name="email" value="$content[email]" /> + <input type="hidden" name="smtp_host" value="$content[smtp_host]" /> + <input type="hidden" name="smtp_user" value="$content[smtp_user]" /> + <input type="hidden" name="smtp_pass" value="$content[smtp_pass]" /> + <input type="submit" class="admin_submit submit" name="finalize" value="{--NEXT_PAGE--}" /> </td> </tr> <tr><td colspan="2" height="21" class="seperator"> </td></tr> diff --git a/templates/de/html/install/install_welcome.tpl b/templates/de/html/install/install_welcome.tpl index c4e3f4a5a5..7c60ee83eb 100644 --- a/templates/de/html/install/install_welcome.tpl +++ b/templates/de/html/install/install_welcome.tpl @@ -1,11 +1,11 @@ <div class="install_welcome"> - Willkommen zum Installationsscript von MXChange-{?MT_WORD?}, dem - <strong>freien</strong> {?MT_WORD?} powered by MXChange-Community! + Willkommen zum Installationsscript von MXChange-{?mt_word?}, dem + <strong>freien</strong> {?mt_word?} powered by MXChange-Community! </div> <div class="install_text"> - Dieses Script wird Ihnen dabei helfen, den {?MT_WORD?} zu installieren, die - Datenbank einzurichten und den {?MT_WORD?} vorzukonfigurieren. + Dieses Script wird Ihnen dabei helfen, den {?mt_word?} zu installieren, die + Datenbank einzurichten und den {?mt_word?} vorzukonfigurieren. </div> <div class="install_text"> @@ -27,7 +27,7 @@ </div> <div class="install_footer"> - <form action="install.php" method="get" target="_self"> + <form accept-charset="utf-8" action="install.php" method="get" target="_self"> <input type="hidden" name="page" value="1" /> <input type="submit" class="admin_submit submit" value="{--NEXT_PAGE--}" /> </form> diff --git a/templates/de/html/js/.htaccess b/templates/de/html/js/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/js/.htaccess +++ b/templates/de/html/js/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/js/js_order_send.tpl b/templates/de/html/js/js_order_send.tpl new file mode 100644 index 0000000000..939b03f26c --- /dev/null +++ b/templates/de/html/js/js_order_send.tpl @@ -0,0 +1,24 @@ +var counter = document.getElementById('counter'); +var form = document.getElementById('form'); +var ok = document.getElementById('ok'); + +function Submit() { + if (counter.innerHTML > 0) { + alert('{--MEMBER_ORDER_PLEASE_WAIT_TESTER--}'); + return false; + } else { + form.submit(); + } +} + +function Counter() { + if (counter.innerHTML == 1) { + ok.value='{--MEMBER_DO_ORDER--}'; + window.clearInterval(interval); + } + + counter.innerHTML--; +} + +ok.value='{--MEMBER_ORDER_TEST_STARTED--}'; +var interval = window.setInterval("Counter()", 1000); diff --git a/templates/de/html/js/js_surfbar_member_book.tpl b/templates/de/html/js/js_surfbar_member_book.tpl new file mode 100644 index 0000000000..ee0f270cc7 --- /dev/null +++ b/templates/de/html/js/js_surfbar_member_book.tpl @@ -0,0 +1,40 @@ +var limit = document.getElementById('limit'); +var span = document.getElementById('span_limit'); +var old_limit = 0; + +function FocusLimitedNo () { + if ((limit.value > 0) && (limit.value != '-')) { + old_limit = limit.value; + } + limit.disabled = true; + limit.setAttribute('class', 'disabled'); + limit.style.textAlign = 'center'; + limit.value = '-'; +} + +function FocusLimitedYes () { + limit.disabled = false; + limit.setAttribute('class', 'member_normal'); + limit.style.textAlign = 'left'; + if (old_limit > 0) { + limit.value = old_limit; + } else { + limit.value = ''; + } + limit.focus(); +} + +function SubmitForm () { + if (limit.value == '-') { + limit.value = 0; + } + return true; +} + +function ResetForm () { + old_limit = 0; + FocusLimitedNo(); + return true; +} + +FocusLimitedNo(); diff --git a/templates/de/html/js/js_surfbar_member_edit.tpl b/templates/de/html/js/js_surfbar_member_edit.tpl new file mode 100644 index 0000000000..adeeb9c248 --- /dev/null +++ b/templates/de/html/js/js_surfbar_member_edit.tpl @@ -0,0 +1,44 @@ +var limit = document.getElementById('limit'); +var span = document.getElementById('span_limit'); +var old_limit = $content[views_max]; + +function FocusLimitedNo () { + if ((limit.value > 0) && (limit.value != '-')) { + old_limit = limit.value; + } + limit.disabled = true; + limit.setAttribute('class', 'disabled'); + limit.style.textAlign = 'center'; + limit.value = '-'; +} + +function FocusLimitedYes () { + limit.disabled = false; + limit.setAttribute('class', 'member_normal'); + limit.style.textAlign = 'left'; + if (old_limit > 0) { + limit.value = old_limit; + } else { + limit.value = ''; + } + limit.focus(); +} + +function SubmitForm () { + if (limit.value == '-') { + limit.value = 0; + } + return true; +} + +function ResetForm () { + old_limit = 0; + FocusLimitedNo(); + return false; +} + +if ($content[limited] == true) { + FocusLimitedYes(); +} else { + FocusLimitedNo(); +} diff --git a/templates/de/html/js/js_surfbar_stopped.tpl b/templates/de/html/js/js_surfbar_stopped.tpl new file mode 100644 index 0000000000..61025f7adc --- /dev/null +++ b/templates/de/html/js/js_surfbar_stopped.tpl @@ -0,0 +1,33 @@ +var interval = null; +var counter = "$content[restart]"; +var timer = document.getElementById("surfbar_counter"); +var buttonDiv = document.getElementById("surfbar_button"); + +function Restart () { + this.location.reload(); +} + +function ShowButton () { + buttonDiv.innerHTML = "<form accept-charset='utf-8' action='{?URL?}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' id='member_submit' value='Surfbar erneut starten' /></form>"; +} + +function Counter () { + if (counter == 0) { + if ($content[autostart] == true) { + Restart(); + } else { + ShowButton(); + } + window.clearInterval(interval); + } else { + counter--; + timer.innerHTML = counter; + } +} + +function Init () { + interval = window.setInterval("Counter()", 1000); + timer.innerHTML = "$content[restart]"; +} + +window.setTimeout("Init()", 500); diff --git a/templates/de/html/js/js_uberwach.tpl b/templates/de/html/js/js_uberwach.tpl index d6d714183d..f7eb4ef40c 100644 --- a/templates/de/html/js/js_uberwach.tpl +++ b/templates/de/html/js/js_uberwach.tpl @@ -29,7 +29,7 @@ var hint=function(c,i,t){ var d = document.createElement('div'); d.setAttribute('id','au_hi'); - d.setAttribute('class',c); + d.setAttribute('class',c); d.setAttribute('className',c); d.innerHTML = '<p><a href="http://www.uberwach.de/" rel="external" target="_blank" title="Aktion: Ueberwach!"><img src="'+i+'" alt="Aktion UBERWACH!" border="0" /></a>Der Zugriff auf diese Seite wurde '+t+' protokolliert. <a href="http://www.uberwach.de/" rel="external" target="_blank" title="Über die Aktion ÜBERWACH!">Über die Aktion "ÜBERWACH!"</a></p>'; var b = document.body; @@ -45,7 +45,7 @@ return e.style[p]; return false; } - var px=function(v) { + var px=function(v){ var u = v.match(/em|px|ex|in|mm|cm|pt|%|pc/); if(!document.createElement || u=="") return parseInt(v); var d = document.createElement('div'); @@ -61,7 +61,7 @@ return v; } var main = function(){ - addStyles('/uberwach.css'); + addStyles('{?URL?}/css.php'); if (filter()) hint('au_hi_r', 'http://www.uberwach.de/wanze-kamera.gif?'+escape(window.location), 'so eben von der Aktion "ÜBERWACH!"'); else diff --git a/templates/de/html/lead_code.tpl b/templates/de/html/lead_code.tpl index 26711e7981..468b413cf3 100644 --- a/templates/de/html/lead_code.tpl +++ b/templates/de/html/lead_code.tpl @@ -3,7 +3,7 @@ bestätigt!</big></strong><br /> <br /> Vielen Dank für die Bestätigung Ihrer Email-Adresse! Sie können jetzt unten fortfahren.</P> -<!-- lead_uid und lead_email funktionieren //--> +<!-- lead_userid und lead_email funktionieren //--> <!-- LEAD CODE AB HIER! //--> <!-- LEAD CODE BIS HIER! //--> diff --git a/templates/de/html/loader.tpl b/templates/de/html/loader.tpl index b30d73e7d9..85700c74eb 100644 --- a/templates/de/html/loader.tpl +++ b/templates/de/html/loader.tpl @@ -1,20 +1,17 @@ -<big><strong>D E R E F E R R E R - {?MAIN_TITLE?}</strong></big> +<big><strong>D E R E F E R R E R - {?MAIN_TITLE?}</strong></big><br /> <br /> <br /> <br /> <br /> -<br /> -{--LOADER_NOT_WORKING--} [ -<a href="{!__URL!}">{--LOADER_CLICK_HERE--}</a> -] -<SCRIPT language="JavaScript" type="text/javascript"> +{--LOADER_NOT_WORKING--} [<a href="$content">{--LOADER_CLICK_HERE--}</a>] + +<script type="text/javascript"> <!-- -function Loader(URL) -{ +function Loader (URL) { document.location.href = URL; return false; } -setTimeout("Loader('{!__URL!}')", 1000); +setTimeout("Loader('$content')", 1000); //--> -</SCRIPT> \ No newline at end of file +</script> diff --git a/templates/de/html/login_failed_js.tpl b/templates/de/html/login_failed_js.tpl index ed97e82b3b..f6cc086655 100644 --- a/templates/de/html/login_failed_js.tpl +++ b/templates/de/html/login_failed_js.tpl @@ -1,11 +1,9 @@ -<SCRIPT language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- -function Loader() -{ - document.location.href = "{?URL?}/modules.php?module=index&what=login&msg={--CODE_COOKIES_DISABLED--}"; +function Loader() { + document.location.href = "{?URL?}/modules.php?module=index&what=login&code={--CODE_COOKIES_DISABLED--}"; } window.setTimeout("Loader()", 2000); - //--> -</SCRIPT> +</script> diff --git a/templates/de/html/login_failtures.tpl b/templates/de/html/login_failtures.tpl index 7cce8b08c9..11f5d85d80 100644 --- a/templates/de/html/login_failtures.tpl +++ b/templates/de/html/login_failtures.tpl @@ -1,9 +1 @@ -<div style="width:100%" align="center"> -<div class="login_failures"> - <div class="login_failure_header"> - Warnung! - </div> - Letzten <strong>$content[login_failures]</strong> Loginversuche waren - fehlgeschlagen, der letzte war am <strong>$content[last_failure]</strong> -</div> -</div> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/login_failures.tpl b/templates/de/html/login_failures.tpl new file mode 100644 index 0000000000..7cce8b08c9 --- /dev/null +++ b/templates/de/html/login_failures.tpl @@ -0,0 +1,9 @@ +<div style="width:100%" align="center"> +<div class="login_failures"> + <div class="login_failure_header"> + Warnung! + </div> + Letzten <strong>$content[login_failures]</strong> Loginversuche waren + fehlgeschlagen, der letzte war am <strong>$content[last_failure]</strong> +</div> +</div> diff --git a/templates/de/html/mailid/.htaccess b/templates/de/html/mailid/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/mailid/.htaccess +++ b/templates/de/html/mailid/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/mailid/mailid_confirm_buttom.tpl b/templates/de/html/mailid/mailid_confirm_buttom.tpl index f739320e3a..1ea0d3706e 100644 --- a/templates/de/html/mailid/mailid_confirm_buttom.tpl +++ b/templates/de/html/mailid/mailid_confirm_buttom.tpl @@ -2,9 +2,9 @@ <tr> <td width="10" class="seperator"> </td> <td width="220" align="center"> - <form action="{?URL?}/mailid_top.php?uid=$content[uid]&$content[type]=$content[data]&mode=add&code=$content[code]" method="post" style="margin-bottom: 0px"> + <form accept-charset="utf-8" action="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&mode=add&code=$content[code]" method="post" style="margin-bottom: 0px"> {--MAILID_CLICK_BUTTON--}:<br /> - <input type="hidden" name="gfx_check" value="{!$content[gfx]!}" /> + <input type="hidden" name="gfx_check" value="$content[gfx]" /> <input type="submit" class="member_submit" name="ok" value="{--SUBMIT_CODE--}" /> </form> </td> diff --git a/templates/de/html/mailid/mailid_enter_code.tpl b/templates/de/html/mailid/mailid_enter_code.tpl index 9a5ae6c202..6d09c4879f 100644 --- a/templates/de/html/mailid/mailid_enter_code.tpl +++ b/templates/de/html/mailid/mailid_enter_code.tpl @@ -3,8 +3,8 @@ <tr> <td width="10" class="seperator"> </td> <td width="220" align="center"> - <form - action="{?URL?}/mailid_top.php?uid=$content[uid]&$content[type]=$content[data]&mode=add&code={--_CODE_VALUE!}" + <form accept-charset="utf-8" + action="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&mode=add&code={--_CODE_VALUE!}" method="post" style="margin-bottom: 0px">{--ENTER_CODE--}: $content[image]<br /> <input type="text" name="gfx_check" class="member_normal" size="5" diff --git a/templates/de/html/mailid/mailid_frames.tpl b/templates/de/html/mailid/mailid_frames.tpl index 45fe082b93..8be8042831 100644 --- a/templates/de/html/mailid/mailid_frames.tpl +++ b/templates/de/html/mailid/mailid_frames.tpl @@ -1,5 +1,5 @@ <frameset rows="120,*" frameborder="no" framespacing="0" border="0"> - <frame name="mailid_top" src="{?URL?}/mailid_top.php?uid=$content[uid]&$content[type]=$content[data]" /> + <frame name="mailid_top" src="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]" /> <frame name="mailid_url" src="$content[url]" /> </frameset> <noframes> diff --git a/templates/de/html/mailid/mailid_points_done2.tpl b/templates/de/html/mailid/mailid_points_done2.tpl index 1ab66c548f..f25aa0e3f3 100644 --- a/templates/de/html/mailid/mailid_points_done2.tpl +++ b/templates/de/html/mailid/mailid_points_done2.tpl @@ -1,20 +1,19 @@ <!-- Template fuer Bestaetigung mit Turbo-Click Bonus --> -<table border="0" cellspacing="0" cellpadding="0" - class="member_mailidtop"> +<table border="0" cellspacing="0" cellpadding="0" class="member_mailidtop"> <tr> <td width="10" class="seperator"> </td> - <td width="220" align="center"><div class="tiny"> - {--THANX_POINTS_ADDED_1--}<span class="member_done">$content[points]</span> {--THANX_POINTS_ADDED_2--}<br /> - {--MAILID_TOTAL_POINTS1--} <span class="member_done">$content[total] - {?POINTS?}</span> {--MAILID_TOTAL_POINTS2--}<br /> - <br /> - <a - href="{?URL?}/show_bonus.php?uid=$content[uid]&t=$content[type]&d=$content[data]" - target="_blank">{--BONUS_SHOW_TURBO_BONUS--} </span></td> + <td width="220" align="center"> + <div class="tiny"> + {--THANX_POINTS_ADDED_1--}<span class="member_done">$content[points]</span> {--THANX_POINTS_ADDED_2--}<br /> + {--MAILID_TOTAL_POINTS1--} <span class="member_done">$content[total] + {?POINTS?}</span> {--MAILID_TOTAL_POINTS2--}<br /> + <br /> + <a href="{?URL?}/show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[data]" target="_blank">{--BONUS_SHOW_TURBO_BONUS--} + </div> + </td> <td width="10" class="seperator"> </td> <td align="center"> - <table border="0" cellspacing="0" cellpadding="0" - class="member_banner dashed"> + <table border="0" cellspacing="0" cellpadding="0" class="member_banner dashed"> <tr> <td height="3" class="seperator"> </td> </tr> diff --git a/templates/de/html/mailid/mailid_points_lcoked2.tpl b/templates/de/html/mailid/mailid_points_lcoked2.tpl index 0562e28f1f..11f5d85d80 100644 --- a/templates/de/html/mailid/mailid_points_lcoked2.tpl +++ b/templates/de/html/mailid/mailid_points_lcoked2.tpl @@ -1 +1 @@ -DELETE ME! +<!-- @DEPRECATED //--> diff --git a/templates/de/html/mailid/mailid_points_locked2.tpl b/templates/de/html/mailid/mailid_points_locked2.tpl index 406278c2af..c6442eb003 100644 --- a/templates/de/html/mailid/mailid_points_locked2.tpl +++ b/templates/de/html/mailid/mailid_points_locked2.tpl @@ -1,18 +1,17 @@ <!-- Template fuer Bestaetigung mit Turbo-Click Bonus --> -<table border="0" cellspacing="0" cellpadding="0" - class="member_mailidtop"> +<table border="0" cellspacing="0" cellpadding="0" class="member_mailidtop"> <tr> <td width="10" class="seperator"> </td> - <td width="220" align="center"><div class="tiny"> - {--THANX_POINTS_LOCKED_1--}<span class="member_done">$content[points]</span> {--THANX_POINTS_LOCKED_2--}<br /> - <br /> - <a - href="{?URL?}/show_bonus.php?uid=$content[uid]&t=$content[type]&d=$content[data]" - target="_blank">{--BONUS_SHOW_TURBO_BONUS--} </span></td> + <td width="220" align="center"> + <div class="tiny"> + {--THANX_POINTS_LOCKED_1--}<span class="member_done">$content[points]</span> {--THANX_POINTS_LOCKED_2--}<br /> + <br /> + <a href="{?URL?}/show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[data]" target="_blank">{--BONUS_SHOW_TURBO_BONUS--} + </div> + </td> <td width="10" class="seperator"> </td> <td align="center"> - <table border="0" cellspacing="0" cellpadding="0" - class="member_banner dashed"> + <table border="0" cellspacing="0" cellpadding="0" class="member_banner dashed"> <tr> <td height="3" class="seperator"> </td> </tr> @@ -25,5 +24,5 @@ </table> </td> <td width="10" class="seperator"> </td> - </tr[5~> + </tr> </table> \ 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 f4d2d3d47b..e2ffa5a562 100644 --- a/templates/de/html/mailid/mailid_timer.tpl +++ b/templates/de/html/mailid/mailid_timer.tpl @@ -1,6 +1,6 @@ -<SCRIPT language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- -var Timer = "{!_TIME_VALUE!}"; +var Timer = "$content[time]"; function Init() { var Counter = window.setInterval("StartCounter()", 1000); @@ -14,25 +14,23 @@ function StartCounter() { Timer--; document.confirm.counter.value = Timer; if (Timer == 0) { - document.location.href="{?URL?}/mailid_top.php?uid=$content[uid]&$content[type]=$content[data]&mode=confirm&code=$content[rand]"; + document.location.href="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&mode=confirm&code=$content[rand]"; clearInterval(Counter); } } //--> -</SCRIPT> -<table border="0" cellspacing="0" cellpadding="0" - class="member_mailidtop"> +</script> +<table border="0" cellspacing="0" cellpadding="0" class="member_mailidtop"> <tr> <td width="10" class="seperator"> </td> <td width="220" align="center"> - <table border="0" cellspacing="0" cellpadding="0" width="200" - class="member_confirm dashed"> + <table border="0" cellspacing="0" cellpadding="0" width="200" class="member_confirm dashed"> <tr> <td height="3" class="seperator"> </td> </tr> <tr> <td align="center"> - <form name="confirm" style="margin-top: 0px; margin-bottom: 0px"> + <form accept-charset="utf-8" name="confirm" style="margin-top: 0px; margin-bottom: 0px"> {--MEMBER_TIME_COUNTER_1--} <input type="text" name="counter" size="$content[tim2]" readonly class="member_normal" value="$content[time]"> {--_SECONDS--} @@ -62,9 +60,9 @@ function StartCounter() { <td width="10" class="seperator"> </td> </tr> </table> -<SCRIPT language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- document.confirm.counter.value = Timer; Init(); //--> -</SCRIPT> \ No newline at end of file +</script> diff --git a/templates/de/html/mediadata.tpl b/templates/de/html/mediadata.tpl index 35abc0c242..d9560f0feb 100644 --- a/templates/de/html/mediadata.tpl +++ b/templates/de/html/mediadata.tpl @@ -1,5 +1,4 @@ -<table border="0" cellspacing="0" cellpadding="0" width="430" - class="mediadata dashed"> +<table border="0" cellspacing="0" cellpadding="0" width="430" class="mediadata dashed"> <tr> <td class="media_header bottom seperator" width="10"> </td> <td class="media_header bottom" colspan="3" align="center">{--MEDIA_DATA_GENERAL--}</td> @@ -9,13 +8,13 @@ <td class="bottom seperator" width="10" rowspan="2"> </td> <td class="bottom media_left" align="right">{--USER_MT_START--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__MT_START!}</td> + <td class="bottom media_right">$content[mt_start]</td> <td class="bottom seperator" width="10" rowspan="2"> </td> </tr> <tr> <td class="bottom medium" colspan="3" align="center"> - {--USER_MT_PROJECTED_1--}{!__MT_PROJECTED!} - {--USER_MT_PROJECTED_2--}{!__MT_STAGE!} {--USER_MT_PROJECTED_3--}</td> + {--USER_MT_PROJECTED_1--}$content[projected]{--USER_MT_PROJECTED_2--}{?__MT_STAGE?} {--USER_MT_PROJECTED_3--} + </td> </tr> <tr> <td class="media_header bottom seperator" width="10"> </td> @@ -23,38 +22,38 @@ <td class="media_header bottom seperator" width="10"> </td> </tr> <tr> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_USER!}"> </td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_user]"> </td> <td class="bottom media_left" align="right">{--USERS_TOTAL--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_count!}</td> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_USER!}"> </td> + <td class="bottom media_right">$content[user_count]</td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_user]"> </td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_CONFIRMED--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_confirmed!}</td> + <td class="bottom media_right">$content[user_confirmed]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_UNCONFIRMED--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_unconfirmed!}</td> + <td class="bottom media_right">$content[user_unconfirmed]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_LOCKED--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_locked!}</td> + <td class="bottom media_right">$content[user_locked]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_MAX_MAILS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_max_mails!}</td> + <td class="bottom media_right">$content[user_max_mails]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_REC_PER_DAY--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_max_rec!}</td> + <td class="bottom media_right">$content[user_max_rec]</td> </tr> - {!__USER_MEDIADATA!} + $content[out_user] <tr> <td class="media_header bottom seperator" width="10"> </td> <td class="media_header bottom" colspan="3" align="center">{--MEDIA_DATA_MAIL--}</td> @@ -64,33 +63,33 @@ <td class="bottom seperator" width="10" rowspan="6"> </td> <td class="bottom media_left" align="right">{--USERS_STATS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_stats!}</td> + <td class="bottom media_right">$content[user_stats]</td> <td class="bottom seperator" width="10" rowspan="6"> </td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_MAX_PER_DAY--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!max!}</td> + <td class="bottom media_right">$content[max]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_MAX_REC--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!rec!}</td> + <td class="bottom media_right">$content[rec]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_SENT_MAILS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!sent!}</td> + <td class="bottom media_right">$content[sent]</td> </tr> <tr> <td class="bottom media_left" align="right">{--USERS_LINKS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!user_links!}</td> + <td class="bottom media_right">$content[user_links]</td> </tr> <tr> <td class="bottom media_left" align="right">{--CLICK_RATE--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!_clr!}</td> + <td class="bottom media_right">$content[_clr]</td> </tr> <tr> <td class="media_header bottom seperator" width="10"> </td> @@ -98,18 +97,18 @@ <td class="media_header bottom seperator" width="10"> </td> </tr> <tr> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_POINTS!}"> </td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_points]"> </td> <td class="bottom media_left" align="right">{--JACKPOT_POINTS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!jackpot!}</td> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_POINTS!}"> </td> + <td class="bottom media_right">$content[jackpot]</td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_points]"> </td> </tr> <tr> <td class="bottom media_left" align="right">{--TOTAL_POINTS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__TOTAL_POINTS!}</td> + <td class="bottom media_right">$content[total_points]</td> </tr> - {!__POINTS_MEDIADATA!} + $content[out_points] <tr> <td class="media_header bottom seperator" width="10"> </td> <td class="media_header bottom" colspan="3" align="center">{--MEDIA_DATA_REFBANNER--}</td> @@ -119,18 +118,18 @@ <td class="bottom seperator" width="10" rowspan="3"> </td> <td class="bottom media_left" align="right">{--TOTAL_REF_BANNER--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__REF_TOTAL!}</td> + <td class="bottom media_right">$content[ref_total]</td> <td class="bottom seperator" width="10" rowspan="3"> </td> </tr> <tr> <td class="bottom media_left" align="right">{--TOTAL_REF_VIEWS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__REF_VIEWS!}</td> + <td class="bottom media_right">$content[ref_views]</td> </tr> <tr> <td class="bottom media_left" align="right">{--TOTAL_REF_CLICKS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__REF_CLICKS!}</td> + <td class="bottom media_right">$content[ref_clicks]</td> </tr> <tr> <td class="media_header bottom seperator" width="10"> </td> @@ -138,18 +137,19 @@ <td class="media_header bottom seperator" width="10"> </td> </tr> <tr> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_EXTRA!}"> </td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_extra]"> </td> <td class="bottom media_left" align="right">{--TOTAL_REFCLICKS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__TOTAL_REFCLICKS!}</td> - <td class="bottom seperator" width="10" rowspan="{!__ROWSPAN_EXTRA!}"> </td> + <td class="bottom media_right">$content[total_refclicks]</td> + <td class="bottom seperator" width="10" rowspan="$content[rowspan_extra]"> </td> </tr> <tr> <td class="bottom media_left" align="right">{--TOTAL_LOGINS--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__TOTAL_LOGINS!}</td> + <td class="bottom media_right">$content[total_logins]</td> </tr> - {!__EXTRA_MEDIADATA!} {!__SPECIAL_MEDIADATA!} + $content[out_extra] + $content[out_special] <tr> <td class="media_header bottom seperator" width="10"> </td> <td class="media_header bottom" colspan="3" align="center">{--MEDIA_DATA_SCRIPT--}</td> @@ -170,12 +170,12 @@ <tr> <td class="bottom media_left" align="right">{--ENGINE_PATCH_LEVEL--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__PATCH_LEVEL!}</td> + <td class="bottom media_right">{?patch_level?}</td> </tr> <tr> <td class="bottom media_left" align="right">{--ENGINE_PATCH_CTIME--}:</td> <td class="bottom seperator" width="10"> </td> - <td class="bottom media_right">{!__PATCH_CTIME!}</td> + <td class="bottom media_right">$content[patch_ctime]</td> </tr> <tr> <td class="media_header" colspan="5"><div class="tiny">[ <strong><a diff --git a/templates/de/html/member/.htaccess b/templates/de/html/member/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/member/.htaccess +++ b/templates/de/html/member/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/member/member_beg.tpl b/templates/de/html/member/member_beg.tpl index 3ddc5637f4..59bf176307 100644 --- a/templates/de/html/member/member_beg.tpl +++ b/templates/de/html/member/member_beg.tpl @@ -7,7 +7,7 @@ <tr> <td align="center" class="beg_msg" height="60"> {--BEG_MEMBER_YOUR_LINK--}:<br /> - <strong><a href="{?URL?}/beg.php?uid={!__BEG_UID!}">{?URL?}/beg.php?uid={!__BEG_UID!}</a></strong> + <strong><a href="{?URL?}/beg.php?userid=$content[userid]">{?URL?}/beg.php?userid=$content[userid]</a></strong> </td> </tr> <tr> @@ -16,7 +16,7 @@ <tr> <td align="center" class="beg_msg" height="60"> {--BEG_MEMBER_CLICKS_TOTAL--}:<br /> - <strong>{!__BEG_CLICKS!}</strong></td> + <strong>$content[clicks]</strong></td> </tr> <tr> <td height="5" class="seperator"> </td> @@ -26,10 +26,10 @@ </tr> <tr> <td align="left" class="beg_msg"> - <P>{--BEG_MEMBER_EARN_1--} <strong>{!__BEG_POINTS!} - {?POINTS?}</strong> {--BEG_MEMBER_EARN_2--} <strong>{!__BEG_POINTS_MAX!} + <P>{--BEG_MEMBER_EARN_1--} <strong>$content[points] + {?POINTS?}</strong> {--BEG_MEMBER_EARN_2--} <strong>$content[points_max] {?POINTS?}</strong> {--BEG_MEMBER_EARN_3--}</P> - <P>{--BEG_MEMBER_TIMEOUT_1--} <strong>{!__BEG_TIMEOUT!}</strong> + <P>{--BEG_MEMBER_TIMEOUT_1--} <strong>$content[timeout]</strong> {--BEG_MEMBER_TIMEOUT_2--}</P> <P align="right">{--BEG_MEMBER_HAVE_FUN--}</P> </td> diff --git a/templates/de/html/member/member_bonus.tpl b/templates/de/html/member/member_bonus.tpl index 56e4fab791..725a30e008 100644 --- a/templates/de/html/member/member_bonus.tpl +++ b/templates/de/html/member/member_bonus.tpl @@ -9,7 +9,7 @@ <td width="100" align="center" class="member_header bottom2"><strong>{?POINTS?}:</strong></td> <td width="220" align="center" class="member_header bottom2"><strong>{--ADMIN_LAST_ONLINE--}:</strong></td> </tr> - {!__BONUS_ROWS!} + $content[rows] <tr> <td colspan="4" class="member_footer" align="center" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px"> @@ -30,7 +30,7 @@ <ol align="left"> <li class="tiny">Es werden nur aktive und freigeschaltete Mitglieder berücksichtig.</li> <li class="tiny">Der Login-Bonus wird bei der Auswertung nicht beachtet, aber dem Mitglied gutgeschrieben.</li> - <li class="tiny">Es kann jeder dran teilnehmen, der Mitglied bei diesem {?MT_WORD?} (<strong>{--MAIN_TITLE--}</strong>) und freigegeben ist.</li> + <li class="tiny">Es kann jeder dran teilnehmen, der Mitglied bei diesem {?mt_word?} (<strong>{?MAIN_TITLE?}</strong>) und freigegeben ist.</li> <li class="tiny">Zur Erstellung des Rallye-Ergebnisses wird nur die Aktiv-Vergütung berücksichtig, welche Sie beim Bestätigen von Mails erhalten können."</li> <li class="tiny">Der Rechtsweg ist ausgeschlossen.</li> </ol> diff --git a/templates/de/html/member/member_bonus_row.tpl b/templates/de/html/member/member_bonus_row.tpl index bd8f14505d..7d80cc4093 100644 --- a/templates/de/html/member/member_bonus_row.tpl +++ b/templates/de/html/member/member_bonus_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2">$content[cnt]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[uid]</td> + <td align="center" class="switch_sw$content[sw] bottom2">$content[userid]</td> <td align="center" class="switch_sw$content[sw] bottom2">$content[points]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[last]</td> + <td align="center" class="switch_sw$content[sw] bottom2">$content[last_online]</td> </tr> diff --git a/templates/de/html/member/member_cat_row.tpl b/templates/de/html/member/member_cat_row.tpl index eabaeb6295..fe12473753 100644 --- a/templates/de/html/member/member_cat_row.tpl +++ b/templates/de/html/member/member_cat_row.tpl @@ -7,5 +7,5 @@ class="member_normal" value="N"$content[jn]></td> </tr> <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="3" height="2" class="seperator"> </td> </tr> diff --git a/templates/de/html/member/member_cats_header.tpl b/templates/de/html/member/member_cats_header.tpl index 25c5eed57f..5b71a38181 100644 --- a/templates/de/html/member/member_cats_header.tpl +++ b/templates/de/html/member/member_cats_header.tpl @@ -1,15 +1,15 @@ -<form action="{?URL?}/modules.php?module=login&what=categories" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=categories" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="member_main dashed"> <tr> - <td colspan="5" height="5" class="seperator"></td> + <td colspan="5" height="5" class="seperator"> </td> </tr> <tr> - <td width="5" class="seperator" rowspan="{!__ROWS!}"> </td> + <td width="5" class="seperator" rowspan="$content[rows]"> </td> <td align="center" class="member_header" width="408"><strong>{--CATNAME--}</strong></td> <td width="2" class="seperator"> </td> <td align="center" class="member_header" width="180"><strong>{--SELECT_CAT--}</strong></td> - <td width="5" class="seperator" rowspan="{!__ROWS!}"> </td> + <td width="5" class="seperator" rowspan="$content[rows]"> </td> </tr> <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="3" height="5" class="seperator"> </td> </tr> diff --git a/templates/de/html/member/member_doubler.tpl b/templates/de/html/member/member_doubler.tpl index 3b6182a363..dc470253d2 100644 --- a/templates/de/html/member/member_doubler.tpl +++ b/templates/de/html/member/member_doubler.tpl @@ -1,19 +1,19 @@ <div align="center">{--DOUBLER_MEMBER_YOUR_LINK--}:<br /> -<strong><a href="{?URL?}/doubler.php?refid={!__USERID!}">{?URL?}/doubler.php?refid={!__USERID!}</a></strong><br /> +<strong><a href="{?URL?}/doubler.php?refid=$content[userid]">{?URL?}/doubler.php?refid=$content[userid]</a></strong><br /> <br /> -{--DOUBLER_MEMBER_LINK_NOTE--}</div> +<strong>Tipp:</strong> Nutzen Sie diesen zum Werben unseres {?mt_word2?}, um die <strong>$content[ref]%</strong> Referal-Vergütung zu erhalten!</div> -<div align="center"><div class="big">{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:</strong><br /> +<div align="center"><div class="big">{--DOUBLER_MEMBER_ALREADY_PAYOUT--}:</div><br /> <br /> -{!__DOUBLER_PAYOUT_HISTORY!}</div> +$content[payout_history]</div> -<div align="center"><div class="big">{--DOUBLER_MEMBER_NEXT_PAYOUT--}:</strong><br /> +<div align="center"><div class="big">{--DOUBLER_MEMBER_NEXT_PAYOUT--}:</div><br /> <br /> -{!__DOUBLER_PAYOUT_NEXT!}</div> +$content[next_table]</div> -<div align="center"><div class="big">{--DOUBLER_MEMBER_REF_PAYOUT--}:</strong><br /> +<div align="center"><div class="big">{--DOUBLER_MEMBER_REF_PAYOUT--}:</div><br /> <br /> -{!__DOUBLER_PAYOUT_REF!}</div> +$content[payout_ref]</div> <div align="center"> <table border="0" cellspacing="0" cellpadding="0" class="doubler_table dashed"> @@ -25,23 +25,22 @@ <td class="doubler_main bottom2" style="padding-left: 0px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px"> <ul> - - <li>{--DOUBLER_MINIMUM_IS--} <strong>{!__MIN_VALUE!} - {?POINTS?}</strong> {--DOUBLER_MAXIMUM_IS--} <strong>{!__MAX_VALUE!} + <li>{--DOUBLER_MINIMUM_IS--} <strong>$content[min] + {?POINTS?}</strong> {--DOUBLER_MAXIMUM_IS--} <strong>$content[max] {?POINTS?}</strong></li> - <li>{--DOUBLER_ALREADY_PAYED_1--} <strong>{!__TOTAL_VALUE!} + <li>{--DOUBLER_ALREADY_PAYED_1--} <strong>$content[total] {?POINTS?}</strong> {--DOUBLER_ALREADY_PAYED_2--}</li> - <li>{--DOUBLER_POINTS_LEFT_1--} <strong>{!__LEFT_VALUE!} + <li>{--DOUBLER_POINTS_LEFT_1--} <strong>$content[left] {?POINTS?}</strong> {--DOUBLER_POINTS_LEFT_2--}</li> - <li>{--DOUBLER_USAGE_COUNTER_1--} <strong>{!__DOUBLER_COUNTER!}</strong> + <li>{--DOUBLER_USAGE_COUNTER_1--} <strong>{?doubler_counter?}</strong> {--DOUBLER_USAGE_COUNTER_2--}</li> - <li>{!DOUBLER_PAYOUT_TIME!}</li> + <li>$content[payout_time]</li> <li><strong>{--DOUBLER_FULL_PAYOUT--}</strong></li> - <li>{--DOUBLER_POINTS_1--} <strong>{!__CHARGE_VALUE!}%</strong> + <li>{--DOUBLER_POINTS_1--} <strong>$content[charge]%</strong> {--DOUBLER_POINTS_2--}</li> <li>{--DOUBLER_EXAMPLE_1--} <strong>500 {?POINTS?}</strong> »» {--DOUBLER_EXAMPLE_2--} <strong>1000 {?POINTS?}</strong>{--DOUBLER_EXAMPLE_3--}</li> - <li>{--DOUBLER_REFERRAL_1--} <strong>{!__REF_VALUE!}%</strong> + <li>{--DOUBLER_REFERRAL_1--} <strong>$content[ref]%</strong> {--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--} {--DOUBLER_REFERRAL_4--} <li>{--DOUBLER_REFERRAL_5--} <strong>100 {?POINTS?}</strong> @@ -49,7 +48,7 @@ {--DOUBLER_REFERRAL_8--} <strong>300 {?POINTS?}</strong> {--DOUBLER_REFERRAL_8--}</li> <li>{--DOUBLER_REFERRAL_LINK--}</li> - <li>{--DOUBLER_TIMEOUT_1--} <strong>{!__TIMEOUT_MARK!}</strong> + <li>{--DOUBLER_TIMEOUT_1--} <strong>$content[timeout_mark]</strong> {--DOUBLER_TIMEOUT_2--}</li> <li>{--DOUBLER_HAVE_FUN--}</li> </ul> diff --git a/templates/de/html/member/member_doubler_list_rows.tpl b/templates/de/html/member/member_doubler_list_rows.tpl index fd3b27cb6c..13e393bcaa 100644 --- a/templates/de/html/member/member_doubler_list_rows.tpl +++ b/templates/de/html/member/member_doubler_list_rows.tpl @@ -1,6 +1,6 @@ <tr> <td class="switch_sw$content[sw] bottom2 right2" align="center" - width="100">$content[uid]</td> + width="100">$content[userid]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center" width="100">$content[rid]</td> <td class="switch_sw$content[sw] bottom2 right2" align="center" diff --git a/templates/de/html/member/member_holiday_deactivate.tpl b/templates/de/html/member/member_holiday_deactivate.tpl index 0875b60035..891cd0a37f 100644 --- a/templates/de/html/member/member_holiday_deactivate.tpl +++ b/templates/de/html/member/member_holiday_deactivate.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=holiday" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=holiday" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> <td colspan="3" align="center" class="bottom member_title2" @@ -11,7 +11,7 @@ <tr> <td align="right" width="50%">{--HOLIDAY_MEMBER_TSTART--}:</td> <td width="10" class="seperator"> </td> - <td align="center" width="50%">{!__HOLIDAY_START!}</td> + <td align="center" width="50%">$content[start]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -19,7 +19,7 @@ <tr> <td align="right">{--HOLIDAY_MEMBER_TEND--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__HOLIDAY_END!}</td> + <td align="center">$content[end]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -27,7 +27,7 @@ <tr> <td align="right">{--HOLIDAY_MEMBER_TLOCK--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{!__HOLIDAY_LOCK!}</td> + <td align="center">$content[lock]</td> </tr> <tr> <td colspan="3" class="seperator bottom" height="5"> </td> diff --git a/templates/de/html/member/member_holiday_form.tpl b/templates/de/html/member/member_holiday_form.tpl index dd3f865922..4a1dcb1dc8 100644 --- a/templates/de/html/member/member_holiday_form.tpl +++ b/templates/de/html/member/member_holiday_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=holiday" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=holiday" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> <td colspan="3" align="center" class="bottom member_title2" @@ -10,8 +10,8 @@ <tr> <td align="right">{--HOLIDAY_MEMBER_TSTART--}:</td> <td width="10" class="seperator"> </td> - <td align="center">{--_START_DAY--}. {--_START_MONTH--}. - {--_START_YEAR--}</td> + <td align="center">$content[start_day]. $content[start_month]. + $content[start_year]</td> </tr> <tr> <td colspan="3" class="seperator" height="5"> </td> @@ -30,7 +30,7 @@ </tr> <tr> <td colspan="3" align="center"> - <span class="member_note">{--HOLIDAY_MAX_DAYS_1--}<strong>{!__HOLIDAY_MAX!}</strong>{--HOLIDAY_MAX_DAYS_2--}</span> + <span class="member_note">{--HOLIDAY_MAX_DAYS_1--}<strong>{?holiday_max?}</strong>{--HOLIDAY_MAX_DAYS_2--}</span> </td> </tr> <tr> diff --git a/templates/de/html/member/member_html_mail_settings.tpl b/templates/de/html/member/member_html_mail_settings.tpl index f644313c22..0b55359c2b 100644 --- a/templates/de/html/member/member_html_mail_settings.tpl +++ b/templates/de/html/member/member_html_mail_settings.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=html_mail" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=html_mail" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> <td align="center" colspan="2" class="member_title2 bottom2" diff --git a/templates/de/html/member/member_list_beg.tpl b/templates/de/html/member/member_list_beg.tpl index ceae2b1a3f..bc123e557c 100644 --- a/templates/de/html/member/member_list_beg.tpl +++ b/templates/de/html/member/member_list_beg.tpl @@ -1,4 +1,4 @@ -<P align="center"><strong>{--BEG_MEMBER_HERE_IS_THE_LIST--}</strong><br /> +<div align="center"><strong>{--BEG_MEMBER_HERE_IS_THE_LIST--}</strong><br /> <br /> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> @@ -7,7 +7,7 @@ <td width="100" align="center" class="member_header bottom2"><strong>{--BEG_POINTS--}:</strong></td> <td width="220" align="center" class="member_header bottom2"><strong>{--ADMIN_LAST_ONLINE--}:</strong></td> </tr> - {!__BEG_ROWS!} + $content[rows] <tr> <td colspan="4" class="member_footer" align="center" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px"> @@ -41,4 +41,4 @@ </td> </tr> </table> -</P> +</div> diff --git a/templates/de/html/member/member_list_beg_row.tpl b/templates/de/html/member/member_list_beg_row.tpl index bd8f14505d..7d80cc4093 100644 --- a/templates/de/html/member/member_list_beg_row.tpl +++ b/templates/de/html/member/member_list_beg_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom2">$content[cnt]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[uid]</td> + <td align="center" class="switch_sw$content[sw] bottom2">$content[userid]</td> <td align="center" class="switch_sw$content[sw] bottom2">$content[points]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[last]</td> + <td align="center" class="switch_sw$content[sw] bottom2">$content[last_online]</td> </tr> diff --git a/templates/de/html/member/member_login_js.tpl b/templates/de/html/member/member_login_js.tpl index afeb101c07..3185272eb4 100644 --- a/templates/de/html/member/member_login_js.tpl +++ b/templates/de/html/member/member_login_js.tpl @@ -1,4 +1,4 @@ -<SCRIPT language="JavaScript" type="text/javascript"> +<SCRIPT type="text/javascript"> <!-- function Loader() { diff --git a/templates/de/html/member/member_mail_bonus_deleted.tpl b/templates/de/html/member/member_mail_bonus_deleted.tpl index af449101ac..a9b7cb137f 100644 --- a/templates/de/html/member/member_mail_bonus_deleted.tpl +++ b/templates/de/html/member/member_mail_bonus_deleted.tpl @@ -7,7 +7,6 @@ <tr> <td width="45%" align="center" class="bottom right"><strong>{--CONFIRM_LINK--}:</strong></td> <td width="55%" align="center" class="bottom"><em>{--EMAIL_STATUS_DELETED--}</em></td> - </td> </tr> <tr> <td align="center" class="bottom right"><strong>{--EMAIL_SENDER--}:</strong></td> diff --git a/templates/de/html/member/member_mail_bonus_send.tpl b/templates/de/html/member/member_mail_bonus_send.tpl index 57c354087c..baab0f5fa2 100644 --- a/templates/de/html/member/member_mail_bonus_send.tpl +++ b/templates/de/html/member/member_mail_bonus_send.tpl @@ -7,7 +7,7 @@ <tr> <td width="45%" align="center" class="bottom right"><strong>{--CONFIRM_LINK--}:</strong></td> <td width="55%" align="center" class="bottom"> - [<a href="{?URL?}/mailid.php?uid=$content[uid]&bonusid=$content[id]" + [<a href="{?URL?}/mailid.php?userid=$content[userid]&bonusid=$content[id]" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>] </td> </tr> diff --git a/templates/de/html/member/member_mail_normal_send.tpl b/templates/de/html/member/member_mail_normal_send.tpl index 638b7387f0..3ff1d30d5c 100644 --- a/templates/de/html/member/member_mail_normal_send.tpl +++ b/templates/de/html/member/member_mail_normal_send.tpl @@ -7,7 +7,7 @@ <tr> <td width="45%" align="center" class="bottom right"><strong>{--CONFIRM_LINK--}:</strong></td> <td width="55%" align="center" class="bottom"> - [<a href="{?URL?}/mailid.php?uid=$content[uid]&mailid=$content[id]" + [<a href="{?URL?}/mailid.php?userid=$content[userid]&mailid=$content[id]" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>] </td> </tr> diff --git a/templates/de/html/member/member_mydata_button.tpl b/templates/de/html/member/member_mydata_button.tpl index 1021c56113..09df53aa0f 100644 --- a/templates/de/html/member/member_mydata_button.tpl +++ b/templates/de/html/member/member_mydata_button.tpl @@ -1,3 +1,3 @@ -<form action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-bottom: 0px"> <input type="submit" name="edit" class="member_reset" value="{--MEMBER_EDIT_PROFILE--}" /> </form> diff --git a/templates/de/html/member/member_mydata_edit.tpl b/templates/de/html/member/member_mydata_edit.tpl index cf41621240..3ee91dd1f4 100644 --- a/templates/de/html/member/member_mydata_edit.tpl +++ b/templates/de/html/member/member_mydata_edit.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="530" class="member_main dashed" align="center"> <tr> <td colspan="5" height="7" class="seperator"> </td> @@ -7,7 +7,7 @@ <td width="10" rowspan="25"> </td> <td width="225" align="right">{--YOUR_LOGIN--}:</td> <td width="10" class="seperator"> </td> - <td width="225"><strong>{!UID_VALUE!}</strong></td> + <td width="225"><strong>$content[userid]</strong></td> <td width="10" rowspan="25"> </td> </tr> <tr> @@ -17,9 +17,9 @@ <td align="right">{--GENDER--}:</td> <td width="10" class="seperator"> </td> <td><select name="gender" size="1" class="member_select"> - <option value="M"{--M_DEFAULT--}>{--GENDER_M--}</option> - <option value="F"{--F_DEFAULT--}>{--GENDER_F--}</option> - <option value="C"{--C_DEFAULT--}>{--GENDER_C--}</option> + <option value="M"$content[gender_m]>{--GENDER_M--}</option> + <option value="F"$content[gender_f]>{--GENDER_F--}</option> + <option value="C"$content[gender_c]>{--GENDER_C--}</option> </select></td> </tr> <tr> @@ -28,10 +28,10 @@ <tr> <td align="right">{--SURNAME--}, {--FAMILY_NAME--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="surname" class="member_normal" - size="15" maxlength="255" value="$DATA[0]"> <input - type="text" name="family" class="member_normal" size="15" - maxlength="255" value="$DATA[1]"></td> + <td> + <input type="text" name="surname" class="member_normal" size="15" maxlength="255" value="$content[surname]" /> + <input type="text" name="family" class="member_normal" size="15" maxlength="255" value="$content[family]" /> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -39,8 +39,9 @@ <tr> <td align="right">{--STREET_NR--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="street_nr" class="member_normal" - size="25" maxlength="255" value="$DATA[2]"></td> + <td> + <input type="text" name="street_nr" class="member_normal" size="25" maxlength="255" value="$content[street_nr]" /> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -48,19 +49,19 @@ <tr> <td align="right">{--COUNTRY--}, {--ZIP--}, {--CITY--}:</td> <td width="10" class="seperator"> </td> - <td>{!__COUNTRY_CONTENT!} <input type="text" name="zip" - class="member_normal" size="5" maxlength="10" value="$DATA[4]"> + <td>$content[country] <input type="text" name="zip" + class="member_normal" size="5" maxlength="10" value="$content[zip]" /> <input type="text" name="city" class="member_normal" size="20" - maxlength="255" value="$DATA[5]"></td> + maxlength="255" value="$content[city]" /></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> </tr> <tr> - <td align="right">{--ADDY--}:</td> + <td align="right">{--EMAIL_ADDRESS--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="addy" class="member_normal" - size="30" maxlength="255" value="$DATA[6]"></td> + <td><input type="text" name="email" class="member_normal" + size="30" maxlength="255" value="$content[email]" /></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -68,13 +69,13 @@ <tr> <td align="right">{--BIRTHDAY--}:</td> <td width="10" class="seperator"> </td> - <td>{!DOB!}</td> + <td>$content[dob]</td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> </tr> <tr> - <td align="center" colspan="3">{--MAX_REC_LIST--}</td> + <td align="center" colspan="3">$content[max_receive_list]</td> </tr> <tr> <td colspan="3" height="7" class="seperator"> </td> diff --git a/templates/de/html/member/member_mydata_locked.tpl b/templates/de/html/member/member_mydata_locked.tpl index e4b1aeb2e3..59e5c9d8dd 100644 --- a/templates/de/html/member/member_mydata_locked.tpl +++ b/templates/de/html/member/member_mydata_locked.tpl @@ -1,10 +1,9 @@ -<table border="0" cellspacing="0" cellpadding="0" width="480" - class="member_main dashed" align="center"> +<table border="0" cellspacing="0" cellpadding="0" width="480" class="member_main dashed" align="center"> <tr> <td height="7" class="seperator"> </td> </tr> <tr> - <td align="center">{--MEMBER_PROFILE_LOCKED_1.$DATA[13].MEMBER_PROFILE_LOCKED_2--}</td> + <td align="center">{--MEMBER_PROFILE_LOCKED_1--}$content[update_check]{--MEMBER_PROFILE_LOCKED_2--}</td> </tr> <tr> <td height="7" class="seperator"> </td> diff --git a/templates/de/html/member/member_mydata_overview.tpl b/templates/de/html/member/member_mydata_overview.tpl index 07aab23939..ef50459f7c 100644 --- a/templates/de/html/member/member_mydata_overview.tpl +++ b/templates/de/html/member/member_mydata_overview.tpl @@ -1,11 +1,10 @@ -<table border="0" cellspacing="0" cellpadding="0" width="480" - class="member_main dashed" align="center"> +<table border="0" cellspacing="0" cellpadding="0" width="480" class="member_main dashed" align="center"> <tr> <td colspan="5" height="7" class="seperator"> </td> </tr> <tr> <td width="10" rowspan="27" class="seperator"> </td> - <td colspan="3" align="center">{!CHANGE!}</td> + <td colspan="3" align="center">$content[change]</td> <td width="10" rowspan="27" class="seperator"> </td> </tr> <tr> @@ -14,7 +13,7 @@ <tr> <td width="225" align="right">{--YOUR_LOGIN--}:</td> <td width="10" class="seperator"> </td> - <td width="225"><strong>{!UID_VALUE!}</strong></td> + <td width="225"><strong>$content[userid]</strong></td> </tr> <tr> <td colspan="3" height="7" class="seperator"> </td> @@ -22,7 +21,7 @@ <tr> <td width="225" align="right">{--GENDER--}:</td> <td width="10" class="seperator"> </td> - <td width="225"><strong>$DATA[10]</strong></td> + <td width="225"><strong>$content[gender]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -30,7 +29,7 @@ <tr> <td width="225" align="right">{--SURNAME--}:</td> <td width="10" class="seperator"> </td> - <td width="225"><strong>$DATA[0]</strong></td> + <td width="225"><strong>$content[surname]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -38,7 +37,7 @@ <tr> <td align="right">{--FAMILY_NAME--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[1]</strong></td> + <td><strong>$content[family]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -46,7 +45,7 @@ <tr> <td align="right">{--STREET_NR--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[2]</strong></td> + <td><strong>$content[street_nr]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -54,7 +53,7 @@ <tr> <td align="right">{--COUNTRY--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[3]</strong></td> + <td><strong>$content[country]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -62,7 +61,7 @@ <tr> <td align="right">{--ZIP--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[4]</strong></td> + <td><strong>$content[zip]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -70,15 +69,15 @@ <tr> <td align="right">{--CITY--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[5]</strong></td> + <td><strong>$content[city]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> </tr> <tr> - <td align="right">{--ADDY--}:</td> + <td align="right">{--EMAIL_ADDRESS--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[6]</strong></td> + <td><strong>$content[email]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -86,7 +85,7 @@ <tr> <td align="right">{--BIRTHDAY--}:</td> <td width="10" class="seperator"> </td> - <td><strong>{!DOB!}</strong></td> + <td><strong>$content[dob]</strong></td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -94,7 +93,7 @@ <tr> <td align="right">{--MAILS_PER_DAY--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[11]</strong> ({--TODAY--}: <strong>$DATA[12]</strong>) + <td><strong>$content[max_mails]</strong> ({--TODAY--}: <strong>$content[receive_mails]</strong>) </td> </tr> <tr> @@ -103,13 +102,13 @@ <tr> <td align="right">{--PROFILE_LAST_CHANGE--}:</td> <td width="10" class="seperator"> </td> - <td><strong>$DATA[13]</strong></td> + <td><strong>$content[last_update]</strong></td> </tr> <tr> <td colspan="3" height="7" class="seperator"> </td> </tr> <tr> - <td colspan="3" align="center">{!CHANGE!}</td> + <td colspan="3" align="center">$content[change]</td> </tr> <tr> <td colspan="5" height="7" class="seperator"> </td> diff --git a/templates/de/html/member/member_newsletter.tpl b/templates/de/html/member/member_newsletter.tpl index 0b89f5b977..de449f4436 100644 --- a/templates/de/html/member/member_newsletter.tpl +++ b/templates/de/html/member/member_newsletter.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=login&what=newsletter" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=newsletter" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> <td class="member_header bottom2" colspan="2"><strong>{--NL_MEMBER_TITLE--}:</strong> @@ -7,19 +7,23 @@ </tr> <tr> <td align="right" height="30" width="320"> - {--NL_MEMBER_RECEIVE_STATUS--}:</td> - <td width="200"> <strong>{!__STATUS_VALUE!}</strong><br /> - <div class="tiny">{!__UNTIL_VALUE!}</div></td> + {--NL_MEMBER_RECEIVE_STATUS--}: + </td> + <td width="200"> + <strong>$content[status]</strong><br /> + <div class="tiny">$content[until]</div> + </td> </tr> <tr> - <td class="bottom2" colspan="2" align="center" - style="padding-top: 10px; padding-bottom: 10px"><div class="member_note">{--NL_MEMBER_NOTE--}</div></td> + <td class="bottom2" colspan="2" align="center" style="padding-top: 10px; padding-bottom: 10px"> + <div class="member_note">$content[note]</div> + </td> </tr> <tr> - <td class="member_footer" colspan="2" align="center"><input - type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> - <input type="submit" name="ok" class="member_submit" - value="{--NL_SUBMIT--}" /></td> + <td class="member_footer" colspan="2" align="center"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="member_submit" value="$content[submit]" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/member/member_newsletter_note.tpl b/templates/de/html/member/member_newsletter_note.tpl index 06bc14df84..11f5d85d80 100644 --- a/templates/de/html/member/member_newsletter_note.tpl +++ b/templates/de/html/member/member_newsletter_note.tpl @@ -1,17 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" width="480"> - <tr> - <td>Unseren {?MT_WORD?} <strong>{?MAIN_TITLE?}</strong> - finanzieren wir zum Teil durch Werbung, die Sie ohne Vergütung - von uns ab und an in Form von Newslettern bekommen.<br /> - <br /> - Damit wir unseren Service weiterhin <strong>kostenlos</strong> Ihnen - anbieten können, aber gleichzeitig auch die Kosten des durch Sie - verursachten Transfervolumens wieder reinbekommen, möchten wir - Sie um eine kleine Spende bitten, die wir - "Abbestellgebühr" nennen.<br /> - <br /> - Sie finden diese weiter oben. Sollten Sie damit dennoch nicht - einverstanden sein, können wir gerne Ihren Account löschen. - Sie erhalten dann auch keine weiteren Mails mehr von uns.</td> - </tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/member/member_nickname_form.tpl b/templates/de/html/member/member_nickname_form.tpl index 9e76ac8236..4a469555d1 100644 --- a/templates/de/html/member/member_nickname_form.tpl +++ b/templates/de/html/member/member_nickname_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=nickname" +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=nickname" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="member_table dashed"> diff --git a/templates/de/html/member/member_order-back.tpl b/templates/de/html/member/member_order-back.tpl index d55ef8f085..713d2fed58 100644 --- a/templates/de/html/member/member_order-back.tpl +++ b/templates/de/html/member/member_order-back.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php" method="get"><input +<form accept-charset="utf-8" action="{?URL?}/modules.php" method="get"><input type="hidden" name="module" value="login"> <input type="hidden" name="what" value="order"> <strong><span class="member_done">{--MEMBER_THANX_ORDER--}</span></strong><br /> diff --git a/templates/de/html/member/member_order_back.tpl b/templates/de/html/member/member_order_back.tpl index 1da6b64cc6..259d9b36dc 100644 --- a/templates/de/html/member/member_order_back.tpl +++ b/templates/de/html/member/member_order_back.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php" method="get" target="_parent"> +<form accept-charset="utf-8" action="{?URL?}/modules.php" method="get" target="_parent"> <input type="hidden" name="module" value="login" /> <input type="hidden" name="what" value="order" /> <input type="hidden" name="order" value="$content" /> diff --git a/templates/de/html/member/member_order_frametester.tpl b/templates/de/html/member/member_order_frametester.tpl index 7d3477f8ad..4d9882fe22 100644 --- a/templates/de/html/member/member_order_frametester.tpl +++ b/templates/de/html/member/member_order_frametester.tpl @@ -1,9 +1,9 @@ <frameset rows="80,*,80" frameborder="no" border="0" framespacing="0"> <frame name="back" - src="{?URL?}/modules.php?module=frametester&frame=back&order={!__ORDER_VALUE!}" + src="{?URL?}/modules.php?module=frametester&frame=back&order=$content[order]" frameborder="no" scrolling="no" noresize /> - <frame name="url" src="{!__URL_VALUE!}" frameborder="no" noresize /> + <frame name="url" src="$content[url]" frameborder="no" noresize /> <frame name="send" - src="{?URL?}/modules.php?module=frametester&frame=send&order={!__ORDER_VALUE!}" + src="{?URL?}/modules.php?module=frametester&frame=send&order=$content[order]" frameborder="no" scrolling="no" noresize /> </frameset> diff --git a/templates/de/html/member/member_order_page1.tpl b/templates/de/html/member/member_order_page1.tpl index 0ddbacf734..696a2cb98f 100644 --- a/templates/de/html/member/member_order_page1.tpl +++ b/templates/de/html/member/member_order_page1.tpl @@ -1,14 +1,15 @@ -<form action="{?URL?}/modules.php?module=login&what=order" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=order" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" class="member_table dashed" align="center"> - {--MEMBER_ZIP_CONTENT--} {--MEMBER_HTML_EXTENSION--} + $content[zip_content] + $content[html_extension] <tr> <td colspan="2" class="seperator bottom2" height="5"> </td> </tr> <tr> - <td colspan="2" align="center" class="member_footer"><input - type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="data" class="member_submit" - value="{--ORDER_PAGE_2--}" /></td> + <td colspan="2" align="center" class="member_footer"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="data" class="member_submit" value="{--ORDER_PAGE_2--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/member/member_order_page2.tpl b/templates/de/html/member/member_order_page2.tpl index dd3803517c..a0fdb6784c 100644 --- a/templates/de/html/member/member_order_page2.tpl +++ b/templates/de/html/member/member_order_page2.tpl @@ -1,6 +1,6 @@ -<form action="{?URL?}/modules.php?module=login&what=order" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=order" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="660" class="member_table dashed" align="center"> - {--ZIP_OUTPUT--} + $content[zip_content] <tr> <td colspan="5" height="5" class="seperator"> </td> </tr> @@ -10,7 +10,7 @@ <td width="10" class="seperator"> </td> <td><select name="type" size="1" class="member_select"> <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option> - {--TYPE_SELECTION--} + $content[type_selection] </select></td> <td width="10" class="seperator"> </td> </tr> @@ -23,7 +23,7 @@ <td width="10" class="seperator"> </td> <td><select name="cat" size="1" class="member_select"> <option value="X" disabled="disabled">{--PLEASE_SELECT--}</option> - {!CATEGORY_SELECTION!} + $content[category_selection] </select></td> <td width="10" class="seperator"> </td> </tr> @@ -33,10 +33,10 @@ <tr> <td width="10" class="seperator"> </td> <td align="right"> - {--ENTER_RECEIVER--}: Minimum: <strong>{!__MIN_VALUE!}</strong> + {--ENTER_RECEIVER--}: Minimum: <strong>$content[min]</strong> </td> <td width="10" class="seperator"> </td> - <td><input type="text" name="receiver" class="member_normal" size="4" maxlength="5" value="{--TARGET--}" /></td> + <td><input type="text" name="receiver" class="member_normal" size="4" maxlength="5" value="$content[target_send]" /></td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -46,18 +46,18 @@ <td width="10" class="seperator"> </td> <td align="right">{--ENTER_SUBJECT--}:</td> <td width="10" class="seperator"> </td> - <td><input type="text" name="subject" class="member_normal" size="30" maxlength="150" value="{--SUBJECT--}" /></td> + <td><input type="text" name="subject" class="member_normal" size="30" maxlength="150" value="$content[subject]" /></td> <td width="10" class="seperator"> </td> </tr> <tr> <td colspan="5" height="5" class="seperator"> </td> </tr> - {--MEMBER_HTML_EXTENSION--} + $content[html_extension] <tr> <td width="10" class="seperator"> </td> <td align="right">{--ENTER_TEXT--}:</td> <td width="10" class="seperator"> </td> - <td><textarea name="text" class="member_normal" rows="10" cols="50">{--TEXT--}</textarea></td> + <td><textarea name="text" class="member_normal" rows="10" cols="50">$content[text]</textarea></td> <td width="10" class="seperator"> </td> </tr> <tr> @@ -66,7 +66,7 @@ <tr> <td width="10" class="seperator"> </td> <td colspan="3" align="center" class="member_note"> - <strong>{--MEMBER_PLEASE_NOTE--}</strong><br /> + <strong>{--MEMBER_PLEASE_NOTE--}</strong> </td> <td width="10" class="seperator"> </td> </tr> @@ -78,23 +78,12 @@ <td colspan="3" align="center" class="member_note"> <div align="left"> <ol> - <li>Bitte prüfen Sie <strong>unbedingt vor</strong> dem - Absenden die Verfügbarkeit und <strong><u>Framekiller-Freiheit</u></strong> - ihrer beworbenen Adresse!</li> - <li>Unsere AGBs vergessen? <strong>[<a - href="{?URL?}/agb.php" target="_blank">Hier sind sie nochmal</a>]</strong>.</li> - <li>Gesperrte URLs können nicht ein zweites Mal beworben - werden.</li> - <li>Ihre Seite wird vor dem entgültigem Absenden auf - Framekiller hin automatisch <u>doppelt</u> geprüft. Sollten Sie - also nur Ihre beworbene Seite sehen, enthält diese einen - Frame-Killer.</li> - <li>Ist Sponsor-Mail ausgewählt, wird die beworbene Seite - nicht geladen, sondern eine neutrale Seite mit unseren - Sponsor-Bannern!</li> - <li>Fremde {?MT_WORD2?} dürfen während der gesamten - Startphase (bis 100 aktive Mitglieder) nicht mehr beworben werden und - werden von uns abgelehnt!</li> + <li>Bitte prüfen Sie <strong>unbedingt vor</strong> dem Absenden die Verfügbarkeit und <strong><u>Framekiller-Freiheit</u></strong> ihrer beworbenen Adresse!</li> + <li>Unsere AGBs vergessen? <strong>[<a href="{?URL?}/agb.php" target="_blank">Hier sind sie nochmal</a>]</strong>.</li> + <li>Gesperrte URLs können nicht ein zweites Mal beworben werden.</li> + <li>Ihre Seite wird vor dem entgültigem Absenden auf Framekiller hin automatisch <u>doppelt</u> geprüft. Sollten Sie also nur Ihre beworbene Seite sehen, enthält diese einen Frame-Killer.</li> + <li>Ist Sponsor-Mail ausgewählt, wird die beworbene Seite nicht geladen, sondern eine neutrale Seite mit unseren Sponsor-Bannern!</li> + <li>Fremde {?mt_word3?} dürfen während der gesamten Startphase (bis 100 aktive Mitglieder) nicht mehr beworben werden und werden von uns abgelehnt!</li> </ol> </div> </td> @@ -107,8 +96,8 @@ <td width="10" class="seperator member_footer"> </td> <td class="member_footer" align="right">{--MEMBER_ENTER_URL--}:</td> <td width="10" class="seperator member_footer"> </td> - <td class="member_footer"><input type="text" name="url" - class="member_normal" size="60" maxlength="350" value="{--T_URL--}"> + <td class="member_footer"> + <input type="text" name="url" class="member_normal" size="60" maxlength="350" value="$content[url]" /> </td> <td width="10" class="seperator member_footer"> </td> </tr> diff --git a/templates/de/html/member/member_order_points.tpl b/templates/de/html/member/member_order_points.tpl index 337ae06a93..35acfd3601 100644 --- a/templates/de/html/member/member_order_points.tpl +++ b/templates/de/html/member/member_order_points.tpl @@ -2,17 +2,16 @@ <table border="0" cellspacing="0" cellpadding="0" width="500" class="member_main dashed" align="center"> <tr> - <td align="center" height="50" class="member_main" - style="padding-left: 5px; padding-right: 5px"> - {--MEMBER_POINTS_LEFT--}:<br /> - <span class="member_done"><strong>$content</strong> {?POINTS?}</span> + <td align="center" height="50" class="member_main" style="padding-left: 5px; padding-right: 5px"> + {--MEMBER_POINTS_LEFT--}:<br /> + <span class="member_done"><strong>$content[total] {?POINTS?}</strong></span> </td> </tr> <tr> - <td align="center" height="50" class="member_main" - style="padding-left: 5px; padding-right: 5px"> - {--MEMBER_ORDER_MAX_ALLOWED--}:<br /> - <span class="member_done">{!ORDER_MAX_VALUE!}</span></td> + <td align="center" height="50" class="member_main" style="padding-left: 5px; padding-right: 5px"> + {--MEMBER_ORDER_MAX_ALLOWED--}:<br /> + <span class="member_done">$content[order_max_full]</span> + </td> </tr> </table> </div> diff --git a/templates/de/html/member/member_order_send.tpl b/templates/de/html/member/member_order_send.tpl index b05f17b0cc..aa2f86f91d 100644 --- a/templates/de/html/member/member_order_send.tpl +++ b/templates/de/html/member/member_order_send.tpl @@ -1,33 +1,6 @@ -<form id="form" action="{?URL?}/modules.php?module=order&order=$content" method="post" target="_parent" onsubmit="return Submit()"> +<form accept-charset="utf-8" id="form" action="{?URL?}/modules.php?module=order&order=$content" method="post" target="_parent" onsubmit="return Submit()"> {--MEMBER_ORDER_PLEASE_WAIT_1--}<span id="counter" style="font-weight:bold">10</span>{--MEMBER_ORDER_PLEASE_WAIT_2--}<br /> <input type="submit" class="member_submit" id="ok" name="ok" value="{--MEMBER_DO_ORDER--}" /> -<script language="JavaScript" type="text/javascript"> -<!-- -var counter = document.getElementById('counter'); -var form = document.getElementById('form'); -var ok = document.getElementById('ok'); - -function Submit() { - if (counter.innerHTML > 0) { - alert('{--MEMBER_ORDER_PLEASE_WAIT_TESTER--}'); - return false; - } else { - form.submit(); - } -} - -function Counter() { - if (counter.innerHTML == 1) { - ok.value='{--MEMBER_DO_ORDER--}'; - window.clearInterval(interval); - } - - counter.innerHTML--; -} - -ok.value='{--MEMBER_ORDER_TEST_STARTED--}'; -var interval = window.setInterval("Counter()", 1000); - -//--> -</script> +<script type="text/javascript" + src="{?URL?}/js.php?js=member_order_send{%version=order%}"></script> </form> diff --git a/templates/de/html/member/member_payout.tpl b/templates/de/html/member/member_payout.tpl index a35287a518..e10734e297 100644 --- a/templates/de/html/member/member_payout.tpl +++ b/templates/de/html/member/member_payout.tpl @@ -1,6 +1,4 @@ -<table border="0" cellspacing="0" cellpadding="0" width="680" - class="member_table dashed" align="center"> - +<table border="0" cellspacing="0" cellpadding="0" width="680" class="member_table dashed" align="center"> <tr> <td colspan="5" align="center" class="member_title2" height="30"> <strong>{--PAYOUT_MEMBER_LIST_PAYOUTS--}:</strong></td> @@ -12,7 +10,7 @@ <td width="150" align="center" class="member_title2 bottom2 right2"><strong>{--PAYOUT_TIMESTAMP--}</strong></td> <td width="120" align="center" class="member_title2 bottom2"><strong>{--PAYOUT_MEMBER_STATUS--}</strong></td> </tr> - {!__PAYOUT_ROWS!} + $content <tr> <td colspan="5" class="seperator member_footer" height="10"> </td> </tr> diff --git a/templates/de/html/member/member_payout_form.tpl b/templates/de/html/member/member_payout_form.tpl index 1c49dac928..5e5e96e52a 100644 --- a/templates/de/html/member/member_payout_form.tpl +++ b/templates/de/html/member/member_payout_form.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=login&what=payout&payout=$content[payout]" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=payout&payout=$content[payout]" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed"> <tr> - <td colspan="3" align="center" class="member_title2 bottom2" - height="30"><strong>{--PAYOUT_NOW_TITLE--}</strong></td> + <td colspan="3" align="center" class="member_title2 bottom2" height="30"> + <strong>{--PAYOUT_NOW_TITLE--}</strong> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -10,49 +11,55 @@ <tr> <td width="215" height="20" align="right">{--PAYOUT_SELECTED_TYPE--}:</td> <td width="10" class="seperator"> </td> - <td width="215"><strong>{--PAYOUT_TYPE_VALUE--}</strong></td> + <td width="215"><strong>$content[type]</strong></td> </tr> <tr> <td height="25" align="right">{--PAYOUT_MAX_PAYOUT--}:</td> <td class="seperator" width="10"> </td> - <td><strong>{--PAYOUT_MAX_VALUE--}</strong></td> + <td><strong>$content[max]</strong></td> </tr> <tr> <td height="25" align="right">{--PAYOUT_WANT_PAYOUT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="payout" class="member_normal" - size="10" maxlength="255" value="{--PAYOUT_MAX_VALUE!}"></strong></td> + <td> + <input type="text" name="payout" class="member_normal" size="10" maxlength="255" value="$content[max]" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_TARGET_ACCOUNT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="account" class="member_normal" - size="20" maxlength="255"></strong></td> + <td> + <input type="text" name="account" class="member_normal" size="20" maxlength="255" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_TARGET_BANK--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="bank" class="member_normal" - size="20" maxlength="255"></strong></td> + <td> + <input type="text" name="bank" class="member_normal" ize="20" maxlength="255" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_OPTIONAL_PASSWORD--}:</td> <td class="seperator" width="10"> </td> - <td><input type="password" name="pass" class="member_normal" - size="10" maxlength="255"></strong></td> + <td> + <input type="password" name="pass" class="member_normal" ize="10" maxlength="255" /> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" align="center" class="member_footer"><input - type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="member_submit" - value="{--PAYOUT_SEND_NOW--}" /></td> + <td colspan="3" align="center" class="member_footer"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="member_submit" value="{--PAYOUT_SEND_NOW--}" /> + </td> </tr> </table> -<br /> -<div class="member_note"> {--PAYOUT_MEMBER_NOTE--}<br /> -<br /> -<a href="{?URL?}/agb.php" target="_blank">{--PAYOUT_REMEMBER_TERMS--}</a> -</strong></form> +</form> + +<div class="member_note"> + {--PAYOUT_MEMBER_NOTE--}<br /> + <br /> + <a href="{?URL?}/agb.php" target="_blank">{--PAYOUT_REMEMBER_TERMS--}</a> +</div> diff --git a/templates/de/html/member/member_payout_form_banner.tpl b/templates/de/html/member/member_payout_form_banner.tpl index 08e038368b..0c39720fe9 100644 --- a/templates/de/html/member/member_payout_form_banner.tpl +++ b/templates/de/html/member/member_payout_form_banner.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=login&what=payout&payout=$content[payout]" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=payout&payout=$content[payout]" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed"> <tr> - <td colspan="3" align="center" class="member_title2 bottom2" - height="30"><strong>{--PAYOUT_NOW_TITLE--}</strong></td> + <td colspan="3" align="center" class="member_title2 bottom2" height="30"> + <strong>{--PAYOUT_NOW_TITLE--}</strong> + </td> </tr> <tr> <td colspan="3" height="3" class="seperator"> </td> @@ -10,50 +11,53 @@ <tr> <td width="215" height="20" align="right">{--PAYOUT_SELECTED_TYPE--}:</td> <td width="10" class="seperator"> </td> - <td width="215"><strong>{!PAYOUT_TYPE_VALUE!}</strong></td> + <td width="215"><strong>$content[type]</strong></td> </tr> <tr> <td height="25" align="right">{--PAYOUT_MAX_PAYOUT--}:</td> <td class="seperator" width="10"> </td> - <td><strong>{!PAYOUT_MAX_VALUE!}</strong></td> + <td><strong>$content[max]</strong></td> </tr> <tr> <td height="25" align="right">{--PAYOUT_WANT_PAYOUT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="payout" class="member_normal" - size="10" maxlength="255" value="{--PAYOUT_MAX_VALUE!}"></td> + <td> + <input type="text" name="payout" class="member_normal" size="10" maxlength="255" value="$content[max]" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_TARGET_URL--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="turl" class="member_normal" - size="20" maxlength="500" value="http://"></td> + <td> + <input type="text" name="turl" class="member_normal" size="20" maxlength="500" value="http://" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_ALTERNATE_TEXT--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="alt" class="member_normal" size="10" - maxlength="30"></td> + <td> + <input type="text" name="alt" class="member_normal" size="10" maxlength="30" /> + </td> </tr> <tr> <td height="25" align="right">{--PAYOUT_OPTIONAL_BANNER--}:</td> <td class="seperator" width="10"> </td> - <td><input type="text" name="banner" class="member_normal" - size="20" maxlength="500"> (*)</td> + <td> + <input type="text" name="banner" class="member_normal" size="20" maxlength="500" /> (*) + </td> </tr> <tr> <td colspan="3" height="3" class="seperator bottom2"> </td> </tr> <tr> - <td colspan="3" align="center" class="member_footer"><input - type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" name="ok" class="member_submit" - value="{--PAYOUT_SEND_NOW--}" /></td> + <td colspan="3" align="center" class="member_footer"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" name="ok" class="member_submit" value="{--PAYOUT_SEND_NOW--}" /> + </td> </tr> </table> -<br /> +</form> <!-- Hinweise zur "Auszahlung" in Bannerviews, Textlinkklicks, etc. --> -<div class="member_note">(*): {--PAYOUT_BANNER_NOTE--}</strong> +<div class="member_note">(*): {--PAYOUT_BANNER_NOTE--}</div> <!-- Hinweise zur "Auszahlung" in Bannerviews, Textlinkklicks, etc. --> -</form> diff --git a/templates/de/html/member/member_points.tpl b/templates/de/html/member/member_points.tpl index 8fc46f613a..8664012a5f 100644 --- a/templates/de/html/member/member_points.tpl +++ b/templates/de/html/member/member_points.tpl @@ -1,99 +1,99 @@ -<table border="0" cellspacing="0" cellpadding="0" - class="member_main dashed" align="center"> +<table border="0" cellspacing="0" cellpadding="0" class="member_main dashed" align="center"> <tr> - <td colspan="5" height="3" class="seperator"></td> + <td colspan="7" height="3" class="seperator"> </td> </tr> <tr> - <td width="10" rowspan="{!__ROWS_VALUE!}"></td> - <td align="center" width="228" class="member_header"><strong>{--REF_LEVEL--}</strong></td> + <td width="10" rowspan="$content[rowspan]"></td> + <td align="center" width="238" class="member_header"><strong>{--REF_LEVEL--}</strong></td> <td width="2" class="member_header"></td> <td align="center" width="228" class="member_header"><strong>{?POINTS?}</strong></td> <td width="2" class="member_header"></td> - <td align="center" width="120" class="member_header"><strong>{--REFERRALS--}</strong></td> - <td width="10" rowspan="{!__ROWS_VALUE!}"></td> + <td align="center" width="100" class="member_header"><strong>{--REFERRALS--}</strong></td> + <td width="10" rowspan="$content[rowspan]"></td> </tr> - {!__REF_LEVEL_ROWS!} + $content[rows] <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="5" height="5" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--POINTS_USED--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__USED_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[used] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="5" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> <strong>{--POINTS_SUM--}</strong></td> <td width="2" class="seperator"> </td> - <td class="member_data"> <strong>{!__TPTS_VALUE!} - {?POINTS?}</strong></td> + <td class="member_data"> + <strong>$content[used] {?POINTS?}</strong> + </td> <td width="2" class="seperator"> </td> - <td class="member_data"> <strong>{!__TREF_VALUE!}</strong></td> + <td class="member_data"> <strong>$content[tref]</strong></td> </tr> <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="5" height="5" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--POINTS_LOCKED--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__TLOCK_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[tlock] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> - {!__SPECIAL_ROWS!} + $content[special_rows] <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="5" height="2" class="seperator"> </td> </tr> <tr> <td colspan="5" class="member_header"> - <div align="center"><strong>{--CLICK_STATISTICS--}</strong></div> + <div align="center"><strong>{--CLICK_STATISTICS--}</strong></div> </td> </tr> <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="5" height="2" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--RECEIVED_MAILS--}:</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__RECEIVE_VALUE!}</td> + <td class="member_data"> $content[receive]</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="5" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--UNCONFIRMED_LOCKED--}:</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__PAY_VALUE!}</td> + <td class="member_data"> $content[pay]</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="5" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--CONFIRMED_MAILS--}:</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__CONFIRMED_VALUE!}</td> + <td class="member_data"> $content[confirmed]</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="5" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--SENT_MAILS--}:</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__SENT_VALUE!}</td> + <td class="member_data"> $content[sent]</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="5" height="3" class="seperator"> </td> + <td colspan="7" height="3" class="seperator"> </td> </tr> -</table> \ No newline at end of file +</table> diff --git a/templates/de/html/member/member_points_bonus_disabled.tpl b/templates/de/html/member/member_points_bonus_disabled.tpl index b41c0d1b95..67a25a733e 100644 --- a/templates/de/html/member/member_points_bonus_disabled.tpl +++ b/templates/de/html/member/member_points_bonus_disabled.tpl @@ -1,7 +1,8 @@ <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="5" height="2" class="seperator"> </td> </tr> <tr> - <td colspan="5" align="center" class="member_header"><strong>{--BONUS_POINTS_DISABLED--}</strong> + <td colspan="7" align="center" class="member_header"> + <strong>{--BONUS_POINTS_DISABLED--}</strong> </td> </tr> diff --git a/templates/de/html/member/member_points_bonus_rows.tpl b/templates/de/html/member/member_points_bonus_rows.tpl index 4b051c5c49..c5a4d617bb 100644 --- a/templates/de/html/member/member_points_bonus_rows.tpl +++ b/templates/de/html/member/member_points_bonus_rows.tpl @@ -1,12 +1,12 @@ <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="3" height="2" class="seperator"> </td> </tr> <tr> <td colspan="5" align="center" class="member_header"><strong>{--BONUS_POINTS_TITLE--}</strong> </td> </tr> <tr> - <td colspan="3" height="2" class="seperator"></td> + <td colspan="3" height="2" class="seperator"> </td> </tr> <tr> <td colspan="5" class="member_data"> @@ -14,62 +14,62 @@ </td> </tr> <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="3" height="5" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--BONUS_LOGIN_TOTAL--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__LOGIN_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[login] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="3" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--BONUS_TURBO_TOTAL--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__TURBO_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[turbo] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="3" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--BONUS_REF_TOTAL--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__REF_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[ref] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="3" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--BONUS_ORDER_TOTAL--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__ORDER_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[order] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="3" height="1" class="seperator"> </td> </tr> <tr> <td class="member_data"> {--BONUS_STATS_TOTAL--}</td> <td width="2" class="seperator"> </td> - <td class="member_data"> {!__STATS_VALUE!} {?POINTS?}</td> + <td class="member_data"> $content[stats] {?POINTS?}</td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> </tr> <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="3" height="5" class="seperator"> </td> </tr> <tr> <td class="member_data"> <strong>{--BONUS_TOTAL--}</strong></td> <td width="2" class="seperator"> </td> - <td class="member_data"> <strong>{!__TTOTAL_VALUE!} + <td class="member_data"> <strong>$content[ttotal] {?POINTS?}</strong></td> <td width="2" class="seperator"> </td> <td class="member_data"> </td> diff --git a/templates/de/html/member/member_points_row.tpl b/templates/de/html/member/member_points_row.tpl index 59e3832a64..7c88d0f8ab 100644 --- a/templates/de/html/member/member_points_row.tpl +++ b/templates/de/html/member/member_points_row.tpl @@ -1,9 +1,8 @@ <tr> - <td colspan="3" height="1" class="seperator"></td> + <td colspan="3" height="1" class="seperator"> </td> </tr> <tr> - <td class="member_data"> $content[lvl] {--REF_LEVEL--} - ($content[per]%)</td> + <td class="member_data"> $content[level] {--REF_LEVEL--} ($content[percents]%)</td> <td width="2" class="seperator"> </td> <td class="member_data"> $content[points] {?POINTS?}</td> <td width="2" class="seperator"> </td> diff --git a/templates/de/html/member/member_points_upgrade.tpl b/templates/de/html/member/member_points_upgrade.tpl index 110d54cbd4..fd32c4e237 100644 --- a/templates/de/html/member/member_points_upgrade.tpl +++ b/templates/de/html/member/member_points_upgrade.tpl @@ -1,8 +1,8 @@ <tr> - <td colspan="3" height="5" class="seperator"></td> + <td colspan="5" height="5" class="seperator"> </td> </tr> <tr> - <td colspan="5" align="center" class="member_data"> + <td colspan="7" align="center" class="member_data"> <strong class="admin_note">{--BONUS_EXTENSION_UPGRADE_1--} <u>v0.2.2</u> {--BONUS_EXTENSION_UPGRADE_2--}</strong> diff --git a/templates/de/html/member/member_primera.tpl b/templates/de/html/member/member_primera.tpl index bfead908cf..11f5d85d80 100644 --- a/templates/de/html/member/member_primera.tpl +++ b/templates/de/html/member/member_primera.tpl @@ -1,17 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" width="680" - class="member_table dashed" align="center"> - <tr> - <td colspan="4" align="center" class="member_title2" height="30"> - <strong>{--PRIMERA_MEMBER_LIST_PRIMERA--}:</strong></td> - </tr> - <tr> - <td width="180" align="center" class="member_title2 bottom2 right2"><strong>{--PRIMERA_TOTAL_PRIMERA--}</strong></td> - <td width="130" align="center" class="member_title2 bottom2 right2"><strong>{--PRIMERA_TARGET_ACCOUNT2--}</strong></td> - <td width="150" align="center" class="member_title2 bottom2 right2"><strong>{--PRIMERA_TIMESTAMP--}</strong></td> - <td width="120" align="center" class="member_title2 bottom2"><strong>{--PRIMERA_MEMBER_STATUS--}</strong></td> - </tr> - {!__PRIMERA_ROWS!} - <tr> - <td colspan="4" class="seperator member_footer" height="10"> </td> - </tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/member/member_primera_mode_pay.tpl b/templates/de/html/member/member_primera_mode_pay.tpl index 0f39f63565..acc173bcdd 100644 --- a/templates/de/html/member/member_primera_mode_pay.tpl +++ b/templates/de/html/member/member_primera_mode_pay.tpl @@ -1,8 +1,9 @@ -<form action="{?URL?}/modules.php?module=login&what=primera&mode=pay" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=primera&mode=pay" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed"> <tr> - <td colspan="3" align="center" class="member_title2 bottom2" - height="30"><strong>{--PRIMERA_MEMBER_PAYOUT_TITLE--}</strong></td> + <td colspan="3" align="center" class="member_title2 bottom2" height="30"> + <strong>{--PRIMERA_MEMBER_PAYOUT_TITLE--}</strong> + </td> </tr> <tr> <td width="315" class="bottom2" height="25" align="right">{--PRIMERA_MEMBER_PAYOUT_POINTS--}</td> @@ -42,6 +43,6 @@ </td> </tr> </table> -<br /> -<div class="member_note"> {--PRIMERA_MEMBER_PAYOUT_NOTE--}</strong> </form> + +<div class="member_note"> {--PRIMERA_MEMBER_PAYOUT_NOTE--}</div> diff --git a/templates/de/html/member/member_receive_table.tpl b/templates/de/html/member/member_receive_table.tpl index e59344ac19..95568a116e 100644 --- a/templates/de/html/member/member_receive_table.tpl +++ b/templates/de/html/member/member_receive_table.tpl @@ -6,7 +6,7 @@ </td> <td class="register_right"> <select name="max_mails" size="1" class="register_select"> - {!__MAX_RECEIVE_OPTIONS!} + $content </select> </td> </tr> diff --git a/templates/de/html/member/member_refback_edit.tpl b/templates/de/html/member/member_refback_edit.tpl index c962336bed..19e4474530 100644 --- a/templates/de/html/member/member_refback_edit.tpl +++ b/templates/de/html/member/member_refback_edit.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=refback" method="post" style="padding-bottom:10px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=refback" method="post" style="padding-bottom:10px"> <input type="hidden" name="id" value="$content[id]" /> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed" width="400"> <tr> diff --git a/templates/de/html/member/member_refback_list_row.tpl b/templates/de/html/member/member_refback_list_row.tpl index f01a2aefa6..8eadd8670b 100644 --- a/templates/de/html/member/member_refback_list_row.tpl +++ b/templates/de/html/member/member_refback_list_row.tpl @@ -12,7 +12,7 @@ $content[points] {?POINTS?} </td> <td align="center" class="switch_sw$content[sw] bottom2" style="padding:3px"> - <form action="{?URL?}/modules.php?module=login&what=refback" method="post" style="paddin-bottom:0px"> + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=refback" method="post" style="paddin-bottom:0px"> <input type="hidden" name="id" value="$content[id]" /> <input type="submit" name="edit" class="member_submit" value="{--MEMBER_REFBACK_EDIT_SUBMIT--}" /> </form> diff --git a/templates/de/html/member/member_refback_list_row_deleted.tpl b/templates/de/html/member/member_refback_list_row_deleted.tpl index 639bbe6c40..d07f2f01d5 100644 --- a/templates/de/html/member/member_refback_list_row_deleted.tpl +++ b/templates/de/html/member/member_refback_list_row_deleted.tpl @@ -12,7 +12,7 @@ $content[points] {?POINTS?} </td> <td align="center" class="switch_sw$content[sw] bottom2" style="padding:3px"> - <form style="paddin-bottom:0px"> + <form accept-charset="utf-8" style="paddin-bottom:0px"> <input type="button" name="edit" class="member_submit disabled" title="{--MEMBER_REFBACK_DELETED_TITLE--}" disabled="disabled" value="{--MEMBER_REFBACK_DELETED_SUBMIT--}" /> </form> diff --git a/templates/de/html/member/member_reflinks_table.tpl b/templates/de/html/member/member_reflinks_table.tpl index 41126e6aad..b68fc02f08 100644 --- a/templates/de/html/member/member_reflinks_table.tpl +++ b/templates/de/html/member/member_reflinks_table.tpl @@ -1,9 +1,8 @@ <div align="center"> -<table border="0" cellspacing="0" cellpadding="0" width="500" - align="center"> +<table border="0" cellspacing="0" cellpadding="0" width="500" align="center"> <tr> <td colspan="3" height="10" class="seperator member_refbanner"> </td> </tr> - {!__REFLINKS_ROWS!} + $content </table> -</div> \ No newline at end of file +</div> diff --git a/templates/de/html/member/member_support_form.tpl b/templates/de/html/member/member_support_form.tpl index db5d59634d..7787f4130f 100644 --- a/templates/de/html/member/member_support_form.tpl +++ b/templates/de/html/member/member_support_form.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=support" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=support" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="500" align="center" class="member_header"> <tr> <td height="5" colspan="2" class="seperator top2 left2 right2"> </td> @@ -8,7 +8,7 @@ haben eine Frage an unseren Support?</strong><br /> <hr noshade width="400"> <div align="left"><pre style="margin-bottom: 0px">Hallo Support-Team,<br /> - Meine ID bei Ihrem {?MT_WORD?} lautet: $content[userid] + Meine ID bei Ihrem {?mt_word?} lautet: $content[userid] </pre></div> </td> </tr> @@ -32,7 +32,7 @@ </tr> <tr> <td align="center" class="left2 right2"> - <div align="left"><pre style="margin-bottom: 5px">Mit freundlichem Gruss, + <div align="left"><pre style="margin-bottom: 5px">Mit freundlichen Grüßen, Ihr $username </pre></div> <hr noshade width="400"> diff --git a/templates/de/html/member/member_surfbar_book_dynamic.tpl b/templates/de/html/member/member_surfbar_book_dynamic.tpl index 3787f96390..e30526aa94 100644 --- a/templates/de/html/member/member_surfbar_book_dynamic.tpl +++ b/templates/de/html/member/member_surfbar_book_dynamic.tpl @@ -1,11 +1,11 @@ -<form id="book" action="{?URL?}/modules.php?module=login&what=surfbar_book" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> +<form accept-charset="utf-8" id="book" action="{?URL?}/modules.php?module=login&what=surfbar_book" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> <div class="member_table dashed" style="width:600px;margin-top:10px"> <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px"> <strong>URL in Surfbar buchen - Dynamisch:</strong> </div> <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="http://" /> + URL eingeben: <input type="text" class="member_normal" name="url" size="20" maxlength="255" value="http://" /> </div> <div class="member_input" style="padding-top:5px;padding-bottom:5px"> @@ -15,7 +15,7 @@ </div> <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="-" /> + Aufrufe begrenzen auf: <input type="text" class="member_normal" id="limit" name="limit" size="7" maxlength="20" value="-" /> </div> <div class="member_input" style="padding-top:5px;padding-bottom:5px"> @@ -34,52 +34,8 @@ </div> </div> -<script language="JavaScript" type="text/javascript"> -<!-- -var limit = document.getElementById('limit'); -var span = document.getElementById('span_limit'); -var old_limit = 0; - -function FocusLimitedNo () { - if ((limit.value > 0) && (limit.value != '-')) { - old_limit = limit.value; - } - limit.disabled = true; - limit.setAttribute('class', 'disabled'); - limit.style.textAlign = 'center'; - limit.value = '-'; -} - -function FocusLimitedYes () { - limit.disabled = false; - limit.setAttribute('class', 'member_normal'); - limit.style.textAlign = 'left'; - if (old_limit > 0) { - limit.value = old_limit; - } else { - limit.value = ''; - } - limit.focus(); -} - -function SubmitForm () { - if (limit.value == '-') { - limit.value = 0; - } - return true; -} - -function ResetForm () { - old_limit = 0; - FocusLimitedNo(); - return true; -} - -FocusLimitedNo(); - -//--> -</script> -</form> +<script type="text/javascript" + src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}"></form> <span align="center" class="member_note" style="padding:5px"> Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf richten sich nach diff --git a/templates/de/html/member/member_surfbar_book_static.tp b/templates/de/html/member/member_surfbar_book_static.tp deleted file mode 100644 index 1f8cb135fd..0000000000 --- a/templates/de/html/member/member_surfbar_book_static.tp +++ /dev/null @@ -1,63 +0,0 @@ -<form action="{!URL!}/modules.php?module=login&what=surfbar_book" method="post"> -<div class="member_table dashed" style="width:600px;margin-top:10px"> - <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px"> - <strong>URL in Surfbar buchen - Dynamisch:</strong> - </div> - - <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="http://" /> - </div> - - <div class="member_input" style="padding-top:5px;padding-bottom:5px"> - Soll die Anzahl Aufrufe begrenzt werden?<br /> - <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N" checked="checked" /> {--NO--} - <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y" /> {--YES--} - </div> - - <div class="member_input bottom2"" style="padding-top:5px;padding-bottom:5px"> - URL eingeben: <input class="member_normal" type="text" id="limit" name="limit" size="5" maxlength="20" value="0" /> - </div> - - <div class="member_input" style="padding-top:5px;padding-bottom:5px"> - Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens - <strong>$content[costs] {!POINTS!}</strong>. Surfen Sie mit der Surfbar - erhalten Sie mindestens <strong>$content[reward] {!POINTS!}</strong> auf - Ihr Konto gutgeschrieben.<br /> - <br /> - Sie haben bereits <strong>$content[curr_order]</strong> von maximal - <strong>$content[max_order]</strong> erlaubten URLs gebucht. - </div> - - <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px"> - <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> * - <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ADD_URL--}" /> - </div> -</div> -<script language="JavaScript" type="text/javascript"> -<!-- -var limit = document.getElementById('limit'); -function FocusLimitedNo () { - limit.disabled = true; - limit.setAttribute('class', 'disabled'); - limit.value = '0'; -} - -function FocusLimitedYes () { - limit.disabled = false; - limit.setAttribute('class', 'member_normal'); - limit.value = ''; - limit.focus(); -} - -FocusLimitedNo(); - -//--> -</script> -</form> - -<div align="center" class="member_note" style="padding:5px"> - Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf richten sich nach - verschiedenen Faktoren. Schauen Sie unter <a - href="{!URL!}/modules.php?module=login&what=surfbar_start">Surfbar starten</a> - nach, wenn Sie genaueres dazu wissen möchten. -</div> diff --git a/templates/de/html/member/member_surfbar_book_static.tpl b/templates/de/html/member/member_surfbar_book_static.tpl index 3cf168d39b..6e03731707 100644 --- a/templates/de/html/member/member_surfbar_book_static.tpl +++ b/templates/de/html/member/member_surfbar_book_static.tpl @@ -1,4 +1,4 @@ -<form id="book" action="{?URL?}/modules.php?module=login&what=surfbar_book" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> +<form accept-charset="utf-8" id="book" action="{?URL?}/modules.php?module=login&what=surfbar_book" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> <div class="member_table dashed" style="width:600px;margin-top:10px"> <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px"> <strong>URL in Surfbar buchen - Statisch:</strong> @@ -15,7 +15,7 @@ </div> <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="-" /> + Aufrufe begrenzen auf: <input type="text" class="member_normal" id="limit" name="limit" size="7" maxlength="20" value="-" /> </div> <div class="member_input" style="padding-top:5px;padding-bottom:5px"> @@ -34,49 +34,7 @@ </div> </div> -<script language="JavaScript" type="text/javascript"> -<!-- -var limit = document.getElementById('limit'); -var span = document.getElementById('span_limit'); -var old_limit = 0; +<script type="text/javascript" + src="{?URL?}/js.php?js=surfbar_member_book{%version=surfbar%}"></script> -function FocusLimitedNo () { - if ((limit.value > 0) && (limit.value != '-')) { - old_limit = limit.value; - } - limit.disabled = true; - limit.setAttribute('class', 'disabled'); - limit.style.textAlign = 'center'; - limit.value = '-'; -} - -function FocusLimitedYes () { - limit.disabled = false; - limit.setAttribute('class', 'member_normal'); - limit.style.textAlign = 'left'; - if (old_limit > 0) { - limit.value = old_limit; - } else { - limit.value = ''; - } - limit.focus(); -} - -function SubmitForm () { - if (limit.value == '-') { - limit.value = 0; - } - return true; -} - -function ResetForm () { - old_limit = 0; - FocusLimitedNo(); - return true; -} - -FocusLimitedNo(); - -//--> -</script> </form> diff --git a/templates/de/html/member/member_surfbar_delete_action_form.tpl b/templates/de/html/member/member_surfbar_delete_action_form.tpl index 2a7513f0a4..e0bb7f1d12 100644 --- a/templates/de/html/member/member_surfbar_delete_action_form.tpl +++ b/templates/de/html/member/member_surfbar_delete_action_form.tpl @@ -1,4 +1,4 @@ -<form id="delete" action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post"> +<form accept-charset="utf-8" id="delete" action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post"> <div class="member_table dashed" style="width:600px;margin-top:10px"> <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px"> <strong>URL in Surfbar löschen:</strong> diff --git a/templates/de/html/member/member_surfbar_edit_action_form.tpl b/templates/de/html/member/member_surfbar_edit_action_form.tpl index 8d33c20172..b8a279c9f9 100644 --- a/templates/de/html/member/member_surfbar_edit_action_form.tpl +++ b/templates/de/html/member/member_surfbar_edit_action_form.tpl @@ -1,21 +1,21 @@ -<form id="edit" action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> +<form accept-charset="utf-8" id="edit" action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()"> <div class="member_table dashed" style="width:600px;margin-top:10px"> <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px"> <strong>URL in Surfbar editieren:</strong> </div> <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="$content[url]" /> + URL eingeben: <input type="text" class="member_normal" name="url" size="20" maxlength="255" value="$content[url]" /> </div> <div class="member_input" style="padding-top:5px;padding-bottom:5px"> Soll die Anzahl Aufrufe begrenzt werden?<br /> - <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N"$content[limited_no] /> {--NO--} - <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y"$content[limited_yes] /> {--YES--} + <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N"$content[limited_n] /> {--NO--} + <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y"$content[limited_y] /> {--YES--} </div> <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px"> - Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="$content[views_max]" /> + Aufrufe begrenzen auf: <input type="text" class="member_normal" id="limit" name="limit" size="7" maxlength="20" value="$content[views_max]" /> </div> <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px"> @@ -27,53 +27,6 @@ </div> </div> -<script language="JavaScript" type="text/javascript"> -<!-- -var limit = document.getElementById('limit'); -var span = document.getElementById('span_limit'); -var old_limit = $content[views_max]; - -function FocusLimitedNo () { - if ((limit.value > 0) && (limit.value != '-')) { - old_limit = limit.value; - } - limit.disabled = true; - limit.setAttribute('class', 'disabled'); - limit.style.textAlign = 'center'; - limit.value = '-'; -} - -function FocusLimitedYes () { - limit.disabled = false; - limit.setAttribute('class', 'member_normal'); - limit.style.textAlign = 'left'; - if (old_limit > 0) { - limit.value = old_limit; - } else { - limit.value = ''; - } - limit.focus(); -} - -function SubmitForm () { - if (limit.value == '-') { - limit.value = 0; - } - return true; -} - -function ResetForm () { - old_limit = 0; - FocusLimitedNo(); - return false; -} - -if ($content[limited] == true) { - FocusLimitedYes(); -} else { - FocusLimitedNo(); -} - -//--> -</script> +<script type="text/javascript" + src="{?URL?}/js.php?js=surfbar_member_edit{%version=surfbar%}&views_max=$content[views_max]&limited=$content[limited]"></script> </form> diff --git a/templates/de/html/member/member_surfbar_list_form.tpl b/templates/de/html/member/member_surfbar_list_form.tpl index bb37e1f7b5..c39ed666e3 100644 --- a/templates/de/html/member/member_surfbar_list_form.tpl +++ b/templates/de/html/member/member_surfbar_list_form.tpl @@ -1,5 +1,5 @@ <td align="center" width="$content[width]%%"> - <form action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post" style="padding-bottom:0px"> + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=surfbar_list" method="post" style="padding-bottom:0px"> <input type="hidden" name="id" value="$content[id]" /> <input type="hidden" name="action" value="$content[action]" /> <input type="submit" class="member_submit" name="ok" title="$content[title]" value="$content[submit]" /> diff --git a/templates/de/html/member/member_themes.tpl b/templates/de/html/member/member_themes.tpl index fa6151470c..ba562bb092 100644 --- a/templates/de/html/member/member_themes.tpl +++ b/templates/de/html/member/member_themes.tpl @@ -2,7 +2,7 @@ <div>{--MEMBER_THEME_LIST_USAGE--}</div> -<form action="{?URL?}/modules.php?module=login&what=themes" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=themes" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed"> <tr> <td class="admin_title2 bottom2 right2" align="center">{--THEME_UNIX--}</td> @@ -11,12 +11,12 @@ <td class="admin_title2 bottom2 right2" align="center">{--THEME_URL--}</td> <td class="admin_title2 bottom2" align="center">{--THEME_VERSION--}</td> </tr> - {!__THEME_LIST!} + $content <tr> - <td colspan="5" class="admin_footer" align="center"><input - type="reset" class="member_reset" value="{--UNDO_SELECTIONS--}" /> - <input type="submit" name="ok" class="member_submit" - value="{--MEMBER_SAVE_THEME--}" /></td> + <td colspan="5" class="admin_footer" align="center"> + <input type="reset" class="member_reset" value="{--UNDO_SELECTIONS--}" /> + <input type="submit" name="ok" class="member_submit" value="{--MEMBER_SAVE_THEME--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/member/member_transfer_list.tpl b/templates/de/html/member/member_transfer_list.tpl index f88d53c28f..4ae14c96f1 100644 --- a/templates/de/html/member/member_transfer_list.tpl +++ b/templates/de/html/member/member_transfer_list.tpl @@ -1,26 +1,34 @@ <div align="center"> <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> - <td colspan="5" align="center" class="member_title2 bottom2" - height="30"><strong>{!__TRANSFER_TITLE!}</strong></td> + <td colspan="5" align="center" class="member_title2 bottom2" height="30"> + <strong>$content[title]</strong> + </td> </tr> <tr> <td width="80" align="center" class="member_title2 bottom2 right2"> - <strong>{--TRANSFER_ID--}</strong></td> + <strong>{--TRANSFER_ID--}</strong> + </td> <td width="120" align="center" class="member_title2 bottom2 right2"> - <strong>{--TRANSFER_STAMP--}</strong></td> + <strong>{--TRANSFER_STAMP--}</strong> + </td> <td width="120" align="center" class="member_title2 bottom2 right2"> - <strong>{--TRANSFER_PARTY--}</strong></td> + <strong>{--TRANSFER_PARTY--}</strong> + </td> <td width="230" align="center" class="member_title2 bottom2 right2"> - <strong>{--TRANSFER_POINTS_REASON--}</strong></td> - <td width="80" align="center" class="member_title2 bottom2"><strong>{?POINTS?}</strong> + <strong>{--TRANSFER_POINTS_REASON--}</strong> + </td> + <td width="80" align="center" class="member_title2 bottom2"> + <strong>{?POINTS?}</strong> </td> </tr> - {!__TRANSFER_ROWS!} + $content[rows] <tr> <td colspan="4" align="right" class="member_footer right2"> - {!__TRANSFER_SUM!} ({?POINTS?}): </td> - <td width="80" align="center" class="member_footer"><strong>{!__TRANSFER_TOTAL_VALUE!}</strong> + $content[balance] ({?POINTS?}): + </td> + <td width="80" align="center" class="member_footer"> + <strong>$content[total]</strong> </td> </tr> </table> diff --git a/templates/de/html/member/member_transfer_new.tpl b/templates/de/html/member/member_transfer_new.tpl index 0c7f5b65aa..18b0c621c1 100644 --- a/templates/de/html/member/member_transfer_new.tpl +++ b/templates/de/html/member/member_transfer_new.tpl @@ -1,61 +1,67 @@ -<form action="{?URL?}/modules.php?module=login&what=transfer&mode=new" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=transfer&mode=new" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_table dashed"> <tr> - <td align="right" width="220" class="bottom2" height="40"><strong>{--TRANSFER_SELECT_TARGET_UID--}:</strong> + <td align="right" width="220" class="bottom2" height="40"><strong> + {--TRANSFER_SELECT_TARGET_UID--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> <td align="center" width="280" class="bottom2"> - {!__TRANSFER_USERID_SELECTION!}</td> + $content[userid_selection] + </td> </tr> <tr> - <td align="right" class="bottom2" height="40"><strong>{--TRANSFER_POINTS_MAXIMUM--}:</strong> + <td align="right" class="bottom2" height="40"> + <strong>{--TRANSFER_POINTS_MAXIMUM--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> - <td class="bottom2">{!__TRANSFER_MAX_VALUE!} {?POINTS?}</td> + <td class="bottom2">$content[max_transferable] {?POINTS?}</td> </tr> <tr> - <td align="right" class="bottom2" height="40"><strong>{--TRANSFER_POINTS_AMOUNT--}:</strong> + <td align="right" class="bottom2" height="40"> + <strong>{--TRANSFER_POINTS_AMOUNT--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> - <td class="bottom2"><input type="text" name="points" - class="member_normal" size="5" maxlength="10" - value="{!__TRANSFER_POINTS_VALUE!}"{!__TRANSFER_TO_DISABLED!}> - {?POINTS?}</td> + <td class="bottom2"> + <input type="text" name="points" class="member_normal" size="5" maxlength="10" value="$content[points]"$content[to_disabled] /> + {?POINTS?} + </td> </tr> <tr> - <td align="right" class="bottom2" height="40"><strong>{--TRANSFER_POINTS_REASON--}:</strong> + <td align="right" class="bottom2" height="40"> + <strong>{--TRANSFER_POINTS_REASON--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> - <td class="bottom2"><input type="text" name="reason" - class="member_normal" size="30" maxlength="255" - value="{!__TRANSFER_REASON_VALUE!}"{!__TRANSFER_TO_DISABLED!}> + <td class="bottom2"> + <input type="text" name="reason" class="member_normal" size="30" maxlength="255" value="$content[reason]"$content[to_disabled] /> </td> </tr> <tr> - <td align="right" class="bottom2" height="40"><strong>{--TRANSFER_POINTS_SECURITY_CODE--}:</strong> + <td align="right" class="bottom2" height="40"> + <strong>{--TRANSFER_POINTS_SECURITY_CODE--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> - <td class="bottom2">{!__TRANSFER_IMAGE_INPUT!}</td> + <td class="bottom2">$content[captcha_code]</td> </tr> <tr> - <td align="right" class="bottom2" height="40"><strong>{--TRANSFER_ENTER_PASSWORD--}:</strong> + <td align="right" class="bottom2" height="40"> + <strong>{--TRANSFER_ENTER_PASSWORD--}:</strong> </td> <td width="10" class="bottom2 right2 seperator"> </td> <td width="10" class="bottom2 seperator"> </td> - <td class="bottom2"><input type="password" name="password" - class="member_normal" size="10" maxlength="255"{!__TRANSFER_TO_DISABLED!}> + <td class="bottom2"> + <input type="password" name="password" class="member_normal" size="10" maxlength="255"$content[to_disabled] /> </td> </tr> <tr> - <td colspan="4" align="center" class="member_footer"><input - type="reset" class="member_reset" value="{--CLEAR_FORM--}"{!__TRANSFER_TO_DISABLED!}> - <input type="submit" name="ok" class="member_submit" - value="{--TRANSFER_ADD_NEW--}"{!__TRANSFER_TO_DISABLED!}></td> + <td colspan="4" align="center" class="member_footer"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}"$content[to_disabled] /> + <input type="submit" name="ok" class="member_submit" value="{--TRANSFER_ADD_NEW--}"$content[to_disabled] /> + </td> </tr> </table> </form> diff --git a/templates/de/html/member/member_transfer_overview.tpl b/templates/de/html/member/member_transfer_overview.tpl index 4fb795fead..59625adee7 100644 --- a/templates/de/html/member/member_transfer_overview.tpl +++ b/templates/de/html/member/member_transfer_overview.tpl @@ -2,21 +2,24 @@ <table border="0" cellspacing="0" cellpadding="0" class="member_table dashed"> <tr> <td align="center" width="260" class="bottom2 right2" height="40"> - {--TRANSFER_LIST_INCOMING--}:<br /> - <strong>{!-__TRANSFER_IN_LINK!}</strong></td> + {--TRANSFER_LIST_INCOMING--}:<br /> + <strong>$content[in_link</strong> + </td> <td align="center" width="260" class="bottom2"> - {--TRANSFER_LIST_OUTGOING--}:<br /> - <strong>{!__TRANSFER_OUT_LINK!}</strong></td> + {--TRANSFER_LIST_OUTGOING--}:<br /> + <strong>$content[out_link]</strong> + </td> </tr> <tr> <td align="center" colspan="2" height="40" class="bottom2"> - {--TRANSFER_LIST_ALL--}:<br /> - <strong>{!__TRANSFER_ALL_LINK!}</strong></td> + {--TRANSFER_LIST_ALL--}:<br /> + <strong>$content[all_link]</strong> + </td> </tr> <tr> <td align="center" colspan="2" height="40" class="bottom2"> <strong>{--TRANSFER_TO_MEMBER_NOW--}:</strong><br /> - {!__TRANSFER_NEW_LINK!} + $content[new_link] </td> </tr> <tr> @@ -24,7 +27,8 @@ </tr> <tr> <td align="center" colspan="2" class="member_main"> - {!__TRANSFER_SETTINGS_CONTENT!}</td> + $content[settings] + </td> </tr> <tr> <td colspan="2" class="member_main seperator" height="10"> </td> diff --git a/templates/de/html/member/member_transfer_row.tpl b/templates/de/html/member/member_transfer_row.tpl index c71fe3906d..df3def0d1c 100644 --- a/templates/de/html/member/member_transfer_row.tpl +++ b/templates/de/html/member/member_transfer_row.tpl @@ -6,7 +6,7 @@ <div class="transfer_row2">$content[time]</div> </td> <td class="transfer_row3 switch_sw$content[sw] bottom2 right2"> - <div class="transfer_row3">$content[party_uid]</div> + <div class="transfer_row3">$content[party_userid]</div> </td> <td class="transfer_row4 switch_sw$content[sw] bottom2 right2"> <div class="transfer_row4">$content[reason]</div> diff --git a/templates/de/html/member/member_transfer_row2.tpl b/templates/de/html/member/member_transfer_row2.tpl index 4b7087adf2..3cdb15d4f6 100644 --- a/templates/de/html/member/member_transfer_row2.tpl +++ b/templates/de/html/member/member_transfer_row2.tpl @@ -6,7 +6,7 @@ <div class="transfer_row2">$content[stamp]</div> </td> <td class="transfer_row3 switch_sw".$content[sw] bottom2 right2"> - <div class="transfer_row3">$content[uid]</div> + <div class="transfer_row3">$content[userid]</div> </td> <td class="transfer_row4 switch_sw".$content[sw] bottom2 right2"> <div class="transfer_row4">$content[reason]</div> diff --git a/templates/de/html/member/member_transfer_settings.tpl b/templates/de/html/member/member_transfer_settings.tpl index dd12e32ebc..492dc2cd89 100644 --- a/templates/de/html/member/member_transfer_settings.tpl +++ b/templates/de/html/member/member_transfer_settings.tpl @@ -1,21 +1,18 @@ -<form action="{?URL?}/modules.php?module=login&what=transfer" - method="post" style="margin-bottom: 0px"> -<table border="0" cellspacing="0" cellpadding="0" width="420" - class="member_table dashed"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=transfer" method="post" style="margin-bottom: 0px"> +<table border="0" cellspacing="0" cellpadding="0" width="420" class="member_table dashed"> <tr> <td align="center" width="260" class="admin_title bottom2" height="50"> {--TRANSFER_ALLOW_OPT_IN--}</td> <td align="center" width="160" class="admin_title bottom2" height="50"> - {--YES--}: <input type="radio" name="opt_in" - class="member_normal" value="Y"{!__TRANSFER_ALLOW_Y!} /> - {--NO--}: <input type="radio" name="opt_in" class="member_normal" - value="N"{!__TRANSFER_ALLOW_N!} /></td> + {--YES--}: <input type="radio" name="opt_in" class="member_normal" value="Y"$content[allow_y] /> + {--NO--}: <input type="radio" name="opt_in" class="member_normal" value="N"$content[allow_n] /> + </td> </tr> <tr> - <td align="center" colspan="2" height="40"><input type="reset" - class="member_reset" value="{--CLEAR_FORM--}" /> <input - type="submit" class="member_submit" name="ok" - value="{--SAVE_SETTINGS--}" /></td> + <td align="center" colspan="2" height="40"> + <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> + <input type="submit" class="member_submit" name="ok" value="{--SAVE_SETTINGS--}" /> + </td> </tr> </table> </form> diff --git a/templates/de/html/member/member_unconfirmed_row.tpl b/templates/de/html/member/member_unconfirmed_row.tpl index e0c05289f5..d7b930eba1 100644 --- a/templates/de/html/member/member_unconfirmed_row.tpl +++ b/templates/de/html/member/member_unconfirmed_row.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom right"> - [<a href="{?URL?}/mailid.php?uid=$content[uid]&$content[type]=$content[data]" + [<a href="{?URL?}/mailid.php?userid=$content[userid]&$content[type]=$content[data]" target="_blank" title="{--CONFIRM_LINK--}">$content[data]</a>] </td> <td align="center" class="switch_sw$content[sw] bottom right"> diff --git a/templates/de/html/member/member_unconfirmed_row_nopoints.tpl b/templates/de/html/member/member_unconfirmed_row_nopoints.tpl index b4bb8412f9..01af416866 100644 --- a/templates/de/html/member/member_unconfirmed_row_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_row_nopoints.tpl @@ -1,6 +1,6 @@ <tr> <td align="center" class="switch_sw$content[sw] bottom right"> - [<a href="{?URL?}/mailid.php?uid=$content[uid]&$content[type]=$content[data]" + [<a href="{?URL?}/mailid.php?userid=$content[userid]&$content[type]=$content[data]" target="_blank" title="{--CONFIRM_LINK--}">$content[data]</a>] </td> <td align="center" class="switch_sw$content[sw] bottom right"> diff --git a/templates/de/html/member/member_unconfirmed_table.tpl b/templates/de/html/member/member_unconfirmed_table.tpl index a066c0f2d1..8171859714 100644 --- a/templates/de/html/member/member_unconfirmed_table.tpl +++ b/templates/de/html/member/member_unconfirmed_table.tpl @@ -6,13 +6,13 @@ <td width="150" class="member_header bottom right" align="center"><strong>{--EMAIL_TIMESTAMP--}:</strong></td> <td width="120" class="member_header bottom" align="center"><strong>{--EMAIL_POINTS--}:</strong></td> </tr> -{!__UNCONFIRMED_ROWS!} +$content[rows] <tr> <td align="right" class="member_footer right" colspan="4" style="padding-right:5px"> <strong>{--POINTS_SUM--}:</strong> </td> <td align="right" class="member_footer" style="padding-right:5px"> - <strong>{!__TOTAL_POINTS!} {?POINTS?}</strong> + <strong>$content[total_points] {?POINTS?}</strong> </td> </tr> </table> diff --git a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl index baca9e1d59..df69007ad5 100644 --- a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl @@ -5,7 +5,7 @@ <td width="180" class="member_header bottom right" align="center"><strong>{--EMAIL_DETAILS--}:</strong></td> <td width="160" class="member_header bottom right" align="center"><strong>{--EMAIL_TIMESTAMP--}:</strong></td> </tr> -{!__UNCONFIRMED_ROWS!} +$content[rows] <tr> <td class="member_footer seperator" colspan="4"> diff --git a/templates/de/html/member/member_wernis.tpl b/templates/de/html/member/member_wernis.tpl index f386067603..11f5d85d80 100644 --- a/templates/de/html/member/member_wernis.tpl +++ b/templates/de/html/member/member_wernis.tpl @@ -1,17 +1 @@ -<table border="0" cellspacing="0" cellpadding="0" width="680" - class="member_table dashed" align="center"> - <tr> - <td colspan="4" align="center" class="member_title2" height="30"> - <strong>{--WERNIS_MEMBER_LIST_WERNIS--}:</strong></td> - </tr> - <tr> - <td width="180" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_TOTAL_WERNIS--}</strong></td> - <td width="130" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_TARGET_ACCOUNT2--}</strong></td> - <td width="150" align="center" class="member_title2 bottom2 right2"><strong>{--WERNIS_TIMESTAMP--}</strong></td> - <td width="120" align="center" class="member_title2 bottom2"><strong>{--WERNIS_MEMBER_STATUS--}</strong></td> - </tr> - {!__WERNIS_ROWS!} - <tr> - <td colspan="4" class="seperator member_footer" height="10"> </td> - </tr> -</table> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/member/member_wernis_mode_payout.tpl b/templates/de/html/member/member_wernis_mode_payout.tpl index c6f6ba99f9..00ef051cd9 100644 --- a/templates/de/html/member/member_wernis_mode_payout.tpl +++ b/templates/de/html/member/member_wernis_mode_payout.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=wernis&mode=payout" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=wernis&mode=payout" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed"> <tr> <td colspan="3" align="center" class="member_title2 bottom2" diff --git a/templates/de/html/member/member_wernis_mode_withdraw.tpl b/templates/de/html/member/member_wernis_mode_withdraw.tpl index 9c9b6f1425..7ea34e47cc 100644 --- a/templates/de/html/member/member_wernis_mode_withdraw.tpl +++ b/templates/de/html/member/member_wernis_mode_withdraw.tpl @@ -1,4 +1,4 @@ -<form action="{?URL?}/modules.php?module=login&what=wernis&mode=withdraw" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=wernis&mode=withdraw" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed"> <tr> <td colspan="3" align="center" class="member_title2 bottom2" height="30"> diff --git a/templates/de/html/member/member_wernis_row.tpl b/templates/de/html/member/member_wernis_row.tpl index c223baa771..11f5d85d80 100644 --- a/templates/de/html/member/member_wernis_row.tpl +++ b/templates/de/html/member/member_wernis_row.tpl @@ -1,6 +1 @@ -<tr> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[points] Wernis</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[acc]</td> - <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[stamp]</td> - <td align="center" class="switch_sw$content[sw] bottom2">$content[status]</td> -</tr> +<!-- @DEPRECATED //--> diff --git a/templates/de/html/menu/.htaccess b/templates/de/html/menu/.htaccess new file mode 100644 index 0000000000..3a42882788 --- /dev/null +++ b/templates/de/html/menu/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/templates/de/html/menu/menu_guest_advert_end.tpl b/templates/de/html/menu/menu_guest_advert_end.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_guest_advert_end.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_guest_advert_main.tpl b/templates/de/html/menu/menu_guest_advert_main.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_guest_advert_main.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_guest_advert_members.tpl b/templates/de/html/menu/menu_guest_advert_members.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_guest_advert_members.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_guest_advert_online.tpl b/templates/de/html/menu/menu_guest_advert_online.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_guest_advert_online.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_account.tpl b/templates/de/html/menu/menu_member_advert_account.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_account.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_bank.tpl b/templates/de/html/menu/menu_member_advert_bank.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_bank.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_end.tpl b/templates/de/html/menu/menu_member_advert_end.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_end.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_extras.tpl b/templates/de/html/menu/menu_member_advert_extras.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_extras.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_main.tpl b/templates/de/html/menu/menu_member_advert_main.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_main.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_order.tpl b/templates/de/html/menu/menu_member_advert_order.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_order.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_rals.tpl b/templates/de/html/menu/menu_member_advert_rals.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_rals.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_stats.tpl b/templates/de/html/menu/menu_member_advert_stats.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_stats.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_surfbar.tpl b/templates/de/html/menu/menu_member_advert_surfbar.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_surfbar.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_member_advert_themes.tpl b/templates/de/html/menu/menu_member_advert_themes.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_themes.tpl @@ -0,0 +1,6 @@ +<tr> + <td class="menu_advert"> + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Hier könnte Ihre Werbung stehen!</a> + <!-- Fuegen Sie hier Ihre Werbung ein! //--> + </td> +</tr> diff --git a/templates/de/html/menu/menu_seperator.tpl b/templates/de/html/menu/menu_seperator.tpl new file mode 100644 index 0000000000..f2cb490927 --- /dev/null +++ b/templates/de/html/menu/menu_seperator.tpl @@ -0,0 +1 @@ +<tr><td class="$content_menu_seperator"></td></tr> diff --git a/templates/de/html/menu/menu_table.tpl b/templates/de/html/menu/menu_table.tpl new file mode 100644 index 0000000000..f3e0185776 --- /dev/null +++ b/templates/de/html/menu/menu_table.tpl @@ -0,0 +1,3 @@ +<table border="0" cellspacing="0" cellpadding="0" class="$content[mode]_menu"> +$content[rows] +</table> diff --git a/templates/de/html/menu/menu_what_begin.tpl b/templates/de/html/menu/menu_what_begin.tpl new file mode 100644 index 0000000000..5cf8026782 --- /dev/null +++ b/templates/de/html/menu/menu_what_begin.tpl @@ -0,0 +1,2 @@ +<tr> + <td class="$content_menu_whats"> diff --git a/templates/de/html/menu/menu_what_end.tpl b/templates/de/html/menu/menu_what_end.tpl new file mode 100644 index 0000000000..0d55a44aba --- /dev/null +++ b/templates/de/html/menu/menu_what_end.tpl @@ -0,0 +1,2 @@ + </td> +</tr> diff --git a/templates/de/html/page_header.tpl b/templates/de/html/page_header.tpl index 01fc06f87b..ba0023810b 100644 --- a/templates/de/html/page_header.tpl +++ b/templates/de/html/page_header.tpl @@ -1,7 +1,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> -<title>{!__PAGE_TITLE!}</title> +<title>$content[header_title]</title> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> diff --git a/templates/de/html/profile-update.tpl b/templates/de/html/profile-update.tpl index 8b9eac8e6e..4c1eb55fce 100644 --- a/templates/de/html/profile-update.tpl +++ b/templates/de/html/profile-update.tpl @@ -21,7 +21,7 @@ <br /> Bitte haben Sie nochmals für diese Massnahme Verständnis. Auch wir möchten aktuelle Daten haben, damit wir unseren - {?MT_WORD?} reibungslos betreiben können und es kommt auch + {?mt_word?} reibungslos betreiben können und es kommt auch unseren Werbekunden zugute.</td> <td width="10" class="seperator"> </td> </tr> @@ -33,13 +33,13 @@ </tr> <tr> <td align="center" class="left2" width="50%"> - <form action="{?URL?}/modules.php?module=login&what=mydata" + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-top: 0px"><input type="submit" name="notify" class="member_reset" value="Benachrichtigung abschalten"></form> </td> <td align="center" class="right2" width="50%"> - <form action="{?URL?}/modules.php?module=login&what=mydata" + <form accept-charset="utf-8" action="{?URL?}/modules.php?module=login&what=mydata" method="post" style="margin-top: 0px"><input type="submit" name="edit" class="member_reset" value="Profildaten ändern"> </form> diff --git a/templates/de/html/rallye/.htaccess b/templates/de/html/rallye/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/rallye/.htaccess +++ b/templates/de/html/rallye/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/redirect_url.tpl b/templates/de/html/redirect_url.tpl index dc5caa5cc0..e0acbd40e0 100644 --- a/templates/de/html/redirect_url.tpl +++ b/templates/de/html/redirect_url.tpl @@ -1,5 +1,5 @@ <noscript>{--LOAD_URL_ERROR_1--}<a href="$content" rel="external" title="$content">$content</a>{--LOAD_URL_ERROR_2--}</noscript> -<script language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- document.location.href='$content'; //--> diff --git a/templates/de/html/register_header.tpl b/templates/de/html/register_header.tpl index 0a05dbb1e1..8cc84651c5 100644 --- a/templates/de/html/register_header.tpl +++ b/templates/de/html/register_header.tpl @@ -1 +1 @@ -Anmeldeformular zum {?MT_WORD?} <strong>{?MAIN_TITLE?}</strong>: +Anmeldeformular zum {?mt_word?} <strong>{?MAIN_TITLE?}</strong>: diff --git a/templates/de/html/removeip_level.tpl b/templates/de/html/removeip_level.tpl index d3b0ef1448..d2c2655036 100644 --- a/templates/de/html/removeip_level.tpl +++ b/templates/de/html/removeip_level.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" width="350"> <tr> <td class="admin_title bottom2"> - Anonymitätslevel in diesem {?MT_WORD?}: + Anonymitätslevel in diesem {?mt_word?}: </td> </tr> <tr> diff --git a/templates/de/html/show_bonus.tpl b/templates/de/html/show_bonus.tpl index 5cc32235d5..eba8d27d63 100644 --- a/templates/de/html/show_bonus.tpl +++ b/templates/de/html/show_bonus.tpl @@ -6,7 +6,7 @@ </tr> <tr> <td height="80%" align="center"> - $content[msg] + $content[message] </td> </tr> <tr> diff --git a/templates/de/html/show_bonus_msg.tpl b/templates/de/html/show_bonus_msg.tpl index e4d8c95ba6..7d9bcd41e7 100644 --- a/templates/de/html/show_bonus_msg.tpl +++ b/templates/de/html/show_bonus_msg.tpl @@ -6,8 +6,8 @@ <br /> <table border="0" cellspacing="0" cellpadding="0" width="300" class="member_table dashed"> <tr> - <td width="80" align="center" class="member_header bottom2"><strong>{!BONUS_RANK!}:</strong></td> - <td width="120" align="center" class="member_header bottom2"><strong>{!_UID!}:</strong></td> + <td width="80" align="center" class="member_header bottom2"><strong>{--BONUS_RANK--}:</strong></td> + <td width="120" align="center" class="member_header bottom2"><strong>{--_UID--}:</strong></td> <td width="100" align="center" class="member_header bottom2"><strong>{?POINTS?}:</strong></td> </tr> $content[rows] @@ -16,7 +16,7 @@ </tr> </table> -<div>{!__YOUR_RANKING_LINE!}</div> +<div>{?__rankings?}</div> <div class="member_note"> Wir wünschen allen Gewinnern viel Glück bei der monatlichen Aktiv-Rallye!<br /> diff --git a/templates/de/html/show_bonus_yr.tpl b/templates/de/html/show_bonus_yr.tpl index 49fe61c5f1..0f7238870b 100644 --- a/templates/de/html/show_bonus_yr.tpl +++ b/templates/de/html/show_bonus_yr.tpl @@ -1,8 +1,9 @@ <table border="0" cellspacing="0" cellpadding="0" width="300" class="member_table"> <tr> - <td align="center">{--BONUS_SHOW_YOU_HAVE_CONFIRMED--} <strong - class="nobr">{!__YR_TMARK!}</strong> {--_ON--} <strong>{!__YR_LEVEL!}.</strong> - {--BONUS_SHOW_CONFIRMED_BONUS_IS--}: <div class="nobr">{!__YR_POINTS!} - {?POINTS?}</strong></td> + <td align="center"> + {--BONUS_SHOW_YOU_HAVE_CONFIRMED--} <strong class="nobr">$content[yr_tmark]</strong> + {--_ON--} <strong>$content[yr_level].</strong> + {--BONUS_SHOW_CONFIRMED_BONUS_IS--}: <strong class="nobr">$content[yr_points] ?POINTS?}</strong> + </td> </tr> </table> diff --git a/templates/de/html/show_timings.tpl b/templates/de/html/show_timings.tpl index a3cbea352e..bb27d71d92 100644 --- a/templates/de/html/show_timings.tpl +++ b/templates/de/html/show_timings.tpl @@ -4,10 +4,13 @@ {--SHOW_TIMINGS_RUNTIME--} <span class="show_timings_data">$content[runtime]</span> {--SHOW_TIMINGS_SECS--} </span></li> <li class="show_timings_column" style="margin-left: 2px"><span class="show_timings_column"> - {--SHOW_TIMINGS_SQL_QUERIES--} <span class="show_timings_data">$content[numSQLs]</span> + {--SHOW_TIMINGS_SQL_QUERIES--} <span class="show_timings_data">{?sql_count?}</span> + </span></li> + <li class="show_timings_column" style="margin-left: 2px"><span class="show_timings_column"> + {--SHOW_TIMINGS_SQL_TIME--} <span class="show_timings_data">$content[timeSQLs] ms</span> </span></li> <li class="show_timings_column" style="margin-right: 2px"><span class="show_timings_column"> - {--SHOW_TIMINGS_NUM_TEMPLATES--} <span class="show_timings_data">$content[numTemplates]</span> + {--SHOW_TIMINGS_NUM_TEMPLATES--} <span class="show_timings_data">{?num_templates?}</span> </span></li> </ul> </div> diff --git a/templates/de/html/sponsor/sponsor_account_form.tpl b/templates/de/html/sponsor/sponsor_account_form.tpl index 1eaa6ea986..164dafa8da 100644 --- a/templates/de/html/sponsor/sponsor_account_form.tpl +++ b/templates/de/html/sponsor/sponsor_account_form.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=sponsor&what=account" method="post" style="padding-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=sponsor&what=account" method="post" style="padding-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="550" class="sponsor_table dashed"> <tr> <td colspan="2" align="center" class="sponsor_header bottom2" height="32"> @@ -41,9 +41,9 @@ </td> <td class="bottom2" width="275"> <select name="gender" class="guest_select" size="1"> - <option value="M"{!__GENDER_M!}>{--GENDER_M--}</option> - <option value="F"{!__GENDER_F!}>{--GENDER_F--}</option> - <option value="C"{!__GENDER_C!}>{--GENDER_C--}</option> + <option value="M"$content[gender_m]>{--GENDER_M--}</option> + <option value="F"$content[gender_f]>{--GENDER_F--}</option> + <option value="C"$content[gender_c]>{--GENDER_C--}</option> </select> </td> </tr> diff --git a/templates/de/html/sponsor/sponsor_fillup_form.tpl b/templates/de/html/sponsor/sponsor_fillup_form.tpl index 6d25d3b517..64c88a73d0 100644 --- a/templates/de/html/sponsor/sponsor_fillup_form.tpl +++ b/templates/de/html/sponsor/sponsor_fillup_form.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=sponsor&what=fillup" method="post" style="padding-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=sponsor&what=fillup" method="post" style="padding-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="450" class="sponsor_table dashed"> <tr> <td class="sponsor_header bottom2" colspan="2" align="center" height="37"> diff --git a/templates/de/html/sponsor/sponsor_main.tpl b/templates/de/html/sponsor/sponsor_main.tpl index 16953f968b..331dcd1fc1 100644 --- a/templates/de/html/sponsor/sponsor_main.tpl +++ b/templates/de/html/sponsor/sponsor_main.tpl @@ -2,21 +2,21 @@ <table border="0" cellspacing="0" cellpadding="0" class="sponsor_table" width="100%" height="100%"> <tr> <td colspan="2" class="sponsor_header" align="center" height="75"> - {!__SPONSOR_HEADER!} + $content[header] </td> </tr> <tr> <td width="200" class="top2" align="center" valign="top"> - {!__SPONSOR_MENU!} + $content[menu] </td> <td align="left" valign="top" style="padding-left: 5px; padding-right: 5px"> - {!__SPONSOR_YOURE_HERE!} - {!__SPONSOR_CONTENT!} + $content[you_are_here] + $content[content] </td> </tr> <tr> <td colspan="2" class="sponsor_table_footer" align="center" height="75"> - {!__SPONSOR_FOOTER!} + $content[footer] </td> </tr> </table> diff --git a/templates/de/html/sponsor/sponsor_settings_form.tpl b/templates/de/html/sponsor/sponsor_settings_form.tpl index 451f2ecb7d..089d9f341c 100644 --- a/templates/de/html/sponsor/sponsor_settings_form.tpl +++ b/templates/de/html/sponsor/sponsor_settings_form.tpl @@ -1,5 +1,5 @@ <div align="center"> -<form action="{?URL?}/modules.php?module=sponsor&what=settings" method="post" style="padding-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/modules.php?module=sponsor&what=settings" method="post" style="padding-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" width="550" class="sponsor_table dashed"> <tr> <td colspan="2" align="center" class="sponsor_header bottom2" height="32"> @@ -11,8 +11,8 @@ {--GUEST_SPONSOR_RECEIVE_WARNINGS--} </td> <td class="bottom2" width="275" align="center"> - {--YES--}<input type="radio" name="receive_warnings" class="guest_normal" value="Y"{!__YES!} /> - {--NO--}<input type="radio" name="receive_warnings" class="guest_normal" value="N"{!__NO!} /> + {--YES--}<input type="radio" name="receive_warnings" class="guest_normal" value="Y"$content[receive_warnings_y] /> + {--NO--}<input type="radio" name="receive_warnings" class="guest_normal" value="N"$content[receive_warnings_n] /> </td> </tr> <tr> @@ -21,13 +21,13 @@ </td> <td class="bottom2" width="275" align="center"> <select name="warning_interval" class="guest_select" size="1"> - <option value="$content[warning_interval]">{!__CURRENT!}</option> - <option value="{--({?one_day?}*1)--}">1 {--DAYS--}</option> - <option value="{--({?one_day?}*3)--}">3 {--DAYS--}</option> - <option value="{--({?one_day?}*7)--}">1 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*14)--}">2 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*28)--}">4 {--LIFE_WEEKS--}</option> - <option value="{--({?one_day?}*56)--}">8 {--LIFE_WEEKS--}</option> + <option value="$content[warning_interval]">$content[current]</option> + <option value="{--({?ONE_DAY?}*1)--}">1 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*3)--}">3 {--DAYS--}</option> + <option value="{--({?ONE_DAY?}*7)--}">1 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*14)--}">2 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*28)--}">4 {--LIFE_WEEKS--}</option> + <option value="{--({?ONE_DAY?}*56)--}">8 {--LIFE_WEEKS--}</option> </select> </td> </tr> diff --git a/templates/de/html/sponsor/sponsor_welcome.tpl b/templates/de/html/sponsor/sponsor_welcome.tpl index 19cc023f12..9aae304cb6 100644 --- a/templates/de/html/sponsor/sponsor_welcome.tpl +++ b/templates/de/html/sponsor/sponsor_welcome.tpl @@ -1,5 +1,5 @@ -Hallo {!__GENDER!} {!__SURNAME!} {!__FAMILY!}!<br /> +Hallo $content[gender] $content[surname] $content[family]!<br /> <br /> Schön, dass wir Sie wieder in unserem Sponsorenbereich begrüssen dürfen!<br /> <br /> -Sie haben noch {!__POINTS!} {?POINTS?} für weitere Sponsorenaktionen übrig. +Sie haben noch <strong>$content[points] {?POINTS?}</strong> für weitere Sponsorenaktionen übrig. diff --git a/templates/de/html/surfbar/.htaccess b/templates/de/html/surfbar/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/surfbar/.htaccess +++ b/templates/de/html/surfbar/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/surfbar/surfbar_frame_stats.tpl b/templates/de/html/surfbar/surfbar_frame_stats.tpl index d10b4749d0..e2d7cdc9d0 100644 --- a/templates/de/html/surfbar/surfbar_frame_stats.tpl +++ b/templates/de/html/surfbar/surfbar_frame_stats.tpl @@ -11,7 +11,7 @@ </td> </tr> </table> -<script language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- function Reload() { this.location.href='{?URL?}/surfbar.php?frame=textlinks'; diff --git a/templates/de/html/surfbar/surfbar_frame_textlinks.tpl b/templates/de/html/surfbar/surfbar_frame_textlinks.tpl index 7e44a69302..7c0ea807dc 100644 --- a/templates/de/html/surfbar/surfbar_frame_textlinks.tpl +++ b/templates/de/html/surfbar/surfbar_frame_textlinks.tpl @@ -1,16 +1,15 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table"> <tr> <td id="surfbar_td"> - »Jetzt Online: <span id="surfbar_counter">$content[online]</span>« - <a - href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink - hier?</a> - <a href="{?URL?}/modules.php?module=index&what=impressum" - target="_blank">Ihr Textlink hier?</a> - <a - href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink hier?</a> - <!-- Maximal 18 Pixel Hoehe, gut geeignet fuer Textlinks! //--> + »Jetzt Online: <span id="surfbar_counter">$content[online]</span>« - + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink hier?</a> - + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink hier?</a> - + <a href="{?URL?}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink hier?</a> + <!-- Maximal 18 Pixel Hoehe, gut geeignet fuer Textlinks! //--> </td> </tr> </table> -<script language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- function Reload() { this.location.href='{?URL?}/surfbar.php?frame=stats'; diff --git a/templates/de/html/surfbar/surfbar_frame_top.tpl b/templates/de/html/surfbar/surfbar_frame_top.tpl index 95383d810a..648e025eba 100644 --- a/templates/de/html/surfbar/surfbar_frame_top.tpl +++ b/templates/de/html/surfbar/surfbar_frame_top.tpl @@ -1,7 +1,7 @@ <table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table"> <tr> <td id="surfbar_td"> - »<span id="surfbar_points">$content[xxx],$content[xxx]</span> {?POINTS?} in + »<span id="surfbar_points">$content[xxx],$content[xxx] {?POINTS?}</span> in <span id="surfbar_counter">$content[xxx]</span> <span id="surfbar_counter_word">Sekunden</span>« »<span id="surfbar_reload">X</span> von <span @@ -18,8 +18,9 @@ </td> </tr> </table> -<script language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- +// @TODO Try to rewrite this JavaScript to js.php?js=surfbar_frame_top (wouldn't be easy) var currCounter = "$content[reload]"; var maxCounter = "$content[reload]"; var counter = document.getElementById("surfbar_counter"); diff --git a/templates/de/html/surfbar/surfbar_frameset.tpl b/templates/de/html/surfbar/surfbar_frameset.tpl index f0e3399576..7fdfe3d10a 100644 --- a/templates/de/html/surfbar/surfbar_frameset.tpl +++ b/templates/de/html/surfbar/surfbar_frameset.tpl @@ -1,4 +1,4 @@ -<script language="JavaScript" type="text/javascript"> +<script type="text/javascript"> <!-- if (top.frames.length > 0) { top.location.href=self.location; diff --git a/templates/de/html/surfbar/surfbar_login_form.tpl b/templates/de/html/surfbar/surfbar_login_form.tpl index 2cbec62bac..e1bdf46c9d 100644 --- a/templates/de/html/surfbar/surfbar_login_form.tpl +++ b/templates/de/html/surfbar/surfbar_login_form.tpl @@ -1,5 +1,5 @@ <div align="center" style="margin-bottom: 10px"> -<form action="{?URL?}/surfbar.php" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="{?URL?}/surfbar.php" method="post" style="margin-bottom: 0px"> <table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed" width="480"> <tr> <td colspan="9" height="3" class="seperator"> </td> diff --git a/templates/de/html/surfbar/surfbar_stopped.tpl b/templates/de/html/surfbar/surfbar_stopped.tpl index 829000cf05..8305e61aec 100644 --- a/templates/de/html/surfbar/surfbar_stopped.tpl +++ b/templates/de/html/surfbar/surfbar_stopped.tpl @@ -5,46 +5,12 @@ </div> <div id="surfbar_button"> - Keine URLs mehr verfürgbar oder Datenbankfehler liegt vor.<br /> + Keine URLs mehr verfügbar oder Datenbankfehler liegt vor.<br /> Neustart in <span id="surfbar_counter">$content[start]</span> Sekunden </div> </div> </div> -<script language="JavaScript" type="text/javascript"> -<!-- -var interval = null; -var counter = "$content[restart]"; -var timer = document.getElementById("surfbar_counter"); -var buttonDiv = document.getElementById("surfbar_button"); - -function Restart () { - this.location.reload(); -} - -function ShowButton () { - buttonDiv.innerHTML = "<form action='{?URL?}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' id='member_submit' value='Surfbar erneut starten' /></form>"; -} - -function Counter () { - if (counter == 0) { - if ($content[autostart] == true) { - Restart(); - } else { - ShowButton(); - } - window.clearInterval(interval); - } else { - counter--; - timer.innerHTML = counter; - } -} - -function Init () { - interval = window.setInterval("Counter()", 1000); - timer.innerHTML = "$content[restart]"; -} - -window.setTimeout("Init()", 500); -//--> +<script type="text/javascript" + src="{?URL?}/js.php?js=surfbar_stopped{%version=surfbar%}&restart=$content[restart]&autostart=$content[autostart]"> </script> diff --git a/templates/de/html/task/.htaccess b/templates/de/html/task/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/task/.htaccess +++ b/templates/de/html/task/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/task/task_ext_deactivated.tpl b/templates/de/html/task/task_ext_deactivated.tpl index bd90d85155..5fac56efa1 100644 --- a/templates/de/html/task/task_ext_deactivated.tpl +++ b/templates/de/html/task/task_ext_deactivated.tpl @@ -1,4 +1,4 @@ -Es wurde die Erweiterung <strong>$content</strong> in Ihrem {?MT_WORD?} +Es wurde die Erweiterung <strong>$content</strong> in Ihrem {?mt_word?} automatisch deaktiviert, da sie veraltet ist und bald von mxchange.org nicht mehr unterstützt wird. Bitte schauen Sie in <a href="http://forum.mxchange.org/forum-6.html" title="Direktlink zu den Forenankündigungen" target="_blank">den diff --git a/templates/de/html/theme/.htaccess b/templates/de/html/theme/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/theme/.htaccess +++ b/templates/de/html/theme/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/theme/theme_one.tpl b/templates/de/html/theme/theme_one.tpl index ecccf0a9ad..11bff0301c 100644 --- a/templates/de/html/theme/theme_one.tpl +++ b/templates/de/html/theme/theme_one.tpl @@ -1,5 +1,5 @@ {--CURR_THEME_IS_1--} <br /> -<div class="theme_note">{!__THEME_NAME!}</div> +<div class="theme_note">$content</div> <br /> {--CURR_THEME_IS_2--} diff --git a/templates/de/html/theme/theme_select_form.tpl b/templates/de/html/theme/theme_select_form.tpl index 65ab6637c1..579eb7be8b 100644 --- a/templates/de/html/theme/theme_select_form.tpl +++ b/templates/de/html/theme/theme_select_form.tpl @@ -1,4 +1,4 @@ -<form action="$content[form_action]" method="post" style="margin-bottom: 0px"> +<form accept-charset="utf-8" action="$content[form_action]" method="post" style="margin-bottom: 0px"> <select name="new_theme" class="guest_select"> $content[selection] </select> diff --git a/templates/de/html/uberwach/.htaccess b/templates/de/html/uberwach/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/de/html/uberwach/.htaccess +++ b/templates/de/html/uberwach/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/templates/de/html/uberwach/uberwach_snippet.tpl b/templates/de/html/uberwach/uberwach_snippet.tpl index 6741b7f18c..fc08e3a29e 100644 --- a/templates/de/html/uberwach/uberwach_snippet.tpl +++ b/templates/de/html/uberwach/uberwach_snippet.tpl @@ -3,6 +3,6 @@ <script type="text/javascript">/* <![CDATA[ */ au_ip='$REMOTE_ADDR'; /* ]]> */</script> -<script type="text/javascript" src="{?URL?}/js.php?tag=uberwach"></script> +<script type="text/javascript" src="{?URL?}/js.php?js=uberwach{%version=uberwach%}"></script> <noscript><a href="http://www.uberwach.de/" rel="external" target="_blank" title="Aktion: Ueberwach!"><img src="http://www.uberwach.de/wanze.gif" alt="Aktion UBERWACH!" width="80" height="15" border="0" /></a></noscript> <!-- ende uberwach code --> diff --git a/templates/de/html/welcome.tpl b/templates/de/html/welcome.tpl index a39186a93f..0e36e1a92a 100644 --- a/templates/de/html/welcome.tpl +++ b/templates/de/html/welcome.tpl @@ -1,26 +1,24 @@ -<div align="center"><strong>Willkommen zu unserem {?MT_WORD?}!</strong></div> +<div align="center"><strong>Willkommen zu unserem {?mt_word?}!</strong></div> <br /> -Nach der Anmeldung bei uns, bekommen Sie in regelmäßigen +Nach der Anmeldung bei {?MAIN_TITLE?}, bekommen Sie in regelmäßigen Abständen Webtipps und Produktinformationen per Email zugesendet. Nachdem Sie die Mails gelesen haben, können Sie diese bestätigen. Das erfolgt über einen Link der in der Email -vorhanden ist. Das System schreibt Ihnen danach {?POINTS?} auf Ihrem -Guthaben-Konto bei uns gut. Diese {?POINTS?} können Sie dann -später in Mails tauschen und verschiedene Mails mit Ihrer Werbung -(zum Beispiel Werbung für Ihre Homepage, für ein anderes -Projekt oder Produkt Ihrer Wahl) an andere User senden. Die Teilnahme -ist selbstverständlich kostenlos und verpflichtet Sie zu nichts ! -<br /> +vorhanden ist. Das System schreibt Ihnen danach die {?POINTS?} auf Ihrem +Guthaben-Konto gut. Diese {?POINTS?} können Sie dann später in Mails +tauschen und verschiedene Mails mit Ihrer Werbung (zum Beispiel Werbung für +Ihre Homepage, für ein anderes Projekt oder Produkt Ihrer Wahl) an andere +User senden. Die Teilnahme ist selbstverständlich kostenlos und +verpflichtet Sie zu nichts!<br /> <br /> Als Startguthaben erhalten Sie von uns für Ihre kostenlose -Anmeldung derzeit -<br /> +Anmeldung derzeit<br /> <br /> -<div align="center"><big><big>$content[register]</big> {?POINTS?}!</big></div> +<div align="center"><big class="nobr"><big>$content[register]</big> {?POINTS?}!</big></div> <br /> -Für jeden User, den Sie geworben haben erhalten Sie <strong>$content[ref_points]</strong> {?POINTS?} +Für jeden User, den Sie geworben haben erhalten Sie <strong>$content[ref_points]</strong> <span class="tiny">({?POINTS?})</span> plus prozentualen Verdienst über <strong>$content[ref_levels]</strong> Referal-Ebenen hinweg!<br /> <br /> Angesammelte {?POINTS?} können versteigert oder verkauft werden Der -Käufer muss dabei jedoch Mitglied bei uns sein oder werden.. +Käufer muss dabei jedoch Mitglied bei {?MAIN_TITLE?} sein oder werden.. diff --git a/templates/en/html/admin/admin_welcome.tpl b/templates/en/html/admin/admin_welcome.tpl index ff5a0dc8c4..619da679f5 100644 --- a/templates/en/html/admin/admin_welcome.tpl +++ b/templates/en/html/admin/admin_welcome.tpl @@ -1,3 +1,3 @@ <strong>: : : Welcome to the administration's area : : :</strong> <br /> -<div align="left" class="tiny">Hello $username !</div> \ No newline at end of file +<div align="left" class="tiny">Hello $username !</div> diff --git a/templates/en/html/mailid/.htaccess b/templates/en/html/mailid/.htaccess index 03688ee918..3a42882788 100644 --- a/templates/en/html/mailid/.htaccess +++ b/templates/en/html/mailid/.htaccess @@ -1 +1 @@ -Deny from all +Deny from all diff --git a/theme/business/css/active.css b/theme/business/css/active.css index 7a41f23f21..0d6facc245 100644 --- a/theme/business/css/active.css +++ b/theme/business/css/active.css @@ -1,4 +1,4 @@ -.active_row1,.active_row2,.active_row3 { +.active_row1, .active_row2, .active_row3 { text-align: center; padding-left: 5px; padding-right: 5px; @@ -6,4 +6,4 @@ .active_row2 { text-align: left; -} \ No newline at end of file +} diff --git a/theme/business/css/beg.css b/theme/business/css/beg.css index 5387e1bb98..807629b63b 100644 --- a/theme/business/css/beg.css +++ b/theme/business/css/beg.css @@ -6,4 +6,4 @@ background-color: #EEEEFF; padding-left: 10px; padding-right: 10px; -} \ No newline at end of file +} diff --git a/theme/business/css/bonus.css b/theme/business/css/bonus.css index 9ad71cef33..269913ecbd 100644 --- a/theme/business/css/bonus.css +++ b/theme/business/css/bonus.css @@ -10,4 +10,4 @@ .bonus_rank_3 { font-weight: bold; -} \ No newline at end of file +} diff --git a/theme/business/css/doubler.css b/theme/business/css/doubler.css index 66b5f6ac9f..2efc253e73 100644 --- a/theme/business/css/doubler.css +++ b/theme/business/css/doubler.css @@ -24,4 +24,4 @@ .doubler_footer { height: 24px; background-color: #EEEEFF; -} \ No newline at end of file +} diff --git a/theme/business/css/general.css b/theme/business/css/general.css index 4449ba66b1..56e49bfbd0 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -51,14 +51,14 @@ ul,ol { margin-bottom: 0px; } -.admin_reset,.guest_reset,.member_reset { +.admin_reset, .guest_reset, .member_reset { border-style: groove; border: solid 1px #000000; color: #000000; cursor: pointer; } -.admin_submit,.guest_submit,.member_submit { +.admin_submit, .guest_submit, .member_submit { color: #000000; border-color: #000000; cursor: pointer; @@ -71,7 +71,7 @@ ul,ol { cursor: pointer; } -.runtime_fatal,.runtime_fatalcontent { +.runtime_fatal, .runtime_fatalcontent { color: #000000; background-color: #FFFFFF; } @@ -106,7 +106,7 @@ DIV.admin_note { font-size: 18px; } -.admin_edit,.member_confirm { +.admin_edit, .member_confirm { background-color: #FFFFFF; } @@ -121,12 +121,12 @@ DIV.admin_note { font-size: 10px; } -.admin_select,.guest_select,.member_select { +.admin_select, .guest_select, .member_select { border: solid 1px #000000; background-color: #EEEEFF; } -.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message +.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message { background-color: #EEEEFF; color: #000000; @@ -142,7 +142,7 @@ DIV.admin_note { font-size: 14px; } -.member_done,.guest_done { +.member_done, .guest_done { color: #000000; } @@ -150,7 +150,7 @@ DIV.admin_note { background-color: #FFFFFF; } -.admin_misc,.member_misc { +.admin_misc, .member_misc { color: #000000; } @@ -158,7 +158,7 @@ DIV.admin_note { color: #000000; } -.admin_green,.admin_no { +.admin_green, .admin_no { color: #000000; } @@ -190,7 +190,7 @@ DIV.admin_note { background-color: #FFFFFF; } -.admin_table,.member_table { +.admin_table, .member_table { background-color: #FFFFFF; } @@ -212,7 +212,7 @@ DIV.admin_note { background-color: #EEEEFF; } -.admin_failed,.guest_failed,.member_failed,.member_note { +.admin_failed, .guest_failed, .member_failed, .member_note { color: #000000; } @@ -236,7 +236,7 @@ DIV.admin_note { font-size: 12px; } -.admin_normal,.guest_normal,.member_normal { +.admin_normal, .guest_normal, .member_normal { border-style: solid; border: solid 1px #000000; background-color: #EEEEFF; @@ -276,7 +276,7 @@ DIV.admin_note { background-color: #FFFFFF; } -.guest_title,.member_title { +.guest_title, .member_title { text-align: center; color: #000000; vertical-align: middle; @@ -290,13 +290,13 @@ DIV.admin_note { background-color: #EEEEFF; } -.guest_menu,.member_menu { +.guest_menu, .member_menu { width: 220px; background-color: #FFFFFF; vertical-align: top; } -.guest_menu_title,.member_menu_title { +.guest_menu_title, .member_menu_title { background-color: #EEEEFF; color: #000000; height: 25px; @@ -304,7 +304,7 @@ DIV.admin_note { border: 1px solid #000000; } -.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom +.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom { border: 1px solid #000000; border-top: 0px; @@ -313,11 +313,11 @@ DIV.admin_note { text-align: left; } -.guest_menu_seperator,.member_menu_seperator { +.guest_menu_seperator, .member_menu_seperator { height: 15px; } -.guest_content,.member_content { +.guest_content, .member_content { background-color: #FFFFFF; width: 99%; padding-left: 2px; @@ -326,7 +326,7 @@ DIV.admin_note { margin-right: 5px; } -.guest_advert,.guest_login,.member_advert,.member_login { +.guest_advert, .guest_login, .member_advert, .member_login { background-color: #FFFFFF; vertical-align: top; margin-top: 10px; @@ -377,11 +377,11 @@ ul.copyright_box { border: solid 1px #000000; } -.switch_sw1,.switch_mem1 { +.switch_sw1, .switch_mem1 { background-color: #FFFFFF; } -.switch_sw2,.switch_mem2 { +.switch_sw2, .switch_mem2 { background-color: #FFFFFF; } @@ -397,7 +397,7 @@ ul.copyright_box { background-color: #FFFFFF; } -.media_header,.impressum_header { +.media_header, .impressum_header { background-color: #EEEEFF; text-align: center; color: #000000; @@ -428,7 +428,7 @@ ul.copyright_box { font-size: 1px; } -.admin_footer,.member_refbanner,.member_update,.admin_del_link { +.admin_footer, .member_refbanner, .member_update, .admin_del_link { background-color: #EEEEFF; } @@ -439,7 +439,9 @@ ul.copyright_box { .admin_footer { text-align: center; - height: 30px + height: 30px; + padding-left: 5px; + padding-right: 5px; } .admin_task_header { @@ -458,7 +460,7 @@ ul.copyright_box { text-align: center } -.admin_delete,.admin_yes { +.admin_delete, .admin_yes { border-style: groove; border: solid 1px #000000; background-color: #000000; @@ -487,14 +489,14 @@ ul.copyright_box { width: 2px; } -.guest_stats_r,.guest_stats_lr,.guest_stats_rr { +.guest_stats_r, .guest_stats_lr, .guest_stats_rr { color: #000000; width: 28px; font-weight: bold; text-align: center; } -.guest_stats_ll,.guest_stats_rl { +.guest_stats_ll, .guest_stats_rl { width: 192px; text-align: right; } @@ -518,7 +520,7 @@ ul.copyright_box { background-color: #FFFFFF; } -.guest_content_align,.member_content_align,.admin_content_align { +.guest_content_align, .member_content_align, .admin_content_align { text-align: center; vertical-align: top; } @@ -529,7 +531,7 @@ ul.copyright_box { height: 100%; } -.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub +.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub { text-align: left; width: 100%; @@ -654,7 +656,7 @@ ul.copyright_box { text-align: left; } -.agb_title,.fatal_title { +.agb_title, .fatal_title { font-size: 16px; text-align: center; height: 40px; @@ -683,7 +685,7 @@ ul.show_timings_block { border: solid 1px #000000; background-color: #EEEEFF; font-size: 10px; - width: 475px; + width: 565px; height: 20px; list-style: none inside; } @@ -691,7 +693,7 @@ ul.show_timings_block { .show_timings_column { background-color: #FFFFFF; margin-top: 2px; - width: 150px; + width: 130px; border: solid 1px #000000; height: 14px; } @@ -719,7 +721,7 @@ span.show_timings_data { width: 400px; } -.member_skyscraper,.guest_skyscraper { +.member_skyscraper, .guest_skyscraper { width: 122px; height: 601px; border: 1px solid #000000; @@ -730,4 +732,4 @@ span.show_timings_data { ul.admin_menu_main,ul.admin_menu_sub { list-style: none inside; -} \ No newline at end of file +} diff --git a/theme/business/css/imprint.css b/theme/business/css/imprint.css new file mode 100644 index 0000000000..2d9d0d9ebd --- /dev/null +++ b/theme/business/css/imprint.css @@ -0,0 +1,20 @@ +.imprint { + font-size: 12px; + width: 320px; + vertical-align: middle; + background-color: #FFFFFF; + height: 70px; +} + +.imprint_header { + background-color: #EEEEFF; + text-align: center; + color: #000000; + height: 26px; + font-weight: bold; + font-size: 20px; +} + +.imprint_body { + background-color: #FFFFFF; +} diff --git a/theme/business/css/install.css b/theme/business/css/install.css index a85ef52847..866e5d46b9 100644 --- a/theme/business/css/install.css +++ b/theme/business/css/install.css @@ -32,7 +32,7 @@ background-color: #EEEEFF; font-size: 20px; text-decoration: underline; - heigth: 30px; + height: 30px; vertical-align: middle; padding-top: 5px; padding-bottom: 5px; @@ -48,12 +48,12 @@ background-color: #FFFFFF; } -.install_error,.install_finished { +.install_error, .install_finished { font-size: 20px; color: #000000; } -.install_security,.install_welcome,.install_text { +.install_security, .install_welcome, .install_text { color: #000000; } @@ -73,4 +73,4 @@ .install_welcome { padding-top: 5px; padding-bottom: 10px; -} \ No newline at end of file +} diff --git a/theme/business/css/register.css b/theme/business/css/register.css index d2e810e9c2..aedcbfa9a1 100644 --- a/theme/business/css/register.css +++ b/theme/business/css/register.css @@ -84,4 +84,4 @@ A:hover .register_term { background-color: #EEEEFF; border-top: 1px solid #000000; border-bottom: 1px solid #000000; -} \ No newline at end of file +} diff --git a/theme/business/css/sponsor.css b/theme/business/css/sponsor.css index f3545e9cf7..5e51c8bd5a 100644 --- a/theme/business/css/sponsor.css +++ b/theme/business/css/sponsor.css @@ -6,11 +6,11 @@ height: 24px; } -.sponsor_header,.sponsor_footer { +.sponsor_header, .sponsor_footer { background-color: #EEEEFF; } .sponsor_action { background-color: #EEEEFF; height: 25px; -} \ No newline at end of file +} diff --git a/theme/business/css/surfbar.css b/theme/business/css/surfbar.css index bcf9250285..7338f48b98 100644 --- a/theme/business/css/surfbar.css +++ b/theme/business/css/surfbar.css @@ -32,4 +32,4 @@ #surfbar_points { font-weight: bold; -} \ No newline at end of file +} diff --git a/theme/business/css/top10.css b/theme/business/css/top10.css index d884cc7314..7071c13076 100644 --- a/theme/business/css/top10.css +++ b/theme/business/css/top10.css @@ -1,9 +1,9 @@ -.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 { +.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 { text-align: center; padding-left: 5px; padding-right: 5px; } -.top10_row2,.top10_row4 { +.top10_row2, .top10_row4 { text-align: left; -} \ No newline at end of file +} diff --git a/theme/business/css/transfer.css b/theme/business/css/transfer.css index 5556b5da9d..a1cc70c190 100644 --- a/theme/business/css/transfer.css +++ b/theme/business/css/transfer.css @@ -1,4 +1,4 @@ -.transfer_row1,.transfer_row3 { +.transfer_row1, .transfer_row3 { text-align: center; font-weight: bold; } @@ -7,6 +7,6 @@ text-align: center; } -.transfer_row4,.transfer_row5 { +.transfer_row4, .transfer_row5 { padding-left: 2px; -} \ No newline at end of file +} diff --git a/theme/business/theme.php b/theme/business/theme.php index 5a7aed22cc..0c3863a47f 100644 --- a/theme/business/theme.php +++ b/theme/business/theme.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // // Theme definitions @@ -63,13 +62,13 @@ $GLOBALS['theme_data']['version'] = '0.0'; // Switch mode if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load'; -switch ($GLOBALS['theme_mode']) -{ +switch ($GLOBALS['theme_mode']) { case 'test': // Do stuff while testing the theme: The admin clicked on 'Import' break; case 'load': // Do stuff while theme is loaded normally break; -} -// +} // END - switch + +// [EOF] ?> diff --git a/theme/default/css/active.css b/theme/default/css/active.css index 7a41f23f21..0d6facc245 100644 --- a/theme/default/css/active.css +++ b/theme/default/css/active.css @@ -1,4 +1,4 @@ -.active_row1,.active_row2,.active_row3 { +.active_row1, .active_row2, .active_row3 { text-align: center; padding-left: 5px; padding-right: 5px; @@ -6,4 +6,4 @@ .active_row2 { text-align: left; -} \ No newline at end of file +} diff --git a/theme/default/css/beg.css b/theme/default/css/beg.css index db9e67443f..c63f55b6ed 100644 --- a/theme/default/css/beg.css +++ b/theme/default/css/beg.css @@ -6,4 +6,4 @@ background-color: #e5f6e5; padding-left: 10px; padding-right: 10px; -} \ No newline at end of file +} diff --git a/theme/default/css/bonus.css b/theme/default/css/bonus.css index 9ad71cef33..269913ecbd 100644 --- a/theme/default/css/bonus.css +++ b/theme/default/css/bonus.css @@ -10,4 +10,4 @@ .bonus_rank_3 { font-weight: bold; -} \ No newline at end of file +} diff --git a/theme/default/css/doubler.css b/theme/default/css/doubler.css index ef449aee87..1ff505e1a6 100644 --- a/theme/default/css/doubler.css +++ b/theme/default/css/doubler.css @@ -24,4 +24,4 @@ .doubler_footer { height: 24px; background-color: #ddeedd; -} \ No newline at end of file +} diff --git a/theme/default/css/general.css b/theme/default/css/general.css index 979f811dbf..aa229c4206 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -68,14 +68,14 @@ ul,ol { margin-bottom: 0px; } -.admin_reset,.guest_reset,.member_reset { +.admin_reset, .guest_reset, .member_reset { border-style: groove; border: solid 1px #009900; color: #AA0044; cursor: pointer; } -.admin_submit,.guest_submit,.member_submit { +.admin_submit, .guest_submit, .member_submit { color: #AA0044; border-color: #009900; cursor: pointer; @@ -88,7 +88,7 @@ ul,ol { cursor: pointer; } -.runtime_fatal,.runtime_fatalcontent { +.runtime_fatal, .runtime_fatalcontent { width: 700px; color: #118811; background-color: #DDEEDD; @@ -124,7 +124,7 @@ DIV.admin_note { color: #00AA00; } -.admin_edit,.member_confirm { +.admin_edit, .member_confirm { background-color: #eeffee; } @@ -139,19 +139,18 @@ DIV.admin_note { font-size: 10px; } -.admin_select,.guest_select,.member_select { +.admin_select, .guest_select, .member_select { border: solid 1px #009900; background-color: #EEFFEE; } -.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message - { +.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message { background-color: #ddeedd; color: #009900; text-align: center; } -.member_done,.guest_done { +.member_done, .guest_done { color: #009900; } @@ -159,7 +158,7 @@ DIV.admin_note { background-color: #DDEEDD; } -.admin_misc,.member_misc { +.admin_misc, .member_misc { color: #000000; } @@ -167,7 +166,7 @@ DIV.admin_note { color: #AA0044; } -.admin_green,.admin_no { +.admin_green, .admin_no { color: #009900; } @@ -199,7 +198,7 @@ DIV.admin_note { background-color: #eeffee; } -.admin_table,.member_table { +.admin_table, .member_table { background-color: #eeffee; } @@ -221,7 +220,7 @@ DIV.admin_note { background-color: #ddeedd; } -.admin_failed,.guest_failed,.member_failed,.member_note { +.admin_failed, .guest_failed, .member_failed, .member_note { color: #00AA00; } @@ -245,7 +244,7 @@ DIV.admin_note { font-size: 12px; } -.admin_normal,.guest_normal,.member_normal { +.admin_normal, .guest_normal, .member_normal { border-style: solid; border: solid 1px #009900; } @@ -272,7 +271,7 @@ DIV.admin_note { background-color: #DDEEDD; } -.guest_title,.member_title { +.guest_title, .member_title { text-align: center; color: #009900; vertical-align: middle; @@ -286,13 +285,13 @@ DIV.admin_note { background-color: #DDEEDD; } -.guest_menu,.member_menu { +.guest_menu, .member_menu { width: 220px; background-color: #DDEEDD; vertical-align: top; } -.guest_menu_title,.member_menu_title { +.guest_menu_title, .member_menu_title { background-color: #BDEFCD; color: #009900; height: 25px; @@ -300,7 +299,7 @@ DIV.admin_note { border: 1px solid #AA0044; } -.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom +.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom { border: 1px solid #AA0044; border-top: 0px; @@ -316,11 +315,11 @@ DIV.admin_note { height: 20px; } -.guest_menu_seperator,.member_menu_seperator { +.guest_menu_seperator, .member_menu_seperator { height: 15px; } -.guest_content,.member_content { +.guest_content, .member_content { background-color: #eeffee; width: 99%; padding-left: 2px; @@ -329,7 +328,7 @@ DIV.admin_note { margin-right: 5px; } -.guest_advert,.guest_login,.member_advert,.member_login { +.guest_advert, .guest_login, .member_advert, .member_login { background-color: #DDEEDD; vertical-align: top; margin-top: 10px; @@ -378,11 +377,11 @@ ul.copyright_box { border: solid 1px #AA0044; } -.switch_sw1,.switch_mem1 { +.switch_sw1, .switch_mem1 { background-color: #b8efc1; } -.switch_sw2,.switch_mem2 { +.switch_sw2, .switch_mem2 { background-color: #b8fccb; } @@ -398,7 +397,7 @@ ul.copyright_box { background-color: #eeffee; } -.media_header,.impressum_header { +.media_header, .impressum_header { background-color: #b8fccb; text-align: center; color: #009900; @@ -429,7 +428,7 @@ ul.copyright_box { font-size: 1px; } -.admin_footer,.member_refbanner,.member_update,.admin_del_link { +.admin_footer, .member_refbanner, .member_update, .admin_del_link { background-color: #DDEEDD; } @@ -440,7 +439,9 @@ ul.copyright_box { .admin_footer { text-align: center; - height: 30px + height: 30px; + padding-left: 5px; + padding-right: 5px; } .admin_task_header { @@ -459,7 +460,7 @@ ul.copyright_box { text-align: center } -.admin_delete,.admin_yes { +.admin_delete, .admin_yes { border-style: groove; border: solid 1px #00AA00; background-color: #AA0044; @@ -488,14 +489,14 @@ ul.copyright_box { width: 2px; } -.guest_stats_r,.guest_stats_lr,.guest_stats_rr { +.guest_stats_r, .guest_stats_lr, .guest_stats_rr { color: #009900; width: 28px; font-weight: bold; text-align: center; } -.guest_stats_ll,.guest_stats_rl { +.guest_stats_ll, .guest_stats_rl { width: 192px; text-align: right; } @@ -519,9 +520,8 @@ ul.copyright_box { background-color: #DDEEDD; } -.guest_content_align,.member_content_align,.admin_content_align { +.guest_content_align, .member_content_align, .admin_content_align { text-align: center; - align: center; vertical-align: top; } @@ -531,7 +531,7 @@ ul.copyright_box { height: 100%; } -.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub +.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub { text-align: left; width: 100%; @@ -641,7 +641,7 @@ ul.copyright_box { .guest_footer { height: 30px; - background-color: #E5E5F5; + background-color: #ddeedd; } .disabled { @@ -677,7 +677,7 @@ ul.copyright_box { text-align: left; } -.agb_title,.fatal_title { +.agb_title, .fatal_title { font-size: 16px; text-align: center; height: 40px; @@ -706,7 +706,7 @@ ul.copyright_box { ul.show_timings_block { border: solid 1px #AA0044; background-color: #ddeedd; - width: 475px; + width: 565px; height: 20px; list-style: none inside; padding-left:0px; @@ -715,7 +715,7 @@ ul.show_timings_block { .show_timings_column { background-color: #EEFFEE; margin-top: 2px; - width: 150px; + width: 130px; border: solid 1px #009900; height: 14px; font-size: 10px; @@ -744,7 +744,7 @@ li.show_timings_column { width: 400px; } -.member_skyscraper,.guest_skyscraper { +.member_skyscraper, .guest_skyscraper { width: 122px; height: 602px; border: 1px solid #AA0044; @@ -756,4 +756,4 @@ li.show_timings_column { ul.admin_menu_main,ul.admin_menu_sub { list-style: none inside; padding-left: 10px; -} \ No newline at end of file +} diff --git a/theme/default/css/imprint.css b/theme/default/css/imprint.css new file mode 100644 index 0000000000..d289a6b412 --- /dev/null +++ b/theme/default/css/imprint.css @@ -0,0 +1,20 @@ +.imprint { + font-size: 12px; + width: 320px; + vertical-align: middle; + background-color: #E5EFE5; + height: 70px; +} + +.imprint_header { + background-color: #b8fccb; + text-align: center; + color: #009900; + height: 26px; + font-weight: bold; + font-size: 20px; +} + +.imprint_body { + background-color: #DDEEDD; +} diff --git a/theme/default/css/install.css b/theme/default/css/install.css index 672d471d1c..a8d5167b0f 100644 --- a/theme/default/css/install.css +++ b/theme/default/css/install.css @@ -81,4 +81,4 @@ .install_footer { padding-bottom: 10px; -} \ No newline at end of file +} diff --git a/theme/default/css/register.css b/theme/default/css/register.css index abc9490084..6e42a8966b 100644 --- a/theme/default/css/register.css +++ b/theme/default/css/register.css @@ -77,4 +77,4 @@ .register_term { background-color: #AA0044; -} \ No newline at end of file +} diff --git a/theme/default/css/sponsor.css b/theme/default/css/sponsor.css index c82257994c..924d6d0fec 100644 --- a/theme/default/css/sponsor.css +++ b/theme/default/css/sponsor.css @@ -2,7 +2,7 @@ background-color: #DDEEDD; } -.sponsor_header,.sponsor_footer { +.sponsor_header, .sponsor_footer { background-color: #CCDDCC; } @@ -13,4 +13,4 @@ .sponsor_what { height: 24px; -} \ No newline at end of file +} diff --git a/theme/default/css/surfbar.css b/theme/default/css/surfbar.css index c8770a90c8..afbd84ed13 100644 --- a/theme/default/css/surfbar.css +++ b/theme/default/css/surfbar.css @@ -32,4 +32,4 @@ #surfbar_points { font-weight: bold; -} \ No newline at end of file +} diff --git a/theme/default/css/top10.css b/theme/default/css/top10.css index d884cc7314..7071c13076 100644 --- a/theme/default/css/top10.css +++ b/theme/default/css/top10.css @@ -1,9 +1,9 @@ -.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 { +.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 { text-align: center; padding-left: 5px; padding-right: 5px; } -.top10_row2,.top10_row4 { +.top10_row2, .top10_row4 { text-align: left; -} \ No newline at end of file +} diff --git a/theme/default/css/transfer.css b/theme/default/css/transfer.css index 5556b5da9d..a1cc70c190 100644 --- a/theme/default/css/transfer.css +++ b/theme/default/css/transfer.css @@ -1,4 +1,4 @@ -.transfer_row1,.transfer_row3 { +.transfer_row1, .transfer_row3 { text-align: center; font-weight: bold; } @@ -7,6 +7,6 @@ text-align: center; } -.transfer_row4,.transfer_row5 { +.transfer_row4, .transfer_row5 { padding-left: 2px; -} \ No newline at end of file +} diff --git a/theme/default/theme.php b/theme/default/theme.php index 3452e5920a..0afff1bde9 100644 --- a/theme/default/theme.php +++ b/theme/default/theme.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // // Theme definitions @@ -63,13 +62,13 @@ $GLOBALS['theme_data']['version'] = '0.0'; // Switch mode if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load'; -switch ($GLOBALS['theme_mode']) -{ +switch ($GLOBALS['theme_mode']) { case 'test': // Do stuff while testing the theme: The admin clicked on 'Import' break; case 'load': // Do stuff while theme is loaded normally break; -} -// +} // END - switch + +// [EOF] ?> diff --git a/theme/desert/css/active.css b/theme/desert/css/active.css index 7a41f23f21..8558324969 100644 --- a/theme/desert/css/active.css +++ b/theme/desert/css/active.css @@ -1,4 +1,4 @@ -.active_row1,.active_row2,.active_row3 { +.active_row1, .active_row2, .active_row3 { text-align: center; padding-left: 5px; padding-right: 5px; diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index 0979b5113f..ebafeb8c09 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -51,14 +51,14 @@ ul,ol { margin-bottom: 0px; } -.admin_reset,.guest_reset,.member_reset { +.admin_reset, .guest_reset, .member_reset { border-style: groove; border: solid 1px #880000; color: #880000; cursor: pointer; } -.admin_submit,.guest_submit,.member_submit { +.admin_submit, .guest_submit, .member_submit { color: #880000; border-color: #880000; cursor: pointer; @@ -71,7 +71,7 @@ ul,ol { cursor: pointer; } -.runtime_fatal,.runtime_fatalcontent { +.runtime_fatal, .runtime_fatalcontent { color: #880000; background-color: #FFFFCC; } @@ -106,7 +106,7 @@ DIV.admin_note { font-size: 18px; } -.admin_edit,.member_confirm { +.admin_edit, .member_confirm { background-color: #FFFFCC; } @@ -121,19 +121,19 @@ DIV.admin_note { font-size: 10px; } -.admin_select,.guest_select,.member_select { +.admin_select, .guest_select, .member_select { border: solid 1px #880000; background-color: #DDDDAA; } -.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message +.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message { background-color: #DDDDAA; color: #880000; text-align: center; } -.member_done,.guest_done { +.member_done, .guest_done { color: #880000; } @@ -141,7 +141,7 @@ DIV.admin_note { background-color: #FFFFCC; } -.admin_misc,.member_misc { +.admin_misc, .member_misc { color: #880000; } @@ -149,7 +149,7 @@ DIV.admin_note { color: #880000; } -.admin_green,.admin_no { +.admin_green, .admin_no { color: #880000; } @@ -181,7 +181,7 @@ DIV.admin_note { background-color: #FFFFCC; } -.admin_table,.member_table { +.admin_table, .member_table { background-color: #FFFFCC; } @@ -203,7 +203,7 @@ DIV.admin_note { background-color: #DDDDAA; } -.admin_failed,.guest_failed,.member_failed,.member_note { +.admin_failed, .guest_failed, .member_failed, .member_note { color: #880000; } @@ -227,7 +227,7 @@ DIV.admin_note { font-size: 12px; } -.admin_normal,.guest_normal,.member_normal { +.admin_normal, .guest_normal, .member_normal { border-style: solid; border: solid 1px #880000; background-color: #DDDDAA; @@ -255,7 +255,7 @@ DIV.admin_note { background-color: #FFFFCC; } -.guest_title,.member_title { +.guest_title, .member_title { text-align: center; color: #880000; vertical-align: middle; @@ -269,13 +269,13 @@ DIV.admin_note { background-color: #DDDDAA; } -.guest_menu,.member_menu { +.guest_menu, .member_menu { width: 220px; background-color: #FFFFCC; vertical-align: top; } -.guest_menu_title,.member_menu_title { +.guest_menu_title, .member_menu_title { background-color: #DDDDAA; color: #880000; height: 25px; @@ -283,7 +283,7 @@ DIV.admin_note { border: 1px solid #880000; } -.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom +.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom { border: 1px solid #880000; border-top: 0px; @@ -292,11 +292,11 @@ DIV.admin_note { text-align: left; } -.guest_menu_seperator,.member_menu_seperator { +.guest_menu_seperator, .member_menu_seperator { height: 15px; } -.guest_content,.member_content { +.guest_content, .member_content { background-color: #FFFFCC; width: 99%; padding-left: 2px; @@ -305,7 +305,7 @@ DIV.admin_note { margin-right: 5px; } -.guest_advert,.guest_login,.member_advert,.member_login { +.guest_advert, .guest_login, .member_advert, .member_login { background-color: #FFFFCC; vertical-align: top; margin-top: 10px; @@ -351,27 +351,19 @@ ul.copyright_box { border: solid 1px #880000; } -.switch_sw1,.switch_mem1 { +.switch_sw1, .switch_mem1 { background-color: #FFFFCC; } -.switch_sw2,.switch_mem2 { +.switch_sw2, .switch_mem2 { background-color: #FFFFCC; } -.impressum { - font-size: 12px; - width: 320px; - vertical-align: middle; - background-color: #FFFFCC; - height: 70px; -} - .mediadata { background-color: #FFFFCC; } -.media_header,.impressum_header { +.media_header, { background-color: #DDDDAA; text-align: center; color: #880000; @@ -402,7 +394,7 @@ ul.copyright_box { font-size: 1px; } -.admin_footer,.member_refbanner,.member_update,.admin_del_link { +.admin_footer, .member_refbanner, .member_update, .admin_del_link { background-color: #DDDDAA; } @@ -413,7 +405,9 @@ ul.copyright_box { .admin_footer { text-align: center; - height: 30px + height: 30px; + padding-left: 5px; + padding-right: 5px; } .admin_task_header { @@ -432,7 +426,7 @@ ul.copyright_box { text-align: center } -.admin_delete,.admin_yes { +.admin_delete, .admin_yes { border-style: groove; border: solid 1px #880000; background-color: #880000; @@ -461,14 +455,14 @@ ul.copyright_box { width: 2px; } -.guest_stats_r,.guest_stats_lr,.guest_stats_rr { +.guest_stats_r, .guest_stats_lr, .guest_stats_rr { color: #880000; width: 28px; font-weight: bold; text-align: center; } -.guest_stats_ll,.guest_stats_rl { +.guest_stats_ll, .guest_stats_rl { width: 192px; text-align: right; } @@ -488,11 +482,7 @@ ul.copyright_box { margin-bottom: 10px; } -.impressum_body { - background-color: #FFFFCC; -} - -.guest_content_align,.member_content_align,.admin_content_align { +.guest_content_align, .member_content_align, .admin_content_align { text-align: center; vertical-align: top; } @@ -503,7 +493,7 @@ ul.copyright_box { height: 100%; } -.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub +.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub { text-align: left; width: 100%; @@ -650,7 +640,7 @@ ul.copyright_box { text-align: left; } -.agb_title,.fatal_title { +.agb_title, .fatal_title { font-size: 16px; text-align: center; height: 40px; @@ -679,7 +669,7 @@ ul.show_timings_block { border: solid 1px #880000; background-color: #DDDDAA; font-size: 10px; - width: 475px; + width: 565px; height: 20px; list-style: none inside; } @@ -687,7 +677,7 @@ ul.show_timings_block { .show_timings_column { background-color: #FFFFCC; margin-top: 2px; - width: 150px; + width: 130px; border: solid 1px #880000; height: 14px; } @@ -716,7 +706,7 @@ span.show_timings_data { width: 400px; } -.member_skyscraper,.guest_skyscraper { +.member_skyscraper, .guest_skyscraper { width: 122px; height: 602px; border: 1px solid #880000; @@ -727,4 +717,4 @@ span.show_timings_data { ul.admin_menu_main,ul.admin_menu_sub { list-style: none inside; -} \ No newline at end of file +} diff --git a/theme/desert/css/imprint.css b/theme/desert/css/imprint.css new file mode 100644 index 0000000000..5c9866d447 --- /dev/null +++ b/theme/desert/css/imprint.css @@ -0,0 +1,20 @@ +.imprint { + font-size: 12px; + width: 320px; + vertical-align: middle; + background-color: #FFFFCC; + height: 70px; +} + +.imprint_header { + background-color: #DDDDAA; + text-align: center; + color: #880000; + height: 26px; + font-weight: bold; + font-size: 20px; +} + +.imprint_body { + background-color: #FFFFCC; +} diff --git a/theme/desert/css/install.css b/theme/desert/css/install.css index 882f7c370c..caf27417bd 100644 --- a/theme/desert/css/install.css +++ b/theme/desert/css/install.css @@ -52,12 +52,12 @@ background-color: #FFFFCC; } -.install_error,.install_finished { +.install_error, .install_finished { font-size: 20px; color: #880000; } -.install_security,.install_welcome,.install_text { +.install_security, .install_welcome, .install_text { color: #880000; } diff --git a/theme/desert/css/paidlinks.css b/theme/desert/css/paidlinks.css index 72f78b83fd..d18d52f01b 100644 --- a/theme/desert/css/paidlinks.css +++ b/theme/desert/css/paidlinks.css @@ -4,5 +4,4 @@ margin-top: 5px; margin-bottom: 5px; text-align: left; - align: left; } \ No newline at end of file diff --git a/theme/desert/css/sponsor.css b/theme/desert/css/sponsor.css index d7e8438a03..4ae7594bff 100644 --- a/theme/desert/css/sponsor.css +++ b/theme/desert/css/sponsor.css @@ -7,7 +7,7 @@ height: 25px; } -.sponsor_header,.sponsor_footer { +.sponsor_header, .sponsor_footer { background-color: #DDDDAA; } diff --git a/theme/desert/css/top10.css b/theme/desert/css/top10.css index d884cc7314..9feb60782a 100644 --- a/theme/desert/css/top10.css +++ b/theme/desert/css/top10.css @@ -1,9 +1,9 @@ -.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 { +.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 { text-align: center; padding-left: 5px; padding-right: 5px; } -.top10_row2,.top10_row4 { +.top10_row2, .top10_row4 { text-align: left; } \ No newline at end of file diff --git a/theme/desert/css/transfer.css b/theme/desert/css/transfer.css index 5556b5da9d..fedc909092 100644 --- a/theme/desert/css/transfer.css +++ b/theme/desert/css/transfer.css @@ -1,4 +1,4 @@ -.transfer_row1,.transfer_row3 { +.transfer_row1, .transfer_row3 { text-align: center; font-weight: bold; } @@ -7,6 +7,6 @@ text-align: center; } -.transfer_row4,.transfer_row5 { +.transfer_row4, .transfer_row5 { padding-left: 2px; } \ No newline at end of file diff --git a/theme/desert/theme.php b/theme/desert/theme.php index 68c89b65a8..4665c6323e 100644 --- a/theme/desert/theme.php +++ b/theme/desert/theme.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,9 +38,8 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} + die(); +} // END - if // // Theme definitions @@ -63,13 +62,13 @@ $GLOBALS['theme_data']['version'] = '0.0.1'; // Switch mode if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load'; -switch ($GLOBALS['theme_mode']) -{ +switch ($GLOBALS['theme_mode']) { case 'test': // Do stuff while testing the theme: The admin clicked on 'Import' break; case 'load': // Do stuff while theme is loaded normally break; -} -// +} // END - switch + +// [EOF] ?> diff --git a/view.php b/view.php index b102474925..3432fb3548 100644 --- a/view.php +++ b/view.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,10 +46,10 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); -if (((REQUEST_ISSET_GET('user')) || (REQUEST_ISSET_GET('reseller'))) && (REQUEST_ISSET_GET('banner'))) { +if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) && (isGetRequestElementSet('banner'))) { // For later things... ;-) - $result = SQL_QUERY_ESC("SELECT `url` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `url` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); // Do we have the banner? if (SQL_NUMROWS($result) == 1) { @@ -57,8 +57,8 @@ if (((REQUEST_ISSET_GET('user')) || (REQUEST_ISSET_GET('reseller'))) && (REQUEST list($url) = SQL_FETCHROW($result); // Update counter - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1", - array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1", + array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); // Extract type (last 3 chars should be okay) $type = substr($url, -3); @@ -70,7 +70,7 @@ if (((REQUEST_ISSET_GET('user')) || (REQUEST_ISSET_GET('reseller'))) && (REQUEST redirectToUrl($url, false); } else { // @TODO No banner found, output some default banner - DEBUG_LOG(__FILE__, __LINE__, 'Banner ' . bigintval(REQUEST_GET('banner')) . ' not dound.'); + logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestElement('banner')) . ' not dound.'); } // Free memory -- 2.39.5