Re-added
authorRoland Häder <roland@mxchange.org>
Thu, 2 Oct 2008 16:36:20 +0000 (16:36 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 2 Oct 2008 16:36:20 +0000 (16:36 +0000)
504 files changed:
.gitattributes
inc/.htaccess [new file with mode: 0644]
inc/autopurge.php [new file with mode: 0644]
inc/autopurge/.htaccess [new file with mode: 0644]
inc/autopurge/purge- [new file with mode: 0644]
inc/autopurge/purge-general.php [new file with mode: 0644]
inc/autopurge/purge-inact.php [new file with mode: 0644]
inc/autopurge/purge-mails.php [new file with mode: 0644]
inc/autopurge/purge-tsks.php [new file with mode: 0644]
inc/autopurge/purge-unconfirmed.php [new file with mode: 0644]
inc/cache/.htaccess [new file with mode: 0644]
inc/check-reset.php [new file with mode: 0644]
inc/databases.php [new file with mode: 0644]
inc/db/.htaccess [new file with mode: 0644]
inc/db/lib-mysql3.php [new file with mode: 0644]
inc/db/lib.php [new file with mode: 0644]
inc/doubler_send.php [new file with mode: 0644]
inc/extensions.php [new file with mode: 0644]
inc/extensions/.htaccess [new file with mode: 0644]
inc/extensions/ext- [new file with mode: 0644]
inc/extensions/ext-active.php [new file with mode: 0644]
inc/extensions/ext-admins.php [new file with mode: 0644]
inc/extensions/ext-admintheme1.php [new file with mode: 0644]
inc/extensions/ext-admintheme_default.php [new file with mode: 0644]
inc/extensions/ext-autopurge.php [new file with mode: 0644]
inc/extensions/ext-bank.php [new file with mode: 0644]
inc/extensions/ext-beg.php [new file with mode: 0644]
inc/extensions/ext-birthday.php [new file with mode: 0644]
inc/extensions/ext-bonus.php [new file with mode: 0644]
inc/extensions/ext-cache.php [new file with mode: 0644]
inc/extensions/ext-country.php [new file with mode: 0644]
inc/extensions/ext-demo.php [new file with mode: 0644]
inc/extensions/ext-doubler.php [new file with mode: 0644]
inc/extensions/ext-holiday.php [new file with mode: 0644]
inc/extensions/ext-html_mail.php [new file with mode: 0644]
inc/extensions/ext-mailid.php [new file with mode: 0644]
inc/extensions/ext-maintenance.php [new file with mode: 0644]
inc/extensions/ext-mediadata.php [new file with mode: 0644]
inc/extensions/ext-mods.php [new file with mode: 0644]
inc/extensions/ext-mydata.php [new file with mode: 0644]
inc/extensions/ext-newsletter.php [new file with mode: 0644]
inc/extensions/ext-nickname.php [new file with mode: 0644]
inc/extensions/ext-online.php [new file with mode: 0644]
inc/extensions/ext-optimize.php [new file with mode: 0644]
inc/extensions/ext-order.php [new file with mode: 0644]
inc/extensions/ext-other.php [new file with mode: 0644]
inc/extensions/ext-payout.php [new file with mode: 0644]
inc/extensions/ext-primera.php [new file with mode: 0644]
inc/extensions/ext-profile.php [new file with mode: 0644]
inc/extensions/ext-rallye.php [new file with mode: 0644]
inc/extensions/ext-refback.php [new file with mode: 0644]
inc/extensions/ext-register.php [new file with mode: 0644]
inc/extensions/ext-removeip.php [new file with mode: 0644]
inc/extensions/ext-repair.php [new file with mode: 0644]
inc/extensions/ext-rewrite.php [new file with mode: 0644]
inc/extensions/ext-safe.php [new file with mode: 0644]
inc/extensions/ext-sponsor.php [new file with mode: 0644]
inc/extensions/ext-sql_patches.php [new file with mode: 0644]
inc/extensions/ext-support.php [new file with mode: 0644]
inc/extensions/ext-surfbar.php [new file with mode: 0644]
inc/extensions/ext-task.php [new file with mode: 0644]
inc/extensions/ext-theme.php [new file with mode: 0644]
inc/extensions/ext-top10.php [new file with mode: 0644]
inc/extensions/ext-transfer.php [new file with mode: 0644]
inc/extensions/ext-user.php [new file with mode: 0644]
inc/extensions/ext-wernis.php [new file with mode: 0644]
inc/extensions/ext-yoomedia.php [new file with mode: 0644]
inc/fatal_errors.php [new file with mode: 0644]
inc/footer.php [new file with mode: 0644]
inc/functions.php [new file with mode: 0644]
inc/gen_mediadata.php [new file with mode: 0644]
inc/gen_refback.php [new file with mode: 0644]
inc/gen_sql_patches.php [new file with mode: 0644]
inc/header.php [new file with mode: 0644]
inc/install-inc.php [new file with mode: 0644]
inc/language.php [new file with mode: 0644]
inc/language/.htaccess [new file with mode: 0644]
inc/language/active_de.php [new file with mode: 0644]
inc/language/admins_de.php [new file with mode: 0644]
inc/language/autopurge_de.php [new file with mode: 0644]
inc/language/bank_de.php [new file with mode: 0644]
inc/language/beg_de.php [new file with mode: 0644]
inc/language/birthday_de.php [new file with mode: 0644]
inc/language/bonus_de.php [new file with mode: 0644]
inc/language/cache_de.php [new file with mode: 0644]
inc/language/country_de.php [new file with mode: 0644]
inc/language/de.php [new file with mode: 0644]
inc/language/doubler_de.php [new file with mode: 0644]
inc/language/en.ph [new file with mode: 0644]
inc/language/en.php [new file with mode: 0644]
inc/language/holiday_de.php [new file with mode: 0644]
inc/language/html_mail_de.php [new file with mode: 0644]
inc/language/install_de.php [new file with mode: 0644]
inc/language/mailid_de.php [new file with mode: 0644]
inc/language/maintenance_de.php [new file with mode: 0644]
inc/language/mediadata_de.php [new file with mode: 0644]
inc/language/mods_de.php [new file with mode: 0644]
inc/language/newsletter_de.php [new file with mode: 0644]
inc/language/nickname_de.php [new file with mode: 0644]
inc/language/online_de.php [new file with mode: 0644]
inc/language/optimize_de.php [new file with mode: 0644]
inc/language/order_de.php [new file with mode: 0644]
inc/language/other_de.php [new file with mode: 0644]
inc/language/payout_de.php [new file with mode: 0644]
inc/language/primera_de.php [new file with mode: 0644]
inc/language/rallye_de.php [new file with mode: 0644]
inc/language/refback_de.php [new file with mode: 0644]
inc/language/register_de.php [new file with mode: 0644]
inc/language/removeip_de.php [new file with mode: 0644]
inc/language/repair_de.php [new file with mode: 0644]
inc/language/rewrite_de.php [new file with mode: 0644]
inc/language/sponsor_de.php [new file with mode: 0644]
inc/language/support_de.php [new file with mode: 0644]
inc/language/surfbar_de.php [new file with mode: 0644]
inc/language/task_de.php [new file with mode: 0644]
inc/language/theme_de.php [new file with mode: 0644]
inc/language/top10_de.php [new file with mode: 0644]
inc/language/transfer_de.php [new file with mode: 0644]
inc/language/user_de.php [new file with mode: 0644]
inc/language/wernis_de.php [new file with mode: 0644]
inc/libs/.htaccess [new file with mode: 0644]
inc/libs/admins_functions.php [new file with mode: 0644]
inc/libs/autopurge_functions.php [new file with mode: 0644]
inc/libs/bonus_functions.php [new file with mode: 0644]
inc/libs/cache_functions.php [new file with mode: 0644]
inc/libs/country_functions.php [new file with mode: 0644]
inc/libs/doubler_functions.php [new file with mode: 0644]
inc/libs/holiday_functions.php [new file with mode: 0644]
inc/libs/html_mail_functions.php [new file with mode: 0644]
inc/libs/mediadata_functions.php [new file with mode: 0644]
inc/libs/newsletter_functions.php [new file with mode: 0644]
inc/libs/nickname_functions.php [new file with mode: 0644]
inc/libs/optimize_functions.php [new file with mode: 0644]
inc/libs/order_functions.php [new file with mode: 0644]
inc/libs/payout_functions.php [new file with mode: 0644]
inc/libs/primera_functions.php [new file with mode: 0644]
inc/libs/rallye_functions.php [new file with mode: 0644]
inc/libs/refback_functions.php [new file with mode: 0644]
inc/libs/register_functions.php [new file with mode: 0644]
inc/libs/removeip_functions.php [new file with mode: 0644]
inc/libs/rewrite_functions.php [new file with mode: 0644]
inc/libs/security_functions.php [new file with mode: 0644]
inc/libs/sponsor_functions.php [new file with mode: 0644]
inc/libs/surfbar_functions.php [new file with mode: 0644]
inc/libs/task_functions.php [new file with mode: 0644]
inc/libs/transfer_functions.php [new file with mode: 0644]
inc/libs/user_functions.php [new file with mode: 0644]
inc/libs/wernis_functions.php [new file with mode: 0644]
inc/load_cache.php [new file with mode: 0644]
inc/load_extensions.php [new file with mode: 0644]
inc/loader/.htaccess [new file with mode: 0644]
inc/loader/load_cache-admin.php [new file with mode: 0644]
inc/loader/load_cache-config.php [new file with mode: 0644]
inc/loader/load_cache-modreg.php [new file with mode: 0644]
inc/loader/load_cache-refdepths.php [new file with mode: 0644]
inc/loader/load_cache-refsystem.php [new file with mode: 0644]
inc/loader/load_cache-them.php [new file with mode: 0644]
inc/mails/.htaccess [new file with mode: 0644]
inc/mails/_mails.php [new file with mode: 0644]
inc/mails/beg_mails.php [new file with mode: 0644]
inc/mails/birthday_mails.php [new file with mode: 0644]
inc/mails/bonus_mails.php [new file with mode: 0644]
inc/modules/.htaccess [new file with mode: 0644]
inc/modules/admin.php [new file with mode: 0644]
inc/modules/admin/.htaccess [new file with mode: 0644]
inc/modules/admin/action- [new file with mode: 0644]
inc/modules/admin/action-admins.php [new file with mode: 0644]
inc/modules/admin/action-bank.php [new file with mode: 0644]
inc/modules/admin/action-country.php [new file with mode: 0644]
inc/modules/admin/action-doubler.php [new file with mode: 0644]
inc/modules/admin/action-email.php [new file with mode: 0644]
inc/modules/admin/action-holiday.php [new file with mode: 0644]
inc/modules/admin/action-login.php [new file with mode: 0644]
inc/modules/admin/action-logout.php [new file with mode: 0644]
inc/modules/admin/action-menu.php [new file with mode: 0644]
inc/modules/admin/action-misc.php [new file with mode: 0644]
inc/modules/admin/action-mods.php [new file with mode: 0644]
inc/modules/admin/action-newsletter.php [new file with mode: 0644]
inc/modules/admin/action-payouts.php [new file with mode: 0644]
inc/modules/admin/action-primera.php [new file with mode: 0644]
inc/modules/admin/action-rallye.php [new file with mode: 0644]
inc/modules/admin/action-repair.php [new file with mode: 0644]
inc/modules/admin/action-setup.php [new file with mode: 0644]
inc/modules/admin/action-sponsor.php [new file with mode: 0644]
inc/modules/admin/action-stats.php [new file with mode: 0644]
inc/modules/admin/action-surfbar.php [new file with mode: 0644]
inc/modules/admin/action-task.php [new file with mode: 0644]
inc/modules/admin/action-theme.php [new file with mode: 0644]
inc/modules/admin/action-transfer.php [new file with mode: 0644]
inc/modules/admin/action-user.php [new file with mode: 0644]
inc/modules/admin/action-wernis.php [new file with mode: 0644]
inc/modules/admin/admin-inc.php [new file with mode: 0644]
inc/modules/admin/overview-inc.php [new file with mode: 0644]
inc/modules/admin/what- [new file with mode: 0644]
inc/modules/admin/what-add_bank_package.php [new file with mode: 0644]
inc/modules/admin/what-add_guestnl_cat.php [new file with mode: 0644]
inc/modules/admin/what-add_points.php [new file with mode: 0644]
inc/modules/admin/what-add_rallye.php [new file with mode: 0644]
inc/modules/admin/what-add_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-add_surfbar_url.php [new file with mode: 0644]
inc/modules/admin/what-admin_add.php [new file with mode: 0644]
inc/modules/admin/what-adminedit.php [new file with mode: 0644]
inc/modules/admin/what-admins_add.php [new file with mode: 0644]
inc/modules/admin/what-admins_contct.php [new file with mode: 0644]
inc/modules/admin/what-admins_edit.php [new file with mode: 0644]
inc/modules/admin/what-admins_mails.php [new file with mode: 0644]
inc/modules/admin/what-autopurge.php [new file with mode: 0644]
inc/modules/admin/what-bonus.php [new file with mode: 0644]
inc/modules/admin/what-cache_stats.php [new file with mode: 0644]
inc/modules/admin/what-chk_regs.php [new file with mode: 0644]
inc/modules/admin/what-config_active.php [new file with mode: 0644]
inc/modules/admin/what-config_admin.php [new file with mode: 0644]
inc/modules/admin/what-config_admins.php [new file with mode: 0644]
inc/modules/admin/what-config_autopurge.php [new file with mode: 0644]
inc/modules/admin/what-config_beg.php [new file with mode: 0644]
inc/modules/admin/what-config_birthday.php [new file with mode: 0644]
inc/modules/admin/what-config_bonus.php [new file with mode: 0644]
inc/modules/admin/what-config_cache.php [new file with mode: 0644]
inc/modules/admin/what-config_cats.php [new file with mode: 0644]
inc/modules/admin/what-config_doubler.php [new file with mode: 0644]
inc/modules/admin/what-config_email.php [new file with mode: 0644]
inc/modules/admin/what-config_extensions.php [new file with mode: 0644]
inc/modules/admin/what-config_holiday.php [new file with mode: 0644]
inc/modules/admin/what-config_home.php [new file with mode: 0644]
inc/modules/admin/what-config_mediadata.php [new file with mode: 0644]
inc/modules/admin/what-config_mods.php [new file with mode: 0644]
inc/modules/admin/what-config_newsletter.php [new file with mode: 0644]
inc/modules/admin/what-config_nickname.php [new file with mode: 0644]
inc/modules/admin/what-config_order.php [new file with mode: 0644]
inc/modules/admin/what-config_other.php [new file with mode: 0644]
inc/modules/admin/what-config_payouts.php [new file with mode: 0644]
inc/modules/admin/what-config_points.php [new file with mode: 0644]
inc/modules/admin/what-config_primera.php [new file with mode: 0644]
inc/modules/admin/what-config_proxy.php [new file with mode: 0644]
inc/modules/admin/what-config_rallye_prices.php [new file with mode: 0644]
inc/modules/admin/what-config_refid.php [new file with mode: 0644]
inc/modules/admin/what-config_reg.php [new file with mode: 0644]
inc/modules/admin/what-config_register.php [new file with mode: 0644]
inc/modules/admin/what-config_register2.php [new file with mode: 0644]
inc/modules/admin/what-config_removeip.php [new file with mode: 0644]
inc/modules/admin/what-config_rewrite.php [new file with mode: 0644]
inc/modules/admin/what-config_secure.php [new file with mode: 0644]
inc/modules/admin/what-config_session.php [new file with mode: 0644]
inc/modules/admin/what-config_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-config_stats.php [new file with mode: 0644]
inc/modules/admin/what-config_surfbar.php [new file with mode: 0644]
inc/modules/admin/what-config_title.php [new file with mode: 0644]
inc/modules/admin/what-config_top10.php [new file with mode: 0644]
inc/modules/admin/what-config_transfer.php [new file with mode: 0644]
inc/modules/admin/what-config_user.php [new file with mode: 0644]
inc/modules/admin/what-config_wernis.php [new file with mode: 0644]
inc/modules/admin/what-del_email.php [new file with mode: 0644]
inc/modules/admin/what-del_holiday.php [new file with mode: 0644]
inc/modules/admin/what-del_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-del_task.php [new file with mode: 0644]
inc/modules/admin/what-del_transfer.php [new file with mode: 0644]
inc/modules/admin/what-del_user.php [new file with mode: 0644]
inc/modules/admin/what-edit_emails.php [new file with mode: 0644]
inc/modules/admin/what-edit_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-edit_user.php [new file with mode: 0644]
inc/modules/admin/what-email_archiv.php [new file with mode: 0644]
inc/modules/admin/what-email_details.php [new file with mode: 0644]
inc/modules/admin/what-email_stats.php [new file with mode: 0644]
inc/modules/admin/what-extensions.php [new file with mode: 0644]
inc/modules/admin/what-guest_add.php [new file with mode: 0644]
inc/modules/admin/what-guestedit.php [new file with mode: 0644]
inc/modules/admin/what-holiday_list.php [new file with mode: 0644]
inc/modules/admin/what-holiday_remove.php [new file with mode: 0644]
inc/modules/admin/what-list_autopurge.php [new file with mode: 0644]
inc/modules/admin/what-list_bank_package.php [new file with mode: 0644]
inc/modules/admin/what-list_beg.php [new file with mode: 0644]
inc/modules/admin/what-list_bonus.php [new file with mode: 0644]
inc/modules/admin/what-list_cats.php [new file with mode: 0644]
inc/modules/admin/what-list_country.php [new file with mode: 0644]
inc/modules/admin/what-list_doubler.php [new file with mode: 0644]
inc/modules/admin/what-list_holiday.php [new file with mode: 0644]
inc/modules/admin/what-list_links.php [new file with mode: 0644]
inc/modules/admin/what-list_newsletter.php [new file with mode: 0644]
inc/modules/admin/what-list_norefs.php [new file with mode: 0644]
inc/modules/admin/what-list_payouts.php [new file with mode: 0644]
inc/modules/admin/what-list_primera.php [new file with mode: 0644]
inc/modules/admin/what-list_rallyes.php [new file with mode: 0644]
inc/modules/admin/what-list_refs.php [new file with mode: 0644]
inc/modules/admin/what-list_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-list_sponsor_pay.php [new file with mode: 0644]
inc/modules/admin/what-list_sponsor_pays.php [new file with mode: 0644]
inc/modules/admin/what-list_surfbar_urls.php [new file with mode: 0644]
inc/modules/admin/what-list_task.php [new file with mode: 0644]
inc/modules/admin/what-list_transfer.php [new file with mode: 0644]
inc/modules/admin/what-list_unconfirmed.php [new file with mode: 0644]
inc/modules/admin/what-list_user.php [new file with mode: 0644]
inc/modules/admin/what-list_wernis.php [new file with mode: 0644]
inc/modules/admin/what-lock_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-lock_user.php [new file with mode: 0644]
inc/modules/admin/what-logs.php [new file with mode: 0644]
inc/modules/admin/what-maintenance.php [new file with mode: 0644]
inc/modules/admin/what-mem_add.php [new file with mode: 0644]
inc/modules/admin/what-memedit.php [new file with mode: 0644]
inc/modules/admin/what-optimize.php [new file with mode: 0644]
inc/modules/admin/what-overview.php [new file with mode: 0644]
inc/modules/admin/what-payments.php [new file with mode: 0644]
inc/modules/admin/what-refbanner.php [new file with mode: 0644]
inc/modules/admin/what-repair_amenu.php [new file with mode: 0644]
inc/modules/admin/what-repair_cats.php [new file with mode: 0644]
inc/modules/admin/what-repair_gmenu.php [new file with mode: 0644]
inc/modules/admin/what-repair_mmenu.php [new file with mode: 0644]
inc/modules/admin/what-send_bonus.php [new file with mode: 0644]
inc/modules/admin/what-send_newsletter.php [new file with mode: 0644]
inc/modules/admin/what-stats_mods.php [new file with mode: 0644]
inc/modules/admin/what-sub_points.php [new file with mode: 0644]
inc/modules/admin/what-surfbar_stats.php [new file with mode: 0644]
inc/modules/admin/what-theme_check.php [new file with mode: 0644]
inc/modules/admin/what-theme_edit.php [new file with mode: 0644]
inc/modules/admin/what-theme_import.php [new file with mode: 0644]
inc/modules/admin/what-unlock_emails.php [new file with mode: 0644]
inc/modules/admin/what-unlock_sponsor.php [new file with mode: 0644]
inc/modules/admin/what-unlock_surfbar_urls.php [new file with mode: 0644]
inc/modules/admin/what-updates.php [new file with mode: 0644]
inc/modules/admin/what-usage.php [new file with mode: 0644]
inc/modules/admin/what-user_contct.php [new file with mode: 0644]
inc/modules/admin/what-user_online.php [new file with mode: 0644]
inc/modules/admin/what-usr_online.php [new file with mode: 0644]
inc/modules/chk_login.php [new file with mode: 0644]
inc/modules/frametester.php [new file with mode: 0644]
inc/modules/guest/.htaccess [new file with mode: 0644]
inc/modules/guest/action- [new file with mode: 0644]
inc/modules/guest/action-admin.php [new file with mode: 0644]
inc/modules/guest/action-main.php [new file with mode: 0644]
inc/modules/guest/action-members.php [new file with mode: 0644]
inc/modules/guest/action-online.php [new file with mode: 0644]
inc/modules/guest/action-sponsor.php [new file with mode: 0644]
inc/modules/guest/action-themes.php [new file with mode: 0644]
inc/modules/guest/what- [new file with mode: 0644]
inc/modules/guest/what-active.php [new file with mode: 0644]
inc/modules/guest/what-admin.php [new file with mode: 0644]
inc/modules/guest/what-agb.php [new file with mode: 0644]
inc/modules/guest/what-beg.php [new file with mode: 0644]
inc/modules/guest/what-confirm.php [new file with mode: 0644]
inc/modules/guest/what-doubler.php [new file with mode: 0644]
inc/modules/guest/what-impressum.php [new file with mode: 0644]
inc/modules/guest/what-infos.php [new file with mode: 0644]
inc/modules/guest/what-login.php [new file with mode: 0644]
inc/modules/guest/what-mediadata.php [new file with mode: 0644]
inc/modules/guest/what-rallyes.php [new file with mode: 0644]
inc/modules/guest/what-register.php [new file with mode: 0644]
inc/modules/guest/what-sponsor_agb.php [new file with mode: 0644]
inc/modules/guest/what-sponsor_infos.php [new file with mode: 0644]
inc/modules/guest/what-sponsor_login.php [new file with mode: 0644]
inc/modules/guest/what-sponsor_reg.php [new file with mode: 0644]
inc/modules/guest/what-stats.php [new file with mode: 0644]
inc/modules/guest/what-top10.php [new file with mode: 0644]
inc/modules/guest/what-welcome.php [new file with mode: 0644]
inc/modules/guest/what-wernis_portal.php [new file with mode: 0644]
inc/modules/index.php [new file with mode: 0644]
inc/modules/loader.php [new file with mode: 0644]
inc/modules/login.php [new file with mode: 0644]
inc/modules/member/.htaccess [new file with mode: 0644]
inc/modules/member/action- [new file with mode: 0644]
inc/modules/member/action-account.php [new file with mode: 0644]
inc/modules/member/action-bank.php [new file with mode: 0644]
inc/modules/member/action-extras.php [new file with mode: 0644]
inc/modules/member/action-logout.php [new file with mode: 0644]
inc/modules/member/action-main.php [new file with mode: 0644]
inc/modules/member/action-order.php [new file with mode: 0644]
inc/modules/member/action-rals.php [new file with mode: 0644]
inc/modules/member/action-stats.php [new file with mode: 0644]
inc/modules/member/action-surfbar.php [new file with mode: 0644]
inc/modules/member/action-themes.php [new file with mode: 0644]
inc/modules/member/what- [new file with mode: 0644]
inc/modules/member/what-bank_create.php [new file with mode: 0644]
inc/modules/member/what-bank_deposit.php [new file with mode: 0644]
inc/modules/member/what-bank_infos.php [new file with mode: 0644]
inc/modules/member/what-bank_output.php [new file with mode: 0644]
inc/modules/member/what-bank_withdraw.php [new file with mode: 0644]
inc/modules/member/what-beg.php [new file with mode: 0644]
inc/modules/member/what-beg2.php [new file with mode: 0644]
inc/modules/member/what-bonus.php [new file with mode: 0644]
inc/modules/member/what-categories.php [new file with mode: 0644]
inc/modules/member/what-doubler.php [new file with mode: 0644]
inc/modules/member/what-guest.php [new file with mode: 0644]
inc/modules/member/what-holiday.php [new file with mode: 0644]
inc/modules/member/what-html_mail.php [new file with mode: 0644]
inc/modules/member/what-logout.php [new file with mode: 0644]
inc/modules/member/what-mydata.php [new file with mode: 0644]
inc/modules/member/what-newsletter.php [new file with mode: 0644]
inc/modules/member/what-nickname.php [new file with mode: 0644]
inc/modules/member/what-order.php [new file with mode: 0644]
inc/modules/member/what-payout.php [new file with mode: 0644]
inc/modules/member/what-points.php [new file with mode: 0644]
inc/modules/member/what-primera.php [new file with mode: 0644]
inc/modules/member/what-rallyes.php [new file with mode: 0644]
inc/modules/member/what-refback.php [new file with mode: 0644]
inc/modules/member/what-reflinks.php [new file with mode: 0644]
inc/modules/member/what-sponsor.php [new file with mode: 0644]
inc/modules/member/what-stats.php [new file with mode: 0644]
inc/modules/member/what-support.php [new file with mode: 0644]
inc/modules/member/what-surfbar_book.php [new file with mode: 0644]
inc/modules/member/what-surfbar_list.php [new file with mode: 0644]
inc/modules/member/what-surfbar_start.php [new file with mode: 0644]
inc/modules/member/what-surfbar_stats.php [new file with mode: 0644]
inc/modules/member/what-themes.php [new file with mode: 0644]
inc/modules/member/what-transfer.php [new file with mode: 0644]
inc/modules/member/what-unconfirmed.php [new file with mode: 0644]
inc/modules/member/what-welcome.php [new file with mode: 0644]
inc/modules/member/what-wernis.php [new file with mode: 0644]
inc/modules/order.php [new file with mode: 0644]
inc/modules/sponsor.php [new file with mode: 0644]
inc/modules/sponsor/.htaccess [new file with mode: 0644]
inc/modules/sponsor/.php [new file with mode: 0644]
inc/modules/sponsor/account.php [new file with mode: 0644]
inc/modules/sponsor/settings.php [new file with mode: 0644]
inc/modules/sponsor/welcome.php [new file with mode: 0644]
inc/modules/welcome.php [new file with mode: 0644]
inc/monthly/.htaccess [new file with mode: 0644]
inc/monthly/monthly_ [new file with mode: 0644]
inc/monthly/monthly_beg.php [new file with mode: 0644]
inc/monthly/monthly_bonus.php [new file with mode: 0644]
inc/monthly/monthly_newsletter.php [new file with mode: 0644]
inc/monthly/monthly_surfbar.php [new file with mode: 0644]
inc/mysql-connect.php [new file with mode: 0644]
inc/mysql-manager.php [new file with mode: 0644]
inc/patch-system.php [new file with mode: 0644]
inc/phpmailer/ChangeLog.txt [new file with mode: 0644]
inc/phpmailer/LICENSE [new file with mode: 0644]
inc/phpmailer/README [new file with mode: 0644]
inc/phpmailer/class.phpmailer.php [new file with mode: 0644]
inc/phpmailer/class.pop3.php [new file with mode: 0644]
inc/phpmailer/class.smtp.php [new file with mode: 0644]
inc/phpmailer/codeworxtech.html [new file with mode: 0644]
inc/phpmailer/docs/extending.html [new file with mode: 0644]
inc/phpmailer/docs/faq.html [new file with mode: 0644]
inc/phpmailer/docs/phpmailer_sm.gif [new file with mode: 0644]
inc/phpmailer/docs/pop3_article.txt [new file with mode: 0644]
inc/phpmailer/docs/use_gmail.txt [new file with mode: 0644]
inc/phpmailer/examples/contents.html [new file with mode: 0644]
inc/phpmailer/examples/images/bkgrnd.gif [new file with mode: 0644]
inc/phpmailer/examples/images/phpmailer.gif [new file with mode: 0644]
inc/phpmailer/examples/images/phpmailer.png [new file with mode: 0644]
inc/phpmailer/examples/images/phpmailer_mini.gif [new file with mode: 0644]
inc/phpmailer/examples/index.html [new file with mode: 0644]
inc/phpmailer/examples/pop3_before_smtp_test.php [new file with mode: 0644]
inc/phpmailer/examples/test1.php [new file with mode: 0644]
inc/phpmailer/examples/test_gmail.php [new file with mode: 0644]
inc/phpmailer/examples/test_mail.php [new file with mode: 0644]
inc/phpmailer/examples/test_sendmail.php [new file with mode: 0644]
inc/phpmailer/examples/test_smtp.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-br.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-ca.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-cz.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-de.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-dk.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-en.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-es.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-et.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-fi.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-fo.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-fr.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-hu.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-it.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-ja.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-nl.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-no.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-pl.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-ro.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-ru.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-se.php [new file with mode: 0644]
inc/phpmailer/language/phpmailer.lang-tr.php [new file with mode: 0644]
inc/phpmailer/phpdoc/PHPMailer/PHPMailer.html [new file with mode: 0644]
inc/phpmailer/phpdoc/PHPMailer/SMTP.html [new file with mode: 0644]
inc/phpmailer/phpdoc/PHPMailer/_class_phpmailer_php.html [new file with mode: 0644]
inc/phpmailer/phpdoc/PHPMailer/_class_smtp_php.html [new file with mode: 0644]
inc/phpmailer/phpdoc/blank.html [new file with mode: 0644]
inc/phpmailer/phpdoc/classtrees_PHPMailer.html [new file with mode: 0644]
inc/phpmailer/phpdoc/elementindex.html [new file with mode: 0644]
inc/phpmailer/phpdoc/elementindex_PHPMailer.html [new file with mode: 0644]
inc/phpmailer/phpdoc/errors.html [new file with mode: 0644]
inc/phpmailer/phpdoc/index.html [new file with mode: 0644]
inc/phpmailer/phpdoc/li_PHPMailer.html [new file with mode: 0644]
inc/phpmailer/phpdoc/media/banner.css [new file with mode: 0644]
inc/phpmailer/phpdoc/media/stylesheet.css [new file with mode: 0644]
inc/phpmailer/phpdoc/packages.html [new file with mode: 0644]
inc/phpmailer/test/phpmailer_test.php [new file with mode: 0644]
inc/phpmailer/test/phpunit.php [new file with mode: 0644]
inc/phpmailer/test/test.png [new file with mode: 0644]
inc/pool-update.php [new file with mode: 0644]
inc/profile-updte.php [new file with mode: 0644]
inc/rdf.class.php [new file with mode: 0644]
inc/reset/.htaccess [new file with mode: 0644]
inc/reset/reset_ [new file with mode: 0644]
inc/reset/reset_beg.php [new file with mode: 0644]
inc/reset/reset_bonus.php [new file with mode: 0644]
inc/reset/reset_daily.php [new file with mode: 0644]
inc/reset/reset_engine.php [new file with mode: 0644]
inc/reset/reset_holiday.php [new file with mode: 0644]
inc/reset/reset_surfbar.php [new file with mode: 0644]
inc/security.php [new file with mode: 0644]
inc/session.php [new file with mode: 0644]
inc/sql_error.php [new file with mode: 0644]
inc/stats_bonus.php [new file with mode: 0644]
inc/stylesheet.php [new file with mode: 0644]
inc/theme-manager.php [new file with mode: 0644]
inc/weekly/.htaccess [new file with mode: 0644]
inc/weekly/weekly_ [new file with mode: 0644]
inc/weekly/weekly_surfbar.php [new file with mode: 0644]

index fa8c5a1..ffa3832 100644 (file)
@@ -75,6 +75,509 @@ DOCS/validator.sh -text
 /css.php -text
 /doubler.php -text
 /img.php -text
+inc/.htaccess -text
+inc/autopurge.php -text
+inc/autopurge/.htaccess -text
+inc/autopurge/purge- -text
+inc/autopurge/purge-general.php -text
+inc/autopurge/purge-inact.php -text
+inc/autopurge/purge-mails.php -text
+inc/autopurge/purge-tsks.php -text
+inc/autopurge/purge-unconfirmed.php -text
+inc/cache/.htaccess -text
+inc/check-reset.php -text
+inc/databases.php -text
+inc/db/.htaccess -text
+inc/db/lib-mysql3.php -text
+inc/db/lib.php -text
+inc/doubler_send.php -text
+inc/extensions.php -text
+inc/extensions/.htaccess -text
+inc/extensions/ext- -text
+inc/extensions/ext-active.php -text
+inc/extensions/ext-admins.php -text
+inc/extensions/ext-admintheme1.php -text
+inc/extensions/ext-admintheme_default.php -text
+inc/extensions/ext-autopurge.php -text
+inc/extensions/ext-bank.php -text
+inc/extensions/ext-beg.php -text
+inc/extensions/ext-birthday.php -text
+inc/extensions/ext-bonus.php -text
+inc/extensions/ext-cache.php -text
+inc/extensions/ext-country.php -text
+inc/extensions/ext-demo.php -text
+inc/extensions/ext-doubler.php -text
+inc/extensions/ext-holiday.php -text
+inc/extensions/ext-html_mail.php -text
+inc/extensions/ext-mailid.php -text
+inc/extensions/ext-maintenance.php -text
+inc/extensions/ext-mediadata.php -text
+inc/extensions/ext-mods.php -text
+inc/extensions/ext-mydata.php -text
+inc/extensions/ext-newsletter.php -text
+inc/extensions/ext-nickname.php -text
+inc/extensions/ext-online.php -text
+inc/extensions/ext-optimize.php -text
+inc/extensions/ext-order.php -text
+inc/extensions/ext-other.php -text
+inc/extensions/ext-payout.php -text
+inc/extensions/ext-primera.php -text
+inc/extensions/ext-profile.php -text
+inc/extensions/ext-rallye.php -text
+inc/extensions/ext-refback.php -text
+inc/extensions/ext-register.php -text
+inc/extensions/ext-removeip.php -text
+inc/extensions/ext-repair.php -text
+inc/extensions/ext-rewrite.php -text
+inc/extensions/ext-safe.php -text
+inc/extensions/ext-sponsor.php -text
+inc/extensions/ext-sql_patches.php -text
+inc/extensions/ext-support.php -text
+inc/extensions/ext-surfbar.php -text
+inc/extensions/ext-task.php -text
+inc/extensions/ext-theme.php -text
+inc/extensions/ext-top10.php -text
+inc/extensions/ext-transfer.php -text
+inc/extensions/ext-user.php -text
+inc/extensions/ext-wernis.php -text
+inc/extensions/ext-yoomedia.php -text
+inc/fatal_errors.php -text
+inc/footer.php -text
+inc/functions.php -text
+inc/gen_mediadata.php -text
+inc/gen_refback.php -text
+inc/gen_sql_patches.php -text
+inc/header.php -text
+inc/install-inc.php -text
+inc/language.php -text
+inc/language/.htaccess -text
+inc/language/active_de.php -text
+inc/language/admins_de.php -text
+inc/language/autopurge_de.php -text
+inc/language/bank_de.php -text
+inc/language/beg_de.php -text
+inc/language/birthday_de.php -text
+inc/language/bonus_de.php -text
+inc/language/cache_de.php -text
+inc/language/country_de.php -text
+inc/language/de.php -text
+inc/language/doubler_de.php -text
+inc/language/en.ph -text
+inc/language/en.php -text
+inc/language/holiday_de.php -text
+inc/language/html_mail_de.php -text
+inc/language/install_de.php -text
+inc/language/mailid_de.php -text
+inc/language/maintenance_de.php -text
+inc/language/mediadata_de.php -text
+inc/language/mods_de.php -text
+inc/language/newsletter_de.php -text
+inc/language/nickname_de.php -text
+inc/language/online_de.php -text
+inc/language/optimize_de.php -text
+inc/language/order_de.php -text
+inc/language/other_de.php -text
+inc/language/payout_de.php -text
+inc/language/primera_de.php -text
+inc/language/rallye_de.php -text
+inc/language/refback_de.php -text
+inc/language/register_de.php -text
+inc/language/removeip_de.php -text
+inc/language/repair_de.php -text
+inc/language/rewrite_de.php -text
+inc/language/sponsor_de.php -text
+inc/language/support_de.php -text
+inc/language/surfbar_de.php -text
+inc/language/task_de.php -text
+inc/language/theme_de.php -text
+inc/language/top10_de.php -text
+inc/language/transfer_de.php -text
+inc/language/user_de.php -text
+inc/language/wernis_de.php -text
+inc/libs/.htaccess -text
+inc/libs/admins_functions.php -text
+inc/libs/autopurge_functions.php -text
+inc/libs/bonus_functions.php -text
+inc/libs/cache_functions.php -text
+inc/libs/country_functions.php -text
+inc/libs/doubler_functions.php -text
+inc/libs/holiday_functions.php -text
+inc/libs/html_mail_functions.php -text
+inc/libs/mediadata_functions.php -text
+inc/libs/newsletter_functions.php -text
+inc/libs/nickname_functions.php -text
+inc/libs/optimize_functions.php -text
+inc/libs/order_functions.php -text
+inc/libs/payout_functions.php -text
+inc/libs/primera_functions.php -text
+inc/libs/rallye_functions.php -text
+inc/libs/refback_functions.php -text
+inc/libs/register_functions.php -text
+inc/libs/removeip_functions.php -text
+inc/libs/rewrite_functions.php -text
+inc/libs/security_functions.php -text
+inc/libs/sponsor_functions.php -text
+inc/libs/surfbar_functions.php -text
+inc/libs/task_functions.php -text
+inc/libs/transfer_functions.php -text
+inc/libs/user_functions.php -text
+inc/libs/wernis_functions.php -text
+inc/load_cache.php -text
+inc/load_extensions.php -text
+inc/loader/.htaccess -text
+inc/loader/load_cache-admin.php -text
+inc/loader/load_cache-config.php -text
+inc/loader/load_cache-modreg.php -text
+inc/loader/load_cache-refdepths.php -text
+inc/loader/load_cache-refsystem.php -text
+inc/loader/load_cache-them.php -text
+inc/mails/.htaccess -text
+inc/mails/_mails.php -text
+inc/mails/beg_mails.php -text
+inc/mails/birthday_mails.php -text
+inc/mails/bonus_mails.php -text
+inc/modules/.htaccess -text
+inc/modules/admin.php -text
+inc/modules/admin/.htaccess -text
+inc/modules/admin/action- -text
+inc/modules/admin/action-admins.php -text
+inc/modules/admin/action-bank.php -text
+inc/modules/admin/action-country.php -text
+inc/modules/admin/action-doubler.php -text
+inc/modules/admin/action-email.php -text
+inc/modules/admin/action-holiday.php -text
+inc/modules/admin/action-login.php -text
+inc/modules/admin/action-logout.php -text
+inc/modules/admin/action-menu.php -text
+inc/modules/admin/action-misc.php -text
+inc/modules/admin/action-mods.php -text
+inc/modules/admin/action-newsletter.php -text
+inc/modules/admin/action-payouts.php -text
+inc/modules/admin/action-primera.php -text
+inc/modules/admin/action-rallye.php -text
+inc/modules/admin/action-repair.php -text
+inc/modules/admin/action-setup.php -text
+inc/modules/admin/action-sponsor.php -text
+inc/modules/admin/action-stats.php -text
+inc/modules/admin/action-surfbar.php -text
+inc/modules/admin/action-task.php -text
+inc/modules/admin/action-theme.php -text
+inc/modules/admin/action-transfer.php -text
+inc/modules/admin/action-user.php -text
+inc/modules/admin/action-wernis.php -text
+inc/modules/admin/admin-inc.php -text
+inc/modules/admin/overview-inc.php -text
+inc/modules/admin/what- -text
+inc/modules/admin/what-add_bank_package.php -text
+inc/modules/admin/what-add_guestnl_cat.php -text
+inc/modules/admin/what-add_points.php -text
+inc/modules/admin/what-add_rallye.php -text
+inc/modules/admin/what-add_sponsor.php -text
+inc/modules/admin/what-add_surfbar_url.php -text
+inc/modules/admin/what-admin_add.php -text
+inc/modules/admin/what-adminedit.php -text
+inc/modules/admin/what-admins_add.php -text
+inc/modules/admin/what-admins_contct.php -text
+inc/modules/admin/what-admins_edit.php -text
+inc/modules/admin/what-admins_mails.php -text
+inc/modules/admin/what-autopurge.php -text
+inc/modules/admin/what-bonus.php -text
+inc/modules/admin/what-cache_stats.php -text
+inc/modules/admin/what-chk_regs.php -text
+inc/modules/admin/what-config_active.php -text
+inc/modules/admin/what-config_admin.php -text
+inc/modules/admin/what-config_admins.php -text
+inc/modules/admin/what-config_autopurge.php -text
+inc/modules/admin/what-config_beg.php -text
+inc/modules/admin/what-config_birthday.php -text
+inc/modules/admin/what-config_bonus.php -text
+inc/modules/admin/what-config_cache.php -text
+inc/modules/admin/what-config_cats.php -text
+inc/modules/admin/what-config_doubler.php -text
+inc/modules/admin/what-config_email.php -text
+inc/modules/admin/what-config_extensions.php -text
+inc/modules/admin/what-config_holiday.php -text
+inc/modules/admin/what-config_home.php -text
+inc/modules/admin/what-config_mediadata.php -text
+inc/modules/admin/what-config_mods.php -text
+inc/modules/admin/what-config_newsletter.php -text
+inc/modules/admin/what-config_nickname.php -text
+inc/modules/admin/what-config_order.php -text
+inc/modules/admin/what-config_other.php -text
+inc/modules/admin/what-config_payouts.php -text
+inc/modules/admin/what-config_points.php -text
+inc/modules/admin/what-config_primera.php -text
+inc/modules/admin/what-config_proxy.php -text
+inc/modules/admin/what-config_rallye_prices.php -text
+inc/modules/admin/what-config_refid.php -text
+inc/modules/admin/what-config_reg.php -text
+inc/modules/admin/what-config_register.php -text
+inc/modules/admin/what-config_register2.php -text
+inc/modules/admin/what-config_removeip.php -text
+inc/modules/admin/what-config_rewrite.php -text
+inc/modules/admin/what-config_secure.php -text
+inc/modules/admin/what-config_session.php -text
+inc/modules/admin/what-config_sponsor.php -text
+inc/modules/admin/what-config_stats.php -text
+inc/modules/admin/what-config_surfbar.php -text
+inc/modules/admin/what-config_title.php -text
+inc/modules/admin/what-config_top10.php -text
+inc/modules/admin/what-config_transfer.php -text
+inc/modules/admin/what-config_user.php -text
+inc/modules/admin/what-config_wernis.php -text
+inc/modules/admin/what-del_email.php -text
+inc/modules/admin/what-del_holiday.php -text
+inc/modules/admin/what-del_sponsor.php -text
+inc/modules/admin/what-del_task.php -text
+inc/modules/admin/what-del_transfer.php -text
+inc/modules/admin/what-del_user.php -text
+inc/modules/admin/what-edit_emails.php -text
+inc/modules/admin/what-edit_sponsor.php -text
+inc/modules/admin/what-edit_user.php -text
+inc/modules/admin/what-email_archiv.php -text
+inc/modules/admin/what-email_details.php -text
+inc/modules/admin/what-email_stats.php -text
+inc/modules/admin/what-extensions.php -text
+inc/modules/admin/what-guest_add.php -text
+inc/modules/admin/what-guestedit.php -text
+inc/modules/admin/what-holiday_list.php -text
+inc/modules/admin/what-holiday_remove.php -text
+inc/modules/admin/what-list_autopurge.php -text
+inc/modules/admin/what-list_bank_package.php -text
+inc/modules/admin/what-list_beg.php -text
+inc/modules/admin/what-list_bonus.php -text
+inc/modules/admin/what-list_cats.php -text
+inc/modules/admin/what-list_country.php -text
+inc/modules/admin/what-list_doubler.php -text
+inc/modules/admin/what-list_holiday.php -text
+inc/modules/admin/what-list_links.php -text
+inc/modules/admin/what-list_newsletter.php -text
+inc/modules/admin/what-list_norefs.php -text
+inc/modules/admin/what-list_payouts.php -text
+inc/modules/admin/what-list_primera.php -text
+inc/modules/admin/what-list_rallyes.php -text
+inc/modules/admin/what-list_refs.php -text
+inc/modules/admin/what-list_sponsor.php -text
+inc/modules/admin/what-list_sponsor_pay.php -text
+inc/modules/admin/what-list_sponsor_pays.php -text
+inc/modules/admin/what-list_surfbar_urls.php -text
+inc/modules/admin/what-list_task.php -text
+inc/modules/admin/what-list_transfer.php -text
+inc/modules/admin/what-list_unconfirmed.php -text
+inc/modules/admin/what-list_user.php -text
+inc/modules/admin/what-list_wernis.php -text
+inc/modules/admin/what-lock_sponsor.php -text
+inc/modules/admin/what-lock_user.php -text
+inc/modules/admin/what-logs.php -text
+inc/modules/admin/what-maintenance.php -text
+inc/modules/admin/what-mem_add.php -text
+inc/modules/admin/what-memedit.php -text
+inc/modules/admin/what-optimize.php -text
+inc/modules/admin/what-overview.php -text
+inc/modules/admin/what-payments.php -text
+inc/modules/admin/what-refbanner.php -text
+inc/modules/admin/what-repair_amenu.php -text
+inc/modules/admin/what-repair_cats.php -text
+inc/modules/admin/what-repair_gmenu.php -text
+inc/modules/admin/what-repair_mmenu.php -text
+inc/modules/admin/what-send_bonus.php -text
+inc/modules/admin/what-send_newsletter.php -text
+inc/modules/admin/what-stats_mods.php -text
+inc/modules/admin/what-sub_points.php -text
+inc/modules/admin/what-surfbar_stats.php -text
+inc/modules/admin/what-theme_check.php -text
+inc/modules/admin/what-theme_edit.php -text
+inc/modules/admin/what-theme_import.php -text
+inc/modules/admin/what-unlock_emails.php -text
+inc/modules/admin/what-unlock_sponsor.php -text
+inc/modules/admin/what-unlock_surfbar_urls.php -text
+inc/modules/admin/what-updates.php -text
+inc/modules/admin/what-usage.php -text
+inc/modules/admin/what-user_contct.php -text
+inc/modules/admin/what-user_online.php -text
+inc/modules/admin/what-usr_online.php -text
+inc/modules/chk_login.php -text
+inc/modules/frametester.php -text
+inc/modules/guest/.htaccess -text
+inc/modules/guest/action- -text
+inc/modules/guest/action-admin.php -text
+inc/modules/guest/action-main.php -text
+inc/modules/guest/action-members.php -text
+inc/modules/guest/action-online.php -text
+inc/modules/guest/action-sponsor.php -text
+inc/modules/guest/action-themes.php -text
+inc/modules/guest/what- -text
+inc/modules/guest/what-active.php -text
+inc/modules/guest/what-admin.php -text
+inc/modules/guest/what-agb.php -text
+inc/modules/guest/what-beg.php -text
+inc/modules/guest/what-confirm.php -text
+inc/modules/guest/what-doubler.php -text
+inc/modules/guest/what-impressum.php -text
+inc/modules/guest/what-infos.php -text
+inc/modules/guest/what-login.php -text
+inc/modules/guest/what-mediadata.php -text
+inc/modules/guest/what-rallyes.php -text
+inc/modules/guest/what-register.php -text
+inc/modules/guest/what-sponsor_agb.php -text
+inc/modules/guest/what-sponsor_infos.php -text
+inc/modules/guest/what-sponsor_login.php -text
+inc/modules/guest/what-sponsor_reg.php -text
+inc/modules/guest/what-stats.php -text
+inc/modules/guest/what-top10.php -text
+inc/modules/guest/what-welcome.php -text
+inc/modules/guest/what-wernis_portal.php -text
+inc/modules/index.php -text
+inc/modules/loader.php -text
+inc/modules/login.php -text
+inc/modules/member/.htaccess -text
+inc/modules/member/action- -text
+inc/modules/member/action-account.php -text
+inc/modules/member/action-bank.php -text
+inc/modules/member/action-extras.php -text
+inc/modules/member/action-logout.php -text
+inc/modules/member/action-main.php -text
+inc/modules/member/action-order.php -text
+inc/modules/member/action-rals.php -text
+inc/modules/member/action-stats.php -text
+inc/modules/member/action-surfbar.php -text
+inc/modules/member/action-themes.php -text
+inc/modules/member/what- -text
+inc/modules/member/what-bank_create.php -text
+inc/modules/member/what-bank_deposit.php -text
+inc/modules/member/what-bank_infos.php -text
+inc/modules/member/what-bank_output.php -text
+inc/modules/member/what-bank_withdraw.php -text
+inc/modules/member/what-beg.php -text
+inc/modules/member/what-beg2.php -text
+inc/modules/member/what-bonus.php -text
+inc/modules/member/what-categories.php -text
+inc/modules/member/what-doubler.php -text
+inc/modules/member/what-guest.php -text
+inc/modules/member/what-holiday.php -text
+inc/modules/member/what-html_mail.php -text
+inc/modules/member/what-logout.php -text
+inc/modules/member/what-mydata.php -text
+inc/modules/member/what-newsletter.php -text
+inc/modules/member/what-nickname.php -text
+inc/modules/member/what-order.php -text
+inc/modules/member/what-payout.php -text
+inc/modules/member/what-points.php -text
+inc/modules/member/what-primera.php -text
+inc/modules/member/what-rallyes.php -text
+inc/modules/member/what-refback.php -text
+inc/modules/member/what-reflinks.php -text
+inc/modules/member/what-sponsor.php -text
+inc/modules/member/what-stats.php -text
+inc/modules/member/what-support.php -text
+inc/modules/member/what-surfbar_book.php -text
+inc/modules/member/what-surfbar_list.php -text
+inc/modules/member/what-surfbar_start.php -text
+inc/modules/member/what-surfbar_stats.php -text
+inc/modules/member/what-themes.php -text
+inc/modules/member/what-transfer.php -text
+inc/modules/member/what-unconfirmed.php -text
+inc/modules/member/what-welcome.php -text
+inc/modules/member/what-wernis.php -text
+inc/modules/order.php -text
+inc/modules/sponsor.php -text
+inc/modules/sponsor/.htaccess -text
+inc/modules/sponsor/.php -text
+inc/modules/sponsor/account.php -text
+inc/modules/sponsor/settings.php -text
+inc/modules/sponsor/welcome.php -text
+inc/modules/welcome.php -text
+inc/monthly/.htaccess -text
+inc/monthly/monthly_ -text
+inc/monthly/monthly_beg.php -text
+inc/monthly/monthly_bonus.php -text
+inc/monthly/monthly_newsletter.php -text
+inc/monthly/monthly_surfbar.php -text
+inc/mysql-connect.php -text
+inc/mysql-manager.php -text
+inc/patch-system.php -text
+inc/phpmailer/ChangeLog.txt -text
+inc/phpmailer/LICENSE -text
+inc/phpmailer/README -text
+inc/phpmailer/class.phpmailer.php -text
+inc/phpmailer/class.pop3.php -text
+inc/phpmailer/class.smtp.php -text
+inc/phpmailer/codeworxtech.html -text
+inc/phpmailer/docs/extending.html -text
+inc/phpmailer/docs/faq.html -text
+inc/phpmailer/docs/phpmailer_sm.gif -text
+inc/phpmailer/docs/pop3_article.txt -text
+inc/phpmailer/docs/use_gmail.txt -text
+inc/phpmailer/examples/contents.html -text
+inc/phpmailer/examples/images/bkgrnd.gif -text
+inc/phpmailer/examples/images/phpmailer.gif -text
+inc/phpmailer/examples/images/phpmailer.png -text
+inc/phpmailer/examples/images/phpmailer_mini.gif -text
+inc/phpmailer/examples/index.html -text
+inc/phpmailer/examples/pop3_before_smtp_test.php -text
+inc/phpmailer/examples/test1.php -text
+inc/phpmailer/examples/test_gmail.php -text
+inc/phpmailer/examples/test_mail.php -text
+inc/phpmailer/examples/test_sendmail.php -text
+inc/phpmailer/examples/test_smtp.php -text
+inc/phpmailer/language/phpmailer.lang-br.php -text
+inc/phpmailer/language/phpmailer.lang-ca.php -text
+inc/phpmailer/language/phpmailer.lang-cz.php -text
+inc/phpmailer/language/phpmailer.lang-de.php -text
+inc/phpmailer/language/phpmailer.lang-dk.php -text
+inc/phpmailer/language/phpmailer.lang-en.php -text
+inc/phpmailer/language/phpmailer.lang-es.php -text
+inc/phpmailer/language/phpmailer.lang-et.php -text
+inc/phpmailer/language/phpmailer.lang-fi.php -text
+inc/phpmailer/language/phpmailer.lang-fo.php -text
+inc/phpmailer/language/phpmailer.lang-fr.php -text
+inc/phpmailer/language/phpmailer.lang-hu.php -text
+inc/phpmailer/language/phpmailer.lang-it.php -text
+inc/phpmailer/language/phpmailer.lang-ja.php -text
+inc/phpmailer/language/phpmailer.lang-nl.php -text
+inc/phpmailer/language/phpmailer.lang-no.php -text
+inc/phpmailer/language/phpmailer.lang-pl.php -text
+inc/phpmailer/language/phpmailer.lang-ro.php -text
+inc/phpmailer/language/phpmailer.lang-ru.php -text
+inc/phpmailer/language/phpmailer.lang-se.php -text
+inc/phpmailer/language/phpmailer.lang-tr.php -text
+inc/phpmailer/phpdoc/PHPMailer/PHPMailer.html -text
+inc/phpmailer/phpdoc/PHPMailer/SMTP.html -text
+inc/phpmailer/phpdoc/PHPMailer/_class_phpmailer_php.html -text
+inc/phpmailer/phpdoc/PHPMailer/_class_smtp_php.html -text
+inc/phpmailer/phpdoc/blank.html -text
+inc/phpmailer/phpdoc/classtrees_PHPMailer.html -text
+inc/phpmailer/phpdoc/elementindex.html -text
+inc/phpmailer/phpdoc/elementindex_PHPMailer.html -text
+inc/phpmailer/phpdoc/errors.html -text
+inc/phpmailer/phpdoc/index.html -text
+inc/phpmailer/phpdoc/li_PHPMailer.html -text
+inc/phpmailer/phpdoc/media/banner.css -text
+inc/phpmailer/phpdoc/media/stylesheet.css -text
+inc/phpmailer/phpdoc/packages.html -text
+inc/phpmailer/test/phpmailer_test.php -text
+inc/phpmailer/test/phpunit.php -text
+inc/phpmailer/test/test.png -text
+inc/pool-update.php -text
+inc/profile-updte.php -text
+inc/rdf.class.php -text
+inc/reset/.htaccess -text
+inc/reset/reset_ -text
+inc/reset/reset_beg.php -text
+inc/reset/reset_bonus.php -text
+inc/reset/reset_daily.php -text
+inc/reset/reset_engine.php -text
+inc/reset/reset_holiday.php -text
+inc/reset/reset_surfbar.php -text
+inc/security.php -text
+inc/session.php -text
+inc/sql_error.php -text
+inc/stats_bonus.php -text
+inc/stylesheet.php -text
+inc/theme-manager.php -text
+inc/weekly/.htaccess -text
+inc/weekly/weekly_ -text
+inc/weekly/weekly_surfbar.php -text
 /index.php -text
 /install.php -text
 install/menu-de.sql -text
diff --git a/inc/.htaccess b/inc/.htaccess
new file mode 100644 (file)
index 0000000..14249c5
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/inc/autopurge.php b/inc/autopurge.php
new file mode 100644 (file)
index 0000000..b312634
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/29/2004 *
+ * ===============                              Last change: 11/26/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : autopurge.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von veralteten Mail-Links         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Load all includes
+$INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/autopurge/", "purge-");
+
+// Include them all
+foreach ($INC_POOL as $fqfn) {
+       // Load them only once
+       require_once($fqfn);
+} // END - foreach
+
+// Remove array
+unset($INC_POOL);
+
+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/inc/autopurge/.htaccess b/inc/autopurge/.htaccess
new file mode 100644 (file)
index 0000000..14249c5
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/inc/autopurge/purge- b/inc/autopurge/purge-
new file mode 100644 (file)
index 0000000..ff9a9af
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/14/2008 *
+ * ===============                              Last change: 09/14/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : purge-                                           *
+ * -------------------------------------------------------------------- *
+ * Short description :                                                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  :                                                  *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+} // END - if
+
+//
+?>
diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php
new file mode 100644 (file)
index 0000000..3ee1325
--- /dev/null
@@ -0,0 +1,151 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/14/2008 *
+ * ===============                              Last change: 09/14/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : purge-general.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : General autopurging, nothing extension-specific  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Allgemeine, nicht erweiterunsabhaengige Auto-    *
+ *                     Loeschung                                        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+}
+
+if (($_CONFIG['auto_purge_active'] == "Y") && ($_CONFIG['auto_purge'] > 0)) {
+       // First calculate the timestamp
+       if (function_exists('CREATE_TIME_SELECTIONS')) {
+               $PURGE = $_CONFIG['auto_purge'];
+       } else {
+               $PURGE = $_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 <= (UNIX_TIMESTAMP() - %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=%s 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;
+                               } // END - if
+
+                               // 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=%s",
+                                array(bigintval($mid)), __FILE__, __LINE__);
+
+                               // Update status of order
+                               $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%s LIMIT 1",
+                                array(bigintval($pool)), __FILE__, __LINE__);
+                       } // END - if
+               } // END - while
+
+               // Add last points to last user account
+               if ($points > 0) AUTOPURGE_ADD_POINTS($uid, $points);
+       } // END - if
+
+       // 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=%s",
+                                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=%s",
+                                        array(bigintval($bid)), __FILE__, __LINE__);
+
+                                       // Update status of order
+                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%s LIMIT 1",
+                                        array(bigintval($bid)), __FILE__, __LINE__);
+                               } // END - if
+                       } // END - while
+
+                       // Add points to jackpot
+                       ADD_JACKPOT($points);
+
+                       // Add points for the admin
+                       $admin_points += $points;
+               } // END - if
+
+               // Free memory
+               SQL_FREERESULT($result);
+       } // END - if
+
+       // Add points from deleted accounts to jackpot, but here just add to notify mail
+       if ($admin_points > 0) {
+               // Send mail to admin
+               SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_SUBJECT, "admin_autopurge_points", TRANSLATE_COMMA($points), "0");
+       } // END - if
+} // END - if
+
+//
+?>
diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php
new file mode 100644 (file)
index 0000000..b1d5bc9
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/14/2008 *
+ * ===============                              Last change: 09/14/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : purge-inactive.php                               *
+ * -------------------------------------------------------------------- *
+ * Short description : Purge of inactive users                          *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von inaktiven Mitgliedern         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+} // END - if
+
+// Shall I look for inactive accounts and autopurge inactive accounts?
+if ($_CONFIG['autopurge_inactive'] == "Y") {
+       // Ok, let's have a look...
+       $since = bigintval($_CONFIG['ap_inactive_since']);
+       $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['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") {
+               // Include only users with no active holiday
+               $EXCLUDE_LIST .= " AND d.holiday_active='N'";
+       } // END - if
+
+       // Check for all accounts
+       $result_inactive = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.email, d.last_online
+FROM "._MYSQL_PREFIX."_user_data AS d
+WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s)
+".$EXCLUDE_LIST."
+ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
+
+       if (SQL_NUMROWS($result_inactive) > 0) {
+               // Prepare variables and constants...
+               $UIDs = "";
+               define('__INACTIVE_SINCE', ($_CONFIG['ap_inactive_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=%s LIMIT 1",
+                        array(bigintval($uid)), __FILE__, __LINE__);
+               } // END - while
+
+               // Remove last comma
+               $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
+
+               // Send mail notification to admin
+               SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_INACTIVE_SUBJECT, "admin_autopurge_inactive", $UIDs, "");
+       } // END - if
+
+       // 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($_CONFIG['ap_in_time']);
+       $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
+FROM "._MYSQL_PREFIX."_user_data AS d
+WHERE status='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND last_online < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
+".$EXCLUDE_LIST."
+ORDER BY userid",
+        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, ""));
+               } // END - while
+
+               // Remove last comma
+               $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
+
+               // Send mail notification to admin
+               if ($_CONFIG['ap_un_mail'] == "Y") {
+                       SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_DELETE_SUBJECT, "admin_autopurge_delete", $UIDs, "");
+               } // END - if
+       } // END - if
+
+       // Free memory
+       SQL_FREERESULT($result_inactive);
+} // END - if
+
+//
+?>
diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php
new file mode 100644 (file)
index 0000000..6d49f08
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/29/2004 *
+ * ===============                              Last change: 11/26/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : autopurge.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von veralteten Mail-Links         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+} // END - if
+
+// Search for mails from deleted members?
+if ($_CONFIG['ap_del_mails'] == "Y") {
+       // Okay, let's check for them...
+       $since = bigintval($_CONFIG['ap_dm_timeout']);
+       $result_mails = SQL_QUERY_ESC("SELECT sender\
+FROM "._MYSQL_PREFIX."_pool
+WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
+ORDER BY sender ASC",
+        array($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=%s 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=%s",
+                                       array(bigintval($sender)), __FILE__, __LINE__);
+                               $DELETED += SQL_AFFECTEDROWS();
+
+                               // Reset query (to prevent possible errors) ...
+                               $since = bigintval($_CONFIG['ap_dm_timeout']);
+                               $result_mails = SQL_QUERY_ESC("SELECT sender
+FROM "._MYSQL_PREFIX."_pool
+WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
+ORDER BY sender ASC",
+                                       array($since), __FILE__, __LINE__);
+                       }
+               }
+       }
+
+       // Free memory
+       SQL_FREERESULT($result_mails);
+
+       // Now let's check for stats entries as well
+       $since = bigintval($_CONFIG['ap_dm_timeout']);
+       $result_mails = SQL_QUERY_ESC("SELECT sender
+FROM "._MYSQL_PREFIX."_user_stats
+WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
+ORDER BY sender ASC",
+               array($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=%s 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=%s", array(bigintval($sender)), __FILE__, __LINE__);
+                               $DELETED += SQL_AFFECTEDROWS();
+
+                               // Reset query (to prevent possible errors) ...
+                               $since = bigintval($_CONFIG['ap_dm_timeout']);
+                               $result_mails = SQL_QUERY_ESC("SELECT sender
+FROM "._MYSQL_PREFIX."_user_stats
+WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
+ORDER BY sender ASC",
+                                       array($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
+               SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, "admin_autopurge_del_mails", $DELETED, "");
+       }
+}
+
+//
+?>
diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php
new file mode 100644 (file)
index 0000000..a2a9038
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/14/2008 *
+ * ===============                              Last change: 09/14/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : purge-tsks.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von veralteten Mail-Links         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+} // END - if
+
+// Check version (must be > 0.0)
+if ((GET_EXT_VERSION("task") > "0.0") && ($_CONFIG['ap_tasks'] == "Y")) {
+       // Since when shall we purge?
+       $since = bigintval($_CONFIG['ap_tasks_time']);
+
+       // Purge deleted tasks (no notification to admin)
+       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY
+FROM "._MYSQL_PREFIX."_task_system
+WHERE status='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)",
+        array($since), __FILE__, __LINE__);
+       $DELETED = SQL_AFFECTEDROWS();
+
+       if (($DELETED > 0) && ($_CONFIG['ap_tasks_mail'] == "Y")) {
+               // Send out email to admin
+               SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TASKS_SUBJECT, "admin_autopurge_tsks", $DELETED, "");
+       } // END - if
+} // END - if
+
+//
+?>
diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php
new file mode 100644 (file)
index 0000000..7e997f2
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/29/2004 *
+ * ===============                              Last change: 11/26/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : autopurge.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von veralteten Mail-Links         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+       // Abort here
+       return false;
+} // END - if
+
+// Shall I auto-purge unconfirmed accounts?
+if ($_CONFIG['autopurge_unconfirmed'] == "Y") {
+       // Init variables and find unconfirmed accounts which I shall auto-purge
+       $time = bigintval($_CONFIG['ap_un_time']);
+       $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined
+FROM "._MYSQL_PREFIX."_user_data
+WHERE status='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s)
+ORDER BY userid ASC",
+        array($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, ""));
+               } // END - while
+
+               // Remove last comma
+               $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
+
+               // Send mail notification to admin
+               if ($_CONFIG['ap_un_mail'] == "Y") {
+                       SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, "admin_autopurge_unconfirmed", $UIDs, "");
+               } // END - if
+       } // END - if
+
+       // Free memory
+       SQL_FREERESULT($result_uncon);
+}
+
+//
+?>
diff --git a/inc/cache/.htaccess b/inc/cache/.htaccess
new file mode 100644 (file)
index 0000000..14249c5
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/inc/check-reset.php b/inc/check-reset.php
new file mode 100644 (file)
index 0000000..ec19cb8
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/12/2008 *
+ * ===============                              Last change: 09/12/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : check-reset.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Checks for if reset shall be executed            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Prueft ob Reset laufen soll                      *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// 01    2                            2        2         3321    1                         2                     21    1                        2                    21    1                        2                  21    1      2                 21    1         1    1                         2            210
+if ((date("d", $_CONFIG['last_update']) != date("d", time())) && (!defined('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1) && (!defined('DEBUG_MODE'))) {
+       // Do daily things in external PHP file but only when script is completely setup
+       // Daily reset was run!
+       define('__DAILY_RESET', true);
+
+       // Add more includes
+       $INC_POOL = RESET_ADD_INCLUDES();
+
+       // Is this not an array?
+       if (!is_array($INC_POOL)) {
+               // Log the error
+               DEBUG_LOG(basename(__FILE__).":INC_POOL is no array!");
+
+               // Skip further executions
+               return;
+       } // END - if
+
+       // Run the full reset scripts
+       foreach ($INC_POOL as $incFile) {
+               require_once($incFile);
+       } // END - foreach
+
+       // Remove array
+       unset($INC_POOL);
+} // END - if
+
+//
+?>
diff --git a/inc/databases.php b/inc/databases.php
new file mode 100644 (file)
index 0000000..99d0c01
--- /dev/null
@@ -0,0 +1,131 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/25/2003 *
+ * ===============                              Last change: 05/29/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : databases.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Definitions and arrays (hard-coded databases)    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Definitionen und Datenfelder (hart-codertiert)   *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// System-wide return codes
+define('CODE_WRONG_PASS'       ,  1);
+define('CODE_WRONG_ID'         ,  2);
+define('CODE_ID_LOCKED'        ,  3);
+define('CODE_ID_UNCONFIRMED'   ,  4);
+define('CODE_UNKNOWN_STATUS'   ,  5);
+define('CODE_NO_COOKIES'       ,  6);
+define('CODE_CNTR_FAILED'      ,  8);
+define('CODE_LOGOUT_DONE'      ,  8);
+define('CODE_LOGOUT_FAILED'    ,  9);
+define('CODE_URL_TLOCK'        , 10);
+define('CODE_URL_FOUND'        , 11);
+define('CODE_OVERLENGTH'       , 12);
+define('CODE_SUBJ_URL'         , 13);
+define('CODE_BLIST_URL'        , 14);
+define('CODE_NO_RECS_LEFT'     , 15);
+define('CODE_INVALID_TAGS'     , 16);
+define('CODE_MORE_POINTS'      , 18);
+define('CODE_COOKIES_DISABLED' , 18);
+define('CODE_DATA_INVALID'     , 19);
+define('CODE_POSSIBLE_INVALID' , 20);
+define('CODE_ACCOUNT_LOCKED'   , 21);
+define('CODE_USER_404'         , 22);
+define('CODE_STATS_404'        , 23);
+define('CODE_ALREADY_CONFIRMED', 24);
+define('CODE_ERROR_MAILID'     , 25);
+define('CODE_EXTENSION_PROBLEM', 26);
+define('CODE_MORE_RECEIVERS1'  , 28);
+define('CODE_MORE_RECEIVERS2'  , 28);
+define('CODE_MORE_RECEIVERS3'  , 29);
+define('CODE_INVALID_URL'      , 30);
+define('CODE_MENU_NOT_VALID'   , 31);
+define('CODE_LOGIN_FAILED'     , 32);
+
+// Full version string: /([0-9]){1}\.([0-9]){1}\.([0-9]){1}(-(alpha|beta|pre|rc([1-3]))([0-9]+))?/
+// If you understand regular expressions ^^^ you may know how I versionize... ;-)
+define('FULL_VERSION', "0.2.1-FINAL");
+
+// Replacement strings
+$REPLACER = array(
+       'userid'  => "%uid%",                   // User-ID
+       'surname' => "%vorname%",               // Surname
+       'family'  => "%nachname%",              // Family name
+       'gender'  => "%anrede%",                // Gender
+);
+
+// One day
+$_CONFIG['one_day'] = 60*60*24;
+
+//
+// Timestamp for yesterday, today ... all at 00:00 am
+define('START_YDAY', MAKE_TIME(0, 0, 0, time() - $_CONFIG['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_SVN_REVISION', "435");
+
+// Take a prime number which is long (if you know a longer one please try it out!)
+define('_PRIME', 591623);
+
+// Calculate "entropy" with the prime number (for code generation)
+define('_ADD', (_PRIME * _PRIME / (pi() * $_CONFIG['code_length'] + 1)));
+
+// Random number for e.g. "cache-buster" used in OpenX script
+define('CACHE_BUSTER', mt_rand(1000000, 9999999));
+
+// Extra title is empty by default
+$EXTRA_TITLE = "";
+
+//
+?>
diff --git a/inc/db/.htaccess b/inc/db/.htaccess
new file mode 100644 (file)
index 0000000..14249c5
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php
new file mode 100644 (file)
index 0000000..fe033ae
--- /dev/null
@@ -0,0 +1,332 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/29/2004 *
+ * ===============                              Last change: 08/29/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : lib-mysql3.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Database layer for MySQL +3.x server             *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Datenbankschicht fuer MySQL +3.x Server          *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// SQL queries
+function SQL_QUERY($sql_string, $F, $L) {
+       global $link, $CSS, $_CONFIG, $OK;
+
+       // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard
+       $sql_string = str_replace("\t", " ", str_replace("\n", " ", str_replace("\r", " ", $sql_string)));
+
+       // Starting time
+       $querytimeBefore = array_sum(explode(' ', microtime()));
+
+       // Run SQL command
+       //* DEBUG: */ echo $sql_string."<br />\n";
+       $result = @mysql_query($sql_string, $link)
+        or ADD_FATAL($F." (".$L."):".mysql_error()."<br />
+".MYSQL_QUERY_STRING."<br />
+".$sql_string);
+
+       // Save last successfull query
+       $_CONFIG['db_last_query'] = $sql_string;
+
+       // Ending time
+       $querytimeAfter = array_sum(explode(' ', microtime()));
+
+       // Calculate query time
+       $queryTime = $querytimeAfter - $querytimeBefore;
+
+       // Count this query
+       if (!isset($_CONFIG['sql_count'])) $_CONFIG['sql_count'] = 0;
+       $_CONFIG['sql_count']++;
+
+       // Debug output
+       //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
+
+       if (($CSS != "1") && ($CSS != "-1") && (isBooleanConstantAndTrue('DEBUG_MODE')) && (isBooleanConstantAndTrue('DEBUG_SQL'))) {
+               //
+               // Debugging stuff...
+               //
+               $fp = @fopen(PATH."inc/cache/mysql.log", 'a') or mxchange_die("Cannot write mysql.log!");
+               if (!isset($OK)) {
+                       // Write first entry
+                       fwrite($fp, "Module=".$GLOBALS['module']."\n");
+                       $OK = true;
+               } // END - if
+               fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace('\r', "", str_replace('\n', " ", $sql_string))."\n");
+               fclose($fp);
+       } // END - if
+
+       // Count DB hits
+       if (!isset($_CONFIG['db_hits_run'])) {
+               // Count in dummy variable
+               $_CONFIG['db_hits_run'] = 1;
+       } else {
+               // Count to config array
+               $_CONFIG['db_hits_run']++;
+       }
+
+       // Return the result
+       return $result;
+}
+
+// SQL num rows
+function SQL_NUMROWS($result) {
+       // Is the result a valid resource?
+       if (is_resource($result)) {
+               // Get the count of rows from database
+               $lines = @mysql_num_rows($result);
+
+               // Is the result empty? Then we have an error!
+               if (empty($lines)) $lines = 0;
+       } else {
+               // No resource given, no lines found!
+               $lines = 0;
+       }
+       return $lines;
+}
+
+// SQL affected rows
+function SQL_AFFECTEDROWS() {
+       global $link;
+
+       // Valid link resource?
+       if (!is_resource($link)) return false;
+
+       // Get affected rows
+       $lines = @mysql_affected_rows($link);
+
+       // Return it
+       return $lines;
+}
+
+// SQL fetch row
+function SQL_FETCHROW($result) {
+       // Init data
+       $DATA = array();
+
+       // Is a result resource set?
+       if (!is_resource($result)) return false;
+
+       $DATA = @mysql_fetch_row($result);
+       return $DATA;
+}
+
+// SQL fetch array
+function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) {
+       // Is a result resource set?
+       if (!is_resource($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($dbName, $link, $F, $L) {
+       $select = false;
+       if (is_resource($link)) {
+               $select = @mysql_select_db($dbName, $link) or ADD_FATAL($F." (".$L."):".mysql_error());
+       }
+       return $select;
+}
+// SQL close link
+function SQL_CLOSE(&$link, $F, $L) {
+       global $_CONFIG, $cacheInstance, $cacheArray;
+
+       // Is there still a valid link?
+       if (!is_resource($link)) {
+               // Skip double close
+               return false;
+       } // END - if
+
+       // Add new hits
+       $_CONFIG['db_hits'] += $_CONFIG['db_hits_run'];
+       //* DEBUG: */ echo "DB=".$_CONFIG['db_hits'].",CACHE=".$_CONFIG['cache_hits']."<br />\n";
+       if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($_CONFIG['db_hits'])) && (isset($_CONFIG['cache_hits'])) && (is_object($cacheInstance))) {
+               // Update counter for db/cache
+               UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])));
+       } // END - if
+
+       // Close database link and forget the link
+       $close = @mysql_close($link) or ADD_FATAL($F." (".$L."):".mysql_error());
+       $link = null;
+       return $close;
+}
+// SQL free result
+function SQL_FREERESULT($result) {
+       if (!is_resource($result)) {
+               // Abort here
+               return false;
+       } // END - if
+
+       $res = @mysql_free_result($result);
+       return $res;
+}
+// SQL string escaping
+function SQL_QUERY_ESC($qstring, $data, $file, $line, $run=true, $strip=true) {
+       global $link;
+
+       if ($strip) {
+               $strip = "true";
+       } else {
+               $strip = "false";
+       }
+
+       $query = "";
+       $eval = "\$query = sprintf(\"".$qstring."\"";
+       foreach ($data as $var) {
+               if ((!empty($var)) || ($var === 0)) {
+                       $eval .= ", SQL_ESCAPE(\"".$var."\",true,".$strip.")";
+               } else {
+                       $eval .= ", ''";
+               }
+       }
+       $eval .= ");";
+       //
+       // Debugging
+       //
+       //$fp = fopen(PATH."inc/cache/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);
+       // Was the eval() command fine?
+       if (empty($query)) {
+               // Something went wrong?
+               print "eval=".htmlentities($eval)."<pre>";
+               debug_print_backtrace();
+               die("</pre>");
+       } // END - if
+
+       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, $secureString=true,$strip=true) {
+       global $link;
+
+       // Secure string first? (which is the default behaviour!)
+       if ($secureString) {
+               // Then do it here
+               $str = secureString($str, $strip);
+       } // END - if
+
+       if (!is_resource($link)) {
+               // Fall-back to addslashes() when there is no link
+               return addslashes($str);
+       } // END - if
+
+       if (function_exists('mysql_real_escape_string')) {
+               // The new and improved version
+               //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):str={$str}<br />\n";
+               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, $columns, $idRow, $id, $F, $L) {
+       // Prepare the SQL statement
+       $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%s LIMIT 1";
+
+       // Return the result
+       return SQL_QUERY_ESC($SQL, array(bigintval($id)), $F, $L);
+}
+// ALTER TABLE wrapper function
+function SQL_ALTER_TABLE($sql, $F, $L) {
+       // Shall we add?
+       if (eregi("ADD", $sql) > 0) {
+               // Extract table name
+               $tableArray = explode(" ", $sql);
+               $tableName = str_replace("`", "", $tableArray[2]);
+
+               // And column name as well
+               $columnName = str_replace("`", "", $tableArray[4]);
+
+               // Get column information
+               $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
+                       array($tableName, $columnName), $F, $L);
+
+               // Do we have no entry?
+               if (SQL_NUMROWS($result) == 0) {
+                       // Do the query
+                       return SQL_QUERY($sql, $F, $L, false);
+               } // END - if
+       } else {
+               // Send it to the SQL_QUERY() function
+               return SQL_QUERY($sql, $F, $L, false);
+       }
+}
+//
+?>
diff --git a/inc/db/lib.php b/inc/db/lib.php
new file mode 100644 (file)
index 0000000..7578d60
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 01/31/2004 *
+ * ===============                              Last change: 08/29/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : lib.php                                          *
+ * -------------------------------------------------------------------- *
+ * Short description : SQL abstraction layer                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : SQL-Typ auswaehlen                               *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Select MySQL 3 as default database type
+if (_DB_TYPE == "_DB_TYPE") define('_DB_TYPE', "mysql3");
+
+// Create include file name
+$INC = sprintf("%sinc/db/lib-%s.php", PATH, _DB_TYPE);
+
+if ((file_exists($INC)) && (is_readable($INC))) {
+       // Include abstraction layer
+       require_once($INC);
+} else {
+       // Bye, bye...
+       die("Cannot load database abstraction layer! R.I.P.");
+}
+
+//
+?>
diff --git a/inc/doubler_send.php b/inc/doubler_send.php
new file mode 100644 (file)
index 0000000..f3084e2
--- /dev/null
@@ -0,0 +1,175 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 02/16/2005 *
+ * ===============                              Last change: 01/21/2006 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : doubler_send.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Send's out mails for doubled points              *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Sendet Mails bei vergueteter Verdoppelung aus    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Initialize variables
+$jackpot = 0; $user = 0;
+
+// Get total points of the doubler itself
+$DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT();
+if ($DOUBLER_POINTS == 0) {
+       // Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...)
+       return;
+}
+
+// If not currently doubled set it to zero
+unset($_GET['DOUBLER_UID']);
+unset($_POST['DOUBLER_UID']);
+set_session('DOUBLER_UID', "");
+if (empty($DOUBLER_UID)) $DOUBLER_UID = 0;
+
+// Check for doubles which we can pay out
+$min = bigintval($_CONFIG['doubler_min'] * 2);
+$result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
+FROM "._MYSQL_PREFIX."_doubler AS d
+LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
+ON d.userid=u.userid
+WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N'
+ORDER BY d.timemark", array($DOUBLER_POINTS, $min), __FILE__, __LINE__);
+
+// Check for accounts with limitation
+$result_main = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
+FROM "._MYSQL_PREFIX."_doubler AS d
+LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
+ON d.userid=u.userid
+WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N'
+ORDER BY d.timemark
+LIMIT %d", array($DOUBLER_POINTS, $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=%s 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=%s 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
+                               ADD_POINTS_REFSYSTEM($uid, $points, false, "0", false, "direct");
+                       } // END - if
+
+                       // Set entry as "payed"
+                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%s 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
+                               SUB_JACKPOT($points);
+                               $jackpot -= $points;
+
+                               // 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
+                               SUB_POINTS($_CONFIG['doubler_uid'], $points);
+
+                               // Okay, done!
+                               $OK = true;
+                       }
+
+                       // Update doubler's account only when others are not updated
+                       if (!$OK) {
+                               // Add points to used doubler points
+                               UPDATE_CONFIG("doubler_used", $points, "+");
+                       }
+
+                       // 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/inc/extensions.php b/inc/extensions.php
new file mode 100644 (file)
index 0000000..0b75f56
--- /dev/null
@@ -0,0 +1,643 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 03/25/2004 *
+ * ===============                              Last change: 09/29/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : extensions.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Extension management                             *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Erweiterungen-Management                         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+//
+function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
+{
+       global $NOTES, $_CONFIG, $INC_POOL, $cacheInstance;
+       // We want to register an extension and registration status is by default "failed" (= false)
+       $EXT_LOAD_MODE = "register"; $ret = false; $SQLs = array();
+       $INC_POOL = array();
+
+       // This shall never do a non-admin user!
+       if (!IS_ADMIN()) return false;
+
+       // Is this extension already installed?
+       if (EXT_IS_ACTIVE($ext_name)) return false;
+
+       // Generate file name
+       $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name);
+
+       // Does this extension exists?
+       if (FILE_READABLE($file)) {
+               // Extension was found so we can load it in registration mode
+               $EXT_ALWAYS_ACTIVE = "N";
+               require($file);
+
+               // And run possible updates
+               $EXT_LOAD_MODE = "update"; $EXT_UPDATE_DEPENDS = "";
+               foreach ($EXT_VER_HISTORY as $EXT_VER) {
+                       // Load extension in update mode
+                       require($file);
+
+                       // Do we have an update?
+                       if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) {
+                               if (!empty($UPDATE_NOTES)) {
+                                       // Update notes found
+                                       $NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br />".$UPDATE_NOTES."<br /><br />\n";
+                                       $UPDATE_NOTES = "";
+                               } elseif (($EXT_VER == "0.0") || ($EXT_VER == "0.0.0")) {
+                                       // Initial release
+                                       $NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br />".INITIAL_RELEASE."<br /><br />\n";
+                               } else {
+                                       // No update notes found!
+                                       $NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br /><I>".NO_UPDATE_NOTES."</I><br /><br />\n";
+                               }
+                       } // END - if
+               } // END - foreach
+
+               // 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;
+                       $EXT_ALWAYS_ACTIVE = "N";
+
+                       // Load required extension also in update mode
+                       $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $EXT_UPDATE_DEPENDS);
+
+                       // Check for required file
+                       if (FILE_READABLE($file)) {
+                               // File exists so let's load it
+                               $VER_BACKUP = $EXT_VERSION;
+                               $EXT_ALWAYS_ACTIVE = "N";
+                               require($file);
+                               $EXT_VERSION = $VER_BACKUP;
+
+                               // If versions mismatch update extension first
+                               $ext_ver = GET_EXT_VERSION($EXT_UPDATE_DEPENDS);
+
+                               // Extension version set?
+                               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__);
+
+                                       // Entry found?
+                                       if (SQL_NUMROWS($result) == 1) {
+                                               // Task found so load task's ID and register extension...
+                                               list($task) = SQL_FETCHROW($result);
+
+                                               // Try to register the extension
+                                               $test = EXTENSION_REGISTER($EXT_UPDATE_DEPENDS, $task, $dry_run);
+                                       } // END - if
+
+                                       // Free result
+                                       SQL_FREERESULT($result);
+                               } elseif ($ext_ver != $EXT_VERSION) {
+                                       // Ok, update this extension now
+                                       EXTENSION_UPDATE(basename($file), $EXT_UPDATE_DEPENDS, $ext_ver, $dry_run);
+
+                                       // All okay!
+                                       $test = true;
+                               } else {
+                                       // Nothing to register / update before...
+                                       $test = true;
+                               }
+                       } else {
+                               // Required file for update does not exists!
+                               $test = true;
+                               // But this is fine for the first time...
+                       }
+
+                       // Finally restore previous SQLs
+                       $SQLs = $SQLs2; unset($SQLs2);
+                       $EXT_LANG_PREFIX = $LANG_BCK;
+               } else {
+                       // Does not depend on an other extension
+                       $test = true;
+               }
+
+               // Switch back to register mode
+               $EXT_LOAD_MODE = "register";
+
+               // Does everthing before wents ok?
+               if ($test) {
+                       // "Dry-run-mode" activated?
+                       if (!$dry_run) {
+                               // Run all SQLs
+                               foreach ($SQLs as $sql) {
+                                       // Trim spaces away which we don't need
+                                       $sql = trim($sql);
+
+                                       // Is there still an SQL query?
+                                       if (!empty($sql)) {
+                                               // Do we have an "ALTER TABLE" command?
+                                               if (substr(strtolower($sql), 0, 11) == "alter table") {
+                                                       // Analyse the alteration command
+                                                       SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+                                               } else {
+                                                       // Run regular SQL command
+                                                       $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+                                               }
+                                       } // END - if
+                               } // END - foreach
+
+                               // Remove cache file(s) if extension is active
+                               if ((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) {
+                                       //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
+                                       // Remove cache files
+                                       if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
+                                       if ($cacheInstance->cache_file("mod_reg", true))    $cacheInstance->cache_destroy();
+                                       if ($cacheInstance->cache_file("config", true))     $cacheInstance->cache_destroy();
+                               } // END - if
+
+                               // Check for added include files
+                               if (count($INC_POOL > 0)) {
+                                       // Loads every include file
+                                       foreach ($INC_POOL as $inc) {
+                                               require_once($inc);
+                                       } // END - foreach
+
+                                       // Remove array
+                                       unset($INC_POOL);
+                               } // END - if
+
+                               // Register extension
+                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_lang_file, ext_active, ext_version) VALUES ('%s','%s','%s','%s')",
+                                array($ext_name, $EXT_LANG_PREFIX, $EXT_ALWAYS_ACTIVE, $EXT_VERSION), __FILE__, __LINE__);
+
+                               // Update task management
+                               ADMIN_SOLVE_TASK($id);
+
+                               // @TODO This causes the whole (!) menu cache being purged
+                               CACHE_PURGE_ADMIN_MENU();
+
+                               // In normal mode return a true on success
+                               $ret = true;
+
+                               // Remove SQLs
+                               unset($SQLs);
+                       } else {
+                               // Rewrite SQL command to keep { and } inside
+                               foreach ($SQLs as $key => $sql) {
+                                       $sql = str_replace('{', "&#123;", str_replace('}', "&#125;", $sql));
+                                       $SQLs[$key] = $sql;
+                               } // END - foreach
+
+                               // 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=%s AND status='NEW' LIMIT 1",
+                array(bigintval($id)), __FILE__, __LINE__);
+       }
+
+       // Is this the sql_patches?
+       //* DEBUG: */ echo __LINE__.":{$ext_name}/{$EXT_LOAD_MODE}<br />\n";
+       if (($ext_name == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove")) && (!$dry_run) && ($test)) {
+               // Then redirect to logout
+               //* DEBUG: */ echo __LINE__.": LOAD!<br />\n";
+               LOAD_URL("modules.php?module=admin&logout=1&".$EXT_LOAD_MODE."=sql_patches");
+       } // END - if
+
+       // Return status code
+       return $ret;
+}
+//
+function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE) {
+       global $cacheInstance, $_CONFIG;
+       $SQLs = array();
+
+       // Extensions are never active by default
+       $EXT_ALWAYS_ACTIVE = "N";
+
+       // By default no SQL has been executed
+       $sqlRan = false;
+
+       // This shall never do a non-admin user!
+       if (!IS_ADMIN()) return false;
+
+       // Get extension's name
+       $ext_name = GET_EXT_NAME($id);
+       if (empty($ext_name)) return false;
+
+       // Load extension in detected mode
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ext_name[{$id}]={$ext_name}<br />\n";
+       $file = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name);
+       if (FILE_READABLE($file)) {
+               // Load the include
+               require($file);
+       } // END - if
+
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):SQLs::count=".count($SQLs)."<br />\n";
+       if ((is_array($SQLs) && (sizeof($SQLs) > 0))) {
+               // Run SQL commands...
+               foreach ($SQLs as $sql) {
+                       // Trim spaces away which we don't need
+                       $sql = trim($sql);
+
+                       // Is there still an SQL query?
+                       if (!empty($sql)) {
+                               // Do we have an "ALTER TABLE" command?
+                               //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):SQL={$SQL}<br />\n";
+                               if (substr(strtolower($sql), 0, 11) == "alter table") {
+                                       // Analyse the alteration command
+                                       SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+                               } else {
+                                       // Run regular SQL command
+                                       $result = SQL_QUERY($sql, __FILE__, __LINE__, false);
+                               }
+
+                               // An SQL has been executed
+                               $sqlRan = true;
+                       } // END - if
+               } // END - foreach
+
+               // Removal mode?
+               if ($EXT_LOAD_MODE == "remove") {
+                       // Delete this extension (remember to remove it from your server *before* you click on welcome!
+                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1",
+                        array($id), __FILE__, __LINE__);
+               } // END - if
+
+               //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):mode={$EXT_LOAD_MODE}<br />\n";
+
+               // Is this the sql_patches?
+               //* DEBUG: */ echo __LINE__.": {$id}/{$ext_name}/{$EXT_LOAD_MODE}<br />\n";
+               if (($ext_name == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove"))) {
+                       // Then redirect to logout
+                       //* DEBUG: */ echo __LINE__.": LOAD!<br />\n";
+                       LOAD_URL("modules.php?module=admin&logout=1&".$EXT_LOAD_MODE."=sql_patches");
+               } // END - if
+       } // END - if
+
+       // Remove cache file(s) if extension is active
+       if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($EXT_LOAD_MODE == "activate") || ($EXT_LOAD_MODE == "deactivate"))) {
+               //* DEBUG: */ echo __LINE__.": DESTROY!<br />\n";
+               // Remove cache files
+               if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy();
+               if ($cacheInstance->cache_file("mod_reg", true))    $cacheInstance->cache_destroy();
+               if ($cacheInstance->cache_file("config", true))     $cacheInstance->cache_destroy();
+
+               // @TODO This causes the whole (!) menu cache being purged
+               CACHE_PURGE_ADMIN_MENU();
+       } // END - if
+}
+// Check if given extension is active
+function EXT_IS_ACTIVE ($ext_name) {
+       global $cacheArray, $_CONFIG;
+
+       // Extensions are all inactive during installation
+       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing')) || (empty($ext_name))) return false;
+
+       // Not active is the default
+       $active = "N";
+
+       // Check cache
+       if (!empty($cacheArray['extensions']['ext_active'][$ext_name])) {
+               // Load from cache
+               //* DEBUG: */ echo "CACHE! ext_name={$ext_name}<br />\n";
+               $active = $cacheArray['extensions']['ext_active'][$ext_name];
+
+               // Count cache hits
+               if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++;
+       } elseif (($ext_name == "cache") || (GET_EXT_VERSION("cache") == "")) {
+               //* DEBUG: */ echo "DB! ext_name={$ext_name}<br />\n";
+               // 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;
+               }
+
+               // Load entry
+               list($active) = SQL_FETCHROW($result);
+
+               // Free result
+               SQL_FREERESULT($result);
+
+
+               // Write cache array
+               //* DEBUG: */ echo $ext_name."[DB]: {$active}<br />\n";
+               $cacheArray['extensions']['ext_active'][$ext_name] = $active;
+       } else {
+               // Extension not active!
+               //* DEBUG: */ echo $ext_name.": Not active!<br />\n";
+               $cacheArray['extensions']['ext_active'][$ext_name] = "N";
+       }
+
+       // Debug message
+       //DEBUG_LOG(__FUNCTION__.": ext_name={$ext_name},active={$active}");
+
+       // Is this extension activated? (For admins we always have active extensions...)
+       return ($active == "Y");
+}
+// Get version from extensions
+function GET_EXT_VERSION ($ext_name) {
+       global $cacheArray, $_CONFIG, $cacheInstance;
+       $ret = false;
+
+       // Extensions are all inactive during installation
+       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isBooleanConstantAndTrue('mxchange_installing'))) return "";
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ext_name={$ext_name}<br />\n";
+
+       // Is the cache written?
+       if (!empty($cacheArray['extensions']['ext_version'][$ext_name])) {
+               // Load data from cache
+               //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): CACHE!<br />\n";
+               $ret = $cacheArray['extensions']['ext_version'][$ext_name];
+
+               // Count cache hits
+               if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++; else $_CONFIG['cache_hits'] = 1;
+       } elseif (!is_object($cacheInstance)) {
+               // 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
+               $cacheArray['extensions']['ext_version'][$ext_name] = $ret;
+       }
+
+       // Return result
+       //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret={$ret}<br />\n";
+       return $ret;
+}
+//
+function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
+{
+       // This shall never do a non-admin user!
+       global $cacheInstance, $_CONFIG, $NOTES;
+
+       // Init arrays
+       $SQLs = array(); $INC_POOL = array();
+
+       // Only admins are allowed to update extensions
+       if ((!IS_ADMIN()) || (empty($ext))) return false;
+
+       // Load extension in update mode
+       $EXT_LOAD_MODE = "update"; $EXT_UPDATE_DEPENDS = ""; $NOTES = "";
+
+       // Load extension file
+       include(sprintf("%sinc/extensions/%s", PATH, $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 .= "<STRONG>v".$EXT_VER.":</STRONG><br />".$UPDATE_NOTES."<br /><br />\n";
+                                       $UPDATE_NOTES = "";
+                               }
+                                elseif ($EXT_VER == "0.0")
+                               {
+                                       // Initial release
+                                       $NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br />".INITIAL_RELEASE."<br /><br />\n";
+                               }
+                                else
+                               {
+                                       $NOTES .= "<STRONG>v".$EXT_VER.":</STRONG><br /><I>".NO_UPDATE_NOTES."</I><br /><br />\n";
+                               }
+                       }
+
+                       // In real-mode execute any existing includes
+                       if ((!$dry_run) && (count($INC_POOL) > 0)) {
+                               // Include all files
+                               foreach ($INC_POOL as $fqfn) {
+                                       require_once($fqfn);
+                               } // END - foreach
+                       } // END - if
+
+                       // Run SQLs
+                       if ((is_array($SQLs)) && (!$dry_run)) {
+                               // Run SQL commands
+                               foreach ($SQLs as $sql)
+                               {
+                                       $sql = trim($sql);
+                                       if (!empty($sql))
+                                       {
+                                               // Do we have an "ALTER TABLE" command?
+                                               if (substr(strtolower($sql), 0, 11) == "alter table") {
+                                                       // Analyse the alteration command
+                                                       SQL_ALTER_TABLE($sql, __FILE__, __LINE__);
+                                               } else {
+                                                       // Run regular 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
+                       CREATE_EXTENSION_UPDATE_TASK(GET_ADMIN_ID(get_session('admin_login')), $ext_subj, addslashes($NOTES));
+
+                       // 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 ($cacheInstance->cache_file("extensions", true) == true) $cacheInstance->cache_destroy();
+                               if ($cacheInstance->cache_file("config", true) == true)     $cacheInstance->cache_destroy();
+                               if ($cacheInstance->cache_file("mod_reg", true) == true)    $cacheInstance->cache_destroy();
+                       } // END - if
+
+                       // 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") >= "0.0.7") && ($_CONFIG['verbose_sql'] == "Y")) {
+               $OUT  = "<DIV align=\"center\">
+<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"".$WIDTH."\" align=\"center\"".$dashed.">
+<TR>
+  <TD colspan=\"2\" align=\"center\" class=\"admin_title bottom2\" height=\"24\">
+    <STRONG>".$title.":</STRONG>
+  </TD>
+</TR>\n";
+               foreach ($SQLs as $idx => $sql) {
+                       $sql = trim($sql);
+                       if (!empty($sql)) {
+                               $S = true;
+                               $OUT .= "<TR>
+  <TD class=\"switch_sw".(3 - $SW)." bottom2\" style=\"padding-left: 2px\" width=\"30\">".$i.".</TD>
+  <TD class=\"switch_sw".(3 - $SW)." bottom2\" style=\"padding-left: 5px; padding-right: 5px\">
+    ".$sql."
+  </TD>
+</TR>\n";
+                               if ($switch) $SW = 3 - $SW;
+                               $i++;
+                       }
+               }
+       }
+
+       if ((!$S) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && ($_CONFIG['verbose_sql'] == "Y")) {
+               // No addional SQL commands to run
+               $OUT .= "<TR>
+  <TD colspan=\"2\" align=\"center\" class=\"switch_sw2 bottom2\" height=\"24\">
+    <FONT class=\"admin_note\">".ADMIN_NO_ADDIONAL_SQLS."</FONT>
+  </TD>
+</TR>\n";
+       }
+
+       if (!empty($OUT)) {
+               // Add missing close-table tag
+               $OUT .= "</TABLE>
+</DIV>\n";
+       }
+
+       // Return output
+       return $OUT;
+}
+// Get extension name from id
+function GET_EXT_NAME ($id) {
+       $ret = "";
+       global $cacheArray, $_CONFIG;
+       if (!empty($cacheArray['extensions']['ext_name'][$id])) {
+               // Load from cache
+               $ret = $cacheArray['extensions']['ext_name'][$id];
+
+               // Count cache hits
+               $_CONFIG['cache_hits']++;
+       } elseif (!EXT_IS_ACTIVE("cache")) {
+               // Load from database
+               $result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1",
+                array(bigintval($id)), __FILE__, __LINE__);
+               list($ret) = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+       }
+       return $ret;
+}
+// Get extension id from name
+function GET_EXT_ID($name) {
+       $ret = 0;
+       global $cacheArray, $_CONFIG;
+       if (isset($cacheArray['extensions']['ext_id'][$name])) {
+               // Load from cache
+               $ret = $cacheArray['extensions']['ext_id'][$name];
+
+               // Count cache hits
+               $_CONFIG['cache_hits']++;
+       } elseif (!EXT_IS_ACTIVE("cache")) {
+               // Load from database
+               $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
+                array($name), __FILE__, __LINE__);
+               list($ret) = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+       }
+
+       // Return value
+       return $ret;
+}
+// Activate given extension
+function ACTIVATE_EXTENSION($ext_name) {
+       // Activate the extension
+       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
+               array($ext_name), __FILE__, __LINE__);
+
+       // Extension has been activated?
+       if (SQL_AFFECTEDROWS() == 1) {
+               // Then run all queries
+               EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "activate");
+       } // END - if
+}
+// Checks wether the extension is older than given
+function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) {
+       // Get current extension version
+       $currVersion = GET_EXT_VERSION($ext_name);
+
+       // Remove all dots from both versions
+       $currVersion = str_replace(".", "", $currVersion);
+       $ext_ver = str_replace(".", "", $ext_ver);
+
+       // Now compare both and return the result
+       return ($currVersion < $ext_ver);
+}
+
+//
+?>
diff --git a/inc/extensions/.htaccess b/inc/extensions/.htaccess
new file mode 100644 (file)
index 0000000..14249c5
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
\ No newline at end of file
diff --git a/inc/extensions/ext- b/inc/extensions/ext-
new file mode 100644 (file)
index 0000000..d5f3294
--- /dev/null
@@ -0,0 +1,90 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/25/2004 *
+ * ================                             Last change: 09/25/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-                                             *
+ * -------------------------------------------------------------------- *
+ * Short description :                                                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  :                                                  *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+
+       // Load CSS file?
+       $EXT_CSS = 'Y';
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.0.1": // SQL queries for v0.0.1
+               $SQLs[] = "";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "xxx";
+
+//
+?>
diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php
new file mode 100644 (file)
index 0000000..d3d013a
--- /dev/null
@@ -0,0 +1,131 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 10/03/2004 *
+ * ================                             Last change: 11/26/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-active.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : "Last active users"                              *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : "Zuletzt aktiv gewesenen Mitglieder              *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0.8";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')";
+
+       // Load CSS file?
+       $EXT_CSS = "Y";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='active' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_active' LIMIT 1";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='N' WHERE what='active' LIMIT 1";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='active' LIMIT 1";
+       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 = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.";
+               break;
+
+       case "0.0.2": // SQL queries for v0.0.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.";
+               break;
+
+       case "0.0.3": // SQL queries for v0.0.3
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Design &quot;Solid-Business&quot; eingebaut.";
+               break;
+
+       case "0.0.4": // SQL queries for v0.0.4
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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) UNSIGNED NOT NULL DEFAULT '10'";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschr&auml;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&uuml;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
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "active";
+
+//
+?>
diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php
new file mode 100644 (file)
index 0000000..8b389d0
--- /dev/null
@@ -0,0 +1,296 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 04/11/2004 *
+ * ================                             Last change: 10/29/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-admins.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Administrator management                         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Admin-Accountsverwaltung                         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version of this extension
+$EXT_VERSION = "0.7.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.3", "0.3.1", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='admins' LIMIT 1";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, l&ouml;schen oder Passwort/E-Mail Adresse &auml;ndern.','1')";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzuf&uuml;gen','Neuen Admin-Account anlegen','0')";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account &auml;ndern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name &auml;ndern.','1')";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='admins' LIMIT 5";
+       $SQLs[] = "DROP TABLE "._MYSQL_PREFIX."_admins_acls";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP default_acl";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.2": // SQL queries for v0.2
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "F&uuml;gt den Men&uuml;punkt &quot;Admin kontaktieren&quot; hinzu.";
+               break;
+
+       case "0.3": // SQL queries for v0.3
+               // Add admin menu
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen f&uuml;r jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zug&auml;nglich zu machen oder zu sperren.','4')";
+
+               // Which is the default setting when you create a new admin login?
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'";
+
+               // Default is deny everything
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'";
+
+               // But allow current admin everything (THIS SHALL BE YOU!)
+               $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admins SET default_acl='allow' WHERE login='".get_session('admin_login')."' LIMIT 1";
+               $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_acls";
+               $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_acls (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+action_menu VARCHAR(255) NOT NULL DEFAULT '',
+what_menu VARCHAR(255) NOT NULL DEFAULT '',
+access_mode ENUM('deny','allow') NOT NULL DEFAULT 'deny',
+KEY (admin_id),
+PRIMARY KEY (id)
+) TYPE=MyISAM";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Sogn. ACLs werden hinzugef&uuml;gt: <STRONG>A</STRONG>ccess <STRONG>C</STRONG>ontrol <STRONG>L</STRONG>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen k&ouml;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) UNSIGNED NOT NULL AUTO_INCREMENT";
+               break;
+
+       case "0.4.0": // SQL queries for v0.4.0
+               $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admins_mails";
+               $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admins_mails (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+mail_template VARCHAR(255) NOT NULL,
+KEY (admin_id),
+PRIMARY KEY (id)
+) TYPE=MyISAM";
+               $SQLs[] = "INSERT INTO  "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;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&auml;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 = "&amp;admin= in &amp;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&uuml;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&oumlscht, 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&ouml;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 <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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&uuml;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 <STRONG>admins</STRONG> und (kommender) <STRONG>contact</STRONG>.";
+               break;
+
+       case "0.5.7": // SQL queries for v0.5.7
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Links wegen <STRONG>what=admins_contct</STRONG> ge&auml;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&uuml;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 &quot;ACL Einstellen&quot; 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&uuml; frei (Allow), dann kann der Admin auch die Untermen&uuml;s erreichen. Zudem k&ouml;nnen Sie gezielte Untermen&uuml;s im freigegeben Hauptmen&uuml; 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&uuml;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 <STRONG>admins</STRONG> und (kommender) <STRONG>contact</STRONG>.";
+               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 <STRONG>admins</STRONG> und (kommender) <STRONG>contact</STRONG>. Beseitigung eines Fehlers <STRONG>HTTP_POSR_VARS</STRONG> beim &Auml;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 = "<STRONG>set_session()</STRONG> 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='' OR what IS NULL) LIMIT 1";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Verwaltung nach Management umbenannt.";
+               break;
+
+       case "0.7.0": // SQL queries for v0.7.0
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgez&auml;hlt und der letzte vermerkt.";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "admins";
+
+//
+?>
diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php
new file mode 100644 (file)
index 0000000..4780f01
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 07/13/2004 *
+ * ================                             Last change: 12/03/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-admintheme1.php                              *
+ * -------------------------------------------------------------------- *
+ * Short description : Admin menu thmeme #1                             *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Adminmenue - Theme #1                            *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // Remove all other themes
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='usr_online' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='email_stats' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='maintenance' LIMIT 1";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.0.1": // SQL queries for v0.1
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+// Language file prefix
+$EXT_LANG_PREFIX = "admintheme";
+
+//
+?>
diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php
new file mode 100644 (file)
index 0000000..6e3c8be
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 07/13/2004 *
+ * ================                             Last change: 12/03/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-admintheme_default.php                       *
+ * -------------------------------------------------------------------- *
+ * Short description : Default menu theme in admin area                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Standart-Menuesystem (Adminbereich)              *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // Remove all other menu themes
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='usr_online' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='email' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='setup' WHERE what='maintenance' LIMIT 1";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       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 = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "admintheme";
+
+//
+?>
diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php
new file mode 100644 (file)
index 0000000..bda8915
--- /dev/null
@@ -0,0 +1,269 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/29/2004 *
+ * ================                             Last change: 01/07/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-autopurge.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Auto-Loeschung von veralteten Mail-Links         *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.4.0";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'";
+       if (EXT_IS_ACTIVE("bonus"))
+       {
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'";
+       }
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'";
+       if (EXT_IS_ACTIVE("bonus"))
+       {
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'";
+       }
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN('config_autopurge','list_autopurge') LIMIT 2";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP ap_notified";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.1": // SQL queries for v0.1
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-L&ouml;schung','Automatisch inaktive oder nicht best&auml;tigte Accounts l&ouml;schen.','12')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem t&auml;glichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gel&ouml;scht werden.','10')";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Automatisches L&ouml:schen von inaktiven bzw. nicht best&auml;tigten Accounts hinzugef&uuml;gt.";
+               break;
+
+       case "0.1.2": // SQL queries for v0.1.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Automatisches L&ouml;schen von als zu l&ouml;schen markierte Tasks hinzugef&uuml;gt.";
+               break;
+
+       case "0.1.4": // SQL queries for v0.1.4
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Fehler <FONT class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227</FONT> 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 <STRONG>ref_depth</STRONG> wurde <STRONG>level</STRONG> programmiert.";
+               break;
+
+       case "0.1.6": // SQL queries for v0.1.6
+               // Update notes (these will be set as task text!)
+               $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) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Bereinigung von zu l&ouml;schenden Aufgaben klappt wieder. Zeitlimit f&uuml;r genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><U>Bitte aktualisieren Sie auch die Admin-Templates!</U>";
+               break;
+
+       case "0.2.0": // SQL queries for v0.2.0
+               $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&ouml;schung von Aufgaben ausgesendet.<br /><br /><U>Bitte aktualisieren Sie auch die Admin-Templates!</U>";
+               break;
+
+       case "0.2.1": // SQL queries for v0.2.1
+               // Update notes (these will be set as task text!)
+               $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&uuml;r gel&ouml;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&ouml;schung von Best&auml;tigungslinks kann unter &quot;Sonstige Einstellungen&quot; 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 <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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 <U>ADMIN_USER_PROFILE_LINK()</U> 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 <U>ADMIN_USER_PROFILE_LINK()</U> 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 <u>admin_config_autopurge_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;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&uuml;hrlich.";
+               break;
+
+       case "0.3.2": // SQL queries for v0.3.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "W&ouml;rter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> 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) UNSIGNED NOT NULL DEFAULT '86400'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Von bereits gel&ouml;schten Mitgliedern die Mails l&ouml;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 <STRONG>timestamp_send</STRONG> (Zeile 308) beseitigt.";
+               break;
+
+       case "0.3.5": // SQL queries for v0.3.5
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Fehler mit <STRONG>ap_del_emails</STRONG> (Einstellungen im Admin-Bereich) beseitigt.";
+               break;
+
+       case "0.3.6": // SQL queries for v0.3.6
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Die Accounts der Standart-Referral-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gel&ouml;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 <STRONG>empty()</STRONG> umgestellt. Unter <STRONG>Auto-L&ouml;schung</STRONG> finden Sie nun auch die Einstellungen zu Mailbest&auml;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
+       // Do we have a daily-reset-run?
+       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
+       {
+               // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
+               $INC_POOL[] = sprintf("%sinc/autopurge.php", PATH);
+       }
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "autopurge";
+
+// Extension is always active?
+$EXT_ALWAYS_ACTIVE = "Y";
+
+//
+?>
diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php
new file mode 100644 (file)
index 0000000..12f02fa
--- /dev/null
@@ -0,0 +1,195 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/28/2007 *
+ * ================                             Last change: 05/31/2007 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-bank.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : A little bank account                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Ein einfaches Bankaccount                        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.0";
+
+// Auto-set extension version
+if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+locked_reason TINYTEXT,
+status ENUM('NEW','ACTIVE','LOCKED') NOT NULL DEFAULT 'NEW',
+account_balance DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+output_mode ENUM('LOGIN','EMAIL','DISABLED'),
+pin VARCHAR(50) NOT NULL DEFAULT '',
+tan_mode ENUM('NORMAL','INDEXED'),
+tan_list_status ENUM('PENDING','ACTIVE','INVALID','LOCKED') NOT NULL DEFAULT 'PENDING',
+tan_key VARCHAR(50) NOT NULL DEFAULT '',
+month_transfered BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+last_tan VARCHAR(5) NOT NULL DEFAULT '00000',
+last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+last_tan_purpose TINYTEXT,
+account_type ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK',
+overdraft_credit DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+PRIMARY KEY (id),
+UNIQUE KEY (pin),
+INDEX `uid_type` (uid, account_type),
+INDEX (account_created),
+INDEX (account_locked),
+INDEX (last_tan_stamp)
+) TYPE=MyISAM";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_transfers (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+day_bookkeeping CHAR(4) NOT NULL DEFAULT '0000',
+day_available CHAR(4) NOT NULL DEFAULT '0000',
+transfer_purpose TINYTEXT,
+PRIMARY KEY (id),
+INDEX (to_account_id, from_account_id),
+INDEX (day_bookkeeping, day_available)
+) TYPE=MyISAM";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_packages (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+title VARCHAR(255) NOT NULL DEFAULT '',
+description TINYTEXT,
+account_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+free_transfers INT(7) UNSIGNED NOT NULL DEFAULT '0',
+transfer_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+available TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+output_system_mode ENUM('LOGIN','EMAIL','DISABLED'),
+package_active ENUM('Y','N') NOT NULL DEFAULT 'N',
+free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+first_payment DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+free_account_income DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+free_account_stuff TINYTEXT null,
+tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+PRIMARY KEY (id)
+) TYPE=MyISAM";
+       // free_account_stuff will be a list of columns of the table _bank_packages
+       // what the member shall get for the specified income. output_system_mode
+       // must be extended with the mode you get for free: output_system_mode:LOGIN
+       // should be fine. More than one entry and not DISABLED ;) are not supported.
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_tanlist (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+idx TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+tan VARCHAR(50) NOT NULL DEFAULT '',
+used ENUM('Y','N') NOT NULL DEFAULT 'N',
+PRIMARY KEY (id),
+UNIQUE (account_id, tan)
+) TYPE=MyISAM";
+
+       // Admin menu queries
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und &Uuml;berweisungen.', 6)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzuf&uuml;gen','Neues Angebotspaket erstellen.', 1)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket &auml;ndern','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie dieses hier ver&auml;ndern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur tempor&auml;ren &Uuml;berarbeitung zuvor heraus, dann k&ouml;nnen Sie in Ruhe dr&uuml;ber nachdenken und Berechnungen anstellen. Freigabe ist hier auch m&ouml;glich.', 4)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket l&ouml;schen','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie mit abschliessender Best&auml;tigung Angebotspakete ganz l&ouml;schen. Bitte beachten Sie, dass dies nur m&ouml;glich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten f&uuml;r die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines ausw&auuml;hlbaren Mitglieds.', 7)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto &auml;ndern','&Auml;ndern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht &auml;nderbar! Best&auml;tigungsmails sind optional versendbar.', 8)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier m&ouml;glich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto l&ouml;schen','L&ouml;schen von Konten mit Best&auml;tigungsmail. Wenn Sie ein Mitglieder-Account l&ouml;schen, so m&uuml;ssen Sie derzeit seine angelegten Konten auch l&ouml;schen!', 10)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste ben&ouml;tigen, anschliessend kann die Liste dann ausgesendet werden.', 11)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen k&ouml;nnen auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','&Uuml;berweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (ben&ouml;tgt JavaScript!) k&ouml;nnen Sie seitenweise die &Uuml;berweisungen durchschauen.', 13)";
+
+       // Member menu
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Einzahlen','N','Y', 3)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Auszahlen','N','Y', 4)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','K&uuml;ndigen','N','Y', 7)";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='bank' LIMIT 14";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='bank' LIMIT 8";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE action='bank' LIMIT 8";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE action='bank' LIMIT 8";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.0.1": // SQL queries for v0.0.1
+               $SQLs[] = "";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "bank";
+
+//
+?>
diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php
new file mode 100644 (file)
index 0000000..3b1daa7
--- /dev/null
@@ -0,0 +1,275 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 09/25/2004 *
+ * ================                             Last change: 09/25/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-beg.php                                      *
+ * -------------------------------------------------------------------- *
+ * Short description : Begging link                                     *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Bettel-Link                                      *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.2.5";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Verg&uuml;tung usw. k&ouml;nnen Sie hier einstellen.', 10)";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00100'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_beg_ips";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_beg_ips (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
+timeout VARCHAR(10) NOT NULL DEFAULT '',
+KEY (userid),
+PRIMARY KEY(id)
+) TYPE=MyISAM";
+
+       // Load CSS file?
+       $EXT_CSS = "Y";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_beg' OR what='list_beg' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='beg' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='beg' OR what='beg2' LIMIT 2";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_beg_ips";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='beg' 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 = "Design &quot;Solid-Business&quot; eingebaut.";
+               break;
+
+       case "0.0.2": // SQL queries for v0.0.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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) UNSIGNED NOT NULL DEFAULT '0.10000'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})";
+               break;
+
+       case "0.0.4": // SQL queries for v0.0.4
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "&Uuml;berlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert (&quot;Unbekannte Spalte <U>beg_points_ma</U>&quot;).";
+               break;
+
+       case "0.0.5": // SQL queries for v0.0.5
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Im Mitgliedsmen&uuml; wurde die Beschreibung aus dem Gastmen&uuml; verwendet.";
+               break;
+
+       case "0.0.6": // SQL queries for v0.0.6
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+
+               // 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 <U>admin_config_beg.tpl</U> (und pro!) nicht vergessen, zu aktualisieren.";
+               break;
+
+       case "0.0.8": // SQL queries for v0.0.8
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Zeitsperre gegen die selbe IP-Nummer hinzugef&uuml;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.2.1
+               // 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":
+               // SQL queries for v0.1.2
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_points 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&ouml;glich. Und die erbettelten {!POINTS!} k&ouml;nnen entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden k&ouml;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&ouml;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 (<STRONG>member_list_beg.tpl</STRONG>); Template <STRONG>member_beg_404.tpl</STRONG> fehlte!";
+               break;
+
+       case "0.1.5": // SQL queries for v0.1.5
+               $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Verg&uuml;tung und auch die Bettel-Rallye k&ouml;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&uuml;gt. Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php l&ouml;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) UNSIGNED NOT NULL DEFAULT '0.00000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Die Mitglieder k&ouml;nnen nun optional automatisch &uuml;ber eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen k&ouml;nnen Sie unter <STRONG>Einstellungen --&gt; Bettel-Link/-rallye</STRONG> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.";
+               break;
+
+       case "0.1.8": // SQL queries for v0.1.8
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Fehler im t&auml;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&uuml;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&auml;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 <STRONG>unknown column &#39;uid&#39;</STRONG> 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&ouml;nnen nur best&auml;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&uuml; 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
+       // 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 < (UNIX_TIMESTAMP() -".($OLD - 60*60).")", __FILE__, __LINE__);
+
+       // 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[] = sprintf("%sinc/mails/beg_mails.php", PATH);
+       }
+
+       // Return code for the URL
+       define('CODE_BEG_SAME_AS_OWN', 100);
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "beg";
+
+//
+?>
diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php
new file mode 100644 (file)
index 0000000..17d5386
--- /dev/null
@@ -0,0 +1,205 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 05/23/2004 *
+ * ================                             Last change: 06/26/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-birthday.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Sends out happy-birthday mails                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Versendet Geburtstagsmails an die Mitglieder     *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version number
+$EXT_VERSION = "0.3.9";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT '0'";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP birthday_sent";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_birthday' LIMIT 1";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "deactivate": // Do stuff when admin deactivates this extension
+       // SQL commands to run
+       $SQLs[] = "";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.1": // SQL queries for v0.1
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Wenn t&auml;glicher Reset war, wird eine ben&ouml;tigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber.";
+               break;
+
+       case "0.2": // SQL queries for v0.2
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+               $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday";
+               $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_birthday (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+chk_value VARCHAR(255) NOT NULL DEFAULT '',
+KEY(userid),
+PRIMARY KEY(id)
+) Type=MyISAM";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Es kann nun eine Gutschrift an die Geburtstagmail angeh&auml;ngt werden. Diese wird erst beim Klick auf einen Best&auml;tigungslink gutgeschrieben.";
+               break;
+
+       case "0.2.1": // SQL queries for v0.2.1
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erh&ouml;ht.";
+               break;
+
+       case "0.2.4": // SQL queries for v0.2.4
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Laden der birthday_mails.php &quot;intelligenter&quot; per Datenfeld und Lade-Schleife in load_extensions.php realisiert.";
+               break;
+
+       case "0.2.5": // SQL queries for v0.2.5
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
+               break;
+
+       case "0.2.6": // SQL queries for v0.2.6
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt.";
+               break;
+
+       case "0.2.7": // SQL queries for v0.2.7
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Sicherheitsupdate am Script <U>birtday_confirm.php</U> durchgef&uuml;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 <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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 <U>inc/footer.php</U> verlagert.";
+               break;
+
+       case "0.3.1": // SQL queries for v0.3.1
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Wort <STRONG>Punkte</STRONG> dynamisiert.";
+               break;
+
+       case "0.3.2": // SQL queries for v0.3.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen gesch&uuml;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&uuml;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 <STRONG>inc/birthday_mails.php</STRONG> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <STRONG>Parser Error</STRONG> verursachte, aber wie eine gew&ouml;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 <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.";
+               break;
+
+       case "0.3.9": // SQL queries for v0.3.9
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT '1970'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.";
+               break;
+       }
+       break;
+
+default: // Do stuff when extension is loaded
+       if ((isBooleanConstantAndTrue('__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[] = sprintf("%sinc/mails/birthday_mails.php", PATH);
+       }
+       break;
+}
+
+// Language file prefix
+$EXT_LANG_PREFIX = "birthday";
+
+//
+?>
diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php
new file mode 100644 (file)
index 0000000..9e22079
--- /dev/null
@@ -0,0 +1,562 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 04/04/2004 *
+ * ================                             Last change: 06/13/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-bonus.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Bonus pages                                      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Bonus-Seiten                                     *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Version of this extension
+$EXT_VERSION = "0.8.6";
+
+// Auto-set extension version
+if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
+
+// Version history array (add more with , "0.1" and so on)
+$EXT_VER_HISTORY = array("0.0", "0.1.6", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.8", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6");
+
+switch ($EXT_LOAD_MODE)
+{
+case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+       // SQL commands to run
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie k&ouml;nnen hier immer senden.')";
+       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y','', 0)";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
+       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+subject VARCHAR(255) NOT NULL DEFAULT '',
+text LONGBLOB NOT NULL,
+receivers LONGBLOB NOT NULL,
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+time TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW',
+timestamp VARCHAR(10) NOT NULL DEFAULT '0',
+url VARCHAR(255) NOT NULL DEFAULT '',
+target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+KEY(cat_id),
+PRIMARY KEY  (id)
+)TYPE=MyISAM";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD INDEX (bonus_id)";
+
+       // Run this SQL when html or html_mail extension is installed
+       if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
+       break;
+
+case "remove": // Do stuff when removing extension
+       // SQL commands to run
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus') LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links DROP bonus_id";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer";
+       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo";
+       break;
+
+case "activate": // Do stuff when admin activates this extension
+       // SQL commands to run
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1";
+       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='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='show_bonus' LIMIT 1";
+       break;
+
+case "update": // Update an extension
+       switch ($EXT_VER)
+       {
+       case "0.1.6": // SQL queries for v0.1.6
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Paid-Links wurden verschoben in die Erweiterung <STRONG>paidlinks</STRONG>.";
+               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&uuml;gen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <A href=\"".URL."/modules.php?module=admin&amp;what=updates\">Updates pr&uuml;fen</A> 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&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zus&auml;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) UNSIGNED 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(3) UNSIGNED NOT NULL DEFAULT '10'";
+               // Use actual month for this update
+               $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) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+level BIGINT(20) UNSIGNED 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&auml;hlt f&uuml;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 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&uuml;tung hinzugef&uuml;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&auml;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 <U>"._MYSQL_PREFIX."_bonus_urls</U> und <U>"._MYSQL_PREFIX."_bonus_customer</U> entfernt, da dies bald von der Erweiterung <U>paidlinks</U> erledigt wird.";
+               break;
+
+       case "0.2.6": // SQL queries for v0.2.6
+               // Update notes (these will be set as task text!)
+               $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&uuml;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&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;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 <U>show_bonus.php</U> durchgef&uuml;hrt.";
+               break;
+
+       case "0.3.2": // SQL queries for v0.3.2
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Design &quot;Solid-Business&quot; eingebaut.";
+               break;
+
+       case "0.3.3": // SQL queries for v0.3.3
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;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&ouml;glichen Gewinner an.', 10)";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Link <U>Aktiv-Rallye-Teilnehmer</U> hinzugef&uuml;gt, inklusive manuelle Vorbereitung der Verg&uuml;tung.";
+               break;
+
+       case "0.3.5": // SQL queries for v0.3.5
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) k&ouml;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&auml;teste Zeitmarke f&uuml;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&auml;hlbar, von dem die {!POINTS!} f&uuml;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 <U>inc/footer.php</U> verlagert.";
+               break;
+
+       case "0.3.9": // SQL queries for v0.3.9
+               // Update notes (these will be set as task text!)
+               $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) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Automatisches L&ouml;schen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Eintr&auml;gen hinzugef&uuml;gt.";
+               break;
+
+       case "0.4.1": // SQL queries for v0.4.1
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Verg&uuml;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 <U>admin_list_bonus.tpl</U> korregiert.";
+               break;
+
+       case "0.4.3": // SQL queries for v0.4.3
+               // Update notes (these will be set as task text!)
+               $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) UNSIGNED NOT NULL DEFAULT '15.00000'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."