From 7bc25dd08431c94ce9edca131d56c1a36b13c28a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 30 Jan 2008 21:24:54 +0000 Subject: [PATCH] win32 to unix line delimiters changed --- 0.2.1/admin.php | 126 +- 0.2.1/agb.php | 124 +- 0.2.1/beg.php | 512 +- 0.2.1/birthday_confirm.php | 280 +- 0.2.1/click.php | 146 +- 0.2.1/confirm.php | 148 +- 0.2.1/css.php | 130 +- 0.2.1/doubler.php | 652 +-- 0.2.1/img.php | 134 +- 0.2.1/inc/autopurge.php | 900 ++-- 0.2.1/inc/config.php | 320 +- 0.2.1/inc/databases.php | 258 +- 0.2.1/inc/db/lib-mysql3.php | 548 +-- 0.2.1/inc/db/lib.php | 118 +- 0.2.1/inc/doubler_send.php | 406 +- 0.2.1/inc/extensions.php | 1128 ++--- 0.2.1/inc/extensions/ext-active.php | 274 +- 0.2.1/inc/extensions/ext-admins.php | 586 +-- 0.2.1/inc/extensions/ext-admintheme1.php | 190 +- .../inc/extensions/ext-admintheme_default.php | 190 +- 0.2.1/inc/extensions/ext-autopurge.php | 588 +-- 0.2.1/inc/extensions/ext-bank.php | 398 +- 0.2.1/inc/extensions/ext-beg.php | 642 +-- 0.2.1/inc/extensions/ext-birthday.php | 424 +- 0.2.1/inc/extensions/ext-bonus.php | 1206 ++--- 0.2.1/inc/extensions/ext-cache.php | 448 +- 0.2.1/inc/extensions/ext-country.php | 250 +- 0.2.1/inc/extensions/ext-demo.php | 184 +- 0.2.1/inc/extensions/ext-doubler.php | 558 +-- 0.2.1/inc/extensions/ext-holiday.php | 500 +- 0.2.1/inc/extensions/ext-html_mail.php | 348 +- 0.2.1/inc/extensions/ext-mailid.php | 500 +- 0.2.1/inc/extensions/ext-maintenance.php | 250 +- 0.2.1/inc/extensions/ext-mediadata.php | 310 +- 0.2.1/inc/extensions/ext-mods.php | 252 +- 0.2.1/inc/extensions/ext-mydata.php | 354 +- 0.2.1/inc/extensions/ext-newsletter.php | 382 +- 0.2.1/inc/extensions/ext-nickname.php | 394 +- 0.2.1/inc/extensions/ext-online.php | 250 +- 0.2.1/inc/extensions/ext-optimize.php | 248 +- 0.2.1/inc/extensions/ext-order.php | 628 +-- 0.2.1/inc/extensions/ext-other.php | 390 +- 0.2.1/inc/extensions/ext-payout.php | 504 +- 0.2.1/inc/extensions/ext-profile.php | 276 +- 0.2.1/inc/extensions/ext-rallye.php | 716 +-- 0.2.1/inc/extensions/ext-register.php | 680 +-- 0.2.1/inc/extensions/ext-repair.php | 252 +- 0.2.1/inc/extensions/ext-rewrite.php | 302 +- 0.2.1/inc/extensions/ext-sql_patches.php | 1234 ++--- 0.2.1/inc/extensions/ext-support.php | 278 +- 0.2.1/inc/extensions/ext-task.php | 510 +- 0.2.1/inc/extensions/ext-theme.php | 236 +- 0.2.1/inc/extensions/ext-top10.php | 316 +- 0.2.1/inc/extensions/ext-transfer.php | 630 +-- 0.2.1/inc/extensions/ext-user.php | 450 +- 0.2.1/inc/extensions/ext-wernis.php | 232 +- 0.2.1/inc/fatal_errors.php | 186 +- 0.2.1/inc/footer.php | 192 +- 0.2.1/inc/functions.php | 4142 ++++++++--------- 0.2.1/inc/gen_mediadata.php | 200 +- 0.2.1/inc/gen_sql_patches.php | 248 +- 0.2.1/inc/header.php | 260 +- 0.2.1/inc/install-inc.php | 860 ++-- 0.2.1/inc/language.php | 130 +- 0.2.1/inc/language/active_de.php | 100 +- 0.2.1/inc/language/admins_de.php | 222 +- 0.2.1/inc/language/autopurge_de.php | 164 +- 0.2.1/inc/language/bank_de.php | 154 +- 0.2.1/inc/language/beg_de.php | 266 +- 0.2.1/inc/language/birthday_de.php | 110 +- 0.2.1/inc/language/bonus_de.php | 278 +- 0.2.1/inc/language/cache_de.php | 134 +- 0.2.1/inc/language/country_de.php | 130 +- 0.2.1/inc/language/de.php | 2266 ++++----- 0.2.1/inc/language/doubler_de.php | 290 +- 0.2.1/inc/language/en.php | 640 +-- 0.2.1/inc/language/holiday_de.php | 182 +- 0.2.1/inc/language/html_mail_de.php | 104 +- 0.2.1/inc/language/install_de.php | 98 +- 0.2.1/inc/language/mailid_de.php | 116 +- 0.2.1/inc/language/maintenance_de.php | 100 +- 0.2.1/inc/language/mediadata_de.php | 186 +- 0.2.1/inc/language/mods_de.php | 112 +- 0.2.1/inc/language/newsletter_de.php | 152 +- 0.2.1/inc/language/nickname_de.php | 120 +- 0.2.1/inc/language/online_de.php | 90 +- 0.2.1/inc/language/optimize_de.php | 114 +- 0.2.1/inc/language/order_de.php | 154 +- 0.2.1/inc/language/other_de.php | 170 +- 0.2.1/inc/language/payout_de.php | 286 +- 0.2.1/inc/language/pro_de.php | 6 +- 0.2.1/inc/language/rallye_de.php | 296 +- 0.2.1/inc/language/register_de.php | 118 +- 0.2.1/inc/language/repair_de.php | 96 +- 0.2.1/inc/language/rewrite_de.php | 100 +- 0.2.1/inc/language/support_de.php | 108 +- 0.2.1/inc/language/task_de.php | 244 +- 0.2.1/inc/language/theme_de.php | 100 +- 0.2.1/inc/language/top10_de.php | 112 +- 0.2.1/inc/language/transfer_de.php | 190 +- 0.2.1/inc/language/user_de.php | 112 +- 0.2.1/inc/language/wernis_de.php | 102 +- 0.2.1/inc/libs/admins_functions.php | 394 +- 0.2.1/inc/libs/autopurge_functions.php | 174 +- 0.2.1/inc/libs/bonus_functions.php | 550 +-- 0.2.1/inc/libs/cache_functions.php | 732 +-- 0.2.1/inc/libs/country_functions.php | 122 +- 0.2.1/inc/libs/doubler_functions.php | 320 +- 0.2.1/inc/libs/holiday_functions.php | 194 +- 0.2.1/inc/libs/html_mail_functions.php | 344 +- 0.2.1/inc/libs/mediadata_functions.php | 200 +- 0.2.1/inc/libs/newsletter_functions.php | 370 +- 0.2.1/inc/libs/nickname_functions.php | 160 +- 0.2.1/inc/libs/optimize_functions.php | 210 +- 0.2.1/inc/libs/order_functions.php | 112 +- 0.2.1/inc/libs/output_functions.php | 354 +- 0.2.1/inc/libs/payout_functions.php | 172 +- 0.2.1/inc/libs/rallye_functions.php | 1684 +++---- 0.2.1/inc/libs/register_functions.php | 346 +- 0.2.1/inc/libs/rewrite_functions.php | 248 +- 0.2.1/inc/libs/security_functions.php | 476 +- 0.2.1/inc/libs/task_functions.php | 1086 ++--- 0.2.1/inc/libs/transfer_functions.php | 176 +- 0.2.1/inc/libs/user_functions.php | 452 +- 0.2.1/inc/libs/wernis_functions.php | 84 +- 0.2.1/inc/load_cache.php | 814 ++-- 0.2.1/inc/load_extensions.php | 690 +-- 0.2.1/inc/mails/_mails.php | 100 +- 0.2.1/inc/mails/beg_mails.php | 340 +- 0.2.1/inc/mails/birthday_mails.php | 240 +- 0.2.1/inc/mails/bonus_mails.php | 308 +- 0.2.1/inc/modules/admin.php | 812 ++-- 0.2.1/inc/modules/admin/action-admins.php | 112 +- 0.2.1/inc/modules/admin/action-bank.php | 112 +- 0.2.1/inc/modules/admin/action-country.php | 112 +- 0.2.1/inc/modules/admin/action-doubler.php | 112 +- 0.2.1/inc/modules/admin/action-email.php | 112 +- 0.2.1/inc/modules/admin/action-holiday.php | 112 +- 0.2.1/inc/modules/admin/action-login.php | 112 +- 0.2.1/inc/modules/admin/action-logout.php | 122 +- 0.2.1/inc/modules/admin/action-menu.php | 112 +- 0.2.1/inc/modules/admin/action-misc.php | 112 +- 0.2.1/inc/modules/admin/action-mods.php | 112 +- 0.2.1/inc/modules/admin/action-newsletter.php | 112 +- 0.2.1/inc/modules/admin/action-payouts.php | 112 +- 0.2.1/inc/modules/admin/action-rallye.php | 112 +- 0.2.1/inc/modules/admin/action-repair.php | 112 +- 0.2.1/inc/modules/admin/action-setup.php | 112 +- 0.2.1/inc/modules/admin/action-stats.php | 112 +- 0.2.1/inc/modules/admin/action-task.php | 112 +- 0.2.1/inc/modules/admin/action-theme.php | 112 +- 0.2.1/inc/modules/admin/action-transfer.php | 112 +- 0.2.1/inc/modules/admin/action-user.php | 112 +- 0.2.1/inc/modules/admin/action-wernis.php | 112 +- 0.2.1/inc/modules/admin/admin-inc.php | 1620 +++---- 0.2.1/inc/modules/admin/overview-inc.php | 1076 ++--- .../modules/admin/what-add_bank_package.php | 106 +- .../modules/admin/what-add_guestnl_cat.php | 108 +- 0.2.1/inc/modules/admin/what-add_points.php | 288 +- 0.2.1/inc/modules/admin/what-add_rallye.php | 260 +- 0.2.1/inc/modules/admin/what-admin_add.php | 416 +- 0.2.1/inc/modules/admin/what-adminedit.php | 616 +-- 0.2.1/inc/modules/admin/what-admins_add.php | 172 +- .../inc/modules/admin/what-admins_contact.php | 196 +- .../inc/modules/admin/what-admins_contct.php | 178 +- 0.2.1/inc/modules/admin/what-admins_edit.php | 554 +-- 0.2.1/inc/modules/admin/what-admins_mails.php | 394 +- 0.2.1/inc/modules/admin/what-autopurge.php | 136 +- 0.2.1/inc/modules/admin/what-bonus.php | 88 +- 0.2.1/inc/modules/admin/what-cache_stats.php | 110 +- 0.2.1/inc/modules/admin/what-chk_regs.php | 174 +- .../inc/modules/admin/what-config_active.php | 114 +- 0.2.1/inc/modules/admin/what-config_admin.php | 138 +- .../inc/modules/admin/what-config_admins.php | 604 +-- .../modules/admin/what-config_autopurge.php | 172 +- 0.2.1/inc/modules/admin/what-config_beg.php | 340 +- .../modules/admin/what-config_birthday.php | 162 +- 0.2.1/inc/modules/admin/what-config_bonus.php | 496 +- 0.2.1/inc/modules/admin/what-config_cache.php | 264 +- 0.2.1/inc/modules/admin/what-config_cats.php | 376 +- .../inc/modules/admin/what-config_doubler.php | 288 +- 0.2.1/inc/modules/admin/what-config_email.php | 384 +- .../modules/admin/what-config_extensions.php | 124 +- .../inc/modules/admin/what-config_holiday.php | 140 +- 0.2.1/inc/modules/admin/what-config_home.php | 236 +- .../modules/admin/what-config_mediadata.php | 206 +- 0.2.1/inc/modules/admin/what-config_mods.php | 324 +- .../modules/admin/what-config_newsletter.php | 120 +- .../modules/admin/what-config_nickname.php | 108 +- 0.2.1/inc/modules/admin/what-config_order.php | 176 +- 0.2.1/inc/modules/admin/what-config_other.php | 476 +- .../inc/modules/admin/what-config_payouts.php | 498 +- .../inc/modules/admin/what-config_points.php | 652 +-- .../admin/what-config_rallye_prices.php | 598 +-- 0.2.1/inc/modules/admin/what-config_refid.php | 124 +- 0.2.1/inc/modules/admin/what-config_reg.php | 154 +- .../modules/admin/what-config_register.php | 164 +- .../modules/admin/what-config_register2.php | 142 +- .../inc/modules/admin/what-config_rewrite.php | 220 +- .../inc/modules/admin/what-config_secure.php | 152 +- 0.2.1/inc/modules/admin/what-config_stats.php | 158 +- 0.2.1/inc/modules/admin/what-config_title.php | 124 +- 0.2.1/inc/modules/admin/what-config_top10.php | 114 +- .../modules/admin/what-config_transfer.php | 138 +- 0.2.1/inc/modules/admin/what-config_user.php | 118 +- .../inc/modules/admin/what-config_wernis.php | 118 +- 0.2.1/inc/modules/admin/what-del_email.php | 300 +- 0.2.1/inc/modules/admin/what-del_holiday.php | 258 +- 0.2.1/inc/modules/admin/what-del_task.php | 90 +- 0.2.1/inc/modules/admin/what-del_transfer.php | 234 +- 0.2.1/inc/modules/admin/what-del_user.php | 210 +- 0.2.1/inc/modules/admin/what-edit_emails.php | 276 +- 0.2.1/inc/modules/admin/what-edit_user.php | 310 +- 0.2.1/inc/modules/admin/what-email_archiv.php | 276 +- .../inc/modules/admin/what-email_details.php | 696 +-- 0.2.1/inc/modules/admin/what-email_stats.php | 94 +- 0.2.1/inc/modules/admin/what-extensions.php | 862 ++-- 0.2.1/inc/modules/admin/what-guest_add.php | 432 +- 0.2.1/inc/modules/admin/what-guestedit.php | 738 +-- 0.2.1/inc/modules/admin/what-holiday_list.php | 90 +- .../inc/modules/admin/what-holiday_remove.php | 90 +- .../inc/modules/admin/what-list_autopurge.php | 192 +- .../modules/admin/what-list_bank_package.php | 198 +- 0.2.1/inc/modules/admin/what-list_beg.php | 278 +- 0.2.1/inc/modules/admin/what-list_bonus.php | 312 +- 0.2.1/inc/modules/admin/what-list_cats.php | 236 +- 0.2.1/inc/modules/admin/what-list_country.php | 462 +- 0.2.1/inc/modules/admin/what-list_doubler.php | 278 +- 0.2.1/inc/modules/admin/what-list_holiday.php | 170 +- 0.2.1/inc/modules/admin/what-list_links.php | 358 +- .../modules/admin/what-list_newsletter.php | 136 +- 0.2.1/inc/modules/admin/what-list_norefs.php | 330 +- 0.2.1/inc/modules/admin/what-list_payouts.php | 654 +-- 0.2.1/inc/modules/admin/what-list_rallyes.php | 800 ++-- 0.2.1/inc/modules/admin/what-list_refs.php | 282 +- 0.2.1/inc/modules/admin/what-list_task.php | 424 +- .../inc/modules/admin/what-list_transfer.php | 202 +- .../modules/admin/what-list_unconfirmed.php | 378 +- 0.2.1/inc/modules/admin/what-list_user.php | 500 +- 0.2.1/inc/modules/admin/what-list_wernis.php | 86 +- 0.2.1/inc/modules/admin/what-lock_user.php | 384 +- 0.2.1/inc/modules/admin/what-logs.php | 196 +- 0.2.1/inc/modules/admin/what-maintenance.php | 164 +- 0.2.1/inc/modules/admin/what-mem_add.php | 432 +- 0.2.1/inc/modules/admin/what-memedit.php | 662 +-- 0.2.1/inc/modules/admin/what-newsletter.php | 6 +- 0.2.1/inc/modules/admin/what-optimize.php | 192 +- 0.2.1/inc/modules/admin/what-overview.php | 178 +- 0.2.1/inc/modules/admin/what-payments.php | 426 +- 0.2.1/inc/modules/admin/what-refbanner.php | 358 +- 0.2.1/inc/modules/admin/what-repair_amenu.php | 166 +- 0.2.1/inc/modules/admin/what-repair_amnu.php | 186 +- 0.2.1/inc/modules/admin/what-repair_cats.php | 180 +- 0.2.1/inc/modules/admin/what-repair_gmenu.php | 164 +- 0.2.1/inc/modules/admin/what-repair_gmnu.php | 186 +- 0.2.1/inc/modules/admin/what-repair_mmenu.php | 164 +- 0.2.1/inc/modules/admin/what-repair_mmnu.php | 184 +- 0.2.1/inc/modules/admin/what-send_bonus.php | 488 +- .../modules/admin/what-send_newsletter.php | 202 +- 0.2.1/inc/modules/admin/what-stats.php | 6 +- 0.2.1/inc/modules/admin/what-stats_mods.php | 236 +- 0.2.1/inc/modules/admin/what-sub_points.php | 288 +- 0.2.1/inc/modules/admin/what-theme_check.php | 334 +- 0.2.1/inc/modules/admin/what-theme_edit.php | 292 +- 0.2.1/inc/modules/admin/what-theme_import.php | 354 +- .../inc/modules/admin/what-unlock_emails.php | 502 +- 0.2.1/inc/modules/admin/what-updates.php | 372 +- 0.2.1/inc/modules/admin/what-usage.php | 214 +- 0.2.1/inc/modules/admin/what-user_online.php | 260 +- 0.2.1/inc/modules/admin/what-usr_online.php | 256 +- 0.2.1/inc/modules/chk_login.php | 190 +- 0.2.1/inc/modules/frameset.php | 94 +- 0.2.1/inc/modules/frametester.php | 248 +- 0.2.1/inc/modules/guest/action-admin.php | 112 +- 0.2.1/inc/modules/guest/action-main.php | 124 +- 0.2.1/inc/modules/guest/action-members.php | 112 +- 0.2.1/inc/modules/guest/action-online.php | 156 +- 0.2.1/inc/modules/guest/action-themes.php | 154 +- 0.2.1/inc/modules/guest/what-active.php | 200 +- 0.2.1/inc/modules/guest/what-admin.php | 90 +- 0.2.1/inc/modules/guest/what-agb.php | 94 +- 0.2.1/inc/modules/guest/what-beg.php | 156 +- 0.2.1/inc/modules/guest/what-confirm.php | 378 +- 0.2.1/inc/modules/guest/what-doubler.php | 180 +- 0.2.1/inc/modules/guest/what-impressum.php | 96 +- 0.2.1/inc/modules/guest/what-infos.php | 94 +- 0.2.1/inc/modules/guest/what-login.php | 818 ++-- 0.2.1/inc/modules/guest/what-mediadata.php | 664 +-- 0.2.1/inc/modules/guest/what-my_weblog.php | 130 +- 0.2.1/inc/modules/guest/what-rallyes.php | 296 +- 0.2.1/inc/modules/guest/what-register.php | 972 ++-- 0.2.1/inc/modules/guest/what-stats.php | 458 +- 0.2.1/inc/modules/guest/what-top10.php | 416 +- 0.2.1/inc/modules/guest/what-welcome.php | 94 +- .../inc/modules/guest/what-wernis_portal.php | 134 +- 0.2.1/inc/modules/index.php | 280 +- 0.2.1/inc/modules/loader.php | 128 +- 0.2.1/inc/modules/login.php | 280 +- 0.2.1/inc/modules/member/action-account.php | 130 +- 0.2.1/inc/modules/member/action-bank.php | 130 +- 0.2.1/inc/modules/member/action-extras.php | 130 +- 0.2.1/inc/modules/member/action-logout.php | 130 +- 0.2.1/inc/modules/member/action-main.php | 130 +- 0.2.1/inc/modules/member/action-order.php | 130 +- 0.2.1/inc/modules/member/action-rals.php | 130 +- 0.2.1/inc/modules/member/action-stats.php | 130 +- 0.2.1/inc/modules/member/action-themes.php | 164 +- 0.2.1/inc/modules/member/what-bank_create.php | 104 +- .../inc/modules/member/what-bank_deposit.php | 104 +- 0.2.1/inc/modules/member/what-bank_infos.php | 104 +- 0.2.1/inc/modules/member/what-bank_output.php | 104 +- .../inc/modules/member/what-bank_withdraw.php | 104 +- 0.2.1/inc/modules/member/what-beg.php | 190 +- 0.2.1/inc/modules/member/what-beg2.php | 218 +- 0.2.1/inc/modules/member/what-bonus.php | 252 +- 0.2.1/inc/modules/member/what-categories.php | 346 +- 0.2.1/inc/modules/member/what-doubler.php | 234 +- 0.2.1/inc/modules/member/what-guest.php | 102 +- 0.2.1/inc/modules/member/what-holiday.php | 582 +-- 0.2.1/inc/modules/member/what-html_mail.php | 164 +- 0.2.1/inc/modules/member/what-logout.php | 146 +- 0.2.1/inc/modules/member/what-mydata.php | 682 +-- 0.2.1/inc/modules/member/what-newsletter.php | 246 +- 0.2.1/inc/modules/member/what-nickname.php | 216 +- 0.2.1/inc/modules/member/what-order.php | 1636 +++---- 0.2.1/inc/modules/member/what-payout.php | 616 +-- 0.2.1/inc/modules/member/what-points.php | 468 +- 0.2.1/inc/modules/member/what-rallyes.php | 304 +- 0.2.1/inc/modules/member/what-reflinks.php | 288 +- 0.2.1/inc/modules/member/what-stats.php | 190 +- 0.2.1/inc/modules/member/what-support.php | 198 +- 0.2.1/inc/modules/member/what-themes.php | 292 +- 0.2.1/inc/modules/member/what-transfer.php | 1254 ++--- 0.2.1/inc/modules/member/what-unconfirmed.php | 306 +- 0.2.1/inc/modules/member/what-welcome.php | 156 +- 0.2.1/inc/modules/member/what-wernis.php | 98 +- 0.2.1/inc/modules/order.php | 292 +- 0.2.1/inc/modules/welcome.php | 84 +- 0.2.1/inc/monthly/monthly_beg.php | 250 +- 0.2.1/inc/monthly/monthly_bonus.php | 276 +- 0.2.1/inc/monthly/monthly_newsletter.php | 186 +- 0.2.1/inc/monthly_newsletter.php | 138 +- 0.2.1/inc/mysql-connect.php | 572 +-- 0.2.1/inc/mysql-manager.php | 3376 +++++++------- 0.2.1/inc/patch-system.php | 126 +- 0.2.1/inc/phpmailer/ChangeLog.txt | 504 +- 0.2.1/inc/phpmailer/class.phpmailer.php | 3436 +++++++------- 0.2.1/inc/phpmailer/class.pop3.php | 874 ++-- 0.2.1/inc/phpmailer/class.smtp.php | 2124 ++++----- 0.2.1/inc/phpmailer/codeworxtech.html | 144 +- 0.2.1/inc/phpmailer/docs/extending.html | 296 +- 0.2.1/inc/phpmailer/docs/faq.html | 130 +- 0.2.1/inc/phpmailer/docs/pop3_article.txt | 78 +- 0.2.1/inc/phpmailer/docs/use_gmail.txt | 80 +- 0.2.1/inc/phpmailer/examples/contents.html | 24 +- 0.2.1/inc/phpmailer/examples/index.html | 146 +- .../examples/pop3_before_smtp_test.php | 78 +- 0.2.1/inc/phpmailer/examples/test1.php | 56 +- .../phpmailer/language/phpmailer.lang-br.php | 42 +- .../phpmailer/language/phpmailer.lang-ca.php | 42 +- .../phpmailer/language/phpmailer.lang-cz.php | 46 +- .../phpmailer/language/phpmailer.lang-de.php | 46 +- .../phpmailer/language/phpmailer.lang-dk.php | 46 +- .../phpmailer/language/phpmailer.lang-en.php | 46 +- .../phpmailer/language/phpmailer.lang-es.php | 44 +- .../phpmailer/language/phpmailer.lang-et.php | 44 +- .../phpmailer/language/phpmailer.lang-fi.php | 44 +- .../phpmailer/language/phpmailer.lang-fo.php | 50 +- .../phpmailer/language/phpmailer.lang-fr.php | 48 +- .../phpmailer/language/phpmailer.lang-hu.php | 44 +- .../phpmailer/language/phpmailer.lang-it.php | 56 +- .../phpmailer/language/phpmailer.lang-ja.php | 48 +- .../phpmailer/language/phpmailer.lang-nl.php | 44 +- .../phpmailer/language/phpmailer.lang-no.php | 46 +- .../phpmailer/language/phpmailer.lang-pl.php | 46 +- .../phpmailer/language/phpmailer.lang-ro.php | 46 +- .../phpmailer/language/phpmailer.lang-ru.php | 46 +- .../phpmailer/language/phpmailer.lang-se.php | 46 +- .../phpmailer/language/phpmailer.lang-tr.php | 48 +- 0.2.1/inc/phpmailer/phpdoc/media/banner.css | 64 +- .../inc/phpmailer/phpdoc/media/stylesheet.css | 266 +- 0.2.1/inc/phpmailer/test/phpmailer_test.php | 1144 ++--- 0.2.1/inc/phpmailer/test/phpunit.php | 752 +-- 0.2.1/inc/pool-update.php | 952 ++-- 0.2.1/inc/profile-updte.php | 168 +- 0.2.1/inc/rdf.class.php | 2722 +++++------ 0.2.1/inc/reset/reset_beg.php | 108 +- 0.2.1/inc/reset/reset_bonus.php | 108 +- 0.2.1/inc/reset/reset_daily.php | 208 +- 0.2.1/inc/reset/reset_engine.php | 100 +- 0.2.1/inc/reset/reset_holiday.php | 190 +- 0.2.1/inc/security.php | 114 +- 0.2.1/inc/session.php | 232 +- 0.2.1/inc/sql_error.php | 84 +- 0.2.1/inc/stats_bonus.php | 168 +- 0.2.1/inc/stylesheet.php | 218 +- 0.2.1/inc/theme-manager.php | 344 +- 0.2.1/index.php | 194 +- 0.2.1/install.php | 194 +- 0.2.1/lead-confirm.php | 182 +- 0.2.1/login.php | 124 +- 0.2.1/mailid.php | 452 +- 0.2.1/mailid_top.php | 740 +-- 0.2.1/modules.php | 332 +- 0.2.1/ref.php | 210 +- 0.2.1/robots.txt | 804 ++-- 0.2.1/show_bonus.php | 280 +- 0.2.1/templates/de/emails/add-points.tpl | 24 +- 0.2.1/templates/de/emails/admin-del_links.tpl | 32 +- .../admin/admin_autopurge_del_mails.tpl | 14 +- .../emails/admin/admin_autopurge_delete.tpl | 28 +- .../emails/admin/admin_autopurge_inactive.tpl | 28 +- .../emails/admin/admin_autopurge_points.tpl | 14 +- .../de/emails/admin/admin_autopurge_tsks.tpl | 14 +- .../de/emails/admin/admin_autopurge_turbo.tpl | 14 +- .../admin/admin_autopurge_unconfirmed.tpl | 28 +- .../admin/admin_holiday_deactivated.tpl | 58 +- .../de/emails/admin/admin_holiday_request.tpl | 58 +- .../de/emails/admin/admin_holiday_unlock.tpl | 22 +- .../de/emails/admin/admin_mydata_notify.tpl | 54 +- .../de/emails/admin/admin_new_ext.tpl | 6 +- .../emails/admin/admin_newsletter_request.tpl | 42 +- .../emails/admin/admin_newsletter_reset.tpl | 42 +- .../de/emails/admin/admin_payout_request.tpl | 72 +- .../admin/admin_payout_request_banner.tpl | 76 +- .../de/emails/admin/admin_rallye_expired.tpl | 48 +- .../emails/admin/admin_rallye_expired_no.tpl | 48 +- .../emails/admin/admin_rallye_no_notify.tpl | 40 +- .../de/emails/admin/admin_rallye_notify.tpl | 40 +- .../de/emails/admin/admin_rallye_purged.tpl | 36 +- .../de/emails/admin/admin_support-ordr.tpl | 50 +- .../de/emails/admin/admin_support-reflink.tpl | 50 +- .../admin/admin_support-unconfirmed.tpl | 50 +- .../de/emails/admin/admin_transfer_ap.tpl | 14 +- .../de/emails/admin/admin_transfer_points.tpl | 62 +- .../de/emails/admin/admin_wernis_request.tpl | 68 +- .../admins/admins_mail_contct_admin.tpl | 30 +- .../emails/admins/admins_msg_contct_admin.tpl | 30 +- .../de/emails/admins_mail_contact_admin.tpl | 30 +- .../de/emails/admins_msg_contact_admin.tpl | 30 +- 0.2.1/templates/de/emails/back-admin.tpl | 14 +- 0.2.1/templates/de/emails/back-member.tpl | 14 +- .../templates/de/emails/beg/beg_di_notify.tpl | 24 +- .../templates/de/emails/beg/beg_en_notify.tpl | 52 +- .../de/emails/beg/beg_en_notify_body.tpl | 36 +- 0.2.1/templates/de/emails/bonus-mail.tpl | 76 +- .../de/emails/bonus/bonus_di_notify.tpl | 24 +- .../de/emails/bonus/bonus_en_notify.tpl | 46 +- .../de/emails/bonus/bonus_en_notify_body.tpl | 26 +- 0.2.1/templates/de/emails/confirm-member.tpl | 32 +- .../templates/de/emails/confirm-referral.tpl | 36 +- 0.2.1/templates/de/emails/del-user.tpl | 38 +- 0.2.1/templates/de/emails/done-admin.tpl | 46 +- 0.2.1/templates/de/emails/done-member.tpl | 54 +- .../de/emails/guest/guest_request_confirm.tpl | 24 +- 0.2.1/templates/de/emails/header.tpl | 8 +- 0.2.1/templates/de/emails/lock-user.tpl | 42 +- .../emails/member/member_autopurge_delete.tpl | 4 +- .../member/member_autopurge_inactive.tpl | 36 +- .../emails/member/member_autopurge_points.tpl | 22 +- .../member/member_autopurge_unconfirmed.tpl | 4 +- .../templates/de/emails/member/member_beg.tpl | 26 +- .../de/emails/member/member_birthday.tpl | 18 +- .../emails/member/member_birthday_confirm.tpl | 30 +- .../de/emails/member/member_bonus.tpl | 26 +- .../de/emails/member/member_contct.tpl | 16 +- .../de/emails/member/member_doubler.tpl | 26 +- .../member/member_holiday_activated.tpl | 56 +- .../emails/member/member_holiday_removed.tpl | 42 +- .../emails/member/member_holiday_request.tpl | 54 +- .../emails/member/member_holiday_unlock.tpl | 50 +- .../de/emails/member/member_mydata_notify.tpl | 62 +- .../emails/member/member_newsletter_done.tpl | 38 +- .../member/member_newsletter_request.tpl | 50 +- .../emails/member/member_newsletter_reset.tpl | 34 +- .../emails/member/member_payout_accepted.tpl | 48 +- .../emails/member/member_payout_rejected.tpl | 48 +- .../emails/member/member_payout_request.tpl | 52 +- .../member/member_payout_request_banner.tpl | 56 +- .../emails/member/member_rallye_expired.tpl | 68 +- .../member/member_rallye_expired_bronce.tpl | 68 +- .../member/member_rallye_expired_gold.tpl | 68 +- .../member/member_rallye_expired_silver.tpl | 68 +- .../de/emails/member/member_rallye_notify.tpl | 74 +- .../de/emails/member/member_stats_bonus.tpl | 42 +- .../de/emails/member/member_support-order.tpl | 42 +- .../de/emails/member/member_support-ordr.tpl | 42 +- .../emails/member/member_support-reflink.tpl | 42 +- .../member/member_support-unconfirmed.tpl | 42 +- .../member/member_transfer_recipient.tpl | 44 +- .../emails/member/member_transfer_sender.tpl | 44 +- .../emails/member/member_wernis_accepted.tpl | 48 +- .../emails/member/member_wernis_rejected.tpl | 48 +- .../emails/member/member_wernis_request.tpl | 48 +- 0.2.1/templates/de/emails/new-pass.tpl | 30 +- 0.2.1/templates/de/emails/newsletter.tpl | 32 +- 0.2.1/templates/de/emails/newsletter_html.tpl | 32 +- 0.2.1/templates/de/emails/normal-mail.tpl | 74 +- 0.2.1/templates/de/emails/order-accept.tpl | 36 +- 0.2.1/templates/de/emails/order-admin.tpl | 66 +- 0.2.1/templates/de/emails/order-deleted.tpl | 32 +- 0.2.1/templates/de/emails/order-member.tpl | 50 +- 0.2.1/templates/de/emails/order-reject.tpl | 32 +- 0.2.1/templates/de/emails/profile-updte.tpl | 48 +- 0.2.1/templates/de/emails/register-admin.tpl | 50 +- 0.2.1/templates/de/emails/register-member.tpl | 70 +- 0.2.1/templates/de/emails/sub-points.tpl | 24 +- 0.2.1/templates/de/emails/unlock-user.tpl | 46 +- .../html/admin/admin_list_user_sort_form.tpl | 6 +- .../de/html/guest/guest_stats_member.tpl | 14 +- 0.2.1/templates/de/html/header.tpl | 24 +- 0.2.1/templates/de/html/index_forward.tpl | 18 +- 0.2.1/templates/de/html/loader.tpl | 20 +- 0.2.1/templates/de/html/login_failed_js.tpl | 20 +- .../templates/de/html/mailid/mailid_timer.tpl | 50 +- .../de/html/member/member_login_js.tpl | 20 +- .../de/html/member/member_reflinks_row.tpl | 4 +- .../de/html/member/member_support_form.tpl | 8 +- 0.2.1/theme/business/css/active.css | 18 +- 0.2.1/theme/business/css/beg.css | 18 +- 0.2.1/theme/business/css/bonus.css | 26 +- 0.2.1/theme/business/css/doubler.css | 50 +- 0.2.1/theme/business/css/general.css | 1270 ++--- 0.2.1/theme/business/css/install.css | 128 +- 0.2.1/theme/business/css/register.css | 182 +- 0.2.1/theme/business/css/top10.css | 18 +- 0.2.1/theme/business/css/transfer.css | 24 +- 0.2.1/theme/business/theme.php | 142 +- 0.2.1/theme/default/css/active.css | 18 +- 0.2.1/theme/default/css/beg.css | 18 +- 0.2.1/theme/default/css/bonus.css | 26 +- 0.2.1/theme/default/css/doubler.css | 50 +- 0.2.1/theme/default/css/general.css | 1304 +++--- 0.2.1/theme/default/css/install.css | 154 +- 0.2.1/theme/default/css/register.css | 162 +- 0.2.1/theme/default/css/top10.css | 18 +- 0.2.1/theme/default/css/transfer.css | 24 +- 0.2.1/theme/default/theme.php | 142 +- 0.2.1/theme/desert/css/active.css | 18 +- 0.2.1/theme/desert/css/beg.css | 18 +- 0.2.1/theme/desert/css/bonus.css | 26 +- 0.2.1/theme/desert/css/doubler.css | 50 +- 0.2.1/theme/desert/css/general.css | 1262 ++--- 0.2.1/theme/desert/css/help.css | 24 +- 0.2.1/theme/desert/css/install.css | 142 +- 0.2.1/theme/desert/css/paidlinks.css | 16 +- 0.2.1/theme/desert/css/register.css | 178 +- 0.2.1/theme/desert/css/sponsor.css | 56 +- 0.2.1/theme/desert/css/top10.css | 18 +- 0.2.1/theme/desert/css/transfer.css | 24 +- 0.2.1/theme/desert/theme.php | 142 +- 0.2.1/view.php | 148 +- 552 files changed, 70472 insertions(+), 70472 deletions(-) diff --git a/0.2.1/admin.php b/0.2.1/admin.php index 2c61dc7931..2320674c5e 100644 --- a/0.2.1/admin.php +++ b/0.2.1/admin.php @@ -1,63 +1,63 @@ - + diff --git a/0.2.1/agb.php b/0.2.1/agb.php index a165e96419..a802e0c401 100644 --- a/0.2.1/agb.php +++ b/0.2.1/agb.php @@ -1,62 +1,62 @@ - + diff --git a/0.2.1/beg.php b/0.2.1/beg.php index b936b787ef..9d5380cb87 100644 --- a/0.2.1/beg.php +++ b/0.2.1/beg.php @@ -1,256 +1,256 @@ - 0) && ($CONFIG['beg_uid'] != $uid)) - { - // Update counter - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_clicks=beg_clicks+1 WHERE userid=%d AND status='CONFIRMED' LIMIT 1", - array($uid), __FILE__, __LINE__); - - // Check for last entry for userid w/o IP number - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $CONFIG['beg_timeout'])." OR (timeout > ".(time() - $CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1", - array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 0) && ($POINTS > 0) && (!$login)) - { - // Free memory - SQL_FREERESULT($result); - - if (!IS_ADMIN()) - { - // Remember remote address, userid and timestamp for next click - // but only when there is no admin begging. - // Admins shall be able to test it! - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip, timeout) VALUES('%s', '%s', UNIX_TIMESTAMP())", - array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__); - } - - // Set mode depending on how many mails the member has to confirm - $locked = false; - if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == "N")) $locked = true; - - // Is begging rallye active? - if ($CONFIG['beg_rallye'] == "Y") - { - // Add points to rallye account - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%d LIMIT 1", - array($POINTS, $uid), __FILE__, __LINE__); - } - else - { - // Add points to account - ADD_POINTS_REFSYSTEM($uid, $POINTS, false, "0", $locked, strtolower($CONFIG['beg_mode'])); - } - - // Subtract begged points from member account if the admin has selected one - if ($CONFIG['beg_uid'] > 0) - { - // Subtract from this account - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", - array($POINTS, bigintval($CONFIG['beg_uid'])), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); - } - } - - // Set message - define('__BEG_MSG', LOAD_TEMPLATE("beg_done", true)); - } - elseif ($login) - { - // Logged in user found! - define('__BEG_MSG', LOAD_TEMPLATE("beg_login", true)); - - // Free memory - SQL_FREERESULT($result); - } - else - { - // Free memory - SQL_FREERESULT($result); - - // Clicked received while reload lock is active - define('__BEG_MSG', LOAD_TEMPLATE("beg_failed", true)); - } - - // Include header - require_once(PATH."inc/header.php"); - - // Load final template - LOAD_TEMPLATE("beg_link"); - - // Include footer - require_once(PATH."inc/footer.php"); - } - elseif (($status != "CONFIRMED") && ($status != "failed")) - { - // Maybe locked/unconfirmed account? - switch ($status) - { - case "LOCKED" : $msg = CODE_ID_LOCKED ; break; // Locked account - case "UNCONFIRMED": $msg = CODE_ID_UNCONFIRMED; break; // Unconfirmed account - } - } - elseif (($uid == "0") || ($status == "failed")) - { - // Inalid or locked account, so let's find out - $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1", - array($_GET['uid']), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Locked account - $msg = CODE_ACCOUNT_LOCKED; - } - else - { - // Invalid nickname! (404) - $msg = CODE_USER_404; - } - - // Free memory - SQL_FREERESULT($result); - } - elseif ($uid = $CONFIG['beg_uid']) - { - // Webmaster's ID cannot beg for points! - $msg = CODE_BEG_SAME_AS_OWN; - } - - // Reload to index module - if ((!empty($msg)) && (!empty($msg))) LOAD_URL(URL."/modules.php?module=index&msg=".$msg); - } - else - { - // No userid entered - LOAD_URL(URL."/modules.php?module=index"); - } -} - else -{ - // You have to configure first! - LOAD_URL(URL."/install.php"); -} -// Really all done here... ;-) -?> + 0) && ($CONFIG['beg_uid'] != $uid)) + { + // Update counter + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_clicks=beg_clicks+1 WHERE userid=%d AND status='CONFIRMED' LIMIT 1", + array($uid), __FILE__, __LINE__); + + // Check for last entry for userid w/o IP number + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $CONFIG['beg_timeout'])." OR (timeout > ".(time() - $CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1", + array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__); + if ((SQL_NUMROWS($result) == 0) && ($POINTS > 0) && (!$login)) + { + // Free memory + SQL_FREERESULT($result); + + if (!IS_ADMIN()) + { + // Remember remote address, userid and timestamp for next click + // but only when there is no admin begging. + // Admins shall be able to test it! + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip, timeout) VALUES('%s', '%s', UNIX_TIMESTAMP())", + array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__); + } + + // Set mode depending on how many mails the member has to confirm + $locked = false; + if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == "N")) $locked = true; + + // Is begging rallye active? + if ($CONFIG['beg_rallye'] == "Y") + { + // Add points to rallye account + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%d LIMIT 1", + array($POINTS, $uid), __FILE__, __LINE__); + } + else + { + // Add points to account + ADD_POINTS_REFSYSTEM($uid, $POINTS, false, "0", $locked, strtolower($CONFIG['beg_mode'])); + } + + // Subtract begged points from member account if the admin has selected one + if ($CONFIG['beg_uid'] > 0) + { + // Subtract from this account + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", + array($POINTS, bigintval($CONFIG['beg_uid'])), __FILE__, __LINE__); + + // Update mediadata as well + if (GET_EXT_VERSION("mediadata") >= "0.0.4") + { + // Update database + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); + } + } + + // Set message + define('__BEG_MSG', LOAD_TEMPLATE("beg_done", true)); + } + elseif ($login) + { + // Logged in user found! + define('__BEG_MSG', LOAD_TEMPLATE("beg_login", true)); + + // Free memory + SQL_FREERESULT($result); + } + else + { + // Free memory + SQL_FREERESULT($result); + + // Clicked received while reload lock is active + define('__BEG_MSG', LOAD_TEMPLATE("beg_failed", true)); + } + + // Include header + require_once(PATH."inc/header.php"); + + // Load final template + LOAD_TEMPLATE("beg_link"); + + // Include footer + require_once(PATH."inc/footer.php"); + } + elseif (($status != "CONFIRMED") && ($status != "failed")) + { + // Maybe locked/unconfirmed account? + switch ($status) + { + case "LOCKED" : $msg = CODE_ID_LOCKED ; break; // Locked account + case "UNCONFIRMED": $msg = CODE_ID_UNCONFIRMED; break; // Unconfirmed account + } + } + elseif (($uid == "0") || ($status == "failed")) + { + // Inalid or locked account, so let's find out + $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1", + array($_GET['uid']), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // Locked account + $msg = CODE_ACCOUNT_LOCKED; + } + else + { + // Invalid nickname! (404) + $msg = CODE_USER_404; + } + + // Free memory + SQL_FREERESULT($result); + } + elseif ($uid = $CONFIG['beg_uid']) + { + // Webmaster's ID cannot beg for points! + $msg = CODE_BEG_SAME_AS_OWN; + } + + // Reload to index module + if ((!empty($msg)) && (!empty($msg))) LOAD_URL(URL."/modules.php?module=index&msg=".$msg); + } + else + { + // No userid entered + LOAD_URL(URL."/modules.php?module=index"); + } +} + else +{ + // You have to configure first! + LOAD_URL(URL."/install.php"); +} +// Really all done here... ;-) +?> diff --git a/0.2.1/birthday_confirm.php b/0.2.1/birthday_confirm.php index 8b6b78948e..abc3bad31f 100644 --- a/0.2.1/birthday_confirm.php +++ b/0.2.1/birthday_confirm.php @@ -1,140 +1,140 @@ - 0) && ($CONFIG['allow_direct_pay'] == "N")) $locked = true; - - // Add points to account - ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($CONFIG['birthday_mode'])); - - // Remove entry from table - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%d LIMIT 1", - array($uid), __FILE__, __LINE__); - - // 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", $GIFT); - } - - // Transfer data to constants for the template - define('__SALUT', TRANSLATE_SEX($salut)); - define('__SNAME', $sname); - define('__FNAME', $fname); - define('__GIFT' , $GIFT); - - // Load message from template - define('__MSG', LOAD_TEMPLATE("birthday_msg", true)); - } - else - { - // Unconfirmed / locked accounts cannot get points - define('__MSG', BIRTHDAY_CANNOT_STATUS_1.TRANSLATE_STATUS($status).BIRTHDAY_CANNOT_STATUS_2); - } - } - else - { - // Cannot load data! - define('__MSG', BIRTHDAY_CANNOT_LOAD_DATA); - } - - // Free memory - SQL_FREERESULT($result); - - // Set this because we have no module in URI - $GLOBALS['module'] = "birthday_confirm"; - - // Include header - include(PATH."inc/header.php"); - - // Load birthday header template (for your banners, e.g.?) - define('__BIRTHDAY_HEADER', LOAD_TEMPLATE("birthday_header", true)); - - // Load birthday footer template (for your banners, e.g.?) - define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE("birthday_footer", true)); - - // Load final template and output it - LOAD_TEMPLATE("birthday_confirm"); - - // Include footer - include(PATH."inc/footer.php"); -} - else -{ - // You have to configure first! - LOAD_URL(URL."/install.php"); -} -// Really all done here... ;-) -?> + 0) && ($CONFIG['allow_direct_pay'] == "N")) $locked = true; + + // Add points to account + ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($CONFIG['birthday_mode'])); + + // Remove entry from table + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%d LIMIT 1", + array($uid), __FILE__, __LINE__); + + // 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", $GIFT); + } + + // Transfer data to constants for the template + define('__SALUT', TRANSLATE_SEX($salut)); + define('__SNAME', $sname); + define('__FNAME', $fname); + define('__GIFT' , $GIFT); + + // Load message from template + define('__MSG', LOAD_TEMPLATE("birthday_msg", true)); + } + else + { + // Unconfirmed / locked accounts cannot get points + define('__MSG', BIRTHDAY_CANNOT_STATUS_1.TRANSLATE_STATUS($status).BIRTHDAY_CANNOT_STATUS_2); + } + } + else + { + // Cannot load data! + define('__MSG', BIRTHDAY_CANNOT_LOAD_DATA); + } + + // Free memory + SQL_FREERESULT($result); + + // Set this because we have no module in URI + $GLOBALS['module'] = "birthday_confirm"; + + // Include header + include(PATH."inc/header.php"); + + // Load birthday header template (for your banners, e.g.?) + define('__BIRTHDAY_HEADER', LOAD_TEMPLATE("birthday_header", true)); + + // Load birthday footer template (for your banners, e.g.?) + define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE("birthday_footer", true)); + + // Load final template and output it + LOAD_TEMPLATE("birthday_confirm"); + + // Include footer + include(PATH."inc/footer.php"); +} + else +{ + // You have to configure first! + LOAD_URL(URL."/install.php"); +} +// Really all done here... ;-) +?> diff --git a/0.2.1/click.php b/0.2.1/click.php index 84868a6793..9ad11a125e 100644 --- a/0.2.1/click.php +++ b/0.2.1/click.php @@ -1,73 +1,73 @@ - + diff --git a/0.2.1/confirm.php b/0.2.1/confirm.php index 9d18c11394..606a41715f 100644 --- a/0.2.1/confirm.php +++ b/0.2.1/confirm.php @@ -1,74 +1,74 @@ - + diff --git a/0.2.1/css.php b/0.2.1/css.php index e8813c4232..cdc3461e4f 100644 --- a/0.2.1/css.php +++ b/0.2.1/css.php @@ -1,65 +1,65 @@ - + diff --git a/0.2.1/doubler.php b/0.2.1/doubler.php index 81aefa8066..a630b2a4f4 100644 --- a/0.2.1/doubler.php +++ b/0.2.1/doubler.php @@ -1,326 +1,326 @@ -= $CONFIG['doubler_min']) && ($_POST['points'] <= $CONFIG['doubler_max'])); - - // Check all together - if ((!empty($uid)) && ($password == generateHash($_POST['pass'], substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) - { - // Nickname resolved to a unique userid or direct userid entered by the member - $DOUBLER_UID = $uid; - - // Calulcate points - $POINTS = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); - - // So let's continue with probing his points amount - if (($POINTS - $CONFIG['doubler_left'] - $_POST['points'] * $CONFIG['doubler_charge']) >= 0) - { - // Enough points are left so let's continue with the doubling process - // Create doubling "account" width *DOUBLED* points - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '%s', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'N')", - array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__); - - // Subtract entered points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", - array($_POST['points'], $uid), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $_POST['points']); - } - - // Add points to "total payed" including charge - $points = $_POST['points'] - $_POST['points'] * $CONFIG['doubler_charge']; - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config='0' LIMIT 1", - array($points), __FILE__, __LINE__); - $CONFIG['doubler_points'] += $points; - - // Destroy cache - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); - } - - // Add second line for the referral but only when uid != refid - if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) - { - // Okay add a refid line and apply refid percents - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '0', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'Y')", - array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $CONFIG['doubler_ref'])), __FILE__, __LINE__); - - // And that's why we dont't want to you more than one referral level of doubler-points. ^^^ - } - - // Update usage counter - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config='0' LIMIT 1", __FILE__, __LINE__); - $CONFIG['doubler_counter']++; - - // Set constant - define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid'])); - } - else - { - // Not enougth points left - define('__ERROR_MSG', DOUBLER_FORM_NO_POINTS_LEFT); - } - - } - elseif ($status == "CONFIRMED") - { - // Account is unconfirmed! - define('__ERROR_MSG', DOUBLER_FORM_WRONG_PASS); - } - elseif ($status == "UNCONFIRMED") - { - // Account is unconfirmed! - define('__ERROR_MSG', DOUBLER_FORM_STATUS_UNCONFIRMED); - } - elseif ($status == "LOCKED") - { - // Account is locked by admin / holiday! - define('__ERROR_MSG', DOUBLER_FORM_STATUS_LOCKED); - } - elseif ($_POST['points'] < $CONFIG['doubler_min']) - { - // Not enougth points entered - define('__ERROR_MSG', DOUBLER_FORM_POINTS_MIN); - } - elseif ($_POST['points'] > $CONFIG['doubler_max']) - { - // Too much points entered - define('__ERROR_MSG', DOUBLER_FORM_POINTS_MAX); - } - elseif ($probe_nickname) - { - // Cannot resolv nickname -> userid - define('__ERROR_MSG', DOUBLER_FORM_404_NICKNAME); - } - else - { - // Wrong password or account not found - define('__ERROR_MSG', DOUBLER_FORM_404_MEMBER); - } - } - elseif (empty($_POST['userid'])) - { - // Login not entered - define('__ERROR_MSG', DOUBLER_FORM_404_LOGIN); - } - elseif (empty($_POST['pass'])) - { - // Password not entered - define('__ERROR_MSG', DOUBLER_FORM_404_PASSWORD); - } - elseif (empty($_POST['points'])) - { - // points not entered - define('__ERROR_MSG', 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 ($CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php"); - - // Output header - include(PATH."inc/header.php"); - - // Banner in text - define('__DOUBLER_BANNER', LOAD_TEMPLATE("doubler_banner", true)); - - // Load header/footer templates - define('__DOUBLER_HEADER', LOAD_TEMPLATE("doubler_header", true)); - define('__DOUBLER_FOOTER', LOAD_TEMPLATE("doubler_footer", true)); - - if (!empty($uid)) - { - // Transfer userid/nickname to constant - define('__REFID', $uid); - } - elseif (!empty($GLOBALS['refid'])) - { - // Transfer userid/nickname to constant - define('__REFID', $GLOBALS['refid']); - } - else - { - // Transfer default refid to constant - define('__REFID', $CONFIG['def_refid']); - } - - // Percent values etc. - define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100)); - define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100)); - define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points'])); - define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min'])); - define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max'])); - - // Text "Enter login" - if (EXT_IS_ACTIVE("nickname")) - { - // Choose login/nickname - define('DOUBLER_ENTER_LOGIN', GUEST_ENTER_LOGIN_NICKNAME); - } - else - { - // Simple login ID - define('DOUBLER_ENTER_LOGIN', GUEST_ENTER_LOGIN); - } - - // Which mail-send-mode did the admin setup? - switch ($CONFIG['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; - } - - // Generate table with already payed out doubles - define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", "Y", "N", "DESC")); - - // Generate timemark - define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout'])); - - // Usage counter - define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']); - - // Points left to doubler - define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT())); - - // Output neccessary form for this - LOAD_TEMPLATE("doubler_index"); - - // Output footer - include(PATH."inc/footer.php"); -} - else -{ - // You have to configure first! - LOAD_URL(URL."/install.php"); -} - -// Really all done here... ;-) -?> += $CONFIG['doubler_min']) && ($_POST['points'] <= $CONFIG['doubler_max'])); + + // Check all together + if ((!empty($uid)) && ($password == generateHash($_POST['pass'], substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) + { + // Nickname resolved to a unique userid or direct userid entered by the member + $DOUBLER_UID = $uid; + + // Calulcate points + $POINTS = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); + + // So let's continue with probing his points amount + if (($POINTS - $CONFIG['doubler_left'] - $_POST['points'] * $CONFIG['doubler_charge']) >= 0) + { + // Enough points are left so let's continue with the doubling process + // Create doubling "account" width *DOUBLED* points + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '%s', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'N')", + array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__); + + // Subtract entered points + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", + array($_POST['points'], $uid), __FILE__, __LINE__); + + // Update mediadata as well + if (GET_EXT_VERSION("mediadata") >= "0.0.4") + { + // Update database + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $_POST['points']); + } + + // Add points to "total payed" including charge + $points = $_POST['points'] - $_POST['points'] * $CONFIG['doubler_charge']; + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config='0' LIMIT 1", + array($points), __FILE__, __LINE__); + $CONFIG['doubler_points'] += $points; + + // Destroy cache + if (GET_EXT_VERSION("cache") >= "0.1.2") + { + if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); + } + + // Add second line for the referral but only when uid != refid + if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) + { + // Okay add a refid line and apply refid percents + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '0', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'Y')", + array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $CONFIG['doubler_ref'])), __FILE__, __LINE__); + + // And that's why we dont't want to you more than one referral level of doubler-points. ^^^ + } + + // Update usage counter + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config='0' LIMIT 1", __FILE__, __LINE__); + $CONFIG['doubler_counter']++; + + // Set constant + define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid'])); + } + else + { + // Not enougth points left + define('__ERROR_MSG', DOUBLER_FORM_NO_POINTS_LEFT); + } + + } + elseif ($status == "CONFIRMED") + { + // Account is unconfirmed! + define('__ERROR_MSG', DOUBLER_FORM_WRONG_PASS); + } + elseif ($status == "UNCONFIRMED") + { + // Account is unconfirmed! + define('__ERROR_MSG', DOUBLER_FORM_STATUS_UNCONFIRMED); + } + elseif ($status == "LOCKED") + { + // Account is locked by admin / holiday! + define('__ERROR_MSG', DOUBLER_FORM_STATUS_LOCKED); + } + elseif ($_POST['points'] < $CONFIG['doubler_min']) + { + // Not enougth points entered + define('__ERROR_MSG', DOUBLER_FORM_POINTS_MIN); + } + elseif ($_POST['points'] > $CONFIG['doubler_max']) + { + // Too much points entered + define('__ERROR_MSG', DOUBLER_FORM_POINTS_MAX); + } + elseif ($probe_nickname) + { + // Cannot resolv nickname -> userid + define('__ERROR_MSG', DOUBLER_FORM_404_NICKNAME); + } + else + { + // Wrong password or account not found + define('__ERROR_MSG', DOUBLER_FORM_404_MEMBER); + } + } + elseif (empty($_POST['userid'])) + { + // Login not entered + define('__ERROR_MSG', DOUBLER_FORM_404_LOGIN); + } + elseif (empty($_POST['pass'])) + { + // Password not entered + define('__ERROR_MSG', DOUBLER_FORM_404_PASSWORD); + } + elseif (empty($_POST['points'])) + { + // points not entered + define('__ERROR_MSG', 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 ($CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php"); + + // Output header + include(PATH."inc/header.php"); + + // Banner in text + define('__DOUBLER_BANNER', LOAD_TEMPLATE("doubler_banner", true)); + + // Load header/footer templates + define('__DOUBLER_HEADER', LOAD_TEMPLATE("doubler_header", true)); + define('__DOUBLER_FOOTER', LOAD_TEMPLATE("doubler_footer", true)); + + if (!empty($uid)) + { + // Transfer userid/nickname to constant + define('__REFID', $uid); + } + elseif (!empty($GLOBALS['refid'])) + { + // Transfer userid/nickname to constant + define('__REFID', $GLOBALS['refid']); + } + else + { + // Transfer default refid to constant + define('__REFID', $CONFIG['def_refid']); + } + + // Percent values etc. + define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100)); + define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100)); + define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points'])); + define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min'])); + define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max'])); + + // Text "Enter login" + if (EXT_IS_ACTIVE("nickname")) + { + // Choose login/nickname + define('DOUBLER_ENTER_LOGIN', GUEST_ENTER_LOGIN_NICKNAME); + } + else + { + // Simple login ID + define('DOUBLER_ENTER_LOGIN', GUEST_ENTER_LOGIN); + } + + // Which mail-send-mode did the admin setup? + switch ($CONFIG['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; + } + + // Generate table with already payed out doubles + define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", "Y", "N", "DESC")); + + // Generate timemark + define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout'])); + + // Usage counter + define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']); + + // Points left to doubler + define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT())); + + // Output neccessary form for this + LOAD_TEMPLATE("doubler_index"); + + // Output footer + include(PATH."inc/footer.php"); +} + else +{ + // You have to configure first! + LOAD_URL(URL."/install.php"); +} + +// Really all done here... ;-) +?> diff --git a/0.2.1/img.php b/0.2.1/img.php index bedf3aa607..773deaa172 100644 --- a/0.2.1/img.php +++ b/0.2.1/img.php @@ -1,67 +1,67 @@ - + diff --git a/0.2.1/inc/autopurge.php b/0.2.1/inc/autopurge.php index b9d7e68adb..52ac704727 100644 --- a/0.2.1/inc/autopurge.php +++ b/0.2.1/inc/autopurge.php @@ -1,450 +1,450 @@ - 0)) -{ - // First calculate the timestamp - if (function_exists('CREATE_TIME_SELECTIONS')) - { - $PURGE = time() - $CONFIG['auto_purge']; - } - else - { - $PURGE = time() - $CONFIG['auto_purge'] * 24 * 60 * 60; - } - - // Init variables - $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 <= %s ORDER BY s.userid", - array(bigintval($PURGE)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - // Start deleting procedure - $uid = "0"; $points = "0"; - while(list($mid, $sender, $pool, $price) = SQL_FETCHROW($result)) - { - // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d LIMIT 1", - array(bigintval($mid)), __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 != $sender) && ($uid > 0) && ($points > 0)) - { - // Directly add points back to senders account - AUTOPURGE_ADD_POINTS($uid, $points); - $points = "0"; - } - // Add points - $uid = $sender; $points += $price; $admin_points += $price; - - // Remove confirmation links from queue - $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d", - array(bigintval($mid)), __FILE__, __LINE__); - - // Update status of order - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%d LIMIT 1", - array(bigintval($pool)), __FILE__, __LINE__); - } - } - - // Add last points to last user account - if ($points > 0) AUTOPURGE_ADD_POINTS($uid, $points); - } - - // Free memory - SQL_FREERESULT($result); - - // Is the 'bonus' extension installed and activated? - if (EXT_IS_ACTIVE("bonus", true)) - { - // Check for bonus campaigns - $result = SQL_QUERY_ESC("SELECT id, points FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND' AND timestamp <= %s ORDER BY id", - array(bigintval($PURGE)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - // Start deleting procedure - $points = "0"; - while (list($bid, $price) = SQL_FETCHROW($result)) - { - // Check if confirmation links are purged or not - $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d", - array(bigintval($bid)), __FILE__, __LINE__); - if (SQL_NUMROWS($result_links) > 0) - { - // At least one link was found, enougth to pay back the points - $points += $price * SQL_NUMROWS($result_links); - - // Free memory - SQL_FREERESULT($result_links); - - // Remove confirmation links from queue - $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d", - array(bigintval($bid)), __FILE__, __LINE__); - - // Update status of order - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%d LIMIT 1", - array(bigintval($bid)), __FILE__, __LINE__); - } - } - - // Add points to jackpot - ADD_JACKPOT($points); - - // Add points for the admin - $admin_points += $points; - } - - // Free memory - SQL_FREERESULT($result); - } - - // Add points from deleted accounts to jackpot, but here just add to notify mail - if ($admin_points > 0) - { - // Send mail to admin - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_SUBJECT, "admin_autopurge_points", TRANSLATE_COMMA($points), "0"); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_points", TRANSLATE_COMMA($points), "0"); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_SUBJECT, $msg); - } - } -} - -// Shall I look for inactive accounts and autopurge inactive accounts? -if ($CONFIG['ap_inactive'] == "Y") -{ - // Ok, let's have a look... - $since = bigintval(time() - $CONFIG['ap_in_since']); - $EXCLUDE_LIST = " AND d.userid != c.def_refid"; - - // Check for more extensions - if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid"; - if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid"; - if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid"; - - // Check for new holiday extension - if (GET_EXT_VERSION("holiday") >= "0.1.3") - { - $EXCLUDE_LIST .= " AND d.holiday_active = 'N'"; - } - - // 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, "._MYSQL_PREFIX."_config AS c -WHERE d.status='CONFIRMED' AND d.joined < %s AND d.last_online < %s AND d.ap_notified < %s -".$EXCLUDE_LIST." -ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); - - if (SQL_NUMROWS($result_inactive) > 0) - { - // Prepare variables and constants... - $UIDs = ""; - define('__INACTIVE_SINCE', ($CONFIG['ap_in_since'] / 60 / 60)); - define('__INACTIVE_TIME' , ($CONFIG['ap_in_time'] / 60 / 60)); - - // Mark found accounts as inactive and send an email - while(list($uid, $email, $last) = SQL_FETCHROW($result_inactive)) - { - // Remember userids for the admin - $UIDs .= $uid.", "; - - // Get date/time from timestamp - $last = MAKE_DATETIME($last, "0"); - - // Load mail template - $msg = LOAD_EMAIL_TEMPLATE("member_autopurge_inactive", $last, bigintval($uid)); - SEND_EMAIL($email, AUTOPURGE_MEMBER_INACTIVE_SUBJECT, $msg); - - // Update this account - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); - } - - // Remove last comma - $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); - - // Send mail notification to admin - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_INACTIVE_SUBJECT, "admin_autopurge_inactive", $UIDs, ""); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_inactive", $UIDs, ""); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_INACTIVE_SUBJECT, $msg); - } - } - - // Free memory - SQL_FREERESULT($result_inactive); - - // 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 - $time = bigintval(time() - $CONFIG['ap_in_time']); - $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online -FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c -WHERE status='CONFIRMED' AND joined < %s AND last_online< %s AND ap_notified < %s -".$EXCLUDE_LIST." -ORDER BY userid", - array($since, $since, $time), __FILE__, __LINE__); - if (SQL_NUMROWS($result_inactive) > 0) - { - // Prepare variable... - $UIDs = ""; - - // Delete inactive accounts - while (list($uid, $email, $last) = SQL_FETCHROW($result_inactive)) - { - // Remember userids for the admin - $UIDs .= $uid.", "; - - // Get date/time from timestamp - $last = MAKE_DATETIME($last, "0"); - - // Finnaly delete this inactive account - DELETE_USER_ACCOUNT(bigintval($uid), LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $last, "")); - } - - // Remove last comma - $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); - - // Send mail notification to admin - if ($CONFIG['ap_un_mail'] == "Y") - { - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_DELETE_SUBJECT, "admin_autopurge_delete", $UIDs, ""); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_delete", $UIDs, ""); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_DELETE_SUBJECT, $msg); - } - } - } - - // Free memory - SQL_FREERESULT($result_inactive); -} - -// Shall I auto-purge unconfirmed accounts? -if ($CONFIG['ap_unconfirmed'] == "Y") -{ - // Init variables and find unconfirmed accounts which I shall auto-purge - $time = bigintval(time() - $CONFIG['ap_un_time']); - $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' AND joined < %s ORDER BY userid", - array($time), __FILE__, __LINE__); - if (SQL_NUMROWS($result_uncon) > 0) - { - // Prepare variable... - $UIDs = ""; - define('__UNCONFIRMED_TIME' , ($CONFIG['ap_un_time'] / 60 / 60)); - - // Delete inactive accounts - while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) - { - // Remember userids for the admin - $UIDs .= $uid.", "; - - // Get date/time from timestamp - $joined = MAKE_DATETIME($joined, "0"); - - // Finnaly delete this inactive account - DELETE_USER_ACCOUNT($uid, LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $joined, "")); - } - - // Remove last comma - $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); - - // Send mail notification to admin - if ($CONFIG['ap_un_mail'] == "Y") - { - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, "admin_autopurge_unconfirmed", $UIDs, ""); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_unconfirmed", $UIDs, ""); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, $msg); - } - } - } - - // Free memory - SQL_FREERESULT($result_uncon); -} - -// Check version (must be > 0.0) -if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == "Y")) -{ - // Purge deleted tasks (no notification to admin) - $since = bigintval(time() - $CONFIG['ap_tasks_time']); - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE status='DELETED' AND task_created <= %s", - array($since), __FILE__, __LINE__); - $DELETED = SQL_AFFECTEDROWS(); - - if (($DELETED > 0) && ($CONFIG['ap_tasks_mail'] == "Y")) - { - // Send out email to admin - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_TASKS_SUBJECT, "admin_autopurge_tsks", $DELETED, ""); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_tsks", $DELETED, ""); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_TASKS_SUBJECT, $msg); - } - } -} - -// Search for mails from deleted members? -if ($CONFIG['ap_del_mails']) -{ - // Okay, let's check for them... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); - $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", - array($since), __FILE__, __LINE__); - - // Reset counter... - $DELETED = 0; - - // Do we have "purged" mails? - if (SQL_NUMROWS($result_mails) > 0) - { - // Okay, check for their sender's - while(list($sender) = SQL_FETCHROW($result_mails)) - { - // Check now... - $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); - if ($found == 0) - { - // Okay we found some mails! - $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%d", - array(bigintval($sender)), __FILE__, __LINE__); - $DELETED += SQL_AFFECTEDROWS(); - - // Reset query (to prevent possible errors) ... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); - $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", - array($since), __FILE__, __LINE__); - } - } - } - - // Free memory - SQL_FREERESULT($result_mails); - - // Now let's check for stats entries as well - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); - $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", - array($since), __FILE__, __LINE__); - - // Do we have "purged" mails? - if (SQL_NUMROWS($result_mails) > 0) - { - // Okay, check for their sender's - while(list($sender) = SQL_FETCHROW($result_mails)) - { - // Check now... - $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); - if ($found == 0) - { - // Okay we found some mails! - $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%d", array(bigintval($sender)), __FILE__, __LINE__); - $DELETED += SQL_AFFECTEDROWS(); - - // Reset query (to prevent possible errors) ... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); - $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_user_stats WHERE data_type='DELETED' AND timestamp_send <= %s ORDER BY sender", - array($since), __FILE__, __LINE__); - } - } - } - - // Free memory - SQL_FREERESULT($result_mails); - - // Do we have deleted mails and the admin want's to receive a notification - if (($DELETED > 0) && ($CONFIG['ap_dm_notify'] == "Y")) - { - // Send out email to admin - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, "admin_autopurge_del_mails", $DELETED, ""); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_del_mails", $DELETED, ""); - SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, $msg); - } - } -} - -if (EXT_IS_ACTIVE("rallye")) -{ - // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) - require_once(PATH."inc/libs/rallye_functions.php"); - RALLYE_DELETE_EXPIRED_RALLYES(); -} -// -if (EXT_IS_ACTIVE("bonus")) -{ - // Check for expired turbo bonus lines - require_once(PATH."inc/libs/bonus_functions.php"); - BONUS_PURGE_EXPIRED_TURBO_BONUS(); -} -// -?> + 0)) +{ + // First calculate the timestamp + if (function_exists('CREATE_TIME_SELECTIONS')) + { + $PURGE = time() - $CONFIG['auto_purge']; + } + else + { + $PURGE = time() - $CONFIG['auto_purge'] * 24 * 60 * 60; + } + + // Init variables + $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 <= %s ORDER BY s.userid", + array(bigintval($PURGE)), __FILE__, __LINE__); + if (SQL_NUMROWS($result) > 0) + { + // Start deleting procedure + $uid = "0"; $points = "0"; + while(list($mid, $sender, $pool, $price) = SQL_FETCHROW($result)) + { + // Check if confirmation links are purged or not + $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d LIMIT 1", + array(bigintval($mid)), __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 != $sender) && ($uid > 0) && ($points > 0)) + { + // Directly add points back to senders account + AUTOPURGE_ADD_POINTS($uid, $points); + $points = "0"; + } + // Add points + $uid = $sender; $points += $price; $admin_points += $price; + + // Remove confirmation links from queue + $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d", + array(bigintval($mid)), __FILE__, __LINE__); + + // Update status of order + $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%d LIMIT 1", + array(bigintval($pool)), __FILE__, __LINE__); + } + } + + // Add last points to last user account + if ($points > 0) AUTOPURGE_ADD_POINTS($uid, $points); + } + + // Free memory + SQL_FREERESULT($result); + + // Is the 'bonus' extension installed and activated? + if (EXT_IS_ACTIVE("bonus", true)) + { + // Check for bonus campaigns + $result = SQL_QUERY_ESC("SELECT id, points FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND' AND timestamp <= %s ORDER BY id", + array(bigintval($PURGE)), __FILE__, __LINE__); + if (SQL_NUMROWS($result) > 0) + { + // Start deleting procedure + $points = "0"; + while (list($bid, $price) = SQL_FETCHROW($result)) + { + // Check if confirmation links are purged or not + $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d", + array(bigintval($bid)), __FILE__, __LINE__); + if (SQL_NUMROWS($result_links) > 0) + { + // At least one link was found, enougth to pay back the points + $points += $price * SQL_NUMROWS($result_links); + + // Free memory + SQL_FREERESULT($result_links); + + // Remove confirmation links from queue + $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d", + array(bigintval($bid)), __FILE__, __LINE__); + + // Update status of order + $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%d LIMIT 1", + array(bigintval($bid)), __FILE__, __LINE__); + } + } + + // Add points to jackpot + ADD_JACKPOT($points); + + // Add points for the admin + $admin_points += $points; + } + + // Free memory + SQL_FREERESULT($result); + } + + // Add points from deleted accounts to jackpot, but here just add to notify mail + if ($admin_points > 0) + { + // Send mail to admin + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_SUBJECT, "admin_autopurge_points", TRANSLATE_COMMA($points), "0"); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_points", TRANSLATE_COMMA($points), "0"); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_SUBJECT, $msg); + } + } +} + +// Shall I look for inactive accounts and autopurge inactive accounts? +if ($CONFIG['ap_inactive'] == "Y") +{ + // Ok, let's have a look... + $since = bigintval(time() - $CONFIG['ap_in_since']); + $EXCLUDE_LIST = " AND d.userid != c.def_refid"; + + // Check for more extensions + if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid"; + if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid"; + if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid"; + + // Check for new holiday extension + if (GET_EXT_VERSION("holiday") >= "0.1.3") + { + $EXCLUDE_LIST .= " AND d.holiday_active = 'N'"; + } + + // 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, "._MYSQL_PREFIX."_config AS c +WHERE d.status='CONFIRMED' AND d.joined < %s AND d.last_online < %s AND d.ap_notified < %s +".$EXCLUDE_LIST." +ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); + + if (SQL_NUMROWS($result_inactive) > 0) + { + // Prepare variables and constants... + $UIDs = ""; + define('__INACTIVE_SINCE', ($CONFIG['ap_in_since'] / 60 / 60)); + define('__INACTIVE_TIME' , ($CONFIG['ap_in_time'] / 60 / 60)); + + // Mark found accounts as inactive and send an email + while(list($uid, $email, $last) = SQL_FETCHROW($result_inactive)) + { + // Remember userids for the admin + $UIDs .= $uid.", "; + + // Get date/time from timestamp + $last = MAKE_DATETIME($last, "0"); + + // Load mail template + $msg = LOAD_EMAIL_TEMPLATE("member_autopurge_inactive", $last, bigintval($uid)); + SEND_EMAIL($email, AUTOPURGE_MEMBER_INACTIVE_SUBJECT, $msg); + + // Update this account + $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1", + array(bigintval($uid)), __FILE__, __LINE__); + } + + // Remove last comma + $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); + + // Send mail notification to admin + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_INACTIVE_SUBJECT, "admin_autopurge_inactive", $UIDs, ""); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_inactive", $UIDs, ""); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_INACTIVE_SUBJECT, $msg); + } + } + + // Free memory + SQL_FREERESULT($result_inactive); + + // 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 + $time = bigintval(time() - $CONFIG['ap_in_time']); + $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online +FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c +WHERE status='CONFIRMED' AND joined < %s AND last_online< %s AND ap_notified < %s +".$EXCLUDE_LIST." +ORDER BY userid", + array($since, $since, $time), __FILE__, __LINE__); + if (SQL_NUMROWS($result_inactive) > 0) + { + // Prepare variable... + $UIDs = ""; + + // Delete inactive accounts + while (list($uid, $email, $last) = SQL_FETCHROW($result_inactive)) + { + // Remember userids for the admin + $UIDs .= $uid.", "; + + // Get date/time from timestamp + $last = MAKE_DATETIME($last, "0"); + + // Finnaly delete this inactive account + DELETE_USER_ACCOUNT(bigintval($uid), LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $last, "")); + } + + // Remove last comma + $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); + + // Send mail notification to admin + if ($CONFIG['ap_un_mail'] == "Y") + { + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_DELETE_SUBJECT, "admin_autopurge_delete", $UIDs, ""); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_delete", $UIDs, ""); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_DELETE_SUBJECT, $msg); + } + } + } + + // Free memory + SQL_FREERESULT($result_inactive); +} + +// Shall I auto-purge unconfirmed accounts? +if ($CONFIG['ap_unconfirmed'] == "Y") +{ + // Init variables and find unconfirmed accounts which I shall auto-purge + $time = bigintval(time() - $CONFIG['ap_un_time']); + $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' AND joined < %s ORDER BY userid", + array($time), __FILE__, __LINE__); + if (SQL_NUMROWS($result_uncon) > 0) + { + // Prepare variable... + $UIDs = ""; + define('__UNCONFIRMED_TIME' , ($CONFIG['ap_un_time'] / 60 / 60)); + + // Delete inactive accounts + while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) + { + // Remember userids for the admin + $UIDs .= $uid.", "; + + // Get date/time from timestamp + $joined = MAKE_DATETIME($joined, "0"); + + // Finnaly delete this inactive account + DELETE_USER_ACCOUNT($uid, LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $joined, "")); + } + + // Remove last comma + $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); + + // Send mail notification to admin + if ($CONFIG['ap_un_mail'] == "Y") + { + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, "admin_autopurge_unconfirmed", $UIDs, ""); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_unconfirmed", $UIDs, ""); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, $msg); + } + } + } + + // Free memory + SQL_FREERESULT($result_uncon); +} + +// Check version (must be > 0.0) +if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == "Y")) +{ + // Purge deleted tasks (no notification to admin) + $since = bigintval(time() - $CONFIG['ap_tasks_time']); + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE status='DELETED' AND task_created <= %s", + array($since), __FILE__, __LINE__); + $DELETED = SQL_AFFECTEDROWS(); + + if (($DELETED > 0) && ($CONFIG['ap_tasks_mail'] == "Y")) + { + // Send out email to admin + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_TASKS_SUBJECT, "admin_autopurge_tsks", $DELETED, ""); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_tsks", $DELETED, ""); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_TASKS_SUBJECT, $msg); + } + } +} + +// Search for mails from deleted members? +if ($CONFIG['ap_del_mails']) +{ + // Okay, let's check for them... + $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", + array($since), __FILE__, __LINE__); + + // Reset counter... + $DELETED = 0; + + // Do we have "purged" mails? + if (SQL_NUMROWS($result_mails) > 0) + { + // Okay, check for their sender's + while(list($sender) = SQL_FETCHROW($result_mails)) + { + // Check now... + $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); + if ($found == 0) + { + // Okay we found some mails! + $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%d", + array(bigintval($sender)), __FILE__, __LINE__); + $DELETED += SQL_AFFECTEDROWS(); + + // Reset query (to prevent possible errors) ... + $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", + array($since), __FILE__, __LINE__); + } + } + } + + // Free memory + SQL_FREERESULT($result_mails); + + // Now let's check for stats entries as well + $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", + array($since), __FILE__, __LINE__); + + // Do we have "purged" mails? + if (SQL_NUMROWS($result_mails) > 0) + { + // Okay, check for their sender's + while(list($sender) = SQL_FETCHROW($result_mails)) + { + // Check now... + $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); + if ($found == 0) + { + // Okay we found some mails! + $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%d", array(bigintval($sender)), __FILE__, __LINE__); + $DELETED += SQL_AFFECTEDROWS(); + + // Reset query (to prevent possible errors) ... + $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_user_stats WHERE data_type='DELETED' AND timestamp_send <= %s ORDER BY sender", + array($since), __FILE__, __LINE__); + } + } + } + + // Free memory + SQL_FREERESULT($result_mails); + + // Do we have deleted mails and the admin want's to receive a notification + if (($DELETED > 0) && ($CONFIG['ap_dm_notify'] == "Y")) + { + // Send out email to admin + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, "admin_autopurge_del_mails", $DELETED, ""); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_autopurge_del_mails", $DELETED, ""); + SEND_ADMIN_EMAILS(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, $msg); + } + } +} + +if (EXT_IS_ACTIVE("rallye")) +{ + // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) + require_once(PATH."inc/libs/rallye_functions.php"); + RALLYE_DELETE_EXPIRED_RALLYES(); +} +// +if (EXT_IS_ACTIVE("bonus")) +{ + // Check for expired turbo bonus lines + require_once(PATH."inc/libs/bonus_functions.php"); + BONUS_PURGE_EXPIRED_TURBO_BONUS(); +} +// +?> diff --git a/0.2.1/inc/config.php b/0.2.1/inc/config.php index 8a73f23807..97a49d396e 100644 --- a/0.2.1/inc/config.php +++ b/0.2.1/inc/config.php @@ -1,160 +1,160 @@ -Roland Häder"); - -// CFG: ERROR_REPORTING -@error_reporting(0); - -// CFG: REGISTER-GLOBALS -@import_request_variables(''); - -// CFG: SITE-KEY -define('SITE_KEY', "gg42ny8-4yng23498-mf423igum-mtu248utn42-mf4839gun43"); - -// CFG: DATE-KEY -define('DATE_KEY', date("d-m-Y (l-F-T)", time())); - -// CFG: DEFAULT-LANGUAGE -define('DEFAULT_LANG', "de"); - -// CFG: NULLPASS-WARNING -define('warn_no_pass', true); - -// CFG: WRITE-FOOTER -define('WRITE_FOOTER', true); - -// CFG: OUTPUT-MODE -define('OUTPUT_MODE', "render"); - -// CFG: MAIN_TITLE -define('MAIN_TITLE', "Your mail-exchanger title"); - -// CFG: SLOGAN -define('SLOGAN', "Your cool slogan here"); - -// Auto-detection... -$URL = "http://".getenv('SERVER_NAME').dirname($_SERVER['PHP_SELF']); -while (substr($URL, -1, 1) == "/") { $URL = substr($URL, 0, -1); } -$PATH = substr(dirname(__FILE__), 0, -3); - -// CFG: HOST-URL (without trailing '/' !) -define('URL', $URL); - -// CFG: SERVER-PATH -define('PATH', $PATH); - -// CFG: WEBMASTER -define('WEBMASTER', "you@some-hoster.tld.invalid"); - -// CFG: INSTALLED -define('mxchange_installed', false); - -// CFG: ADMIN-SETUP -define('admin_registered', false); - -// CFG: FRAMESET -define('frameset_active', false); - -// CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!) -define('DEBUG_MODE', false); - -// When we are not installing -if (!defined('mxchange_installing')) define('mxchange_installing', false); - -// Language stuff (default is german) -require_once(PATH."inc/language.php"); - -// We need general functions and database stuff here -require_once(PATH."inc/functions.php"); -require_once(PATH."inc/mysql-manager.php"); - -// Your MySQL data (we don't like M$ SQL ;-) ) -$MySQL = array( - // CFG: MYSQL-HOST - 'host' => "localhost", - // CFG: MYSQL-DBASE - 'dbase' => "db", - // CFG: MYSQL-LOGIN - 'login' => "user", - // CFG: MYSQL-PASSWORD - 'password' => "pass", -); - -// CFG: MYSQL-PREIFX -define('_MYSQL_PREFIX', "mxchange"); - -// CFG: DATABASE-TYPE -define('_DB_TYPE', "mysql3"); - -// Lead-Code data -define('LEAD_CODE_ENABLED', true); -define('LEAD_EXPIRY_TIME' , (30*24*60*60)); // == 30 days - -// SMTP-Subsystem (keep all empty to use legacy mail() command!) -define('SMTP_HOSTNAME', ""); -define('SMTP_USER' , ""); -define('SMTP_PASSWORD', ""); - -// SSL cookies? (enable only if you have SSL, URLs will begin with https://) -define('SSL_COOKIES', false); - -// CFG: BACKLINK (Enable backlink to mxchange.org in footer? rel=external is set!) -define('ENABLE_BACKLINK', true); - -// Connect to the MySQL database... -require_once(PATH."inc/mysql-connect.php"); - -// -?> +Roland Häder"); + +// CFG: ERROR_REPORTING +@error_reporting(0); + +// CFG: REGISTER-GLOBALS +@import_request_variables(''); + +// CFG: SITE-KEY +define('SITE_KEY', "gg42ny8-4yng23498-mf423igum-mtu248utn42-mf4839gun43"); + +// CFG: DATE-KEY +define('DATE_KEY', date("d-m-Y (l-F-T)", time())); + +// CFG: DEFAULT-LANGUAGE +define('DEFAULT_LANG', "de"); + +// CFG: NULLPASS-WARNING +define('warn_no_pass', true); + +// CFG: WRITE-FOOTER +define('WRITE_FOOTER', true); + +// CFG: OUTPUT-MODE +define('OUTPUT_MODE', "render"); + +// CFG: MAIN_TITLE +define('MAIN_TITLE', "Your mail-exchanger title"); + +// CFG: SLOGAN +define('SLOGAN', "Your cool slogan here"); + +// Auto-detection... +$URL = "http://".getenv('SERVER_NAME').dirname($_SERVER['PHP_SELF']); +while (substr($URL, -1, 1) == "/") { $URL = substr($URL, 0, -1); } +$PATH = substr(dirname(__FILE__), 0, -3); + +// CFG: HOST-URL (without trailing '/' !) +define('URL', $URL); + +// CFG: SERVER-PATH +define('PATH', $PATH); + +// CFG: WEBMASTER +define('WEBMASTER', "you@some-hoster.tld.invalid"); + +// CFG: INSTALLED +define('mxchange_installed', false); + +// CFG: ADMIN-SETUP +define('admin_registered', false); + +// CFG: FRAMESET +define('frameset_active', false); + +// CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!) +define('DEBUG_MODE', false); + +// When we are not installing +if (!defined('mxchange_installing')) define('mxchange_installing', false); + +// Language stuff (default is german) +require_once(PATH."inc/language.php"); + +// We need general functions and database stuff here +require_once(PATH."inc/functions.php"); +require_once(PATH."inc/mysql-manager.php"); + +// Your MySQL data (we don't like M$ SQL ;-) ) +$MySQL = array( + // CFG: MYSQL-HOST + 'host' => "localhost", + // CFG: MYSQL-DBASE + 'dbase' => "db", + // CFG: MYSQL-LOGIN + 'login' => "user", + // CFG: MYSQL-PASSWORD + 'password' => "pass", +); + +// CFG: MYSQL-PREIFX +define('_MYSQL_PREFIX', "mxchange"); + +// CFG: DATABASE-TYPE +define('_DB_TYPE', "mysql3"); + +// Lead-Code data +define('LEAD_CODE_ENABLED', true); +define('LEAD_EXPIRY_TIME' , (30*24*60*60)); // == 30 days + +// SMTP-Subsystem (keep all empty to use legacy mail() command!) +define('SMTP_HOSTNAME', ""); +define('SMTP_USER' , ""); +define('SMTP_PASSWORD', ""); + +// SSL cookies? (enable only if you have SSL, URLs will begin with https://) +define('SSL_COOKIES', false); + +// CFG: BACKLINK (Enable backlink to mxchange.org in footer? rel=external is set!) +define('ENABLE_BACKLINK', true); + +// Connect to the MySQL database... +require_once(PATH."inc/mysql-connect.php"); + +// +?> diff --git a/0.2.1/inc/databases.php b/0.2.1/inc/databases.php index a24c5a2836..4e453ed9a0 100644 --- a/0.2.1/inc/databases.php +++ b/0.2.1/inc/databases.php @@ -1,129 +1,129 @@ - "%uid%", // User-ID - 11 => "%vorname%", // Surname - 12 => "%nachname%", // Family name - 13 => "%anrede%", // Salutation -); -// -// One day -define('ONE_DAY', 60*60*24); - -// -// Timestamp for yesterday, today ... all at 00:00 am -define('START_YDAY', MAKE_TIME(0, 0, 0, time() - ONE_DAY)); -define('START_TDAY', MAKE_TIME(0, 0, 0, time())); - -$COOKIES = substr(URL, strpos(substr(URL, 8), "/") + 8); -if ((strpos($COOKIES, "/") == "0") && (strpos(substr(URL, 8), "/") > 0)) -{ - // Script was installed into a sub directory - if (substr($COOKIES, -1) != "/") $COOKIES .= "/"; -} - else -{ - // No more sub directories added to URL - $COOKIES = "/"; -} - -// Cookie-Path ( for lame servers... ;-) ) -define('COOKIE_PATH', $COOKIES); - -// Base directory for access logfiles -define('LOGS_BASE', "logs"); - -// Base directory for usage statistics -define('USAGE_BASE', "usage"); - -// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!) -define('SERVER_URL', "http://www.mxchange.org"); - -// This current patch level -define('CURR_PATCH_LEVEL', "514"); - -// Take a prime number which is long (if you know a longer one please try it out!) -define('_PRIME', 591623); - -// Calculate with the prime number (for code generation) -define('_ADD', (_PRIME * _PRIME / (pi() * $CONFIG['code_length'] + 1))); - -// -?> + "%uid%", // User-ID + 11 => "%vorname%", // Surname + 12 => "%nachname%", // Family name + 13 => "%anrede%", // Salutation +); +// +// One day +define('ONE_DAY', 60*60*24); + +// +// Timestamp for yesterday, today ... all at 00:00 am +define('START_YDAY', MAKE_TIME(0, 0, 0, time() - ONE_DAY)); +define('START_TDAY', MAKE_TIME(0, 0, 0, time())); + +$COOKIES = substr(URL, strpos(substr(URL, 8), "/") + 8); +if ((strpos($COOKIES, "/") == "0") && (strpos(substr(URL, 8), "/") > 0)) +{ + // Script was installed into a sub directory + if (substr($COOKIES, -1) != "/") $COOKIES .= "/"; +} + else +{ + // No more sub directories added to URL + $COOKIES = "/"; +} + +// Cookie-Path ( for lame servers... ;-) ) +define('COOKIE_PATH', $COOKIES); + +// Base directory for access logfiles +define('LOGS_BASE', "logs"); + +// Base directory for usage statistics +define('USAGE_BASE', "usage"); + +// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!) +define('SERVER_URL', "http://www.mxchange.org"); + +// This current patch level +define('CURR_PATCH_LEVEL', "514"); + +// Take a prime number which is long (if you know a longer one please try it out!) +define('_PRIME', 591623); + +// Calculate with the prime number (for code generation) +define('_ADD', (_PRIME * _PRIME / (pi() * $CONFIG['code_length'] + 1))); + +// +?> diff --git a/0.2.1/inc/db/lib-mysql3.php b/0.2.1/inc/db/lib-mysql3.php index 7b0358b6d8..019c603c30 100644 --- a/0.2.1/inc/db/lib-mysql3.php +++ b/0.2.1/inc/db/lib-mysql3.php @@ -1,274 +1,274 @@ - -".MYSQL_QUERY_STRING."
-".$sql_string); - - if (($CSS != "1") && ($CSS != "-1") && (DEBUG_MODE) && (DEBUG_SQL)) - { - // - // Debugging stuff... - // - $fp = @fopen(PATH."debug.log", 'a') or mxchange_die("Cannot write debug.log!"); - if (!isset($OK)) { - // Write first entry - fwrite($fp, "Module=".$GLOBALS['module']."\n"); - $OK = true; - } - fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n"); - fclose($fp); - } - - // Count DB hits - if (!isset($CONFIG['db_hits'])) - { - // Count in dummy variable - $CONFIG['db_hits'] = 0; - } - else - { - // Count to config array - $CONFIG['db_hits']++; - } - return $result; -} - -// SQL num rows -function SQL_NUMROWS($result) -{ - if ($result != false) - { - $lines = @mysql_num_rows($result); - if (empty($lines)) $lines = "0"; - - } - else - { - // No resource given, no lines found! - $lines = "0"; - } - return $lines; -} - -// SQL affected rows -function SQL_AFFECTEDROWS($lnk="x", $F="dummy", $L="dummy") -{ - global $link; - // $lnk will be ignored for now! - $lines = @mysql_affected_rows($link); - return $lines; -} - -// SQL fetch row -function SQL_FETCHROW($result) -{ - $DATA = array(); - $DATA = @mysql_fetch_row($result); - return $DATA; -} - -// SQL fetch array -function SQL_FETCHARRAY($res=false, $nr=0, $remove_numerical=true) -{ - // Is a result resource set? - if (!$res) return false; - - // Initialize array - $row = array(); - - // Load row from database - $row = @mysql_fetch_array($res); - - // Return only arrays here - if (is_array($row)) - { - // Shall we remove numerical data here automatically? - if ($remove_numerical) - { - // So let's remove all numerical elements to save memory! - $max = count($row); - for ($idx = 0; $idx < ($max / 2); $idx++) - { - // Remove entry - unset($row[$idx]); - } - } - - // Return row - return $row; - } - else - { - // Return a false here... - return false; - } -} - -// SQL result -function SQL_RESULT($res, $row, $field) -{ - $result = @mysql_result($res, $row, $field); - return $result; -} -// SQL connect -function SQL_CONNECT($host, $login, $password, $F, $L) -{ - $connect = @mysql_connect($host, $login, $password) or ADD_FATAL($F." (".$L."):".mysql_error()); - return $connect; -} -// SQL select database -function SQL_SELECT_DB($DB, $link, $F, $L) -{ - $DB = @mysql_select_db($DB, $link) or ADD_FATAL($F." (".$L."):".mysql_error()); - return $DB; -} -// SQL close link -function SQL_CLOSE($link, $F, $L) -{ - global $CONFIG, $CACHE, $CFG_CACHE; - if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($CONFIG['db_hits'])) && (isset($CONFIG['cache_hits'])) && (is_object($CACHE))) - { - // Update counter for db/cache - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET db_hits='".$CONFIG['db_hits']."', cache_hits='".$CONFIG['cache_hits']."' WHERE config='0' LIMIT 1", __FILE__, __LINE__); - - // Update cache here - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - if ($CACHE->cache_file("config", true)) - { - // Replace data - $CACHE->cache_replace("cache_hits", $CONFIG['cache_hits'], "0", $CFG_CACHE); - $CACHE->cache_replace("db_hits" , $CONFIG['db_hits'] , "0", $CFG_CACHE); - } - } - } - - // Close database link - $close = @mysql_close($link) or ADD_FATAL($F." (".$L."):".mysql_error()); - return $close; -} -// SQL free result -function SQL_FREERESULT($result) -{ - $res = @mysql_free_result($result); - return $res; -} -// SQL string escaping -function SQL_QUERY_ESC($qstring, $data, $file, $line, $run=true, $strip=true) -{ - global $link; - $eval = "\$query = sprintf(\"".$qstring."\""; - foreach ($data as $var) - { - if (!empty($var)) - { - if ($strip) { - $eval .= ", SQL_ESCAPE(\"".strip_tags($var)."\")"; - } else { - $eval .= ", SQL_ESCAPE(\"".$var."\")"; - } - } - else - { - $eval .= ", ''"; - } - } - $eval .= ");"; - // - // Debugging - // - //$fp = fopen(PATH."escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!"); - //fwrite($fp, $file."(".$line."): ".str_replace('\r', '', str_replace('\n', " ", $eval))."\n"); - //fclose($fp); - eval($eval); - if ($run) - { - // Run SQL query (default) - return SQL_QUERY($query, $file, $line); - } - else - { - // Return secured string - return $query; - } -} -// Get ID from last INSERT command -function SQL_INSERTID() -{ - return @mysql_insert_id(); -} -// Escape a string for the database -function SQL_ESCAPE($str) -{ - global $link; - if (!is_resource($link)) { - // Fall-back to addslashes() when there is no link - return addslashes($str); - } - - if (function_exists('mysql_real_escape_string')) { - // The new and improved version - return mysql_real_escape_string($str, $link); - } elseif (function_exists('mysql_escape_string')) { - // The obsulete function - return mysql_escape_string($str, $link); - } else { - // If nothing else works - return addslashes($str); - } -} -// SELECT query string from table, columns and so on... ;-) -function SQL_RESULT_FROM_ARRAY ($table, array $columns, $idRow, $id) { - // Prepare the SQL statement - $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%d LIMIT 1"; - - // Return the result - return SQL_QUERY_ESC($SQL, array(bigintval($id)), __FILE__, __LINE__); -} -// -?> + +".MYSQL_QUERY_STRING."
+".$sql_string); + + if (($CSS != "1") && ($CSS != "-1") && (DEBUG_MODE) && (DEBUG_SQL)) + { + // + // Debugging stuff... + // + $fp = @fopen(PATH."debug.log", 'a') or mxchange_die("Cannot write debug.log!"); + if (!isset($OK)) { + // Write first entry + fwrite($fp, "Module=".$GLOBALS['module']."\n"); + $OK = true; + } + fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n"); + fclose($fp); + } + + // Count DB hits + if (!isset($CONFIG['db_hits'])) + { + // Count in dummy variable + $CONFIG['db_hits'] = 0; + } + else + { + // Count to config array + $CONFIG['db_hits']++; + } + return $result; +} + +// SQL num rows +function SQL_NUMROWS($result) +{ + if ($result != false) + { + $lines = @mysql_num_rows($result); + if (empty($lines)) $lines = "0"; + + } + else + { + // No resource given, no lines found! + $lines = "0"; + } + return $lines; +} + +// SQL affected rows +function SQL_AFFECTEDROWS($lnk="x", $F="dummy", $L="dummy") +{ + global $link; + // $lnk will be ignored for now! + $lines = @mysql_affected_rows($link); + return $lines; +} + +// SQL fetch row +function SQL_FETCHROW($result) +{ + $DATA = array(); + $DATA = @mysql_fetch_row($result); + return $DATA; +} + +// SQL fetch array +function SQL_FETCHARRAY($res=false, $nr=0, $remove_numerical=true) +{ + // Is a result resource set? + if (!$res) return false; + + // Initialize array + $row = array(); + + // Load row from database + $row = @mysql_fetch_array($res); + + // Return only arrays here + if (is_array($row)) + { + // Shall we remove numerical data here automatically? + if ($remove_numerical) + { + // So let's remove all numerical elements to save memory! + $max = count($row); + for ($idx = 0; $idx < ($max / 2); $idx++) + { + // Remove entry + unset($row[$idx]); + } + } + + // Return row + return $row; + } + else + { + // Return a false here... + return false; + } +} + +// SQL result +function SQL_RESULT($res, $row, $field) +{ + $result = @mysql_result($res, $row, $field); + return $result; +} +// SQL connect +function SQL_CONNECT($host, $login, $password, $F, $L) +{ + $connect = @mysql_connect($host, $login, $password) or ADD_FATAL($F." (".$L."):".mysql_error()); + return $connect; +} +// SQL select database +function SQL_SELECT_DB($DB, $link, $F, $L) +{ + $DB = @mysql_select_db($DB, $link) or ADD_FATAL($F." (".$L."):".mysql_error()); + return $DB; +} +// SQL close link +function SQL_CLOSE($link, $F, $L) +{ + global $CONFIG, $CACHE, $CFG_CACHE; + if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($CONFIG['db_hits'])) && (isset($CONFIG['cache_hits'])) && (is_object($CACHE))) + { + // Update counter for db/cache + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET db_hits='".$CONFIG['db_hits']."', cache_hits='".$CONFIG['cache_hits']."' WHERE config='0' LIMIT 1", __FILE__, __LINE__); + + // Update cache here + if (GET_EXT_VERSION("cache") >= "0.1.2") + { + if ($CACHE->cache_file("config", true)) + { + // Replace data + $CACHE->cache_replace("cache_hits", $CONFIG['cache_hits'], "0", $CFG_CACHE); + $CACHE->cache_replace("db_hits" , $CONFIG['db_hits'] , "0", $CFG_CACHE); + } + } + } + + // Close database link + $close = @mysql_close($link) or ADD_FATAL($F." (".$L."):".mysql_error()); + return $close; +} +// SQL free result +function SQL_FREERESULT($result) +{ + $res = @mysql_free_result($result); + return $res; +} +// SQL string escaping +function SQL_QUERY_ESC($qstring, $data, $file, $line, $run=true, $strip=true) +{ + global $link; + $eval = "\$query = sprintf(\"".$qstring."\""; + foreach ($data as $var) + { + if (!empty($var)) + { + if ($strip) { + $eval .= ", SQL_ESCAPE(\"".strip_tags($var)."\")"; + } else { + $eval .= ", SQL_ESCAPE(\"".$var."\")"; + } + } + else + { + $eval .= ", ''"; + } + } + $eval .= ");"; + // + // Debugging + // + //$fp = fopen(PATH."escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!"); + //fwrite($fp, $file."(".$line."): ".str_replace('\r', '', str_replace('\n', " ", $eval))."\n"); + //fclose($fp); + eval($eval); + if ($run) + { + // Run SQL query (default) + return SQL_QUERY($query, $file, $line); + } + else + { + // Return secured string + return $query; + } +} +// Get ID from last INSERT command +function SQL_INSERTID() +{ + return @mysql_insert_id(); +} +// Escape a string for the database +function SQL_ESCAPE($str) +{ + global $link; + if (!is_resource($link)) { + // Fall-back to addslashes() when there is no link + return addslashes($str); + } + + if (function_exists('mysql_real_escape_string')) { + // The new and improved version + return mysql_real_escape_string($str, $link); + } elseif (function_exists('mysql_escape_string')) { + // The obsulete function + return mysql_escape_string($str, $link); + } else { + // If nothing else works + return addslashes($str); + } +} +// SELECT query string from table, columns and so on... ;-) +function SQL_RESULT_FROM_ARRAY ($table, array $columns, $idRow, $id) { + // Prepare the SQL statement + $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%d LIMIT 1"; + + // Return the result + return SQL_QUERY_ESC($SQL, array(bigintval($id)), __FILE__, __LINE__); +} +// +?> diff --git a/0.2.1/inc/db/lib.php b/0.2.1/inc/db/lib.php index 5c655545b9..6bc4e73971 100644 --- a/0.2.1/inc/db/lib.php +++ b/0.2.1/inc/db/lib.php @@ -1,59 +1,59 @@ - + diff --git a/0.2.1/inc/doubler_send.php b/0.2.1/inc/doubler_send.php index 4ebe37ad08..374a8b19e4 100644 --- a/0.2.1/inc/doubler_send.php +++ b/0.2.1/inc/doubler_send.php @@ -1,203 +1,203 @@ -= %s AND d.completed='N' AND d.is_ref='N' -ORDER BY d.timemark", array($DOUBLER_POINTS, $min), __FILE__, __LINE__); - -// Check for accounts with limitation -$result_main = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark -FROM "._MYSQL_PREFIX."_doubler AS d -LEFT JOIN "._MYSQL_PREFIX."_user_data AS u -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 %s", array($DOUBLER_POINTS, $min, $CONFIG['doubler_max_sent']), __FILE__, __LINE__); - -if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == "Y")) || ((SQL_NUMROWS($result_main) == $CONFIG['doubler_group_sent']) && ($CONFIG['doubler_sent_all'] == "N"))) -{ - // Switch to matching SQL resource - $result_load = $result_main; - if ((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == "Y")) $result_load = $result_total; - - // At least one account was found - while(list($id, $uid, $points, $ip, $time) = SQL_FETCHROW($result_load)) - { - // Only double when points are enougth! - if ($DOUBLER_POINTS >= $points) - { - // Check for his ref points - $result_ref = SQL_QUERY_ESC("SELECT SUM(points) FROM "._MYSQL_PREFIX."_doubler WHERE refid=%d AND completed='N' AND is_ref='Y'", - array(bigintval($uid)), __FILE__, __LINE__); - list($ref) = SQL_FETCHROW($result_ref); - - // Free memory - SQL_FREERESULT($result_ref); - - // Zero refid when empty (might be helpful!) - if (empty($ref)) $ref = 0; - if (($ref > 0) && ($DOUBLER_UID == $uid) && (!empty($ref))) - { - // Referral points found so add them and set line(s) to completed='Y' - $points += $ref; - $result_ref = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE refid=%d AND completed='N' AND is_ref='Y'", - array(bigintval($uid)), __FILE__, __LINE__); - } - else - { - // No referral points found - $ref = "0"; - } - - // Exclude webmaster from doubling... - if ($uid != $CONFIG['doubler_uid']) - { - // Add points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth='0' LIMIT 1", - array($points, bigintval($uid)), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points); - } - } - - // Set entry as "payed" - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - - $OK = false; - // Check for jackpot inclusion in doubling process - if (($jackpot > 0) && ($jackpot >= $points) && ($CONFIG['doubler_jackpot'] == "Y")) - { - // Subtract points from jackpot - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points-%s WHERE ok='ok' LIMIT 1", - array($points), __FILE__, __LINE__); - $jackpot -= $jackpot; - - // Okay, done! - $OK = true; - } - - // Exclude also webmaster's ID in taking points from webmaster's account - if (($user > 0) && ($user >= $points) && (!$OK) && ($CONFIG['doubler_uid'] > 0) && ($uid != $CONFIG['doubler_uid'])) - { - // Add points to used points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1", - array($points, $CONFIG['doubler_uid']), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); - } - - // Okay, done! - $OK = true; - } - - // Update doubler's account only when others are not updated - if (!$OK) - { - // Add points to used doubler points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_used=doubler_used+%s WHERE config='0' LIMIT 1", - array($points), __FILE__, __LINE__); - - // Destroy cache - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); - } - } - - // Update variables to prevent errors - $CONFIG['doubler_used'] += $points; - $DOUBLER_POINTS -= $points; - - // Prepare array - $content = array( - // Doubler transmission ID - 'id' => $id, - // Doubled points - 'points' => TRANSLATE_COMMA($points), - // Timemark - 'when' => MAKE_DATETIME($time, "2"), - // IP number when the member submitted the doubling form - 'ip' => $ip, - ); - - // Load mail template and send mail away... - $msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid); - SEND_EMAIL($uid, DOUBLER_MEMBER_SUBJECT, $msg); - } - } -} - -// Free memory -SQL_FREERESULT($result_total); -SQL_FREERESULT($result_main); - -// -?> += %s AND d.completed='N' AND d.is_ref='N' +ORDER BY d.timemark", array($DOUBLER_POINTS, $min), __FILE__, __LINE__); + +// Check for accounts with limitation +$result_main = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark +FROM "._MYSQL_PREFIX."_doubler AS d +LEFT JOIN "._MYSQL_PREFIX."_user_data AS u +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 %s", array($DOUBLER_POINTS, $min, $CONFIG['doubler_max_sent']), __FILE__, __LINE__); + +if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == "Y")) || ((SQL_NUMROWS($result_main) == $CONFIG['doubler_group_sent']) && ($CONFIG['doubler_sent_all'] == "N"))) +{ + // Switch to matching SQL resource + $result_load = $result_main; + if ((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == "Y")) $result_load = $result_total; + + // At least one account was found + while(list($id, $uid, $points, $ip, $time) = SQL_FETCHROW($result_load)) + { + // Only double when points are enougth! + if ($DOUBLER_POINTS >= $points) + { + // Check for his ref points + $result_ref = SQL_QUERY_ESC("SELECT SUM(points) FROM "._MYSQL_PREFIX."_doubler WHERE refid=%d AND completed='N' AND is_ref='Y'", + array(bigintval($uid)), __FILE__, __LINE__); + list($ref) = SQL_FETCHROW($result_ref); + + // Free memory + SQL_FREERESULT($result_ref); + + // Zero refid when empty (might be helpful!) + if (empty($ref)) $ref = 0; + if (($ref > 0) && ($DOUBLER_UID == $uid) && (!empty($ref))) + { + // Referral points found so add them and set line(s) to completed='Y' + $points += $ref; + $result_ref = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE refid=%d AND completed='N' AND is_ref='Y'", + array(bigintval($uid)), __FILE__, __LINE__); + } + else + { + // No referral points found + $ref = "0"; + } + + // Exclude webmaster from doubling... + if ($uid != $CONFIG['doubler_uid']) + { + // Add points + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth='0' LIMIT 1", + array($points, bigintval($uid)), __FILE__, __LINE__); + + // Update mediadata as well + if (GET_EXT_VERSION("mediadata") >= "0.0.4") + { + // Update database + MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points); + } + } + + // Set entry as "payed" + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + + $OK = false; + // Check for jackpot inclusion in doubling process + if (($jackpot > 0) && ($jackpot >= $points) && ($CONFIG['doubler_jackpot'] == "Y")) + { + // Subtract points from jackpot + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points-%s WHERE ok='ok' LIMIT 1", + array($points), __FILE__, __LINE__); + $jackpot -= $jackpot; + + // Okay, done! + $OK = true; + } + + // Exclude also webmaster's ID in taking points from webmaster's account + if (($user > 0) && ($user >= $points) && (!$OK) && ($CONFIG['doubler_uid'] > 0) && ($uid != $CONFIG['doubler_uid'])) + { + // Add points to used points + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1", + array($points, $CONFIG['doubler_uid']), __FILE__, __LINE__); + + // Update mediadata as well + if (GET_EXT_VERSION("mediadata") >= "0.0.4") + { + // Update database + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); + } + + // Okay, done! + $OK = true; + } + + // Update doubler's account only when others are not updated + if (!$OK) + { + // Add points to used doubler points + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_used=doubler_used+%s WHERE config='0' LIMIT 1", + array($points), __FILE__, __LINE__); + + // Destroy cache + if (GET_EXT_VERSION("cache") >= "0.1.2") + { + if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); + } + } + + // Update variables to prevent errors + $CONFIG['doubler_used'] += $points; + $DOUBLER_POINTS -= $points; + + // Prepare array + $content = array( + // Doubler transmission ID + 'id' => $id, + // Doubled points + 'points' => TRANSLATE_COMMA($points), + // Timemark + 'when' => MAKE_DATETIME($time, "2"), + // IP number when the member submitted the doubling form + 'ip' => $ip, + ); + + // Load mail template and send mail away... + $msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid); + SEND_EMAIL($uid, DOUBLER_MEMBER_SUBJECT, $msg); + } + } +} + +// Free memory +SQL_FREERESULT($result_total); +SQL_FREERESULT($result_main); + +// +?> diff --git a/0.2.1/inc/extensions.php b/0.2.1/inc/extensions.php index 0b39a0c827..9e6bd17a5a 100644 --- a/0.2.1/inc/extensions.php +++ b/0.2.1/inc/extensions.php @@ -1,564 +1,564 @@ -v".$EXT_VER.":
".$UPDATE_NOTES."

\n"; - $UPDATE_NOTES = ""; - } - elseif (($EXT_VER == "0.0") || ($EXT_VER == "0.0.0")) - { - // Initial release - $NOTES .= "v".$EXT_VER.":
".INITIAL_RELEASE."

\n"; - } - else - { - $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\n"; - } - } - } - - // Does this extension depends on an outstanding update of another update? - if (!empty($EXT_UPDATE_DEPENDS)) - { - // Backup SQL commands and clear current - $SQLs2 = $SQLs; $SQLs = array(); $test = false; - - // Backup language as well - $LANG_BCK = $EXT_LANG_PREFIX; - - // Load required extension also in update mode - $file = sprintf(PATH."inc/extensions/ext-%s.php", $EXT_UPDATE_DEPENDS); - - // Check for required file - if (file_exists($file) && is_readable($file)) - { - // File exists so let's load it - $VER_BACKUP = $EXT_VERSION; - require($file); - $EXT_VERSION = $VER_BACKUP; - - // If versions mismatch update extension first - $ext_ver = GET_EXT_VERSION($EXT_UPDATE_DEPENDS); - if (empty($ext_ver)) - { - // Extension not registered so far so first load task's ID... - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE task_type='EXTENSION' AND subject LIKE '[%s:]%%' LIMIT 1", - array($EXT_UPDATE_DEPENDS), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Task found so load task's ID and register extension... - list($task) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $test = EXTENSION_REGISTER($EXT_UPDATE_DEPENDS, $task, $dry_run); - } - } - elseif ($ext_ver != $EXT_VERSION) - { - // Ok, update this extension now - EXTENSION_UPDATE(basename($file), $EXT_UPDATE_DEPENDS, $ext_ver, $dry_run); - $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... - } - - // Finally restore previous SQLs - $SQLs = $SQLs2; unset($SQLs2); - $EXT_LANG_PREFIX = $LANG_BCK; - } - else - { - // Does not depend on an other extension - $test = true; - } - - // Does everthing before wents ok? - if ($test) - { - // "Dry-run-mode" activated? - if (!$dry_run) - { - // Are there any SQL commands to run? - if (count($SQLs) > 0) - { - foreach ($SQLs as $sql) - { - $sql = trim($sql); - // Run SQL command - if (!empty($sql)) - { - // Run SQLs without compiling them... - $result = SQL_QUERY($sql, __FILE__, __LINE__, false); - } - } - } - - // Check for added include files - if (count($INC_POOL > 0)) - { - // Loads every include file - foreach ($INC_POOL as $inc) - { - require_once($inc); - } - } - - // Register extension - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_lang_file, ext_active, ext_version) VALUES ('%s', '%s', 'N', '%s')", - array($ext_name, $EXT_LANG_PREFIX, $EXT_VERSION), __FILE__, __LINE__); - - // Update task management - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - - // In normal mode return a true on success - $ret = true; unset($SQLs); - } - else - { - // Rewrite SQL command to keep { and } inside - foreach ($SQLs as $key=>$sql) - { - $sql = str_replace('{', "{", str_replace('}', "}", $sql)); - $SQLs[$key] = $sql; - } - - // In "dry-run" mode return array with all SQL commands - $ret = $SQLs; - - // Remove all SQL commands - unset($SQLs); - } - } - else - { - // No, an error occurs while registering extension :-( - $ret = false; - } - } - elseif (($id > 0) && (!empty($ext_name))) - { - // Remove task from system when id and extension's name is valid - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%d AND status='NEW' LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - } - // Return status code - return $ret; -} -// -function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE) -{ - global $CACHE; - // This shall never do a non-admin user! - if (!IS_ADMIN()) return false; - - // Get extension's name - $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - list($ext_name) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - if (empty($ext_name)) return false; - - // Load extension in detected mode - $file = sprintf(PATH."inc/extensions/ext-%s.php", $ext_name); $SQLs = array(); - if (file_exists($file) && is_readable($file)) require($file); - if ((is_array($SQLs) && (sizeof($SQLs) > 0))) - { - // Run SQL commands... - foreach ($SQLs as $sql) - { - $sql = trim($sql); - if (!empty($sql)) - { - // Run SQL command - $result = SQL_QUERY($sql, __FILE__, __LINE__, false); - } - } - - // Remove cache file(s) if extension is active - if (EXT_IS_ACTIVE("cache")) - { - // Remove cache filer - if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy(); - if ($CACHE->cache_file("mod_reg", true)) $CACHE->cache_destroy(); - if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); - } - } -} -// -function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false) -{ - global $EXTENSIONS, $CONFIG; - - // Extensions are all inactive during installation - if ((!mxchange_installed) || (mxchange_installing) || (empty($ext_name))) return false; - - // Extension's file name will also be checked - $FILE = PATH."inc/extensions/ext-".$ext_name.".php"; - if ((!file_exists($FILE)) && (!is_readable($FILE))) return false; - //* DEBUG: */ echo "*".$ext_name."*
"; - - // Failed is the default - $ret = false; - if ((!empty($EXTENSIONS['ext_active'][$ext_name])) && (!$ignore_cache)) - { - // Load from cache - $active = $EXTENSIONS['ext_active'][$ext_name]; - - // Count cache hits - if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; - } - else - { - // Load from database - $result = SQL_QUERY_ESC("SELECT ext_active FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", - array($ext_name), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 0) - { - // Extension was not found! - return false; - } - list($active) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Write cache array - $EXTENSIONS['ext_active'][$ext_name] = $active; - } - - // Is this extension activated? (For admins we always have active extensions...) - $inc = sprintf(PATH."inc/extensions/ext-%s.php", $ext_name); - // Shorter way - return ( - ( - ($active == "Y") || ( - (IS_ADMIN()) && - (!$ignore_admin) && - (!empty($active)) - ) - ) && ( - file_exists($inc) - ) && ( - is_readable($inc) - ) - ); -} -// -function GET_EXT_VERSION ($ext_name) -{ - global $EXTENSIONS, $CONFIG; - // Extensions are all inactive during installation - if ((!mxchange_installed) || (mxchange_installing)) return ""; - - // Is the cache written? - if (!empty($EXTENSIONS['ext_version'][$ext_name])) - { - // Load data from cache - $ret = $EXTENSIONS['ext_version'][$ext_name]; - - // Count cache hits - if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; - } - else - { - // Load from database - $result = SQL_QUERY_ESC("SELECT ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", - array($ext_name), __FILE__, __LINE__); - list($ret) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Set cache - $EXTENSIONS['ext_version'][$ext_name] = $ret; - } - return $ret; -} -// -function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) -{ - // This shall never do a non-admin user! - global $CACHE, $CONFIG, $NOTES; $SQLs = array(); - if ((!IS_ADMIN()) || (empty($ext))) return false; - - // Load extension in update mode - $EXT_LOAD_MODE = "update"; $EXT_UPDATE_DEPENDS = ""; $NOTES = ""; - include(PATH."inc/extensions/".$file); - if (!empty($EXT_UPDATE_DEPENDS)) - { - // Update another extension first! - $test = EXTENSION_UPDATE(("ext-".$EXT_UPDATE_DEPENDS.".php"), $EXT_UPDATE_DEPENDS, GET_EXT_VERSION($EXT_UPDATE_DEPENDS), $dry_run); - } - - // Check if version is updated - if ((($EXT_VERSION != $EXT_VER) || ($dry_run)) && (is_array($EXT_VER_HISTORY))) - { - // Search for starting point - $start = array_search($EXT_VER, $EXT_VER_HISTORY); - $NOTES = ""; - - // And load SQL queries in order of version history - for ($idx = ($start + 1); $idx < sizeof($EXT_VER_HISTORY); $idx++) - { - // Remove old SQLs array to prevent possible bugs - if (!$dry_run) { unset($SQLs); $SQLs = array(); } - - // Set version - $EXT_VER = $EXT_VER_HISTORY[$idx]; - - // Include again... - include(PATH."inc/extensions/".$file); - - // Add notes - if ($CONFIG['verbose_sql'] == "Y") - { - $EXT_VER = $EXT_VER_HISTORY[$idx]; - if (!empty($UPDATE_NOTES)) - { - // Update notes found - $NOTES .= "v".$EXT_VER.":
".$UPDATE_NOTES."

\n"; - $UPDATE_NOTES = ""; - } - elseif ($EXT_VER == "0.0") - { - // Initial release - $NOTES .= "v".$EXT_VER.":
".INITIAL_RELEASE."

\n"; - } - else - { - $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\n"; - } - } - - // Run SQLs - if ((is_array($SQLs)) && (!$dry_run)) - { - // Run SQL commands - foreach ($SQLs as $sql) - { - $sql = trim($sql); - if (!empty($sql)) - { - // Run SQL command... - $result = SQL_QUERY($sql, __FILE__, __LINE__, false); - } - } - } elseif (GET_EXT_VERSION("sql_patches") == "") { - // Remove SQLs if extension is not installed - $SQLs = array(); - } - } - - if (!$dry_run) - { - // In normal mode insert task and update extension's version... - $ext_subj = "[UPDATE-".$ext."-".$EXT_VERSION.":] ".ADMIN_UPDATE_EXT_SUBJ; - - // Create task - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject='%s' LIMIT 1", - array($ext_subj), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 0) - { - // Task not created so it's a brand-new extension which we need to register and create a task for! - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'EXTENSION_UPDATE', '%s', '%s', UNIX_TIMESTAMP())", - array(GET_ADMIN_ID(SQL_ESCAPE($_COOKIE['admin_login'])), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__); - } - - // Free memory - SQL_FREERESULT($result); - - // Update extension's version - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_version='%s' WHERE ext_name='%s' LIMIT 1", - array($EXT_VERSION, $ext), __FILE__, __LINE__); - - // Update cache - if (EXT_IS_ACTIVE("cache")) - { - if ($CACHE->cache_file("extensions", true) == true) $CACHE->cache_destroy(); - if ($CACHE->cache_file("config", true) == true) $CACHE->cache_destroy(); - if ($CACHE->cache_file("mod_reg", true) == true) $CACHE->cache_destroy(); - } - - // Remove array - unset($SQLs); - } - else - { - // In "dry-run" mode return array with SQL commands - return $SQLs; - } - } -} -// -function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed="", $switch=false, $WIDTH="480") -{ - global $CONFIG; - - $S = false; $SW = 2; $i = 1; - $OUT = ""; - if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == "Y")) - { - $OUT = "
- - - -\n"; - foreach ($SQLs as $idx=>$sql) - { - $sql = trim($sql); - if (!empty($sql)) - { - $S = true; - $OUT .= " - - -\n"; - if ($switch) $SW = 3 - $SW; - $i++; - } - } - } - - if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == "Y")) - { - // No addional SQL commands to run - $OUT .= " - -\n"; - } - - if (!empty($OUT)) { - // Add missing close-table tag - $OUT .= "
- ".$title.": -
".$i.". - ".$sql." -
- ".ADMIN_NO_ADDIONAL_SQLS." -
-
\n"; - } - return $OUT; -} -// -function GET_EXT_NAME($id) -{ - $ret = ""; - global $EXTENSIONS, $CONFIG; - if (!empty($EXTENSIONS['ext_id'][$id])) - { - // Load from cache - $ret = $EXTENSIONS['ext_id'][$id]; - - // Count cache hits - $CONFIG['cache_hits']++; - } - else - { - // Load from database - $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - list($ret) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - return $ret; -} -// -function GET_EXT_ID($name) -{ - $ret = "0"; - global $EXTENSIONS, $CONFIG; - if ((isset($EXTENSIONS['ext_id'])) && (is_array($EXTENSIONS['ext_id']))) - { - // Load from cache - $ret = array_search($name, $EXTENSIONS['ext_id']); - - // Count cache hits - $CONFIG['cache_hits']++; - } - else - { - // Load from database - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", - array($name), __FILE__, __LINE__); - list($ret) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - return $ret; -} -// -?> +v".$EXT_VER.":
".$UPDATE_NOTES."

\n"; + $UPDATE_NOTES = ""; + } + elseif (($EXT_VER == "0.0") || ($EXT_VER == "0.0.0")) + { + // Initial release + $NOTES .= "v".$EXT_VER.":
".INITIAL_RELEASE."

\n"; + } + else + { + $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\n"; + } + } + } + + // Does this extension depends on an outstanding update of another update? + if (!empty($EXT_UPDATE_DEPENDS)) + { + // Backup SQL commands and clear current + $SQLs2 = $SQLs; $SQLs = array(); $test = false; + + // Backup language as well + $LANG_BCK = $EXT_LANG_PREFIX; + + // Load required extension also in update mode + $file = sprintf(PATH."inc/extensions/ext-%s.php", $EXT_UPDATE_DEPENDS); + + // Check for required file + if (file_exists($file) && is_readable($file)) + { + // File exists so let's load it + $VER_BACKUP = $EXT_VERSION; + require($file); + $EXT_VERSION = $VER_BACKUP; + + // If versions mismatch update extension first + $ext_ver = GET_EXT_VERSION($EXT_UPDATE_DEPENDS); + if (empty($ext_ver)) + { + // Extension not registered so far so first load task's ID... + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE task_type='EXTENSION' AND subject LIKE '[%s:]%%' LIMIT 1", + array($EXT_UPDATE_DEPENDS), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // Task found so load task's ID and register extension... + list($task) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + $test = EXTENSION_REGISTER($EXT_UPDATE_DEPENDS, $task, $dry_run); + } + } + elseif ($ext_ver != $EXT_VERSION) + { + // Ok, update this extension now + EXTENSION_UPDATE(basename($file), $EXT_UPDATE_DEPENDS, $ext_ver, $dry_run); + $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... + } + + // Finally restore previous SQLs + $SQLs = $SQLs2; unset($SQLs2); + $EXT_LANG_PREFIX = $LANG_BCK; + } + else + { + // Does not depend on an other extension + $test = true; + } + + // Does everthing before wents ok? + if ($test) + { + // "Dry-run-mode" activated? + if (!$dry_run) + { + // Are there any SQL commands to run? + if (count($SQLs) > 0) + { + foreach ($SQLs as $sql) + { + $sql = trim($sql); + // Run SQL command + if (!empty($sql)) + { + // Run SQLs without compiling them... + $result = SQL_QUERY($sql, __FILE__, __LINE__, false); + } + } + } + + // Check for added include files + if (count($INC_POOL > 0)) + { + // Loads every include file + foreach ($INC_POOL as $inc) + { + require_once($inc); + } + } + + // Register extension + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_lang_file, ext_active, ext_version) VALUES ('%s', '%s', 'N', '%s')", + array($ext_name, $EXT_LANG_PREFIX, $EXT_VERSION), __FILE__, __LINE__); + + // Update task management + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + + // In normal mode return a true on success + $ret = true; unset($SQLs); + } + else + { + // Rewrite SQL command to keep { and } inside + foreach ($SQLs as $key=>$sql) + { + $sql = str_replace('{', "{", str_replace('}', "}", $sql)); + $SQLs[$key] = $sql; + } + + // In "dry-run" mode return array with all SQL commands + $ret = $SQLs; + + // Remove all SQL commands + unset($SQLs); + } + } + else + { + // No, an error occurs while registering extension :-( + $ret = false; + } + } + elseif (($id > 0) && (!empty($ext_name))) + { + // Remove task from system when id and extension's name is valid + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%d AND status='NEW' LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + } + // Return status code + return $ret; +} +// +function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE) +{ + global $CACHE; + // This shall never do a non-admin user! + if (!IS_ADMIN()) return false; + + // Get extension's name + $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + list($ext_name) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + if (empty($ext_name)) return false; + + // Load extension in detected mode + $file = sprintf(PATH."inc/extensions/ext-%s.php", $ext_name); $SQLs = array(); + if (file_exists($file) && is_readable($file)) require($file); + if ((is_array($SQLs) && (sizeof($SQLs) > 0))) + { + // Run SQL commands... + foreach ($SQLs as $sql) + { + $sql = trim($sql); + if (!empty($sql)) + { + // Run SQL command + $result = SQL_QUERY($sql, __FILE__, __LINE__, false); + } + } + + // Remove cache file(s) if extension is active + if (EXT_IS_ACTIVE("cache")) + { + // Remove cache filer + if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy(); + if ($CACHE->cache_file("mod_reg", true)) $CACHE->cache_destroy(); + if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); + } + } +} +// +function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false) +{ + global $EXTENSIONS, $CONFIG; + + // Extensions are all inactive during installation + if ((!mxchange_installed) || (mxchange_installing) || (empty($ext_name))) return false; + + // Extension's file name will also be checked + $FILE = PATH."inc/extensions/ext-".$ext_name.".php"; + if ((!file_exists($FILE)) && (!is_readable($FILE))) return false; + //* DEBUG: */ echo "*".$ext_name."*
"; + + // Failed is the default + $ret = false; + if ((!empty($EXTENSIONS['ext_active'][$ext_name])) && (!$ignore_cache)) + { + // Load from cache + $active = $EXTENSIONS['ext_active'][$ext_name]; + + // Count cache hits + if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; + } + else + { + // Load from database + $result = SQL_QUERY_ESC("SELECT ext_active FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + array($ext_name), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 0) + { + // Extension was not found! + return false; + } + list($active) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // Write cache array + $EXTENSIONS['ext_active'][$ext_name] = $active; + } + + // Is this extension activated? (For admins we always have active extensions...) + $inc = sprintf(PATH."inc/extensions/ext-%s.php", $ext_name); + // Shorter way + return ( + ( + ($active == "Y") || ( + (IS_ADMIN()) && + (!$ignore_admin) && + (!empty($active)) + ) + ) && ( + file_exists($inc) + ) && ( + is_readable($inc) + ) + ); +} +// +function GET_EXT_VERSION ($ext_name) +{ + global $EXTENSIONS, $CONFIG; + // Extensions are all inactive during installation + if ((!mxchange_installed) || (mxchange_installing)) return ""; + + // Is the cache written? + if (!empty($EXTENSIONS['ext_version'][$ext_name])) + { + // Load data from cache + $ret = $EXTENSIONS['ext_version'][$ext_name]; + + // Count cache hits + if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; + } + else + { + // Load from database + $result = SQL_QUERY_ESC("SELECT ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + array($ext_name), __FILE__, __LINE__); + list($ret) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // Set cache + $EXTENSIONS['ext_version'][$ext_name] = $ret; + } + return $ret; +} +// +function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) +{ + // This shall never do a non-admin user! + global $CACHE, $CONFIG, $NOTES; $SQLs = array(); + if ((!IS_ADMIN()) || (empty($ext))) return false; + + // Load extension in update mode + $EXT_LOAD_MODE = "update"; $EXT_UPDATE_DEPENDS = ""; $NOTES = ""; + include(PATH."inc/extensions/".$file); + if (!empty($EXT_UPDATE_DEPENDS)) + { + // Update another extension first! + $test = EXTENSION_UPDATE(("ext-".$EXT_UPDATE_DEPENDS.".php"), $EXT_UPDATE_DEPENDS, GET_EXT_VERSION($EXT_UPDATE_DEPENDS), $dry_run); + } + + // Check if version is updated + if ((($EXT_VERSION != $EXT_VER) || ($dry_run)) && (is_array($EXT_VER_HISTORY))) + { + // Search for starting point + $start = array_search($EXT_VER, $EXT_VER_HISTORY); + $NOTES = ""; + + // And load SQL queries in order of version history + for ($idx = ($start + 1); $idx < sizeof($EXT_VER_HISTORY); $idx++) + { + // Remove old SQLs array to prevent possible bugs + if (!$dry_run) { unset($SQLs); $SQLs = array(); } + + // Set version + $EXT_VER = $EXT_VER_HISTORY[$idx]; + + // Include again... + include(PATH."inc/extensions/".$file); + + // Add notes + if ($CONFIG['verbose_sql'] == "Y") + { + $EXT_VER = $EXT_VER_HISTORY[$idx]; + if (!empty($UPDATE_NOTES)) + { + // Update notes found + $NOTES .= "v".$EXT_VER.":
".$UPDATE_NOTES."

\n"; + $UPDATE_NOTES = ""; + } + elseif ($EXT_VER == "0.0") + { + // Initial release + $NOTES .= "v".$EXT_VER.":
".INITIAL_RELEASE."

\n"; + } + else + { + $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\n"; + } + } + + // Run SQLs + if ((is_array($SQLs)) && (!$dry_run)) + { + // Run SQL commands + foreach ($SQLs as $sql) + { + $sql = trim($sql); + if (!empty($sql)) + { + // Run SQL command... + $result = SQL_QUERY($sql, __FILE__, __LINE__, false); + } + } + } elseif (GET_EXT_VERSION("sql_patches") == "") { + // Remove SQLs if extension is not installed + $SQLs = array(); + } + } + + if (!$dry_run) + { + // In normal mode insert task and update extension's version... + $ext_subj = "[UPDATE-".$ext."-".$EXT_VERSION.":] ".ADMIN_UPDATE_EXT_SUBJ; + + // Create task + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject='%s' LIMIT 1", + array($ext_subj), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 0) + { + // Task not created so it's a brand-new extension which we need to register and create a task for! + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'EXTENSION_UPDATE', '%s', '%s', UNIX_TIMESTAMP())", + array(GET_ADMIN_ID(SQL_ESCAPE($_COOKIE['admin_login'])), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__); + } + + // Free memory + SQL_FREERESULT($result); + + // Update extension's version + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_version='%s' WHERE ext_name='%s' LIMIT 1", + array($EXT_VERSION, $ext), __FILE__, __LINE__); + + // Update cache + if (EXT_IS_ACTIVE("cache")) + { + if ($CACHE->cache_file("extensions", true) == true) $CACHE->cache_destroy(); + if ($CACHE->cache_file("config", true) == true) $CACHE->cache_destroy(); + if ($CACHE->cache_file("mod_reg", true) == true) $CACHE->cache_destroy(); + } + + // Remove array + unset($SQLs); + } + else + { + // In "dry-run" mode return array with SQL commands + return $SQLs; + } + } +} +// +function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed="", $switch=false, $WIDTH="480") +{ + global $CONFIG; + + $S = false; $SW = 2; $i = 1; + $OUT = ""; + if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == "Y")) + { + $OUT = "
+ + + +\n"; + foreach ($SQLs as $idx=>$sql) + { + $sql = trim($sql); + if (!empty($sql)) + { + $S = true; + $OUT .= " + + +\n"; + if ($switch) $SW = 3 - $SW; + $i++; + } + } + } + + if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == "Y")) + { + // No addional SQL commands to run + $OUT .= " + +\n"; + } + + if (!empty($OUT)) { + // Add missing close-table tag + $OUT .= "
+ ".$title.": +
".$i.". + ".$sql." +
+ ".ADMIN_NO_ADDIONAL_SQLS." +
+
\n"; + } + return $OUT; +} +// +function GET_EXT_NAME($id) +{ + $ret = ""; + global $EXTENSIONS, $CONFIG; + if (!empty($EXTENSIONS['ext_id'][$id])) + { + // Load from cache + $ret = $EXTENSIONS['ext_id'][$id]; + + // Count cache hits + $CONFIG['cache_hits']++; + } + else + { + // Load from database + $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + list($ret) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + } + return $ret; +} +// +function GET_EXT_ID($name) +{ + $ret = "0"; + global $EXTENSIONS, $CONFIG; + if ((isset($EXTENSIONS['ext_id'])) && (is_array($EXTENSIONS['ext_id']))) + { + // Load from cache + $ret = array_search($name, $EXTENSIONS['ext_id']); + + // Count cache hits + $CONFIG['cache_hits']++; + } + else + { + // Load from database + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + array($name), __FILE__, __LINE__); + list($ret) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + } + return $ret; +} +// +?> diff --git a/0.2.1/inc/extensions/ext-active.php b/0.2.1/inc/extensions/ext-active.php index 6a2824f7e5..b385faa120 100644 --- a/0.2.1/inc/extensions/ext-active.php +++ b/0.2.1/inc/extensions/ext-active.php @@ -1,137 +1,137 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit bigint(20) not null default '10'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_active', 'Aktiv-Liste', 'Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschränkbar."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "active"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 überflüssige HTML-Tags entfernt."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit bigint(20) not null default '10'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_active', 'Aktiv-Liste', 'Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschränkbar."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "active"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-admins.php b/0.2.1/inc/extensions/ext-admins.php index 092261f867..bc2522d0a9 100644 --- a/0.2.1/inc/extensions/ext-admins.php +++ b/0.2.1/inc/extensions/ext-admins.php @@ -1,293 +1,293 @@ -Access Control Lines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id bigint(20) not null auto_increment"; - break; - - case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails ( -id bigint(20) not null auto_increment, -admin_id bigint(20) not null default '0', -mail_template varchar(255) not null, -KEY (admin_id), -PRIMARY KEY (id) -) TYPE=MyISAM"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('admins', 'admins_mails', 'Admin-Mails', 'Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!', '5')"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template LIKE '% %'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admins-Mails-Tabelle geleert."; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "&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!) - $UPDATE_NOTES = "Vorbereitet auf Cache-System"; - break; - - case "0.4.6": // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; - break; - - case "0.5.7": // SQL queries for v0.5.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.5.8": // SQL queries for v0.5.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.6.4": // SQL queries for v0.6.4 - // Update notes (these will be set as task text!) - $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."; - break; - - case "0.6.5": // SQL queries for v0.6.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.6.6": // SQL queries for v0.5.6 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; - break; - - case "0.6.7": // SQL queries for v0.6.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD la_mode enum('global', 'OLD', 'NEW') not null default 'global'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact. Beseitigung eines Fehlers HTTP_POSR_VARS beim Ändern von Administratoren."; - break; - - case "0.6.8": // SQL queries for v0.6.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "setcookie() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."; - break; - - case "0.6.9": // SQL queries for v0.6.9 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Admin-Management' WHERE action = 'admins' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung nach Management umbenannt."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "admins"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Access Control Lines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id bigint(20) not null auto_increment"; + break; + + case "0.4.0": // SQL queries for v0.4.0 + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails ( +id bigint(20) not null auto_increment, +admin_id bigint(20) not null default '0', +mail_template varchar(255) not null, +KEY (admin_id), +PRIMARY KEY (id) +) TYPE=MyISAM"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('admins', 'admins_mails', 'Admin-Mails', 'Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!', '5')"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."; + break; + + case "0.4.1": // SQL queries for v0.4.1 + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template LIKE '% %'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Admins-Mails-Tabelle geleert."; + + case "0.4.4": // SQL queries for v0.4.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "&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!) + $UPDATE_NOTES = "Vorbereitet auf Cache-System"; + break; + + case "0.4.6": // SQL queries for v0.4.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; + break; + + case "0.5.7": // SQL queries for v0.5.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; + break; + + case "0.5.8": // SQL queries for v0.5.8 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.6.4": // SQL queries for v0.6.4 + // Update notes (these will be set as task text!) + $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."; + break; + + case "0.6.5": // SQL queries for v0.6.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + break; + + case "0.6.6": // SQL queries for v0.5.6 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; + break; + + case "0.6.7": // SQL queries for v0.6.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD la_mode enum('global', 'OLD', 'NEW') not null default 'global'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact. Beseitigung eines Fehlers HTTP_POSR_VARS beim Ändern von Administratoren."; + break; + + case "0.6.8": // SQL queries for v0.6.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "setcookie() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."; + break; + + case "0.6.9": // SQL queries for v0.6.9 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Admin-Management' WHERE action = 'admins' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Verwaltung nach Management umbenannt."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "admins"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-admintheme1.php b/0.2.1/inc/extensions/ext-admintheme1.php index 481b005049..53c0a64387 100644 --- a/0.2.1/inc/extensions/ext-admintheme1.php +++ b/0.2.1/inc/extensions/ext-admintheme1.php @@ -1,95 +1,95 @@ - + diff --git a/0.2.1/inc/extensions/ext-admintheme_default.php b/0.2.1/inc/extensions/ext-admintheme_default.php index 5d013927ee..97517cc383 100644 --- a/0.2.1/inc/extensions/ext-admintheme_default.php +++ b/0.2.1/inc/extensions/ext-admintheme_default.php @@ -1,95 +1,95 @@ - + diff --git a/0.2.1/inc/extensions/ext-autopurge.php b/0.2.1/inc/extensions/ext-autopurge.php index affe7ebe67..1a0d6bda37 100644 --- a/0.2.1/inc/extensions/ext-autopurge.php +++ b/0.2.1/inc/extensions/ext-autopurge.php @@ -1,294 +1,294 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - - $UPDATE_NOTES = "Anstelle von ref_depth wurde level programmiert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_tasks enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time bigint(20) not null default '".(60*60*24*7)."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

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

Bitte aktualisieren Sie auch die Admin-Templates!"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Diverse angebundene Erweiterungen gefixt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mailbetreffs korregiert."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template admin_config_autopurge_pro.tpl 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_del_mails enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_notify enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout bigint(20) not null default '86400'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Von bereits gelöschten Mitgliedern die Mails löschen integriert."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit timestamp_send (Zeile 308) beseitigt."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit ap_del_emails (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!) - $UPDATE_NOTES = "Die Accounts der Standart-Referral-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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Unter Auto-Löschung 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!) - $UPDATE_NOTES = "Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - // Transfer all to the $CONFIG array... - $CONFIG['ap_inactive'] = $DUMMY['autopurge_inactive']; // Autopurge inactive accounts (yes/no) - $CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no) - $CONFIG['ap_tasks'] = $DUMMY['autopurge_tasks']; // Autopurge out-dated tasks (yes/no) - $CONFIG['ap_in_mail'] = $DUMMY['ap_in_notify']; // Send email to admin when purging inactive accounts (yes/no) - $CONFIG['ap_un_mail'] = $DUMMY['ap_un_notify']; // Send email to admin when purging unconfirmed accounts (yes/no) - $CONFIG['ap_tasks_mail'] = $DUMMY['ap_tasks_notify']; // Send email to admin when purging out-dated tasks (yes/no) - $CONFIG['ap_in_since'] = $DUMMY['ap_inactive_since']; // Timeout for confirmed accounts when they become inactive (seconds) - $CONFIG['ap_in_time'] = $DUMMY['ap_inactive_time']; // Timeout for inactive accounts when they are automatically deleted (seconds) - $CONFIG['ap_un_time'] = $DUMMY['ap_unconfirmed_time']; // Timeout for unconfirmed accounts when they are automatically deleted (seconds) - $CONFIG['ap_tasks_time'] = $DUMMY['ap_tasks_time']; // Timeout for out-dated tasks - $CONFIG['ap_del_mails'] = $DUMMY['ap_del_mails']; // Autopurge mails from deleted users? - $CONFIG['ap_dm_notify'] = $DUMMY['ap_dm_notify']; // Send email to admin when purging mails from deleted users (yes/no) - $CONFIG['ap_dm_timeout'] = $DUMMY['ap_dm_timeout']; // Timeout for mails from deleted users - - // Save some RAM... - unset($DUMMY); - - // Do we have a daily-reset-run? - if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts - $INC_POOL[] = PATH."inc/autopurge.php"; - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "autopurge"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> +Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + + $UPDATE_NOTES = "Anstelle von ref_depth wurde level programmiert."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; + break; + + case "0.1.9": // SQL queries for v0.1.9 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_tasks enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time bigint(20) not null default '".(60*60*24*7)."'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

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

Bitte aktualisieren Sie auch die Admin-Templates!"; + break; + + case "0.2.1": // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Diverse angebundene Erweiterungen gefixt."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mailbetreffs korregiert."; + break; + + case "0.3.0": // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Template admin_config_autopurge_pro.tpl 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.3.3": // SQL queries for v0.3.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_del_mails enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_notify enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout bigint(20) not null default '86400'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Von bereits gelöschten Mitgliedern die Mails löschen integriert."; + break; + + case "0.3.4": // SQL queries for v0.3.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler mit timestamp_send (Zeile 308) beseitigt."; + break; + + case "0.3.5": // SQL queries for v0.3.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler mit ap_del_emails (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!) + $UPDATE_NOTES = "Die Accounts der Standart-Referral-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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.3.8": // SQL queries for v0.3.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Unter Auto-Löschung 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!) + $UPDATE_NOTES = "Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + // Transfer all to the $CONFIG array... + $CONFIG['ap_inactive'] = $DUMMY['autopurge_inactive']; // Autopurge inactive accounts (yes/no) + $CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no) + $CONFIG['ap_tasks'] = $DUMMY['autopurge_tasks']; // Autopurge out-dated tasks (yes/no) + $CONFIG['ap_in_mail'] = $DUMMY['ap_in_notify']; // Send email to admin when purging inactive accounts (yes/no) + $CONFIG['ap_un_mail'] = $DUMMY['ap_un_notify']; // Send email to admin when purging unconfirmed accounts (yes/no) + $CONFIG['ap_tasks_mail'] = $DUMMY['ap_tasks_notify']; // Send email to admin when purging out-dated tasks (yes/no) + $CONFIG['ap_in_since'] = $DUMMY['ap_inactive_since']; // Timeout for confirmed accounts when they become inactive (seconds) + $CONFIG['ap_in_time'] = $DUMMY['ap_inactive_time']; // Timeout for inactive accounts when they are automatically deleted (seconds) + $CONFIG['ap_un_time'] = $DUMMY['ap_unconfirmed_time']; // Timeout for unconfirmed accounts when they are automatically deleted (seconds) + $CONFIG['ap_tasks_time'] = $DUMMY['ap_tasks_time']; // Timeout for out-dated tasks + $CONFIG['ap_del_mails'] = $DUMMY['ap_del_mails']; // Autopurge mails from deleted users? + $CONFIG['ap_dm_notify'] = $DUMMY['ap_dm_notify']; // Send email to admin when purging mails from deleted users (yes/no) + $CONFIG['ap_dm_timeout'] = $DUMMY['ap_dm_timeout']; // Timeout for mails from deleted users + + // Save some RAM... + unset($DUMMY); + + // Do we have a daily-reset-run? + if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) + { + // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts + $INC_POOL[] = PATH."inc/autopurge.php"; + } + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "autopurge"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-bank.php b/0.2.1/inc/extensions/ext-bank.php index dffef9dc98..17813503eb 100644 --- a/0.2.1/inc/extensions/ext-bank.php +++ b/0.2.1/inc/extensions/ext-bank.php @@ -1,199 +1,199 @@ - + diff --git a/0.2.1/inc/extensions/ext-beg.php b/0.2.1/inc/extensions/ext-beg.php index 7cab063307..02e74e1a38 100644 --- a/0.2.1/inc/extensions/ext-beg.php +++ b/0.2.1/inc/extensions/ext-beg.php @@ -1,321 +1,321 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points_max double(20,5) not null default '0.10000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})"; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte beg_points_ma")."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ip_timeout bigint(20) not null default '1800'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Bitte verschieben Sie die beg-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/html/) in den neuen Order beg!"; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.1.2": - // Get current month - $curr = date("m", time()); - if (strlen($curr) == 1) $curr = "0".$curr; - if ($curr == "00") $curr = "12"; - - // SQL queries for v0.1.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_mode enum('DIRECT', 'REF') not null default 'REF'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_month char(2) not null default '".$curr."'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ranks tinyint(4) not null default '10'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_active enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_rallye enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_points double(21,5) not null default '0.00000'"; - $VIS = "N"; $LOCKED = "Y"; - if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'beg2', 'Bettel-Rallye', '".$VIS."', '".$LOCKED."', '7')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('user', 'list_beg', 'Bettel-Rallye', 'Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.', '12')"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen (member_list_beg.tpl); Template member_beg_404.tpl fehlte!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE what='config_beg' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!"; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_en_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_di_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_new_mem_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_bonus double(20,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_wait bigint(20) not null default '30'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_notify bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_en_notify bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_di_notify bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehler unknown column 'uid' beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_include_own enum('Y', 'N') not null default 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='1' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['beg_timeout'] = $DUMMY['beg_timeout']; // Global timeout - $CONFIG['beg_uid_timeout'] = $DUMMY['beg_uid_timeout']; // Timeout for one userid - $CONFIG['beg_ip_timeout'] = $DUMMY['beg_ip_timeout']; // Timeout for one IP number - $CONFIG['beg_points'] = $DUMMY['beg_points']; // Minimum beggable points - $CONFIG['beg_points_max'] = $DUMMY['beg_points_max']; // Maximum beggable points - $CONFIG['beg_uid'] = $DUMMY['beg_uid']; // Account to subtract begged points from - $CONFIG['beg_mode'] = $DUMMY['beg_mode']; // Payment mode: direct or over referral system? - $CONFIG['beg_month'] = $DUMMY['beg_month']; // Current month - $CONFIG['beg_ranks'] = $DUMMY['beg_ranks']; // Maximum member who will win - $CONFIG['beg_active'] = $DUMMY['beg_active']; // Only active members can win? - $CONFIG['beg_rallye'] = $DUMMY['beg_rallye']; // Is the begging rallye activated? - $CONFIG['beg_ral_en_notify'] = $DUMMY['beg_ral_en_notify']; // Notify members on enabled rallye? - $CONFIG['beg_ral_di_notify'] = $DUMMY['beg_ral_di_notify']; // Notify members on disabled rallye? - $CONFIG['beg_notify_bonus'] = $DUMMY['beg_notify_bonus']; // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification! - $CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye? - $CONFIG['beg_notify_wait'] = $DUMMY['beg_notify_wait']; // Time to wait in seconds for bonus mails - $CONFIG['beg_include_own'] = $DUMMY['beg_include_own']; // Include webmaster's own userid in rallye? - unset($DUMMY); - - // Remove old entries - $OLD = $CONFIG['beg_timeout']; - if ($CONFIG['beg_uid_timeout'] > $OLD) $OLD = $CONFIG['beg_uid_timeout']; - $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__); - - if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Daily reset was run so let's check if begging rallye is active - if ($CONFIG['beg_rallye'] == "Y") - { - // Check for our winers - $INC_POOL[] = PATH."inc/monthly/monthly_beg.php"; - } - else - { - // Reset begging points - $INC_POOL[] = PATH."inc/reset/reset_beg.php"; - } - } - - // Check for beg rallye is active and send mails out - if (($CONFIG['beg_rallye'] == "Y") && ($CONFIG['beg_new_mem_notify'] == "Y")) - { - // Include file for sending out mails - $INC_POOL[] = PATH."inc/mails/beg_mails.php"; - } - - // Return code for the URL - define('CODE_BEG_SAME_AS_OWN', 100); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "beg"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 überflüssige HTML-Tags entfernt."; + break; + + case "0.0.3": // SQL queries for v0.0.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points_max double(20,5) not null default '0.10000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})"; + break; + + case "0.0.4": // SQL queries for v0.0.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte beg_points_ma")."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ip_timeout bigint(20) not null default '1800'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Bitte verschieben Sie die beg-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/html/) in den neuen Order beg!"; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; + break; + + case "0.1.2": + // Get current month + $curr = date("m", time()); + if (strlen($curr) == 1) $curr = "0".$curr; + if ($curr == "00") $curr = "12"; + + // SQL queries for v0.1.2 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_mode enum('DIRECT', 'REF') not null default 'REF'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_month char(2) not null default '".$curr."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ranks tinyint(4) not null default '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_active enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_rallye enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_points double(21,5) not null default '0.00000'"; + $VIS = "N"; $LOCKED = "Y"; + if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'beg2', 'Bettel-Rallye', '".$VIS."', '".$LOCKED."', '7')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('user', 'list_beg', 'Bettel-Rallye', 'Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.', '12')"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen (member_list_beg.tpl); Template member_beg_404.tpl fehlte!"; + break; + + case "0.1.5": // SQL queries for v0.1.5 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE what='config_beg' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!"; + break; + + case "0.1.6": // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_en_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_di_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_new_mem_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_bonus double(20,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_wait bigint(20) not null default '30'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_notify bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_en_notify bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_di_notify bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehler unknown column 'uid' beseitigt."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_include_own enum('Y', 'N') not null default 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."; + break; + + case "0.2.4": // SQL queries for v0.2.4 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='1' WHERE what='beg' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['beg_timeout'] = $DUMMY['beg_timeout']; // Global timeout + $CONFIG['beg_uid_timeout'] = $DUMMY['beg_uid_timeout']; // Timeout for one userid + $CONFIG['beg_ip_timeout'] = $DUMMY['beg_ip_timeout']; // Timeout for one IP number + $CONFIG['beg_points'] = $DUMMY['beg_points']; // Minimum beggable points + $CONFIG['beg_points_max'] = $DUMMY['beg_points_max']; // Maximum beggable points + $CONFIG['beg_uid'] = $DUMMY['beg_uid']; // Account to subtract begged points from + $CONFIG['beg_mode'] = $DUMMY['beg_mode']; // Payment mode: direct or over referral system? + $CONFIG['beg_month'] = $DUMMY['beg_month']; // Current month + $CONFIG['beg_ranks'] = $DUMMY['beg_ranks']; // Maximum member who will win + $CONFIG['beg_active'] = $DUMMY['beg_active']; // Only active members can win? + $CONFIG['beg_rallye'] = $DUMMY['beg_rallye']; // Is the begging rallye activated? + $CONFIG['beg_ral_en_notify'] = $DUMMY['beg_ral_en_notify']; // Notify members on enabled rallye? + $CONFIG['beg_ral_di_notify'] = $DUMMY['beg_ral_di_notify']; // Notify members on disabled rallye? + $CONFIG['beg_notify_bonus'] = $DUMMY['beg_notify_bonus']; // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification! + $CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye? + $CONFIG['beg_notify_wait'] = $DUMMY['beg_notify_wait']; // Time to wait in seconds for bonus mails + $CONFIG['beg_include_own'] = $DUMMY['beg_include_own']; // Include webmaster's own userid in rallye? + unset($DUMMY); + + // Remove old entries + $OLD = $CONFIG['beg_timeout']; + if ($CONFIG['beg_uid_timeout'] > $OLD) $OLD = $CONFIG['beg_uid_timeout']; + $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__); + + if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) + { + // Daily reset was run so let's check if begging rallye is active + if ($CONFIG['beg_rallye'] == "Y") + { + // Check for our winers + $INC_POOL[] = PATH."inc/monthly/monthly_beg.php"; + } + else + { + // Reset begging points + $INC_POOL[] = PATH."inc/reset/reset_beg.php"; + } + } + + // Check for beg rallye is active and send mails out + if (($CONFIG['beg_rallye'] == "Y") && ($CONFIG['beg_new_mem_notify'] == "Y")) + { + // Include file for sending out mails + $INC_POOL[] = PATH."inc/mails/beg_mails.php"; + } + + // Return code for the URL + define('CODE_BEG_SAME_AS_OWN', 100); + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "beg"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-birthday.php b/0.2.1/inc/extensions/ext-birthday.php index 7f7d744b63..fe51e4f712 100644 --- a/0.2.1/inc/extensions/ext-birthday.php +++ b/0.2.1/inc/extensions/ext-birthday.php @@ -1,212 +1,212 @@ -birtday_confirm.php durchgeführt."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vergessenes _OB_CACHING gesetzt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wort Punkte dynamisiert."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Bitte verschieben Sie die birthday-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_mode enum('DIRECT', 'REF') not null default 'DIRECT'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_active enum('Y', 'N') not null default 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Im Script inc/birthday_mails.php hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen Parser Error 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!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - - // Copy config to main array - $CONFIG['birthday_points'] = $DUMMY['birthday_points']; - $CONFIG['birthday_mode'] = $DUMMY['birthday_mode']; - $CONFIG['birthday_active'] = $DUMMY['birthday_active']; - - // Save some RAM... - unset($DUMMY); - - if ((defined('__DAILY_RESET')) && ($CONFIG['birthday_points'] > 0)) - { - // Daily reset was run and we shall pay points so we start checking for members who - // has a birthday for today - $INC_POOL[] = PATH."inc/mails/birthday_mails.php"; - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "birthday"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +birtday_confirm.php durchgeführt."; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Vergessenes _OB_CACHING gesetzt."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wort Punkte dynamisiert."; + break; + + case "0.3.2": // SQL queries for v0.3.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Bitte verschieben Sie die birthday-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.3.5": // SQL queries for v0.3.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; + break; + + case "0.3.6": // SQL queries for v0.3.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_mode enum('DIRECT', 'REF') not null default 'DIRECT'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_active enum('Y', 'N') not null default 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Im Script inc/birthday_mails.php hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen Parser Error 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!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + + // Copy config to main array + $CONFIG['birthday_points'] = $DUMMY['birthday_points']; + $CONFIG['birthday_mode'] = $DUMMY['birthday_mode']; + $CONFIG['birthday_active'] = $DUMMY['birthday_active']; + + // Save some RAM... + unset($DUMMY); + + if ((defined('__DAILY_RESET')) && ($CONFIG['birthday_points'] > 0)) + { + // Daily reset was run and we shall pay points so we start checking for members who + // has a birthday for today + $INC_POOL[] = PATH."inc/mails/birthday_mails.php"; + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "birthday"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-bonus.php b/0.2.1/inc/extensions/ext-bonus.php index 3f00e60954..4520b240b2 100644 --- a/0.2.1/inc/extensions/ext-bonus.php +++ b/0.2.1/inc/extensions/ext-bonus.php @@ -1,603 +1,603 @@ -paidlinks."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus double(20,3) not null default '10.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus double(20,3) not null default '100.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout bigint(20) not null default '86400'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates varchar(255) not null default '50;20;10'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks tinyint(4) not null default '10'"; - // Use actual month for this update - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_bonus_month char(2) not null default '".date("m", time())."'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus double(20,3) not null default '0.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus double(20,3) not null default '0.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats enum('Y', 'N') not null default 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Login-Bonus und Turbo-Klick-Bonus intergriert."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo ( -id bigint(20) NOT NULL auto_increment, -userid bigint(20) NOT NULL default '0', -mail_id bigint(20) NOT NULL default '0', -bonus_id bigint(20) NOT NULL default '0', -level bigint(20) NOT NULL default '0', -points double(20,3) NOT NULL default '0.000', -timemark varchar(32) NOT NULL default '0', -PRIMARY KEY(id), -KEY mail_id (mail_id), -KEY bonus_id (bonus_id), -KEY userid (userid) -) TYPE=MyISAM"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','',0)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Tabellen "._MYSQL_PREFIX."_bonus_urls und "._MYSQL_PREFIX."_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus double(22,5) not null default '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Sicherheitsupdate am Script show_bonus.php durchgeführt."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'list_bonus', 'Aktiv-Rallye-Teilnehmer', 'Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode enum('UID', 'JACKPOT', 'ADD') not null default 'ADD'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Variablen gefixt."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout bigint(20) not null default '".(ONE_DAY * 7)."'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines bigint(20) not null default '10'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template admin_list_bonus.tpl korregiert."; - break; - - case "0.4.3": // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verbesserung des Versandes von HTML-Bonus-Mails."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order double(20,5) not null default '15.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref double(20,5) not null default '100.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats double(20,5) not null default '5.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order double(20,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref double(20,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats double(20,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats enum('Y', 'N') not null default 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referral-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "In inc/monthly_bonus.php 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Problem mit is_hundred 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!) - $UPDATE_NOTES = "Problem mit bonus_stats / Zeile 31 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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.5.3": // SQL queries for v0.5.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speichern der Aktiv-{!POINTS!} für Platz 2 bis x korregiert."; - break; - - case "0.5.4": // SQL queries for v0.5.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablenfehler in inc/monthly_bonus.php behoben."; - break; - - case "0.5.5": // SQL queries for v0.5.5 - // Get previous month - $prev = date("m", time()) - 1; - if (strlen($prev) == 1) $prev = "0".$prev; - if ($prev == "00") $prev = "12"; - - // Reset monthly active rallye - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='".$prev."' WHERE config='0' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Variablenfehler in inc/monthly_bonus.php 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 - // Get current month - $curr = date("m", time()); - if (strlen($curr) == 1) $curr = "0".$curr; - if ($curr == "00") $curr = "12"; - - // Generate timemark... - $mark = mktime(0, 0, 0, $curr, 1, date("Y", time())); - - // Update accounts which are not active last months - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data -SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0 -WHERE last_online < ".$mark." ORDER BY userid"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - break; - - case "0.5.8": // SQL queries for v0.5.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit is_hundred beim täglichen Reset endlich beseitigt."; - break; - - case "0.5.9": // SQL queries for v0.5.9 - $UPDATE_NOTES = "Fehlermeldung /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 beseitigt."; - break; - - case "0.6.0": // SQL queries for v0.6.0 - $UPDATE_NOTES = "SQL-Fehlermeldung in inc/monthly_bonus.php beseitigt."; - break; - - case "0.6.1": // SQL queries for v0.6.1 - $UPDATE_NOTES = "Versand von Bonus-Mails repariert."; - break; - - case "0.6.2": // SQL queries for v0.6.2 - $UPDATE_NOTES = "Löschen von bereits gelöschten Mails wird nun abgelehnt."; - break; - - case "0.6.3": // SQL queries for v0.6.3 - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.6.4": // SQL queries for v0.6.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden."; - break; - - case "0.6.5": // SQL queries for v0.6.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats enum('Y', 'N') not null default 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit bonus_stats beseitigt."; - break; - - case "0.6.6": // SQL queries for v0.6.6 - $UPDATE_NOTES = "Template-Fehler beseitigt im Admin-Bereich."; - break; - - case "0.6.7": // SQL queries for v0.6.7 - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.6.8": // SQL queries for v0.6.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."; - break; - - case "0.6.9": // SQL queries for v0.6.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referral und Statistik-Bonus (100% Klickrate erreicht)."; - break; - - case "0.7.0": // SQL queries for v0.7.0 - $UPDATE_NOTES = "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 - $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."; - break; - - case "0.7.2": // SQL queries for v0.7.2 - $UPDATE_NOTES = "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 - $UPDATE_NOTES = "Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht."; - break; - - case "0.7.4": // SQL queries for v0.7.4 - $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"; - break; - - case "0.7.5": // SQL queries for v0.7.5 - $UPDATE_NOTES = "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 - $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."; - break; - - case "0.7.7": // SQL queries for v0.7.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points double(20,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait bigint(20) not null default '30'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."; - break; - - case "0.7.8": // SQL queries for v0.7.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler im täglichen Reset beseitigt."; - break; - - case "0.7.9": // SQL queries for v0.7.9 - $UPDATE_NOTES = "Dollarzeichen fehlte in inc/reset/reset_bonus.php, Zeile 39"; - break; - - case "0.8.0": // SQL queries for v0.8.0 - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.8.1": // SQL queries for v0.8.1 - $UPDATE_NOTES = "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 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own enum('Y', 'N') not null default 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify enum('Y', 'N') not null default 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."; - break; - - case "0.8.3": // SQL queries for v0.8.3 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.8.4": // SQL queries for v0.8.4 - $UPDATE_NOTES = "Ladeproblem bei nicht installierter Erweiterung cache gefixt."; - break; - - case "0.8.5": // SQL queries for v0.8.5 - $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; - break; - - case "0.8.6": // SQL queries for v0.8.6 - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['login_bonus'] = $DUMMY['login_bonus']; // Bonus points for successfull logins - $CONFIG['turbo_bonus'] = $DUMMY['turbo_bonus']; // Bonus points for the fastest clicker, No. 1 - $CONFIG['bonus_rates'] = $DUMMY['turbo_rates']; // Points for clicker no. 2 to x - $CONFIG['bonus_ranks'] = $DUMMY['bonus_ranks']; // Total ranks who can win - $CONFIG['login_timeout'] = $DUMMY['login_timeout']; // Time in seconds between two logins - $CONFIG['bonus_month'] = $DUMMY['last_bonus_month']; // Last month where click-bonus are "paid" - $CONFIG['bonus_mode'] = $DUMMY['bonus_mode']; // Mode for adding points for login/click bonus - $CONFIG['bonus_uid'] = $DUMMY['bonus_uid']; // Member account to take points from - $CONFIG['bonus_lines'] = $DUMMY['bonus_lines']; // Number of lines to display in show_bonus.php - $CONFIG['bonus_timeout'] = $DUMMY['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo - $CONFIG['bonus_order'] = $DUMMY['bonus_order']; // Bonus points for ordering mails - $CONFIG['bonus_ref'] = $DUMMY['bonus_ref']; // Bonus points for "making" a referral - $CONFIG['bonus_stats'] = $DUMMY['bonus_stats']; // Bonus points for 100% clickrate in mail stats - $CONFIG['bonus_active'] = $DUMMY['bonus_active']; // De/activate bonus active rallye - $CONFIG['bonus_order_yn'] = $DUMMY['bonus_order_yn']; // Include order bonus in analysis? - $CONFIG['bonus_ref_yn'] = $DUMMY['bonus_ref_yn']; // Include referral bonus in analysis? - $CONFIG['bonus_stats_yn'] = $DUMMY['bonus_stats_yn']; // Include statistics bonus in analysis? - $CONFIG['bonus_login_yn'] = $DUMMY['bonus_login_yn']; // Include login bonus in analysis? - $CONFIG['bonus_click_yn'] = $DUMMY['bonus_click_yn']; // Include "mailid" bonus in analysis? - $CONFIG['bonus_en_notify'] = $DUMMY['bonus_en_notify']; // Notify members about enabled active rallye? - $CONFIG['bonus_di_notify'] = $DUMMY['bonus_di_notify']; // Notify members about disabled active rallye? - $CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye? - $CONFIG['bonus_notify_points'] = $DUMMY['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable! - $CONFIG['bonus_notify_wait'] = $DUMMY['bonus_notify_wait']; // Time to wait in seconds for bonus mails - $CONFIG['bonus_include_own'] = $DUMMY['bonus_include_own']; // Include webmaster's own userid in active rallye? - unset($DUMMY); - - if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Daily reset was run so let's check if active rallye is activated - if ($CONFIG['bonus_active'] == "Y") - { - // Run active rallye - if($CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php"; - $INC_POOL[] = PATH."inc/monthly/monthly_bonus.php"; - } - else - { - // Reset points - $INC_POOL[] = PATH."inc/reset/reset_bonus.php"; - } - } - - // Check for bonus rallye is active and send mails out - if (($CONFIG['bonus_active'] == "Y") && ($CONFIG['bonus_new_mem_notify'] == "Y")) - { - // Include file for sending out mails - $INC_POOL[] = PATH."inc/mails/bonus_mails.php"; - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "bonus"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +paidlinks."; + break; + + case "0.2.0": // SQL queries for v0.2.0 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus double(20,3) not null default '10.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus double(20,3) not null default '100.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout bigint(20) not null default '86400'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates varchar(255) not null default '50;20;10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks tinyint(4) not null default '10'"; + // Use actual month for this update + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_bonus_month char(2) not null default '".date("m", time())."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus double(20,3) not null default '0.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus double(20,3) not null default '0.000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats enum('Y', 'N') not null default 'N'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Login-Bonus und Turbo-Klick-Bonus intergriert."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo ( +id bigint(20) NOT NULL auto_increment, +userid bigint(20) NOT NULL default '0', +mail_id bigint(20) NOT NULL default '0', +bonus_id bigint(20) NOT NULL default '0', +level bigint(20) NOT NULL default '0', +points double(20,3) NOT NULL default '0.000', +timemark varchar(32) NOT NULL default '0', +PRIMARY KEY(id), +KEY mail_id (mail_id), +KEY bonus_id (bonus_id), +KEY userid (userid) +) TYPE=MyISAM"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='bonus' LIMIT 1"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','',0)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt."; + break; + + case "0.2.4": // SQL queries for v0.2.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls"; + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Tabellen "._MYSQL_PREFIX."_bonus_urls und "._MYSQL_PREFIX."_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."; + break; + + case "0.2.6": // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus double(22,5) not null default '0.00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "5 Nachkommastellen implementiert"; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Sicherheitsupdate am Script show_bonus.php durchgeführt."; + break; + + case "0.3.2": // SQL queries for v0.3.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; + break; + + case "0.3.3": // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; + break; + + case "0.3.4": // SQL queries for v0.3.4 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'list_bonus', 'Aktiv-Rallye-Teilnehmer', 'Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."; + break; + + case "0.3.5": // SQL queries for v0.3.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode enum('UID', 'JACKPOT', 'ADD') not null default 'ADD'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."; + break; + + case "0.3.6": // SQL queries for v0.3.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; + break; + + case "0.3.9": // SQL queries for v0.3.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlende Variablen gefixt."; + break; + + case "0.4.0": // SQL queries for v0.4.0 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout bigint(20) not null default '".(ONE_DAY * 7)."'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines bigint(20) not null default '10'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; + break; + + case "0.4.1": // SQL queries for v0.4.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template admin_list_bonus.tpl korregiert."; + break; + + case "0.4.3": // SQL queries for v0.4.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Verbesserung des Versandes von HTML-Bonus-Mails."; + break; + + case "0.4.4": // SQL queries for v0.4.4 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order double(20,5) not null default '15.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref double(20,5) not null default '100.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats double(20,5) not null default '5.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order double(20,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref double(20,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats double(20,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats enum('Y', 'N') not null default 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referral-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben."; + break; + + case "0.4.5": // SQL queries for v0.4.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben."; + break; + + case "0.4.7": // SQL queries for v0.4.7 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."; + break; + + case "0.4.8": // SQL queries for v0.4.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "In inc/monthly_bonus.php 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Problem mit is_hundred 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!) + $UPDATE_NOTES = "Problem mit bonus_stats / Zeile 31 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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.5.3": // SQL queries for v0.5.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Speichern der Aktiv-{!POINTS!} für Platz 2 bis x korregiert."; + break; + + case "0.5.4": // SQL queries for v0.5.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Variablenfehler in inc/monthly_bonus.php behoben."; + break; + + case "0.5.5": // SQL queries for v0.5.5 + // Get previous month + $prev = date("m", time()) - 1; + if (strlen($prev) == 1) $prev = "0".$prev; + if ($prev == "00") $prev = "12"; + + // Reset monthly active rallye + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='".$prev."' WHERE config='0' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Weitere Variablenfehler in inc/monthly_bonus.php 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 + // Get current month + $curr = date("m", time()); + if (strlen($curr) == 1) $curr = "0".$curr; + if ($curr == "00") $curr = "12"; + + // Generate timemark... + $mark = mktime(0, 0, 0, $curr, 1, date("Y", time())); + + // Update accounts which are not active last months + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data +SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0 +WHERE last_online < ".$mark." ORDER BY userid"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + break; + + case "0.5.8": // SQL queries for v0.5.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Problem mit is_hundred beim täglichen Reset endlich beseitigt."; + break; + + case "0.5.9": // SQL queries for v0.5.9 + $UPDATE_NOTES = "Fehlermeldung /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 beseitigt."; + break; + + case "0.6.0": // SQL queries for v0.6.0 + $UPDATE_NOTES = "SQL-Fehlermeldung in inc/monthly_bonus.php beseitigt."; + break; + + case "0.6.1": // SQL queries for v0.6.1 + $UPDATE_NOTES = "Versand von Bonus-Mails repariert."; + break; + + case "0.6.2": // SQL queries for v0.6.2 + $UPDATE_NOTES = "Löschen von bereits gelöschten Mails wird nun abgelehnt."; + break; + + case "0.6.3": // SQL queries for v0.6.3 + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.6.4": // SQL queries for v0.6.4 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden."; + break; + + case "0.6.5": // SQL queries for v0.6.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats enum('Y', 'N') not null default 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler mit bonus_stats beseitigt."; + break; + + case "0.6.6": // SQL queries for v0.6.6 + $UPDATE_NOTES = "Template-Fehler beseitigt im Admin-Bereich."; + break; + + case "0.6.7": // SQL queries for v0.6.7 + $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; + break; + + case "0.6.8": // SQL queries for v0.6.8 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."; + break; + + case "0.6.9": // SQL queries for v0.6.9 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referral und Statistik-Bonus (100% Klickrate erreicht)."; + break; + + case "0.7.0": // SQL queries for v0.7.0 + $UPDATE_NOTES = "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 + $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."; + break; + + case "0.7.2": // SQL queries for v0.7.2 + $UPDATE_NOTES = "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 + $UPDATE_NOTES = "Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht."; + break; + + case "0.7.4": // SQL queries for v0.7.4 + $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"; + break; + + case "0.7.5": // SQL queries for v0.7.5 + $UPDATE_NOTES = "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 + $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."; + break; + + case "0.7.7": // SQL queries for v0.7.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points double(20,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait bigint(20) not null default '30'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."; + break; + + case "0.7.8": // SQL queries for v0.7.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler im täglichen Reset beseitigt."; + break; + + case "0.7.9": // SQL queries for v0.7.9 + $UPDATE_NOTES = "Dollarzeichen fehlte in inc/reset/reset_bonus.php, Zeile 39"; + break; + + case "0.8.0": // SQL queries for v0.8.0 + $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; + break; + + case "0.8.1": // SQL queries for v0.8.1 + $UPDATE_NOTES = "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 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own enum('Y', 'N') not null default 'N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify enum('Y', 'N') not null default 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."; + break; + + case "0.8.3": // SQL queries for v0.8.3 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.8.4": // SQL queries for v0.8.4 + $UPDATE_NOTES = "Ladeproblem bei nicht installierter Erweiterung cache gefixt."; + break; + + case "0.8.5": // SQL queries for v0.8.5 + $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; + break; + + case "0.8.6": // SQL queries for v0.8.6 + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['login_bonus'] = $DUMMY['login_bonus']; // Bonus points for successfull logins + $CONFIG['turbo_bonus'] = $DUMMY['turbo_bonus']; // Bonus points for the fastest clicker, No. 1 + $CONFIG['bonus_rates'] = $DUMMY['turbo_rates']; // Points for clicker no. 2 to x + $CONFIG['bonus_ranks'] = $DUMMY['bonus_ranks']; // Total ranks who can win + $CONFIG['login_timeout'] = $DUMMY['login_timeout']; // Time in seconds between two logins + $CONFIG['bonus_month'] = $DUMMY['last_bonus_month']; // Last month where click-bonus are "paid" + $CONFIG['bonus_mode'] = $DUMMY['bonus_mode']; // Mode for adding points for login/click bonus + $CONFIG['bonus_uid'] = $DUMMY['bonus_uid']; // Member account to take points from + $CONFIG['bonus_lines'] = $DUMMY['bonus_lines']; // Number of lines to display in show_bonus.php + $CONFIG['bonus_timeout'] = $DUMMY['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo + $CONFIG['bonus_order'] = $DUMMY['bonus_order']; // Bonus points for ordering mails + $CONFIG['bonus_ref'] = $DUMMY['bonus_ref']; // Bonus points for "making" a referral + $CONFIG['bonus_stats'] = $DUMMY['bonus_stats']; // Bonus points for 100% clickrate in mail stats + $CONFIG['bonus_active'] = $DUMMY['bonus_active']; // De/activate bonus active rallye + $CONFIG['bonus_order_yn'] = $DUMMY['bonus_order_yn']; // Include order bonus in analysis? + $CONFIG['bonus_ref_yn'] = $DUMMY['bonus_ref_yn']; // Include referral bonus in analysis? + $CONFIG['bonus_stats_yn'] = $DUMMY['bonus_stats_yn']; // Include statistics bonus in analysis? + $CONFIG['bonus_login_yn'] = $DUMMY['bonus_login_yn']; // Include login bonus in analysis? + $CONFIG['bonus_click_yn'] = $DUMMY['bonus_click_yn']; // Include "mailid" bonus in analysis? + $CONFIG['bonus_en_notify'] = $DUMMY['bonus_en_notify']; // Notify members about enabled active rallye? + $CONFIG['bonus_di_notify'] = $DUMMY['bonus_di_notify']; // Notify members about disabled active rallye? + $CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye? + $CONFIG['bonus_notify_points'] = $DUMMY['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable! + $CONFIG['bonus_notify_wait'] = $DUMMY['bonus_notify_wait']; // Time to wait in seconds for bonus mails + $CONFIG['bonus_include_own'] = $DUMMY['bonus_include_own']; // Include webmaster's own userid in active rallye? + unset($DUMMY); + + if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) + { + // Daily reset was run so let's check if active rallye is activated + if ($CONFIG['bonus_active'] == "Y") + { + // Run active rallye + if($CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php"; + $INC_POOL[] = PATH."inc/monthly/monthly_bonus.php"; + } + else + { + // Reset points + $INC_POOL[] = PATH."inc/reset/reset_bonus.php"; + } + } + + // Check for bonus rallye is active and send mails out + if (($CONFIG['bonus_active'] == "Y") && ($CONFIG['bonus_new_mem_notify'] == "Y")) + { + // Include file for sending out mails + $INC_POOL[] = PATH."inc/mails/bonus_mails.php"; + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "bonus"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-cache.php b/0.2.1/inc/extensions/ext-cache.php index 64e58f404d..1a86aa29a0 100644 --- a/0.2.1/inc/extensions/ext-cache.php +++ b/0.2.1/inc/extensions/ext-cache.php @@ -1,224 +1,224 @@ -cache_file("extensions", true)) $CACHE->cache_destroy(); - } - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Validierung der Cache-Datei admins.cache integriert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits bigint(20) not null default '0'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('stats', 'cache_stats', 'DB-Cache', 'Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hits auf den Cache werden gezählt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Das Umschreiben der Cache-Daten hat eine Fehlermeldung Falsches Passwort! im Admin-Bereich verursacht."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehler Division durch 0 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!) - $UPDATE_NOTES = "Die Tabelen "._MYSQL_PREFIX."_config, "._MYSQL_PREFIX."_refsystem, "._MYSQL_PREFIX."_refdepths und "._MYSQL_PREFIX."_mod_reg werden nun auch ausgelagert."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admins enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_acls enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_exts enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_config enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_modreg enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refdepth enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refsys enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler Division durch 0 repariert in inc/load_cache.php."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Probleme w&auuml;hrend des Installationsvorganges beseitigt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - - // Load config and destroy dummy array - $CONFIG['cache_update'] = $DUMMY['cache_update']; // Last time the cache files are been re-created - $CONFIG['cache_path'] = $DUMMY['cache_path']; // Relative path for the cache files to 'inc/' - $CONFIG['cache_tested'] = $DUMMY['cache_tested']; // Says if cache path is tested or not - $CONFIG['db_hits'] = $DUMMY['db_hits']; // Counted hits on the database (all!) - $CONFIG['cache_hits'] = $DUMMY['cache_hits']; // Counted hits on the cache arrays in memory - $CONFIG['cache_admins'] = $DUMMY['cache_admins']; // Is the table '_admins' cacheable? - $CONFIG['cache_acls'] = $DUMMY['cache_acls']; // Is the table '_admins_acls' cacheable? - $CONFIG['cache_exts'] = $DUMMY['cache_exts']; // Is the table '_extensions' cacheable? - $CONFIG['cache_config'] = $DUMMY['cache_config']; // Is the table '_config' cacheable? - $CONFIG['cache_modreg'] = $DUMMY['cache_modreg']; // Is the table '_mod_reg' cacheable? - $CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable? - $CONFIG['cache_refsys'] = $DUMMY['cache_refsys']; // Is the table '_refsystem' cacheable? - unset($DUMMY); - - // Create instance on class - if ($CACHE_FILE != "init") - { - // Initialize cache system only when it's needed - $CACHE = new mxchange_cache($CONFIG['cache_update'], PATH."inc/".$CONFIG['cache_path'], $CONFIG['cache_tested']); - if ($CACHE->ret != "done") - { - // Failed to initialize cache sustem - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); - } - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "cache"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +cache_file("extensions", true)) $CACHE->cache_destroy(); + } + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Validierung der Cache-Datei admins.cache integriert."; + break; + + case "0.0.7": // SQL queries for v0.0.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits bigint(20) not null default '0'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('stats', 'cache_stats', 'DB-Cache', 'Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Hits auf den Cache werden gezählt."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Das Umschreiben der Cache-Daten hat eine Fehlermeldung Falsches Passwort! im Admin-Bereich verursacht."; + break; + + case "0.0.9": // SQL queries for v0.0.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehler Division durch 0 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!) + $UPDATE_NOTES = "Die Tabelen "._MYSQL_PREFIX."_config, "._MYSQL_PREFIX."_refsystem, "._MYSQL_PREFIX."_refdepths und "._MYSQL_PREFIX."_mod_reg werden nun auch ausgelagert."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admins enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_acls enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_exts enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_config enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_modreg enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refdepth enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refsys enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält."; + break; + + case "0.1.4": // SQL queries for v0.1.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler Division durch 0 repariert in inc/load_cache.php."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Probleme w&auuml;hrend des Installationsvorganges beseitigt."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + + // Load config and destroy dummy array + $CONFIG['cache_update'] = $DUMMY['cache_update']; // Last time the cache files are been re-created + $CONFIG['cache_path'] = $DUMMY['cache_path']; // Relative path for the cache files to 'inc/' + $CONFIG['cache_tested'] = $DUMMY['cache_tested']; // Says if cache path is tested or not + $CONFIG['db_hits'] = $DUMMY['db_hits']; // Counted hits on the database (all!) + $CONFIG['cache_hits'] = $DUMMY['cache_hits']; // Counted hits on the cache arrays in memory + $CONFIG['cache_admins'] = $DUMMY['cache_admins']; // Is the table '_admins' cacheable? + $CONFIG['cache_acls'] = $DUMMY['cache_acls']; // Is the table '_admins_acls' cacheable? + $CONFIG['cache_exts'] = $DUMMY['cache_exts']; // Is the table '_extensions' cacheable? + $CONFIG['cache_config'] = $DUMMY['cache_config']; // Is the table '_config' cacheable? + $CONFIG['cache_modreg'] = $DUMMY['cache_modreg']; // Is the table '_mod_reg' cacheable? + $CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable? + $CONFIG['cache_refsys'] = $DUMMY['cache_refsys']; // Is the table '_refsystem' cacheable? + unset($DUMMY); + + // Create instance on class + if ($CACHE_FILE != "init") + { + // Initialize cache system only when it's needed + $CACHE = new mxchange_cache($CONFIG['cache_update'], PATH."inc/".$CONFIG['cache_path'], $CONFIG['cache_tested']); + if ($CACHE->ret != "done") + { + // Failed to initialize cache sustem + ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); + } + } + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "cache"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-country.php b/0.2.1/inc/extensions/ext-country.php index 92100db64b..17b9b8e3db 100644 --- a/0.2.1/inc/extensions/ext-country.php +++ b/0.2.1/inc/extensions/ext-country.php @@ -1,125 +1,125 @@ - + diff --git a/0.2.1/inc/extensions/ext-demo.php b/0.2.1/inc/extensions/ext-demo.php index 07172b7c23..264b3aba70 100644 --- a/0.2.1/inc/extensions/ext-demo.php +++ b/0.2.1/inc/extensions/ext-demo.php @@ -1,92 +1,92 @@ -Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "demo"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "demo"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-doubler.php b/0.2.1/inc/extensions/ext-doubler.php index eb55750865..469547623e 100644 --- a/0.2.1/inc/extensions/ext-doubler.php +++ b/0.2.1/inc/extensions/ext-doubler.php @@ -1,279 +1,279 @@ -none) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid bigint(20) not null default '0'"; - // Total payed out points from your doublers - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points double(20,5) not null default '0.00000'"; - // Sending mode of mails (immediately/daily reset) - // --> This also means who fast the doubled points will be payed out! - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode enum('DIRECT', 'RESET') not null default 'DIRECT'"; - // Timeout for entries to be purged (default: one week) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout bigint(20) not null default '".(60*60*24*7)."'"; - // Number of newest entries to display - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new tinyint(3) not null default '10'"; - // Number of entries which will be payed out soon - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay tinyint(3) not null default '10'"; - // Number of entries which are already payed out - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old tinyint(3) not null default '10'"; - // Points used by every member - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points double(20,5) not null default '0.00000'"; - // Counter for usage of the doubler - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter bigint(20) not null default '0'"; - - // - // --- MENU SYSTEMS --- - // - // Admin menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', '', '{!POINTS!}-Verdoppler', 'Einstellungen und Einträge auflisten.', 4)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', 'list_doubler', 'Auflisten', 'Einträge aus der Verdiensttabelle auflisten', 1)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', 'config_doubler', 'Einstellungen', 'Prozentuale Gebühr usw. einstellen.', 2)"; - - // Guest menu (informations / default doubler link) - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort, visible, locked) VALUES ('main', 'doubler', 'Verdoppeln!', 3, 'Y', 'Y')"; - - // Member menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'doubler', 'Verdoppeln!', 'Y', 'Y', 7)"; - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='doubler' LIMIT 3"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='doubler' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='doubler' LIMIT 1"; - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1"; - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='doubler' LIMIT 1"; - break; - -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.1": // SQL queries for v0.0.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit User-ID behoben!"; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Total used points - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used double(20,5) not null default '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_own enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET doubler_used=doubler_used+(SUM(d.points)*c.doubler_charge) -FROM "._MYSQL_PREFIX."_doubler AS d, "._MYSQL_PREFIX."_config AS c -WHERE d.completed='N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent tinyint(4) not null default '1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent tinyint(4) not null default '1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_sent_all enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar.

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!) - $UPDATE_NOTES = "Bitte verschieben Sie die doubler-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Zwei SQL-Fehler in inc/doubler_send.php beseitigt."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='4' WHERE what='doubler' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['doubler_charge'] = $DUMMY['doubler_charge']; - $CONFIG['doubler_jackpot'] = $DUMMY['doubler_jackpot']; - $CONFIG['doubler_own'] = $DUMMY['doubler_own']; - $CONFIG['doubler_uid'] = $DUMMY['doubler_uid']; - $CONFIG['doubler_points'] = $DUMMY['doubler_points']; - $CONFIG['doubler_used'] = $DUMMY['doubler_used']; - $CONFIG['doubler_send_mode'] = $DUMMY['doubler_send_mode']; - $CONFIG['doubler_timeout'] = $DUMMY['doubler_timeout']; - $CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new']; - $CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay']; - $CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old']; - $CONFIG['doubler_ref'] = $DUMMY['doubler_ref']; - $CONFIG['doubler_min'] = $DUMMY['doubler_min']; - $CONFIG['doubler_max'] = $DUMMY['doubler_max']; - $CONFIG['doubler_left'] = $DUMMY['doubler_left']; - $CONFIG['doubler_counter'] = $DUMMY['doubler_counter']; - $CONFIG['doubler_max_sent'] = $DUMMY['doubler_max_sent']; - $CONFIG['doubler_group_sent'] = $DUMMY['doubler_group_sent']; - $CONFIG['doubler_sent_all'] = $DUMMY['doubler_sent_all']; - unset($DUMMY); - - if ((defined('__DAILY_RESET')) && ($CONFIG['doubler_send_mode'] == "RESET")) - { - // So let's check for points - $INC_POOL[] = PATH."inc/doubler_send.php"; - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "doubler"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +none) + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid bigint(20) not null default '0'"; + // Total payed out points from your doublers + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points double(20,5) not null default '0.00000'"; + // Sending mode of mails (immediately/daily reset) + // --> This also means who fast the doubled points will be payed out! + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode enum('DIRECT', 'RESET') not null default 'DIRECT'"; + // Timeout for entries to be purged (default: one week) + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout bigint(20) not null default '".(60*60*24*7)."'"; + // Number of newest entries to display + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new tinyint(3) not null default '10'"; + // Number of entries which will be payed out soon + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay tinyint(3) not null default '10'"; + // Number of entries which are already payed out + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old tinyint(3) not null default '10'"; + // Points used by every member + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points double(20,5) not null default '0.00000'"; + // Counter for usage of the doubler + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter bigint(20) not null default '0'"; + + // + // --- MENU SYSTEMS --- + // + // Admin menu + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', '', '{!POINTS!}-Verdoppler', 'Einstellungen und Einträge auflisten.', 4)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', 'list_doubler', 'Auflisten', 'Einträge aus der Verdiensttabelle auflisten', 1)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('doubler', 'config_doubler', 'Einstellungen', 'Prozentuale Gebühr usw. einstellen.', 2)"; + + // Guest menu (informations / default doubler link) + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort, visible, locked) VALUES ('main', 'doubler', 'Verdoppeln!', 3, 'Y', 'Y')"; + + // Member menu + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('main', 'doubler', 'Verdoppeln!', 'Y', 'Y', 7)"; + break; + +case "remove": // Do stuff when removing extension + // SQL commands to run + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='doubler' LIMIT 3"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='doubler' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='doubler' LIMIT 1"; + break; + +case "activate": // Do stuff when admin activates this extension + // SQL commands to run + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1"; + break; + +case "deactivate": // Do stuff when admin deactivates this extension + // SQL commands to run + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='doubler' LIMIT 1"; + break; + +case "update": // Update an extension + switch ($EXT_VER) + { + case "0.0.1": // SQL queries for v0.0.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Problem mit User-ID behoben!"; + break; + + case "0.0.2": // SQL queries for v0.0.2 + // Total used points + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used double(20,5) not null default '0.00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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) + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_own enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET doubler_used=doubler_used+(SUM(d.points)*c.doubler_charge) +FROM "._MYSQL_PREFIX."_doubler AS d, "._MYSQL_PREFIX."_config AS c +WHERE d.completed='N'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent tinyint(4) not null default '1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent tinyint(4) not null default '1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_sent_all enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; + break; + + case "0.0.7": // SQL queries for v0.0.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar.

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!) + $UPDATE_NOTES = "Bitte verschieben Sie die doubler-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Zwei SQL-Fehler in inc/doubler_send.php beseitigt."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; + break; + + case "0.1.4": // SQL queries for v0.1.4 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='4' WHERE what='doubler' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['doubler_charge'] = $DUMMY['doubler_charge']; + $CONFIG['doubler_jackpot'] = $DUMMY['doubler_jackpot']; + $CONFIG['doubler_own'] = $DUMMY['doubler_own']; + $CONFIG['doubler_uid'] = $DUMMY['doubler_uid']; + $CONFIG['doubler_points'] = $DUMMY['doubler_points']; + $CONFIG['doubler_used'] = $DUMMY['doubler_used']; + $CONFIG['doubler_send_mode'] = $DUMMY['doubler_send_mode']; + $CONFIG['doubler_timeout'] = $DUMMY['doubler_timeout']; + $CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new']; + $CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay']; + $CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old']; + $CONFIG['doubler_ref'] = $DUMMY['doubler_ref']; + $CONFIG['doubler_min'] = $DUMMY['doubler_min']; + $CONFIG['doubler_max'] = $DUMMY['doubler_max']; + $CONFIG['doubler_left'] = $DUMMY['doubler_left']; + $CONFIG['doubler_counter'] = $DUMMY['doubler_counter']; + $CONFIG['doubler_max_sent'] = $DUMMY['doubler_max_sent']; + $CONFIG['doubler_group_sent'] = $DUMMY['doubler_group_sent']; + $CONFIG['doubler_sent_all'] = $DUMMY['doubler_sent_all']; + unset($DUMMY); + + if ((defined('__DAILY_RESET')) && ($CONFIG['doubler_send_mode'] == "RESET")) + { + // So let's check for points + $INC_POOL[] = PATH."inc/doubler_send.php"; + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "doubler"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-holiday.php b/0.2.1/inc/extensions/ext-holiday.php index d6065d1a62..87849df5fb 100644 --- a/0.2.1/inc/extensions/ext-holiday.php +++ b/0.2.1/inc/extensions/ext-holiday.php @@ -1,250 +1,250 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern der Urlaubsanfrage korregiert."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active enum('Y', 'N') not null default 'N'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock bigint(20) not null default '".(60*60*24*2)."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode enum('DIRECT', 'RESET') not null default 'RESET'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode enum('DIRECT', 'RESET') not null default 'RESET'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"; - - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - // Copy data to config array - $CONFIG['holiday_max'] = $DUMMY['holiday_max']; // Maximum days for holiday - $CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds - $CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday - unset($DUMMY); - - // Do we have a daily-reset-run? - if (((defined('__DAILY_RESET')) && ($CONFIG['holiday_mode'] == "RESET")) || ($CONFIG['holiday_mode'] == "DIRECT")) - { - // Ok, let's check for finished holidays and unlock those accounts - $INC_POOL[] = PATH."inc/reset/reset_holiday.php"; - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "holiday"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.0.9": // SQL queries for v0.0.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern der Urlaubsanfrage korregiert."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active enum('Y', 'N') not null default 'N'"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock bigint(20) not null default '".(60*60*24*2)."'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"; + break; + + case "0.1.4": // SQL queries for v0.1.4 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode enum('DIRECT', 'RESET') not null default 'RESET'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode enum('DIRECT', 'RESET') not null default 'RESET'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"; + + // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin + $EXT_UPDATE_DEPENDS = "sql_patches"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert."; + break; + + case "0.1.9": // SQL queries for v0.1.9 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.2.0": // SQL queries for v0.2.0 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + // Copy data to config array + $CONFIG['holiday_max'] = $DUMMY['holiday_max']; // Maximum days for holiday + $CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds + $CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday + unset($DUMMY); + + // Do we have a daily-reset-run? + if (((defined('__DAILY_RESET')) && ($CONFIG['holiday_mode'] == "RESET")) || ($CONFIG['holiday_mode'] == "DIRECT")) + { + // Ok, let's check for finished holidays and unlock those accounts + $INC_POOL[] = PATH."inc/reset/reset_holiday.php"; + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "holiday"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-html_mail.php b/0.2.1/inc/extensions/ext-html_mail.php index e2d3559052..167cf4be76 100644 --- a/0.2.1/inc/extensions/ext-html_mail.php +++ b/0.2.1/inc/extensions/ext-html_mail.php @@ -1,174 +1,174 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - - // Define all arrary variables as global! - global $HTML_TAGS, $URL_ENDS, $VALID_EMAI_CHARS; - - // Valid HTML tags (only simple and no attributes!) - $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... ;-) - // - $URL_ENDS = array( - " ", - "\n", - "\r", - ")", - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $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; -} -// Language file prefix -$EXT_LANG_PREFIX = "html_mail"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + + // Define all arrary variables as global! + global $HTML_TAGS, $URL_ENDS, $VALID_EMAI_CHARS; + + // Valid HTML tags (only simple and no attributes!) + $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... ;-) + // + $URL_ENDS = array( + " ", + "\n", + "\r", + ")", + ); + + // Valid email chars (without @, or do you want to have another @ inside your email addy?) + $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; +} +// Language file prefix +$EXT_LANG_PREFIX = "html_mail"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-mailid.php b/0.2.1/inc/extensions/ext-mailid.php index c8f5e70ff3..53dc9c7ade 100644 --- a/0.2.1/inc/extensions/ext-mailid.php +++ b/0.2.1/inc/extensions/ext-mailid.php @@ -1,250 +1,250 @@ -uid, mailid und bonusid durch die eigene Funktion bigintval() in den beiden Dateien mailid.php und mailid_top.php."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weisse Seite im Mozilla bzw. Seite nicht gefunden unter dem IE behoben."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "register_globals-Problem behoben"; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Mailbestätigung klappt wieder."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template mailid_confirm_buttom.tpl, 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Sicherheitsupdate an den Scripten mailid.php und mailid_top.php durchgeführt."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Template mailid_frameset.tpl nach mailid_frames.tpl umbenannt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Variablen gefixt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates mailid_points_done.tpl, mailid_points_done2.tpl und mailid_frames.tpl !"; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Parser-Fehler beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Modul mailid 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wenn die ".POINTS." dem noch auf Auszahlung wartendem Guthaben aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates mailid_points_locked und mailid_points_locked2 sind hinzugekommen!)"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bonus- und Standart-Referral-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!) - $UPDATE_NOTES = "Code wiederholen nach Code eingeben hin geändert."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Templates hinzugefügt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "mailid.php und mailid_top.php können erst bei aktivierter Erweiterung mailid 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!) - $UPDATE_NOTES = "Bitte das Template ".PATH."/templates/de/html/mailid/mailid_points_lcoked2.tpl löschen. Noices fixed."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "mailid"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +uid, mailid und bonusid durch die eigene Funktion bigintval() in den beiden Dateien mailid.php und mailid_top.php."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Weisse Seite im Mozilla bzw. Seite nicht gefunden unter dem IE behoben."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "register_globals-Problem behoben"; + break; + + case "0.0.7": // SQL queries for v0.0.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Mailbestätigung klappt wieder."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "5 Nachkommastellen implementiert"; + break; + + case "0.1.1": // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template mailid_confirm_buttom.tpl, 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Sicherheitsupdate an den Scripten mailid.php und mailid_top.php durchgeführt."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Template mailid_frameset.tpl nach mailid_frames.tpl umbenannt."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlende Variablen gefixt."; + break; + + case "0.1.9": // SQL queries for v0.1.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates mailid_points_done.tpl, mailid_points_done2.tpl und mailid_frames.tpl !"; + break; + + case "0.2.0": // SQL queries for v0.2.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Parser-Fehler beseitigt."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Modul mailid 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wenn die ".POINTS." dem noch auf Auszahlung wartendem Guthaben aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates mailid_points_locked und mailid_points_locked2 sind hinzugekommen!)"; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Bonus- und Standart-Referral-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!) + $UPDATE_NOTES = "Code wiederholen nach Code eingeben hin geändert."; + break; + + case "0.3.0": // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlende Templates hinzugefügt."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "mailid.php und mailid_top.php können erst bei aktivierter Erweiterung mailid 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!) + $UPDATE_NOTES = "Bitte das Template ".PATH."/templates/de/html/mailid/mailid_points_lcoked2.tpl löschen. Noices fixed."; + break; + + case "0.3.3": // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "mailid"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-maintenance.php b/0.2.1/inc/extensions/ext-maintenance.php index 82ae161170..a61450e7de 100644 --- a/0.2.1/inc/extensions/ext-maintenance.php +++ b/0.2.1/inc/extensions/ext-maintenance.php @@ -1,125 +1,125 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['maintenance'] = $DUMMY['maintenance']; - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "maintenance"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['maintenance'] = $DUMMY['maintenance']; + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "maintenance"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-mediadata.php b/0.2.1/inc/extensions/ext-mediadata.php index 9d75a3e7f6..aeae078060 100644 --- a/0.2.1/inc/extensions/ext-mediadata.php +++ b/0.2.1/inc/extensions/ext-mediadata.php @@ -1,155 +1,155 @@ -aktuellen Zustandes berücksichtigen kann und nicht bereits gelöschter Mitglieder."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mediendaten mussten komplett regeneriert werden."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage bigint(20) not null default '500'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_mediadata', 'Mediendaten', 'Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Start des ".MT_WORD2." und Anzahl Anmeldungen aufgenommen. (Task #13)
-Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['mt_start'] = $DUMMY['mt_start']; - $CONFIG['mt_stage'] = $DUMMY['mt_stage']; - unset($DUMMY); - 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 - $INC_POOL[] = PATH."inc/gen_mediadata.php"; - } -} - -// Language file prefix -$EXT_LANG_PREFIX = "mediadata"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> +aktuellen Zustandes berücksichtigen kann und nicht bereits gelöschter Mitglieder."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mediendaten mussten komplett regeneriert werden."; + break; + + case "0.0.7": // SQL queries for v0.0.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage bigint(20) not null default '500'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_mediadata', 'Mediendaten', 'Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Start des ".MT_WORD2." und Anzahl Anmeldungen aufgenommen. (Task #13)
+Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['mt_start'] = $DUMMY['mt_start']; + $CONFIG['mt_stage'] = $DUMMY['mt_stage']; + unset($DUMMY); + 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 + $INC_POOL[] = PATH."inc/gen_mediadata.php"; + } +} + +// Language file prefix +$EXT_LANG_PREFIX = "mediadata"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-mods.php b/0.2.1/inc/extensions/ext-mods.php index 5d4c72b3ab..5dc5197faf 100644 --- a/0.2.1/inc/extensions/ext-mods.php +++ b/0.2.1/inc/extensions/ext-mods.php @@ -1,126 +1,126 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Modul-Management' WHERE action = 'mods' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung auf Management umgestellt."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "mods"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.0.7": // SQL queries for v0.0.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Modul-Management' WHERE action = 'mods' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Verwaltung auf Management umgestellt."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "mods"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-mydata.php b/0.2.1/inc/extensions/ext-mydata.php index dde42b60f2..e2b8050b3a 100644 --- a/0.2.1/inc/extensions/ext-mydata.php +++ b/0.2.1/inc/extensions/ext-mydata.php @@ -1,177 +1,177 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
-
-Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".GET_LANGUAGE()."/html/member/ !) mit hoch!"; - - // Depends on 'country'! - $EXT_UPDATE_DEPENDS = "country"; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Einstellungen können nun auch ohne der Erweiterung country abgespeichert werden."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "mydata"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
+
+Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".GET_LANGUAGE()."/html/member/ !) mit hoch!"; + + // Depends on 'country'! + $EXT_UPDATE_DEPENDS = "country"; + + case "0.1.3": // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die Einstellungen können nun auch ohne der Erweiterung country abgespeichert werden."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "mydata"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-newsletter.php b/0.2.1/inc/extensions/ext-newsletter.php index 6c5a3d5d0e..ed9e51e0c2 100644 --- a/0.2.1/inc/extensions/ext-newsletter.php +++ b/0.2.1/inc/extensions/ext-newsletter.php @@ -1,191 +1,191 @@ -Immer aktiv 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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Script inc/monthly/monthly_newsletter.php 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nl_month char(2) not null default '".date("m", time())."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP nl_currency"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Währung auf die Erweiterung ext-other.zip 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!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['nl_charge'] = $DUMMY['nl_charge']; // Charge for your members to switch off the newsletter - $CONFIG['nl_month'] = $DUMMY['nl_month']; // Last month of check interval - unset($DUMMY); - - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $URL_ENDS = array( - " ", - "\n", - "\r", - ")", - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $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' - ); - - if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Daily reset was run so let's check out for expired newsletter orders - $INC_POOL[] = PATH."inc/monthly/monthly_newsletter.php"; - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "newsletter"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Immer aktiv 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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.0.4": // SQL queries for v0.0.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Script inc/monthly/monthly_newsletter.php 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nl_month char(2) not null default '".date("m", time())."'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config DROP nl_currency"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Währung auf die Erweiterung ext-other.zip 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!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['nl_charge'] = $DUMMY['nl_charge']; // Charge for your members to switch off the newsletter + $CONFIG['nl_month'] = $DUMMY['nl_month']; // Last month of check interval + unset($DUMMY); + + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // + $URL_ENDS = array( + " ", + "\n", + "\r", + ")", + ); + + // Valid email chars (without @, or do you want to have another @ inside your email addy?) + $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' + ); + + if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) + { + // Daily reset was run so let's check out for expired newsletter orders + $INC_POOL[] = PATH."inc/monthly/monthly_newsletter.php"; + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "newsletter"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-nickname.php b/0.2.1/inc/extensions/ext-nickname.php index b7866c3d05..99b5b5c55a 100644 --- a/0.2.1/inc/extensions/ext-nickname.php +++ b/0.2.1/inc/extensions/ext-nickname.php @@ -1,197 +1,197 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP nick_uid"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID ODER 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='2' WHERE what='nickname' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitglieder ohne Nickname sollten kein *failed* mehr sehen."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - define('__NICKNAME_LANG_CHARS', $DUMMY['nickname_chars']); - define('__NICKNAME_LENGTH' , $DUMMY['nickname_len']); - define('__NICKNAME_PATTERN' , $DUMMY['nickname_pattern']); - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "nickname"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 überflüssige HTML-Tags entfernt."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP nick_uid"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID ODER 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='2' WHERE what='nickname' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitglieder ohne Nickname sollten kein *failed* mehr sehen."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + define('__NICKNAME_LANG_CHARS', $DUMMY['nickname_chars']); + define('__NICKNAME_LENGTH' , $DUMMY['nickname_len']); + define('__NICKNAME_PATTERN' , $DUMMY['nickname_pattern']); + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "nickname"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-online.php b/0.2.1/inc/extensions/ext-online.php index 0d0a27d7c4..c91f111249 100644 --- a/0.2.1/inc/extensions/ext-online.php +++ b/0.2.1/inc/extensions/ext-online.php @@ -1,125 +1,125 @@ -Unknown column 'visibled' in 'field list' behoben."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Erstellung der Datenbanktabelle "._MYSQL_PREFIX."_online in diese Erweiterung ausgelagert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "online"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Unknown column 'visibled' in 'field list' behoben."; + break; + + case "0.0.2": // SQL queries for v0.0.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Erstellung der Datenbanktabelle "._MYSQL_PREFIX."_online in diese Erweiterung ausgelagert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "online"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-optimize.php b/0.2.1/inc/extensions/ext-optimize.php index c1bfa8644f..cd4baf7485 100644 --- a/0.2.1/inc/extensions/ext-optimize.php +++ b/0.2.1/inc/extensions/ext-optimize.php @@ -1,124 +1,124 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "optimize"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "HTML-Code ausgelagert in Templates."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "optimize"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-order.php b/0.2.1/inc/extensions/ext-order.php index 51a27269f8..1c0827454f 100644 --- a/0.2.1/inc/extensions/ext-order.php +++ b/0.2.1/inc/extensions/ext-order.php @@ -1,314 +1,314 @@ -mail_order korregiert auf mail_orders."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min bigint(20) not null default '10'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Speicherung der Einstellungen klappt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $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 -nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {!POINTS!} auf dem Konto. Ein Rechenbeispiel: -
    -
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. -
  3. Es stellt die Mailart "3 {!POINTS!} Kosten / Mail" ein.
  4. -
  5. Es hat aber nur {!POINTS!} für 10 Empfänger und gibt 10 ein.
  6. -
  7. Das Script hatte bis zu dieser Version 3 {!POINTS!} * 15 = 45 {!POINTS!} gerechnet, hat das Mitglied mehr oder gleich 45 {!POINTS!}, fiehl dieser Fehler nicht - auf.
  8. -
  9. Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.
  10. -
  11. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
  12. -
"; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit __MIN_VALUE behoben."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Konstantenproblem beseitigt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_select varchar(255) not null default 'userid'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode enum('ASC', 'DESC') not null default 'DESC'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, 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!) - $UPDATE_NOTES = "Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Mailbuchungsseite korregiert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = 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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Neue Urlaubsschaltung mit integriert."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein WHERE ext_active='Y' 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!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', '', 'Mailbuchungen', 3, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', 'order2', 'Framekiller-Mails', 2, 'Y', 'N')"; - $SQLs[] = "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!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['order_min'] = $DUMMY['order_min']; // Order at least X mails - $CONFIG['order_max'] = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive - $CONFIG['order_select'] = $DUMMY['order_select']; // Sorting mode for selecting users while looking some up for mail delivery - $CONFIG['order_mode'] = $DUMMY['order_mode']; // Ascending or descending sort order for above - unset($DUMMY); - - // Do daily reset only when installed and extension version is at least 0.1.1 - if ((defined('__DAILY_RESET')) && (!mxchange_installing) && (mxchange_installed) && (admin_registered) && (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__); - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "order"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +mail_order korregiert auf mail_orders."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min bigint(20) not null default '10'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Speicherung der Einstellungen klappt."; + break; + + case "0.2.6": // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + $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 +nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {!POINTS!} auf dem Konto. Ein Rechenbeispiel: +
    +
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. +
  3. Es stellt die Mailart "3 {!POINTS!} Kosten / Mail" ein.
  4. +
  5. Es hat aber nur {!POINTS!} für 10 Empfänger und gibt 10 ein.
  6. +
  7. Das Script hatte bis zu dieser Version 3 {!POINTS!} * 15 = 45 {!POINTS!} gerechnet, hat das Mitglied mehr oder gleich 45 {!POINTS!}, fiehl dieser Fehler nicht + auf.
  8. +
  9. Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.
  10. +
  11. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
  12. +
"; + break; + + case "0.2.7": // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler mit __MIN_VALUE behoben."; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Konstantenproblem beseitigt."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_select varchar(255) not null default 'userid'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode enum('ASC', 'DESC') not null default 'DESC'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."; + break; + + case "0.3.4": // SQL queries for v0.3.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; + break; + + case "0.3.5": // SQL queries for v0.3.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, 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!) + $UPDATE_NOTES = "Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."; + break; + + case "0.3.7": // SQL queries for v0.3.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Mailbuchungsseite korregiert."; + break; + + case "0.3.9": // SQL queries for v0.3.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = 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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.4.2": // SQL queries for v0.4.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Neue Urlaubsschaltung mit integriert."; + break; + + case "0.4.4": // SQL queries for v0.4.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Ein WHERE ext_active='Y' 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!) + $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; + break; + + case "0.4.6": // SQL queries for v0.4.6 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', '', 'Mailbuchungen', 3, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', 'order2', 'Framekiller-Mails', 2, 'Y', 'N')"; + $SQLs[] = "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!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.4.7": // SQL queries for v0.4.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['order_min'] = $DUMMY['order_min']; // Order at least X mails + $CONFIG['order_max'] = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive + $CONFIG['order_select'] = $DUMMY['order_select']; // Sorting mode for selecting users while looking some up for mail delivery + $CONFIG['order_mode'] = $DUMMY['order_mode']; // Ascending or descending sort order for above + unset($DUMMY); + + // Do daily reset only when installed and extension version is at least 0.1.1 + if ((defined('__DAILY_RESET')) && (!mxchange_installing) && (mxchange_installed) && (admin_registered) && (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__); + } + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "order"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-other.php b/0.2.1/inc/extensions/ext-other.php index 54ea0df1c8..8e84b7d11e 100644 --- a/0.2.1/inc/extensions/ext-other.php +++ b/0.2.1/inc/extensions/ext-other.php @@ -1,195 +1,195 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma tinyint(4) not null default '3'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern der Einstellungen repariert."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Folgende Einstellungen können auf 0 gesetzt werden: -
    -
  1. Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)
  2. -
  3. Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)
  4. -
  5. Sperrzeit des Mitgliedprofiles nach Änderung (0 = Mitglied kann sein Account immer und sofort ändern)
  6. -
  7. Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(
  8. -
  9. Erneute Aussendung der Mail (0 = Siehe oben)
  10. -
"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reject_url varchar(255) not null default '".URL."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD currency varchar(255) not null default '€'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung other auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['max_comma'] = $DUMMY['max_comma']; // Maximum numbers behind commata - $CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL - define('__CURRENCY', $DUMMY['currency']); // This is the currency for fees! They shall normally remain in real money currencies... - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "other"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> +Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; + break; + + case "0.0.2": // SQL queries for v0.0.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet."; + break; + + case "0.0.3": // SQL queries for v0.0.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; + break; + + case "0.0.4": // SQL queries for v0.0.4 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma tinyint(4) not null default '3'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern der Einstellungen repariert."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Folgende Einstellungen können auf 0 gesetzt werden: +
    +
  1. Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)
  2. +
  3. Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)
  4. +
  5. Sperrzeit des Mitgliedprofiles nach Änderung (0 = Mitglied kann sein Account immer und sofort ändern)
  6. +
  7. Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(
  8. +
  9. Erneute Aussendung der Mail (0 = Siehe oben)
  10. +
"; + break; + + case "0.1.1": // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reject_url varchar(255) not null default '".URL."'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD currency varchar(255) not null default '€'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung other auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['max_comma'] = $DUMMY['max_comma']; // Maximum numbers behind commata + $CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL + define('__CURRENCY', $DUMMY['currency']); // This is the currency for fees! They shall normally remain in real money currencies... + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "other"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-payout.php b/0.2.1/inc/extensions/ext-payout.php index 14b311e6a1..089c3e78e7 100644 --- a/0.2.1/inc/extensions/ext-payout.php +++ b/0.2.1/inc/extensions/ext-payout.php @@ -1,252 +1,252 @@ -member_payout.tpl."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate double(22,5) not null default '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Buttons aus Aufgabenauflisten ausgelagert"; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung nach Management umgestellt."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "payout"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +member_payout.tpl."; + break; + + case "0.1.9": // SQL queries for v0.1.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "5 Nachkommastellen implementiert."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate double(22,5) not null default '0.00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Buttons aus Aufgabenauflisten ausgelagert"; + break; + + case "0.2.3": // SQL queries for v0.2.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.3.3": // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + + case "0.3.7": // SQL queries for v0.3.7 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Verwaltung nach Management umgestellt."; + break; + + case "0.3.8": // SQL queries for v0.3.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "payout"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-profile.php b/0.2.1/inc/extensions/ext-profile.php index ddc3a09487..87ce68aa67 100644 --- a/0.2.1/inc/extensions/ext-profile.php +++ b/0.2.1/inc/extensions/ext-profile.php @@ -1,138 +1,138 @@ -profile_update und prof_reupdate > 0 sind."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt gelösst mit Erweiterung update (kommt noch raus!)"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // Do we have a daily-reset-run? - if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // So let's check for profiles which needs an update - $INC_POOL[] = PATH."inc/profile-updte.php"; - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "profile"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +profile_update und prof_reupdate > 0 sind."; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Namenskonflikt gelösst mit Erweiterung update (kommt noch raus!)"; + break; + + case "0.0.9": // SQL queries for v0.0.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; + break; + } + break; + +default: // Do stuff when extension is loaded + // Do we have a daily-reset-run? + if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) + { + // So let's check for profiles which needs an update + $INC_POOL[] = PATH."inc/profile-updte.php"; + } + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "profile"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-rallye.php b/0.2.1/inc/extensions/ext-rallye.php index 3b715f1f07..f54cc7fda0 100644 --- a/0.2.1/inc/extensions/ext-rallye.php +++ b/0.2.1/inc/extensions/ext-rallye.php @@ -1,358 +1,358 @@ -Unknown column 'd.useid' in 'on clause' behoben."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehler Template nicht gefunden 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!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler Template nicht gefunden ist endlich beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points double(23,5) not null default '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Admin-Mails korregiert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Weitere Templates vom Admin-Bereich ausgelagert und Referral-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!) - $UPDATE_NOTES = "Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referral-Liste implementiert."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices bigint(20) not null default '3'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template templates/de/emails/member/member_rallye_notifty.tpl folgende zwei Zeilen ein:
- -Zudem sollten Sie mindestens folgende Templates (in templates/".GET_LANGUAGE()."/html/guest/ !) aktualisieren:
-"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Automatisches Starten von Referral-Rallyes repariert."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fatalen Fehler beseitigt."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='1', title='Referral-Rallye' WHERE what='rallyes' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung autopurge installiert und aktiviert ist."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // Do stuff only when not in CSS mode - if (($CSS != "1") && ($CSS != "-1")) - { - // Get total member count - $TOTAL = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); - - // 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)"; - } - - // 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 <= ".time()." AND end_time > ".time()." -LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Start rallye - RALLYE_AUTOSTART_RALLYES($result); - } - - // 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 <= ".time()."".$OR.") -LIMIT 1", __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("autopurge"))) - { - // End rallye here... - RALLYE_EXPIRE_RALLYES($result); - } - - // Free memory - SQL_FREERESULT($result); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "rallye"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Unknown column 'd.useid' in 'on clause' behoben."; + break; + + case "0.0.7": // SQL queries for v0.0.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehler Template nicht gefunden 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!) + $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler Template nicht gefunden ist endlich beseitigt."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points double(23,5) not null default '0.00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "5 Nachkommastellen implementiert."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Admin-Mails korregiert."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Weitere Templates vom Admin-Bereich ausgelagert und Referral-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!) + $UPDATE_NOTES = "Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referral-Liste implementiert."; + break; + + case "0.2.0": // SQL queries for v0.2.0 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices bigint(20) not null default '3'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template templates/de/emails/member/member_rallye_notifty.tpl folgende zwei Zeilen ein:
+ +Zudem sollten Sie mindestens folgende Templates (in templates/".GET_LANGUAGE()."/html/guest/ !) aktualisieren:
+"; + break; + + case "0.2.1": // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; + break; + + case "0.2.3": // SQL queries for v0.2.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Automatisches Starten von Referral-Rallyes repariert."; + break; + + case "0.2.7": // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fatalen Fehler beseitigt."; + break; + + case "0.2.8": // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."; + break; + + case "0.3.2": // SQL queries for v0.3.2 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='1', title='Referral-Rallye' WHERE what='rallyes' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.3.3": // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung autopurge installiert und aktiviert ist."; + break; + + case "0.3.4": // SQL queries for v0.3.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + // Do stuff only when not in CSS mode + if (($CSS != "1") && ($CSS != "-1")) + { + // Get total member count + $TOTAL = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + + // 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)"; + } + + // 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 <= ".time()." AND end_time > ".time()." +LIMIT 1", __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // Start rallye + RALLYE_AUTOSTART_RALLYES($result); + } + + // 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 <= ".time()."".$OR.") +LIMIT 1", __FILE__, __LINE__); + if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("autopurge"))) + { + // End rallye here... + RALLYE_EXPIRE_RALLYES($result); + } + + // Free memory + SQL_FREERESULT($result); + } + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "rallye"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-register.php b/0.2.1/inc/extensions/ext-register.php index 57d196934d..6b51035a20 100644 --- a/0.2.1/inc/extensions/ext-register.php +++ b/0.2.1/inc/extensions/ext-register.php @@ -1,340 +1,340 @@ -Profildaten ändern ein.', 12)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Einstellbare Pflichtfelder hinzugefügt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "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_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Standart Referral-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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Cookie refid aus Anmeldeformular entfernt."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Referral-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!) - $UPDATE_NOTES = "Parse error in what-register.php beseitigt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
-
-Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!"; - - // Depends on 'country' - $EXT_UPDATE_DEPENDS = "country"; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Auf Grund der Integration der neue Erweiterung country 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere SQL-Befehle abgesichert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD register_default ENUM('Y', 'N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_register2' WHERE what='config_reg' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl 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!) - $UPDATE_NOTES = "Parser-Error in inc/modules/guest/what-register.php beseitigt."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "setcookie() 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!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function REGISTER_ADD_CATEGORY_TABLE() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."; - break; - - case "0.5.1": // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"; - break; - - case "0.5.2": // SQL queries for v0.5.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - // Copy data to config array - $CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection? - unset($DUMMY); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "register"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Profildaten ändern ein.', 12)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Einstellbare Pflichtfelder hinzugefügt."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + $SQLs[] = "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_UPDATE_DEPENDS = "sql_patches"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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_UPDATE_DEPENDS = "sql_patches"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Standart Referral-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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Cookie refid aus Anmeldeformular entfernt."; + break; + + case "0.2.4": // SQL queries for v0.2.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Referral-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!) + $UPDATE_NOTES = "Parse error in what-register.php beseitigt."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; + break; + + case "0.3.0": // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
+
+Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!"; + + // Depends on 'country' + $EXT_UPDATE_DEPENDS = "country"; + break; + + case "0.3.3": // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Auf Grund der Integration der neue Erweiterung country 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."; + break; + + case "0.3.7": // SQL queries for v0.3.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."; + break; + + case "0.3.8": // SQL queries for v0.3.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Weitere SQL-Befehle abgesichert."; + break; + + case "0.3.9": // SQL queries for v0.3.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.4.0": // SQL queries for v0.4.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.4.1": // SQL queries for v0.4.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; + break; + + case "0.4.2": // SQL queries for v0.4.2 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD register_default ENUM('Y', 'N') NOT NULL DEFAULT 'N'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_register2' WHERE what='config_reg' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl 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!) + $UPDATE_NOTES = "Parser-Error in inc/modules/guest/what-register.php beseitigt."; + break; + + case "0.4.4": // SQL queries for v0.4.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; + break; + + case "0.4.6": // SQL queries for v0.4.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "setcookie() 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!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + + case "0.4.9": // SQL queries for v0.4.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function REGISTER_ADD_CATEGORY_TABLE() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."; + break; + + case "0.5.1": // SQL queries for v0.5.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"; + break; + + case "0.5.2": // SQL queries for v0.5.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + // Copy data to config array + $CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection? + unset($DUMMY); + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "register"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-repair.php b/0.2.1/inc/extensions/ext-repair.php index 2bd09c683e..cc2c20526f 100644 --- a/0.2.1/inc/extensions/ext-repair.php +++ b/0.2.1/inc/extensions/ext-repair.php @@ -1,126 +1,126 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_amnu' WHERE what='repair_amenu' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_gmnu' WHERE what='repair_gmenu' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_mmnu' WHERE what='repair_mmenu' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Konflikt mit Menü-Erweiterung und dieser behoben. Dateien what-repair_*menu.php sind obsulete (veraltet, bitte löschen!)"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "repair"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 überflüssige HTML-Tags entfernt."; + break; + + case "0.1.3": // SQL queries for v0.1.3 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_amnu' WHERE what='repair_amenu' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_gmnu' WHERE what='repair_gmenu' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='repair_mmnu' WHERE what='repair_mmenu' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Konflikt mit Menü-Erweiterung und dieser behoben. Dateien what-repair_*menu.php sind obsulete (veraltet, bitte löschen!)"; + break; + + case "0.1.4": // SQL queries for v0.1.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "repair"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-rewrite.php b/0.2.1/inc/extensions/ext-rewrite.php index 988e9565cd..4fb2de0626 100644 --- a/0.2.1/inc/extensions/ext-rewrite.php +++ b/0.2.1/inc/extensions/ext-rewrite.php @@ -1,151 +1,151 @@ -Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip']; - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "rewrite"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.1": // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip']; + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "rewrite"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-sql_patches.php b/0.2.1/inc/extensions/ext-sql_patches.php index c389f40fed..22b0b9a26d 100644 --- a/0.2.1/inc/extensions/ext-sql_patches.php +++ b/0.2.1/inc/extensions/ext-sql_patches.php @@ -1,618 +1,618 @@ -mxchange_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)"; - break; - - case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD points_word varchar(255) not null default 'Punkte'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page bigint(20) not null default '10'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_home varchar(255) not null default 'welcome'"; - $SQLs[] = "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!) - $UPDATE_NOTES = "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 - $SQLs[] = "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!) - $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."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD verbose_sql enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD menu_blur_spacer varchar(255) not null default ' · '"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - $SQLs[] = "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!) - $UPDATE_NOTES = "Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - $SQLs[] = "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!) - $UPDATE_NOTES = "Soll der einmalige Ref-Bonus über das Referral-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 - $SQLs[] = "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"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay tinyint(4) not null default '-1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie bigint(20) not null default '31536000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_refid', 'Standart-Ref-ID', 'Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referral-Link Ihren Mailtausch aufgerufen hat.', 7)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Standart Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refid_target enum('register', 'index') not null default 'register'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD default_theme varchar(255) not null default '".GET_CURR_THEME()."'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='theme' LIMIT 3"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', '', 'Themes', 'Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', 'theme_import', 'Importieren', 'Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', 'theme_edit', 'Modifizieren', 'Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort, visible, locked) VALUES ('themes', '', 'Design-Auswahl', 4, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('themes', '', 'Design-Auswahl', 3, 'Y', 'N')"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes ( -id bigint(20) not null auto_increment, -theme_path 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) -) TYPE=MyISAM"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Theme-Support integriert. Bitte laden Sie sich zu dieser Version das 281-Patch (wenn Ihr Script v0.2.0-pre7 ist) herunter, da ansonsten die Themes nicht klappen werden!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP ext_has_admin"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_title_deco enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_left varchar(10) not null default '[--'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_middle varchar(10) not null default '-'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_right varchar(10) not null default '--]'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_mod_title enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_what_title enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_title', 'Seitentitel ändern', 'De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "mad_counter 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!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points double(22,5) not null default '0.00000'"; - - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price double(22,5) not null default '0.00000'"; - - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points double(22,5) not null default '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points double(22,5) not null default '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD css_php enum('DIRECT', 'FILE') not null default 'FILE'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD guest_menu enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD member_menu enum('Y', 'N') not null default 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD youre_here enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - $auto_type = "png"; // PNG image is the default - if ((file_exists(PATH."theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) - { - // Switch to JPEG format - $auto_type = "jpg"; - } - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD img_type enum('jpg', 'png') not null default '".$auto_type."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalten max_mails und receive_mails auf bigint(20) gesetzt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'sub_points', '{!POINTS!} abziehen', 'Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abzug von {!POINTS!} nun möglich."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main', 'themes', 'Designs', 6)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme varchar(255) not null default 'default'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit bigint(20) not null default '10'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "
    -
  1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
  2. -
  3. Mitgliederstatistik mit Seitennavigation.
  4. -
"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login varchar(10) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word varchar(255) not null default 'Mailtausch'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word2 varchar(255) not null default 'Mailtausches'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word3 varchar(255) not null default 'Mailtauscher'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referral-Ebenen' WHERE what='config_points' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE what='payments' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Zwei Menüpunkte umbenannt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD UNIQUE KEY (ext_name)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD UNIQUE KEY (theme_path)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD INDEX (theme_active)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD UNIQUE KEY (login)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths ADD UNIQUE KEY (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem ADD INDEX (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD INDEX (data_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD UNIQUE KEY (module)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_created)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD FULLTEXT (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD INDEX (ext_active)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD FULLTEXT (family)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (max_mails)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (password)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (sort)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Connection table between the menu system and the "logical area" system - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las ( -id bigint(20) not null auto_increment, -la_id varchar(255) not null default '', -la_action varchar(255) not null default '', -la_what varchar(255) not null default '', -INDEX (la_id), -INDEX (la_action), -INDEX (la_what), -PRIMARY KEY(id) -) TYPE=MyISAM"; - // All "logical areas" together - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las_data ( -id bigint(20) not null auto_increment, -la_id varchar(255) not null default '', -la_title varchar(255) not null default '', -la_posx bigint(20) not null default '0', -la_posy bigint(20) not null default '0', -UNIQUE KEY (la_id), -INDEX (la_posx), -INDEX (la_posy), -PRIMARY KEY(id) -) TYPE=MyISAM"; - // Which menu do you like? - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu enum('NEW', 'OLD') not null default 'OLD'"; - - // Insert menus - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_admin', 'Adminmenü', 'Diverse Einstellungen am Adminmenü vornehmen.', 9)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."; - 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... - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu_sorter enum('Y', 'N') not null default 'Y'"; - - // The statistics table - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats ( -id bigint(20) not null auto_increment, -aid bigint(20) not null default '0', -type enum('la', 'action', 'what') not null default 'what', -clicks bigint(20) not null default '0', -INDEX (aid), -PRIMARY KEY (id) -) TYPE=MyISAM"; - - // Update notes (these will be set as task text!) - $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."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // List accounts with no referral - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'list_norefs', 'Mitglieder ohne Werber', 'Finden Sie hier alle Mitglieder-Accounts, die von niemandem ({--MAIN_TITLE--} wird in der Mail als Werber angegebenen) geworben wurden.', 7)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fügt den Menüpunkt "Mitglieder ohne Werber" in die Mitglieder-Management hinzu. Mit dieser neuen Funktion können Sie nach Mitglieder-Accounts ohne Werber suchen. TODO-ID #2 CLOSED"; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // List accounts with no referral - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('stats', '', 'Statistiken', 4, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('stats', 'stats2', 'Framekiller-Mails', 2, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('extras', '', 'Extras', 5, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('rals', '', 'Rallyes', 6, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('account', '', 'Ihr Account', 7, 'Y', 'N')"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET sort='8' WHERE action='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE what='stats' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE what='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE what='reflinks' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length tinyint(4) not null default '9'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD pass_scramble varchar(255) not null default ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY password varchar(255) not null default ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY user_hash varchar(255) not null default ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password varchar(255) not null default ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no bigint(20) not null default '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD file_hash varchar(255) not null default ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD master_salt varchar(255) not null default ''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config='0' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD has_menu enum('Y', 'N') NOT NULL default 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"; - break; - - case "0.3.7": // SQL queries for v0.3.7 - $UPDATE_NOTES = "Problem während des Installationsvorganges behoben."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu CHANGE descr descr MEDIUMTEXT NULL"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool CHANGE `text` `text` LONGTEXT NOT NULL"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET descr = REPLACE(descr, '--POINTS--', '!POINTS!') WHERE descr LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - - // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION("sql_patches") != "") { - $CONFIG['ext_autopurge'] = $DUMMY['ext_autopurge']; - $CONFIG['mails_page'] = $DUMMY['mails_page']; - $CONFIG['index_home'] = $DUMMY['index_home']; - $CONFIG['verbose_sql'] = $DUMMY['verbose_sql']; - $CONFIG['middot'] = $DUMMY['menu_blur_spacer']; - $CONFIG['reg_points_mode'] = $DUMMY['reg_points_mode']; - $CONFIG['index_delay'] = $DUMMY['index_delay']; - $CONFIG['index_cookie'] = $DUMMY['index_cookie']; - $CONFIG['def_refid'] = $DUMMY['def_refid']; - $CONFIG['refid_target'] = $DUMMY['refid_target']; - $CONFIG['default_theme'] = $DUMMY['default_theme']; - $CONFIG['title_decoration'] = $DUMMY['enable_title_deco']; - $CONFIG['title_mod_show'] = $DUMMY['enable_mod_title']; - $CONFIG['title_what_show'] = $DUMMY['enable_what_title']; - $CONFIG['title_left'] = $DUMMY['title_left']; - $CONFIG['title_middle'] = $DUMMY['title_middle']; - $CONFIG['title_right'] = $DUMMY['title_right']; - $CONFIG['mad_counter'] = $DUMMY['mad_count']; - $CONFIG['last_mad'] = $DUMMY['mad_timestamp']; - $CONFIG['css_php'] = $DUMMY['css_php']; - $CONFIG['guest_menu'] = $DUMMY['guest_menu']; - $CONFIG['member_menu'] = $DUMMY['member_menu']; - $CONFIG['youre_here'] = $DUMMY['youre_here']; - $CONFIG['img_type'] = $DUMMY['img_type']; - $CONFIG['stats_limit'] = $DUMMY['stats_limit']; - $CONFIG['admin_menu'] = $DUMMY['admin_menu']; - $CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter']; - $CONFIG['salt_length'] = $DUMMY['salt_length']; - $CONFIG['pass_scramble'] = trim($DUMMY['pass_scramble']); - $CONFIG['file_hash'] = trim($DUMMY['file_hash']); - $CONFIG['master_salt'] = trim($DUMMY['master_salt']); - $CONFIG['secret_key'] = ""; - - // Read key from secret file - if ((empty($CONFIG['file_hash'])) || (empty($CONFIG['master_salt'])) || (empty($CONFIG['pass_scramble']))) - { - // Maybe need setup of secret key! - require_once(PATH."inc/gen_sql_patches.php"); - - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - // Remove extensions and mod_reg cache file - require_once(PATH."inc/libs/cache_functions.php"); - require_once(PATH."inc/extensions/ext-cache.php"); - if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy(); - if ($CACHE->cache_file("mod_reg", true)) $CACHE->cache_destroy(); - } - } - - // Test again - if ((!empty($CONFIG['file_hash'])) && (!empty($CONFIG['master_salt'])) && (!empty($CONFIG['pass_scramble']))) - { - // File hash fas generated so we can also file the secret file... hopefully. - if ((file_exists(PATH."inc/.secret/.".$CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$CONFIG['file_hash']))) - { - $CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$CONFIG['file_hash'])); - } - else - { - // Cannot read secret file! - die("Cannot read secret file!"); - } - } - - // Transfer words/numbers to constants - define('POINTS' , $DUMMY['points_word']); - define('MT_WORD' , $DUMMY['mt_word']); - define('MT_WORD2', $DUMMY['mt_word2']); - define('MT_WORD3', $DUMMY['mt_word3']); - define('_MAX' , $DUMMY['rand_no']); - } else { - // Set some lame ;-) default settings - $CONFIG['def_refid'] = 0; - $CONFIG['title_decoration'] = "N"; - $CONFIG['title_mod_show'] = "Y"; - $CONFIG['title_middle'] = "-"; - //$CONFIG['verbose_sql'] = "N"; - define('MT_WORD' , DEFAULT_MT_WORD ); - define('MT_WORD2', DEFAULT_MT_WORD2); - define('POINTS' , DEFAULT_POINTS); - } - - // Remove dummy config array - unset($DUMMY); - break; -} - -// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) -$EXT_LANG_PREFIX = "sql_patches"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// +mxchange_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)"; + break; + + case "0.0.3": // SQL queries for v0.0.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD points_word varchar(255) not null default 'Punkte'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page bigint(20) not null default '10'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_home varchar(255) not null default 'welcome'"; + $SQLs[] = "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!) + $UPDATE_NOTES = "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 + $SQLs[] = "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!) + $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."; + break; + + case "0.0.7": // SQL queries for v0.0.7 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD verbose_sql enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD menu_blur_spacer varchar(255) not null default ' · '"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"; + break; + + case "0.0.9": // SQL queries for v0.0.9 + $SQLs[] = "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!) + $UPDATE_NOTES = "Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + $SQLs[] = "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!) + $UPDATE_NOTES = "Soll der einmalige Ref-Bonus über das Referral-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 + $SQLs[] = "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"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay tinyint(4) not null default '-1'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie bigint(20) not null default '31536000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_refid', 'Standart-Ref-ID', 'Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referral-Link Ihren Mailtausch aufgerufen hat.', 7)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Standart Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; + break; + + case "0.1.3": // SQL queries for v0.1.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refid_target enum('register', 'index') not null default 'register'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"; + break; + + case "0.1.4": // SQL queries for v0.1.4 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD default_theme varchar(255) not null default '".GET_CURR_THEME()."'"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='theme' LIMIT 3"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', '', 'Themes', 'Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', 'theme_import', 'Importieren', 'Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('theme', 'theme_edit', 'Modifizieren', 'Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort, visible, locked) VALUES ('themes', '', 'Design-Auswahl', 4, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('themes', '', 'Design-Auswahl', 3, 'Y', 'N')"; + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes ( +id bigint(20) not null auto_increment, +theme_path 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) +) TYPE=MyISAM"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Theme-Support integriert. Bitte laden Sie sich zu dieser Version das 281-Patch (wenn Ihr Script v0.2.0-pre7 ist) herunter, da ansonsten die Themes nicht klappen werden!"; + break; + + case "0.1.5": // SQL queries for v0.1.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP ext_has_admin"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_title_deco enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_left varchar(10) not null default '[--'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_middle varchar(10) not null default '-'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_right varchar(10) not null default '--]'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_mod_title enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_what_title enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_title', 'Seitentitel ändern', 'De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "mad_counter 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!) + $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; + break; + + case "0.2.0": // SQL queries for v0.2.0 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points double(22,5) not null default '0.00000'"; + + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price double(22,5) not null default '0.00000'"; + + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points double(22,5) not null default '0.00000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points double(22,5) not null default '0.00000'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "5 Nachkommastellen implementiert"; + break; + + case "0.2.1": // SQL queries for v0.2.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD css_php enum('DIRECT', 'FILE') not null default 'FILE'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; + break; + + case "0.2.3": // SQL queries for v0.2.3 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD guest_menu enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD member_menu enum('Y', 'N') not null default 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD youre_here enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."; + break; + + case "0.2.4": // SQL queries for v0.2.4 + $auto_type = "png"; // PNG image is the default + if ((file_exists(PATH."theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) + { + // Switch to JPEG format + $auto_type = "jpg"; + } + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD img_type enum('jpg', 'png') not null default '".$auto_type."'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Spalten max_mails und receive_mails auf bigint(20) gesetzt."; + break; + + case "0.2.6": // SQL queries for v0.2.6 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'sub_points', '{!POINTS!} abziehen', 'Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abzug von {!POINTS!} nun möglich."; + break; + + case "0.2.7": // SQL queries for v0.2.7 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main', 'themes', 'Designs', 6)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme varchar(255) not null default 'default'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit bigint(20) not null default '10'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "
    +
  1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
  2. +
  3. Mitgliederstatistik mit Seitennavigation.
  4. +
"; + break; + + case "0.2.8": // SQL queries for v0.2.8 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login varchar(10) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word varchar(255) not null default 'Mailtausch'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word2 varchar(255) not null default 'Mailtausches'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word3 varchar(255) not null default 'Mailtauscher'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.3.0": // SQL queries for v0.3.0 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referral-Ebenen' WHERE what='config_points' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE what='payments' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Zwei Menüpunkte umbenannt."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD UNIQUE KEY (ext_name)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD UNIQUE KEY (theme_path)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD INDEX (theme_active)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD UNIQUE KEY (login)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths ADD UNIQUE KEY (level)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem ADD INDEX (level)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD INDEX (data_type)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD UNIQUE KEY (module)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (action)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_type)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_created)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD FULLTEXT (subject)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD INDEX (ext_active)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD FULLTEXT (family)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (max_mails)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (password)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (action)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (sort)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (locked)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (what)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (sort)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (locked)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (visible)"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (sort)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."; + break; + + case "0.3.2": // SQL queries for v0.3.2 + // Connection table between the menu system and the "logical area" system + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las ( +id bigint(20) not null auto_increment, +la_id varchar(255) not null default '', +la_action varchar(255) not null default '', +la_what varchar(255) not null default '', +INDEX (la_id), +INDEX (la_action), +INDEX (la_what), +PRIMARY KEY(id) +) TYPE=MyISAM"; + // All "logical areas" together + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las_data ( +id bigint(20) not null auto_increment, +la_id varchar(255) not null default '', +la_title varchar(255) not null default '', +la_posx bigint(20) not null default '0', +la_posy bigint(20) not null default '0', +UNIQUE KEY (la_id), +INDEX (la_posx), +INDEX (la_posy), +PRIMARY KEY(id) +) TYPE=MyISAM"; + // Which menu do you like? + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu enum('NEW', 'OLD') not null default 'OLD'"; + + // Insert menus + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('setup', 'config_admin', 'Adminmenü', 'Diverse Einstellungen am Adminmenü vornehmen.', 9)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."; + 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... + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu_sorter enum('Y', 'N') not null default 'Y'"; + + // The statistics table + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; + $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats ( +id bigint(20) not null auto_increment, +aid bigint(20) not null default '0', +type enum('la', 'action', 'what') not null default 'what', +clicks bigint(20) not null default '0', +INDEX (aid), +PRIMARY KEY (id) +) TYPE=MyISAM"; + + // Update notes (these will be set as task text!) + $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."; + break; + + case "0.3.4": // SQL queries for v0.3.4 + // List accounts with no referral + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'list_norefs', 'Mitglieder ohne Werber', 'Finden Sie hier alle Mitglieder-Accounts, die von niemandem ({--MAIN_TITLE--} wird in der Mail als Werber angegebenen) geworben wurden.', 7)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fügt den Menüpunkt "Mitglieder ohne Werber" in die Mitglieder-Management hinzu. Mit dieser neuen Funktion können Sie nach Mitglieder-Accounts ohne Werber suchen. TODO-ID #2 CLOSED"; + break; + + case "0.3.5": // SQL queries for v0.3.5 + // List accounts with no referral + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('stats', '', 'Statistiken', 4, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('stats', 'stats2', 'Framekiller-Mails', 2, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('extras', '', 'Extras', 5, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('rals', '', 'Rallyes', 6, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('account', '', 'Ihr Account', 7, 'Y', 'N')"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET sort='8' WHERE action='themes' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE what='stats' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE what='themes' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE what='reflinks' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; + break; + + case "0.3.6": // SQL queries for v0.3.6 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length tinyint(4) not null default '9'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD pass_scramble varchar(255) not null default ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY password varchar(255) not null default ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY user_hash varchar(255) not null default ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password varchar(255) not null default ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no bigint(20) not null default '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD file_hash varchar(255) not null default ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD master_salt varchar(255) not null default ''"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config='0' LIMIT 1"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD has_menu enum('Y', 'N') NOT NULL default 'N'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"; + break; + + case "0.3.7": // SQL queries for v0.3.7 + $UPDATE_NOTES = "Problem während des Installationsvorganges behoben."; + break; + + case "0.3.8": // SQL queries for v0.3.8 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu CHANGE descr descr MEDIUMTEXT NULL"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool CHANGE `text` `text` LONGTEXT NOT NULL"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; + break; + + case "0.3.9": // SQL queries for v0.3.9 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET descr = REPLACE(descr, '--POINTS--', '!POINTS!') WHERE descr LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET title = REPLACE(title, '--POINTS--', '!POINTS!') WHERE title LIKE '%--POINTS--%'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; + break; + + case "0.4.0": // SQL queries for v0.4.0 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + + // When the sql_patches is not installed we cannot load it's configuration... *sigh* + if (GET_EXT_VERSION("sql_patches") != "") { + $CONFIG['ext_autopurge'] = $DUMMY['ext_autopurge']; + $CONFIG['mails_page'] = $DUMMY['mails_page']; + $CONFIG['index_home'] = $DUMMY['index_home']; + $CONFIG['verbose_sql'] = $DUMMY['verbose_sql']; + $CONFIG['middot'] = $DUMMY['menu_blur_spacer']; + $CONFIG['reg_points_mode'] = $DUMMY['reg_points_mode']; + $CONFIG['index_delay'] = $DUMMY['index_delay']; + $CONFIG['index_cookie'] = $DUMMY['index_cookie']; + $CONFIG['def_refid'] = $DUMMY['def_refid']; + $CONFIG['refid_target'] = $DUMMY['refid_target']; + $CONFIG['default_theme'] = $DUMMY['default_theme']; + $CONFIG['title_decoration'] = $DUMMY['enable_title_deco']; + $CONFIG['title_mod_show'] = $DUMMY['enable_mod_title']; + $CONFIG['title_what_show'] = $DUMMY['enable_what_title']; + $CONFIG['title_left'] = $DUMMY['title_left']; + $CONFIG['title_middle'] = $DUMMY['title_middle']; + $CONFIG['title_right'] = $DUMMY['title_right']; + $CONFIG['mad_counter'] = $DUMMY['mad_count']; + $CONFIG['last_mad'] = $DUMMY['mad_timestamp']; + $CONFIG['css_php'] = $DUMMY['css_php']; + $CONFIG['guest_menu'] = $DUMMY['guest_menu']; + $CONFIG['member_menu'] = $DUMMY['member_menu']; + $CONFIG['youre_here'] = $DUMMY['youre_here']; + $CONFIG['img_type'] = $DUMMY['img_type']; + $CONFIG['stats_limit'] = $DUMMY['stats_limit']; + $CONFIG['admin_menu'] = $DUMMY['admin_menu']; + $CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter']; + $CONFIG['salt_length'] = $DUMMY['salt_length']; + $CONFIG['pass_scramble'] = trim($DUMMY['pass_scramble']); + $CONFIG['file_hash'] = trim($DUMMY['file_hash']); + $CONFIG['master_salt'] = trim($DUMMY['master_salt']); + $CONFIG['secret_key'] = ""; + + // Read key from secret file + if ((empty($CONFIG['file_hash'])) || (empty($CONFIG['master_salt'])) || (empty($CONFIG['pass_scramble']))) + { + // Maybe need setup of secret key! + require_once(PATH."inc/gen_sql_patches.php"); + + if (GET_EXT_VERSION("cache") >= "0.1.2") + { + // Remove extensions and mod_reg cache file + require_once(PATH."inc/libs/cache_functions.php"); + require_once(PATH."inc/extensions/ext-cache.php"); + if ($CACHE->cache_file("extensions", true)) $CACHE->cache_destroy(); + if ($CACHE->cache_file("mod_reg", true)) $CACHE->cache_destroy(); + } + } + + // Test again + if ((!empty($CONFIG['file_hash'])) && (!empty($CONFIG['master_salt'])) && (!empty($CONFIG['pass_scramble']))) + { + // File hash fas generated so we can also file the secret file... hopefully. + if ((file_exists(PATH."inc/.secret/.".$CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$CONFIG['file_hash']))) + { + $CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$CONFIG['file_hash'])); + } + else + { + // Cannot read secret file! + die("Cannot read secret file!"); + } + } + + // Transfer words/numbers to constants + define('POINTS' , $DUMMY['points_word']); + define('MT_WORD' , $DUMMY['mt_word']); + define('MT_WORD2', $DUMMY['mt_word2']); + define('MT_WORD3', $DUMMY['mt_word3']); + define('_MAX' , $DUMMY['rand_no']); + } else { + // Set some lame ;-) default settings + $CONFIG['def_refid'] = 0; + $CONFIG['title_decoration'] = "N"; + $CONFIG['title_mod_show'] = "Y"; + $CONFIG['title_middle'] = "-"; + //$CONFIG['verbose_sql'] = "N"; + define('MT_WORD' , DEFAULT_MT_WORD ); + define('MT_WORD2', DEFAULT_MT_WORD2); + define('POINTS' , DEFAULT_POINTS); + } + + // Remove dummy config array + unset($DUMMY); + break; +} + +// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) +$EXT_LANG_PREFIX = "sql_patches"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// ?> \ No newline at end of file diff --git a/0.2.1/inc/extensions/ext-support.php b/0.2.1/inc/extensions/ext-support.php index 054715adeb..5d24d79c32 100644 --- a/0.2.1/inc/extensions/ext-support.php +++ b/0.2.1/inc/extensions/ext-support.php @@ -1,139 +1,139 @@ -Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "support"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.0.9": // SQL queries for v0.0.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "support"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-task.php b/0.2.1/inc/extensions/ext-task.php index ca4c9f2219..b9433b0413 100644 --- a/0.2.1/inc/extensions/ext-task.php +++ b/0.2.1/inc/extensions/ext-task.php @@ -1,255 +1,255 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "&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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Fehler bei Abfrage der payout-Erweiterung beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Direkt-Links eingebaut:
-"; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Alle Administratoren, Referral-Banner und aktivierte Referral-Banner werden nun eingeblendet."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nur mit bonus v0.6.9 oder höher: 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als Erledigt 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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "task"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "&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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Fehler bei Abfrage der payout-Erweiterung beseitigt."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.1.4": // SQL queries for v0.1.4 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; + break; + + case "0.1.6": // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Weitere Direkt-Links eingebaut:
+"; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Alle Administratoren, Referral-Banner und aktivierte Referral-Banner werden nun eingeblendet."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Nur mit bonus v0.6.9 oder höher: 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als Erledigt 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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "task"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-theme.php b/0.2.1/inc/extensions/ext-theme.php index 20b713ebdc..43d9c0cce9 100644 --- a/0.2.1/inc/extensions/ext-theme.php +++ b/0.2.1/inc/extensions/ext-theme.php @@ -1,118 +1,118 @@ -setcookie() 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!) - $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "theme"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +setcookie() 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!) + $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; + break; + } + break; + +default: // Do stuff when extension is loaded + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "theme"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-top10.php b/0.2.1/inc/extensions/ext-top10.php index 49086894ae..1e99c57c7f 100644 --- a/0.2.1/inc/extensions/ext-top10.php +++ b/0.2.1/inc/extensions/ext-top10.php @@ -1,158 +1,158 @@ -Column: 'userid' in group statement is ambiguous im Gastbereich beseitigt."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "Rechtschreibefehler beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['top10_max'] = $DUMMY['top10_max']; - unset($DUMMY); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "top10"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Column: 'userid' in group statement is ambiguous im Gastbereich beseitigt."; + break; + + case "0.0.2": // SQL queries for v0.0.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; + break; + + case "0.0.8": // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "Rechtschreibefehler beseitigt."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['top10_max'] = $DUMMY['top10_max']; + unset($DUMMY); + break; +} + +// Language file prefix +$EXT_LANG_PREFIX = "top10"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-transfer.php b/0.2.1/inc/extensions/ext-transfer.php index c495743641..3f33d7a38f 100644 --- a/0.2.1/inc/extensions/ext-transfer.php +++ b/0.2.1/inc/extensions/ext-transfer.php @@ -1,315 +1,315 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer enum('Y', 'N') not null default 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.1.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template admin_config_transfer_pro.tpl 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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wort Punkte dynamisiert."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"; - - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Touring-Code wiederholen nach Touring-Code eingeben hin geändert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett geändert."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die ".POINTS." können nun wieder wie gewohnt transferiert werden. Der Grund für ".TRANSFER_INVALID_PASSWORD." 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!) - $UPDATE_NOTES = "Fehlermeldung Notice: Undefined index: to_uid in ".PATH."/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - // Maximum of listed transfers for out- and in-transfers - $CONFIG['transfer_max'] = $DUMMY['transfer_max']; - // Age in seconds - $CONFIG['transfer_age'] = $DUMMY['transfer_age']; - // Lock timeout for member settings - $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout']; - // Balance after points transfer - $CONFIG['transfer_balance'] = $DUMMY['transfer_balance']; - // Length of touring code - $CONFIG['transfer_code'] = $DUMMY['transfer_code']; - // Length of touring code - $CONFIG['ap_transfer'] = $DUMMY['ap_transfer']; - unset($DUMMY); - - if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == "Y")) - { - // Automatically remove outdated or not displayed transactions - TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']); - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "transfer"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - -// -?> +Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; + break; + + case "0.0.3": // SQL queries for v0.0.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."; + break; + + case "0.0.3": // SQL queries for v0.0.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."; + break; + + case "0.0.5": // SQL queries for v0.0.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer enum('Y', 'N') not null default 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"; + break; + + case "0.0.6": // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; + break; + + case "0.1.0": // SQL queries for v0.1.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; + break; + + case "0.1.2": // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Template admin_config_transfer_pro.tpl 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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.1.7": // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Wort Punkte dynamisiert."; + break; + + case "0.1.8": // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; + break; + + case "0.2.3": // SQL queries for v0.2.3 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"; + + // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin + $EXT_UPDATE_DEPENDS = "sql_patches"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Touring-Code wiederholen nach Touring-Code eingeben hin geändert."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitgliedsmenü komplett geändert."; + break; + + case "0.2.6": // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; + break; + + case "0.2.7": // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Die ".POINTS." können nun wieder wie gewohnt transferiert werden. Der Grund für ".TRANSFER_INVALID_PASSWORD." 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!) + $UPDATE_NOTES = "Fehlermeldung Notice: Undefined index: to_uid in ".PATH."/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + break; + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + // Maximum of listed transfers for out- and in-transfers + $CONFIG['transfer_max'] = $DUMMY['transfer_max']; + // Age in seconds + $CONFIG['transfer_age'] = $DUMMY['transfer_age']; + // Lock timeout for member settings + $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout']; + // Balance after points transfer + $CONFIG['transfer_balance'] = $DUMMY['transfer_balance']; + // Length of touring code + $CONFIG['transfer_code'] = $DUMMY['transfer_code']; + // Length of touring code + $CONFIG['ap_transfer'] = $DUMMY['ap_transfer']; + unset($DUMMY); + + if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == "Y")) + { + // Automatically remove outdated or not displayed transactions + TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']); + } + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "transfer"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "N"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-user.php b/0.2.1/inc/extensions/ext-user.php index e51728653f..9e311fb25a 100644 --- a/0.2.1/inc/extensions/ext-user.php +++ b/0.2.1/inc/extensions/ext-user.php @@ -1,230 +1,230 @@ -Sie sind hier im Menüpunkt Online-Liste erweitert."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received bigint(20) not null default '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Seit Patch 340 ü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!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha tinyint(4) not null default '10'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_user', 'Mitgliederliste', 'Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE sex sex enum('M', 'F', 'C') not null default 'M'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "SQL-Anweisungen abgesichert."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "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!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('user', 'user_contct', 'Mitglied kontaktieren', 'Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admin-Kontaktformular hinzugefügt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 Release."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Mitglieder-Management' WHERE action = 'user' AND what='' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung auf Management umgestellt"; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von 0.00000 unbestätigten Mails gefixt."; - break; +Sie sind hier
im Menüpunkt Online-Liste erweitert."; + break; + + case "0.1.4": // SQL queries for v0.1.4 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received bigint(20) not null default '0'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; + break; + + case "0.1.5": // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Seit Patch 340 ü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!) + $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; + break; + + case "0.2.0": // SQL queries for v0.2.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."; + break; + + case "0.2.1": // SQL queries for v0.2.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha tinyint(4) not null default '10'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('setup', 'config_user', 'Mitgliederliste', 'Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."; + break; + + case "0.2.2": // SQL queries for v0.2.2 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE sex sex enum('M', 'F', 'C') not null default 'M'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; + break; + + case "0.2.3": // SQL queries for v0.2.3 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + break; + + case "0.2.5": // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "SQL-Anweisungen abgesichert."; + break; + + case "0.2.6": // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + break; + + case "0.2.7": // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "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!) + $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; + break; + + case "0.2.9": // SQL queries for v0.2.9 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('user', 'user_contct', 'Mitglied kontaktieren', 'Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Admin-Kontaktformular hinzugefügt."; + break; + + case "0.3.0": // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 Release."; + break; + + case "0.3.1": // SQL queries for v0.3.1 + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Mitglieder-Management' WHERE action = 'user' AND what='' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Verwaltung auf Management umgestellt"; + break; + + case "0.3.2": // SQL queries for v0.3.2 + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von 0.00000 unbestätigten Mails gefixt."; + break; case "0.3.3": // SQL queries for v0.3.3 // Update notes (these will be set as task text!) $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 task!)"; break; - } - break; - -default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $CONFIG['user_limit'] = $DUMMY['user_limit']; - $CONFIG['user_alpha'] = $DUMMY['user_alpha']; - unset($DUMMY); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "user"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> + } + break; + +default: // Do stuff when extension is loaded + $DUMMY = LOAD_CONFIG("0"); + $CONFIG['user_limit'] = $DUMMY['user_limit']; + $CONFIG['user_alpha'] = $DUMMY['user_alpha']; + unset($DUMMY); + break; +} +// Language file prefix +$EXT_LANG_PREFIX = "user"; + +// Extension is always active? +$EXT_ALWAYS_ACTIVE = "Y"; + +// +?> diff --git a/0.2.1/inc/extensions/ext-wernis.php b/0.2.1/inc/extensions/ext-wernis.php index f46889884d..d82e998115 100644 --- a/0.2.1/inc/extensions/ext-wernis.php +++ b/0.2.1/inc/extensions/ext-wernis.php @@ -1,116 +1,116 @@ - + diff --git a/0.2.1/inc/fatal_errors.php b/0.2.1/inc/fatal_errors.php index ba6416410e..edee328c70 100644 --- a/0.2.1/inc/fatal_errors.php +++ b/0.2.1/inc/fatal_errors.php @@ -1,93 +1,93 @@ - 0) || (!empty($FATAL[0]))) -{ - // Main div container - LOAD_TEMPLATE("fatal_header"); - - // Set unset variable - if (empty($check)) $check = ""; - if (mxchange_installing) { - // While we are installing ouput other header than while it is installed... :-) - $OUT = ""; - foreach ($FATAL 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 (mxchange_installed) { - // Display all runtime fatal errors - $OUT = ""; - foreach ($FATAL 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 - mxchange_die(LOAD_TEMPLATE("runtime_fatal_table", true, $OUT)); - } - $CORR = FATAL_REPORT_ERRORS; - - // PHP warnings fixed - if ($check == "done") { - if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS; - } - - // Load footer template - LOAD_TEMPLATE("fatal_footer", false, $CORR); -} - -// -?> + 0) || (!empty($FATAL[0]))) +{ + // Main div container + LOAD_TEMPLATE("fatal_header"); + + // Set unset variable + if (empty($check)) $check = ""; + if (mxchange_installing) { + // While we are installing ouput other header than while it is installed... :-) + $OUT = ""; + foreach ($FATAL 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 (mxchange_installed) { + // Display all runtime fatal errors + $OUT = ""; + foreach ($FATAL 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 + mxchange_die(LOAD_TEMPLATE("runtime_fatal_table", true, $OUT)); + } + $CORR = FATAL_REPORT_ERRORS; + + // PHP warnings fixed + if ($check == "done") { + if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS; + } + + // Load footer template + LOAD_TEMPLATE("fatal_footer", false, $CORR); +} + +// +?> diff --git a/0.2.1/inc/footer.php b/0.2.1/inc/footer.php index e165a5ffe8..cbd10e8da5 100644 --- a/0.2.1/inc/footer.php +++ b/0.2.1/inc/footer.php @@ -1,96 +1,96 @@ - -"); - } - - // Output the generated HTML code or do nothing in direct-mode - if (!empty($FATAL[0])) - { - // Output fatal error messages - require_once(PATH."inc/fatal_errors.php"); - } - - // Shall we display the copyright notice? - if ((empty($frame)) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (WRITE_FOOTER == true)) - { - LOAD_TEMPLATE("copyright"); - } - - // Load page footer - LOAD_TEMPLATE("page_footer"); - - if (((frameset_active) || ($GLOBALS['module'] == "frametester")) && ($FOOTER == "1")) - { - // Add the closing NOFRAMES tag - OUTPUT_HTML (""); - } - // And the last closing HTML tag - OUTPUT_HTML (""); - - // Footer has been reached - $FOOTER = 1; - - // Output HTML code - OUTPUT_HTML (""); - - // Close link - if ($link) { SQL_CLOSE($link, __FILE__, __LINE__); } else { ADD_FATAL(NO_DB_LINK); } -} - elseif ($CSS == "1") -{ - // Footer has been reached - $FOOTER = 1; - - // Output CSS content - OUTPUT_HTML (""); -} -// -?> + +"); + } + + // Output the generated HTML code or do nothing in direct-mode + if (!empty($FATAL[0])) + { + // Output fatal error messages + require_once(PATH."inc/fatal_errors.php"); + } + + // Shall we display the copyright notice? + if ((empty($frame)) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (WRITE_FOOTER == true)) + { + LOAD_TEMPLATE("copyright"); + } + + // Load page footer + LOAD_TEMPLATE("page_footer"); + + if (((frameset_active) || ($GLOBALS['module'] == "frametester")) && ($FOOTER == "1")) + { + // Add the closing NOFRAMES tag + OUTPUT_HTML (""); + } + // And the last closing HTML tag + OUTPUT_HTML (""); + + // Footer has been reached + $FOOTER = 1; + + // Output HTML code + OUTPUT_HTML (""); + + // Close link + if ($link) { SQL_CLOSE($link, __FILE__, __LINE__); } else { ADD_FATAL(NO_DB_LINK); } +} + elseif ($CSS == "1") +{ + // Footer has been reached + $FOOTER = 1; + + // Output CSS content + OUTPUT_HTML (""); +} +// +?> diff --git a/0.2.1/inc/functions.php b/0.2.1/inc/functions.php index dc1aa2f0ea..7088c4c07c 100644 --- a/0.2.1/inc/functions.php +++ b/0.2.1/inc/functions.php @@ -1,391 +1,391 @@ - - - "; - OUTPUT_HTML ($OUT); -} -// Close a table (you may want to add some footer stuff here) -function CLOSE_TABLE($ADD="") -{ - OUTPUT_HTML (" -"); - if (!empty($ADD)) OUTPUT_HTML ($ADD); - OUTPUT_HTML (""); -} - -// Output HTML code directly or "render" it. You addionally switch the new-line character off -function OUTPUT_HTML ($HTML, $NEW_LINE = true) { - // Some global variables - global $OUTPUT, $FOOTER, $CSS; - - // Do we have HTML-Code here? - if (!empty($HTML)) { - // Yes, so we handle it as you have configured - switch (OUTPUT_MODE) - { - case "render": - // That's why you don't need any \n at the end of your HTML code... :-) - if (_OB_CACHING == "on") - { - // Output into PHP's internal buffer - echo stripslashes($HTML); - - // That's why you don't need any \n at the end of your HTML code... :-) - if ($NEW_LINE) echo "\n"; - } - else - { - // Render mode for old or lame servers... - $OUTPUT .= $HTML; - - // That's why you don't need any \n at the end of your HTML code... :-) - if ($NEW_LINE) $OUTPUT .= "\n"; - } - break; - - case "direct": - // If we are switching from render to direct output rendered code - if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { echo $OUTPUT; $OUTPUT = ""; } - - // The same as above... ^ - echo stripslashes($HTML); - if ($NEW_LINE) echo "\n"; - break; - - default: - // Huh, something goes wrong or maybe you have edited config.php ??? - die ("".FATAL_ERROR.": ".LANG_NO_RENDER_DIRECT); - break; - } - } elseif ((_OB_CACHING == "on") && ($FOOTER == 1)) { - // Output cached HTML code - $OUTPUT = ob_get_contents(); - - // Clear output buffer for later output - ob_end_clean(); - - if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { - $OUTPUT = REWRITE_LINKS($OUTPUT); - } - - // Compile and run finished rendered HTML code - while (strpos($OUTPUT, "{!") > 0) { - $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; - @eval($eval); - } - - // Output code here, DO NOT REMOVE! ;-) - echo stripslashes($OUTPUT); - flush(); - } elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) { - // Rewrite links when rewrite extension is active - if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { - $OUTPUT = REWRITE_LINKS($OUTPUT); - } - - // Compile and run finished rendered HTML code - while (strpos($OUTPUT, "{!") > 0) { - $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; - @eval($eval); - } - - // Output code here, DO NOT REMOVE! ;-) - echo stripslashes($OUTPUT); - flush(); - } -} - -// Add a fatal error message to the queue array -function ADD_FATAL ($message, $extra="") -{ - global $FATAL; - if (empty($extra)) { - // Regular text message to add to $FATAL - $FATAL[] = $message; - } else { - // $message is text with a mask plus extras to insert into the text - $FATAL[] = sprintf($message, $extra); - } -} - -// Load a template file and return it's content (only it's name; do not use ' or ") -function LOAD_TEMPLATE($template, $return=false, $content="") -{ - // Add more variables which you want to use in your template files - global $DATA, $username; - $ACTION = SQL_ESCAPE($GLOBALS['action']); - $WHAT = SQL_ESCAPE($GLOBALS['what']); - $ret = ""; - if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; - $REFID = $GLOBALS['refid']; - - if ($template == "member_support_form") - { - // Support request of a member - $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", - array($GLOBALS['userid']), __FILE__, __LINE__); - list($sex, $surname, $family) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $salut = TRANSLATE_SEX($sex); - } - - // Generate date/time string - $date_time = MAKE_DATETIME(time(), "1"); - - // Base directory - $BASE = PATH."templates/".GET_LANGUAGE()."/html/"; - $MODE = ""; - - // Check for admin/guest/member templates - if (strpos($template, "admin_") > -1) - { - // Admin template found - $MODE = "admin/"; - } - elseif (strpos($template, "guest_") > -1) - { - // Guest template found - $MODE = "guest/"; - } - elseif (strpos($template, "member_") > -1) - { - // 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/"; - } - else - { - // Test for extension - $test = substr($template, 0, strpos($template, "_")); - if (EXT_IS_ACTIVE($test)) - { - // Set extra path to extension's name - $MODE = $test."/"; - } - } - - //////////////////////// - // Generate file name // - //////////////////////// - $file = $BASE.$MODE.$template.".tpl"; - - if ((!empty($GLOBALS['what'])) && ((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", - $BASE, - $MODE, - $template, - SQL_ESCAPE($GLOBALS['what']) - ); - - // Probe for it... - if (file_exists($file2)) $file = $file2; - - // Remove variable from memory - unset($file2); - } - - // Does the special template exists? - if (!file_exists($file)) - { - // Reset to default template - $file = $BASE.$template.".tpl"; - } - - // Now does the final template exists? - if (file_exists($file)) - { - // The local file does exists so we load it. :) - $tmpl_file = implode("", file($file)); - - // 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? - if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) - { - // Okay, compile it! - $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";"; - eval($tmpl_file); - } - else - { - // Simply return loaded code - $ret = $tmpl_file; - } - - // Add surrounding HTML comments to help finding bugs faster - $ret = "\n".$ret."\n"; - } - elseif ((IS_ADMIN()) || ((mxchange_installing) && (!mxchange_installed))) - { - // Only admins shall see this warning or when installation mode is active - $ret = "
".TEMPLATE_404."
-(".basename($file).")
-
-".TEMPLATE_CONTENT." -
".print_r($content, true)."
-".TEMPLATE_DATA." -
".print_r($DATA, true)."
-

"; - } - if (!empty($ret)) - { - // Not empty so let's put it out! ;) - if ($return) - { - // Return the HTML code - return $ret; - } - else - { - // Output direct - OUTPUT_HTML ($ret); - } - } - elseif (DEBUG_MODE) - { - // Warning, empty output! - return "E:".$template."
\n"; - } -} - -// Send mail out to an email address -function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML="N", $FROM="") -{ - // Compile subject line (for POINTS constant etc.) - $eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";"; - eval($eval); - $SUBJECT = html_entity_decode($SUBJECT); - - // Set from header - if (!eregi("@", $TO)) - { - // Value detected, load email from database - if (EXT_IS_ACTIVE("msg")) - { - ADD_MESSAGE_TO_BOX($TO, $SUBJECT, $MSG, $HTML); - return; - } - else - { - $result_email = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__); - list($TO) = SQL_FETCHROW($result_email); - SQL_FREERESULT($result_email); - } - } - - // Not in PHPMailer-Mode - if (!CHECK_PHPMAILER_USAGE()) { - if (empty($FROM)) { - // Load email header template - $FROM = LOAD_EMAIL_TEMPLATE("header"); + + + "; + OUTPUT_HTML ($OUT); +} +// Close a table (you may want to add some footer stuff here) +function CLOSE_TABLE($ADD="") +{ + OUTPUT_HTML (" +"); + if (!empty($ADD)) OUTPUT_HTML ($ADD); + OUTPUT_HTML (""); +} + +// Output HTML code directly or "render" it. You addionally switch the new-line character off +function OUTPUT_HTML ($HTML, $NEW_LINE = true) { + // Some global variables + global $OUTPUT, $FOOTER, $CSS; + + // Do we have HTML-Code here? + if (!empty($HTML)) { + // Yes, so we handle it as you have configured + switch (OUTPUT_MODE) + { + case "render": + // That's why you don't need any \n at the end of your HTML code... :-) + if (_OB_CACHING == "on") + { + // Output into PHP's internal buffer + echo stripslashes($HTML); + + // That's why you don't need any \n at the end of your HTML code... :-) + if ($NEW_LINE) echo "\n"; + } + else + { + // Render mode for old or lame servers... + $OUTPUT .= $HTML; + + // That's why you don't need any \n at the end of your HTML code... :-) + if ($NEW_LINE) $OUTPUT .= "\n"; + } + break; + + case "direct": + // If we are switching from render to direct output rendered code + if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { echo $OUTPUT; $OUTPUT = ""; } + + // The same as above... ^ + echo stripslashes($HTML); + if ($NEW_LINE) echo "\n"; + break; + + default: + // Huh, something goes wrong or maybe you have edited config.php ??? + die ("".FATAL_ERROR.": ".LANG_NO_RENDER_DIRECT); + break; + } + } elseif ((_OB_CACHING == "on") && ($FOOTER == 1)) { + // Output cached HTML code + $OUTPUT = ob_get_contents(); + + // Clear output buffer for later output + ob_end_clean(); + + if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { + $OUTPUT = REWRITE_LINKS($OUTPUT); + } + + // Compile and run finished rendered HTML code + while (strpos($OUTPUT, "{!") > 0) { + $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; + @eval($eval); + } + + // Output code here, DO NOT REMOVE! ;-) + echo stripslashes($OUTPUT); + flush(); + } elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) { + // Rewrite links when rewrite extension is active + if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { + $OUTPUT = REWRITE_LINKS($OUTPUT); + } + + // Compile and run finished rendered HTML code + while (strpos($OUTPUT, "{!") > 0) { + $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; + @eval($eval); + } + + // Output code here, DO NOT REMOVE! ;-) + echo stripslashes($OUTPUT); + flush(); + } +} + +// Add a fatal error message to the queue array +function ADD_FATAL ($message, $extra="") +{ + global $FATAL; + if (empty($extra)) { + // Regular text message to add to $FATAL + $FATAL[] = $message; + } else { + // $message is text with a mask plus extras to insert into the text + $FATAL[] = sprintf($message, $extra); + } +} + +// Load a template file and return it's content (only it's name; do not use ' or ") +function LOAD_TEMPLATE($template, $return=false, $content="") +{ + // Add more variables which you want to use in your template files + global $DATA, $username; + $ACTION = SQL_ESCAPE($GLOBALS['action']); + $WHAT = SQL_ESCAPE($GLOBALS['what']); + $ret = ""; + if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; + $REFID = $GLOBALS['refid']; + + if ($template == "member_support_form") + { + // Support request of a member + $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array($GLOBALS['userid']), __FILE__, __LINE__); + list($sex, $surname, $family) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + $salut = TRANSLATE_SEX($sex); + } + + // Generate date/time string + $date_time = MAKE_DATETIME(time(), "1"); + + // Base directory + $BASE = PATH."templates/".GET_LANGUAGE()."/html/"; + $MODE = ""; + + // Check for admin/guest/member templates + if (strpos($template, "admin_") > -1) + { + // Admin template found + $MODE = "admin/"; + } + elseif (strpos($template, "guest_") > -1) + { + // Guest template found + $MODE = "guest/"; + } + elseif (strpos($template, "member_") > -1) + { + // 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/"; + } + else + { + // Test for extension + $test = substr($template, 0, strpos($template, "_")); + if (EXT_IS_ACTIVE($test)) + { + // Set extra path to extension's name + $MODE = $test."/"; + } + } + + //////////////////////// + // Generate file name // + //////////////////////// + $file = $BASE.$MODE.$template.".tpl"; + + if ((!empty($GLOBALS['what'])) && ((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", + $BASE, + $MODE, + $template, + SQL_ESCAPE($GLOBALS['what']) + ); + + // Probe for it... + if (file_exists($file2)) $file = $file2; + + // Remove variable from memory + unset($file2); + } + + // Does the special template exists? + if (!file_exists($file)) + { + // Reset to default template + $file = $BASE.$template.".tpl"; + } + + // Now does the final template exists? + if (file_exists($file)) + { + // The local file does exists so we load it. :) + $tmpl_file = implode("", file($file)); + + // 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? + if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) + { + // Okay, compile it! + $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";"; + eval($tmpl_file); + } + else + { + // Simply return loaded code + $ret = $tmpl_file; + } + + // Add surrounding HTML comments to help finding bugs faster + $ret = "\n".$ret."\n"; + } + elseif ((IS_ADMIN()) || ((mxchange_installing) && (!mxchange_installed))) + { + // Only admins shall see this warning or when installation mode is active + $ret = "
".TEMPLATE_404."
+(".basename($file).")
+
+".TEMPLATE_CONTENT." +
".print_r($content, true)."
+".TEMPLATE_DATA." +
".print_r($DATA, true)."
+

"; + } + if (!empty($ret)) + { + // Not empty so let's put it out! ;) + if ($return) + { + // Return the HTML code + return $ret; + } + else + { + // Output direct + OUTPUT_HTML ($ret); + } + } + elseif (DEBUG_MODE) + { + // Warning, empty output! + return "E:".$template."
\n"; + } +} + +// Send mail out to an email address +function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML="N", $FROM="") +{ + // Compile subject line (for POINTS constant etc.) + $eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";"; + eval($eval); + $SUBJECT = html_entity_decode($SUBJECT); + + // Set from header + if (!eregi("@", $TO)) + { + // Value detected, load email from database + if (EXT_IS_ACTIVE("msg")) + { + ADD_MESSAGE_TO_BOX($TO, $SUBJECT, $MSG, $HTML); + return; + } + else + { + $result_email = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__); + list($TO) = SQL_FETCHROW($result_email); + SQL_FREERESULT($result_email); + } + } + + // Not in PHPMailer-Mode + if (!CHECK_PHPMAILER_USAGE()) { + if (empty($FROM)) { + // Load email header template + $FROM = LOAD_EMAIL_TEMPLATE("header"); } else { - // Append header - $FROM .= LOAD_EMAIL_TEMPLATE("header"); - } + // Append header + $FROM .= LOAD_EMAIL_TEMPLATE("header"); + } } elseif (DEBUG_MODE) { if (empty($FROM)) { // Load email header template @@ -394,1701 +394,1701 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML="N", $FROM="") // Append header $FROM .= LOAD_EMAIL_TEMPLATE("header"); } - } - - // Fix HTML parameter (default is no!) - if (empty($HTML)) $HTML = "N"; - if (DEBUG_MODE) - { - // In debug mode we want to display the mail instead of sending it away so we can debug this part + } + + // Fix HTML parameter (default is no!) + if (empty($HTML)) $HTML = "N"; + if (DEBUG_MODE) + { + // In debug mode we want to display the mail instead of sending it away so we can debug this part echo "
-".htmlentities(trim($FROM))."
-To      : ".$TO."
-Subject : ".$SUBJECT."
-Message : ".$MSG."
-
\n"; - } - elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail", true))) - { - // Send mail as HTML away - SEND_HTML_EMAIL($TO, $SUBJECT, $MSG, $FROM); - } - elseif (!empty($TO)) - { - // Compile email - $TO = COMPILE_CODE($TO); - - // Send Mail away - SEND_RAW_EMAIL(stripslashes($TO), COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM); - } - elseif ($HTML == "N") - { - // Problem found! - SEND_RAW_EMAIL(WEBMASTER, COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM); - } -} -// Check if legacy or PHPMailer command -// @private -function CHECK_PHPMAILER_USAGE() { - return (((defined('SMTP_HOSTNAME')) && (defined('SMTP_USER')) && (defined('SMTP_PASSWORD'))) || ((SMTP_HOSTNAME != "") && (SMTP_USER != ""))); -} +".htmlentities(trim($FROM))." +To : ".$TO." +Subject : ".$SUBJECT." +Message : ".$MSG." +\n"; + } + elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail", true))) + { + // Send mail as HTML away + SEND_HTML_EMAIL($TO, $SUBJECT, $MSG, $FROM); + } + elseif (!empty($TO)) + { + // Compile email + $TO = COMPILE_CODE($TO); + + // Send Mail away + SEND_RAW_EMAIL(stripslashes($TO), COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM); + } + elseif ($HTML == "N") + { + // Problem found! + SEND_RAW_EMAIL(WEBMASTER, COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM); + } +} +// Check if legacy or PHPMailer command +// @private +function CHECK_PHPMAILER_USAGE() { + return (((defined('SMTP_HOSTNAME')) && (defined('SMTP_USER')) && (defined('SMTP_PASSWORD'))) || ((SMTP_HOSTNAME != "") && (SMTP_USER != ""))); +} /* * Send out a raw email with PHPMailer class or legacy mail() command - */ -function SEND_RAW_EMAIL ($to, $subject, $msg, $from) { - // Shall we use PHPMailer class or legacy mode? - if (CHECK_PHPMAILER_USAGE()) { - // Use PHPMailer class with SMTP enabled - require_once(PATH."inc/phpmailer/class.phpmailer.php"); - require_once(PATH."inc/phpmailer/class.smtp.php"); - - // get new instance - $mail = new PHPMailer(); - - $mail->IsSMTP(); - $mail->SMTPAuth = true; - $mail->Host = SMTP_HOSTNAME; - $mail->Port = 25; - $mail->Username = SMTP_USER; - $mail->Password = SMTP_PASSWORD; - $mail->From = $from; - $mail->FromName = MAIN_TITLE; - $mail->Subject = $subject; - if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) { - $mail->Body = $msg; - $mail->AltBody = "Your mail program required HTML support to read this mail!"; - $mail->WordWrap = 70; - $mail->IsHTML(true); - } else { - $mail->Body = $msg; - } - $mail->AddAddress($to, ""); - $mail->AddReplyTo(WEBMASTER,MAIN_TITLE); - $mail->AddCustomHeader("Errors-To:".WEBMASTER); - $mail->AddCustomHeader("X-Loop:".WEBMASTER); - $mail->Send(); - } else { - // Use legacy mail() command - @mail($to, $subject, $msg, $from); - } -} -// + */ +function SEND_RAW_EMAIL ($to, $subject, $msg, $from) { + // Shall we use PHPMailer class or legacy mode? + if (CHECK_PHPMAILER_USAGE()) { + // Use PHPMailer class with SMTP enabled + require_once(PATH."inc/phpmailer/class.phpmailer.php"); + require_once(PATH."inc/phpmailer/class.smtp.php"); + + // get new instance + $mail = new PHPMailer(); + + $mail->IsSMTP(); + $mail->SMTPAuth = true; + $mail->Host = SMTP_HOSTNAME; + $mail->Port = 25; + $mail->Username = SMTP_USER; + $mail->Password = SMTP_PASSWORD; + $mail->From = $from; + $mail->FromName = MAIN_TITLE; + $mail->Subject = $subject; + if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) { + $mail->Body = $msg; + $mail->AltBody = "Your mail program required HTML support to read this mail!"; + $mail->WordWrap = 70; + $mail->IsHTML(true); + } else { + $mail->Body = $msg; + } + $mail->AddAddress($to, ""); + $mail->AddReplyTo(WEBMASTER,MAIN_TITLE); + $mail->AddCustomHeader("Errors-To:".WEBMASTER); + $mail->AddCustomHeader("X-Loop:".WEBMASTER); + $mail->Send(); + } else { + // Use legacy mail() command + @mail($to, $subject, $msg, $from); + } +} +// // Generate a password in a specified length or use default password length -function GEN_PASS($LEN = 0) { - global $CONFIG; - if ($LEN == 0) $LEN = $CONFIG['pass_len']; - - // Initialize array with all allowed chars - $ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/"); - - // Initialize randomizer - mt_srand((double) microtime() * 1000000); - - // Start creating password - $PASS = ""; - for ($i = 0; $i < $LEN; $i++) { - $PASS .= $ABC[mt_rand(0, sizeof($ABC) -1)]; - } - - // When the size is below 40 we can also add additional security by scrambling it - if (strlen($PASS) <= 40) { - // Also scramble the password - $PASS = scrambleString($PASS); - } - - // Return the password - return $PASS; -} -// -function MAKE_DATETIME($time, $mode="0") -{ - if ($time == 0) { - // Never happend - return NEVER_HAPPENED; - } else { - // Filter out numbers - $time = bigintval($time); - } - - switch (GET_LANGUAGE()) - { - case "de": // German date / time format - switch ($mode) - { - case "0": $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; - case "1": $ret = strtolower(date("d.m.Y - H:i", $time)); break; - case "2": $ret = date("d.m.Y|H:i", $time); break; - case "3": $ret = date("d.m.Y", $time); break; - } - 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; - } - } - return $ret; -} -// -function TRANSLATE_COMMA($dotted, $cut=true) -{ - global $CONFIG; - // Default is 3 you can change this in admin area "Misc -> Misc Options" - if (empty($CONFIG['max_comma'])) $CONFIG['max_comma'] = "3"; - if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); - if ($cut) - { - // Remove trailing zeros - $dot = str_replace(".", "x", $dotted); - while(substr($dot, -1, 1) == "0") - { - $dot = substr($dot, 0, -1); - } - if (substr($dot, -1, 1) == "x") - { - // Last char is the 'x' - $dotted = substr($dot, 0, -1); - } - else - { - // Last char is a number - $dotted = str_replace("x", ".", $dot); - } - } - switch (GET_LANGUAGE()) - { - case "de": - $pos = strpos($dotted, "."); - if ($pos > 0) - { - if ($cut) - { - // Cut x numbers behind comma - $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1))); - } - else - { - // Replace comma with dot - $dotted = str_replace(".", ",", $dotted); - } - } - elseif (!$cut) - { - if (empty($pos)) - { - $dotted = "0,".str_repeat("0", $CONFIG['max_comma']); - } - else - { - $dotted .= ",".str_repeat("0", $CONFIG['max_comma']); - } - } - break; - - default: - if (!$cut) - { - if ($pos > 0) - { - $dotted = substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1)); - } - else - { - $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); - } - } - break; - } - return $dotted; -} -// -function DEREFERER($URL) -{ - $URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(COMPILE_CODE($URL))); - return $URL; -} -// -function TRANSLATE_SEX($sex) -{ - switch ($sex) - { - case "M": $ret = SEX_M; break; - case "F": $ret = SEX_F; break; - case "C": $ret = SEX_C; break; - default : $ret = $sex; break; - } - return $ret; -} -// -function GET_POOL_TYPE($PT) -{ - switch ($PT) - { - case "TEMP" : $ret = POOL_TEMP; break; - case "SEND" : $ret = POOL_SEND; break; - case "NEW" : $ret = POOL_NEW; break; - case "ADMIN" : $ret = POOL_ADMIN; break; - case "ACTIVE" : $ret = POOL_ACTIVE; break; - case "DELETED": $ret = POOL_DELETED; break; - default : $ret = POOL_UNKNOWN." (".$PT.")"; break; - } - return $ret; -} -// -function FRAMETESTER($URL) -{ - global $_SERVER; - $URL = URL."/modules.php?module=frametester&url=".urlencode(base64_encode(COMPILE_CODE($URL))); - return $URL; -} -// -function SELECTION_COUNT($array) -{ - $ret = "0"; - if (is_array($array)) - { - foreach ($array as $key=>$sel) - { - if (!empty($sel)) $ret++; - } - } - return $ret; -} -// -function IMG_CODE ($code, $TYPE, $DATA, $uid) -{ - return "\"Code\""; -} -// -function TRANSLATE_STATUS($status) -{ - switch ($status) - { - case "UNCONFIRMED": - $ret = ACCOUNT_UNCONFIRMED; - break; - - case "CONFIRMED": - $ret = ACCOUNT_CONFIRMED; - break; - - case "LOCKED": - $ret = ACCOUNT_LOCKED; - break; - - default: - $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; - break; - } - return $ret; -} -// -function GET_LANGUAGE() -{ - global $_COOKIE, $_GET; - - if (!empty($_GET['mx_lang'])) - { - // Accept only first 2 chars - $lang = substr($_GET['mx_lang'], 0, 2); - } - else - { - // Do nothing - $lang = ""; - } - - // Set default return value to default language from config - $ret = DEFAULT_LANG; - - // Check GET variable and cookie - if (!empty($lang)) - { - // Check if main language file does exist - if (file_exists(PATH."inc/language/".$lang.".php")) - { - // Okay found, so let's update cookies - SET_LANGUAGE($lang); - } - } - elseif (!empty($_COOKIE['mx_lang'])) - { - // Return stored value from cookie - $ret = $_COOKIE['mx_lang']; - } - return $ret; -} -// -function SET_LANGUAGE($lang) -{ - global $CONFIG; - - // Accept only first 2 chars! - $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); - - // Set cookie - @setcookie("mx_lang", $lang, (time() + $CONFIG['online_timeout']), COOKIE_PATH); - - // Set array - $_COOKIE['mx_lang'] = $lang; -} -// -function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") -{ - global $DATA, $CONFIG, $REPLACER; - - // Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!) - $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER; - $surname = ""; $family = ""; $nick = ""; $sex = "N"; - - // Prepare IP number and User Agent - $REMOTE_ADDR = getenv('REMOTE_ADDR'); - $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); - - $ADMIN = MAIN_TITLE; - if (!empty($_COOKIE['admin_login'])) - { - // Load Admin data - $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", - array(SQL_ESCAPE($_COOKIE['admin_login'])), __FILE__, __LINE__); - list($ADMIN) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - - // Expiration in a nice output format - if ($CONFIG['auto_purge'] == 0) - { - // Will never expire! - $EXPIRATION = MAIL_WILL_NEVER_EXPIRE; - } - elseif (function_exists('CREATE_FANCY_TIME')) - { - // Create nice date string - $EXPIRATION = CREATE_FANCY_TIME($CONFIG['auto_purge']); - } - else - { - // Display days only - $EXPIRATION = round($CONFIG['auto_purge']/60/60/24)." "._DAYS; - } - switch ($template) - { - case "bonus-mail": // Load data for the bonus mail - $BONUSID = $DATA[0]; - $content = $DATA[2]; - $POINTS = TRANSLATE_COMMA($DATA[4]); - $TIME = $DATA[5]; - $TARGET_URL = $DATA[8]; - $CATEGORY = GET_CATEGORY($DATA[9]); - $DATA[10] = $UID; - - // Replace variables - foreach ($REPLACER as $key=>$value) - { - if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content); - } - break; - - case "order-admin": - case "order-member": - $BLOCKS = $CONFIG['max_send']; - $SUBJECT = $DATA[0]; - $content = $DATA[1]; - $PAYMENT = GET_PAYMENT($DATA[3]); - $TARGET_URL = $DATA[5]; - $CATEGORY = GET_CATEGORY($DATA[6]); - break; - - case "order-reject": - case "order-deleted": - case "order-accept": - $TARGET_URL = $DATA[0]; - $URL = $DATA[0]; - $SUBJECT = $DATA[1]; - break; - - case "new-pass": - $PASS = $DATA[0]; - $REMOTE = $DATA[1]; - break; - - case "confirm-member": - $POINTS = $CONFIG['points_register']; - break; - - case "confirm-referral": - $PERCENT = $DATA[0]; - $LEVEL = $DATA[1]; - $POINTS = $DATA[2]; - $REFID = $DATA[3]; - break; - - case "normal-mail": - $SEND_UID = $DATA[1]; - $CATEGORY = GET_CATEGORY($DATA[9]); - $TIME = GET_PAY_POINTS($DATA[5], "time"); - $TARGET_URL = $DATA[7]; - $POINTS = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment")); - // Warning! This ID has changed from 10 to 11! - $MAILID = $DATA[11]; - - // Replace variables - foreach ($REPLACER as $key=>$value) - { - if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content); - } - break; - - case "done-member": - case "done-admin": - $SEND_UID = $DATA[1]; - $CATEGORY = GET_CATEGORY($DATA[9]); - $TARGET_URL = $DATA[7]; - break; - - case "back-admin": - case "back-member": - $POINTS = TRANSLATE_COMMA($DATA[10]); - break; - - case "add-points": - $POINTS = $_POST['points']; - break; - - case "guest_request_confirm": - $HASH = $DATA[2]; - break; - } - - // Load user's data - if ($UID > 0) - { - if (EXT_IS_ACTIVE("nickname")) - { - // Load nickname - $result = SQL_QUERY_ESC("SELECT surname, family, sex, email, nickname FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", - array(bigintval($UID)), __FILE__, __LINE__); - list($surname, $family, $sex, $email, $nick) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - else - { - // Load normal data - $result = SQL_QUERY_ESC("SELECT surname, family, sex, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", - array(bigintval($UID)), __FILE__, __LINE__); - list($surname, $family, $sex, $email) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $nick = "---"; - } - } - else - { - // Neutral sex and email address is default - $sex = "N"; - $email = WEBMASTER; - } - - // Translate M to male or F to female - $salut = TRANSLATE_SEX($sex); - - // Store email for some functions in global data array - $DATA['email'] = $email; - - // Base directory - $BASE = PATH."templates/".GET_LANGUAGE()."/emails/"; - - // Check for admin/guest/member templates - if (strpos($template, "admin_") > -1) - { - // Admin template found - $file = $BASE."admin/".$template.".tpl"; - } - elseif (strpos($template, "guest_") > -1) - { - // Guest template found - $file = $BASE."guest/".$template.".tpl"; - } - elseif (strpos($template, "member_") > -1) - { - // Member template found - $file = $BASE."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 - $file = $BASE.$test."/".$template.".tpl"; - } - else - { - // No special filename - $file = $BASE.$template.".tpl"; - } - } - - // Does the special template exists? - if (!@file_exists($file)) - { - // Reset to default template - $file = $BASE.$template.".tpl"; - } - - // Now does the final template exists? - if ((@file_exists($file)) && (is_readable($file))) - { - // The local file does exists so we load it. :) - $tmpl_file = @implode("", @file($file)); - $tmpl_file = addslashes($tmpl_file); - - // Compile code - $tmpl_file = COMPILE_CODE($tmpl_file); - - // Run code - $tmpl_file = "\$content=\"".$tmpl_file."\";"; - eval($tmpl_file); - - // Replace HTML confirm chars - $content = html_entity_decode($content); - } - elseif (!empty($template)) - { - // Template file not found! +function GEN_PASS($LEN = 0) { + global $CONFIG; + if ($LEN == 0) $LEN = $CONFIG['pass_len']; + + // Initialize array with all allowed chars + $ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/"); + + // Initialize randomizer + mt_srand((double) microtime() * 1000000); + + // Start creating password + $PASS = ""; + for ($i = 0; $i < $LEN; $i++) { + $PASS .= $ABC[mt_rand(0, sizeof($ABC) -1)]; + } + + // When the size is below 40 we can also add additional security by scrambling it + if (strlen($PASS) <= 40) { + // Also scramble the password + $PASS = scrambleString($PASS); + } + + // Return the password + return $PASS; +} +// +function MAKE_DATETIME($time, $mode="0") +{ + if ($time == 0) { + // Never happend + return NEVER_HAPPENED; + } else { + // Filter out numbers + $time = bigintval($time); + } + + switch (GET_LANGUAGE()) + { + case "de": // German date / time format + switch ($mode) + { + case "0": $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; + case "1": $ret = strtolower(date("d.m.Y - H:i", $time)); break; + case "2": $ret = date("d.m.Y|H:i", $time); break; + case "3": $ret = date("d.m.Y", $time); break; + } + 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; + } + } + return $ret; +} +// +function TRANSLATE_COMMA($dotted, $cut=true) +{ + global $CONFIG; + // Default is 3 you can change this in admin area "Misc -> Misc Options" + if (empty($CONFIG['max_comma'])) $CONFIG['max_comma'] = "3"; + if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); + if ($cut) + { + // Remove trailing zeros + $dot = str_replace(".", "x", $dotted); + while(substr($dot, -1, 1) == "0") + { + $dot = substr($dot, 0, -1); + } + if (substr($dot, -1, 1) == "x") + { + // Last char is the 'x' + $dotted = substr($dot, 0, -1); + } + else + { + // Last char is a number + $dotted = str_replace("x", ".", $dot); + } + } + switch (GET_LANGUAGE()) + { + case "de": + $pos = strpos($dotted, "."); + if ($pos > 0) + { + if ($cut) + { + // Cut x numbers behind comma + $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1))); + } + else + { + // Replace comma with dot + $dotted = str_replace(".", ",", $dotted); + } + } + elseif (!$cut) + { + if (empty($pos)) + { + $dotted = "0,".str_repeat("0", $CONFIG['max_comma']); + } + else + { + $dotted .= ",".str_repeat("0", $CONFIG['max_comma']); + } + } + break; + + default: + if (!$cut) + { + if ($pos > 0) + { + $dotted = substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1)); + } + else + { + $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); + } + } + break; + } + return $dotted; +} +// +function DEREFERER($URL) +{ + $URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(COMPILE_CODE($URL))); + return $URL; +} +// +function TRANSLATE_SEX($sex) +{ + switch ($sex) + { + case "M": $ret = SEX_M; break; + case "F": $ret = SEX_F; break; + case "C": $ret = SEX_C; break; + default : $ret = $sex; break; + } + return $ret; +} +// +function GET_POOL_TYPE($PT) +{ + switch ($PT) + { + case "TEMP" : $ret = POOL_TEMP; break; + case "SEND" : $ret = POOL_SEND; break; + case "NEW" : $ret = POOL_NEW; break; + case "ADMIN" : $ret = POOL_ADMIN; break; + case "ACTIVE" : $ret = POOL_ACTIVE; break; + case "DELETED": $ret = POOL_DELETED; break; + default : $ret = POOL_UNKNOWN." (".$PT.")"; break; + } + return $ret; +} +// +function FRAMETESTER($URL) +{ + global $_SERVER; + $URL = URL."/modules.php?module=frametester&url=".urlencode(base64_encode(COMPILE_CODE($URL))); + return $URL; +} +// +function SELECTION_COUNT($array) +{ + $ret = "0"; + if (is_array($array)) + { + foreach ($array as $key=>$sel) + { + if (!empty($sel)) $ret++; + } + } + return $ret; +} +// +function IMG_CODE ($code, $TYPE, $DATA, $uid) +{ + return "\"Code\""; +} +// +function TRANSLATE_STATUS($status) +{ + switch ($status) + { + case "UNCONFIRMED": + $ret = ACCOUNT_UNCONFIRMED; + break; + + case "CONFIRMED": + $ret = ACCOUNT_CONFIRMED; + break; + + case "LOCKED": + $ret = ACCOUNT_LOCKED; + break; + + default: + $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; + break; + } + return $ret; +} +// +function GET_LANGUAGE() +{ + global $_COOKIE, $_GET; + + if (!empty($_GET['mx_lang'])) + { + // Accept only first 2 chars + $lang = substr($_GET['mx_lang'], 0, 2); + } + else + { + // Do nothing + $lang = ""; + } + + // Set default return value to default language from config + $ret = DEFAULT_LANG; + + // Check GET variable and cookie + if (!empty($lang)) + { + // Check if main language file does exist + if (file_exists(PATH."inc/language/".$lang.".php")) + { + // Okay found, so let's update cookies + SET_LANGUAGE($lang); + } + } + elseif (!empty($_COOKIE['mx_lang'])) + { + // Return stored value from cookie + $ret = $_COOKIE['mx_lang']; + } + return $ret; +} +// +function SET_LANGUAGE($lang) +{ + global $CONFIG; + + // Accept only first 2 chars! + $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); + + // Set cookie + @setcookie("mx_lang", $lang, (time() + $CONFIG['online_timeout']), COOKIE_PATH); + + // Set array + $_COOKIE['mx_lang'] = $lang; +} +// +function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") +{ + global $DATA, $CONFIG, $REPLACER; + + // Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!) + $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER; + $surname = ""; $family = ""; $nick = ""; $sex = "N"; + + // Prepare IP number and User Agent + $REMOTE_ADDR = getenv('REMOTE_ADDR'); + $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); + + $ADMIN = MAIN_TITLE; + if (!empty($_COOKIE['admin_login'])) + { + // Load Admin data + $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", + array(SQL_ESCAPE($_COOKIE['admin_login'])), __FILE__, __LINE__); + list($ADMIN) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + } + + // Expiration in a nice output format + if ($CONFIG['auto_purge'] == 0) + { + // Will never expire! + $EXPIRATION = MAIL_WILL_NEVER_EXPIRE; + } + elseif (function_exists('CREATE_FANCY_TIME')) + { + // Create nice date string + $EXPIRATION = CREATE_FANCY_TIME($CONFIG['auto_purge']); + } + else + { + // Display days only + $EXPIRATION = round($CONFIG['auto_purge']/60/60/24)." "._DAYS; + } + switch ($template) + { + case "bonus-mail": // Load data for the bonus mail + $BONUSID = $DATA[0]; + $content = $DATA[2]; + $POINTS = TRANSLATE_COMMA($DATA[4]); + $TIME = $DATA[5]; + $TARGET_URL = $DATA[8]; + $CATEGORY = GET_CATEGORY($DATA[9]); + $DATA[10] = $UID; + + // Replace variables + foreach ($REPLACER as $key=>$value) + { + if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content); + } + break; + + case "order-admin": + case "order-member": + $BLOCKS = $CONFIG['max_send']; + $SUBJECT = $DATA[0]; + $content = $DATA[1]; + $PAYMENT = GET_PAYMENT($DATA[3]); + $TARGET_URL = $DATA[5]; + $CATEGORY = GET_CATEGORY($DATA[6]); + break; + + case "order-reject": + case "order-deleted": + case "order-accept": + $TARGET_URL = $DATA[0]; + $URL = $DATA[0]; + $SUBJECT = $DATA[1]; + break; + + case "new-pass": + $PASS = $DATA[0]; + $REMOTE = $DATA[1]; + break; + + case "confirm-member": + $POINTS = $CONFIG['points_register']; + break; + + case "confirm-referral": + $PERCENT = $DATA[0]; + $LEVEL = $DATA[1]; + $POINTS = $DATA[2]; + $REFID = $DATA[3]; + break; + + case "normal-mail": + $SEND_UID = $DATA[1]; + $CATEGORY = GET_CATEGORY($DATA[9]); + $TIME = GET_PAY_POINTS($DATA[5], "time"); + $TARGET_URL = $DATA[7]; + $POINTS = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment")); + // Warning! This ID has changed from 10 to 11! + $MAILID = $DATA[11]; + + // Replace variables + foreach ($REPLACER as $key=>$value) + { + if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content); + } + break; + + case "done-member": + case "done-admin": + $SEND_UID = $DATA[1]; + $CATEGORY = GET_CATEGORY($DATA[9]); + $TARGET_URL = $DATA[7]; + break; + + case "back-admin": + case "back-member": + $POINTS = TRANSLATE_COMMA($DATA[10]); + break; + + case "add-points": + $POINTS = $_POST['points']; + break; + + case "guest_request_confirm": + $HASH = $DATA[2]; + break; + } + + // Load user's data + if ($UID > 0) + { + if (EXT_IS_ACTIVE("nickname")) + { + // Load nickname + $result = SQL_QUERY_ESC("SELECT surname, family, sex, email, nickname FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array(bigintval($UID)), __FILE__, __LINE__); + list($surname, $family, $sex, $email, $nick) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + } + else + { + // Load normal data + $result = SQL_QUERY_ESC("SELECT surname, family, sex, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array(bigintval($UID)), __FILE__, __LINE__); + list($surname, $family, $sex, $email) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + $nick = "---"; + } + } + else + { + // Neutral sex and email address is default + $sex = "N"; + $email = WEBMASTER; + } + + // Translate M to male or F to female + $salut = TRANSLATE_SEX($sex); + + // Store email for some functions in global data array + $DATA['email'] = $email; + + // Base directory + $BASE = PATH."templates/".GET_LANGUAGE()."/emails/"; + + // Check for admin/guest/member templates + if (strpos($template, "admin_") > -1) + { + // Admin template found + $file = $BASE."admin/".$template.".tpl"; + } + elseif (strpos($template, "guest_") > -1) + { + // Guest template found + $file = $BASE."guest/".$template.".tpl"; + } + elseif (strpos($template, "member_") > -1) + { + // Member template found + $file = $BASE."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 + $file = $BASE.$test."/".$template.".tpl"; + } + else + { + // No special filename + $file = $BASE.$template.".tpl"; + } + } + + // Does the special template exists? + if (!@file_exists($file)) + { + // Reset to default template + $file = $BASE.$template.".tpl"; + } + + // Now does the final template exists? + if ((@file_exists($file)) && (is_readable($file))) + { + // The local file does exists so we load it. :) + $tmpl_file = @implode("", @file($file)); + $tmpl_file = addslashes($tmpl_file); + + // Compile code + $tmpl_file = COMPILE_CODE($tmpl_file); + + // Run code + $tmpl_file = "\$content=\"".$tmpl_file."\";"; + eval($tmpl_file); + + // Replace HTML confirm chars + $content = html_entity_decode($content); + } + elseif (!empty($template)) + { + // Template file not found! $content = TEMPLATE_404.": ".$template."
".TEMPLATE_CONTENT."
".print_r($content, true)."
".TEMPLATE_DATA."
".print_r($DATA, true)."
-

"; +

"; // Debug mode not active? Then remove the HTML tags if (!DEBUG_MODE) $content = strip_tags($content); - } - else - { - // No template name supplied! - $content = NO_TEMPLATE_SUPPLIED; - } - return COMPILE_CODE($content); -} -// -function MAKE_TIME($H, $M, $S, $stamp) -{ - // Extract day, month and year from given timestamp - $DAY = date("d", $stamp); - $MONTH = date("m", $stamp); - $YEAR = date("Y", $stamp); - - // Create timestamp for wished time which depends on extracted date - return mktime($H, $M, $S, $MONTH, $DAY, $YEAR); -} -// -function LOAD_URL($URL) { - // Add some data to URL if cookies are not accepted - if ((!defined('__COOKIES')) || (!__COOKIES)) $URL = ADD_URL_DATA($URL); - - // Probe for bot from search engine - if ((eregi("spider", getenv('HTTP_USER_AGENT'))) || (eregi("bot", getenv('HTTP_USER_AGENT'))) || (eregi("spider", getenv('HTTP_USER_AGENT')))) { - // Search engine bot detected so let's rewrite many chars for the link - $URL = htmlentities(strip_tags($URL), ENT_QUOTES); - - // Output new location link as anchor - OUTPUT_HTML ("".$URL."\n"); - } elseif (!headers_sent()) { - // Load URL when headers are not sent - @header ("Location: ".str_replace("&", "&", $URL)); - } else { - // Output error message - include(PATH."inc/header.php"); - OUTPUT_HTML (LOAD_URL_ERROR_1.$URL.LOAD_URL_ERROR_2); - include(PATH."inc/footer.php"); - } - exit(); -} -// -function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) { - global $SEC_CHARS, $URL_CHARS; - $ARRAY = $SEC_CHARS; - - // Select smaller set of chars to replace when we e.g. want to compile URLs - if (!$full) $ARRAY = $URL_CHARS; - - // Compile constants - if ($constants) { - // BEFORE 0.2.1 : Language and data constants - // WITH 0.2.1+ : Only language constants - $code = str_replace("{--", '".', str_replace("--}", '."', $code)); - - // BEFORE 0.2.1 : Not used - // WITH 0.2.1+ : Data constants - $code = str_replace("{!", '".', str_replace("!}", '."', $code)); - } - - // Compile QUOT and other non-HTML codes - foreach ($ARRAY['to'] as $k => $to) { - // Do the reversed thing as in inc/libs/security_functions.php - $code = str_replace($to, $ARRAY['from'][$k], $code); - } - - // But shall I keep simple quotes for later use? - if ($simple) $code = str_replace("\'", "{QUOT}", $code); - - // Find $content[bla][blub] entries - @preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); - - // Are some matches found? - if ((count($matches) > 0) && (count($matches[0]) > 0)) { - // Replace all matches - $matchesFound = array(); - foreach ($matches[0] as $key=>$match) { - // Avoid replacing matches multiple times - if (!isset($matchesFound[$match])) { - // Not yet replaced! - $code = str_replace($match, "\".".$match.".\"", $code); - $matchesFound[$match] = 1; - } - - // Take all string elements - if (("".bigintval($matches[4][$key])."" != $matches[4][$key]) && (!isset($matchesFound[$key."_".$matches[4][$key]]))) { - // Replace it in the code - $code = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $code); - $matchesFound[$key."_".$matches[4][$key]] = 1; - } - } - } - - // Return compiled code - return $code; -} -// -/************************************************************************ - * * - * Gaenderter Sortier-Algorythmus, $array wird nach dem Array (!) * - * $a_sort sortiert: * - * * - * $array - Das 3-dimensionale Array, das paralell sortiert werden soll * - * $a_sort - Array, das die Sortiereihenfolge der ersten Elementeben * - * $primary_key - Prim.rschl.ssel aus $a_sort, nach dem sortiert wird * - * $order - Sortiereihenfolge: -1 = A-Z, 0 = keine, 1 = Z-A * - * $nums - true = Als Zahlen sortieren, false = Als Zeichen sortieren * - * * - * $a_sort muss Elemente enthalten, deren Wert Schluessel von $array * - * sind... Klingt kompliziert, suchen Sie mal mein Beispiel, dann sehen * - * Sie, dass es doch nicht so schwer ist! :-) * - * * - ************************************************************************/ -function array_pk_sort(&$array, $a_sort, $primary_key = 0, $order = -1, $nums = false) -{ - $dummy = $array; - while ($primary_key < count($a_sort)) - { - foreach ($dummy[$a_sort[$primary_key]] as $key=>$value) - { - foreach ($dummy[$a_sort[$primary_key]] as $key2=>$value2) - { - $match = false; - if (!$nums) - { - // 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) - { - // Sort numbers (E.g.: 9 < 10) - if (($dummy[$a_sort[$primary_key]][$key] < $dummy[$a_sort[$primary_key]][$key2]) && ($order == -1)) $match = true; - if (($dummy[$a_sort[$primary_key]][$key] > $dummy[$a_sort[$primary_key]][$key2]) && ($order == 1)) $match = true; - } - if ($match) - { - // We have found two different values, so let's sort whole array - foreach ($dummy as $sort_key=>$sort_val) - { - $t = $dummy[$sort_key][$key]; - $dummy[$sort_key][$key] = $dummy[$sort_key][$key2]; - $dummy[$sort_key][$key2] = $t; - unset($t); - } - } - } - } - - // Count one up - $primary_key++; - } - - // Write back sorted array - $array = $dummy; -} -// -function ADD_SELECTION($TYPE, $DEFAULT, $PREFIX="", $id="0") -{ - global $MONTH_DESCR; $OUT = ""; - if ($TYPE == "yn") - { - // This is a yes/no selection only! - if ($id > 0) $PREFIX .= "[".$id."]"; - $OUT .= " \n"; - } - switch ($TYPE) - { - case "day": // Day - for ($idx = 1; $idx < 32; $idx++) - { - $OUT .= " \n"; - } - } - else - { - // Get current year and subtract 16 (for erotic content) - $OUT .= " \n"; - $YEAR = date("Y", time()) - 16; - for ($idx = 1930; $idx <= $YEAR; $idx++) - { - $OUT .= " \n"; + } + } + else + { + // Get current year and subtract 16 (for erotic content) + $OUT .= " \n"; + $YEAR = date("Y", time()) - 16; + for ($idx = 1930; $idx <= $YEAR; $idx++) + { + $OUT .= " \n"; - } - return $OUT; -} - -// -?> +{--ORDER_SELECT_COLUMN_".strtoupper($item)."--}\n"; + } + return $OUT; +} + +// +?> diff --git a/0.2.1/inc/libs/output_functions.php b/0.2.1/inc/libs/output_functions.php index df27137a66..efa5bc7304 100644 --- a/0.2.1/inc/libs/output_functions.php +++ b/0.2.1/inc/libs/output_functions.php @@ -1,177 +1,177 @@ -$from) - { - // Do the reversed thing as in inc/libs/security_functions.php - $code = str_replace($from, $SEC_CHARS['from'][$k], $code); - } - - // But keep simple quotes for later use - if ($simple) $code = str_replace("'", "{QUOT}", $code); - - // Return compiled code - return $code; -} -// Load a template file and return it's content (only it's name; do not use ' or ") -function get_template ($template, $return=false, $content="") -{ - // Add more variables which you want to use in your template files - global $DATA, $ACTION, $WHAT; - $REFID = bigintval($_COOKIE['refid']); - - if ($template == "member_support_form") - { - // Support request of a member - $ID = bigintval($_COOKIE['userid']); - $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($ID), __FILE__, __LINE__); - list($sex, $surname, $family) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $salut = TRANSLATE_SEX($sex); - } - - // Base directory - $BASE = PATH."templates/".GET_LANGUAGE()."/html/"; - $MODE = ""; - - // Check for admin/guest/member templates - if (strpos($template, "admin_") > -1) - { - // Admin template found - $MODE = "admin/"; - } - elseif (strpos($template, "guest_") > -1) - { - // Guest template found - $MODE = "guest/"; - } - elseif (strpos($template, "member_") > -1) - { - // Member template found - $MODE = "member/"; - } - elseif (strpos($template, "install_") > -1) - { - // Installation template found - $MODE = "install/"; - } - elseif (strpos($template, "mailid_") > -1) - { - // Mail confirmation template found - $MODE = "mailid/"; - } - - // Generate file name - $file = $BASE.$MODE.$template.".tpl"; - if ((!empty($HTTP_GET_VARS['what'])) && ((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 = $BASE.$MODE.$template."_".$HTTP_GET_VARS['what'].".tpl"; - - // Probe for it... - if (file_exists($file2)) $file = $file2; - - // Remove variable from memory - unset($file2); - } - - // Does the special template exists? - if (!file_exists($file)) - { - // Reset to default template - $file = PATH."templates/".GET_LANGUAGE()."/html/".$template.".tpl"; - } - - // Now does the final template exists? - if (file_exists($file)) - { - // The local file does exists so we load it. :) - $tmpl_file = implode("", file($file)); - $tmpl_file = str_replace("'", "{QUOT}", $tmpl_file); - - // Compile and run code - $ret = COMPILE_CODE(addslashes($tmpl_file), false, true); - $ret = "\n".$ret."\n"; - } - elseif (IS_ADMIN()) - { - // Only admins shall see this warning - $ret = "
".TEMPLATE_404."
-(".basename($file).") -

"; - } - if ($return) - { - // Return the HTML code - return $ret; - } - else - { - // Output directly - $this->add_html ($ret); - } -} - - // END OF CLASS -} -// -?> +$from) + { + // Do the reversed thing as in inc/libs/security_functions.php + $code = str_replace($from, $SEC_CHARS['from'][$k], $code); + } + + // But keep simple quotes for later use + if ($simple) $code = str_replace("'", "{QUOT}", $code); + + // Return compiled code + return $code; +} +// Load a template file and return it's content (only it's name; do not use ' or ") +function get_template ($template, $return=false, $content="") +{ + // Add more variables which you want to use in your template files + global $DATA, $ACTION, $WHAT; + $REFID = bigintval($_COOKIE['refid']); + + if ($template == "member_support_form") + { + // Support request of a member + $ID = bigintval($_COOKIE['userid']); + $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($ID), __FILE__, __LINE__); + list($sex, $surname, $family) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + $salut = TRANSLATE_SEX($sex); + } + + // Base directory + $BASE = PATH."templates/".GET_LANGUAGE()."/html/"; + $MODE = ""; + + // Check for admin/guest/member templates + if (strpos($template, "admin_") > -1) + { + // Admin template found + $MODE = "admin/"; + } + elseif (strpos($template, "guest_") > -1) + { + // Guest template found + $MODE = "guest/"; + } + elseif (strpos($template, "member_") > -1) + { + // Member template found + $MODE = "member/"; + } + elseif (strpos($template, "install_") > -1) + { + // Installation template found + $MODE = "install/"; + } + elseif (strpos($template, "mailid_") > -1) + { + // Mail confirmation template found + $MODE = "mailid/"; + } + + // Generate file name + $file = $BASE.$MODE.$template.".tpl"; + if ((!empty($HTTP_GET_VARS['what'])) && ((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 = $BASE.$MODE.$template."_".$HTTP_GET_VARS['what'].".tpl"; + + // Probe for it... + if (file_exists($file2)) $file = $file2; + + // Remove variable from memory + unset($file2); + } + + // Does the special template exists? + if (!file_exists($file)) + { + // Reset to default template + $file = PATH."templates/".GET_LANGUAGE()."/html/".$template.".tpl"; + } + + // Now does the final template exists? + if (file_exists($file)) + { + // The local file does exists so we load it. :) + $tmpl_file = implode("", file($file)); + $tmpl_file = str_replace("'", "{QUOT}", $tmpl_file); + + // Compile and run code + $ret = COMPILE_CODE(addslashes($tmpl_file), false, true); + $ret = "\n".$ret."\n"; + } + elseif (IS_ADMIN()) + { + // Only admins shall see this warning + $ret = "
".TEMPLATE_404."
+(".basename($file).") +

"; + } + if ($return) + { + // Return the HTML code + return $ret; + } + else + { + // Output directly + $this->add_html ($ret); + } +} + + // END OF CLASS +} +// +?> diff --git a/0.2.1/inc/libs/payout_functions.php b/0.2.1/inc/libs/payout_functions.php index 7ee40e59da..bc6036e6cf 100644 --- a/0.2.1/inc/libs/payout_functions.php +++ b/0.2.1/inc/libs/payout_functions.php @@ -1,86 +1,86 @@ - 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), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - OUTPUT_HTML ("
-
".PAYOUT_NOW.":

-
    "); - // Now let's check - while (list($id, $type, $rate, $mpoi) = SQL_FETCHROW($result)) - { - $type = COMPILE_CODE($type); - if ($POINTS >= $mpoi) - { - // Ok we found one - $P = $POINTS * $rate - 0.5; - OUTPUT_HTML ("
  • ".PAYOUT_IN.": ".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")
  • "); - } - } - - // Free memory - SQL_FREERESULT($result); - OUTPUT_HTML ("
"); - } - else - { - // No payout types setup so far - OUTPUT_HTML ("

".PAYOUT_NO_PAYOUT_TYPES."

"); - } - } - else - { - // Points is empty - OUTPUT_HTML ("

".PAYOUT_NO_POINTS_ENTERED."

"); - } -} -// -?> + 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), __FILE__, __LINE__); + if (SQL_NUMROWS($result) > 0) + { + OUTPUT_HTML ("
+
".PAYOUT_NOW.":

+
    "); + // Now let's check + while (list($id, $type, $rate, $mpoi) = SQL_FETCHROW($result)) + { + $type = COMPILE_CODE($type); + if ($POINTS >= $mpoi) + { + // Ok we found one + $P = $POINTS * $rate - 0.5; + OUTPUT_HTML ("
  • ".PAYOUT_IN.": ".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")
  • "); + } + } + + // Free memory + SQL_FREERESULT($result); + OUTPUT_HTML ("
"); + } + else + { + // No payout types setup so far + OUTPUT_HTML ("

".PAYOUT_NO_PAYOUT_TYPES."

"); + } + } + else + { + // Points is empty + OUTPUT_HTML ("

".PAYOUT_NO_POINTS_ENTERED."

"); + } +} +// +?> diff --git a/0.2.1/inc/libs/rallye_functions.php b/0.2.1/inc/libs/rallye_functions.php index 5beddb3cad..e55876b3ee 100644 --- a/0.2.1/inc/libs/rallye_functions.php +++ b/0.2.1/inc/libs/rallye_functions.php @@ -1,842 +1,842 @@ - 0 AND d.mails_confirmed >= %s AND p.ref_depth='1' AND p.points > 0 AND d.userid=%d", - array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); - list($cpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($cpoints)) $cpoints = "0.00000"; - - // Add info line - $result_ref = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points) -VALUES ('%s', '%s', '%s', '%s')", - array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__); - $un = true; - } - - // Ignored but for the template required refs (made before start of rallye) - $DATA['refs'] = $cnt; - - // Shall I notify this member? - if (($notify == "Y") && ($un)) - { - // Load email template and send it to the user - $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", $prices, $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); - } - } - - // Send email to admin - $templ = "admin_rallye_no_notify"; - if ($notify == "Y") $templ = "admin_rallye_notify"; - if (GET_EXT_VERSION("admins") < "0.4.1") - { - // Use old method to send out - $msg = LOAD_EMAIL_TEMPLATE($templ, $prices, 0); - SEND_ADMIN_EMAILS(RALLYE_ADMIN_NOTIFY.$title, $msg); - } - else - { - // Use new system to send out - SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_NOTIFY.$title, $templ, $prices, "0"); - } - - // Free memory - SQL_FREERESULT($result_user); -} -// -function RALLYE_ADD_PRICES($rallye,$mode="email") -{ - // Output mode - switch($mode) - { - case "email": $mode = "\n"; break; - case "html" : $mode = "
\n"; break; - } - - // Load prices - $result_prices = SQL_QUERY("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__); - if (SQL_NUMROWS($result_prices) > 0) - { - // Load prices - if ($mode == "\n") $prices = RALLYE_MEMBER_PRICES_ADDED.":".$mode."------------------------------".$mode; - $prices = ""; - while (list($level, $points, $info) = SQL_FETCHROW($result_prices)) - { - $prices .= $level.RALLYE_PRICE.": "; - if (!empty($info)) - { - $prices .= $info; - } - else - { - $prices .= $points." ".POINTS; - } - $prices .= "".$mode; - } - - // Free memory - SQL_FREERESULT($result_prices); - } - else - { - // No prices??? - $prices = RALLYE_MEMBER_NO_PRICES.$mode; - } - // Add last line for email mode - if ($mode == "\n") $prices .= "------------------------------"; - - // Return price list - return $prices; -} -// -function RALLYE_ADD_TOPUSERS($rallye,$default=0) -{ - global $CONFIG; - $since = (time() - $CONFIG['ap_in_since']); - - // First check how many prices are set - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - $prices = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - // And load only limited users - $result = SQL_QUERY_ESC("SELECT DISTINCT u.userid, u.refs, u.curr_points FROM "._MYSQL_PREFIX."_rallye_users AS u -LEFT JOIN "._MYSQL_PREFIX."_refsystem AS r -ON u.userid=r.userid -WHERE u.rallye_id=%d AND r.counter > 0 ORDER BY u.refs DESC", - array(bigintval($rallye)), __FILE__, __LINE__); - - // Load users - $DATA = array( - 'uid' => array(), - 'ref' => array(), - 'cpoints' => array() - ); - - while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result)) - { - // Get current refs - $cnt = RALLYE_GET_REFCOUNT($uid, $refs); - - // Points of ref's - $result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN "._MYSQL_PREFIX."_user_data AS d -ON p.userid=d.userid -WHERE d.userid=%d AND d.status='CONFIRMED' AND p.ref_depth='1' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= %s -LIMIT 1", array(bigintval($uid), $CONFIG['ref_payout'], $since), __FILE__, __LINE__); - list($refpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($refpoints)) $refpoints = "0"; - - // And subtract start refs - $cnt -= $refs; - - $_uid = "---"; - // List only users with at least one ref! - if (($cnt > 0) && ($refpoints > $cpoints)) { $_uid = $uid; } else { $cnt = ""; } - - // Save values to array - $DATA['uid'][] = $_uid; - $DATA['ref'][] = $cnt; - $DATA['cpoints'][] = $cpoints; - } - - // Free memory - SQL_FREERESULT($result); - - // Sort whole array - array_pk_sort($DATA, array("ref", "cpoints"), 0, 1, true); - - // Generate table - $OUT = LOAD_TEMPLATE("guest_rallye_header", true); - $SW = 2; - for ($idx = 0; $idx < $prices; $idx++) - { - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; - if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = "---"; - // Add row - $OUT .= " -   ".($idx+1).". - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " -\n"; - $SW = 3 - $SW; - } - // Add footer - $OUT .= LOAD_TEMPLATE("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) -{ - global $DATA; - // Check for an auto-add rallye - $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify FROM "._MYSQL_PREFIX."_rallye_data WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Load data - list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Check if line is already included... - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%d AND userid=%d LIMIT 1", - array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 0) - { - // Add userid and his ref count to table - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs) -VALUES ('%s', '%s', '0')", - array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); - } - else - { - // Free memory - SQL_FREERESULT($result); - } - - if ($notify == "Y") - { - // Transfer all neccessary data to the global $DATA array - $DATA['start'] = MAKE_DATETIME($start, "2"); - $DATA['end'] = MAKE_DATETIME($end , "2"); - $DATA['now_t'] = MAKE_DATETIME(time(), "2"); - $DATA['title'] = $title; - $DATA['id'] = $id; // ID for the rallye details link - $DATA['ref'] = "0"; - - // Load prices - $prices = RALLYE_ADD_PRICES($id); - - // Send notification to member - $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", $prices, $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); - } - } -} -// -function RALLYE_EXPIRE_RALLYES($result) -{ - global $DATA, $CONFIG; - - // Latest online time - $since = (time() - $CONFIG['ap_in_since']); - - // Load rallye data - list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Load users array (!) with assigned prices - $prices = RALLYE_LOAD_USERS_ARRAY($id); - - // Init array - $DATA = array(); $cnt = 0; - $users = array(); - $DATA['title'] = $title; - $DATA['start'] = MAKE_DATETIME($start, "1"); - $DATA['end'] = MAKE_DATETIME($end , "1"); - $DATA['now_t'] = MAKE_DATETIME(time(), "1"); - - // Just count... - $TOTAL = 0; - foreach($prices['uid'] as $key=>$uid) - { - // 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 -WHERE userid=%d AND status='CONFIRMED' AND last_online >= %s -LIMIT 1", array(bigintval($uid), $since), __FILE__, __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)) - { - $TOTAL++; - } - } - - if (($TOTAL < $min_prices) || ($TOTAL == 0)) - { - // Do not end this rallye! - return; - } - - // Expire rallye - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - - // Run array through (by uid is the most important 2nd-level-array) - foreach($prices['uid'] as $key=>$uid) - { - // 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)) - { - // Transfer data to array for the mail template - $DATA['level'] = $prices['level'][$key]; - $DATA['points'] = $prices['points'][$key]; - $DATA['info'] = $prices['info'][$key]; - $DATA['ref'] = $prices['ref'][$key]; - - if ($DATA['points'] > 0) - { - // Add points directly to user's account - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth='0' LIMIT 1", - array($DATA['points'], bigintval($uid)), __FILE__, __LINE__); - - // Update mediadata as well - if (GET_EXT_VERSION("mediadata") >= "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $DATA['points']); - } - } - - if ($notify == "Y") - { - // Prepare infos for the mail template - if (!empty($DATA['info'])) - { - // Take direct infos - $DATA['infos'] = $DATA['info']; - } - else - { - // Take points - $DATA['infos'] = $DATA['points']." ".POINTS; - } - - // Add suffix to template name - $template = "member_rallye_expired"; - if ($DATA['level'] == 1) - { - // The winner! - $template .= "_gold"; - } - elseif ($DATA['level'] == 2) - { - // The vice winner! - $template .= "_silver"; - } - elseif ($DATA['level'] == 3) - { - // The bronce winner - $template .= "_bronce"; - } - - // Load template - $msg = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_EXPIRED.": ".$DATA['level']." "._RALLYE_PRICE, $msg); - } - - // Count userid - $cnt++; - $users['uid'][$uid] = $uid; - $users['poi'][$uid] = $DATA['infos']; - } - } - - // Select template depending on notfication is switch on / off - if ($notify == "Y") - { - $templ = "admin_rallye_expired"; - } - elseif (is_array($users['uid'])) - { - $templ = "admin_rallye_expired_no"; - $cnt = RALLYE_LOAD_USER_DATA($users); - } - - // Send mail to admin - if (GET_EXT_VERSION("admins") < "0.4.1") - { - // Use old method to send out - $msg = LOAD_EMAIL_TEMPLATE($templ, $cnt, 0); - SEND_ADMIN_EMAILS(RALLYE_ADMIN_EXPIRED.": ".$title, $msg); - } - else - { - // Use new system to send out - SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0); - } - - // Add task - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) -VALUES ('NEW', 'RALLYE_EXPIRED', '".RALLYE_ADMIN_EXPIRED.": %s', '".RALLYE_ADMIN_EXPIRED_TEXT."', UNIX_TIMESTAMP())", - array($title), __FILE__, __LINE__); - - // All work done here... -} -// -function RALLYE_LOAD_USER_DATA($uids_array) -{ - // Implode user ids - $uid_string = implode(",", $uids_array['uid']); - - // Load users - $result = SQL_QUERY_ESC("SELECT userid, sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s", - array($uid_string, count($uids_array)), __FILE__, __LINE__); - $ret = ""; - while (list($u, $sex, $surname, $family, $email) = SQL_FETCHROW($result)) - { - $ret .= TRANSLATE_SEX($sex)." ".$surname." ".$family." (".$email.") - ".$uids_array['poi'][$u]."\n"; - } - - // Return result - return substr($ret, 0, -1); -} -// -function RALLYE_LOAD_PRICES_ARRAY($rallye) -{ - // Init multi array - $prices = array( - 'level' => array(), - 'points' => array(), - 'info' => array() - ); - - // Load prices - $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - while(list($level, $points, $info) = SQL_FETCHROW($result)) - { - $prices['level'][] = $level; - $prices['points'][] = $points; - $prices['info'][] = $info; - } - - // Free memory - SQL_FREERESULT($result); - - // Return array - return $prices; -} -// -function RALLYE_LOAD_USERS_ARRAY($rallye) -{ - global $CONFIG; - - // Fix zero points to 0.00000 - if ($CONFIG['ref_payout'] == "0") $CONFIG['ref_payout'] = "0.00000"; - - // Init multi array - $users = array( - 'uid' => 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=%d ORDER BY userid", - array(bigintval($rallye)), __FILE__, __LINE__); - while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result_user)) - { - // Load current ref count - $cnt = RALLYE_GET_REFCOUNT($uid, $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=%d", - array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); - list($refpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($refpoints)) $refpoints = "0"; - - // Store calculated new refs to array - $users['uid'][] = $uid; - $users['ref'][] = abs($cnt - $refs); - $users['cpoints'][] = $refpoints - $cpoints; - } - - // Free memory - SQL_FREERESULT($result_user); - - // Sort array for refs (descending) - array_pk_sort($users, array("ref", "cpoints"), 0, 1, true); - - // Load prices array (!) - $prices = RALLYE_LOAD_PRICES_ARRAY($rallye); - - // Merge users into prices - foreach ($prices['level'] as $k=>$lvl) - { - $prices['uid'][$k] = $users['uid'][$k]; - if (empty($prices['uid'][$k])) $prices['uid'][$k] = "---"; - $prices['ref'][$k] = $users['ref'][$k]; - if (empty($prices['ref'][$k])) $prices['ref'][$k] = "---"; - $prices['cpoints'][$k] = $users['cpoints'][$k]; - } - - // Return completed array - return $prices; -} -// -function RALLYE_LIST_WINNERS($rallye,$default=0) -{ - // First check how many prices are set - $result_prices = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - $prices = SQL_NUMROWS($result_prices); - SQL_FREERESULT($result_prices); - - // Load data - $DATA = RALLYE_LOAD_USERS_ARRAY($rallye); - - // Generate table - $OUT = LOAD_TEMPLATE("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 - $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d AND status='CONFIRMED' LIMIT 1", - array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__); - list($active) = SQL_FETCHROW($result_active); - SQL_FREERESULT($result_active); - - if (empty($DATA['uid'][$idx])) $DATA['uid'][$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] = "---"; - } - if (!empty($DATA['info'][$idx])) - { - // Take direct infos - $DATA['infos'][$idx] = $DATA['info'][$idx]; - } - else - { - // Take ppints - $DATA['infos'][$idx] = $DATA['points'][$idx]." ".POINTS; - } - - // Add row - $ADD = ""; - $OUT .= " -   ".($idx+1).". - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['infos'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " -\n"; - $SW = 3 - $SW; - } - // Add footer - $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true); - - // And finnally return the output - return $OUT; -} -// -function RALLYE_DELETE_EXPIRED_RALLYES() -{ - global $DATA, $CONFIG; - // Check for expired rallyes - $EXPIRE = time() - ONE_DAY * 3; // The hard-coded value... - $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time FROM "._MYSQL_PREFIX."_rallye_data WHERE end_time <= %s AND expired='Y'", - array($EXPIRE), __FILE__, __LINE__); - - if (SQL_NUMROWS($result_rallye) > 0) - { - // Expire found rallyes and notify admin - while(list($id, $title, $start, $end) = SQL_FETCHROW($result_rallye)) - { - // Prepare data for mail template - $DATA['title'] = $title; - $DATA['start'] = MAKE_DATETIME($start, "1"); - $DATA['end'] = MAKE_DATETIME($end , "1"); - $DATA['now_t'] = MAKE_DATETIME(time(), "1"); - - // Send mail to admin - if (GET_EXT_VERSION("admins") < "0.4.1") - { - // Use old method to send out - $msg = LOAD_EMAIL_TEMPLATE("admin_rallye_purged", "", 0); - SEND_ADMIN_EMAILS(RALLYE_ADMIN_PURGED.": ".$title, $msg); - } - else - { - // Use new system to send out - SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0); - } - - // Purge whole rallye - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%d LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - } - - // Add task - $result_task = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) -VALUES ('NEW', 'RALLYE_PURGED', '".RALLYE_ADMIN_PURGED.": %s', '".RALLYE_ADMIN_PURGED_TEXT."', UNIX_TIMESTAMP())", - array($title), __FILE__, __LINE__); - } - - // Free memory - SQL_FREERESULT($result_rallye); -} -// -function RALLYE_TEMPLATE_SELECTION($name="template", $default="") -{ - // Check templates directory - $OUT = ""; $ral = array(); - $BASE = PATH."templates/".GET_LANGUAGE()."/html"; - $dir = opendir($BASE); - while ($read = readdir($dir)) - { - // If it is no dir (so a file) - if (!is_dir($BASE.$read)) - { - // Accept only templates matching with rallye_????.tpl.xx - if (eregi("^rallye_.*\.tpl", $read)) - { - $read = substr($read, 7, strpos($read, ".") - 7); - // Accept only template names between 1 and 255 chars length - if ((strlen($read) < 256) && (!empty($read))) $ral[] = $read; - } - } - } - closedir($dir); - - // Do we have found templates which we can link with the new rallye? - if (!empty($ral[0])) - { - // Generate selection box for all found templates - $OUT = "\n"; - } - else - { - // No rallye templates found - $OUT = RALLYE_NO_TEMPLATES_FOUND; - } - - // Return selection - return $OUT; -} -// -function RALLYE_GET_REFCOUNT($uid, $old=0) -{ - global $REF_SYSTEM, $REF_DEPTHS, $CONFIG; - // Check current refs - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - // Get refs from cache - $cnt = 0; - foreach ($REF_SYSTEM['userid'] as $id=>$u_id) - { - if (($u_id == $uid) && ($REF_SYSTEM['level'][$id] == 0)) - { - foreach ($REF_DEPTHS['level'] as $level) - { - if (($level == $REF_SYSTEM['level'][$id]) && ($level == 0)) - { - // Level does exist so abort here - $cnt = $REF_SYSTEM['counter'][$id]; - //* DEBUG: */ echo "*".$uid."/".$cnt."*
"; - break; - } - elseif ($level > 0) - { - // Not interesting here... - break; - } - } - // Abort also here! - if ($cnt > 0) break; - } - } - //* DEBUG: */ echo "
";
-		//* DEBUG: */ print_r($REF_SYSTEM);
-		//* DEBUG: */ echo "
"; - //* DEBUG: */ die(); - - if ($cnt > 0) - { - // Count cache hits - $CONFIG['cache_hits']++; - - // Remove old refs - //* DEBUG: */ echo "+".$cnt."/".$old."+
"; - $cnt -= $old; - } - } - 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 -ON s.level=d.level -WHERE s.userid=%d AND s.level=0", array(bigintval($uid)), __FILE__, __LINE__); - list($cnt) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - if (empty($cnt)) - { - $cnt = "0"; - } - else - { - $cnt -= $old; - } - } - - // Return count - //* DEBUG: */ echo "*".$uid."/".$old."/".$cnt."*
"; - return $cnt; -} -// -?> + 0 AND d.mails_confirmed >= %s AND p.ref_depth='1' AND p.points > 0 AND d.userid=%d", + array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); + list($cpoints) = SQL_FETCHROW($result_ref); + SQL_FREERESULT($result_ref); + + if (empty($cpoints)) $cpoints = "0.00000"; + + // Add info line + $result_ref = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points) +VALUES ('%s', '%s', '%s', '%s')", + array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__); + $un = true; + } + + // Ignored but for the template required refs (made before start of rallye) + $DATA['refs'] = $cnt; + + // Shall I notify this member? + if (($notify == "Y") && ($un)) + { + // Load email template and send it to the user + $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", $prices, $uid); + SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); + } + } + + // Send email to admin + $templ = "admin_rallye_no_notify"; + if ($notify == "Y") $templ = "admin_rallye_notify"; + if (GET_EXT_VERSION("admins") < "0.4.1") + { + // Use old method to send out + $msg = LOAD_EMAIL_TEMPLATE($templ, $prices, 0); + SEND_ADMIN_EMAILS(RALLYE_ADMIN_NOTIFY.$title, $msg); + } + else + { + // Use new system to send out + SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_NOTIFY.$title, $templ, $prices, "0"); + } + + // Free memory + SQL_FREERESULT($result_user); +} +// +function RALLYE_ADD_PRICES($rallye,$mode="email") +{ + // Output mode + switch($mode) + { + case "email": $mode = "\n"; break; + case "html" : $mode = "
\n"; break; + } + + // Load prices + $result_prices = SQL_QUERY("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__); + if (SQL_NUMROWS($result_prices) > 0) + { + // Load prices + if ($mode == "\n") $prices = RALLYE_MEMBER_PRICES_ADDED.":".$mode."------------------------------".$mode; + $prices = ""; + while (list($level, $points, $info) = SQL_FETCHROW($result_prices)) + { + $prices .= $level.RALLYE_PRICE.": "; + if (!empty($info)) + { + $prices .= $info; + } + else + { + $prices .= $points." ".POINTS; + } + $prices .= "".$mode; + } + + // Free memory + SQL_FREERESULT($result_prices); + } + else + { + // No prices??? + $prices = RALLYE_MEMBER_NO_PRICES.$mode; + } + // Add last line for email mode + if ($mode == "\n") $prices .= "------------------------------"; + + // Return price list + return $prices; +} +// +function RALLYE_ADD_TOPUSERS($rallye,$default=0) +{ + global $CONFIG; + $since = (time() - $CONFIG['ap_in_since']); + + // First check how many prices are set + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", + array(bigintval($rallye)), __FILE__, __LINE__); + $prices = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + // And load only limited users + $result = SQL_QUERY_ESC("SELECT DISTINCT u.userid, u.refs, u.curr_points FROM "._MYSQL_PREFIX."_rallye_users AS u +LEFT JOIN "._MYSQL_PREFIX."_refsystem AS r +ON u.userid=r.userid +WHERE u.rallye_id=%d AND r.counter > 0 ORDER BY u.refs DESC", + array(bigintval($rallye)), __FILE__, __LINE__); + + // Load users + $DATA = array( + 'uid' => array(), + 'ref' => array(), + 'cpoints' => array() + ); + + while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result)) + { + // Get current refs + $cnt = RALLYE_GET_REFCOUNT($uid, $refs); + + // Points of ref's + $result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM "._MYSQL_PREFIX."_user_points AS p +LEFT JOIN "._MYSQL_PREFIX."_user_data AS d +ON p.userid=d.userid +WHERE d.userid=%d AND d.status='CONFIRMED' AND p.ref_depth='1' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= %s +LIMIT 1", array(bigintval($uid), $CONFIG['ref_payout'], $since), __FILE__, __LINE__); + list($refpoints) = SQL_FETCHROW($result_ref); + SQL_FREERESULT($result_ref); + + if (empty($refpoints)) $refpoints = "0"; + + // And subtract start refs + $cnt -= $refs; + + $_uid = "---"; + // List only users with at least one ref! + if (($cnt > 0) && ($refpoints > $cpoints)) { $_uid = $uid; } else { $cnt = ""; } + + // Save values to array + $DATA['uid'][] = $_uid; + $DATA['ref'][] = $cnt; + $DATA['cpoints'][] = $cpoints; + } + + // Free memory + SQL_FREERESULT($result); + + // Sort whole array + array_pk_sort($DATA, array("ref", "cpoints"), 0, 1, true); + + // Generate table + $OUT = LOAD_TEMPLATE("guest_rallye_header", true); + $SW = 2; + for ($idx = 0; $idx < $prices; $idx++) + { + if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; + if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = "---"; + // Add row + $OUT .= " +   ".($idx+1).". + "; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= $DATA['uid'][$idx]; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= " + "; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= $DATA['ref'][$idx]; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= " +\n"; + $SW = 3 - $SW; + } + // Add footer + $OUT .= LOAD_TEMPLATE("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) +{ + global $DATA; + // Check for an auto-add rallye + $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify FROM "._MYSQL_PREFIX."_rallye_data WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // Load data + list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // Check if line is already included... + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%d AND userid=%d LIMIT 1", + array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 0) + { + // Add userid and his ref count to table + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs) +VALUES ('%s', '%s', '0')", + array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); + } + else + { + // Free memory + SQL_FREERESULT($result); + } + + if ($notify == "Y") + { + // Transfer all neccessary data to the global $DATA array + $DATA['start'] = MAKE_DATETIME($start, "2"); + $DATA['end'] = MAKE_DATETIME($end , "2"); + $DATA['now_t'] = MAKE_DATETIME(time(), "2"); + $DATA['title'] = $title; + $DATA['id'] = $id; // ID for the rallye details link + $DATA['ref'] = "0"; + + // Load prices + $prices = RALLYE_ADD_PRICES($id); + + // Send notification to member + $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", $prices, $uid); + SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); + } + } +} +// +function RALLYE_EXPIRE_RALLYES($result) +{ + global $DATA, $CONFIG; + + // Latest online time + $since = (time() - $CONFIG['ap_in_since']); + + // Load rallye data + list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // Load users array (!) with assigned prices + $prices = RALLYE_LOAD_USERS_ARRAY($id); + + // Init array + $DATA = array(); $cnt = 0; + $users = array(); + $DATA['title'] = $title; + $DATA['start'] = MAKE_DATETIME($start, "1"); + $DATA['end'] = MAKE_DATETIME($end , "1"); + $DATA['now_t'] = MAKE_DATETIME(time(), "1"); + + // Just count... + $TOTAL = 0; + foreach($prices['uid'] as $key=>$uid) + { + // 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 +WHERE userid=%d AND status='CONFIRMED' AND last_online >= %s +LIMIT 1", array(bigintval($uid), $since), __FILE__, __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)) + { + $TOTAL++; + } + } + + if (($TOTAL < $min_prices) || ($TOTAL == 0)) + { + // Do not end this rallye! + return; + } + + // Expire rallye + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + + // Run array through (by uid is the most important 2nd-level-array) + foreach($prices['uid'] as $key=>$uid) + { + // 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)) + { + // Transfer data to array for the mail template + $DATA['level'] = $prices['level'][$key]; + $DATA['points'] = $prices['points'][$key]; + $DATA['info'] = $prices['info'][$key]; + $DATA['ref'] = $prices['ref'][$key]; + + if ($DATA['points'] > 0) + { + // Add points directly to user's account + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth='0' LIMIT 1", + array($DATA['points'], bigintval($uid)), __FILE__, __LINE__); + + // Update mediadata as well + if (GET_EXT_VERSION("mediadata") >= "0.0.4") + { + // Update database + MEDIA_UPDATE_ENTRY(array("total_points"), "add", $DATA['points']); + } + } + + if ($notify == "Y") + { + // Prepare infos for the mail template + if (!empty($DATA['info'])) + { + // Take direct infos + $DATA['infos'] = $DATA['info']; + } + else + { + // Take points + $DATA['infos'] = $DATA['points']." ".POINTS; + } + + // Add suffix to template name + $template = "member_rallye_expired"; + if ($DATA['level'] == 1) + { + // The winner! + $template .= "_gold"; + } + elseif ($DATA['level'] == 2) + { + // The vice winner! + $template .= "_silver"; + } + elseif ($DATA['level'] == 3) + { + // The bronce winner + $template .= "_bronce"; + } + + // Load template + $msg = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid); + SEND_EMAIL($uid, RALLYE_MEMBER_EXPIRED.": ".$DATA['level']." "._RALLYE_PRICE, $msg); + } + + // Count userid + $cnt++; + $users['uid'][$uid] = $uid; + $users['poi'][$uid] = $DATA['infos']; + } + } + + // Select template depending on notfication is switch on / off + if ($notify == "Y") + { + $templ = "admin_rallye_expired"; + } + elseif (is_array($users['uid'])) + { + $templ = "admin_rallye_expired_no"; + $cnt = RALLYE_LOAD_USER_DATA($users); + } + + // Send mail to admin + if (GET_EXT_VERSION("admins") < "0.4.1") + { + // Use old method to send out + $msg = LOAD_EMAIL_TEMPLATE($templ, $cnt, 0); + SEND_ADMIN_EMAILS(RALLYE_ADMIN_EXPIRED.": ".$title, $msg); + } + else + { + // Use new system to send out + SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0); + } + + // Add task + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) +VALUES ('NEW', 'RALLYE_EXPIRED', '".RALLYE_ADMIN_EXPIRED.": %s', '".RALLYE_ADMIN_EXPIRED_TEXT."', UNIX_TIMESTAMP())", + array($title), __FILE__, __LINE__); + + // All work done here... +} +// +function RALLYE_LOAD_USER_DATA($uids_array) +{ + // Implode user ids + $uid_string = implode(",", $uids_array['uid']); + + // Load users + $result = SQL_QUERY_ESC("SELECT userid, sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s", + array($uid_string, count($uids_array)), __FILE__, __LINE__); + $ret = ""; + while (list($u, $sex, $surname, $family, $email) = SQL_FETCHROW($result)) + { + $ret .= TRANSLATE_SEX($sex)." ".$surname." ".$family." (".$email.") - ".$uids_array['poi'][$u]."\n"; + } + + // Return result + return substr($ret, 0, -1); +} +// +function RALLYE_LOAD_PRICES_ARRAY($rallye) +{ + // Init multi array + $prices = array( + 'level' => array(), + 'points' => array(), + 'info' => array() + ); + + // Load prices + $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", + array(bigintval($rallye)), __FILE__, __LINE__); + while(list($level, $points, $info) = SQL_FETCHROW($result)) + { + $prices['level'][] = $level; + $prices['points'][] = $points; + $prices['info'][] = $info; + } + + // Free memory + SQL_FREERESULT($result); + + // Return array + return $prices; +} +// +function RALLYE_LOAD_USERS_ARRAY($rallye) +{ + global $CONFIG; + + // Fix zero points to 0.00000 + if ($CONFIG['ref_payout'] == "0") $CONFIG['ref_payout'] = "0.00000"; + + // Init multi array + $users = array( + 'uid' => 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=%d ORDER BY userid", + array(bigintval($rallye)), __FILE__, __LINE__); + while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result_user)) + { + // Load current ref count + $cnt = RALLYE_GET_REFCOUNT($uid, $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=%d", + array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); + list($refpoints) = SQL_FETCHROW($result_ref); + SQL_FREERESULT($result_ref); + + if (empty($refpoints)) $refpoints = "0"; + + // Store calculated new refs to array + $users['uid'][] = $uid; + $users['ref'][] = abs($cnt - $refs); + $users['cpoints'][] = $refpoints - $cpoints; + } + + // Free memory + SQL_FREERESULT($result_user); + + // Sort array for refs (descending) + array_pk_sort($users, array("ref", "cpoints"), 0, 1, true); + + // Load prices array (!) + $prices = RALLYE_LOAD_PRICES_ARRAY($rallye); + + // Merge users into prices + foreach ($prices['level'] as $k=>$lvl) + { + $prices['uid'][$k] = $users['uid'][$k]; + if (empty($prices['uid'][$k])) $prices['uid'][$k] = "---"; + $prices['ref'][$k] = $users['ref'][$k]; + if (empty($prices['ref'][$k])) $prices['ref'][$k] = "---"; + $prices['cpoints'][$k] = $users['cpoints'][$k]; + } + + // Return completed array + return $prices; +} +// +function RALLYE_LIST_WINNERS($rallye,$default=0) +{ + // First check how many prices are set + $result_prices = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", + array(bigintval($rallye)), __FILE__, __LINE__); + $prices = SQL_NUMROWS($result_prices); + SQL_FREERESULT($result_prices); + + // Load data + $DATA = RALLYE_LOAD_USERS_ARRAY($rallye); + + // Generate table + $OUT = LOAD_TEMPLATE("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 + $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d AND status='CONFIRMED' LIMIT 1", + array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__); + list($active) = SQL_FETCHROW($result_active); + SQL_FREERESULT($result_active); + + if (empty($DATA['uid'][$idx])) $DATA['uid'][$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] = "---"; + } + if (!empty($DATA['info'][$idx])) + { + // Take direct infos + $DATA['infos'][$idx] = $DATA['info'][$idx]; + } + else + { + // Take ppints + $DATA['infos'][$idx] = $DATA['points'][$idx]." ".POINTS; + } + + // Add row + $ADD = ""; + $OUT .= " +   ".($idx+1).". + "; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= $DATA['uid'][$idx]; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= " + "; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= $DATA['ref'][$idx]; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= " + "; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= $DATA['infos'][$idx]; + if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; + $OUT .= " +\n"; + $SW = 3 - $SW; + } + // Add footer + $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true); + + // And finnally return the output + return $OUT; +} +// +function RALLYE_DELETE_EXPIRED_RALLYES() +{ + global $DATA, $CONFIG; + // Check for expired rallyes + $EXPIRE = time() - ONE_DAY * 3; // The hard-coded value... + $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time FROM "._MYSQL_PREFIX."_rallye_data WHERE end_time <= %s AND expired='Y'", + array($EXPIRE), __FILE__, __LINE__); + + if (SQL_NUMROWS($result_rallye) > 0) + { + // Expire found rallyes and notify admin + while(list($id, $title, $start, $end) = SQL_FETCHROW($result_rallye)) + { + // Prepare data for mail template + $DATA['title'] = $title; + $DATA['start'] = MAKE_DATETIME($start, "1"); + $DATA['end'] = MAKE_DATETIME($end , "1"); + $DATA['now_t'] = MAKE_DATETIME(time(), "1"); + + // Send mail to admin + if (GET_EXT_VERSION("admins") < "0.4.1") + { + // Use old method to send out + $msg = LOAD_EMAIL_TEMPLATE("admin_rallye_purged", "", 0); + SEND_ADMIN_EMAILS(RALLYE_ADMIN_PURGED.": ".$title, $msg); + } + else + { + // Use new system to send out + SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0); + } + + // Purge whole rallye + $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%d LIMIT 1", + array(bigintval($id)), __FILE__, __LINE__); + } + + // Add task + $result_task = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) +VALUES ('NEW', 'RALLYE_PURGED', '".RALLYE_ADMIN_PURGED.": %s', '".RALLYE_ADMIN_PURGED_TEXT."', UNIX_TIMESTAMP())", + array($title), __FILE__, __LINE__); + } + + // Free memory + SQL_FREERESULT($result_rallye); +} +// +function RALLYE_TEMPLATE_SELECTION($name="template", $default="") +{ + // Check templates directory + $OUT = ""; $ral = array(); + $BASE = PATH."templates/".GET_LANGUAGE()."/html"; + $dir = opendir($BASE); + while ($read = readdir($dir)) + { + // If it is no dir (so a file) + if (!is_dir($BASE.$read)) + { + // Accept only templates matching with rallye_????.tpl.xx + if (eregi("^rallye_.*\.tpl", $read)) + { + $read = substr($read, 7, strpos($read, ".") - 7); + // Accept only template names between 1 and 255 chars length + if ((strlen($read) < 256) && (!empty($read))) $ral[] = $read; + } + } + } + closedir($dir); + + // Do we have found templates which we can link with the new rallye? + if (!empty($ral[0])) + { + // Generate selection box for all found templates + $OUT = "\n"; + } + else + { + // No rallye templates found + $OUT = RALLYE_NO_TEMPLATES_FOUND; + } + + // Return selection + return $OUT; +} +// +function RALLYE_GET_REFCOUNT($uid, $old=0) +{ + global $REF_SYSTEM, $REF_DEPTHS, $CONFIG; + // Check current refs + if (GET_EXT_VERSION("cache") >= "0.1.2") + { + // Get refs from cache + $cnt = 0; + foreach ($REF_SYSTEM['userid'] as $id=>$u_id) + { + if (($u_id == $uid) && ($REF_SYSTEM['level'][$id] == 0)) + { + foreach ($REF_DEPTHS['level'] as $level) + { + if (($level == $REF_SYSTEM['level'][$id]) && ($level == 0)) + { + // Level does exist so abort here + $cnt = $REF_SYSTEM['counter'][$id]; + //* DEBUG: */ echo "*".$uid."/".$cnt."*
"; + break; + } + elseif ($level > 0) + { + // Not interesting here... + break; + } + } + // Abort also here! + if ($cnt > 0) break; + } + } + //* DEBUG: */ echo "
";
+		//* DEBUG: */ print_r($REF_SYSTEM);
+		//* DEBUG: */ echo "
"; + //* DEBUG: */ die(); + + if ($cnt > 0) + { + // Count cache hits + $CONFIG['cache_hits']++; + + // Remove old refs + //* DEBUG: */ echo "+".$cnt."/".$old."+
"; + $cnt -= $old; + } + } + 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 +ON s.level=d.level +WHERE s.userid=%d AND s.level=0", array(bigintval($uid)), __FILE__, __LINE__); + list($cnt) = SQL_FETCHROW($result_ref); + SQL_FREERESULT($result_ref); + if (empty($cnt)) + { + $cnt = "0"; + } + else + { + $cnt -= $old; + } + } + + // Return count + //* DEBUG: */ echo "*".$uid."/".$old."/".$cnt."*
"; + return $cnt; +} +// +?> diff --git a/0.2.1/inc/libs/register_functions.php b/0.2.1/inc/libs/register_functions.php index d8073afb20..5dc7074504 100644 --- a/0.2.1/inc/libs/register_functions.php +++ b/0.2.1/inc/libs/register_functions.php @@ -1,173 +1,173 @@ - (*)"; - $eval = "define('MUST_".strtoupper($name)."', \"".$value."\");"; - eval($eval); - } - - // Free memory - SQL_FREERESULT($result); - - // Also fill other constants - define('MUST_SEX' , " (*)"); - define('MUST_ADDY' , " (*)"); - define('MUST_BIRTH' , " (*)"); - define('MUST_MARKER', " (*)"); -} -// -function REGISTER_CHECK_REQUIRED_FIELDS(&$array) -{ - $ret = false; - foreach ($array as $key=>$value) - { - $result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // "Must-line" found - list($chk) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // 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)) && ($chk == "Y") && (!$country)) - { - // Required field not set - $array[$key] = "!"; - $ret = true; - } - } - } - return $ret; -} -// -function REGISTER_OUTPUT_REQUIRE_CHECK(&$array) -{ - $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); - while(list($name, $required) = SQL_FETCHROW($result)) - { - if (($array[$name] == "!") && ($required == "Y")) - { - // Empty entry found - $array[$name] = ""; - $eval = "\$OUT = REGISTER_".strtoupper($name)."_REQUIRED;"; - eval($eval); - OUTPUT_HTML ("".$OUT."

"); - } - } - - // Free memory - SQL_FREERESULT($result); -} -// -function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) -{ - global $_POST, $CONFIG; - $OUT = ""; - - // Guests are mostly not interested in how many members has - // choosen an individual category - $AND = "WHERE visible='Y' "; - // Admins are allowed to see every category... - if (IS_ADMIN()) $AND = ""; - $result = SQL_QUERY("SELECT id, cat, visible FROM "._MYSQL_PREFIX."_cats ".$AND." ORDER BY sort", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - // List alle visible modules (or all to the admin) - $SW = 2; - $OUT .= "\n"; - while (list($id, $cat, $visible) = SQL_FETCHROW($result)) - { - if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = ""; - // Prepare array for the template - $content = array( - 'sw' => $SW, - 'cat' => $cat, - 'def_y' => "", - 'def_n' => "", - 'id' => $id, - ); - - if (($_POST['cat'][$id] == "Y") || (($CONFIG['register_default'] == "Y") && (empty($_POST['cat'][$id])))) - { - $content['def_y'] = " checked"; - } - else - { - $content['def_n'] = " checked"; - } - - // Load template and switch color - $OUT .= LOAD_TEMPLATE("guest_cat_row", true, $content); - $SW = 3 - $SW; - } - $OUT .= "
\n"; - - // Free memory - SQL_FREERESULT($result); - } - else - { - // No categories setted up so far... - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, NO_CATEGORIES_VISIBLE); - } - - if ($return) - { - // Return generated HTML code - return $OUT; - } - else - { - // Output directly (default) - OUTPUT_HTML ($OUT); - } -} -// -?> + (*)"; + $eval = "define('MUST_".strtoupper($name)."', \"".$value."\");"; + eval($eval); + } + + // Free memory + SQL_FREERESULT($result); + + // Also fill other constants + define('MUST_SEX' , " (*)"); + define('MUST_ADDY' , " (*)"); + define('MUST_BIRTH' , " (*)"); + define('MUST_MARKER', " (*)"); +} +// +function REGISTER_CHECK_REQUIRED_FIELDS(&$array) +{ + $ret = false; + foreach ($array as $key=>$value) + { + $result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // "Must-line" found + list($chk) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // 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)) && ($chk == "Y") && (!$country)) + { + // Required field not set + $array[$key] = "!"; + $ret = true; + } + } + } + return $ret; +} +// +function REGISTER_OUTPUT_REQUIRE_CHECK(&$array) +{ + $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); + while(list($name, $required) = SQL_FETCHROW($result)) + { + if (($array[$name] == "!") && ($required == "Y")) + { + // Empty entry found + $array[$name] = ""; + $eval = "\$OUT = REGISTER_".strtoupper($name)."_REQUIRED;"; + eval($eval); + OUTPUT_HTML ("".$OUT."

"); + } + } + + // Free memory + SQL_FREERESULT($result); +} +// +function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) +{ + global $_POST, $CONFIG; + $OUT = ""; + + // Guests are mostly not interested in how many members has + // choosen an individual category + $AND = "WHERE visible='Y' "; + // Admins are allowed to see every category... + if (IS_ADMIN()) $AND = ""; + $result = SQL_QUERY("SELECT id, cat, visible FROM "._MYSQL_PREFIX."_cats ".$AND." ORDER BY sort", __FILE__, __LINE__); + if (SQL_NUMROWS($result) > 0) + { + // List alle visible modules (or all to the admin) + $SW = 2; + $OUT .= "\n"; + while (list($id, $cat, $visible) = SQL_FETCHROW($result)) + { + if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = ""; + // Prepare array for the template + $content = array( + 'sw' => $SW, + 'cat' => $cat, + 'def_y' => "", + 'def_n' => "", + 'id' => $id, + ); + + if (($_POST['cat'][$id] == "Y") || (($CONFIG['register_default'] == "Y") && (empty($_POST['cat'][$id])))) + { + $content['def_y'] = " checked"; + } + else + { + $content['def_n'] = " checked"; + } + + // Load template and switch color + $OUT .= LOAD_TEMPLATE("guest_cat_row", true, $content); + $SW = 3 - $SW; + } + $OUT .= "
\n"; + + // Free memory + SQL_FREERESULT($result); + } + else + { + // No categories setted up so far... + $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, NO_CATEGORIES_VISIBLE); + } + + if ($return) + { + // Return generated HTML code + return $OUT; + } + else + { + // Output directly (default) + OUTPUT_HTML ($OUT); + } +} +// +?> diff --git a/0.2.1/inc/libs/rewrite_functions.php b/0.2.1/inc/libs/rewrite_functions.php index 8a8d41c215..14343603a5 100644 --- a/0.2.1/inc/libs/rewrite_functions.php +++ b/0.2.1/inc/libs/rewrite_functions.php @@ -1,124 +1,124 @@ -to replacements - $REPLACE = array( - 'search' => array("u_id", "url", "page", "offset", "mid", "bid", "sub", "home"), - 'replace' => array("u" , "url", "page", "offset", "m" , "b" , "s" , "h") - ); - - if ((EXT_IS_ACTIVE("admins")) && (eregi("admin=", $test))) - { - // Replace &admin= with "/aid/" - $REPLACE['search'][] = "admin"; - $REPLACE['replace'][] = "aid"; - } - - // Replace all array elements through - foreach ($REPLACE['search'] as $k=>$v) - { - if (eregi("$v=", $test)) - { - // Replace &u_id= with /u/ - $test = preg_replace("/&".$v."=/i", "/".$REPLACE['replace'][$k]."/", $test); - } - } - - // Repair missed &what=??? entries - while (preg_match("/&what=(.*)\/(.*)\/(.*)/i", $test)) - { - $test = preg_replace("/&what=(.*)\/(.*)\/(.*)/i", "/wht/\$1/\$2/\$3", $test); - } - - // Return rewritten code - return $test; -} -// -?> +to replacements + $REPLACE = array( + 'search' => array("u_id", "url", "page", "offset", "mid", "bid", "sub", "home"), + 'replace' => array("u" , "url", "page", "offset", "m" , "b" , "s" , "h") + ); + + if ((EXT_IS_ACTIVE("admins")) && (eregi("admin=", $test))) + { + // Replace &admin= with "/aid/" + $REPLACE['search'][] = "admin"; + $REPLACE['replace'][] = "aid"; + } + + // Replace all array elements through + foreach ($REPLACE['search'] as $k=>$v) + { + if (eregi("$v=", $test)) + { + // Replace &u_id= with /u/ + $test = preg_replace("/&".$v."=/i", "/".$REPLACE['replace'][$k]."/", $test); + } + } + + // Repair missed &what=??? entries + while (preg_match("/&what=(.*)\/(.*)\/(.*)/i", $test)) + { + $test = preg_replace("/&what=(.*)\/(.*)\/(.*)/i", "/wht/\$1/\$2/\$3", $test); + } + + // Return rewritten code + return $test; +} +// +?> diff --git a/0.2.1/inc/libs/security_functions.php b/0.2.1/inc/libs/security_functions.php index 09cf73d349..73875e3bcb 100644 --- a/0.2.1/inc/libs/security_functions.php +++ b/0.2.1/inc/libs/security_functions.php @@ -1,42 +1,42 @@ - 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. -$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 ($SEC_CHARS['from'] as $key=>$char) - { - // Pass all through - $_GET[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_GET[$seckey]); - } - - // Strip all other out - $_GET[$seckey] = strip_tags($_GET[$seckey]); - } - } -} - -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 ($SEC_CHARS['from'] as $key=>$char) - { - // Pass all through - $_POST[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_POST[$seckey]); - } - - // Strip all other out - $_POST[$seckey] = strip_tags($_POST[$seckey]); - } - } - - // ... and finally cookies - foreach ($_COOKIE as $seckey=>$secvalue) - { - if (is_array($secvalue)) - { - // Throw arrays away... - unset($_COOKIE[$seckey]); - } - else - { - // Only variables are allowed (non-array) but we secure them all! - foreach ($SEC_CHARS['from'] as $key=>$char) - { - // Pass all through - $_COOKIE[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]); - } - - // Strip all other out - $_COOKIE[$seckey] = strip_tags($_COOKIE[$seckey]); - } - } -} - -// 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"); - } -} - -// 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); -} - -// 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); - -// Security system loaded... -define('__SECURITY', "1"); - -// -?> + +// Run only once this security check/exchange +if (defined('__SECURITY')) return; + +// Fatal messages goes here +global $FATAL; +$FATAL = array(); + +// Runtime quoting is off now... +set_magic_quotes_runtime(false); + +// Unregister all global variables because of vultures and surpress failed attemps +@import_request_variables(''); + +// Error reporting level +@error_reporting(E_ALL | E_STRICT); + +// Check if important arrays are found and define them if missing +if (!isset($_SERVER)) +{ + global $_SERVER; + $_SERVER = $GLOBALS['_SERVER']; +} +if (!isset($_GET)) +{ + global $_GET; + $_GET = $GLOBALS['_GET']; +} +if (!isset($_POST)) +{ + global $_POST; + $_POST = $GLOBALS['_POST']; +} +if (!isset($_COOKIE)) +{ + global $_COOKIE; + $_COOKIE = $GLOBALS['_COOKIE']; +} + +// Include IP-Filter here +//require("/usr/share/php/ipfilter.php"); + +// Generate arrays which holds the relevante chars to replace +global $SEC_CHARS, $URL_CHARS; +$SEC_CHARS = array( + // 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. +$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 ($SEC_CHARS['from'] as $key=>$char) + { + // Pass all through + $_GET[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_GET[$seckey]); + } + + // Strip all other out + $_GET[$seckey] = strip_tags($_GET[$seckey]); + } + } +} + +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 ($SEC_CHARS['from'] as $key=>$char) + { + // Pass all through + $_POST[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_POST[$seckey]); + } + + // Strip all other out + $_POST[$seckey] = strip_tags($_POST[$seckey]); + } + } + + // ... and finally cookies + foreach ($_COOKIE as $seckey=>$secvalue) + { + if (is_array($secvalue)) + { + // Throw arrays away... + unset($_COOKIE[$seckey]); + } + else + { + // Only variables are allowed (non-array) but we secure them all! + foreach ($SEC_CHARS['from'] as $key=>$char) + { + // Pass all through + $_COOKIE[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]); + } + + // Strip all other out + $_COOKIE[$seckey] = strip_tags($_COOKIE[$seckey]); + } + } +} + +// 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"); + } +} + +// 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); +} + +// 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); + +// Security system loaded... +define('__SECURITY', "1"); + +// +?> diff --git a/0.2.1/inc/libs/task_functions.php b/0.2.1/inc/libs/task_functions.php index e4e700444b..9140cd191e 100644 --- a/0.2.1/inc/libs/task_functions.php +++ b/0.2.1/inc/libs/task_functions.php @@ -1,567 +1,567 @@ - 0) { - define ('__TASK_UPDATE_VALUE', "".$value.""); - } else { - define ('__TASK_UPDATE_VALUE', "0"); - } - } else { - define ('__TASK_UPDATE_VALUE', "0"); - } - - // - // First check for all account status seperately - // - // Confirmed accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__CONFIRMED_VALUE', "".$value.""); - } else { - define('__CONFIRMED_VALUE', "0"); - } - - // Unconfirmed accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__UNCONFIRMED_VALUE', "".$value.""); - } else { - define('__UNCONFIRMED_VALUE', "0"); - } - - // And locked accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='LOCKED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__LOCKED_VALUE', "".$value.""); - } else { - define('__LOCKED_VALUE', "0"); - } - - // - // Unassigned tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='0' AND status != 'DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_NEW_VALUE', "".$value.""); - } else { - define('__TASK_NEW_VALUE', "0"); + 0) { + define ('__TASK_UPDATE_VALUE', "".$value.""); + } else { + define ('__TASK_UPDATE_VALUE', "0"); + } + } else { + define ('__TASK_UPDATE_VALUE', "0"); + } + + // + // First check for all account status seperately + // + // Confirmed accounts + $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__CONFIRMED_VALUE', "".$value.""); + } else { + define('__CONFIRMED_VALUE', "0"); + } + + // Unconfirmed accounts + $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__UNCONFIRMED_VALUE', "".$value.""); + } else { + define('__UNCONFIRMED_VALUE', "0"); + } + + // And locked accounts + $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='LOCKED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__LOCKED_VALUE', "".$value.""); + } else { + define('__LOCKED_VALUE', "0"); + } + + // + // Unassigned tasks + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='0' AND status != 'DELETED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__TASK_NEW_VALUE', "".$value.""); + } else { + define('__TASK_NEW_VALUE', "0"); } - - // - // Closed tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'CLOSED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_CLOSED_VALUE', "".$value.""); - } else { - define('__TASK_CLOSED_VALUE', "0"); + + // + // Closed tasks + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'CLOSED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__TASK_CLOSED_VALUE', "".$value.""); + } else { + define('__TASK_CLOSED_VALUE', "0"); } - - // - // Deleted tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_DELETED_VALUE', "".$value.""); - } else { - define('__TASK_DELETED_VALUE', "0"); + + // + // Deleted tasks + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'DELETED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__TASK_DELETED_VALUE', "".$value.""); + } else { + define('__TASK_DELETED_VALUE', "0"); } - - // - // Solved tasks - // - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'SOLVED' AND assigned_admin='%s'", - array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_SOLVED_VALUE', "".$value.""); - } else { - define('__TASK_SOLVED_VALUE', "0"); + + // + // Solved tasks + // + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'SOLVED' AND assigned_admin='%s'", + array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__TASK_SOLVED_VALUE', "".$value.""); + } else { + define('__TASK_SOLVED_VALUE', "0"); } - - // - // Your tasks - // - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND status = 'NEW' AND task_type != 'EXTENSION_UPDATE'", - array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_YOUR_VALUE', "".$value.""); - } else { - define('__TASK_YOUR_VALUE', "0"); + + // + // Your tasks + // + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND status = 'NEW' AND task_type != 'EXTENSION_UPDATE'", + array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__TASK_YOUR_VALUE', "".$value.""); + } else { + define('__TASK_YOUR_VALUE', "0"); } - - // - // Mails waiting to be approved - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_ADMIN_VALUE', "".$value.""); - } else { - define('__MAIL_ADMIN_VALUE', "0"); + + // + // Mails waiting to be approved + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_ADMIN_VALUE', "".$value.""); + } else { + define('__MAIL_ADMIN_VALUE', "0"); } - - // - // Unfinished mail orders - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='TEMP'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_TEMP_VALUE', "".$value.""); - } else { - define('__MAIL_TEMP_VALUE', "0"); + + // + // Unfinished mail orders + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='TEMP'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_TEMP_VALUE', "".$value.""); + } else { + define('__MAIL_TEMP_VALUE', "0"); } - - // - // Sent mail orders - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='SEND'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_SEND_VALUE', "".$value.""); - } else { - define('__MAIL_SEND_VALUE', "0"); + + // + // Sent mail orders + // + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='SEND'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_SEND_VALUE', "".$value.""); + } else { + define('__MAIL_SEND_VALUE', "0"); } - - // - // Autopurged mails - // - if (EXT_IS_ACTIVE("autopurge")) { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_DELETED_VALUE', "".$value.""); - } else { - define('__MAIL_DELETED_VALUE', "0"); + + // + // Autopurged mails + // + if (EXT_IS_ACTIVE("autopurge")) { + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_DELETED_VALUE', "".$value.""); + } else { + define('__MAIL_DELETED_VALUE', "0"); } - - // - // Autopurged bonus mails - // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_BONUS_AP_VALUE', "".$value.""); - } else { - define('__MAIL_BONUS_AP_VALUE', "0"); - } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_AP_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); - } else { - define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_BONUS_404.""); - } - } else { - define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); - define('__MAIL_DELETED_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); + + // + // Autopurged bonus mails + // + if (GET_EXT_VERSION("bonus") >= "0.1.8") { + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='DELETED'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_BONUS_AP_VALUE', "".$value.""); + } else { + define('__MAIL_BONUS_AP_VALUE', "0"); + } + } elseif (EXT_IS_ACTIVE("bonus")) { + define('__MAIL_BONUS_AP_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); + } else { + define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_BONUS_404.""); + } + } else { + define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); + define('__MAIL_DELETED_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); } - - // - // Sent bonus mails - // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_BONUS_SEND_VALUE', "".$value.""); - } else { - define('__MAIL_BONUS_SEND_VALUE', "0"); - } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); - } else { - define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_404); + + // + // Sent bonus mails + // + if (GET_EXT_VERSION("bonus") >= "0.1.8") { + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND'", __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + if ($value > 0) { + define('__MAIL_BONUS_SEND_VALUE', "".$value.""); + } else { + define('__MAIL_BONUS_SEND_VALUE', "0"); + } + } elseif (EXT_IS_ACTIVE("bonus")) { + define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); + } else { + define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_404); } - - if (EXT_IS_ACTIVE("autopurge")) { - // Start finding them... - $since = (time() - $CONFIG['ap_in_since']); - $EXCLUDE_LIST = " AND d.userid != c.def_refid"; - - // Check for more extensions - if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid"; - if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid"; - if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid"; - - // Check for new holiday system - if (GET_EXT_VERSION("holiday") >= "0.1.3") { - $EXCLUDE_LIST .= " AND d.holiday_active = 'N'"; - } - - // Check for all accounts - $SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online -FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c -WHERE d.status='CONFIRMED' AND d.joined < ".$since." AND d.last_online < ".$since." AND d.ap_notified < ".$since." -".$EXCLUDE_LIST." -ORDER BY d.userid"; - $WHATs[] = "list_autopurge"; - $DESCRs[] = TASK_ADMIN_INACTIVE_AUTOPURGE; - $TITLEs[] = TASK_ADMIN_INACTIVE_AUTOPURGE_TITLE; + + if (EXT_IS_ACTIVE("autopurge")) { + // Start finding them... + $since = (time() - $CONFIG['ap_in_since']); + $EXCLUDE_LIST = " AND d.userid != c.def_refid"; + + // Check for more extensions + if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != c.beg_uid"; + if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != c.bonus_uid"; + if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != c.doubler_uid"; + + // Check for new holiday system + if (GET_EXT_VERSION("holiday") >= "0.1.3") { + $EXCLUDE_LIST .= " AND d.holiday_active = 'N'"; + } + + // Check for all accounts + $SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online +FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c +WHERE d.status='CONFIRMED' AND d.joined < ".$since." AND d.last_online < ".$since." AND d.ap_notified < ".$since." +".$EXCLUDE_LIST." +ORDER BY d.userid"; + $WHATs[] = "list_autopurge"; + $DESCRs[] = TASK_ADMIN_INACTIVE_AUTOPURGE; + $TITLEs[] = TASK_ADMIN_INACTIVE_AUTOPURGE_TITLE; } - - if (GET_EXT_VERSION("sql_patches") >= "0.3.4") { - // Check for accounts without referral - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid"; - $DESCRs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF; - $TITLEs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF_TITLE; - $WHATs[] = "list_norefs"; + + if (GET_EXT_VERSION("sql_patches") >= "0.3.4") { + // Check for accounts without referral + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid"; + $DESCRs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF; + $TITLEs[] = TAKS_ADMIN_LIST_ACCOUNT_NOREF_TITLE; + $WHATs[] = "list_norefs"; } - - if (EXT_IS_ACTIVE("payout")) { - // List new payout requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts WHERE status='NEW' ORDER BY userid"; - $WHATs[] = "list_payouts"; - $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING; - $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING_TITLE; - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts ORDER BY userid"; - $WHATs[] = "list_payouts"; - $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_ALL_TITLE; + + if (EXT_IS_ACTIVE("payout")) { + // List new payout requests + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts WHERE status='NEW' ORDER BY userid"; + $WHATs[] = "list_payouts"; + $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING; + $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING_TITLE; + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts ORDER BY userid"; + $WHATs[] = "list_payouts"; + $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_ALL; + $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_ALL_TITLE; } - - if (EXT_IS_ACTIVE("wernis")) { - // List new wernis requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_wernis ORDER BY userid"; - $WHATs[] = "list_wernis"; - $DESCRs[] = TASK_ADMIN_LIST_WERNIS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_WERNIS_ALL_TITLE; + + if (EXT_IS_ACTIVE("wernis")) { + // List new wernis requests + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_wernis ORDER BY userid"; + $WHATs[] = "list_wernis"; + $DESCRs[] = TASK_ADMIN_LIST_WERNIS_ALL; + $TITLEs[] = TASK_ADMIN_LIST_WERNIS_ALL_TITLE; } - - if (EXT_IS_ACTIVE("holiday")) { - // List holiday requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_holidays ORDER BY userid"; - $WHATs[] = "list_holiday"; - $DESCRs[] = TASK_ADMIN_LIST_HOLIDAYS; - $TITLEs[] = TASK_ADMIN_LIST_HOLIDAYS_TITLE; + + if (EXT_IS_ACTIVE("holiday")) { + // List holiday requests + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_holidays ORDER BY userid"; + $WHATs[] = "list_holiday"; + $DESCRs[] = TASK_ADMIN_LIST_HOLIDAYS; + $TITLEs[] = TASK_ADMIN_LIST_HOLIDAYS_TITLE; } - - if (GET_EXT_VERSION("bonus") >= "0.2.3") { - // Active rallye - if (GET_EXT_VERSION("bonus") >= "0.6.9") { - // Add more bonus points here - $USE = "(0"; - if ($CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus"; - if ($CONFIG['bonus_login_yn'] == "Y") $USE .= " + login_bonus"; - if ($CONFIG['bonus_order_yn'] == "Y") $USE .= " + bonus_order"; - if ($CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats"; - if ($CONFIG['bonus_ref_yn'] == "Y") $USE .= " + bonus_ref"; - $USE .= ")"; - } else { - // Old version ??? - $USE = "turbo_bonus"; - } - - // Autopurge installed? - $LAST = ""; $ONLINE = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == "Y") && ($CONFIG['ap_in_since'] > 0)) { - // Use last online timestamp to keep inactive members away from here - $LAST = " AND last_online >= "; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); - } - - $SQLs[] = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data -WHERE status='CONFIRMED' AND ".$USE.">0".$LAST."".$ONLINE." -ORDER BY active_bonus DESC, userid"; - $WHATs[] = "list_bonus"; - $DESCRs[] = TASK_ADMIN_LIST_BONUS; - $TITLEs[] = TASK_ADMIN_LIST_BONUS_TITLE; - } - - if (GET_EXT_VERSION("beg") >= "0.1.2") { - // Begging rallye - - // Autopurge installed? - $LAST = ""; $ONLINE = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == "Y") && ($CONFIG['ap_in_since'] > 0)) { - // Use last online timestamp to keep inactive members away from here - $LAST = " AND last_online >= "; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); - } - - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data -WHERE status='CONFIRMED' AND beg_points>0".$LAST."".$ONLINE." -ORDER BY beg_points DESC, userid"; - $WHATs[] = "list_beg"; - $DESCRs[] = TASK_ADMIN_LIST_BEG; - $TITLEs[] = TASK_ADMIN_LIST_BEG_TITLE; - } - - if (EXT_IS_ACTIVE("doubler")) { - // List waiting payouts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' ORDER BY id"; - $WHATs[] = "list_doubler&mode=waiting&select=all"; - $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_WAITING; - $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_WAITING_TITLE; - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler ORDER BY id"; - $WHATs[] = "list_doubler"; - $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_ALL; - $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_ALL_TITLE; + + if (GET_EXT_VERSION("bonus") >= "0.2.3") { + // Active rallye + if (GET_EXT_VERSION("bonus") >= "0.6.9") { + // Add more bonus points here + $USE = "(0"; + if ($CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus"; + if ($CONFIG['bonus_login_yn'] == "Y") $USE .= " + login_bonus"; + if ($CONFIG['bonus_order_yn'] == "Y") $USE .= " + bonus_order"; + if ($CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats"; + if ($CONFIG['bonus_ref_yn'] == "Y") $USE .= " + bonus_ref"; + $USE .= ")"; + } else { + // Old version ??? + $USE = "turbo_bonus"; + } + + // Autopurge installed? + $LAST = ""; $ONLINE = ""; + if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == "Y") && ($CONFIG['ap_in_since'] > 0)) { + // Use last online timestamp to keep inactive members away from here + $LAST = " AND last_online >= "; + $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + } + + $SQLs[] = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data +WHERE status='CONFIRMED' AND ".$USE.">0".$LAST."".$ONLINE." +ORDER BY active_bonus DESC, userid"; + $WHATs[] = "list_bonus"; + $DESCRs[] = TASK_ADMIN_LIST_BONUS; + $TITLEs[] = TASK_ADMIN_LIST_BONUS_TITLE; } - - // - // All referral banner - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner ORDER BY id"; - $WHATs[] = "refbanner"; - $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ALL; - $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ALL_TITLE; - - // - // All activated referral banner - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y' ORDER BY id"; - $WHATs[] = "refbanner"; - $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE_TITLE; - - // - // All extensions - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions ORDER BY id"; - $WHATs[] = "extensions"; - $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL_TITLE; - - // - // All activated extensions - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_active='Y' ORDER BY id"; - $WHATs[] = "extensions&active=Y"; - $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE_TITLE; - - if (EXT_IS_ACTIVE("engine")) { - // List all export accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts ORDER BY id"; - $WHATs[] = "list_engine"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE; - - // List all pending accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts WHERE status='UNCONFIRMED' ORDER BY id"; - $WHATs[] = "unlock_engine"; - $DESCRs[] = TASK_ADMIN_UNLOCK_ENGINE; - - // List all safes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_safe ORDER BY id"; - $WHATs[] = "list_engine&mode=safe"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE_SAFES; - - // List all export URLs - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_urls ORDER BY id"; - $WHATs[] = "engine_urls"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE_URLS; + + if (GET_EXT_VERSION("beg") >= "0.1.2") { + // Begging rallye + + // Autopurge installed? + $LAST = ""; $ONLINE = ""; + if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == "Y") && ($CONFIG['ap_in_since'] > 0)) { + // Use last online timestamp to keep inactive members away from here + $LAST = " AND last_online >= "; + $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + } + + $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data +WHERE status='CONFIRMED' AND beg_points>0".$LAST."".$ONLINE." +ORDER BY beg_points DESC, userid"; + $WHATs[] = "list_beg"; + $DESCRs[] = TASK_ADMIN_LIST_BEG; + $TITLEs[] = TASK_ADMIN_LIST_BEG_TITLE; } - - if (EXT_IS_ACTIVE("sponsor")) { - // List all sponsors - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_TITLE; - - // List confirmed sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='CONFIRMED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED_TITLE; - - // List unconfirmed sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='UNCONFIRMED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED_TITLE; - - // List locked sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='LOCKED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED_TITLE; - - // List waiting sponsor accounts to be approved - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='PENDING' ORDER BY id"; - $WHATs[] = "unlock_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_PENDING; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_PENDING_TITLE; - - // Waiting payments - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_orders WHERE pay_status='PENDING' ORDER BY id"; - $WHATs[] = "list_sponsor_pays"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS_TITLE; + + if (EXT_IS_ACTIVE("doubler")) { + // List waiting payouts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' ORDER BY id"; + $WHATs[] = "list_doubler&mode=waiting&select=all"; + $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_WAITING; + $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_WAITING_TITLE; + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler ORDER BY id"; + $WHATs[] = "list_doubler"; + $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_ALL; + $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_ALL_TITLE; } - - if (EXT_IS_ACTIVE("country")) { - // List country codes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_countries ORDER BY id"; - $WHATs[] = "list_country"; - $DESCRs[] = TASK_ADMIN_LIST_COUNTRY; - $TITLEs[] = TASK_ADMIN_LIST_COUNTRY_TITLE; + + // + // All referral banner + // + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner ORDER BY id"; + $WHATs[] = "refbanner"; + $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ALL; + $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ALL_TITLE; + + // + // All activated referral banner + // + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y' ORDER BY id"; + $WHATs[] = "refbanner"; + $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE; + $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE_TITLE; + + // + // All extensions + // + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions ORDER BY id"; + $WHATs[] = "extensions"; + $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL; + $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL_TITLE; + + // + // All activated extensions + // + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_active='Y' ORDER BY id"; + $WHATs[] = "extensions&active=Y"; + $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE; + $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE_TITLE; + + if (EXT_IS_ACTIVE("engine")) { + // List all export accounts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts ORDER BY id"; + $WHATs[] = "list_engine"; + $DESCRs[] = TASK_ADMIN_LIST_ENGINE; + + // List all pending accounts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts WHERE status='UNCONFIRMED' ORDER BY id"; + $WHATs[] = "unlock_engine"; + $DESCRs[] = TASK_ADMIN_UNLOCK_ENGINE; + + // List all safes + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_safe ORDER BY id"; + $WHATs[] = "list_engine&mode=safe"; + $DESCRs[] = TASK_ADMIN_LIST_ENGINE_SAFES; + + // List all export URLs + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_urls ORDER BY id"; + $WHATs[] = "engine_urls"; + $DESCRs[] = TASK_ADMIN_LIST_ENGINE_URLS; } - - if (EXT_IS_ACTIVE("theme")) { - // List all themes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes ORDER BY id"; - $WHATs[] = "theme_edit"; - $DESCRs[] = TASK_ADMIN_LIST_THEME_ALL; - $TITLEs[] = TASK_ADMIN_LIST_THEME_ALL_TITLE; - - // List active themes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_active='Y' ORDER BY id"; - $WHATs[] = "theme_edit"; - $DESCRs[] = TASK_ADMIN_LIST_THEME_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_THEME_ACTIVE_TITLE; + + if (EXT_IS_ACTIVE("sponsor")) { + // List all sponsors + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data ORDER BY id"; + $WHATs[] = "list_sponsor"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_TITLE; + + // List confirmed sponsor accounts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='CONFIRMED' ORDER BY id"; + $WHATs[] = "list_sponsor"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED_TITLE; + + // List unconfirmed sponsor accounts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='UNCONFIRMED' ORDER BY id"; + $WHATs[] = "list_sponsor"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED_TITLE; + + // List locked sponsor accounts + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='LOCKED' ORDER BY id"; + $WHATs[] = "list_sponsor"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED_TITLE; + + // List waiting sponsor accounts to be approved + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='PENDING' ORDER BY id"; + $WHATs[] = "unlock_sponsor"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_PENDING; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_PENDING_TITLE; + + // Waiting payments + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_orders WHERE pay_status='PENDING' ORDER BY id"; + $WHATs[] = "list_sponsor_pays"; + $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS; + $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS_TITLE; + } + + if (EXT_IS_ACTIVE("country")) { + // List country codes + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_countries ORDER BY id"; + $WHATs[] = "list_country"; + $DESCRs[] = TASK_ADMIN_LIST_COUNTRY; + $TITLEs[] = TASK_ADMIN_LIST_COUNTRY_TITLE; + } + + if (EXT_IS_ACTIVE("theme")) { + // List all themes + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes ORDER BY id"; + $WHATs[] = "theme_edit"; + $DESCRs[] = TASK_ADMIN_LIST_THEME_ALL; + $TITLEs[] = TASK_ADMIN_LIST_THEME_ALL_TITLE; + + // List active themes + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_active='Y' ORDER BY id"; + $WHATs[] = "theme_edit"; + $DESCRs[] = TASK_ADMIN_LIST_THEME_ACTIVE; + $TITLEs[] = TASK_ADMIN_LIST_THEME_ACTIVE_TITLE; + } + + if (EXT_IS_ACTIVE("admins")) { + // List all administrator logins + $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_admins ORDER BY id"; + $WHATs[] = "admins_edit"; + $DESCRs[] = TASK_ADMIN_LIST_ADMINS_ALL; + $TITLEs[] = TASK_ADMIN_LIST_ADMINS_ALL_TITLE; } - - if (EXT_IS_ACTIVE("admins")) { - // List all administrator logins - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_admins ORDER BY id"; - $WHATs[] = "admins_edit"; - $DESCRs[] = TASK_ADMIN_LIST_ADMINS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_ADMINS_ALL_TITLE; - } - - // Generate extra overview rows - $EXTRAS .= TASK_CREATE_EXTRA_ROWS($SQLs, $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); - - // Simply load the template... :-) - LOAD_TEMPLATE("admin_overview_task"); + + // Generate extra overview rows + $EXTRAS .= TASK_CREATE_EXTRA_ROWS($SQLs, $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); + + // Simply load the template... :-) + LOAD_TEMPLATE("admin_overview_task"); } - -// + +// function TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs){ - // Init - $OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1; - foreach ($SQLs as $key=>$sql) { - // Run SQL command, get line numbers and free memory - $result = SQL_QUERY($sql, __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - $content = array( - 'row_descr' => $DESCRs[$key], - 'row_sw' => $SW, - 'bottom' => "", + // Init + $OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1; + foreach ($SQLs as $key=>$sql) { + // Run SQL command, get line numbers and free memory + $result = SQL_QUERY($sql, __FILE__, __LINE__); + $value = SQL_NUMROWS($result); + SQL_FREERESULT($result); + + $content = array( + 'row_descr' => $DESCRs[$key], + 'row_sw' => $SW, + 'bottom' => "", ); - - if ($key < $MAX) $content['bottom'] = "bottom2"; - if (($value > 0) && (!empty($WHATs[$key]))) { - if (empty($TITLEs[$key])) $TITLEs[$key] = TASK_ADMIN_UNKNOWN_LIST_TITLE; - $content['row_link'] = "".$value.""; - } else { - $content['row_link'] = "0"; - } - - // Switch color - $SW = 3 - $SW; - - // And insert the final string into extras template - $OUT .= LOAD_TEMPLATE("admin_overview_task_rows", true, $content); - } - - // Return output - return LOAD_TEMPLATE("admin_overview_task_extras", true, $OUT); -} -// -?> + + if ($key < $MAX) $content['bottom'] = "bottom2"; + if (($value > 0) && (!empty($WHATs[$key]))) { + if (empty($TITLEs[$key])) $TITLEs[$key] = TASK_ADMIN_UNKNOWN_LIST_TITLE; + $content['row_link'] = "".$value.""; + } else { + $content['row_link'] = "0"; + } + + // Switch color + $SW = 3 - $SW; + + // And insert the final string into extras template + $OUT .= LOAD_TEMPLATE("admin_overview_task_rows", true, $content); + } + + // Return output + return LOAD_TEMPLATE("admin_overview_task_extras", true, $OUT); +} +// +?> diff --git a/0.2.1/inc/libs/transfer_functions.php b/0.2.1/inc/libs/transfer_functions.php index 0c6d01f4ad..80ebfab0bb 100644 --- a/0.2.1/inc/libs/transfer_functions.php +++ b/0.2.1/inc/libs/transfer_functions.php @@ -1,88 +1,88 @@ - $max) - { - // Update overdue transfers - $remove = SQL_NUMROWS($result) - $max; - - // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_in SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); - } - // Second get total out-going lines - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY id", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > $max) - { - // Update overdue transfers - $remove = SQL_NUMROWS($result) - $max; - - // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_out SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); - } - - // Remove old in-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); - $REMOVE = SQL_AFFECTEDROWS($link); - - // Remove old out-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); - $REMOVE += SQL_AFFECTEDROWS($link); - - // Only send email to admin(s) when we have removed entries - if ($REMOVE > 0) - { - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(TRANSFER_ADMIN_AUTOPURGE, "admin_transfer_ap", $REMOVE, 0); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_transfer_ap", $REMOVE, 0); - SEND_ADMIN_EMAILS(TRANSFER_ADMIN_AUTOPURGE, $msg); - } - } -} -// -?> + $max) + { + // Update overdue transfers + $remove = SQL_NUMROWS($result) - $max; + + // This will make it really old, so the final removal query will find it + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_in SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); + } + // Second get total out-going lines + $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY id", __FILE__, __LINE__); + if (SQL_NUMROWS($result) > $max) + { + // Update overdue transfers + $remove = SQL_NUMROWS($result) - $max; + + // This will make it really old, so the final removal query will find it + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_out SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); + } + + // Remove old in-going transfers + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); + $REMOVE = SQL_AFFECTEDROWS($link); + + // Remove old out-going transfers + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans < ".(time() - $age), __FILE__, __LINE__); + $REMOVE += SQL_AFFECTEDROWS($link); + + // Only send email to admin(s) when we have removed entries + if ($REMOVE > 0) + { + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(TRANSFER_ADMIN_AUTOPURGE, "admin_transfer_ap", $REMOVE, 0); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_transfer_ap", $REMOVE, 0); + SEND_ADMIN_EMAILS(TRANSFER_ADMIN_AUTOPURGE, $msg); + } + } +} +// +?> diff --git a/0.2.1/inc/libs/user_functions.php b/0.2.1/inc/libs/user_functions.php index bd20394892..4701307d3d 100644 --- a/0.2.1/inc/libs/user_functions.php +++ b/0.2.1/inc/libs/user_functions.php @@ -1,226 +1,226 @@ -".$ltr.""; - } - else - { - // Output link to letter - $OUT .= "".$ltr.""; - } - if ((($counter / $CONFIG['user_alpha']) == round($counter / $CONFIG['user_alpha'])) && ($counter > 0)) - { - $OUT .= " ]
[ "; - } - elseif ( $counter != $num ) - { - $OUT .= " | "; - } - } - define('__ALPHA_LIST', $OUT); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_alpha", true); - if ($return) - { - // Return generated code - return $OUT; - } - else - { - // Output generated code - OUTPUT_HTML ($OUT); - } -} -// -function SortLinks($letter, $sortby, $colspan, $return=false) -{ - $OUT = ""; - if (empty($_GET['offset'])) $_GET['offset'] = "0"; - $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; - if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); - - // Makes order by links.. - if ($letter == "front") $letter = _ALL2; - - // Prepare array with all possible sorters - $list = array( - 'userid' => _UID, - 'family' => FAMILY_NAME, - 'email' => ADDY, - 'REMOTE_ADDR' => REMOTE_IP - ); - - // Add nickname if extension is installed - if (EXT_IS_ACTIVE("nickname")) { - $list['nickname'] = NICKNAME; - } - - foreach ($list as $sort=>$title) { - if ($sortby == $sort) { - $OUT .= "".$title." | "; - } else { - $OUT .= "".$title." | "; - } - } - define('__SORT_LIST', substr($OUT, 0, -13)); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_sort", true); - if ($return) - { - // Return code - return $OUT; - } - else - { - // Output code - OUTPUT_HTML ($OUT); - } -} -// -function ADD_PAGENAV($PAGES, $offset, $show_form, $colspan,$return=false) -{ - if (!$show_form) - { - // Empty row - define('__FORM_HEADER', " "); - } - else - { - // Load form for changing number of lines - define('__FORM_HEADER', LOAD_TEMPLATE("admin_list_user_sort_form", true)); - } - if (!$show_form) - { - // Add line with bottom border - define('__FORM_FOOTER', " "); - } - else - { - // Add line without bottom border - define('__FORM_FOOTER', " "); - } - - $OUT = ""; - for ($page = 1; $page <= $PAGES; $page++) - { - if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) - { - $OUT .= "-"; - } - else - { - if (empty($_GET['letter'])) $_GET['letter'] = _ALL2; - if (empty($_GET['sortby'])) $_GET['sortby'] = "userid"; - $OUT .= ""; - } - $OUT .= $page; - if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) - { - $OUT .= "-"; - } - else - { - $OUT .= ""; - } - if ($page < $PAGES) $OUT .= " | "; - } - define('__PAGENAV_LIST', $OUT); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_pagenav", true); - if ($return) - { - // Return code - return $OUT; - } - else - { - // Output code - OUTPUT_HTML ($OUT); - } -} -// Create email link to user's account -function USER_CREATE_EMAIL_LINK($email, $mod="admin") -{ - $locked = " AND status='CONFIRMED'"; - if (IS_ADMIN()) $locked = ""; - $result = SQL_QUERY_ESC("SELECT userid -FROM "._MYSQL_PREFIX."_user_data -WHERE email='%s'".$locked." LIMIT 1", - array($email), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Load userid - list($uid) = SQL_FETCHROW($result); - - // Rewrite email address to contact link - $email = URL."/modules.php?module=".$mod."&what=user_contct&u_id=".bigintval($uid); - } - - // Free memory - SQL_FREERESULT($result); - - // Return rewritten (?) email address - return $email; -} -// -?> +".$ltr.""; + } + else + { + // Output link to letter + $OUT .= "".$ltr.""; + } + if ((($counter / $CONFIG['user_alpha']) == round($counter / $CONFIG['user_alpha'])) && ($counter > 0)) + { + $OUT .= " ]
[ "; + } + elseif ( $counter != $num ) + { + $OUT .= " | "; + } + } + define('__ALPHA_LIST', $OUT); + + // Load template + $OUT = LOAD_TEMPLATE("admin_list_user_alpha", true); + if ($return) + { + // Return generated code + return $OUT; + } + else + { + // Output generated code + OUTPUT_HTML ($OUT); + } +} +// +function SortLinks($letter, $sortby, $colspan, $return=false) +{ + $OUT = ""; + if (empty($_GET['offset'])) $_GET['offset'] = "0"; + $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; + if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); + + // Makes order by links.. + if ($letter == "front") $letter = _ALL2; + + // Prepare array with all possible sorters + $list = array( + 'userid' => _UID, + 'family' => FAMILY_NAME, + 'email' => ADDY, + 'REMOTE_ADDR' => REMOTE_IP + ); + + // Add nickname if extension is installed + if (EXT_IS_ACTIVE("nickname")) { + $list['nickname'] = NICKNAME; + } + + foreach ($list as $sort=>$title) { + if ($sortby == $sort) { + $OUT .= "".$title." | "; + } else { + $OUT .= "".$title." | "; + } + } + define('__SORT_LIST', substr($OUT, 0, -13)); + + // Load template + $OUT = LOAD_TEMPLATE("admin_list_user_sort", true); + if ($return) + { + // Return code + return $OUT; + } + else + { + // Output code + OUTPUT_HTML ($OUT); + } +} +// +function ADD_PAGENAV($PAGES, $offset, $show_form, $colspan,$return=false) +{ + if (!$show_form) + { + // Empty row + define('__FORM_HEADER', " "); + } + else + { + // Load form for changing number of lines + define('__FORM_HEADER', LOAD_TEMPLATE("admin_list_user_sort_form", true)); + } + if (!$show_form) + { + // Add line with bottom border + define('__FORM_FOOTER', " "); + } + else + { + // Add line without bottom border + define('__FORM_FOOTER', " "); + } + + $OUT = ""; + for ($page = 1; $page <= $PAGES; $page++) + { + if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) + { + $OUT .= "-"; + } + else + { + if (empty($_GET['letter'])) $_GET['letter'] = _ALL2; + if (empty($_GET['sortby'])) $_GET['sortby'] = "userid"; + $OUT .= ""; + } + $OUT .= $page; + if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) + { + $OUT .= "-"; + } + else + { + $OUT .= ""; + } + if ($page < $PAGES) $OUT .= " | "; + } + define('__PAGENAV_LIST', $OUT); + + // Load template + $OUT = LOAD_TEMPLATE("admin_list_user_pagenav", true); + if ($return) + { + // Return code + return $OUT; + } + else + { + // Output code + OUTPUT_HTML ($OUT); + } +} +// Create email link to user's account +function USER_CREATE_EMAIL_LINK($email, $mod="admin") +{ + $locked = " AND status='CONFIRMED'"; + if (IS_ADMIN()) $locked = ""; + $result = SQL_QUERY_ESC("SELECT userid +FROM "._MYSQL_PREFIX."_user_data +WHERE email='%s'".$locked." LIMIT 1", + array($email), __FILE__, __LINE__); + if (SQL_NUMROWS($result) == 1) + { + // Load userid + list($uid) = SQL_FETCHROW($result); + + // Rewrite email address to contact link + $email = URL."/modules.php?module=".$mod."&what=user_contct&u_id=".bigintval($uid); + } + + // Free memory + SQL_FREERESULT($result); + + // Return rewritten (?) email address + return $email; +} +// +?> diff --git a/0.2.1/inc/libs/wernis_functions.php b/0.2.1/inc/libs/wernis_functions.php index 1ea27b8dbe..c96ac9e968 100644 --- a/0.2.1/inc/libs/wernis_functions.php +++ b/0.2.1/inc/libs/wernis_functions.php @@ -1,42 +1,42 @@ - + diff --git a/0.2.1/inc/load_cache.php b/0.2.1/inc/load_cache.php index e2d194df50..6458778e67 100644 --- a/0.2.1/inc/load_cache.php +++ b/0.2.1/inc/load_cache.php @@ -1,407 +1,407 @@ -cache_file("admins", true) == true)) -{ - // Load cache - global $ADMINS; - $ADMINS = $CACHE->cache_load(); - - // Check if valid - if (is_array($ADMINS['login']) && is_array($ADMINS['def_acl']) && is_array($ADMINS['aid'])) - { - // Check count - if (count($ADMINS['login']) == count($ADMINS['aid']) && count($ADMINS['login']) == count($ADMINS['def_acl']) && count($ADMINS['aid']) == count($ADMINS['def_acl'])) - { - //* DEBUG: */ echo "
";
-			//* DEBUG: */ print_r($ADMINS);
-
-			// The cache file seems to be fine
-			foreach ($ADMINS['login'] as $k=>$login)
-			{
-				// Rewrite default_acl
-				$ADMINS['aid'][$login]      = $ADMINS['aid'][$k];
-				$ADMINS['password'][$login] = $ADMINS['password'][$k];
-				$ADMINS['email'][$login]    = $ADMINS['email'][$k];
-
-				// Some extra data depening on version
-				if (GET_EXT_VERSION("admins") >= "0.3")
-				{
-					$ADMINS['def_acl'][$login]  = $ADMINS['def_acl'][$k];
-					if (GET_EXT_VERSION("admins") >= "0.6.7")
-					{
-						$ADMINS['la_mode'][$login]  = $ADMINS['la_mode'][$k];
-					}
-				}
-
-				//* DEBUG: */ print_r($ADMINS);
-
-				// Clear array
-				unset($ADMINS['aid'][$k]);
-				unset($ADMINS['def_acl'][$k]);
-				unset($ADMINS['la_mode'][$k]);
-				unset($ADMINS['password'][$k]);
-				unset($ADMINS['email'][$k]);
-			}
-
-			//* DEBUG: */ print_r($ADMINS);
-
-			// Rewrite Login
-			foreach ($ADMINS['login'] as $k=>$login)
-			{
-				$ADMINS['login'][$ADMINS['aid'][$login]] = $login;
-				if (!in_array($k, $ADMINS['aid']))
-				{
-					unset($ADMINS['login'][$k]);
-				}
-			}
-
-			//* DEBUG: */ echo "****\n";
-			//* DEBUG: */ print_r($ADMINS);
-			//* DEBUG: */ echo "
"; - //* DEBUG: */ die(); - } - else - { - // Nope, cache file is corrupted! - $CACHE->cache_destroy(); - } - } - else - { - // Nope, cache file is corrupted! - $CACHE->cache_destroy(); - unset($ADMINS); - } -} - elseif (($CONFIG['cache_admins'] == "Y") && ($CSS != "1") && ($CSS != "-1")) -{ - // Create cache file - $CACHE->cache_init("ADMINS"); - - // Load every data from DB to cache file - $ADD = ", id, id"; - if (GET_EXT_VERSION("admins") >= "0.3") $ADD = ", default_acl AS def_acl"; - if (GET_EXT_VERSION("admins") >= "0.6.7") $ADD .= ", la_mode"; - - $result_admins = SQL_QUERY("SELECT id AS aid, login, password, email".$ADD." -FROM "._MYSQL_PREFIX."_admins -ORDER BY login", __FILE__, __LINE__); - while($dummy = SQL_FETCHARRAY($result_admins)) - { - // Save row - $CACHE->add_row($dummy); - } - - // Free memory - SQL_FREERESULT($result_admins); -} - -// Close file -$CACHE->cache_close(); - -// Next cached table is the module registry (mod_reg)... -if ($CACHE->cache_file("mod_reg", true) == true) -{ - // Load cache - global $MODULES; - $MODULES = $CACHE->cache_load(); - - // Valid cache file - $CNT = 0; - foreach ($MODULES as $k=>$array) - { - $CNT += count($array); - } - - // When there is a period (.) in the result this test will fail and so the cache file is - // damaged/corrupted - $TEST = "failed"; - if (count($MODULES) > 0 ) $TEST = ($CNT / (count($MODULES))); - if ($TEST != bigintval($TEST)) - { - // Cache file is corrupted! - $CACHE->cache_destroy(); - unset($MODULES); - } - else - { - // Rewrite module cache - $MOD = $MODULES; - foreach ($MODULES['module'] as $key=>$mod) - { - $MODULES['id'][$mod] = $MODULES['id'][$key]; - unset($MODULES['id'][$key]); - $MODULES['title'][$mod] = $MODULES['title'][$key]; - unset($MODULES['title'][$key]); - $MODULES['locked'][$mod] = $MODULES['locked'][$key]; - unset($MODULES['locked'][$key]); - $MODULES['hidden'][$mod] = $MODULES['hidden'][$key]; - unset($MODULES['hidden'][$key]); - $MODULES['admin_only'][$mod] = $MODULES['admin_only'][$key]; - unset($MODULES['admin_only'][$key]); - $MODULES['mem_only'][$mod] = $MODULES['mem_only'][$key]; - unset($MODULES['mem_only'][$key]); - $MODULES['has_menu'][$mod] = $MODULES['has_menu'][$key]; - unset($MODULES['has_menu'][$key]); - } - } -} - elseif (($CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) -{ - // Create cache file here - $CACHE->cache_init("MODULES"); - - // 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__); - } - while ($DATA = SQL_FETCHARRAY($result)) - { - // Add row to cache file - $CACHE->add_row($DATA); - } - - // Free memory - SQL_FREERESULT($result); -} - -// Close file -$CACHE->cache_close(); - -// Next cached table is the configuration (config)... -if ($CACHE->cache_file("config", true) == true) -{ - // Load config from cache - global $CFG_CACHE; - $CFG_CACHE = $CACHE->cache_load(); - - // Valid cache file - $CNT = 0; - foreach ($CFG_CACHE as $k=>$array) - { - $CNT += count($array); - } - - // When there is a period (.) in the result this test will fail and so the cache file is - // damaged/corrupted - $TEST = "failed"; - if (count($CFG_CACHE) > 0 ) $TEST = ($CNT / (count($CFG_CACHE))); - if ($TEST != bigintval($TEST)) - { - // Cache file is corrupted! - $CACHE->cache_destroy(); - unset($CFG_CACHE); - } -} - elseif (($CONFIG['cache_config'] == "Y") && ($CSS != "1") && ($CSS != "-1")) -{ - // Create cache file here - $CACHE->cache_init("CONFIG"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX."_config ORDER BY config", __FILE__, __LINE__); - while ($DATA = SQL_FETCHARRAY($result)) - { - // Add row to cache file - $CACHE->add_row($DATA); - } - - // Free memory - SQL_FREERESULT($result); -} - -// Close file -$CACHE->cache_close(); - -// Next cached table is the referral system (refsystem)... -if ($CACHE->cache_file("refsystem", true) == true) -{ - // Load referral system from cache - global $REF_SYSTEM; - $REF_SYSTEM = $CACHE->cache_load(); - - // Valid cache file - $CNT = 0; - foreach ($REF_SYSTEM as $k=>$array) - { - $CNT += count($array); - } - - // When there is a period (.) in the result this test will fail and so the cache file is - // damaged/corrupted - $TEST = "failed"; - if (count($REF_SYSTEM) > 0 ) $TEST = ($CNT / (count($REF_SYSTEM))); - if ($TEST != bigintval($TEST)) - { - // Cache file is corrupted! - $CACHE->cache_destroy(); - unset($REF_SYSTEM); - } -} - elseif (($CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) -{ - // Create cache file here - $CACHE->cache_init("REFSYSTEM"); - - // 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)) - { - // Add row to cache file - $CACHE->add_row($DATA); - } - - // Free memory - SQL_FREERESULT($result); -} - -// Close file -$CACHE->cache_close(); - -// Next cached table is the referral system (refdepths)... -if ($CACHE->cache_file("refdepths", true) == true) -{ - // Load referral system from cache - global $REF_DEPTHS; - $REF_DEPTHS = $CACHE->cache_load(); - - // Valid cache file - $CNT = 0; - foreach ($REF_DEPTHS as $k=>$array) - { - $CNT += count($array); - } - - // When there is a period (.) in the result this test will fail and so the cache file is - // damaged/corrupted - $TEST = "failed"; - if (count($REF_DEPTHS) > 0 ) $TEST = ($CNT / (count($REF_DEPTHS))); - if ($TEST != bigintval($TEST)) - { - // Cache file is corrupted! - $CACHE->cache_destroy(); - unset($REF_DEPTHS); - } -} - elseif (($CONFIG['cache_refdepth'] == "Y") && ($CSS != "1") && ($CSS != "-1")) -{ - // Create cache file here - $CACHE->cache_init("REFDEPTHS"); - - // 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)) - { - // Add row to cache file - $CACHE->add_row($DATA); - } - - // Free memory - SQL_FREERESULT($result); -} - -// Close file -$CACHE->cache_close(); - -// Next cached table is the referral system (admins_acls)... -if (GET_EXT_VERSION("admins") >= "0.3") -{ - // Check for cache file - if ($CACHE->cache_file("admins_acls", true) == true) - { - // Load referral system from cache - global $ADMINS_ACLS; - $ADMINS_ACLS = $CACHE->cache_load(); - - // Valid cache file - $CNT = 0; - foreach ($ADMINS_ACLS as $k=>$array) - { - $CNT += count($array); - } - - // When there is a period (.) in the result this test will fail and so the cache file is - // damaged/corrupted - if (count($ADMINS_ACLS) > 0) - { - $TEST = "failed"; - if (count($ADMINS_ACLS) > 0 ) $TEST = ($CNT / (count($ADMINS_ACLS))); - if ($TEST != bigintval($TEST)) - { - // Cache file is corrupted! - $CACHE->cache_destroy(); - unset($ADMINS_ACLS); - } - } - } - elseif (($CONFIG['cache_acls'] == "Y") && ($CSS != "1") && ($CSS != "-1")) - { - // Create cache file here - $CACHE->cache_init("ADMINS_ACLS"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__); - while ($DATA = SQL_FETCHARRAY($result)) - { - // Add row to cache file - $CACHE->add_row($DATA); - } - - // Free memory - SQL_FREERESULT($result); - } - - // Close file - $CACHE->cache_close(); -} - -// -?> +cache_file("admins", true) == true)) +{ + // Load cache + global $ADMINS; + $ADMINS = $CACHE->cache_load(); + + // Check if valid + if (is_array($ADMINS['login']) && is_array($ADMINS['def_acl']) && is_array($ADMINS['aid'])) + { + // Check count + if (count($ADMINS['login']) == count($ADMINS['aid']) && count($ADMINS['login']) == count($ADMINS['def_acl']) && count($ADMINS['aid']) == count($ADMINS['def_acl'])) + { + //* DEBUG: */ echo "
";
+			//* DEBUG: */ print_r($ADMINS);
+
+			// The cache file seems to be fine
+			foreach ($ADMINS['login'] as $k=>$login)
+			{
+				// Rewrite default_acl
+				$ADMINS['aid'][$login]      = $ADMINS['aid'][$k];
+				$ADMINS['password'][$login] = $ADMINS['password'][$k];
+				$ADMINS['email'][$login]    = $ADMINS['email'][$k];
+
+				// Some extra data depening on version
+				if (GET_EXT_VERSION("admins") >= "0.3")
+				{
+					$ADMINS['def_acl'][$login]  = $ADMINS['def_acl'][$k];
+					if (GET_EXT_VERSION("admins") >= "0.6.7")
+					{
+						$ADMINS['la_mode'][$login]  = $ADMINS['la_mode'][$k];
+					}
+				}
+
+				//* DEBUG: */ print_r($ADMINS);
+
+				// Clear array
+				unset($ADMINS['aid'][$k]);
+				unset($ADMINS['def_acl'][$k]);
+				unset($ADMINS['la_mode'][$k]);
+				unset($ADMINS['password'][$k]);
+				unset($ADMINS['email'][$k]);
+			}
+
+			//* DEBUG: */ print_r($ADMINS);
+
+			// Rewrite Login
+			foreach ($ADMINS['login'] as $k=>$login)
+			{
+				$ADMINS['login'][$ADMINS['aid'][$login]] = $login;
+				if (!in_array($k, $ADMINS['aid']))
+				{
+					unset($ADMINS['login'][$k]);
+				}
+			}
+
+			//* DEBUG: */ echo "****\n";
+			//* DEBUG: */ print_r($ADMINS);
+			//* DEBUG: */ echo "
"; + //* DEBUG: */ die(); + } + else + { + // Nope, cache file is corrupted! + $CACHE->cache_destroy(); + } + } + else + { + // Nope, cache file is corrupted! + $CACHE->cache_destroy(); + unset($ADMINS); + } +} + elseif (($CONFIG['cache_admins'] == "Y") && ($CSS != "1") && ($CSS != "-1")) +{ + // Create cache file + $CACHE->cache_init("ADMINS"); + + // Load every data from DB to cache file + $ADD = ", id, id"; + if (GET_EXT_VERSION("admins") >= "0.3") $ADD = ", default_acl AS def_acl"; + if (GET_EXT_VERSION("admins") >= "0.6.7") $ADD .= ", la_mode"; + + $result_admins = SQL_QUERY("SELECT id AS aid, login, password, email".$ADD." +FROM "._MYSQL_PREFIX."_admins +ORDER BY login", __FILE__, __LINE__); + while($dummy = SQL_FETCHARRAY($result_admins)) + { + // Save row + $CACHE->add_row($dummy); + } + + // Free memory + SQL_FREERESULT($result_admins); +} + +// Close file +$CACHE->cache_close(); + +// Next cached table is the module registry (mod_reg)... +if ($CACHE->cache_file("mod_reg", true) == true) +{ + // Load cache + global $MODULES; + $MODULES = $CACHE->cache_load(); + + // Valid cache file + $CNT = 0; + foreach ($MODULES as $k=>$array) + { + $CNT += count($array); + } + + // When there is a period (.) in the result this test will fail and so the cache file is + // damaged/corrupted + $TEST = "failed"; + if (count($MODULES) > 0 ) $TEST = ($CNT / (count($MODULES))); + if ($TEST != bigintval($TEST)) + { + // Cache file is corrupted! + $CACHE->cache_destroy(); + unset($MODULES); + } + else + { + // Rewrite module cache + $MOD = $MODULES; + foreach ($MODULES['module'] as $key=>$mod) + { + $MODULES['id'][$mod] = $MODULES['id'][$key]; + unset($MODULES['id'][$key]); + $MODULES['title'][$mod] = $MODULES['title'][$key]; + unset($MODULES['title'][$key]); + $MODULES['locked'][$mod] = $MODULES['locked'][$key]; + unset($MODULES['locked'][$key]); + $MODULES['hidden'][$mod] = $MODULES['hidden'][$key]; + unset($MODULES['hidden'][$key]); + $MODULES['admin_only'][$mod] = $MODULES['admin_only'][$key]; + unset($MODULES['admin_only'][$key]); + $MODULES['mem_only'][$mod] = $MODULES['mem_only'][$key]; + unset($MODULES['mem_only'][$key]); + $MODULES['has_menu'][$mod] = $MODULES['has_menu'][$key]; + unset($MODULES['has_menu'][$key]); + } + } +} + elseif (($CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) +{ + // Create cache file here + $CACHE->cache_init("MODULES"); + + // 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__); + } + while ($DATA = SQL_FETCHARRAY($result)) + { + // Add row to cache file + $CACHE->add_row($DATA); + } + + // Free memory + SQL_FREERESULT($result); +} + +// Close file +$CACHE->cache_close(); + +// Next cached table is the configuration (config)... +if ($CACHE->cache_file("config", true) == true) +{ + // Load config from cache + global $CFG_CACHE; + $CFG_CACHE = $CACHE->cache_load(); + + // Valid cache file + $CNT = 0; + foreach ($CFG_CACHE as $k=>$array) + { + $CNT += count($array); + } + + // When there is a period (.) in the result this test will fail and so the cache file is + // damaged/corrupted + $TEST = "failed"; + if (count($CFG_CACHE) > 0 ) $TEST = ($CNT / (count($CFG_CACHE))); + if ($TEST != bigintval($TEST)) + { + // Cache file is corrupted! + $CACHE->cache_destroy(); + unset($CFG_CACHE); + } +} + elseif (($CONFIG['cache_config'] == "Y") && ($CSS != "1") && ($CSS != "-1")) +{ + // Create cache file here + $CACHE->cache_init("CONFIG"); + + // Load all modules and their data + $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX."_config ORDER BY config", __FILE__, __LINE__); + while ($DATA = SQL_FETCHARRAY($result)) + { + // Add row to cache file + $CACHE->add_row($DATA); + } + + // Free memory + SQL_FREERESULT($result); +} + +// Close file +$CACHE->cache_close(); + +// Next cached table is the referral system (refsystem)... +if ($CACHE->cache_file("refsystem", true) == true) +{ + // Load referral system from cache + global $REF_SYSTEM; + $REF_SYSTEM = $CACHE->cache_load(); + + // Valid cache file + $CNT = 0; + foreach ($REF_SYSTEM as $k=>$array) + { + $CNT += count($array); + } + + // When there is a period (.) in the result this test will fail and so the cache file is + // damaged/corrupted + $TEST = "failed"; + if (count($REF_SYSTEM) > 0 ) $TEST = ($CNT / (count($REF_SYSTEM))); + if ($TEST != bigintval($TEST)) + { + // Cache file is corrupted! + $CACHE->cache_destroy(); + unset($REF_SYSTEM); + } +} + elseif (($CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) +{ + // Create cache file here + $CACHE->cache_init("REFSYSTEM"); + + // 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)) + { + // Add row to cache file + $CACHE->add_row($DATA); + } + + // Free memory + SQL_FREERESULT($result); +} + +// Close file +$CACHE->cache_close(); + +// Next cached table is the referral system (refdepths)... +if ($CACHE->cache_file("refdepths", true) == true) +{ + // Load referral system from cache + global $REF_DEPTHS; + $REF_DEPTHS = $CACHE->cache_load(); + + // Valid cache file + $CNT = 0; + foreach ($REF_DEPTHS as $k=>$array) + { + $CNT += count($array); + } + + // When there is a period (.) in the result this test will fail and so the cache file is + // damaged/corrupted + $TEST = "failed"; + if (count($REF_DEPTHS) > 0 ) $TEST = ($CNT / (count($REF_DEPTHS))); + if ($TEST != bigintval($TEST)) + { + // Cache file is corrupted! + $CACHE->cache_destroy(); + unset($REF_DEPTHS); + } +} + elseif (($CONFIG['cache_refdepth'] == "Y") && ($CSS != "1") && ($CSS != "-1")) +{ + // Create cache file here + $CACHE->cache_init("REFDEPTHS"); + + // 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)) + { + // Add row to cache file + $CACHE->add_row($DATA); + } + + // Free memory + SQL_FREERESULT($result); +} + +// Close file +$CACHE->cache_close(); + +// Next cached table is the referral system (admins_acls)... +if (GET_EXT_VERSION("admins") >= "0.3") +{ + // Check for cache file + if ($CACHE->cache_file("admins_acls", true) == true) + { + // Load referral system from cache + global $ADMINS_ACLS; + $ADMINS_ACLS = $CACHE->cache_load(); + + // Valid cache file + $CNT = 0; + foreach ($ADMINS_ACLS as $k=>$array) + { + $CNT += count($array); + } + + // When there is a period (.) in the result this test will fail and so the cache file is + // damaged/corrupted + if (count($ADMINS_ACLS) > 0) + { + $TEST = "failed"; + if (count($ADMINS_ACLS) > 0 ) $TEST = ($CNT / (count($ADMINS_ACLS))); + if ($TEST != bigintval($TEST)) + { + // Cache file is corrupted! + $CACHE->cache_destroy(); + unset($ADMINS_ACLS); + } + } + } + elseif (($CONFIG['cache_acls'] == "Y") && ($CSS != "1") && ($CSS != "-1")) + { + // Create cache file here + $CACHE->cache_init("ADMINS_ACLS"); + + // Load all modules and their data + $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__); + while ($DATA = SQL_FETCHARRAY($result)) + { + // Add row to cache file + $CACHE->add_row($DATA); + } + + // Free memory + SQL_FREERESULT($result); + } + + // Close file + $CACHE->cache_close(); +} + +// +?> diff --git a/0.2.1/inc/load_extensions.php b/0.2.1/inc/load_extensions.php index 8bffaaa7fb..91a3fb690c 100644 --- a/0.2.1/inc/load_extensions.php +++ b/0.2.1/inc/load_extensions.php @@ -1,345 +1,345 @@ - "Y"); // KEEP THIS ALWAYS ACTIVE! -} - else -{ - // Initialize array for "always keep active extensions" - $KEEP_ACTIVE = array(); -} - -// -// Load extensions -// -if (EXT_IS_ACTIVE("cache")) -{ - // Load cache extension alone - include_once(PATH."inc/libs/cache_functions.php"); - $CACHE_FILE = ""; - include_once(PATH."inc/extensions/ext-cache.php"); - switch($CACHE->cache_file("extensions", true)) - { - case true : $CACHE_FILE = "load"; break; - case false: $CACHE_FILE = "init"; break; - } - - // Do not recreate cache file when it's switched off! - if (($CACHE_FILE == "init") && ($CONFIG['cache_exts'] == "N")) $CACHE_FILE = "skip"; - - // Load language - if ($CACHE_FILE == "load") include(PATH."inc/language/cache_".GET_LANGUAGE().".php"); -} - else -{ - $CACHE_FILE = "no"; -} - -if ($CACHE_FILE == "load") -{ - // Load more cache files (like admins) - require_once(PATH."inc/load_cache.php"); - - // Re-initialize handler - $CACHE->cache_file("extensions", true); - - // Load extension data from cache file - $EXT_DUMMY = $CACHE->cache_load(); - foreach ($EXT_DUMMY['ext_name'] as $k=>$name) - { - // Load functions file - if ($EXT_DUMMY['ext_funcs'][$k] == "Y") require_once(PATH."inc/libs/".$name."_functions.php"); - - // Load Language file - if ($EXT_DUMMY['ext_lang'][$k] == "Y") - { - $INC = sprintf(PATH."inc/language/%s_%s.php", $name, GET_LANGUAGE()); - if (file_exists($INC)) require_once($INC); - } - - // Load CSS file - if ($EXT_DUMMY['ext_css'][$k] == "Y") $EXT_CSS_FILES[] = "".$name.".css"; - - // Load extension file itself - if (($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) - { - require_once(PATH."inc/extensions/ext-".$name.".php"); - } - - // Transfer version number and active status - $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; - unset($EXT_DUMMY['ext_version'][$k]); - $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; - unset($EXT_DUMMY['ext_active'][$k]); - $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; - unset($EXT_DUMMY['ext_menu'][$k]); - $KEEP_ACTIVE['$name'] = $EXT_DUMMY['ext_keep'][$k]; - unset($EXT_DUMMY['ext_keep'][$k]); - $k2 = $EXT_DUMMY['ext_id'][$k]; - $EXT_DUMMY['ext_id'][$k2] = $name; - if ($k2 != $k) unset($EXT_DUMMY['ext_id'][$k]); - - // Remove unneccessary data from memory - unset($EXT_DUMMY['ext_lang'][$k]); - unset($EXT_DUMMY['ext_css'][$k]); - unset($EXT_DUMMY['ext_funcs'][$k]); - } - - // Close cache file - $CACHE->cache_close(); - - // Loading cache is done so let's free some memory! - unset($EXT_DUMMY['ext_lang']); - unset($EXT_DUMMY['ext_keep']); - unset($EXT_DUMMY['ext_css']); - unset($EXT_DUMMY['ext_funcs']); - $EXTENSIONS = $EXT_DUMMY; - unset($EXT_DUMMY); - - // No database load needed - $res_ext_crt = false; -} - else -{ - // If current user is not admin load only activated extensions - // The admin shall use every available extension for testing purposes - if (!IS_ADMIN()) $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, ext_name, ext_lang_file, ext_has_css, ext_active, ext_version -FROM "._MYSQL_PREFIX."_extensions".$ADD." -ORDER BY ext_name", __FILE__, __LINE__); - } - else - { - // Old obsulete query string - $res_ext_crt = SQL_QUERY("SELECT id, ext_name, ext_lang_file, 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) && (($CACHE_FILE == "init") || ($CACHE_FILE == "no")) && ($CSS != "1") && ($CSS != "-1")) -{ - // Load theme management - require_once(PATH."inc/theme-manager.php"); - - // If we need to init the cache init it now - if ($CACHE_FILE == "init") $CACHE->cache_init("EXTENSIONS"); - - // Extensions are registered so we load them - while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) - { - // Get menu entry - $result_menu = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", - array($name), __FILE__, __LINE__); - list($menu) = SQL_FETCHROW($result_menu); - //* DEBUG: */ echo "*".$name."/".$menu."*
"; - - // An empty menu entry will be interpreted as N (no menu) to avoid problems - if (empty($menu)) $menu = "N"; - - // Load extensions - $file1 = sprintf(PATH."inc/extensions/ext-%s.php", $name); - $file2 = $file1; $EXT_CSS = "N"; $EXT_ALWAYS_ACTIVE = "N"; - - // Special functions file - $file3 = sprintf(PATH."inc/libs/%s_functions.php", $name); - - // Does the extension file exists? - if (file_exists($file1) && is_readable($file1)) - { - // If there's no language file specified we don't need to load one... ;-) - if (!empty($lang)) { - // Create language file - $file2 = sprintf(PATH."inc/language/%s_%s.php", $lang, GET_LANGUAGE()); - } - - if (file_exists($file3) && is_readable($file3)) - { - // Special functions file - $funcs = "Y"; - require_once($file3); - } - else - { - // Don't load functions file - $funcs = "N"; - } - - // Do we need a language file? - if (($file1 != $file2) && (file_exists($file2)) && (is_readable($file2))) - { - // Load language file - $lang = "Y"; - include($file2); - } - else - { - // Don't load language file - $lang = "N"; - } - - // Load extension - if ($name != "sql_patches") - { - // Load extension's file - include_once($file1); - } - else - { - // KEEP sql_patches ALWAYS ACTIVE! - $EXT_ALWAYS_ACTIVE = "Y"; - } - - if ($css == "Y") - { - $CSS_FILE = PATH."theme/".GET_CURR_THEME()."/css/".$name.".css"; - if (file_exists($CSS_FILE)) - { - // CSS file for extension was found (use only relative path for now!) - $EXT_CSS_FILES[] = $name.".css"; - } - else - { - // Don't load CSS file - $css = "N"; - } - } - - // Add cache row - if ($CACHE_FILE == "init") - { - $CACHE->add_row(array( - 'ext_id' => $EXT_ID, - 'ext_name' => $name, - 'ext_lang' => $lang, - 'ext_css' => $css, - 'ext_menu' => $menu, - 'ext_funcs' => $funcs, - 'ext_active' => $active, - 'ext_version' => $version, - 'ext_keep' => $EXT_ALWAYS_ACTIVE, - )); - } - elseif ($CACHE_FILE == "no") - { - // Remember this value for later usage - $KEEP_ACTIVE[$name] = $EXT_ALWAYS_ACTIVE; - } - } - elseif (!file_exists($file1)) - { - // Deleted extension file so we mark it for removal from DB - $DEL[] = $name; - } - } - - if ($CACHE_FILE == "init") - { - // Close cache file - $CACHE->cache_close(); - - // Load more cache files (like admins) - require_once(PATH."inc/load_cache.php"); - } -} - -// Free memory -SQL_FREERESULT($res_ext_crt); - -// Compile configuration system -/** - * Commented out... - * - *foreach ($CONFIG as $k=>$v) - *{ - * $CONFIG[$k] = COMPILE_CODE($v); - *} - */ - -// Load include files -if (!empty($INC_POOL[0])) -{ - foreach ($INC_POOL as $inc) - { - require_once($inc); - } -} - -// 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 $name) - { - // First remove entry from extensions table - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", - array($name), __FILE__, __LINE__); - - // Remove (maybe?) found tasks (main task and possible updates - $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')", - array($name), __FILE__, __LINE__); - } - - // 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? -} -// -?> + "Y"); // KEEP THIS ALWAYS ACTIVE! +} + else +{ + // Initialize array for "always keep active extensions" + $KEEP_ACTIVE = array(); +} + +// +// Load extensions +// +if (EXT_IS_ACTIVE("cache")) +{ + // Load cache extension alone + include_once(PATH."inc/libs/cache_functions.php"); + $CACHE_FILE = ""; + include_once(PATH."inc/extensions/ext-cache.php"); + switch($CACHE->cache_file("extensions", true)) + { + case true : $CACHE_FILE = "load"; break; + case false: $CACHE_FILE = "init"; break; + } + + // Do not recreate cache file when it's switched off! + if (($CACHE_FILE == "init") && ($CONFIG['cache_exts'] == "N")) $CACHE_FILE = "skip"; + + // Load language + if ($CACHE_FILE == "load") include(PATH."inc/language/cache_".GET_LANGUAGE().".php"); +} + else +{ + $CACHE_FILE = "no"; +} + +if ($CACHE_FILE == "load") +{ + // Load more cache files (like admins) + require_once(PATH."inc/load_cache.php"); + + // Re-initialize handler + $CACHE->cache_file("extensions", true); + + // Load extension data from cache file + $EXT_DUMMY = $CACHE->cache_load(); + foreach ($EXT_DUMMY['ext_name'] as $k=>$name) + { + // Load functions file + if ($EXT_DUMMY['ext_funcs'][$k] == "Y") require_once(PATH."inc/libs/".$name."_functions.php"); + + // Load Language file + if ($EXT_DUMMY['ext_lang'][$k] == "Y") + { + $INC = sprintf(PATH."inc/language/%s_%s.php", $name, GET_LANGUAGE()); + if (file_exists($INC)) require_once($INC); + } + + // Load CSS file + if ($EXT_DUMMY['ext_css'][$k] == "Y") $EXT_CSS_FILES[] = "".$name.".css"; + + // Load extension file itself + if (($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) + { + require_once(PATH."inc/extensions/ext-".$name.".php"); + } + + // Transfer version number and active status + $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; + unset($EXT_DUMMY['ext_version'][$k]); + $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; + unset($EXT_DUMMY['ext_active'][$k]); + $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; + unset($EXT_DUMMY['ext_menu'][$k]); + $KEEP_ACTIVE['$name'] = $EXT_DUMMY['ext_keep'][$k]; + unset($EXT_DUMMY['ext_keep'][$k]); + $k2 = $EXT_DUMMY['ext_id'][$k]; + $EXT_DUMMY['ext_id'][$k2] = $name; + if ($k2 != $k) unset($EXT_DUMMY['ext_id'][$k]); + + // Remove unneccessary data from memory + unset($EXT_DUMMY['ext_lang'][$k]); + unset($EXT_DUMMY['ext_css'][$k]); + unset($EXT_DUMMY['ext_funcs'][$k]); + } + + // Close cache file + $CACHE->cache_close(); + + // Loading cache is done so let's free some memory! + unset($EXT_DUMMY['ext_lang']); + unset($EXT_DUMMY['ext_keep']); + unset($EXT_DUMMY['ext_css']); + unset($EXT_DUMMY['ext_funcs']); + $EXTENSIONS = $EXT_DUMMY; + unset($EXT_DUMMY); + + // No database load needed + $res_ext_crt = false; +} + else +{ + // If current user is not admin load only activated extensions + // The admin shall use every available extension for testing purposes + if (!IS_ADMIN()) $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, ext_name, ext_lang_file, ext_has_css, ext_active, ext_version +FROM "._MYSQL_PREFIX."_extensions".$ADD." +ORDER BY ext_name", __FILE__, __LINE__); + } + else + { + // Old obsulete query string + $res_ext_crt = SQL_QUERY("SELECT id, ext_name, ext_lang_file, 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) && (($CACHE_FILE == "init") || ($CACHE_FILE == "no")) && ($CSS != "1") && ($CSS != "-1")) +{ + // Load theme management + require_once(PATH."inc/theme-manager.php"); + + // If we need to init the cache init it now + if ($CACHE_FILE == "init") $CACHE->cache_init("EXTENSIONS"); + + // Extensions are registered so we load them + while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) + { + // Get menu entry + $result_menu = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1", + array($name), __FILE__, __LINE__); + list($menu) = SQL_FETCHROW($result_menu); + //* DEBUG: */ echo "*".$name."/".$menu."*
"; + + // An empty menu entry will be interpreted as N (no menu) to avoid problems + if (empty($menu)) $menu = "N"; + + // Load extensions + $file1 = sprintf(PATH."inc/extensions/ext-%s.php", $name); + $file2 = $file1; $EXT_CSS = "N"; $EXT_ALWAYS_ACTIVE = "N"; + + // Special functions file + $file3 = sprintf(PATH."inc/libs/%s_functions.php", $name); + + // Does the extension file exists? + if (file_exists($file1) && is_readable($file1)) + { + // If there's no language file specified we don't need to load one... ;-) + if (!empty($lang)) { + // Create language file + $file2 = sprintf(PATH."inc/language/%s_%s.php", $lang, GET_LANGUAGE()); + } + + if (file_exists($file3) && is_readable($file3)) + { + // Special functions file + $funcs = "Y"; + require_once($file3); + } + else + { + // Don't load functions file + $funcs = "N"; + } + + // Do we need a language file? + if (($file1 != $file2) && (file_exists($file2)) && (is_readable($file2))) + { + // Load language file + $lang = "Y"; + include($file2); + } + else + { + // Don't load language file + $lang = "N"; + } + + // Load extension + if ($name != "sql_patches") + { + // Load extension's file + include_once($file1); + } + else + { + // KEEP sql_patches ALWAYS ACTIVE! + $EXT_ALWAYS_ACTIVE = "Y"; + } + + if ($css == "Y") + { + $CSS_FILE = PATH."theme/".GET_CURR_THEME()."/css/".$name.".css"; + if (file_exists($CSS_FILE)) + { + // CSS file for extension was found (use only relative path for now!) + $EXT_CSS_FILES[] = $name.".css"; + } + else + { + // Don't load CSS file + $css = "N"; + } + } + + // Add cache row + if ($CACHE_FILE == "init") + { + $CACHE->add_row(array( + 'ext_id' => $EXT_ID, + 'ext_name' => $name, + 'ext_lang' => $lang, + 'ext_css' => $css, + 'ext_menu' => $menu, + 'ext_funcs' => $funcs, + 'ext_active' => $active, + 'ext_version' => $version, + 'ext_keep' => $EXT_ALWAYS_ACTIVE, + )); + } + elseif ($CACHE_FILE == "no") + { + // Remember this value for later usage + $KEEP_ACTIVE[$name] = $EXT_ALWAYS_ACTIVE; + } + } + elseif (!file_exists($file1)) + { + // Deleted extension file so we mark it for removal from DB + $DEL[] = $name; + } + } + + if ($CACHE_FILE == "init") + { + // Close cache file + $CACHE->cache_close(); + + // Load more cache files (like admins) + require_once(PATH."inc/load_cache.php"); + } +} + +// Free memory +SQL_FREERESULT($res_ext_crt); + +// Compile configuration system +/** + * Commented out... + * + *foreach ($CONFIG as $k=>$v) + *{ + * $CONFIG[$k] = COMPILE_CODE($v); + *} + */ + +// Load include files +if (!empty($INC_POOL[0])) +{ + foreach ($INC_POOL as $inc) + { + require_once($inc); + } +} + +// 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 $name) + { + // First remove entry from extensions table + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", + array($name), __FILE__, __LINE__); + + // Remove (maybe?) found tasks (main task and possible updates + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')", + array($name), __FILE__, __LINE__); + } + + // 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? +} +// +?> diff --git a/0.2.1/inc/mails/_mails.php b/0.2.1/inc/mails/_mails.php index a1dbc7ab1a..f8cf83096f 100644 --- a/0.2.1/inc/mails/_mails.php +++ b/0.2.1/inc/mails/_mails.php @@ -1,50 +1,50 @@ - + diff --git a/0.2.1/inc/mails/beg_mails.php b/0.2.1/inc/mails/beg_mails.php index c4fb2fe756..2391b284d9 100644 --- a/0.2.1/inc/mails/beg_mails.php +++ b/0.2.1/inc/mails/beg_mails.php @@ -1,170 +1,170 @@ - 0 AND beg_ral_en_notify < beg_ral_di_notify)"; - $MODE = "en"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; - -case "N": // Begging rallye is deactivated - if ($CONFIG['beg_ral_di_notify'] == "Y") - { - // Okay, let's check for member accounts - $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify"; - $MODE = "di"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; -} - -if (!empty($SQL)) -{ - // The SQL command needs to be finisched here (only confirmed accounts!) - $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; - - // Prepare data for the template - define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'])); - define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points_max'])); - define('__BEG_MAX_WINNERS', round($CONFIG['beg_ranks'])); - if ($CONFIG['beg_ip_timeout'] == 0) - { - // No IP locking setuped! - define('__BEG_IP_LOCKER', BEG_NO_LIMITATION); - } - else - { - // Create timemark - define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($CONFIG['beg_ip_timeout'])); - } - - // 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? - $MAIL_MODE = (($CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); - - // Generate subject line - $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;"; - eval($eval); - - // Load message body for bonus mails - $MSG = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", "", "{PER}uid{PER}"); - $RECEIVER = ""; $UIDs = array(); - - // Okay lets notify all users! - while(list($uid, $email) = SQL_FETCHROW($result_main)) - { - // Update account - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data -SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%d LIMIT 1", - array(time(), $MODE, time(), $uid), __FILE__, __LINE__); - - // Load email template and send it to the user! - if ($MAIL_MODE) - { - // Add userid to queue - $UIDs[] = $uid; - } - else - { - // Send normal notification mail to the members - $MSG = LOAD_EMAIL_TEMPLATE("beg_".$MODE."_notify", "", $uid); - SEND_EMAIL($email, $SUBJECT, $MSG); - } - } - - // Shall I send out bonus mails? - if ($MAIL_MODE) - { - // Okay, make array to string - $RECEIVER = implode(";", $UIDs); - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus -(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) -VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', '%s', 'Y')", - array( - $SUBJECT, - $MSG, - $RECEIVER, - $CONFIG['beg_notify_bonus'], - $CONFIG['beg_notify_wait'], - URL."/modules.php?module=index&what=login", - 0, - SELECTION_COUNT(explode(";", $RECEIVER)), - SQL_NUMROWS($result_main), -), __FILE__, __LINE__); - } - } - - // Free memory - SQL_FREERESULT($result_main); -} - -// -?> + 0 AND beg_ral_en_notify < beg_ral_di_notify)"; + $MODE = "en"; + } + else + { + // Do not notify! + $SQL = ""; + } + break; + +case "N": // Begging rallye is deactivated + if ($CONFIG['beg_ral_di_notify'] == "Y") + { + // Okay, let's check for member accounts + $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify"; + $MODE = "di"; + } + else + { + // Do not notify! + $SQL = ""; + } + break; +} + +if (!empty($SQL)) +{ + // The SQL command needs to be finisched here (only confirmed accounts!) + $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; + + // Prepare data for the template + define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'])); + define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points_max'])); + define('__BEG_MAX_WINNERS', round($CONFIG['beg_ranks'])); + if ($CONFIG['beg_ip_timeout'] == 0) + { + // No IP locking setuped! + define('__BEG_IP_LOCKER', BEG_NO_LIMITATION); + } + else + { + // Create timemark + define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($CONFIG['beg_ip_timeout'])); + } + + // 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? + $MAIL_MODE = (($CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); + + // Generate subject line + $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;"; + eval($eval); + + // Load message body for bonus mails + $MSG = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", "", "{PER}uid{PER}"); + $RECEIVER = ""; $UIDs = array(); + + // Okay lets notify all users! + while(list($uid, $email) = SQL_FETCHROW($result_main)) + { + // Update account + $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data +SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%d LIMIT 1", + array(time(), $MODE, time(), $uid), __FILE__, __LINE__); + + // Load email template and send it to the user! + if ($MAIL_MODE) + { + // Add userid to queue + $UIDs[] = $uid; + } + else + { + // Send normal notification mail to the members + $MSG = LOAD_EMAIL_TEMPLATE("beg_".$MODE."_notify", "", $uid); + SEND_EMAIL($email, $SUBJECT, $MSG); + } + } + + // Shall I send out bonus mails? + if ($MAIL_MODE) + { + // Okay, make array to string + $RECEIVER = implode(";", $UIDs); + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus +(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) +VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', '%s', 'Y')", + array( + $SUBJECT, + $MSG, + $RECEIVER, + $CONFIG['beg_notify_bonus'], + $CONFIG['beg_notify_wait'], + URL."/modules.php?module=index&what=login", + 0, + SELECTION_COUNT(explode(";", $RECEIVER)), + SQL_NUMROWS($result_main), +), __FILE__, __LINE__); + } + } + + // Free memory + SQL_FREERESULT($result_main); +} + +// +?> diff --git a/0.2.1/inc/mails/birthday_mails.php b/0.2.1/inc/mails/birthday_mails.php index ac9bedd42e..2c3f047dbb 100644 --- a/0.2.1/inc/mails/birthday_mails.php +++ b/0.2.1/inc/mails/birthday_mails.php @@ -1,120 +1,120 @@ - 0) && ($CONFIG['ap_inactive'] == "Y")) -{ - $ADD = " AND last_online >= %d"; - $VALUE = bigintval(time() - $CONFIG['ap_in_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=%d AND birth_month=%d AND birthday_sent < ".(time() - (ONE_DAY*364)).$ADD." -ORDER BY userid", - array($DAY, $MONTH, $VALUE), __FILE__, __LINE__); - -if (SQL_NUMROWS($result_birthday) > 0) -{ - // Start sending out birthday mails - while (list($uid, $email, $byear) = SQL_FETCHROW($result_birthday)) - { - // Calculate own timestamp for birthday and today - $BD = $byear + 12*$MONTH + 365*$DAY; - $NOW = $YEAR + 12*$MONTH + 365*$DAY; - - // Simply subtract both values and you got the age... :) - $AGE = $NOW - $BD; - - if ($CONFIG['birthday_points'] > 0) - { - // Prepare array for loading template - $content = array( - 'age' => $AGE, - 'points' => $CONFIG['birthday_points'], - 'check' => "", - ); - for ($idx = 0; $idx < 4; $idx++) - { - $content['check'] .= GEN_RANDOM_CODE("8", rand(0, "$MONTH$DAY"), $uid, ($AGE*($idx+1))); - } - - // Insert row into database - $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s', '%s', '%s' )", - array(bigintval($uid), $CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); - - // Load email template with confirmation link - $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid)); - } - else - { - // Load default email template and fill in the age - $msg = LOAD_EMAIL_TEMPLATE("member_birthday", $AGE, $uid); - } - - // Send email - SEND_EMAIL($email, HAPPY_BIRTHDAY, $msg); - - // Remember him that he has received a birthday mail - $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); - } - - // Free memory - SQL_FREERESULT($result); -} - -// -?> + 0) && ($CONFIG['ap_inactive'] == "Y")) +{ + $ADD = " AND last_online >= %d"; + $VALUE = bigintval(time() - $CONFIG['ap_in_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=%d AND birth_month=%d AND birthday_sent < ".(time() - (ONE_DAY*364)).$ADD." +ORDER BY userid", + array($DAY, $MONTH, $VALUE), __FILE__, __LINE__); + +if (SQL_NUMROWS($result_birthday) > 0) +{ + // Start sending out birthday mails + while (list($uid, $email, $byear) = SQL_FETCHROW($result_birthday)) + { + // Calculate own timestamp for birthday and today + $BD = $byear + 12*$MONTH + 365*$DAY; + $NOW = $YEAR + 12*$MONTH + 365*$DAY; + + // Simply subtract both values and you got the age... :) + $AGE = $NOW - $BD; + + if ($CONFIG['birthday_points'] > 0) + { + // Prepare array for loading template + $content = array( + 'age' => $AGE, + 'points' => $CONFIG['birthday_points'], + 'check' => "", + ); + for ($idx = 0; $idx < 4; $idx++) + { + $content['check'] .= GEN_RANDOM_CODE("8", rand(0, "$MONTH$DAY"), $uid, ($AGE*($idx+1))); + } + + // Insert row into database + $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s', '%s', '%s' )", + array(bigintval($uid), $CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); + + // Load email template with confirmation link + $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid)); + } + else + { + // Load default email template and fill in the age + $msg = LOAD_EMAIL_TEMPLATE("member_birthday", $AGE, $uid); + } + + // Send email + SEND_EMAIL($email, HAPPY_BIRTHDAY, $msg); + + // Remember him that he has received a birthday mail + $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1", + array(bigintval($uid)), __FILE__, __LINE__); + } + + // Free memory + SQL_FREERESULT($result); +} + +// +?> diff --git a/0.2.1/inc/mails/bonus_mails.php b/0.2.1/inc/mails/bonus_mails.php index 63570a9a24..e265e53f78 100644 --- a/0.2.1/inc/mails/bonus_mails.php +++ b/0.2.1/inc/mails/bonus_mails.php @@ -1,154 +1,154 @@ - 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; - $MODE = "en"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; - -case "N": // Active rallye is deactivated - if ($CONFIG['bonus_di_notify'] == "Y") - { - // Okay, let's check for member accounts - $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; - $MODE = "di"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; -} - -if (!empty($SQL)) -{ - // The SQL command needs to be finisched here (only confirmed accounts!) - $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; - - // Normal notification mails or bonus mails? - $MAIL_MODE = (($CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); - - // Generate subject line - $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;"; - eval($eval); - - // Load message body for bonus mails - $MSG = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", "", "{PER}uid{PER}"); - $RECEIVER = ""; $UIDs = array(); - - // Check for accounts to be notified - $result_main = SQL_QUERY($SQL, __FILE__, __LINE__); - if (SQL_NUMROWS($result_main) > 0) - { - // Okay lets notify all users! - while(list($uid, $email) = SQL_FETCHROW($result_main)) - { - // Update account - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data -SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%d LIMIT 1", - array(time(), $MODE, time(), $uid), __FILE__, __LINE__); - - // Load email template and send it to the user! - if ($MAIL_MODE) - { - // Add userid to queue - $UIDs[] = $uid; - } - else - { - // Send normal notification mail to the members - $MSG = LOAD_EMAIL_TEMPLATE("bonus_".$MODE."_notify", "", $uid); - SEND_EMAIL($email, $SUBJECT, $MSG); - } - } - - // Shall I send out bonus mails? - if ($MAIL_MODE) - { - // Okay, make array to string - $RECEIVER = implode(";", $UIDs); - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus -(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) -VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', '%s', 'Y')", - array( - $SUBJECT, - $MSG, - $RECEIVER, - $CONFIG['bonus_notify_points'], - $CONFIG['bonus_notify_wait'], - URL."/modules.php?module=index&what=login", - 0, - SELECTION_COUNT(explode(";", $RECEIVER)), - SQL_NUMROWS($result_main), -), __FILE__, __LINE__); - } - } - - // Free memory - SQL_FREERESULT($result_main); -} -// -?> + 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; + $MODE = "en"; + } + else + { + // Do not notify! + $SQL = ""; + } + break; + +case "N": // Active rallye is deactivated + if ($CONFIG['bonus_di_notify'] == "Y") + { + // Okay, let's check for member accounts + $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; + $MODE = "di"; + } + else + { + // Do not notify! + $SQL = ""; + } + break; +} + +if (!empty($SQL)) +{ + // The SQL command needs to be finisched here (only confirmed accounts!) + $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; + + // Normal notification mails or bonus mails? + $MAIL_MODE = (($CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); + + // Generate subject line + $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;"; + eval($eval); + + // Load message body for bonus mails + $MSG = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", "", "{PER}uid{PER}"); + $RECEIVER = ""; $UIDs = array(); + + // Check for accounts to be notified + $result_main = SQL_QUERY($SQL, __FILE__, __LINE__); + if (SQL_NUMROWS($result_main) > 0) + { + // Okay lets notify all users! + while(list($uid, $email) = SQL_FETCHROW($result_main)) + { + // Update account + $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data +SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%d LIMIT 1", + array(time(), $MODE, time(), $uid), __FILE__, __LINE__); + + // Load email template and send it to the user! + if ($MAIL_MODE) + { + // Add userid to queue + $UIDs[] = $uid; + } + else + { + // Send normal notification mail to the members + $MSG = LOAD_EMAIL_TEMPLATE("bonus_".$MODE."_notify", "", $uid); + SEND_EMAIL($email, $SUBJECT, $MSG); + } + } + + // Shall I send out bonus mails? + if ($MAIL_MODE) + { + // Okay, make array to string + $RECEIVER = implode(";", $UIDs); + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus +(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) +VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', '%s', 'Y')", + array( + $SUBJECT, + $MSG, + $RECEIVER, + $CONFIG['bonus_notify_points'], + $CONFIG['bonus_notify_wait'], + URL."/modules.php?module=index&what=login", + 0, + SELECTION_COUNT(explode(";", $RECEIVER)), + SQL_NUMROWS($result_main), +), __FILE__, __LINE__); + } + } + + // Free memory + SQL_FREERESULT($result_main); +} +// +?> diff --git a/0.2.1/inc/modules/admin.php b/0.2.1/inc/modules/admin.php index 5d610190e7..5719f09af0 100644 --- a/0.2.1/inc/modules/admin.php +++ b/0.2.1/inc/modules/admin.php @@ -1,406 +1,406 @@ -".ADMIN_REGISTER_DONE.""); - } - - // Check if the admin has submitted data or not - $ret = ""; - if ((isset($_POST['ok'])) && ((empty($_POST['login'])) || (empty($_POST['pass'])) || (strlen($_POST['pass']) < 4))) $_POST['ok'] = "***"; - if ((isset($_POST['ok'])) && ($_POST['ok'] != "***")) - { - // All required data was entered so we check his account - $ret = CHECK_ADMIN_LOGIN($_POST['login'], $_POST['pass']); - switch ($ret) - { - case "done": // Admin and password are okay, so we log in now - $TIMEOUT = time() + (3600 * 24 * $_POST['timeout']); - if ((@setcookie("admin_md5", generatePassString(generateHash($_POST['pass'], __SALT)), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_login", $_POST['login'], $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_last", time(), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_to", $_POST['timeout'], $TIMEOUT, COOKIE_PATH))) - { - // Construct URL and redirect - $URL = URL."/modules.php?module=admin&"; - - // Rewrite overview module - if ($GLOBALS['what'] == "overview") { - $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']); - } - - // Add data to URL - if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what']; - elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action']; - elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area']; - - // Load URL - LOAD_URL($URL); - } - else - { - OUTPUT_HTML ("".ADMIN_LOGIN_FAILED.""); - ADD_FATAL(CANNOT_REGISTER_SESS); - } - break; - - case "404": // Administrator login not found - $_POST['ok'] = $ret; - $ret = ADMIN_NOT_FOUND; - break; - - case "pass": // Wrong password - $_POST['ok'] = $ret; - $ret = WRONG_PASS; - break; - } - } - if ($ret != "done") - { - if (!empty($_POST['login'])) - { - define('__LOGIN_VALUE', $_POST['login']); - } - else - { - define('__LOGIN_VALUE', ""); - } - - if (isset($_POST['ok'])) - { - // Set messages to zero - - $MSG1 = ""; $MSG2 = ""; - // No login entered? - if (empty($_POST['login'])) $MSG1 = ADMIN_NO_LOGIN; - - // An error comes back from login? - if ((!empty($ret)) && ($_POST['ok'] == "404")) $MSG1 = $ret; - - // No password entered? - if (empty($_POST['pass'])) $MSG2 = ADMIN_NO_PASS; - - // Or password too short? - if (strlen($_POST['pass']) < 4) $MSG2 = ADMIN_SHORT_PASS; - - // An error comes back from login? - if ((!empty($ret)) && ($_POST['ok'] == "pass")) $MSG2 = $ret; - - // Load message template - define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1)); - define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $MSG2)); - - // Reset variables - $MSG1 = ""; $MSG2 = ""; - } - else - { - // Set constants to empty for hiding them - define('__MSG_LOGIN', ""); - define('__MSG_PASS' , ""); - } - - // Load login form - if (!empty($GLOBALS['what'])) - { - // Restore old what value - $content = array('target' => "what", 'value' => $GLOBALS['what']); - } - elseif (!empty($GLOBALS['action'])) - { - if ($GLOBALS['action'] != "logout") - { - // Restore old action value - $content = array('target' => "action", 'value' => $GLOBALS['action']); - } - else - { - // Set default values - $content = array('target' => "action", 'value' => "login"); - } - } - elseif (!empty($_GET['area'])) - { - // Restore old area value - $content = array('target' => "area", 'value' => $_GET['area']); - } - else - { - // Set default values - $content = array('target' => "action", 'value' => "login"); - } - - // Load login form template - LOAD_TEMPLATE("admin_login_form", false, $content); - } -} - elseif ($_GET['logout'] == "1") -{ - // Only try to remove cookies - if (@setcookie("admin_login", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_md5", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_last", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_to", "", (time() - 3600), COOKIE_PATH)) - { - // Also remove array elements - unset($_COOKIE['admin_login']); - unset($_COOKIE['admin_md5']); - unset($_COOKIE['admin_last']); - unset($_COOKIE['admin_to']); - - // Destroy session - @session_destroy(); - - // Load logout template - LOAD_TEMPLATE("admin_logout"); - } - else - { - // Something went wrong here... - OUTPUT_HTML ("".ADMIN_LOGOUT_FAILED.""); - - // Add fatal message - ADD_FATAL(CANNOT_UNREG_SESS); - } -} - else -{ - // Maybe an Admin want's to login? - $ret = CHECK_ADMIN_COOKIES(SQL_ESCAPE($_COOKIE['admin_login']), SQL_ESCAPE($_COOKIE['admin_md5'])); - switch ($ret) - { - case "done": - // Cookie-Data accepted - $TIMEOUT = time() + bigintval($_COOKIE['admin_to']); - if ((@setcookie("admin_md5", SQL_ESCAPE($_COOKIE['admin_md5']), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_login", SQL_ESCAPE($_COOKIE['admin_login']), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_last", time(), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_to", bigintval($_COOKIE['admin_to']), $TIMEOUT, COOKIE_PATH))) - { - // Ok, Cookie-Update done - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) - { - // Check if action GET variable was set - $act = SQL_ESCAPE($GLOBALS['action']); - if (!empty($GLOBALS['what'])) { - // Get action value by what-value - $act = GET_ACTION("admin", $GLOBALS['what']); - } - - // Check for access control line of current menu entry - define('__ACL_ALLOW', ADMINS_CHECK_ACL($act, $GLOBALS['what'])); - } - else - { - // Extension not installed so it's always allowed to access everywhere! - define('__ACL_ALLOW', true); - } - - // When type of admin menu is not set fallback to old menu system - if (empty($CONFIG['admin_menu'])) $CONFIG['admin_menu'] = "OLD"; - - // Check for version and switch between old menu system and new "intelligent menu system" - if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (file_exists(PATH."inc/modules/admin/la_sys-inc.php"))) - { - // Default area is the entrance, of course - $area = "entrance"; - - // Check for similar URL variable - if (!empty($_GET['area'])) $area = $_GET['area']; - - // Load "logical-area menu-system" file - require_once(PATH."inc/modules/admin/la_sys-inc.php"); - - // Create new-style menu system will "logical areas" - ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']); - } - else - { - // This little call constructs the whole default old and lacky menu system - // on left side - ADMIN_DO_ACTION($GLOBALS['what']); - } - } - else - { - // Login failed (cookies enabled?) - OUTPUT_HTML ("".ADMIN_LOGIN_FAILED.""); - ADD_FATAL(CANNOT_RE_REGISTER_SESS); - } - break; - - case "404": // Administrator login not found - $_POST['ok'] = $ret; - ADD_FATAL(ADMIN_NOT_FOUND); - break; - - case "pass": // Wrong password - $_POST['ok'] = $ret; - ADD_FATAL(WRONG_PASS); - break; - } -} - -if (admin_registered) -{ - // Check config.php and inc directory for right access rights - if (is_INCWritable("config")) ADD_FATAL(FATAL_CONFIG_WRITABLE); - if (is_INCWritable("dummy")) ADD_FATAL(FATAL_INC_WRITABLE); -} -// -?> +".ADMIN_REGISTER_DONE.""); + } + + // Check if the admin has submitted data or not + $ret = ""; + if ((isset($_POST['ok'])) && ((empty($_POST['login'])) || (empty($_POST['pass'])) || (strlen($_POST['pass']) < 4))) $_POST['ok'] = "***"; + if ((isset($_POST['ok'])) && ($_POST['ok'] != "***")) + { + // All required data was entered so we check his account + $ret = CHECK_ADMIN_LOGIN($_POST['login'], $_POST['pass']); + switch ($ret) + { + case "done": // Admin and password are okay, so we log in now + $TIMEOUT = time() + (3600 * 24 * $_POST['timeout']); + if ((@setcookie("admin_md5", generatePassString(generateHash($_POST['pass'], __SALT)), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_login", $_POST['login'], $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_last", time(), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_to", $_POST['timeout'], $TIMEOUT, COOKIE_PATH))) + { + // Construct URL and redirect + $URL = URL."/modules.php?module=admin&"; + + // Rewrite overview module + if ($GLOBALS['what'] == "overview") { + $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']); + } + + // Add data to URL + if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what']; + elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action']; + elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area']; + + // Load URL + LOAD_URL($URL); + } + else + { + OUTPUT_HTML ("".ADMIN_LOGIN_FAILED.""); + ADD_FATAL(CANNOT_REGISTER_SESS); + } + break; + + case "404": // Administrator login not found + $_POST['ok'] = $ret; + $ret = ADMIN_NOT_FOUND; + break; + + case "pass": // Wrong password + $_POST['ok'] = $ret; + $ret = WRONG_PASS; + break; + } + } + if ($ret != "done") + { + if (!empty($_POST['login'])) + { + define('__LOGIN_VALUE', $_POST['login']); + } + else + { + define('__LOGIN_VALUE', ""); + } + + if (isset($_POST['ok'])) + { + // Set messages to zero + + $MSG1 = ""; $MSG2 = ""; + // No login entered? + if (empty($_POST['login'])) $MSG1 = ADMIN_NO_LOGIN; + + // An error comes back from login? + if ((!empty($ret)) && ($_POST['ok'] == "404")) $MSG1 = $ret; + + // No password entered? + if (empty($_POST['pass'])) $MSG2 = ADMIN_NO_PASS; + + // Or password too short? + if (strlen($_POST['pass']) < 4) $MSG2 = ADMIN_SHORT_PASS; + + // An error comes back from login? + if ((!empty($ret)) && ($_POST['ok'] == "pass")) $MSG2 = $ret; + + // Load message template + define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1)); + define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $MSG2)); + + // Reset variables + $MSG1 = ""; $MSG2 = ""; + } + else + { + // Set constants to empty for hiding them + define('__MSG_LOGIN', ""); + define('__MSG_PASS' , ""); + } + + // Load login form + if (!empty($GLOBALS['what'])) + { + // Restore old what value + $content = array('target' => "what", 'value' => $GLOBALS['what']); + } + elseif (!empty($GLOBALS['action'])) + { + if ($GLOBALS['action'] != "logout") + { + // Restore old action value + $content = array('target' => "action", 'value' => $GLOBALS['action']); + } + else + { + // Set default values + $content = array('target' => "action", 'value' => "login"); + } + } + elseif (!empty($_GET['area'])) + { + // Restore old area value + $content = array('target' => "area", 'value' => $_GET['area']); + } + else + { + // Set default values + $content = array('target' => "action", 'value' => "login"); + } + + // Load login form template + LOAD_TEMPLATE("admin_login_form", false, $content); + } +} + elseif ($_GET['logout'] == "1") +{ + // Only try to remove cookies + if (@setcookie("admin_login", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_md5", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_last", "", (time() - 3600), COOKIE_PATH) && @setcookie("admin_to", "", (time() - 3600), COOKIE_PATH)) + { + // Also remove array elements + unset($_COOKIE['admin_login']); + unset($_COOKIE['admin_md5']); + unset($_COOKIE['admin_last']); + unset($_COOKIE['admin_to']); + + // Destroy session + @session_destroy(); + + // Load logout template + LOAD_TEMPLATE("admin_logout"); + } + else + { + // Something went wrong here... + OUTPUT_HTML ("".ADMIN_LOGOUT_FAILED.""); + + // Add fatal message + ADD_FATAL(CANNOT_UNREG_SESS); + } +} + else +{ + // Maybe an Admin want's to login? + $ret = CHECK_ADMIN_COOKIES(SQL_ESCAPE($_COOKIE['admin_login']), SQL_ESCAPE($_COOKIE['admin_md5'])); + switch ($ret) + { + case "done": + // Cookie-Data accepted + $TIMEOUT = time() + bigintval($_COOKIE['admin_to']); + if ((@setcookie("admin_md5", SQL_ESCAPE($_COOKIE['admin_md5']), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_login", SQL_ESCAPE($_COOKIE['admin_login']), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_last", time(), $TIMEOUT, COOKIE_PATH)) && (@setcookie("admin_to", bigintval($_COOKIE['admin_to']), $TIMEOUT, COOKIE_PATH))) + { + // Ok, Cookie-Update done + if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) + { + // Check if action GET variable was set + $act = SQL_ESCAPE($GLOBALS['action']); + if (!empty($GLOBALS['what'])) { + // Get action value by what-value + $act = GET_ACTION("admin", $GLOBALS['what']); + } + + // Check for access control line of current menu entry + define('__ACL_ALLOW', ADMINS_CHECK_ACL($act, $GLOBALS['what'])); + } + else + { + // Extension not installed so it's always allowed to access everywhere! + define('__ACL_ALLOW', true); + } + + // When type of admin menu is not set fallback to old menu system + if (empty($CONFIG['admin_menu'])) $CONFIG['admin_menu'] = "OLD"; + + // Check for version and switch between old menu system and new "intelligent menu system" + if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (file_exists(PATH."inc/modules/admin/la_sys-inc.php"))) + { + // Default area is the entrance, of course + $area = "entrance"; + + // Check for similar URL variable + if (!empty($_GET['area'])) $area = $_GET['area']; + + // Load "logical-area menu-system" file + require_once(PATH."inc/modules/admin/la_sys-inc.php"); + + // Create new-style menu system will "logical areas" + ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']); + } + else + { + // This little call constructs the whole default old and lacky menu system + // on left side + ADMIN_DO_ACTION($GLOBALS['what']); + } + } + else + { + // Login failed (cookies enabled?) + OUTPUT_HTML ("".ADMIN_LOGIN_FAILED.""); + ADD_FATAL(CANNOT_RE_REGISTER_SESS); + } + break; + + case "404": // Administrator login not found + $_POST['ok'] = $ret; + ADD_FATAL(ADMIN_NOT_FOUND); + break; + + case "pass": // Wrong password + $_POST['ok'] = $ret; + ADD_FATAL(WRONG_PASS); + break; + } +} + +if (admin_registered) +{ + // Check config.php and inc directory for right access rights + if (is_INCWritable("config")) ADD_FATAL(FATAL_CONFIG_WRITABLE); + if (is_INCWritable("dummy")) ADD_FATAL(FATAL_INC_WRITABLE); +} +// +?> diff --git a/0.2.1/inc/modules/admin/action-admins.php b/0.2.1/inc/modules/admin/action-admins.php index 2e1404b03c..a0beb1b828 100644 --- a/0.2.1/inc/modules/admin/action-admins.php +++ b/0.2.1/inc/modules/admin/action-admins.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-bank.php b/0.2.1/inc/modules/admin/action-bank.php index 65cbc4ac1a..58d393c27f 100644 --- a/0.2.1/inc/modules/admin/action-bank.php +++ b/0.2.1/inc/modules/admin/action-bank.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-country.php b/0.2.1/inc/modules/admin/action-country.php index 1fd9354ded..90455e7a8e 100644 --- a/0.2.1/inc/modules/admin/action-country.php +++ b/0.2.1/inc/modules/admin/action-country.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-doubler.php b/0.2.1/inc/modules/admin/action-doubler.php index 4f26a77f30..6982a4083c 100644 --- a/0.2.1/inc/modules/admin/action-doubler.php +++ b/0.2.1/inc/modules/admin/action-doubler.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-email.php b/0.2.1/inc/modules/admin/action-email.php index 4ed9f9377b..787081af62 100644 --- a/0.2.1/inc/modules/admin/action-email.php +++ b/0.2.1/inc/modules/admin/action-email.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-holiday.php b/0.2.1/inc/modules/admin/action-holiday.php index 6d967a6593..ca00de5b71 100644 --- a/0.2.1/inc/modules/admin/action-holiday.php +++ b/0.2.1/inc/modules/admin/action-holiday.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-login.php b/0.2.1/inc/modules/admin/action-login.php index eac0e7365d..a66a1be3b4 100644 --- a/0.2.1/inc/modules/admin/action-login.php +++ b/0.2.1/inc/modules/admin/action-login.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-logout.php b/0.2.1/inc/modules/admin/action-logout.php index e1959d3d19..1fefc2a0af 100644 --- a/0.2.1/inc/modules/admin/action-logout.php +++ b/0.2.1/inc/modules/admin/action-logout.php @@ -1,61 +1,61 @@ -

"); - -if (!empty($_POST['no'])) -{ - // Do not logout now - LOAD_URL(URL."/modules.php?module=admin"); -} - elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) -{ - // Redirect to logout link - LOAD_URL(URL."/modules.php?module=admin&logout=1"); -} - else -{ - // Load logout form template - LOAD_TEMPLATE("admin_logout_form"); -} -// -?> +

"); + +if (!empty($_POST['no'])) +{ + // Do not logout now + LOAD_URL(URL."/modules.php?module=admin"); +} + elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) +{ + // Redirect to logout link + LOAD_URL(URL."/modules.php?module=admin&logout=1"); +} + else +{ + // Load logout form template + LOAD_TEMPLATE("admin_logout_form"); +} +// +?> diff --git a/0.2.1/inc/modules/admin/action-menu.php b/0.2.1/inc/modules/admin/action-menu.php index eac8f7532a..ddaf08a59b 100644 --- a/0.2.1/inc/modules/admin/action-menu.php +++ b/0.2.1/inc/modules/admin/action-menu.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-misc.php b/0.2.1/inc/modules/admin/action-misc.php index 55aef98ee3..41cdcc67e5 100644 --- a/0.2.1/inc/modules/admin/action-misc.php +++ b/0.2.1/inc/modules/admin/action-misc.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-mods.php b/0.2.1/inc/modules/admin/action-mods.php index ac7e832b5e..4f05fccc13 100644 --- a/0.2.1/inc/modules/admin/action-mods.php +++ b/0.2.1/inc/modules/admin/action-mods.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-newsletter.php b/0.2.1/inc/modules/admin/action-newsletter.php index ce0be7cd3d..49c3361e4c 100644 --- a/0.2.1/inc/modules/admin/action-newsletter.php +++ b/0.2.1/inc/modules/admin/action-newsletter.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-payouts.php b/0.2.1/inc/modules/admin/action-payouts.php index 931ac7d094..2882feb8b9 100644 --- a/0.2.1/inc/modules/admin/action-payouts.php +++ b/0.2.1/inc/modules/admin/action-payouts.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-rallye.php b/0.2.1/inc/modules/admin/action-rallye.php index c7885bf210..221889a6bd 100644 --- a/0.2.1/inc/modules/admin/action-rallye.php +++ b/0.2.1/inc/modules/admin/action-rallye.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-repair.php b/0.2.1/inc/modules/admin/action-repair.php index 4cddf90d1e..1f54b7e2c7 100644 --- a/0.2.1/inc/modules/admin/action-repair.php +++ b/0.2.1/inc/modules/admin/action-repair.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-setup.php b/0.2.1/inc/modules/admin/action-setup.php index 9d3ddb2533..5cf0b0c60f 100644 --- a/0.2.1/inc/modules/admin/action-setup.php +++ b/0.2.1/inc/modules/admin/action-setup.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-stats.php b/0.2.1/inc/modules/admin/action-stats.php index cd9218703e..2db7b93dd3 100644 --- a/0.2.1/inc/modules/admin/action-stats.php +++ b/0.2.1/inc/modules/admin/action-stats.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-task.php b/0.2.1/inc/modules/admin/action-task.php index 3e12d50fdb..08c5eaa5ff 100644 --- a/0.2.1/inc/modules/admin/action-task.php +++ b/0.2.1/inc/modules/admin/action-task.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-theme.php b/0.2.1/inc/modules/admin/action-theme.php index 11b0f3ba87..651d82ad4b 100644 --- a/0.2.1/inc/modules/admin/action-theme.php +++ b/0.2.1/inc/modules/admin/action-theme.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-transfer.php b/0.2.1/inc/modules/admin/action-transfer.php index a36d026793..3ea5af90fe 100644 --- a/0.2.1/inc/modules/admin/action-transfer.php +++ b/0.2.1/inc/modules/admin/action-transfer.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-user.php b/0.2.1/inc/modules/admin/action-user.php index 61a5196b46..20254c254d 100644 --- a/0.2.1/inc/modules/admin/action-user.php +++ b/0.2.1/inc/modules/admin/action-user.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/action-wernis.php b/0.2.1/inc/modules/admin/action-wernis.php index 2a91124554..25b4ff15e1 100644 --- a/0.2.1/inc/modules/admin/action-wernis.php +++ b/0.2.1/inc/modules/admin/action-wernis.php @@ -1,56 +1,56 @@ - + diff --git a/0.2.1/inc/modules/admin/admin-inc.php b/0.2.1/inc/modules/admin/admin-inc.php index 880c9d2bf5..487eb2c3c7 100644 --- a/0.2.1/inc/modules/admin/admin-inc.php +++ b/0.2.1/inc/modules/admin/admin-inc.php @@ -1,810 +1,810 @@ -"; - if ((strlen($pass) == 32) && ($pass == md5($password))) - { - // Generate new hash - $pass = generateHash($password); - if (($ret == "pass") && (GET_EXT_VERSION("sql_patches") < "0.3.6")) $ret = "done"; - } - elseif ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) - { - // Old hashing way - return $ret; - } - - // Generate salt of password - define('__SALT', substr($pass, 0, -40)); - $salt = __SALT; - - // Check if password is same - if (($ret == "pass") && ($pass == generateHash($password, $salt)) && (!empty($salt))) - { - // Update password - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE login='%s' LIMIT 1", - array($pass, $admin_login), __FILE__, __LINE__); - - // Shall I remove the cache file? - if ((EXT_IS_ACTIVE("cache")) && ($CACHE != false)) - { - if ($CACHE->cache_file("admins", true)) $CACHE->cache_destroy(); - } - - // Password matches! - $ret = "done"; - } - elseif ((empty($salt)) && ($ret == "pass")) - { - // Something bad went wrong - $ret = "failed"; - } - return $ret; -} -// Only be executed on cookie checking -function CHECK_ADMIN_COOKIES ($admin_login, $password) -{ - global $ADMINS, $CONFIG; - $ret = "404"; $pass = ""; - if (!empty($ADMINS['aid'][$admin_login])) - { - // Get password from cache - $pass = $ADMINS['password'][$admin_login]; - $ret = "pass"; - $CONFIG['cache_hits']++; - } - else - { - // Get password from DB - $result = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", - array($admin_login), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - $ret = "pass"; - list($pass) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - } - } - - //* DEBUG: */ echo "*".$pass."/".$password."
"; - - // Check if password matches - if (($ret == "pass") && ((generatePassString($pass) == $password) || ($pass == $password))) - { - // Passwords matches! - $ret = "done"; - } - return $ret; -} -// -function admin_WriteData ($FILE, $COMMENT, $PREFIX, $SUFFIX, $DATA, $SEEK=0) -{ - $DONE = false; $SEEK++; $found = false; - if (file_exists($FILE)) - { - $SEARCH = "CFG: ".$COMMENT; - $TMP = $FILE.".tmp"; - $fp = fopen($FILE, 'r') or OUTPUT_HTML ("READ: ".$FILE."
"); - if ($fp) - { - $fp_tmp = fopen($TMP, 'w') or OUTPUT_HTML ("WRITE: ".$TMP."
"); - if ($fp_tmp) - { - while (! feof($fp)) - { - $line = fgets ($fp, 1024); - if (strpos($line, $SEARCH) > -1) { $next = 0; $found = true; } - if ($next > -1) - { - if ($next == $SEEK) - { - $next = -1; - $line = $PREFIX.$DATA.$SUFFIX."\n"; - } - else - { - $next++; - } - } - fputs($fp_tmp, $line); - } - fclose($fp_tmp); - // Finished writing tmp file - $DONE = true; - } - fclose($fp); - if (($DONE) && ($found)) - { - // Copy back tmp file and delete tmp :-) - @copy($TMP, $FILE); - @unlink($TMP); - define ('_FATAL', false); - } - elseif (!$found) - { - OUTPUT_HTML ("CHANGE: 404!"); - define ('_FATAL', true); - } - else - { - OUTPUT_HTML ("TMP: UNDONE!"); - define ('_FATAL', true); - } - } - } - else - { - OUTPUT_HTML ("404: ".$FILE."
"); - } -} -// -function ADMIN_DO_ACTION($wht) -{ - global $menuDesription, $MTITLE, $CONFIG, $EXTENSIONS, $link, $DATA; - //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*
\n"; - if (EXT_IS_ACTIVE("cache")) - { - // Include cache instance - global $CACHE; - } - - // Remove any spaces from variable - if (empty($wht)) - { - // Default admin action is the overview page - $wht = "overview"; - } - else - { - // Compile out some chars - $wht = COMPILE_CODE($wht, false, false, false); - } - - // Get action value - $act = GET_ACTION($GLOBALS['module'], $wht); - - // Define admin login name and ID number - define('__ADMIN_LOGIN', SQL_ESCAPE($_COOKIE['admin_login'])); - define('__ADMIN_ID' , GET_ADMIN_ID($_COOKIE['admin_login'])); - - // Preload templates - if (EXT_IS_ACTIVE("admins")) { - define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome_admins", true)); - } else { - define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome", true)); - } - define('__ADMIN_FOOTER' , LOAD_TEMPLATE("admin_footer" , true)); - define('__ADMIN_MENU' , ADD_ADMIN_MENU($act, $wht, true)); - - // Tableset header - LOAD_TEMPLATE("admin_main_header"); - - // Check if action/what pair is valid - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu -WHERE action='%s' AND ((what='%s' AND what != 'overview') OR (what='' AND '%s'='overview')) -LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Free memory - SQL_FREERESULT($result); - - // Is valid but does the inlcude file exists? - $INC = sprintf(PATH."inc/modules/admin/action-%s.php", $act); - if ((file_exists($INC)) && (is_readable($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) - { - // Ok, we finally load the admin action module - include($INC); - } - elseif (__ACL_ALLOW == false) - { - // Access denied - LOAD_TEMPLATE("admin_menu_failed", false, ADMINS_ACCESS_DENIED); - ADD_FATAL(ADMINS_ACCESS_DENIED); - } - else - { - // Include file not found! :-( - LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_404_ACTION); - ADD_FATAL(ADMIN_404_ACTION_1.$act.ADMIN_404_ACTION_2); - } - } else { - // Invalid action/what pair found! - LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_INVALID_ACTION); - ADD_FATAL(ADMIN_INVALID_ACTION_1.$act."/".$wht.ADMIN_INVALID_ACTION_2); - } - - // Tableset footer - LOAD_TEMPLATE("admin_main_footer"); -} -// -function ADD_ADMIN_MENU($act, $wht,$return=false) -{ - global $_GET, $menuDesription, $MTITLE, $link; - $SUB = false; - - // Menu descriptions - $menuDesription = array(); - $MTITLE = array(); - - // Build main menu - $result_main = SQL_QUERY("SELECT action, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE what='' ORDER BY sort, id DESC", __FILE__, __LINE__); - $OUT = ""; - if (SQL_NUMROWS($result_main) > 0) - { - $OUT = " -\n"; - while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) - { - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) - { - $ACL = ADMINS_CHECK_ACL($menu, ""); - } - else - { - // ACL is "allow"... hmmm - $ACL = true; - } - if ($ACL) - { - if (!$SUB) - { - // Insert compiled menu title and description - $MTITLE[$menu] = $title; - $menuDesription[$menu] = $descr; - } - $OUT .= " - -\n"; - $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort, id DESC", - array($menu), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)) - { - $menuDesription = array(); - $MTITLE = array(); $SUB = true; - $OUT .= " - - -\n"; - } - $OUT .= "\n"; - } - } - - // Free memory - SQL_FREERESULT($result_main); - $OUT .= "
 
-  · "; - if (($menu == $act) && (empty($wht))) - { - $OUT .= ""; - } - else - { - $OUT .= "[ "; - } - $OUT .= $title; - if (($menu == $act) && (empty($wht))) - { - $OUT .= ""; - } - else - { - $OUT .= " ]"; - } - $OUT .= "
  - \n"; - while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) - { - // Filename - $INC = sprintf(PATH."inc/modules/admin/what-%s.php", $wht_sub); - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) - { - $ACL = ADMINS_CHECK_ACL("", $wht_sub); - } - else - { - // ACL is "allow"... hmmm - $ACL = true; - } - $readable = ((file_exists($INC)) && (is_readable($INC))); - if ($ACL) - { - // Insert compiled title and description - $MTITLE[$wht_sub] = $title_what; - $menuDesription[$wht_sub] = $desc_what; - $OUT .= " - -\n"; - } - } - - // Free memory - SQL_FREERESULT($result_what); - $OUT .= "
-  --> "; - if ($readable) - { - if ($wht == $wht_sub) - { - $OUT .= ""; - } - else - { - $OUT .= "[ "; - } - } - else - { - $OUT .= ""; - } - $OUT .= $title_what; - if ($readable) - { - if ($wht == $wht_sub) - { - $OUT .= ""; - } - else - { - $OUT .= " ]"; - } - } - else - { - $OUT .= ""; - } - $OUT .= "
-
\n"; - } - - // Compile and run the code here. This inserts all constants into the - // HTML output. Costs me some time to figure this out... *sigh* Quix0r - $eval = "\$OUT = \"".COMPILE_CODE(addslashes($OUT))."\";"; - eval($eval); - - // Return or output content? - if ($return) { - return $OUT; - } else { - OUTPUT_HTML ($OUT); - } -} -// -function ADD_MEMBER_SELECTION_BOX($add_all = false, $return = false, $none = false, $def = "0") -{ - global $_GET; - // Output selection form with all confirmed user accounts listed - $result = SQL_QUERY("SELECT userid, surname, family FROM "._MYSQL_PREFIX."_user_data ORDER BY userid", __FILE__, __LINE__); - $OUT = ""; - - // USe this only for adding points (e.g. adding refs really makes no sence ;-) ) - if ($add_all) $OUT = " \n"; - elseif ($none) $OUT = " \n"; - while (list($id, $sname, $fname) = SQL_FETCHROW($result)) - { - $OUT .= " \n"; + elseif ($none) $OUT = " \n"; + while (list($id, $sname, $fname) = SQL_FETCHROW($result)) + { + $OUT .= "