From: Roland Häder Date: Thu, 2 Oct 2008 16:32:08 +0000 (+0000) Subject: Now temporary removed X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=28630537ab9e2aeea24215683b6a68aa19e974c8 Now temporary removed --- diff --git a/.gitattributes b/.gitattributes index 88c2b6112c..fa8c5a115d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -75,511 +75,6 @@ DOCS/validator.sh -text /css.php -text /doubler.php -text /img.php -text -inc/.htaccess -text -inc/.secret/.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/config.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 svneol=unset#unset -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/.gitignore b/.gitignore index f604f0adcb..5e4afd2d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /.cache /.project /.settings -inc/config.php diff --git a/inc/.htaccess b/inc/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/.secret/.htaccess b/inc/.secret/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/.secret/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/autopurge.php b/inc/autopurge.php deleted file mode 100644 index b312634738..0000000000 --- a/inc/autopurge.php +++ /dev/null @@ -1,65 +0,0 @@ - diff --git a/inc/autopurge/.htaccess b/inc/autopurge/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/autopurge/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/autopurge/purge- b/inc/autopurge/purge- deleted file mode 100644 index ff9a9afdc2..0000000000 --- a/inc/autopurge/purge- +++ /dev/null @@ -1,47 +0,0 @@ - diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php deleted file mode 100644 index 3ee13256e9..0000000000 --- a/inc/autopurge/purge-general.php +++ /dev/null @@ -1,151 +0,0 @@ - 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 deleted file mode 100644 index b1d5bc92f8..0000000000 --- a/inc/autopurge/purge-inact.php +++ /dev/null @@ -1,142 +0,0 @@ -= "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 deleted file mode 100644 index 6d49f08fab..0000000000 --- a/inc/autopurge/purge-mails.php +++ /dev/null @@ -1,127 +0,0 @@ - 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 deleted file mode 100644 index a2a9038b12..0000000000 --- a/inc/autopurge/purge-tsks.php +++ /dev/null @@ -1,65 +0,0 @@ - 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 deleted file mode 100644 index 7e997f2a2c..0000000000 --- a/inc/autopurge/purge-unconfirmed.php +++ /dev/null @@ -1,86 +0,0 @@ - 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 deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/cache/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/check-reset.php b/inc/check-reset.php deleted file mode 100644 index ec19cb8952..0000000000 --- a/inc/check-reset.php +++ /dev/null @@ -1,68 +0,0 @@ - diff --git a/inc/config.php b/inc/config.php deleted file mode 100644 index 4f90620e1a..0000000000 --- a/inc/config.php +++ /dev/null @@ -1,155 +0,0 @@ -Roland Häder"); - -// CFG: ERROR_REPORTING -@error_reporting(0); - -// CFG: REGISTER-GLOBALS -@import_request_variables(""); - -// CFG: SITE-KEY -define('SITE_KEY', "gg42ny8-4yng23498-mf423igum-mtu248utn42-mf4839gun43"); - -// CFG: DATE-KEY -define('DATE_KEY', date("d-m-Y (l-F-T)", time())); - -// CFG: DEFAULT-LANGUAGE -define('DEFAULT_LANG', "de"); - -// CFG: NULLPASS-WARNING -define('warn_no_pass', true); - -// CFG: WRITE-FOOTER -define('WRITE_FOOTER', true); - -// CFG: OUTPUT-MODE -define('OUTPUT_MODE', "render"); - -// CFG: MAIN_TITLE -define('MAIN_TITLE', "Your mail-exchanger title"); - -// CFG: SLOGAN -define('SLOGAN', "Your cool slogan here"); - -// Auto-detection... -$URL = "http://".getenv('SERVER_NAME').dirname($_SERVER['PHP_SELF']); -while (substr($URL, -1, 1) == "/") { $URL = substr($URL, 0, -1); } -$PATH = substr(dirname(__FILE__), 0, -3); - -// CFG: HOST-URL (without trailing '/' !) -define('URL', $URL); - -// CFG: SERVER-PATH -define('PATH', $PATH); - -// CFG: WEBMASTER -define('WEBMASTER', "you@some-hoster.tld.invalid"); - -// CFG: INSTALLED -define('mxchange_installed', false); - -// CFG: ADMIN-SETUP -define('admin_registered', false); - -// CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!) -define('DEBUG_MODE', false); - -// CFG: DEBUG-MAIL (turn this on if you need to debug mails, only affects if DEBUG_MODE is true) -//define('DEBUG_MAIL', true); - -// When we are not installing -if (!defined('mxchange_installing')) define('mxchange_installing', false); - -// Your MySQL data (we don't like M$ SQL ;-) ) -$MySQL = array( - // CFG: MYSQL-HOST - 'host' => "localhost", - // CFG: MYSQL-DBASE - 'dbase' => "database", - // CFG: MYSQL-LOGIN - 'login' => "login", - // CFG: MYSQL-PASSWORD - 'password' => "pass", -); - -// CFG: MYSQL-PREIFX -define('_MYSQL_PREFIX', "mxchange"); - -// CFG: DATABASE-TYPE -define('_DB_TYPE', "mysql3"); - -// Lead-Code data -define('LEAD_CODE_ENABLED', true); -define('LEAD_EXPIRY_TIME' , (30*24*60*60)); // == 30 days - -// SMTP-Subsystem (keep all empty to use legacy mail() command!) -// CFG: SMTP-HOSTNAME -define('SMTP_HOSTNAME', ""); -// CFG: SMTP-USER -define('SMTP_USER', ""); -// CFG: SMTP-PASSWORD -define('SMTP_PASSWORD', ""); - -// SSL cookies? (enable only if you have SSL, URLs will begin with https://) -define('SSL_COOKIES', false); - -// CFG: BACKLINK (Enable backlink to mxchange.org in footer? rel=external is set!) -define('ENABLE_BACKLINK', true); - -// Connect to the MySQL database... -require_once(PATH."inc/mysql-connect.php"); - -// -?> diff --git a/inc/databases.php b/inc/databases.php deleted file mode 100644 index a69156a1cf..0000000000 --- a/inc/databases.php +++ /dev/null @@ -1,131 +0,0 @@ - "%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', "433"); - -// 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 deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/db/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php deleted file mode 100644 index fe033aeb96..0000000000 --- a/inc/db/lib-mysql3.php +++ /dev/null @@ -1,332 +0,0 @@ -\n"; - $result = @mysql_query($sql_string, $link) - or ADD_FATAL($F." (".$L."):".mysql_error()."
-".MYSQL_QUERY_STRING."
-".$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=
".$sql_string."
, affected=".SQL_AFFECTEDROWS().", numrows=".SQL_NUMROWS($result)."
\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']."
\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)."
";
-		debug_print_backtrace();
-		die("
"); - } // 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__."(".__LINE__."):str={$str}
\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 deleted file mode 100644 index 7578d60770..0000000000 --- a/inc/db/lib.php +++ /dev/null @@ -1,55 +0,0 @@ - diff --git a/inc/doubler_send.php b/inc/doubler_send.php deleted file mode 100644 index f3084e22a5..0000000000 --- a/inc/doubler_send.php +++ /dev/null @@ -1,175 +0,0 @@ -= %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 deleted file mode 100644 index 0b75f56d25..0000000000 --- a/inc/extensions.php +++ /dev/null @@ -1,643 +0,0 @@ -v".$EXT_VER.":
".$UPDATE_NOTES."

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

\n"; - } else { - // No update notes found! - $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\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!
\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('{', "{", str_replace('}', "}", $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}
\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!
\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__."(".__LINE__."):ext_name[{$id}]={$ext_name}
\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__."(".__LINE__."):SQLs::count=".count($SQLs)."
\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__."(".__LINE__."):SQL={$SQL}
\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__."(".__LINE__."):mode={$EXT_LOAD_MODE}
\n"; - - // Is this the sql_patches? - //* DEBUG: */ echo __LINE__.": {$id}/{$ext_name}/{$EXT_LOAD_MODE}
\n"; - if (($ext_name == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove"))) { - // Then redirect to logout - //* DEBUG: */ echo __LINE__.": LOAD!
\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!
\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}
\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}
\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}
\n"; - $cacheArray['extensions']['ext_active'][$ext_name] = $active; - } else { - // Extension not active! - //* DEBUG: */ echo $ext_name.": Not active!
\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__."(".__LINE__."): ext_name={$ext_name}
\n"; - - // Is the cache written? - if (!empty($cacheArray['extensions']['ext_version'][$ext_name])) { - // Load data from cache - //* DEBUG: */ print __FUNCTION__."(".__LINE__."): CACHE!
\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__."(".__LINE__."): ret={$ret}
\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 .= "v".$EXT_VER.":
".$UPDATE_NOTES."

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

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

\n"; - } - } - - // 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 = "
- - - -\n"; - foreach ($SQLs as $idx => $sql) { - $sql = trim($sql); - if (!empty($sql)) { - $S = true; - $OUT .= " - - -\n"; - if ($switch) $SW = 3 - $SW; - $i++; - } - } - } - - if ((!$S) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && ($_CONFIG['verbose_sql'] == "Y")) { - // No addional SQL commands to run - $OUT .= " - -\n"; - } - - if (!empty($OUT)) { - // Add missing close-table tag - $OUT .= "
- ".$title.": -
".$i.". - ".$sql." -
- ".ADMIN_NO_ADDIONAL_SQLS." -
-
\n"; - } - - // Return 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 deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/extensions/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/extensions/ext- b/inc/extensions/ext- deleted file mode 100644 index d5f3294ef3..0000000000 --- a/inc/extensions/ext- +++ /dev/null @@ -1,90 +0,0 @@ - diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php deleted file mode 100644 index d3d013a19f..0000000000 --- a/inc/extensions/ext-active.php +++ /dev/null @@ -1,131 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschränkbar."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "active"; - -// -?> diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php deleted file mode 100644 index 8b389d011a..0000000000 --- a/inc/extensions/ext-admins.php +++ /dev/null @@ -1,296 +0,0 @@ -Access Control Lines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins_acls MODIFY id BIGINT(20) 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önnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template LIKE '% %'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admins-Mails-Tabelle geleert."; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "&admin= in &amp;admin= umgewandelt."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitet auf Cache-System"; - break; - - case "0.4.6": // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.5.0": // SQL queries for v0.5.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.5.1": // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Cache wird endlich gelöscht, wenn Admin entfernt wird."; - break; - - case "0.5.2": // SQL queries for v0.5.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates."; - break; - - case "0.5.3": // SQL queries for v0.5.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.5.4": // SQL queries for v0.5.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.5.5": // SQL queries for v0.5.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert."; - break; - - case "0.5.6": // SQL queries for v0.5.6 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; - break; - - case "0.5.7": // SQL queries for v0.5.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.5.8": // SQL queries for v0.5.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update."; - break; - - case "0.5.9": // SQL queries for v0.5.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.6.0": // SQL queries for v0.6.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert."; - break; - - case "0.6.1": // SQL queries for v0.6.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speichern von Admin-Accounts klappt wieder."; - break; - - case "0.6.2": // SQL queries for v0.6.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte verschieben Sie die admins-Templates (Ordner: ".PATH."/templates/de/emails/) in den neuen Order admins!"; - break; - - case "0.6.3": // SQL queries for v0.6.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.6.4": // SQL queries for v0.6.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren."; - break; - - case "0.6.5": // SQL queries for v0.6.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.6.6": // SQL queries for v0.5.6 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."; - break; - - case "0.6.7": // SQL queries for v0.6.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact. Beseitigung eines Fehlers HTTP_POSR_VARS beim Ändern von Administratoren."; - break; - - case "0.6.8": // SQL queries for v0.6.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "set_session() 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ä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 deleted file mode 100644 index 4780f01029..0000000000 --- a/inc/extensions/ext-admintheme1.php +++ /dev/null @@ -1,91 +0,0 @@ - diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php deleted file mode 100644 index 6e3c8befc0..0000000000 --- a/inc/extensions/ext-admintheme_default.php +++ /dev/null @@ -1,92 +0,0 @@ - diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php deleted file mode 100644 index bda89153c8..0000000000 --- a/inc/extensions/ext-autopurge.php +++ /dev/null @@ -1,269 +0,0 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - - $UPDATE_NOTES = "Anstelle von ref_depth wurde level programmiert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

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

Bitte aktualisieren Sie auch die Admin-Templates!"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Diverse angebundene Erweiterungen gefixt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Betreffzeile für gelöschte Aufgaben korregiert."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)"; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mailbetreffs korregiert."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template admin_config_autopurge_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Datumsformat festgelegt auf ausführlich."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Von bereits gelöschten Mitgliedern die Mails löschen integriert."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit timestamp_send (Zeile 308) beseitigt."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit ap_del_emails (Einstellungen im Admin-Bereich) beseitigt."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Accounts der Standart-Referral-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Unter Auto-Löschung finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."; - break; - } - break; - -default: // Do stuff when extension is loaded - // 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 deleted file mode 100644 index 12f02fabf1..0000000000 --- a/inc/extensions/ext-bank.php +++ /dev/null @@ -1,195 +0,0 @@ - diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php deleted file mode 100644 index 3b1daa75c8..0000000000 --- a/inc/extensions/ext-beg.php +++ /dev/null @@ -1,275 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_points_max DOUBLE(20,5) 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 = "Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte beg_points_ma")."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Zeitsperre gegen die selbe IP-Nummer hinzugefügt."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte verschieben Sie die beg-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/html/) in den neuen Order beg!"; - break; - - case "0.1.0": // SQL queries for v0.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öglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gelöscht."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen (member_list_beg.tpl); Template member_beg_404.tpl fehlte!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE what='config_beg' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!"; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_bonus DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler im täglichen Reset beseitigt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei ".POINTS."-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler unknown column 'uid' beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eigene User-ID von Bettel-Rallye ausschliessbar."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='1' WHERE what='beg' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // 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 deleted file mode 100644 index 17d538640a..0000000000 --- a/inc/extensions/ext-birthday.php +++ /dev/null @@ -1,205 +0,0 @@ -birtday_confirm.php durchgeführt."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vergessenes _OB_CACHING gesetzt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wort Punkte dynamisiert."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte verschieben Sie die birthday-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/html/) in den neuen Order birthday!"; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vergütungsmodus des Geburtstagsbonus einstellbar."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Im Script inc/birthday_mails.php hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen Parser Error verursachte, aber wie eine gewöhnliche Leerstelle aussah."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - 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 deleted file mode 100644 index 9e22079fe4..0000000000 --- a/inc/extensions/ext-bonus.php +++ /dev/null @@ -1,562 +0,0 @@ -paidlinks."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '10.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '100.000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) 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ählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','', 0)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Tabellen "._MYSQL_PREFIX."_bonus_urls und "._MYSQL_PREFIX."_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker vergütet werden!)"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate am Script show_bonus.php durchgeführt."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitglieder-Account auwählbar, von dem die {!POINTS!} für den Aktiv- und Login-Bonus abgebucht werden."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Variablen gefixt."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) 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öschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vergütung des Aktiv-Bonus repariert."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template admin_list_bonus.tpl korregiert."; - break; - - case "0.4.3": // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verbesserung des Versandes von HTML-Bonus-Mails."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '15.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '100.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referral-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abzug vom Bonus-Account integriert."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "In inc/monthly_bonus.php fehlte ein Punkt; Fehler besseitigt."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Login-Bonus wird mit angezeigt."; - break; - - case "0.5.0": // SQL queries for v0.5.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit is_hundred beim täglichen Reset beseitigt."; - break; - - case "0.5.1": // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit bonus_stats / Zeile 31 beim täglichen Reset beseitigt."; - break; - - case "0.5.2": // SQL queries for v0.5.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.5.3": // SQL queries for v0.5.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speichern der Aktiv-{!POINTS!} für Platz 2 bis x korregiert."; - break; - - case "0.5.4": // SQL queries for v0.5.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablenfehler in inc/monthly_bonus.php behoben."; - break; - - case "0.5.5": // SQL queries for v0.5.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Variablenfehler in inc/monthly_bonus.php haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet."; - break; - - case "0.5.6": // SQL queries for v0.5.6 - // Get current month - $curr = date("m", time()); - if (strlen($curr) == 1) $curr = "0".$curr; - if ($curr == "00") $curr = "12"; - - // Generate timemark... - $mark = mktime(0, 0, 0, $curr, 1, date('Y', time())); - - // Update accounts which are not active last months - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data -SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0 -WHERE last_online < ".$mark." ORDER BY userid"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch"."; - break; - - case "0.5.7": // SQL queries for v0.5.7 - break; - - case "0.5.8": // SQL queries for v0.5.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit is_hundred beim täglichen Reset endlich beseitigt."; - break; - - case "0.5.9": // SQL queries for v0.5.9 - $UPDATE_NOTES = "Fehlermeldung /home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1 beseitigt."; - break; - - case "0.6.0": // SQL queries for v0.6.0 - $UPDATE_NOTES = "SQL-Fehlermeldung in inc/monthly_bonus.php beseitigt."; - break; - - case "0.6.1": // SQL queries for v0.6.1 - $UPDATE_NOTES = "Versand von Bonus-Mails repariert."; - break; - - case "0.6.2": // SQL queries for v0.6.2 - $UPDATE_NOTES = "Löschen von bereits gelöschten Mails wird nun abgelehnt."; - break; - - case "0.6.3": // SQL queries for v0.6.3 - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.6.4": // SQL queries for v0.6.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden."; - break; - - case "0.6.5": // SQL queries for v0.6.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit bonus_stats beseitigt."; - break; - - case "0.6.6": // SQL queries for v0.6.6 - $UPDATE_NOTES = "Template-Fehler beseitigt im Admin-Bereich."; - break; - - case "0.6.7": // SQL queries for v0.6.7 - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.6.8": // SQL queries for v0.6.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."; - break; - - case "0.6.9": // SQL queries for v0.6.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referral und Statistik-Bonus (100% Klickrate erreicht)."; - break; - - case "0.7.0": // SQL queries for v0.7.0 - $UPDATE_NOTES = "Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet."; - break; - - case "0.7.1": // SQL queries for v0.7.1 - $UPDATE_NOTES = "Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt."; - break; - - case "0.7.2": // SQL queries for v0.7.2 - $UPDATE_NOTES = "Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!"; - break; - - case "0.7.3": // SQL queries for v0.7.3 - $UPDATE_NOTES = "Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht."; - break; - - case "0.7.4": // SQL queries for v0.7.4 - $UPDATE_NOTES = "Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"; - break; - - case "0.7.5": // SQL queries for v0.7.5 - $UPDATE_NOTES = "Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!"; - break; - - case "0.7.6": // SQL queries for v0.7.6 - $UPDATE_NOTES = "Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig."; - break; - - case "0.7.7": // SQL queries for v0.7.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."; - break; - - case "0.7.8": // SQL queries for v0.7.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler im täglichen Reset beseitigt."; - break; - - case "0.7.9": // SQL queries for v0.7.9 - $UPDATE_NOTES = "Dollarzeichen fehlte in inc/reset/reset_bonus.php, Zeile 39"; - break; - - case "0.8.0": // SQL queries for v0.8.0 - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.8.1": // SQL queries for v0.8.1 - $UPDATE_NOTES = "Bei ".POINTS."-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."; - break; - - case "0.8.2": // SQL queries for v0.8.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."; - break; - - case "0.8.3": // SQL queries for v0.8.3 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.8.4": // SQL queries for v0.8.4 - $UPDATE_NOTES = "Ladeproblem bei nicht installierter Erweiterung cache gefixt."; - break; - - case "0.8.5": // SQL queries for v0.8.5 - $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; - break; - - case "0.8.6": // SQL queries for v0.8.6 - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Daily reset was run so let's check if active rallye is activated - if ($_CONFIG['bonus_active'] == "Y") - { - // Run active rallye - if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", PATH); - $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", PATH); - } - else - { - // Reset points - $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", PATH); - } - } - - // Check for bonus rallye is active and send mails out - if (($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_new_mem_notify'] == "Y")) - { - // Include file for sending out mails - $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", PATH); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "bonus"; - -// -?> diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php deleted file mode 100644 index f1db9c8cca..0000000000 --- a/inc/extensions/ext-cache.php +++ /dev/null @@ -1,216 +0,0 @@ -cache_file("extensions", true)) $cacheInstance->cache_destroy(); - } - $UPDATE_NOTES = "Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Registrierung der Cache-Erweiterung repariert"; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Validierung der Cache-Datei admins.cache integriert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hits auf den Cache werden gezählt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Das Umschreiben der Cache-Daten hat eine Fehlermeldung Falsches Passwort! im Admin-Bereich verursacht."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit fehlender admins-Erweiterung beseitigt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler Division durch 0 repariert in den DB-Cache Statistiken."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Tabelen "._MYSQL_PREFIX."_config, "._MYSQL_PREFIX."_refsystem, "._MYSQL_PREFIX."_refdepths und "._MYSQL_PREFIX."_mod_reg werden nun auch ausgelagert."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler Division durch 0 repariert in inc/load_cache.php."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Fehler im System beseitigt."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Probleme w&auuml;hrend des Installationsvorganges beseitigt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "CSS-Klassenname gefixt in Templates."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Daten von installierten Themes werden nun gecacht."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Administratormenü experimentell gecacht."; - break; - } - break; - -default: // Do stuff when extension is loaded - // Create instance on class - if ($cacheMode != "init") { - // Initialize cache system only when it's needed - $cacheInstance = new mxchange_cache($_CONFIG['cache_update'], PATH."inc/".$_CONFIG['cache_path'], $_CONFIG['cache_tested']); - if ($cacheInstance->getStatus() != "done") { - // Failed to initialize cache sustem - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); - } - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "cache"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php deleted file mode 100644 index c1bfb2b7b1..0000000000 --- a/inc/extensions/ext-country.php +++ /dev/null @@ -1,124 +0,0 @@ - diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php deleted file mode 100644 index 220a5e296e..0000000000 --- a/inc/extensions/ext-demo.php +++ /dev/null @@ -1,89 +0,0 @@ -Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "demo"; - -// -?> diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php deleted file mode 100644 index edd3ee345e..0000000000 --- a/inc/extensions/ext-doubler.php +++ /dev/null @@ -1,249 +0,0 @@ -none) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - // Total payed out points from your doublers - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - // Sending mode of mails (immediately/daily reset) - // --> This also means who fast the doubled points will be payed out! - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"; - // Timeout for entries to be purged (default: one week) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*7)."'"; - // Number of newest entries to display - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; - // Number of entries which will be payed out soon - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; - // Number of entries which are already payed out - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; - // Points used by every member - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - // Counter for usage of the doubler - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // - // --- MENU SYSTEMS --- - // - // Admin menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"; - - // Guest menu (informations / default doubler link) - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"; - - // Member menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)"; - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='doubler' LIMIT 3"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='doubler' LIMIT 1"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='doubler' LIMIT 1"; - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1"; - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE what='doubler' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='doubler' LIMIT 1"; - break; - -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.1": // SQL queries for v0.0.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit User-ID behoben!"; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Total used points - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Drei SQL-Fehler beseitigt."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Shall I use the doubler's account to take points from? (Y/N, default=Y) - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Counter-Stand und noch zum Verdoppeln übrige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT '1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT '1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar.

Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte verschieben Sie die doubler-Templates (Ordner: ".PATH."/templates/".GET_LANGUAGE()."/html/) in den neuen Order doubler!"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Zwei SQL-Fehler in inc/doubler_send.php beseitigt."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='4' WHERE what='doubler' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['doubler_send_mode'] == "RESET")) { - // So let's check for points - $INC_POOL[] = sprintf("%sinc/doubler_send.php", PATH); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "doubler"; - -// -?> diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php deleted file mode 100644 index 1d6a3187ab..0000000000 --- a/inc/extensions/ext-holiday.php +++ /dev/null @@ -1,233 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern der Urlaubsanfrage korregiert."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*2)."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'list_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'del_holiday')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', NULL, 'config_holiday')"; - - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR what IS NULL) LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "holiday"; - -// -?> diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php deleted file mode 100644 index 9c223e3f49..0000000000 --- a/inc/extensions/ext-html_mail.php +++ /dev/null @@ -1,171 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - - // Define all arrary variables as global! - global $HTML_TAGS, $URL_ENDS, $VALID_EMAI_CHARS; - - // Valid HTML tags (only simple and no attributes!) - $HTML_TAGS = array( - "b", - "i", - "u", - "ol", - "ul", - "li", - "strong", - "center", - "left", - "right", - "br", - ); - - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $URL_ENDS = array( - " ", - "\n", - "\r", - ")", - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $VALID_EMAIL_CHARS = array( - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', - 't','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', - '2','3','4','5','6','7','8','9' - ); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "html_mail"; - -// -?> diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php deleted file mode 100644 index be23ece91c..0000000000 --- a/inc/extensions/ext-mailid.php +++ /dev/null @@ -1,246 +0,0 @@ -uid, mailid und bonusid durch die eigene Funktion bigintval() in den beiden Dateien mailid.php und mailid_top.php."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weisse Seite im Mozilla bzw. Seite nicht gefunden unter dem IE behoben."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "register_globals-Problem behoben"; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mailbestätigung klappt wieder."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template mailid_confirm_buttom.tpl, damit die Bestätigung ohne Code auch klappt!"; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate an den Scripten mailid.php und mailid_top.php durchgeführt."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template mailid_frameset.tpl nach mailid_frames.tpl umbenannt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Variablen gefixt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates mailid_points_done.tpl, mailid_points_done2.tpl und mailid_frames.tpl !"; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden)."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Parser-Fehler beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler wegen fehlende Datenfeldelementen behoben."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Modul mailid war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wenn die ".POINTS." dem noch auf Auszahlung wartendem Guthaben aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates mailid_points_locked und mailid_points_locked2 sind hinzugekommen!)"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bonus- und Standart-Referral-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Code wiederholen nach Code eingeben hin geändert."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Templates hinzugefügt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "mailid.php und mailid_top.php können erst bei aktivierter Erweiterung mailid benutzt werden. Solange gibt es fatale Fehlermeldungen."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte das Template ".PATH."/templates/de/html/mailid/mailid_points_lcoked2.tpl löschen. Noices fixed."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "mailid"; - -// -?> diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php deleted file mode 100644 index e3e299e2db..0000000000 --- a/inc/extensions/ext-maintenance.php +++ /dev/null @@ -1,118 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "maintenance"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php deleted file mode 100644 index 2b13616708..0000000000 --- a/inc/extensions/ext-mediadata.php +++ /dev/null @@ -1,150 +0,0 @@ -aktuellen Zustandes berücksichtigen kann und nicht bereits gelöschter Mitglieder."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mediendaten mussten komplett regeneriert werden."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Start des ".MT_WORD2." und Anzahl Anmeldungen aufgenommen. (Task #13)
-Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) -{ - if ((!$dry_run) && ($EXT_LOAD_MODE == "update") && ($EXT_VER == "0.0.4")) - { - // Add auto-check file - $INC_POOL[] = sprintf("%sinc/gen_mediadata.php", PATH); - } -} - -// Language file prefix -$EXT_LANG_PREFIX = "mediadata"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-mods.php b/inc/extensions/ext-mods.php deleted file mode 100644 index 01f5954c3a..0000000000 --- a/inc/extensions/ext-mods.php +++ /dev/null @@ -1,123 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Modul-Management' WHERE action = 'mods' AND (what='' OR what IS NULL) LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung auf Management umgestellt."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "mods"; - -// -?> diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php deleted file mode 100644 index 32b1f1efa6..0000000000 --- a/inc/extensions/ext-mydata.php +++ /dev/null @@ -1,173 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Datumsformat festgelegt auf ausführlich."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
-
-Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".GET_LANGUAGE()."/html/member/ !) mit hoch!"; - - // Depends on 'country'! - $EXT_UPDATE_DEPENDS = "country"; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die Einstellungen können nun auch ohne der Erweiterung country abgespeichert werden."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "mydata"; - -// -?> diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php deleted file mode 100644 index 648cdb1cdd..0000000000 --- a/inc/extensions/ext-newsletter.php +++ /dev/null @@ -1,179 +0,0 @@ -Immer aktiv für diese Erweiterung deaktiviert."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bitte Script inc/monthly_newsletter.php löschen!"; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Script inc/monthly/monthly_newsletter.php wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Währung auf die Erweiterung ext-other.zip verlagert. Bitte auch diese aktualisieren."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $URL_ENDS = array( - " ", - "\n", - "\r", - ")", - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $VALID_EMAIL_CHARS = array( - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', - 't','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1', - '2','3','4','5','6','7','8','9' - ); - - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // Daily reset was run so let's check out for expired newsletter orders - $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", PATH); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "newsletter"; - -// -?> diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php deleted file mode 100644 index 3ef849f832..0000000000 --- a/inc/extensions/ext-nickname.php +++ /dev/null @@ -1,214 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP nick_uid"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID ODER die angemeldete EMail-Adresse eingegeben werden."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "CSS-Datei in general.css verschmolzen (Patch 435!)"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='2' WHERE what='nickname' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitglieder ohne Nickname sollten kein *failed* mehr sehen."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_nickname_history"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_nickname_history ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -nickname VARCHAR(255) NOT NULL DEFAULT '', -added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -last_used TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', -INDEX userid (userid), -INDEX (last_used DESC), -PRIMARY KEY(id) -) TYPE=MyISAM COMMENT='History of used nicknames'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen."; - break; - } - break; - -default: // Do stuff when extension is loaded - // @TODO|@DEPRECATED Please rewrite these constants, LOAD_CONFIG() is no more needed in extensions - $dummy = LOAD_CONFIG(); - define('__NICKNAME_LANG_CHARS', $dummy['nickname_chars']); - define('__NICKNAME_LENGTH' , $dummy['nickname_len']); - define('__NICKNAME_PATTERN' , $dummy['nickname_pattern']); - unset($dummy); - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "nickname"; - -// -?> diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php deleted file mode 100644 index 6b1fa94f44..0000000000 --- a/inc/extensions/ext-online.php +++ /dev/null @@ -1,122 +0,0 @@ -Unknown column 'visibled' in 'field list' behoben."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erstellung der Datenbanktabelle "._MYSQL_PREFIX."_online in diese Erweiterung ausgelagert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "online"; - -// -?> diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php deleted file mode 100644 index 695c60b100..0000000000 --- a/inc/extensions/ext-optimize.php +++ /dev/null @@ -1,123 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "optimize"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php deleted file mode 100644 index 5a7d2a924f..0000000000 --- a/inc/extensions/ext-order.php +++ /dev/null @@ -1,318 +0,0 @@ -mail_order korregiert auf mail_orders."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speicherung der Einstellungen klappt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gewählt und -nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {!POINTS!} auf dem Konto. Ein Rechenbeispiel: -
    -
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. -
  3. Es stellt die Mailart "3 {!POINTS!} Kosten / Mail" ein.
  4. -
  5. Es hat aber nur {!POINTS!} für 10 Empfänger und gibt 10 ein.
  6. -
  7. Das Script hatte bis zu dieser Version 3 {!POINTS!} * 15 = 45 {!POINTS!} gerechnet, hat das Mitglied mehr oder gleich 45 {!POINTS!}, fiehl dieser Fehler nicht - auf.
  8. -
  9. Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.
  10. -
  11. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
  12. -
"; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler mit __MIN_VALUE behoben."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Konstantenproblem beseitigt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit nicht funktionierenden Mailbuchungen beseitigt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beworbene URL wird nun getestet."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Datumsformat festgelegt auf ausführlich."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mailbuchungsseite korregiert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erneuten Fehler in Mailbuchungsseite behoben."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = POINTS."-Abzug klappt wieder. Danke an Andreman!"; - break; - - case "0.4.1": // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.4.3": // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Neue Urlaubsschaltung mit integriert."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ein WHERE ext_active='Y' tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE what='config_order' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen ".POINTS." wieder gutgeschrieben werden sollen oder in den Jackpot landen."; - break; - - } - break; - -default: // Do stuff when extension is loaded - // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (GET_EXT_VERSION("order") >= "0.1.1")) - { - // Reset mail order values - $result_ext = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "order"; - -// -?> diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php deleted file mode 100644 index c365f2cf55..0000000000 --- a/inc/extensions/ext-other.php +++ /dev/null @@ -1,204 +0,0 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen endlich beseitigt."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!"; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern der Einstellungen repariert."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Folgende Einstellungen können auf 0 gesetzt werden: -
    -
  1. Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)
  2. -
  3. Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)
  4. -
  5. Sperrzeit des Mitgliedprofiles nach Änderung (0 = Mitglied kann sein Account immer und sofort ändern)
  6. -
  7. Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(
  8. -
  9. Erneute Aussendung der Mail (0 = Siehe oben)
  10. -
"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reject_url VARCHAR(255) NOT NULL DEFAULT '".URL."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung other auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "other"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php deleted file mode 100644 index be3ef40a8e..0000000000 --- a/inc/extensions/ext-payout.php +++ /dev/null @@ -1,249 +0,0 @@ -member_payout.tpl."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_payouts CHANGE payout_total payout_total DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payout_types CHANGE rate rate DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Buttons aus Aufgabenauflisten ausgelagert"; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl zu überweisende {!POINTS!} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab."; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (what='' OR what IS NULL) LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung nach Management umgestellt."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "payout"; - -// -?> diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php deleted file mode 100644 index 11ea3b372c..0000000000 --- a/inc/extensions/ext-primera.php +++ /dev/null @@ -1,124 +0,0 @@ - diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php deleted file mode 100644 index c8da12066b..0000000000 --- a/inc/extensions/ext-profile.php +++ /dev/null @@ -1,134 +0,0 @@ -profile_update und prof_reupdate > 0 sind."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Datumsformat festgelegt auf ausführlich."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Namenskonflikt gelösst mit Erweiterung update (kommt noch raus!)"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // Do we have a daily-reset-run? - if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) - { - // So let's check for profiles which needs an update - $INC_POOL[] = sprintf("%sinc/profile-updte.php", PATH); - } - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "profile"; - -// -?> diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php deleted file mode 100644 index cdacbeac35..0000000000 --- a/inc/extensions/ext-rallye.php +++ /dev/null @@ -1,351 +0,0 @@ -Unknown column 'd.useid' in 'on clause' behoben."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler Template nicht gefunden behoben und Admin-Formulare ausgelagert"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler Template nicht gefunden ist endlich beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points DOUBLE(23,5) NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzeigefehler im Gast-/Mitgliedsbereich behoben."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admin-Mails korregiert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)"; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Templates vom Admin-Bereich ausgelagert und Referral-Anazahl in der Mail zur Rallye-Ankündigung repariert."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referral-Liste implementiert."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template templates/de/emails/member/member_rallye_notifty.tpl folgende zwei Zeilen ein:
- -Zudem sollten Sie mindestens folgende Templates (in templates/".GET_LANGUAGE()."/html/guest/ !) aktualisieren:
-"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkt "Rallyes verwalten" repariert."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Automatisches Starten von Referral-Rallyes repariert."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fatalen Fehler beseitigt."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='1', title='Referral-Rallye' WHERE what='rallyes' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung autopurge installiert und aktiviert ist."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - // Do stuff only when not in CSS mode - if (($CSS != "1") && ($CSS != "-1") && ($cacheMode != "init")) { - // Get total member count - $TOTAL = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); - - // Add more data on higher versions - $ADD1 = ""; $ADD2 = ""; $OR = ""; - if (GET_EXT_VERSION("rallye") >= "0.2.0") { - $ADD1 = ", min_users, min_prices"; - $ADD2 = ", d.min_users, d.min_prices"; - $OR = " OR (d.min_users <= ".$TOTAL." AND d.min_users > 0)"; - } // END - if - - // Check for new started but not notified rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1." -FROM "._MYSQL_PREFIX."_rallye_data -WHERE is_active='Y' AND notified='N' AND expired='N' AND start_time <= UNIX_TIMESTAMP() AND end_time > UNIX_TIMESTAMP() -LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Start rallye - RALLYE_AUTOSTART_RALLYES($result); - } // END - if - - // Free memory - SQL_FREERESULT($result); - - // Check for expired rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2." -FROM "._MYSQL_PREFIX."_rallye_data AS d -WHERE d.is_active='Y' AND d.notified='Y' AND d.expired='N' AND (d.end_time <= UNIX_TIMESTAMP()".$OR.") -LIMIT 1", __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("autopurge"))) - { - // End rallye here... - RALLYE_EXPIRE_RALLYES($result); - } - - // Free memory - SQL_FREERESULT($result); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "rallye"; - -// -?> diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php deleted file mode 100644 index 446d0d6a52..0000000000 --- a/inc/extensions/ext-refback.php +++ /dev/null @@ -1,115 +0,0 @@ - diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php deleted file mode 100644 index 2090697556..0000000000 --- a/inc/extensions/ext-register.php +++ /dev/null @@ -1,332 +0,0 @@ -Profildaten ändern ein.', 12)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Einstellbare Pflichtfelder hinzugefügt."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='register' AND ext_has_css='N' LIMIT 1"; - - // This update depends on sql_patches update! - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // This update depends on sql_patches update! - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Standart Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Konfiguration der Pflichtangaben ausgelagert in Template"; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sämtliche Sperren bei eingeloggten Admin deaktiviert."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Cookie refid aus Anmeldeformular entfernt."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Referral-ID wird endlich korrekt gesetzt."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Parse error in what-register.php beseitigt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
-
-Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!"; - - // Depends on 'country' - $EXT_UPDATE_DEPENDS = "country"; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Auf Grund der Integration der neue Erweiterung country in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."; - break; - - case "0.3.7": // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere SQL-Befehle abgesichert."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Vorbereitung auf die neue Mediendaten v0.0.4."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_register2' WHERE what='config_reg' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl ist nicht mehr nötig."; - break; - - case "0.4.3": // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Parser-Error in inc/modules/guest/what-register.php beseitigt."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Einstellung nach ".POINTS."-Einstellungen verlagert."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "set_session() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."; - break; - - case "0.5.0": // SQL queries for v0.5.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlermeldung Fatal error: Call to undefined function REGISTER_ADD_CATEGORY_TABLE() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."; - break; - - case "0.5.1": // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"; - break; - - case "0.5.2": // SQL queries for v0.5.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "register"; - -// -?> diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php deleted file mode 100644 index 977e676578..0000000000 --- a/inc/extensions/ext-removeip.php +++ /dev/null @@ -1,98 +0,0 @@ - diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php deleted file mode 100644 index 20e442d81c..0000000000 --- a/inc/extensions/ext-repair.php +++ /dev/null @@ -1,119 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ungütiges Update nach neuster Konvention (Erweiterung menu ist ung&uum;ltig)."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "repair"; - -// -?> diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php deleted file mode 100644 index d0741fd8ae..0000000000 --- a/inc/extensions/ext-rewrite.php +++ /dev/null @@ -1,145 +0,0 @@ -Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "rewrite"; - -// -?> diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php deleted file mode 100644 index 690d6835ea..0000000000 --- a/inc/extensions/ext-safe.php +++ /dev/null @@ -1,88 +0,0 @@ - diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php deleted file mode 100644 index 262e75c16a..0000000000 --- a/inc/extensions/ext-sponsor.php +++ /dev/null @@ -1,436 +0,0 @@ - diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php deleted file mode 100644 index 426eb0018b..0000000000 --- a/inc/extensions/ext-sql_patches.php +++ /dev/null @@ -1,731 +0,0 @@ -"._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)"; - break; - - case "0.0.3": // SQL queries for v0.0.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' · '"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"; - break; - - case "0.0.9": // SQL queries for v0.0.9 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Soll der einmalige Ref-Bonus über das Referral-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE what='config_home' LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT '31536000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referral-Link Ihren Mailtausch aufgerufen hat.', 7)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Standart Referral-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"; - break; - - case "0.1.3": // SQL queries for v0.1.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD default_theme VARCHAR(255) NOT NULL DEFAULT '".GET_CURR_THEME()."'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='theme' LIMIT 3"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -theme_path VARCHAR(255) NOT NULL DEFAULT '', -theme_active ENUM('Y','N') NOT NULL DEFAULT 'N', -theme_ver VARCHAR(255) NOT NULL DEFAULT '0.0', -PRIMARY KEY(id) -) TYPE=MyISAM"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Theme-Support integriert. Bitte laden Sie sich zu dieser Version das 281-Patch (wenn Ihr Script v0.2.0-pre7 ist) herunter, da ansonsten die Themes nicht klappen werden!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP ext_has_admin"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "mad_count und last_mad werden nun aus der Datenbank geladen"; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_jackpot CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points DOUBLE(22,5) NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "5 Nachkommastellen implementiert"; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - $auto_type = "png"; // PNG image is the default - if ((FILE_READABLE(PATH."theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) { - // Switch to JPEG format - $auto_type = "jpg"; - } - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abzug von {!POINTS!} nun möglich."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action,what,title,sort) VALUES ('main','themes','Designs', 6)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "
    -
  1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
  2. -
  3. Mitgliederstatistik mit Seitennavigation.
  4. -
"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login VARCHAR(10) NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referral-Ebenen' WHERE what='config_points' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE what='payments' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Zwei Menüpunkte umbenannt."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD UNIQUE KEY (ext_name)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD UNIQUE KEY (theme_path)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD INDEX (theme_active)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD UNIQUE KEY (login)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths ADD UNIQUE KEY (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem ADD INDEX (level)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD INDEX (data_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD UNIQUE KEY (module)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_type)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_created)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD FULLTEXT (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD INDEX (ext_active)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD FULLTEXT (family)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (max_mails)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (password)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (action)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (what)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (sort)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (locked)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (visible)"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (sort)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Connection table between the menu system and the "logical area" system - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -la_id VARCHAR(255) NOT NULL DEFAULT '', -la_action VARCHAR(255) NOT NULL DEFAULT '', -la_what VARCHAR(255) NOT NULL DEFAULT '', -INDEX (la_id), -INDEX (la_action), -INDEX (la_what), -PRIMARY KEY(id) -) TYPE=MyISAM"; - // All "logical areas" together - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_las_data ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -la_id VARCHAR(255) NOT NULL DEFAULT '', -la_title VARCHAR(255) NOT NULL DEFAULT '', -la_posx BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -la_posy BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -UNIQUE KEY (la_id), -INDEX (la_posx), -INDEX (la_posy), -PRIMARY KEY(id) -) TYPE=MyISAM"; - // Which menu do you like? - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"; - - // Insert menus - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure... - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // The statistics table - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_admin_menu_stats ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -aid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -type ENUM('la','action','what') NOT NULL DEFAULT 'what', -clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -INDEX (aid), -PRIMARY KEY (id) -) TYPE=MyISAM"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten."; - break; - - case "0.3.4": // SQL queries for v0.3.4 - // List accounts with no referral - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_norefs','Mitglieder ohne Werber','Finden Sie hier alle Mitglieder-Accounts, die von niemandem ({--MAIN_TITLE--} wird in der Mail als Werber angegebenen) geworben wurden.', 7)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fügt den Menüpunkt "Mitglieder ohne Werber" in die Mitglieder-Management hinzu. Mit dieser neuen Funktion können Sie nach Mitglieder-Accounts ohne Werber suchen. TODO-ID #2 CLOSED"; - break; - - case "0.3.5": // SQL queries for v0.3.5 - // List accounts with no referral - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET sort='8' WHERE action='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE what='stats' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE what='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE what='reflinks' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; - break; - - case "0.3.6": // SQL queries for v0.3.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"; - break; - - case "0.3.7": // SQL queries for v0.3.7 - $UPDATE_NOTES = "Problem während des Installationsvorganges behoben."; - break; - - case "0.3.8": // SQL queries for v0.3.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu CHANGE descr descr MEDIUMTEXT NULL"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool CHANGE `text` `text` LONGTEXT NOT NULL"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; - break; - - case "0.3.9": // SQL queries for v0.3.9 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."; - break; - - case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND (what='' OR what IS NULL) LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt."; - break; - - case "0.4.1": // SQL queries for v0.4.1 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX `status` , ADD INDEX `status` ( `status` , `max_mails` )"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."; - break; - - case "0.4.2": // SQL queries for v0.4.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_online` ADD INDEX `admin_member` (`is_admin`,`is_member`)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Neuen Schlüssel zur Online-Tabelle hinzugefügt."; - break; - - case "0.4.3": // SQL queries for v0.4.3 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT '0'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Proxy-Einstellungen hinzugefügt."; - break; - - case "0.4.4": // SQL queries for v0.4.4 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what=NULL WHERE what=''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET what=NULL WHERE what=''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET what=NULL WHERE what=''"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX `action` (`action`)"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."; - break; - - case "0.4.5": // SQL queries for v0.4.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_month CHAR(2) NOT NULL DEFAULT '00'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_week CHAR(2) NOT NULL DEFAULT '00'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Täglichen/wöchentlichen/monatlichen Reset verbessert."; - break; - - case "0.4.6": // SQL queries for v0.4.6 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET gender=sex WHERE sex != 'M'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP sex"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Offensives Wort "Sex" gegen "Gender" ausgetauscht."; - break; - - case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data 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ählt und der letzte vermerkt."; - break; - - case "0.4.8": // SQL queries for v0.4.8 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Index für Betreff eingefügt."; - break; - - case "0.4.9": // SQL queries for v0.4.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET user_hash=NULL WHERE user_hash IS NOT NULL AND status='CONFIRMED'"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD UNIQUE (`user_hash`)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "User-Hash zum Bestätigen wird auf NULL gesetzt, wenn Account bestätigt wird."; - break; - - case "0.5.0": // SQL queries for v0.5.0 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `level`"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `userid`, ADD UNIQUE `userid_level` (`userid`,`level`)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."; - break; - - case "0.5.1": // SQL queries for v0.5.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP `descr`"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."; - break; - - case "0.5.2": // SQL queries for v0.5.2 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) NOT NULL DEFAULT '0.00000'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."; - break; - - case "0.5.3": // SQL queries for v0.5.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD session_save_path varchar(255) NOT NULL DEFAULT ''"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."; - break; - } - break; - -default: // Do stuff when extension is loaded - // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION("sql_patches") != '') { - // Init key - $_CONFIG['secret_key'] = ""; - - // Read key from secret file - if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) { - // Maybe need setup of secret key! - require_once(PATH."inc/gen_sql_patches.php"); - - if ((GET_EXT_VERSION("cache") >= "0.1.2") && (is_object($cacheInstance))) { - // Remove extensions and mod_reg cache file - require_once(PATH."inc/libs/cache_functions.php"); - require_once(PATH."inc/extensions/ext-cache.php"); - if ($cacheInstance->cache_file("extensions", true)) $cacheInstance->cache_destroy(); - if ($cacheInstance->cache_file("mod_reg", true)) $cacheInstance->cache_destroy(); - } // END - if - } // END - if - - // Test again - if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble']))) { - // File hash fas generated so we can also file the secret file... hopefully. - $hashFile = sprintf("%sinc/.secret/.%s", PATH, $_CONFIG['file_hash']); - if (FILE_READABLE($hashFile)) { - // Read file - $_CONFIG['secret_key'] = implode("", file($hashFile)); - } else { - // Remove it from database - UPDATE_CONFIG("file_hash", ""); - - // Cannot read secret file! - mxchange_die("Cannot read secret file! Please try to reload"); - } - } // END - if - - // Transfer words/numbers to constants - define('POINTS' , $_CONFIG['points_word']); - define('MT_WORD' , $_CONFIG['mt_word']); - define('MT_WORD2', $_CONFIG['mt_word2']); - define('MT_WORD3', $_CONFIG['mt_word3']); - define('_MAX' , $_CONFIG['rand_no']); - } else { - // Set some lame ;-) default settings - $_CONFIG['def_refid'] = 0; - $_CONFIG['enable_title_deco'] = "N"; - $_CONFIG['title_mod_show'] = "Y"; - $_CONFIG['title_middle'] = "-"; - //$_CONFIG['verbose_sql'] = "N"; - define('MT_WORD' , DEFAULT_MT_WORD ); - define('MT_WORD2', DEFAULT_MT_WORD2); - define('POINTS' , DEFAULT_POINTS); - } - break; -} - -// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) -$EXT_LANG_PREFIX = "sql_patches"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php deleted file mode 100644 index b8d6d89779..0000000000 --- a/inc/extensions/ext-support.php +++ /dev/null @@ -1,136 +0,0 @@ -Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate vom 27.08.2005."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "support"; - -// -?> diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php deleted file mode 100644 index e67e15bb1d..0000000000 --- a/inc/extensions/ext-surfbar.php +++ /dev/null @@ -1,236 +0,0 @@ -Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"; - - // Load CSS? - $EXT_CSS = "Y"; - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`"; - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 5"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `action`='surfbar' LIMIT 7"; - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"; - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"; - 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 = "surfbar"; - -// -?> diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php deleted file mode 100644 index 2fd0a1f676..0000000000 --- a/inc/extensions/ext-task.php +++ /dev/null @@ -1,251 +0,0 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "&admin= in &amp;admin= umgewandelt."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erstellung der Extra-Übersichten verbessert."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler bei Abfrage der payout-Erweiterung beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Task-Liste ausgelagert als Template"; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Links wegen what=admins_contct geändert."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Weitere Direkt-Links eingebaut:
-"; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Direkt Links zum Sponsorenbereich vorbereitend eingebaut."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Es werden alle installierten und aktivierten Themes angezeigt und verlinkt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "CSS-Datei in general.css verschmolzen (Patch 435!)"; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Alle Administratoren, Referral-Banner und aktivierte Referral-Banner werden nun eingeblendet."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit überlanger Textbreite beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Freischalten von Sponoren-Accounts korregiert."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nur mit bonus v0.6.9 oder höher: Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Teilnehmer der Bettel-Rallye werden angezeigt."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als Erledigt gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Export-Accounts werden in Task-Übersicht aufgelistet."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "task"; - -// -?> diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php deleted file mode 100644 index 84a4728350..0000000000 --- a/inc/extensions/ext-theme.php +++ /dev/null @@ -1,121 +0,0 @@ -set_session() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Variablen-Handling skriptglobal geändert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD theme_name VARCHAR(255) NOT NULL DEFAULT ''"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Designname (von Menschen lesbar) hinzugefügt."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "theme"; - -// -?> diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php deleted file mode 100644 index 358367b597..0000000000 --- a/inc/extensions/ext-top10.php +++ /dev/null @@ -1,150 +0,0 @@ -Column: 'userid' in group statement is ambiguous im Gastbereich beseitigt."; - break; - - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.4": // SQL queries for v0.0.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Rechtschreibefehler beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "top10"; - -// -?> diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php deleted file mode 100644 index 77b6cad0c7..0000000000 --- a/inc/extensions/ext-transfer.php +++ /dev/null @@ -1,291 +0,0 @@ -Warning: Missing argument 2 for create_timestamp_from_selections() in ".PATH."inc/libs/pro_functions.php on line 227 behoben."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."; - break; - - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."; - break; - - case "0.0.5": // SQL queries for v0.0.5 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"; - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."; - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit E in Transaktionsnummer beseitigt."; - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt."; - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."; - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Design "Solid-Business" eingebaut."; - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Template admin_config_transfer_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wort Punkte dynamisiert."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Parser-Error im Mitgliedsbereich beseitigt."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Durchführung des Transfers korregiert."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'list_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'del_transfer')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', NULL, 'config_transfer')"; - - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - $EXT_UPDATE_DEPENDS = "sql_patches"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung in's neue Menüsystem integriert."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Touring-Code wiederholen nach Touring-Code eingeben hin geändert."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitgliedsmenü komplett geändert."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Die ".POINTS." können nun wieder wie gewohnt transferiert werden. Der Grund für {--TRANSFER_INVALID_PASSWORD--} war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlermeldung Notice: Undefined index: to_uid in ".PATH."/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; - break; - } - break; - -default: // Do stuff when extension is loaded - if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == "Y")) { - // Automatically remove outdated or not displayed transactions - TRANSFER_AUTPPURGE($_CONFIG['transfer_max'], $_CONFIG['transfer_age']); - } - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "transfer"; - -// -?> diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php deleted file mode 100644 index d62590ede9..0000000000 --- a/inc/extensions/ext-user.php +++ /dev/null @@ -1,226 +0,0 @@ -Sie sind hier im Menüpunkt Online-Liste erweitert."; - break; - - case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."; - break; - - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv."; - break; - - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; - break; - - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."; - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."; - break; - - case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."; - break; - - case "0.2.2": // SQL queries for v0.2.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE gender gender ENUM('M','F','C') NOT NULL DEFAULT 'M'"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; - break; - - case "0.2.3": // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Datumsformat festgelegt auf ausführlich."; - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; - break; - - case "0.2.5": // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "SQL-Anweisungen abgesichert."; - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle."; - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "if-Anweisungen auf Funktion empty() umgestellt."; - break; - - case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Admin-Kontaktformular hinzugefügt."; - break; - - case "0.3.0": // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 Release."; - break; - - case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Mitglieder-Management' WHERE action = 'user' AND (what='' OR what IS NULL) LIMIT 1"; - - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Verwaltung auf Management umgestellt"; - break; - - case "0.3.2": // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von 0.00000 unbestätigten Mails gefixt."; - break; - - case "0.3.3": // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung task!)"; - break; - } - break; - -default: // Do stuff when extension is loaded - break; -} - -// Language file prefix -$EXT_LANG_PREFIX = "user"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "Y"; - -// -?> diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php deleted file mode 100644 index 672ec5089d..0000000000 --- a/inc/extensions/ext-wernis.php +++ /dev/null @@ -1,139 +0,0 @@ - diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php deleted file mode 100644 index 99724405e3..0000000000 --- a/inc/extensions/ext-yoomedia.php +++ /dev/null @@ -1,89 +0,0 @@ - diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php deleted file mode 100644 index 96a7d8539e..0000000000 --- a/inc/fatal_errors.php +++ /dev/null @@ -1,92 +0,0 @@ - 0) || (!empty($FATAL[0]))) -{ - // Main div container - LOAD_TEMPLATE("fatal_header"); - - // Set unset variable - if (empty($check)) $check = ""; - if (isBooleanConstantAndTrue('mxchange_installing')) { - // While we are installing ouput other header than while it is installed... :-) - $OUT = ""; - foreach ($FATAL as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= LOAD_TEMPLATE("install_fatal_row", true, $content); - } - - // Load main template - LOAD_TEMPLATE("install_fatal_table", false, $OUT); - } elseif (isBooleanConstantAndTrue('mxchange_installed')) { - // Display all runtime fatal errors - $OUT = ""; - foreach ($FATAL as $key => $value) { - // Prepare content for the template - $content = array( - 'key' => ($key + 1), - 'value' => $value - ); - - // Load row template - $OUT .= LOAD_TEMPLATE("runtime_fatal_row", true, $content); - } - - // Load main template - mxchange_die(LOAD_TEMPLATE("runtime_fatal_table", true, $OUT)); - } - $CORR = FATAL_REPORT_ERRORS; - - // PHP warnings fixed - if ($check == "done") { - if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS; - } - - // Load footer template - LOAD_TEMPLATE("fatal_footer", false, $CORR); -} - -// -?> diff --git a/inc/footer.php b/inc/footer.php deleted file mode 100644 index 6d4b63cdd2..0000000000 --- a/inc/footer.php +++ /dev/null @@ -1,102 +0,0 @@ -"); - - // Footer has been reached - $footer = 1; - - // Output HTML code - OUTPUT_HTML(""); - - if (is_resource($link)) { - // Close link - SQL_CLOSE($link, __FILE__, __LINE__); - } else { - // No database link - ADD_FATAL(NO_DB_LINK); - } -} elseif ($CSS == "1") { - // Footer has been reached - $footer = 1; - - // Output CSS content - OUTPUT_HTML(""); -} - -// -?> diff --git a/inc/functions.php b/inc/functions.php deleted file mode 100644 index d356add7d7..0000000000 --- a/inc/functions.php +++ /dev/null @@ -1,2674 +0,0 @@ -\n\n"; - OUTPUT_HTML($OUT); -} - -// Close a table (you may want to add some footer stuff here) -function CLOSE_TABLE($ADD="") { - OUTPUT_HTML(" \n"); - if (!empty($ADD)) OUTPUT_HTML($ADD); - OUTPUT_HTML(""); -} - -// Output HTML code directly or "render" it. You addionally switch the new-line character off -function OUTPUT_HTML($HTML, $NEW_LINE = true) { - // Some global variables - global $OUTPUT, $footer, $CSS; - - // Do we have HTML-Code here? - if (!empty($HTML)) { - // Yes, so we handle it as you have configured - switch (OUTPUT_MODE) - { - case "render": - // That's why you don't need any \n at the end of your HTML code... :-) - if (_OB_CACHING == "on") { - // Output into PHP's internal buffer - OUTPUT_RAW($HTML); - - // That's why you don't need any \n at the end of your HTML code... :-) - if ($NEW_LINE) echo "\n"; - } else { - // Render mode for old or lame servers... - $OUTPUT .= $HTML; - - // That's why you don't need any \n at the end of your HTML code... :-) - if ($NEW_LINE) $OUTPUT .= "\n"; - } - break; - - case "direct": - // If we are switching from render to direct output rendered code - if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ""; } - - // The same as above... ^ - OUTPUT_RAW($HTML); - if ($NEW_LINE) echo "\n"; - break; - - default: - // Huh, something goes wrong or maybe you have edited config.php ??? - die ("".FATAL_ERROR.": ".LANG_NO_RENDER_DIRECT); - break; - } - } elseif ((_OB_CACHING == "on") && ($footer == 1)) { - // Output cached HTML code - $OUTPUT = ob_get_contents(); - - // Clear output buffer for later output - ob_end_clean(); - - // Extension "rewrite" installed? - if ((EXT_IS_ACTIVE("rewrite")) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { - $OUTPUT = REWRITE_LINKS($OUTPUT); - } // END - if - - // Compile and run finished rendered HTML code - while (strpos($OUTPUT, '{!') > 0) { - // Prepare the content and eval() it... - $newContent = ""; - $eval = "\$newContent = \"".COMPILE_CODE(addslashes($OUTPUT))."\";"; - @eval($eval); - - // Was that eval okay? - if (empty($newContent)) { - // Something went wrong! - die("Evaluation error:
".htmlentities($eval)."
"); - } // END - if - $OUTPUT = $newContent; - } // END - while - - // Output code here, DO NOT REMOVE! ;-) - OUTPUT_RAW($OUTPUT); - } elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) { - // Rewrite links when rewrite extension is active - if ((EXT_IS_ACTIVE("rewrite")) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) { - $OUTPUT = REWRITE_LINKS($OUTPUT); - } // END - if - - // Compile and run finished rendered HTML code - while (strpos($OUTPUT, '{!') > 0) { - $eval = "\$OUTPUT = \"".COMPILE_CODE(addslashes($OUTPUT))."\";"; - eval($eval); - } // END - while - - // Output code here, DO NOT REMOVE! ;-) - OUTPUT_RAW($OUTPUT); - } -} - -// Output the raw HTML code -function OUTPUT_RAW ($HTML) { - // Output stripped HTML code to avoid broken JavaScript code, etc. - echo stripslashes(stripslashes($HTML)); - - // Flush the output if only _OB_CACHING is not "on" - if (_OB_CACHING != "on") { - // Flush it - flush(); - } // END - if -} - -// Add a fatal error message to the queue array -function ADD_FATAL ($message, $extra="") { - global $FATAL; - if (empty($extra)) { - // Regular text message to add to $FATAL - $FATAL[] = $message; - } else { - // $message is text with a mask plus extras to insert into the text - $FATAL[] = sprintf($message, $extra); - } -} - -// Load a template file and return it's content (only it's name; do not use ' or ") -function LOAD_TEMPLATE($template, $return=false, $content=array()) { - // Add more variables which you want to use in your template files - global $DATA, $_CONFIG, $username; - - // Make all template names lowercase - $template = strtolower($template); - - // Count the template load - if (!isset($_CONFIG['num_templates'])) $_CONFIG['num_templates'] = 0; - $_CONFIG['num_templates']++; - - // Init some data - $ret = ""; - if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; - - // @DEPRECATED Try to remove this if() block - if ($template == "member_support_form") { - // Support request of a member - $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", - array($GLOBALS['userid']), __FILE__, __LINE__); - - // @TODO Merge this data into $content - list($gender, $surname, $family, $email) = SQL_FETCHROW($result); - - // Translate gender - $gender = TRANSLATE_GENDER($gender); - - // Insert data if content is an array - if (is_array($content)) { - // Please switch to $content[bla] in all your templates! Direct - // variables are deprecated as of 09/13/2008. - $content['gender'] = $gender; - $content['surname'] = $surname; - $content['family'] = $family; - $content['email'] = $email; - } // END - if - - // Free result - SQL_FREERESULT($result); - } // END - if - - // Generate date/time string - $date_time = MAKE_DATETIME(time(), "1"); - - // Base directory - $BASE = sprintf("%stemplates/%s/html/", PATH, GET_LANGUAGE()); - $MODE = ""; - - // Check for admin/guest/member templates - if (strpos($template, "admin_") > -1) { - // Admin template found - $MODE = "admin/"; - } elseif (strpos($template, "guest_") > -1) { - // Guest template found - $MODE = "guest/"; - } elseif (strpos($template, "member_") > -1) { - // Member template found - $MODE = "member/"; - } elseif (strpos($template, "install_") > -1) { - // Installation template found - $MODE = "install/"; - } elseif (strpos($template, "ext_") > -1) { - // Extension template found - $MODE = "ext/"; - } elseif (strpos($template, "la_") > -1) { - // "Logical-area" template found - $MODE = "la/"; - } else { - // Test for extension - $test = substr($template, 0, strpos($template, "_")); - if (EXT_IS_ACTIVE($test)) { - // Set extra path to extension's name - $MODE = $test."/"; - } - } - - //////////////////////// - // Generate file name // - //////////////////////// - $file = $BASE.$MODE.$template.".tpl"; - - if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($MODE == "guest/") || ($MODE == "member/") || ($MODE == "admin/"))) { - // Select what depended header/footer template file for admin/guest/member area - $file2 = sprintf("%s%s%s_%s.tpl", - $BASE, - $MODE, - $template, - SQL_ESCAPE($GLOBALS['what']) - ); - - // Probe for it... - if (FILE_READABLE($file2)) $file = $file2; - - // Remove variable from memory - unset($file2); - } - - // Does the special template exists? - if (!FILE_READABLE($file)) { - // Reset to default template - $file = $BASE.$template.".tpl"; - } // END - if - - // Now does the final template exists? - if (FILE_READABLE($file)) { - // The local file does exists so we load it. :) - $tmpl_file = implode("", file($file)); - - // Replace ' to our own chars to preventing them being quoted - while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", '{QUOT}', $tmpl_file); } - - // Do we have to compile the code? - $ret = ""; - if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) { - // Okay, compile it! - $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";"; - eval($tmpl_file); - } else { - // Simply return loaded code - $ret = $tmpl_file; - } - - // Add surrounding HTML comments to help finding bugs faster - $ret = "\n".$ret."\n"; - } elseif ((IS_ADMIN()) || ((isBooleanConstantAndTrue('mxchange_installing')) && (!isBooleanConstantAndTrue('mxchange_installed')))) { - // Only admins shall see this warning or when installation mode is active - $ret = "
".TEMPLATE_404."
-(".basename($file).")
-
-".TEMPLATE_CONTENT." -
".print_r($content, true)."
-".TEMPLATE_DATA." -
".print_r($DATA, true)."
-

"; - } - - // Do we have some content to output or return? - if (!empty($ret)) { - // Not empty so let's put it out! ;) - if ($return) { - // Return the HTML code - return $ret; - } else { - // Output direct - OUTPUT_HTML($ret); - } - } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { - // Warning, empty output! - return "E:".$template."
\n"; - } -} - -// Send mail out to an email address -function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") { - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):TO={$TO},SUBJECT={$SUBJECT}
\n"; - - // Compile subject line (for POINTS constant etc.) - $eval = "\$SUBJECT = html_entity_decode(\"".COMPILE_CODE(addslashes($SUBJECT))."\");"; - eval($eval); - - // Set from header - if ((!eregi("@", $TO)) && ($TO > 0)) { - // Value detected, is the message extension installed? - if (EXT_IS_ACTIVE("msg")) { - ADD_MESSAGE_TO_BOX($TO, $SUBJECT, $MSG, $HTML); - return; - } else { - // Load email address - $result_email = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):numRows=".SQL_NUMROWS($result_email)."
\n"; - - // Does the user exist? - if (SQL_NUMROWS($result_email)) { - // Load email address - list($TO) = SQL_FETCHROW($result_email); - } else { - // Set webmaster - $TO = WEBMASTER; - } - - // Free result - SQL_FREERESULT($result_email); - } - } elseif ("$TO" == "0") { - // Is the webmaster! - $TO = WEBMASTER; - } - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):TO={$TO}
\n"; - - // Check for PHPMailer or debug-mode - if (!CHECK_PHPMAILER_USAGE()) { - // Not in PHPMailer-Mode - if (empty($FROM)) { - // Load email header template - $FROM = LOAD_EMAIL_TEMPLATE("header"); - } else { - // Append header - $FROM .= LOAD_EMAIL_TEMPLATE("header"); - } - } elseif (isBooleanConstantAndTrue('DEBUG_MODE')) { - if (empty($FROM)) { - // Load email header template - $FROM = LOAD_EMAIL_TEMPLATE("header"); - } else { - // Append header - $FROM .= LOAD_EMAIL_TEMPLATE("header"); - } - } - - // Compile "TO" - $eval = "\$TO = \"".COMPILE_CODE(addslashes($TO))."\";"; - eval($eval); - - // Fix HTML parameter (default is no!) - if (empty($HTML)) $HTML = "N"; - if (isBooleanConstantAndTrue('DEBUG_MODE')) { - // In debug mode we want to display the mail instead of sending it away so we can debug this part - echo "
-".htmlentities(trim($FROM))."
-To      : ".$TO."
-Subject : ".$SUBJECT."
-Message : ".$MSG."
-
\n"; - - // Log the mail away - if (defined('DEBUG_MAIL')) DEBUG_LOG(__FUNCTION__.":to={$TO},subject={$SUBJECT},msg={$MSG}"); - } elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail"))) { - // Send mail as HTML away - SEND_HTML_EMAIL($TO, $SUBJECT, $MSG, $FROM); - } elseif (!empty($TO)) { - // Send Mail away - SEND_RAW_EMAIL($TO, COMPILE_CODE($SUBJECT), COMPILE_CODE($MSG), $FROM); - } elseif ($HTML == "N") { - // Problem found! - SEND_RAW_EMAIL(WEBMASTER, COMPILE_CODE($SUBJECT), COMPILE_CODE($MSG), $FROM); - } -} - -// Check if legacy or PHPMailer command -// @private -function CHECK_PHPMAILER_USAGE() { - return ((defined('SMTP_HOSTNAME')) && (defined('SMTP_USER')) && (defined('SMTP_PASSWORD')) && (SMTP_HOSTNAME != "") && (SMTP_USER != "")); -} - -/* - * Send out a raw email with PHPMailer class or legacy mail() command - */ -function SEND_RAW_EMAIL ($to, $subject, $msg, $from) { - // Shall we use PHPMailer class or legacy mode? - if (CHECK_PHPMAILER_USAGE()) { - // Use PHPMailer class with SMTP enabled - require_once(PATH."inc/phpmailer/class.phpmailer.php"); - require_once(PATH."inc/phpmailer/class.smtp.php"); - - // get new instance - $mail = new PHPMailer(); - $mail->PluginDir = sprintf("%sinc/phpmailer/", PATH); - - $mail->IsSMTP(); - $mail->SMTPAuth = true; - $mail->Host = SMTP_HOSTNAME; - $mail->Port = 25; - $mail->Username = SMTP_USER; - $mail->Password = SMTP_PASSWORD; - if (empty($from)) { - $mail->From = WEBMASTER; - } else { - $mail->From = $from; - } - $mail->FromName = MAIN_TITLE; - $mail->Subject = $subject; - if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) { - $mail->Body = $msg; - $mail->AltBody = "Your mail program required HTML support to read this mail!"; - $mail->WordWrap = 70; - $mail->IsHTML(true); - } else { - $mail->Body = $msg; - } - $mail->AddAddress($to, ""); - $mail->AddReplyTo(WEBMASTER,MAIN_TITLE); - $mail->AddCustomHeader("Errors-To:".WEBMASTER); - $mail->AddCustomHeader("X-Loop:".WEBMASTER); - $mail->Send(); - } else { - // Use legacy mail() command - @mail($to, $subject, $msg, $from); - } -} -// - -// Generate a password in a specified length or use default password length -function GEN_PASS($LEN = 0) { - global $_CONFIG; - if ($LEN == 0) $LEN = $_CONFIG['pass_len']; - - // Initialize array with all allowed chars - $ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/"); - - // Initialize randomizer - mt_srand((double) microtime() * 1000000); - - // Start creating password - $PASS = ""; - for ($i = 0; $i < $LEN; $i++) { - $PASS .= $ABC[mt_rand(0, sizeof($ABC) -1)]; - } - - // When the size is below 40 we can also add additional security by scrambling it - if (strlen($PASS) <= 40) { - // Also scramble the password - $PASS = scrambleString($PASS); - } - - // Return the password - return $PASS; -} -// -function MAKE_DATETIME ($time, $mode="0") -{ - if ($time == 0) { - // Never happend - return NEVER_HAPPENED; - } else { - // Filter out numbers - $time = bigintval($time); - } - - switch (GET_LANGUAGE()) - { - case "de": // German date / time format - switch ($mode) { - case "0": $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; - case "1": $ret = strtolower(date("d.m.Y - H:i", $time)); break; - case "2": $ret = date("d.m.Y|H:i", $time); break; - case "3": $ret = date("d.m.Y", $time); break; - } - break; - - default: // Default is the US date / time format! - switch ($mode) { - case "0": $ret = date("r", $time); break; - case "1": $ret = date("Y-m-d - g:i A", $time); break; - case "2": $ret = date("y-m-d|H:i", $time); break; - case "3": $ret = date("y-m-d", $time); break; - } - } - return $ret; -} - -// Translates the american decimal dot into a german comma -function TRANSLATE_COMMA ($dotted, $cut=true) { - global $_CONFIG; - - // Default is 3 you can change this in admin area "Misc -> Misc Options" - if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3"; - $maxComma = $_CONFIG['max_comma']; - - // Cut zeros off? - if ($cut) { - // Test for commata if in cut-mode - $com = explode(".", $dotted); - if (count($com) > 1) { - // Commata found, so only zeros? - if ($com[1] == str_repeat("0", strlen($com[1]))) { - // Only zeros, so display only one - $maxComma = 1; - } // END - if - } else { - // Don't display commatas even if there are none... ;-) - $maxComma = 0; - } - } // END - if - - // Debug log - //DEBUG_LOG(__FUNCTION__.":dotted={$dotted},maxComma={$maxComma}"); - - // Translate it now - switch (GET_LANGUAGE()) { - case "de": - $dotted = number_format($dotted, $maxComma, ",", "."); - break; - - default: - $dotted = number_format($dotted, $maxComma, ".", ","); - break; - } - - // Return translated value - return $dotted; -} - -// -function DEREFERER ($URL) { - $URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(gzcompress($URL))); - return $URL; -} - -// -function TRANSLATE_GENDER ($gender) { - switch ($gender) - { - case "M": $ret = GENDER_M; break; - case "F": $ret = GENDER_F; break; - case "C": $ret = GENDER_C; break; - default : $ret = $gender; break; - } - return $ret; -} -// -function FRAMETESTER($URL) { - // Prepare frametester URL - $frametesterUrl = sprintf("%s/modules.php?module=frametester&url=%s", - URL, - urlencode(base64_encode(gzcompress(COMPILE_CODE($URL)))) - ); - return $frametesterUrl; -} -// -function SELECTION_COUNT($array) { - $ret = 0; - if (is_array($array)) { - foreach ($array as $key => $sel) { - if (!empty($sel)) $ret++; - } - } - return $ret; -} -// -function IMG_CODE ($code, $type, $DATA, $uid) { - return "\"Code\""; -} -// -function TRANSLATE_STATUS($status) { - switch ($status) - { - case "UNCONFIRMED": - $ret = ACCOUNT_UNCONFIRMED; - break; - - case "CONFIRMED": - $ret = ACCOUNT_CONFIRMED; - break; - - case "LOCKED": - $ret = ACCOUNT_LOCKED; - break; - - case "": - case null: - $ret = ACCOUNT_DELETED; - break; - - default: - $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; - break; - } - return $ret; -} -// -function GET_LANGUAGE() { - if (!empty($_GET['mx_lang'])) { - // Accept only first 2 chars - $lang = substr($_GET['mx_lang'], 0, 2); - } else { - // Do nothing - $lang = ""; - } - - // Set default return value to default language from config - $ret = DEFAULT_LANG; - - // Check GET variable and cookie - if (!empty($lang)) { - // Check if main language file does exist - if (FILE_READABLE(PATH."inc/language/".$lang.".php")) { - // Okay found, so let's update cookies - SET_LANGUAGE($lang); - } - } elseif (!isSessionVariableSet('mx_lang')) { - // Return stored value from cookie - $ret = get_session('mx_lang'); - - // Fixes a warning before the session has the mx_lang constant - if (empty($ret)) $ret = DEFAULT_LANG; - } - return $ret; -} -// -function SET_LANGUAGE($lang) { - global $_CONFIG; - - // Accept only first 2 chars! - $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); - - // Set cookie - set_session("mx_lang", $lang); -} -// -function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { - global $DATA, $_CONFIG, $REPLACER; - - // Make sure all template names are lowercase! - $template = strtolower($template); - - // Default "nickname" if extension is not installed - $nick = "---"; - - // Keept for backward-compatiblity (please replace these variables against our new {!CONST!} syntax!) - // No longer used: $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER; - - // Prepare IP number and User Agent - $REMOTE_ADDR = GET_REMOTE_ADDR(); - $HTTP_USER_AGENT = GET_USER_AGENT(); - - // Default admin - $ADMIN = MAIN_TITLE; - - // Is the admin logged in? - if (IS_ADMIN()) { - // Load Admin data - $ADMIN = GET_ADMIN_EMAIL(get_session('admin_login')); - } // END - if - - // Neutral email address is default - $email = WEBMASTER; - - // Expiration in a nice output format - if ($_CONFIG['auto_purge'] == 0) { - // Will never expire! - $EXPIRATION = MAIL_WILL_NEVER_EXPIRE; - } elseif (function_exists('CREATE_FANCY_TIME')) { - // Create nice date string - $EXPIRATION = CREATE_FANCY_TIME($_CONFIG['auto_purge']); - } else { - // Display days only - $EXPIRATION = round($_CONFIG['auto_purge']/60/60/24)." "._DAYS; - } - - // Is content an array? - if (is_array($content)) { - // Add expiration to array, $EXPIRATION is now deprecated! - $content['expiration'] = $EXPIRATION; - } // END - if - - // Load user's data - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):UID={$UID},template={$template}
\n"; - if ($UID > 0) { - if (EXT_IS_ACTIVE("nickname")) { - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NICKNAME!
\n"; - // Load nickname - $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", - array(bigintval($UID)), __FILE__, __LINE__); - } else { - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NO-NICK!
\n"; - /// Load normal data - $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", - array(bigintval($UID)), __FILE__, __LINE__); - } - - // Is content an array? - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):content[]=".gettype($content)."
\n"; - if (is_array($content)) { - // Fetch and migrate data - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):content()=".count($content)." - PRE
\n"; - $content = array_merge($content, SQL_FETCHARRAY($result)); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):content()=".count($content)." - AFTER
\n"; - } // END - if - - // Free result - SQL_FREERESULT($result); - } // END - if - - // Translate M to male or F to female if present - if (isset($content['gender'])) $content['gender'] = TRANSLATE_GENDER($content['gender']); - - // Overwrite email from data if present - if (isset($content['email'])) $email = $content['email']; - - // Store email for some functions in global data array - $DATA['email'] = $email; - - // Base directory - $BASE = sprintf("%stemplates/%s/emails/", PATH, GET_LANGUAGE()); - - // Check for admin/guest/member templates - if (strpos($template, "admin_") > -1) { - // Admin template found - $file = $BASE."admin/".$template.".tpl"; - } elseif (strpos($template, "guest_") > -1) { - // Guest template found - $file = $BASE."guest/".$template.".tpl"; - } elseif (strpos($template, "member_") > -1) { - // Member template found - $file = $BASE."member/".$template.".tpl"; - } else { - // Test for extension - $test = substr($template, 0, strpos($template, "_")); - if (EXT_IS_ACTIVE($test)) { - // Set extra path to extension's name - $file = $BASE.$test."/".$template.".tpl"; - } else { - // No special filename - $file = $BASE.$template.".tpl"; - } - } - - // Does the special template exists? - if (!FILE_READABLE($file)) { - // Reset to default template - $file = $BASE.$template.".tpl"; - } // END - if - - // Now does the final template exists? - $newContent = ""; - if (FILE_READABLE($file)) { - // The local file does exists so we load it. :) - $tmpl_file = implode("", file($file)); - $tmpl_file = addslashes($tmpl_file); - - // Run code - $tmpl_file = "\$newContent=html_entity_decode(\"".COMPILE_CODE($tmpl_file)."\");"; - @eval($tmpl_file); - } elseif (!empty($template)) { - // Template file not found! - $newContent = TEMPLATE_404.": ".$template."
-".TEMPLATE_CONTENT." -
".print_r($content, true)."
-".TEMPLATE_DATA." -
".print_r($DATA, true)."
-

"; - - // Debug mode not active? Then remove the HTML tags - if (!DEBUG_MODE) $newContent = strip_tags($newContent); - } else { - // No template name supplied! - $newContent = NO_TEMPLATE_SUPPLIED; - } - - // Is there some content? - if (empty($newContent)) { - // Compiling failed - $newContent = "Compiler error for template {$template}!\nUncompiled content:\n".$tmpl_file; - if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx."; - } // END - if - - // Return compiled content - return COMPILE_CODE($newContent); -} -// -function MAKE_TIME($H, $M, $S, $stamp) { - // Extract day, month and year from given timestamp - $DAY = date("d", $stamp); - $MONTH = date("m", $stamp); - $YEAR = date('Y', $stamp); - - // Create timestamp for wished time which depends on extracted date - return mktime($H, $M, $S, $MONTH, $DAY, $YEAR); -} -// -function LOAD_URL($URL, $addUrlData=true) { - global $CSS, $_CONFIG, $footer; - - // Check if http(s):// is there - if ((substr($URL, 0, 7) != "http://") && (substr($URL, 0, 8) != "https://")) { - // Make all URLs full-qualified - $URL = URL."/".$URL; - } - - // Compile out URI codes - $URL = COMPILE_CODE($URL); - - // Get output buffer - $OUTPUT = ob_get_contents(); - - // Clear it only if there is content - if (!empty($OUTPUT)) { - ob_end_clean(); - } // END - if - - // Add some data to URL if cookies are not accepted - if (((!defined('__COOKIES')) || (!__COOKIES)) && ($addUrlData)) $URL = ADD_URL_DATA($URL); - - // Probe for bot from search engine - if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT())) || (eregi("spider", GET_USER_AGENT()))) { - // Search engine bot detected so let's rewrite many chars for the link - $URL = htmlentities(strip_tags($URL), ENT_QUOTES); - - // Output new location link as anchor - OUTPUT_HTML("".$URL.""); - } elseif (!headers_sent()) { - // Load URL when headers are not sent - /* - print("
");
-		debug_print_backtrace();
-		die("
URL={$URL}"); - */ - @header ("Location: ".str_replace("&", "&", $URL)); - } else { - // Output error message - include(PATH."inc/header.php"); - LOAD_TEMPLATE("redirect_url", false, str_replace("&", "&", $URL)); - include(PATH."inc/footer.php"); - } - exit(); -} -// -function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) { - global $SEC_CHARS, $URL_CHARS; - // Is the code a string? - if (!is_string($code)) { - // Abort here with backtrace - DEBUG_LOG(__FUNCTION__.": code is not string!"); - print "
";
-		debug_print_backtrace();
-		die("
"); - } // END - if - - $ARRAY = $SEC_CHARS; - - // Select smaller set of chars to replace when we e.g. want to compile URLs - if (!$full) $ARRAY = $URL_CHARS; - - // Compile constants - if ($constants) { - // BEFORE 0.2.1 : Language and data constants - // WITH 0.2.1+ : Only language constants - $code = str_replace('{--','".', str_replace('--}','."', $code)); - - // BEFORE 0.2.1 : Not used - // WITH 0.2.1+ : Data constants - $code = str_replace('{!','".', str_replace("!}", '."', $code)); - } // END - if - - // Compile QUOT and other non-HTML codes - foreach ($ARRAY['to'] as $k => $to) { - // Do the reversed thing as in inc/libs/security_functions.php - $code = str_replace($to, $ARRAY['from'][$k], $code); - } // END - foreach - - // But shall I keep simple quotes for later use? - if ($simple) $code = str_replace("\'", '{QUOT}', $code); - - // Find $content[bla][blub] entries - @preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); - - // Are some matches found? - if ((count($matches) > 0) && (count($matches[0]) > 0)) { - // Replace all matches - $matchesFound = array(); - foreach ($matches[0] as $key => $match) { - // Fuzzy look has failed by default - $fuzzyFound = false; - - // Fuzzy look on match if already found - foreach ($matchesFound as $found => $set) { - // Get test part - $test = substr($found, 0, strlen($match)); - - // Does this entry exist? - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):found={$found},match={$match},set={$set}
\n"; - if ($test == $match) { - // Match found! - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):fuzzyFound!
\n"; - $fuzzyFound = true; - break; - } // END - if - } // END - foreach - - // Skip this entry? - if ($fuzzyFound) continue; - - // Take all string elements - if ((is_string($matches[4][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key."_".$matches[4][$key]]))) { - // Replace it in the code - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):key={$key},match={$match}
\n"; - $newMatch = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $match); - $code = str_replace($match, "\".".$newMatch.".\"", $code); - $matchesFound[$key."_".$matches[4][$key]] = 1; - $matchesFound[$match] = 1; - } elseif (!isset($matchesFound[$match])) { - // Not yet replaced! - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):match={$match}
\n"; - $code = str_replace($match, "\".".$match.".\"", $code); - $matchesFound[$match] = 1; - } - } // END - foreach - } // END - if - - // Return compiled code - return $code; -} -// -/************************************************************************ - * * - * Gaenderter Sortier-Algorythmus, $array wird nach dem Array (!) * - * $a_sort sortiert: * - * * - * $array - Das 3-dimensionale Array, das paralell sortiert werden soll * - * $a_sort - Array, das die Sortiereihenfolge der ersten Elementeben * - * $primary_key - Prim.rschl.ssel aus $a_sort, nach dem sortiert wird * - * $order - Sortiereihenfolge: -1 = A-Z, 0 = keine, 1 = Z-A * - * $nums - true = Als Zahlen sortieren, false = Als Zeichen sortieren * - * * - * $a_sort muss Elemente enthalten, deren Wert Schluessel von $array * - * sind... Klingt kompliziert, suchen Sie mal mein Beispiel, dann sehen * - * Sie, dass es doch nicht so schwer ist! :-) * - * * - ************************************************************************/ -function array_pk_sort(&$array, $a_sort, $primary_key = 0, $order = -1, $nums = false) -{ - $dummy = $array; - while ($primary_key < count($a_sort)) { - foreach ($dummy[$a_sort[$primary_key]] as $key => $value) { - foreach ($dummy[$a_sort[$primary_key]] as $key2 => $value2) { - $match = false; - if (!$nums) { - // Sort byte-by-byte (also numbers will be interpreted as chars! E.g.: "9" > "10") - if (($key != $key2) && (strcmp(strtolower($dummy[$a_sort[$primary_key]][$key]), strtolower($dummy[$a_sort[$primary_key]][$key2])) == $order)) $match = true; - } elseif ($key != $key2) { - // Sort numbers (E.g.: 9 < 10) - if (($dummy[$a_sort[$primary_key]][$key] < $dummy[$a_sort[$primary_key]][$key2]) && ($order == -1)) $match = true; - if (($dummy[$a_sort[$primary_key]][$key] > $dummy[$a_sort[$primary_key]][$key2]) && ($order == 1)) $match = true; - } - - if ($match) { - // We have found two different values, so let's sort whole array - foreach ($dummy as $sort_key => $sort_val) { - $t = $dummy[$sort_key][$key]; - $dummy[$sort_key][$key] = $dummy[$sort_key][$key2]; - $dummy[$sort_key][$key2] = $t; - unset($t); - } // END - foreach - } // END - if - } // END - foreach - } // END - foreach - - // Count one up - $primary_key++; - } // END - while - - // Write back sorted array - $array = $dummy; -} -// -function ADD_SELECTION($type, $DEFAULT, $prefix="", $id="0") -{ - global $MONTH_DESCR; $OUT = ""; - if ($type == "yn") - { - // This is a yes/no selection only! - if ($id > 0) $prefix .= "[".$id."]"; - $OUT .= " \n"; - } - switch ($type) - { - case "day": // Day - for ($idx = 1; $idx < 32; $idx++) - { - $OUT .= "\n"; - } - } - else - { - // Get current year and subtract 16 (for erotic content) - $OUT .= "\n"; - $YEAR = date('Y', time()) - 16; - for ($idx = 1930; $idx <= $YEAR; $idx++) - { - $OUT .= "\n"; - } - - // Return the output - return $OUT; -} - -// -?> diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php deleted file mode 100644 index 95d03c0f6e..0000000000 --- a/inc/libs/payout_functions.php +++ /dev/null @@ -1,86 +0,0 @@ - 0) - { - // Pay this out! - $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points -FROM "._MYSQL_PREFIX."_payout_types -WHERE %s >= min_points -ORDER BY type", array($points), __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - OUTPUT_HTML("
-
".PAYOUT_NOW.":

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

".PAYOUT_NO_PAYOUT_TYPES."

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

".PAYOUT_NO_POINTS_ENTERED."

"); - } -} -// -?> diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php deleted file mode 100644 index 1d19c960a7..0000000000 --- a/inc/libs/primera_functions.php +++ /dev/null @@ -1,282 +0,0 @@ -payPrimera($PayReceiver, $PayAmount, $PayDescription); - * - * Wobei $PayReicer der Username des Empfängers bei - * Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera, - * die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen - * festgelegte kurze Beschreibung. Die Länge dieses Textes darf 100 Zeichen - * nicht überschreiten. Beispiel: - * $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - ID: 12345"); - * 3. Überprüfung des Status (Rückgabecode): - * CODE: - * if (!$status) { - * // Ein Fehler ist aufgetreten - * // Fehlerbehandlung hier einfügen... - * }else { - * // Auszahlung erfolgreich durchgeführt - * // Führen Sie hier Ihre Datenbankabfragen durch, um die Auszahlung zu - * // bestätigen... - * } - * - * Die komplette Rückgabe des Interfaces wird als assoziatives Array in der Klassen- - * variable __data gespeichert: - * __data => array("status" => Rückgabecode (PI_DONE, PI_SENDER_ERROR, ...), - * "statustext" => Status in Worten (z.B.: "Transaktion erfolgreich durchgeführt"), - * ") - * - * - * @author Andreas Schmidt - * @author Roland Haeder - * @version 1.0 - beta - * @copyright (c) 2007 by Primusportal.de - * @copyright (c) 2008 by Roland Haeder - */ -class PrimeraApi { - /** - * Fehler - Interfacebenutzer - */ - const PI_ERROR = -1; - - /** - * Statuscode für erfolgreich ausgeführte Transaktion - */ - const PI_DONE = 200; - - /** - * Fehler - User existiert nicht oder ist gesperrt - */ - const PI_RECEIVER_ERROR = 301; - - /** - * Sender-Account Fehler (User nicht existent, gesperrt, ...) - */ - const PI_SENDER_ERROR = 401; - - /** - * Betrag fehler - */ - const PI_AMOUNT_ERROR = 501; - - /** - * Zu wenig Primera - */ - const PI_TOO_LESS_PRIMERA = 502; - - /** - * User nicht aktiv oder existiert nicht - */ - const PI_USER_CHECK_ERROR = 601; - - /** - * User aktiv - */ - const PI_USER_CHECK_OK = 602; - - /** - * Primerastand erfolgreich geholt - */ - const PI_GET_PRIMERA_DONE = 701; - - /** - * URL für das Interface auf dem Primusserver: - */ - var $host = "http://www.primusportal.de"; - var $path = "/transfer.interface.2.0.php"; - - var $errno = 0; - var $err = ""; - - var $seperator = ":"; - - var $username = ""; - var $password = ""; - - var $data = array(); - - var $headers = ""; - - /** - * Konstruktor - */ - function PrimeraApi ($PPUsername, $PPPassword) { - // Set data - $this->username = $PPUsername; - $this->password = $PPPassword; - } - - /** - * Anfrage senden und Rückgabecode in Variable speichern - */ - function queryApi ( $data = array() ) { - // Base64-encode username and password hash - $data["PrimusInterface_Username"] = base64_encode($this->username); - $data["PrimusInterface_Password"] = base64_encode($this->password); - - // Send POST request - $return = POST_URL($this->host.$this->path, $data); - - // Convert the array into a full string - $returnStr = implode("\n", $return); - - // Extract the real content, strip header away - $content = explode("", $returnStr); - - // Store headers away for debugging - $this->headers = $content[0]; - - // Return the content - return $content[1]; - } - - /** - * Funktion parst die Rückgabe vom Transferskript: - */ - function parseContent ( $content ) { - $x = explode("\n", $content); - $return = array(); - foreach($x as $currentLine) { - $line_exploded = explode(":", $currentLine,2); - if (count($line_exploded) > 1) { - $return[$line_exploded[0]] = $line_exploded[1]; - } - } - return $return; - } - - /** - * @param int/string $Receiver UserID / Username des Empfängers - * @param int $Amount Betrag in ganzzahligen Primera - * @param string $Description Beschreibung (Sichtbar in Einzelauflistung) - */ - function payPrimera ($Receiver, $Amount, $Description = "") { - $valid = false; - $postData = array("PrimusInterface_Action" => "Pay", - "PrimusInterface_Receiver" => base64_encode($Receiver), - "PrimusInterface_Amount" => base64_encode($Amount), - "PrimusInterface_Description" => base64_encode($Description) ); - - $postReturn = $this->parseContent( $this->queryApi($postData) ); - - $this->data = $postReturn; - if ($postReturn["status"] == "200") { - $valid = true; - } - return $valid; - } - - /** - * Überprüft den Status eines Primus-Users - * - existiert der User - * - ist er aktiv - * @param string/int $User Userid / Username - */ - function CheckPrimusUser($User) { - $valid = false; - $postData = array("PrimusInterface_Action"=> "CheckPrimusUser", - "PrimusInterface_CheckPrimusUser" => $User); - - $postReturn = $this->parseContent( $this->queryApi($postData) ); - - $this->data = $postReturn; - - if ($postReturn["status"] == self::PI_USER_CHECK_OK) { - $valid = true; - } - return $valid; - } - - /** - * Die Funktion liefer den aktuellen Primerastand - */ - function getPrimera() { - $primera = false; - $postData = array( "PrimusInterface_Action" => "GetPrimera" ); - $postReturn = $this->parseContent( $this->queryApi($postData) ); - - $this->data = $postReturn; - if ($postReturn["status"] == self::PI_GET_PRIMERA_DONE) { - $primera = $postReturn["primera"]; - } - return $primera; - } - /** - * Getter fuer data - */ - function getData () { - return $this->data; - } -} - -// Function to test the Primera API by getting the amount. If the returned value -// is not false the API data is valid, else invalid -function PRIMERA_TEST_API () { - // Get new instance - $api = new PrimeraApi($_POST['primera_api_name'], $_POST['primera_api_md5']); - - // Was that fine? - return ($api->getPrimera() !== false); -} -// Execute the withdraw of a sponsor only! -function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { - global $_CONFIG; - - // Is the sponsor extension installed? - if (!EXT_IS_ACTIVE("sponsor")) { - // No, abort here - return false; - } elseif (!IS_SPONSOR()) { - // No sponsor, not allowed to withdraw! - return false; - } - - // Get new instance - $api = new PrimeraApi($primusNick, $userMd5); - - // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_WITHDRAW, $_COOKIE['sponsorid']))."\";"; - eval($eval); - - // Pay the Primera - return $api->payPrimera($primusNick, $amount, $purpose); -} -// Execute the payout -function PRIMERA_EXECUTE_PAYOUT ($primusNick, $userMd5, $amount) { - global $_CONFIG; - - // Get new instance - $api = new PrimeraApi($_CONFIG['primera_api_name'], $_CONFIG['primera_api_md5']); - - // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";"; - eval($eval); - - // Pay the Primera - return $api->payPrimera($primusNick, $amount, $purpose); -} -// [EOF] -?> diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php deleted file mode 100644 index 643c53f29f..0000000000 --- a/inc/libs/rallye_functions.php +++ /dev/null @@ -1,823 +0,0 @@ - 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s", - array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); - list($cpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($cpoints)) $cpoints = "0.00000"; - - // Add info line - $result_ref = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points) -VALUES ('%s','%s','%s','%s')", - array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__); - $un = true; - } // END - if - - // Ignored but for the template required refs (made before start of rallye) - $DATA['refs'] = $cnt; - - // Shall I notify this member? - if (($notify == "Y") && ($un)) { - // Load email template and send it to the user - $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); - } // END - if - } // END - while - - // Choose the right admin template - $templ = "admin_rallye_no_notify"; - if ($notify == "Y") $templ = "admin_rallye_notify"; - - // Send email to admin - SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_NOTIFY.$title, $templ, $prices, "0"); - - // Free memory - SQL_FREERESULT($result_user); -} -// -function RALLYE_ADD_PRICES($rallye,$mode="email") -{ - // Output mode - switch($mode) - { - case "email": $mode = "\n"; break; - case "html" : $mode = "
\n"; break; - } - - // Load prices - $result_prices = SQL_QUERY("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__); - if (SQL_NUMROWS($result_prices) > 0) - { - // Load prices - if ($mode == "\n") $prices = RALLYE_MEMBER_PRICES_ADDED.":".$mode."------------------------------".$mode; - $prices = ""; - while (list($level, $points, $info) = SQL_FETCHROW($result_prices)) - { - $prices .= $level.RALLYE_PRICE.": "; - if (!empty($info)) - { - $prices .= $info; - } - else - { - $prices .= $points." ".POINTS; - } - $prices .= "".$mode; - } - - // Free memory - SQL_FREERESULT($result_prices); - } - else - { - // No prices??? - $prices = RALLYE_MEMBER_NO_PRICES.$mode; - } - // Add last line for email mode - if ($mode == "\n") $prices .= "------------------------------"; - - // Return price list - return $prices; -} -// -function RALLYE_ADD_TOPUSERS($rallye,$default=0) -{ - global $_CONFIG; - // Init variable - $since = 0; - if (EXT_IS_ACTIVE("autopurge")) { - $since = $_CONFIG['ap_inactive_since']; - } // END - if - - // First check how many prices are set - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - $prices = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - // And load only limited users - $result = SQL_QUERY_ESC("SELECT DISTINCT u.userid, u.refs, u.curr_points FROM "._MYSQL_PREFIX."_rallye_users AS u -LEFT JOIN "._MYSQL_PREFIX."_refsystem AS r -ON u.userid=r.userid -WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC", - array(bigintval($rallye)), __FILE__, __LINE__); - - // Load users - $DATA = array( - 'uid' => array(), - 'ref' => array(), - 'cpoints' => array() - ); - - while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result)) - { - // Get current refs - $cnt = RALLYE_GET_REFCOUNT($uid, $refs); - - // Points of ref's - $result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN "._MYSQL_PREFIX."_user_data AS d -ON p.userid=d.userid -WHERE d.userid=%s AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= (UNIX_TIMESTAMP() - %s) -LIMIT 1", array(bigintval($uid), $_CONFIG['ref_payout'], $since), __FILE__, __LINE__); - list($refpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($refpoints)) $refpoints = 0; - - // And subtract start refs - $cnt -= $refs; - - $_uid = "---"; - // List only users with at least one ref! - if (($cnt > 0) && ($refpoints > $cpoints)) { $_uid = $uid; } else { $cnt = ""; } - - // Save values to array - $DATA['uid'][] = $_uid; - $DATA['ref'][] = $cnt; - $DATA['cpoints'][] = $cpoints; - } - - // Free memory - SQL_FREERESULT($result); - - // Sort whole array - array_pk_sort($DATA, array("ref", "cpoints"), 0, 1, true); - - // Generate table - $OUT = LOAD_TEMPLATE("guest_rallye_header", true); - $SW = 2; - for ($idx = 0; $idx < $prices; $idx++) - { - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; - if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = "---"; - // Add row - $OUT .= " -   ".($idx+1).". - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " -\n"; - $SW = 3 - $SW; - } - // Add footer - $OUT .= LOAD_TEMPLATE("guest_rallye_footer", true); - - // And finnally return the output - return $OUT; -} -// Run this function only when a new member has confirmed his email address! -function RALLYE_AUTOADD_USER($uid) -{ - global $DATA; - $ADD = ""; - - // Updated extension? - if (GET_EXT_VERSION("rallye") >= "0.2.0") { - $ADD .= ", min_users, min_prices"; - } // END - if - - // Check for an auto-add rallye - $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM "._MYSQL_PREFIX."_rallye_data WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Init variables - $min_users = 0; $min_prices = 0; - // Load data - if (GET_EXT_VERSION("rallye") >= "0.2.0") { - list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); - } else { - list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result); - } - - // Free result - SQL_FREERESULT($result); - - // Check if line is already included... - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s AND userid=%s LIMIT 1", - array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); - - // Is this user added? - if (SQL_NUMROWS($result) == 0) { - // Add userid and his ref count to table - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs) -VALUES ('%s','%s','0')", - array(bigintval($id), bigintval($uid)), __FILE__, __LINE__); - } else { - // Free memory - SQL_FREERESULT($result); - } - - if ($notify == "Y") { - // Transfer all neccessary data to the global $DATA array - $DATA['start'] = MAKE_DATETIME($start, "2"); - $DATA['end'] = MAKE_DATETIME($end , "2"); - $DATA['now_t'] = MAKE_DATETIME(time(), "2"); - $DATA['title'] = $title; - $DATA['id'] = $id; // ID for the rallye details link - $DATA['ref'] = 0; - $DATA['refs'] = GET_TOTAL_DATA($uid, "user_data", "userid", "refid", true); - - // Load prices - $prices = RALLYE_ADD_PRICES($id); - - if ($min_users == 0) { - // Rallye ends without user limitation - $DATA['min_users'] = RALLYE_END_NO_USER_LIMITATION; - } else { - // Rallye ends when X members are totally in your exchange - $DATA['min_users'] = RALLYE_END_USERS_1." ".$min_users." ".RALLYE_END_USERS_2; - } - - if ($min_prices == 0) { - // Rallye ends without user limitation - $DATA['min_prices'] = RALLYE_END_NO_PRICE_LIMITATION; - } else { - // Rallye ends when X members are totally in your exchange - $DATA['min_prices'] = RALLYE_END_PRICES_1." ".$min_prices." ".RALLYE_END_PRICES_2; - } - - // Send notification to member - $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_NOTIFY.$title, $msg); - } // END - if - } // END - if -} -// -function RALLYE_EXPIRE_RALLYES($result) -{ - global $DATA, $_CONFIG; - - // Latest online time - $since = 0; - if (EXT_IS_ACTIVE("autopurge")) { - $since = $_CONFIG['ap_inactive_since']; - } // END - if - - // Load rallye data - list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Load users array (!) with assigned prices - $prices = RALLYE_LOAD_USERS_ARRAY($id); - - // Init array - $DATA = array(); $cnt = 0; - $users = array(); - $DATA['title'] = $title; - $DATA['start'] = MAKE_DATETIME($start, "1"); - $DATA['end'] = MAKE_DATETIME($end , "1"); - $DATA['now_t'] = MAKE_DATETIME(time(), "1"); - - // Just count... - $TOTAL = 0; - foreach($prices['uid'] as $key => $uid) - { - // Check status - // active = 1: account is still confirmed - // active = 0: account is deleted or locked - $result = SQL_QUERY_ESC("SELECT COUNT(userid) AS active -FROM "._MYSQL_PREFIX."_user_data -WHERE userid=%s AND status='CONFIRMED' AND last_online >= (UNIX_TIMESTAMP() - %s) -LIMIT 1", array(bigintval($uid), $since), __FILE__, __LINE__); - list($active) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - $prices['active'][$key] = $active; - - // Allow valid and active users with at least one ref to get points - if (($uid > 0) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) - { - $TOTAL++; - } - } - - if (($TOTAL < $min_prices) || ($TOTAL == 0)) - { - // Do not end this rallye! - return; - } - - // Expire rallye - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - - // Run array through (by uid is the most important 2nd-level-array) - foreach($prices['uid'] as $key => $uid) - { - // Allow valid and active users with at least one ref to get points - if (($uid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) - { - // Transfer data to array for the mail template - $DATA['level'] = $prices['level'][$key]; - $DATA['points'] = $prices['points'][$key]; - $DATA['info'] = $prices['info'][$key]; - $DATA['ref'] = $prices['ref'][$key]; - - if ($DATA['points'] > 0) { - // Add points directly to user's account - ADD_POINTS_REFSYSTEM($uid, $DATA['points'], false, "0", false, "direct"); - } - - if ($notify == "Y") { - // Prepare infos for the mail template - if (!empty($DATA['info'])) { - // Take direct infos - $DATA['infos'] = $DATA['info']; - } else { - // Take points - $DATA['infos'] = $DATA['points']." ".POINTS; - } - - // Add suffix to template name - $template = "member_rallye_expired"; - if ($DATA['level'] == 1) { - // The winner! - $template .= "_gold"; - } elseif ($DATA['level'] == 2) { - // The vice winner! - $template .= "_silver"; - } elseif ($DATA['level'] == 3) { - // The bronce winner - $template .= "_bronce"; - } - - // Load template - $msg = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid); - SEND_EMAIL($uid, RALLYE_MEMBER_EXPIRED.": ".$DATA['level']." "._RALLYE_PRICE, $msg); - } // END - if - - // Count userid - $cnt++; - $users['uid'][$uid] = $uid; - $users['poi'][$uid] = $DATA['infos']; - } - } - - // Select template depending on notfication is switch on / off - if ($notify == "Y") { - $templ = "admin_rallye_expired"; - } elseif (is_array($users['uid'])) { - $templ = "admin_rallye_expired_no"; - $cnt = RALLYE_LOAD_USER_DATA($users); - } - - // Send mail to admin - SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0); - - // Add task - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) -VALUES ('NEW','RALLYE_EXPIRED','".RALLYE_ADMIN_EXPIRED.": %s','".RALLYE_ADMIN_EXPIRED_TEXT."',UNIX_TIMESTAMP())", - array($title), __FILE__, __LINE__); - - // All work done here... -} -// -function RALLYE_LOAD_USER_DATA($uids_array) -{ - // Implode user ids - $uid_string = implode(",", $uids_array['uid']); - - // Load users - $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s", - array($uid_string, count($uids_array)), __FILE__, __LINE__); - $ret = ""; - while (list($u, $gender, $surname, $family, $email) = SQL_FETCHROW($result)) - { - $ret .= TRANSLATE_GENDER($gender)." ".$surname." ".$family." (".$email.") - ".$uids_array['poi'][$u]."\n"; - } - - // Return result - return substr($ret, 0, -1); -} -// -function RALLYE_LOAD_PRICES_ARRAY($rallye) -{ - // Init multi array - $prices = array( - 'level' => array(), - 'points' => array(), - 'info' => array() - ); - - // Load prices - $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - while(list($level, $points, $info) = SQL_FETCHROW($result)) - { - $prices['level'][] = $level; - $prices['points'][] = $points; - $prices['info'][] = $info; - } - - // Free memory - SQL_FREERESULT($result); - - // Return array - return $prices; -} -// -function RALLYE_LOAD_USERS_ARRAY($rallye) -{ - global $_CONFIG; - - // Fix zero points to 0.00000 - if ($_CONFIG['ref_payout'] == "0") $_CONFIG['ref_payout'] = "0.00000"; - - // Init multi array - $users = array( - 'uid' => array(), - 'ref' => array(), - 'cpoints' => array(), - ); - - // Load users uid old points earned - $result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s ORDER BY userid", - array(bigintval($rallye)), __FILE__, __LINE__); - while(list($uid, $refs, $cpoints) = SQL_FETCHROW($result_user)) - { - // Load current ref count - $cnt = RALLYE_GET_REFCOUNT($uid, $refs); - - // Points of ref's - $result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(p.points) -FROM "._MYSQL_PREFIX."_user_points AS p -LEFT JOIN "._MYSQL_PREFIX."_user_data AS d -ON p.userid=d.userid -WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s", - array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); - list($refpoints) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - - if (empty($refpoints)) $refpoints = 0; - - // Store calculated new refs to array - $users['uid'][] = $uid; - $users['ref'][] = abs($cnt - $refs); - $users['cpoints'][] = $refpoints - $cpoints; - } - - // Free memory - SQL_FREERESULT($result_user); - - // Sort array for refs (descending) - array_pk_sort($users, array("ref", "cpoints"), 0, 1, true); - - // Load prices array (!) - $prices = RALLYE_LOAD_PRICES_ARRAY($rallye); - - // Merge users into prices - foreach ($prices['level'] as $k => $lvl) - { - $prices['uid'][$k] = $users['uid'][$k]; - if (empty($prices['uid'][$k])) $prices['uid'][$k] = "---"; - $prices['ref'][$k] = $users['ref'][$k]; - if (empty($prices['ref'][$k])) $prices['ref'][$k] = "---"; - $prices['cpoints'][$k] = $users['cpoints'][$k]; - } - - // Return completed array - return $prices; -} -// -function RALLYE_LIST_WINNERS($rallye,$default=0) -{ - // First check how many prices are set - $result_prices = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level", - array(bigintval($rallye)), __FILE__, __LINE__); - $prices = SQL_NUMROWS($result_prices); - SQL_FREERESULT($result_prices); - - // Load data - $DATA = RALLYE_LOAD_USERS_ARRAY($rallye); - - // Generate table - $OUT = LOAD_TEMPLATE("guest_rallye_expired_header", true); - $SW = 2; - for ($idx = 0; $idx < $prices; $idx++) - { - // Check status - // active = 1: account is still confirmed - // active = 0: account is deleted or locked - $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1", - array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__); - list($active) = SQL_FETCHROW($result_active); - SQL_FREERESULT($result_active); - - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; - if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == "0") || (empty($DATA['cpoints'][$idx]))) - { - // Allow valid and active users with at least one ref to get points - $DATA['ref'][$idx] = "---"; - $DATA['uid'][$idx] = "---"; - } - if (!empty($DATA['info'][$idx])) - { - // Take direct infos - $DATA['infos'][$idx] = $DATA['info'][$idx]; - } - else - { - // Take ppints - $DATA['infos'][$idx] = $DATA['points'][$idx]." ".POINTS; - } - - // Add row - $ADD = ""; - $OUT .= " -   ".($idx+1).". - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['uid'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['ref'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " - "; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= $DATA['infos'][$idx]; - if (($DATA['uid'][$idx] == $default) && ($default > 0)) $OUT .= ""; - $OUT .= " -\n"; - $SW = 3 - $SW; - } - // Add footer - $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true); - - // And finnally return the output - return $OUT; -} -// -function RALLYE_DELETE_EXPIRED_RALLYES() -{ - global $DATA, $_CONFIG; - // Check for expired rallyes - $EXPIRE = $_CONFIG['one_day'] * 3; // @TODO The hard-coded value... - $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time -FROM "._MYSQL_PREFIX."_rallye_data -WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", - array($EXPIRE), __FILE__, __LINE__); - - if (SQL_NUMROWS($result_rallye) > 0) - { - // Expire found rallyes and notify admin - while(list($id, $title, $start, $end) = SQL_FETCHROW($result_rallye)) - { - // Prepare data for mail template - $DATA['title'] = $title; - $DATA['start'] = MAKE_DATETIME($start, "1"); - $DATA['end'] = MAKE_DATETIME($end , "1"); - $DATA['now_t'] = MAKE_DATETIME(time(), "1"); - - // Send mail to admin - SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0); - - // Purge whole rallye - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - } - - // Add task - $result_task = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created) -VALUES ('NEW','RALLYE_PURGED','".RALLYE_ADMIN_PURGED.": %s','".RALLYE_ADMIN_PURGED_TEXT."',UNIX_TIMESTAMP())", - array($title), __FILE__, __LINE__); - } - - // Free memory - SQL_FREERESULT($result_rallye); -} -// -function RALLYE_TEMPLATE_SELECTION($name="template", $default="") -{ - // Check templates directory - $OUT = ""; $ral = array(); - $BASE = sprintf("%stemplates/%s/html/rallye/", PATH, GET_LANGUAGE()); - $dir = opendir($BASE); - while ($read = readdir($dir)) - { - // If it is no dir (so a file) - if (!is_dir($BASE.$read)) - { - // Accept only templates matching with rallye_????.tpl.xx - if (eregi("^rallye_.*\.tpl", $read)) - { - $read = substr($read, 7, strpos($read, ".") - 7); - // Accept only template names between 1 and 255 chars length - if ((strlen($read) < 256) && (!empty($read))) $ral[] = $read; - } - } - } - closedir($dir); - - // Do we have found templates which we can link with the new rallye? - if (!empty($ral[0])) - { - // Generate selection box for all found templates - $OUT = "\n"; - } - else - { - // No rallye templates found - $OUT = RALLYE_NO_TEMPLATES_FOUND; - } - - // Return selection - return $OUT; -} -// -function RALLYE_GET_REFCOUNT($uid, $old=0) -{ - global $_CONFIG, $cacheArray; - // Check current refs - if (GET_EXT_VERSION("cache") >= "0.1.2") - { - // Get refs from cache - $cnt = 0; - foreach ($cacheArray['ref_system']['userid'] as $id => $u_id) - { - if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 0)) - { - foreach ($cacheArray['ref_depths']['level'] as $level) - { - if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 0)) - { - // Level does exist so abort here - $cnt = $cacheArray['ref_system']['counter'][$id]; - //* DEBUG: */ echo "*".$uid."/".$cnt."*
"; - break; - } - elseif ($level > 0) - { - // Not interesting here... - break; - } - } - // Abort also here! - if ($cnt > 0) break; - } - } - //* DEBUG: */ echo "
";
-		//* DEBUG: */ print_r($cacheArray['ref_system']);
-		//* DEBUG: */ echo "
"; - //* DEBUG: */ die(); - - if ($cnt > 0) - { - // Count cache hits - $_CONFIG['cache_hits']++; - - // Remove old refs - //* DEBUG: */ echo "+".$cnt."/".$old."+
"; - $cnt -= $old; - } - } - else - { - // Load current refs from database - $result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(s.counter) AS cnt -FROM "._MYSQL_PREFIX."_refsystem AS s -LEFT JOIN "._MYSQL_PREFIX."_refdepths AS d -ON s.level=d.level -WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FILE__, __LINE__); - list($cnt) = SQL_FETCHROW($result_ref); - SQL_FREERESULT($result_ref); - if (empty($cnt)) - { - $cnt = 0; - } - else - { - $cnt -= $old; - } - } - - // Return count - //* DEBUG: */ echo "*".$uid."/".$old."/".$cnt."*
"; - return $cnt; -} -// -?> diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php deleted file mode 100644 index 6e5c9112ba..0000000000 --- a/inc/libs/refback_functions.php +++ /dev/null @@ -1,395 +0,0 @@ -".__FUNCTION__." - ENTRY ------------------------
  • \n"; - global $DEPTH, $cacheArray; - - // Back ref depths - $cacheArray['depth'][$uid][$ref] = $DEPTH; - - // Init points - $return = $points; - - // Get all ref levels - $result_refs = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE level > 0 ORDER BY level ASC", __FILE__, __LINE__); - - // "Walk" through all level - while (list($level, $perc) = SQL_FETCHROW($result_refs)) { - // Reset ref depths - $DEPTH = -1; - - // "Walk through all refids - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$ref},level={$level},points={$points}
    \n"; - foreach (GET_REFBACK_USERID_ARRAY($uid, $level) as $refid) { - // Skip level zero or if both are the same - if ($uid == $refid) continue; - - // Get refback percents - $percents = GET_REFBACK_PERCENTS($uid, $refid); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$ref},refid={$refid},points={$points},percents={$percents}
    \n"; - - // Some percents given? - if ($percents > 0) { - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):points={$points},perc={$perc},percents={$percents},level={$level}
    \n"; - // Get points for refback - $refback = $points * ($perc / 100) * ($percents / 100); - - // Update refback table ("refid" and "uid" must be exchanged!) - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1", - array($refback, $refid, $uid), __FILE__, __LINE__); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")
    \n"; - - // Add points again, but only directly - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):refback={$refback}
    \n"; - ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct"); - - // Reduce points if refid is found - if ($refid == $ref) { - // Reduce points here! - $return = $points * ($perc / 100) - $refback; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):points={$return} - REDUCED
    \n"; - } // END - if - } // END - if - } // END foreach - } // END - while - - // Free result - SQL_FREERESULT($result_refs); - - // Restore ref depth - $DEPTH = $cacheArray['depth'][$uid][$ref]; - - // Return them - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $return; -} -// "Getter" for refback percents -function GET_REFBACK_PERCENTS ($uid, $ref) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$ref}
    \n"; - // Skip identical ids - if ($uid == $ref) return 0; - - // Default is zero - $percents = 0; - - // Get percents from database - $result = SQL_QUERY_ESC("SELECT refback FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND refid=%s LIMIT 1", - array($ref, $uid), __FILE__, __LINE__); - - // Entry found? (Should be!) - if (SQL_NUMROWS($result) == 1) { - // Fetch percents - list($percents) = SQL_FETCHROW($result); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):percents={$percents}
    \n"; - } else { - // Debug log - //* DEBUG: */ print __FUNCTION__."(".__LINE__."): NO ENTRY FOUND! :-(
    \n"; - DEBUG_LOG(__FUNCTION__.": uid={$uid},ref={$ref} - No entry found! :-("); - } - - // Free result - SQL_FREERESULT($result); - - // Return percents - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $percents; -} -// "Getter" for userid array which will return only one entry -function GET_REFBACK_USERID_ARRAY ($rid, $level) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):rid={$rid},level={$level}
    \n"; - // Init userids - $userIds = array(); - - // Look for all - $result = SQL_QUERY_ESC("SELECT userid -FROM "._MYSQL_PREFIX."_user_refs -WHERE refid=%s AND level=%s -ORDER BY userid ASC", - array($rid,$level), __FILE__, __LINE__); - - // Entries found? - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):numRows=".SQL_NUMROWS($result)."
    \n"; - if (SQL_NUMROWS($result) > 0) { - // Add all - while (list($userid) = SQL_FETCHROW($result)) { - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):rid={$rid},level={$level},userid={$userid}
    \n"; - $userIds[] = $userid; - } // END - while - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return array - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):rid={$rid},count()=".count($userIds)."
    \n"; - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $userIds; -} -// Update "refback table" -function UPDATE_REFBACK_TABLE($uid) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - global $cacheArray, $cacheInstance; - - // Make it sure referral level zero (member him-/herself) is at least selected - if (empty($cacheArray['back_level'])) $cacheArray['back_level'] = 1; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']}
    \n"; - - // Init refid - $cacheArray['up_refid'][$cacheArray['back_level']] = 0; - $old = 0; $minus = 0; - - // Check for his referral - $result_refid = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s ORDER BY userid ASC", - array(bigintval($uid)), __FILE__, __LINE__); - - // When no entry was updated then we have to create it here - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):found=".SQL_NUMROWS($result_refid)."
    \n"; - if (SQL_NUMROWS($result_refid) > 0) { - // Load all refids - while(list($cacheArray['up_refid'][$cacheArray['back_level']]) = SQL_FETCHROW($result_refid)) { - // Remmber userid - $cacheArray['up_userid'][$cacheArray['up_refid'][$cacheArray['back_level']]] = $uid; - - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$cacheArray['up_refid'][$cacheArray['back_level']]}
    \n"; - // Refid set? - if (($cacheArray['up_refid'][$cacheArray['back_level']] > 0) && ($cacheArray['up_refid'][$cacheArray['back_level']] != $uid) && (!empty($cacheArray['up_refid'][$cacheArray['back_level']]))) { - // New userid? - if ((isset($cacheArray['up_refid'][$cacheArray['back_level']-1])) && (isset($cacheArray['up_userid'][$cacheArray['up_refid'][$cacheArray['back_level']-1]]))) { - // New userid! - $old = $uid; - $uid = $cacheArray['up_userid'][$cacheArray['up_refid'][$cacheArray['back_level']-1]]; - $minus = 1; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},old={$old},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - NEW UID!
    \n"; - } // END - if - - // Check existence - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", - array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); - - // Do we have no entry? - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!
    \n"; - if (SQL_NUMROWS($result) == 0) { - // Insert this level - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - ADD!
    \n"; - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)", - array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); - - // Move to next referral level and count his counter one up! - $cacheArray['back_level']++; UPDATE_REFBACK_TABLE($cacheArray['up_refid'][($cacheArray['back_level'] - 1)]); - } // END - if - - // Do we have another level here? - if ((($cacheArray['back_level']-$minus) > 0) && ($old > 0)) { - // Restore old one - $uid = $old; - - // Shall we add this as well? - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1", - array(bigintval($uid), ($cacheArray['back_level']-$minus), bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); - - // Do we have no entry? - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!
    \n"; - if (SQL_NUMROWS($result) == 0) { - // Insert this level - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)", - array(bigintval($uid), ($cacheArray['back_level']-$minus), bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__); - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - RETURNED!
    \n"; - } // END - if - } // END - if - } // END - if - } // END - while - - // Free memory - SQL_FREERESULT($result_refid); - } // END - if - - // When he has a referral... - if ((($cacheArray['up_refid'][$cacheArray['back_level']] == $uid) || ($cacheArray['up_refid'][$cacheArray['back_level']] == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2") && (!isset($cacheArray['back_cached']))) { - // Remove cache here - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - CACHE!
    \n"; - if ($cacheInstance->cache_file("refback", true)) $cacheInstance->cache_destroy(); - $cacheArray['back_cached'] = 1; - } // END - if - - // "Walk" back here - $cacheArray['back_level']--; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']} - LEVEL!
    \n"; - - // Fix empty refid - if (!isset($cacheArray['up_refid'][$cacheArray['back_level']-1])) $cacheArray['up_refid'][$cacheArray['back_level']-1] = 0; - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']-1]} - BACK!
    \n"; - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; -} -// "Getter" for array for user refs in given level -function GET_USER_REFS ($uid, $level) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - // Default is no refs and no nickname - $ADD = ""; - $refs = array(); - - // Do we have nickname installed? - if (EXT_IS_ACTIVE("nickname")) { - $ADD = ", d.nickname"; - } // END - if - - // Get refs from database - $result = SQL_QUERY_ESC("SELECT r.id, r.refid, r.refback, r.points, d.status".$ADD." -FROM "._MYSQL_PREFIX."_user_refs AS r -LEFT JOIN "._MYSQL_PREFIX."_user_data AS d -ON r.refid=d.userid -WHERE r.userid=%s AND r.level=%s -ORDER BY r.refid ASC", - array(bigintval($uid), bigintval($level)), __FILE__, __LINE__); - - // Are there some entries? - if (SQL_NUMROWS($result) > 0) { - // Fetch all entries - while ($row = SQL_FETCHARRAY($result)) { - // Add row - $refs[$row['id']] = $row; - } // END - while - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return result - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $refs; -} -// "Getter" for refback entry -function GET_USER_REF_ENTRY ($id) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - // Default data is nothing - $data = array(); - - // Secure id number - $id = bigintval($id); - - // Get entry from database - $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM "._MYSQL_PREFIX."_user_refs WHERE id=%s AND userid=%s LIMIT 1", - array($id, $GLOBALS['userid']), __FILE__, __LINE__); - - // Is there an entry? - if (SQL_NUMROWS($result) == 1) { - // Fetch data - $data = SQL_FETCHARRAY($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return entry - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $data; -} -// Update refback percents (but with some sanity-checks! -function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) { - //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; - // Default status is failed - $status['message'] = MEMBER_REFBACK_ERROR_GENERAL; - - // Do some sanity-checks - if (!IS_MEMBER()) { - // No member! - $status['message'] = MEMBER_REFBACK_ERROR_NO_MEMBER; - return $status; - } elseif ("".$id."" != "".bigintval($id)."") { - // No number! - $status['message'] = MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER; - return $status; - } elseif (($percents < 0) || ($percents > 100)) { - // Percentage is not valid! - $status['message'] = MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE; - return $status; - } - - // Get ref entry - $dummy = GET_USER_REF_ENTRY($id); - - // Is this valid? - if (count($dummy) == 0) { - // ID does not belong to user! - $status['message'] = MEMBER_REFBACK_ERROR_ID_MISMATCH; - return $status; - } // END - if - - // Revert german commata - $percents = REVERT_COMMA($percents); - - // Update entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET refback='%s' WHERE id=%s AND userid=%s LIMIT 1", - array($percents, $id, $GLOBALS['userid']), __FILE__, __LINE__); - - // Entry updated? - if (SQL_AFFECTEDROWS() < 1) { - // Entry not updated! - $status['message'] = MEMBER_REFBACK_ERROR_NOT_UPDATED;; - return $status; - } // END - if - - // Prepare email content - $content = array( - 'percents' => TRANSLATE_COMMA($percents), - 'refid' => $dummy['refid'], - 'level' => $dummy['level'] - ); - - // Load member email template - $mail = LOAD_EMAIL_TEMPLATE("member_refback", $content, $GLOBALS['userid']); - - // Send email to user - SEND_EMAIL($dummy['refid'], MEMBER_REFBACK_SUBJECT, $mail); - - // Send admin notification - SEND_ADMIN_NOTIFICATION(ADMIN_REFBACK_SUBJECT, "admin_refback", $content, $GLOBALS['userid']); - - // All fine! - $status['ok'] = true; - - // Return status array - //* DEBUG: */ print "
----------------------- ".__FUNCTION__." - EXIT ------------------------
\n"; - return $status; -} -// -?> diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php deleted file mode 100644 index 7a74af6a32..0000000000 --- a/inc/libs/register_functions.php +++ /dev/null @@ -1,169 +0,0 @@ - (*)"; - $eval = "define('MUST_".strtoupper($name)."', \"".$value."\");"; - eval($eval); - } - - // Free memory - SQL_FREERESULT($result); - - // Also fill other constants - define('MUST_GENDER', " (*)"); - define('MUST_ADDY' , " (*)"); - define('MUST_BIRTH' , " (*)"); - define('MUST_MARKER', " (*)"); -} -// -function REGISTER_CHECK_REQUIRED_FIELDS(&$array) -{ - $ret = false; - foreach ($array as $key => $value) - { - $result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // "Must-line" found - list($chk) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - - // Check if extension country is not found (you have to enter the 2-chars long country code) or - // if extensions is present check if country code was selected - // 01 2 21 12 3 32 234 5 54 4 43 34 4 4 5 5432 2 3 3210 - $country = ((!EXT_IS_ACTIVE("country")) || ((EXT_IS_ACTIVE("country")) && (((empty($value)) && ($key == "cntry")) || (($key == "country_code") && (!empty($value)))) && (!empty($array['country_code'])))); - if ((empty($value)) && ($chk == "Y") && (!$country)) - { - // Required field not set - $array[$key] = "!"; - $ret = true; - } - } - } - return $ret; -} -// -function REGISTER_OUTPUT_REQUIRE_CHECK(&$array) -{ - $result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__); - while(list($name, $required) = SQL_FETCHROW($result)) - { - if (($array[$name] == "!") && ($required == "Y")) - { - // Empty entry found - $array[$name] = ""; - $eval = "\$OUT = REGISTER_".strtoupper($name)."_REQUIRED;"; - eval($eval); - OUTPUT_HTML("".$OUT."

"); - } - } - - // Free memory - SQL_FREERESULT($result); -} -// -function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) -{ - global $_POST, $_CONFIG; - $OUT = ""; - - // Guests are mostly not interested in how many members has - // choosen an individual category - $AND = "WHERE visible='Y' "; - // Admins are allowed to see every category... - if (IS_ADMIN()) $AND = ""; - $result = SQL_QUERY("SELECT id, cat, visible FROM "._MYSQL_PREFIX."_cats ".$AND." ORDER BY sort", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) - { - // List alle visible modules (or all to the admin) - $SW = 2; - $OUT .= "\n"; - while (list($id, $cat, $visible) = SQL_FETCHROW($result)) - { - if (empty($_POST['cat'][$id])) $_POST['cat'][$id] = ""; - // Prepare array for the template - $content = array( - 'sw' => $SW, - 'cat' => $cat, - 'def_y' => "", - 'def_n' => "", - 'id' => $id, - ); - - if (($_POST['cat'][$id] == "Y") || (($_CONFIG['register_default'] == "Y") && (empty($_POST['cat'][$id])))) { - $content['def_y'] = " checked=\"checked\""; - } else { - $content['def_n'] = " checked=\"checked\""; - } - - // Load template and switch color - $OUT .= LOAD_TEMPLATE("guest_cat_row", true, $content); - $SW = 3 - $SW; - } - $OUT .= "
\n"; - - // Free memory - SQL_FREERESULT($result); - } - else - { - // No categories setted up so far... - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, NO_CATEGORIES_VISIBLE); - } - - if ($return) - { - // Return generated HTML code - return $OUT; - } - else - { - // Output directly (default) - OUTPUT_HTML($OUT); - } -} -// -?> diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php deleted file mode 100644 index 8965fbdd71..0000000000 --- a/inc/libs/removeip_functions.php +++ /dev/null @@ -1,154 +0,0 @@ - diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php deleted file mode 100644 index 13f9a3b486..0000000000 --- a/inc/libs/rewrite_functions.php +++ /dev/null @@ -1,123 +0,0 @@ -to replacements - $REPLACE = array( - 'search' => array("u_id", "url", "page", "offset", "mid", "bid", "sub", "home"), - 'replace' => array("u" , "url", "page", "offset", "m" , "b" , "s" , "h") - ); - - if ((EXT_IS_ACTIVE("admins")) && (eregi("admin=", $test))) - { - // Replace &admin= with "/aid/" - $REPLACE['search'][] = "admin"; - $REPLACE['replace'][] = "aid"; - } - - // Replace all array elements through - foreach ($REPLACE['search'] as $k => $v) - { - if (eregi("$v=", $test)) - { - // Replace &u_id= with /u/ - $test = preg_replace("/&".$v."=/i", "/".$REPLACE['replace'][$k]."/", $test); - } - } - - // Repair missed &what=??? entries - while (preg_match("/&what=(.*)\/(.*)\/(.*)/i", $test)) - { - $test = preg_replace("/&what=(.*)\/(.*)\/(.*)/i", "/wht/\$1/\$2/\$3", $test); - } - - // Return rewritten code - return $test; -} -// -?> diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php deleted file mode 100644 index 0f34c42e88..0000000000 --- a/inc/libs/security_functions.php +++ /dev/null @@ -1,228 +0,0 @@ - array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"), - // ... and we will replace to. - 'to' => array( - "{OPEN_ANCHOR2}", - "{CLOSE_ANCHOR2}", - "{SLASH}", - "{DOT}", - '{QUOT}', - "{DOLLAR}", - "{OPEN_ANCHOR}", - "{CLOSE_ANCHOR}", - "{OPEN_TEMPLATE}", - "{CLOSE_TEMPLATE}", - "{PER}", - "{SEMI}", - "{OPEN_INDEX}", - "{CLOSE_INDEX}", - "{DBL_DOT}", - "{COMMENT}" - ), -); - -// Characters allowed in URLs -// -// Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be -// rejected because of the {SLASH}, {DOT} and all below listed items inside the URL. -$URL_CHARS = array( - // Search for these secured characters - 'to' => array("{SLASH}", "{DOT}", "{PER}", "{DBL_DOT}", "{COMMENT}"), - // Replace with these characters - 'from' => array("/", ".", "%", ":", "--") -); - -// Overworked security part: -if (is_array($_GET)) { - foreach ($_GET as $seckey => $secvalue) { - if (is_array($secvalue)) { - // Throw arrays away... - unset($_GET[$seckey]); - } else { - // Only variables are allowed (non-array) but we secure them all! - foreach ($SEC_CHARS['from'] as $key => $char) { - // Pass all through - $_GET[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_GET[$seckey]); - } - - // Strip all other out - $_GET[$seckey] = strip_tags($_GET[$seckey]); - } - } -} - -if (basename($_SERVER['PHP_SELF']) != "install.php") { - // And POST data - foreach ($_POST as $seckey => $secvalue) { - if (!is_array($secvalue)) { - // Only variables are allowed (non-array) to be secured... - foreach ($SEC_CHARS['from'] as $key => $char) { - // Pass all through - $_POST[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_POST[$seckey]); - } - - // Strip all other out - $_POST[$seckey] = strip_tags($_POST[$seckey]); - } - } - - // ... and finally cookies - foreach ($_COOKIE as $seckey => $secvalue) { - if (is_array($secvalue)) { - // Throw arrays away... - unset($_COOKIE[$seckey]); - } else { - // Only variables are allowed (non-array) but we secure them all! - foreach ($SEC_CHARS['from'] as $key => $char) { - // Pass all through - $_COOKIE[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]); - } - - // Strip all other out - $_COOKIE[$seckey] = strip_tags($_COOKIE[$seckey]); - } - } -} - -// Activate caching or transparent compressing when it is not already done -if (!defined('_OB_CACHING')) { - if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) { - if ((extension_loaded('zlib')) && (function_exists('ob_start'))) { - // Start caching - define('_OB_CACHING', "on"); - ob_start(); - } else { - // Extension not loaded or required function is missing - define('_OB_CACHING', "404"); - } - } else { - // Old PHP version - define('_OB_CACHING', "old"); - } -} - -// At last secure the $_SERVER['PHP_SELF'] element -$_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']); - -// Split it up into path and filename -$SELF_DIR = dirname($_SERVER['PHP_SELF']); -$SELF_FILE = basename($_SERVER['PHP_SELF']); - -// Check for a .php inside the $SELF_DIR... -while (ereg(".php", $SELF_DIR)) { - // Correct the dirname - $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, ".php") + 4)); - // Rewrite filename... - $SELF_FILE = basename($SELF_DIR); - // ... and dirname - $SELF_DIR = dirname($SELF_DIR); -} - -// Put both together again and let's pray it is secured now... -$_SERVER['PHP_SELF'] = $SELF_DIR."/".$SELF_FILE; - -// Remove uneccessary variables -unset($SELF_DIR); -unset($SELF_FILE); - -// Security system loaded... -define('__SECURITY', "1"); - -// -?> diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php deleted file mode 100644 index 3d2f171611..0000000000 --- a/inc/libs/sponsor_functions.php +++ /dev/null @@ -1,633 +0,0 @@ - array(), - 'values' => array() - ); - - // Check if sponsor already exists - foreach ($POST as $k => $v) - { - if (!(array_search($k, $SKIPPED) > -1)) - { - // Check only posted input entries not the submit button - switch ($k) - { - case "email": - $ALREADY = false; - if (!VALIDATE_EMAIL($v)) - { - // Email address is not valid - $SAVE = false; - } - else - { - // Do we want to add a new sponsor or update his data? - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE email='%s' LIMIT 1", - array($POST['email']), __FILE__, __LINE__); - - // Is a sponsor alread in the db? - if (SQL_NUMROWS($result) == 1) - { - // Free memory - SQL_FREERESULT($result); - - // Yes, he is! - if (($_GET['what'] == "add_sponsor") || ($NO_UPDATE)) - { - // Already found! - $ALREADY = true; - } - else - { - // Update his data - $UPDATE = true; - } - } - } - break; - - case "pass1": - $k = ""; $v = ""; - break; - - case "pass2": - $k = "password"; $v = md5($v); - break; - - case "url": - if (!VALIDATE_URL($v)) $SAVE = false; - break; - - default: - // Test if there is are time selections - $TEST = substr($k, -3); - if ((($TEST == "_ye") || ($TEST == "_mo") || ($TEST == "_we") || ($TEST == "_da") || ($TEST == "_ho") || ($TEST == "_mi") || ($TEST == "_se")) && (!empty($v))) - { - // Found a multi-selection for timings? - $TEST = substr($k, 0, -3); - if ((!empty($POST[$TEST."_ye"])) && (!empty($POST[$TEST."_mo"])) && (!empty($POST[$TEST."_we"])) && (!empty($POST[$TEST."_da"])) && (!empty($POST[$TEST."_ho"])) && (!empty($POST[$TEST."_mi"])) && (!empty($POST[$TEST."_se"])) && ($TEST != $TEST2)) - { - // Generate timestamp - $POST[$TEST] = CREATE_TIMESTAMP_FROM_SELECTIONS($TEST, $POST); - $DATA['keys'][] = $TEST; - $DATA['values'][] = $POST[$TEST]; - - // Remove data from array - unset($POST[$TEST."_ye"]); - unset($POST[$TEST."_mo"]); - unset($POST[$TEST."_we"]); - unset($POST[$TEST."_da"]); - unset($POST[$TEST."_ho"]); - unset($POST[$TEST."_mi"]); - unset($POST[$TEST."_se"]); - - // Skip adding - $k = ""; $skip = true; $TEST2 = $TEST; - } - } - else - { - $skip = false; $TEST2 = ""; - } - break; - } - - if ((!empty($k)) && ($skip == false)) - { - // Add data - $DATA['keys'][] = $k; $DATA['values'][] = $v; - } - } - } - - // Save sponsor? - if ($SAVE) - { - // Default is no force even when a guest want to abuse this force switch - if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0; - - // SQL and message string is empty by default - $SQL = ""; $MSG = ""; - - // Update? - if ($UPDATE) - { - // Update his data - $SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET "; - foreach ($DATA['keys'] as $k => $v) - { - $SQL .= $v."='%s', "; - } - - // Remove last ", " from SQL string - $SQL = substr($SQL, 0, -2)." WHERE id='%s' LIMIT 1"; - $DATA['values'][] = bigintval($_GET['id']); - - // Generate message - $MSG = SPONSOR_SET_MESSAGE(ADMIN_SPONSOR_UPDATED, "updated", $MSGs); - $ret = "updated"; - } - elseif ((!$ALREADY) || (($POST['force'] == "1") && (IS_ADMIN()))) - { - // Add new sponsor, first add more data - $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time(); - $DATA['keys'][] = "status"; - if ((!$NO_UPDATE) && (IS_ADMIN()) && ($_GET['what'] == "add_sponsor")) - { - // Only allowed for admin - $DATA['values'][] = "PENDING"; - } - else - { - // Guest area - $DATA['values'][] = "UNCONFIRMED"; - - // Generate hash code - $DATA['keys'][] = "hash"; - $DATA['values'][] = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time()); - $DATA['keys'][] = "remote_addr"; - $DATA['values'][] = GET_REMOTE_ADDR(); - } - - // Implode all data into strings - $KEYS = implode(", " , $DATA['keys']); - $VALUES = str_repeat("%s', '", count($DATA['values']) - 1); - - // Generate string - $SQL = "INSERT INTO "._MYSQL_PREFIX."_sponsor_data (".$KEYS.") VALUES('".$VALUES."%s')"; - - // Generate message - $MSG = SPONSOR_SET_MESSAGE(ADMIN_SPONSOR_ADDED, "added", $MSGs); - $ret = "added"; - } - elseif ((!$NO_UPDATE) && (IS_ADMIN())) - { - // Add all data as hidden data - $OUT = ""; - foreach ($POST as $k => $v) - { - // Do not add 'force' ! - if ($k != "force") - { - $OUT .= "\n"; - } - } - define('__HIDDEN_DATA', $OUT); - define('__EMAIL' , $POST['email']); - - // Ask for adding a sponsor with same email address - LOAD_TEMPLATE("admin_add_sponsor_already"); - return; - } - else - { - // Already added! - $MSG = SPONSOR_ALREADY_FOUND_1.$POST['email'].SPONSOR_ALREADY_FOUND_2; - $ret = "already"; - } - - if (!empty($SQL)) - { - // Run SQL command - $result = SQL_QUERY_ESC($SQL, $DATA['values'], __FILE__, __LINE__); - } - - // Output message - if ((!$NO_UPDATE) && (IS_ADMIN())) - { - LOAD_TEMPLATE("admin_settings_saved", false, $MSG); - } - } - else - { - // Error found! - $MSG = SPONSOR_SET_MESSAGE(SPONSOR_DATA_NOT_SAVED, "failed", $MSGs); - LOAD_TEMPLATE("admin_settings_saved", false, $MSG); - } - - // Shall we return the status? - if ($RET_STATUS) return $ret; -} -// -function SPONSOR_TRANSLATE_STATUS($status) -{ - switch ($status) - { - case "UNCONFIRMED": - $ret = ACCOUNT_UNCONFIRMED; - break; - - case "CONFIRMED": - $ret = ACCOUNT_CONFIRMED; - break; - - case "LOCKED": - $ret = ACCOUNT_LOCKED; - break; - - case "PENDING": - $ret = ACCOUNT_PENDING; - break; - - case "EMAIL": - $ret = ACCOUNT_EMAIL; - break; - - default: - $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; - break; - } - return $ret; -} -// Search for an email address in the database -function SPONSOR_FOUND_EMAIL_DB($email) -{ - // Default status is failed (as it is always be...) - $ret = false; - - // Check for email (and secure input) - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE email='%s' LIMIT 1", - array($email), __FILE__, __LINE__); - - // Do we already have the provided email address in our DB? - if (SQL_NUMROWS($result) == 1) $ret = true; - - // Return result - return $ret; -} -// -function SPONSOR_SET_MESSAGE($msg, $pos, $array) -{ - // Check if the requested message was found in array - if (isset($array[$pos])) - { - // ... if yes then use it! - $ret = $array[$pos]; - } - else - { - // ... else use default message - $ret = $msg; - } - - // Return result - return $ret; -} -// -function IS_SPONSOR() -{ - global $_COOKIE; - // Failed... - $ret = false; - if ((!empty($_COOKIE['sponsorid'])) && (!empty($_COOKIE['sponsorpass']))) - { - // Check cookies against database records... - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_sponsor_data -WHERE id='%s' AND password='%s' AND status='CONFIRMED' LIMIT 1", - array(bigintval($_COOKIE['sponsorid']), $_COOKIE['sponsorpass']), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // All is fine - $ret = true; - } - - // Free memory - SQL_FREERESULT($result); - } - - // Return status - return $ret; -} -// -function GENERATE_SPONSOR_MENU($current) -{ - $OUT = ""; - $WHERE = " AND active='Y'"; - if (IS_ADMIN()) $WHERE = ""; - - // Load main menu entries - $result_main = SQL_QUERY("SELECT action, title FROM "._MYSQL_PREFIX."_sponsor_menu -WHERE (what='' OR what IS NULL) ".$WHERE." -ORDER BY sort", __FILE__, __LINE__); - if (SQL_NUMROWS($result_main) > 0) - { - // Load every menu and it's sub menus - while(list($action, $title_main) = SQL_FETCHROW($result_main)) - { - // Load sub menus - $result_sub = SQL_QUERY_ESC("SELECT what, title FROM "._MYSQL_PREFIX."_sponsor_menu -WHERE action='%s' AND what != '' AND what IS NOT NULL ".$WHERE." -ORDER BY sort", array($action), __FILE__, __LINE__); - if (SQL_NUMROWS($result_sub) > 0) - { - // Load sub menus - $SUB = ""; - while(list($what, $title_sub) = SQL_FETCHROW($result_sub)) - { - // Check if current selected menu is matching the loaded one - if ($current == $what) $title_sub = "".$title_sub.""; - - // Prepare data for the sub template - $content = array( - 'what' => $what, - 'title' => $title_sub - ); - - // Load row template - $SUB .= LOAD_TEMPLATE("sponsor_what", true, $content); - } - - // Prepare data for the main template - $content = array( - 'title' => $title_main, - 'menu' => $SUB - ); - - // Load menu template - $OUT .= LOAD_TEMPLATE("sponsor_action", true, $content); - } - else - { - // No sub menus active - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_SUB_MENUS_ACTIVE); - } - - // Free memory - SQL_FREERESULT($result_sub); - } - } - else - { - // No main menus active - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_MAIN_MENUS_ACTIVE); - } - - // Free memory - SQL_FREERESULT($result_main); - - // Return content - return $OUT; -} -// -function GENERATE_SPONSOR_CONTENT($what) -{ - global $_CONFIG; - $OUT = ""; - $FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what); - if (FILE_READABLE($FILE)) { - // Every sponsor action will output nothing directly. It will be written into $OUT! - require_once($FILE); - } else { - // File not found! - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_CONTENT_404_1.$what.SPONSOR_CONTENT_404_2); - } - - // Return content - return $OUT; -} -// -function UPDATE_SPONSOR_LOGIN() -{ - global $_COOKIE, $_CONFIG; - - // Check if cookies are set - if ((empty($_COOKIE['sponsorid'])) || (empty($_COOKIE['sponsorpass']))) return false; - - // Calculate cookie lifetime, maybe we have to change this so the admin can setup a - // seperate timeout for these two cookies? - $life = (time() + $_CONFIG['online_timeout']); - - // Is confirmed so both is fine and we can continue with login procedure - $login = ((setcookie("sponsorid" , bigintval($_COOKIE['sponsorid']), $life, COOKIE_PATH)) && - (setcookie("sponsorpass", $_COOKIE['sponsorpass'] , $life, COOKIE_PATH))); - - // Update database? - if ($login) - { - // Update last online timestamp - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data -SET last_online='".time()."' -WHERE id='%s' AND password='%s' LIMIT 1", - array(bigintval($_COOKIE['sponsorid']), $_COOKIE['sponsorpass']), __FILE__, __LINE__); - } - - // Return status - return $login; -} -// -function SPONSOR_SAVE_DATA($POST, $content) -{ - global $_COOKIE, $_SERVER, $_GET; - $EMAIL = false; - - // Unsecure data which we don't want - $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count', - 'points_amount', 'points_used', 'refid', 'hash', 'last_pay', 'last_curr', 'pass_old', - 'ok', 'pass1', 'pass2'); - - // Set default message ("not saved") - $MSG = SPONSOR_ACCOUNT_DATA_NOT_SAVED; - - // Check for submitted passwords - if ((!empty($_POST['pass1'])) && (!empty($_POST['pass2']))) - { - // Are both passwords the same? - if ($_POST['pass1'] == $_POST['pass2']) - { - // Okay, then set password and remove pass1 and pass2 - $_POST['password'] = md5($_POST['pass1']); - } - } - - // Remove all (maybe spoofed) unsafe data from array - foreach ($UNSAFE as $remove) - { - unset($POST[$remove]); - } - - // This array is for the submitted data which we will use with the SQL_QUERY_ESC() function to - // secure the data - $DATA = array(); - - // Prepare SQL string - $SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET"; - foreach ($POST as $key => $value) - { - // Mmmmm, too less security here??? - $SQL .= " ".strip_tags($key)."='%s',"; - - // We will secure this later inside the SQL_QUERY_ESC() function - $DATA[] = strip_tags($value); - - // Compile {SLASH} and so on for the email templates - $POST[$key] = COMPILE_CODE($value); - } - - // Check if email has changed - if ((!empty($content['email'])) && (!empty($POST['email']))) - { - if ($content['email'] != $POST['email']) - { - // Change email address - $EMAIL = true; - - // Okay, has changed then add status with UNCONFIRMED and new hash code - $SQL .= " status='EMAIL', hash='%s',"; - - // Generate hash code - $HASH = md5($_COOKIE['PHPSESSID'].":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time()); - $DATA[] = $HASH; - } - } - - // Remove last commata - $SQL = substr($SQL, 0, -1); - - // Add SQL tail data - $SQL .= " WHERE id='%s' AND password='%s' LIMIT 1"; - $DATA[] = bigintval($_COOKIE['sponsorid']); - $DATA[] = $_COOKIE['sponsorpass']; - - // Saving data was completed... ufff... - switch ($_GET['what']) - { - case "account": // Change account data - if ($EMAIL) - { - $MSG = SPONSOR_ACCOUNT_EMAIL_CHANGED; - $templ = "admin_sponsor_change_email"; - $subj = ADMIN_SPONSOR_ACC_EMAIL_SUBJ; - } - else - { - $MSG = SPONSOR_ACCOUNT_DATA_SAVED; - $templ = "admin_sponsor_change_data"; - $subj = ADMIN_SPONSOR_ACC_DATA_SUBJ; - } - break; - - case "settings": // Change settings - // Translate some data - $content['receive'] = TRANSLATE_YESNO($content['receive_warnings']); - $content['interval'] = CREATE_FANCY_TIME($content['warning_interval']); - - // Set message template and subject for admin - $MSG = SPONSOR_SETTINGS_SAVED; - $templ = "admin_sponsor_settings"; - $subj = ADMIN_SPONSOR_SETTINGS_SUBJ; - break; - - default: // Unknown sponsor what value! - $MSG = SPONSOR_UNKNOWN_WHAT_1.$_GET['what'].SPONSOR_UNKNOWN_WHAT_2; - $templ = ""; $subj = ""; - break; - } - - if (SQL_AFFECTEDROWS() == 1) - { - if (!empty($templ) && !empty($subj)) - { - // Run SQL command and check for success - $result = SQL_QUERY_ESC($SQL, $DATA, __FILE__, __LINE__); - - // Add all data to content - global $DATA; - $DATA = $POST; - - // Change some data - if (isset($content['gender'])) $content['gender'] = TRANSLATE_GENDER($content['gender']); - if (isset($DATA['gender'])) $DATA['gender'] = TRANSLATE_GENDER($DATA['gender']); - if (isset($content['receive_warnings'])) $DATA['receive'] = TRANSLATE_YESNO($POST['receive_warnings']); - if (isset($content['warning_interval'])) $DATA['interval'] = CREATE_FANCY_TIME($POST['warning_interval']); - - // Send email to admins - SEND_ADMIN_NOTIFICATION($subj, $templ, $content); - - // Shall we send mail to the sponsor's new email address? - if ($content['receive_warnings'] == "Y") - { - // Okay send email with confirmation link to new address and with no confirmation link - // to the old address - - // First to old address - switch ($_GET['what']) - { - case "account": // Change account data - $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content); - SEND_EMAIL($content['email'], SPONSOR_ACC_DATA_SUBJ, $email_msg); - - if ($EMAIL) - { - // Add hash code to content array - $content['hash'] = $HASH; - - // Second mail goes to the new address - $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content); - SEND_EMAIL($content['email'], SPONSOR_ACC_EMAIL_SUBJ, $email_msg); - } - break; - - case "settings": // Change settings - // Send email - $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content); - SEND_EMAIL($content['email'], SPONSOR_SETTINGS_SUBJ, $email_msg); - break; - } - } - } - } - - // Return final message - return $MSG; -} -// -?> diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php deleted file mode 100644 index f83d4fac91..0000000000 --- a/inc/libs/surfbar_functions.php +++ /dev/null @@ -1,1465 +0,0 @@ - $dummy) { - // Test all ids through (ignores failed) - $done = (($done) && (SURFBAR_CHANGE_STATUS($id, "PENDING", "ACTIVE"))); - } // END - if - - // Return total status - return $done; -} -// Admin function for rejecting URLs -function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { - // Is this an admin or invalid array? - if (!IS_ADMIN()) { - // Not admin or invalid IDs array - return false; - } elseif (!is_array($IDs)) { - // No array - return false; - } elseif (count($IDs) == 0) { - // Empty array - return false; - } - - // Set to true to make AND expression valid if first URL got unlocked - $done = true; - - // Update the status for all ids - foreach ($IDs as $id => $dummy) { - // Test all ids through (ignores failed) - $done = (($done) && (SURFBAR_CHANGE_STATUS($id, "PENDING", "REJECTED"))); - } // END - if - - // Return total status - return $done; -} -// -// ----------------------------------------------------------------------------- -// Member functions -// ----------------------------------------------------------------------------- -// -// Member has added an URL -function SURFBAR_MEMBER_ADD_URL ($url, $limit) { - global $_CONFIG; - - // Do some pre-checks - if (!IS_MEMBER()) { - // Not a member - return false; - } elseif (!VALIDATE_URL($url)) { - // URL invalid - return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, $GLOBALS['userid'])) { - // URL already found in surfbar! - return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($GLOBALS['userid'])) { - // No more allowed! - return false; - } elseif ("".bigintval($limit)."" != "".$limit."") { - // Invalid amount entered - return false; - } - - // Register the new URL - return SURFBAR_REGISTER_URL($url, $GLOBALS['userid'], "PENDING", "reg", $limit); -} -// Create list of actions depending on status for the user -function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { - // Load all actions in an array for given status - $actionArray = SURFBAR_GET_ACTION_ARRAY($status); - - // Init HTML code - $OUT = " -\n"; - - // Calculate width - $width = round(100 / count($actionArray)); - - // "Walk" through all actions and create forms - foreach ($actionArray as $actionId=>$action) { - // Add form for this action - $OUT .= sprintf(" \n", - $width, - bigintval($urlId), - strtolower($action), - strtoupper($action), - strtoupper($action) - ); - } // END - foreach - - // Close table - $OUT .= " -
-
- - - -
-
\n"; - - // Return code - return $OUT; -} -// Do the member form request -function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { - global $SURFBAR_CACHE; - - // By default no action is performed - $performed = false; - - // Is this a member? - if (!IS_MEMBER()) { - // No member! - return false; - } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) { - // Important form elements are missing! - return false; - } elseif (!isset($URLs[$formData['id']])) { - // ID not found in cache - return false; - } elseif (!SURFBAR_VALIDATE_MEMBER_ACTION_STATUS($formData['action'], $URLs[$formData['id']]['status'])) { - // Action not allowed for current URL status - return false; - } - - // Create the function name for selected action - $functionName = sprintf("SURFBAR_MEMBER_%s_ACTION", strtoupper(SQL_ESCAPE($formData['action']))); - - // Is the function there? - if (function_exists($functionName)) { - // Add new status - $URLs[$formData['id']]['new_status'] = $SURFBAR_CACHE['new_status']; - - // Extract URL data for call-back - $urlData = array($URLs[$formData['id']]); - - // Action found so execute it - $performed = call_user_func_array($functionName, $urlData); - } else { - // Log invalid request - DEBUG_LOG(__FUNCTION__.": action={$formData['action']},id={$formData['id']},function={$functionName}"); - } - - // Return status - return $performed; -} -// Validate if the requested action can be performed on current URL status -function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) { - global $SURFBAR_CACHE; - - // Search for the requested action/status combination in database - $result = SQL_QUERY_ESC("SELECT new_status FROM "._MYSQL_PREFIX."_surfbar_actions WHERE action='%s' AND status='%s' LIMIT 1", - array($action, $status), __FILE__, __LINE__); - - // Is the entry there? - $isValid = (SQL_NUMROWS($result) == 1); - - // Fetch the new status if found - if ($isValid) { - list($SURFBAR_CACHE['new_status']) = SQL_FETCHROW($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return status - return $isValid; -} -// -// ----------------------------------------------------------------------------- -// Member actions -// ----------------------------------------------------------------------------- -// -// Retreat an URL -function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) { - // Create the data array for next function call - $data = array( - $urlData['id'] => $urlData - ); - - // Simply change the status here - return SURFBAR_CHANGE_STATUS ($urlData['id'], $urlData['status'], $urlData['new_status'], $data); -} -// Book an URL now (from migration) -function SURFBAR_MEMBER_BOOKNOW_ACTION ($urlData) { - // Create the data array for next function call - $data = array( - $urlData['id'] => $urlData - ); - - // Simply change the status here - return SURFBAR_CHANGE_STATUS ($urlData['id'], $urlData['status'], $urlData['new_status'], $data); -} -// -// ----------------------------------------------------------------------------- -// Self-maintenance functions -// ----------------------------------------------------------------------------- -// -// Main function -function SURFBAR_HANDLE_SELF_MAINTENANCE () { - // Handle URLs which limit has depleted so we can stop them - SURFBAR_HANDLE_DEPLETED_VIEWS(); - - // Handle low-points amounts - SURFBAR_HANDLE_LOW_POINTS(); -} -// Handle URLs which limit has depleted -function SURFBAR_HANDLE_DEPLETED_VIEWS () { - // Get all URLs - $urlArray = SURFBAR_GET_URL_DATA("0", "views_max", "id", "ASC", "id", " AND views_allowed>0 AND status='ACTIVE'"); - - // Do we have some entries? - if (count($urlArray) > 0) { - // Then handle all! - foreach ($urlArray as $id => $urlData) { - // Backup data - $data = $urlData; - - // Rewrite array for next call - $urlData[$id] = $data; - - // Handle the status - SURFBAR_CHANGE_STATUS($id, "ACTIVE", "DEPLETED", $urlData); - } // END - foreach - } // END - if -} -// Alert users which have URLs booked and are low on points amount -function SURFBAR_HANDLE_LOW_POINTS () { - global $_CONFIG; - - // Get all userids - $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS($_CONFIG['surfbar_warn_low_points']); - - // "Walk" through all URLs - foreach ($UIDs['uid'] as $uid => $dummy) { - // Is the last notification far enougth away to notify again? - if ((time() - $UIDs['notified'][$uid]) >= $_CONFIG['surfbar_low_interval']) { - // Prepare content - $content = array( - 'uid' => $uid, - 'low' => TRANSLATE_COMMA($_CONFIG['surfbar_warn_low_points']), - 'points' => TRANSLATE_COMMA($UIDs['points'][$uid]), - 'notified' => MAKE_DATETIME($UIDs['notified'][$uid]), - 'interval' => CREATE_FANCY_TIME($_CONFIG['surfbar_low_interval']) - ); - - // Notify this user - SURFBAR_NOTIFY_USER("low_points", $content); - - // Update last notified - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1", - array($uid), __FILE__, __LINE__); - } // END - if - } // END - foreach -} -// -// ----------------------------------------------------------------------------- -// Generic functions -// ----------------------------------------------------------------------------- -// -// Looks up by an URL -function SURFBAR_LOOKUP_BY_URL ($url, $uid) { - // Now lookup that given URL by itself - $urlArray = SURFBAR_GET_URL_DATA($url, "url", "id", "ASC", "id", sprintf(" AND userid=%s", bigintval($uid))); - - // Was it found? - return (count($urlArray) > 0); -} -// Load URL data by given search term and column -function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add="") { - global $lastUrlData; - - // By default nothing is found - $lastUrlData = array(); - - // Is the column an id number? - if (($column == "id") || ($column == "userid")) { - // Extra secure input - $searchTerm = bigintval($searchTerm); - } // END - if - - // If the column is "id" there can be only one entry - $limit = ""; - if ($column == "id") { - $limit = "LIMIT 1"; - } // END - if - - // Look up the record - $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason, views_max, views_allowed -FROM "._MYSQL_PREFIX."_surfbar_urls -WHERE %s='%s'".$add." -ORDER BY %s %s -%s", - array($column, $searchTerm, $order, $sort, $limit), __FILE__, __LINE__); - - // Is there at least one record? - if (SQL_NUMROWS($result) > 0) { - // Then load all! - while ($dataRow = SQL_FETCHARRAY($result)) { - // Shall we group these results? - if ($group == "id") { - // Add the row by id as index - $lastUrlData[$dataRow['id']] = $dataRow; - } else { - // Group entries - $lastUrlData[$dataRow[$group]][$dataRow['id']] = $dataRow; - } - } // END - while - } // END - if - - // Free the result - SQL_FREERESULT($result); - - // Return the result - return $lastUrlData; -} -// Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first! -function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $limit=0) { - global $_CONFIG; - - // Make sure by the user registered URLs are always pending - if ($addMode == "reg") $status = "PENDING"; - - // Prepare content - $content = array( - 'url' => $url, - 'frametester' => FRAMETESTER($url), - 'uid' => $uid, - 'status' => $status, - 'limit' => $limit - ); - - // Insert the URL into database - $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content); - - // Is this ID valid? - if ($content['insert_id'] == 0) { - // INSERT did not insert any data! - return false; - } // END - if - - // Translate status and limit - $content['status'] = SURFBAR_TRANSLATE_STATUS($content['status']); - $content['limit'] = SURFBAR_TRANSLATE_LIMIT($content['limit']); - - // If in reg-mode we notify admin - if (($addMode == "reg") || ($_CONFIG['surfbar_notify_admin_unlock'] == "Y")) { - // Notify admin even when he as unlocked an email - SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content); - } // END - if - - // Send mail to user - SURFBAR_NOTIFY_USER("url_{$addMode}", $content); - - // Return the insert id - return $content['insert_id']; -} -// Inserts an url by given data array and return the insert id -function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { - // Get userid - $uid = bigintval($urlData['uid']); - - // Is the id set? - if (empty($uid)) $uid = 0; - - // Just run the insert query for now - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed) VALUES(%s,'%s','%s','%s','%s')", - array( - $uid, - $urlData['url'], - $urlData['status'], - $urlData['limit'], - $urlData['limit'] - ), __FILE__, __LINE__ - ); - - // Return insert id - return SQL_INSERTID(); -} -// Notify admin(s) with a selected message and content -function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { - // Prepare template name - $templateName = sprintf("admin_surfbar_%s", $messageType); - - // Set default subject if following eval() wents wrong - $subject = ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT; - - // Prepare subject - $eval = sprintf("\$subject = ADMIN_SURFBAR_NOTIFY_%s_SUBJECT;", - strtoupper($messageType) - ); - @eval($eval); - - // Send the notification out - return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']); -} -// Notify the user about the performed action -function SURFBAR_NOTIFY_USER ($messageType, $content) { - // Skip notification if userid is zero - if ($content['uid'] == 0) { - return false; - } // END - if - - // Prepare template name - $templateName = sprintf("member_surfbar_%s", $messageType); - - // Set default subject if following eval() wents wrong - $subject = MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT; - - // Prepare subject - $eval = sprintf("\$subject = MEMBER_SURFBAR_NOTIFY_%s_SUBJECT;", - strtoupper($messageType) - ); - @eval($eval); - - // Load template - $mailText = LOAD_EMAIL_TEMPLATE($templateName, $content, $content['uid']); - - // Send the email - return SEND_EMAIL($content['uid'], $subject, $mailText); -} -// Translates the limit -function SURFBAR_TRANSLATE_LIMIT ($limit) { - // Is this zero? - if ($limit == 0) { - // Unlimited! - $return = MEMBER_SURFBAR_UNLIMITED_VIEWS; - } else { - // Translate comma - $return = TRANSLATE_COMMA($limit); - } - - // Return value - return $return; -} -// Translate the URL status -function SURFBAR_TRANSLATE_STATUS ($status) { - // Create constant name - $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status)); - - // Set default translated status - $statusTranslated = "!".$constantName."!"; - - // Generate eval() command - if (defined($constantName)) { - $eval = "\$statusTranslated = ".$constantName.";"; - eval($eval); - } // END - if - - // Return result - return $statusTranslated; -} -// Determine reward -function SURFBAR_DETERMINE_REWARD ($onlyMin=false) { - global $_CONFIG; - - // Static values are default - $reward = $_CONFIG['surfbar_static_reward']; - - // Do we have static or dynamic? - if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { - // "Calculate" dynamic reward - if ($onlyMin) { - $reward += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); - } else { - $reward += SURFBAR_CALCULATE_DYNAMIC_ADD(); - } - } // END - if - - // Return reward - return $reward; -} -// Determine costs -function SURFBAR_DETERMINE_COSTS ($onlyMin=false) { - global $_CONFIG; - - // Static costs is default - $costs = $_CONFIG['surfbar_static_costs']; - - // Do we have static or dynamic? - if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { - // "Calculate" dynamic costs - if ($onlyMin) { - $costs += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); - } else { - $costs += SURFBAR_CALCULATE_DYNAMIC_ADD(); - } - } // END - if - - // Return costs - return $costs; -} -// "Calculate" dynamic add -function SURFBAR_CALCULATE_DYNAMIC_ADD () { - // Get min/max values - $min = SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); - $max = SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE(); - - // "Calculate" dynamic part and return it - return mt_rand($min, $max); -} -// Determine right template name -function SURFBAR_DETERMINE_TEMPLATE_NAME() { - // Default is the frameset - $templateName = "surfbar_frameset"; - - // Any frame set? ;-) - if (isset($_GET['frame'])) { - // Use the frame as a template name part... ;-) - $templateName = sprintf("surfbar_frame_%s", - SQL_ESCAPE($_GET['frame']) - ); - } // END - if - - // Return result - return $templateName; -} -// Check if the "reload lock" of the current user is full, call this function -// before you call SURFBAR_CHECK_RELOAD_LOCK(). -function SURFBAR_CHECK_RELOAD_FULL() { - global $SURFBAR_CACHE, $_CONFIG; - - // Default is full! - $isFull = true; - - // Cache static reload lock - $SURFBAR_CACHE['surf_lock'] = $_CONFIG['surfbar_static_lock']; - //DEBUG_LOG(__FUNCTION__.":Fixed surf lock is ".$_CONFIG['surfbar_static_lock'].""); - - // Do we have dynamic model? - if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { - // "Calculate" dynamic lock - $SURFBAR_CACHE['surf_lock'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - } // END - if - - // Ask the database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_locks -WHERE userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_DATA('surf_lock').") < UNIX_TIMESTAMP(last_surfed) -LIMIT 1", - array($GLOBALS['userid']), __FILE__, __LINE__ - ); - - // Fetch row - list($SURFBAR_CACHE['user_locks']) = SQL_FETCHROW($result); - - // Is it null? - if (is_null($SURFBAR_CACHE['user_locks'])) { - // Then fix it to zero! - $SURFBAR_CACHE['user_locks'] = 0; - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Get total URLs - $total = SURFBAR_GET_TOTAL_URLS(); - - // Do we have some URLs in lock? Admins can always surf on own URLs! - //DEBUG_LOG(__FUNCTION__.":userLocks=".SURFBAR_GET_DATA('user_locks').",total={$total}"); - $isFull = ((SURFBAR_GET_DATA('user_locks') == $total) && ($total > 0)); - - // Return result - return $isFull; -} -// Get total amount of URLs of given status for current user or of ACTIVE URLs by default -function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId=0) { - // Determine depleted user account - $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); - - // Is the exlude userid set? - if ($excludeUserId > 0) { - // Then add it - $UIDs['uid'][$excludeUserId] = $excludeUserId; - } // END - if - - // Get amount from database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls -WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND status='%s'", - array($status), __FILE__, __LINE__ - ); - - // Fetch row - list($cnt) = SQL_FETCHROW($result); - - // Free result - SQL_FREERESULT($result); - - // Return result - return $cnt; -} -// Check wether the user is allowed to book more URLs -function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { - global $_CONFIG; - - // Is this admin and userid is zero or does the user has some URLs left to book? - return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, "", array("REJECTED")) < $_CONFIG['surfbar_max_order'])); -} -// Get total amount of URLs of given status for current user -function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") { - global $_CONFIG; - - // Is the user 0 and user is logged in? - if (($uid == 0) && (IS_MEMBER())) { - // Then use this userid - $uid = $GLOBALS['userid']; - } elseif ($uid == 0) { - // Error! - return ($_CONFIG['surfbar_max_order'] + 1); - } - - // Default is all URLs - $ADD = ""; - - // Is the status set? - if (is_array($status)) { - // Only URLs with these status - $ADD = sprintf(" AND status IN('%s')", implode("','", $status)); - } elseif (!empty($status)) { - // Only URLs with this status - $ADD = sprintf(" AND status='%s'", $status); - } elseif (is_array($exclude)) { - // Exclude URLs with these status - $ADD = sprintf(" AND status NOT IN('%s')", implode("','", $exclude)); - } elseif (!empty($exclude)) { - // Exclude URLs with this status - $ADD = sprintf(" AND status != '%s'", $exclude); - } - - // Get amount from database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls -WHERE userid=%s".$ADD." -LIMIT %s", - array($uid, $_CONFIG['surfbar_max_order']), __FILE__, __LINE__ - ); - - // Fetch row - list($cnt) = SQL_FETCHROW($result); - - // Free result - SQL_FREERESULT($result); - - // Return result - return $cnt; -} -// Generate a validation code for the given id number -function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt="") { - global $_CONFIG, $SURFBAR_CACHE; - - // @TODO Invalid salt should be refused - $SURFBAR_CACHE['salt'] = "INVALID"; - - // Get code length from config - $length = $_CONFIG['code_length']; - - // Fix length to 10 - if ($length == 0) $length = 10; - - // Generate a code until the length matches - $valCode = ""; - while (strlen($valCode) != $length) { - // Is the salt set? - if (empty($salt)) { - // Generate random hashed string - $SURFBAR_CACHE['salt'] = sha1(GEN_PASS(255)); - //DEBUG_LOG(__FUNCTION__.":newSalt=".SURFBAR_GET_SALT().""); - } else { - // Use this as salt! - $SURFBAR_CACHE['salt'] = $salt; - //DEBUG_LOG(__FUNCTION__.":oldSalt=".SURFBAR_GET_SALT().""); - } - - // ... and now the validation code - $valCode = GEN_RANDOM_CODE($length, sha1(SURFBAR_GET_SALT().":".$urlId), $GLOBALS['userid']); - //DEBUG_LOG(__FUNCTION__.":valCode={$valCode}"); - } // END - while - - // Hash it with md5() and salt it with the random string - $hashedCode = generateHash(md5($valCode), SURFBAR_GET_SALT()); - - // Finally encrypt it PGP-like and return it - $valHashedCode = generatePassString($hashedCode); - //DEBUG_LOG(__FUNCTION__.":finalValCode={$valHashedCode}"); - return $valHashedCode; -} -// Check validation code -function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) { - global $SURFBAR_CACHE; - - // Secure id number - $urlId = bigintval($urlId); - - // Now generate the code again - $code = SURFBAR_GENERATE_VALIDATION_CODE($urlId, $salt); - - // Return result of checking hashes and salts - //DEBUG_LOG(__FUNCTION__.":---".$code."|".$check."---"); - //DEBUG_LOG(__FUNCTION__.":+++".$salt."|".SURFBAR_GET_DATA('last_salt')."+++"); - return (($code == $check) && ($salt == SURFBAR_GET_DATA('last_salt'))); -} -// Lockdown the userid/id combination (reload lock) -function SURFBAR_LOCKDOWN_ID ($urlId) { - //* //DEBUG: */ print "LOCK!"); - ///* //DEBUG: */ return; - // Just add it to the database - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_locks (userid, url_id) VALUES(%s, %s)", - array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__); - - // Remove the salt from database - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_surfbar_salts WHERE url_id=%s AND userid=%s LIMIT 1", - array(bigintval($urlId), $GLOBALS['userid']), __FILE__, __LINE__); -} -// Pay points to the user and remove it from the sender -function SURFBAR_PAY_POINTS ($urlId) { - // Remove it from the URL owner - //DEBUG_LOG(__FUNCTION__.":uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS().""); - if (SURFBAR_GET_USERID() > 0) { - SUB_POINTS(SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); - } // END - if - - // Book it to the user - //DEBUG_LOG(__FUNCTION__.":uid=".$GLOBALS['userid'].",reward=".SURFBAR_GET_REWARD().""); - ADD_POINTS_REFSYSTEM($GLOBALS['userid'], SURFBAR_GET_DATA('reward')); -} -// Updates the statistics of current URL/userid -function SURFBAR_UPDATE_INSERT_STATS_RECORD () { - global $_CONFIG; - - // Init add - $ADD = ""; - - // Get allowed views - $allowed = SURFBAR_GET_ALLOWED_VIEWS(); - - // Do we have a limit? - if ($allowed > 0) { - // Then count views_max down! - $ADD .= ",views_max=views_max-1"; - } // END - if - - // Update URL stats - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET views_total=views_total+1".$ADD." WHERE id=%s LIMIT 1", - array(SURFBAR_GET_ID()), __FILE__, __LINE__); - - // Update the stats entry - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_stats SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1", - array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__); - - // Was that update okay? - if (SQL_AFFECTEDROWS() < 1) { - // No, then insert entry - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_stats (userid,url_id,count) VALUES(%s,%s,1)", - array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__); - } // END - if - - // Update total/daily/weekly/monthly counter - $_CONFIG['surfbar_total_counter']++; - $_CONFIG['surfbar_daily_counter']++; - $_CONFIG['surfbar_weekly_counter']++; - $_CONFIG['surfbar_monthly_counter']++; - - // Update config as well - UPDATE_CONFIG(array("surfbar_total_counter", "surfbar_daily_counter", "surfbar_weekly_counter", "surfbar_monthly_counter"), array(1,1,1,1), "+"); -} -// Update the salt for validation and statistics -function SURFBAR_UPDATE_SALT_STATS () { - // Update statistics record - SURFBAR_UPDATE_INSERT_STATS_RECORD(); - - // Simply store the salt from cache away in database... - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_salts SET last_salt='%s' WHERE url_id=%s AND userid=%s LIMIT 1", - array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), $GLOBALS['userid']), __FILE__, __LINE__); - - // Debug message - //DEBUG_LOG(__FUNCTION__.":salt=".SURFBAR_GET_SALT().",id=".SURFBAR_GET_ID().",uid=".$GLOBALS['userid'].""); - - // Was that okay? - if (SQL_AFFECTEDROWS() < 1) { - // Insert missing entry! - SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_salts (url_id,userid,last_salt) VALUES(%s, %s, '%s')", - array(SURFBAR_GET_ID(), $GLOBALS['userid'], SURFBAR_GET_SALT()), __FILE__, __LINE__); - } // END - if - - // Debug message - //DEBUG_LOG(__FUNCTION__.":affectedRows=".SQL_AFFECTEDROWS().""); - - // Return if the update was okay - return (SQL_AFFECTEDROWS() == 1); -} -// Check if the reload lock is active for given id -function SURFBAR_CHECK_RELOAD_LOCK ($urlId) { - //DEBUG_LOG(__FUNCTION__.":id={$urlId}"); - // Ask the database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt -FROM "._MYSQL_PREFIX."_surfbar_locks -WHERE userid=%s AND url_id=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_DATA('surf_lock').") < UNIX_TIMESTAMP(last_surfed) -ORDER BY last_surfed ASC -LIMIT 1", - array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__ - ); - - // Fetch counter - list($cnt) = SQL_FETCHROW($result); - - // Free result - SQL_FREERESULT($result); - - // Return check - //DEBUG_LOG(__FUNCTION__.":cnt={$cnt},".SURFBAR_GET_DATA('surf_lock').""); - return ($cnt == 1); -} -// Determine which user hash no more points left -function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) { - // Init array - $UIDs = array(); - - // Do we have a current user id? - if ((IS_MEMBER()) && ($limit == 0)) { - // Then add this as well - $UIDs['uid'][$GLOBALS['userid']] = $GLOBALS['userid']; - $UIDs['points'][$GLOBALS['userid']] = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points"); - $UIDs['notified'][$GLOBALS['userid']] = 0; - - // Get all userid except logged in one - $result = SQL_QUERY_ESC("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified -FROM "._MYSQL_PREFIX."_surfbar_urls AS u -INNER JOIN "._MYSQL_PREFIX."_user_data AS d -ON u.userid=d.userid -WHERE u.userid NOT IN (%s,0) AND u.status='ACTIVE' -GROUP BY u.userid -ORDER BY u.userid ASC", - array($GLOBALS['userid']), __FILE__, __LINE__); - } else { - // Get all userid - $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified -FROM "._MYSQL_PREFIX."_surfbar_urls AS u -INNER JOIN "._MYSQL_PREFIX."_user_data AS d -ON u.userid=d.userid -WHERE u.status='ACTIVE' -GROUP BY u.userid -ORDER BY u.userid ASC", __FILE__, __LINE__); - } - - // Load all userid - while (list($uid, $notified) = SQL_FETCHROW($result)) { - // Get total points - $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); - //DEBUG_LOG(__FUNCTION__.":uid={$uid},points={$points}"); - - // Shall we add this to ignore? - if ($points <= $limit) { - // Ignore this one! - //DEBUG_LOG(__FUNCTION__.":uid={$uid} has depleted points amount!"); - $UIDs['uid'][$uid] = $uid; - $UIDs['points'][$uid] = $points; - $UIDs['notified'][$uid] = $notified; - } // END - if - } // END - while - - // Free result - SQL_FREERESULT($result); - - // Debug message - //DEBUG_LOG(__FUNCTION__.":UIDs::count=".count($UIDs)." (with own userid=".$GLOBALS['userid'].")"); - - // Return result - return $UIDs; -} -// Determine how many users are Online in surfbar -function SURFBAR_DETERMINE_TOTAL_ONLINE () { - global $_CONFIG; - - // Count all users in surfbar modue and return the value - $result = SQL_QUERY_ESC("SELECT id -FROM "._MYSQL_PREFIX."_surfbar_stats -WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s -GROUP BY userid", - array($_CONFIG['online_timeout']), __FILE__, __LINE__); - - // Fetch count - $cnt = SQL_NUMROWS($result); - - // Free result - SQL_FREERESULT($result); - - // Return result - return $cnt; -} -// Determine waiting time for one URL -function SURFBAR_DETERMINE_WAIT_TIME () { - global $_CONFIG; - - // Static time is default - $time = $_CONFIG['surfbar_static_time']; - - // Which payment model do we have? - if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { - // "Calculate" dynamic time - $time += SURFBAR_CALCULATE_DYNAMIC_ADD(); - } // END - if - - // Return value - return $time; -} -// Changes the status of an URL from given to other -function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) { - global $_CONFIG; - - // Get URL data for status comparison if missing - if (count($data) == 0) { - $data = SURFBAR_GET_URL_DATA($urlId); - } // END - if - - // Is the status like prevStatus is saying? - if ($data[$urlId]['status'] != $prevStatus) { - // No, then abort here - return false; - } // END - if - - - // Update the status now - // ---------------------- Commented out for debugging member actions! ----------------------- - //SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET status='%s' WHERE id=%s LIMIT 1", - // array($newStatus, bigintval($urlId)), __FILE__, __LINE__); - // ---------------------- Commented out for debugging member actions! ----------------------- - - // Was that fine? - if (SQL_AFFECTEDROWS() != 1) { - // No, something went wrong - return false; - } // END - if - - // Prepare content for notification routines - $data[$urlId]['uid'] = $data[$urlId]['userid']; - $data[$urlId]['frametester'] = FRAMETESTER($data[$urlId]['url']); - $data[$urlId]['reward'] = TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']); - $data[$urlId]['costs'] = TRANSLATE_COMMA($_CONFIG['surfbar_static_costs']); - $data[$urlId]['status'] = SURFBAR_TRANSLATE_STATUS($newStatus); - $data[$urlId]['registered'] = MAKE_DATETIME($data[$urlId]['registered'], "2"); - $newStatus = strtolower($newStatus); - - // Send admin notification - SURFBAR_NOTIFY_ADMIN("url_{$newStatus}", $data[$urlId]); - - // Send user notification - SURFBAR_NOTIFY_USER("url_{$newStatus}", $data[$urlId]); - - // All done! - return true; -} -// Calculate minimum value for dynamic payment model -function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { - global $_CONFIG; - - // Addon is zero by default - $addon = 0; - - // Percentage part - $percent = abs(log($_CONFIG['surfbar_dynamic_percent'] / 100 + 1)); - - // Get total users - $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); - - // Get online users - $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); - - // Calculate addon - $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers); - - // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS("ACTIVE", "0"); - - // Get user's total URLs - $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, "ACTIVE"); - - // Calculate addon - if ($totalUrls > 0) { - $addon += abs(log($userUrls / $totalUrls + 1) * $percent * $totalUrls); - } else { - $addon += abs(log($userUrls / 1 + 1) * $percent * $totalUrls); - } - - // Return addon - return $addon; -} -// Calculate maximum value for dynamic payment model -function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { - global $_CONFIG; - - // Addon is zero by default - $addon = 0; - - // Maximum value - $max = log(2); - - // Percentage part - $percent = abs(log($_CONFIG['surfbar_dynamic_percent'] / 100 + 1)); - - // Get total users - $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); - - // Calculate addon - $addon += abs($max * $percent * $totalUsers); - - // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS("ACTIVE", "0"); - - // Calculate addon - $addon += abs($max * $percent * $totalUrls); - - // Return addon - return $addon; -} -// Calculate dynamic lock -function SURFBAR_CALCULATE_DYNAMIC_LOCK () { - global $_CONFIG; - - // Default lock is 30 seconds - $addon = 30; - - // Get online users - $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); - - // Calculate lock - $addon = abs(log($onlineUsers / $addon + 1)); - - // Return value - return $addon; -} -// "Getter" for lock ids array -function SURFBAR_GET_LOCK_IDS () { - // Prepare some arrays - $IDs = array(); - $USE = array(); - $ignored = array(); - - // Get all id from locks within the timestamp - $result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) AS last -FROM - "._MYSQL_PREFIX."_surfbar_locks -WHERE - userid=%s -ORDER BY - id ASC", array($GLOBALS['userid']), - __FILE__, __LINE__); - - // Load all entries - while (list($lid, $url, $last) = SQL_FETCHROW($result)) { - // Debug message - //DEBUG_LOG(__FUNCTION__.":next - lid={$lid},url={$url},rest=".(time() - $last)."/".SURFBAR_GET_DATA('surf_lock').""); - - // Skip entries that are too old - if (($last > (time() - SURFBAR_GET_DATA('surf_lock'))) && (!in_array($url, $ignored))) { - // Debug message - //DEBUG_LOG(__FUNCTION__.":okay - lid={$lid},url={$url},last={$last}"); - - // Add only if missing or bigger - if ((!isset($IDs[$url])) || ($IDs[$url] > $last)) { - // Debug message - //DEBUG_LOG(__FUNCTION__.":ADD - lid={$lid},url={$url},last={$last}"); - - // Add this ID - $IDs[$url] = $last; - $USE[$url] = $lid; - } // END - if - } else { - // Debug message - //DEBUG_LOG(__FUNCTION__.":ignore - lid={$lid},url={$url},last={$last}"); - - // Ignore these old entries! - $ignored[] = $url; - unset($IDs[$url]); - unset($USE[$url]); - } - } // END - while - - // Free result - SQL_FREERESULT($result); - - // Return array - return $USE; -} -// "Getter" for maximum random number -function SURFBAR_GET_MAX_RANDOM ($UIDs, $ADD) { - global $_CONFIG; - // Count max availabe entries - $result = SQL_QUERY("SELECT sbu.id AS cnt -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs -ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l -ON sbu.id=l.url_id -WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) AND sbu.status='ACTIVE'".$ADD." -GROUP BY sbu.id", __FILE__, __LINE__); - - // Log last query - //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS().""); - - // Fetch max rand - $maxRand = SQL_NUMROWS($result); - - // Free result - SQL_FREERESULT($result); - - // Return value - return $maxRand; -} -// Load all URLs of the current user and return it as an array -function SURFBAR_GET_USER_URLS () { - // Init array - $URLs = array(); - - // Begin the query - $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason -FROM "._MYSQL_PREFIX."_surfbar_urls AS u -WHERE u.userid=%s AND u.status != 'DELETED' -ORDER BY u.id ASC", - array($GLOBALS['userid']), __FILE__, __LINE__); - - // Are there entries? - if (SQL_NUMROWS($result) > 0) { - // Load all rows - while ($row = SQL_FETCHARRAY($result)) { - // Add the row - $URLs[$row['id']] = $row; - } // END - while - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return the array - return $URLs; -} -// "Getter" for member action array for given status -function SURFBAR_GET_ACTION_ARRAY ($status) { - // Init array - $returnArray = array(); - - // Get all assigned actions - $result = SQL_QUERY_ESC("SELECT action FROM "._MYSQL_PREFIX."_surfbar_actions WHERE status='%s' ORDER BY id ASC", - array($status), __FILE__, __LINE__); - - // Some entries there? - if (SQL_NUMROWS($result) > 0) { - // Load all actions - while (list($action) = SQL_FETCHROW($result)) { - $returnArray[] = $action; - } // END - if - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return result - return $returnArray; -} -// Reload to configured stop page -function SURFBAR_RELOAD_TO_STOP_PAGE($page="stop") { - global $_CONFIG; - - // Internal or external? - if (($_CONFIG['surfbar_pause_mode'] == "INTERNAL") || (empty($_CONFIG['surfbar_pause_url']))) { - // Reload to internal page - LOAD_URL("surfbar.php?frame=".$page); - } else { - // Reload to external page - LOAD_URL($_CONFIG['surfbar_pause_url']); - } -} - -// Determine next id for surfbar or get data for given id, always call this before you call other -// getters below this function!!! -function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { - global $SURFBAR_CACHE, $_CONFIG; - - // Default is no id and no random number - $nextId = 0; - $randNum = 0; - - // Is the ID set? - if ($urlId == 0) { - // Get array with lock ids - $USE = SURFBAR_GET_LOCK_IDS(); - - // Shall we add some URL ids to ignore? - $ADD = ""; - if (count($USE) > 0) { - // Ignore some! - $ADD = " AND sbu.id NOT IN ("; - foreach ($USE as $url_id => $lid) { - // Add URL id - $ADD .= $url_id.","; - } // END - foreach - - // Add closing bracket - $ADD = substr($ADD, 0, -1) . ")"; - } // END - if - - // Determine depleted user account - $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); - - // Get maximum randomness factor - $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs['uid'], $ADD); - - // If more than one URL can be called generate the random number! - if ($maxRand > 1) { - // Generate random number - $randNum = mt_rand(0, ($maxRand - 1)); - } // END - if - - // And query the database - //DEBUG_LOG(__FUNCTION__.":randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_DATA('surf_lock').""); - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs -ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l -ON sbu.id=l.url_id -WHERE sbu.userid NOT IN (".implode(",", $UIDs['uid']).") AND sbu.status='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$ADD." -GROUP BY sbu.id -ORDER BY l.last_surfed ASC, sbu.id ASC -LIMIT %s,1", - array($randNum), __FILE__, __LINE__ - ); - } else { - // Get data from specified id number - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed -FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs -ON sbu.id=sbs.url_id -LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l -ON sbu.id=l.url_id -WHERE sbu.userid != %s AND sbu.status='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) -LIMIT 1", - array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__ - ); - } - - // Is there an id number? - //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS().""); - if (SQL_NUMROWS($result) == 1) { - // Load/cache data - //DEBUG_LOG(__FUNCTION__.":count(".count($SURFBAR_CACHE).") - BEFORE"); - $SURFBAR_CACHE = merge_array($SURFBAR_CACHE, SQL_FETCHARRAY($result)); - //DEBUG_LOG(__FUNCTION__.":count(".count($SURFBAR_CACHE).") - AFTER"); - - // Determine waiting time - $SURFBAR_CACHE['time'] = SURFBAR_DETERMINE_WAIT_TIME(); - - // Is the last salt there? - if (is_null($SURFBAR_CACHE['last_salt'])) { - // Then repair it wit the static! - //DEBUG_LOG(__FUNCTION__.":last_salt - FIXED!"); - $SURFBAR_CACHE['last_salt'] = ""; - } // END - if - - // Fix missing last_surfed - if ((!isset($SURFBAR_CACHE['last_surfed'])) || (is_null($SURFBAR_CACHE['last_surfed']))) { - // Fix it here - //DEBUG_LOG(__FUNCTION__.":last_surfed - FIXED!"); - $SURFBAR_CACHE['last_surfed'] = 0; - } // END - if - - // Get base/fixed reward and costs - $SURFBAR_CACHE['reward'] = SURFBAR_DETERMINE_REWARD(); - $SURFBAR_CACHE['costs'] = SURFBAR_DETERMINE_COSTS(); - //DEBUG_LOG(__FUNCTION__.":BASE/STATIC - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS().""); - - // Only in dynamic model add the dynamic bonus! - if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { - // Calculate dynamic reward/costs and add it - $SURFBAR_CACHE['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - $SURFBAR_CACHE['costs'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - //DEBUG_LOG(__FUNCTION__.":DYNAMIC+ - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS().""); - } // END - if - - // Now get the id - $nextId = SURFBAR_GET_ID(); - } // END - if - - // Free result - SQL_FREERESULT($result); - - // Return result - //DEBUG_LOG(__FUNCTION__.":nextId={$nextId}"); - return $nextId; -} -// ----------------------------------------------------------------------------- -// PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE ELSE THEY "WRAP" THE -// $SURFBAR_CACHE ARRAY! -// ----------------------------------------------------------------------------- -// Private getter for data elements -function SURFBAR_GET_DATA ($element) { - global $SURFBAR_CACHE; - //DEBUG_LOG(__FUNCTION__.":element={$element}"); - - // Default is null - $data = null; - - // Is the entry there? - if (isset($SURFBAR_CACHE[$element])) { - // Then take it - $data = $SURFBAR_CACHE[$element]; - } else { // END - if - print("
");
-		print_r($SURFBAR_CACHE);
-		debug_print_backtrace();
-		die("
"); - } - - // Return result - //DEBUG_LOG(__FUNCTION__.":element[$element]={$data}"); - return $data; -} -// Getter for reward from cache -function SURFBAR_GET_REWARD () { - // Get data element and return its contents - return SURFBAR_GET_DATA('reward'); -} -// Getter for costs from cache -function SURFBAR_GET_COSTS () { - // Get data element and return its contents - return SURFBAR_GET_DATA('costs'); -} -// Getter for URL from cache -function SURFBAR_GET_URL () { - // Get data element and return its contents - return SURFBAR_GET_DATA('url'); -} -// Getter for salt from cache -function SURFBAR_GET_SALT () { - // Get data element and return its contents - return SURFBAR_GET_DATA('salt'); -} -// Getter for id from cache -function SURFBAR_GET_ID () { - // Get data element and return its contents - return SURFBAR_GET_DATA('id'); -} -// Getter for userid from cache -function SURFBAR_GET_USERID () { - // Get data element and return its contents - return SURFBAR_GET_DATA('userid'); -} -// Getter for user reload locks -function SURFBAR_GET_USER_RELOAD_LOCK () { - // Get data element and return its contents - return SURFBAR_GET_DATA('user_locks'); -} -// Getter for reload time -function SURFBAR_GET_RELOAD_TIME () { - // Get data element and return its contents - return SURFBAR_GET_DATA('time'); -} -// Getter for allowed views -function SURFBAR_GET_ALLOWED_VIEWS () { - // Get data element and return its contents - return SURFBAR_GET_DATA('views_allowed'); -} -// -?> diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php deleted file mode 100644 index 426309f221..0000000000 --- a/inc/libs/task_functions.php +++ /dev/null @@ -1,588 +0,0 @@ - 0) { - define('__TASK_UPDATE_VALUE', "".$value.""); - } else { - define('__TASK_UPDATE_VALUE', "0"); - } - } else { - define('__TASK_UPDATE_VALUE', "0"); - } - - // - // First check for all account status seperately - // - // Confirmed accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__CONFIRMED_VALUE', "".$value.""); - } else { - define('__CONFIRMED_VALUE', "0"); - } - - // Unconfirmed accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__UNCONFIRMED_VALUE', "".$value.""); - } else { - define('__UNCONFIRMED_VALUE', "0"); - } - - // And locked accounts - $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='LOCKED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__LOCKED_VALUE', "".$value.""); - } else { - define('__LOCKED_VALUE', "0"); - } - - // - // Unassigned tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='0' AND status != 'DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_NEW_VALUE', "".$value.""); - } else { - define('__TASK_NEW_VALUE', "0"); - } - - // - // Closed tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'CLOSED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_CLOSED_VALUE', "".$value.""); - } else { - define('__TASK_CLOSED_VALUE', "0"); - } - - // - // Deleted tasks - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_DELETED_VALUE', "".$value.""); - } else { - define('__TASK_DELETED_VALUE', "0"); - } - - // - // Solved tasks - // - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE status = 'SOLVED' AND assigned_admin='%s'", - array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_SOLVED_VALUE', "".$value.""); - } else { - define('__TASK_SOLVED_VALUE', "0"); - } - - // - // Your tasks - // - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND status = 'NEW' AND task_type != 'EXTENSION_UPDATE'", - array(GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__TASK_YOUR_VALUE', "".$value.""); - } else { - define('__TASK_YOUR_VALUE', "0"); - } - - // - // Mails waiting to be approved - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_ADMIN_VALUE', "".$value.""); - } else { - define('__MAIL_ADMIN_VALUE', "0"); - } - - // - // Unfinished mail orders - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='TEMP'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_TEMP_VALUE', "".$value.""); - } else { - define('__MAIL_TEMP_VALUE', "0"); - } - - // - // Sent mail orders - // - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='SEND'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_SEND_VALUE', "".$value.""); - } else { - define('__MAIL_SEND_VALUE', "0"); - } - - // - // Autopurged mails - // - if (EXT_IS_ACTIVE("autopurge")) { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_DELETED_VALUE', "".$value.""); - } else { - define('__MAIL_DELETED_VALUE', "0"); - } - - // - // Autopurged bonus mails - // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='DELETED'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_BONUS_AP_VALUE', "".$value.""); - } else { - define('__MAIL_BONUS_AP_VALUE', "0"); - } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_AP_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); - } else { - define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_BONUS_404.""); - } - } else { - define('__MAIL_BONUS_AP_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); - define('__MAIL_DELETED_VALUE', "".ADMIN_EXT_AUTOPURGE_404.""); - } - - // - // Sent bonus mails - // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND'", __FILE__, __LINE__); - $value = SQL_NUMROWS($result); - SQL_FREERESULT($result); - - if ($value > 0) { - define('__MAIL_BONUS_SEND_VALUE', "".$value.""); - } else { - define('__MAIL_BONUS_SEND_VALUE', "0"); - } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2); - } else { - define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_404); - } - - if (EXT_IS_ACTIVE("autopurge")) { - // Start finding them... - $since = $_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 != ".$_CONFIG['beg_uid'].""; - if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['bonus_uid'].""; - if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".$_CONFIG['doubler_uid'].""; - if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'"; - - // Check for all accounts - $SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online -FROM "._MYSQL_PREFIX."_user_data AS d -WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - ".$since.") AND d.last_online < ".$since." AND d.ap_notified < ".$since." -".$EXCLUDE_LIST." -ORDER BY d.userid"; - $WHATs[] = "list_autopurge"; - $DESCRs[] = TASK_ADMIN_INACTIVE_AUTOPURGE; - $TITLEs[] = TASK_ADMIN_INACTIVE_AUTOPURGE_TITLE; - } - - if (GET_EXT_VERSION("sql_patches") >= "0.3.4") { - // Check for accounts without referral - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid"; - $DESCRs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF; - $TITLEs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF_TITLE; - $WHATs[] = "list_norefs"; - } - - if (EXT_IS_ACTIVE("payout")) { - // List new payout requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts WHERE status='NEW' ORDER BY userid"; - $WHATs[] = "list_payouts"; - $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING; - $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_WAITING_TITLE; - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_payouts ORDER BY userid"; - $WHATs[] = "list_payouts"; - $DESCRs[] = TASK_ADMIN_LIST_PAYOUTS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_PAYOUTS_ALL_TITLE; - } - - if (EXT_IS_ACTIVE("wernis")) { - // List new wernis requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_wernis ORDER BY userid"; - $WHATs[] = "list_wernis"; - $DESCRs[] = TASK_ADMIN_LIST_WERNIS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_WERNIS_ALL_TITLE; - } - - if (EXT_IS_ACTIVE("primera")) { - // List new primera requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_primera ORDER BY userid"; - $WHATs[] = "list_primera"; - $DESCRs[] = TASK_ADMIN_LIST_PRIMERA_ALL; - $TITLEs[] = TASK_ADMIN_LIST_PRIMERA_ALL_TITLE; - } - - if (EXT_IS_ACTIVE("holiday")) { - // List holiday requests - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_holidays ORDER BY userid"; - $WHATs[] = "list_holiday"; - $DESCRs[] = TASK_ADMIN_LIST_HOLIDAYS; - $TITLEs[] = TASK_ADMIN_LIST_HOLIDAYS_TITLE; - } - - if (GET_EXT_VERSION("bonus") >= "0.2.3") { - // Active rallye - if (GET_EXT_VERSION("bonus") >= "0.6.9") { - // Add more bonus points here - $USE = "(0"; - if ($_CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus"; - if ($_CONFIG['bonus_login_yn'] == "Y") $USE .= " + login_bonus"; - if ($_CONFIG['bonus_order_yn'] == "Y") $USE .= " + bonus_order"; - if ($_CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats"; - if ($_CONFIG['bonus_ref_yn'] == "Y") $USE .= " + bonus_ref"; - $USE .= ")"; - } else { - // Old version ??? - $USE = "turbo_bonus"; - } - - // Autopurge installed? - $LAST = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['autopurge_inactive'] == "Y") && ($_CONFIG['ap_inactive_since'] > 0)) { - // Use last online timestamp to keep inactive members away from here - $LAST = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", $_CONFIG['ap_inactive_since']); - } - - $SQLs[] = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data -WHERE status='CONFIRMED' AND ".$USE.">0".$LAST." -ORDER BY active_bonus DESC, userid"; - $WHATs[] = "list_bonus"; - $DESCRs[] = TASK_ADMIN_LIST_BONUS; - $TITLEs[] = TASK_ADMIN_LIST_BONUS_TITLE; - } - - if (GET_EXT_VERSION("beg") >= "0.1.2") { - // Begging rallye - - // Autopurge installed? - $LAST = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['autopurge_inactive'] == "Y") && ($_CONFIG['ap_inactive_since'] > 0)) { - // Use last online timestamp to keep inactive members away from here - $LAST = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", $_CONFIG['ap_inactive_since']); - } - - $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data -WHERE status='CONFIRMED' AND beg_points>0".$LAST." -ORDER BY beg_points DESC, userid"; - $WHATs[] = "list_beg"; - $DESCRs[] = TASK_ADMIN_LIST_BEG; - $TITLEs[] = TASK_ADMIN_LIST_BEG_TITLE; - } - - if (EXT_IS_ACTIVE("doubler")) { - // List waiting payouts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler WHERE completed='N' ORDER BY id"; - $WHATs[] = "list_doubler&mode=waiting&select=all"; - $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_WAITING; - $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_WAITING_TITLE; - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_doubler ORDER BY id"; - $WHATs[] = "list_doubler"; - $DESCRs[] = TASK_ADMIN_LIST_DOUBLER_ALL; - $TITLEs[] = TASK_ADMIN_LIST_DOUBLER_ALL_TITLE; - } - - // - // All referral banner - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner ORDER BY id"; - $WHATs[] = "refbanner"; - $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ALL; - $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ALL_TITLE; - - // - // All activated referral banner - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_refbanner WHERE visible='Y' ORDER BY id"; - $WHATs[] = "refbanner"; - $DESCRs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_REFBANNER_ACTIVE_TITLE; - - // - // All extensions - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions ORDER BY id"; - $WHATs[] = "extensions"; - $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ALL_TITLE; - - // - // All activated extensions - // - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_active='Y' ORDER BY id"; - $WHATs[] = "extensions&active=Y"; - $DESCRs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_EXTENSIONS_ACTIVE_TITLE; - - if (EXT_IS_ACTIVE("engine")) { - // List all export accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts ORDER BY id"; - $WHATs[] = "list_engine"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE; - - // List all pending accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_accounts WHERE status='UNCONFIRMED' ORDER BY id"; - $WHATs[] = "unlock_engine"; - $DESCRs[] = TASK_ADMIN_UNLOCK_ENGINE; - - // List all safes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_safe ORDER BY id"; - $WHATs[] = "list_engine&mode=safe"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE_SAFES; - - // List all export URLs - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_engine_urls ORDER BY id"; - $WHATs[] = "engine_urls"; - $DESCRs[] = TASK_ADMIN_LIST_ENGINE_URLS; - } - - if (EXT_IS_ACTIVE("sponsor")) { - // List all sponsors - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_TITLE; - - // List confirmed sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='CONFIRMED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_CONFIRMED_TITLE; - - // List unconfirmed sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='UNCONFIRMED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_UNCONFIRMED_TITLE; - - // List locked sponsor accounts - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='LOCKED' ORDER BY id"; - $WHATs[] = "list_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_LOCKED_TITLE; - - // List waiting sponsor accounts to be approved - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_data WHERE status='PENDING' ORDER BY id"; - $WHATs[] = "unlock_sponsor"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_PENDING; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_PENDING_TITLE; - - // Waiting payments - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_sponsor_orders WHERE pay_status='PENDING' ORDER BY id"; - $WHATs[] = "list_sponsor_pays"; - $DESCRs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS; - $TITLEs[] = TASK_ADMIN_LIST_SPONSOR_ORDERS_TITLE; - } - - if (EXT_IS_ACTIVE("country")) { - // List country codes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_countries ORDER BY id"; - $WHATs[] = "list_country"; - $DESCRs[] = TASK_ADMIN_LIST_COUNTRY; - $TITLEs[] = TASK_ADMIN_LIST_COUNTRY_TITLE; - } - - if (EXT_IS_ACTIVE("theme")) { - // List all themes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes ORDER BY id"; - $WHATs[] = "theme_edit"; - $DESCRs[] = TASK_ADMIN_LIST_THEME_ALL; - $TITLEs[] = TASK_ADMIN_LIST_THEME_ALL_TITLE; - - // List active themes - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_active='Y' ORDER BY id"; - $WHATs[] = "theme_edit"; - $DESCRs[] = TASK_ADMIN_LIST_THEME_ACTIVE; - $TITLEs[] = TASK_ADMIN_LIST_THEME_ACTIVE_TITLE; - } - - if (EXT_IS_ACTIVE("admins")) { - // List all administrator logins - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_admins ORDER BY id"; - $WHATs[] = "admins_edit"; - $DESCRs[] = TASK_ADMIN_LIST_ADMINS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_ADMINS_ALL_TITLE; - } - - if (EXT_IS_ACTIVE("surfbar")) { - // List all URLs in surfbar - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls ORDER BY id"; - $WHATs[] = "list_surfbar_urls"; - $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL; - $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_ALL_TITLE; - - // List all pending URLs in surfbar - $SQLs[] = "SELECT id FROM "._MYSQL_PREFIX."_surfbar_urls WHERE status='PENDING' ORDER BY id"; - $WHATs[] = "unlock_surfbar_urls"; - $DESCRs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING; - $TITLEs[] = TASK_ADMIN_LIST_SURFBAR_URLS_PENDING_TITLE; - } - - // Generate extra overview rows - $EXTRAS .= TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs); - - // If empty just keep a forced-space left for CSS issues - if (empty($EXTRAS)) $EXTRAS = " "; - - // Add compiled string to constant for final template - define('__OVERVIEW_EXTRA_TABLE', $EXTRAS); - - // Simply load the template... :-) - LOAD_TEMPLATE("admin_overview_task"); -} - -// -function TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs){ - // Init - $OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1; - foreach ($SQLs as $key => $sql) { - // Run SQL command, get line numbers and free memory - $result = SQL_QUERY($sql, __FILE__, __LINE__); - - // Get rows - $value = SQL_NUMROWS($result); - - // Free result - SQL_FREERESULT($result); - - $content = array( - 'row_descr' => $DESCRs[$key], - 'row_sw' => $SW, - 'bottom' => "", - ); - - if ($key < $MAX) $content['bottom'] = "bottom2"; - if (($value > 0) && (!empty($WHATs[$key]))) { - if (empty($TITLEs[$key])) $TITLEs[$key] = TASK_ADMIN_UNKNOWN_LIST_TITLE; - $content['row_link'] = "".$value.""; - } else { - $content['row_link'] = 0; - } - - // Switch color - $SW = 3 - $SW; - - // And insert the final string into extras template - $OUT .= LOAD_TEMPLATE("admin_overview_task_rows", true, $content); - } // END - if - - // Return output - return LOAD_TEMPLATE("admin_overview_task_extras", true, $OUT); -} -// -?> diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php deleted file mode 100644 index f8b65f32bd..0000000000 --- a/inc/libs/transfer_functions.php +++ /dev/null @@ -1,76 +0,0 @@ - $max) { - // Update overdue transfers - $remove = SQL_NUMROWS($result) - $max; - - // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_in SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); - } - - // Second get total out-going lines - $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY id", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > $max) { - // Update overdue transfers - $remove = SQL_NUMROWS($result) - $max; - - // This will make it really old, so the final removal query will find it - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_transfers_out SET time_trans='0' ORDER BY id LIMIT ".$remove, __FILE__, __LINE__); - } - - // Remove old in-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); - $REMOVE = SQL_AFFECTEDROWS(); - - // Remove old out-going transfers - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__); - $REMOVE += SQL_AFFECTEDROWS(); - - // Only send email to admin(s) when we have removed entries - if ($REMOVE > 0) { - SEND_ADMIN_NOTIFICATION(TRANSFER_ADMIN_AUTOPURGE, "admin_transfer_ap", $REMOVE, 0); - } -} -// -?> diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php deleted file mode 100644 index 115bec72f7..0000000000 --- a/inc/libs/user_functions.php +++ /dev/null @@ -1,225 +0,0 @@ -".$ltr.""; - } - else - { - // Output link to letter - $OUT .= "".$ltr.""; - } - if ((($counter / $_CONFIG['user_alpha']) == round($counter / $_CONFIG['user_alpha'])) && ($counter > 0)) - { - $OUT .= " ]
[ "; - } - elseif ( $counter != $num ) - { - $OUT .= " | "; - } - } - define('__ALPHA_LIST', $OUT); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_alpha", true); - if ($return) - { - // Return generated code - return $OUT; - } - else - { - // Output generated code - OUTPUT_HTML($OUT); - } -} -// -function SortLinks($letter, $sortby, $colspan, $return=false) -{ - $OUT = ""; - if (empty($_GET['offset'])) $_GET['offset'] = 0; - $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; - if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); - - // Makes order by links.. - if ($letter == "front") $letter = _ALL2; - - // Prepare array with all possible sorters - $list = array( - 'userid' => _UID, - 'family' => FAMILY_NAME, - 'email' => ADDY, - 'REMOTE_ADDR' => REMOTE_IP - ); - - // Add nickname if extension is installed - if (EXT_IS_ACTIVE("nickname")) { - $list['nickname'] = NICKNAME; - } - - foreach ($list as $sort => $title) { - if ($sortby == $sort) { - $OUT .= "".$title." | "; - } else { - $OUT .= "".$title." | "; - } - } - define('__SORT_LIST', substr($OUT, 0, -13)); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_sort", true); - if ($return) - { - // Return code - return $OUT; - } - else - { - // Output code - OUTPUT_HTML($OUT); - } -} -// -function ADD_PAGENAV($PAGES, $offset, $show_form, $colspan,$return=false) -{ - if (!$show_form) - { - // Empty row - define('__FORM_HEADER', " "); - } - else - { - // Load form for changing number of lines - define('__FORM_HEADER', LOAD_TEMPLATE("admin_list_user_sort_form", true)); - } - if (!$show_form) - { - // Add line with bottom border - define('__FORM_FOOTER', " "); - } - else - { - // Add line without bottom border - define('__FORM_FOOTER', " "); - } - - $OUT = ""; - for ($page = 1; $page <= $PAGES; $page++) - { - if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) - { - $OUT .= "-"; - } - else - { - if (empty($_GET['letter'])) $_GET['letter'] = _ALL2; - if (empty($_GET['sortby'])) $_GET['sortby'] = "userid"; - $OUT .= ""; - } - $OUT .= $page; - if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) - { - $OUT .= "-"; - } - else - { - $OUT .= ""; - } - if ($page < $PAGES) $OUT .= " | "; - } - define('__PAGENAV_LIST', $OUT); - - // Load template - $OUT = LOAD_TEMPLATE("admin_list_user_pagenav", true); - if ($return) - { - // Return code - return $OUT; - } - else - { - // Output code - OUTPUT_HTML($OUT); - } -} -// Create email link to user's account -function USER_CREATE_EMAIL_LINK($email, $mod="admin") -{ - $locked = " AND status='CONFIRMED'"; - if (IS_ADMIN()) $locked = ""; - $result = SQL_QUERY_ESC("SELECT userid -FROM "._MYSQL_PREFIX."_user_data -WHERE email='%s'".$locked." LIMIT 1", - array($email), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { - // Load userid - list($uid) = SQL_FETCHROW($result); - - // Rewrite email address to contact link - $email = URL."/modules.php?module=".$mod."&what=user_contct&u_id=".bigintval($uid); - } - - // Free memory - SQL_FREERESULT($result); - - // Return rewritten (?) email address - return $email; -} -// -?> diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php deleted file mode 100644 index 4e05960e9a..0000000000 --- a/inc/libs/wernis_functions.php +++ /dev/null @@ -1,410 +0,0 @@ - "failed_general", - 'message' => WERNIS_API_REQUEST_DATA_INVALID - ); - } // END - if - - // Is the API id and MD5 hash there? - if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) { - // Abort here... - return array( - 'status' => "failed_general", - 'message' => WERNIS_API_REQUEST_DATA_MISSING - ); - } // END - if - - // Add more request data - $requestData['api_id'] = bigintval($_CONFIG['wernis_api_id']); - $requestData['api_key'] = $_CONFIG['wernis_api_md5']; - - // Construct the request string - $requestString = $_CONFIG['wernis_api_url'] . $scriptName; - - // Get the raw response from the lower function - $response = POST_URL($requestString, $requestData); - - // Check the response header if all is fine - if (strpos($response[0], "200") === false) { - // Something bad happend... :( - return array( - 'status' => "request_error", - 'message' => sprintf(WERNIS_API_REQUEST_ERROR, $response[0]) - ); - } // END - if - - // All (maybe) fine so remove the response header from server - $response = $response[(count($response) - 1)]; - - // Prepare the returning result for higher functions - if (substr($response, 0, 1) == "&") { - // Remove the leading & (which can be used in Flash) - $response = substr($response, 1); - } // END - if - - // Bring back the response - $data = explode("=", $response); - - // Default return array (should not stay empty) - $return = array(); - - // We use only the first two entries (which shall be fine) - if ($data[0] === "error") { - // The request has failed... :( - switch ($data[1]) { - case "404": // Invalid API ID - case "AUTH": // Authorization has failed - $return = array( - 'status' => "auth_failed", - 'message' => WERNIS_API_REQUEST_FAILED_AUTH - ); - break; - - case "LOCKED": // User account is locked! - case "PASS": // Bad passphrase entered - case "USER": // Missing account or invalid password - $return = array( - 'status' => "user_failed", - 'message' => WERNIS_API_REQUEST_FAILED_USER - ); - break; - - case "OWN": // Transfer to own account - $return = array( - 'status' => "own_failed", - 'message' => WERNIS_API_REQUEST_FAILED_OWN - ); - break; - - case "AMOUNT": // Amount is depleted - $return = array( - 'status' => "amount_failed", - 'message' => WERNIS_API_REQUEST_FAILED_AMOUNT - ); - break; - - case "AMOUNT-SEND": // API amount is depleted - $return = array( - 'status' => "api_amount_failed", - 'message' => WERNIS_API_REQUEST_FAILED_API_AMOUNT - ); - break; - - default: // Unknown error (maybe new?) - $return = array( - 'status' => "request_failed", - 'message' => sprintf(WERNIS_API_REQUEST_FAILED, $data[1]) - ); - break; - } - } else { - // All fine here - $return = array( - 'status' => "OK", - 'response' => $response - ); - } - - // Return the result - return $return; -} - -// Tests the function by calling balance.php on the API -function WERNIS_TEST_API () { - // Get config first - global $_CONFIG; - $result = false; - - // Return the result from the lower functions - $return = WERNIS_SEND_REQUEST("balance.php"); - - if ($return['status'] == "OK") { - // All fine! - $result = true; - } else { - // Status failture text - WERNIS_STATUS_MESSAGE($return['message'], $return['status']); - } - - // Return result - return $result; -} - -// Widthdraw this amount -function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { - global $_CONFIG; - - // Is the sponsor extension installed? - if (!EXT_IS_ACTIVE("sponsor")) { - // No, abort here - return false; - } elseif (!IS_SPONSOR()) { - // No sponsor, not allowed to withdraw! - return false; - } - - // Default is failed attempt - $result = false; - - // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_WITHDRAW, $GLOBALS['userid']))."\";"; - eval($eval); - - // Prepare the request data - $requestData = array( - 'sub_request' => "receive", - 't_uid' => bigintval($wdsId), - 't_md5' => $userMd5, - 'r_uid' => $_CONFIG['wernis_refid'], - 'amount' => bigintval($amount), - 'purpose' => urlencode(base64_encode($purpose)) - ); - - // Return the result from the lower functions - $return = WERNIS_SEND_REQUEST("book.php", $requestData); - - if ($return['status'] == "OK") { - // All fine! - $result = true; - - // Log the transfer - WERNIS_LOG_TRANSFER($wdsId, $amount, 'IN'); - } else { - // Status failture text - WERNIS_STATUS_MESSAGE($return['message'], $return['status']); - - // Log the transfer - WERNIS_LOG_TRANSFER($wdsId, $amount, 'FAILED', $return['message'], $return['status']); - } - - // Return result - return $result; -} - - -// Payout this amount -function WERNIS_EXECUTE_PAYOUT ($wdsId, $userMd5, $amount) { - global $_CONFIG; - - // Default is failed attempt - $result = false; - - // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";"; - eval($eval); - - // Prepare the request data - $requestData = array( - 'sub_request' => "send", - 't_uid' => bigintval($wdsId), - 't_md5' => $userMd5, - 'r_uid' => $_CONFIG['wernis_refid'], - 'amount' => bigintval($amount), - 'purpose' => urlencode(base64_encode($purpose)) - ); - - // Return the result from the lower functions - $return = WERNIS_SEND_REQUEST("book.php", $requestData); - - if ($return['status'] == "OK") { - // All fine! - $result = true; - - // Log the transfer - WERNIS_LOG_TRANSFER($wdsId, $amount, 'OUT'); - } else { - // Status failture text - WERNIS_STATUS_MESSAGE($return['message'], $return['status']); - - // Log the transfer - WERNIS_LOG_TRANSFER($wdsId, $amount, 'FAILED', $return['message'], $return['status']); - } - - // Return result - return $result; -} - -// Translate the status IN/OUT -function WERNIS_TRANSFER_STATUS ($status) { - // Default status - $return = sprintf(WERNIS_STATUS_UNKNWOWN, $status); - switch ($status) { - case "IN": // Withdraw - $return = WERNIS_STATUS_WITHDRAW; - break; - - case "OUT": // Payout - $return = WERNIS_STATUS_PAYOUT; - break; - - case "FAILED": // Payout - $return = WERNIS_STATUS_FAILED; - break; - } - - // Return the status - return $return; -} - -// Log the transfer -function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") { - // Register this wernis movement - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES(%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", - array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__); -} - -// Take fees and factor -function WERNIS_TAKE_FEE ($points, $mode) { - global $_CONFIG; - - // Payout or withdraw are allowed modes! - //* DEBUG: */ echo "mode={$mode},points={$points}
\n"; - if (!in_array($mode, array('payout', 'withdraw'))) { - // Log error and abort - DEBUG_LOG(__FUNCTION__.":uid={$GLOBALS['userid']},mode={$mode},points={$points}"); - return false; - } // END - if - - // Is there a percentage or fixed fee? - if ($_CONFIG['wernis_'.$mode.'_fee_percent'] > 0) { - // Percentage fee - $points -= $points * $_CONFIG['wernis_'.$mode.'_fee_percent'] / 100; - } elseif ($_CONFIG['wernis_'.$mode.'_fee_fix'] > 0) { - // Fixed fee - $points -= $_CONFIG['wernis_'.$mode.'_fee_fix']; - } - - // Divide/multiply the factor - if ($mode == "payout") { - // Divide for payout - $points = $points / $_CONFIG['wernis_payout_factor']; - } else { - // Multiply for withdraw - $points = $points * $_CONFIG['wernis_withdraw_factor']; - } - - // Return value - //* DEBUG: */ echo "mode={$mode},points={$points}
\n"; - return $points; -} - -// Add withdraw fees and factor -function WERNIS_ADD_WITHDRAW_FEE ($points) { - global $_CONFIG; - - // Is there a percentage or fixed fee? - if ($_CONFIG['wernis_withdraw_fee_percent'] > 0) { - // Percentage fee - $points += $points * $_CONFIG['wernis_withdraw_fee_percent'] / 100; - } elseif ($_CONFIG['wernis_withdraw_fee_fix'] > 0) { - // Fixed fee - $points += $_CONFIG['wernis_withdraw_fee_fix']; - } - - // Return value - return $points; -} - -// Add all fees to the array -function WERNIS_ADD_FEES_TO_ARRAY (&$array) { - global $_CONFIG; - - // Is the array an array? ;-) - if (!is_array($array)) { - // Log error and return - DEBUG_LOG(__FUNCTION__.": Type ".gettype($array)." != array."); - return; - } // END - if - - // Add both factors - $array['payout_factor'] = TRANSLATE_COMMA($_CONFIG['wernis_payout_factor']); - $array['withdraw_factor'] = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_factor']); - - // Add all fees - $array['payout_fee_percent'] = TRANSLATE_COMMA($_CONFIG['wernis_payout_fee_percent']); - $array['withdraw_fee_percent'] = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_fee_percent']); - $array['payout_fee_fix'] = TRANSLATE_COMMA($_CONFIG['wernis_payout_fee_fix']); - $array['withdraw_fee_fix'] = TRANSLATE_COMMA($_CONFIG['wernis_withdraw_fee_fix']); -} - -// -?> diff --git a/inc/load_cache.php b/inc/load_cache.php deleted file mode 100644 index fad1bdde22..0000000000 --- a/inc/load_cache.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/load_extensions.php b/inc/load_extensions.php deleted file mode 100644 index 8d69d37d79..0000000000 --- a/inc/load_extensions.php +++ /dev/null @@ -1,322 +0,0 @@ - 'Y'); // KEEP THIS ALWAYS ACTIVE! -} else { - // Initialize array for "always keep active extensions" - $cacheArray['active_extensions'] = array(); -} - -// -// Load extensions -// -if (EXT_IS_ACTIVE("cache")) { - // Load cache extension alone - include_once(PATH."inc/libs/cache_functions.php"); - $cacheMode = ""; - include_once(PATH."inc/extensions/ext-cache.php"); - switch($cacheInstance->cache_file("extensions", true)) { - case true : $cacheMode = "load"; break; - case false: $cacheMode = "init"; break; - } - - // Do not recreate cache file when it's switched off! - if (($cacheMode == "init") && ($_CONFIG['cache_exts'] == "N")) $cacheMode = "skip"; -} else { - // Cache extension not active - $cacheMode = "no"; -} - -if ($cacheMode == "load") { - // Init include array - $EXT_POOL = array(); - - // Re-initialize handler - $cacheInstance->cache_file("extensions", true); - - // Load extension data from cache file - $EXT_DUMMY = $cacheInstance->cache_load(); - - // Begin with the cache preparation of extensions - $EXT_NAMES = array(); - foreach ($EXT_DUMMY['ext_name'] as $k => $name) { - // Load functions file - if ($EXT_DUMMY['ext_funcs'][$k] == "Y") { - require_once(PATH."inc/libs/".$name."_functions.php"); - } // END - if - - // Load Language file - if ($EXT_DUMMY['ext_lang'][$k] == "Y") { - $INC = sprintf("%sinc/language/%s_%s.php", PATH, $name, GET_LANGUAGE()); - if (FILE_READABLE($INC)) { - // Add it - $EXT_POOL[] = $INC; - } - } // END - if - - // Load CSS file - if ($EXT_DUMMY['ext_css'][$k] == "Y") $EXT_CSS_FILES[] = "".$name.".css"; - - // Load extension file itself - if (($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) { - $EXT_POOL[] = sprintf("%sinc/extensions/ext-%s.php", PATH, $name); - } // END - if - - // Version number - $EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k]; - unset($EXT_DUMMY['ext_version'][$k]); - // Extension is active - $EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k]; - unset($EXT_DUMMY['ext_active'][$k]); - // Ext menu - $EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k]; - unset($EXT_DUMMY['ext_menu'][$k]); - // Extension id - $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k]; - $id = $EXT_DUMMY['ext_id'][$name]; - unset($EXT_DUMMY['ext_id'][$k]); - - // Add ext name - $EXT_NAMES[$id] = $name; - - // Mark it as active extension - $cacheArray['active_extensions']['$name'] = $EXT_DUMMY['ext_keep'][$k]; - unset($EXT_DUMMY['ext_keep'][$k]); - - // Remove unneccessary data from memory - unset($EXT_DUMMY['ext_lang'][$k]); - unset($EXT_DUMMY['ext_css'][$k]); - unset($EXT_DUMMY['ext_funcs'][$k]); - } // END - foreach - - // Write dummy array back - $EXT_DUMMY['ext_name'] = $EXT_NAMES; - unset($EXT_NAMES); - - // Close cache file - $cacheInstance->cache_close(); - - // Loading cache is done so let's free some memory! - unset($EXT_DUMMY['ext_lang']); - unset($EXT_DUMMY['ext_keep']); - unset($EXT_DUMMY['ext_css']); - unset($EXT_DUMMY['ext_funcs']); - $cacheArray['extensions'] = $EXT_DUMMY; - unset($EXT_DUMMY); - - // No database load needed - $res_ext_crt = false; - - // Load more cache files (like admins) - require_once(PATH."inc/load_cache.php"); - - // Load all extension files - foreach ($EXT_POOL as $inc) { - require_once($inc); - } // END - foreach - - // Remove array - unset($EXT_POOL); -} else { - // If current user is not admin load only activated extensions - // The admin shall use every available extension for testing purposes - if ((!IS_ADMIN()) && ($cacheMode != "init")) $ADD = " WHERE ext_active='Y'"; - - if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { - // Query with CSS file from DB - $res_ext_crt = SQL_QUERY("SELECT id, ext_name, ext_lang_file, ext_has_css, ext_active, ext_version -FROM "._MYSQL_PREFIX."_extensions".$ADD." -ORDER BY ext_name", __FILE__, __LINE__); - } else { - // Old obsulete query string - $res_ext_crt = SQL_QUERY("SELECT id, ext_name, ext_lang_file, ext_name, ext_active, ext_version -FROM "._MYSQL_PREFIX."_extensions".$ADD." -ORDER BY ext_name", __FILE__, __LINE__); - } -} - -// Array for removed but not uninstalled extensions -$DEL = array(); - -// At least one found? -if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == "no")) && ($CSS != "1") && ($CSS != "-1")) { - // Load theme management - require_once(PATH."inc/theme-manager.php"); - - // If we need to init the cache init it now - if ($cacheMode == "init") $cacheInstance->cache_init("EXTENSIONS"); - - // Extensions are registered so we load them - while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) { - // Get menu entry - $menu = "N"; - if (MODULE_HAS_MENU($name, true)) { - $menu = "Y"; - } // END - if - - // Load extensions - $file1 = sprintf("%sinc/extensions/ext-%s.php", PATH, $name); - $file2 = $file1; $EXT_CSS = "N"; $EXT_ALWAYS_ACTIVE = "N"; - - // Special functions file - $file3 = sprintf("%sinc/libs/%s_functions.php", PATH, $name); - - // Does the extension file exists? - if (FILE_READABLE($file1)) { - // If there's no language file specified we don't need to load one... ;-) - if (!empty($lang)) { - // Create language file - $file2 = sprintf("%sinc/language/%s_%s.php", PATH, $lang, GET_LANGUAGE()); - } - - if (FILE_READABLE($file3)) { - // Special functions file - $funcs = "Y"; - require_once($file3); - } else { - // Don't load functions file - $funcs = "N"; - } - - // Do we need a language file? - if (($file1 != $file2) && (FILE_READABLE($file2))) { - // Load language file - $lang = "Y"; - include($file2); - } else { - // Don't load language file - $lang = "N"; - } - - // Load extension - if ($name != "sql_patches") { - // Load extension's file - include_once($file1); - } else { - // KEEP sql_patches ALWAYS ACTIVE! - $EXT_ALWAYS_ACTIVE = "Y"; - } - - if ($css == "Y") { - $CSS_FILE = sprintf("%stheme/%s/css/%s.css", PATH, GET_CURR_THEME(), $name); - if (FILE_READABLE($CSS_FILE)) { - // CSS file for extension was found (use only relative path for now!) - $EXT_CSS_FILES[] = $name.".css"; - } else { - // Don't load CSS file - $css = "N"; - } - } // END - if - - // Add cache row - if ($cacheMode == "init") { - $cacheInstance->add_row(array( - 'ext_id' => $EXT_ID, - 'ext_name' => $name, - 'ext_lang' => $lang, - 'ext_css' => $css, - 'ext_menu' => $menu, - 'ext_funcs' => $funcs, - 'ext_active' => $active, - 'ext_version' => $version, - 'ext_keep' => $EXT_ALWAYS_ACTIVE, - )); - } elseif ($cacheMode == "no") { - // Remember this value for later usage - $cacheArray['active_extensions'][$name] = $EXT_ALWAYS_ACTIVE; - } - } elseif (!FILE_READABLE($file1)) { - // Deleted extension file so we mark it for removal from DB - $DEL[] = $name; - } - } // END - while - - if ($cacheMode == "init") { - // Close cache file - $cacheInstance->cache_close(); - - // Load more cache files (like admins) - require_once(PATH."inc/load_cache.php"); - } // END - if - - // Free memory - SQL_FREERESULT($res_ext_crt); -} - -// Load include files if found -if (!empty($INC_POOL[0])) { - foreach ($INC_POOL as $inc) { - require_once($inc); - } // END - foreach - - // Remove array - unset($INC_POOL); -} // END - if - -// Uninstall extensions that are no longer in our system -if (!empty($DEL[0])) { - // Remove extensions from two tables: extension registry and tasks table - foreach ($DEL as $name) { - // First remove entry from extensions table - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", - array($name), __FILE__, __LINE__); - - // Remove (maybe?) found tasks (main task and possible updates - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')", - array($name), __FILE__, __LINE__); - } // END - foreach - - // I think it's not neccessary to run the optimization function here - // because we didn't delete so much data from database. Can you aggree? -} // END - if - -// -?> diff --git a/inc/loader/.htaccess b/inc/loader/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/loader/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php deleted file mode 100644 index 9210709caa..0000000000 --- a/inc/loader/load_cache-admin.php +++ /dev/null @@ -1,166 +0,0 @@ -cache_file("admins", true) == true) && ($cacheInstance->ext_version_matches("admins"))) { - // Load cache - global $cacheArray; - $cacheArray['admins'] = $cacheInstance->cache_load(); - - // Check if valid - if ((is_array($cacheArray['admins']['login'])) && (is_array($cacheArray['admins']['aid']))) { - // Check count - if (count($cacheArray['admins']['login']) == count($cacheArray['admins']['aid'])) { - //* DEBUG: */ echo "
";
-			//* DEBUG: */ print_r($cacheArray['admins']);
-
-			// The cache file seems to be fine
-			foreach ($cacheArray['admins']['login'] as $k => $login) {
-				// Rewrite default_acl
-				$cacheArray['admins']['aid'][$login]      = $cacheArray['admins']['aid'][$k];
-				$cacheArray['admins']['password'][$login] = $cacheArray['admins']['password'][$k];
-				$cacheArray['admins']['email'][$login]    = $cacheArray['admins']['email'][$k];
-
-				// Some extra data depending on version
-				if (GET_EXT_VERSION("admins") >= "0.3") {
-					$cacheArray['admins']['def_acl'][$login]  = $cacheArray['admins']['def_acl'][$k];
-					if (GET_EXT_VERSION("admins") >= "0.6.7") {
-						$cacheArray['admins']['la_mode'][$login]  = $cacheArray['admins']['la_mode'][$k];
-						if (GET_EXT_VERSION("admins") >= "0.7.0") {
-							$cacheArray['admins']['login_failtures'][$login] = $cacheArray['admins']['login_failtures'][$k];
-							$cacheArray['admins']['last_failture'][$login]   = $cacheArray['admins']['last_failture'][$k];
-						} // END - if
-					} // END - if
-				} // END - if
-
-				//* DEBUG: */ print_r($cacheArray['admins']);
-
-				// Clear array
-				foreach (array('aid', 'def_acl', 'la_mode', 'password', 'email', 'login_failtures', 'last_failture') as $rem) {
-					if (isset($cacheArray['admins'][$rem][$k])) unset($cacheArray['admins'][$rem][$k]);
-				} // END - foreach
-			} // END - if
-
-			//* DEBUG: */ print_r($cacheArray['admins']);
-
-			// Rewrite Login
-			foreach ($cacheArray['admins']['login'] as $k => $login) {
-				$cacheArray['admins']['login'][$cacheArray['admins']['aid'][$login]] = $login;
-				if (!in_array($k, $cacheArray['admins']['aid'])) {
-					unset($cacheArray['admins']['login'][$k]);
-				} // END - if
-			} // END - foreach
-
-			//* DEBUG: */ echo "****\n";
-			//* DEBUG: */ print_r($cacheArray['admins']);
-			//* DEBUG: */ echo "
"; - //* DEBUG: */ die(); - } else { - // Nope, cache file is corrupted! - $cacheInstance->cache_destroy(); - } - } else { - // Nope, cache file is corrupted! - $cacheInstance->cache_destroy(); - unset($cacheArray['admins']); - } -} elseif (($_CONFIG['cache_admins'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file - $cacheInstance->cache_init("ADMINS"); - $cacheInstance->store_extension_version("admins"); - - // Load every data from DB to cache file - $ADD = ", id, id"; - if (GET_EXT_VERSION("admins") >= "0.3") $ADD = ", default_acl AS def_acl"; - if (GET_EXT_VERSION("admins") >= "0.6.7") $ADD .= ", la_mode"; - if (GET_EXT_VERSION("admins") >= "0.7.0") $ADD .= ", login_failtures, UNIX_TIMESTAMP(last_failture) AS last_failture"; - - // Query the database about this - $result_admins = SQL_QUERY("SELECT id AS aid, login, password, email".$ADD." -FROM "._MYSQL_PREFIX."_admins -ORDER BY login", __FILE__, __LINE__); - while($dummy = SQL_FETCHARRAY($result_admins)) { - // Save row - $cacheInstance->add_row($dummy); - } // END - while - - // Free memory - SQL_FREERESULT($result_admins); - - // Close cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// Next cached table are the admins_acls... -if (GET_EXT_VERSION("admins") >= "0.3") { - // Check for cache file - if ($cacheInstance->cache_file("admins_acls", true) == true) { - // Load referral system from cache - global $cacheArray; - $cacheArray['admin_acls'] = $cacheInstance->cache_load(); - } elseif (($_CONFIG['cache_acls'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("ADMINS_ACLS"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Reload the cache - require(__FILE__); - } - - // Close file - $cacheInstance->cache_close(); -} // END - if - -// -?> diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php deleted file mode 100644 index 8139855b7f..0000000000 --- a/inc/loader/load_cache-config.php +++ /dev/null @@ -1,70 +0,0 @@ -cache_file("config", true) == true) { - // Load config from cache - global $cacheArray; - $cacheArrayConfig = $cacheInstance->cache_load(); -} elseif (($_CONFIG['cache_config'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("CONFIG"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX."_config ORDER BY config", __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// -?> diff --git a/inc/loader/load_cache-modreg.php b/inc/loader/load_cache-modreg.php deleted file mode 100644 index ed6797493d..0000000000 --- a/inc/loader/load_cache-modreg.php +++ /dev/null @@ -1,102 +0,0 @@ -cache_file("mod_reg", true) == true) { - // Load cache - global $cacheArray; - $cacheArray['modules'] = $cacheInstance->cache_load(); - - // Rewrite module cache - $modArray = $cacheArray['modules']; - foreach ($modArray['module'] as $key => $mod) { - $cacheArray['modules']['id'][$mod] = $modArray['id'][$key]; - unset($cacheArray['modules']['id'][$key]); - $cacheArray['modules']['title'][$mod] = $modArray['title'][$key]; - unset($cacheArray['modules']['title'][$key]); - $cacheArray['modules']['locked'][$mod] = $modArray['locked'][$key]; - unset($cacheArray['modules']['locked'][$key]); - $cacheArray['modules']['hidden'][$mod] = $modArray['hidden'][$key]; - unset($cacheArray['modules']['hidden'][$key]); - $cacheArray['modules']['admin_only'][$mod] = $modArray['admin_only'][$key]; - unset($cacheArray['modules']['admin_only'][$key]); - $cacheArray['modules']['mem_only'][$mod] = $modArray['mem_only'][$key]; - unset($cacheArray['modules']['mem_only'][$key]); - if (isset($cacheArray['modules']['has_menu'][$key])) { - $cacheArray['modules']['has_menu'][$mod] = $modArray['has_menu'][$key]; - unset($cacheArray['modules']['has_menu'][$key]); - } // END - if - } // END - foreach - unset($modArray); -} elseif (($_CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("MODULES"); - - // Load all modules and their data - if (GET_EXT_VERSION("sql_patches") >= "0.3.6") { - // Load has_menu - $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only, has_menu -FROM "._MYSQL_PREFIX."_mod_reg ORDER BY id", __FILE__, __LINE__); - } else { - // Don't load has_menu - $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only -FROM "._MYSQL_PREFIX."_mod_reg ORDER BY id", __FILE__, __LINE__); - } - - // Cache all data - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// -?> diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php deleted file mode 100644 index 7d8c1aaa37..0000000000 --- a/inc/loader/load_cache-refdepths.php +++ /dev/null @@ -1,70 +0,0 @@ -cache_file("refdepths", true) == true) { - // Load referral system from cache - global $cacheArray; - $cacheArray['ref_depths'] = $cacheInstance->cache_load(); -} elseif (($_CONFIG['cache_refdepth'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("REFDEPTHS"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT id, level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// -?> diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php deleted file mode 100644 index 1a6ad2d61e..0000000000 --- a/inc/loader/load_cache-refsystem.php +++ /dev/null @@ -1,70 +0,0 @@ -cache_file("refsystem", true) == true) { - // Load referral system from cache - global $cacheArray; - $cacheArray['ref_system'] = $cacheInstance->cache_load(); -} elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("REFSYSTEM"); - - // Load all modules and their data - $result = SQL_QUERY("SELECT id, userid, level, counter FROM "._MYSQL_PREFIX."_refsystem ORDER BY userid, level", __FILE__, __LINE__); - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// -?> diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php deleted file mode 100644 index f67cc108a5..0000000000 --- a/inc/loader/load_cache-them.php +++ /dev/null @@ -1,95 +0,0 @@ -cache_file("themes", true) == true) && ($cacheInstance->ext_version_matches("theme"))) { - // Load referral system from cache - global $cacheArray; - $cache = $cacheInstance->cache_load(); - - // Restructure the array - $cacheArray['themes'] = array(); - foreach ($cache as $key => $data) { - // Skip "theme_path" because we don't need to rebuild it - if ($key == "theme_path") { - // Add entries with id - foreach ($data as $id => $entry) { - $cacheArray['themes']['theme_path'][$cache['id'][$id]] = $entry; - } // END - foreach - } else { - // Add all themes with theme name as array index - foreach ($data as $id => $entry) { - $cacheArray['themes'][$key][$cache['theme_path'][$id]] = $entry; - } // END - foreach - } - } // END - if - - // Remove dummy array - unset($cache); -} elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) { - // Create cache file here - $cacheInstance->cache_init("THEMES"); - $cacheInstance->store_extension_version("theme"); - - // Load all themes and their data - if (GET_EXT_VERSION("theme") >= "0.0.7") { - $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__); - } else { - $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver FROM "._MYSQL_PREFIX."_themes ORDER BY id", __FILE__, __LINE__); - } - while ($data = SQL_FETCHARRAY($result)) { - // Add row to cache file - $cacheInstance->add_row($data); - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Close the cache - $cacheInstance->cache_close(); - - // Reload the cache - require(__FILE__); -} - -// Close file -$cacheInstance->cache_close(); - -// -?> diff --git a/inc/mails/.htaccess b/inc/mails/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/mails/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/mails/_mails.php b/inc/mails/_mails.php deleted file mode 100644 index 2032d04786..0000000000 --- a/inc/mails/_mails.php +++ /dev/null @@ -1,47 +0,0 @@ - diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php deleted file mode 100644 index 06ed2b85de..0000000000 --- a/inc/mails/beg_mails.php +++ /dev/null @@ -1,167 +0,0 @@ - 0 AND beg_ral_en_notify < beg_ral_di_notify)"; - $MODE = "en"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; - -case 'N': // Begging rallye is deactivated - if ($_CONFIG['beg_ral_di_notify'] == "Y") - { - // Okay, let's check for member accounts - $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify"; - $MODE = "di"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; -} - -if (!empty($SQL)) -{ - // The SQL command needs to be finisched here (only confirmed accounts!) - $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; - - // Prepare data for the template - define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'])); - define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points_max'])); - define('__BEG_MAX_WINNERS', round($_CONFIG['beg_ranks'])); - if ($_CONFIG['beg_ip_timeout'] == 0) - { - // No IP locking setuped! - define('__BEG_IP_LOCKER', BEG_NO_LIMITATION); - } - else - { - // Create timemark - define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($_CONFIG['beg_ip_timeout'])); - } - - // Check for accounts to be notified - $result_main = SQL_QUERY($SQL, __FILE__, __LINE__); - if (SQL_NUMROWS($result_main) > 0) - { - // Normal notification mails or bonus mails? - $MAIL_MODE = (($_CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); - - // Generate subject line - $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;"; - eval($eval); - - // Load message body for bonus mails - $MSG = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", "", "{PER}uid{PER}"); - $RECEIVER = ""; $UIDs = array(); - - // Okay lets notify all users! - while(list($uid, $email) = SQL_FETCHROW($result_main)) - { - // Update account - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data -SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", - array(time(), $MODE, time(), $uid), __FILE__, __LINE__); - - // Load email template and send it to the user! - if ($MAIL_MODE) - { - // Add userid to queue - $UIDs[] = $uid; - } - else - { - // Send normal notification mail to the members - $MSG = LOAD_EMAIL_TEMPLATE("beg_".$MODE."_notify", array(), $uid); - SEND_EMAIL($email, $SUBJECT, $MSG); - } - } - - // Shall I send out bonus mails? - if ($MAIL_MODE) - { - // Okay, make array to string - $RECEIVER = implode(";", $UIDs); - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus -(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) -VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(), '%s','%s','%s','%s','Y')", - array( - $SUBJECT, - $MSG, - $RECEIVER, - $_CONFIG['beg_notify_bonus'], - $_CONFIG['beg_notify_wait'], - URL."/modules.php?module=index&what=login", - 0, - SELECTION_COUNT(explode(";", $RECEIVER)), - SQL_NUMROWS($result_main), -), __FILE__, __LINE__); - } - } - - // Free memory - SQL_FREERESULT($result_main); -} - -// -?> diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php deleted file mode 100644 index e4b9716e83..0000000000 --- a/inc/mails/birthday_mails.php +++ /dev/null @@ -1,111 +0,0 @@ - 0)) { - $ADD = " AND last_online >= (UNIX_TIMESTAP() - %s)"; - $VALUE = $_CONFIG['ap_inactive_since']; -} - -// Only confirmed members shall receive birthday mails... -$result_birthday = SQL_QUERY_ESC("SELECT userid, email, birth_year -FROM "._MYSQL_PREFIX."_user_data -WHERE status='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".($_CONFIG['one_day'] * 364).")".$ADD." -ORDER BY userid", - array($DAY, $MONTH, $VALUE), __FILE__, __LINE__); - -if (SQL_NUMROWS($result_birthday) > 0) { - // Start sending out birthday mails - while (list($uid, $email, $byear) = SQL_FETCHROW($result_birthday)) { - // Calculate own timestamp for birthday and today - $BD = $byear + 12 * $MONTH + 365 * $DAY; - $NOW = $YEAR + 12 * $MONTH + 365 * $DAY; - - // Simply subtract both values and you got the age... :) - $AGE = $NOW - $BD; - - if ($_CONFIG['birthday_points'] > 0) { - // Prepare array for loading template - $content = array( - 'age' => $AGE, - 'points' => $_CONFIG['birthday_points'], - 'check' => "", - ); - - for ($idx = 0; $idx < 4; $idx++) { - $content['check'] .= GEN_RANDOM_CODE("8", rand(0, "$MONTH$DAY"), $uid, ($AGE*($idx+1))); - } - - // Insert row into database - $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s','%s','%s' )", - array(bigintval($uid), $_CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); - - // Load email template with confirmation link - $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid)); - } else { - // Load default email template and fill in the age - $msg = LOAD_EMAIL_TEMPLATE("member_birthday", $AGE, $uid); - } - - // Send email - SEND_EMAIL($email, HAPPY_BIRTHDAY, $msg); - - // Remember him that he has received a birthday mail - $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); - } - - // Free memory - SQL_FREERESULT($result); -} - -// -?> diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php deleted file mode 100644 index 8634d0a496..0000000000 --- a/inc/mails/bonus_mails.php +++ /dev/null @@ -1,151 +0,0 @@ - 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; - $MODE = "en"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; - -case 'N': // Active rallye is deactivated - if ($_CONFIG['bonus_di_notify'] == "Y") - { - // Okay, let's check for member accounts - $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; - $MODE = "di"; - } - else - { - // Do not notify! - $SQL = ""; - } - break; -} - -if (!empty($SQL)) -{ - // The SQL command needs to be finisched here (only confirmed accounts!) - $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; - - // Normal notification mails or bonus mails? - $MAIL_MODE = (($_CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); - - // Generate subject line - $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;"; - eval($eval); - - // Load message body for bonus mails - $MSG = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", "", "{PER}uid{PER}"); - $RECEIVER = ""; $UIDs = array(); - - // Check for accounts to be notified - $result_main = SQL_QUERY($SQL, __FILE__, __LINE__); - if (SQL_NUMROWS($result_main) > 0) - { - // Okay lets notify all users! - while(list($uid, $email) = SQL_FETCHROW($result_main)) - { - // Update account - $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data -SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", - array(time(), $MODE, time(), $uid), __FILE__, __LINE__); - - // Load email template and send it to the user! - if ($MAIL_MODE) - { - // Add userid to queue - $UIDs[] = $uid; - } - else - { - // Send normal notification mail to the members - $MSG = LOAD_EMAIL_TEMPLATE("bonus_".$MODE."_notify", array(), $uid); - SEND_EMAIL($email, $SUBJECT, $MSG); - } - } - - // Shall I send out bonus mails? - if ($MAIL_MODE) - { - // Okay, make array to string - $RECEIVER = implode(";", $UIDs); - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus -(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, is_notify) -VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(), '%s','%s','%s','%s','Y')", - array( - $SUBJECT, - $MSG, - $RECEIVER, - $_CONFIG['bonus_notify_points'], - $_CONFIG['bonus_notify_wait'], - URL."/modules.php?module=index&what=login", - 0, - SELECTION_COUNT(explode(";", $RECEIVER)), - SQL_NUMROWS($result_main), -), __FILE__, __LINE__); - } - } - - // Free memory - SQL_FREERESULT($result_main); -} -// -?> diff --git a/inc/modules/.htaccess b/inc/modules/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/modules/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/modules/admin.php b/inc/modules/admin.php deleted file mode 100644 index 515c745ee9..0000000000 --- a/inc/modules/admin.php +++ /dev/null @@ -1,401 +0,0 @@ - SQL_ESCAPE($_POST['hash']), - 'login' => SQL_ESCAPE($_POST['login']) - ); - - // Validation okay so display form for final password change - LOAD_TEMPLATE("admin_reset_password_form", false, $content); - } else { - // Cannot validate the login data and hash - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED); - } - } elseif ((isset($_POST['reset_pass'])) && (!empty($_POST['hash'])) && (!empty($_POST['login'])) && (!empty($_POST['pass1'])) && ($_POST['pass1'] == $_POST['pass2'])) { - // Okay, we shall the admin password here. So first revalidate the hash - if (ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN($_POST['hash'], $_POST['login'])) { - // Set the password now - $OUT = ADMIN_RESET_PASSWORD($_POST['login'], $_POST['pass1']); - - // Output result - LOAD_TEMPLATE("admin_reset_pass_done", false, $OUT); - } else { - // Validation failed - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2); - } - } else { - // Output reset password form - LOAD_TEMPLATE("admin_send_reset_link"); - } -} elseif ((!isSessionVariableSet('admin_login')) || (!isSessionVariableSet('admin_md5')) || (!isSessionVariableSet('admin_last')) || (!isSessionVariableSet('admin_to')) || ((get_session('admin_last') + bigintval(get_session('admin_to')) * 3600 * 24) < time())) { - // At leat one administrator account was created - if ((isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5')) && (isSessionVariableSet('admin_last')) && (isSessionVariableSet('admin_to'))) { - // Timeout for last login, we have to logout first! - $URL = URL."/modules.php?module=admin&action=login&logout=1"; - LOAD_URL($URL); - } - if (!empty($_GET['register'])) { - // Registration of first admin is done - if ($_GET['register'] == "done") OUTPUT_HTML("".ADMIN_REGISTER_DONE.""); - } // END - if - - // Check if the admin has submitted data or not - $ret = ""; - if ((isset($_POST['ok'])) && ((empty($_POST['login'])) || (empty($_POST['pass'])) || (strlen($_POST['pass']) < 4))) $_POST['ok'] = "***"; - if ((isset($_POST['ok'])) && ($_POST['ok'] != "***")) { - // All required data was entered so we check his account - $ret = CHECK_ADMIN_LOGIN($_POST['login'], $_POST['pass']); - - // Which status do we have? - switch ($ret) - { - case "done": // Admin and password are okay, so we log in now - // Construct URL and redirect - $URL = URL."/modules.php?module=admin&"; - - // Rewrite overview module - if ($GLOBALS['what'] == "overview") { - $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']); - } - - // Add data to URL - if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what']; - elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action']; - elseif (!empty($_GET['area'])) $URL .= "area=".$_GET['area']; - - // Load URL - LOAD_URL($URL); - break; - - case "404": // Administrator login not found - $_POST['ok'] = $ret; - $ret = ADMIN_NOT_FOUND; - break; - - case "pass": // Wrong password - $_POST['ok'] = $ret; - $ret = WRONG_PASS." [".ADMIN_RESET_PASS."]\n"; - break; - } - } - if ($ret != "done") { - if (!empty($_POST['login'])) { - define('__LOGIN_VALUE', $_POST['login']); - } else { - define('__LOGIN_VALUE', ""); - } - - if (isset($_POST['ok'])) { - // Set messages to zero - - $MSG1 = ""; $MSG2 = ""; - // No login entered? - if (empty($_POST['login'])) $MSG1 = ADMIN_NO_LOGIN; - - // An error comes back from login? - if ((!empty($ret)) && ($_POST['ok'] == "404")) $MSG1 = $ret; - - // No password entered? - if (empty($_POST['pass'])) $MSG2 = ADMIN_NO_PASS; - - // Or password too short? - if (strlen($_POST['pass']) < 4) $MSG2 = ADMIN_SHORT_PASS; - - // An error comes back from login? - if ((!empty($ret)) && ($_POST['ok'] == "pass")) $MSG2 = $ret; - - // Load message template - define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1)); - define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $MSG2)); - - // Reset variables - $MSG1 = ""; $MSG2 = ""; - } else { - // Set constants to empty for hiding them - define('__MSG_LOGIN', ""); - define('__MSG_PASS' , ""); - } - - // Load login form - if (!empty($GLOBALS['what'])) { - // Restore old what value - $content = array('target' => "what", 'value' => $GLOBALS['what']); - } elseif (!empty($GLOBALS['action'])) { - if ($GLOBALS['action'] != "logout") { - // Restore old action value - $content = array('target' => "action", 'value' => $GLOBALS['action']); - } else { - // Set default values - $content = array('target' => "action", 'value' => "login"); - } - } elseif (!empty($_GET['area'])) { - // Restore old area value - $content = array('target' => "area", 'value' => $_GET['area']); - } else { - // Set default values - $content = array('target' => "action", 'value' => "login"); - } - - // Load login form template - LOAD_TEMPLATE("admin_login_form", false, $content); - } -} elseif (isset($_GET['logout'])) { - // Only try to remove cookies - if (set_session("admin_login", "") && set_session("admin_md5", "") && set_session("admin_last", "") && set_session("admin_to", "")) { - // Also remove array elements - set_session('admin_login', ""); - set_session('admin_md5' , ""); - set_session('admin_last' , ""); - set_session('admin_to' , ""); - - // Destroy session - @session_destroy(); - - // Load logout template - if (isset($_GET['register'])) { - // Secure input - $register = SQL_ESCAPE($_GET['register']); - - // Special logout redirect for installation of given extension - LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register)); - } elseif (isset($_GET['remove'])) { - // Secure input - $remove = SQL_ESCAPE($_GET['remove']); - - // Special logout redirect for removal of given extension - LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove)); - } else { - // Logged out normally - LOAD_TEMPLATE("admin_logout"); - } - } else { - // Something went wrong here... - OUTPUT_HTML("".ADMIN_LOGOUT_FAILED.""); - - // Add fatal message - ADD_FATAL(CANNOT_UNREG_SESS); - } -} else { - // Maybe an Admin want's to login? - $ret = CHECK_ADMIN_COOKIES(get_session('admin_login'), get_session('admin_md5')); - switch ($ret) - { - case "done": - // Cookie-Data accepted - if ((set_session("admin_md5", get_session('admin_md5'))) && (set_session("admin_login", get_session('admin_login'))) && (set_session("admin_last", time())) && (set_session("admin_to", bigintval(get_session('admin_to'))))) { - // Ok, Cookie-Update done - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) { - // Check if action GET variable was set - $act = SQL_ESCAPE($GLOBALS['action']); - if (!empty($GLOBALS['what'])) { - // Get action value by what-value - $act = GET_ACTION("admin", $GLOBALS['what']); - } - - // Check for access control line of current menu entry - define('__ACL_ALLOW', ADMINS_CHECK_ACL($act, $GLOBALS['what'])); - } else { - // Extension not installed so it's always allowed to access everywhere! - define('__ACL_ALLOW', true); - } - - // When type of admin menu is not set fallback to old menu system - if (empty($_CONFIG['admin_menu'])) $_CONFIG['admin_menu'] = "OLD"; - - // Check for version and switch between old menu system and new "intelligent menu system" - if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (FILE_READABLE(PATH."inc/modules/admin/lasys-inc.php"))) { - // Default area is the entrance, of course - $area = "entrance"; - - // Check for similar URL variable - if (!empty($_GET['area'])) $area = SQL_ESCAPE($_GET['area']); - - // Load "logical-area menu-system" file - require_once(PATH."inc/modules/admin/lasys-inc.php"); - - // Create new-style menu system will "logical areas" - ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']); - } else { - // This little call constructs the whole default old and lacky menu system - // on left side - ADMIN_DO_ACTION($GLOBALS['what']); - } - } else { - // Login failed (cookies enabled?) - OUTPUT_HTML("".ADMIN_LOGIN_FAILED.""); - ADD_FATAL(CANNOT_RE_REGISTER_SESS); - } - break; - - case "404": // Administrator login not found - $_POST['ok'] = $ret; - ADD_FATAL(ADMIN_NOT_FOUND); - break; - - case "pass": // Wrong password - $_POST['ok'] = $ret; - ADD_FATAL(WRONG_PASS); - break; - } -} - -// -?> diff --git a/inc/modules/admin/.htaccess b/inc/modules/admin/.htaccess deleted file mode 100644 index 14249c50bd..0000000000 --- a/inc/modules/admin/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/inc/modules/admin/action- b/inc/modules/admin/action- deleted file mode 100644 index 81a2fcad9a..0000000000 --- a/inc/modules/admin/action- +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-admins.php b/inc/modules/admin/action-admins.php deleted file mode 100644 index 41ddf38a15..0000000000 --- a/inc/modules/admin/action-admins.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-bank.php b/inc/modules/admin/action-bank.php deleted file mode 100644 index 6bd915d001..0000000000 --- a/inc/modules/admin/action-bank.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-country.php b/inc/modules/admin/action-country.php deleted file mode 100644 index b78e4783b0..0000000000 --- a/inc/modules/admin/action-country.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-doubler.php b/inc/modules/admin/action-doubler.php deleted file mode 100644 index 2906a36e18..0000000000 --- a/inc/modules/admin/action-doubler.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-email.php b/inc/modules/admin/action-email.php deleted file mode 100644 index 3c2d83513e..0000000000 --- a/inc/modules/admin/action-email.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-holiday.php b/inc/modules/admin/action-holiday.php deleted file mode 100644 index 23a589444e..0000000000 --- a/inc/modules/admin/action-holiday.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-login.php b/inc/modules/admin/action-login.php deleted file mode 100644 index 9e7aed0ab0..0000000000 --- a/inc/modules/admin/action-login.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php deleted file mode 100644 index 2658ae6291..0000000000 --- a/inc/modules/admin/action-logout.php +++ /dev/null @@ -1,54 +0,0 @@ - diff --git a/inc/modules/admin/action-menu.php b/inc/modules/admin/action-menu.php deleted file mode 100644 index 4eb92e2966..0000000000 --- a/inc/modules/admin/action-menu.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-misc.php b/inc/modules/admin/action-misc.php deleted file mode 100644 index e05467eb80..0000000000 --- a/inc/modules/admin/action-misc.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-mods.php b/inc/modules/admin/action-mods.php deleted file mode 100644 index 6ce43d0164..0000000000 --- a/inc/modules/admin/action-mods.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-newsletter.php b/inc/modules/admin/action-newsletter.php deleted file mode 100644 index edfbc80e97..0000000000 --- a/inc/modules/admin/action-newsletter.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-payouts.php b/inc/modules/admin/action-payouts.php deleted file mode 100644 index 3f1c2aa47d..0000000000 --- a/inc/modules/admin/action-payouts.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-primera.php b/inc/modules/admin/action-primera.php deleted file mode 100644 index d310efdf4c..0000000000 --- a/inc/modules/admin/action-primera.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-rallye.php b/inc/modules/admin/action-rallye.php deleted file mode 100644 index c09a5b9097..0000000000 --- a/inc/modules/admin/action-rallye.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-repair.php b/inc/modules/admin/action-repair.php deleted file mode 100644 index cee773a524..0000000000 --- a/inc/modules/admin/action-repair.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-setup.php b/inc/modules/admin/action-setup.php deleted file mode 100644 index df957341fe..0000000000 --- a/inc/modules/admin/action-setup.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-sponsor.php b/inc/modules/admin/action-sponsor.php deleted file mode 100644 index 459607d7b7..0000000000 --- a/inc/modules/admin/action-sponsor.php +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/inc/modules/admin/action-stats.php b/inc/modules/admin/action-stats.php deleted file mode 100644 index 76c3ddf5fd..0000000000 --- a/inc/modules/admin/action-stats.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-surfbar.php b/inc/modules/admin/action-surfbar.php deleted file mode 100644 index c9eff8b4c3..0000000000 --- a/inc/modules/admin/action-surfbar.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php deleted file mode 100644 index 5c61f44d8f..0000000000 --- a/inc/modules/admin/action-task.php +++ /dev/null @@ -1,56 +0,0 @@ - diff --git a/inc/modules/admin/action-theme.php b/inc/modules/admin/action-theme.php deleted file mode 100644 index f923105a5c..0000000000 --- a/inc/modules/admin/action-theme.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-transfer.php b/inc/modules/admin/action-transfer.php deleted file mode 100644 index 2462908e26..0000000000 --- a/inc/modules/admin/action-transfer.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-user.php b/inc/modules/admin/action-user.php deleted file mode 100644 index 1cc7270823..0000000000 --- a/inc/modules/admin/action-user.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/action-wernis.php b/inc/modules/admin/action-wernis.php deleted file mode 100644 index 18e55d0e90..0000000000 --- a/inc/modules/admin/action-wernis.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php deleted file mode 100644 index 8e583b6436..0000000000 --- a/inc/modules/admin/admin-inc.php +++ /dev/null @@ -1,1287 +0,0 @@ -= "0.7.0") { - // Load them here - $data['login_failtures'] = $cacheArray['admins']['login_failtures'][$admin_login]; - $data['last_failture'] = $cacheArray['admins']['last_failture'][$admin_login]; - } // END - if - } elseif (EXT_IS_ACTIVE("cache")) { - $ADD = ""; - if (GET_EXT_VERSION("admins") >= "0.7.0") { - // Load them here - $ADD = ", login_failtures, UNIX_TIMESTAMP(last_failture) AS last_failture"; - } // END - if - - // Get password from DB - $result = SQL_QUERY_ESC("SELECT password".$ADD." FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", - array($admin_login), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Login password found - $ret = "pass"; - - // Fetch data - $data = SQL_FETCHARRAY($result); - } // END - if - - // Free result - SQL_FREERESULT($result); - } - - //* DEBUG: */ echo "*".$data['password']."/".md5($password)."/".$ret."
"; - if ((isset($data['password'])) && (strlen($data['password']) == 32) && ($data['password'] == md5($password))) { - // Generate new hash - $data['password'] = generateHash($password); - - // Is the sql_patches not installed, than we cannot have a valid hashed password here! - if (($ret == "pass") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done"; - } elseif ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) { - // Old hashing way - return $ret; - } elseif (!isset($data['password'])) { - // Password not found, so no valid login! - return $ret; - } - - // Generate salt of password - define('__SALT', substr($data['password'], 0, -40)); - $salt = __SALT; - - // Check if password is same - //* DEBUG: */ echo "*".$ret.",".$data['password'].",".$password.",".$salt."*
\n"; - if (($ret == "pass") && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) { - // Re-hash the plain passord with new random salt - $data['password'] = generateHash($password); - - // Do we have 0.7.0 of admins or later? - // Remmeber login failtures if available - if (GET_EXT_VERSION("admins") >= "0.7.0") { - // Store it in session - set_session('mxchange_admin_failtures', $data['login_failtures']); - set_session('mxchange_admin_last_fail', $data['last_failture']); - - // Update password and reset login failtures - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", - array($data['password'], $admin_login), __FILE__, __LINE__); - } else { - // Update password - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE login='%s' LIMIT 1", - array($data['password'], $admin_login), __FILE__, __LINE__); - } - - // Rebuild cache - REBUILD_CACHE("admins", "admin"); - - // Login has failed by default... ;-) - $ret = "failed"; - - // Password matches so login here - if (LOGIN_ADMIN($admin_login, $data['password'])) { - // All done now - $ret = "done"; - } // END - if - } elseif ((empty($salt)) && ($ret == "pass")) { - // Something bad went wrong - $ret = "failed"; - } elseif ($ret == "done") { - // Try to login here if we have the old hashing way (sql_patches not installed?) - if (!LOGIN_ADMIN($admin_login, $data['password'])) { - // Something went wrong - $ret = "failed"; - } // END - if - } - - // Count login failture if admins extension version is 0.7.0+ - if (($ret == "pass") && (GET_EXT_VERSION("admins") >= "0.7.0")) { - // Update counter - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failtures=login_failtures+1,last_failture=NOW() WHERE login='%s' LIMIT 1", - array($admin_login), __FILE__, __LINE__); - - // Rebuild cache - REBUILD_CACHE("admins", "admin"); - } // END - if - - // Return the result - //* DEBUG: */ die("RETURN=".$ret); - return $ret; -} - -// Try to login the admin by setting some session/cookie variables -function LOGIN_ADMIN ($adminLogin, $passHash) { - global $cacheInstance; - - // Reset failture counter on matching admins version - if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) { - // Reset counter on out-dated sql_patches version - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", - array($adminLogin), __FILE__, __LINE__); - - // Rebuild cache - REBUILD_CACHE("admins", "admin"); - } // END - if - - // Now set all session variables and return the result - return ( - ( - set_session("admin_md5", generatePassString($passHash)) - ) && ( - set_session("admin_login", $adminLogin) - ) && ( - set_session("admin_last", time()) - ) && ( - set_session("admin_to", bigintval($_POST['timeout'])) - ) - ); -} - -// Only be executed on cookie checking -function CHECK_ADMIN_COOKIES ($admin_login, $password) { - global $cacheArray, $_CONFIG; - $ret = "404"; $pass = ""; - - // Get hash - $pass = GET_ADMIN_HASH($admin_login); - if ($pass != "-1") $ret = "pass"; - - //* DEBUG: */ print __FUNCTION__."(".__LINE__."):".generatePassString($pass)."(".strlen($pass).")/".$password."(".strlen($password).")
\n"; - - // Check if password matches - if (($ret == "pass") && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) { - // Passwords matches! - $ret = "done"; - } - - // Return result - return $ret; -} -// -function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0) { - // Initialize some variables - $done = false; - $seek++; - $found = false; - - // Is the file there and read-/write-able? - if ((FILE_READABLE($file)) && (is_writeable($file))) { - $search = "CFG: ".$comment; - $tmp = $file.".tmp"; - - // Open the source file - $fp = @fopen($file, 'r') or OUTPUT_HTML("READ: ".$file."
"); - - // Is the resource valid? - if (is_resource($fp)) { - // Open temporary file - $fp_tmp = @fopen($tmp, 'w') or OUTPUT_HTML("WRITE: ".$tmp."
"); - - // Is the resource again valid? - if (is_resource($fp_tmp)) { - while (!feof($fp)) { - // Read from source file - $line = fgets ($fp, 1024); - - if (strpos($line, $search) > -1) { $next = 0; $found = true; } - - if ($next > -1) { - if ($next == $seek) { - $next = -1; - $line = $prefix . $DATA . $suffix."\n"; - } else { - $next++; - } - } - - // Write to temp file - fputs($fp_tmp, $line); - } - - // Close temp file - fclose($fp_tmp); - - // Finished writing tmp file - $done = true; - } - - // Close source file - fclose($fp); - - if (($done) && ($found)) { - // Copy back tmp file and delete tmp :-) - @copy($tmp, $file); - @unlink($tmp); - define('_FATAL', false); - } elseif (!$found) { - OUTPUT_HTML("CHANGE: 404!"); - define('_FATAL', true); - } else { - OUTPUT_HTML("TMP: UNDONE!"); - define('_FATAL', true); - } - } - } else { - // File not found, not readable or writeable - OUTPUT_HTML("404: ".$file."
"); - } -} - -// -function ADMIN_DO_ACTION($wht) { - global $menuDesription, $menuTitle, $_CONFIG, $cacheArray, $DATA, $DEPTH; - - //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*
\n"; - if (EXT_IS_ACTIVE("cache")) { - // Include cache instance - global $cacheInstance; - } - - // Remove any spaces from variable - if (empty($wht)) { - // Default admin action is the overview page - $wht = "overview"; - } else { - // Compile out some chars - $wht = COMPILE_CODE($wht, false, false, false); - } - - // Get action value - $act = GET_ACTION($GLOBALS['module'], $wht); - - // Define admin login name and ID number - define('__ADMIN_LOGIN', get_session('admin_login')); - define('__ADMIN_ID' , GET_ADMIN_ID(get_session('admin_login'))); - - // Preload templates - if (EXT_IS_ACTIVE("admins")) { - define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome_admins", true)); - } else { - define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome", true)); - } - define('__ADMIN_FOOTER' , LOAD_TEMPLATE("admin_footer" , true)); - define('__ADMIN_MENU' , ADD_ADMIN_MENU($act, $wht, true)); - - // Tableset header - LOAD_TEMPLATE("admin_main_header"); - - // Check if action/what pair is valid - $result_action = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu -WHERE action='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR what IS NULL) AND '%s'='overview')) -LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__); - if (SQL_NUMROWS($result_action) == 1) { - - // Is valid but does the inlcude file exists? - $INC = sprintf("%sinc/modules/admin/action-%s.php", PATH, $act); - if ((FILE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) { - // Ok, we finally load the admin action module - include($INC); - } elseif (__ACL_ALLOW == false) { - // Access denied - LOAD_TEMPLATE("admin_menu_failed", false, ADMINS_ACCESS_DENIED); - ADD_FATAL(ADMINS_ACCESS_DENIED); - } else { - // Include file not found! :-( - LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_404_ACTION); - ADD_FATAL(ADMIN_404_ACTION_1.$act.ADMIN_404_ACTION_2); - } - } else { - // Invalid action/what pair found! - LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_INVALID_ACTION); - ADD_FATAL(ADMIN_INVALID_ACTION_1.$act."/".$wht.ADMIN_INVALID_ACTION_2); - } - - // Free memory - SQL_FREERESULT($result_action); - - // Tableset footer - LOAD_TEMPLATE("admin_main_footer"); -} -// -function ADD_ADMIN_MENU($act, $wht, $return=false) { - global $menuDesription, $menuTitle, $cacheInstance, $_CONFIG; - - // Init variables - $SUB = false; - $OUT = ""; - - // Menu descriptions - $menuDesription = array(); - $menuTitle = array(); - - // Is there a cache instance? - if ((is_object($cacheInstance)) && (isset($_CONFIG['cache_admin_menu'])) && ($_CONFIG['cache_admin_menu'] == "Y")) { - // Create cache name - $cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login')); - - // Is that cache there? - if ($cacheInstance->cache_file($cacheName, true)) { - // Then load it - $data = $cacheInstance->cache_load(); - - // Extract all parts - $OUT = base64_decode($data['output'][0]); - $menuTitle = unserialize(base64_decode($data['title'][0])); - $menuDescription = unserialize(base64_decode($data['descr'][0])); - - // Return or output content? - if ($return) { - return $OUT; - } else { - OUTPUT_HTML($OUT); - } - } // END - if - } // END - if - - // Build main menu - $result_main = SQL_QUERY("SELECT action, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) ORDER BY sort, id DESC", __FILE__, __LINE__); - if (SQL_NUMROWS($result_main) > 0) - { - $OUT = " -\n"; - while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) - { - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) - { - $ACL = ADMINS_CHECK_ACL($menu, ""); - } - else - { - // ACL is "allow"... hmmm - $ACL = true; - } - if ($ACL) - { - if (!$SUB) - { - // Insert compiled menu title and description - $menuTitle[$menu] = $title; - $menuDesription[$menu] = $descr; - } - $OUT .= " - -\n"; - $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC", - array($menu), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)) - { - $menuDesription = array(); - $menuTitle = array(); $SUB = true; - $OUT .= " - - -\n"; - } - $OUT .= "\n"; - } - } - - // Free memory - SQL_FREERESULT($result_main); - $OUT .= "
 
-  · "; - if (($menu == $act) && (empty($wht))) - { - $OUT .= ""; - } - else - { - $OUT .= "["; - } - $OUT .= $title; - if (($menu == $act) && (empty($wht))) - { - $OUT .= ""; - } - else - { - $OUT .= "]"; - } - $OUT .= "
  - \n"; - while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) { - // Filename - $INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $wht_sub); - if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) { - $ACL = ADMINS_CHECK_ACL("", $wht_sub); - } else { - // ACL is "allow"... hmmm - $ACL = true; - } - $readable = FILE_READABLE($INC); - if ($ACL) { - // Insert compiled title and description - $menuTitle[$wht_sub] = $title_what; - $menuDesription[$wht_sub] = $desc_what; - $OUT .= " - -\n"; - } - } - - // Free memory - SQL_FREERESULT($result_what); - $OUT .= "
-  --> "; - if ($readable) - { - if ($wht == $wht_sub) - { - $OUT .= ""; - } - else - { - $OUT .= "["; - } - } - else - { - $OUT .= ""; - } - $OUT .= $title_what; - if ($readable) - { - if ($wht == $wht_sub) - { - $OUT .= ""; - } - else - { - $OUT .= "]"; - } - } - else - { - $OUT .= ""; - } - $OUT .= "
-
\n"; - } - - // Compile and run the code here. This inserts all constants into the - // HTML output. Costs me some time to figure this out... *sigh* Quix0r - $eval = "\$OUT = \"".COMPILE_CODE(addslashes($OUT))."\";"; - eval($eval); - - // Is there a cache instance again? - if ((is_object($cacheInstance)) && (isset($_CONFIG['cache_admin_menu'])) && ($_CONFIG['cache_admin_menu'] == "Y")) { - // Init cache - $cacheInstance->cache_init($cacheName); - - // Prepare cache data - $data = array( - 'output' => base64_encode($OUT), - 'title' => $menuTitle, - 'descr' => $menuDesription - ); - - // Write the data away - $cacheInstance->add_row($data); - - // Close cache - $cacheInstance->cache_close(); - } // END - if - - // Return or output content? - if ($return) { - return $OUT; - } else { - OUTPUT_HTML($OUT); - } -} -// -function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid") -{ - // Output selection form with all confirmed user accounts listed - $result = SQL_QUERY("SELECT userid, surname, family FROM "._MYSQL_PREFIX."_user_data ORDER BY userid", __FILE__, __LINE__); - $OUT = ""; - - // USe this only for adding points (e.g. adding refs really makes no sence ;-) ) - if ($add_all) $OUT = " \n"; - elseif ($none) $OUT = " \n"; - while (list($id, $sname, $fname) = SQL_FETCHROW($result)) - { - $OUT .= "