From: Roland Häder Date: Sat, 29 Sep 2012 12:50:52 +0000 (+0000) Subject: mailer project continued: X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=63f159414369b5ea19a8ca75d8cd8033c45d8341;ds=sidebyside mailer project continued: - Some global array elements renamed (someGlobalElement -> __some_global_element) - Copyright notice disabled in mailid.php as it destroys the frameset - Function debug_report_bug() renamed to reportBug() - Function app_die() renamed to app_exit() - More wrapper functions used (e.g. getRandomTan() instead of PHP's mt_rand()) - New AJAX-based installation introduced (it is not finished) - Renamed several ALL_UPER_CASE() functions to camel-case notation - Extension ext-currency introduced which will deprecate ext-wernis all other eCurreny-related extensions - Renamed various HTML and email templates to new notation - Some shell scripts moved to 'contrib' folder - JQUERY updated to latest stable version (including custom build of jqueryui) - License files renamed/moved - Many other fixes/improvements I forgot to mention - Varrious typos fixed - Copyright updated (to 2012) - TODOs.txt updated --- diff --git a/.gitattributes b/.gitattributes index d29765b543..0600d9c829 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,8 @@ * text=auto !eol /.htaccess svneol=native#text/plain DOCS/INSTALL.txt svneol=native#text/plain +DOCS/JQUERY-AUTHORS.txt -text +DOCS/LICENSE-GPL2.txt svneol=native#text/plain DOCS/LICENSE.txt svneol=native#text/plain DOCS/TODOs.txt svneol=native#text/plain DOCS/de/AUTHORS.txt svneol=native#text/plain @@ -65,6 +67,7 @@ DOCS/geoip_LICENSE.txt svneol=native#text/plain DOCS/tpl-validator.php svneol=native#text/plain /admin.php svneol=native#text/plain /agb.php svneol=native#text/plain +/ajax.php svneol=native#text/plain /autoreg.php svneol=native#text/plain /beg.php svneol=native#text/plain /birthday_confirm.php svneol=native#text/plain @@ -79,6 +82,10 @@ img/politician-stop/politiker-stopp_150x24.png -text svneol=unset#image/png img/uberwach/uberwach-button-gruen.gif -text svneol=unset#image/gif img/uberwach/uberwach-kamera-gruen.gif -text svneol=unset#image/gif inc/.htaccess svneol=native#text/plain +inc/ajax-functions.php svneol=native#text/plain +inc/ajax/.htaccess svneol=native#text/plain +inc/ajax/ajax_admin.php svneol=native#text/plain +inc/ajax/ajax_installer.php svneol=native#text/plain inc/autopurge/.htaccess svneol=native#text/plain inc/autopurge/purge- svneol=native#text/plain inc/autopurge/purge-general.php svneol=native#text/plain @@ -107,6 +114,7 @@ inc/daily/daily_beg.php svneol=native#text/plain inc/daily/daily_birthday.php svneol=native#text/plain inc/daily/daily_bonus.php svneol=native#text/plain inc/daily/daily_doubler.php svneol=native#text/plain +inc/daily/daily_earning.php svneol=native#text/plain inc/daily/daily_engine.php svneol=native#text/plain inc/daily/daily_holiday.php svneol=native#text/plain inc/daily/daily_profile.php svneol=native#text/plain @@ -144,6 +152,7 @@ inc/extensions/ext-clickbanner.php svneol=native#text/plain inc/extensions/ext-country.php svneol=native#text/plain inc/extensions/ext-coupon.php svneol=native#text/plain inc/extensions/ext-cprping.php svneol=native#text/plain +inc/extensions/ext-currency.php svneol=native#text/plain inc/extensions/ext-debug.php svneol=native#text/plain inc/extensions/ext-demo.php svneol=native#text/plain inc/extensions/ext-doubler.php svneol=native#text/plain @@ -212,9 +221,11 @@ inc/filter/.htaccess svneol=native#text/plain inc/filter/_filter.php svneol=native#text/plain inc/filter/active_filter.php svneol=native#text/plain inc/filter/admins_filter.php svneol=native#text/plain +inc/filter/beg_filter.php svneol=native#text/plain inc/filter/bonus_filter.php svneol=native#text/plain inc/filter/booking_filter.php svneol=native#text/plain inc/filter/cache_filter.php svneol=native#text/plain +inc/filter/country_filter.php svneol=native#text/plain inc/filter/coupon_filter.php svneol=native#text/plain inc/filter/earning_filter.php svneol=native#text/plain inc/filter/forced_filter.php svneol=native#text/plain @@ -252,7 +263,9 @@ inc/install-functions.php svneol=native#text/plain inc/install-inc.php svneol=native#text/plain inc/js/.htaccess svneol=native#text/plain inc/js/js- svneol=native#text/plain +inc/js/js-admin_ajax.php svneol=native#text/plain inc/js/js-cookies_disabled.php svneol=native#text/plain +inc/js/js-install_ajax.php svneol=native#text/plain inc/js/js-jquery.php svneol=native#text/plain inc/js/js-order_send.php svneol=native#text/plain inc/js/js-surfbar_frame_top.php svneol=native#text/plain @@ -330,6 +343,7 @@ inc/libs/active_functions.php svneol=native#text/plain inc/libs/admins_functions.php svneol=native#text/plain inc/libs/autopurge_functions.php svneol=native#text/plain inc/libs/beg_functions.php svneol=native#text/plain +inc/libs/birthday_functions.php svneol=native#text/plain inc/libs/bonus_functions.php svneol=native#text/plain inc/libs/booking_functions.php svneol=native#text/plain inc/libs/cache_functions.php svneol=native#text/plain @@ -452,6 +466,7 @@ inc/modules/admin/what-add_points.php svneol=native#text/plain inc/modules/admin/what-add_rallye.php svneol=native#text/plain inc/modules/admin/what-add_sponsor.php svneol=native#text/plain inc/modules/admin/what-add_surfbar_url.php svneol=native#text/plain +inc/modules/admin/what-add_tester_user.php svneol=native#text/plain inc/modules/admin/what-admin_add.php svneol=native#text/plain inc/modules/admin/what-adminedit.php svneol=native#text/plain inc/modules/admin/what-admins_add.php svneol=native#text/plain @@ -600,6 +615,7 @@ inc/modules/admin/what-updates.php svneol=native#text/plain inc/modules/admin/what-usage.php svneol=native#text/plain inc/modules/admin/what-user_contct.php svneol=native#text/plain inc/modules/admin/what-usr_online.php svneol=native#text/plain +inc/modules/admin/what-welcome.php svneol=native#text/plain inc/modules/chk_login.php svneol=native#text/plain inc/modules/frametester.php svneol=native#text/plain inc/modules/guest/.htaccess svneol=native#text/plain @@ -804,6 +820,16 @@ inc/xml-functions.php svneol=native#text/plain /index.php svneol=native#text/plain /install.php svneol=native#text/plain /js.php svneol=native#text/plain +js/.js svneol=native#text/javascript +js/admin-common.js svneol=native#text/javascript +js/admin-data.js svneol=native#text/javascript +js/ajax-common.js svneol=native#text/javascript +js/ajax-loader.js svneol=native#text/javascript +js/ajax-test.js svneol=native#text/javascript +js/core-common.js svneol=native#text/javascript +js/install-common.js svneol=native#text/javascript +js/install-data.js svneol=native#text/javascript +js/jquery-ui.custom.js svneol=native#text/javascript js/jquery.js svneol=native#text/plain js/menu-common.js svneol=native#text/plain /lead-confirm.php svneol=native#text/plain @@ -825,6 +851,11 @@ templates/de/emails/.htaccess svneol=native#text/plain templates/de/emails/add-points.tpl svneol=native#text/plain templates/de/emails/admin-del_links.tpl svneol=native#text/plain templates/de/emails/admin/.htaccess svneol=native#text/plain +templates/de/emails/admin/admin_admin_add_all_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_admin_add_all_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_admin_add_all_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_admin_add_single_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_admin_add_single_referral.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_del_mails.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_delete.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_inactive.tpl svneol=native#text/plain @@ -832,6 +863,9 @@ templates/de/emails/admin/admin_autopurge_points.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_tsks.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_turbo.tpl svneol=native#text/plain templates/de/emails/admin/admin_autopurge_unconfirmed.tpl svneol=native#text/plain +templates/de/emails/admin/admin_beg_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_beg_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_beg_referral.tpl svneol=native#text/plain templates/de/emails/admin/admin_coupon.tpl svneol=native#text/plain templates/de/emails/admin/admin_coupon_cashed.tpl svneol=native#text/plain templates/de/emails/admin/admin_coupon_code.tpl svneol=native#text/plain @@ -841,13 +875,25 @@ templates/de/emails/admin/admin_del_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_delete_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_earning_added.tpl svneol=native#text/plain templates/de/emails/admin/admin_earning_updated.tpl svneol=native#text/plain +templates/de/emails/admin/admin_edit_forced_ads.tpl svneol=native#text/plain +templates/de/emails/admin/admin_edit_forced_costs.tpl svneol=native#text/plain +templates/de/emails/admin/admin_edit_points_data.tpl svneol=native#text/plain templates/de/emails/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_extension_deactivated.tpl svneol=native#text/plain +templates/de/emails/admin/admin_forced_campaign_pending_active.tpl svneol=native#text/plain templates/de/emails/admin/admin_holiday_deactivated.tpl svneol=native#text/plain templates/de/emails/admin/admin_holiday_request.tpl svneol=native#text/plain templates/de/emails/admin/admin_holiday_unlock.tpl svneol=native#text/plain templates/de/emails/admin/admin_lock_active_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl svneol=native#text/plain +templates/de/emails/admin/admin_mailid_okay_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_mailid_okay_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_beg_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_beg_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_beg_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_bonus_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_bonus_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_monthly_bonus_referral.tpl svneol=native#text/plain templates/de/emails/admin/admin_mydata_notify.tpl svneol=native#text/plain templates/de/emails/admin/admin_newsletter_reset.tpl svneol=native#text/plain templates/de/emails/admin/admin_order_normal.tpl svneol=native#text/plain @@ -859,7 +905,14 @@ templates/de/emails/admin/admin_rallye_no_notify.tpl svneol=native#text/plain templates/de/emails/admin/admin_rallye_notify.tpl svneol=native#text/plain templates/de/emails/admin/admin_rallye_purged.tpl svneol=native#text/plain templates/de/emails/admin/admin_refback.tpl svneol=native#text/plain +templates/de/emails/admin/admin_refback_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_refback_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_refback_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_referral_bonus_direct.tpl svneol=native#text/plain +templates/de/emails/admin/admin_referral_bonus_ref_referral.tpl svneol=native#text/plain +templates/de/emails/admin/admin_referral_bonus_referral.tpl svneol=native#text/plain templates/de/emails/admin/admin_register_done.tpl svneol=native#text/plain +templates/de/emails/admin/admin_register_welcome_direct.tpl svneol=native#text/plain templates/de/emails/admin/admin_report_bug.tpl svneol=native#text/plain templates/de/emails/admin/admin_reset_password.tpl svneol=native#text/plain templates/de/emails/admin/admin_sponsor_change_data.tpl svneol=native#text/plain @@ -889,6 +942,7 @@ templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl svneol=native#te templates/de/emails/admin/admin_surfbar_url_pending_rejected.tpl svneol=native#text/plain templates/de/emails/admin/admin_surfbar_url_reg.tpl svneol=native#text/plain templates/de/emails/admin/admin_surfbar_url_rejected.tpl svneol=native#text/plain +templates/de/emails/admin/admin_surfbar_url_rejected_pending.tpl svneol=native#text/plain templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl svneol=native#text/plain templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl svneol=native#text/plain templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl svneol=native#text/plain @@ -932,11 +986,19 @@ templates/de/emails/lock-user.tpl svneol=native#text/plain templates/de/emails/lock_sponsor.tpl svneol=native#text/plain templates/de/emails/member/.htaccess svneol=native#text/plain templates/de/emails/member/member_add_points.tpl svneol=native#text/plain +templates/de/emails/member/member_admin_add_all_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_admin_add_all_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_admin_add_all_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_admin_add_single_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_admin_add_single_referral.tpl svneol=native#text/plain templates/de/emails/member/member_autopurge_delete.tpl svneol=native#text/plain templates/de/emails/member/member_autopurge_inactive.tpl svneol=native#text/plain templates/de/emails/member/member_autopurge_points.tpl svneol=native#text/plain templates/de/emails/member/member_autopurge_unconfirmed.tpl svneol=native#text/plain templates/de/emails/member/member_beg.tpl svneol=native#text/plain +templates/de/emails/member/member_beg_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_beg_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_beg_referral.tpl svneol=native#text/plain templates/de/emails/member/member_birthday.tpl svneol=native#text/plain templates/de/emails/member/member_birthday_confirm.tpl svneol=native#text/plain templates/de/emails/member/member_bonus.tpl svneol=native#text/plain @@ -951,12 +1013,21 @@ templates/de/emails/member/member_doubler.tpl svneol=native#text/plain templates/de/emails/member/member_earning_added.tpl svneol=native#text/plain templates/de/emails/member/member_earning_updated.tpl svneol=native#text/plain templates/de/emails/member/member_edit_surfbar_urls.tpl svneol=native#text/plain +templates/de/emails/member/member_forced_campaign_pending_active.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_activated.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_removed.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_request.tpl svneol=native#text/plain templates/de/emails/member/member_holiday_unlock.tpl svneol=native#text/plain templates/de/emails/member/member_lock_active_surfbar_urls.tpl svneol=native#text/plain templates/de/emails/member/member_lock_locked_surfbar_urls.tpl svneol=native#text/plain +templates/de/emails/member/member_mailid_okay_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_mailid_okay_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_beg_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_beg_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_beg_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_bonus_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_bonus_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_monthly_bonus_referral.tpl svneol=native#text/plain templates/de/emails/member/member_mydata_notify.tpl svneol=native#text/plain templates/de/emails/member/member_order_accepted.tpl svneol=native#text/plain templates/de/emails/member/member_order_deleted.tpl svneol=native#text/plain @@ -974,6 +1045,13 @@ templates/de/emails/member/member_rallye_expired_other.tpl svneol=native#text/pl templates/de/emails/member/member_rallye_expired_silver.tpl svneol=native#text/plain templates/de/emails/member/member_rallye_notify.tpl svneol=native#text/plain templates/de/emails/member/member_refback.tpl svneol=native#text/plain +templates/de/emails/member/member_refback_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_refback_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_refback_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_referral_bonus_direct.tpl svneol=native#text/plain +templates/de/emails/member/member_referral_bonus_ref_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_referral_bonus_referral.tpl svneol=native#text/plain +templates/de/emails/member/member_register_welcome_direct.tpl svneol=native#text/plain templates/de/emails/member/member_stats_bonus.tpl svneol=native#text/plain templates/de/emails/member/member_sub_points.tpl svneol=native#text/plain templates/de/emails/member/member_support-ordr.tpl svneol=native#text/plain @@ -997,6 +1075,7 @@ templates/de/emails/member/member_surfbar_url_pending_deleted.tpl svneol=native# templates/de/emails/member/member_surfbar_url_pending_rejected.tpl svneol=native#text/plain templates/de/emails/member/member_surfbar_url_reg.tpl svneol=native#text/plain templates/de/emails/member/member_surfbar_url_rejected.tpl svneol=native#text/plain +templates/de/emails/member/member_surfbar_url_rejected_pending.tpl svneol=native#text/plain templates/de/emails/member/member_surfbar_url_stopped_continued.tpl svneol=native#text/plain templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl svneol=native#text/plain templates/de/emails/member/member_surfbar_url_stopped_pending.tpl svneol=native#text/plain @@ -1030,7 +1109,9 @@ templates/de/emails/sponsor/sponsor_add_points.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_change_data.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_change_email.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_confirm.tpl svneol=native#text/plain +templates/de/emails/sponsor/sponsor_deleted.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_email.tpl svneol=native#text/plain +templates/de/emails/sponsor/sponsor_locked.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_lost.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_pending.tpl svneol=native#text/plain templates/de/emails/sponsor/sponsor_ref_notify.tpl svneol=native#text/plain @@ -1051,6 +1132,8 @@ templates/de/html/admin/admin_add_config_network_type.tpl svneol=native#text/pla templates/de/html/admin/admin_add_config_network_type_form.tpl svneol=native#text/plain templates/de/html/admin/admin_add_country.tpl svneol=native#text/plain templates/de/html/admin/admin_add_forced_ad.tpl svneol=native#text/plain +templates/de/html/admin/admin_add_forced_campaign.tpl svneol=native#text/plain +templates/de/html/admin/admin_add_forced_costs.tpl svneol=native#text/plain templates/de/html/admin/admin_add_guest_menu.tpl svneol=native#text/plain templates/de/html/admin/admin_add_max.tpl svneol=native#text/plain templates/de/html/admin/admin_add_member_menu.tpl svneol=native#text/plain @@ -1063,6 +1146,7 @@ templates/de/html/admin/admin_add_network_type.tpl svneol=native#text/plain templates/de/html/admin/admin_add_network_vcheck_param.tpl svneol=native#text/plain templates/de/html/admin/admin_add_payment.tpl svneol=native#text/plain templates/de/html/admin/admin_add_payout.tpl svneol=native#text/plain +templates/de/html/admin/admin_add_point_accounts.tpl svneol=native#text/plain templates/de/html/admin/admin_add_points.tpl svneol=native#text/plain templates/de/html/admin/admin_add_points_all.tpl svneol=native#text/plain templates/de/html/admin/admin_add_rallye.tpl svneol=native#text/plain @@ -1073,6 +1157,7 @@ templates/de/html/admin/admin_add_sponsor.tpl svneol=native#text/plain templates/de/html/admin/admin_add_sponsor_already.tpl svneol=native#text/plain templates/de/html/admin/admin_add_sponsor_paytype.tpl svneol=native#text/plain templates/de/html/admin/admin_add_surfbar_url.tpl svneol=native#text/plain +templates/de/html/admin/admin_add_tester_user.tpl svneol=native#text/plain templates/de/html/admin/admin_admins_contct_default.tpl svneol=native#text/plain templates/de/html/admin/admin_admins_contct_form.tpl svneol=native#text/plain templates/de/html/admin/admin_admins_contct_select.tpl svneol=native#text/plain @@ -1081,6 +1166,7 @@ templates/de/html/admin/admin_admins_mails_edit_form.tpl svneol=native#text/plai templates/de/html/admin/admin_admins_mails_edit_row.tpl svneol=native#text/plain templates/de/html/admin/admin_admins_mails_list.tpl svneol=native#text/plain templates/de/html/admin/admin_admins_mails_list_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_ajax_main.tpl svneol=native#text/plain templates/de/html/admin/admin_cache_stats.tpl svneol=native#text/plain templates/de/html/admin/admin_config_ svneol=native#text/plain templates/de/html/admin/admin_config_active.tpl svneol=native#text/plain @@ -1180,6 +1266,10 @@ templates/de/html/admin/admin_delete_email_max_rec.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_email_max_rec_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_email_normal.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_email_notify.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_forced_ads.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_forced_ads_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_forced_costs.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_forced_costs_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_guest_menu.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_guest_menu_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_member_menu.tpl svneol=native#text/plain @@ -1196,6 +1286,10 @@ templates/de/html/admin/admin_delete_payments.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_payments_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_payouts.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_payouts_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_rallye_prices.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_rallye_prices_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_rallyes.tpl svneol=native#text/plain +templates/de/html/admin/admin_delete_rallyes_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_reflevel.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_reflevel_row.tpl svneol=native#text/plain templates/de/html/admin/admin_delete_sponsor.tpl svneol=native#text/plain @@ -1224,6 +1318,10 @@ templates/de/html/admin/admin_edit_email_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_email_select.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_forced_ads.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_forced_ads_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_forced_campaigns.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_forced_campaigns_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_forced_costs.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_forced_costs_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_guest_menu.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_guest_menu_form.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_guest_menu_row.tpl svneol=native#text/plain @@ -1243,6 +1341,10 @@ templates/de/html/admin/admin_edit_payments.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_payments_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_payouts.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_payouts_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_points_data.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_points_data_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_rallye_prices.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_rallye_prices_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_rallyes.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_rallyes_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_refbanner.tpl svneol=native#text/plain @@ -1252,6 +1354,8 @@ templates/de/html/admin/admin_edit_reflevel_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_sponsor_add_points.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_sponsor_edit.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_sponsor_sub_points.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_surfbar_actions.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_surfbar_actions_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_surfbar_urls_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_theme.tpl svneol=native#text/plain @@ -1329,6 +1433,10 @@ templates/de/html/admin/admin_list_emails.tpl svneol=native#text/plain templates/de/html/admin/admin_list_emails_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_forced_ads.tpl svneol=native#text/plain templates/de/html/admin/admin_list_forced_ads_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_forced_campaigns.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_forced_campaigns_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_forced_costs.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_forced_costs_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_holiday.tpl svneol=native#text/plain templates/de/html/admin/admin_list_holiday_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_home.tpl svneol=native#text/plain @@ -1371,10 +1479,14 @@ templates/de/html/admin/admin_list_payouts.tpl svneol=native#text/plain templates/de/html/admin/admin_list_payouts_banner.tpl svneol=native#text/plain templates/de/html/admin/admin_list_payouts_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_payouts_txt.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_points_accounts.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_points_accounts_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_primera_main.tpl svneol=native#text/plain templates/de/html/admin/admin_list_primera_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_rallye_prices.tpl svneol=native#text/plain templates/de/html/admin/admin_list_rallye_prices_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_rallye_prices_simple.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_rallye_prices_simple_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_rallye_usr.tpl svneol=native#text/plain templates/de/html/admin/admin_list_rallye_usr_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_rallyes.tpl svneol=native#text/plain @@ -1481,6 +1593,7 @@ templates/de/html/admin/admin_payout_add_new.tpl svneol=native#text/plain templates/de/html/admin/admin_payout_failed_transfer.tpl svneol=native#text/plain templates/de/html/admin/admin_payout_overview_form.tpl svneol=native#text/plain templates/de/html/admin/admin_payout_reject_form.tpl svneol=native#text/plain +templates/de/html/admin/admin_receive_table.tpl svneol=native#text/plain templates/de/html/admin/admin_reg_form.tpl svneol=native#text/plain templates/de/html/admin/admin_repair_lang.tpl svneol=native#text/plain templates/de/html/admin/admin_repair_lang_row_404.tpl svneol=native#text/plain @@ -1526,6 +1639,7 @@ templates/de/html/admin/admin_welcome.tpl svneol=native#text/plain templates/de/html/admin/admin_welcome_admins.tpl svneol=native#text/plain templates/de/html/admin/admin_yoomedia_error.tpl svneol=native#text/plain templates/de/html/agb.tpl svneol=native#text/plain +templates/de/html/ajax_test_passed.tpl svneol=native#text/plain templates/de/html/app_die_message.tpl svneol=native#text/plain templates/de/html/beg/.htaccess svneol=native#text/plain templates/de/html/beg/beg_banner.tpl svneol=native#text/plain @@ -1570,6 +1684,7 @@ templates/de/html/ext/ext_clickbanner.tpl svneol=native#text/plain templates/de/html/ext/ext_country.tpl svneol=native#text/plain templates/de/html/ext/ext_coupon.tpl svneol=native#text/plain templates/de/html/ext/ext_cprping.tpl svneol=native#text/plain +templates/de/html/ext/ext_currency.tpl svneol=native#text/plain templates/de/html/ext/ext_debug.tpl svneol=native#text/plain templates/de/html/ext/ext_demo.tpl svneol=native#text/plain templates/de/html/ext/ext_doubler.tpl svneol=native#text/plain @@ -1661,6 +1776,7 @@ templates/de/html/guest/guest_list_active_row_none.tpl svneol=native#text/plain templates/de/html/guest/guest_list_rallye.tpl svneol=native#text/plain templates/de/html/guest/guest_list_rallye_row.tpl svneol=native#text/plain templates/de/html/guest/guest_login.tpl svneol=native#text/plain +templates/de/html/guest/guest_login_error_message.tpl svneol=native#text/plain templates/de/html/guest/guest_menu_bottom.tpl svneol=native#text/plain templates/de/html/guest/guest_menu_content.tpl svneol=native#text/plain templates/de/html/guest/guest_menu_row.tpl svneol=native#text/plain @@ -1708,15 +1824,31 @@ templates/de/html/install/install_fatal_errors.tpl svneol=native#text/plain templates/de/html/install/install_fatal_row.tpl svneol=native#text/plain templates/de/html/install/install_fatal_table.tpl svneol=native#text/plain templates/de/html/install/install_finished.tpl svneol=native#text/plain +templates/de/html/install/install_footer.tpl svneol=native#text/plain templates/de/html/install/install_main.tpl svneol=native#text/plain +templates/de/html/install/install_main_ajax.tpl svneol=native#text/plain +templates/de/html/install/install_main_plain.tpl svneol=native#text/plain +templates/de/html/install/install_menu.tpl svneol=native#text/plain templates/de/html/install/install_page1.tpl svneol=native#text/plain templates/de/html/install/install_page2.tpl svneol=native#text/plain templates/de/html/install/install_page3.tpl svneol=native#text/plain templates/de/html/install/install_page5.tpl svneol=native#text/plain +templates/de/html/install/install_page_base_data.tpl svneol=native#text/plain +templates/de/html/install/install_page_database_config.tpl svneol=native#text/plain +templates/de/html/install/install_page_init.tpl svneol=native#text/plain +templates/de/html/install/install_page_other_config.tpl svneol=native#text/plain +templates/de/html/install/install_page_smtp_config.tpl svneol=native#text/plain +templates/de/html/install/install_page_welcome.tpl svneol=native#text/plain +templates/de/html/install/install_selector.tpl svneol=native#text/plain +templates/de/html/install/install_warning_next.tpl svneol=native#text/plain +templates/de/html/install/install_warning_previous.tpl svneol=native#text/plain +templates/de/html/install/install_warning_tab.tpl svneol=native#text/plain templates/de/html/install/install_welcome.tpl svneol=native#text/plain templates/de/html/js/.htaccess svneol=native#text/plain +templates/de/html/js/js_admin_ajax.tpl svneol=native#text/plain templates/de/html/js/js_admin_menu_onclick.tpl svneol=native#text/plain templates/de/html/js/js_cookies_disabled.tpl svneol=native#text/plain +templates/de/html/js/js_install_ajax.tpl svneol=native#text/plain templates/de/html/js/js_jquery.tpl svneol=native#text/plain templates/de/html/js/js_order_send.tpl svneol=native#text/plain templates/de/html/js/js_surfbar_frame_top.tpl svneol=native#text/plain @@ -1758,8 +1890,10 @@ templates/de/html/member/member_book_surfbar_dynamic.tpl svneol=native#text/plai templates/de/html/member/member_book_surfbar_static.tpl svneol=native#text/plain templates/de/html/member/member_cash_coupon.tpl svneol=native#text/plain templates/de/html/member/member_cat_row.tpl svneol=native#text/plain +templates/de/html/member/member_cats.tpl svneol=native#text/plain templates/de/html/member/member_cats_footer.tpl svneol=native#text/plain templates/de/html/member/member_cats_header.tpl svneol=native#text/plain +templates/de/html/member/member_cats_row.tpl svneol=native#text/plain templates/de/html/member/member_content_right.tpl svneol=native#text/plain templates/de/html/member/member_doubler.tpl svneol=native#text/plain templates/de/html/member/member_doubler_list.tpl svneol=native#text/plain @@ -1797,6 +1931,7 @@ templates/de/html/member/member_list_reflinks_row.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar_form.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_surfbar_table.tpl svneol=native#text/plain templates/de/html/member/member_login_js.tpl svneol=native#text/plain templates/de/html/member/member_mail_bonus_deleted.tpl svneol=native#text/plain templates/de/html/member/member_mail_bonus_new.tpl svneol=native#text/plain @@ -1824,10 +1959,15 @@ templates/de/html/member/member_order-zip1.tpl svneol=native#text/plain templates/de/html/member/member_order-zip2.tpl svneol=native#text/plain templates/de/html/member/member_order_back.tpl svneol=native#text/plain templates/de/html/member/member_order_frametester.tpl svneol=native#text/plain +templates/de/html/member/member_order_html_ext.tpl svneol=native#text/plain +templates/de/html/member/member_order_html_intro.tpl svneol=native#text/plain templates/de/html/member/member_order_page1.tpl svneol=native#text/plain templates/de/html/member/member_order_page2.tpl svneol=native#text/plain templates/de/html/member/member_order_points.tpl svneol=native#text/plain templates/de/html/member/member_order_send.tpl svneol=native#text/plain +templates/de/html/member/member_order_thanks.tpl svneol=native#text/plain +templates/de/html/member/member_order_zip1.tpl svneol=native#text/plain +templates/de/html/member/member_order_zip2.tpl svneol=native#text/plain templates/de/html/member/member_payout.tpl svneol=native#text/plain templates/de/html/member/member_payout_form.tpl svneol=native#text/plain templates/de/html/member/member_payout_form_banner.tpl svneol=native#text/plain @@ -1942,14 +2082,31 @@ templates/de/html/runtime_fatal_table.tpl svneol=native#text/plain templates/de/html/select/.htaccess svneol=native#text/plain templates/de/html/select/select_admins_box.tpl svneol=native#text/plain templates/de/html/select/select_admins_option.tpl svneol=native#text/plain +templates/de/html/select/select_forced_ads_id_popup_box.tpl svneol=native#text/plain +templates/de/html/select/select_forced_ads_id_popup_option.tpl svneol=native#text/plain +templates/de/html/select/select_forced_ads_id_textlink_option.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_type_box.tpl svneol=native#text/plain templates/de/html/select/select_forced_ads_type_option.tpl svneol=native#text/plain +templates/de/html/select/select_forced_costs_id_box.tpl svneol=native#text/plain +templates/de/html/select/select_forced_costs_id_option.tpl svneol=native#text/plain +templates/de/html/select/select_forced_costs_visibility_box.tpl svneol=native#text/plain +templates/de/html/select/select_forced_costs_visibility_option.tpl svneol=native#text/plain templates/de/html/select/select_network_box.tpl svneol=native#text/plain templates/de/html/select/select_network_option.tpl svneol=native#text/plain templates/de/html/select/select_network_type_box.tpl svneol=native#text/plain templates/de/html/select/select_network_type_option.tpl svneol=native#text/plain templates/de/html/select/select_network_type_title_box.tpl svneol=native#text/plain templates/de/html/select/select_network_type_title_option.tpl svneol=native#text/plain +templates/de/html/select/select_points_locked_mode_box.tpl svneol=native#text/plain +templates/de/html/select/select_points_locked_mode_option.tpl svneol=native#text/plain +templates/de/html/select/select_points_payment_method_box.tpl svneol=native#text/plain +templates/de/html/select/select_points_payment_method_option.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_action_box.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_action_option.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_new_status_box.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_new_status_option.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_status_box.tpl svneol=native#text/plain +templates/de/html/select/select_surfbar_actions_status_option.tpl svneol=native#text/plain templates/de/html/show_bonus.tpl svneol=native#text/plain templates/de/html/show_bonus_footer.tpl svneol=native#text/plain templates/de/html/show_bonus_header.tpl svneol=native#text/plain @@ -2027,6 +2184,7 @@ theme/org/images/menus/bottom.jpg -text svneol=unset#image/jpeg theme/org/images/menus/row.jpg -text svneol=unset#image/jpeg theme/org/images/menus/title.jpg -text svneol=unset#image/jpeg theme/org/theme.php svneol=native#text/plain +theme/schleuder/css/ajax.css -text theme/schleuder/images/code_bg.jpg -text svneol=unset#image/jpeg theme/schleuder/images/code_bg.png -text svneol=unset#image/png theme/schleuder/images/help/bullet.png -text svneol=unset#image/png diff --git a/.htaccess b/.htaccess index 1fd2bc7691..5449e0a0f9 100644 --- a/.htaccess +++ b/.htaccess @@ -8,5 +8,7 @@ DirectoryIndex index.php RewriteRule ^cms/(.*)$ modules.php?module=$1 [L] # @TODO When ext-imprint is finished RewriteRule ^cms/index/wht/impressum$ modules.php?module=index&what=imprint [L] # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L] + # @TODO When ext-terms is finished RewriteRule ^cms/index/wht/agb$ modules.php?module=index&what=terms [L] + # @TODO When ext-terms is finished RewriteRule ^modules.php?module=index&what=agb$ modules.php?module=index&what=terms [L] # @TODO When ext-terms is finished RewriteRule ^agb.php$ modules.php?module=index&what=terms [L] diff --git a/DOCS/COPYING b/DOCS/COPYING index 1e91da54d7..90ff66e9e1 100644 --- a/DOCS/COPYING +++ b/DOCS/COPYING @@ -2,7 +2,7 @@ Mailer-Project ------------------------------- Copyright (c) 2003 - 2009 by Roland Haeder -Copyright (c) 2009 - 2011 by Mailer Developer Team +Copyright (c) 2009 - 2012 by Mailer Developer Team For more information visit: http://mxchange.org This program is free software; you can redistribute it and/or modify @@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA This applies to all files from root directory except files in DOCS, -img, install and templates directories; js/jquery.js and all -Cascading Style Sheet files if not otherwise explicitly noted. +img, install and templates directories; js/jquery.js, js/jquery-ui.custom.js +and all Cascading Style Sheet files if not otherwise explicitly noted. -The GNU General Public License can be found at DOCS/LICENSE.txt +The GNU General Public License Version 2 can be found at DOCS/LICENSE-GPL2.txt. ------------------------------- js/jquery.js @@ -42,5 +42,15 @@ Copyright 2011, The Dojo Foundation Released under the MIT, BSD, and GPL Licenses. Date: Thu Jun 30 14:16:56 2011 -0400 +------------------------------- +js/jquery-ui.custom.js +------------------------------- +jQuery UI 1.8.16 + +Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) +Dual licensed under the MIT or GPL Version 2 licenses. +http://jquery.org/license + +http://docs.jquery.com/UI [EOF] diff --git a/DOCS/Doxyfile b/DOCS/Doxyfile index e553c8b9e6..d6a875b587 100644 --- a/DOCS/Doxyfile +++ b/DOCS/Doxyfile @@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = MXChangeMail-Exchange +PROJECT_NAME = Mailer-Project # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or @@ -47,7 +47,7 @@ OUTPUT_DIRECTORY = /home/quix0r/MyProjects/mailer/branches/0.2.1-FINAL/DOC # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this diff --git a/DOCS/JQUERY-AUTHORS.txt b/DOCS/JQUERY-AUTHORS.txt new file mode 100644 index 0000000000..b2168655ee --- /dev/null +++ b/DOCS/JQUERY-AUTHORS.txt @@ -0,0 +1,30 @@ +jQuery UI Authors (http://jqueryui.com/about) + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://github.com/jquery/jquery-ui + +Brandon Aaron +Paul Bakaus (paulbakaus.com) +David Bolter +Rich Caloggero +Chi Cheng (cloudream@gmail.com) +Colin Clark (http://colin.atrc.utoronto.ca/) +Michelle D'Souza +Aaron Eisenberger (aaronchi@gmail.com) +Ariel Flesler +Bohdan Ganicky +Scott González +Marc Grabanski (m@marcgrabanski.com) +Klaus Hartl (stilbuero.de) +Scott Jehl +Cody Lindley +Eduardo Lundgren (eduardolundgren@gmail.com) +Todd Parker +John Resig +Patty Toland +Ca-Phun Ung (yelotofu.com) +Keith Wood (kbwood@virginbroadband.com.au) +Maggie Costello Wachs +Richard D. Worth (rdworth.org) +Jörn Zaefferer (bassistance.de) diff --git a/DOCS/LICENSE-GPL2.txt b/DOCS/LICENSE-GPL2.txt new file mode 100644 index 0000000000..d511905c16 --- /dev/null +++ b/DOCS/LICENSE-GPL2.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/DOCS/LICENSE.txt b/DOCS/LICENSE.txt index d511905c16..84d1ed3b8c 100644 --- a/DOCS/LICENSE.txt +++ b/DOCS/LICENSE.txt @@ -1,339 +1 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +@DEPRECATED diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 8d5ec0983d..dc73f00943 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -1,12 +1,15 @@ -### WARNING: THIS FILE IS AUTO-GENERATED BY ./DOCS/todo-builder.sh (uid=/user=quix0r) ### +### WARNING: THIS FILE IS AUTO-GENERATED BY ../../contrib/todo-builder.sh (uid=/user=quix0r) ### ### DO NOT EDIT THIS FILE. ### ./autoreg.php:58:// @TODO Add processing of request here ./beg.php:175: // @TODO Opps, what is missing here??? ./inc/classes/cachesystem.class.php:510: // @TODO Add support for more types which break in last else-block -./inc/config-functions.php:138: // @TODO Make this all better... :-/ +./inc/config-functions.php:137: // @TODO Make this all better... :-/ +./inc/config-functions.php:313: // @TODO Call setConfigEntry() somehow +./inc/config-functions.php:341: // @TODO Call setConfigEntry() somehow ./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye -./inc/daily/daily_birthday.php:96: // @TODO 4 is hard-coded here, should we move it out in config? -./inc/expression-functions.php:166:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again +./inc/daily/daily_birthday.php:99: // @TODO 4 is hard-coded here, should we move it out in config? +./inc/email-functions.php:109: * @TODO Rewrite this to an extension 'smtp' +./inc/expression-functions.php:170:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again ./inc/expression-functions.php:46: // @TODO is escapeQuotes() enougth for strings with single/double quotes? ./inc/extensions/ext-html_mail.php:136: // @TODO Move these arrays into config ./inc/extensions/ext-menu.php:52: // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => (edit|add)_(admin|guest|member)_menu @@ -37,89 +40,90 @@ ./inc/extensions/ext-network.php:42: * @TODO Yoo!Media: What is LayerAd compared to Layer click? * ./inc/extensions/ext-network.php:99: // @TODO network_type_handler is an internal name and needs documentation ./inc/extensions/ext-newsletter.php:218: // @TODO Move these into configuration -./inc/extensions/ext-order.php:358: // @TODO This should be moved out to inc/daily/ -./inc/extensions/ext-rallye.php:341: // @TODO Move this code into a hook +./inc/extensions/ext-order.php:389: // @TODO This should be moved out to inc/daily/ +./inc/extensions/ext-rallye.php:345: // @TODO Move this code into a hook ./inc/extensions/ext-rallye.php:94: // @TODO Fix config_rallye_prices to list_rallye_prices ./inc/extensions/ext-yoomedia.php:121: // @TODO Can this be moved into a database table? ./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y'); -./inc/extensions-functions.php:1944:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable' -./inc/extensions-functions.php:423:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) -./inc/extensions-functions.php:560: // @TODO Extension is loaded, what next? +./inc/extensions-functions.php:1991:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable' +./inc/extensions-functions.php:420: // @TODO This redirect is still needed to register sql_patches! Please try to avoid it +./inc/extensions-functions.php:436:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) +./inc/extensions-functions.php:576: // @TODO Extension is loaded, what next? ./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away! -./inc/filter/cache_filter.php:92: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. +./inc/filter/cache_filter.php:94: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. ./inc/filter/forced_filter.php:73: // @TODO This part is unfinished -./inc/functions.php:1197: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? -./inc/functions.php:1285: // @TODO Are these convertions still required? -./inc/functions.php:1305:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:156:// @TODO Rewrite this to an extension 'smtp' -./inc/functions.php:1926: // @TODO Find a way to cache this -./inc/functions.php:2027: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:2222: // @TODO Rename column data_type to e.g. mail_status +./inc/functions.php:1082: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? +./inc/functions.php:1168: // @TODO Are these convertions still required? +./inc/functions.php:1189:// @TODO Rewrite this function to use readFromFile() and writeToFile() +./inc/functions.php:1810: // @TODO Find a way to cache this +./inc/functions.php:1915: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2119: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter -./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); -./inc/language/de.php:1077: // @TODO Rewrite these two constants -./inc/language/de.php:1093: // @TODO Rewrite these three constants -./inc/language/de.php:758:// @TODO Are these constants longer used? +./inc/header.php:66:// @TODO Find a way to not use direct module comparison +./inc/install-functions.php:91: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); +./inc/language/de.php:1103: // @TODO Rewrite these two constants +./inc/language/de.php:1119: // @TODO Rewrite these three constants +./inc/language/de.php:749:// @TODO Are these constants longer used? ./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function. +./inc/language/install_de.php:137: // @TODO Move this to e.g. ext-smtp ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no * +./inc/language/order_de.php:70: // @TODO Find better text ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings * ./inc/language/refback_de.php:51: // @TODO Rewrite these constants to one -./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf() -./inc/libs/admins_functions.php:495: // @TODO This can be, somehow, rewritten +./inc/libs/admins_functions.php:521: // @TODO This can be, somehow, rewritten ./inc/libs/bonus_functions.php:194: // @TODO Move this HTML to a template ./inc/libs/doubler_functions.php:44:// @TODO Lame description ./inc/libs/doubler_functions.php:93: // @TODO Can't this be moved into EL? +./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code? ./inc/libs/mailid_functions.php:47: // @TODO Rewrite this to a dynamic include or so ./inc/libs/network_functions.php:978: // @TODO Implement this function -./inc/libs/rallye_functions.php:705:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId() -./inc/libs/rallye_functions.php:770: $EXPIRE = 3; // @TODO The hard-coded value... -./inc/libs/rallye_functions.php:856:// @TODO Please document this function -./inc/libs/rallye_functions.php:912: // Load count @TODO Can't we rewrite this to our API? -./inc/libs/register_functions.php:282: // @TODO Rewrite these all to a single filter -./inc/libs/sponsor_functions.php:159: // @TODO Rewrite this to API function -./inc/libs/sponsor_functions.php:432: // @TODO Rewrite this to API function -./inc/libs/surfbar_functions.php:1639: // @TODO This can be somehow rewritten -./inc/libs/surfbar_functions.php:746:// @TODO Can't we use our new expression language instead of this ugly code? -./inc/libs/task_functions.php:247: // @TODO These can be rewritten to filter +./inc/libs/order_functions.php:46: // @TODO Move this array into a filter +./inc/libs/rallye_functions.php:769:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId() +./inc/libs/rallye_functions.php:836: $EXPIRE = 3; // @TODO The hard-coded value... +./inc/libs/rallye_functions.php:925:// @TODO Please document this function +./inc/libs/rallye_functions.php:981: // Load count @TODO Can't we rewrite this to our API? +./inc/libs/sponsor_functions.php:163: // @TODO Rewrite this to API function +./inc/libs/sponsor_functions.php:436: // @TODO Rewrite this to API function +./inc/libs/surfbar_functions.php:1672: // @TODO This can be somehow rewritten +./inc/libs/surfbar_functions.php:776:// @TODO Can't we use our new expression language instead of this ugly code? +./inc/libs/task_functions.php:253: // @TODO These can be rewritten to filter ./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters ./inc/libs/theme_functions.php:93: // @TODO Can't this be rewritten to an API function? -./inc/libs/user_functions.php:227:// @TODO Double-check configuration entry here -./inc/libs/user_functions.php:318: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); -./inc/libs/user_functions.php:347: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); +./inc/libs/user_functions.php:325: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); +./inc/libs/user_functions.php:354: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); ./inc/libs/yoomedia_functions.php:108: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script ./inc/load_config.php:75: // @TODO Rewrite them to avoid this else block ./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file * ./inc/mails/doubler_mails.php:53:// @TODO Can this be rewritten to a filter? -./inc/module-functions.php:267: // @TODO Nothing helped??? -./inc/module-functions.php:308: // @TODO Rewrite this to a filter -./inc/modules/admin/admin-inc.php:1442: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided -./inc/modules/admin/admin-inc.php:171: // @TODO This and the next getCurrentAdminId() call might be moved into the templates? -./inc/modules/admin/admin-inc.php:242: // @TODO This can be rewritten into a filter -./inc/modules/admin/admin-inc.php:506:// @TODO Try to rewrite this to adminAddMenuSelectionBox() -./inc/modules/admin/overview-inc.php:162: // @TODO Rewrite this to a filter -./inc/modules/admin/overview-inc.php:275: // @TODO Rewrite this to something with include files and/or filter -./inc/modules/admin/overview-inc.php:309: // @TODO This may also be rewritten to include files -./inc/modules/admin/overview-inc.php:311: default: // @TODO Unknown support mode -./inc/modules/admin/overview-inc.php:426: // @TODO Try to move this in includes +./inc/module-functions.php:273: // @TODO Nothing helped??? +./inc/module-functions.php:314: // @TODO Rewrite this to a filter +./inc/modules/admin/admin-inc.php:1521: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided +./inc/modules/admin/admin-inc.php:160: // @TODO This and the next getCurrentAdminId() call might be moved into the templates? +./inc/modules/admin/admin-inc.php:233: // @TODO This can be rewritten into a filter +./inc/modules/admin/admin-inc.php:509:// @TODO Try to rewrite this to adminAddMenuSelectionBox() +./inc/modules/admin/overview-inc.php:168: // @TODO Rewrite this to a filter +./inc/modules/admin/overview-inc.php:281: // @TODO Rewrite this to something with include files and/or filter +./inc/modules/admin/overview-inc.php:315: // @TODO This may also be rewritten to include files +./inc/modules/admin/overview-inc.php:317: default: // @TODO Unknown support mode +./inc/modules/admin/overview-inc.php:432: // @TODO Try to move this in includes ./inc/modules/admin/overview-inc.php:43:// @TODO This function does also check for uncompleted tasks ./inc/modules/admin/what-add_guestnl_cat.php:47: // @TODO Check if category does already exist -./inc/modules/admin/what-add_surfbar_url.php:55: // @TODO Find all convertSelectionsToEpocheTime() calls and rewrite postRequestElement() calls to $postData -./inc/modules/admin/what-admin_add.php:118: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-admin_add.php:59: // @TODO Cant this be rewritten? -./inc/modules/admin/what-admin_add.php:75: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-admin_add.php:120: // @TODO This can be somehow rewritten to a function +./inc/modules/admin/what-admin_add.php:61: // @TODO Cant this be rewritten? +./inc/modules/admin/what-admin_add.php:77: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-adminedit.php:56: // @TODO Kill all constants in this file ./inc/modules/admin/what-admins_mails.php:58: // @TODO Can this be rewritten to an API function? ./inc/modules/admin/what-bonus.php:46:// @TODO Unused at the moment ./inc/modules/admin/what-config_mods.php:55: // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function ./inc/modules/admin/what-config_points.php:110: // @TODO Rewrite this to a filter -./inc/modules/admin/what-config_rallye_prices.php:195: // @TODO Rewrite these two constants -./inc/modules/admin/what-config_rallye_prices.php:227: // @TODO rename: start->start_time, end->end_time +./inc/modules/admin/what-config_points.php:133: // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter +./inc/modules/admin/what-config_rallye_prices.php:222: // @TODO Rewrite these two constants ./inc/modules/admin/what-config_register.php:75: // @TODO Move this HTML code into a template ./inc/modules/admin/what-del_email.php:61: // @TODO Unused: cat_id, payment_id ./inc/modules/admin/what-edit_user.php:18: * @TODO Add support for ext-country * ./inc/modules/admin/what-email_stats.php:46:// @TODO Unused at the moment -./inc/modules/admin/what-extensions.php:371: // @TODO Rewrite this to a filter +./inc/modules/admin/what-extensions.php:362: // @TODO Rewrite this to a filter ./inc/modules/admin/what-guest_add.php:129: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-guest_add.php:67: // @TODO Cant this be rewritten? ./inc/modules/admin/what-guest_add.php:80: // @TODO This can be somehow rewritten to a function @@ -127,17 +131,15 @@ ./inc/modules/admin/what-list_admins_acls.php:101: // @TODO Rewrite this to a filter ./inc/modules/admin/what-list_admins_acls.php:129: // @TODO Rewrite this to filter 'run_sqls' ./inc/modules/admin/what-list_autopurge.php:47:// @TODO Rewrite those lines to filter -./inc/modules/admin/what-list_bonus.php:136: // @TODO Can't this be moved into our expression language? +./inc/modules/admin/what-list_bonus.php:137: // @TODO Can't this be moved into our expression language? ./inc/modules/admin/what-list_cats.php:54: // @TODO No longer needed? define('__CATEGORIES_BASE' , '' . $login . ''; +./inc/modules/guest/what-rallyes.php:99: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; ./inc/modules/guest/what-sponsor_reg.php:289: // @TODO Maybe a default referral id? -./inc/modules/guest/what-stats.php:108: // @TODO This can be somehow rewritten +./inc/modules/guest/what-stats.php:110: // @TODO This can be somehow rewritten ./inc/modules/guest/what-stats.php:82:// @TODO This can be rewritten in a dynamic include ./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL? ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout())); -./inc/modules/member/what-categories.php:131: // @TODO Rewrite this to use $OUT .= ... ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter * -./inc/modules/member/what-order.php:485: // @TODO Rewrite this to a filter -./inc/modules/member/what-order.php:82: // @TODO Rewrite this to SQL_FETCHARRAY() +./inc/modules/member/what-order.php:482: // @TODO Rewrite this to a filter +./inc/modules/member/what-order.php:84: // @TODO Rewrite this to SQL_FETCHARRAY() ./inc/modules/member/what-payout.php:194: // @TODO Rewrite this to a filter -./inc/modules/member/what-points.php:55:// @TODO Should we rewrite this to a filter? -./inc/modules/member/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; +./inc/modules/member/what-points.php:61:// @TODO Should we rewrite this to a filter? +./inc/modules/member/what-rallyes.php:99: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; ./inc/modules/member/what-reflinks.php:52:// @TODO Move this into a filter ./inc/modules/member/what-transfer.php:128: // @TODO Rewrite this to a filter ./inc/modules/member/what-unconfirmed.php:162: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() ./inc/modules/member/what-unconfirmed.php:227: // @TODO This 'userid' cannot be saved because of encapsulated EL code ./inc/modules/order.php:78: // @TODO Unused: 2,4 -./inc/mysql-manager.php:1410: // @TODO Rewrite these lines to a filter -./inc/mysql-manager.php:1434: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1693: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1739:// @TODO Fix inconsistency between last_module and getWhat() -./inc/mysql-manager.php:387: // @TODO Try to rewrite this to one or more functions +./inc/mysql-manager.php:1433: // @TODO Rewrite these lines to a filter +./inc/mysql-manager.php:1457: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1713: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:390: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:44:// @TODO Can we cache this? ./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter -./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array' -./inc/template-functions.php:1105: // @TODO Deprecate this thing -./inc/template-functions.php:1116: // @TODO Deprecate this thing -./inc/template-functions.php:1206: // @TODO This can be easily moved out after the merge from EL branch to this is complete -./inc/template-functions.php:1242: // @TODO Add a little more infos here -./inc/template-functions.php:1571:// @TODO Lame description for this function -./inc/template-functions.php:1593: // @TODO Move this in a filter -./inc/template-functions.php:193: * @TODO On some pages this is buggy -./inc/template-functions.php:281: // @TODO Remove these sanity checks if all is fine -./inc/template-functions.php:611:// @TODO $simple/$constants are deprecated -./inc/wrapper-functions.php:485:// @TODO Do some more sanity check here -./inc/xml-functions.php:189: // @TODO Handle characters -./mailid.php:139: // @TODO Rewrite this to a filter -./mailid.php:96: // @TODO Rewrite this to a filter -./mailid_top.php:105: // @TODO Rewrite this to a filter -./mailid_top.php:142: // @TODO Rewrite this to a filter -./mailid_top.php:189: // @TODO Rewrite this to a filter +./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array' +./inc/template-functions.php:1107: // @TODO Deprecate this thing +./inc/template-functions.php:1118: // @TODO Deprecate this thing +./inc/template-functions.php:1225: // @TODO This can be easily moved out after the merge from EL branch to this is complete +./inc/template-functions.php:1274: // @TODO Add a little more infos here +./inc/template-functions.php:1642:// @TODO Lame description for this function +./inc/template-functions.php:1664: // @TODO Move this in a filter +./inc/template-functions.php:197: * @TODO On some pages this is buggy +./inc/template-functions.php:285: // @TODO Remove these sanity checks if all is fine +./inc/template-functions.php:598:// @TODO $simple/$constants are deprecated +./inc/template-functions.php:696: // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates +./inc/wrapper-functions.php:2916: // @TODO Find a way to not use direct module comparison +./inc/wrapper-functions.php:494:// @TODO Do some more sanity check here +./inc/xml-functions.php:208: // @TODO Handle characters +./mailid.php:102: // @TODO Rewrite this to a filter +./mailid.php:145: // @TODO Rewrite this to a filter +./mailid_top.php:108: // @TODO Rewrite this to a filter +./mailid_top.php:145: // @TODO Rewrite this to a filter ./mailid_top.php:18: * @TODO Merge this script with mailid.php * -./mailid_top.php:196: // @TODO Rewrite this to a filter -./mailid_top.php:231: // @TODO Rewrite these blocks to filter +./mailid_top.php:192: // @TODO Rewrite this to a filter +./mailid_top.php:199: // @TODO Rewrite this to a filter +./mailid_top.php:234: // @TODO Rewrite these blocks to filter ./view.php:71: // @TODO No banner found, output some default banner ./templates/de/html/admin/admin_add_country.tpl:23: ./templates/de/html/admin/admin_config_other.tpl:79: ./templates/de/html/admin/admin_config_rewrite.tpl:4: ./templates/de/html/admin/admin_edit_admin_menu.tpl:4: -./templates/de/html/admin/admin_list_refs_level.tpl:20: +./templates/de/html/admin/admin_list_refs_level.tpl:21: ./templates/de/html/admin/admin_list_unconfirmed_list.tpl:3: ./templates/de/html/admin/admin_login_form.tpl:34: @TODO Doesn't work with sessions ./templates/de/html/admin/admin_login_form.tpl:37: @TODO Try to move the select box to our generic functions @@ -208,11 +211,13 @@ ./templates/de/html/guest/guest_login.tpl:21: @TODO Deactivated feature, try to implement it or remove it. ./templates/de/html/guest/guest_nickname_login.tpl:21: @TODO Deactivated feature, try to find a solution for this or remove it. ./templates/de/html/guest/guest_stats_member.tpl:21: @TODO We have to fix these counters. -./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11: +./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:12: ./templates/de/html/surfbar/surfbar_frameset.tpl:4: // @TODO This redirect kills our own frameset ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5: ./.htaccess:10: # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L] -./.htaccess:11: # @TODO When ext-terms is finished RewriteRule ^agb.php$ modules.php?module=index&what=terms [L] +./.htaccess:11: # @TODO When ext-terms is finished RewriteRule ^cms/index/wht/agb$ modules.php?module=index&what=terms [L] +./.htaccess:12: # @TODO When ext-terms is finished RewriteRule ^modules.php?module=index&what=agb$ modules.php?module=index&what=terms [L] +./.htaccess:13: # @TODO When ext-terms is finished RewriteRule ^agb.php$ modules.php?module=index&what=terms [L] ./.htaccess:9: # @TODO When ext-imprint is finished RewriteRule ^cms/index/wht/impressum$ modules.php?module=index&what=imprint [L] ### ### DEPRECATION FOLLOWS: ### ### ./inc/autopurge/purge-general.php:2:// @DEPRECATED @@ -221,9 +226,15 @@ ./inc/autopurge/purge-tsks.php:2:// @DEPRECATED ./inc/autopurge/purge-unconfirmed.php:2:// @DEPRECATED ./inc/daily/daily_engine.php:2:// @DEPRECATED +./inc/extensions/ext-funcoins.php:2:// @DEPRECATED ./inc/extensions/ext-iso3166.php:2:// @DEPRECATED +./inc/extensions/ext-primera.php:2:// @DEPRECATED ./inc/gen_refback.php:2:// @DEPRECATED ./inc/js/js-jquery.php:2:// @DEPRECATED +./inc/language/funcoins_de.php:2:// @DEPRECATED +./inc/language/primera_de.php:2:// @DEPRECATED +./inc/libs/funcoins_functions.php:2:// @DEPRECATED +./inc/libs/primera_functions.php:2:// @DEPRECATED ./inc/loader/load_cache-admin.php:2:// @DEPRECATED ./inc/loader/load_cache-config.php:2:// @DEPRECATED ./inc/loader/load_cache-extension.php:2:// @DEPRECATED @@ -235,13 +246,19 @@ ./inc/loader/load_cache-revision.php:2:// @DEPRECATED ./inc/loader/load_cache-them.php:2:// @DEPRECATED ./inc/loader/load-extensions.php:2:// @DEPRECATED -./inc/modules/admin/admin-inc.php:507:// @DEPRECATED +./inc/modules/admin/action-funcoins.php:2:// @DEPRECATED +./inc/modules/admin/action-primera.php:2:// @DEPRECATED +./inc/modules/admin/admin-inc.php:510:// @DEPRECATED ./inc/modules/admin/what-chk_regs.php:2:// @DEPRECATED ./inc/modules/admin/what-config_admins.php:2:// @DEPRECATED ./inc/modules/admin/what-config_email.php:2:// @DEPRECATED +./inc/modules/admin/what-config_funcoins.php:2:// @DEPRECATED ./inc/modules/admin/what-config_networks.php:2:// @DEPRECATED +./inc/modules/admin/what-config_primera.php:2:// @DEPRECATED ./inc/modules/admin/what-list_network_api_translation.php:2:// @DEPRECATED ./inc/modules/admin/what-list_network_params.php:2:// @DEPRECATED +./inc/modules/admin/what-list_primera.php:2:// @DEPRECATED +./inc/modules/admin/what-overview.php:2:// @DEPRECATED ./inc/modules/guest/action-actions.php:2:// @DEPRECATED ./inc/modules/guest/action-dummy.php:2:// @DEPRECATED ./inc/modules/guest/action-interna.php:2:// @DEPRECATED @@ -288,6 +305,7 @@ ./inc/modules/guest/what-svn.php:2:// @DEPRECATED ./inc/modules/guest/what-why_reg.php:2:// @DEPRECATED ./inc/modules/member/what-earnings.php:2:// @DEPRECATED +./inc/modules/member/what-primera.php:2:// @DEPRECATED ./inc/modules/member/what-surfbar_book.php:2:// @DEPRECATED ./inc/modules/member/what-surfbar_start.php:2:// @DEPRECATED ./inc/modules/member/what-surfbar_stats.php:2:// @DEPRECATED @@ -304,7 +322,6 @@ ./inc/reset/reset_profile.php:2:// @DEPRECATED ./inc/reset/reset_surfbar.php:2:// @DEPRECATED ./inc/reset/reset_yoomedia.php:2:// @DEPRECATED -./inc/template-functions.php:464: // @DEPRECATED Loading the user data by given userid is deprecated because it is not related to template loading ./network-check.php:2:// @DEPRECATED ./templates/de/emails/add-points.tpl:1:@DEPRECATED ./templates/de/emails/admin/admin_coupon.tpl:1:@DEPRECATED @@ -316,10 +333,12 @@ ./templates/de/emails/bonus-mail.tpl:1:@DEPRECATED ./templates/de/emails/confirm-member.tpl:1:@DEPRECATED ./templates/de/emails/confirm-referral.tpl:1:@DEPRECATED +./templates/de/emails/del_sponsor.tpl:1:@DEPRECATED ./templates/de/emails/del-user.tpl:1:@DEPRECATED ./templates/de/emails/done-admin.tpl:1:@DEPRECATED ./templates/de/emails/done-member.tpl:1:@DEPRECATED ./templates/de/emails/guest/guest_user_confirmed_referal.tpl:1:@DEPRECATED +./templates/de/emails/lock_sponsor.tpl:1:@DEPRECATED ./templates/de/emails/lock-user.tpl:1:@DEPRECATED ./templates/de/emails/member/member_coupon.tpl:1:@DEPRECATED ./templates/de/emails/member/member_del_surfbar_urls.tpl:1:@DEPRECATED @@ -354,6 +373,7 @@ ./templates/de/html/admin/admin_config_email_edit.tpl:1: ./templates/de/html/admin/admin_config_email_row.tpl:1: ./templates/de/html/admin/admin_config_email.tpl:1: +./templates/de/html/admin/admin_config_funcoins.tpl:1: ./templates/de/html/admin/admin_config_home_row.tpl:1: ./templates/de/html/admin/admin_config_home_settings.tpl:1: ./templates/de/html/admin/admin_config_network.tpl:1: @@ -361,7 +381,14 @@ ./templates/de/html/admin/admin_config_payouts_del_row.tpl:1: ./templates/de/html/admin/admin_config_payouts_del.tpl:1: ./templates/de/html/admin/admin_config_payouts_edit_row.tpl:1: -./templates/de/html/admin/admin_config_payouts_edit.tpl:1: +./templates/de/html/admin/admin_config_payouts_edit.tpl:1: +./templates/de/html/admin/admin_config_primera.tpl:1: +./templates/de/html/admin/admin_config_rallye_del_row.tpl:1: +./templates/de/html/admin/admin_config_rallye_del.tpl:1: +./templates/de/html/admin/admin_config_rallye_edit_row.tpl:1: +./templates/de/html/admin/admin_config_rallye_edit.tpl:1: +./templates/de/html/admin/admin_config_rallye_prices_row.tpl:1: +./templates/de/html/admin/admin_config_rallye_prices.tpl:1: ./templates/de/html/admin/admin_delete_network_params_row.tpl:1: ./templates/de/html/admin/admin_delete_network_params.tpl:1: ./templates/de/html/admin/admin_del_surfbar_urls_row.tpl:1: @@ -379,6 +406,8 @@ ./templates/de/html/admin/admin_list_network_config.tpl:1: ./templates/de/html/admin/admin_list_network_params_row.tpl:1: ./templates/de/html/admin/admin_list_network_params.tpl:1: +./templates/de/html/admin/admin_list_primera_main.tpl:1: +./templates/de/html/admin/admin_list_primera_row.tpl:1: ./templates/de/html/admin/admin_list_refs2.tpl:1: ./templates/de/html/admin/admin_list_user_sort_form.tpl:1: ./templates/de/html/admin/admin_main_header.tpl:1: @@ -400,6 +429,8 @@ ./templates/de/html/donate_bottom.tpl:1: ./templates/de/html/donate.tpl:1: ./templates/de/html/downloads.tpl:1: +./templates/de/html/ext/ext_ebesucher.tpl:1: +./templates/de/html/ext/ext_funcoins.tpl:1: ./templates/de/html/ext/ext_iso3166.tpl:1: ./templates/de/html/faqs.tpl:1: ./templates/de/html/fatal_footer.tpl:1: @@ -411,14 +442,27 @@ ./templates/de/html/guest/guest_rallye_row.tpl:1: ./templates/de/html/guest/guest_rallye_show.tpl:1: ./templates/de/html/guest/guest_rallye.tpl:1: +./templates/de/html/install/install_main.tpl:1: ./templates/de/html/jobs.tpl:1: +./templates/de/html/js/js_admin_menu_onclick.tpl:1: ./templates/de/html/js/js_jquery.tpl:1: ./templates/de/html/link_us.tpl:1: ./templates/de/html/listed.tpl:1: ./templates/de/html/login_failtures.tpl:1: +./templates/de/html/member/member_cat_row.tpl:1: +./templates/de/html/member/member_cats_footer.tpl:1: +./templates/de/html/member/member_cats_header.tpl:1: ./templates/de/html/member/member_list_referal_level.tpl:1: ./templates/de/html/member/member_list_referal_row.tpl:1: ./templates/de/html/member/member_list_referal.tpl:1: +./templates/de/html/member/member_order-back.tpl:1: +./templates/de/html/member/member_order-html_ext.tpl:1: +./templates/de/html/member/member_order-html_intro.tpl:1: +./templates/de/html/member/member_order-zip1.tpl:1: +./templates/de/html/member/member_order-zip2.tpl:1: +./templates/de/html/member/member_primera_mode_list_row.tpl:1: +./templates/de/html/member/member_primera_mode_list.tpl:1: +./templates/de/html/member/member_primera_mode_pay.tpl:1: ./templates/de/html/member/member_refback_edit.tpl:1: ./templates/de/html/member/member_refback_list_level.tpl:1: ./templates/de/html/member/member_refback_list_row_deleted.tpl:1: @@ -460,62 +504,25 @@ ./templates/de/html/requirements.tpl:1: ./templates/de/html/rettet_das_internet.tpl:1: ./templates/de/html/roadmap.tpl:1: -./templates/de/html/send_bonus_footer.tpl:1: -./templates/de/html/send_bonus_header.tpl:1: ./templates/de/html/stats.tpl:1: ./templates/de/html/svn.tpl:1: ./templates/de/html/why_reg.tpl:1: ./templates/xml/admin/admin_del_do_surfbar_urls.xml:1: ./templates/xml/admin/admin_del_show_surfbar_urls.xml:1: ### ### template-warnings.log follows: ### ### -Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_cookies_disabled.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_uberwach.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_frame_top.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_jquery.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_member_book.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_stopped.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_surfbar_member_edit.tpl. -Warning: Not parsing JavaScript templates/de/html/js/js_admin_menu_onclick.tpl. +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/page_footer.tpl, line: 1 in /media +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu/menu_what_end.tpl, line: 1 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu/menu_what_end.tpl, line: 2 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/admin/admin_main_footer.tpl, line: 1 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/admin/admin_main_footer.tpl, line: 2 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_main_footer.tpl, line: 8 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/admin/admin_main_footer.tpl, line: 9 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/guest/guest_footer.tpl, line: 6 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/guest/guest_menu_content.tpl, line: 2 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/guest/guest_content_footer.tpl, line: 1 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/guest/guest_content_footer.tpl, line: 5 in -PHP Warning: DOMDocument::loadHTMLFile(): ID form already defined in templates/de/html/member/member_cash_coupon.tpl, line: 21 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_cats_footer.tpl, line: 7 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : form in templates/de/html/member/member_cats_footer.tpl, line: 8 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/member/member_cats_footer.tpl, line: 9 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_footer.tpl, line: 6 in +PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/member/member_reflink.tpl, line: 29 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/member/member_content_right.tpl, line: 1 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/member/member_content_right.tpl, line: 5 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: form and div in templates/de/html/member/member_book_surfbar_dynamic.tpl, line: 47 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/member/member_reflink.tpl, line: 29 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_list_beg.tpl, line: 24 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/member/member_welcome_footer.tpl, line: 1 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/member/member_footer.tpl, line: 6 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 9 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 13 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 19 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 25 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 31 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 37 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 43 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : strong in templates/de/html/member/member_mail_normal_active.tpl, line: 49 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: div and u in templates/de/html/ext/ext_cprping.tpl, line: 18 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: div and u in templates/de/html/ext/ext_cprping.tpl, line: 18 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/page_footer.tpl, line: 1 in /home -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu/menu_what_end.tpl, line: 1 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu/menu_what_end.tpl, line: 2 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: td and strong in templates/de/html/admin/admin_list_beg.tpl, line: 6 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: td and strong in templates/de/html/admin/admin_list_beg.tpl, line: 6 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: form and div in templates/de/html/admin/admin_add_config_network_type.tpl, line: 17 in -PHP Warning: DOMDocument::loadHTMLFile(): htmlParseEntityRef: expecting ';' in templates/de/html/admin/admin_add_payout.tpl, line: 99 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: form and div in templates/de/html/admin/admin_add_config_network_type_form.tpl, line: 39 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: form and div in templates/de/html/admin/admin_show_config_network_type.tpl, line: 34 in -PHP Warning: DOMDocument::loadHTMLFile(): Opening and ending tag mismatch: form and div in templates/de/html/admin/admin_edit_config_network_type_form.tpl, line: 40 in -PHP Warning: DOMDocument::loadHTMLFile(): htmlParseEntityRef: expecting ';' in templates/de/html/admin/admin_add_refbanner.tpl, line: 2 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/admin/admin_main_footer.tpl, line: 1 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/admin/admin_main_footer.tpl, line: 2 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_main_footer.tpl, line: 8 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/admin/admin_main_footer.tpl, line: 9 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : form in templates/de/html/admin/admin_config_network_types.tpl, line: 22 in -PHP Warning: DOMDocument::loadHTMLFile(): htmlParseEntityRef: expecting ';' in templates/de/html/admin/admin_edit_email_max_rec.tpl, line: 2 in diff --git a/DOCS/de/LICENSE.txt b/DOCS/de/LICENSE.txt index 719ba8e409..0f0d031e20 100644 --- a/DOCS/de/LICENSE.txt +++ b/DOCS/de/LICENSE.txt @@ -8,7 +8,7 @@ Sie bitte unter folgendem Link nach: http://www.gnu.de/gpl-ger.html -Die gueltige Lizenz zu dieser Software finden Sie in der Datei DOCS/LICENSE.txt. +Die gueltige Lizenz zu dieser Software finden Sie in der Datei DOCS/LICENSE-GPL2.txt. Eine Online-Kopie koennen Sie unter folgender URL abrufen: diff --git a/DOCS/de/README.txt b/DOCS/de/README.txt index ea8c8a57d9..27c343d73b 100644 --- a/DOCS/de/README.txt +++ b/DOCS/de/README.txt @@ -106,7 +106,7 @@ Die Installation ist recht einfach gehalten: muessen derzeit die deutsche Sprache dann so aufrufen: http://www.ihr-server.de/install.php?mx_lang=de -- Lassen Sie folgende Einstellungen beim Installieren auf Standart: +- Lassen Sie folgende Einstellungen beim Installieren auf Standard: + Ausgabe-Modus auf 'render' + Frameset abschalten (Table-Set aktivieren). @@ -238,7 +238,7 @@ automatisch generiert. Die Erweiterungen admintheme1 und admintheme_default sind Sondererweiterungen: -- admintheme_default: Standartmenue (Auslieferung) setzen +- admintheme_default: Standardmenue (Auslieferung) setzen - admintheme1: EMail-Statistik und Online-Statistik werden in das Menue Statistiken verschoben @@ -248,7 +248,7 @@ Funktion haben. Zurueck zur Konfiguration des Mailtausches! -Als naechstes sollten Sie schauen, ob Sie mit den Standartbeschriftungen aller +Als naechstes sollten Sie schauen, ob Sie mit den Standardbeschriftungen aller Menues zufrieden sind (was auch meistens so ist... ;-) ). Dann richten Sie unter "Einstellungen" die Untermenuepunkte von oben nach unten durcharbeiten: @@ -357,7 +357,7 @@ Accounts! Dabei brauchen Sie noch nicht mal Ihren Ref-Link bewerben! Das geschieht vollkommen automatisch! Melden Sie sich als naechstes selber an. Die vom System Ihnen zugeteilte Ref-ID -tragen Sie unter "Einstellungen -> Standart Ref-ID" als Referral-ID ein. +tragen Sie unter "Einstellungen -> Standard Ref-ID" als Referral-ID ein. Sobald Sie dies getan haben, und jemand Ihren Mailtausch ohne Ref-Link aufruft, wird automatisch Ihre Ref-ID im Anmeldeformular eingesetzt. Folglich erhalten Sie @@ -493,7 +493,7 @@ FEHLER: LOESUNG: (LigHTTPd) Bitte hier nachsehen: http://forum.mxchange.org/topic-477.html Letztendlich muss die Einstellung 'net.core.somaxconn' auf z.B. 1024 erhoeht werden, - Standartwert ist 128 unter Debian, was bei hoher Last viel zu niedrig ist. + Standardwert ist 128 unter Debian, was bei hoher Last viel zu niedrig ist. FEHLER: Ihr Hoster leitet alle nicht eingerichteten Subdomains auf Ihre Hauptseite @@ -504,7 +504,7 @@ OESUNG: die URL Ihrer Webseite ein: // Fix URL - start -setConfigEntry('URL', 'http://www.your-domain.invalid'); +setConfigEntry('URL', 'http://www.your-domain.example'); // Fix URL - end (*KEIN* Slash am Ende!) @@ -533,6 +533,10 @@ Auch sollten Sie meinen Bug-Tracker aufsuchen und dort Fehlermeldungen posten: http://bugs.mxchange.org +Das Wiki liefert viele wichtige Informationen: + +http://wiki.mxchange.org + Alle wichtigen Kontaktdaten finden Sie im Impressum: http://mxchange.org/cms/index/wht/impressum @@ -557,6 +561,6 @@ mitgeschickt bzw. ist in der Repository unter [1] einsehbar. 12. Aufloesung von Nummern: --------------------------- -[1]: http://mxchange.org/repos/mailer/branches/0.2.1-FINAL/DOCS/LICENSE.txt +[1]: http://mxchange.org/repos/mailer/branches/0.2.1-FINAL/DOCS/LICENSE-GPL2.txt [EOF] diff --git a/DOCS/de/SECURITY.txt b/DOCS/de/SECURITY.txt index 58dd21ae95..507e45c13b 100644 --- a/DOCS/de/SECURITY.txt +++ b/DOCS/de/SECURITY.txt @@ -95,7 +95,7 @@ weiterhin ein Schutzmechanimus. Es ist also weder moeglich, sich mit gleicher E-Mail-Adresse, noch innerhalb einer einstellbaren Zeitspanne mit unterschiedlichen E-Mail-Adressen anzumelden. -Beide Barrieren koennen Sie im Admin-Bereich veraendern, die Standart- +Beide Barrieren koennen Sie im Admin-Bereich veraendern, die Standard- Einstellungen sind mit einigen Webmastern abgeklaert und sollte sicher genug sein. diff --git a/DOCS/de/TODO.txt b/DOCS/de/TODO.txt index b180a729e9..8196f91082 100644 --- a/DOCS/de/TODO.txt +++ b/DOCS/de/TODO.txt @@ -12,7 +12,7 @@ --- OFFEN: --- - Den gesamten HTML-Code auf XHTML portieren und mit http://validator.w3.org validieren - Alle JavaScripte aus den HTML-Templates umlagern und per js.php?tag=xxx - aufrufen + aufrufen (bzw. nach js/ auslagern wenn keine Template-Variablen vorhanden sind) - Die Datenbankspalten ext_has_css nach ext_css und id nach ext_id umbenennen (Tabelle extensions) - Dokumentation erweitern - Englische Uebersetzung komplettieren diff --git a/DOCS/de/autoreg/README.txt b/DOCS/de/autoreg/README.txt index cd4c9eecac..b41c59b1c2 100644 --- a/DOCS/de/autoreg/README.txt +++ b/DOCS/de/autoreg/README.txt @@ -6,7 +6,7 @@ die eigentlichen Daten werden mit BASE-64 und URL-Encoding uebergeben. Aufruf von autoreg.php: -http://ihr-server.domain.invalid/autoreg.php?request=url_encode(base64_encode(gzcompress(ENCRYPT|REQUEST-DATA|AUTH-KEY))) +http://ihr-server.domain.example/autoreg.php?request=url_encode(base64_encode(gzcompress(ENCRYPT|REQUEST-DATA|AUTH-KEY))) Dabei gilt: -------------------------------------------------------------------------------- diff --git a/DOCS/de/forced/Tabellenlayout.txt b/DOCS/de/forced/Tabellenlayout.txt index 6f7a8153ff..9ac788964f 100644 --- a/DOCS/de/forced/Tabellenlayout.txt +++ b/DOCS/de/forced/Tabellenlayout.txt @@ -1,45 +1,11 @@ -Forced-Banner/-Textlink (Ads): -- Id-Nummer -- Banner-URL -- Klick-URL -- Hoehe -- Breite -- Alternativer Text -- Framebrecher Y/N -- Zaehler Anzahl Klicks -- Zaehler Anzahl Views -- Reloadzeit/-sperre -- Mindestauffenthalt +------------------------------------------------------------------------------- + Hinweis wegen Saeuberung dieser Datei +------------------------------------------------------------------------------- -Forced-Kampagnen: -- Id-Nummer -- Banner-Id -- Buchungszeitmarke -- Status (ACTIVE,PENDING,EXPIRED,LOCKED) -- Sperrgrund -- Sperrzeitmarke -- Ablaufzeitmarke -- Preis pro Klick -- Verguetung pro Klick -- Anzahl gebuchter Klicks -- Veguetung-Id (wenn nicht Preis/Verguetung gesetzt sind) - -Forced-Kampagne<>User: -- Id-Nummer -- Kampagnen-Id -- Bucher-Id (vom Mitglied/Sponsor/Admin) -- Bucher-Typ (USER,SPONSOR,ADMIN,API) - -Forced-Verguetungen f. Mitglieder/Sponsoren -- Id-Nummer -- Preis pro Klick -- Verguetung pro Klick -- Sichtbarkeit (MEMBER,SPONSOR,ALL,NONE) - -Forced-Kampagnenstatistik -- Id-Nummer -- Kampagnen-Id -- User-Id (der geklickt hat) -- Klickzeitpunkt -- Verguetung +Diese Datei wurde am 03.10.2011 gesaeubert, da diese Datei nicht mehr gewartet +wird und der Aufwand, drei Stellen (diese Datei, die ext-forced.php selbst und +das Wiki) zu gross wird. Anstelle gibt es jetzt eine Wiki-Seite, die gepflegt +wird. +Hier der Link zur Entwickler-Wiki-Seite von ext-forced: +http://wiki.mxchange.org/doku.php/de/developer/ideas/extensions/ext-forced diff --git a/DOCS/de/network/README.txt b/DOCS/de/network/README.txt index 35beb826f8..42267daf5d 100644 --- a/DOCS/de/network/README.txt +++ b/DOCS/de/network/README.txt @@ -19,7 +19,7 @@ CID = Kampagnen-Id (z.B. Textmail-Id aus Textmails, CampaignID) TID = Track-Id oder Sub-Id (z.B. lokale User-Id von dem klickenden Mitglied) Beispiel: -http://www.anbieter-name.invalid/code/t-mail.php?id=%UID%&sid=%SID%&trackid=%TID% +http://www.anbieter-name.example/code/t-mail.php?id=%UID%&sid=%SID%&trackid=%TID% ------------------------------------------------------------------------------- @@ -60,7 +60,7 @@ Tragen Sie dazu einfach den kompletten "rohen" Referral-Link aus dem jeweiligen Zugangsbereiches des Werbenetzwerkes ein, wo Sie sich angemeldet haben. So kann dieser Link aussehen: -http://www.anbieter-name.invalid/?ref=xxxx +http://www.anbieter-name.example/?ref=xxxx Den genauen Link erfahren Sie im Zugangsbereich des Werbenetzwerkes meistens unter "Werbebanner" oder "Ref-Center". Bitte kopieren Sie jedoch keinen diff --git a/DOCS/debug-lines.sh b/DOCS/debug-lines.sh index 7b31b121f8..b3de570576 100755 --- a/DOCS/debug-lines.sh +++ b/DOCS/debug-lines.sh @@ -1,10 +1 @@ -#!/bin/sh - -# Shell script to determine where in the code are commented-in debug lines -# -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -svn diff |grep -v "svn diff" | grep "DEBUG" | grep "+" | grep -v "//\* DEBUG" > DOCS/debug-lines.log +#@DEPRECATED diff --git a/DOCS/en/LICENSE.txt b/DOCS/en/LICENSE.txt index a3fb4dbe1e..e16c9a66a4 100644 --- a/DOCS/en/LICENSE.txt +++ b/DOCS/en/LICENSE.txt @@ -1,3 +1,3 @@ -Please read the license file DOCS/LICENSE.txt for details. +Please read the license file DOCS/LICENSE-GPL2.txt for details. [EOF] diff --git a/DOCS/en/SECURITY.txt b/DOCS/en/SECURITY.txt index 8a2b64cec7..c97fbb1953 100644 --- a/DOCS/en/SECURITY.txt +++ b/DOCS/en/SECURITY.txt @@ -94,7 +94,7 @@ weiterhin ein Schutzmechanimus. Es ist also weder moeglich, sich mit gleicher E-Mail-Adresse, noch innerhalb einer einstellbaren Zeitspanne mit unterschiedlichen E-Mail-Adressen anzumelden. -Beide Barrieren koennen Sie im Admin-Bereich veraendern, die Standart- +Beide Barrieren koennen Sie im Admin-Bereich veraendern, die Standard- Einstellung ist mit einigen Webmastern abgeklaert und sollte sicher genug sein. 3. Modul-Sicherheit diff --git a/DOCS/final-checker.sh b/DOCS/final-checker.sh index 322b9382d0..b3de570576 100755 --- a/DOCS/final-checker.sh +++ b/DOCS/final-checker.sh @@ -1,34 +1 @@ -#!/bin/sh - -# Shell script to determine how close we are to final release -# If one of these values are bigger zero we still have to do something -# -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -echo "$0: Analyzing..." -echo " - TODOs in PHP..." -TODOS_PHP=`find -type f -name "*.php" -exec grep "@TODO" {} \; | grep "@" --count` -echo " - TODOs in TPL..." -TODOS_TPL=`find -type f -name "*.tpl" -exec grep "@TODO" {} \; | grep "@" --count` -echo " - TODOs in XML..." -TODOS_XML=`find -type f -name "*.xml" -exec grep "@TODO" {} \; | grep "@" --count` -echo " - DEPRECATED in PHP..." -DEPRECATED_PHP=`find -type f -name "*.php" -exec grep "@DEPRECATED" {} \; | grep "@" --count` -echo " - DEPRECATED in TPL..." -DEPRECATED_TPL=`find -type f -name "*.tpl" -exec grep "@DEPRECATED" {} \; | grep "@" --count` -echo " - DEPRECATED in XML..." -DEPRECATED_XML=`find -type f -name "*.xml" -exec grep "@DEPRECATED" {} \; | grep "@" --count` -echo " - global statements..." -GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "security_functions.php" | grep -v "phpmailer" --count` -echo "$0: Result..." -echo "--------------------------------------" -echo " - Open TODOs: ${TODOS_PHP}/${TODOS_TPL}/${TODOS_XML}" -echo " - Open DEPRECATED: ${DEPRECATED_PHP}/${DEPRECATED_TPL}/${DEPRECATED_XML}" -echo " - global statements: ${GLOBALS}" -echo "--------------------------------------" -echo "$0: Thanks for waiting for the final release 0.2.1-FINAL! :-)" -echo -exit 0 +#@DEPRECATED diff --git a/DOCS/lint.sh b/DOCS/lint.sh index 1e333eee6a..b3de570576 100755 --- a/DOCS/lint.sh +++ b/DOCS/lint.sh @@ -1,15 +1 @@ -#!/bin/sh - -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -echo "$0: Analysing PHP scripts for syntax errors (lint) ..." -LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` - -if test "${LINT}" != ""; then - echo "${LINT}" -else - echo "$0: No syntax errors found." -fi +#@DEPRECATED diff --git a/DOCS/merge-exp.sh b/DOCS/merge-exp.sh index fcc04614e6..b3de570576 100755 --- a/DOCS/merge-exp.sh +++ b/DOCS/merge-exp.sh @@ -1,3 +1 @@ -#!/bin/sh - -svn merge --dry-run http://mxchange.org/repos/mailer/branches/0.2.1-FINAL-expression_language_BROKEN/ http://mxchange.org/repos/mailer/branches/0.2.1-FINAL . +#@DEPRECATED diff --git a/DOCS/prop-set.sh b/DOCS/prop-set.sh index caf1bcd542..b3de570576 100755 --- a/DOCS/prop-set.sh +++ b/DOCS/prop-set.sh @@ -1,20 +1 @@ -#!/bin/sh - -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -find -type f -name "*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*-" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*_" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "_*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*-" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*_" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "_*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.jpg" -exec svn propset svn:mime-type "image/jpeg" {} \; -find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; -find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; -find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; +#@DEPRECATED diff --git a/DOCS/remove-deprecated.sh b/DOCS/remove-deprecated.sh index 87bed750d9..b3de570576 100755 --- a/DOCS/remove-deprecated.sh +++ b/DOCS/remove-deprecated.sh @@ -1,12 +1 @@ -#!/bin/sh - -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -LIST=`find -name "*.tpl" -exec grep -H "@DEPRECATED" {} \;` -if test "${LIST}" != ""; then - echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del - sh ./DOCS/todo-builder.sh -fi +#@DEPRECATED diff --git a/DOCS/todo-builder.sh b/DOCS/todo-builder.sh index 999c8e84a4..b3de570576 100755 --- a/DOCS/todo-builder.sh +++ b/DOCS/todo-builder.sh @@ -1,35 +1 @@ -#!/bin/sh - -# This script helps building the file DOCS/TODOs.txt and should be executed by -# developers with SVN write-access - -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -TODO=`dirname $0`/TODOs.txt - -echo "$0: Generating TODOs.txt ..." -echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=${UID}/user=${USER}) ###" > ${TODO} -echo "### DO NOT EDIT THIS FILE. ###" >> ${TODO} -echo "$0: Searching for @TODO ..." -find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name "*.tpl" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name "*.xml" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name ".htaccess" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -echo "### ### DEPRECATION FOLLOWS: ### ###" >> ${TODO} -echo "$0: Searching for @DEPRECATED ..." -find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name "*.xml" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name ".htaccess" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -echo "$0: Checking for template-warnings.log ..." -LOG=`dirname $0`/template-warnings.log -if test -e "${LOG}"; then - echo "$0: Found a template-warnings.log, adding it..." - echo "### ### template-warnings.log follows: ### ###" >> ${TODO} - cat ${LOG} >> ${TODO} -fi -echo "$0: Done." -exit 0 +#@DEPRECATED diff --git a/DOCS/tpl-validator.php b/DOCS/tpl-validator.php index d5f3c055aa..737d10675f 100644 --- a/DOCS/tpl-validator.php +++ b/DOCS/tpl-validator.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -56,15 +56,15 @@ $doc->loadHTMLFile($_SERVER['argv'][1]); $data = $doc->saveHTML(); $newData = str_replace("
", "
\n", $data); -$newData = str_replace("\n\n", "\n", $newData); +$newData = str_replace("\n\n", chr(10), $newData); -$array = explode("\n", $newData); +$array = explode(chr(10), $newData); array_shift($array); array_shift($array); unset($array[count($array) - 1]); unset($array[count($array) - 1]); -$newData = implode("\n", $array)."\n"; +$newData = implode(chr(10), $array).chr(10); // Has a template changed? if ($data != $newData) { diff --git a/DOCS/validator.sh b/DOCS/validator.sh index 9dea827d03..b3de570576 100755 --- a/DOCS/validator.sh +++ b/DOCS/validator.sh @@ -1,14 +1 @@ -#!/bin/sh - -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -echo "$0: Validating all templates..." -DUMMY=`find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; 2>&1` -echo "${DUMMY}" | \ - grep "Warning" | \ - cut -d "/" -f 1-5 | \ - grep -v "error parsing attribute name" > `dirname $0`/template-warnings.log -echo "$0: done." +#@DEPRECATED diff --git a/admin.php b/admin.php index c247e2b19b..9505fa7de7 100644 --- a/admin.php +++ b/admin.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module -$GLOBALS['__module'] = 'admin'; -$GLOBALS['output_mode'] = -1; +$GLOBALS['__module'] = 'admin'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); diff --git a/agb.php b/agb.php index b995f68da7..a47be37f6d 100644 --- a/agb.php +++ b/agb.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// Set module -$GLOBALS['__module'] = 'agb'; -$GLOBALS['output_mode'] = -1; +// Set module and output mode (raw) +$GLOBALS['__module'] = 'agb'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); diff --git a/ajax.php b/ajax.php new file mode 100644 index 0000000000..8ef804fb8f --- /dev/null +++ b/ajax.php @@ -0,0 +1,90 @@ + diff --git a/autoreg.php b/autoreg.php index 7ccffab410..de3548d399 100644 --- a/autoreg.php +++ b/autoreg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,12 +39,12 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module -$GLOBALS['__module'] = 'autoreg'; -$GLOBALS['output_mode'] = 1; -$GLOBALS['header_sent'] = 3; +$GLOBALS['__module'] = 'autoreg'; +$GLOBALS['__output_mode'] = 1; +$GLOBALS['__header_sent'] = 3; // Load the required file(s) require('inc/config-global.php'); diff --git a/beg.php b/beg.php index 83c0bb1e2a..8459da1436 100644 --- a/beg.php +++ b/beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// Set module -$GLOBALS['__module'] = 'beg'; -$GLOBALS['output_mode'] = '0'; +// Set module and output mode (HTML) +$GLOBALS['__module'] = 'beg'; +$GLOBALS['__output_mode'] = '0'; $errorCode = NULL; // Load the required file(s) @@ -212,7 +212,7 @@ if (isGetRequestElementSet('userid')) { } // Really all done here... ;-) -shutdown(); +doShutdown(); // [EOF] ?> diff --git a/birthday_confirm.php b/birthday_confirm.php index 364d7ca236..f1193741f4 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module -$GLOBALS['__module'] = 'birthday_confirm'; -$GLOBALS['output_mode'] = '0'; +$GLOBALS['__module'] = 'birthday_confirm'; +$GLOBALS['__output_mode'] = '0'; // Load the required file(s) require('inc/config-global.php'); diff --git a/click.php b/click.php index d5cc535af5..7a35e98a54 100644 --- a/click.php +++ b/click.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module -$GLOBALS['__module'] = 'click'; -$GLOBALS['output_mode'] = -1; +$GLOBALS['__module'] = 'click'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); @@ -67,7 +67,7 @@ if ((isGetRequestElementSet('user')) && (isGetRequestElementSet('banner'))) { redirectToUrl('modules.php?module=index'); // Shutdown -shutdown(); +doShutdown(); // [EOF] ?> diff --git a/confirm.php b/confirm.php index 56c395494f..5df3718fb6 100644 --- a/confirm.php +++ b/confirm.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// Set module to confirm -$GLOBALS['__module'] = 'confirm'; -$GLOBALS['output_mode'] = -1; +// Set module to confirm and output-mode to raw +$GLOBALS['__module'] = 'confirm'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); diff --git a/css.php b/css.php index 277d19ec45..c75762c63c 100644 --- a/css.php +++ b/css.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,14 +39,14 @@ require('inc/libs/security_functions.php'); // Footer is disabled in CSS mode -$GLOBALS['footer_sent'] = -1; +$GLOBALS['__footer_sent'] = -1; // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// This is a CSS file loader! -$GLOBALS['__module'] = 'css'; -$GLOBALS['output_mode'] = 1; +// This is a CSS file loader +$GLOBALS['__module'] = 'css'; +$GLOBALS['__output_mode'] = 1; // Load the required file(s) require('inc/config-global.php'); diff --git a/debug.php b/debug.php index 87d11a704e..77443cf126 100644 --- a/debug.php +++ b/debug.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module and fake "CSS mode" -$GLOBALS['__module'] = 'debug'; -$GLOBALS['output_mode'] = -1; +$GLOBALS['__module'] = 'debug'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); @@ -82,7 +82,7 @@ if ((isExtensionActive('debug')) && (!ifFatalErrorsDetected())) { } // END - if // Really all done here... ;-) -shutdown(); +doShutdown(); // [EOF] ?> diff --git a/doubler.php b/doubler.php index 6a259162ed..d8a7f4be56 100644 --- a/doubler.php +++ b/doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// Set module -$GLOBALS['__module'] = 'doubler'; -$GLOBALS['output_mode'] = '0'; +// Set module and output mode +$GLOBALS['__module'] = 'doubler'; +$GLOBALS['__output_mode'] = '0'; // Load the required file(s) require('inc/config-global.php'); diff --git a/img.php b/img.php index ebe55cbecc..6cb9043b66 100644 --- a/img.php +++ b/img.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); -// Set module -$GLOBALS['__module'] = 'img'; -$GLOBALS['output_mode'] = -3; +// Set module and output mode +$GLOBALS['__module'] = 'img'; +$GLOBALS['__output_mode'] = -3; // Load the required file(s) require('inc/config-global.php'); diff --git a/inc/ajax-functions.php b/inc/ajax-functions.php new file mode 100644 index 0000000000..47db96ca0b --- /dev/null +++ b/inc/ajax-functions.php @@ -0,0 +1,137 @@ + NULL, + ); + + // Set content type (mostly JSON) + setContentType('application/json'); + + // By default nothing is found/valid + setHttpStatus('204 No Content'); + + // Set username + setUsername('{--USERNAME_AJAX--}'); + + // In installation phase load ajax_installer.php + if (isInstallationPhase()) { + // Load it + loadIncludeOnce('inc/ajax/ajax_installer.php'); + } // END - if +} + +// Setter for AJAX reply content +function setAjaxReplyContent ($content) { + // Set it, but with URL encoding + $GLOBALS['ajax_reply']['reply_content'] = urlencode(doFinalCompilation($content, false)); +} + +/** + * Checks whether the AJAX access level was valid. This function doesn't need + * caching in $GLOBALS[__FUNCTION__] because it will be called only once. + */ +function isAjaxRequestLevelValid () { + // By default nothing is valid + $isValid = false; + + // Switch on the 'level' value + switch (postRequestElement('level')) { + case 'install': // Installation phase level + // Simply check for it + $isValid = isInstallationPhase(); + break; + + case 'admin': // Admin area + // Load admin includes + loadIncludeOnce('inc/modules/admin/admin-inc.php'); + loadIncludeOnce('inc/ajax/ajax_admin.php'); + + // Determine correct 'what' value + $what = determineWhat(); + + // Get action value + $action = getActionFromModuleWhat('admin', $what); + + // Check condition + $isValid = ((isAdmin()) && (isAdminAllowedAccessMenu($action, $what))); + break; + + default: // Unsupported level (please report this!) + logDebugMessage(__FUNCTION__, __LINE__, 'Unsupported AJAX request access level ' . postRequestElement('level') . ' detected. Please report this, it means this part is not finished.'); + break; + } // END - switch + + // Return validation result + return $isValid; +} + +// Processes the AJAX request by generating a call-back on given 'level' value +function processAjaxRequest () { + // Generate the call-back function name + $callbackName = 'doAjaxProcess' . capitalizeUnderscoreString(postRequestElement('level')); + + // Is the call-back function there? + if (!function_exists($callbackName)) { + // This shall not happen + reportBug(__FUNCTION__, __LINE__, 'AJAX call-back ' . $callbackName . ' does not exist.'); + } // END - if + + // Call the function + call_user_func($callbackName); +} + +// Send AJAX content +function sendAjaxContent () { + // Is the status fine or template not found (404)? + if ((getHttpStatus() == '200 OK') || (getHttpStatus() == '404 NOT FOUND')) { + // Then output the JSON + outputHtml(json_encode($GLOBALS['ajax_reply'], JSON_FORCE_OBJECT)); + } // END - if +} + +// [EOF] +?> diff --git a/inc/ajax/.htaccess b/inc/ajax/.htaccess new file mode 100644 index 0000000000..3a42882788 --- /dev/null +++ b/inc/ajax/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/ajax/ajax_admin.php b/inc/ajax/ajax_admin.php new file mode 100644 index 0000000000..dc5733e835 --- /dev/null +++ b/inc/ajax/ajax_admin.php @@ -0,0 +1,112 @@ + diff --git a/inc/ajax/ajax_installer.php b/inc/ajax/ajax_installer.php new file mode 100644 index 0000000000..1f6f9fc2a2 --- /dev/null +++ b/inc/ajax/ajax_installer.php @@ -0,0 +1,461 @@ +'; + foreach (explode(':', postRequestElement('elements')) as $element) { + // Add row + $OUT .= '
  • {--INSTALLER_CHANGED_ELEMENT_' . strtoupper($element) . '--}
  • '; + } // END - foreach + $OUT .= ''; + + // Prepare content + $content = array( + 'out' => $OUT, + 'button' => postRequestElement('button'), + 'message' => '{--INSTALLER_TAB_NAVIGATION_' . strtoupper(postRequestElement('button')) . '_LINK--}', + ); + + if (in_array(postRequestElement('button'), array('previous', 'next'))) { + // Load 'prefixed' template + setAjaxReplyContent(loadTemplate('install_warning_' . postRequestElement('button'), true, $content)); + } else { + // Load 'tab' template + setAjaxReplyContent(loadTemplate('install_warning_tab', true, $content)); + } + + // All okay if we reach this point + setHttpStatus('200 OK'); +} + +// Process installer AJAC call for saving changes +function doAjaxInstallerSaveChanges () { + // 'tab' must always be set to create a post-check-callback + if (!isPostRequestElementSet('tab')) { + // This shall not happen + reportBug(__FUNCTION__, __LINE__, 'The JavaScript did not send "tab" which is fatal.'); + } // END - if + + // Save the tab for pre-"filtering" + $currentTab = postRequestElement('tab'); + + // Remove some elements which should not be saved + foreach (array('do', 'level') as $removedElement) { + // Remove this element from POST data + unsetPostRequestElement($removedElement); + } // END - foreach + + // Default is failed save attempt (e.g. nothing to save) + $saveStatus = array( + 'status' => 'failed', + 'message' => '{--INSTALLER_SAVE_CHANGES_FAILED--}', + // Don't set this to false, or else it will be returned as 'failed' but is saved + 'is_saved' => true, + 'failed_fields' => array() + ); + + // Init overall status + $isAllSaved = true; + + // Now set all remaining data in session + foreach (postRequestArray() as $key => $value) { + // Set it, if it is valid, else it will be added to $saveStatus (call-by-reference) + $saveStatus['is_saved'] = ( + // Is the data valid? + (isInstallerDataValid($saveStatus, $key, $value)) + && + // And can it be stored in session? + (setSession($key, $value)) + ); + + // Save the overall status for below final check + $isAllSaved = (($isAllSaved === true) && ($saveStatus['is_saved'] === true)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',is_saved=' . intval($saveStatus['is_saved']) . ',isAllSaved=' . intval($isAllSaved)); + } // END - foreach + + // 'is_saved' is still true? + if ($isAllSaved === true) { + // Set 'done' and message + $saveStatus['status'] = 'done'; + $saveStatus['message'] = '{--INSTALLER_SAVE_CHANGES_DONE--}'; + + // Then do the post-check + doInstallerPostCheck($currentTab, $saveStatus); + } // END - if + + // Output the status array for JSON reply + setAjaxReplyContent(json_encode($saveStatus, JSON_FORCE_OBJECT)); + + // All okay if we reach this point + setHttpStatus('200 OK'); +} + +// Prepare AJAX request 'welcome' +function doAjaxPrepareInstallerWelcome () { + // Kept empty to prevent logfile entry +} + +// Prepare AJAX request 'base_data' +function doAjaxPrepareInstallerBaseData () { + // Is 'base_path' not set? + if (!isSessionVariableSet('base_path')) { + // Then set it from PATH + setSession('base_path', getPath()); + } // END - if + + // Is 'base_url' not set? + if (!isSessionVariableSet('base_url')) { + // Then set it from URL + setSession('base_url', getUrl()); + } // END - if + + // Is 'main_title' not set? + if (!isSessionVariableSet('main_title')) { + // Then set it from default main title + setSession('main_title', '{--DEFAULT_MAIN_TITLE--}'); + } // END - if + + // Is 'slogan' not set? + if (!isSessionVariableSet('slogan')) { + // Then set it from default slogan + setSession('slogan', '{--DEFAULT_SLOGAN--}'); + } // END - if + + // Is 'webmaster' not set? + if (!isSessionVariableSet('webmaster')) { + // Then set it from default webmaster email address + setSession('webmaster', '{--DEFAULT_WEBMASTER--}'); + } // END - if +} + +// Prepare AJAX request 'database_config' +function doAjaxPrepareInstallerDatabaseConfig () { + // Is 'mysql_host' not set? + if (!isSessionVariableSet('mysql_host')) { + // Then set it directly + setSession('mysql_host', 'localhost'); + } // END - if + + // Is 'mysql_dbase' not set? + if (!isSessionVariableSet('mysql_dbase')) { + // Then set it directly + setSession('mysql_dbase', 'your_database'); + } // END - if + + // Is 'mysql_prefix' not set? + if (!isSessionVariableSet('mysql_prefix')) { + // Then set it directly + setSession('mysql_prefix', 'mailer'); + } // END - if + + // Is 'mysql_login' not set? + if (!isSessionVariableSet('mysql_login')) { + // Then set it directly + setSession('mysql_login', 'your_login'); + } // END - if + + // Is 'mysql_dbase' not set? + if (!isSessionVariableSet('mysql_pass1')) { + // Then set it directly + setSession('mysql_pass1', ''); + } // END - if + + // Is 'mysql_pass2' not set? + if (!isSessionVariableSet('mysql_pass2')) { + // Then set it directly + setSession('mysql_pass2', ''); + } // END - if + + // Is 'mysql_type' not set? + if (!isSessionVariableSet('mysql_type')) { + // Then set it directly + setSession('mysql_type', 'MyISAM'); + } // END - if +} + +// Prepare AJAX request 'smtp_config' +function doAjaxPrepareInstallerSmtpConfig () { + // Kept empty to prevent logfile entry because SMTP settings are optional +} + +// Prepare AJAX request 'other_config' +function doAjaxPrepareInstallerOtherConfig () { + // Is 'output_mode' not set? + if (!isSessionVariableSet('output_mode')) { + // Then set it directly + setSession('output_mode', 'render'); + } // END - if + + // Is 'warn_no_pass' not set? + if (!isSessionVariableSet('warn_no_pass')) { + // Then set it directly + setSession('warn_no_pass', 'Y'); + } // END - if + + // Is 'write_footer' not set? + if (!isSessionVariableSet('write_footer')) { + // Then set it directly + setSession('write_footer', 'Y'); + } // END - if + + // Is 'enable_backlink' not set? + if (!isSessionVariableSet('enable_backlink')) { + // Then set it directly + setSession('enable_backlink', 'Y'); + } // END - if +} + +// Prepare AJAX request 'overview' +function doAjaxPrepareInstallerOverview () { + // 'tab' must always be set to create a post-check-callback + if (!isPostRequestElementSet('tab')) { + // This shall not happen + reportBug(__FUNCTION__, __LINE__, 'The JavaScript did not send "tab" which is fatal.'); + } // END - if + + // Save the tab for pre-"filtering" + $currentTab = postRequestElement('tab'); + + // Default is failed save attempt (e.g. nothing to save) + $verificationStatus = array( + // Status code, can be 'failed' or 'done' + 'status' => 'failed', + // Status message (e.g. for output) + 'message' => '{--INSTALLER_OVERVIEW_FINAL_CHECK_FAILED--}', + // Don't set this to false, or else it will be returned as 'failed' but is saved + 'is_valid' => true, + // Failed fields + 'failed_fields' => array() + ); + + // Init overall status and final output + $isAllValid = true; + $output = ''; + + // Check all data in session + foreach (getSessionArray() as $key => $value) { + // Skip 'mailer_theme', 'tab' and 'installer' + if (in_array($key, array('mailer_theme', 'tab', 'installer'))) { + // Skip this + continue; + } // END - if + + // Is the data valid? + $verificationStatus['is_valid'] = (isInstallerDataValid($verificationStatus, $key, $value)); + + // Is this step okay? + if ($verificationStatus['is_valid'] === true) { + // Add this key/value pair to a overview group + addKeyValueToInstallerOverviewGroup($key, $value); + } // END - if + + // Save the overall status for below final check + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',is_valid=' . intval($verificationStatus['is_valid']) . ',isAllValid=' . intval($isAllValid)); + $isAllValid = (($isAllValid === true) && ($verificationStatus['is_valid'] === true)); + } // END - foreach + + // Is it still true? + if ($isAllValid === true) { + // Set 'done' and message + $verificationStatus['status'] = 'done'; + $verificationStatus['message'] = '{--INSTALLER_OVERVIEW_FINAL_CHECK_DONE--}'; + + // Then do the post-check + doInstallerPostCheck($currentTab, $verificationStatus); + } // END - if + + // Is it still valid? + if ($verificationStatus['status'] != 'done') { + // Log message away + logDebugMessage(__FUNCTION__, __LINE__, 'Final check on all stored data failed. message=' . $verificationStatus['message']); + + // Output the array for JSON reply + setAjaxReplyContent(json_encode($verificationStatus, JSON_FORCE_OBJECT)); + + /* + * Something went wrong, this might happen when e.g. the user has tried + * to save invalid database login data but hit reload button on error + * message. + */ + setHttpStatus('500 Internal Server Error'); + + // Abort here + return; + } // END - if + + // Output final rendered content + setAjaxReplyContent($output); + + // All okay if we reach this point + setHttpStatus('200 OK'); +} + +// [EOF] +?> diff --git a/inc/callback-functions.php b/inc/callback-functions.php index ecd9dec87d..d6d2b927e5 100644 --- a/inc/callback-functions.php +++ b/inc/callback-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ function doXmlAdminEntryMetaData ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); } // END - if } @@ -54,25 +54,26 @@ function doXmlCallbackFunction ($resource, $attributes) { // There are two attributes, by default if (count($attributes) != 2) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes)); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } // Add the function name and no attributes by default $GLOBALS['__XML_CALLBACKS']['callbacks'][] = __FUNCTION__; $GLOBALS['__XML_CALLBACKS']['functions'][__FUNCTION__][] = $attributes['VALUE']; $GLOBALS['__XML_ARGUMENTS'][__FUNCTION__] = array(); + $GLOBALS['__COLUMN_INDEX'][__FUNCTION__] = 'column'; } // Handles the XML node 'database-table' @@ -80,30 +81,29 @@ function doXmlDatabaseTable ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the list addXmlValueToCallbackAttributes('database_table', $attributes); - //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['database_table'] = $attributes['VALUE']; } // Handles the XML node 'database-column-list' @@ -111,7 +111,7 @@ function doXmlDatabaseColumnList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } // END - if // Add an empty list @@ -123,37 +123,37 @@ function doXmlDatabaseColumnListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 6) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 6 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 6 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['TABLE'])) { // 'TABLE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TYPE=' . $attributes['TYPE'] . ',TABLE=' . $attributes['TABLE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TYPE=' . $attributes['TYPE'] . ',TABLE=' . $attributes['TABLE']); } elseif (!isset($attributes['ALIAS'])) { // 'ALIAS' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); } elseif (!isset($attributes['FUNCTION'])) { // 'FUNCTION' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.'); } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) { // 'ALIAS' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']); + reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']); } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) { // 'FUNCTION' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']); + reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.'); } // Add the entry to the list @@ -165,7 +165,7 @@ function doXmlCallbackFunctionList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } // END - if // Add an empty list @@ -177,25 +177,25 @@ function doXmlCallbackFunctionListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.'); } // Add the entry to the list @@ -207,7 +207,7 @@ function doXmlExtraParameterList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } // END - if // Add an empty list @@ -219,40 +219,94 @@ function doXmlExtraParameterListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.'); } // Add the entry to the list addXmlValueToCallbackAttributes('extra_list', $attributes); } +// Handles the XML node 'time-columns-list' +function doXmlTimeColumnsList ($resource, $attributes) { + // There should be no attributes + if (count($attributes) > 0) { + // Please don't add any attributes to foo-list nodes + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + } // END - if + + // Add an empty list + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'] = array(); +} + +// Handles the XML node 'time-columns-list-entry' +function doXmlTimeColumnsListEntry ($resource, $attributes) { + // There are three attributes, by default + if (count($attributes) != 3) { + // Not the right count + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + } elseif (!isset($attributes['NAME'])) { + // 'NAME' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + } elseif (!isset($attributes['TYPE'])) { + // 'TYPE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + } elseif (!isInvalidXmlType($attributes['TYPE'])) { + // No valid type + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + } elseif (!isset($attributes['VALUE'])) { + // 'VALUE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { + // Not valid/verifyable + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'])) { + // doXmlCallbackFunction is missing + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.'); + } + + // Add the entry to the list + addXmlValueToCallbackAttributes('time_columns', $attributes); +} + // Handles the XML node 'extra-parameter-member-list' function doXmlExtraParameterMemberList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) { // This list should be created already - debug_report_bug(__FUNCTION__, __LINE__, 'member_list should be already created.'); + reportBug(__FUNCTION__, __LINE__, 'member_list should be already created.'); + } +} + +// Handles the XML node 'extra-parameter-reload-list' +function doXmlExtraParameterReloadList ($resource, $attributes) { + // There should be no attributes + if (count($attributes) > 0) { + // Please don't add any attributes to foo-list nodes + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) { + // This list should be created already + reportBug(__FUNCTION__, __LINE__, 'reload_list should be already created.'); } } @@ -261,40 +315,70 @@ function doXmlExtraParameterMemberListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.'); } // Add the entry to the list addXmlValueToCallbackAttributes('extra_list', $attributes, 'member_list'); } +// Handles the XML node 'extra-parameter-reload-list-entry' +function doXmlExtraParameterReloadListEntry ($resource, $attributes) { + // There are three attributes, by default + if (count($attributes) != 3) { + // Not the right count + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + } elseif (!isset($attributes['NAME'])) { + // 'NAME' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + } elseif (!isset($attributes['TYPE'])) { + // 'TYPE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + } elseif (!isInvalidXmlType($attributes['TYPE'])) { + // No valid type + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + } elseif (!isset($attributes['VALUE'])) { + // 'VALUE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { + // Not valid/verifyable + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) { + // doXmlCallbackFunction is missing + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/reload-list not included around this node. Please fix your XML.'); + } + + // Add the entry to the list + addXmlValueToCallbackAttributes('extra_list', $attributes, 'reload_list'); +} + // Handles the XML node 'extra-parameter-added-list' function doXmlExtraParameterAddedList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) { // This list should be created already - debug_report_bug(__FUNCTION__, __LINE__, 'added_list should be already created.'); + reportBug(__FUNCTION__, __LINE__, 'added_list should be already created.'); } } @@ -303,55 +387,97 @@ function doXmlExtraParameterAddedListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/added-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/added-list not included around this node. Please fix your XML.'); } // Add the entry to the list addXmlValueToCallbackAttributes('extra_list', $attributes, 'added_list'); } +// Handles the XML node 'extra-parameter-created-list' +function doXmlExtraParameterCreatedList ($resource, $attributes) { + // There should be no attributes + if (count($attributes) > 0) { + // Please don't add any attributes to foo-list nodes + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) { + // This list should be created already + reportBug(__FUNCTION__, __LINE__, 'created_list should be already created.'); + } +} + +// Handles the XML node 'extra-parameter-created-list-entry' +function doXmlExtraParameterCreatedListEntry ($resource, $attributes) { + // There are three attributes, by default + if (count($attributes) != 3) { + // Not the right count + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + } elseif (!isset($attributes['NAME'])) { + // 'NAME' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + } elseif (!isset($attributes['TYPE'])) { + // 'TYPE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + } elseif (!isInvalidXmlType($attributes['TYPE'])) { + // No valid type + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + } elseif (!isset($attributes['VALUE'])) { + // 'VALUE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { + // Not valid/verifyable + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) { + // doXmlCallbackFunction is missing + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/created-list not included around this node. Please fix your XML.'); + } + + // Add the entry to the list + addXmlValueToCallbackAttributes('extra_list', $attributes, 'created_list'); +} + // Handles the XML node 'status-change-column' function doXmlStatusChangeColumn ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the list @@ -363,10 +489,10 @@ function doXmlStatusChangeList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.'); } } @@ -375,28 +501,28 @@ function doXmlStatusChangeListEntry ($resource, $attributes) { // There are for attributes, by default if (count($attributes) != 4) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['OLD'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']); + reportBug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/change-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/change-list not included around this node. Please fix your XML.'); } // Add the entry to the list @@ -408,30 +534,29 @@ function doXmlEnableModifyEntries ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the list addXmlValueToCallbackAttributes('enable_modify_entries', $attributes); - //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['enable_modify_entries'] = convertStringToBoolean($attributes['VALUE']); } // Handles the XML node 'table-id-column' @@ -439,30 +564,29 @@ function doXmlTableIdColumn ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array addXmlValueToCallbackAttributes('table_id_column', $attributes); - //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_id_column'] = $attributes['VALUE']; } // Handles the XML node 'table-userid-column' @@ -470,30 +594,29 @@ function doXmlTableUseridColumn ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array addXmlValueToCallbackAttributes('table_userid_column', $attributes); - //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_userid_column'] = $attributes['VALUE']; } // Handles the XML node 'raw-userid-column-key' @@ -501,30 +624,59 @@ function doXmlRawUseridColumnKey ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['NAME'])) { // 'NAME' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array addXmlValueToCallbackAttributes('raw_userid_column_key', $attributes); - //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['raw_userid_column_key'] = $attributes['VALUE']; +} + +// Handles the XML node 'cache-file' +function doXmlCacheFile ($resource, $attributes) { + // There are three attributes, by default + if (count($attributes) != 3) { + // Not the right count + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + } elseif (!isset($attributes['NAME'])) { + // 'NAME' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + } elseif (!isset($attributes['TYPE'])) { + // 'TYPE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + } elseif (!isInvalidXmlType($attributes['TYPE'])) { + // No valid type + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + } elseif (!isset($attributes['VALUE'])) { + // 'VALUE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { + // Not valid/verifyable + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { + // doXmlCallbackFunction is missing + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + } + + // Add the entry to the array + addXmlValueToCallbackAttributes('cache_file', $attributes); } //----------------------------------------------------------------------------- @@ -536,7 +688,7 @@ function doXmlAdminListData ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); } // END - if } @@ -545,7 +697,7 @@ function doXmlDataTables ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes)); } // END - if } @@ -554,28 +706,28 @@ function doXmlDataTable ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['ALIAS'])) { // 'ALIAS' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -587,10 +739,10 @@ function doXmlSelectDataFromList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); } // Add an empty list @@ -602,34 +754,34 @@ function doXmlSelectDataFromListEntry ($resource, $attributes) { // There are five attributes, by default if (count($attributes) != 5) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['ALIAS'])) { // 'ALIAS' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.'); } elseif (!isset($attributes['FUNCTION'])) { // 'FUNCTION' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // 'VALUE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) { // 'ALIAS' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']); + reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']); } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) { // 'FUNCTION' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']); + reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -641,10 +793,10 @@ function doXmlWhereSelectFromList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); } // Add an empty list @@ -656,58 +808,82 @@ function doXmlWhereSelectFromListEntry ($resource, $attributes) { // There are five attributes, by default if (count($attributes) != 5) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isset($attributes['TABLE'])) { // 'TABLE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['CONDITION'])) { // 'CONDITION' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.'); } elseif (!isset($attributes['LOOK-FOR'])) { // 'LOOK-FOR' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) { // 'TABLE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // 'VALUE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) { // 'CONDITION' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']); + reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['LOOK-FOR'])) { // 'LOOK-FOR' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']); + reportBug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']); } elseif (!isXmlConditionValid($attributes['CONDITION'])) { // 'CONDITION' is not known - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']); + reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.'); } // Add the entry to the array addXmlValueToCallbackAttributes('where_select_list', $attributes); } +// Handles the XML node 'where-condition' +function doXmlWhereCondition ($resource, $attributes) { + // There are two attributes, by default + if (count($attributes) != 3) { + // Please don't add any attributes to foo-list nodes + reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes because this is a where-condition node, got ' . count($attributes)); + } elseif (!isset($attributes['TYPE'])) { + // 'TYPE' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + } elseif (!isset($attributes['CONDITION'])) { + // 'CONDITION' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.'); + } elseif (!isset($attributes['NAME'])) { + // 'NAME' not found + reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.'); + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) { + // doXmlCallbackFunction is missing + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); + } + + // Add an empty list + addXmlValueToCallbackAttributes('where_condition', $attributes); +} + // Handles the XML node 'order-by-list' function doXmlOrderByList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); } // Add an empty list @@ -719,34 +895,34 @@ function doXmlOrderByListEntry ($resource, $attributes) { // There are four attributes, by default if (count($attributes) != 4) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); } elseif (!isset($attributes['ORDER'])) { // 'ORDER' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isset($attributes['TABLE'])) { // 'TABLE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.'); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['ORDER'])) { // 'ORDER' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']); + reportBug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']); } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) { // 'TABLE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']); } elseif ((trim($attributes['VALUE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) { // 'VALUE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -758,22 +934,22 @@ function doXmlListTemplate ($resource, $attributes) { // There are two attributes, by default if (count($attributes) != 2) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -785,22 +961,22 @@ function doXmlListRowTemplate ($resource, $attributes) { // There are two attributes, by default if (count($attributes) != 2) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -812,10 +988,10 @@ function doXmlColumnCallbackList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.'); } // Add an empty list @@ -827,10 +1003,10 @@ function doXmlColumnCallbackListEntry ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.'); } } @@ -839,28 +1015,28 @@ function doXmlColumnCallbackData ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isset($attributes['CALLBACK'])) { // 'CALLBACK' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } elseif ((trim($attributes['CALLBACK']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['CALLBACK']))) { // 'CALLBACK' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']); + reportBug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']); } // Add the entry to the array @@ -872,10 +1048,10 @@ function doXmlCallbackExtraParameterList ($resource, $attributes) { // There should be no attributes if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes)); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.'); } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) { // Abort silently here, no one wants to kill this array return; @@ -890,25 +1066,25 @@ function doXmlCallbackExtraParameterListEntry ($resource, $attributes) { // There are three attributes, by default if (count($attributes) != 3) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes)); } elseif (!isset($attributes['COLUMN'])) { // 'COLUMN' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // 'VALUE' not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -920,22 +1096,22 @@ function doXmlNoEntryFoundMessage ($resource, $attributes) { // There are two attributes, by default if (count($attributes) != 2) { // Not the right count - debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); + reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes)); } elseif (!isset($attributes['VALUE'])) { // 'VALUE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.'); } elseif (!isset($attributes['TYPE'])) { // 'TYPE' not found - debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); + reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.'); } elseif (!isInvalidXmlType($attributes['TYPE'])) { // No valid type - debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); + reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']); } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) { // Not valid/verifyable - debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); + reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']); } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } // Add the entry to the array @@ -1059,6 +1235,10 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',LOOK-FOR[' . gettype($attributes['LOOK-FOR']) . ']=' . $attributes['LOOK-FOR'] . ' - CONDITION! (VALUE=' . $attributes['VALUE'] . ')'); $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array; + } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) { + // CONDITION/NAME detected + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION!'); + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION']; } elseif (isset($attributes['CALLBACK'])) { // CALLBACK/VALUE detected //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')'); @@ -1077,7 +1257,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE']; } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) { // Already created - debug_report_bug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=
    ' . print_r($attributes, true) . '
    '); + reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=
    ' . print_r($attributes, true) . '
    '); } else { // Use from NAME //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!'); @@ -1091,7 +1271,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', //----------------------------------------------------------------------------- // Execute function for doXmlCallbackFunction() -function doXmlCallbackFunctionExecute ($callbackFunction, $args) { +function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) { // Is 'id_index' set and form sent? if ((isset($args['id_index'])) && (isFormSent())) { // Prepare 'id_index' @@ -1099,8 +1279,8 @@ function doXmlCallbackFunctionExecute ($callbackFunction, $args) { } // END - if // Just call it - //* DEBUG: */ die('callbackFunction=' . $callbackFunction . ',args=
    '.print_r($args, true).'
    '); - call_user_func_array($callbackFunction, $args); + //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=
    '.print_r($args, true).'
    '); + call_user_func_array($callbackName, $args); } // [EOF] diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php index dd99172118..729197a03d 100644 --- a/inc/classes/cachesystem.class.php +++ b/inc/classes/cachesystem.class.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -119,13 +119,13 @@ class CacheSystem { // Create file if ($this->isCacheReadable()) changeMode($this->fqfn, 0666); - $this->pointer = fopen($this->fqfn, 'w') or debug_report_bug(__METHOD__, __LINE__, 'Cannot write to cache ' . $this->fqfn . ' !'); + $this->pointer = fopen($this->fqfn, 'w') or reportBug(__METHOD__, __LINE__, 'Cannot write to cache ' . $this->fqfn . ' !'); // Add open PHP tag $this->writeLine('getStatusCode()); + reportBug(__METHOD__, __LINE__, 'Problems with cache directory detected, getStatusCode()=' . $this->getStatusCode()); } } @@ -138,10 +138,10 @@ class CacheSystem { // Is the pointer a valid resource? if (is_resource($this->pointer)) { // Write the line - fwrite($this->pointer, $line . "\n"); + fwrite($this->pointer, $line . chr(10)); } else { // Something bad happened - debug_report_bug(__METHOD__, __LINE__, 'Pointer type is ' . gettype($this->pointer) . ', expected is resource.'); + reportBug(__METHOD__, __LINE__, 'Pointer type is ' . gettype($this->pointer) . ', expected is resource.'); } } @@ -187,7 +187,7 @@ class CacheSystem { } } elseif ($this->name == 'admin_acls') { // Access control lines - $GLOBALS['cache_array']['admin_acls'][$k][$data['admin_id']][] = $v; + array_push($GLOBALS['cache_array']['admin_acls'][$k][$data['admin_id']], $v); } elseif ($this->name == 'refdepths') { // Referral levels $GLOBALS['cache_array']['refdepths'][$k][$data['id']] = $v; @@ -224,7 +224,7 @@ class CacheSystem { $this->removeCacheFile(true); // Unsupported/unhandled cache detected - debug_report_bug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected.'); + reportBug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected.'); } // Write cache line to file @@ -232,7 +232,7 @@ class CacheSystem { } // END - foreach } else { // Cannot create file - debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected, no resource! pointer[]=' . gettype($this->pointer)); + reportBug(__METHOD__, __LINE__, 'Problem with cache detected, no resource! pointer[]=' . gettype($this->pointer)); } } @@ -296,7 +296,7 @@ class CacheSystem { } // END - if } else { // Cache file not found or not readable - debug_report_bug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_LOAD=' . $this->name . '%}'); + reportBug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_LOAD=' . $this->name . '%}'); // Try to remove it $this->removeCacheFile(); @@ -338,7 +338,7 @@ class CacheSystem { } // END - if // Remove cache file from system - //* DEBUG: */ debug_report_bug(__METHOD__, __LINE__, 'About to remove ' . basename($this->fqfn) . '!'); + //* DEBUG: */ reportBug(__METHOD__, __LINE__, 'About to remove ' . basename($this->fqfn) . '!'); removeFile($this->fqfn); // Reset read status @@ -352,7 +352,7 @@ class CacheSystem { $this->rebuilt[$this->name] = true; } else { // Not removed! - debug_report_bug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_UNLINK=' . $this->name . '%}'); + reportBug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_UNLINK=' . $this->name . '%}'); } } // END - if } @@ -383,7 +383,7 @@ class CacheSystem { } // END - if } else { // Cannot write to cache! - debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]); + reportBug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]); } } @@ -407,7 +407,7 @@ class CacheSystem { } // END - foreach } else { // Cannot write array! - debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer)); + reportBug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer)); } } @@ -444,7 +444,7 @@ class CacheSystem { } // END - if } else { // Cannot write to cache! - debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]); + reportBug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]); } } @@ -466,11 +466,11 @@ class CacheSystem { //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ',ext_name=' . $ext_name . ',ext_ver=' . $ext_ver); } else { // Cannot create file - debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer)); + reportBug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer)); } } - // Checks wether versions from cache and extension matches + // Checks whether versions from cache and extension matches function extensionVersionMatches ($ext_name) { // Check cache if (!isset($GLOBALS[__METHOD__][$ext_name])) { @@ -538,7 +538,7 @@ class CacheSystem { } } elseif (isset($value[0])) { // These lines needs fixing - debug_report_bug(__METHOD__, __LINE__, 'Invalid entry with [0] found. key=' . $key); + reportBug(__METHOD__, __LINE__, 'Invalid entry with [0] found. key=' . $key); } else { // Non-string $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = ' . $value . ';'; @@ -558,7 +558,7 @@ class CacheSystem { $this->statusCode = $status; } - // Checks wether the current cache file is readable + // Checks whether the current cache file is readable function isCacheReadable () { // Array entry found? if (!isset($this->readable[$this->name])) { @@ -573,7 +573,7 @@ class CacheSystem { // Cloning not allowed function __clone () { // Please do not clone this class - debug_report_bug(__METHOD__, __LINE__, 'Cloning of this class is not allowed.'); + reportBug(__METHOD__, __LINE__, 'Cloning of this class is not allowed.'); } } // END - class diff --git a/inc/classes/resolver.class.php b/inc/classes/resolver.class.php index 47805bde3c..4f1cd1a242 100644 --- a/inc/classes/resolver.class.php +++ b/inc/classes/resolver.class.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/code-functions.php b/inc/code-functions.php index 5f58016931..744c3fea17 100644 --- a/inc/code-functions.php +++ b/inc/code-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ function getCode ($key) { // Is the key set? if (!isCodeSet($key)) { // Abort here - debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s[%s:] Code %s is not set.", + reportBug(__FUNCTION__, __LINE__, sprintf("%s[%s:] Code %s is not set.", __FUNCTION__, __LINE__, $key @@ -61,11 +61,20 @@ function getCode ($key) { return $GLOBALS['status_codes'][$key]; } -// Checks wether a specified status code is set +// Checks whether a specified status code is set function isCodeSet ($key) { // Simply use isset() return (isset($GLOBALS['status_codes'][$key])); } +// Get hex-decimal value from given error code +function getHexErrorCode ($errorCode) { + // Convert it + $hex = str_pad(dechex($errorCode), 3, '0', STR_PAD_LEFT); + + // Return it + return $hex; +} + // [EOF] ?> diff --git a/inc/config-functions.php b/inc/config-functions.php index ba074262d3..84f442bb55 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ function initConfig () { // Init not if already found if (isConfigurationLoaded()) { // Already initialized - debug_report_bug(__FUNCTION__, __LINE__, 'Configuration is already initialized.'); + reportBug(__FUNCTION__, __LINE__, 'Configuration is already initialized.'); } // END - if // Set a minimum of configuration, required to by-pass some error triggers in getConfig() @@ -74,7 +74,7 @@ function getConfig ($configEntry) { // Is the entry there? if (!isConfigEntrySet($configEntry)) { // Raise an error of missing entries - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Configuration entry %s is missing.", $configEntry)); + reportBug(__FUNCTION__, __LINE__, sprintf("Configuration entry %s is missing.", $configEntry)); } // END - if // Return it @@ -88,17 +88,16 @@ function setConfigEntry ($configEntry, $value) { $GLOBALS['config'][$configEntry] = $value; } -// Checks wether the given config entry is set +// Checks whether the given config entry is set function isConfigEntrySet ($configEntry) { //* DEBUG: */ debugOutput(__FUNCTION__ . ':' . $configEntry . '=' . intval(isset($GLOBALS['config'][$configEntry]))); - return (isset($GLOBALS['config'][$configEntry])); + return ((isset($GLOBALS['config'][$configEntry])) || (array_key_exists($configEntry, $GLOBALS['config']))); } // Merges $GLOBALS['config'] with data in given array function mergeConfig ($newConfig) { + // Merge current configuration with new one $GLOBALS['config'] = merge_array(getConfigArray(), $newConfig); - - // Remove all cached entries } // Increment or init with given value or 1 as default the given config entry @@ -111,7 +110,7 @@ function incrementConfigEntry ($configEntry, $value=1) { } } -// Checks wether the configuration array is set so the config is loaded +// Checks whether the configuration array is set so the config is loaded function isConfigurationLoaded () { // Check all return (isset($GLOBALS['config']['config'])); @@ -183,7 +182,7 @@ function updateOldConfigFile () { copyFileVerified(getPath() . 'inc/config-local.php.dist', getCachePath() . 'config-local.php', 0644); // First of all, load the old one! - $oldConfig = explode("\n", readFromFile(getPath() . 'inc/config.php')); + $oldConfig = explode(chr(10), readFromFile(getPath() . 'inc/config.php')); // Now, analyze every entry $done = array(); @@ -281,35 +280,47 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0' return; } // END - if + // Default is empty SQL + $SQL = ''; + // Do we have multiple entries? if (is_array($entries)) { // Walk through all - $all = ''; foreach ($entries as $idx => $entry) { // Update mode set? if (!empty($updateMode)) { // Update entry - $all .= sprintf("`%s`=`%s`%s%s,", $entry, $entry, $updateMode, (float) $values[$idx]); + $SQL .= sprintf("`%s`=`%s`%s%s,", $entry, $entry, $updateMode, (float) $values[$idx]); } else { // Check if string or number but no array if (is_array($values[$idx])) { // Arrays must be fixed... - debug_report_bug(__FUNCTION__, __LINE__, 'values[' . $idx . '] should not be an array! Content=
    '.print_r($values[$idx], true).'
    '); - } elseif (($values[$idx] + 0) === $values[$idx]) { - // Number detected - $all .= sprintf("`%s`=%s,", $entry, (float) $values[$idx]); - - // Set it in config as well - setConfigEntry($entry, $values[$idx]); + reportBug(__FUNCTION__, __LINE__, 'values[' . $idx . '] should not be an array! Content=
    '.print_r($values[$idx], true).'
    '); } elseif ($values[$idx] == 'UNIX_TIMESTAMP()') { // Function UNIX_TIMESTAMP() detected - $all .= sprintf("`%s`=UNIX_TIMESTAMP(),", $entry); + $SQL .= sprintf("`%s`=UNIX_TIMESTAMP(),", $entry); // Set timestamp in array as well setConfigEntry($entry, time()); + } elseif (!empty($updateMode)) { + // Is the value zero? + if ($values[$idx] == '0') { + // Then skip it + continue; + } // END - if + + // Update mode set + // @TODO Call setConfigEntry() somehow + $SQL .= $entries = sprintf("`%s`=`%s`%s%s", $entry, $entry, $updateMode, (float) $values[$idx]); + } elseif (($values[$idx] + 0) === $values[$idx]) { + // Number detected + $SQL .= sprintf("`%s`=%s,", $entry, (float) $values[$idx]); + + // Set it in config as well + setConfigEntry($entry, $values[$idx]); } else { // String detected - $all .= sprintf("`%s`='%s',", $entry, SQL_ESCAPE($values[$idx])); + $SQL .= sprintf("`%s`='%s',", $entry, SQL_ESCAPE($values[$idx])); // Set it in config as well setConfigEntry($entry, $values[$idx]); @@ -318,35 +329,42 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0' } // END - foreach // Remove last comma - $entries = substr($all, 0, -1); + $SQL = substr($SQL, 0, -1); } elseif (!empty($updateMode)) { + // Is the value zero? + if ($values == '0') { + // Then skip it + continue; + } // END - if + // Update mode set - $entries = sprintf("`%s`=`%s`%s%s", $entries, $entries, $updateMode, (float) $values); + // @TODO Call setConfigEntry() somehow + $SQL = sprintf("`%s`=`%s`%s%s", $entries, $entries, $updateMode, (float) $values); } elseif (($values + 0) === $values) { // Number detected - $entries = sprintf("`%s`=%s", $entries, (float) $values); + $SQL = sprintf("`%s`=%s", $entries, (float) $values); // Set it in config first setConfigEntry($entries, (float) $values); } elseif ($values == 'UNIX_TIMESTAMP()') { // Function UNIX_TIMESTAMP() detected - $entries = sprintf("`%s`=UNIX_TIMESTAMP()", $entries); + $SQL = sprintf("`%s`=UNIX_TIMESTAMP()", $entries); // Set timestamp in array as well setConfigEntry($entries, time()); } else { // Regular entry to update - $entries = sprintf("`%s`='%s'", $entries, SQL_ESCAPE($values)); + $SQL = sprintf("`%s`='%s'", $entries, SQL_ESCAPE($values)); // Set it in config as well setConfigEntry($entries, SQL_ESCAPE($values)); } // Run database update - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'entries=' . $entries); - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1", + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$SQL." WHERE `config`=%s LIMIT 1", array(bigintval($config)), __FUNCTION__, __LINE__); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'entries=' . $entries . ',affectedRows=' . SQL_AFFECTEDROWS()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL . ',affectedRows=' . SQL_AFFECTEDROWS()); // Rebuild cache rebuildCache('config', 'config'); @@ -364,10 +382,8 @@ function FILTER_LOAD_CONFIGURATION ($no = '0') { // Load config from cache mergeConfig($GLOBALS['cache_array']['config'][$no]); - // Count cache hits if exists - if ((isStatsEntrySet('cache_hits')) && (isExtensionActive('cache'))) { - incrementStatsEntry('cache_hits'); - } // END - if + // Count cache hits + incrementStatsEntry('cache_hits'); } elseif ((!isExtensionActive('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) { // Load config from DB $result_config = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`='%s' LIMIT 1", diff --git a/inc/config-global.php b/inc/config-global.php index 56ae1735bd..f2ef6fd7fc 100644 --- a/inc/config-global.php +++ b/inc/config-global.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,7 +51,7 @@ if (function_exists('date_default_timezone_set')) { } // END - if // CFG: ERROR_REPORTING -error_reporting(E_ALL | E_STRICT); +error_reporting(E_ALL | E_DEPRECATED | E_STRICT); // Is the function there? (removed in PHP 5.4.x) if (function_exists('import_request_variables')) { @@ -60,7 +60,7 @@ if (function_exists('import_request_variables')) { } // END - if // Detect path (without 'inc') and fix windozer paths -$path = str_replace("\\", '/', substr(dirname(__FILE__), 0, -3)); +$path = str_replace(chr(92), '/', substr(dirname(__FILE__), 0, -3)); // Some very important function includes foreach (array('config', 'wrapper', 'template', 'module', 'inc', 'stats', 'http', 'xml', 'callback', 'referral') as $inc) { @@ -71,12 +71,15 @@ foreach (array('config', 'wrapper', 'template', 'module', 'inc', 'stats', 'http' include($path . 'inc/functions.php'); // Auto-detection of URL -$URL = 'http://' . detectServerName() . str_replace("\\", '/', dirname($_SERVER['PHP_SELF'])); +$URL = 'http://' . detectServerName() . str_replace(chr(92), '/', dirname($_SERVER['PHP_SELF'])); while (substr($URL, -1, 1) == '/') { $URL = substr($URL, 0, -1); } // Initialize the configuration initConfig(); +// Init HTTP handling +initHttp(); + // CFG: HOST-URL (without trailing '/' !) setConfigEntry('URL', $URL); @@ -96,7 +99,7 @@ setConfigEntry('AUTHOR' , 'Roland Häder'); setConfigEntry('TITLE', 'Mailer-Project'); // CFG: COPY -setConfigEntry('COPY', 'Copyright © 2003 - 2009, by Roland Häder,
    2009 - 2011 by Mailer Developer Team'); +setConfigEntry('COPY', 'Copyright © 2003 - 2009, by Roland Häder,
    2009 - 2012 by Mailer Developer Team'); // CFG: CACHE_PATH setConfigEntry('CACHE_PATH', 'inc/cache/'); diff --git a/inc/config-local.php.dist b/inc/config-local.php.dist index 8dca5734d6..348ecbb728 100644 --- a/inc/config-local.php.dist +++ b/inc/config-local.php.dist @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -101,6 +101,9 @@ setConfigEntry('DEBUG_TEMPLATE_CACHE', 'N'); // CFG: DEBUG-REGEX (comment in to debug regular expressions) //setConfigEntry('DEBUG_REGEX', 'Y'); +// CFG: ALLOW-TESTER0ACCOUNTS (comment in to allow tester accounts being re-included) +//setConfigEntry('ALLOW_TESTER_ACCOUNTS', 'Y'); + // Your MySQL data (we don't like M$ SQL ;-) ) $GLOBALS['mysql'] = array( // CFG: MYSQL-HOST @@ -116,12 +119,13 @@ $GLOBALS['mysql'] = array( // SMTP-Subsystem (keep all empty to use legacy mail() command!) // CFG: SMTP-HOSTNAME setConfigEntry('SMTP_HOSTNAME', ''); + // CFG: SMTP-USER setConfigEntry('SMTP_USER' , ''); + // CFG: SMTP-PASSWORD setConfigEntry('SMTP_PASSWORD', ''); -// @TODO Rewrite the following three constants, somehow... // CFG: MAIN-TITLE setConfigEntry('MAIN_TITLE', 'Your mail-exchanger title'); diff --git a/inc/daily/daily_ b/inc/daily/daily_ index 5a03b92f1f..8e5b8baa42 100644 --- a/inc/daily/daily_ +++ b/inc/daily/daily_ @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_100_bonus.php b/inc/daily/daily_100_bonus.php index 055faf701f..cca103ab91 100644 --- a/inc/daily/daily_100_bonus.php +++ b/inc/daily/daily_100_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_autopurge.php b/inc/daily/daily_autopurge.php index 4e45137603..0dd607299e 100644 --- a/inc/daily/daily_autopurge.php +++ b/inc/daily/daily_autopurge.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_beg.php b/inc/daily/daily_beg.php index 78f08e7dd5..300f3c2ff1 100644 --- a/inc/daily/daily_beg.php +++ b/inc/daily/daily_beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_birthday.php b/inc/daily/daily_birthday.php index 4ff04e0634..96a1a8d8e2 100644 --- a/inc/daily/daily_birthday.php +++ b/inc/daily/daily_birthday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -65,11 +65,14 @@ if ((getConfig('birthday_active') == 'Y') && (isExtensionActive('autopurge')) & // Only confirmed members shall receive birthday mails... $result_birthday = SQL_QUERY_ESC("SELECT - `userid`,`email`,`birth_year` + `userid`, + `email`, + `birth_year` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND + `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND `birth_day`=%s AND `birth_month`=%s AND `birthday_sent` < (UNIX_TIMESTAMP() - ({?ONE_DAY?} * 364)) @@ -88,13 +91,13 @@ if (!SQL_HASZERONUMS($result_birthday)) { // Simply subtract both values and you got the age... :) $age = $now - $bd; - if (getConfig('birthday_points') > 0) { + if (getBirthdayPoints() > 0) { // Add more entries to the array $content['age'] = $age; $content['check'] = ''; // @TODO 4 is hard-coded here, should we move it out in config? - for ($idx = '0'; $idx < 4; $idx++) { + for ($idx = 0; $idx < 4; $idx++) { $content['check'] .= generateRandomCode('8', mt_rand(0, $month . $day), $content['userid'], ($age * ($idx + 1))); } // END - for @@ -109,7 +112,7 @@ if (!SQL_HASZERONUMS($result_birthday)) { $message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid'])); } else { // Load default email template and fill in the age - $message = loadEmailTemplate('member_birthday', $age, $content['userid']); + $message = loadEmailTemplate('member_birthday', $content, $content['userid']); } // Send email diff --git a/inc/daily/daily_bonus.php b/inc/daily/daily_bonus.php index d03dcf5265..56a72bb728 100644 --- a/inc/daily/daily_bonus.php +++ b/inc/daily/daily_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_doubler.php b/inc/daily/daily_doubler.php index eb57dee6d0..836e747ffb 100644 --- a/inc/daily/daily_doubler.php +++ b/inc/daily/daily_doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_earning.php b/inc/daily/daily_earning.php new file mode 100644 index 0000000000..93028cd788 --- /dev/null +++ b/inc/daily/daily_earning.php @@ -0,0 +1,56 @@ + diff --git a/inc/daily/daily_holiday.php b/inc/daily/daily_holiday.php index 11563c52f4..23bf85b4e5 100644 --- a/inc/daily/daily_holiday.php +++ b/inc/daily/daily_holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_profile.php b/inc/daily/daily_profile.php index 6ba642ec43..7801f8e62d 100644 --- a/inc/daily/daily_profile.php +++ b/inc/daily/daily_profile.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,7 +60,8 @@ if ((isSendProfileUpdateEnabled()) && (getProfileUpdate() > 0) && (getResendProf FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND ( + `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND ( ( (UNIX_TIMESTAMP() - `last_update`) >= {?profile_update?} AND `last_update` > 0 AND diff --git a/inc/daily/daily_surfbar.php b/inc/daily/daily_surfbar.php index 3b01712405..a0d1af6299 100644 --- a/inc/daily/daily_surfbar.php +++ b/inc/daily/daily_surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/daily/daily_user.php b/inc/daily/daily_user.php index f7b9085e2a..f475f80530 100644 --- a/inc/daily/daily_user.php +++ b/inc/daily/daily_user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -77,6 +77,7 @@ FROM WHERE `ref_payout`=0 AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `userid` ASC", __FILE__, __LINE__); @@ -85,75 +86,88 @@ if (!SQL_HASZERONUMS($result_daily)) { // Init SQLs initSqls(); - // Start checking accounts which are on 0 confirmed-to-go mails - while ($content = SQL_FETCHARRAY($result_daily)) { - //* DEBUG: */ debugOutput(basename(__FILE__) . ':' . $content['userid']); - $result_points = SQL_QUERY_ESC("SELECT + // Run through all 'locked_(foo)_points columsn + foreach (runFilterChain('locked_points_columns_array', array('points')) as $columnName) { + // Start checking accounts which are on 0 confirmed-to-go mails + while ($content = SQL_FETCHARRAY($result_daily)) { + //* DEBUG: */ debugOutput(basename(__FILE__) . ':' . $content['userid']); + $result_points = SQL_QUERY_ESC("SELECT `ref_depth`, - `locked_points` + `locked_%s` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND - `locked_points` > 0.00000 + `locked_%s` > 0.00000 ORDER BY `ref_depth` ASC", - array(bigintval($content['userid'])), __FILE__, __LINE__); + array( + $columnName, + bigintval($content['userid']), + $columnName + ), __FILE__, __LINE__); - //* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;points|numRows=' . SQL_NUMROWS($result_points)); - if (!SQL_HASZERONUMS($result_points)) { - // Ok transfer points - while ($content2 = SQL_FETCHARRAY($result_points)) { - // Merge both arrays - $content = merge_array($content, $content2); + //* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;points|numRows=' . SQL_NUMROWS($result_points)); + if (!SQL_HASZERONUMS($result_points)) { + // Ok transfer points + while ($content2 = SQL_FETCHARRAY($result_points)) { + // Merge both arrays + $content = merge_array($content, $content2); - //* DEBUG: */ debugOutput(basename(__FILE__) . ':userid=' . $content['userid'].',depth='.$content['ref_depth'].',locked='.$content['locked_points']); - if ($content['ref_depth'] > 0) { - // Level 1+ - addSql(SQL_QUERY_ESC("UPDATE + //* DEBUG: */ debugOutput(basename(__FILE__) . ':userid=' . $content['userid'].',depth='.$content['ref_depth'].',columnName=' . $columnName . ',locked='.$content['locked_' . $columnName]); + if ($content['ref_depth'] > 0) { + // Level 1+ + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET - `points`=`points`+%s, - `locked_points`=0.00000 + `%s`=`%s`+%s, + `locked_%s`=0.00000 WHERE `userid`=%s AND `ref_depth`=%s LIMIT 1", - array( - $content['locked_points'], - bigintval($content['userid']), + array( + $columnName, + $columnName, + $content['locked_' . $columnName], + $columnName, + bigintval($content['userid']), $content['ref_depth'] - ), __FILE__, __LINE__, false) - ); - } else { - // Level zero - addSql(SQL_QUERY_ESC("UPDATE + ), __FILE__, __LINE__, false) + ); + } else { + // Level zero + addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET - `points`=`points`+%s, - `locked_points`=0.00000 + `%s`=`%s`+%s, + `locked_%s`=0.00000 WHERE `userid`=%s AND `ref_depth` IS NULL LIMIT 1", - array( - $content['locked_points'], - bigintval($content['userid']) - ), __FILE__, __LINE__, false) - ); - } + array( + $columnName, + $columnName, + $content['locked_' . $columnName], + $columnName, + bigintval($content['userid']) + ), __FILE__, __LINE__, false) + ); + } - // Update mediadata as well - if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) { - // Update database - updateMediadataEntry(array('total_points'), 'add', $content['locked_points']); - } // END - if - } // END - while - } // END - if + // Update mediadata as well + if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) { + // Update database + updateMediadataEntry(array('total_points'), 'add', $content['locked_' . $columnName]); + } // END - if + } // END - while + } // END - if - // Free memory - SQL_FREERESULT($result_points); - } // END - while + // Free memory + SQL_FREERESULT($result_points); + } // END - while + } // END - foreach // Run all SQLs runFilterChain('run_sqls'); diff --git a/inc/daily/daily_yoomedia.php b/inc/daily/daily_yoomedia.php index e9953613d8..87de90b518 100644 --- a/inc/daily/daily_yoomedia.php +++ b/inc/daily/daily_yoomedia.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/databases.php b/inc/databases.php index 8e42f45128..851d3eec9f 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,48 +41,51 @@ if (!defined('__SECURITY')) { } // END - if // System-wide return codes -addCode('WRONG_PASS' , 0x001); -addCode('WRONG_ID' , 0x002); -addCode('ACCOUNT_LOCKED' , 0x003); -addCode('ACCOUNT_UNCONFIRMED', 0x004); -addCode('ACCOUNT_UNKNOWN' , 0x005); -addCode('UNKNOWN_STATUS' , 0x006); -addCode('NO_MAIL_TYPE' , 0x007); -addCode('CNTR_FAILED' , 0x008); -addCode('LOGOUT_DONE' , 0x009); -addCode('LOGOUT_FAILED' , 0x00a); -addCode('URL_TIME_LOCK' , 0x00b); -addCode('URL_FOUND' , 0x00c); -addCode('OVERLENGTH' , 0x00d); -addCode('SUBJECT_URL' , 0x00e); -addCode('BLIST_URL' , 0x00f); -addCode('NO_RECS_LEFT' , 0x010); -addCode('INVALID_TAGS' , 0x011); -addCode('MORE_POINTS' , 0x012); -addCode('COOKIES_DISABLED' , 0x013); -addCode('DATA_INVALID' , 0x014); -addCode('POSSIBLE_INVALID' , 0x015); -addCode('USER_404' , 0x016); -addCode('STATS_404' , 0x017); -addCode('ALREADY_CONFIRMED' , 0x018); -addCode('ERROR_MAILID' , 0x019); -addCode('EXTENSION_PROBLEM' , 0x01a); -addCode('MORE_RECEIVERS1' , 0x01b); -addCode('MORE_RECEIVERS2' , 0x01c); -addCode('MORE_RECEIVERS3' , 0x01d); -addCode('INVALID_URL' , 0x01e); -addCode('MENU_NOT_VALID' , 0x01f); -addCode('LOGIN_FAILED' , 0x020); -addCode('BEG_SAME_AS_OWN' , 0x021); -addCode('UNHANDLED_STATUS' , 0x022); -addCode('MODULE_MEMBER_ONLY' , 0x023); -addCode('UNKNOWN_ERROR' , 0x024); -addCode('PROFILE_UPDATED' , 0x025); +addCode('WRONG_PASS' , 0x001); +addCode('WRONG_ID' , 0x002); +addCode('ACCOUNT_LOCKED' , 0x003); +addCode('ACCOUNT_UNCONFIRMED' , 0x004); +addCode('ACCOUNT_UNKNOWN' , 0x005); +addCode('UNKNOWN_STATUS' , 0x006); +addCode('NO_MAIL_TYPE' , 0x007); +addCode('CNTR_FAILED' , 0x008); +addCode('LOGOUT_DONE' , 0x009); +addCode('LOGOUT_FAILED' , 0x00a); +addCode('URL_TIME_LOCK' , 0x00b); +addCode('URL_FOUND' , 0x00c); +addCode('OVERLENGTH' , 0x00d); +addCode('SUBJECT_URL' , 0x00e); +addCode('BLIST_URL' , 0x00f); +addCode('NO_RECS_LEFT' , 0x010); +addCode('INVALID_TAGS' , 0x011); +addCode('MORE_POINTS' , 0x012); +addCode('COOKIES_DISABLED' , 0x013); +addCode('DATA_INVALID' , 0x014); +addCode('POSSIBLE_INVALID' , 0x015); +addCode('USER_404' , 0x016); +addCode('STATS_404' , 0x017); +addCode('ALREADY_CONFIRMED' , 0x018); +addCode('ERROR_MAILID' , 0x019); +addCode('EXTENSION_PROBLEM' , 0x01a); +addCode('MORE_RECEIVERS1' , 0x01b); +addCode('MORE_RECEIVERS2' , 0x01c); +addCode('MORE_RECEIVERS3' , 0x01d); +addCode('INVALID_URL' , 0x01e); +addCode('MENU_NOT_VALID' , 0x01f); +addCode('LOGIN_FAILED' , 0x020); +addCode('BEG_SAME_AS_OWN' , 0x021); +addCode('UNHANDLED_STATUS' , 0x022); +addCode('MODULE_MEMBER_ONLY' , 0x023); +addCode('UNKNOWN_ERROR' , 0x024); +addCode('PROFILE_UPDATED' , 0x025); +addCode('UNKNOWN_REDIRECT' , 0x026); +addCode('LOGIN_EMPTY_ID' , 0x027); +addCode('LOGIN_EMPTY_PASSWORD', 0x028); // Full version setConfigEntry('FULL_VERSION', '0.2.1-FINAL'); -// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!) +// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES!) setConfigEntry('SERVER_URL', 'http://mxchange.org'); // One day @@ -100,5 +103,17 @@ setConfigEntry('ENCRYPT_SEPARATOR', ':'); // Extra title is empty by default setExtraTitle(''); +// Time unit translations +$GLOBALS['time_units'] = array( + // Data value -> string-representation + 'Y' => 'YEAR', + 'M' => 'MONTH', + 'W' => 'WEEK', + 'D' => 'DAY', + 'h' => 'HOUR', + 'm' => 'MINUTE', + 's' => 'SECOND', +); + // [EOF] ?> diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 1f4fb3cdbd..29b6b9b1bf 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -52,13 +52,13 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { // Empty query string or link is not up? if (empty($sqlStringModified)) { // Empty SQL string! - debug_report_bug(__FUNCTION__, __LINE__, sprintf("SQL string is empty. Please fix this. file=%s, line=%s", + reportBug(__FUNCTION__, __LINE__, sprintf("SQL string is empty, please fix this: file=%s, line=%s", basename($F), $L )); } elseif (!SQL_IS_LINK_UP()) { // We should not quietly ignore this - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Cannot query database: sqlString=%s,file=%s,line=%s", + reportBug(__FUNCTION__, __LINE__, sprintf("Cannot query database: sqlString=%s,file=%s,line=%s", $sqlStringModified, basename($F), $L @@ -66,7 +66,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { } // Remove \t, \n and \r from queries they may confuse some MySQL versions - $sqlStringModified = str_replace("\t", ' ', str_replace("\n", ' ', str_replace("\r", ' ', $sqlStringModified))); + $sqlStringModified = str_replace(array(chr(9), chr(10), chr(13)), array(' ', ' ', ' '), $sqlStringModified); // Compile config entries out $sqlStringModified = SQL_PREPARE_SQL_STRING($sqlStringModified, $enableCodes); @@ -90,7 +90,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { // Run SQL command //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . basename($F) . ',L=' . $L . ',sql=' . $GLOBALS['last_sql']); $result = mysql_query($GLOBALS['last_sql'], SQL_GET_LINK()) - or debug_report_bug($F, $L, 'file='. basename($F) . ',line=' . $L . ':mysql_error()=' . mysql_error() . ',last_query=' . $GLOBALS['last_sql']); + or SQL_ERROR($F, $L, 'file='. basename($F) . ',line=' . $L . ':mysql_error()=' . mysql_error() . ',last_query=' . $GLOBALS['last_sql']); //* DEBUG: */ logDebugMessage($F, $L, 'sql=' . $GLOBALS['last_sql'] . ',affected=' . SQL_AFFECTEDROWS() . ',numRows='.(is_resource($result) ? SQL_NUMROWS($result) : gettype($result))); // Calculate query time @@ -109,7 +109,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { incrementConfigEntry('sql_count'); // Debug output - if ((!isCssOutputMode()) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) { + if (SQL_DEBUG_ENABLED()) { // Is this the first call? if (!isset($GLOBALS['sql_first_entry'])) { // Write first entry @@ -118,17 +118,11 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { } // END - if // Append debug line - appendLineToFile(getCachePath() . 'mysql.log', basename($F) . '|LINE=' . $L . '|NUM=' . (is_resource($result) ? SQL_NUMROWS($result) : 'false') . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $GLOBALS['last_sql']))); + appendLineToFile(getCachePath() . 'mysql.log', basename($F) . '|LINE=' . $L . '|NUM=' . (is_resource($result) ? SQL_NUMROWS($result) : 'false') . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace(array(chr(13), chr(10)), array('', ' '), $GLOBALS['last_sql'])); } // END - if - // Count DB hits - if (!isStatsEntrySet('db_hits')) { - // Count in dummy variable - setStatsEntry('db_hits', 1); - } else { - // Count to config array - incrementStatsEntry('db_hits'); - } + // Increment stats entry + incrementStatsEntry('db_hits'); // Return the result return $result; @@ -143,7 +137,7 @@ function SQL_NUMROWS ($resource) { $lines = false; // Is the result a valid resource? - if (isset($GLOBALS['sql_numrows'][$resource])) { + if (isset($GLOBALS['sql_numrows'][intval($resource)])) { // Use cache $lines = $GLOBALS['sql_numrows'][intval($resource)]; } elseif (is_resource($resource)) { @@ -154,7 +148,7 @@ function SQL_NUMROWS ($resource) { $GLOBALS['sql_numrows'][intval($resource)] = $lines; } else { // No resource given, please fix this - debug_report_bug(__FUNCTION__, __LINE__, 'No resource given! result[]=' . gettype($resource) . ',last_sql=' . $GLOBALS['last_sql']); + reportBug(__FUNCTION__, __LINE__, 'No resource given! result[]=' . gettype($resource) . ',last_sql=' . $GLOBALS['last_sql']); } // Return lines @@ -215,10 +209,21 @@ function SQL_RESULT ($resource, $row, $field = '0') { // SQL connect function SQL_CONNECT ($host, $login, $password, $F, $L) { // Try to connect - $linkResource = mysql_connect($host, $login, $password) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error()); + $linkResource = mysql_connect($host, $login, $password) or SQL_ERROR($F, $L, mysql_error()); // Set the link resource - SQL_SET_LINK($linkResource); + if (is_resource($linkResource)) { + /* + * A non-resource (boolean) may happen on installation phase which + * shall not be set here. Only valid link resources shall be set so + * SQL_IS_LINK_UP() will only return 'true' if there is really a + * working database link. + */ + SQL_SET_LINK($linkResource); + } // END - if + + // Return the resource + return $linkResource; } // SQL select database @@ -227,7 +232,7 @@ function SQL_SELECT_DB ($dbName, $F, $L) { if (!SQL_IS_LINK_UP()) return false; // Return the result - return mysql_select_db($dbName, SQL_GET_LINK()) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error()); + return mysql_select_db($dbName, SQL_GET_LINK()) or SQL_ERROR($F, $L, mysql_error()); } // SQL close link @@ -238,10 +243,10 @@ function SQL_CLOSE ($F, $L) { } // END - if // Close database link and forget the link - $close = mysql_close(SQL_GET_LINK()) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):'.mysql_error()); + $close = mysql_close(SQL_GET_LINK()) or SQL_ERROR($F, $L, mysql_error()); // Close link - SQL_SET_LINK(null); + SQL_SET_LINK(NULL); // Return the result return $close; @@ -330,7 +335,7 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { // Is columns an array? if (!is_array($columns)) { // No array - debug_report_bug(__FUNCTION__, __LINE__, sprintf("columns is not an array. %s != array, file=%s, line=%s", + reportBug(__FUNCTION__, __LINE__, sprintf("columns is not an array. %s != array, file=%s, line=%s", gettype($columns), basename($F), $L @@ -451,7 +456,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keyName=' . $keyName . 'begin=' . $begin . ' - BETWEEN'); // Remove brackes - $keyName = str_replace('(', '', str_replace(')', '', $keyName)); + $keyName = str_replace(array('(', ')'), array('', ''), $keyName); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keyName=' . $keyName . 'begin=' . $begin . ' - AFTER'); // Continue @@ -506,7 +511,7 @@ function SQL_SET_LINK ($link) { return; } elseif ((!is_resource($link)) && (!is_null($link))) { // This should never happen! - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Type of link is not resource or null, type=%s", gettype($link))); + reportBug(__FUNCTION__, __LINE__, sprintf("Type of link is not resource or null, type=%s", gettype($link))); } // END - if // Set it @@ -518,23 +523,14 @@ function SQL_SET_LINK ($link) { // Checks if the link is up function SQL_IS_LINK_UP () { - // Default is not up - $linkUp = false; - // Do we have cached this? - if (isset($GLOBALS['is_sql_link_up'])) { - // Then use this - $linkUp = $GLOBALS['is_sql_link_up']; - } else { - // Get it - $linkUp = is_resource(SQL_GET_LINK()); - - // And cache it - $GLOBALS['is_sql_link_up'] = $linkUp; - } + if (!isset($GLOBALS['is_sql_link_up'])) { + // Determine it + $GLOBALS['is_sql_link_up'] = is_resource(SQL_GET_LINK()); + } // END - if // Return the result - return $linkUp; + return $GLOBALS['is_sql_link_up']; } // Wrapper function to make code more readable @@ -569,6 +565,24 @@ function SQL_EPOCHE_TO_TIMESTAMP ($timestamp) { return generateDateTime($timestamp, 7); } +// Log SQL errors to debug.log in installation phase or call reportBug() +function SQL_ERROR ($file, $line, $message) { + // Remember plain error in last_sql_error + $GLOBALS['last_sql_error'] = mysql_error(); + + // Do we have installation phase? + if (isInstallationPhase()) { + /* + * In installation phase, we don't want SQL errors abort e.g. connection + * tests, so just log it away. + */ + logDebugMessage($file, $line, $message); + } else { + // Regular mode, then call reportBug() + reportBug($file, $line, $message); + } +} + // Check if there is a SQL table created function isSqlTableCreated ($tableName) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ' - ENTERED!'); @@ -642,5 +656,49 @@ function isSqlTableIndexFound ($tableName, $keyName) { return $GLOBALS[__FUNCTION__][$tableName][$keyName]; } +// Init database layer +function initDatabaseLayer () { + // Set all required variables: + $GLOBALS['last_sql_error'] = ''; +} + +// Get last SQL error +function getLastSqlError () { + return $GLOBALS['last_sql_error']; +} + +// Gets an array (or false if none is found) from all supported engines +function getArrayFromSupportedSqlEngines ($support = 'YES') { + // Init array + $engines = array(); + + // This also worked, now we need to check if the selected database type is supported + $result = SQL_QUERY('SHOW ENGINES', __FUNCTION__, __LINE__); + + // Do we have entries? (Bad if not) + if (SQL_NUMROWS($result) > 0) { + // Load all and check for active entries + while ($content = SQL_FETCHARRAY($result)) { + // Is this supported? + if (($support == 'ALL') || ($content['Support'] == $support)) { + // Add it + array_push($engines, $content); + } elseif (isDebugModeEnabled()) { + // Log it away in debug mode + logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ')'); + } + } // END - if + } else { + // No engines! :( + $engines = false; + } + + // Free result + SQL_FREERESULT($result); + + // Return result + return $engines; +} + // [EOF] ?> diff --git a/inc/db/lib.php b/inc/db/lib.php index ba0d73c1e0..9d28823ac5 100644 --- a/inc/db/lib.php +++ b/inc/db/lib.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,13 +43,16 @@ if (!defined('__SECURITY')) { // Create include file name $inc = sprintf("inc/db/lib-%s.php", getConfig('_DB_TYPE')); -if (isIncludeReadable($inc)) { - // Include abstraction layer - loadIncludeOnce($inc); -} else { +if (!isIncludeReadable($inc)) { // Bye, bye... - debug_report_bug(__FILE__, __LINE__, 'Cannot load database abstraction layer ' . getConfig('_DB_TYPE') . ' -> R.I.P.'); -} + reportBug(__FILE__, __LINE__, 'Cannot load database abstraction layer ' . getConfig('_DB_TYPE') . ' -> R.I.P.'); +} // END - if + +// Include abstraction layer +loadIncludeOnce($inc); + +// Initialize it +initDatabaseLayer(); // [EOF] ?> diff --git a/inc/debug/request_ b/inc/debug/request_ index d2bc8bd606..2003fa1c83 100644 --- a/inc/debug/request_ +++ b/inc/debug/request_ @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 3aa8026953..82ba0ca9a3 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ function replaceExpressionCode ($data, $replacer) { return str_replace($data['matches'][0][$data['key']], $replacer, escapeQuotes($data['code'])); } -// Private function to determine wether we have a special expression function avaible +// Private function to determine whether we have a special expression function avaible // (mostly located in wrapper-functions.php) function isExpressionFunctionAvaiable ($data) { // Get the enty we need and trim it @@ -81,7 +81,7 @@ function isExpressionFunctionAvaiable ($data) { } } elseif ($GLOBALS['expression_function_available'][$entry] == false) { // Debug message - logDebugMessage(__FUNCTION__, __LINE__, 'Expression function for entry ' . $entry . ' requested but not found.'); + logDebugMessage(__FUNCTION__, __LINE__, 'Expression function for entry ' . $entry . ' requested but does not exist.'); } // Return cache @@ -110,12 +110,16 @@ function doExpressionCode ($data) { function doExpressionUrl ($data) { // Do we have JS-mode? if ($data['callback'] == 'js') { - $data['output_mode'] = 1; + // Switch to it + $data['output_mode'] = '1'; } // END - if // Handle an URL here $replacer = "{DQUOTE} . encodeUrl('" . $data['matches'][4][$data['key']] . "', " . $data['output_mode'] . ') . {DQUOTE}'; + // Debug log + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'replacer=' . $replacer . ',callback=' . $data['callback']); + // Replace it $code = replaceExpressionCode($data, $replacer); @@ -169,9 +173,12 @@ function doExpressionConfig ($data) { if (isExpressionFunctionAvaiable($data)) { // Then use it $replacer = '{DQUOTE} . ' . $data['callback'] . '(' . getExpressionFunction($data) . '()) . {DQUOTE}'; + } elseif (!isConfigEntrySet($data['matches'][4][$data['key']])) { + // Config entry is not set + $replacer = '{DQUOTE} . ' . $data['callback'] . '(NULL) . {DQUOTE}'; } else { // Default replacer is the config value itself - $replacer = '{DQUOTE} . ' . $data['callback'] . '(getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}'; + $replacer = '{DQUOTE} . ' . $data['callback'] . '(getConfig(' . chr(39) . $data['matches'][4][$data['key']] . chr(39) . ')) . {DQUOTE}'; } // Replace the config entry @@ -249,7 +256,7 @@ function doExpressionMessage ($data) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'callback=' . $data['callback'] . ',extra_func=' . $data['extra_func'] . ',value=' . $data['value']); // Message string replacement depends on if message is masked - if ((isMessageMasked($data['callback'])) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) { + if ((isMessageMasked($data['callback'], false)) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) { // Message should be masked $replacer = "{DQUOTE} . getMaskedMessage('" . $data['callback'] . "', '" . $data['extra_func'] . "') . {DQUOTE}"; } elseif (!empty($data['value'])) { @@ -270,28 +277,31 @@ function doExpressionMessage ($data) { // Expression call-back for template functions function doExpressionTemplate ($data) { // Construct call-back function name - $callback = 'doTemplate' . $data['callback']; + $callbackFunction = 'doTemplate' . $data['callback']; // Init replacer - $replacer = ''; + $replacer = ''; // Is the function there? - if (function_exists($callback)) { + if (!isset($GLOBALS['current_template'])) { + // This is very bad and needs fixing + reportBug(__FUNCTION__, __LINE__, 'current_template in GLOBALS not set, callbackFunction=' . $callbackFunction . ',function_exists()=' . intval(function_exists($callbackFunction))); + } elseif (!function_exists($callbackFunction)) { + // Log missing function + logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackFunction . ' does not exist.'); + } else { // Do the replacement //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); - $replacer = '{DQUOTE} . ' . $callback . "('" . $GLOBALS['current_template'] . "', true"; + $replacer = '{DQUOTE} . ' . $callbackFunction . '(' . chr(39) . $GLOBALS['current_template'] . chr(39) . ', true'; // Is 'value' set? if (!empty($data['value'])) { // Then include it as well - $replacer .= ", '" . $data['value'] . "'"; + $replacer .= ', ' . chr(39) . $data['value'] . chr(39); } // END - if // Replacer is ready $replacer .= ') . {DQUOTE}'; - } else { - // Log missing function - logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callback . ' does not exist.'); } // Replace the code @@ -341,5 +351,43 @@ function doExpressionPost ($data) { return $code; } +// Expression call-back for session data +function doExpressionSession ($data) { + // Construct the replacer + $replacer = '{%pipe,getSession=' . $data['value'] . '%}'; + + // Debug message + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $data['value'] . ',replacer=' . $replacer); + + // Replace the code + $code = replaceExpressionCode($data, $replacer); + + // Return the (maybe) replaced code + return $code; +} + +/** + * Expression call-back for session piplining, this means: + * + * 1) Read session data + * 2) Wrap the raw data into {%pipe,fooFunction=$rawValue%} + */ +function doExpressionSessionPipe ($data) { + // Get the session data + $rawValue = getSession($data['value']); + + // Construct the replacer + $replacer = '{%pipe,' . $data['callback'] . '=' . $rawValue . '%}'; + + // Debug message + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $data['value'] . ',rawValue=' . $rawValue . ',replacer=' . $replacer); + + // Replace the code + $code = replaceExpressionCode($data, $replacer); + + // Return the (maybe) replaced code + return $code; +} + // [EOF] ?> diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 7e65fe9c0d..3ac6e88460 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,12 +42,12 @@ if (!defined('__SECURITY')) { // Load the extension and maybe found language and function files. function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = false) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_mode=' . $ext_mode . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_mode=' . $ext_mode . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run) . ' - ENTERED!'); // Loading an extension in same mode, but not test/update, twice is not // good, so is the extension $ext_name already loaded in mode $ext_mode? if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) { // If this happens twice, we need the bug report from you, except for updates/tests - debug_report_bug(__FUNCTION__, __LINE__, __FUNCTION__ . '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true)); + reportBug(__FUNCTION__, __LINE__, __FUNCTION__ . '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true)); } // END - if // Make sure this situation can only happen once @@ -78,7 +78,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal // In all but test-mode we need these messages to debug! Please report all (together, e.g.) if (($ext_mode != 'test') && (getCurrentExtensionVersion() == '0.0.0')) { // Abort here, this must now always be set! - debug_report_bug(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0. ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', dry_run=' . intval($dry_run)); + reportBug(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0. ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', dry_run=' . intval($dry_run)); } // END - if } @@ -98,7 +98,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal initExtensionSqls(); // Is the extension already loaded? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Loading extension ' . $ext_name . ', mode=' . getExtensionMode() . ', ver=' . getCurrentExtensionVersion()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Loading extension ' . $ext_name . ', getExtensionMode()=' . getExtensionMode() . ', getCurrentExtensionVersion()=' . getCurrentExtensionVersion()); if ((isExtensionLoaded($ext_name)) && (getExtensionMode() == 'init')) { // Debug message logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name)); @@ -110,7 +110,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal // Is the extension file NOT there? if (!isExtensionNameValid($ext_name)) { // Debug message - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable.", $ext_name)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable or the PHP script is deprecated.", $ext_name)); // Abort here return false; @@ -179,7 +179,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal // Registers an extension and possible update dependencies function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates = false) { // Set current extension name - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - ENTERED!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . intval($taskId) . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - ENTERED!'); setCurrentExtensionName($ext_name); // Enable dry-run @@ -189,8 +189,9 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates enableExtensionProductive(); // This shall never do a non-admin user or if the extension is active (already installed) - if ((!isAdmin()) || (isExtensionInstalled($ext_name))) { + if (((!isAdmin()) && (!isInstallationPhase())) || (isExtensionInstalled($ext_name))) { // Abort here with 'false' + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ABORTED: isAdmin()=' . intval(isAdmin()) . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',isExtensionInstalled()=' . intval(isExtensionInstalled($ext_name))); return false; } // END - if @@ -198,7 +199,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates if ((isExtensionRegistrationRunning($ext_name)) || ((isExtensionUpdateRunning($ext_name)) && ($ignoreUpdates === false))) { // Then abort here with 'true' becaus it is fine //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in registration/update phase, all fine,taskId=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates)); - ///* BUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - Please investigate!'); + //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - Please investigate!'); return true; } // END - if @@ -212,7 +213,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates } // END - if // Is the task id zero? Then we need to auto-fix it here - if ($taskId == '0') { + if (($taskId == '0') && (!isInstallationPhase())) { // Try to find the task $taskId = determineExtensionTaskId(getCurrentExtensionName()); @@ -224,7 +225,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates // Is it still zero? if ($taskId == '0') { // Then request a bug report - debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)", + reportBug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)", __FUNCTION__, getCurrentExtensionName() )); @@ -245,7 +246,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates enableExtensionReportingFailure(); // Does this extension exists? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ' - CALLING loadExtension() ...'); if (loadExtension(getCurrentExtensionName(), 'register', '0.0.0', isExtensionDryRun())) { // Set current extension name again setCurrentExtensionName($ext_name); @@ -284,12 +285,14 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates } // END - if // Extension version set? If empty the extension is not registered + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_ver[' . gettype($ext_ver) . ']=' . $ext_ver . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - EMPTY?'); if (empty($ext_ver)) { // Extension not registered so far so first load task's id... $taskId = determineExtensionTaskId($ext_update); // Entry found? - if ($taskId > 0) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'taskId=' . $taskId . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - CHECKING!'); + if (($taskId > 0) || (isInstallationPhase())) { // Try to register the extension //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ',taskId=' . $taskId . ',isExtensionDryRun()=' . isExtensionDryRun()); $processResult = registerExtension($ext_update, $taskId, isExtensionDryRun(), true); @@ -414,16 +417,27 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates array(bigintval($taskId)), __FUNCTION__, __LINE__); } + // @TODO This redirect is still needed to register sql_patches! Please try to avoid it + if (($ret === true) && ($dry_run === false) && ($ext_name == 'sql_patches') && (!isInstallationPhase())) { + /* + * This is a really dirty hack to prevent an error about a missing + * configuration entry which should be there after registration of + * ext-sql_patches. + */ + redirectToRequestUri(); + } // END - if + // Return status code - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',processResult=' . intval($processResult) . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',currName=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',processResult=' . intval($processResult) . ',ret=' . intval($ret) . ' - EXIT!'); return $ret; } // Run SQL queries for given extension id // @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) function doExtensionSqls ($ext_id, $load_mode) { - // This shall never do a non-admin user! - if (!isAdmin()) { + // This shall never do a non-admin user but installation phase is okay + if ((!isAdmin()) && (!isInstallationPhase())) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_id=' . $ext_id. ',load_mode=' . $load_mode . ',isAdmin()=' . intval(isAdmin()) . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ' - ABORT!'); return false; } // END - if @@ -466,7 +480,7 @@ function doExtensionSqls ($ext_id, $load_mode) { runFilterChain('extension_' . $load_mode); // Remove cache file(s) if extension is active - if (((isExtensionActive('cache')) && ((!SQL_HASZEROAFFECTED())) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate'))) { + if (((isExtensionActive('cache')) && ((!SQL_HASZEROAFFECTED()) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate')))) { // Run filters runFilterChain('post_extension_run_sql', getCurrentExtensionName()); } // END - if @@ -480,13 +494,13 @@ function doExtensionSqls ($ext_id, $load_mode) { } // END - if } -// Check wether the given extension is installed +// Check whether the given extension is installed function isExtensionInstalled ($ext_name) { // We don't like empty extension names here //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!'); if (empty($ext_name)) { // Please fix them all - debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty.'); + reportBug(__FUNCTION__, __LINE__, 'ext_name is empty.'); } // END - if // By default non is installed @@ -504,9 +518,9 @@ function isExtensionInstalled ($ext_name) { // Count cache hits incrementStatsEntry('cache_hits'); - } elseif ((isInstallationPhase())) { + } elseif (isInstallationPhase()) { // Extensions are all inactive/not installed during installation - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - installion phase'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - installation phase detected.'); } else { // Look in database $ext_id = getExtensionId($ext_name); @@ -536,12 +550,14 @@ function isExtensionInstalled ($ext_name) { function isExtensionActive ($ext_name) { if (isInstallationPhase()) { // Extensions are all inactive during installation + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extensions are always inactive while installation phase. ext_name=' . $ext_name); return false; } elseif (empty($ext_name)) { // Empty extension names must befixed - debug_report_bug(__FUNCTION__, __LINE__, 'Empty extension name provided.'); + reportBug(__FUNCTION__, __LINE__, 'Empty extension name provided.'); } elseif (!isExtensionInstalled($ext_name)) { // Not installed extensions are always inactive + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Not installed extensions are always inactive. ext_name=' . $ext_name); return false; } @@ -558,7 +574,7 @@ function isExtensionActive ($ext_name) { incrementStatsEntry('cache_hits'); } elseif (isExtensionLoaded($ext_name)) { // @TODO Extension is loaded, what next? - debug_report_bug(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name); + reportBug(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name); } elseif (($ext_name == 'cache') || (!isExtensionInstalled('cache'))) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'DB! ext_name=' . $ext_name); // Load from database @@ -599,11 +615,12 @@ function getExtensionVersion ($ext_name, $force = false) { // Empty extension name should be fixed! if (empty($ext_name)) { // Please report this bug! - debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty which is not allowed here.'); + reportBug(__FUNCTION__, __LINE__, 'ext_name is empty which is not allowed here.'); } // END - if // Extensions are all inactive during installation if (isInstallationPhase()) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',force=' . intval($force) . ' - Installation phase detected, returning empty version.'); return ''; } // END - if @@ -641,7 +658,7 @@ function getExtensionVersion ($ext_name, $force = false) { // Extension version should not be invalid if (($data['ext_version'] == 'false') && ($force === false)) { // Please report this trouble - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension %s has empty version!", $ext_name)); + reportBug(__FUNCTION__, __LINE__, sprintf("Extension %s has empty version!", $ext_name)); } // END - if // Return result @@ -655,7 +672,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependen //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!'); if ((!isAdmin()) || (empty($ext_name))) { // Called as non-admin or empty extension - debug_report_bug(__FUNCTION__, __LINE__, 'Called as non-admin (isAdmin()=' . intval(isAdmin()) . '), or empty extension name. ext_name=' . $ext_name); + reportBug(__FUNCTION__, __LINE__, 'Called as non-admin (isAdmin()=' . intval(isAdmin()) . '), or empty extension name. ext_name=' . $ext_name); } // END - if // Set current SQL name @@ -665,7 +682,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependen if ((isExtensionUpdateRunning($ext_name, $ignoreDependencies)) && ($dry_run === false)) { // This is fine but needs logging ATM //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, all fine.'); - ///* BUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, please investigate!'); + //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, please investigate!'); return true; } // END - if @@ -766,7 +783,7 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA // Empty title? if (empty($title)) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'title is empty.'); + reportBug(__FUNCTION__, __LINE__, 'title is empty.'); } // END - if // Init variables @@ -790,7 +807,7 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA // Prepare output for template $content = array( 'i' => ($idx + 1), - 'sql' => str_replace('{', '{', str_replace('}', '}', encodeEntities($sql))) + 'sql' => str_replace(array('{', '}'), array('{', '}'), encodeEntities($sql)) ); // Load row template @@ -812,7 +829,7 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA $OUT = loadTemplate('admin_extension_sql_table', true, $content); } else { // No addional SQL commands to run - $OUT = displayMessage('{--ADMIN_NO_ADDITIONAL_SQLS--}', true); + $OUT = displayMessage('{--ADMIN_EXTENSION_VERBOSE_SQLS_404--}', true); } } // END - if @@ -850,7 +867,7 @@ function getExtensionName ($ext_id) { // Did we find some extension? if (empty($data['ext_name'])) { // We should fix these all! - debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty. ext_id=' . $ext_id); + reportBug(__FUNCTION__, __LINE__, 'ext_name is empty. ext_id=' . $ext_id); } // END - if // Return the extension name @@ -891,7 +908,7 @@ function getExtensionId ($ext_name) { return $data['ext_id']; } -// Determines wether the given extension name is valid +// Determines whether the given extension name is valid function isExtensionNameValid ($ext_name) { // Do we have cache? if (!isset($GLOBALS['ext_name_valid'][$ext_name])) { @@ -906,7 +923,7 @@ function isExtensionNameValid ($ext_name) { return $GLOBALS['ext_name_valid'][$ext_name]; } -// Determines wether the given extension id is valid +// Determines whether the given extension id is valid function isExtensionIdValid ($ext_id) { // Default is nothing valid $isValid = false; @@ -932,7 +949,7 @@ function doActivateExtension ($ext_name) { // Is the extension installed? if (!isExtensionInstalled($ext_name)) { // Non-installed extensions cannot be activated - debug_report_bug(__FUNCTION__, __LINE__, 'Tried to activate non-installed extension ' . $ext_name); + reportBug(__FUNCTION__, __LINE__, 'Tried to activate non-installed extension ' . $ext_name); } // END - if // Activate the extension @@ -948,7 +965,7 @@ function doDeactivateExtension ($ext_name) { // Is the extension installed? if (!isExtensionInstalled($ext_name)) { // Non-installed extensions cannot be activated - debug_report_bug(__FUNCTION__, __LINE__, 'Tried to deactivate non-installed extension ' . $ext_name . ',getExtensionMode()=' . getExtensionMode()); + reportBug(__FUNCTION__, __LINE__, 'Tried to deactivate non-installed extension ' . $ext_name . ',getExtensionMode()=' . getExtensionMode()); } // END - if // Activate the extension @@ -972,7 +989,7 @@ function doDeactivateExtension ($ext_name) { ); } -// Checks wether the extension is older than given +// Checks whether the extension is older than given function isExtensionOlder ($ext_name, $ext_ver) { // Get current extension version $currVersion = getExtensionVersion($ext_name); @@ -1002,7 +1019,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) { } // END - if } else { // Extension not there! :-( - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension %s not found but should be updated?", $ext_name)); + reportBug(__FUNCTION__, __LINE__, sprintf("Extension %s not found but should be updated?", $ext_name)); } // Return task id @@ -1187,7 +1204,7 @@ function addExtensionCssFile ($file) { } // END - if // Add the entry - $GLOBALS['css_files'][] = $file; + array_push($GLOBALS['css_files'], $file); } // Setter for EXT_ALWAYS_ACTIVE flag @@ -1200,7 +1217,7 @@ function getThisExtensionAlwaysActive () { return $GLOBALS['ext_always_active'][getCurrentExtensionName()]; } -// Checks wether the current extension is always active +// Checks whether the current extension is always active function isThisExtensionAlwaysActive () { return (getThisExtensionAlwaysActive() == 'Y'); } @@ -1221,8 +1238,18 @@ function setExtensionDeprecated ($deprecated) { } // Getter for EXT_DEPRECATED flag -function isExtensionDeprecated () { - return ($GLOBALS['ext_deprecated'][getCurrentExtensionName()] == 'Y'); +function isExtensionDeprecated ($ext_name = NULL) { + // Default is from current (NULL) extension + $isDeprecated = ($GLOBALS['ext_deprecated'][getCurrentExtensionName()] == 'Y'); + + // Is ext_name set? + if (!is_null($ext_name)) { + // Then use it instead + $isDeprecated = ((isset($GLOBALS['ext_deprecated'][$ext_name])) && ($GLOBALS['ext_deprecated'][$ext_name] == 'Y')); + } // END - if + + // Return it + return $isDeprecated; } // Setter for EXT_UPDATE_DEPENDS flag @@ -1231,7 +1258,7 @@ function addExtensionDependency ($updateDepends) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ',extensionMode=' . getExtensionMode() . ' - ENTERED!'); if (empty($updateDepends)) { // Please report this bug! - debug_report_bug(__FUNCTION__, __LINE__, 'updateDepends is empty: currentExtension=' . getCurrentExtensionName()); + reportBug(__FUNCTION__, __LINE__, 'updateDepends is empty: currentExtension=' . getCurrentExtensionName()); } // END - if // Is it not yet added? @@ -1245,10 +1272,10 @@ function addExtensionDependency ($updateDepends) { } // END - if // Add it to the list of extension update depencies map - $GLOBALS['ext_update_depends'][getCurrentExtensionName()][] = (string) $updateDepends; + array_push($GLOBALS['ext_update_depends'][getCurrentExtensionName()], $updateDepends); // Remember it in the list of running updates - $GLOBALS['ext_running_updates'][getCurrentExtensionName()][] = $updateDepends; + array_push($GLOBALS['ext_running_updates'][getCurrentExtensionName()], $updateDepends); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ',extensionMode=' . getExtensionMode() . ' - EXIT!'); } @@ -1257,7 +1284,7 @@ function getExtensionUpdatesRunning () { return $GLOBALS['ext_running_updates'][getCurrentExtensionName()]; } -// Checks wether the given extension registration is in progress +// Checks whether the given extension registration is in progress function isExtensionRegistrationRunning ($ext_name) { // Simply check it $isRunning = ((isset($GLOBALS['ext_register_running'])) && (in_array($ext_name, $GLOBALS['ext_register_running']))); @@ -1274,7 +1301,7 @@ function initExtensionUpdateDependencies () { // Init update depency map automatically if not found if (isExtensionUpdateDependenciesInitialized()) { // We need these bug reports as well... - debug_report_bug(__FUNCTION__, __LINE__, '() is called twice: currName=' . getCurrentExtensionName()); + reportBug(__FUNCTION__, __LINE__, '() is called twice: currName=' . getCurrentExtensionName()); } // END - if $GLOBALS['ext_update_depends'][getCurrentExtensionName()] = array(); @@ -1291,21 +1318,21 @@ function addExtensionRunningRegistration ($ext_name) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Registration in progress: ext_name=' . $ext_name . ' - ENTERED!'); if (isExtensionRegistrationRunning($ext_name)) { // This is really bad and should not be quietly ignored - debug_report_bug(__FUNCTION__, __LINE__, '() already called! ext_name=' . $ext_name); + reportBug(__FUNCTION__, __LINE__, '() already called! ext_name=' . $ext_name); } // END - if // Then add it! - $GLOBALS['ext_register_running'][] = $ext_name; + array_push($GLOBALS['ext_register_running'], $ext_name); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Registration in progress: ext_name=' . $ext_name . ' - EXIT!'); } -// Checks wether EXT_UPDATE_DEPENDS is initialized +// Checks whether EXT_UPDATE_DEPENDS is initialized function isExtensionUpdateDependenciesInitialized () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName()); return (isset($GLOBALS['ext_update_depends'][getCurrentExtensionName()])); } -// Checks wether an update is already running for given extension +// Checks whether an update is already running for given extension function isExtensionUpdateRunning ($ext_name, $ignoreDependencies = false) { // Current and given extensions means whole array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!'); @@ -1361,7 +1388,7 @@ function getExtensionUpdateDependenciesIterator () { // Counter for extension update depencies function countExtensionUpdateDependencies () { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '=' . count($GLOBALS['ext_update_depends'][getCurrentExtensionName()])); return count($GLOBALS['ext_update_depends'][getCurrentExtensionName()]); } @@ -1370,6 +1397,9 @@ function removeExtensionDependency ($ext_name) { // Look it up $key = array_search($ext_name, getExtensionUpdateDependencies()); + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',key[' . gettype($key) . ']=' . $key); + // Is it valid? if ($key !== false) { // Then remove it @@ -1389,10 +1419,13 @@ function initExtensionUpdateIterator () { // Getter for depency iterator function getExtensionUpdateIterator () { // Auto-init iterator - if (!isset($GLOBALS['ext_depend_iterator'][getCurrentExtensionName()])) initExtensionUpdateIterator(); + if (!isset($GLOBALS['ext_depend_iterator'][getCurrentExtensionName()])) { + // Initialize update iterator + initExtensionUpdateIterator(); + } // END - if // Return it - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName().'/'.$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '=' . $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]); return $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]; } @@ -1419,13 +1452,20 @@ function setExtensionVersionHistory ($versionHistory) { // Getter for EXT_VER_HISTORY array function getExtensionVersionHistory () { + // Is it set? + if (!isset($GLOBALS['ext_ver_history'][getCurrentExtensionName()])) { + // Then abort here to a avoid an ugly "Undefined index" error + reportBug(__FUNCTION__, __LINE__, 'Extension ext-' . getCurrentExtensionName() . ' has no history set! Is this extension empty?'); + } // END - if + + // Return the history return $GLOBALS['ext_ver_history'][getCurrentExtensionName()]; } // Setter for EXT_UPDATE_NOTICES function setExtensionUpdateNotes ($updateNotes, $ext_ver = '') { // - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()=' . getCurrentExtensionName() . ',getExtensionMode()=' . getExtensionMode() . ',ext_ver=' . $ext_ver . '/' . getCurrentExtensionVersion() . ',updateNotes()=' . strlen($updateNotes)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()=' . getCurrentExtensionName() . ',getExtensionMode()=' . getExtensionMode() . ',ext_ver=' . $ext_ver . '/' . getCurrentExtensionVersion() . ',updateNotes(length)=' . strlen($updateNotes)); if (empty($ext_ver)) { $GLOBALS['ext_update_notes'][getCurrentExtensionName()][getCurrentExtensionVersion()] = (string) $updateNotes; } else { @@ -1448,7 +1488,7 @@ function initExtensionNotes ($force = false) { // Is it already initialized? if (($force === false) && (isset($GLOBALS['ext_notes'][getCurrentExtensionName()]))) { // This is mostly not wanted, so please report it - debug_report_bug(__FUNCTION__, __LINE__, 'ext_notes already set for extension ' . getCurrentExtensionName()); + reportBug(__FUNCTION__, __LINE__, 'ext_notes already set for extension ' . getCurrentExtensionName()); } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()=' . getCurrentExtensionName()); @@ -1457,7 +1497,7 @@ function initExtensionNotes ($force = false) { // Append extension notice function appendExtensionNotes ($notes) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()=' . getCurrentExtensionName() . ', notes()=' . strlen($notes)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()=' . getCurrentExtensionName() . ', notes(length)=' . strlen($notes)); $GLOBALS['ext_notes'][getCurrentExtensionName()] .= (string) trim($notes); } @@ -1475,7 +1515,7 @@ function setCurrentExtensionName ($ext_name) { function getCurrentExtensionName () { if (!isset($GLOBALS['curr_extension_name'])) { // Not set! - debug_report_bug(__FUNCTION__, __LINE__, 'curr_extension_name not initialized. Please execute initExtensionSqls() before calling this function.'); + reportBug(__FUNCTION__, __LINE__, 'curr_extension_name not initialized. Please execute initExtensionSqls() before calling this function.'); } // END - if // Return it @@ -1498,7 +1538,7 @@ function initExtensionSqls ($force = false) { function addExtensionSql ($sql) { // Add it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ',ext_version=' . getCurrentExtensionVersion() . ',sql=' . $sql); - $GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()][] = $sql; + array_push($GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()], $sql); } // Getter for SQLs array for current extension @@ -1506,7 +1546,7 @@ function getExtensionSqls () { // Output debug backtrace if not found (SHOULD NOT HAPPEN!) if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { // Not found, should not happen - debug_report_bug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", + reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", getCurrentExtensionName() )); } // END - if @@ -1520,7 +1560,7 @@ function countExtensionSqls () { // Output debug backtrace if not found (SHOULD NOT HAPPEN!) if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { // Not found, should not happen - debug_report_bug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", + reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", getCurrentExtensionName() )); } // END - if @@ -1543,7 +1583,7 @@ function initExtensionRemovalList () { } // END - if } -// Checks wether the current extension is on the removal list +// Checks whether the current extension is on the removal list function isExtensionOnRemovalList () { // Init removal list initExtensionRemovalList(); @@ -1555,7 +1595,7 @@ function isExtensionOnRemovalList () { // Adds the current extension to the removal list function addCurrentExtensionToRemovalList () { // Simply add it - $GLOBALS['ext_update_remove'][] = getCurrentExtensionName(); + array_push($GLOBALS['ext_update_remove'], getCurrentExtensionName()); } // Getter for removal list @@ -1575,8 +1615,11 @@ function redirectOnUninstalledExtension ($ext_name) { // Filter for initialization of all extensions by loading them in 'init' mode function FILTER_INIT_EXTENSIONS () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTERED!'); + // Init notification pool + initIncludePool('notify'); + // Do we have some entries? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY!'); if (isset($GLOBALS['cache_array']['extension']['ext_name'])) { // Load all found extensions if found //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - START!'); @@ -1588,6 +1631,10 @@ function FILTER_INIT_EXTENSIONS () { } // END - foreach //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - END!'); } // END - if + + // Run any notifications + runFilterChain('load_includes', 'notify'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!'); } @@ -1617,7 +1664,7 @@ function setCurrentExtensionVersion ($ext_ver) { // ext_ver should never be empty in other modes than 'test' if ((empty($ext_ver)) && (getExtensionMode() != 'test')) { // Please report all these messages - debug_report_bug(__FUNCTION__, __LINE__, 'ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode()); + reportBug(__FUNCTION__, __LINE__, 'ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode()); } // END - if // Add version @@ -1680,7 +1727,7 @@ function getExtensionHasCss () { return $GLOBALS[__FUNCTION__][getCurrentExtensionName()][getCurrentTheme()]; } -// Checks wether the given extension has a language file +// Checks whether the given extension has a language file function ifExtensionHasLanguageFile ($ext_name) { // Do we have cache? if (isset($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name])) { @@ -1700,7 +1747,7 @@ function loadCurrentExtensionInclude () { // Is it readable? if (!isExtensionIncludeReadable()) { // Not readable - debug_report_bug(__FUNCTION__, __LINE__, 'Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.'); + reportBug(__FUNCTION__, __LINE__, 'Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.'); } // END - if // Generate INC name @@ -1710,7 +1757,7 @@ function loadCurrentExtensionInclude () { loadInclude($INC); } -// Checks wether an extension is readable +// Checks whether an extension is readable function isExtensionIncludeReadable ($ext_name = '') { // If empty, use current if (empty($ext_name)) { @@ -1765,10 +1812,10 @@ function addCreateTableSql ($tableName, $sql, $comment) { ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci -COMMENT ' . "'" . $comment . "'"); +COMMENT ' . chr(39) . $comment . chr(39)); } else { // Is already there, which should not happen - debug_report_bug(__FUNCTION__, __LINE__, 'The table ' . $tableName . ' is already created which should not happen.'); + reportBug(__FUNCTION__, __LINE__, 'The table ' . $tableName . ' is already created which should not happen.'); } } @@ -1928,7 +1975,7 @@ function addConfigDropSql ($columnName) { // Found, so add it addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `' . $columnName . '`'); } elseif (isDebugModeEnabled()) { - // Add debug line, debug_report_bug() would cause some extenion updates fail + // Add debug line, reportBug() would cause some extenion updates fail logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $columnName . ' not found.'); } } @@ -1950,7 +1997,7 @@ function enableExtensionProductive ($isProductive = true) { $GLOBALS['ext_productive'][getCurrentExtensionName()] = (bool) $isProductive; } -// Checks wether the extension is in productive phase. If not set, development +// Checks whether the extension is in productive phase. If not set, development // phase (=false) is assumed. function isExtensionProductive ($ext_name = '') { // Is the extension name empty? Then use current @@ -1982,7 +2029,7 @@ function markExtensionAsLoaded ($ext_name) { // Is it already loaded? if (isExtensionLoaded($ext_name)) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Extension ' . $ext_name . ' is already marked as loaded!'); + reportBug(__FUNCTION__, __LINE__, 'Extension ' . $ext_name . ' is already marked as loaded!'); } // END - if // Mark it @@ -1990,7 +2037,7 @@ function markExtensionAsLoaded ($ext_name) { $GLOBALS['ext_loaded']['ext_name'][$ext_name] = true; } -// Determine wether the given extension is already loaded +// Determine whether the given extension is already loaded function isExtensionLoaded ($ext_name) { // Is it there? return ((isset($GLOBALS['ext_loaded']['ext_name'][$ext_name])) && ($GLOBALS['ext_loaded']['ext_name'][$ext_name] === true)); @@ -2001,14 +2048,14 @@ function markExtensionLibraryAsLoaded ($ext_name) { // Is it already loaded? if (isExtensionLibraryLoaded($ext_name)) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Extension library ' . $ext_name . ' is already marked as loaded!'); + reportBug(__FUNCTION__, __LINE__, 'Extension library ' . $ext_name . ' is already marked as loaded!'); } // END - if // Mark it $GLOBALS['ext_loaded']['library'][$ext_name] = true; } -// Determine wether the given extension's library is already loaded +// Determine whether the given extension's library is already loaded function isExtensionLibraryLoaded ($ext_name) { // Is it there? return ((isset($GLOBALS['ext_loaded']['library'][$ext_name])) && ($GLOBALS['ext_loaded']['library'][$ext_name] === true)); diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 965a1ed5e2..6626f11285 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ switch (getExtensionMode()) { // SQL commands to run // Register module - //addModuleSql('foo','Y','Y','N','N'); + //addModuleSql('foo', '{OPEN_TEMPLATE}MODULE_FOO_TITLE{CLOSE_TEMPLATE}','Y','Y','N','N'); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 4845b2fcfc..6fda7310df 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -58,7 +58,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_active'"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -121,7 +121,7 @@ switch (getExtensionMode()) { addExtensionDependency('online'); // Register filter - registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für den "Wer ist Online" Block hinzugefügt und ist von online abhängig."); diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index e07e75766d..762ad1eb39 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -65,10 +65,10 @@ switch (getExtensionMode()) { addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`"); // Remove filters - unregisterFilter(__FUNCTION__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -295,7 +295,7 @@ INDEX (`admin_id`)", addExtensionDependency('sql_patches'); // Add filters - registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -321,8 +321,8 @@ INDEX (`admin_id`)", case '0.7.4': // SQL queries for v0.7.4 // Add filter - registerFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, isExtensionDryRun()); - registerFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefuegt."); @@ -330,7 +330,7 @@ INDEX (`admin_id`)", case '0.7.5': // SQL queries for v0.7.5 // Add filter - registerFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Rehashen des Adminpassworts nach erfolgtem Login hinzugefügt."); diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index 1c3034b5d4..90e21cae95 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index 805afa8ec0..3607fe7c8a 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-announcement.php b/inc/extensions/ext-announcement.php index 7747eea3a0..154ccca501 100644 --- a/inc/extensions/ext-announcement.php +++ b/inc/extensions/ext-announcement.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 0dc861c131..46eb8354ac 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -65,6 +65,9 @@ switch (getExtensionMode()) { addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` CHANGE `data_type` `data_type` ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_autopurge','list_autopurge')"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `ap_notified`"); + + // Unregister with points data + unregisterExtensionPointsData('autopurge_add'); break; case 'activate': // Do stuff when admin activates this extension @@ -79,7 +82,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { - case '0.1.0': // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1.0 // Add dependency to 'user' addExtensionDependency('user'); @@ -254,7 +257,8 @@ switch (getExtensionMode()) { break; case '0.4.1': // SQL queries for v0.4.1 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('autopurge_add','points','LOCKED','DIRECT')"); + // Register with points data system + registerExtensionPointsData('autopurge_add', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); diff --git a/inc/extensions/ext-autoreg.php b/inc/extensions/ext-autoreg.php index 48f52ec0af..13c36161b3 100644 --- a/inc/extensions/ext-autoreg.php +++ b/inc/extensions/ext-autoreg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 43dc0757cd..7e9434efda 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 2c61987565..68d1b43952 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.3.2'); +setThisExtensionVersion('0.3.4'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -76,12 +76,22 @@ INDEX (`userid`)", // SQL commands to run addDropTableSql('beg_ips'); addDropTableSql('beg_referals'); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_beg','list_beg','list_beg_referal_urls')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_beg','list_beg','list_beg_referral_urls')"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='beg'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what` IN ('beg','beg2')"); + // Unregister points data + unregisterExtensionPointsData('beg'); + unregisterExtensionPointsData('beg_ref'); + unregisterExtensionPointsData('monthly_beg'); + unregisterExtensionPointsData('monthly_beg_ref'); + // Unregister module addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='beg' LIMIT 1"); + + // Unregister filter + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -282,19 +292,19 @@ INDEX (`userid`)", break; case '0.2.9': // SQL queries for v0.2.9 - addDropTableSql('beg_referals'); - addCreateTableSql('beg_referals', " + addDropTableSql('beg_referrals'); + addCreateTableSql('beg_referrals', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL, `remote_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -`referal_url` TINYTEXT NOT NULL, +`referral_url` TINYTEXT NOT NULL, PRIMARY KEY (`id`), INDEX (`userid`)", 'Recorded referral URLs'); // Add admin menu - addAdminMenuSql('user','list_beg_referal_urls','Bettel-Referrals auflisten','Listet alle Bettellink-Aufrufe inklusive Referral-URL auf.','13'); + addAdminMenuSql('user','list_beg_referral_urls','Bettel-Referrals auflisten','Listet alle Bettellink-Aufrufe inklusive Referral-URL auf.','13'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Loggen der Referral-URLs hinzugefügt."); @@ -302,8 +312,10 @@ INDEX (`userid`)", case '0.3.0': // SQL queries for v0.3.0 addConfigDropSql('beg_mode'); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('beg','points','LOCKED','DIRECT')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('monthly_beg','points','LOCKED','DIRECT')"); + + // Register points data + registerExtensionPointsData('beg' , 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('monthly_beg', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); @@ -330,7 +342,33 @@ INDEX (`userid`)", addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Betteln bei {OPEN_CONFIG}MAIN_TITLE{CLOSE_CONFIG}' WHERE `module`='beg' AND `title`='' LIMIT 1"); // Update notes - setExtensionUpdateNotes("Modul registriert und bei leerem Titel mit einem Standarttitel versehen."); + setExtensionUpdateNotes("Modul registriert und bei leerem Titel mit einem Standardtitel versehen."); + break; + + case '0.3.3': // SQL queries for v0.3.3 + // Register a filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', false, true, isExtensionDryRun()); + + // This depends on ext-register + addExtensionDependency('register'); + + // Update notes + setExtensionUpdateNotes("Filter für Anmeldeformular und Aufrämen der IPs hinzugefügt."); + break; + + case '0.3.4': // SQL queries for v0.3.4 + // Register points data + registerExtensionPointsData('beg_ref' , 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('monthly_beg_ref', 'points', 'LOCKED', 'DIRECT'); + + // SQL queries (renaming) + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_beg_referals` CHANGE `referal_url` `referral_url` TINYTEXT NOT NULL"); + addExtensionSql("RENAME TABLE `{?_MYSQL_PREFIX?}_beg_referals` TO `{?_MYSQL_PREFIX?}_beg_referrals`"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='list_beg_referral_urls` WHERE `what`='list_beg_referal_urls' LIMIT 1"); + + // Update notes + setExtensionUpdateNotes("Verwendungszwecke für Referralgutgschriften registriert."); break; } // END - switch break; @@ -342,18 +380,6 @@ INDEX (`userid`)", break; case 'init': // When extension is initialized - // Remove old entries - $OLD = getBegTimeout(); - if (getBegUseridTimeout() > $OLD) { - $OLD = getBegUseridTimeout(); - } // END - if - SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (UNIX_TIMESTAMP() - `timeout`) >= ' . ($OLD + 60*60) . '', __FILE__, __LINE__); - - // Check for beg rallye is active and send mails out - if ((isBegRallyeEnabled()) && (isBegNewMemberNotifyEnabled())) { - // Include file for sending out mails - addIncludeToPool('notify', 'inc/mails/beg_mails.php'); - } // END - if break; default: // Unknown extension mode diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 15fafc3597..f4bb404bb0 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.3.9'); +setThisExtensionVersion('0.4.1'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.1')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -56,6 +56,9 @@ switch (getExtensionMode()) { // SQL commands to run addDropTableSql('user_birthday'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_birthday' LIMIT 1"); + + // Unregister points data + unregisterExtensionPointsData('birthday_confirm'); break; case 'activate': // Do stuff when admin activates this extension @@ -194,6 +197,14 @@ INDEX (`userid`)", // Update notes (these will be set as task text!) setExtensionUpdateNotes("Dies brauchen wir nicht mehr."); break; + + case '0.4.1': // SQL queries for v0.4.1 + // Register points data + registerExtensionPointsData('birthday_confirm', 'points', 'LOCKED', 'DIRECT'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Eintrag in Tabelle {?_MYSQL_PREFIX?}_points_data hinzugef&uum;gt."); + break; } // END - if break; diff --git a/inc/extensions/ext-bitcoins.php b/inc/extensions/ext-bitcoins.php index e753abe98e..0a32e0262e 100644 --- a/inc/extensions/ext-bitcoins.php +++ b/inc/extensions/ext-bitcoins.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index cf745843ec..c2ff1730f8 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version of this extension -setThisExtensionVersion('0.9.7'); +setThisExtensionVersion('0.9.9'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5', '0.9.6', '0.9.7')); +setExtensionVersionHistory(array('0.0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5', '0.9.6', '0.9.7', '0.9.8', '0.9.9')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -88,10 +88,15 @@ INDEX (`cat_id`)", addDropTableSql('bonus_customer'); addDropTableSql('bonus_turbo'); + // Unregister points data + unregisterExtensionPointsData('monthly_bonus'); + // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -560,7 +565,7 @@ ORDER BY case '0.9.0': // SQL queries for v0.9.0 // Register filter - registerFilter('member_login_check', 'ADD_LOGIN_BONUS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', false, true, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Filter hinzugefügt der den Login-Bonus aktualisiert (bzw. soll) (internes TODO)."); @@ -603,14 +608,15 @@ ORDER BY case '0.9.5': // SQL queries for v0.9.5 // Register filter - registerFilter('generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', false, true, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Filter zum Generieren von Admin-Links für Bonus-Mails hinzugefügt."); break; case '0.9.6': // SQL queries for v0.9.6 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('monthly_bonus','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('monthly_bonus', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); @@ -627,11 +633,30 @@ ORDER BY addConfigChangeSql('bonus_click_yn', 'include_bonus_click', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Register filter - registerFilter('add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Konfigurationseinträge umbenannt."); break; + + case '0.9.8': // SQL queries for v0.9.8 + // Register filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + + // Add dependency to ext-register + addExtensionDependency('register'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten bei der Mitgliederanmeldung."); + break; + + case '0.9.9': // SQL queries for v0.9.9 + // Register filter + registerFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten bei der Mitgliederanmeldung."); + break; } // END - switch break; @@ -642,11 +667,6 @@ ORDER BY break; case 'init': // Do stuff when extension is initialized - // Check for bonus rallye is active and send mails out - if ((isBonusRallyeActive()) && (isBonusNewMemberNotifyEnabled())) { - // Include file for sending out mails - addIncludeToPool('notify', 'inc/mails/bonus_mails.php'); - } // END - if break; default: // Unknown extension mode diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index d77204cdb3..bb4469b12a 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -77,8 +77,8 @@ INDEX (`userid`)", addMemberMenuSql('main', 'booking', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Kontoauszug', 5); // Add the filters - registerFilter('post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); - registerFilter('post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -87,8 +87,8 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'"); // Remove the filters - unregisterFilter(__FUNCTION__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 566c1879a1..35010eed7a 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,15 +60,15 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('cache_stats','config_config')"); // Unregister all filters - unregisterFilter(__FUNCTION__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -193,14 +193,14 @@ switch (getExtensionMode()) { case '0.2.1': // SQL queries for v0.2.1 // Register the new filter - registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter('post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Erweiterungsmanagement hinzugefügt."); @@ -218,7 +218,7 @@ switch (getExtensionMode()) { setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); // Register a new filter - registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', false, true, isExtensionDryRun()); break; case '0.2.4': // SQL queries for v0.2.4 diff --git a/inc/extensions/ext-clickbanner.php b/inc/extensions/ext-clickbanner.php index f2275b856b..3e21291bcd 100644 --- a/inc/extensions/ext-clickbanner.php +++ b/inc/extensions/ext-clickbanner.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 1f3466aa97..46fceed039 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.0.4'); +setThisExtensionVersion('0.0.5'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -77,6 +77,9 @@ UNIQUE (`code`)", // SQL commands to run addDropTableSql('countries'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='country'"); + + // Unregister filter + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -90,8 +93,7 @@ UNIQUE (`code`)", break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) - { + switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) setExtensionUpdateNotes("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"); @@ -111,7 +113,18 @@ UNIQUE (`code`)", // Update notes (these will be set as task text!) setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; - } + + case '0.0.5': // SQL queries for v0.0.5 + // Register a filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + + // This depends on ext-register + addExtensionDependency('register'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Mitgliederanmeldeformular hinzugefügt."); + break; + } // END - switch break; case 'modify': // When the extension got modified @@ -126,7 +139,7 @@ UNIQUE (`code`)", default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch -// +// [EOF] ?> diff --git a/inc/extensions/ext-coupon.php b/inc/extensions/ext-coupon.php index 84ee50137c..4a90ed7920 100644 --- a/inc/extensions/ext-coupon.php +++ b/inc/extensions/ext-coupon.php @@ -18,7 +18,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -102,7 +102,7 @@ UNIQUE (`coupon_code`)", addMemberMenuSql('coupon', 'list_coupon', 'Eingelöste auflisten', 2); // Add filter (for changing user_points column dynamically - registerFilter('determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -112,9 +112,12 @@ UNIQUE (`coupon_code`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='coupon' LIMIT 4"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='coupon' LIMIT 3"); + // Remove points data + unregisterExtensionPointsData('coupon_cashed'); + // Remove all filters - unregisterFilter(__FUNCTION__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -139,7 +142,7 @@ UNIQUE (`coupon_code`)", addExtensionDependency('order'); // Insert data in new table - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('coupon_cashed','order_points','LOCKED','DIRECT')"); + registerExtensionPointsData('coupon_cashed', 'order_points', 'LOCKED', 'DIRECT'); // Update notes (these will be set as task text!) setExtensionUpdateNotes(''); @@ -154,7 +157,7 @@ UNIQUE (`coupon_code`)", break; case '0.0.3': // SQL queries for v0.0.3 - registerFilter('post_cash_coupon', 'POST_CASH_COUPON', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes('Filter zum Post- und Pre-Filter hinzugefügt.'); diff --git a/inc/extensions/ext-cprping.php b/inc/extensions/ext-cprping.php index 965a1ed5e2..6d42efc5ed 100644 --- a/inc/extensions/ext-cprping.php +++ b/inc/extensions/ext-cprping.php @@ -4,11 +4,11 @@ * =================== Last change: 09/25/2004 * * * * -------------------------------------------------------------------- * - * File : ext- * + * File : ext-cprping.php * * -------------------------------------------------------------------- * - * Short description : * + * Short description : Check against CPR anti-spam database * * -------------------------------------------------------------------- * - * Kurzbeschreibung : * + * Kurzbeschreibung : Pruefung gegen CPR-Antispam-Datenbank * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ switch (getExtensionMode()) { // SQL commands to run // Register module - //addModuleSql('foo','Y','Y','N','N'); + //addModuleSql('foo', '{OPEN_TEMPLATE}MODULE_CPRPING_TITLE{CLOSE_TEMPLATE}','Y','Y','N','N'); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-currency.php b/inc/extensions/ext-currency.php new file mode 100644 index 0000000000..f79d750a1c --- /dev/null +++ b/inc/extensions/ext-currency.php @@ -0,0 +1,100 @@ + diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index d535db08fa..48b19796fd 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index f68a40dccf..c24c9e66d0 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 09444fce93..c53fd4ff3a 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -120,6 +120,10 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='doubler'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='doubler' LIMIT 1"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='doubler' LIMIT 1"); + + // Unregister points data + unregisterExtensionPointsData('doubler_direct'); + unregisterExtensionPointsData('doubler_reset'); break; case 'activate': // Do stuff when admin activates this extension @@ -239,8 +243,9 @@ INDEX (`userid`)", break; case '0.1.8': // SQL queries for v0.1.8 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('doubler_direct','points','LOCKED','DIRECT')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('doubler_reset','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('doubler_direct', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('doubler_reset' , 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); diff --git a/inc/extensions/ext-earning.php b/inc/extensions/ext-earning.php index 43f9924f36..290811d8fb 100644 --- a/inc/extensions/ext-earning.php +++ b/inc/extensions/ext-earning.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -86,7 +86,7 @@ INDEX (`earning_userid`)", 'User->Earning connections'); // Register filter - registerFilter('member_footer_extras', 'ADD_EARNING_GROUP_POPUP', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -99,7 +99,7 @@ INDEX (`earning_userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_earning' LIMIT 1"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index b83a6b27f8..0e6559b729 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-forced.php b/inc/extensions/ext-forced.php index 8b0c25c241..2d4677f319 100644 --- a/inc/extensions/ext-forced.php +++ b/inc/extensions/ext-forced.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -110,6 +110,7 @@ PRIMARY KEY (`forced_costs_id`)", `forced_stats_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `forced_stats_campaign_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL, `forced_stats_userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL, +`forced_stats_token` VARCHAR(255) NULL DEFAULT NULL, `forced_stats_viewed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `forced_stats_clicked` TIMESTAMP NULL DEFAULT NULL, `forced_stats_real_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', @@ -127,7 +128,7 @@ INDEX (`forced_stats_userid`)", addAdminMenuSql('forced', NULL, 'Forced-Ads', 'Verwalten Sie hier bequem alle laufenden Forced-Banner, -Textlinks, -PopUps und deren Kampgnen. Sie können hier auch neue Werbmittel (Ads) hinzufügen oder laufende Forced-Kampagnen bei z.B. Regelverstössen sperren oder löschen. Auch das naträgliche Editieren von Ads und Kampagnen ist jederzeit möglich. Kampagnen dienen der einfacheren Verwaltung und der Trennung von dem Werbemittel selbst dienen. Sie brauchen also z.B. einen Forced-Banner nur einmal einfügen und können dann bei Bedarf weitere Kampagnen starten.', 5); addAdminMenuSql('forced', 'list_forced_ads', 'Forced-Ads verwalten', 'Listet alle eingetragenen Forced-Ads (Werbmittel mit Klickzwang) auf und fügt neue hinzu. Sie können hier diese nachträglich editieren falls Sie mal eine falsche URL eingegeben haben oder den Text ändern wollen. Löschen Sie hier auch Forced-Banner, die nicht mehr gültig sind (z.B. abgelaufen sind). Sollten doch mit dem Werbmittel verknüpfte Kampagnen vorhanden sein, erhalten Sie einen Warnhinweis. Neue Werbmittel können Sie hier ebenfalls hinzufügen. Denken Sie aber daran, dass ohne Kampagne dieses nicht angezeigt wird. Achten Sie hier auch die Reload-Sperre.', 2); addAdminMenuSql('forced', 'list_forced_campaigns', 'Kampagnen verwalten', 'Listet alle Kampagnen auf und zeigt deren Status an. Jederzeit können Sie Kampagnen stoppen, falls Sie dies wünschen oder ein Regelverstoss vorliegt. Haben Sie ein Werbemittel hinzugefügt, so fügen Sie bitte unbedingt eine Kampagne hinzu, da es sonst nicht angezeigt wird.', 3); - addAdminMenuSql('forced', 'list_forced_costs', 'Kosten verwalten', 'Legen Sie die Preise pro Klick für Forced-Werbemittelbuchungen fest und wie viele {OPEN_CONFIG}POINTS{CLOSE_CONFIG} Ihre Mitglieder erhalten sollen. Generell sollten Sie bei Mitgliederbuchungen höhere Kosten pro Klick als was Ihre Mitglieder pro Klick erhalten einstellen, da so die {OPEN_CONFIG}POINTS{CLOSE_CONFIG} abgebaut werden (Sie können an Accountaufladungen z.B. verdienen).', 4); + addAdminMenuSql('forced', 'list_forced_costs', 'Preise verwalten', 'Legen Sie die Preise pro Klick für Forced-Werbemittelbuchungen fest und wie viele {OPEN_CONFIG}POINTS{CLOSE_CONFIG} Ihre Mitglieder erhalten sollen. Generell sollten Sie bei Mitgliederbuchungen höhere Kosten pro Klick als was Ihre Mitglieder pro Klick erhalten einstellen, da so die {OPEN_CONFIG}POINTS{CLOSE_CONFIG} abgebaut werden (Sie können an Accountaufladungen z.B. verdienen).', 4); addAdminMenuSql('forced', 'stats_forced', 'Statistiken', 'Zeigt Gesamtstatistiken und zu den einzelnen Kampagnen und Werbmitteln an. Die hier angezeigte Statistik kann jedoch nicht manuell gelöscht werden (bitte auch nicht selber tun) da sie auch gleichzeitigt als Reload-Sperre dient.', 5); // - Members @@ -139,8 +140,10 @@ INDEX (`forced_stats_userid`)", addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_earning_data` (`earning_group`,`earning_provider`,`earning_sorting`) VALUES ('POPUP','FORCED_POPUP',1)"); // Register filters - registerFilter('add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', false, true, isExtensionDryRun()); - registerFilter('member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -161,8 +164,10 @@ INDEX (`forced_stats_userid`)", } // END - if // Remove filter - unregisterFilter(__FUNCTION__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-geoip.php b/inc/extensions/ext-geoip.php index d79cd93946..75cfe18b9c 100644 --- a/inc/extensions/ext-geoip.php +++ b/inc/extensions/ext-geoip.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-grade.php b/inc/extensions/ext-grade.php index 5a0db2e8cc..cedea5eb66 100644 --- a/inc/extensions/ext-grade.php +++ b/inc/extensions/ext-grade.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index ae6787f9ab..2a16ce2957 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index e162861124..583a0664b6 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -153,8 +153,8 @@ switch (getExtensionMode()) { // $GLOBALS['url_ends'] = array( ' ', - "\n", - "\r", + chr(10), + chr(13), ')', ); diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index dc936919dc..a976b8da92 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-jackpot.php b/inc/extensions/ext-jackpot.php index 1a1363de86..74beef759f 100644 --- a/inc/extensions/ext-jackpot.php +++ b/inc/extensions/ext-jackpot.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-lead.php b/inc/extensions/ext-lead.php index 7f5e846f37..ad2186adee 100644 --- a/inc/extensions/ext-lead.php +++ b/inc/extensions/ext-lead.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index bd63a57573..5506d42e6d 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index 3229fc02fc..33387e6463 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,13 +48,16 @@ setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running + // This extension requires ext-other + addExtensionDependency('other'); + // SQL commands to run addExtensionSql(''); break; case 'remove': // Do stuff when removing extension - // SQL commands to run - addExtensionSql(''); + // Unregister points data + unregisterExtensionPointsData('mailid_payback'); break; case 'activate': // Do stuff when admin activates this extension @@ -233,8 +236,8 @@ switch (getExtensionMode()) { // This update depends on latest sql_patches version addExtensionDependency('sql_patches'); - // Insert data in points_data - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('mailid_payback','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('mailid_payback', 'points', 'LOCKED', 'DIRECT'); break; } // END - switch break; diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index fad5805484..ad980256d1 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index e401d0fce6..6c7cbd8405 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -55,8 +55,8 @@ switch (getExtensionMode()) { addExtensionSql(''); // Add the filters - registerFilter('post_add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); - registerFilter('post_sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -66,8 +66,8 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'"); // Remove the filters - unregisterFilter(__FUNCTION__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-menu.php b/inc/extensions/ext-menu.php index 4f6092ac7a..0df517f061 100644 --- a/inc/extensions/ext-menu.php +++ b/inc/extensions/ext-menu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-mods.php b/inc/extensions/ext-mods.php index c2b1902a92..6808540e8b 100644 --- a/inc/extensions/ext-mods.php +++ b/inc/extensions/ext-mods.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php index dc9434e2fa..77df87b892 100644 --- a/inc/extensions/ext-mydata.php +++ b/inc/extensions/ext-mydata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 20a82f834e..0b1a6709a3 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -42,7 +42,7 @@ * @TODO Yoo!Media: What is LayerAd compared to Layer click? * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index baec7dff59..ed44424958 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -218,8 +218,8 @@ INDEX `topic` (`nl_topic_id`)", // @TODO Move these into configuration $GLOBALS['url_ends'] = array( ' ', - "\n", - "\r", + chr(10), + chr(13), ')', ); diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index 3f005580c8..ed9a18f8c4 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -180,7 +180,7 @@ switch (getExtensionMode()) { case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Ungütiges Update (wegen Verallgemeinerung der nickname_history-Tabelle."); + setExtensionUpdateNotes("Ungültiges Update (wegen Verallgemeinerung der nickname_history-Tabelle."); break; case '0.2.1': // SQL queries for v0.2.1 diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index e04c025e6e..daf560c0d6 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,7 +48,7 @@ setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running - // SQL commands to run + // "Who-is-where" table addDropTableSql('online'); addCreateTableSql('online', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -67,6 +67,8 @@ INDEX (`userid`), INDEX (`refid`), INDEX `admin_member` (`is_admin`,`is_member`)", 'Who-is-where data'); + + // Admin menu addAdminMenuSql('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1); break; @@ -77,7 +79,7 @@ INDEX `admin_member` (`is_admin`,`is_member`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='online'"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -117,7 +119,7 @@ INDEX `admin_member` (`is_admin`,`is_member`)", addGuestMenuSql('online', NULL, 'Jetzt Online', 2); // Register filter - registerFilter('init', 'UPDATE_ONLINE_LIST', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index 3028ee11e9..5a6e9be3bd 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 8734affb94..4767e28d28 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.3'); +setThisExtensionVersion('0.5.6'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -59,8 +59,12 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='order'"); // Remove these filters - unregisterFilter(__FUNCTION__, __LINE__, 'get_total_points', 'ORDER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'get_own_points', 'ORDER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -338,11 +342,38 @@ INDEX (`pool_id`)", addExtensionDependency('user'); // Register filters for gathering points - registerFilter(__FUNCTION__, __LINE__, 'get_total_points', 'ORDER_POINTS', true, isExtensionDryRun()); - registerFilter(__FUNCTION__, __LINE__, 'get_own_points', 'ORDER_POINTS', true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Weiteres {?POINTS?}-Guthabenkonto "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt."); + setExtensionUpdateNotes("Weiteres Verwendungszwecke "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt."); + break; + + case '0.5.4': // SQL queries for v0.5.4 + // Register filter for handling locked points + registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', false, true, isExtensionDryRun()); + + // Register filter for all column names + registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); + break; + + case '0.5.5': // SQL queries for v0.5.5 + // Register filter + registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); + break; + + case '0.5.6': // SQL queries for v0.5.6 + // Register filter + registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für Spaltenname des gesperrten Werbeguthabens hinzugefügt."); break; } // END - switch break; diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 2f2ae89b22..83a90646a0 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.2.7'); +setThisExtensionVersion('0.2.8'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -60,7 +60,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -179,7 +179,7 @@ switch (getExtensionMode()) { break; case '0.1.9': // SQL queries for v0.1.9 - addConfigAddSql('mailid_error_redirect', "ENUM('index','reject') NOT NULL DEFAULT 'index'"); + addConfigAddSql('mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); @@ -215,7 +215,7 @@ switch (getExtensionMode()) { case '0.2.4': // SQL queries for v0.2.4 // Register filter - registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgeführten SQL-Anweisungen hinzugefügt."); @@ -241,6 +241,13 @@ switch (getExtensionMode()) { // Update notes (these will be set as task text!) setExtensionUpdateNotes("Der Suffix _enabled in Konfigurationseinträgen ist deprecated und sollte nicht mehr verwendet werden. Da sonst Wrapper-Funktionsnamen wie z.B. isStatsEnabledEnabled() nach streng genommender Namenskonvention entstehen."); break; + + case '0.2.8': // SQL queries for v0.2.8 + addConfigChangeSql('mailid_error_redirect', 'mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("mailid_error_redirect bzw. alle ENUMs haben gross geschriebene Werte."); + break; } // END - switch break; diff --git a/inc/extensions/ext-partner.php b/inc/extensions/ext-partner.php index 605126b73b..d7d2e68ba0 100644 --- a/inc/extensions/ext-partner.php +++ b/inc/extensions/ext-partner.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 20cffee9d0..421771e65f 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php index 3001ff05e6..e57adebec8 100644 --- a/inc/extensions/ext-politician-stop.php +++ b/inc/extensions/ext-politician-stop.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -53,12 +53,12 @@ switch (getExtensionMode()) { addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); // Register filter - registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 5db7d70aba..5f81ad2c3e 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 88ae83bb67..f4047fd9a4 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -113,8 +113,11 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='rallyes' LIMIT 1"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='rallyes' LIMIT 1"); + // Remove points_data entry + unregisterExtensionPointsData('rallye_winner'); + // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -312,14 +315,15 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu addExtensionDependency('sql_patches'); // Register filter - registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); break; case '0.3.6': // SQL queries for v0.3.6 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('rallye_winner','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('rallye_winner', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); @@ -353,7 +357,12 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu // Check for new started but not notified rallyes $result = SQL_QUERY("SELECT SQL_SMALL_RESULT - `id`,`title`,`start_time`,`end_time`,`send_notify`" . $ADD1 . " + `id`, + `title`, + `start_time`, + `end_time`, + `send_notify` + " . $ADD1 . " FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE @@ -389,7 +398,7 @@ WHERE LIMIT 1", __FILE__, __LINE__); if ((SQL_NUMROWS($result) == 1) && (isExtensionActive('autopurge'))) { // End rallye here... - markReferralRallyesAsExpired($result); + stopRallyeByResult($result); } // END - if // Free memory diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index 0e6a98a781..adbaa02b93 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -59,6 +59,9 @@ switch (getExtensionMode()) { // SQL commands to run addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='refback'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_refback','list_refback')"); + + // Unregister points data + unregisterExtensionPointsData('refback'); break; case 'activate': // Do stuff when admin activates this extension @@ -86,11 +89,12 @@ switch (getExtensionMode()) { case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Ungütiges Update seit Revision 246x."); + setExtensionUpdateNotes("Ungültiges Update seit Revision 246x."); break; case '0.0.3': // SQL queries for v0.0.3 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('refback','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('refback', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); diff --git a/inc/extensions/ext-refsell.php b/inc/extensions/ext-refsell.php index ca90175333..1addee44ef 100644 --- a/inc/extensions/ext-refsell.php +++ b/inc/extensions/ext-refsell.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index e7e3b5aecc..4919f4e067 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.6'); +setThisExtensionVersion('0.5.7'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -58,8 +58,14 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='register' LIMIT 1"); addDropTableSql('must_register'); - // Unregister a filter - unregisterFilter(__FUNCTION__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', true, isExtensionDryRun()); + // Unregister points data + unregisterExtensionPointsData('register_welcome'); + unregisterExtensionPointsData('referral_bonus'); + unregisterExtensionPointsData('referral_bonus_ref'); + + // Unregister filter + unregisterFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -74,7 +80,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { - case '0.1.0': // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1.0 addDropTableSql('must_register'); addCreateTableSql('must_register', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -84,12 +90,12 @@ PRIMARY KEY (`id`)", 'Data which fields the user must fill out'); // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!) - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('surname','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('family','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('street_nr','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('cntry','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('zip','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('city','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('surname', 'Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('family', 'Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('street_nr', 'Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('cntry', 'Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('zip', 'Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('city', 'Y')"); // Add admin menu addAdminMenuSql('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter Profildaten ändern ein.', 12); @@ -318,7 +324,7 @@ PRIMARY KEY (`id`)", case '0.5.3': // SQL queries for v0.5.3 // Register a filter - registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, isExtensionDryRun()); // Run these SQLs addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`,`field_required`) VALUES ('gender','Y')"); @@ -345,7 +351,8 @@ PRIMARY KEY (`id`)", break; case '0.5.6': // SQL queries for v0.5.6 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('register_welcome','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('register_welcome', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); @@ -353,6 +360,18 @@ PRIMARY KEY (`id`)", // Update notes setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); break; + + case '0.5.7': // SQL queries for v0.5.7 + // Register a filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', false, true, isExtensionDryRun()); + + // Register points data + registerExtensionPointsData('referral_bonus', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('referral_bonus_ref', 'points', 'LOCKED', 'DIRECT'); + + // Update notes + setExtensionUpdateNotes("Anmeldeformular komplett auf drei Filter umgestrickt (mehr dazu siehe Wiki) und weitere Verwendungszwecke registriert."); + break; } // END - switch break; diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index aa0e632643..01d29159df 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -66,7 +66,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip' LIMIT 1"); // Remove filters - unregisterFilter(__FUNCTION__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -84,7 +84,7 @@ switch (getExtensionMode()) { addExtensionDependency('sql_patches'); // Add filters - registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index 309776aca2..996391f8ef 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { setThisExtensionVersion('0.1.8'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.8')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -91,7 +91,7 @@ switch (getExtensionMode()) { case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Ungütiges Update nach neuster Konvention (Erweiterung menu ist ungültig)."); + setExtensionUpdateNotes("Ungültiges Update nach neuster Konvention (Erweiterung menu ist ungültig)."); break; case '0.1.4': // SQL queries for v0.1.4 diff --git a/inc/extensions/ext-report.php b/inc/extensions/ext-report.php index df3b47ae54..a835dc0b5f 100644 --- a/inc/extensions/ext-report.php +++ b/inc/extensions/ext-report.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index 341cc122cc..b783e4cf9e 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index 799fdde0fa..057f758564 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-seo.php b/inc/extensions/ext-seo.php index c699a0604a..cc70660e54 100644 --- a/inc/extensions/ext-seo.php +++ b/inc/extensions/ext-seo.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index bf9948b823..2a4d15c8db 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,9 +51,6 @@ enableExtensionProductive(false); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running - // - // SQL commands to run - // // Try to make it depend on repair addExtensionDependency('repair'); @@ -302,7 +299,7 @@ INDEX (`sponsor_id`)", // Add default entries // addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_registry` (`ext_name`,`is_active`,`admin_id`,`stamp_added`) VALUES ('sponsor','N',".getCurrentAdminId().",NOW())"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (`ext_name`,`conv_rate`,`conv_name`) VALUES ('sponsor','10','Mails')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_action_convert` (`ext_name`,`conv_rate`,`conv_name`) VALUES ('sponsor',10,'Mails')"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Standard-Paket', 5, 1000.00000, '€')"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Spar-Paket', 1, 200.00000, '€')"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`,`pay_min_count`,`pay_rate`,`pay_currency`) VALUES ('Power-Paket', 10, 2000.00000, '€')"); @@ -375,14 +372,9 @@ INDEX (`sponsor_id`)", // // Register module // - addModuleSql('sponsor', 'Y', 'Y', 'N', 'N'); - addModuleSql('sponsor_confirm', 'Y', 'Y', 'N', 'N'); - addModuleSql('sponsor_ref', 'Y', 'Y', 'N', 'N'); - - // Update name, if not yet set - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsorbereich' WHERE `module`='sponsor' AND `title`='' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsor-Bestätigung' WHERE `module`='sponsor_confirm' AND `title`='' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='Sponsor-Referrallink' WHERE `module`='sponsor_ref' AND `title`='' LIMIT 1"); + addModuleSql('sponsor', '{OPEN_TEMPLATE}MODULE_SPONSOR_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N'); + addModuleSql('sponsor_confirm', '{OPEN_TEMPLATE}MODULE_SPONSOR_CONFIRM_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N'); + addModuleSql('sponsor_ref', '{OPEN_TEMPLATE}MODULE_SPONSOR_REF_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N'); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index b51faa1b57..574302f55f 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.8.7'); +setThisExtensionVersion('0.9.0'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -95,9 +95,18 @@ IN ( `action`='rals' OR `action`='account'"); + // Remove points data + unregisterExtensionPointsData('pool_payback'); + unregisterExtensionPointsData('mail_deleted'); + unregisterExtensionPointsData('admin_add_single'); + unregisterExtensionPointsData('admin_add_single_ref'); + unregisterExtensionPointsData('admin_add_all'); + unregisterExtensionPointsData('admin_add_all_ref'); + // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -149,7 +158,7 @@ IN ( break; case '0.0.6': // SQL queries for v0.0.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD `ext_has_css` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD `ext_has_css` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden."); @@ -281,8 +290,8 @@ IN ( $auto_type = 'png'; // Is the JPEG file found and required PHP function there? - if ((isFileReadable(getPath() . 'theme/' . getCurrentTheme() . '/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) { - // Switch to JPEG format + if ((!isFileReadable(getPath() . 'theme/' . getCurrentTheme() . '/images/code_bg.png')) || (!function_exists('imagecreatefrompng'))) { + // Switch to JPEG format because PNG is not available $auto_type = 'jpg'; } // END - if addConfigAddSql('img_type', "ENUM('jpg','png') NOT NULL DEFAULT '" . $auto_type . "'"); @@ -498,7 +507,7 @@ INDEX (`admin_id`)", addConfigAddSql('proxy_port', 'INT(5) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('proxy_username', "VARCHAR(255) NOT NULL DEFAULT ''"); addConfigAddSql('proxy_password', "VARCHAR(255) NOT NULL DEFAULT ''"); - addAdminMenuSql('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie Ihren {?mt_word?} so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15); + addAdminMenuSql('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie Ihren {?mt_word?} so konfigurieren, dass es z.B. Updates, Abfragen von Netzwerkupdates über diesen tätigt.', 15); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Proxy-Einstellungen hinzugefügt."); @@ -708,7 +717,7 @@ UNIQUE INDEX `name_function` (`filter_name`,`filter_function`)", case '0.6.9': // SQL queries for 0.6.9 // Register filter - registerFilter('member_login_check', 'RESET_USER_LOGIN_FAILURE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Zurücksetzens des fehlgeschlagenen Mitgliederlogins hinzugefügt (internes TODO)."); @@ -729,7 +738,7 @@ INDEX (`ip`)", addConfigAddSql('dns_cache_timeout', 'BIGINT(20) NOT NULL DEFAULT ' . (60*60*24)); // Register filter - registerFilter('reset', 'CLEANUP_DNS_CACHE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'reset', 'CLEANUP_DNS_CACHE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("IP-Resolver-Klasse hinzugefügt, um bei der Erweiterung ext-network DNS-Anfragen einzusparen."); @@ -810,7 +819,7 @@ INDEX (`ip`)", `payment_method` ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL', `notify_recipient` ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`id`), -INDEX (`subject`)", +UNIQUE KEY (`subject`)", 'Points account data'); // Admin menu @@ -833,8 +842,12 @@ INDEX (`subject`)", addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` CHANGE `ext_name` `subject` VARCHAR(255) NOT NULL DEFAULT ''"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` ADD INDEX `subject` (`subject`)"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` ADD `notify_recipient` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('pool_payback','points','LOCKED','DIRECT')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('mail_deleted','points','LOCKED','DIRECT')"); + + // Register points data + registerExtensionPointsData('pool_payback', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('mail_deleted', 'points', 'LOCKED', 'DIRECT'); + + // Remove deprecated configuration entry addConfigDropSql('reg_points_mode'); // Update notes (these will be set as task text!) @@ -862,7 +875,7 @@ INDEX (`history_last_used` DESC)", 'History of used data'); // Register filter - registerFilter('add_history_entry', 'ADD_HISTORY_ENTRY', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Allgemeine Historie-Tabelle hinzugefügt."); @@ -878,7 +891,7 @@ INDEX (`history_last_used` DESC)", case '0.8.6': // SQL queries for v0.8.6 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` CHANGE `payment_method` `payment_method` ENUM('DIRECT','REFERRAL') NOT NULL DEFAULT 'REFERRAL'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_points_data` SET `payment_method`='REFERRAL' WHERE `payment_method`='REFERAL'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_points_data` SET `payment_method`='REFERRAL' WHERE `payment_method` != 'DIRECT'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Referral, REFERRAL soll es überall heissen (ist ein Typo nur mit einem R zu schreiben)."); @@ -888,7 +901,36 @@ INDEX (`history_last_used` DESC)", addConfigAddSql('admin_menu_javascript', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Es kann ausgewählt werden, ob das herkömliche JavaScrit-lose Menü oder mit JavaScript aktiv sein soll. Das herkömliche ist erstmal Standarteinstellung, bis das JavaScript-Menü funktioniert."); + setExtensionUpdateNotes("Es kann ausgewählt werden, ob das herkömliche JavaScrit-lose Menü oder mit JavaScript aktiv sein soll. Das herkömliche ist erstmal Standardeinstellung, bis das JavaScript-Menü funktioniert."); + break; + + case '0.8.8': // SQL queries for v0.8.8 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` DROP INDEX `subject`, ADD UNIQUE `subject` (`subject`)"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Der Wert in der Spalte subject sollte nur einmal vorkommen, damit eventuell nichts mehrfach durchfl&auuml;ft."); + break; + + case '0.8.9': // SQL queries for v0.8.9 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_points_data` ADD `account_provider` ENUM('EXTENSION', 'CUSTOM') NOT NULL DEFAULT 'EXTENSION'"); + addConfigAddSql('points_remove_account', "VARCHAR(255) NOT NULL DEFAULT 'points'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes(""Provider" hinzugefügt, welcher nur Erweiterung oder Selbstdefiniert sein kann. Es können dann auch nur selbstdefinierte gelöscht oder editiert werden, Erweiterungen können auch nur "einige" Einträge löschen."); + break; + + case '0.9.0': // SQL queries for v0.9.0 + // Register filter + registerFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', false, true, isExtensionDryRun()); + + // Register points data + registerExtensionPointsData('admin_add_single', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('admin_add_single_ref', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('admin_add_all', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('admin_add_all_ref', 'points', 'LOCKED', 'DIRECT'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Initialisieren von ext-sql_patches registriert und Einträge in {?_MYSQL_PREFIX?}_points_data hinzugefügt."); break; } // END - switch break; @@ -909,26 +951,31 @@ INDEX (`history_last_used` DESC)", // Init key setConfigEntry('secret_key', ''); - // Read key from secret file - if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((getFileHash() == '') || (getMasterSalt() == '') || (getPassScramble() == ''))) { - // Maybe need setup of secret key! - loadIncludeOnce('inc/gen_sql_patches.php'); - } // END - if - - // Test again - if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) { - // File hash fas generated so we can also file the secret file... hopefully. - $hashFile = sprintf("%s%s.%s.cache", getPath(), getCachePath(), getFileHash()); - if (isFileReadable($hashFile)) { - // Read file - setConfigEntry('secret_key', readFromFile($hashFile)); - } else { - // Remove it from database - updateConfiguration('file_hash', ''); - - // Cannot read secret file! - debug_report_bug(__FILE__, __LINE__, 'Cannot read secret file! Please try to reload.'); - } + // Is the version recent enought for secret keys? + if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { + // Read key from secret file + if ((getFileHash() == '') || (getMasterSalt() == '') || (getPassScramble() == '')) { + // Maybe need setup of secret key! + loadIncludeOnce('inc/gen_sql_patches.php'); + } // END - if + + // Test again + if ((getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) { + // File hash fas generated so we can also file the secret file... hopefully. + $hashFile = sprintf("%s%s.%s.cache", getPath(), getCachePath(), getFileHash()); + + // Is the secret key file readable? + if (isFileReadable($hashFile)) { + // Read file + setConfigEntry('secret_key', readFromFile($hashFile)); + } else { + // Remove it from database + updateConfiguration('file_hash', ''); + + // Cannot read secret file! + reportBug(__FILE__, __LINE__, 'Cannot read secret file! Please try to reload.'); + } + } // END - if } // END - if break; diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index 0265d8ee16..c3a71ed3de 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 60ad16778a..d8f605d05f 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -154,7 +154,7 @@ UNIQUE INDEX `status_action` (`actions_status`,`actions_action`)", addConfigAddSql('surfbar_dynamic_percent', 'FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000'); addConfigAddSql('surfbar_max_order', 'INT(7) UNSIGNED NOT NULL DEFAULT 10'); addConfigAddSql('surfbar_restart_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 6)); - addConfigAddSql('surfbar_autostart', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_auto_start', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('surfbar_migrate_urls', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('surfbar_total_counter', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('surfbar_daily_counter', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); @@ -191,20 +191,20 @@ UNIQUE INDEX `status_action` (`actions_status`,`actions_action`)", addAdminMenuSql('surfbar', 'unlock_surfbar_urls', 'Wartende URLs freigeben', 'Geben Sie hier für den Besuchertausch gebuchte URLs frei.', 3); addAdminMenuSql('surfbar', 'config_surfbar', 'Einstellungen', 'Einstellungen am Besuchertausch ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.', 4); addAdminMenuSql('surfbar', 'surfbar_stats', 'Statistiken', 'Detailierte Statistiken zu einer ausgewählten URL anzeigen.', 5); - addAdminMenuSql('surfbar', 'list_surfbar_actions', 'Mitgliederaktionen', 'Listet alle Mitgliederaktionen auf.', 6); + addAdminMenuSql('surfbar', 'list_surfbar_actions', 'Mitglieder-Aktionen', 'Listet alle Mitglieder-Aktionen auf.', 6); // Register module - addModuleSql('surfbar', 'Y', 'Y', 'N', 'N'); + addModuleSql('surfbar', '{OPEN_TEMPLATE}MODULE_SURFBAR_TITLE{CLOSE_TEMPLATE}', 'Y', 'Y', 'N', 'N'); // Insert data for points accounts - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('monthly_bonus','points','LOCKED','DIRECT')"); + registerExtensionPointsData('monthly_surfbar', 'points', 'LOCKED', 'DIRECT'); // This extension depends on ext-sql_patches addExtensionDependency('sql_patches'); // Register filters - registerFilter('post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', false, true, isExtensionDryRun()); - registerFilter('pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -220,9 +220,12 @@ UNIQUE INDEX `status_action` (`actions_status`,`actions_action`)", // Unregister module addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='surfbar' LIMIT 1"); + // Unregister points data + unregisterExtensionPointsData('monthly_surfbar'); + // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index aab3190c14..486eb0423b 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-teams.php b/inc/extensions/ext-teams.php index 8ad3a93d01..57c7433f86 100644 --- a/inc/extensions/ext-teams.php +++ b/inc/extensions/ext-teams.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-terms.php b/inc/extensions/ext-terms.php index 638a45dbf6..a05a889031 100644 --- a/inc/extensions/ext-terms.php +++ b/inc/extensions/ext-terms.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index a6ac8f8655..d8ead4b10e 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.1.2'); +setThisExtensionVersion('0.1.3'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -65,8 +65,9 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='themes' OR `what`='themes'"); // Unregister filters - unregisterFilter(__FUNCTION__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'member_login_check', 'SET_USERS_THEME', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -162,7 +163,7 @@ INDEX (`theme_active`)", 'Themes'); case '0.1.0': // SQL queries for v0.1.0 // Register filter - registerFilter('init', 'HANDLE_THEME_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ändern des Designs nun im Filter (internes TODO)."); @@ -170,7 +171,7 @@ INDEX (`theme_active`)", 'Themes'); case '0.1.1': // SQL queries for v0.1.1 // Register filter - registerFilter('member_login_check', 'SET_USERS_THEME', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Setzen des Mitgliedes' eigener Design-Auswahl per Filter (internes TODO)."); @@ -183,6 +184,17 @@ INDEX (`theme_active`)", 'Themes'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Nicht mehr benötigtes Menü zum Prüfen von Theme-Versionen entfernt."); break; + + case '0.1.3': // SQL queries for v0.1.3 + // Register filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + + // This depends on ext-register + addExtensionDependency('register'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für Mitgliederanmeldung hinzugefügt."); + break; } // END - switch break; diff --git a/inc/extensions/ext-timezone.php b/inc/extensions/ext-timezone.php index 6d18e7a67b..fdc7460acd 100644 --- a/inc/extensions/ext-timezone.php +++ b/inc/extensions/ext-timezone.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -55,7 +55,7 @@ switch (getExtensionMode()) { addAdminMenuSql('setup', 'config_timezone', 'Zeitzone', 'Einstellungen an der Zeitzone können hier konfiguriert werden.', 10); // Register filter - registerFilter('init', 'INIT_TIMEZONE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -63,7 +63,7 @@ switch (getExtensionMode()) { addExtensionSQL("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_timezone' LIMIT 1"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'init', 'INIT_TIMEZONE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 0278207fe5..81a7542367 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 2e2a1a21b4..c852bb24d7 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -105,6 +105,9 @@ INDEX (`to_userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='transfer'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='transfer' LIMIT 1"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `opt_in`"); + + // Unregister points data + unregisterExtensionPointsData('transfer'); break; case 'activate': // Do stuff when admin activates this extension @@ -257,7 +260,7 @@ INDEX (`to_userid`)", case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("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... :-/"); + setExtensionUpdateNotes("Die {?POINTS?} können nun wieder wie gewohnt transferiert werden. Der Grund für {--MEMBER_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 @@ -271,7 +274,8 @@ INDEX (`to_userid`)", break; case '0.3.0': // SQL queries for v0.3.0 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('transfer','points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('transfer', 'points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 8583251bac..49915fd3e8 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -56,7 +56,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_uberwach' LIMIT 1"); // Unregister filter - unregisterFilter(__FUNCTION__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -70,7 +70,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - registerFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugefügt"); diff --git a/inc/extensions/ext-update.php b/inc/extensions/ext-update.php index b4591e63d7..f53fd1d922 100644 --- a/inc/extensions/ext-update.php +++ b/inc/extensions/ext-update.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index 7d39cc57ee..0e6c7b210c 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 345120bbdf..b2f1be148d 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.4.8'); +setThisExtensionVersion('0.5.2'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -82,7 +82,7 @@ INDEX (`cat_id`)", `user_hash` VARCHAR(255) NULL DEFAULT NULL, `REMOTE_ADDR` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', `last_online` VARCHAR(10) NOT NULL DEFAULT 0, -`last_module` VARCHAR(255) NOT NULL DEFAULT '', +`last_module` VARCHAR(255) NULL DEFAULT NULL, `ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `gender` ENUM('M','F') NOT NULL DEFAULT 'M', @@ -162,7 +162,7 @@ INDEX (`stats_type`)", addAdminMenuSql('user', NULL, 'Mitglieder-Management', 'Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben und abziehen und und und...', 3); addAdminMenuSql('user', 'del_user', 'Mitglied löschen', 'Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.', 1); addAdminMenuSql('user', 'lock_user', 'Mitglied sperren / entsperren', 'Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.', 3); - addAdminMenuSql('user', 'list_user', 'Mitglied auflisten', 'Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.', 4); + addAdminMenuSql('user', 'list_user', 'Mitglieder auflisten', 'Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.', 4); addAdminMenuSql('user', 'add_points', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben', 'Buchen Sie einem Mitglied direkt {OPEN_CONFIG}POINTS{CLOSE_CONFIG} auf. Sie können dazu auch einen Kommentar mitsenden.', 5); addAdminMenuSql('user', 'edit_user', 'Account editieren', 'Daten eines Mitglieder-Accountes ändern.', 6); addAdminMenuSql('user', 'list_refs', 'Referrals anzeigen', 'Mit diesem Menüpunkt können Sie die generierten Referrals eines Mitgliedes auflisten.', 7); @@ -183,8 +183,14 @@ INDEX (`stats_type`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'"); // Register new filters for gathering points - unregisterFilter(__FUNCTION__, __LINE__, 'get_total_points', 'USER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FUNCTION__, __LINE__, 'get_own_points', 'USER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -424,8 +430,8 @@ INDEX (`userid`)", case '0.4.0': // SQL queries for v0.4.0 // Register new filters for gathering points - registerFilter('get_total_points', 'USER_POINTS', false, true, isExtensionDryRun()); - registerFilter('get_own_points', 'USER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter registriert, die das eigene {?POINTS?}-Guthaben des Mitgliedes zurückliefern."); @@ -501,6 +507,72 @@ INDEX (`refid`)", // Update notes (these will be set as task text!) setExtensionUpdateNotes("0000-00-00 00:00:00 ist kein Standardwert mehr, NULL ist dies."); break; + + case '0.4.8': // SQL queries for v0.4.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Dieses Update ist nicht mehr gültig."); + break; + + case '0.4.9': // SQL queries for v0.4.9 + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_module` `last_what` VARCHAR(255) NULL DEFAULT NULL'); + + // Register filter locked points + registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', false, true, isExtensionDryRun()); + + // Register filter for all column names + registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Die Spalte last_module ist nach last_what umbenannt und hat nun NULL als Ausgangswert und Filter für gesperrtes Guthaben hinzugefügt."); + break; + + case '0.5.0': // SQL queries for v0.5.0 + // Prefix for all test accounts + addConfigAddSql('tester_user_maximum', 'INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00999'); + addConfigAddSql('tester_user_gender', "ENUM('M','F') NOT NULL DEFAULT 'M'"); + addConfigAddSql('tester_user_surname_prefix', "VARCHAR(255) NOT NULL DEFAULT 'tester_'"); + addConfigAddSql('tester_user_family', "VARCHAR(255) NOT NULL DEFAULT 'Testbenutzer'"); + addConfigAddSql('tester_user_street_nr', "VARCHAR(255) NOT NULL DEFAULT 'Teststraße 123'"); + addConfigAddSql('tester_user_zip', 'INT(6) UNSIGNED NOT NULL DEFAULT 12345'); + addConfigAddSql('tester_user_city', "VARCHAR(255) NOT NULL DEFAULT 'Teststadt'"); + addConfigAddSql('tester_user_email', "VARCHAR(255) NOT NULL DEFAULT '{OPEN_CONFIG}WEBMASTER{CLOSE_CONFIG}'"); + addConfigAddSql('tester_user_default_refid', 'BIGINT(20) NULL DEFAULT NULL'); + addConfigAddSql('tester_user_password', "VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('tester_user_check_cat', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Admin menu + addAdminMenuSql('user', 'add_tester_user', 'Testbenutzer anlegen', 'Es können hier bis zu 100 Testbenutzer angelegt werden. Diese haben als Vornamen immer den Präfix {?tester_user_surname_prefix?} und werden bei Null anfangend bis 99 hochgezält.', 1); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mitglieder auflisten' WHERE `what`='list_user' LIMIT 1"); + + // Change 'zip' to INT(6) + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `zip` `zip` INT(6) NOT NULL DEFAULT 0'); + + // Register filter for WHERE/AND exclusion/inclusion statements + registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Es können nun Test-Benutzer angelegt werden. Noch müssen diese überall ausgeschlossen werden, damit die Mediadaten nicht unnötig verfälscht werden."); + break; + + case '0.5.1': // SQL queries for v0.5.1 + // Register a filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + + // This depends on ext-register + addExtensionDependency('register'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten für die Mitgliederanmeldung hinzugefügt."); + break; + + case '0.5.2': // SQL queries for v0.5.2 + // Register a filter + registerFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten für die Mitgliederanmeldung hinzugefügt."); + break; } // END - switch break; diff --git a/inc/extensions/ext-validator.php b/inc/extensions/ext-validator.php index ba4343bf88..b5c000a825 100644 --- a/inc/extensions/ext-validator.php +++ b/inc/extensions/ext-validator.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index c54b2db7a4..bfb0ac521b 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -91,6 +91,9 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='wernis'"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='wernis' LIMIT 1"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='wernis_portal' LIMIT 1"); + + // Unregister points data + unregisterExtensionPointsData('wernis_withdraw'); break; case 'activate': // Do stuff when admin activates this extension @@ -125,7 +128,7 @@ INDEX (`userid`)", addConfigAddSql('wernis_pass_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {?mt_word?} als MD5-Hash gespeichert werden."); + setExtensionUpdateNotes("Auszahlungsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {?mt_word?} als MD5-Hash gespeichert werden."); break; case '0.0.3': // SQL queries for v0.0.3 @@ -136,7 +139,8 @@ INDEX (`userid`)", break; case '0.0.4': // SQL queries for v0.0.4 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('wernis_withdraw','order_points','LOCKED','DIRECT')"); + // Register points data + registerExtensionPointsData('wernis_withdraw', 'order_points', 'LOCKED', 'DIRECT'); // This depends on ext-sql_patches addExtensionDependency('sql_patches'); diff --git a/inc/extensions/ext-yacy.php b/inc/extensions/ext-yacy.php index a5bf57852f..1c3e71d094 100644 --- a/inc/extensions/ext-yacy.php +++ b/inc/extensions/ext-yacy.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index 851921132e..534be3b12d 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter-functions.php b/inc/filter-functions.php index a894e0e77c..d7479b1af3 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ function initFilterSystem () { // Is the filter already initialized? if (isset($GLOBALS['filter_init'])) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Filter system already initialized.'); + reportBug(__FUNCTION__, __LINE__, 'Filter system already initialized.'); } // END - if // Load all saved filers if sql_patches is updated @@ -103,112 +103,113 @@ ORDER BY } // Init filters - registerFilter('init', 'LOAD_CONFIGURATION'); - registerFilter('init', 'INIT_RANDOMIZER'); - registerFilter('init', 'LOAD_RUNTIME_INCLUDES'); - registerFilter('init', 'INIT_EXTENSIONS'); - registerFilter('init', 'SET_CURRENT_DATE'); - registerFilter('init', 'INIT_RANDOM_NUMBER'); - registerFilter('init', 'CHECK_REPOSITORY_REVISION'); - registerFilter('init', 'RUN_HOURLY_RESET'); - registerFilter('init', 'RUN_DAILY_RESET'); - registerFilter('init', 'TRIGGER_SENDING_POOL'); - registerFilter('init', 'DETERMINE_USERNAME'); - registerFilter('init', 'DETERMINE_WHAT_ACTION'); - registerFilter('init', 'COUNT_MODULE'); - registerFilter('init', 'UPDATE_LOGIN_DATA'); - registerFilter('init', 'ACTIVATE_EXCHANGE'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'LOAD_CONFIGURATION'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_RANDOMIZER'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'LOAD_RUNTIME_INCLUDES'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_EXTENSIONS'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'SET_CURRENT_DATE'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_RANDOM_NUMBER'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'CHECK_REPOSITORY_REVISION'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_HOURLY_RESET'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_DAILY_RESET'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'TRIGGER_SENDING_POOL'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_USERNAME'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_WHAT_ACTION'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'COUNT_MODULE'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'UPDATE_LOGIN_DATA'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'ACTIVATE_EXCHANGE'); // Page headers - pre-filter (normally, you want to register here) - registerFilter('pre_page_header', 'LOAD_PAGE_HEADER'); + registerFilter(__FUNCTION__, __LINE__, 'pre_page_header', 'LOAD_PAGE_HEADER'); // Page headers - post-filter (normally, you don't want to register here) //-------------------- LAST FILTER FOR THIS CHAIN! ------------------------ - registerFilter('post_page_header', 'FINISH_PAGE_HEADER'); + registerFilter(__FUNCTION__, __LINE__, 'post_page_header', 'FINISH_PAGE_HEADER'); //-------------------- LAST FILTER FOR THIS CHAIN! ------------------------ // 'You are here' navigation - post filter - registerFilter('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); - registerFilter('post_youhere_line', 'HANDLE_HOME_IN_INDEX_SETTING'); + registerFilter(__FUNCTION__, __LINE__, 'post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); + registerFilter(__FUNCTION__, __LINE__, 'post_youhere_line', 'HANDLE_HOME_IN_INDEX_SETTING'); // Filters for pre-extension-registration - registerFilter('pre_extension_installed', 'RUN_SQLS'); + registerFilter(__FUNCTION__, __LINE__, 'pre_extension_installed', 'RUN_SQLS'); // Filters for post-extension-registration - registerFilter('post_extension_installed', 'AUTO_ACTIVATE_EXTENSION'); - registerFilter('post_extension_installed', 'SOLVE_TASK'); - registerFilter('post_extension_installed', 'LOAD_INCLUDES'); - registerFilter('post_extension_installed', 'REMOVE_UPDATES'); - registerFilter('post_extension_installed', 'EXTENSION_MARK_INSTALLED'); + registerFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'AUTO_ACTIVATE_EXTENSION'); + registerFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'SOLVE_TASK'); + registerFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'LOAD_INCLUDES'); + registerFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'REMOVE_UPDATES'); + registerFilter(__FUNCTION__, __LINE__, 'post_extension_installed', 'EXTENSION_MARK_INSTALLED'); // Solving tasks - registerFilter('solve_task', 'SOLVE_TASK'); + registerFilter(__FUNCTION__, __LINE__, 'solve_task', 'SOLVE_TASK'); // Loading includes in general - registerFilter('load_includes', 'LOAD_INCLUDES'); + registerFilter(__FUNCTION__, __LINE__, 'load_includes', 'LOAD_INCLUDES'); // Run SQLs - registerFilter('run_sqls', 'RUN_SQLS'); + registerFilter(__FUNCTION__, __LINE__, 'run_sqls', 'RUN_SQLS'); // Admin ACL check - registerFilter('check_admin_acl', 'CHECK_ADMIN_ACL'); + registerFilter(__FUNCTION__, __LINE__, 'check_admin_acl', 'CHECK_ADMIN_ACL'); // Register shutdown filters - registerFilter('shutdown', 'FLUSH_FILTERS'); - registerFilter('shutdown', 'FLUSH_STATS'); - registerFilter('shutdown', 'FLUSH_TEMPLATE_CACHE'); - registerFilter('shutdown', 'FLUSH_OUTPUT'); + registerFilter(__FUNCTION__, __LINE__, 'shutdown', 'FLUSH_FILTERS'); + registerFilter(__FUNCTION__, __LINE__, 'shutdown', 'FLUSH_STATS'); + registerFilter(__FUNCTION__, __LINE__, 'shutdown', 'FLUSH_TEMPLATE_CACHE'); + registerFilter(__FUNCTION__, __LINE__, 'shutdown', 'FLUSH_OUTPUT'); // Compiling code - registerFilter('compile_code', 'COMPILE_CONFIG'); - registerFilter('compile_code', 'COMPILE_EXPRESSION_CODE'); + registerFilter(__FUNCTION__, __LINE__, 'compile_code', 'COMPILE_CONFIG'); + registerFilter(__FUNCTION__, __LINE__, 'compile_code', 'COMPILE_EXPRESSION_CODE'); // Generic extension update filters - registerFilter('extension_update', 'UPDATE_EXTENSION_DATA'); + registerFilter(__FUNCTION__, __LINE__, 'extension_update', 'UPDATE_EXTENSION_DATA'); // Do hourly reset stuff, keep this entry first in this chain: - registerFilter('hourly', 'RUN_HOURLY_INCLUDES'); + registerFilter(__FUNCTION__, __LINE__, 'hourly', 'RUN_HOURLY_INCLUDES'); // Do reset stuff, keep this entry first in this chain: - registerFilter('reset', 'RUN_RESET_INCLUDES'); + registerFilter(__FUNCTION__, __LINE__, 'reset', 'RUN_RESET_INCLUDES'); // Remove extension - registerFilter('extension_remove', 'REMOVE_EXTENSION'); + registerFilter(__FUNCTION__, __LINE__, 'extension_remove', 'REMOVE_EXTENSION'); // Exclude some users - registerFilter('exclude_users', 'HTML_INCLUDE_USERS'); + registerFilter(__FUNCTION__, __LINE__, 'exclude_users', 'HTML_INCLUDE_USERS'); // Handling of fatal errors - registerFilter('handle_fatal_errors', 'HANDLE_FATAL_ERRORS'); + registerFilter(__FUNCTION__, __LINE__, 'handle_fatal_errors', 'HANDLE_FATAL_ERRORS'); // Page footer filters - registerFilter('page_footer', 'HANDLE_FATAL_ERRORS'); - registerFilter('page_footer', 'DISPLAY_COPYRIGHT'); - registerFilter('page_footer', 'DISPLAY_PARSING_TIME'); + registerFilter(__FUNCTION__, __LINE__, 'page_footer', 'HANDLE_FATAL_ERRORS'); + registerFilter(__FUNCTION__, __LINE__, 'page_footer', 'DISPLAY_COPYRIGHT'); + registerFilter(__FUNCTION__, __LINE__, 'page_footer', 'DISPLAY_PARSING_TIME'); // Member login check. Always keep FETCH_USER_DATA as first entry! - registerFilter('member_login_check', 'FETCH_USER_DATA'); + registerFilter(__FUNCTION__, __LINE__, 'member_login_check', 'FETCH_USER_DATA'); // Admin login - registerFilter('do_admin_login_done', 'DO_LOGIN_ADMIN'); + registerFilter(__FUNCTION__, __LINE__, 'do_admin_login_done', 'DO_LOGIN_ADMIN'); // Admin mail links - registerFilter('generate_admin_mail_links', 'GENERATE_POOL_MAIL_LINKS'); + registerFilter(__FUNCTION__, __LINE__, 'generate_admin_mail_links', 'GENERATE_POOL_MAIL_LINKS'); } // "Registers" a new filter function -function registerFilter ($filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - ENTERED!'); - +function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) { // Extend the filter function name - $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); + $filterFunction = 'FILTER_' . strtoupper($filterFunction); + + // Debug message with FILTER_ prefix + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',F=' . basename($F) . ',L=' . $L . ' - ENTERED!'); // Is that filter already there? if ((isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { // In installation phase we always want to abort if (($silentAbort === false) || (isInstallationPhase())) { // Add fatal message - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered!", $filterName, $filterFunction)); + reportBug(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered! F=%s,L=%s,force=%d", $filterName, $filterFunction, basename($F), $L, intval($force))); } // END - if // Abort here @@ -220,17 +221,17 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for // Is the function there? if (!function_exists($filterFunction)) { // Then abort here - addFatalMessage(__FUNCTION__, __LINE__, sprintf("Filter function %s could not be added to filter chain %s.", $filterFunction, $filterName)); + addFatalMessage(__FUNCTION__, __LINE__, sprintf("Filter function %s could not be added to filter chain %s. F=%s,L=%s,force=%d", $filterFunction, $filterName, basename($F), $L, intval($force))); return false; } // END - if // Simply add it to the array - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'REGISTER: filterName=' . $filterName . ',filterFunction=' . $filterFunction); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'REGISTER: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',F=' . basename($F) . ',L=' . $L); $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A'; $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0'; } // END - if - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',F=' . basename($F) . ',L=' . $L . ' - EXIT!'); } // "Unregisters" a filter from the given chain @@ -239,7 +240,7 @@ function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, // Extend the filter function name only if not loaded from database if (!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) { - $filterFunction = sprintf("FILTER_%s", strtoupper($filterFunction)); + $filterFunction = 'FILTER_' . strtoupper($filterFunction); } // END - if // Is that filter there? @@ -268,7 +269,7 @@ function runFilterChain ($filterName, $filterData = NULL) { // Log not found filters in debug-mode if (isDebugModeEnabled()) { // Log it away... - logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found.'); + logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' does not exist.'); } // END - if // Abort here and return content @@ -289,7 +290,7 @@ function runFilterChain ($filterName, $filterData = NULL) { // Is this filter there? if (!function_exists($filterFunction)) { // Should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - AUTO-UNREGISTERED!'); + reportBug(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - AUTO-UNREGISTERED!'); } // END - if // Call the filter chain diff --git a/inc/filter/_filter.php b/inc/filter/_filter.php index ceafc65f1c..dd38ba7f9b 100644 --- a/inc/filter/_filter.php +++ b/inc/filter/_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/active_filter.php b/inc/filter/active_filter.php index 3a7a9a57be..ecb2506f1d 100644 --- a/inc/filter/active_filter.php +++ b/inc/filter/active_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/admins_filter.php b/inc/filter/admins_filter.php index 7e5faa5557..7a9259df39 100644 --- a/inc/filter/admins_filter.php +++ b/inc/filter/admins_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/beg_filter.php b/inc/filter/beg_filter.php new file mode 100644 index 0000000000..c8def8276d --- /dev/null +++ b/inc/filter/beg_filter.php @@ -0,0 +1,85 @@ +'.print_r($filterData,true).''; + return $filterData; +} + +// Filter for removing old IPs and sending notifications, if enabled for "instant delivery" +function FILTER_BEG_PURGE_IPS_NOTIFY_USER ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Remove old entries + $OLD = getBegTimeout(); + if (getBegUseridTimeout() > $OLD) { + $OLD = getBegUseridTimeout(); + } // END - if + + // Run the SQL query + SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (UNIX_TIMESTAMP() - `timeout`) >= %s', + array($OLD + 60*60), __FUNCTION__, __LINE__); + + // Check for beg rallye is active and send mails out + if ((isBegRallyeEnabled()) && (isBegNewMemberNotifyEnabled())) { + // Include file for sending out mails + addIncludeToPool('notify', 'inc/mails/beg_mails.php'); + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// [EOF] +?> diff --git a/inc/filter/bonus_filter.php b/inc/filter/bonus_filter.php index 09ed63f552..7c6815affd 100644 --- a/inc/filter/bonus_filter.php +++ b/inc/filter/bonus_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,7 @@ function FILTER_ADD_LOGIN_BONUS ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isMember()) { // Do only run for logged in members - debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); + reportBug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); } // END - if // Bonus is not given by default ;-) @@ -86,8 +86,9 @@ LIMIT 1', // Filter for generating admin mail links for bonus mails function FILTER_GENERATE_BONUS_MAIL_LINKS ($filterData) { - // Is the type 'bid'? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Is the type 'bid'? if ($filterData['type'] == 'bid') { // Load template $filterData['__output'] .= loadTemplate('admin_links_bonus_mail', true, $filterData); @@ -100,6 +101,8 @@ function FILTER_GENERATE_BONUS_MAIL_LINKS ($filterData) { // Filter for adding bonus columns with a plus (+) sign function FILTER_ADD_BONUS_POINTS_USER_COLUMNS ($add = '') { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Skip out-dated extension, because this causes an error if (isExtensionInstalledAndOlder('bonus', '0.9.7')) { // Skip this silently @@ -114,8 +117,40 @@ function FILTER_ADD_BONUS_POINTS_USER_COLUMNS ($add = '') { if (getConfig('include_bonus_ref') == 'Y') $add .= ' + `bonus_ref`'; // Return $add + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $add; } +// Filter for adding SQL columns on user registration for bonus/"active" rallye notification +function FILTER_BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Next: active rallye + if (!isBonusNewMemberNotifyEnabled()) { + $GLOBALS['register_sql_columns'] .= ', `bonus_rallye_enable_notify`, `bonus_rallye_disable_notify`'; + $GLOBALS['register_sql_data'] .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()'; + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
    '.print_r($filterData,true).'
    '; + return $filterData; +} + +// Filter for sending out bonus rallye notifications +function FILTER_SEND_BONUS_NOTIFICATIONS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Check for bonus rallye is active and send mails out + if ((isBonusRallyeActive()) && (isBonusNewMemberNotifyEnabled())) { + // Include file for sending out mails + addIncludeToPool('notify', 'inc/mails/bonus_mails.php'); + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
    '.print_r($filterData,true).'
    '; + return $filterData; +} + // [EOF] ?> diff --git a/inc/filter/booking_filter.php b/inc/filter/booking_filter.php index a5af21e25e..9e65874f04 100644 --- a/inc/filter/booking_filter.php +++ b/inc/filter/booking_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/cache_filter.php b/inc/filter/cache_filter.php index 36bab764cc..7ef4dd33aa 100644 --- a/inc/filter/cache_filter.php +++ b/inc/filter/cache_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,9 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($filterData) { // Remove cache foreach (array('config', 'extension', 'filter', 'modules', 'earning', 'points_data') as $cache) { + // Is this cache there? if ($GLOBALS['cache_instance']->loadCacheFile($cache)) { + // Yes, then remove it $GLOBALS['cache_instance']->removeCacheFile(); } // END - if } // END - foreach diff --git a/inc/filter/country_filter.php b/inc/filter/country_filter.php new file mode 100644 index 0000000000..ebf345108b --- /dev/null +++ b/inc/filter/country_filter.php @@ -0,0 +1,58 @@ +'.print_r($filterData,true).''; + return $filterData; +} + +// [EOF] +?> diff --git a/inc/filter/coupon_filter.php b/inc/filter/coupon_filter.php index 6d6a5485fe..e240452512 100644 --- a/inc/filter/coupon_filter.php +++ b/inc/filter/coupon_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/earning_filter.php b/inc/filter/earning_filter.php index 8efff96a8c..4f290e70db 100644 --- a/inc/filter/earning_filter.php +++ b/inc/filter/earning_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,7 @@ function FILTER_ADD_EARNING_GROUP_POPUP ($filterData) { // Check if the current userid is same as in $filterData if (getMemberId() != $filterData['userid']) { // Not the same - debug_report_bug(__FUNCTION__, __LINE__, 'Validation of userid failed. ' . getMemberId() . '!=' . $filterData['userid']); + reportBug(__FUNCTION__, __LINE__, 'Validation of userid failed. ' . getMemberId() . '!=' . $filterData['userid']); } // END - if // Now check if the user has subscription and amount left @@ -54,7 +54,11 @@ function FILTER_ADD_EARNING_GROUP_POPUP ($filterData) { d.`earning_id`, d.`earning_provider`, u.`earning_current_amount`, - u.`earning_daily_amount` + u.`earning_daily_amount`, + u.`earning_active`, + u.`earning_added`, + u.`earning_canceled`, + u.`earning_points` FROM `{?_MYSQL_PREFIX?}_user_earning` AS u INNER JOIN @@ -73,7 +77,7 @@ ORDER BY ), __FUNCTION__, __LINE__); // Do we have entries left? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Load all names while ($content = SQL_FETCHARRAY($result)) { // Merge the $filterData array in @@ -82,7 +86,11 @@ ORDER BY // Construct callback function name $callbackName = 'get' . capitalizeUnderscoreString($content['earning_provider']) . 'DataByEarningArray'; - // And call it + /* + * And call it, the called function should NOT write data in + * '__output'. This however is done here in this function. The + * called function shall ALWAYS put it's data in '__data'. + */ $content = call_user_func($callbackName, $content); } // END - if } // END - if diff --git a/inc/filter/forced_filter.php b/inc/filter/forced_filter.php index a2bb805336..418746971f 100644 --- a/inc/filter/forced_filter.php +++ b/inc/filter/forced_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,18 +43,18 @@ if (!defined('__SECURITY')) { // Filter to add default forced-ad types function FILTER_FORCED_AD_TYPE_DEFAULTS ($data) { // Forced-Banner - $data[] = array( - 'type' => 'BANNER', - ); - - // Forced-Textlinks - $data[] = array( - 'type' => 'TEXTLINK', - ); - - // Forced-Popups - $data[] = array( - 'type' => 'POPUP', + array_push( + $data, + array( + // Forced-Banner + 'type' => 'BANNER', + ), array( + // Forced-Textlinks + 'type' => 'TEXTLINK', + ), array( + // Forced-PopUp + 'type' => 'POPUP', + ) ); // Return data @@ -79,5 +79,45 @@ function FILTER_FORCED_POPUP_TABLE_DATA ($filterData) { return $filterData; } +// Filter for changing URL status +function FILTER_FORCED_CHANGE_CAMPAIGN_STATUS ($filterData) { + /* + // Do some dirty fixing here: + if (($filterData['data']['forced_campaign_status'] == 'STOPPED') && ($filterData['new_status'] == 'pending')) { + // Fix for template change + $filterData['new_status'] = 'continued'; + } // END - if + */ + + // Send admin notification + doForcedNotifyAdmin('campaign_' . strtolower($filterData['data']['forced_campaign_status']) . '_' . $filterData['new_status'], $filterData['data']); + + // Send user notification + doForcedNotifyMember('campaign_' . strtolower($filterData['data']['forced_campaign_status']) . '_' . $filterData['new_status'], $filterData['data']); + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// Filter for validating status +function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) { + // Is the new status set? + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) { + // Abort here, not fine + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!'); + $filterData['abort'] = false; + } elseif ($filterData['data']['forced_campaign_status'] != $filterData['prev_status']) { + // Status is not like prevStatus + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData['data']['forced_campaign_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!'); + $filterData['abort'] = false; + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + // [EOF] ?> diff --git a/inc/filter/mediadata_filter.php b/inc/filter/mediadata_filter.php index 4cebbeeba9..bf811ae78d 100644 --- a/inc/filter/mediadata_filter.php +++ b/inc/filter/mediadata_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/online_filter.php b/inc/filter/online_filter.php index bd77265654..c124eec65e 100644 --- a/inc/filter/online_filter.php +++ b/inc/filter/online_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,15 +44,16 @@ if (!defined('__SECURITY')) { function FILTER_UPDATE_ONLINE_LIST ($filterData) { // Do not update online list when extension is deactivated //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if (!isExtensionActive('online', true)) { + if (!isExtensionActive('online')) { // Extension not active - return; + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension ext-online is not active.'); + return $filterData; } // END - if // Empty session? if (session_id() == '') { // This is invalid here! - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid session.'); + reportBug(__FUNCTION__, __LINE__, 'Invalid session.'); } // END - if // Initialize variables diff --git a/inc/filter/order_filter.php b/inc/filter/order_filter.php index 4f05dd0f6a..4abbd40c7c 100644 --- a/inc/filter/order_filter.php +++ b/inc/filter/order_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,5 +54,61 @@ function FILTER_ORDER_POINTS ($filterData) { return $filterData; } +// Filter for returning given user's locked order points +function FILTER_LOCKED_ORDER_POINTS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Is ext-user installed and active? + if (isExtensionActive('user')) { + // Get the points and add them to the existing + $filterData['points'] += countSumTotalData($filterData['userid'], 'user_points', 'locked_order_points'); + } // END - if + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// Filter for returning all user's order points column names +function FILTER_GET_ALL_ORDER_POINTS_COLUMN_NAMES ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Add 'order_points' and 'locked_order_points' + $filterData['columns'] .= $filterData['alias'] . 'order_points' . $filterData['separator'] . $filterData['alias'] . 'locked_order_points' . $filterData['separator']; + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// Filter for ZIP code inclusion (not exclusion but it must be run in exclusion filter chain) +function FILTER_ORDER_ZIP_CODE_SQL ($sql) { + // Check if category and number of receivers is okay + if ((isOrderMultiPageEnabled()) && (isPostRequestElementSet('zip')) && (postRequestElement('zip') != '')) { + // Choose recipients by ZIP code + if (empty($sql)) { + $sql = sprintf(" WHERE d.`zip` LIKE '%s%%'", + bigintval(postRequestElement('zip')) + ); + } else { + $sql .= sprintf(" AND d.`zip` LIKE '%s%%'", + bigintval(postRequestElement('zip')) + ); + } + } // END - if + + // Return expanded SQL + return $sql; +} + +// Filter for adding columns of points to array +function FILTER_ORDER_POINTS_COLUMNS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Add column + array_push($filterData, 'order_points'); + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + // [EOF] ?> diff --git a/inc/filter/other_filter.php b/inc/filter/other_filter.php index 135885e6b9..15ec1150be 100644 --- a/inc/filter/other_filter.php +++ b/inc/filter/other_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_DEBUG_SQL ($filterData) { // Shall we display SQL queries? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) { + if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (isFullPage()) && ($GLOBALS['__header_sent'] == 2)) { // Then display it here displayDebugSqls(); } // END - if diff --git a/inc/filter/politician_stop_filter.php b/inc/filter/politician_stop_filter.php index 568394028d..89aeb09692 100644 --- a/inc/filter/politician_stop_filter.php +++ b/inc/filter/politician_stop_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($filterData) { // Shall we include the politician_stop snippet? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((!isGetRequestElementSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((isFullPage()) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['__header_sent'] == 2)) { // Then display it here loadPoliticianStopSnippet(); } // END - if diff --git a/inc/filter/rallye_filter.php b/inc/filter/rallye_filter.php index 6df1f69c1a..24d09ba745 100644 --- a/inc/filter/rallye_filter.php +++ b/inc/filter/rallye_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/register_filter.php b/inc/filter/register_filter.php index 8b8ad026e6..0be63a434b 100644 --- a/inc/filter/register_filter.php +++ b/inc/filter/register_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { } // END - if // Run a filter for must-fillout fields -function FILTER_REGISTER_MUST_FILLOUT ($content) { +function FILTER_REGISTER_MUST_FILLOUT ($filterData) { // Get all fields for output //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); $result = SQL_QUERY('SELECT `field_name`,`field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC', @@ -56,7 +56,7 @@ function FILTER_REGISTER_MUST_FILLOUT ($content) { } // END - if // Add it - $content['must_fillout_' . strtolower($row['field_name']) . ''] = $value; + $filterData['must_fillout_' . strtolower($row['field_name']) . ''] = $value; } // END - while // Free memory @@ -64,7 +64,62 @@ function FILTER_REGISTER_MUST_FILLOUT ($content) { // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - return $content; + return $filterData; +} + +/** + * Run a filter for pre user registration - generic code (e.g. create hash, + * init global array elements). WARNING: This filter MUST run filter before all + * others, make your extension/-update depending on ext-register to avoid + * missing global array elements, etc. + * + * @param $filterData Filter data from previous filter + * @return $filterData Unchanged filter data + */ +function FILTER_PRE_USER_REGISTRATION_GENERIC ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Generate hash which will be inserted into confirmation mail + $GLOBALS['register_confirm_hash'] = generateHash(sha1( + // Get total confirmed, ... + getTotalConfirmedUser() . getEncryptSeparator() . + // ... unconfirmed ... + getTotalUnconfirmedUser() . getEncryptSeparator() . + // ... and locked users + getTotalLockedUser() . getEncryptSeparator() . + postRequestElement('month') . '-' . + postRequestElement('day') . '-' . + postRequestElement('year') . getEncryptSeparator() . + postRequestElement('pass1') . getEncryptSeparator() . + detectServerName() . getEncryptSeparator() . + detectRemoteAddr() . getEncryptSeparator() . + detectUserAgent() . '/' . + getSiteKey() . '/' . + getDateKey() . '/' . + getConfig('CACHE_BUSTER') + )); + + // Old way with enterable two-char-code + $GLOBALS['register_country_row'] = '`country`'; + $GLOBALS['register_country_data'] = substr(postRequestElement('cntry'), 0, 2); + + // Init extra SQL data + $GLOBALS['register_sql_columns'] = ''; + $GLOBALS['register_sql_data'] = ''; + + // Init "status" as for many users + setPostRequestElement('status', 'UNCONFIRMED'); + + // Add ip for later POST pings + setPostRequestElement('remote_addr', detectRemoteAddr()); + + // Generic initialization is done + $filterData['init_done'] = true; + + // Return it + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
    '.print_r($filterData,true).'
    '; + return $filterData; } // [EOF] diff --git a/inc/filter/removeip_filter.php b/inc/filter/removeip_filter.php index bd3784bcf4..c80471051c 100644 --- a/inc/filter/removeip_filter.php +++ b/inc/filter/removeip_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/surfbar_filter.php b/inc/filter/surfbar_filter.php index 85c220a289..ca61910cf5 100644 --- a/inc/filter/surfbar_filter.php +++ b/inc/filter/surfbar_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -56,10 +56,10 @@ function FILTER_SURFBAR_CHANGE_URL_STATUS ($filterData) { } // END - if // Send admin notification - SURFBAR_NOTIFY_ADMIN('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]); + doSurfbarNotifyAdmin('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]); // Send user notification - SURFBAR_NOTIFY_USER('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]); + doSurfbarNotifyMember('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]); // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); diff --git a/inc/filter/theme_filter.php b/inc/filter/theme_filter.php index f531016da1..37b6bc5bc8 100644 --- a/inc/filter/theme_filter.php +++ b/inc/filter/theme_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,14 +42,15 @@ if (!defined('__SECURITY')) { // Filter for generic handling of theme change function FILTER_HANDLE_THEME_CHANGE ($filterData) { - // Check if new theme is selcted //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Check if new theme is selcted if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) { // Set new theme for guests $newTheme = postRequestElement('new_theme'); // Change to new theme - setTheme($newTheme); + setMailerTheme($newTheme); // Remove current from array removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", getCurrentTheme())); @@ -68,20 +69,35 @@ function FILTER_HANDLE_THEME_CHANGE ($filterData) { // Filter for settings theme from user profile, must be executed only if FILTER_FETCH_USER_DATA() ran before function FILTER_SET_USERS_THEME ($filterData) { - // Is the user data valid? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Is the user data valid? if (!isMember()) { // Do only run for logged in members - debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); + reportBug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); } // END - if // Change to new theme - setTheme(getUserData('curr_theme')); + setMailerTheme(getUserData('curr_theme')); // Return data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } +// Filter for adding SQL columns on user registration about current theme +function FILTER_THEME_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Okay, add design here + $GLOBALS['register_sql_columns'] .= ', `curr_theme`'; + $GLOBALS['register_sql_data'] .= ", '{%%pipe,getCurrentTheme%%}'"; + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
    '.print_r($filterData,true).'
    '; + return $filterData; +} + // [EOF] ?> diff --git a/inc/filter/timezone_filter.php b/inc/filter/timezone_filter.php index 4f685d14f3..3e7772b827 100644 --- a/inc/filter/timezone_filter.php +++ b/inc/filter/timezone_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/filter/uberwach_filter.php b/inc/filter/uberwach_filter.php index c76d1ce262..e86cbefd2d 100644 --- a/inc/filter/uberwach_filter.php +++ b/inc/filter/uberwach_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_DISPLAY_UBERWACH_SNIPPET ($filterData) { // Shall we include the uberwach snippet? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((isFullPage()) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['__header_sent'] == 2)) { // Then display it here loadUberwachSnippet(); } // END - if diff --git a/inc/filter/user_filter.php b/inc/filter/user_filter.php index a98c45be3f..95f91b3df5 100644 --- a/inc/filter/user_filter.php +++ b/inc/filter/user_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,8 +42,9 @@ if (!defined('__SECURITY')) { // Filter for returning given user's points function FILTER_USER_POINTS ($filterData) { - // Get the points and add them to the existing //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Get the points and add them to the existing $filterData['points'] += countSumTotalData($filterData['userid'], 'user_points', 'points'); // Return the data for next filter @@ -51,5 +52,100 @@ function FILTER_USER_POINTS ($filterData) { return $filterData; } +// Filter for returning given user's locked points +function FILTER_LOCKED_USER_POINTS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Get the points and add them to the existing + $filterData['points'] += countSumTotalData($filterData['userid'], 'user_points', 'locked_points'); + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// Filter for returning all user points column names +function FILTER_GET_ALL_USER_POINTS_COLUMN_NAMES ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + // Add 'points' and 'locked_points' + $filterData['columns'] .= $filterData['alias'] . 'points' . $filterData['separator'] . $filterData['alias'] . 'locked_points' . $filterData['separator']; + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + return $filterData; +} + +// Filter for excluding tester users in WHERE statements +function FILTER_TESTER_USER_EXCLUSION_SQL ($sql) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called! - sql(' . strlen($sql) . ')=' . $sql); + + /* + * Allow testers to be included? Do only this when you only want to test + * it, normally you don't want these accounts being included everywhere. + */ + if (ifTesterAccountsAllowed()) { + // Do not exclude tester accounts + return $sql; + } // END - if + + // Add it, as of this filter is registered only with ext-user >= 0.5.0 + if (empty($sql)) { + // Add WHERE + $sql = " WHERE `surname` NOT LIKE '{?tester_user_surname_prefix?}%%'"; + } else { + // Add AND + $sql .= " AND `surname` NOT LIKE '{?tester_user_surname_prefix?}%%'"; + } + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done! - sql(' . strlen($sql) . ')=' . $sql); + return $sql; +} + +// Filter for including tester users in WHERE statements +function FILTER_TESTER_USER_INCLUSION_SQL ($sql) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called! - sql(' . strlen($sql) . ')=' . $sql); + // Add it, as of this filter is registered only with ext-user >= 0.5.0 + if (empty($sql)) { + // Add WHERE + $sql = " WHERE `surname` LIKE '{?tester_user_surname_prefix?}%%'"; + } else { + // Add AND + $sql .= " AND `surname` LIKE '{?tester_user_surname_prefix?}%%'"; + } + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done! - sql(' . strlen($sql) . ')=' . $sql); + return $sql; +} + +// Filter to add SQL columns to user registration +function FILTER_TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Does the admin create a tester account? + if ((isAdmin()) && (isTesterUserName(postRequestElement('surname')))) { + // Yes, these accounts never needs confirmation (you can still test it by creating a usual account). + setPostRequestElement('status', 'CONFIRMED'); + } // END - if + + // Return filter data + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
    '.print_r($filterData,true).'
    '; + return $filterData; +} + +// Filter to add 'converting' SQL statements +function FILTER_ADD_USER_DATA_CONVERT_SQL_COLUMNS ($sql) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called! - sql(' . strlen($sql) . ')=' . $sql); + + // Add it + $sql .= ', UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`'; + + // Return the data for next filter + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done! - sql(' . strlen($sql) . ')=' . $sql); + return $sql; +} + // [EOF] ?> diff --git a/inc/filters.php b/inc/filters.php index 8508ceae61..54e697ad99 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ function FILTER_FLUSH_FILTERS () { // Is a database link here and not in installation mode? if ((!SQL_IS_LINK_UP()) && (!isInstalling())) { // Abort here - debug_report_bug(__FUNCTION__, __LINE__, 'No database link is up. Cannot flush filters.'); + reportBug(__FUNCTION__, __LINE__, 'No database link is up. Cannot flush filters.'); return false; } // END - if @@ -142,7 +142,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($filterData) { // Handle failed logins here if not in guest //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $filterData['type'] . ',action=' . getAction() . ',what=' . getWhat() . ',level=' . $filterData['access_level']); - if ((($filterData['type'] == 'what') || ($filterData['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getIndexHome()))) && ($filterData['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.6')))) { + if ((($filterData['type'] == 'what') || ($filterData['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'welcome') || (getWhat() == getIndexHome()))) && ($filterData['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.6')))) { // Handle failure $content['content'] .= handleLoginFailures($filterData['access_level']); } // END - if @@ -197,7 +197,7 @@ function FILTER_SOLVE_TASK ($filterData) { adminSolveTask($filterData['task_id']); } else { // Not detectable! - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Cannot resolve task. data[%s]=
    %s
    ", gettype($filterData), print_r($filterData, true))); + reportBug(__FUNCTION__, __LINE__, sprintf("Cannot resolve task. data[%s]=
    %s
    ", gettype($filterData), print_r($filterData, true))); } // Return the data @@ -209,7 +209,7 @@ function FILTER_LOAD_INCLUDES ($filterData) { // Is it null? if (is_null($filterData)) { // This should not happen! - debug_report_bug(__FUNCTION__, __LINE__, 'pool is null.'); + reportBug(__FUNCTION__, __LINE__, 'pool is null.'); } // END - if // Is the pool an array and 'pool' set? @@ -227,7 +227,7 @@ function FILTER_LOAD_INCLUDES ($filterData) { // Is it an array? if ((!isset($data)) || (!is_array($data))) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, sprintf("INC_POOL is no array! Type: %s", gettype($data))); + reportBug(__FUNCTION__, __LINE__, sprintf("INC_POOL is no array! Type: %s", gettype($data))); } elseif (isset($data['inc_pool'])) { // Use this as new inclusion pool! setIncludePool($realPool, $data['inc_pool']); @@ -248,6 +248,9 @@ function FILTER_LOAD_INCLUDES ($filterData) { // Filter for running SQL commands function FILTER_RUN_SQLS ($filterData) { + // Init counter + $count = 0; + // Debug message //* DEBUG: */ die('getSqls()=
    '.print_r(getSqls(), true).'
    ext_update_depends=
    '.print_r($GLOBALS['ext_update_depends'], true).'
    '); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Entered!'); @@ -282,6 +285,12 @@ function FILTER_RUN_SQLS ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running regular query: ' . $sql . ',enable_codes=' . intval($filterData['enable_codes'])); SQL_QUERY($sql, __FUNCTION__, __LINE__, $filterData['enable_codes']); } + + // Has a line changed? + if (!SQL_HASZEROAFFECTED()) { + // Add it to total account + $count += SQL_AFFECTEDROWS(); + } // END - if } // END - if } // END - foreach } // END - foreach @@ -289,6 +298,12 @@ function FILTER_RUN_SQLS ($filterData) { // Debug message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Left!'); + + // Clear any SQL queries + //initSqls(); + + // Return counter + return $count; } // Filter for updating/validating login data @@ -312,13 +327,13 @@ function FILTER_UPDATE_LOGIN_DATA () { $content = getUserDataArray(); // Maybe first login time? - if (empty($content['last_module'])) { - $content['last_module'] = 'login'; + if (empty($content[getUserLastWhatName()])) { + $content[getUserLastWhatName()] = 'login'; } // END - if // This will be displayed on welcome page! :-) if (empty($GLOBALS['last_online']['module'])) { - $GLOBALS['last_online']['module'] = $content['last_module']; + $GLOBALS['last_online']['module'] = $content[getUserLastWhatName()]; $GLOBALS['last_online']['online'] = $content['last_online']; } // END - if @@ -485,7 +500,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { // Some entries found? if ((count($matches) > 0) && (count($matches[3]) > 0)) { // Replace all matches - foreach ($matches[2] as $key => $cmd) { + foreach ($matches[2] as $key => $eti) { // Init replacer/call-back variable $replacer = ''; $callback = ''; @@ -494,25 +509,25 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { $value = NULL; // Extract command and call-back - $cmdArray = explode(',', $cmd); - $cmd = $cmdArray[0]; + $etiArray = explode(',', $eti); + $eti = $etiArray[0]; // Detect call-back function - if (isset($cmdArray[1])) { + if (isset($etiArray[1])) { // Call-back function detected - $callback = $cmdArray[1]; + $callback = $etiArray[1]; } // END - if // Detect extra function - if (isset($cmdArray[2])) { + if (isset($etiArray[2])) { // Also detected - $extraFunction = $cmdArray[2]; + $extraFunction = $etiArray[2]; } // END - if // Detect extra function 2 - if (isset($cmdArray[3])) { + if (isset($etiArray[3])) { // Also detected - $extraFunction2 = $cmdArray[3]; + $extraFunction2 = $etiArray[3]; } // END - if // And value @@ -522,10 +537,10 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { } // END - if // Construct call-back function name for the command - $commandFunction = 'doExpression' . capitalizeUnderscoreString($cmd); + $etiFunction = 'doExpression' . capitalizeUnderscoreString($eti); // Is this function there? - if (function_exists($commandFunction)) { + if (function_exists($etiFunction)) { // Prepare $matches, $key, $outputMode, etc. $data = array( 'matches' => $matches, @@ -539,11 +554,11 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { ); // Call it - //* DEBUG: */ debugOutput(__FUNCTION__ . '[' . __LINE__ . ']: function=' . $commandFunction); - $filterData = call_user_func($commandFunction, $data); + //* DEBUG: */ debugOutput(__FUNCTION__ . '[' . __LINE__ . ']: etiFunction=' . $etiFunction); + $filterData = call_user_func($etiFunction, $data); } else { // Unsupported command detected - logDebugMessage(__FUNCTION__, __LINE__, 'Command cmd=' . $cmd . ', callback=' . $callback . ', extra=' . $extraFunction . ' is unsupported.'); + logDebugMessage(__FUNCTION__, __LINE__, 'eti=' . $eti . ', callback=' . $callback . ', extra=' . $extraFunction . ' - unsupported'); } } // END - foreach } // END - if @@ -577,7 +592,7 @@ function FILTER_RUN_HOURLY_INCLUDES () { // Is the reset set or old sql_patches? if (((!isHourlyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.7.5'))) && (isHtmlOutputMode())) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isHourlyResetEnabled()).',ext_newer[sql_patches:0.7.5]='.intval(isExtensionInstalledAndNewer('sql_patches', '0.7.5')).' Please report this bug. Thanks'); + reportBug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isHourlyResetEnabled()).',ext_newer[sql_patches:0.7.5]='.intval(isExtensionInstalledAndNewer('sql_patches', '0.7.5')).' Please report this bug. Thanks'); } // END - if // Get more hourly reset scripts @@ -597,7 +612,7 @@ function FILTER_RUN_RESET_INCLUDES () { // Is the reset set or old sql_patches? if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (isHtmlOutputMode())) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks'); + reportBug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks'); } // END - if // Get more daily reset scripts @@ -943,20 +958,20 @@ function FILTER_HANDLE_FATAL_ERRORS () { loadIncludeOnce('inc/footer.php'); // Abort here - shutdown(); + doShutdown(); } // Filter for displaying copyright line function FILTER_DISPLAY_COPYRIGHT () { // Shall we display the copyright notice? - if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) { + if ((isFullPage()) && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['__header_sent'] == 2) && (ifCopyrightFooterEnabled())) { // Backlink enabled? if (((isConfigEntrySet('ENABLE_BACKLINK')) && (getConfig('ENABLE_BACKLINK') == 'Y')) || (isInstalling())) { // Copyright with backlink, thanks! :-) - $GLOBALS['page_footer'] .= loadTemplate('copyright_backlink', true); + $GLOBALS['__page_footer'] .= loadTemplate('copyright_backlink', true); } else { // No backlink in Copyright note - $GLOBALS['page_footer'] .= loadTemplate('copyright', true); + $GLOBALS['__page_footer'] .= loadTemplate('copyright', true); } } // END - if } @@ -964,8 +979,8 @@ function FILTER_DISPLAY_COPYRIGHT () { // Filter for displaying parsing time function FILTER_DISPLAY_PARSING_TIME () { // Shall we display the parsing time and number of queries? - // 1234 5 54 4 5 5 4 4 5 543 3 4432 2 33 2 2 21 - if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['header_sent'] == 2)) { + // 1234 5 54 4 5 5 4 4 5543 3 4432 2 332 2 21 + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (isFullPage())) && (!isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['__header_sent'] == 2)) { // Then display it here displayParsingTime(); } // END - if @@ -974,7 +989,10 @@ function FILTER_DISPLAY_PARSING_TIME () { // Filter for flushing template cache function FILTER_FLUSH_TEMPLATE_CACHE () { // Do not flush when debugging the template cache - if (isDebuggingTemplateCache()) return; + if (isDebuggingTemplateCache()) { + // Do not flush templates in debug-mode + return; + } // END - if // Do we have cached eval() data? if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) { @@ -996,7 +1014,7 @@ function FILTER_FETCH_USER_DATA ($userid = NULL) { // Get user data if (!fetchUserData($userid)) { // Userid is not valid - debug_report_bug(__FUNCTION__, __LINE__, 'User id '.$userid . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'User id '.$userid . ' is invalid.'); } // END - if // Set member id @@ -1008,7 +1026,7 @@ function FILTER_RESET_USER_LOGIN_FAILURE () { // Is the user data valid? if (!isMember()) { // Do only run for logged in members - debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); + reportBug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.'); } // END - if // Remmeber login failures if available @@ -1048,12 +1066,12 @@ function FILTER_DO_LOGIN_ADMIN ($filterData) { // Filter for loading page header, this should be ran first! function FILTER_LOAD_PAGE_HEADER () { // Output page header code - $GLOBALS['page_header'] = loadTemplate('page_header', true); + $GLOBALS['__page_header'] = loadTemplate('page_header', true); // Include meta data in 'guest' module if ((isModuleSet()) && (getModule() == 'index')) { // Load meta data template - $GLOBALS['page_header'] .= loadTemplate('metadata', true); + $GLOBALS['__page_header'] .= loadTemplate('metadata', true); // Add meta description to header if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { @@ -1069,7 +1087,7 @@ function FILTER_FINISH_PAGE_HEADER () { loadIncludeOnce('inc/stylesheet.php'); // Closing HEAD tag - $GLOBALS['page_header'] .= ''; + $GLOBALS['__page_header'] .= ''; } // Cleans up the DNS cache if sql_patches is at least 0.7.0 @@ -1171,5 +1189,44 @@ function FILTER_ADD_HISTORY_ENTRY ($filterData) { return $filterData; } +// Filter for initializing ext-sql_patches +function FILTER_GENERATE_FILE_SECRET_HASH ($filterData) { + // Transfer POINTS word + if (isExtensionInstalledAndNewer('sql_patches', '0.0.3')) { + // Okay, recent enough, so transfer the word for POINTS + setConfigEntry('POINTS', getPointsWord()); + } // END - if + + // Init key + setConfigEntry('secret_key', ''); + + // Read key from secret file + if ((getFileHash() == '') || (getMasterSalt() == '') || (getPassScramble() == '')) { + // Maybe need setup of secret key! + loadIncludeOnce('inc/gen_sql_patches.php'); + } // END - if + + // Test again + if ((getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) { + // File hash fas generated so we can also file the secret file... hopefully. + $hashFile = sprintf("%s%s.%s.cache", getPath(), getCachePath(), getFileHash()); + + // Is the secret key file readable? + if (isFileReadable($hashFile)) { + // Read file + setConfigEntry('secret_key', readFromFile($hashFile)); + } else { + // Remove it from database + updateConfiguration('file_hash', ''); + + // Cannot read secret file! + reportBug(__FILE__, __LINE__, 'Cannot read secret file! Please try to reload.'); + } + } // END - if + + // Return data + return $filterData; +} + // [EOF] ?> diff --git a/inc/fix_filters.php b/inc/fix_filters.php index d3d0b82354..9f53a5a65b 100644 --- a/inc/fix_filters.php +++ b/inc/fix_filters.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/fix_menu.php b/inc/fix_menu.php index ac685a3372..6dec7b19c7 100644 --- a/inc/fix_menu.php +++ b/inc/fix_menu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/fix_refsystem.php b/inc/fix_refsystem.php index 44547a1918..3c9f1eec1d 100644 --- a/inc/fix_refsystem.php +++ b/inc/fix_refsystem.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -68,7 +68,8 @@ $result_direct = SQL_QUERY('SELECT FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `refid`=0 OR `refid` IS NULL + `refid`=0 OR + `refid` IS NULL ORDER BY `userid` ASC', __FILE__, __LINE__); @@ -77,8 +78,9 @@ if (!SQL_HASZERONUMS($result_direct)) { // When 'walk' through all users while ($content = SQL_FETCHARRAY($result_direct)) { // Update refback table - //* DEBUG: */ debugOutput('userid=' . $content['userid']); + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'userid=' . $content['userid'] . ' - BEFORE!'); updateReferralTable($content['userid']); + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'userid=' . $content['userid'] . ' - AFTER!'); } // END - while } // END - if diff --git a/inc/fix_user_points.php b/inc/fix_user_points.php index 51381811d9..a485c21d7f 100644 --- a/inc/fix_user_points.php +++ b/inc/fix_user_points.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/footer.php b/inc/footer.php index e9c5abe777..58a447e4f5 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,23 +41,23 @@ if (!defined('__SECURITY')) { } // END - if // Init page footer -$GLOBALS['page_footer'] = ''; +$GLOBALS['__page_footer'] = ''; -// Footer disabled or already sent? -// 1234 5 54 45 5 5 543 3 443 3 443 3 44321 -if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != 1) && ($GLOBALS['footer_sent'] != 2))) && (!isCssOutputMode()) && (!isAjaxOutputMode()) && (!isImageOutputMode()))) { +// Footer disabled (e.g. CSS/AJAX/image output) or already sent? +// 1234 5 54 45 5 5 543 3 443 3 443 3 44321 +if ((((!isset($GLOBALS['__footer_sent'])) || (($GLOBALS['__footer_sent'] != 1) && ($GLOBALS['__footer_sent'] != 2))) && (!isCssOutputMode()) && (!isAjaxOutputMode()) && (!isImageOutputMode()))) { // Run the filter, sweet huh? runFilterChain('page_footer'); // Load page footer - $GLOBALS['page_footer'] .= loadTemplate('page_footer', true); + $GLOBALS['__page_footer'] .= loadTemplate('page_footer', true); } // END - if // Footer has been reached -$GLOBALS['footer_sent'] = 1; +$GLOBALS['__footer_sent'] = 1; // Shutdown -shutdown(); +doShutdown(); // [EOF] ?> diff --git a/inc/functions.php b/inc/functions.php index be6123f558..ea660839fa 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -61,7 +61,7 @@ function addFatalMessage ($F, $L, $message, $extra = '') { } // Add message to $GLOBALS['fatal_messages'] - $GLOBALS['fatal_messages'][] = $message; + array_push($GLOBALS['fatal_messages'], $message); // Log fatal messages away logDebugMessage($F, $L, 'Fatal error message: ' . $message); @@ -82,157 +82,6 @@ function getTotalFatalErrors () { return $count; } -// Send mail out to an email address -function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '') { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'toEmail=' . $toEmail . ',subject=' . $subject . ',isHtml=' . $isHtml); - // Empty parameters should be avoided, so we need to find them - if (empty($isHtml)) { - // isHtml is empty - debug_report_bug(__FUNCTION__, __LINE__, 'isHtml is empty.'); - } // END - if - - // Set from header - if ((!isInString('@', $toEmail)) && ($toEmail > 0)) { - // Does the user exist? - if ((isExtensionActive('user')) && (fetchUserData($toEmail))) { - // Get the email - $toEmail = getUserData('email'); - } else { - // Set webmaster - $toEmail = getWebmaster(); - } - } elseif ($toEmail == '0') { - // Is the webmaster! - $toEmail = getWebmaster(); - } - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TO=' . $toEmail); - - // Check for PHPMailer or debug-mode - if ((!checkPhpMailerUsage()) || (isDebugModeEnabled())) { - // Prefix is '' for text mails - $prefix = ''; - - // Is HTML? - if ($isHtml == 'Y') { - // Set prefix - $prefix = 'html_'; - } // END - if - - // Not in PHPMailer-Mode - if (empty($mailHeader)) { - // Load email header template - $mailHeader = loadEmailTemplate($prefix . 'header'); - } else { - // Append header - $mailHeader .= loadEmailTemplate($prefix . 'header'); - } - } // END - if - - // Debug mode enabled? - if (isDebugModeEnabled()) { - // In debug mode we want to display the mail instead of sending it away so we can debug this part - outputHtml('
    -Headers : ' . htmlentities(utf8_decode(trim($mailHeader))) . '
    -To      : ' . htmlentities(utf8_decode($toEmail)) . '
    -Subject : ' . htmlentities(utf8_decode($subject)) . '
    -Message : ' . htmlentities(utf8_decode($message)) . '
    -
    '); - - // This is always fine - return true; - } elseif (!empty($toEmail)) { - // Send Mail away - return sendRawEmail($toEmail, $subject, $message, $mailHeader); - } elseif ($isHtml != 'Y') { - // Problem detected while sending a mail, forward it to admin - return sendRawEmail(getWebmaster(), '[PROBLEM:]' . $subject, $message, $mailHeader); - } - - // Why did we end up here? This should not happen - debug_report_bug(__FUNCTION__, __LINE__, 'Ending up: template=' . $template); -} - -// Check to use wether legacy mail() command or PHPMailer class -// @TODO Rewrite this to an extension 'smtp' -// @private -function checkPhpMailerUsage() { - return ((getConfig('SMTP_HOSTNAME') != '') && (getConfig('SMTP_USER') != '')); -} - -// Send out a raw email with PHPMailer class or legacy mail() command -function sendRawEmail ($toEmail, $subject, $message, $headers) { - // Just compile all to put out all configs, etc. - $eval = '$toEmail = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($toEmail), false)) . '"); '; - $eval .= '$subject = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($subject), false)) . '"); '; - $eval .= '$headers = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($headers), false)) . '"); '; - - // Do not decode entities in the message because we also send HTML mails through this function - $eval .= '$message = "' . escapeQuotes(doFinalCompilation(compileRawCode($message), false)) . '";'; - - // Run the final eval() command - eval($eval); - - // Shall we use PHPMailer class or legacy mode? - if (checkPhpMailerUsage()) { - // Use PHPMailer class with SMTP enabled - loadIncludeOnce('inc/phpmailer/class.phpmailer.php'); - loadIncludeOnce('inc/phpmailer/class.smtp.php'); - - // get new instance - $mail = new PHPMailer(); - - // Set charset to UTF-8 - $mail->CharSet = 'UTF-8'; - - // Path for PHPMailer - $mail->PluginDir = sprintf("%sinc/phpmailer/", getPath()); - - $mail->IsSMTP(); - $mail->SMTPAuth = true; - $mail->Host = getConfig('SMTP_HOSTNAME'); - $mail->Port = 25; - $mail->Username = getConfig('SMTP_USER'); - $mail->Password = getConfig('SMTP_PASSWORD'); - if (empty($headers)) { - $mail->From = getWebmaster(); - } else { - $mail->From = $headers; - } - $mail->FromName = getMainTitle(); - $mail->Subject = $subject; - if ((isExtensionActive('html_mail')) && (secureString($message) != $message)) { - $mail->Body = $message; - $mail->AltBody = decodeEntities($message); - $mail->WordWrap = 70; - $mail->IsHTML(true); - } else { - $mail->Body = decodeEntities(strip_tags($message)); - } - - $mail->AddAddress($toEmail, ''); - $mail->AddReplyTo(getWebmaster(), getMainTitle()); - $mail->AddCustomHeader('Errors-To: ' . getWebmaster()); - $mail->AddCustomHeader('X-Loop: ' . getWebmaster()); - $mail->AddCustomHeader('Bounces-To: ' . getWebmaster()); - $mail->Send(); - - // Has an error occured? - if (!empty($mail->ErrorInfo)) { - // Log message - logDebugMessage(__FUNCTION__, __LINE__, 'Error while sending mail: ' . $mail->ErrorInfo); - - // Raise an error - return false; - } else { - // All fine! - return true; - } - } else { - // Use legacy mail() command - return mail($toEmail, $subject, decodeEntities($message), $headers); - } -} - // Generate a password in a specified length or use default password length function generatePassword ($length = '0', $exclude = array()) { // Auto-fix invalid length of zero @@ -265,6 +114,12 @@ function generatePassword ($length = '0', $exclude = array()) { // Generates a human-readable timestamp from the Uni* stamp function generateDateTime ($time, $mode = '0') { + // Is there cache? + if (isset($GLOBALS[__FUNCTION__][$time][$mode])) { + // Return it instead + return $GLOBALS[__FUNCTION__][$time][$mode]; + } // END - if + // If the stamp is zero it mostly didn't "happen" if (($time == '0') || (is_null($time))) { // Never happend @@ -272,26 +127,20 @@ function generateDateTime ($time, $mode = '0') { } // END - if // Filter out numbers - $time = bigintval($time); - - // Is it cached? - if (isset($GLOBALS[__FUNCTION__][$time][$mode])) { - // Then use it - return $GLOBALS[__FUNCTION__][$time][$mode]; - } // END - if + $timeSecured = bigintval($time); // Detect language switch (getLanguage()) { case 'de': // German date / time format switch ($mode) { - case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; - 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; - case '4': $ret = date('d.m.Y|H:i:s', $time); break; - case '5': $ret = date('d-m-Y (l-F-T)', $time); break; - case '6': $ret = date('Ymd', $time); break; - case '7': $ret = date('Y-m-d H:i:s', $time); break; // Compatible with MySQL TIMESTAMP + case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $timeSecured); break; + case '1': $ret = strtolower(date('d.m.Y - H:i', $timeSecured)); break; + case '2': $ret = date('d.m.Y|H:i', $timeSecured); break; + case '3': $ret = date('d.m.Y', $timeSecured); break; + case '4': $ret = date('d.m.Y|H:i:s', $timeSecured); break; + case '5': $ret = date('d-m-Y (l-F-T)', $timeSecured); break; + case '6': $ret = date('Ymd', $timeSecured); break; + case '7': $ret = date('Y-m-d H:i:s', $timeSecured); break; // Compatible with MySQL TIMESTAMP default: logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; @@ -300,14 +149,14 @@ function generateDateTime ($time, $mode = '0') { default: // Default is the US date / time format! switch ($mode) { - case '0': $ret = date('r', $time); break; - case '1': $ret = strtolower(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; - case '4': $ret = date('d.m.Y|H:i:s', $time); break; - case '5': $ret = date('d-m-Y (l-F-T)', $time); break; - case '6': $ret = date('Ymd', $time); break; - case '7': $ret = date('Y-m-d H:i:s', $time); break; // Compatible with MySQL TIMESTAMP + case '0': $ret = date('r', $timeSecured); break; + case '1': $ret = strtolower(date('Y-m-d - g:i A', $timeSecured)); break; + case '2': $ret = date('y-m-d|H:i', $timeSecured); break; + case '3': $ret = date('y-m-d', $timeSecured); break; + case '4': $ret = date('d.m.Y|H:i:s', $timeSecured); break; + case '5': $ret = date('d-m-Y (l-F-T)', $timeSecured); break; + case '6': $ret = date('Ymd', $timeSecured); break; + case '7': $ret = date('Y-m-d H:i:s', $timeSecured); break; // Compatible with MySQL TIMESTAMP default: logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; @@ -332,7 +181,7 @@ function translateYesNo ($yn) { case 'N': $GLOBALS[__FUNCTION__][$yn] = '{--NO--}'; break; default: // Log unknown value - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected: Y/N", $yn)); break; } // END - switch } // END - if @@ -342,6 +191,7 @@ function translateYesNo ($yn) { } // Translates the american decimal dot into a german comma +// OPPOMENT: convertCommaToDot() function translateComma ($dotted, $cut = true, $max = '0') { // First, cast all to double, due to PHP changes $dotted = (double) $dotted; @@ -398,12 +248,13 @@ function translateGender ($gender) { case 'M': // Male case 'F': // Female case 'C': // Company - $ret = sprintf("{--GENDER_%s--}", $gender); + // Use generic function + $ret = translateGeneric('GENDER', $gender); break; default: // Please report bugs on unknown genders - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown gender %s detected.", $gender)); + reportBug(__FUNCTION__, __LINE__, sprintf("Unknown gender %s detected.", $gender)); break; } // END - switch @@ -421,17 +272,17 @@ function translateUserStatus ($status) { case 'UNCONFIRMED': case 'CONFIRMED': case 'LOCKED': - $ret = sprintf("{--ACCOUNT_STATUS_%s--}", $status); + // Use generic function for all "normal" cases" + $ret = translateGeneric('ACCOUNT_STATUS', $status); break; - case '': - case null: + case '': // Account deleted + case NULL: // Account deleted $ret = '{--ACCOUNT_STATUS_DELETED--}'; break; - default: - // Please report all unknown status - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s(%s) detected.", $status, gettype($status))); + default: // Please report all unknown status + reportBug(__FUNCTION__, __LINE__, sprintf("Unknown status %s(%s) detected.", $status, gettype($status))); break; } // END - switch @@ -446,23 +297,31 @@ function translateMenuVisibleLocked ($content, $prefix = '') { // Translate 'visible' and keep an eye on the prefix switch ($content['visible']) { - // Should be visible - case 'Y': $content['visible_css'] = $prefix . 'menu_visible' ; break; - case 'N': $content['visible_css'] = $prefix . 'menu_invisible'; break; - default: - // Please report this - debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported visible value detected. content=
    ' . print_r($content, true) . '
    '); + case 'Y': // Should be visible + $content['visible_css'] = $prefix . 'menu_visible'; + break; + + case 'N': // Is invisible + $content['visible_css'] = $prefix . 'menu_invisible'; + break; + + default: // Please report this + reportBug(__FUNCTION__, __LINE__, 'Unsupported visible value detected. content=
    ' . print_r($content, true) . '
    '); break; } // END - switch // Translate 'locked' and keep an eye on the prefix switch ($content['locked']) { - // Should be locked - case 'Y': $content['locked_css'] = $prefix . 'menu_locked' ; break; - case 'N': $content['locked_css'] = $prefix . 'menu_unlocked'; break; - default: - // Please report this - debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported locked value detected. content=
    ' . print_r($content, true) . '
    '); + case 'Y': // Should be locked, only admins can call this + $content['locked_css'] = $prefix . 'menu_locked'; + break; + + case 'N': // Is unlocked and visible to members/guests/sponsors + $content['locked_css'] = $prefix . 'menu_unlocked'; + break; + + default: // Please report this + reportBug(__FUNCTION__, __LINE__, 'Unsupported locked value detected. content=
    ' . print_r($content, true) . '
    '); break; } // END - switch @@ -498,7 +357,7 @@ function countSelection ($array) { // Integrity check if (!is_array($array)) { // Not an array! - debug_report_bug(__FUNCTION__, __LINE__, 'No array provided.'); + reportBug(__FUNCTION__, __LINE__, 'No array provided.'); } // END - if // Init count @@ -507,7 +366,10 @@ function countSelection ($array) { // Count all entries foreach ($array as $key => $selected) { // Is it checked? - if (!empty($selected)) $ret++; + if (!empty($selected)) { + // Yes, then count it + $ret++; + } // END - if } // END - foreach // Return counted selections @@ -535,7 +397,7 @@ function makeTime ($hours, $minutes, $seconds, $stamp) { // Redirects to an URL and if neccessarry extends it with own base URL function redirectToUrl ($url, $allowSpider = true) { // Is the output mode -2? - if (getScriptOutputMode() == -2) { + if (isAjaxOutputMode()) { // This is always (!) an AJAX request and shall not be redirected return; } // END - if @@ -558,7 +420,7 @@ function redirectToUrl ($url, $allowSpider = true) { } // END - if // Three different ways to debug... - //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, 'URL=' . $url); + //* DEBUG: */ reportBug(__FUNCTION__, __LINE__, 'URL=' . $url); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $url); //* DEBUG: */ die($url); @@ -574,7 +436,7 @@ function redirectToUrl ($url, $allowSpider = true) { } // Shut the mailer down here - shutdown(); + doShutdown(); } /************************************************************************ @@ -584,7 +446,7 @@ function redirectToUrl ($url, $allowSpider = true) { * * * $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 * + * $primary_key - Primaerschl.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 * * * @@ -711,7 +573,7 @@ function bigintval ($num, $castValue = true, $abortOnMismatch = true) { // Has the whole value changed? if (('' . $ret . '' != '' . $num . '') && ($abortOnMismatch === true) && (!is_null($num))) { // Log the values - debug_report_bug(__FUNCTION__, __LINE__, 'Problem with number found. ret[' . gettype($ret) . ']=' . $ret . ', num[' . gettype($num) . ']='. $num); + reportBug(__FUNCTION__, __LINE__, 'Problem with number found. ret[' . gettype($ret) . ']=' . $ret . ', num[' . gettype($num) . ']='. $num); } // END - if // Return result @@ -787,17 +649,26 @@ function createFancyTime ($stamp) { // Taken from www.php.net isInStringIgnoreCase() user comments function isEmailValid ($email) { - // Check first part of email address - $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*'; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'email=' . $email . ' - ENTERED!'); + + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__][$email])) { + // Check first part of email address + $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*'; - // Check domain - $domain = '[a-z0-9-]+(\.[a-z0-9-]{2,5})+'; + // Check domain + $domain = '[a-z0-9-]+(\.[a-z0-9-]{2,5})+'; - // Generate pattern - $regex = '@^' . $first . '\@' . $domain . '$@iU'; + // Generate pattern + $regex = '@^' . $first . '\@' . $domain . '$@iU'; + + // Determine it + $GLOBALS[__FUNCTION__][$email] = (($email != getMessage('DEFAULT_WEBMASTER')) && (preg_match($regex, $email))); + } // END - if // Return check result - return preg_match($regex, $email); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'email=' . $email . ',isValid=' . intval($GLOBALS[__FUNCTION__][$email]) . ' - EXIT!'); + return $GLOBALS[__FUNCTION__][$email];; } // Function taken from user comments on www.php.net / function isInStringIgnoreCase() @@ -818,8 +689,10 @@ function isUrlValid ($url, $compile = true) { return FILTER_VALIDATE_URL($url, false); } // END - if - // If not installed, perform a simple test. Just make it sure there is always a http:// or - // https:// in front of the URLs + /* + * If not installed, perform a simple test. Just make it sure there is always a + * http:// or https:// in front of the URLs. + */ return isUrlValidSimple($url); } @@ -844,7 +717,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { // Do we miss an arry element here? if (!isConfigEntrySet('file_hash')) { // Stop here - debug_report_bug(__FUNCTION__, __LINE__, 'Missing file_hash in ' . __FUNCTION__ . '.'); + reportBug(__FUNCTION__, __LINE__, 'Missing file_hash in ' . __FUNCTION__ . '.'); } // END - if // When the salt is empty build a new one, else use the first x configured characters as the salt @@ -881,7 +754,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { // Sanity check on salt if (strlen($salt) != getSaltLength()) { // Not the same! - debug_report_bug(__FUNCTION__, __LINE__, 'salt length mismatch! (' . strlen($salt) . '/' . getSaltLength() . ')'); + reportBug(__FUNCTION__, __LINE__, 'salt length mismatch! (' . strlen($salt) . '/' . getSaltLength() . ')'); } // END - if } @@ -933,13 +806,17 @@ function scrambleString ($str) { // De-scramble a string scrambled by scrambleString() function descrambleString ($str) { // Scramble only 40 chars long strings - if (strlen($str) != 40) return $str; + if (strlen($str) != 40) { + return $str; + } // END - if // Load numbers from config $scrambleNums = explode(':', getPassScramble()); // Validate numbers - if (count($scrambleNums) != 40) return $str; + if (count($scrambleNums) != 40) { + return $str; + } // END - if // Begin descrambling $orig = str_repeat(' ', 40); @@ -1049,15 +926,18 @@ function getCurrentTheme () { $ret = 'default'; // Do we have ext-theme installed and active or is 'theme' in URL or POST data? - if ((isPostRequestElementSet('theme')) && (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme'))))) { + if (isExtensionActive('theme')) { + // Call inner method + $ret = getActualTheme(); + } elseif ((isPostRequestElementSet('theme')) && (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme'))))) { // Use value from POST data $ret = postRequestElement('theme'); } elseif ((isGetRequestElementSet('theme')) && (isIncludeReadable(sprintf("theme/%s/theme.php", getRequestElement('theme'))))) { // Use value from GET data $ret = getRequestElement('theme'); - } elseif (isExtensionActive('theme')) { - // Call inner method - $ret = getActualTheme(); + } elseif ((isMailerThemeSet()) && (isIncludeReadable(sprintf("theme/%s/theme.php", getMailerTheme())))) { + // Use value from GET data + $ret = getMailerTheme(); } // Return theme value @@ -1137,39 +1017,50 @@ function generateSeed () { // Converts a message code to a human-readable message function getMessageFromErrorCode ($code) { - $message = ''; + // Default is an unknown error code + $message = '{%message,UNKNOWN_ERROR_CODE=' . $code . '%}'; + + // Which code is provided? switch ($code) { - case '': break; - case getCode('LOGOUT_DONE') : $message = '{--LOGOUT_DONE--}'; break; - case getCode('LOGOUT_FAILED') : $message = '{--LOGOUT_FAILED--}'; break; - case getCode('DATA_INVALID') : $message = '{--MAIL_DATA_INVALID--}'; break; - case getCode('POSSIBLE_INVALID') : $message = '{--MAIL_POSSIBLE_INVALID--}'; break; - case getCode('USER_404') : $message = '{--USER_404--}'; break; - case getCode('STATS_404') : $message = '{--MAIL_STATS_404--}'; break; - case getCode('ALREADY_CONFIRMED') : $message = '{--MAIL_ALREADY_CONFIRMED--}'; break; - case getCode('WRONG_PASS') : $message = '{--LOGIN_WRONG_PASS--}'; break; - case getCode('WRONG_ID') : $message = '{--LOGIN_WRONG_ID--}'; break; - case getCode('ACCOUNT_LOCKED') : $message = '{--LOGIN_STATUS_LOCKED--}'; break; - case getCode('ACCOUNT_UNCONFIRMED'): $message = '{--LOGIN_STATUS_UNCONFIRMED--}'; break; - case getCode('COOKIES_DISABLED') : $message = '{--LOGIN_COOKIES_DISABLED--}'; break; - case getCode('BEG_SAME_AS_OWN') : $message = '{--BEG_SAME_USERID_AS_OWN--}'; break; - case getCode('LOGIN_FAILED') : $message = '{--GUEST_LOGIN_FAILED_GENERAL--}'; break; - case getCode('MODULE_MEMBER_ONLY') : $message = '{%message,MODULE_MEMBER_ONLY=' . getRequestElement('mod') . '%}'; break; - case getCode('OVERLENGTH') : $message = '{--MEMBER_TEXT_OVERLENGTH--}'; break; - case getCode('URL_FOUND') : $message = '{--MEMBER_TEXT_CONTAINS_URL--}'; break; - case getCode('SUBJECT_URL') : $message = '{--MEMBER_SUBJECT_CONTAINS_URL--}'; break; - case getCode('BLIST_URL') : $message = '{--MEMBER_URL_BLACK_LISTED--}
    {--MEMBER_BLIST_TIME--}: ' . generateDateTime(getRequestElement('blist'), 0); break; - case getCode('NO_RECS_LEFT') : $message = '{--MEMBER_SELECTED_MORE_RECS--}'; break; - case getCode('INVALID_TAGS') : $message = '{--MEMBER_HTML_INVALID_TAGS--}'; break; - case getCode('MORE_POINTS') : $message = '{--MEMBER_MORE_POINTS_NEEDED--}'; break; - case getCode('MORE_RECEIVERS1') : $message = '{--MEMBER_ENTER_MORE_RECEIVERS--}'; break; - case getCode('MORE_RECEIVERS2') : $message = '{--MEMBER_NO_MORE_RECEIVERS_FOUND--}'; break; - case getCode('MORE_RECEIVERS3') : $message = '{--MEMBER_ENTER_MORE_MIN_RECEIVERS--}'; break; - case getCode('INVALID_URL') : $message = '{--MEMBER_ENTER_INVALID_URL--}'; break; - case getCode('NO_MAIL_TYPE') : $message = '{--MEMBER_NO_MAIL_TYPE_SELECTED--}'; break; - case getCode('UNKNOWN_ERROR') : $message = '{--LOGIN_UNKNOWN_ERROR--}'; break; - case getCode('UNKNOWN_STATUS') : $message = '{--LOGIN_UNKNOWN_STATUS--}'; break; - case getCode('PROFILE_UPDATED') : $message = '{--MEMBER_PROFILE_UPDATED--}'; break; + case '': + // No error code is bad coding practice + reportBug(__FUNCTION__, __LINE__, 'Empty error code supplied. Please fix your code.'); + break; + + // All error messages + case getCode('LOGOUT_DONE') : $message = '{--LOGOUT_DONE--}'; break; + case getCode('LOGOUT_FAILED') : $message = '{--LOGOUT_FAILED--}'; break; + case getCode('DATA_INVALID') : $message = '{--MAIL_DATA_INVALID--}'; break; + case getCode('POSSIBLE_INVALID') : $message = '{--MAIL_POSSIBLE_INVALID--}'; break; + case getCode('USER_404') : $message = '{--USER_404--}'; break; + case getCode('STATS_404') : $message = '{--MAIL_STATS_404--}'; break; + case getCode('ALREADY_CONFIRMED') : $message = '{--MAIL_ALREADY_CONFIRMED--}'; break; + case getCode('BEG_SAME_AS_OWN') : $message = '{--BEG_SAME_USERID_AS_OWN--}'; break; + case getCode('LOGIN_FAILED') : $message = '{--GUEST_LOGIN_FAILED_GENERAL--}'; break; + case getCode('MODULE_MEMBER_ONLY') : $message = '{%message,MODULE_MEMBER_ONLY=' . getRequestElement('mod') . '%}'; break; + case getCode('OVERLENGTH') : $message = '{--MEMBER_TEXT_OVERLENGTH--}'; break; + case getCode('URL_FOUND') : $message = '{--MEMBER_TEXT_CONTAINS_URL--}'; break; + case getCode('SUBJECT_URL') : $message = '{--MEMBER_SUBJECT_CONTAINS_URL--}'; break; + case getCode('BLIST_URL') : $message = '{--MEMBER_URL_BLACK_LISTED--}
    {--MEMBER_BLIST_TIME--}: ' . generateDateTime(getRequestElement('blist'), 0); break; + case getCode('NO_RECS_LEFT') : $message = '{--MEMBER_SELECTED_MORE_RECS--}'; break; + case getCode('INVALID_TAGS') : $message = '{--MEMBER_HTML_INVALID_TAGS--}'; break; + case getCode('MORE_POINTS') : $message = '{--MEMBER_MORE_POINTS_NEEDED--}'; break; + case getCode('MORE_RECEIVERS1') : $message = '{--MEMBER_ENTER_MORE_RECEIVERS--}'; break; + case getCode('MORE_RECEIVERS2') : $message = '{--MEMBER_NO_MORE_RECEIVERS_FOUND--}'; break; + case getCode('MORE_RECEIVERS3') : $message = '{--MEMBER_ENTER_MORE_MIN_RECEIVERS--}'; break; + case getCode('INVALID_URL') : $message = '{--MEMBER_ENTER_INVALID_URL--}'; break; + case getCode('NO_MAIL_TYPE') : $message = '{--MEMBER_NO_MAIL_TYPE_SELECTED--}'; break; + case getCode('PROFILE_UPDATED') : $message = '{--MEMBER_PROFILE_UPDATED--}'; break; + case getCode('UNKNOWN_REDIRECT') : $message = '{--UNKNOWN_REDIRECT_VALUE--}'; break; + case getCode('WRONG_PASS') : $message = '{--LOGIN_WRONG_PASS--}'; break; + case getCode('WRONG_ID') : $message = '{--LOGIN_WRONG_ID--}'; break; + case getCode('ACCOUNT_LOCKED') : $message = '{--LOGIN_STATUS_LOCKED--}'; break; + case getCode('ACCOUNT_UNCONFIRMED') : $message = '{--LOGIN_STATUS_UNCONFIRMED--}'; break; + case getCode('COOKIES_DISABLED') : $message = '{--LOGIN_COOKIES_DISABLED--}'; break; + case getCode('UNKNOWN_ERROR') : $message = '{--LOGIN_UNKNOWN_ERROR--}'; break; + case getCode('UNKNOWN_STATUS') : $message = '{--LOGIN_UNKNOWN_STATUS--}'; break; + case getCode('LOGIN_EMPTY_ID') : $message = '{--LOGIN_ID_IS_EMPTY--}'; break; + case getCode('LOGIN_EMPTY_PASSWORD'): $message = '{--LOGIN_PASSWORD_IS_EMPTY--}'; break; case getCode('ERROR_MAILID'): if (isExtensionActive('mailid', true)) { @@ -1215,11 +1106,8 @@ function getMessageFromErrorCode ($code) { break; default: - // Missing/invalid code - $message = '{%message,UNKNOWN_MAILID_CODE=' . $code . '%}'; - - // Log it - logDebugMessage(__FUNCTION__, __LINE__, $message); + // Log missing/invalid error codes + logDebugMessage(__FUNCTION__, __LINE__, getMessage('UNKNOWN_MAILID_CODE', $code)); break; } // END - switch @@ -1229,8 +1117,9 @@ function getMessageFromErrorCode ($code) { // Function taken from user comments on www.php.net / function isInStringIgnoreCase() function isUrlValidSimple ($url) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'url=' . $url . ' - ENTERED!'); // Prepare URL - $url = secureString(str_replace("\\", '', compileRawCode(urldecode($url)))); + $url = secureString(str_replace(chr(92), '', compileRawCode(urldecode($url)))); // Allows http and https $http = "(http|https)+(:\/\/)"; @@ -1292,6 +1181,7 @@ function isUrlValidSimple ($url) { } // END - foreach // Return true/false + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'url=' . $url . ',reg=' . intval($reg) . ' - EXIT!'); return $reg; } @@ -1310,12 +1200,12 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 $tmp = $FQFN . '.tmp'; // Open the source file - $fp = fopen($FQFN, 'r') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot read. file=' . basename($FQFN)); + $fp = fopen($FQFN, 'r') or reportBug(__FUNCTION__, __LINE__, 'Cannot read. file=' . basename($FQFN)); // Is the resource valid? if (is_resource($fp)) { // Open temporary file - $fp_tmp = fopen($tmp, 'w') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot write. tmp=' . basename($tmp) . ',file=' . $FQFN); + $fp_tmp = fopen($tmp, 'w') or reportBug(__FUNCTION__, __LINE__, 'Cannot write. tmp=' . basename($tmp) . ',file=' . $FQFN); // Is the resource again valid? if (is_resource($fp_tmp)) { @@ -1335,7 +1225,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 if ($next > -1) { if ($next === $seek) { $next = -1; - $line = $prefix . $inserted . $suffix . "\n"; + $line = $prefix . $inserted . $suffix . chr(10); } else { $next++; } @@ -1367,33 +1257,19 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 } } else { // File not found, not readable or writeable - debug_report_bug(__FUNCTION__, __LINE__, 'File not readable/writeable. file=' . basename($FQFN)); + reportBug(__FUNCTION__, __LINE__, 'File not readable/writeable. file=' . basename($FQFN)); } // An error was detected! return false; } -// Send notification to admin -function sendAdminNotification ($subject, $templateName, $content = array(), $userid = NULL) { - if ((isExtensionInstalledAndNewer('admins', '0.4.1')) && (function_exists('sendAdminsEmails'))) { - // Send new way - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'admins=Y,subject=' . $subject . ',templateName=' . $templateName . ' - OKAY!'); - sendAdminsEmails($subject, $templateName, $content, $userid); - } else { - // Send out-dated way - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'admins=N,subject=' . $subject . ',templateName=' . $templateName . ' - OUT-DATED!'); - $message = loadEmailTemplate($templateName, $content, $userid); - sendAdminEmails($subject, $message); - } -} - // Debug message logger function logDebugMessage ($funcFile, $line, $message, $force=true) { // Is debug mode enabled? if ((isDebugModeEnabled()) || ($force === true)) { // Remove CRLF - $message = str_replace("\r", '', str_replace("\n", '', $message)); + $message = str_replace(array(chr(13), chr(10)), array('', ''), $message); // Log this message away appendLineToFile(getPath() . getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message); @@ -1449,7 +1325,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, if ((isset($postData[$test . '_ye'])) && (isset($postData[$test . '_mo'])) && (isset($postData[$test . '_we'])) && (isset($postData[$test . '_da'])) && (isset($postData[$test . '_ho'])) && (isset($postData[$test . '_mi'])) && (isset($postData[$test . '_se'])) && ($test != $test2)) { // Generate timestamp $postData[$test] = createEpocheTimeFromSelections($test, $postData); - $content[] = sprintf("`%s`='%s'", $test, $postData[$test]); + array_push($content, sprintf("`%s`='%s'", $test, $postData[$test])); $GLOBALS['skip_config'][$test] = true; // Remove data from array @@ -1466,6 +1342,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, } // Reverts the german decimal comma into Computer decimal dot +// OPPOMENT: translateComma() function convertCommaToDot ($str) { // Default float is not a float... ;-) $float = false; @@ -1481,10 +1358,10 @@ function convertCommaToDot ($str) { break; default: // US and so on - // Remove thousand dots first and cast + // Remove thousand commatas first and cast $float = (float)str_replace(',', '', $str); break; - } + } // END - switch // Return float return $float; @@ -1552,6 +1429,9 @@ function rebuildCache ($cache, $inc = '', $force = false) { // Determines the real remote address function determineRealRemoteAddress ($remoteAddr = false) { + // Default is 127.0.0.1 + $address = '127.0.0.1'; + // Is a proxy in use? if ((isset($_SERVER['HTTP_X_FORWARDED_FOR'])) && (!$remoteAddr)) { // Proxy was used @@ -1559,7 +1439,7 @@ function determineRealRemoteAddress ($remoteAddr = false) { } elseif ((isset($_SERVER['HTTP_CLIENT_IP'])) && (!$remoteAddr)) { // Yet, another proxy $address = $_SERVER['HTTP_CLIENT_IP']; - } else { + } elseif (isset($_SERVER['REMOTE_ADDR'])) { // The regular address when no proxy was used $address = $_SERVER['REMOTE_ADDR']; } @@ -1615,6 +1495,12 @@ function addNewBonusMail ($data, $mode = '', $output = true) { // Determines referral id and sets it function determineReferralId () { + // Do we have it already detected? + if (isReferralIdValid()) { + // Do not determine it, just return it + return getReferralId(); + } // END - if + // Skip this in non-html-mode and outside ref.php if ((!isHtmlOutputMode()) && (basename($_SERVER['PHP_SELF']) != 'ref.php')) { return false; @@ -1644,7 +1530,7 @@ function determineReferralId () { // Set session refid as global //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using refid from SESSION data (' . getSession('refid') . ')'); setReferralId(bigintval(getSession('refid'))); - } elseif (isRandomReferralIdEnabled()) { + } elseif ((isExtensionInstalledAndNewer('user', '0.3.4')) && (isRandomReferralIdEnabled())) { // Select a random user which has confirmed enougth mails //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Checking random referral id'); setReferralId(determineRandomReferralId()); @@ -1723,10 +1609,10 @@ function doHourly () { runFilterChain('hourly'); } -// Our shutdown-function -function shutdown () { +// Shuts down the mailer (e.g. closing database link, flushing output/filters, etc.) +function doShutdown () { // Call the filter chain 'shutdown' - runFilterChain('shutdown', null); + runFilterChain('shutdown', NULL); // Check if not in installation phase and the link is up if ((!isInstallationPhase()) && (SQL_IS_LINK_UP())) { @@ -1734,7 +1620,7 @@ function shutdown () { SQL_CLOSE(__FUNCTION__, __LINE__); } elseif (!isInstallationPhase()) { // No database link - debug_report_bug(__FUNCTION__, __LINE__, 'Database link is already down, while shutdown is running.'); + reportBug(__FUNCTION__, __LINE__, 'Database link is already down, while shutdown is running.'); } // Stop executing here @@ -1750,7 +1636,7 @@ function initMemberId () { function setMemberId ($memberid) { // We should not set member id to zero if ($memberid == '0') { - debug_report_bug(__FUNCTION__, __LINE__, 'Userid should not be set zero.'); + reportBug(__FUNCTION__, __LINE__, 'Userid should not be set zero.'); } // END - if // Set it secured @@ -1787,7 +1673,7 @@ function getExtraTitle () { // Is the extra title set? if (!isExtraTitleSet()) { // No, then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'extra_title is not set!'); + reportBug(__FUNCTION__, __LINE__, 'extra_title is not set!'); } // END - if // Return it @@ -1806,28 +1692,25 @@ function isExtraTitleSet () { * * @param $baseDir Relative base directory to PATH to scan from * @param $prefix Prefix for all positive matches (which files should be found) - * @param $fileIncludeDirs Wether to include directories in the final output array - * @param $addBaseDir Wether to add $baseDir to all array entries + * @param $fileIncludeDirs whether to include directories in the final output array + * @param $addBaseDir whether to add $baseDir to all array entries * @param $excludeArray Excluded files and directories, these must be full files names, e.g. 'what-' will exclude all files named 'what-' but won't exclude 'what-foo.php' * @param $extension File extension for all positive matches * @param $excludePattern Regular expression to exclude more files (preg_match()) - * @param $recursive Wether to scan recursively + * @param $recursive whether to scan recursively * @param $suffix Suffix for positive matches ($extension will be appended, too) * @return $foundMatches All found positive matches for above criteria */ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $addBaseDir = true, $excludeArray = array(), $extension = '.php', $excludePattern = '@(\.|\.\.)$@', $recursive = true, $suffix = '') { // Add default entries we should always exclude - $excludeArray[] = '.'; // Current directory - $excludeArray[] = '..'; // Parent directory - $excludeArray[] = '.svn'; // Directories created by Subversion - $excludeArray[] = '.htaccess'; // Directory protection files (mostly) + array_unshift($excludeArray, '.', '..', '.svn', '.htaccess'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'baseDir=' . $baseDir . ',prefix=' . $prefix . ' - Entered!'); // Init found includes $foundMatches = array(); // Open directory - $dirPointer = opendir(getPath() . $baseDir) or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot read directory ' . basename($baseDir) . '.'); + $dirPointer = opendir(getPath() . $baseDir) or reportBug(__FUNCTION__, __LINE__, 'Cannot read directory ' . basename($baseDir) . '.'); // Read all entries while ($baseFile = readdir($dirPointer)) { @@ -1876,6 +1759,10 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Might be deprecated //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . $FQFN . ' is to small (' . filesize($FQFN) . ')!'); continue; + } elseif (($extension == '.php') && (filesize($FQFN) < 50)) { + // This PHP script is deprecated + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . $FQFN . ' is a deprecated PHP script!'); + continue; } // Get file' extension (last 4 chars) @@ -1892,18 +1779,18 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Add file with or without base path if ($addBaseDir === true) { // With base path - $foundMatches[] = $fileName; + array_push($foundMatches, $fileName); } else { // No base path - $foundMatches[] = $baseFile; + array_push($foundMatches, $baseFile); } } else { // We found .php file but should not search for them, why? - debug_report_bug(__FUNCTION__, __LINE__, 'We should find files with extension=' . $extension . ', but we found a PHP script. (baseFile=' . $baseFile . ')'); + reportBug(__FUNCTION__, __LINE__, 'We should find files with extension=' . $extension . ', but we found a PHP script. (baseFile=' . $baseFile . ')'); } } elseif ($fileExtension == $extension) { // Other, generic file found - $foundMatches[] = $fileName; + array_push($foundMatches, $fileName); } } // END - while @@ -1918,7 +1805,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad return $foundMatches; } -// Checks wether $prefix is found in $fileName +// Checks whether $prefix is found in $fileName function isFilePrefixFound ($fileName, $prefix) { // @TODO Find a way to cache this return (substr($fileName, 0, strlen($prefix)) == $prefix); @@ -1928,10 +1815,14 @@ function isFilePrefixFound ($fileName, $prefix) { function mapModuleToTable ($moduleName) { // Map only these, still lame code... switch ($moduleName) { - // 'index' is the guest's menu - case 'index': $moduleName = 'guest'; break; - // ... and 'login' the member's menu - case 'login': $moduleName = 'member'; break; + case 'index': // 'index' is the guest's menu + $moduleName = 'guest'; + break; + + case 'login': // ... and 'login' the member's menu + $moduleName = 'member'; + break; + // Anything else will not be mapped, silently. } // END - switch @@ -1972,7 +1863,7 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { ); // Add it - $GLOBALS['debug_sqls'][] = $record; + array_push($GLOBALS['debug_sqls'], $record); } // Initializes the cache instance @@ -1980,7 +1871,7 @@ function initCacheInstance () { // Check for double-initialization if (isset($GLOBALS['cache_instance'])) { // This should not happen and must be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Double initialization of cache system detected. cache_instance[]=' . gettype($GLOBALS['cache_instance'])); + reportBug(__FUNCTION__, __LINE__, 'Double initialization of cache system detected. cache_instance[]=' . gettype($GLOBALS['cache_instance'])); } // END - if // Load include for CacheSystem class @@ -1992,7 +1883,7 @@ function initCacheInstance () { // Did it work? if ($GLOBALS['cache_instance']->getStatusCode() != 'done') { // Failed to initialize cache sustem - debug_report_bug(__FUNCTION__, __LINE__, 'Cache system returned with unexpected error. getStatusCode()=' . $GLOBALS['cache_instance']->getStatusCode()); + reportBug(__FUNCTION__, __LINE__, 'Cache system returned with unexpected error. getStatusCode()=' . $GLOBALS['cache_instance']->getStatusCode()); } // END - if } @@ -2034,9 +1925,9 @@ function getModuleFromFileName ($file, $accessLevel) { break; default: // Unsupported file name / access level - debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported file name=' . basename($file) . '/access level=' . $accessLevel); + reportBug(__FUNCTION__, __LINE__, 'Unsupported file name=' . basename($file) . '/access level=' . $accessLevel); break; - } + } // END - switch // Return result return $modCheck; @@ -2052,16 +1943,12 @@ function encodeUrl ($url, $outputMode = '0') { // Do we have a valid session? if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) { - // Invalid session // Determine right separator $separator = '&'; if (!isInString('?', $url)) { // No question mark $separator = '?'; - } elseif ((!isHtmlOutputMode()) || ($outputMode != '0')) { - // Non-HTML mode (or forced non-HTML mode - $separator = '&'; - } + } // END - if // Add it to URL if (session_id() != '') { @@ -2075,7 +1962,16 @@ function encodeUrl ($url, $outputMode = '0') { $url = '{?URL?}/' . $url; } // END - if - // Return the URL + // Do we have to decode entities? + if ((!isHtmlOutputMode()) || ($outputMode != '0')) { + // Decode them for e.g. JavaScript parts + $url = decodeEntities($url); + } // END - if + + // Debug log + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'url=' . $url . ',outputMode=' . $outputMode); + + // Return the encoded URL return $url; } @@ -2135,15 +2031,19 @@ function searchDirsRecursive ($dir, &$last_changed, $lookFor = 'Date') { function handleFieldWithBraces ($field) { // Are there braces [] at the end? if (substr($field, -2, 2) == '[]') { - // Try to find one and replace it. I do it this way to allow easy - // extending of this code. + /* + * Try to find one and replace it. I do it this way to allow easy + * extending of this code. + */ foreach (array('admin_list_builder_id_value') as $key) { + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key); // Is the cache entry set? if (isset($GLOBALS[$key])) { // Insert it $field = str_replace('[]', '[' . $GLOBALS[$key] . ']', $field); // And abort + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key, 'field=' . $field); break; } // END - if } // END - foreach @@ -2292,7 +2192,7 @@ function isHexadecimal ($hex) { } /** - * Replace "\r" with "[r]" and "\n" with "[n]" and add a final new-line to make + * Replace chr(13) with "[r]" and chr(10) with "[n]" and add a final new-line to make * them visible to the developer. Use this function to debug e.g. buggy HTTP * response handler functions. * @@ -2300,8 +2200,7 @@ function isHexadecimal ($hex) { * @return $str Overworked string */ function replaceReturnNewLine ($str) { - return str_replace("\r", '[r]', str_replace("\n", '[n] -', $str)); + return str_replace(array(chr(13), chr(10)), array('[r]', '[n]'), $str); } // Converts a given string by splitting it up with given delimiter similar to @@ -2313,7 +2212,7 @@ function stringToArray ($delimiter, $string) { // "Walk" through all entries foreach (explode($delimiter, $string) as $split) { // Append the delimiter and add it to the array - $strArray[] = $split . $delimiter; + array_push($strArray, $split . $delimiter); } // END - foreach // Return array @@ -2346,7 +2245,7 @@ function getArrayKeysFromSubStrArray ($heystack, $needles, $offset = 0) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'heystack='.$heystack.',key='.$key.',needle='.$needle.',offset='.$offset); if (strpos($heystack, $needle, $offset) !== false) { // Add the found key - $keys[] = $key; + array_push($keys, $key); } // END - if } // END - foreach @@ -2383,21 +2282,6 @@ function determinePointsColumnFromSubjectLocked ($subject, $locked) { return $pointsColumn; } -// Setter for referral id (no bigintval, or nicknames will fail!) -function setReferralId ($refid) { - $GLOBALS['refid'] = $refid; -} - -// Checks if 'refid' is valid -function isReferralIdValid () { - return ((isset($GLOBALS['refid'])) && (getReferralId() !== NULL) && (getReferralId() > 0)); -} - -// Getter for referral id -function getReferralId () { - return $GLOBALS['refid']; -} - // Converts a boolean variable into 'Y' for true and 'N' for false function convertBooleanToYesNo ($boolean) { // Default is 'N' @@ -2411,55 +2295,28 @@ function convertBooleanToYesNo ($boolean) { return $converted; } -// Translates task type to a human-readable version -function translateTaskType ($taskType) { - // Construct message id - $messageId = 'ADMIN_TASK_TYPE_' . strtoupper($taskType) . ''; - - // Is the message id there? - if (isMessageIdValid($messageId)) { - // Then construct message - $message = '{--' . $messageId . '--}'; - } else { - // Else it is an unknown task type - $message = '{%message,ADMIN_TASK_TYPE_UNKNOWN=' . $taskType . '%}'; - } // END - if - - // Return message - return $message; -} - -// Translates points subject to human-readable -function translatePointsSubject ($subject) { - // Construct message id - $messageId = 'POINTS_SUBJECT_' . strtoupper($subject) . ''; - - // Is the message id there? - if (isMessageIdValid($messageId)) { - // Then construct message - $message = '{--' . $messageId . '--}'; - } else { - // Else it is an unknown task type - $message = '{%message,POINTS_SUBJECT_UNKNOWN=' . $subject . '%}'; - } // END - if - - // Return message - return $message; -} - // "Translates" 'true' to true and 'false' to false function convertStringToBoolean ($str) { - // Trim it lower-case for validation - $str = trim(strtolower($str)); + // Debug message (to measure how often this function is called) + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str); - // Is it valid? - if (!in_array($str, array('true', 'false'))) { - // Not valid! - debug_report_bug(__FUNCTION__, __LINE__, 'str=' . $str . ' is not true/false'); + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__][$str])) { + // Trim it lower-case for validation + $strTrimmed = trim(strtolower($str)); + + // Is it valid? + if (!in_array($strTrimmed, array('true', 'false'))) { + // Not valid! + reportBug(__FUNCTION__, __LINE__, 'str=' . $str . '(' . $strTrimmed . ') is not true/false'); + } // END - if + + // Determine it + $GLOBALS[__FUNCTION__][$str] = (($strTrimmed == 'true') ? true : false); } // END - if - // Return it - return (($str == 'true') ? true : false); + // Return cache + return $GLOBALS[__FUNCTION__][$str]; } /** @@ -2473,19 +2330,112 @@ function makeParseableVariable ($varString) { // The first character must be a dollar sign if (substr($varString, 0, 1) != '$') { // Please report this - debug_report_bug(__FUNCTION__, __LINE__, 'varString=' . $varString . ' - No dollar sign detected, will not parse it.'); + reportBug(__FUNCTION__, __LINE__, 'varString=' . $varString . ' - No dollar sign detected, will not parse it.'); } // END - if // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$varString])) { // Snap them in, if [,] are there - $GLOBALS[__FUNCTION__][$varString] = str_replace('[', "['", str_replace(']', "']", $varString)); + $GLOBALS[__FUNCTION__][$varString] = str_replace(array('[', ']'), array("['", "']"), $varString); } // END - if // Return cache return $GLOBALS[__FUNCTION__][$varString]; } +// "Getter" for random TAN +function getRandomTan () { + // Generate one + return mt_rand(0, 99999); +} + +// Removes any : from subject +function removeDoubleDotFromSubject ($subject) { + // Remove it + $subjectArray = explode(':', $subject); + $subject = $subjectArray[0]; + unset($subjectArray); + + // Return it + return $subject; +} + +// Translates generically some data into a target string +function translateGeneric ($messagePrefix, $data) { + // Is the method null or empty? + if (is_null($data)) { + // Is NULL + $data = 'NULL'; + } elseif (empty($data)) { + // Is empty (string) + $data = 'EMPTY'; + } // END - if + + // Default column name is unknown + $return = '{%message,' . $messagePrefix . '_UNKNOWN=' . strtoupper($data) . '%}'; + + // Construct message id + $messageId = $messagePrefix . '_' . strtoupper($data); + + // Is it there? + if (isMessageIdValid($messageId)) { + // Then use it as message string + $return = '{--' . $messageId . '--}'; + } // END - if + + // Return the column name + return $return; +} + +// Translates task type to a human-readable version +function translateTaskType ($taskType) { + // Return it + return translateGeneric('ADMIN_TASK_TYPE', $taskType); +} + +// ---------------------------------------------------------------------------- +// "Translatation" functions for points_data table +// ---------------------------------------------------------------------------- + +// Translates points subject to human-readable +function translatePointsSubject ($subject) { + // Remove any :x + $subject = removeDoubleDotFromSubject($subject); + + // Return it + return translateGeneric('POINTS_SUBJECT', $subject); +} + +// "Translates" the given points account type +function translatePointsAccountType ($accountType) { + // Return it + return translateGeneric('POINTS_ACCOUNT_TYPE', $accountType); +} + +// "Translates" the given points "locked mode" +function translatePointsLockedMode ($lockedMode) { + // Return it + return translateGeneric('POINTS_LOCKED_MODE', $lockedMode); +} + +// "Translates" the given points payment method +function translatePointsPaymentMethod ($paymentMethod) { + // Return it + return translateGeneric('POINTS_PAYMENT_METHOD', $paymentMethod); +} + +// "Translates" the given points account provider +function translatePointsAccountProvider ($accountProvider) { + // Return it + return translateGeneric('POINTS_ACCOUNT_PROVIDER', $accountProvider); +} + +// "Translates" the given points notify recipient +function translatePointsNotifyRecipient ($notifyRecipient) { + // Return it + return translateGeneric('POINTS_NOTIFY_RECIPIENT', $notifyRecipient); +} + //----------------------------------------------------------------------------- // Automatically re-created functions, all taken from user comments on www.php.net //----------------------------------------------------------------------------- diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index bc376e20cf..686808daca 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 12e3a617ed..2364c35972 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/handler.php b/inc/handler.php index 7ef0c3be99..8aa40ee08f 100644 --- a/inc/handler.php +++ b/inc/handler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,7 +51,7 @@ function __errorHandler ($errno, $errstr, $errfile, $errline) { ); // Output message to user and die - debug_report_bug($errfile, $errline, $message); + reportBug($errfile, $errline, $message); } // Init error handler diff --git a/inc/header.php b/inc/header.php index ec433d0598..1754cbf9b5 100644 --- a/inc/header.php +++ b/inc/header.php @@ -18,7 +18,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,10 +43,10 @@ if (!defined('__SECURITY')) { } // END - if // Init header -$GLOBALS['page_header'] = ''; +$GLOBALS['__page_header'] = ''; // Is the header already sent? -if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { +if (($GLOBALS['__header_sent'] != 1) && ($GLOBALS['__header_sent'] != 2)) { // Set default HTTP status to "200 OK" setHttpStatus('200 OK'); @@ -57,15 +57,16 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { } // END - if // Closing HEAD tag - if ($GLOBALS['header_sent'] == '0') { - $GLOBALS['header_sent'] = 1; + if ($GLOBALS['__header_sent'] == '0') { + $GLOBALS['__header_sent'] = 1; } // END - if } // END - if // Add BODY tag or not? -if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) { +// @TODO Find a way to not use direct module comparison +if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['__header_sent'] == 1) && (getModule() != 'frametester') && (!isFramesetModeEnabled())) { loadTemplate('page_body'); - $GLOBALS['header_sent'] = 2; + $GLOBALS['__header_sent'] = 2; } // END - if // [EOF] diff --git a/inc/hourly/hourly_ b/inc/hourly/hourly_ index b6426e1de7..51d3e9b79b 100644 --- a/inc/hourly/hourly_ +++ b/inc/hourly/hourly_ @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/http-functions.php b/inc/http-functions.php index c1518e2ed5..c8cdf7acf3 100644 --- a/inc/http-functions.php +++ b/inc/http-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,12 @@ if (!defined('__SECURITY')) { die(); } // END - if +// Initialize HTTP handling +function initHttp () { + // Initialize array + $GLOBALS['http_header'] = array(); +} + // Sends out all headers required for HTTP/1.1 reply function sendHttpHeaders () { // Used later @@ -54,17 +60,18 @@ function sendHttpHeaders () { addHttpHeader('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 addHttpHeader('Pragma: no-cache'); // HTTP/1.0 addHttpHeader('Connection: Close'); - // There shall be no output mode in raw/AJAX mode - if ((!isRawOutputMode()) && (!isAjaxOutputMode())) { - // Send content-type only in CSS/HTML mode + + // There shall be no output mode in raw output-mode + if (!isRawOutputMode()) { + // Send content-type not in raw output-mode addHttpHeader('Content-Type: ' . getContentType() . '; charset=UTF-8'); - } else { - // } // END - if + + // Add language addHttpHeader('Content-Language: ' . getLanguage()); } -// Checks wether the URL is full-qualified (http[s]:// + hostname [+ request data]) +// Checks whether the URL is full-qualified (http[s]:// + hostname [+ request data]) function isFullQualifiedUrl ($url) { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$url])) { @@ -156,7 +163,7 @@ function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $remov break; default: // Unsupported HTTP request, this is really bad and needs fixing - debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported request detected. requestType=' . $requestType . ',baseUrl=' . $baseUrl . ',requestData()=' . count($requestData)); + reportBug(__FUNCTION__, __LINE__, 'Unsupported request detected. requestType=' . $requestType . ',baseUrl=' . $baseUrl . ',requestData()=' . count($requestData)); break; } // END - switch @@ -248,8 +255,8 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false return $response; } -// Send a POST request -function sendPostRequest ($baseUrl, $requestData, $removeHeader = false) { +// Send a POST request, sometimes even POST requests have no parameters +function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = false) { // Copy baseUrl to getUrl $getUrl = $baseUrl; @@ -328,7 +335,7 @@ function sendRawRequest ($host, $request) { $port = $portArray[1]; } elseif (count($portArray) > 2) { // This should not happen! - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid ' . $host . '. Please report this to the Mailer-Project team.'); + reportBug(__FUNCTION__, __LINE__, 'Invalid ' . $host . '. Please report this to the Mailer-Project team.'); } // Get resolver instance @@ -417,7 +424,7 @@ function sendRawRequest ($host, $request) { // Add it to response //* DEBUG: */ print 'line='.$line.'
    '; - $response[] = $line; + array_push($response, $line); } // END - while // Close socket @@ -544,7 +551,7 @@ function unchunkHttpResponse ($response) { //* DEBUG: */ die('tempResponse['.strlen($tempResponse).']=
    '.replaceReturnNewLine(htmlentities($tempResponse)).'
    '); // Re-add the headers - $response = merge_array($GLOBALS['http_headers'], stringToArray("\n", $tempResponse)); + $response = merge_array($GLOBALS['http_headers'], stringToArray(chr(10), $tempResponse)); } // END - if // Return the unchunked array @@ -565,7 +572,7 @@ function removeHttpHeaderFromResponse ($response) { array_shift($response2); // Add full line to temporary global array - $GLOBALS['http_headers'][] = $line; + array_push($GLOBALS['http_headers'], $line); // Trim it for testing $lineTest = trim($line); @@ -637,7 +644,7 @@ function extractHostnameFromUrl (&$script) { function addHttpHeader ($header) { // Send the header //* DEBUG: */ logDebugMessage(__FUNCTION__ . ': header=' . $header); - $GLOBALS['http_header'][] = trim($header); + array_push($GLOBALS['http_header'], trim($header)); } // Flushes all HTTP headers @@ -645,15 +652,17 @@ function flushHttpHeaders () { // Is the header already sent? if (headers_sent()) { // Then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Headers already sent!'); - } // END - if + reportBug(__FUNCTION__, __LINE__, 'Headers already sent!'); + } elseif ((!isset($GLOBALS['http_header'])) || (!is_array($GLOBALS['http_header']))) { + // Not set or not an array + reportBug(__FUNCTION__, __LINE__, 'Headers not set or not an array, isset()=' . isset($GLOBALS['http_header']) . ', please report this.'); + } // Flush all headers if found - if ((isset($GLOBALS['http_header'])) && (is_array($GLOBALS['http_header']))) { - foreach ($GLOBALS['http_header'] as $header) { - header($header); - } // END - foreach - } // END - if + foreach ($GLOBALS['http_header'] as $header) { + // Send a single header + header($header); + } // END - foreach // Mark them as flushed $GLOBALS['http_header'] = array(); @@ -696,7 +705,7 @@ if (!function_exists('http_chunked_decode')) { * dechunk an HTTP 'transfer-encoding: chunked' message. * * @param $chunk The encoded message - * @return $dechunk The decoded message. If $chunk wasn't encoded properly debug_report_bug() is being called + * @return $dechunk The decoded message. If $chunk wasn't encoded properly reportBug() is being called * @author Marques Johansson (initial author) * @author Roland Haeder (heavy modifications and simplification) * @link http://php.net/manual/en/function.http-chunked-decode.php#89786 @@ -735,7 +744,7 @@ next[offset,10]=
    '.replaceReturnNewLine(htmlentities(call_user_func_array($m
     			if (!isHexadecimal($chunkLenHex)) {
     				// Please help debugging this
     				//* DEBUG: */ die('ABORT:chunkLenHex=
    '.replaceReturnNewLine(htmlentities($chunkLenHex)).'
    '); - debug_report_bug(__FUNCTION__, __LINE__, 'Value ' . $chunkLenHex . ' is no valid hexa-decimal string.'); + reportBug(__FUNCTION__, __LINE__, 'Value ' . $chunkLenHex . ' is no valid hexa-decimal string.'); // This won't be reached return $chunk; @@ -809,5 +818,44 @@ next[100]=
    '.replaceReturnNewLine(htmlentities(call_user_func_array($mbPrefi
     	}
     } // END - if
     
    +// Getter for request method
    +function getHttpRequestMethod () {
    +	// Console is default
    +	$requestMethod = 'console';
    +
    +	// Is it set?
    +	if (isset($_SERVER['REQUEST_METHOD'])) {
    +		// Get current request method
    +		$requestMethod = $_SERVER['REQUEST_METHOD'];
    +	} // END - if
    +
    +	// Return it
    +	return $requestMethod;
    +}
    +
    +// Checks if 'content_type' is set
    +function isContentTypeSet () {
    +	return isset($GLOBALS['content_type']);
    +}
    +
    +// Setter for content type
    +function setContentType ($contentType) {
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'contentType=' . $contentType);
    +	$GLOBALS['content_type'] = (string) $contentType;
    +}
    +
    +// Getter for content type
    +function getContentType () {
    +	// Is it there?
    +	if (!isContentTypeSet()) {
    +		// Please fix this
    +		reportBug(__FUNCTION__, __LINE__, 'content_type not set in GLOBALS array.');
    +	} // END - if
    +
    +	// Return it
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content_type=' . $GLOBALS['content_type']);
    +	return $GLOBALS['content_type'];
    +}
    +
     // [EOF]
     ?>
    diff --git a/inc/inc-functions.php b/inc/inc-functions.php
    index 8d3a036efe..7b33f37322 100644
    --- a/inc/inc-functions.php
    +++ b/inc/inc-functions.php
    @@ -16,7 +16,7 @@
      * $Author::                                                          $ *
      * -------------------------------------------------------------------- *
      * Copyright (c) 2003 - 2009 by Roland Haeder                           *
    - * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
    + * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
      * For more information visit: http://mxchange.org                      *
      *                                                                      *
      * This program is free software; you can redistribute it and/or modify *
    @@ -42,49 +42,53 @@ if (!defined('__SECURITY')) {
     
     // Init INC_POOL
     function initIncludePool ($pool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
     	$GLOBALS['inc_pool'][$pool] = array();
     }
     
     // Setter for INC_POOL
     function setIncludePool ($pool, $includePool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
     	$GLOBALS['inc_pool'][$pool] = (array) $includePool;
     }
     
     // Getter for INC_POOL
     function getIncludePool ($pool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
    +	// Default is empty pool
    +	$poolArray = array();
    +
    +	// Is it set?
     	if (isset($GLOBALS['inc_pool'][$pool])) {
     		// Return found pool (array)
    -		return $GLOBALS['inc_pool'][$pool];
    -	} else {
    -		// Return empty array if not found
    -		return array();
    -	}
    +		$poolArray = $GLOBALS['inc_pool'][$pool];
    +	} // END - if
    +
    +	// Return it
    +	return $poolArray;
     }
     
     // Count INC_POOL
     function countIncludePool ($pool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
     	return count($GLOBALS['inc_pool'][$pool]);
     }
     
     // Merge INC_POOL into given
     function mergeIncludePool ($pool, $includePool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
     	setIncludePool($pool, merge_array(getIncludePool($pool), $includePool));
     }
     
     // Add single include file to INC_POOL
     function addIncludeToPool ($pool, $inc) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    -	$GLOBALS['inc_pool'][$pool][] = (string) $inc;
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
    +	array_push($GLOBALS['inc_pool'][$pool], $inc);
     }
     
     // Remove an include file from INC_POOL
     function removeIncludeFromPool ($pool, $inc) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool);
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
     	// First look it up
     	$key = array_search($inc, getIncludePool($pool));
     
    @@ -100,12 +104,12 @@ function removeIncludeFromPool ($pool, $inc) {
     
     // Load the whole include pool
     function loadIncludePool ($pool) {
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - START');
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool.' - START');
     	foreach (getIncludePool($pool) as $inc) {
     		//* DEBUG: */ debugOutput(__FUNCTION__.':inc='.$inc);
     		loadIncludeOnce($inc);
     	} // END - foreach
    -	//* DEBUG: */ debugOutput(__FUNCTION__.':pool='.$pool.' - END');
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool.' - END');
     
     	// Remove it
     	initIncludePool($pool);
    @@ -115,14 +119,14 @@ function loadIncludePool ($pool) {
     function loadInclude ($inc) {
     	// Do we have cache?
     	if (!isset($GLOBALS['inc_loaded'][$inc])) {
    -		// Add the path. This is why we need a trailing slash in config.php
    -		$GLOBALS['inc_loaded'][$inc] = getPath() . $inc;
    -
     		// Is the include file there?
     		if (!isIncludeReadable($inc)) {
     			// Not there so log it
    -			debug_report_bug(__FUNCTION__, __LINE__, sprintf("Include file %s not found or deprecated.", $inc));
    +			reportBug(__FUNCTION__, __LINE__, sprintf("Include file %s not found or deprecated.", $inc));
     		} // END - if
    +
    +		// Add the path. This is why we need a trailing slash in config.php
    +		$GLOBALS['inc_loaded'][$inc] = getPath() . $inc;
     	} // END - if
     
     	// Try to load it
    @@ -141,7 +145,7 @@ function loadIncludeOnce ($inc) {
     	} // END - if
     }
     
    -// Checks wether an include file (non-FQFN better) is readable
    +// Checks whether an include file (non-FQFN better) is readable
     function isIncludeReadable ($inc) {
     	// Do we have cache?
     	if (!isset($GLOBALS['inc_readable'][$inc])) {
    diff --git a/inc/install-functions.php b/inc/install-functions.php
    index 51596123fd..003feec90f 100644
    --- a/inc/install-functions.php
    +++ b/inc/install-functions.php
    @@ -16,7 +16,7 @@
      * $Author::                                                          $ *
      * -------------------------------------------------------------------- *
      * Copyright (c) 2003 - 2009 by Roland Haeder                           *
    - * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
    + * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
      * For more information visit: http://mxchange.org                      *
      *                                                                      *
      * This program is free software; you can redistribute it and/or modify *
    @@ -36,18 +36,52 @@
      ************************************************************************/
     
     // Some security stuff...
    -if (!defined('__SECURITY')) {
    +if ((!defined('__SECURITY')) || (!isInstallationPhase())) {
     	die();
     } // END - if
     
    +// Init installer
    +function initInstaller () {
    +	// Initialize installer group array
    +	$GLOBALS['installer_groups'] = array(
    +		// base_data
    +		'base_path'       => 'base_data',
    +		'base_url'        => 'base_data',
    +		'main_title'      => 'base_data',
    +		'slogan'          => 'base_data',
    +		'webmaster'       => 'base_data',
    +		// database_config
    +		'mysql_host'      => 'database_config',
    +		'mysql_dbase'     => 'database_config',
    +		'mysql_prefix'    => 'database_config',
    +		'mysql_type'      => 'database_config',
    +		'mysql_login'     => 'database_config',
    +		'mysql_password1' => 'database_config',
    +		'mysql_password2' => 'database_config',
    +		// smtp_config
    +		'smtp_host'       => 'smtp_config',
    +		'smtp_user'       => 'smtp_config',
    +		'smtp_password1'  => 'smtp_config',
    +		'smtp_password2'  => 'smtp_config',
    +		// other_config
    +		'output_mode'     => 'other_config',
    +		'warn_no_pass'    => 'other_config',
    +		'write_footer'    => 'other_config',
    +		'enable_backlink' => 'other_config',
    +	);
    +}
    +
     // Write the local config-local.php file from "template"
    -function doInstallWriteLocalConfig () {
    +function doInstallWriteLocalConfigurationFile ($path) {
     	// Copy the config template and verify it
    -	copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', getPath() . getCachePath() . 'config-local.php', 0644);
    +	copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', postRequestElement('spath') . getCachePath() . 'config-local.php', 0644);
     
     	// Ok, all done. So we can write the config data to the php files
    +	// Do only write these if they differ from auto-detected values
     	if (postRequestElement('spath') != getPath()) changeDataInLocalConfigurationFile('SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestElement('spath'), 0);
     	if (postRequestElement('burl')  != getUrl())  changeDataInLocalConfigurationFile('HOST-URL', "setConfigEntry('URL', '", "');", postRequestElement('burl'), 0);
    +
    +	// Write more data
     	changeDataInLocalConfigurationFile('MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestElement('title'), 0);
     	changeDataInLocalConfigurationFile('SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestElement('slogan'), 0);
     	changeDataInLocalConfigurationFile('WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestElement('email'), 0);
    @@ -65,11 +99,8 @@ function doInstallWriteLocalConfig () {
     	changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0);
     	changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0);
     
    -	// Generate a long site key
    -	$siteKey = generatePassword(50);
    -
    -	// And write it
    -	changeDataInLocalConfigurationFile('SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0);
    +	// Generate a long site-key and write it
    +	changeDataInLocalConfigurationFile('SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", generatePassword(50), 0);
     
     	// Script is now installed
     	changeDataInLocalConfigurationFile('INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0);
    @@ -117,12 +148,474 @@ function readSqlDump ($FQFN) {
     	$content = readFromFile($FQFN);
     
     	// Remove some unwanted chars
    -	$content = str_replace("\r", '', $content);
    -	$content = str_replace("\n\n", "\n", $content);
    +	$content = str_replace(chr(13), '', $content);
    +	$content = str_replace("\n\n", chr(10), $content);
     
     	// Return the content
     	return $content;
     }
     
    +// Generates the installer menu by simply loading another template
    +function generateInstallerMenu () {
    +	// Load installer menu template
    +	$OUT = loadTemplate('install_menu', true);
    +
    +	// Return loaded content
    +	return $OUT;
    +}
    +
    +// Generate the install footer navigation by simply loading another template
    +function generateInstallerFooterNavigation () {
    +	// Load installer menu template
    +	$OUT = loadTemplate('install_footer', true);
    +
    +	// Return loaded content
    +	return $OUT;
    +}
    +
    +// Generate an option list for database types for given default value
    +function generateInstallerDatabaseTypeOptions () {
    +	return generateOptions(
    +		'/ARRAY/',
    +		array('MyISAM', 'InnoDB'),
    +		array('{--INSTALLER_TABLE_TYPE_MYISAM--}', '{--INSTALLER_TABLE_TYPE_INNODB--}'),
    +		getSession('mysql_type')
    +	);
    +}
    +
    +// Generate an option list for output mode types for given default value
    +function generateInstallerOutputModeOptions ($defaultValue) {
    +	return generateOptions(
    +		'/ARRAY/',
    +		array('render', 'direct'),
    +		array('{--INSTALLER_MODE_RENDER--}', '{--INSTALLER_MODE_DIRECT--}'),
    +		$defaultValue
    +	);
    +}
    +
    +// Checks whether we have an AJAX-enabled installer which defaults to red pill
    +function isAjaxInstaller () {
    +	// Get the session data and compare it against 'ajax'
    +	$isAjaxInstaller = (getSession('installer') == 'ajax');
    +
    +	// Return it
    +	return $isAjaxInstaller;
    +}
    +
    +// Checks whether we have an plain installer which defaults to red pill
    +function isPlainInstaller () {
    +	// Get the session data and compare it against 'plain'
    +	$isPlainInstaller = (getSession('installer') == 'plain');
    +
    +	// Return it
    +	return $isPlainInstaller;
    +}
    +
    +// Checks given key/value pair if it is valid by a call-back
    +function isInstallerDataValid (&$saveStatus, $key, $value) {
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ' - ENTERED!');
    +	// Generate call-back function based on given key
    +	$callbackName = 'isInstaller' . capitalizeUnderscoreString($key) . 'Valid';
    +
    +	// Is the function there?
    +	if (!function_exists($callbackName)) {
    +		// Not found, which is not bad, but it means this data is always valid
    +		//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackName . ' not found. saveStatus[status]=' . $saveStatus['status'] . ', key=' . $key . ', value=' . $value);
    +
    +		// All fine (CAREFULL!)
    +		return true;
    +	} // END - if
    +
    +	// Then call it back
    +	$isValid = (bool) call_user_func($callbackName, $value);
    +
    +	// Is it not valid?
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',isValid=' . intval($isValid));
    +	if ($isValid === false) {
    +		// Then add it to saveStatus
    +		array_push($saveStatus['failed_fields'], $key);
    +	} // END - if
    +
    +	// Return status
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',isValid=' . intval($isValid) . ' - EXIT!');
    +	return $isValid;
    +}
    +
    +// Post-check on installer data
    +function doInstallerPostCheck ($currentTab, &$saveStatus) {
    +	// Debug message
    +	//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentTab=' . $currentTab . ',saveStatus[status]=' . $saveStatus['status'] . ' - ENTERED!');
    +
    +	// Create the call-back function on 'tab'
    +	$callbackName = 'isInstallerPost' . capitalizeUnderscoreString($currentTab) . 'Valid';
    +
    +	// Is the function there?
    +	if (!function_exists($callbackName)) {
    +		// Not found, which is not bad, but it means the post-check won't be run
    +		//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackName . ' not found. saveStatus[status]=' . $saveStatus['status'] . ', currentTab=' . $currentTab);
    +
    +		// Abort here
    +		return;
    +	} // END - if
    +
    +	// Init 'tab-specific error message'
    +	$GLOBALS['installer_post_error'][$currentTab]    = '';
    +	$GLOBALS['installer_failed_fields'][$currentTab] = array();
    +
    +	// Debug message
    +	//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Calling function ' . $callbackName . ',currentTab=' . $currentTab . ',saveStatus[status]=' . $saveStatus['status']);
    +
    +	// Then call it back
    +	$isValid = (bool) call_user_func($callbackName, $currentTab);
    +
    +	// Is it not valid?
    +	if (($isValid === false) || (count($GLOBALS['installer_failed_fields'][$currentTab]) > 0)) {
    +		// Then change status and message
    +		$saveStatus['status']  = 'failed';
    +		$saveStatus['message'] = '{%message,INSTALLER_POST_CHECK_' . strtoupper($currentTab) . '_FAILED=' . $GLOBALS['installer_post_error'][$currentTab] . '%}';
    +
    +		// Do we have failed fields?
    +		if (count($GLOBALS['installer_failed_fields'][$currentTab]) > 0) {
    +			// Then merge both
    +			$saveStatus['failed_fields'] = merge_array($saveStatus['failed_fields'], $GLOBALS['installer_failed_fields'][$currentTab]);
    +		} // END - if
    +	} // END - if
    +
    +	// Debug message
    +	//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentTab=' . $currentTab . ',saveStatus[status]=' . $saveStatus['status'] . ' - EXIT!');
    +}
    +
    +// Determines an installer group by given key
    +function determineInstallerGroupByKey ($key) {
    +	// Try to look it up
    +	if (!isset($GLOBALS['installer_groups'][$key])) {
    +		// Log missing entry
    +		logDebugMessage(__FUNCTION__, __LINE__, 'Cannot determine installer group, returning dummy group. key=' . $key);
    +
    +		// Return dummy group
    +		return 'dummy';
    +	} // END - if
    +
    +	// Return it
    +	return $GLOBALS['installer_groups'][$key];
    +}
    +
    +// Adds given key/value pair to an overview group
    +function addKeyValueToInstallerOverviewGroup ($key, $value) {
    +	// First determine the group by given key
    +	$group = determineInstallerGroupByKey($key);
    +
    +	// Depending on the group, add it for later usage (to render the overview page)
    +	$GLOBALS['installer_overview'][$group][$key] = $value;
    +}
    +
    +//-----------------------------------------------------------------------------
    +//                   Call-back functions to check validity
    +//-----------------------------------------------------------------------------
    +
    +// ----------------- Base data -----------------
    +
    +// Call-back function to check validity of 'base_path'
    +function isInstallerBasePathValid ($value) {
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' - ENTERED!');
    +	// Is it a directory and if some typical files could be found
    +	$isValid = (
    +		// Is it a directory?
    +		(isDirectory($value))
    +	&&
    +		// Is there a trailing slash?
    +		(substr($value, -1, 1) == '/')
    +	&&
    +		// Is mysql-manager.php there?
    +		(isFileReadable($value . 'inc/mysql-manager.php'))
    +	&&
    +		// What about gen_sql_patches.php?
    +		(isFileReadable($value . 'inc/gen_sql_patches.php'))
    +	);
    +
    +	// Return it
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',isValid=' . intval($isValid) . ' - EXIT');
    +	return $isValid;
    +}
    +
    +// Call-back function to check validity of 'base_url'
    +function isInstallerBaseUrlValid ($value) {
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' - ENTERED!');
    +	// Is it same as URL
    +	$isValid = (
    +		// Same as URL?
    +		($value == getUrl())
    +	|| (
    +		// Starts with http:// or https:// ?
    +		((substr($value, 0, 7) == 'http://') || (substr($value, 0, 8) == 'https://'))
    +	&&
    +		// Has no trailing slash?
    +		(substr($value, -1, 1) != '/')
    +	&&
    +		// And total length is at least 6+8=14 chars long? (https://foo.ba)
    +		(strlen($value) >= 14)
    +	&&
    +		// Is the URL valid?
    +		(isUrlValid($value))
    +	));
    +
    +	// Return it
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',isValid=' . intval($isValid) . ' - EXIT');
    +	return $isValid;
    +}
    +
    +// Call-back function to check validity of 'webmaster'
    +function isInstallerWebmasterValid ($value) {
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' - ENTERED!');
    +	// Is it a valid email address?
    +	$isValid = (
    +		// Is it a valid email address?
    +		(isEmailValid($value))
    +	||
    +		// Or do we have 'localhost/127.0.0.1' as hostname? Then don't check email address (e.g. you@localhost)
    +		(in_array(detectServerName(), array('localhost', '127.0.0.1')))
    +	);
    +
    +	// Return it
    +	//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ',isValid=' . intval($isValid) . ' - EXIT');
    +	return $isValid;
    +}
    +
    +// ----------------- Database configuration -----------------
    +
    +// Call-back function to check validity of 'mysql_host'
    +function isInstallerMysqlHostValid ($value) {
    +	// This value must match a hostname or IP address
    +	$isValid = (
    +		// Is localhost/127.0.0.1? (mostly the case)
    +		(in_array($value, array('localhost', '127.0.0.1')))
    +	||
    +		// IP number match (this regex was taken from www.regexlib.com)
    +		(preg_match('/((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))/', $value))
    +	||
    +		// Host name match
    +		(preg_match('/([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}/', $value))
    +	);
    +
    +	// Return it
    +	return $isValid;
    +}
    +
    +// Call-back function to check validity of 'mysql_type'
    +function isInstallerMysqlTypeValid ($value) {
    +	// This value must be 'MyISAM' or 'InnoDB'
    +	$isValid = in_array($value, array('MyISAM', 'InnoDB'));
    +
    +	// Return it
    +	return $isValid;
    +}
    +
    +// ----------------- SMTP configuration -----------------
    +
    +// ----------------- Other configuration -----------------
    +
    +//-----------------------------------------------------------------------------
    +//                 Call-back functions to post-check validity
    +//-----------------------------------------------------------------------------
    +
    +// Call-back function to check if database configuration in POST is valid
    +function isInstallerPostDatabaseConfigValid ($currentTab) {
    +	// By default nothing is valid
    +	$isValid       = false;
    +	$engineValid   = false;
    +	$missingTables = 0;
    +
    +	// Do both passwords match?
    +	if ((!isPostRequestElementSet('mysql_password1')) && (isPostRequestElementSet('mysql_password2'))) {
    +		// Password 1 not set
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORD1_EMPTY--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password1');
    +		return false;
    +	} elseif ((isPostRequestElementSet('mysql_password1')) && (!isPostRequestElementSet('mysql_password2'))) {
    +		// Password 2 not set
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORD2_EMPTY--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password2');
    +		return false;
    +	} elseif (postRequestElement('mysql_password1') != postRequestElement('mysql_password2')) {
    +		// Passwords mismatch
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORDS_MISMATCH--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password1', 'mysql_password2');
    +		return false;
    +	} // END - if
    +
    +	// Restore PHP's own error handler
    +	if (!restore_error_handler()) {
    +		// This is fatal
    +		reportBug(__FUNCTION__, __LINE__, 'Could not unregister error handler.');
    +	} // END - if
    +
    +	// Try to connect to the database
    +	$linkResource = SQL_CONNECT(postRequestElement('mysql_host'), postRequestElement('mysql_login'), postRequestElement('mysql_password1'), __FUNCTION__, __LINE__);
    +
    +	// Is the link up
    +	if (!is_resource($linkResource)) {
    +		// Restore own error handler again
    +		set_error_handler('__errorHandler');
    +
    +		// Cannot connect to database
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_CONNECT_ERROR--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_login', 'mysql_password1', 'mysql_password2');
    +		return false;
    +	} // END - if
    +
    +	// Then attempt to select the database
    +	if (!SQL_SELECT_DB(postRequestElement('mysql_dbase'), __FUNCTION__, __LINE__)) {
    +		// Restore own error handler again
    +		set_error_handler('__errorHandler');
    +
    +		// Could not find database
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_SELECT_FAILED--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase');
    +		return false;
    +	} // END - if
    +
    +	// Set database name and prefix
    +	setConfigEntry('__DB_NAME'    , postRequestElement('mysql_dbase'));
    +	setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql_prefix'));
    +
    +	// Restore own error handler again
    +	set_error_handler('__errorHandler');
    +
    +	// Get an array of all supported engines
    +	$engines = getArrayFromSupportedSqlEngines();
    +
    +	// Is this an array?
    +	if (!is_array($engines)) {
    +		// Restore own error handler again
    +		set_error_handler('__errorHandler');
    +
    +		// Something bad happened
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINES_SQL_ERROR--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
    +		return false;
    +	} elseif (count($engines) == 0) {
    +		// Restore own error handler again
    +		set_error_handler('__errorHandler');
    +
    +		// No engine is active
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_NO_ENGINES_ACTIVE--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
    +		return false;
    +	}
    +
    +	// Then check all, if the requested is working
    +	foreach ($engines as $engineArray) {
    +		// By default the selected engine is not valid
    +		$engineValid = false;
    +
    +		// Is the engine there?
    +		if (strtolower($engineArray['Engine']) == strtolower(postRequestElement('mysql_type'))) {
    +			// Okay, engine is found
    +			$engineValid = true;
    +			break;
    +		} // END - if
    +	} // END - foreach
    +
    +	// So, is the engine found?
    +	if ($engineValid === false) {
    +		// Restore own error handler again
    +		set_error_handler('__errorHandler');
    +
    +		// Requested engine is not active
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINE_UNSUPPORTED--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type');
    +		return false;
    +	} // END - if
    +
    +	// Init some known tables
    +	$tables = array(
    +		// Admins
    +		'admins'      => true,
    +		// Admin menu
    +		'admin_menu'  => true,
    +		// Categories
    +		'cats'        => true,
    +		// Configuration
    +		'config'      => true,
    +		// Extensions
    +		'extensions'  => true,
    +		// Guest menu
    +		'guest_menu'  => true,
    +		// Max receive
    +		'max_receive' => true,
    +		// Member menu
    +		'member_menu' => true,
    +		// Module registry
    +		'mod_reg'     => true,
    +		// Payments
    +		'payments'    => true,
    +		// Sending pool
    +		'pool'        => true,
    +		// Referral banner
    +		'refbanner'   => true,
    +		// Referral levels
    +		'refdepths'   => true,
    +		// Referral system
    +		'refsystem'   => true,
    +		// Task system
    +		'task_system' => true,
    +	);
    +
    +	// So check if all tables are not there
    +	foreach ($tables as $tableName => $isFound) {
    +		// Check it out
    +		$tables[$tableName] = isSqlTableCreated($tableName);
    +
    +		// Is it (hopefully not) there?
    +		if ($tables[$tableName] === false) {
    +			// This does not exist
    +			$missingTables++;
    +		} // END - if
    +	} // END - foreach
    +
    +	// Determine final status (simply compare both counts
    +	$isValid = (count($tables) == $missingTables);
    +
    +	// Disconnect here, we don't need idle database connections laying around
    +	SQL_CLOSE(__FUNCTION__, __LINE__);
    +
    +	// Restore own error handler again
    +	set_error_handler('__errorHandler');
    +
    +	// If the status is true, disconnect the database
    +	if ($isValid === false) {
    +		// Still something bad happened (e.g. tables found)
    +		$GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_IN_USE--}';
    +		array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase');
    +	} // END - if
    +
    +	// Return status
    +	return $isValid;
    +}
    +
    +// Call-back function to check if enable_backlink is Y/N
    +function isInstallerEnableBacklinkValid ($currentTab) {
    +	// Check and return it
    +	return in_array($currentTab, array('Y', 'N'));
    +}
    +
    +// Call-back function to check if warn_no_pass is Y/N
    +function isInstallerWarnNoPassValid ($currentTab) {
    +	// Check and return it
    +	return in_array($currentTab, array('Y', 'N'));
    +}
    +
    +// Call-back function to check if write_footer is Y/N
    +function isInstallerWriteFooterValid ($currentTab) {
    +	// Check and return it
    +	return in_array($currentTab, array('Y', 'N'));
    +}
    +
    +// Call-back function to check if output_mode is Y/N
    +function isInstallerOutputModeValid ($currentTab) {
    +	// Check and return it
    +	return in_array($currentTab, array('render', 'direct'));
    +}
    +
     // [EOF]
     ?>
    diff --git a/inc/install-inc.php b/inc/install-inc.php
    index 0f4244cbf6..28db1db9a3 100644
    --- a/inc/install-inc.php
    +++ b/inc/install-inc.php
    @@ -16,7 +16,7 @@
      * $Author::                                                          $ *
      * -------------------------------------------------------------------- *
      * Copyright (c) 2003 - 2009 by Roland Haeder                           *
    - * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
    + * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
      * For more information visit: http://mxchange.org                      *
      *                                                                      *
      * This program is free software; you can redistribute it and/or modify *
    @@ -35,12 +35,8 @@
      * MA  02110-1301  USA                                                  *
      ************************************************************************/
     
    -/************************************************************************
    - *      YOU MAY ALSO WANT TO REMOVE THIS FILE AFTER INSTALLTION!        *
    - ************************************************************************/
    -
     // Some security stuff...
    -if (!defined('__SECURITY')) {
    +if ((!defined('__SECURITY')) || (!isInstallationPhase())) {
     	die();
     } // END - if
     
    @@ -55,43 +51,43 @@ FILTER_INIT_TIMEZONE(array());
     
     // Init variables
     $GLOBALS['install_mysql'] = array();
    -if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) {
    +if ((isPostRequestElementSet('mysql')) && (ifPostContainsSelections('mysql'))) {
     	// Transfer 'mysql' array
     	$GLOBALS['install_mysql'] = postRequestElement('mysql');
     } // END - if
     
     // Check if both passwords from SMTP are matching
    -if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) {
    +if ((isGetRequestElementSet('install_page') && (getRequestElement('install_page') == 5))) {
     	// Okay, we have to check it
     	if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) {
     		// Hostname not set
    -		addToInstallContent('
    {--INSTALL_SMTP_HOSTNAME_EMPTY--}
    '); - setGetRequestElement('page', 3); + addToInstallContent('
    {--INSTALLER_SMTP_HOSTNAME_EMPTY--}
    '); + setGetRequestElement('install_page', 3); } // END - if if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty - addToInstallContent('
    {--INSTALL_SMTP_PASSWORD1_EMPTY--}
    '); - setGetRequestElement('page', 3); + addToInstallContent('
    {--INSTALLER_SMTP_PASSWORD1_EMPTY--}
    '); + setGetRequestElement('install_page', 3); } // END - if if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty - addToInstallContent('
    {--INSTALL_SMTP_PASSWORD2_EMPTY--}
    '); - setGetRequestElement('page', 3); + addToInstallContent('
    {--INSTALLER_SMTP_PASSWORD2_EMPTY--}
    '); + setGetRequestElement('install_page', 3); } // END - if if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching - addToInstallContent('
    {--INSTALL_SMTP_PASS_MISMATCH--}
    '); - setGetRequestElement('page', 3); + addToInstallContent('
    {--INSTALLER_SMTP_PASS_MISMATCH--}
    '); + setGetRequestElement('install_page', 3); } // END - if } // END - if // Is the mailer installed or no admin registered so far? if ((!isInstalled()) || (!isAdminRegistered())) { // Output page for entered value - switch (getRequestElement('page')) { + switch (getRequestElement('install_page')) { case 'welcome': // Welcome to the installation! addTemplateToInstallContent('install_welcome'); break; @@ -217,15 +213,16 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Check for dumps if ((!isFileReadable(postRequestElement('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestElement('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found - debug_report_bug(__FILE__, __LINE__, 'SQL dumps not found. Please extract ALL files from the archive or checkout all files out from SVN.'); + reportBug(__FILE__, __LINE__, 'SQL dumps not found. Please extract ALL files from the archive or checkout all files out from SVN.'); return; } // END - if // Any errors detected? if (!ifFatalErrorsDetected()) { - // Set type and prefix from POST data + // Set type, prefix from POST data and database name for later queries setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type')); setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix')); + setConfigEntry('__DB_NAME' , $GLOBALS['install_mysql']['dbase']); // Both exists so import them foreach (array('tables', 'menu-'.getLanguage()) as $dump) { @@ -241,7 +238,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { mergeSqls(explode(";\n", $fileContent), 'install'); } else { // Not readable! - debug_report_bug(__FILE__, __LINE__, sprintf("SQL dump %s is not readable!", $dump)); + reportBug(__FILE__, __LINE__, sprintf("SQL dump %s is not readable.", $dump)); } } // END - foreach //* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'
    '.print_r(getSqls(), true).'
    '); @@ -249,19 +246,20 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Are some SQLs found? if (countSqls() == 0) { // Abort here - addFatalMessage(__FILE__, __LINE__, '{--INSTALL_SQL_IMPORT_FAILED--}'); + addFatalMessage(__FILE__, __LINE__, '{--INSTALLER_SQL_IMPORT_FAILED--}'); return; } // END - if - // Now run all queries through and try to keep out empty or comment queries + // Now run all queries through runFilterChain('run_sqls'); // Copy the config template and verify it - doInstallWriteLocalConfig(); + doInstallWriteLocalConfigurationFile(postRequestElement('spath')); } // END - if } // END - if } // END - if + // Are some fatal errors there? if (ifFatalErrorsDetected()) { $OUT = ''; foreach (getFatalArray() as $value) { @@ -286,12 +284,18 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // We have handled all fatal errors here initFatalMessages(); } else { - // Installation is done! - redirectToUrl('install.php?page=finished'); + // Register ext-sql_patches + if ((registerExtension('sql_patches', NULL)) && (registerExtension('task', NULL))) { + // Installation is done! + redirectToUrl('install.php?install_page=finished'); + } else { + // Something goes wrong on registration of ext-sql_patches + addFatalMessage(__FILE__, __LINE__, '{--INSTALLER_FINALIZER_CANNOT_REGISTER_SQL_PATCHES--}'); + } } } else { // Something goes wrong during installation! :-( - addFatalMessage(__FILE__, __LINE__, '{--INSTALL_FINALIZER_FAILED--}'); + addFatalMessage(__FILE__, __LINE__, '{--INSTALLER_FINALIZER_FAILED--}'); } break; @@ -306,7 +310,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; default: - logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Wrong install_page=%s detected", getRequestElement('install_page'))); addTemplateToInstallContent('admin_settings_unsaved', '{--WRONG_PAGE--}'); break; } // END - switch diff --git a/inc/js/js- b/inc/js/js- index 129a73d8dc..568b9fce55 100644 --- a/inc/js/js- +++ b/inc/js/js- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-admin_ajax.php b/inc/js/js-admin_ajax.php new file mode 100644 index 0000000000..b1bc377d2c --- /dev/null +++ b/inc/js/js-admin_ajax.php @@ -0,0 +1,54 @@ + getRequestElement('admin_page') +); + +// Simply load the JavaScript here +loadTemplate('js_admin_ajax', false, $content); + +// [EOF] +?> diff --git a/inc/js/js-cookies_disabled.php b/inc/js/js-cookies_disabled.php index 15dd459f3c..53aa1213b5 100644 --- a/inc/js/js-cookies_disabled.php +++ b/inc/js/js-cookies_disabled.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-install_ajax.php b/inc/js/js-install_ajax.php new file mode 100644 index 0000000000..39c54a66c4 --- /dev/null +++ b/inc/js/js-install_ajax.php @@ -0,0 +1,54 @@ + getRequestElement('install_page') +); + +// Simply load the JavaScript here +loadTemplate('js_install_ajax', false, $content); + +// [EOF] +?> diff --git a/inc/js/js-order_send.php b/inc/js/js-order_send.php index 8d66423992..32579458c7 100644 --- a/inc/js/js-order_send.php +++ b/inc/js/js-order_send.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-surfbar_frame_top.php b/inc/js/js-surfbar_frame_top.php index cc9c63e55c..2013426452 100644 --- a/inc/js/js-surfbar_frame_top.php +++ b/inc/js/js-surfbar_frame_top.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,19 +43,19 @@ if (!defined('__SECURITY')) { } // Init surfbar -SURFBAR_INIT(); +initSurfbar(); // Init data -SURFBAR_DETERMINE_NEXT_ID(getRequestElement('url_id')); +determineSurfbarNextId(getRequestElement('url_id')); // Check reload-locks -SURFBAR_CHECK_RELOAD_FULL(); +isSurfbarReloadFull(); // Prepare content $content = array( 'url_id' => bigintval(getRequestElement('url_id')), - 'check' => SURFBAR_GENERATE_VALIDATION_CODE(getRequestElement('url_id'), SURFBAR_GET_LAST_SALT()), - 'salt' => SURFBAR_GET_LAST_SALT(), + 'check' => generateSurfbarValidationCode(getRequestElement('url_id'), gerSurfbarLastSalt()), + 'salt' => gerSurfbarLastSalt(), ); // Load template diff --git a/inc/js/js-surfbar_member_book.php b/inc/js/js-surfbar_member_book.php index ffd0027307..9f923e59e9 100644 --- a/inc/js/js-surfbar_member_book.php +++ b/inc/js/js-surfbar_member_book.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-surfbar_member_edit.php b/inc/js/js-surfbar_member_edit.php index 669ce13d8f..88b66423fb 100644 --- a/inc/js/js-surfbar_member_edit.php +++ b/inc/js/js-surfbar_member_edit.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-surfbar_stopped.php b/inc/js/js-surfbar_stopped.php index f9f06636ad..035cef0da0 100644 --- a/inc/js/js-surfbar_stopped.php +++ b/inc/js/js-surfbar_stopped.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/js/js-uberwach.php b/inc/js/js-uberwach.php index 0dcf30a085..f552e4fa9c 100644 --- a/inc/js/js-uberwach.php +++ b/inc/js/js-uberwach.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language-functions.php b/inc/language-functions.php index 2f3486d033..3d716d966f 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -96,7 +96,7 @@ function addMessages ($messages) { } } -// Checks wether given message id is valid +// Checks whether given message id is valid function isMessageIdValid ($messageId) { return (isset($GLOBALS['messages'][getCurrentLanguage()][$messageId])); } @@ -111,7 +111,7 @@ function setCurrentLanguage ($language) { $GLOBALS['language'] = (string) $language; } -// Checks wether current language is set +// Checks whether current language is set function isCurrentLanguageSet () { return (isset($GLOBALS['language'])); } @@ -162,7 +162,7 @@ function setLanguage ($lang) { setSession('mailer_lang', $lang); } -// Checks wether a language file is there for optional extension +// Checks whether a language file is there for optional extension function isLanguageIncludeReadable ($ext_name = 'none') { // Do we have array element? if (!isset($GLOBALS['lang_inc'][$ext_name])) { @@ -280,13 +280,13 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { // Is one not readable? if (!isIncludeReadable($source)) { // Please report this bug! - debug_report_bug(__FUNCTION__, __LINE__, 'Source file ' . $source . ' is not readable.'); + reportBug(__FUNCTION__, __LINE__, 'Source file ' . $source . ' is not readable.'); } elseif (!isIncludeReadable($target)) { // Please report this bug! - debug_report_bug(__FUNCTION__, __LINE__, 'Target file ' . $target . ' is not readable.'); + reportBug(__FUNCTION__, __LINE__, 'Target file ' . $target . ' is not readable.'); } elseif ($targetLanguage == getCurrentLanguage()) { // Must be different - debug_report_bug(__FUNCTION__, __LINE__, 'Target language ' . $targetLanguage . ' is same as current.'); + reportBug(__FUNCTION__, __LINE__, 'Target language ' . $targetLanguage . ' is same as current.'); } // Backup current messages/language @@ -347,16 +347,16 @@ function getLanguageComparisonDifference ($target) { return $GLOBALS['lang_diff_count'][$target]; } -// Checks wether the given message is masked -function isMessageMasked ($messageId) { +// Checks whether the given message is masked +function isMessageMasked ($messageId, $strict = true) { // Is the message id valid? - if (!isMessageIdValid($messageId)) { + if (($strict === true) && (!isMessageIdValid($messageId))) { // No, then abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid message id ' . $messageId . ' detected.'); + reportBug(__FUNCTION__, __LINE__, 'Invalid message id ' . $messageId . ' detected.'); } // END - if // Now simply check it - $masked = isInString('%', $GLOBALS['messages'][getCurrentLanguage()][$messageId]); + $masked = isInString('%', getMessage($messageId)); // Return result return $masked; diff --git a/inc/language/_de.php b/inc/language/_de.php index e5f8f68253..5b04e05805 100644 --- a/inc/language/_de.php +++ b/inc/language/_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/_en.php b/inc/language/_en.php index 9e34cafdf8..5c3904ca28 100644 --- a/inc/language/_en.php +++ b/inc/language/_en.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/active_de.php b/inc/language/active_de.php index 7308af471c..fb12cc2991 100644 --- a/inc/language/active_de.php +++ b/inc/language/active_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/active_en.php b/inc/language/active_en.php index 8d3d8711d3..f5cde475e3 100644 --- a/inc/language/active_en.php +++ b/inc/language/active_en.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/admins_de.php b/inc/language/admins_de.php index 11a40df1ed..4dc8ca6d96 100644 --- a/inc/language/admins_de.php +++ b/inc/language/admins_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/autopurge_de.php b/inc/language/autopurge_de.php index 5d2ceaa29b..bf51d393b8 100644 --- a/inc/language/autopurge_de.php +++ b/inc/language/autopurge_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -83,6 +83,9 @@ addMessages(array( 'ADMIN_CONFIG_AUTOPURGE_ACTIVE' => "Auto-Löschung von Bestätigungslink ist aktiviert?", 'ADMIN_CONFIG_MAIL_LIFETIME' => "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)", 'ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE' => "Mailbestätigungslinks löschen", + + // Points accounts - subject + 'POINTS_SUBJECT_AUTOPURGE_ADD' => "Mailrückvergütung durch Autolöschung", )); // [EOF] diff --git a/inc/language/bank_de.php b/inc/language/bank_de.php index 42954d95be..2f80824e93 100644 --- a/inc/language/bank_de.php +++ b/inc/language/bank_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/beg_de.php b/inc/language/beg_de.php index 593e54528d..15fe28557a 100644 --- a/inc/language/beg_de.php +++ b/inc/language/beg_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -76,20 +76,20 @@ addMessages(array( 'BEG_SAME_USERID_AS_OWN' => "Mitglied-Id des Webmasters benutzt.", 'MEMBER_BEG_LINK_TITLE' => "Ihr Bettellink zum Bewerben", -// Pay modes + // Pay modes 'ADMIN_CONFIG_BEG_PAY_MODE' => "Wie sollen {?POINTS?} vergütet werden?", 'ADMIN_CONFIG_BEG_PAY_MODE_IMG' => "Abgesichert durch ein 1x1-Pixel", 'ADMIN_CONFIG_BEG_PAY_MODE_JS' => "Abgesichert durch ein Fake-JavaScript", 'ADMIN_CONFIG_BEG_PAY_MODE_BOTH' => "Durch beides obriges absichern", 'ADMIN_CONFIG_BEG_PAY_MODE_NONE' => "Keine Absicherung (unsicher)", -// More strings for beg link + // More strings for beg link 'BEG_LINK_PAY_BOTH_1' => "Das Mitglied ", 'BEG_LINK_PAY_BOTH_2' => " hat bei Ihnen gerade ", 'BEG_LINK_PAY_BOTH_3' => " {?POINTS?} erbettelt. Dies war der ", 'BEG_LINK_PAY_BOTH_4' => ". Klick auf seinen Bettellink. Vielen Dank für Ihre Spende.", -// Begging rallye + // Begging rallye 'BEG_RANK' => "Bettel-Rank", 'BEG_TOTAL' => "Gesamt erbettelt", 'BEG_POINTS' => "Erbettelt", @@ -97,9 +97,9 @@ addMessages(array( 'ADMIN_BEG_TIMEOUT' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am %s noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.", 'ADMIN_CONFIG_BEG_RALLYE_TITLE' => "Einstellungen an der Bettel-Rallye", 'ADMIN_CONFIG_BEG_RALLYE_ACTIVE' => "Ist die Bettel-Rallye aktiv? (Mails können optional versendet werden!)", - 'ADMIN_CONFIG_BEG_RALLYE_ONLY_ACTIVE' => "Nur aktive Mitglieder nehmen dran?
    (Nur in Verbindung mit der Erweiterung autopurge!)
    ", + 'ADMIN_CONFIG_BEG_RALLYE_ONLY_ACTIVE' => "Nur aktive Mitglieder nehmen dran Teil?
    (Nur in Verbindung mit der Erweiterung ext-autopurge!)
    ", 'ADMIN_BEG_NO_RALLYE' => "Niemand nimmt an der Bettel-Rallye dran teil.", - 'ADMIN_BEG_WITHDRAW_NOW' => "Jetzt Vergütung Bettel-Rallye vergüten", + 'ADMIN_BEG_WITHDRAW_NOW' => "Jetzt die Vergütung Bettel-Rallye vorbereiten", 'ADMIN_BEG_WITHDRAW_NOTICE' => "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr.", 'ADMIN_BEG_WITHDRAW_PREPARED' => "Vergütung der Bettel-Rallye vorbereitet.", 'ADMIN_BEG_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Bettel-Rallye sind dick marktiert.", @@ -126,13 +126,31 @@ addMessages(array( 'ADMIN_CONFIG_BEG_INCLUDE_OWN' => "Soll Ihre Mitglied-Id an der Bettel-Rallye dran teilnehmen?", 'ADMIN_LIST_BEG_TITLE' => "Alle Teilnehmer der Bettel-Rallye auflisten", -// Task overview + // Task overview 'ADMIN_TASK_LIST_BEG' => "Bettel-Rallye-Teilnehmer", 'ADMIN_TASK_LIST_BEG_TITLE' => "Es nehmen Mitglieder an der Bettel-Rallye dran teil.", -// Subject lines - 'BEG_RALLYE_ENABLE_SUBJECT' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.", + // Subject lines + 'BEG_RALLYE_ENABLE_SUBJECT' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.", 'BEG_RALLYE_DISABLE_SUBJECT' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt.", + + // Point account subjects + 'POINTS_SUBJECT_BEG' => "Bettellinkaufruf vergütet", + 'POINTS_SUBJECT_BEG_REF' => "Bettellinkaufruf anteilig vergütet", + 'POINTS_SUBJECT_MONTHLY_BEG' => "Ausschüttung aus monatl. Bettelrallye", + 'POINTS_SUBJECT_MONTHLY_BEG_REF' => "Anteilige Ausschüttung aus monatl. Bettelrallye", + + // Admin - subject lines + 'ADMIN_DIRECT_BEG_SUBJECT' => "Mitglied hat {?POINTS?} per Direktgutschrift beim Betteln erhalten", + 'ADMIN_REFERRAL_BEG_SUBJECT' => "Mitglied hat {?POINTS?} per Referralgutchrift beim Betteln erhalten", + 'ADMIN_REFERRAL_BEG_REF_SUBJECT' => "Mitglied hat anteilig {?POINTS?} per Referralgutchrift beim Betteln erhalten", + 'ADMIN_REFERRAL_MONTHLY_BEG_SUBJECT' => "Mitglied hat {?POINTS?} in der monatl. Bettelrallye per Referralgutschrift erhalten", + + // Member - subject lines + 'MEMBER_DIRECT_BEG_SUBJECT' => "Sie haben anteilig {?POINTS?} beim Betteln erhalten", + 'MEMBER_REFERRAL_BEG_SUBJECT' => "Sie haben anteilig {?POINTS?} beim Betteln erhalten", + 'MEMBER_REFERRAL_BEG_REF_SUBJECT' => "Sie haben {?POINTS?} beim Betteln erhalten", + 'MEMBER_REFERRAL_MONTHLY_BEG_SUBJECT' => "{?POINTS?} in der monatl. Bettelrallye per Referralgutschrift erhalten", )); // [EOF] diff --git a/inc/language/birthday_de.php b/inc/language/birthday_de.php index 99f6346fdd..3a03fb31f0 100644 --- a/inc/language/birthday_de.php +++ b/inc/language/birthday_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,13 +42,20 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( - 'MEMBER_HAPPY_BIRTHDAY_SUBJECT' => "Herzlichen Glückwunsch zum Geburtstag.", + // Admin config 'ADMIN_CONFIG_BIRTHDAY_TITLE' => "Einstellungen zu Geburtstagsmails", 'ADMIN_CONFIG_BIRTHDAY_POINTS' => "{?POINTS?} als "Geburtstagsgeschenk"", 'ADMIN_CONFIG_BIRTHDAY_POINTS_NOTICE' => "Wert 0 deaktiviert die Extragutschrift.", + 'ADMIN_CONFIG_BIRTHDAY_ONLY_ACTIVE' => "Sollen nur aktive Mitglieder Geburtsgr¨ße erhalten?", + 'ADMIN_CONFIG_BIRTHDAY_NOTICE' => "Aktive Mitglieder können nur erkannt werden, wenn ext-autopurge installiert ist.", + + // Member messages + 'MEMBER_HAPPY_BIRTHDAY_SUBJECT' => "Herzlichen Glückwunsch zum Geburtstag.", 'MEMBER_BIRTHDAY_CANNOT_STATUS' => "Kann keine {?POINTS?} gutschreiben! Status Ihres Accounts: {%%pipe,translateUserStatus=%s%%}", 'MEMBER_BIRTHDAY_CANNOT_LOAD_DATA' => "Entweder haben Sie bereits Ihr Geburtsgeschenk erhalten oder Sie haben heute keinen Geburtstag.", - 'ADMIN_CONFIG_BIRTHDAY_ONLY_ACTIVE' => "Nur aktive Mitglieder erhalten die Geburtstagsgutschrift?
    (Nur in Verbindung mit der Erweiterung ext-autopurge!)
    ", + + // Points account subject + 'POINTS_SUBJECT_BIRTHDAY_CONFIRM' => "Geburtstagsgutschrift durch Bestätigung", )); // [EOF] diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index f7436a48be..6359959e20 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -75,7 +75,7 @@ addMessages(array( 'MEMBER_BONUS_HERE_IS_THE_LIST' => "Hier finden Sie die aktuelle Liste mit den möglichen Gewinnern.", 'MEMBER_MONTHLY_BONUS_WON_SUBJECT' => "Gewonnen: Monatliche Aktiv-Rallye", 'ADMIN_BONUS_TURBO_TOTAL' => "Aktiv-Bonus", - 'ADMIN_BONUS_WITHDRAW_NOW' => "Jetzt Aktiv-Bonus vergüten", + 'ADMIN_BONUS_WITHDRAW_NOW' => "Jetzt die Vergütung der Aktiv-Bonus vorbereiten", 'ADMIN_BONUS_WITHDRAW_NOTICE' => "Es wird nur die Vergütung vorbereitet. Die eigentliche Vergütung erfolgt beim Täglichen Reset um 00:00 Uhr.", 'ADMIN_BONUS_WITHDRAW_PREPARED' => "Vergütung des Aktiv-Bonuses vorbereitet.", 'ADMIN_BONUS_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Aktiv-Rallye sind dick marktiert.", @@ -122,7 +122,7 @@ addMessages(array( 'ADMIN_NO_NOTIFICATIONS' => "Keine Benachrichtigungen gefunden.", 'ADMIN_LINKS_BONUS_MAIL_TITLE' => "Bonus-Mail %s:", 'ADMIN_EDIT_BONUS_EMAIL_TITLE' => "Daten der Bonus-Mail Nr. %s ändern", - 'MONTHLY_BONUS_RALLYE_GOOD_LUCK' => "Wir wünschen allen Mitgliedern viel Glück bei der monatlichen Aktiv-Rallye!", + 'MONTHLY_BONUS_RALLYE_GOOD_LUCK' => "Wir wünschen allen Mitgliedern viel Glück bei der monatlichen Aktiv-Rallye.", 'MONTHLY_BONUS_RALLYE_RANKS_NOTICE' => "Es können nur die ersten {?bonus_ranks?} die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.", 'ADMIN_SEND_BONUS_MAIL_TITLE' => "Bonus-{?POINTS?}-Mail versenden:", @@ -144,6 +144,16 @@ addMessages(array( // Admin 'bonus' mail actions 'ADMIN_EDIT_BONUS_MAIL_LINK' => "Bonus-Mail bearbeiten", 'ADMIN_DELETE_BONUS_MAIL_LINK' => "Bonus-Mail SOFORT löschen", + + // Points accounts - subject + 'POINTS_SUBJECT_MONTHLY_BONUS' => "Ausschüttung aus monatl. Aktivrallye", + 'POINTS_SUBJECT_MONTHLY_BONUS_REF' => "Anteilige Ausschüttung aus monatl. Aktivrallye", + + // Admin - subject lines + 'ADMIN_REFERRAL_MONTHLY_BONUS_SUBJECT' => "Aktiv-Rallye als Referralgutschrift vergütet", + + // Member - subject lines + 'MEMBER_REFERRAL_MONTHLY_BONUS_SUBJECT' => "Aktiv-Rallye als Referralgutschrift erhalten", )); // [EOF] diff --git a/inc/language/booking_de.php b/inc/language/booking_de.php index eff7c6641c..8f1bd6eb31 100644 --- a/inc/language/booking_de.php +++ b/inc/language/booking_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/cache_de.php b/inc/language/cache_de.php index b892c99891..00cef4c12d 100644 --- a/inc/language/cache_de.php +++ b/inc/language/cache_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,12 +42,12 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( -// Administrative settings + // Administrative settings 'ADMIN_CACHE_STATS_TITLE' => "Statistiken des Caching-Systems", 'ADMIN_CACHE_DB_HITS' => "Zugriffe auf die Datenbank", 'ADMIN_CACHE_HITS' => "Zugriffe auf den Cache", 'ADMIN_CACHE_PERCENTS' => "Prozentual (*)", - 'ADMIN_CACHE_NOTICE' => "(*): Sollten bei Ihnen die Prozente unter 50% liegen und Sie nicht vor September 2008 das Script *neu* installiert haben, so ist dies kein Grund zur Besorgnis. Im Normalfall sollten die Prozente seit eigenen Revisionen im September 2008 (R300+) über 50% liegen.", + 'ADMIN_CACHE_STATS_NOTICE' => "(*): Sollten bei Ihnen die Prozente unter 50% liegen und Sie nicht vor September 2008 das Script *neu* installiert haben, so ist dies kein Grund zur Besorgnis. Im Normalfall sollten die Prozente seit eigenen Revisionen im September 2008 (R300+) über 50% liegen.", 'ADMIN_TOTAL_HITS' => "Gesamtzugriffe", 'ADMIN_CACHE_DB_STATS_DEACTIVATED' => "Datenbank-/Cache-Statistiken sind deaktiviert. Dies ist gut für die Performance.", )); diff --git a/inc/language/country_de.php b/inc/language/country_de.php index ea3688205b..0cd90d1fd6 100644 --- a/inc/language/country_de.php +++ b/inc/language/country_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/coupon_de.php b/inc/language/coupon_de.php index 767cb49010..2f7625386b 100644 --- a/inc/language/coupon_de.php +++ b/inc/language/coupon_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ addMessages(array( 'ADMIN_SEND_COUPON' => "Gutschein versenden", 'ADMIN_SEND_COUPON_POINTS_NOT_ENTERED' => "Bitte geben Sie eine Vergütung (in {?POINTS?}) ein.", 'ADMIN_SEND_COUPON_DESCRIPTION_NOT_ENTERED' => "Bitte geben Sie eine kurze Beschreibung (oder einen Hinweis an Ihre Mitglieder) ein.", - 'ADMIN_SEND_COUPON_USER_404' => "Es wurden keine empfangsbereiten Mitglieder gefunden!", + 'ADMIN_SEND_COUPON_USER_404' => "Es wurden keine empfangsbereiten Mitglieder gefunden.", 'ADMIN_SEND_COUPON_DONE' => "Es wurde ein Gutschein an alle empfangsbereiten Mitglieder versendet.", // Admin - More @@ -98,6 +98,9 @@ addMessages(array( 'COUPON_TOTAL_CREATED' => "Erstellt", 'COUPON_TOTAL_CASHED' => "Eingelöst", 'COUPON_DESCRIPTION' => "Hinweistext", + + // Point account subjects + 'POINTS_SUBJECT_COUPON_CASHED' => "Einlösung eines Gutscheins", )); // [EOF] diff --git a/inc/language/de.php b/inc/language/de.php index 34efbc7ab3..3e57c4a8ed 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,12 +44,13 @@ if (!defined('__SECURITY')) { addMessages(array( // Language constants 'MODULE_REGISTRY_404' => "Modul {%pipe,getModule%} existiert nicht.", + 'MODULE_REGISTRY_LOCKED_404' => "Gsperrtes Modul {%pipe,getModule%} existiert nicht.", 'MODULE_REGISTRY_IS_LOCKED' => "Das Modul {%pipe,getModule%} wurde gesperrt.", 'MODULE_ERROR_404' => "Fehler: Modul nicht gefunden", 'UNKNOWN_MODULE_DETECTED_TITLE' => "Unbekanntes Modul '%s'", 'MAILER_WARNING' => "Warnung", 'DIE_CONFIG_CHANGED_YOU' => "Sie haben Ihre Config-Datei editiert! Auf Wiedersehen...", - 'DIE_RUN_INSTALL_MYSQL' => "Bitte rufen Sie http://your-domain.com/install.php auf, damit die Konfigurationsdaten zur Datenbank eingerichtet werden können.", + 'DIE_RUN_INSTALLER_MYSQL' => "Bitte rufen Sie {?URL?}/install.php auf, damit die Konfigurationsdaten zur Datenbank eingerichtet werden können.", 'WARN_NULL_PASSWORD' => "Sie haben kein Passwort eingegeben! Bitte lesen Sie in der {?CACHE_PATH?}config-local.php nach, wie Sie diese Warnung abschalten können.", 'FATAL_CONFIG_WRITABLE' => "Ihre Datei {?CACHE_PATH?}config-local.php ist beschreibbar! Dies ist ein mögliches Sicherheitsrisiko.", 'FATAL_CANNOT_WRITE_CONFIG' => "Kann Konfigurationsdaten nicht speichern, da ich keinen Schreibzugriff auf {?CACHE_PATH?}config-local.php habe.", @@ -71,7 +72,7 @@ addMessages(array( 'ADMIN_ACCOUNT_FIRST_CREATION_LOGIN' => "Geben Sie einen Administrator-Loginnamen ein", 'ADMIN_ACCOUNT_FIRST_CREATION_PASSWORD1' => "Vergeben Sie dazu ein Passwort", 'ADMIN_ACCOUNT_FIRST_CREATION_PASSWORD2' => "Das Passwort erneut eingeben", - 'ADMIN_NO_PASS' => "Kein Passwort eingegeben!", + 'ADMIN_NO_PASS' => "Kein Passwort eingegeben.", 'CLEAR_FORM' => "Nochmal eingeben", 'ADMIN_ACCOUNT_FIRST_CREATION_SUBMIT' => "Admin-Account erstellen", 'ADMIN_NO_LOGIN' => "Sie haben keinen Loginnamen eingegeben.", @@ -183,11 +184,12 @@ addMessages(array( 'ADMIN_MAX_VALUE' => "Maximal zu empfangene Mails", 'ADMIN_MAX_COMMENT' => "Hinweis zum Maximal-Wert", 'NO_MAX_VALUES' => "Derzeit klappt die Anmeldung nicht, da Sie keine maximal zu empfangenen Mails einstellen können.", - 'MAX_PER_DAY' => "Maximale Anzahl an Klick-Mails pro Tag", + 'MAX_MAILS_PER_DAY' => "Maximale Anzahl an Klick-Mails pro Tag", + 'ADMIN_MAX_MAILS_PER_DAY' => "Maximale Anzahl an Klick-Mails pro Tag einstellen:", 'PER_DAY' => "Mails", 'REFID_BY' => "Sie wurden geworben von", - 'TERMS_OF_USAGE' => "AGBs zustimmen und absenden", - 'AGREE_TO_THIS' => "Stimmen Sie unseren [AGBs] zu?", + 'TERMS_OF_USAGE' => "AGBs zustimmen und absenden", + 'AGREE_TO_THIS' => "Stimmen Sie unseren [AGBs] zu?", 'SUBMIT_REGISTER' => "Anmeldedaten abschicken", 'HAVE_TO_AGREE' => "Sie müssen unseren AGBs zustimmen, damit Sie an diesem {?mt_word?} teilnehmen können.", 'ENTER_BOTH_PASSWORDS' => "Bitte geben Sie ein Passwort und das selbe Passwort noch einmal ein.", @@ -246,29 +248,21 @@ addMessages(array( 'GUEST_MAY_LOGIN_HERE' => "Sie können sich nun hier einloggen:", 'GUEST_THANX_CONFIRM' => "Email-Adresse bestätigt", 'GOTO_TOP' => "Nach oben", - 'YOUR_LOGIN' => "Ihre Login-Id lautet", + 'YOUR_LOGIN' => "Ihre Mitglieds-Id lautet", 'LOGIN_URL' => "URL zum Login", 'GUEST_LOGIN_MEMBER' => "Einloggen zum Mitgliederbereich", - 'GUEST_ENTER_LOGIN' => "Login-Id", + 'GUEST_ENTER_LOGIN' => "Mitglieds-Id", 'GUEST_ENTER_PASSWORD' => "Passwort", 'LOGIN_SUBMIT' => "Einloggen", 'GUEST_GET_NEW_PASS' => "Neues Passwort zuschicken", 'GUEST_ENTER_EMAIL' => "Angemeldete Email-Adresse", 'NEW_PASSWD' => "Jetzt zuschicken", - 'GUEST_WRONG_ID_EMAIL' => "Konnte Account-Daten nicht auffinden! Vermutlich haben Sie eine falsche Login-Id oder Email-Adresse eingegeben! Bitte probieren Sie es nochmal.", + 'GUEST_WRONG_ID_EMAIL' => "Konnte Account-Daten nicht auffinden! Vermutlich haben Sie eine falsche Mitglieds-Id oder Email-Adresse eingegeben! Bitte probieren Sie es nochmal.", 'GUEST_NEW_PASS_1' => "Sie oder ein anderes Mitglied", 'GUEST_NEW_PASS_2' => "haben soben ein neues Passwort angefordert. Hier ist Ihr neues Passwort:", 'YOUR_NEW_PASS' => "Neues Passwort", 'GUEST_NOT_THIS_REPORT' => "Sollten Sie dies nicht gewesen sein, so melden Sie sich bitte bei uns!\n\nMit freundlichen Grüßen,", 'GUEST_NEW_PASSWORD' => "Ihre Passwortanfrage", - 'LOGIN_UNKNOWN_CODE' => "Unbekannter Rückgabewert.", - 'LOGIN_WRONG_PASS' => "Falsches Passwort eingegben.", - 'LOGIN_WRONG_ID' => "Es wurde kein Account unter Ihren eingegebenen Logindaten gefunden.", - 'LOGIN_STATUS_LOCKED' => "Ihr Account wurde gesperrt. Sperrgrund: {%user,lock_reason%}, Sperrzeitpunkt: {%user,lock_timestamp,generateDateTime%}", - 'LOGIN_STATUS_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre Email-Adresse! Haben Sie den Bestätigungslink verloren? Links im Menü unter "Bestätigungslink" können Sie ihn erneut anfordern.", - 'LOGIN_COOKIES_DISABLED' => "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt.", - 'LOGIN_UNKNOWN_ERROR' => "Es ist ein unerwarteter Account-Status aufgetreten. Bitte melden Sie sich beim Support dieses {?mt_word2?}.", - 'LOGIN_UNKNOWN_STATUS' => "Ihr Account weisst einen unbekannten Status auf. Bitte melden Sie sich beim Support dieses {?mt_word2?}.", 'GUEST_SELECT_LIFETIME' => "Wie lange soll Auto-Login aktiv sein?", 'LIFE_CLOSE_BROWSER' => "Browser wurde geschlossen", 'LIFE_HOURS' => "Stunde(n)", @@ -283,13 +277,10 @@ addMessages(array( 'USERNAME_UNKNOWN' => "Name ist nicht ladbar", 'USERNAME_ADMIN' => "Administrator", 'USERNAME_ADMIN_SHORT' => "Admin", - 'LAST_ONLINE' => "Sie waren als letztes Online am", - 'LAST_MODULE' => "Ihr zuletzt ausgewähltes Modul", + 'USERNAME_AJAXJ' => "AJAX", + 'MEMBER_LAST_ONLINE' => "Sie waren als letztes Online am", + 'MEMBER_LAST_WHAT' => "Ihr zuletzt ausgewähltes Modul", 'MEMBER_EDIT_PROFILE' => "Profildaten ändern", - 'GENDER' => "Anrede", - 'GENDER_M' => "Herr", - 'GENDER_F' => "Frau", - 'GENDER_C' => ""Firma"", 'SAVE_CHANGES' => "Änderungen speichern", 'MEMBER_MYDATA_NOTICE' => "Geben Sie nur bei Passwort Ihr aktuelles Passwort ein, wenn Sie nur Daten ändern wollen. Geben Sie bei Passwortbestätigung das neue Passwort erneut ein, wenn Sie Ihr aktuelles Passwort ändern wollen.", 'MEMBER_UPDATE_PWD_WRONG' => "Bitte geben Sie Ihr aktuelles Passwort zum Ändern Ihrer Einstellungen ein. Wir haben dies zur Sicherheit unserer Mitglieder eingebaut.", @@ -304,7 +295,7 @@ addMessages(array( 'MEMBER_MYDATA_MAIL_SENT' => "Es ist eine Email zu Ihnen unterwegs.", 'ADMIN_CHANGED_DATA' => "Profildaten geändert", 'ADMIN_MEMBER_CHANGED_PROFILE' => "Eines Ihrer Mitglieder hat seine Profildaten geändert.", - 'MEMBER_USERID' => "Seine Login-Id lautet", + 'MEMBER_USERID' => "Seine Mitglieds-Id lautet", 'LOGOUT_DONE' => "Ausloggen abgeschlossen.", 'LOGOUT_FAILED' => "Ausloggen fehlgeschlagen.", 'MEMBER_NO_CATEGORIES' => "Es wurden bis jetzt noch keine Kategorien eingerichtet.", @@ -341,17 +332,17 @@ addMessages(array( 'REFERRAL_IS_ACTIVE' => "Aktiv?", 'POINTS_USED' => "Verbrauchte {?POINTS?}", 'MEMBER_POINTS_LEFT' => "{?POINTS?}-Guthaben zum Mailversand übrig", - 'SELECT_MAIL_TYPE' => "Mailart auswählen", + 'MEMBER_SELECT_MAIL_TYPE' => "Mailart auswählen:", 'PLEASE_SELECT' => "Bitte auswählen", 'PER_MAIL' => "{?POINTS?} / Mail", 'PAYMENT' => "{?POINTS?} Vergütung", - 'SELECT_CATEGORY' => "Zielkategorie", - 'USER_IN_CAT' => "Empfänger", - 'ENTER_RECEIVER' => "Empfängeranzahl", - 'ENTER_SUBJECT' => "Betreffzeile", - 'ENTER_TEXT' => "Werbetext", + 'SELECT_CATEGORY' => "Zielkategorie auswählen:", + 'USERS_IN_CATEGORY' => "Empfänger", + 'ENTER_RECEIVER' => "Empfängeranzahl:", + 'ENTER_SUBJECT' => "Betreffzeile:", + 'ENTER_TEXT' => "Werbetext:", 'MEMBER_PLEASE_NOTICE' => "Bitte beachten Sie vor dem Absenden:", - 'MEMBER_ENTER_URL' => "URL", + 'MEMBER_ENTER_URL' => "URL eingeben:", 'CONTINUE_FRAMETESTER' => "Weiter zum Framekiller-Test", 'MEMBER_URL_TIME_LOCK' => "Sie hatten bereits die selbe URL gebucht:", 'MEMBER_LAST_TIME_LOCK' => "Ihre letzte Buchung war am", @@ -365,7 +356,7 @@ addMessages(array( 'MEMBER_BLIST_TIME' => "Datum der Sperrung war", 'MEMBER_SELECTED_MORE_RECS' => "Sie haben für diese Kategorie zu viele Empfänger eingegeben.", 'MEMBER_GO_BACK' => "Zurück zum Buchungsformular", - 'MEMBER_DO_ORDER' => "Mailbuchung so aufgeben.", + 'MEMBER_DO_ORDER' => "Mailbuchung so aufgeben", 'LOADER_NOT_WORKING' => "Falls die Weiterleitung nicht automatisch in einer Sekunde klappen sollte,", 'LOADER_CLICK_HERE' => "so kommen Sie hier zur externen Seite weiter", 'CLICK_HERE' => "Klick.", @@ -382,7 +373,8 @@ addMessages(array( 'ADMIN_NEW_QUEUE' => "Mailbuchung in Ihrem {?mt_word?}", 'MEMBER_NEW_QUEUE' => "Vielen Dank für die Mailbuchung.", 'MEMBER_CONTINUE_AREA' => "Weiter zum Mitgliedsbereich", - 'MEMBER_THANX_ORDER' => "Vielen Dank für Ihre Mailbuchung! Es ist eine Mail zu Ihnen unterwegs.", + 'MEMBER_THANX_ORDER_TITLE' => "Vielen Dank für Ihre Mailbuchung!", + 'MEMBER_THANX_ORDER' => "Es ist eine Mail mit weiteren Details zu Ihnen unterwegs.", 'ADMIN_NO_MAILS_IN_POOL' => "Es wurden noch keine Mailbuchungen aufgegeben, kann somit keine Mails anzeigen.", 'ADMIN_POOL_CONTENT' => "Mailbuchungen im Sende-Pool", 'POOL_TYPE_UNKNOWN' => "Unbekannt (%s)", @@ -457,7 +449,7 @@ addMessages(array( 'ADMIN_NO_NONE_REGISTERED' => "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. ", 'ADMIN_MEMBER_404' => "Mitglieds-Account %s existiert nicht.", 'LAST_ONLINE_SHORT' => "Zuletzt Online", - 'ADMIN_LAST_MODULE' => "Letzte Aktion", + 'ADMIN_LAST_WHAT' => "Letzte Aktion", 'RECEIVE_MAILS' => "Kann Mails empfangen", 'REFERRAL_CLICKS' => "Klicks auf Ref-Link", 'TOTAL_LOGINS' => "Logins gesamt", @@ -526,7 +518,7 @@ addMessages(array( 'USERS_LINKS' => "Unbestätigte Mails", 'USERS_STATS' => "Werbebuchungen", 'USERS_SENT_MAILS' => "Gesendete Mails", - 'USERS_MAX_PER_DAY' => "Versendbare Mails pro Tag", + 'USERS_MAX_MAILS_PER_DAY' => "Versendbare Mails pro Tag", 'USERS_MAX_REC' => "Heute versendbare Mails", 'ADMIN_EDIT_CATEGORIES_TITLE' => "Kategorien ändern", 'ADMIN_CATEGORY_ID' => "Kategorie-Id", @@ -559,7 +551,6 @@ addMessages(array( 'REFERRALS' => "Referrals", 'MEMBER_PART_POINTS' => "Teilsummen", 'KBYTES' => "KBytes", - 'DEFAULT_SUBJECT_LINE' => "Klick-Mail von {?MAIN_TITLE?}", 'MEBER_UPDATE_PWD_WRONG' => "Sie haben das falsche Passwort eingegeben! Bitte nochmal versuchen.", 'ADMIN_MEMBER_NO_CATEGORIES' => "Das Mitglied {%%pipe,generateUserProfileLink=%s%%} hat keine Kategorien ausgewählt.", 'USER_ID' => "Mitglied", @@ -628,7 +619,6 @@ addMessages(array( 'ADMIN_IS_VISIBLE' => "Wird angezeigt", 'ADMIN_IS_ACTIVE' => "Aktiviert", 'ADMIN_CHANGE_ENTRIES' => "Änderungen durchführen", - 'BASE_URL_NOTICE' => "Ohne abschliessendem /.", 'ADMIN_WRONG_CALL' => "Falscher Aufruf einer Aktion oder des Scriptes. Bitte navigieren Sie links weiter.", 'ADMIN_IS_SYSTEM_TASK' => "System-Task", 'ADMIN_NEW_EXTENSION_SUBJECT' => "Neue Erweiterung gefunden", @@ -636,8 +626,9 @@ addMessages(array( 'ADMIN_TASK_TEXT' => "Aufgabentext", 'ADMIN_REGISTER_EXTENSION' => "Installieren", 'ADMIN_REGISTER_EXTENSION_TITLE' => "Erweiterung sofort installieren", + 'ADMIN_EXTENSION_IS_DEPRECATED_TITLE' => "Erweiterung wird nicht mehr verwendet (deprecated).", 'ADMIN_SELECTED_TASKS_ASSIGN' => "Zum Bearbeiten ausgewählte Aufgaben", - 'ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID' => "Registrierung fehlgeschlagen: Ungütige id übermittelt.", + 'ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID' => "Registrierung fehlgeschlagen: Ungültige id übermittelt.", 'ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404' => "Registrierung fehlgeschlagen: Erweiterung-Id nicht auffindbar.", 'ADMIN_EXTENSION_REGISTRATION_FAILED_404' => "Registrierung fehlgeschlagen: Erweiterung %s nicht auffindbar.", 'ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED' => "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder die Aufgabe ist veraltet.", @@ -687,11 +678,11 @@ addMessages(array( 'ADMIN_CONFIG_REFERRAL_PAYOUT' => "Wie viele Mails müssen die Mitglieder mindestens bestätigen, um den Willkommensbonus, einmaliger Referral-Bonus usw. gutgeschrieben zu bekommen?", 'ADMIN_EXTENSION_UPDATED' => "Erweiterung aktualisiert.", 'ADMIN_UPDATE_EXTENSION_SUBJECT' => "Erweiterung-Update installiert", - 'MEMBER_ORDER_PAGE1_INTRO' => "Mailbuchung - Schritt 1 von 4: PLZ eingeben", - 'MEMBER_ORDER_PAGE2_INTRO' => "Mailbuchung - Schritt 2 von 4: Daten eingeben", - 'MEMBER_ORDER_PAGE3_INTRO' => "Mailbuchung - Schritt 3 von 4: Frame-Killer Test und Absenden", - 'MEMBER_ORDER_PAGE4_INTRO' => "Mailbuchung - Schritt 4 von 4: Vielen Dank.", - 'MEMBER_ENTER_ZIP_CODE' => "PLZ eingeben", + 'MEMBER_ORDER_PAGE1_TITLE' => "Mailbuchung - Schritt 1 von 4: PLZ eingeben", + 'MEMBER_ORDER_PAGE2_TITLE' => "Mailbuchung - Schritt 2 von 4: Daten eingeben", + 'MEMBER_ORDER_PAGE3_TITLE' => "Mailbuchung - Schritt 3 von 4: Frame-Killer Test und Absenden", + 'MEMBER_ORDER_PAGE4_TITLE' => "Mailbuchung - Schritt 4 von 4: Vielen Dank.", + 'MEMBER_ENTER_ZIP_CODE' => "PLZ eingeben:", 'ORDER_PAGE_2' => "Weiter zur Seite 2", 'UNCONFIRMED_USERIDS' => "Unbest./Gesperrte Accounts", 'LOCKED_POINTS' => "Nicht vergütete {?POINTS?}", @@ -751,7 +742,7 @@ addMessages(array( 'ADMIN_REMOVING_THESE_EXTENSIONS' => "Diese Erweiterungen werden deinstalliert", 'ADMIN_REMOVE_EXTENSIONS' => "Erweiterungen jetzt entfernen", 'ADMIN_SQLS_EXECUTED_ON_REMOVAL' => "Beim Entfernen ausgeführte SQL-Anweisungen", - 'ADMIN_NO_ADDITIONAL_SQLS' => "Keine weiteren SQL-Anweisungen zum Ausführen.", + 'ADMIN_EXTENSION_VERBOSE_SQLS_404' => "Die Erweiterung hat keine SQL-Anweisungen zum Ausführen.", 'ADMIN_SQLS_EXECUTED_ON_UPDATE' => "Beim Aktualisieren ausgeführte SQL-Anweisungen", 'ADMIN_SQLS_EXECUTED_ON_REGISTER' => "SQL-Anweisungen, die beim Installieren/Updaten ausgeführt werden", 'ADMIN_SELECT_ADMIN' => "Administrator auswählen:", @@ -762,7 +753,7 @@ addMessages(array( 'ADMIN_CALL_NOT_DIRECTLY' => "Bitte diesen Menüpunkt nicht direkt aufrufen.", 'ADMIN_UNCONFIRMED_POOL_MISSING' => "Es fehlen Daten im Sende-Pool zur Mail-Id %s .", 'ADMIN_UNCONFIRMED_STATS_MISSING' => "Es fehlen Daten in der Mitglieder-Statistik zur Mail-Id %s .", - 'ADMIN_UNCONFIRMED_INVALID_LINK' => "Ungütigen Link aufgerufen oder Mail ist nicht mehr vorhanden.", + 'ADMIN_UNCONFIRMED_INVALID_LINK' => "Ungültigen Link aufgerufen oder Mail ist nicht mehr vorhanden.", 'ADMIN_UNCONFIRMED_NO_LINK_LEFT' => "Diese Mailbuchung wurde komplett bestätigt.", 'ADMIN_HEADER_LOCK_ACCOUNT' => "Mitgliedsaccount %s sperren", 'ADMIN_HEADER_UNLOCK_ACCOUNT' => "Mitgliedsaccount %s freigeben", @@ -784,14 +775,14 @@ addMessages(array( 'ADMIN_ENTRY_ADDED' => "Der Eintrag wurde der Datenbank hinzugefügt.", 'ADMIN_ENTRY_NOT_ADDED' => "Der Eintrag wurde der Datenbank NICHT hinzugefügt.", 'BONUS_EXTENSION_UPGRADE' => "Bitte aktualisieren Sie Ihre Bonus-Erweiterung auf Version v0.2.2 oder neuer.", - 'WHAT_IS_OVERVIEW' => "Willkommen", + 'WHAT_IS_WELCOME' => "Willkommen", '_ON' => "an", 'MEMBER_CLICK_STATISTICS' => "Mail-Statistik", 'ADMIN_CONFIG_SELECT_DEFAULT_REFID' => "Standard Referral-Id bei Anmeldung über keinen Ref-Link", 'ADMIN_CONFIG_SELECT_REFID_TARGRT' => "Ziel-Seite des Referral-Linkes", 'ADMIN_CONFIG_REFERRAL_TARGET_REGISTER' => "Zur Anmeldeseite", 'ADMIN_CONFIG_REFERRAL_TARGET_INDEX' => "Zur Eingangsseite", - 'ADMIN_INSTALL_THEME' => "Theme importieren", + 'ADMIN_INSTALLER_THEME' => "Theme importieren", 'ADMIN_NO_THEMES_FOUND' => "Keine Themes gefunden.", 'THEME_UNIX' => "Uni*-Name", 'THEME_NAME' => "Theme-Titel", @@ -813,7 +804,8 @@ addMessages(array( 'ADMIN_THEME_NEW_DEFAULT_THEME' => "Durch Anklicken des Uni*-Names wird das jeweilige Theme als Standard-Theme gesetzt, welches Ihre Besucher sofort sehen werden.", 'ADMIN_ENTRY_DELETE' => "Eintrag löschen", 'ADMIN_NO_MENUS_FOUND' => "Keine Menüs gefunden.", - 'ADMIN_CONFIG_TITLE_SETTINGS' => "Einstellungen am Seitentitel", + 'ADMIN_CONFIG_TITLE_SETTINGS' => "Einstellungen und Dekorationen am Browsertitel", + 'ADMIN_CONFIG_TITLE_LEGEND' => "Einstellungen am Browsertitel", 'ADMIN_CONFIG_TITLE_NOTICE' => "Die Einstellungen {--ADMIN_CONFIG_TITLE_ENABLE_MODULE_TITLE--} und {--ADMIN_CONFIG_TITLE_ENABLE_WHAT_TITLE--} wirken sich nur auf den Gast-, Mitglieds-, und Sponsorbereich aus. Im Administratorbereich werden die Einstellungen ignoriert und es werden immer Modul- und der Menüpunkttitel angezeigt, damit der Administrator (also Sie) immer erkennen kann, welche Aktion gerade ausgewählt ist.", 'ADMIN_CONFIG_TITLE_DECORATIONS' => "Titeldekorationen", 'ADMIN_CONFIG_TITLE_ENABLE_DECORATIONS' => "Dekorationen aktivieren", @@ -828,6 +820,7 @@ addMessages(array( 'CLICK_NOW' => "Hier bestätigen", 'MAILID_LINK' => "Best.-Link", 'UNKNOWN_MAILID_CODE' => "Unbekannter Fehler-Code %s erkannt.", + 'UNKNOWN_REDIRECT_VALUE' => "Ungültiger Konfigurationswert erkannt. Bitte benachrichtigen Sie den Support und nennen Sie dabei den genauen Zeitpunkt.", 'ADMIN_MENU_IS_LOCKED' => "Ist gesperrt", 'ADMIN_REMOVE_STATS_ENTRY' => "Hier klicken, um Mitgliederstatistik zu entfernen.", 'ADMIN_USER_STATS_REMOVED' => "Mitgliederstatistiken entfernt.", @@ -863,17 +856,9 @@ addMessages(array( 'ADMIN_TASK_NO_SQL_TITLE' => "Aufgabe ohne SQL-Anweisungen", 'MEMBER_UNCONFIRMED_LOCKED' => "Anzahl zu best. Mails für Willkommensgutschrift", 'MEMBER_CONFIRMED_MAILS' => "Bereits best. Mails", - 'TIME_UNIT' => "Zeiteinheit", - 'TIME_UNIT_YEAR' => "Jahr(e)", - 'TIME_UNIT_MONTH' => "Monat(e)", - 'TIME_UNIT_WEEK' => "Woche(n)", - 'TIME_UNIT_DAY' => "Tag(e)", - 'TIME_UNIT_HOUR' => "Stunde(n)", - 'TIME_UNIT_MINUTE' => "Minute(n)", - 'TIME_UNIT_SECOND' => "Sekunde(n)", 'SORT_ASCENDING' => "Aufsteigend", 'SORT_DESCENDING' => "Absteigend", - 'INVALID_EMAIL_ENTERED' => "Ungütige EMail-Adresse eingegeben.", + 'INVALID_EMAIL_ENTERED' => "Ungültige EMail-Adresse eingegeben.", 'NEVER_HAPPENED' => "Nie", 'NO_CONFIG_FOUND_TITLE' => "Keine Konfigurationsdaten gefunden.", 'SORTING_KEY' => "Sortierung", @@ -890,11 +875,6 @@ addMessages(array( 'NO_UPDATE_NOTICES' => "Keine Update-Hinweise gefunden.", 'MYSQL_QUERY_STRING' => "SQL-Abfragebefehl war:", 'MEMBER_NO_MAILS_IN_POOL' => "Sie haben noch keine Mailbuchungen aufgegeben! Es können somit Ihnen auch keine angezeigt werden.", - 'ADMIN_CONFIG_ADMIN_MENU_TITLE' => "Einstellungen am Adminmenü", - 'ADMIN_CONFIG_SELECT_MENU_TYPE' => "Menütyp auswählen", - 'ADMIN_CONFIG_ADMIN_MENU_NEW' => "Neues Menüsystem mit "logischen Bereichen"", - 'ADMIN_CONFIG_ADMIN_MENU_OLD' => "Herkömliches Menüsystem links im Browser", - 'ADMIN_CONFIG_ADMIN_MENU_JAVASCRIPT_ENABLED' => "Soll das mit JavaScript ("interaktiv") gesteuerte Adminmenü eingeschaltet werden? (Dies ist noch sehr experimentell.)", 'ADMIN_BACK_TO_GUEST_MENU' => "Zum Gastmenü zurück...", 'ADMIN_LOGOUT_NOW' => "Aus dem Admin-Bereich ausloggen", 'ADMIN_LOGOUT_NOTICE' => "Loggen Sie sich immer aus dem Admin-Bereich aus, wenn Sie beabsichten, ihn nicht mehr zu benutzen. Auch sollten Sie dies auf jedem Fall in einem Internet-Cafe vor Verlassen des Platzes tun.", @@ -907,10 +887,14 @@ addMessages(array( 'ADMIN_PASS_SALTED' => "Admin-Password wegen Update geändert", 'ADMIN_CONFIG_SALT_LENGTH_NOTICE' => "Um für alle Accounts (Mitglieder/Admins derzeit) neue Passwörter zu generieren, lassen Sie das Eingabefeld {--ADMIN_CONFIG_SALT_LENGTH--} leer oder geben Sie eine 0 ein! Vorsicht! Sie müssen sich dann anschliessend erneut einloggen.", 'GUEST_LOGIN_FAILED_GENERAL' => "Genereller Loginfehler! Bitte kontaktieren Sie den Webmaster.", + 'DEFAULT_SUBJECT_LINE' => "Klick-Mail von {?MAIN_TITLE?}", 'DEFAULT_MT_WORD' => "Mailtausch", 'DEFAULT_MT_WORD2' => "Mailtausches", 'DEFAULT_MT_WORD3' => "Mailtauscher", 'DEFAULT_POINTS' => "Punkte", + 'DEFAULT_MAIN_TITLE' => "Titel Ihres {--DEFAULT_MT_WORD2--} hier", + 'DEFAULT_SLOGAN' => "Ihr Werbespruch hier", + 'DEFAULT_WEBMASTER' => "ihre@email-addresse.example", 'PROBLEM_POINTS_OVERVIEW_UNAVAILABLE' => "{?POINTS?}-Übersicht derzeit nicht verfügbar.", 'ADMIN_NOTHING_SELECTED_CHANGE' => "Sie haben nichts zum Ändern des Status ausgewählt.", 'TEMPLATE_CONTENT' => "Template-Daten", @@ -949,7 +933,7 @@ addMessages(array( 'EXTENSION_PROBLEM_UNSET_EXT' => "Skriptfehler: Parameter ext nicht gesetzt.", 'EXTENSION_PROBLEM_EXTENSION_OUTDATED' => "Kann nicht fortfahren! Fehler Eine Erweiterung ist veraltet. Bitte benachrichten Sie den Support.", 'EXTENSION_WARNING_EXTENSION_INACTIVE' => "Die Erweiterung %s ist nicht aktiv. Dies kann zu Störungen führen.
    \nBitte aktivieren Sie diese unter Verschiedenes->Erweiterungen.", - 'EXTENSION_WARNING_USER_LIMIT' => "Die Erweiterung user ist nicht aktiv. Die Anzahl Mitglieder pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter Verschiedenes->Erweiterungen.", + 'EXTENSION_WARNING_USER_LIMIT' => "Die Erweiterung ext-user ist nicht aktiv. Die Anzahl Mitglieder pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter Verschiedenes->Erweiterungen.", 'ADMIN_PROXY_SETTINGS_INVALID' => "Ihre Proxy-Einstellungen scheinen ungültig zu sein.", 'ADMIN_EDIT_PROXY_SETTINGS' => "Proxy-Einstellungen ändern", 'ADMIN_CONFIG_PROXY_HOST' => "Hostname oder IP-Nummer:", @@ -963,7 +947,7 @@ addMessages(array( 'EMAIL_DELETE_COUNT' => "Buchungseinträge gelöscht", 'MAILER_HAS_DIED' => "{?TITLE?} ist in Script/Funktion %s, Zeile %s mit folgender Meldung abgebrochen: %s", 'ADMIN_CONFIG_POINTS_TITLE' => "Einstellungen für {?POINTS?}", - 'APP_DIE_TITLE' => "Bug im Script erkannt!", + 'APP_DIE_TITLE' => "Bug im Script erkannt.", 'ADMIN_CONTACT_LINK_TITLE' => "Kontakt zum Administrator", 'ADMIN_MAIL_NOTHING_DELETED' => "Die Mail mit der Id %s weisst keine Mitglieder auf.", @@ -1022,13 +1006,6 @@ addMessages(array( 'ADMIN_RESET_PASSWORD' => "Passwort vergessen?", 'EMAIL_DETAILS' => "Email-Details", 'EMAIL_DETAILS_LINK' => "Details anzeigen", - 'ADMIN_CONFIG_REFID_TITLE' => "Einstellungen zum Referral-Link", - 'ADMIN_CONFIG_RANDOM_ZERO_REFID' => "Soll per Zufall ein Mitglied ausgwählt werden oder soll die oben eingestellte Standard-Refid verwendet werden?", - 'ADMIN_CONFIG_RANDOM_REFID_ENABLED' => "Mitglieder per Zufall wählen", - 'ADMIN_CONFIG_RANDOM_REFID_DISABLED' => "Voreingestellte Referral-Id setzen", - 'ADMIN_CONFIG_RANDOM_REFID_TITLE' => "Kriterien wonach ein Mitglied als Zufallsreferral ausgewählt wird:", - 'ADMIN_CONFIG_RANDOM_MIN_CONFIRMED' => "Wie viele Mails muss ein Mitglied mindestens bestätigt haben, um per Zufall ausgewählt zu werden?", - 'ADMIN_CONFIG_REFID_NOTICE' => "Sobald ein Mitglied ausgewählt wurde, werden die Zähler aller Mitglieder auf Null gesetzt. Dies soll Chancengleichheit bringen und dass die Mitglieder mehr Mails abklicken.", 'EMAILS_RECEIVED' => "Emails empfangen", 'MAILS_CONFIRMED' => "Emails bestätigt", 'RAND_CONFIRMED' => "Bestätigt f. Zufalls-Ref", @@ -1047,11 +1024,11 @@ addMessages(array( 'GUEST_STATS_NO_CLICKS' => "Keine Klicks in Ihrem {?mt_word?} verzeichnet.", 'ADMIN_EXTENSIONS_REMOVED' => "Es wurden %s Erweiterungen aus Ihrem {?mt_word?} entfernt.", 'ADMIN_WARNING_SQL_PATCHES_MISSING' => "Eine essentielle Erweiterung sql_patches ist noch nicht installiert. Bitte erledigen Sie dies bald, da Ihr {?mt_word?} sonst nicht funktioniert.", - 'ADMIN_EXTENSION_IS_NON_PRODUCTIVE' => "Die von Ihnen ausgewählte Erweiterung %s ist noch nicht für den produktiven Betrieb freigegeben und befindet sich somit noch in der Entwicklung. Bitte nur verwenden, wenn Sie wissen, was Sie tun.", + 'ADMIN_EXTENSION_IS_NON_PRODUCTIVE' => "Die von Ihnen ausgewählte Erweiterung %s ist nicht für den produktiven Betrieb geeignet und befindet sich somit in der Entwicklung. Bitte verwenden Sie diese nur, wenn Sie daran mitenwickeln wollen. Auch können die angegebenen Funktionalitäten nicht fertig implementiert sein. Nähere Informationen zum Umgang mit Entwickler-Versionen von Erweiterungen erhalten Sie im Forum.", 'ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK' => "Entwickler-Version", 'ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK_TITLE' => "Die Erweiterung '%s' sollten Sie nur installieren, wenn Sie daran mitentwickeln wollen. Produktiv ist diese nicht einsatzbereit.", 'ADMIN_ENTRIES_404' => "Es wurden keine Einträge gefunden.", - 'DEBUG_REPORT_BUG_SUBJECT' => "[BUG!] Es wurde ein Bug im Script erkannt:", + 'REPORT_BUG_SUBJECT' => "[BUG!] Es wurde ein Bug im Script erkannt:", 'ADMIN_EXTENSION_ALWAYS_ACTIVE' => "Die Erweiterung {%%pipe,getExtensionName=%s%%} kann nicht deaktiviert werden, da sie immer aktiv bleiben muss.", 'MEMBER_REFERRAL_LINKS_FOOTER' => "Ihr Referral-Link eingebaut in Ihrer Homepage bringt Ihnen passiv mehr Referrals. (Aber Ihren Referral-Link bewerben schadet auch nicht... ;-) )", 'POINTS_ORDER' => "Werbeguthaben", @@ -1061,12 +1038,61 @@ addMessages(array( 'ADMIN_EMAIL_CHANGES_SAVED' => "Die Maildaten wurden aktualisiert.", 'ADMIN_EMAIL_CHANGES_NOT_SAVED' => "Keine Änderungen an der Mail vorgenommen. Maildaten wurden NICHT geändert.", 'MEMBER_REFLINK_CENTER_TITLE' => "Alle Informationen zu Ihrem Werbelink", - 'MEMBER_RANDOM_REFID_ENABLED' => "Ist die Auswahl eines Referrals per Zufall aktiviert?", - 'MEMBER_RANDOM_REFID_CONFIRMED' => "Anzahl Mails bestätigt, damit Ihr Account per Zufall selektiert wird", + 'MEMBER_RANDOM_REFID_ENABLED' => "Ist die Auswahl eines Referrals per Zufall aktiviert? Dies tritt nur ein, wenn kein Referral-Link zur Anmeldung verwendet wurde", + 'MEMBER_RANDOM_REFID_CONFIRMED' => "Anzahl Mails bestätigt, damit Ihr Account per Zufall ausgewählt wird", 'MEMBER_YOUR_REFID_IS' => "Sie wurden geworben von", 'ADMIN_CONFIG_ADMIN_MENU_NOTICE' => "Das Menüsystem mit "logischen Bereichen" ist noch nicht fertig und führt zu Fehlern. Bitte dieses nur im Template aktivieren, wenn Sie daran mitprogrammieren wollen.", + 'UNKNOWN_ERROR_CODE' => "Unbekannter Fehlercode 0x{%%pipe,getHexErrorCode=%s%%} erkannt.", + + // Time units + 'TIME_UNIT' => "Zeiteinheit", + 'TIME_UNIT_UNKNOWN' => "Unbekannte Zeiteinheit %s erkannt.", + 'TIME_UNIT_YEAR' => "Jahr(e)", + 'TIME_UNIT_MONTH' => "Monat(e)", + 'TIME_UNIT_WEEK' => "Woche(n)", + 'TIME_UNIT_DAY' => "Tag(e)", + 'TIME_UNIT_HOUR' => "Stunde(n)", + 'TIME_UNIT_MINUTE' => "Minute(n)", + 'TIME_UNIT_SECOND' => "Sekunde(n)", - // Member mails + // Genders + 'GENDER' => "Anrede", + 'GENDER_UNKNOWN' => "Unbekannte Anrede %s erkannt.", + 'GENDER_M' => "Herr", + 'GENDER_F' => "Frau", + 'GENDER_C' => ""Firma"", + + // Login error messages + 'LOGIN_UNKNOWN_CODE' => "Unbekannter Rückgabewert.", + 'LOGIN_WRONG_PASS' => "Falsches Passwort eingegben.", + 'LOGIN_WRONG_ID' => "Es wurde kein Account unter Ihren eingegebenen Logindaten gefunden.", + 'LOGIN_STATUS_LOCKED' => "Ihr Account wurde gesperrt. Sperrgrund: {%user,lock_reason%}, Sperrzeitpunkt: {%user,lock_timestamp,generateDateTime%}", + 'LOGIN_STATUS_UNCONFIRMED' => "Bitte bestätigen Sie erst Ihre Email-Adresse! Haben Sie den Bestätigungslink verloren? Links im Menü unter "Bestätigungslink" können Sie ihn erneut anfordern.", + 'LOGIN_COOKIES_DISABLED' => "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt.", + 'LOGIN_UNKNOWN_ERROR' => "Es ist ein unerwarteter Account-Status aufgetreten. Bitte melden Sie sich beim Support dieses {?mt_word2?}.", + 'LOGIN_UNKNOWN_STATUS' => "Ihr Account weisst einen unbekannten Status auf. Bitte melden Sie sich beim Support dieses {?mt_word2?}.", + 'LOGIN_ID_IS_EMPTY' => "Sie haben Ihre Mitglieds-Id nicht eingegeben. Dies ist Ihre Mitglieds-Id.", + 'LOGIN_PASSWORD_IS_EMPTY' => "Sie haben kein Passwort eingegeben. Falls Sie Ihres vergessen haben, können Sie mit unterem Formular ein neues sich zuschicken lassen.", + + // Admin config - admin menu + 'ADMIN_CONFIG_ADMIN_MENU_TITLE' => "Einstellungen am Adminmenü", + 'ADMIN_CONFIG_ADMIN_MENU_TYPE_LEGEND' => "Menütyp auswählen", + 'ADMIN_CONFIG_ADMIN_MENU_MISC_LEGEND' => "Interaktives Adminmenü", + 'ADMIN_CONFIG_ADMIN_MENU_NEW' => "Neues Menüsystem mit "logischen Bereichen"", + 'ADMIN_CONFIG_ADMIN_MENU_OLD' => "Herkömliches Menüsystem links im Browser", + 'ADMIN_CONFIG_ADMIN_MENU_JAVASCRIPT_ENABLED' => "Soll das mit JavaScript ("interaktiv") gesteuerte Adminmenü eingeschaltet werden? (Dies ist noch sehr experimentell.)", + + // Admin config - refid + 'ADMIN_CONFIG_REFID_TITLE' => "Einstellungen zum Referral-Link", + 'ADMIN_CONFIG_REFID_GENERAL_LEGEND' => "Standard-Refid, Weiterleitungsziel", + 'ADMIN_CONFIG_RANDOM_REFID_LEGEND' => "Zufallsreferral", + 'ADMIN_CONFIG_RANDOM_ZERO_REFID' => "Soll per Zufall ein Mitglied ausgwählt werden oder soll die oben eingestellte Standard-Refid verwendet werden?", + 'ADMIN_CONFIG_RANDOM_REFID_ENABLED' => "Mitglieder per Zufall wählen", + 'ADMIN_CONFIG_RANDOM_REFID_DISABLED' => "Voreingestellte Referral-Id setzen", + 'ADMIN_CONFIG_RANDOM_MIN_CONFIRMED' => "Wie viele Mails muss ein Mitglied mindestens bestätigt haben, um per Zufall ausgewählt zu werden?", + 'ADMIN_CONFIG_REFID_NOTICE' => "Sobald ein Mitglied ausgewählt wurde, werden die Zähler aller Mitglieder auf Null gesetzt. Dies soll Chancengleichheit bringen und dass die Mitglieder mehr Mails abklicken. Ist {--ADMIN_CONFIG_RANDOM_REFID_ENABLED--} ausgewählt, wird die Einstellung Standard-Referral Id ignoriert.", + + // Member mails: bonus/normal (click) 'MEMBER_MAIL_BONUS_CONFIRMED_ON' => "Sie haben diese Bonusmail am|um %s bestätigt.", 'MEMBER_MAIL_BONUS_CONFIRMED_UNKNOWN' => "Es konnte nicht festgestellt werden, wann Sie die Bonus-Mail %s bestätigt hatten.", 'MEMBER_MAIL_BONUS_NEVER_CONFIRMED' => "Sie haben diese Bonusmail %s noch nicht bestätigt.", @@ -1100,13 +1126,14 @@ addMessages(array( 'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?", // Special user lists (what=list_user) - 'ADMIN_LIST_ALL_ACCOUNTS' => "Alle Mitglieder-Accounts auflisten", + 'ADMIN_LIST_ALL_ACCOUNTS' => "Alle Benutzeraccounts (auch Testaccounts) auflisten", 'ADMIN_LIST_STATUS_LOCKED_ACCOUNTS' => "Alle gesperrten Mitglieder-Accounts auflisten", 'ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS' => "Alle bestätigten Mitglieder-Accounts auflisten", 'ADMIN_LIST_STATUS_UNCONFIRMED_ACCOUNTS' => "Alle unbestätigten Mitglieder-Accounts auflisten", 'ADMIN_LIST_DO_CONFIRMED_ACCOUNTS' => "Alle bestätigten Mitglieder-Accounts auflisten", 'ADMIN_LIST_DO_NOREFS_ACCOUNTS' => "Alle Mitglieder-Accounts ohne Referrals auflisten", 'ADMIN_LIST_DO_RANDOM_REFID_ACCOUNTS' => "Alle Mitglieder-Accounts für Zufallsreferral auflisten", + 'ADMIN_LIST_DO_TESTERS_ACCOUNTS' => "Alle Testbenutzer auflisten", // Admin task lines 'ADMIN_TASK_TYPE_MEMBER_SUPPORT' => "Support-Anfrage eines Mitgliedes", @@ -1125,8 +1152,8 @@ addMessages(array( 'ADMIN_STATUS_CHANGED' => "Es wurden %s von %s Einträgen geändert.", // Missing menu entries - 'ADMIN_MENU_ACTION_404_TITLE' => "Hauptmenü '%s' deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.", - 'ADMIN_MENU_WHAT_404_TITLE' => "Untermenü '%s' deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.", + 'ADMIN_MENU_ACTION_404_TITLE' => "Hauptmenü '%s' deaktiviert, da die dazugehörige Scriptdatei auf dem Server nicht gefunden wurde.", + 'ADMIN_MENU_WHAT_404_TITLE' => "Untermenü '%s' deaktiviert, da die dazugehörige Scriptdatei auf dem Server nicht gefunden wurde.", // Cache messages 'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei %s laden.", @@ -1172,23 +1199,117 @@ addMessages(array( 'ADMIN_ACTION_DELETE_SUBMIT' => "Löschen", 'ADMIN_ACTION_REMOVE_SUBMIT' => "Einträge löschen", 'ADMIN_ACTION_EDIT_SELECT_SUBMIT' => "Ausgewählten Eintrag bearbeiten", - 'ADMIN_ACTION_LOCK_SUBMIT' => "Ent-/sperren", + 'ADMIN_ACTION_UNLOCK_SUBMIT' => "Ent-/sperren", + 'ADMIN_ACTION_ACTIVATE_SUBMIT' => "Freischalten", // Admin 'pool' mail actions 'ADMIN_EDIT_POOL_MAIL_LINK' => "Klick-Mail bearbeiten", 'ADMIN_DELETE_POOL_MAIL_LINK' => "Klick-Mail löschen", // Generic points subjects - 'POINTS_SUBJECT_UNKNOWN' => "??? (%s)", - 'POINTS_SUBJECT_ADMIN_ADD_ALL' => "Gutschrift für alle durch den Administrator", - 'POINTS_SUBJECT_ADMIN_ADD_SINGLE' => "Einzelgutschrift durch den Administrator", - 'POINTS_SUBJECT_ADMIN_SUB_ALL' => "Abzug aller Accounts durch den Administrator", - 'POINTS_SUBJECT_ADMIN_SUB_SINGLE' => "Einzelabzug durch den Administrator", + 'POINTS_SUBJECT_UNKNOWN' => "??? (%s)", + 'POINTS_SUBJECT_ADMIN_ADD_ALL' => "Gutschrift für alle durch den Administrator", + 'POINTS_SUBJECT_ADMIN_ADD_SINGLE' => "Einzelgutschrift durch den Administrator", + 'POINTS_SUBJECT_ADMIN_SUB_ALL' => "Abzug aller Accounts durch den Administrator", + 'POINTS_SUBJECT_ADMIN_SUB_SINGLE' => "Einzelabzug durch den Administrator", + 'POINTS_SUBJECT_MAIL_DELETED' => "Löschung einer Mailbuchung", + 'POINTS_SUBJECT_POOL_PAYBACK' => "Rückvergütung aus Sendepool", + 'POINTS_SUBJECT_ADMIN_ADD_ALL_REF' => "Anteilige Gutschrift für alle durch den Administrator", + 'POINTS_SUBJECT_ADMIN_ADD_SINGLE_REF' => "Anteilige Einzelgutschrift durch den Administrator", // Admin - List referrals 'ADMIN_LIST_USER_NO_REFERRALS' => "Das Mitglied %s hat in dieser Referral-Ebene keine Mitglieder geworben.", 'ADMIN_NO_REFERRAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referral-Ebenen eingerichtet! Ihre Mitglieder erhalten keine {?POINTS?} gutgeschrieben. Richten Sie mindestens Referral-Ebene 0 mit 100% Vergütung ein.", 'ADMIN_LIST_USER_NODATA' => "Das Mitglied %s wurde bereits gelöscht.", + + // Footer navigation (e.g. installer) + 'PAGE_PREVIOUS_SUBMIT' => "Zurück", + 'PAGE_NEXT_SUBMIT' => "Weiter", + 'SAVE_CHANGES_SUBMIT' => "Änderungen speichern", + 'NEXT_SAVE_CHANGES_SUBMIT' => "Änderungen speichern und zum nächsten Schritt", + 'PREVIOUS_SAVE_CHANGES_SUBMIT' => "Änderungen speichern und zum verherigen Schritt", + 'TAB_SAVE_CHANGES_SUBMIT' => "Änderungen speichern und weiter zu '%s'", + 'PAGE_FINISH_SUBMIT' => "Fertigstellen", + + // Admin - points_data "config" + 'ADMIN_ENTER_POINTS_DATA_SUBJECT_LINE' => "Verwendungszweck eingeben:", + 'ADMIN_ENTER_POINTS_DATA_COLUMN_NAME' => "Tabellenspalte eingeben:", + 'ADMIN_SELECT_POINTS_DATA_LOCKED_MODE' => "Verhalten bei {?POINTS?}-Sperre einstellen:", + 'ADMIN_SELECT_POINTS_DATA_PAYMENT_METHOD' => "Vergütungsmethode einstellen:", + 'ADMIN_SELECT_POINTS_DATA_NOTIFY_RECIPIENT' => "Soll das Mitglied benachrichtigt werden?", + 'ADMIN_ADD_POINTS_DATA_USAGE_TITLE' => "Kleine Nutzungsanleitung:", + 'ADMIN_ADD_POINTS_DATA_NOTICE' => "Achten Sie bei der Verwendung dieses Formulars darauf, dass der Verwendungszweck nicht mehrfach aufgeführt ist, sollte die eingegebene Tabellenspalte nicht existieren, wird sie automatisch angelegt. Sollte das Guthabenkonto wieder gelöscht werden, werden die dort angesammelten {?POINTS?} auf das eingestellbare Guthabenkonto (aktuell: {%config,translatePointsAccountType=points_remove_account%} umgebucht. Es können mit diesem Formular nur benutzerdefinierte Guthabenkonten angelegt oder gelöscht werden, die Konten durch Erweiterungen angelegt sind dieses nicht.", + 'ADMIN_ADD_POINTS_DATA_SUBJECT_NOTICE' => "Der Verwendungszweck ist stets klein zu schreiben und sollte auch im Programmcode verwendet werden und muss mit dem ersten Parameter von den Funktionen addPointsThroughReferralSystem(), subtractPoints() und somit auch addBookingRecord() übereinstimmen.", + 'ADMIN_ADD_POINTS_DATA_COLUMN_NAME_NOTICE' => "Die Tabellenspalte ist stets klein zu schreiben, ist diese in der Tabelle {?_MYSQL_PREFIX?}_user_points nicht vorhanden, wird diese plus der selbe Spaltenname mit dem Präfix locked_ automatisch dort erzeugt. Der Spaltenname sollte das Stichwort points enthalten und darf NIEMALS id, userid oder ref_depth heissen oder locked enthalten.", + 'ADMIN_ADD_POINTS_DATA_LOCKED_MODE_NOTICE' => "Bei der {?POINTS?}-Sperre werden dem Mitglied die {?POINTS?} auf sein so genanntes "gesperrtes Guthaben" gutgeschrieben. Auf dieses hat das Mitglied solange keinen Zugriff, bis es die Mindestanzahl zu bestätigender Mails erreicht hat. Die Einstellung {--POINTS_LOCKED_MODE_LOCKED--} bewirkt, dass das Mitglied ebenfalls auf dieses Guthaben hinarbeiten muss. {--POINTS_LOCKED_MODE_UNLOCKED--} bewirkt hingegen, dass das Mitglied die Gutschrift sofort erhält, ohne Mails bestätigen zu müssen.", + 'ADMIN_ADD_POINTS_DATA_PAYMENT_METHOD_NOTICE' => "Mit der Vergütungsmethode können Sie beeinflussen, ob Ihre Mitglieder Referral-Gutschriften erhalten oder nur das eigentliche Mitglied (also das, was die Gutschrift erhalten soll) diese "direkt" gutgeschrieben werden soll. Stellen Sie dies z.B. beim Verwendungszweck mailid_okay auf "{--POINTS_PAYMENT_METHOD_DIRECT--}" um, erhät das werbende Mitglied (das als Referral-Id eingetragen ist) keine Gutschriften bei der Mailbestätigung mehr. Seien Sie also auch mit dieser Einstellung nicht leichtsinnig.", + 'ADMIN_POINT_ACCOUNT_ADDED' => "Das Guthabenkonto wurde soeben angelegt. Bitte bauen Sie dies nun in Ihren PHP-Code ein.", + 'ADMIN_POINT_ACCOUNT_NOT_ADDED' => "Das Guthabenkonto konnte nicht angelegt werden. Vielleicht ist es bereits vorhanden oder von einer Erweiterung bereits angelegt?", + 'ADMIN_POINTS_ACCOUNT_SUBJECT' => "Verwendungszweck", + 'ADMIN_POINTS_ACCOUNT_COLUMN_NAME' => "Tabellenspalte", + 'ADMIN_POINTS_ACCOUNT_LOCKED_MODE' => "Sperrverhalten", + 'ADMIN_POINTS_ACCOUNT_PAYMENT_METHOD' => "Vergütungsmethode", + 'ADMIN_POINTS_ACCOUNT_NOTIFY_RECIPIENT' => "Empfänger benachrichtigen?", + 'ADMIN_POINTS_ACCOUNT_PROVIDER' => "Anbieter:", + 'ADMIN_CHANGE_POINTS_NOTIFY_RECIPIENT' => "Ändern von Empfangsbenachrichtigung aussenden:", + 'ADMIN_CHANGE_POINTS_LOCKED_MODE' => "Ändern vom Verhalten bei unzureichend bestätigten Mails:", + 'ADMIN_CHANGE_POINTS_PAYMENT_METHOD' => "Ändern von Vergütungsmethode:", + + // Admin points data config - title + 'ADMIN_ADD_POINTS_DATA_TITLE' => "Benutzerdefiniertes Guthabenkonto erstellen", + 'ADMIN_EDIT_POINTS_DATA_TITLE' => "Ändern von Guthabenhonten", + 'ADMIN_LIST_POINTS_ACCOUNTS_TITLE' => "Alle Guthabenkonten auflisten", + + // Admin points data config - submit buttons + 'ADMIN_ADD_POINTS_DATA_SUBMIT' => "Guthabenkonto anlegen", + 'ADMIN_POINTS_DATA_CHANGE_SUBMIT' => "Guthabenkonten ändern", + + // Generic: points account types (in fact: column names) + 'POINTS_ACCOUNT_TYPE_UNKNOWN' => "Unbekannter Guthabenkontotyp %s erkannt.", + 'POINTS_ACCOUNT_TYPE_POINTS' => "Allgemeinguthaben", + 'POINTS_ACCOUNT_TYPE_LOCKED_POINTS' => "Gesperrtes Allgemeinguthaben", + + // Generic: points "locked mode" + 'POINTS_LOCKED_MODE_UNKNOWN' => "Unbekannter Guthabensperrmodus %s erkannt.", + 'POINTS_LOCKED_MODE_LOCKED' => "Auf gesperrtes Guthaben", + 'POINTS_LOCKED_MODE_UNLOCKED' => "Auf ungesperrtes Guthaben", + + // Generic: points payment method + 'POINTS_PAYMENT_METHOD_UNKNOWN' => "Unbekannte Gutschriftmethode %s erkannt.", + 'POINTS_PAYMENT_METHOD_DIRECT' => "Dem Mitglied direkt gutschreiben", + 'POINTS_PAYMENT_METHOD_REFERRAL' => "Über das Referral-System", + + // Generic: points account provider + 'POINTS_ACCOUNT_PROVIDER_UNKNOWN' => "Unbekannten Anbieter %s erkannt.", + 'POINTS_ACCOUNT_PROVIDER_EXTENSION' => "Erweiterung", + 'POINTS_ACCOUNT_PROVIDER_CUSTOM' => "Benutzerdefiniert", + + // Generic: points notify recipient + 'POINTS_NOTIFY_RECIPIENT_UNKNOWN' => "Unbekannte Benachrichtigungsoption %s erkannt.", + 'POINTS_NOTIFY_RECIPIENT_Y' => "An Mitglied aussenden", + 'POINTS_NOTIFY_RECIPIENT_N' => "An Mitglied NICHT aussenden", + + // Admin - subject lines + 'ADMIN_DIRECT_ADMIN_ADD_SINGLE_SUBJECT' => "Einzeldirektgutschrift durch Administrator", + 'ADMIN_DIRECT_ADMIN_ADD_ALL_SUBJECT' => "Sammeldirektgutschrift durch Administrator", + 'ADMIN_REFERRAL_ADMIN_ADD_SINGLE_SUBJECT' => "Einzelreferralgutschrift durch Administrator", + 'ADMIN_REFERRAL_ADMIN_ADD_ALL_SUBJECT' => "Sammelreferralgutschrift durch Administrator", + 'ADMIN_REFERRAL_ADMIN_ADD_SINGLE_REF_SUBJECT' => "Anteilige Einzelreferralgutschrift durch Administrator", + 'ADMIN_REFERRAL_ADMIN_ADD_ALL_REF_SUBJECT' => "Anteilige Sammelreferralgutschrift durch Administrator", + 'ADMIN_EDIT_POINTS_DATA_SUBJECT' => "Guthabenkonto geändert", + + // Member - subject lines + 'MEMBER_DIRECT_ADMIN_ADD_SINGLE_SUBJECT' => "Einzeldirektgutschrift vom Administrator erhalten", + 'MEMBER_DIRECT_ADMIN_ADD_ALL_SUBJECT' => "Sammeldirektgutschrift vom Administrator erhalten", + 'MEMBER_REFERRAL_ADMIN_ADD_SINGLE_SUBJECT' => "Einzelreferralgutschrift vom Administrator erhalten", + 'MEMBER_REFERRAL_ADMIN_ADD_ALL_SUBJECT' => "Sammelreferralgutschrift vom Administrator erhalten", + 'MEMBER_REFERRAL_ADMIN_ADD_SINGLE_REF_SUBJECT' => "Anteilige Einzelreferralgutschrift vom Administrator erhalten", + 'MEMBER_REFERRAL_ADMIN_ADD_ALL_REF_SUBJECT' => "Anteilige Sammelreferralgutschrift vom Administrator erhalten", + + // AJAX admin menu + 'ADMIN_AJAX_MENU_IS_LOADING' => "Das Adminmenü wird geladen, bitte etwas Geduld . . .", + 'ADMIN_AJAX_ERROR_TITLE' => "AJAX-Abfrage im Adminmenü fehlgeschlagen", + 'ADMIN_AJAX_WARNING_TITLE' => "Warnung: Es sind ungespeicherte Änderungen vorhanden", )); // Description of all months diff --git a/inc/language/debug_de.php b/inc/language/debug_de.php index 81ee0741b3..a9877dc761 100644 --- a/inc/language/debug_de.php +++ b/inc/language/debug_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/doubler_de.php b/inc/language/doubler_de.php index 6c777c94b6..8ec9c8bb0e 100644 --- a/inc/language/doubler_de.php +++ b/inc/language/doubler_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -82,7 +82,7 @@ addMessages(array( 'DOUBLER_ENTER_LOGIN_DATA' => "Geben Sie hier Ihre Zugangsdaten ein", 'DOUBLER_NOTICE_FOR_PASSWORD' => "Das Passwort wird nicht gespeichert.", 'DOUBLER_ENTER_POINTS' => "{?POINTS?} zum Verdoppeln", - 'DOUBLER_NOW' => "Verdoppeln.", + 'DOUBLER_NOW_SUBMIT' => "Verdoppeln.", 'DOUBLER_ALREADY_PAYED' => "Es wurden bereits {%config,translateComma=doubler_points%} {?POINTS?} ausgezahlt.", 'DOUBLER_MINIMUM_IS' => "Mindestens", 'DOUBLER_MAXIMUM_IS' => "verdoppeln, maximal", diff --git a/inc/language/earning_de.php b/inc/language/earning_de.php index c7ef3c18bb..727968eb44 100644 --- a/inc/language/earning_de.php +++ b/inc/language/earning_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,8 +60,8 @@ addMessages(array( // Titles/notes for displaying earning data 'MEMBER_EARNING_TITLE' => "Zusatzverdienste bei {?MAIN_TITLE?}", - 'MEMBER_EARNING_NOTICE' => "Das Team von {?MAIN_TITLE?} wünscht Ihnen gute Verdienste!", - 'MEMBER_EARNING_DATA_INVALID_TITLE' => "Ungültigen Zusatzverdienst oder Scriptefehler!", + 'MEMBER_EARNING_NOTICE' => "Das Team von {?MAIN_TITLE?} wünscht Ihnen gute Verdienste.", + 'MEMBER_EARNING_DATA_INVALID_TITLE' => "Ungültigen Zusatzverdienst oder Scriptefehler.", 'MEMBER_EARNING_DATA_INVALID_NOTICE' => "Es liegt vermutlich ein Scriptefehler vor. Bitte teilen Sie die oben stehenden Daten dem Support mit.", // Earning groups diff --git a/inc/language/en.php b/inc/language/en.php index 33f69baf54..d502ee830d 100644 --- a/inc/language/en.php +++ b/inc/language/en.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/forced_de.php b/inc/language/forced_de.php index dea261aa66..48d9f5e400 100644 --- a/inc/language/forced_de.php +++ b/inc/language/forced_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,8 +44,6 @@ if (!defined('__SECURITY')) { addMessages(array( // Admin - forced ads 'ADMIN_FORCED_ADS_404' => "Es wurden keine Forced-Werbemittel gefunden.", - 'ADMIN_ADD_FORCED_AD_TITLE' => "Hinzufügen eines Forced-Werbemittels:", - 'ADMIN_ADD_FORCED_ADD_SUBMIT' => "Forced-Werbemittel hinzufügen", 'ADMIN_ENTER_FORCED_AD_CLICK_URL' => "Klick-URL des Forced-Werbemittels eingeben:", 'ADMIN_SELECT_FORCED_AD_TYPE' => "Forced-Werbemittelart auswählen:", 'ADMIN_SELECT_FORCED_HAS_FRAMEBREAKER' => "Hat das Forced-Werbemittel einen Framekiller?", @@ -57,38 +55,129 @@ addMessages(array( 'ADMIN_ENTER_FORCED_ALTERNATE_TEXT' => "Alternativen Text/Titel des Forced-Werbemittels eingeben:", 'ADMIN_ENTER_FORCED_AD_WIDTH' => "Breite (in Pixel) des Forced-Werbemittels eingeben:", 'ADMIN_ENTER_FORCED_AD_HEIGHT' => "Höhe (in Pixel) des Forced-Werbemittels eingeben:", - 'ADMIN_FORCED_ADS_TYPE_UNKNOWN' => "Unbekanntes Forced-Werbemittel %s erkannt.", - 'ADMIN_FORCED_ADS_TYPE_BANNER' => "Forced-Banner", - 'ADMIN_FORCED_ADS_TYPE_TEXTLINK' => "Forced-Textlink", - 'ADMIN_FORCED_ADS_TYPE_POPUP' => "Forced-PopUp", - 'ADMIN_LIST_FORCED_ADS_TITLE' => "Auflisten aller Forced-Werbemittel", + 'ADMIN_FORCED_ADS_CLICK_URL' => "Klick-URL", + 'ADMIN_FORCED_ADS_WIDTH' => "Breite (in Pixel) bei PopUp/Banner", + 'ADMIN_FORCED_ADS_HEIGHT' => "Höhe (in Pixel) bei PopUp/Banner", + 'ADMIN_FORCED_ADS_USERID' => "Verknüpfte Mitglieds-Id", + 'ADMIN_FORCED_ADS_AD_URL' => "URL des Forced-Banners", + 'ADMIN_FORCED_ADS_ALTERNATE_TEXT' => "Alternativen Text", 'ADMIN_FORCED_ADS_TYPE' => "Forced-Werbemittel", 'ADMIN_FORCED_ADS_VIEWS_COUNTER' => "Anzahl Forced-Views", 'ADMIN_FORCED_ADS_CLICKS_COUNTER' => "Anzahl Forced-Klicks", 'ADMIN_FORCED_ADS_HAS_FRAMEBREAKER' => "Framekiller?", - 'ADMIN_FORCED_ADS_ADDED' => "Hinzugefügt:", + 'ADMIN_FORCED_ADS_ADDED' => "Hinzugefügt", 'ADMIN_CHANGE_FORCED_ADS_AD_URL' => "Banner-URL ändern:", 'ADMIN_CHANGE_FORCED_ADS_CLICK_URL' => "Klick-URL ändern:", - 'ADMIN_CHANGE_FORCED_ADS_ALT_TEXT' => "Alternativen Text ändern:", + 'ADMIN_CHANGE_FORCED_ADS_ALTERNATE_TEXT' => "Alternativen Text ändern:", 'ADMIN_CHANGE_FORCED_ADS_WIDTH' => "Breite ändern:", 'ADMIN_CHANGE_FORCED_ADS_HEIGHT' => "Höhe ändern:", 'ADMIN_CHANGE_FORCED_ADS_USERID' => "Zugewiesenes Mitglied ändern:", 'ADMIN_CHANGE_FORCED_ADS_TYPE' => "Art ändern:", 'ADMIN_CHANGE_FORCED_ADS_FRAMEBREAKER' => "Ändern ob ein Framekiller vorhanden ist:", - 'ADMIN_EDIT_FORCED_ADS_TITLE' => "Ändern von Forced-Werbemitteln:", // Admin - forced campaigns - 'ADMIN_FORCED_CAMPAIGNS_404' => "Es wurde keine Forced-Kampagnen gefunden.", + 'ADMIN_FORCED_CAMPAIGNS_404' => "Es wurden keine Forced-Kampagnen gefunden.", + 'ADMIN_ENTER_FORCED_CAMPAIGN_ORDERED_CLICKS' => "Anzahl Klicks/Einblendungen eingeben:", + 'ADMIN_SELECT_FORCED_CAMPAIGN_RELOAD_LOCK' => "Reload-Sperre einstellen:", + 'ADMIN_ENTER_FORCED_CAMPAIGN_MINIMUM_STAY' => "Mindestauffenthalt in Sekunden eingeben:", + 'ADMIN_SELECT_FORCED_AD' => "Forced-Werbemittel auswählen:", + 'ADMIN_SELECT_FORCED_CAMPAIGN_USERID' => "Mitgliedsaccount auswählen, dass dieser Kampagne zugewiesen werden soll:", + 'ADMIN_SELECT_FORCED_COSTS' => "Forced-Preis auswählen:", + 'ADMIN_FORCED_CAMPAIGN_STATUS' => "Kampagnen-Status", + 'ADMIN_FORCED_CAMPAIGN_ORDERED_CLICKS' => "Klicks übrig", + 'ADMIN_FORCED_CAMPAIGN_PAYMENT_API' => "Vergütung von API", + 'ADMIN_FORCED_CAMPAIGN_RELOAD_LOCK' => "Reload-Sperre", + 'ADMIN_FORCED_CAMPAIGN_MINIMUM_STAY' => "Mindestauffenthalt (Sekunden)", + 'ADMIN_FORCED_CAMPAIGN_LAST_LOCKED' => "Zuletzt gesperrt", + 'ADMIN_FORCED_CAMPAIGN_LOCK_REASON' => "Sperrgrund", + 'ADMIN_FORCED_CAMPAIGN_EXPIRED' => "Abgelaufen", + 'ADMIN_FORCED_CAMPAIGN_CREATED' => "Erstellt", + 'ADMIN_FORCED_CAMPAIGNS_ACTIVATED_DONE' => "Es wurden alle ausgewählten Forced-Kampagnen aktiviert.", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_ORDERED_CLICKS' => "Bestellte/Übrige Klicks ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_PAYMENT_API' => "Vergütung von API ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_RELOAD_LOCK' => "Reload-Sperre ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_MINIMUM_STAY' => "Mindestauffenthalt (Sekunden) ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_ADS_ID' => "Verknüpftes Forced-Werbemittel ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_USERID' => "Verknüpftes Mitgliedsaccount ändern:", + 'ADMIN_CHANGE_FORCED_CAMPAIGN_COSTS_ID' => "Verknüpfte Kosten/Vergütung ändern:", // Admin - forced costs - 'ADMIN_FORCED_COSTS_404' => "Es wurden keine Forced-Kosten gefunden.", + 'ADMIN_FORCED_COSTS_404' => "Es wurden keine Forced-Preise gefunden.", + 'ADMIN_ENTER_FORCED_COSTS_PRICE_PER_CLICK' => "Preis in {?POINTS?} pro Klick eingeben:", + 'ADMIN_ENTER_FORCED_COSTS_PAYMENT_PER_CLICK' => "Vergütung in {?POINTS?} pro Klick eingeben:", + 'ADMIN_SELECT_FORCED_COSTS_VISIBILITY' => "Für wen soll dieser Eintrag sichtbar sein?", + 'ADMIN_FORCED_COSTS_PRICE_CLICK' => "Preis ({?POINTS?})", + 'ADMIN_FORCED_COSTS_PAYMENT_CLICK' => "Vergütung ({?POINTS?})", + 'ADMIN_FORCED_COSTS_VISIBILITY' => "Sichtbarkeit", + 'ADMIN_CHANGE_FORCED_COSTS_PRICE_CLICK' => "Preis pro Klick ändern:", + 'ADMIN_CHANGE_FORCED_COSTS_PAYMENT_CLICK' => "Vergütung pro Klick ändern:", + 'ADMIN_CHANGE_FORCED_COSTS_VISIBILITY' => "Preis-Sichtbarkeit ändern:", + 'ADMIN_FORCED_COSTS_SELECTION_NOTICE' => "Erster {?POINTS?}-Wert ist zu zahlender Preis, zweiter die Vergütung.", - // Earning names - 'EARNING_PROVIDER_FORCED_POPUP' => "Forced-PopUp", + // Admin - forced ads types + 'ADMIN_FORCED_ADS_TYPE_UNKNOWN' => "Unbekanntes Forced-Werbemittel %s erkannt.", + 'ADMIN_FORCED_ADS_TYPE_BANNER' => "Forced-Banner", + 'ADMIN_FORCED_ADS_TYPE_TEXTLINK' => "Forced-Textlink", + 'ADMIN_FORCED_ADS_TYPE_POPUP' => "Forced-PopUp", + + // Admin - forced campaign status + 'ADMIN_FORCED_CAMPAIGN_TYPE_UNKNOWN' => "Unbekannter Kampagnenstatus %s erkannt.", + 'ADMIN_FORCED_CAMPAIGN_TYPE_ACTIVE' => "Aktiv", + 'ADMIN_FORCED_CAMPAIGN_TYPE_PENDING' => "Wartend", + 'ADMIN_FORCED_CAMPAIGN_TYPE_EXPIRED' => "Abgelaufen", + 'ADMIN_FORCED_CAMPAIGN_TYPE_LOCKED' => "Gesperrt", + + // Admin - forced costs visibility + 'ADMIN_FORCED_ADS_VISIBILITY_UNKNOWN' => "Unbekannte Preissichtbarkeit %s erkannt.", + 'ADMIN_FORCED_ADS_VISIBILITY_MEMBER' => "Nur Mitglieder", + 'ADMIN_FORCED_ADS_VISIBILITY_SPONSOR' => "Nur Sponsoren", + 'ADMIN_FORCED_ADS_VISIBILITY_ALL' => "Alle", + 'ADMIN_FORCED_ADS_VISIBILITY_NONE' => "Nur Administratoren", + + // Admin - notices + 'ADMIN_ADD_FORCED_COSTS_NOTICE' => "Administratoren können immer alle Forced-Preise verwenden!", + 'ADMIN_LIST_FORCED_CAMPAIGN_NOTICE' => "Das Zuweisen eines Mitgliedsaccounts bewirkt, dass dieses Mitglied das Forced-Werbemittel nicht mehr anklicken kann (da es somit "seines" geworden ist).", + 'ADMIN_EDIT_FORCED_CAMPAIGN_NOTICE' => "{--ADMIN_LIST_FORCED_CAMPAIGN_NOTICE--}", - // Submit buttons + // Admin - titles + 'ADMIN_ADD_FORCED_AD_TITLE' => "Hinzufügen eines Forced-Werbemittels", + 'ADMIN_LIST_FORCED_ADS_TITLE' => "Auflisten aller Forced-Werbemittel", + 'ADMIN_EDIT_FORCED_ADS_TITLE' => "Ändern von Forced-Werbemitteln", + 'ADMIN_DELETE_FORCED_ADS_TITLE' => "Löschen von Forced-Webemitteln", + 'ADMIN_ADD_FORCED_CAMPAIGN_TITLE' => "Hinzufügen einer Forced-Kampagne", + 'ADMIN_LIST_FORCED_CAMPAIGNS_TITLE' => "Auflisten aller Forced-Kampagnen", + 'ADMIN_EDIT_FORCED_CAMPAIGN_TITLE' => "Ändern von Forced-Kampagnen", + 'ADMIN_ADD_FORCED_COSTS_TITLE' => "Hinzufügen von Forced-Preisen", + 'ADMIN_LIST_FORCED_COSTS_TITLE' => "Auflisten aller Forced-Preise", + 'ADMIN_EDIT_FORCED_COSTS_TITLE' => "Ändern von Forced-Preisen", + 'ADMIN_DELETE_FORCED_COSTS_TITLE' => "Löschen von Forced-Preisen", + + // Admin - submit buttons + 'ADMIN_ADD_FORCED_AD_SUBMIT' => "Forced-Werbemittel hinzufügen", 'ADMIN_FORCED_ADS_CHANGE_SUBMIT' => "Forced-Werbemittel ändern", + 'ADMIN_FORCED_ADS_REMOVE_SUBMIT' => "Forced-Werbemittel löschen", + 'ADMIN_ADD_FORCED_CAMPAIGN_SUBMIT' => "Forced-Kampagne hinzufügen", + 'ADMIN_FORCED_CAMPAIGN_CHANGE_SUBMIT' => "Forced-Kampagnen ändern", + 'ADMIN_ADD_FORCED_COSTS_ADD_SUBMIT' => "Preis hinzufügen", + 'ADMIN_FORCED_COSTS_CHANGE_SUBMIT' => "Preise ändern", + 'ADMIN_FORCED_COSTS_REMOVE_SUBMIT' => "Preise löschen", + + // Admin - error messages + 'ADMIN_FORCED_ADS_NO_SELECTIONS' => "Es wurde keine Auswahl getroffen, bitte wählen Sie mindestens ein Forced-Werbemittel aus!", + 'ADMIN_FORCED_CAMPAIGNS_NO_SELECTIONS' => "Es wurde keine Auswahl getroffen, bitte wählen Sie mindestens eine Forced-Kampagne aus!", + 'ADMIN_FORCED_COSTS_NO_SELECTIONS' => "Es wurde keine Auswahl getroffen, bitte wählen Sie mindestens einen Forced-Preis aus!", + 'ADMIN_FORCED_CAMPAIGNS_ACTIVATED_FAILED' => "Bei der Aktivierung von Forced-Kampagnen ist ein Fehler unterlaufen, haben Sie auch nur Kampagnen mit dem Status {--ADMIN_FORCED_CAMPAIGN_TYPE_PENDING--} ausgewählt?", + // Admin - subject lines + 'ADMIN_EDIT_FORCED_ADS_SUBJECT' => "Änderungen an Forced-Werbemitteln", + 'ADMIN_EDIT_FORCED_COSTS_SUBJECT' => "Änderung an Forced-Preisen", + 'ADMIN_FORCED_NOTIFY_CAMPAIGN_PENDING_ACTIVE_SUBJECT' => "Eine Forced-Kampagne wurde freigeschaltet", + + // Member - subject lines + 'MEMBER_FORCED_NOTIFY_CAMPAIGN_PENDING_ACTIVE_SUBJECT' => "Ihre Forced-Kampagne wurde freigeschaltet", + + // All - earning names + 'EARNING_PROVIDER_FORCED_POPUP' => "Forced-PopUp", )); // [EOF] diff --git a/inc/language/holiday_de.php b/inc/language/holiday_de.php index a2511d830b..917a27163f 100644 --- a/inc/language/holiday_de.php +++ b/inc/language/holiday_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/html_mail_de.php b/inc/language/html_mail_de.php index 27d7b7b699..a3fe913a11 100644 --- a/inc/language/html_mail_de.php +++ b/inc/language/html_mail_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,13 +43,13 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( 'ADMIN_HTML_DOWNLOAD_CLASS' => "Bitte laden Sie sich die Klasse PHPMailer herunter, um diese Funktion nutzen zu können.", - 'MEMBER_HTML_INTRO' => "HTML-Emfpang - Einstellung", + 'MEMBER_HTML_TITLE' => "HTML-Emfpang - Einstellung", 'MEMBER_HTML_TEXT' => "In unserem {?mt_word?} ist das Empfangen von HTML-Mails nun möglich. Gleichzeitig können Sie auch selber HTML-Mails versenden. Möchten Sie dies beides nutzen?", - 'MEMBER_HTML_ORDER_INTRO' => "HTML- oder normale Text-Mails versenden?", - 'MEMBER_HTML_MSG' => "HTML-Mail", - 'MEMBER_NORMAL_MSG' => "Normale Text-Mail", - 'MEMBER_HTML_VALID_TAGS' => "Gütige HTML-Codes sind", - 'MEMBER_HTML_INVALID_TAGS' => "Ungütige HTML-Tags im HTML-Code gefunden.", + 'MEMBER_HTML_ORDER_TITLE' => "HTML- oder normale Text-Mails versenden?", + 'MEMBER_HTML_MESSAGE' => "HTML-Mail:", + 'MEMBER_NORMAL_MESSAGE' => "Normale Text-Mail:", + 'MEMBER_HTML_VALID_TAGS' => "Gültige HTML-Codes sind", + 'MEMBER_HTML_INVALID_TAGS' => "Ungültige HTML-Tags im HTML-Code gefunden.", )); // [EOF] diff --git a/inc/language/imprint_de.php b/inc/language/imprint_de.php index 7cf6376051..8ec9289a9e 100644 --- a/inc/language/imprint_de.php +++ b/inc/language/imprint_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/install_de.php b/inc/language/install_de.php index 8cbd6b543b..403ec712e7 100644 --- a/inc/language/install_de.php +++ b/inc/language/install_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,72 +42,179 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( + // General language strings 'ALREADY_INSTALLED' => "{?TITLE?} ist bereits auf diesem Server installiert worden Bitte löschen Sie install.php, inc/install-inc.php und das Verzeichnis install/ von Ihrem Server! (Keine Sorge, Sie können es tun...)", 'INSTALLER_OF_MAILER' => "Installation von {?mt_word?}-Projekt-Script", 'INSTALLER_OF_MAILER_NO_ADMIN' => "Installation von {?mt_word?}-Projekt-Script - {?MAIN_TITLE?}", + 'INSTALLER_OF_MAILER' => "Installation von {?TITLE?}-Script", + 'INSTALLER_OF_MAILER_NO_ADMIN' => "Installation von {?TITLE?}-Script - {?MAIN_TITLE?}", + 'INSTALLER_WARN_NO_PASSWORD' => "Warnen, wenn kein Passwort angegeben wurde?", + 'INSTALLER_CONFIG_WRITE_FOOTER' => "Scriptname, -version und -author anzeigen?", + 'INSTALLER_MAIN_TITLE' => "Installation des Scriptes {?TITLE?}", + 'INSTALLER_SELECTOR_TITLE' => "Auswahl der Installationsvarriante", + 'INSTALLER_MAYBE_DONE' => "Die Installation ist möglicherweise abgeschlossen oder es ist ein unerwarteter Fehler aufgetreten.", + 'INSTALLER_FINISHED' => "Die Installation ist abgeschlossen.", + 'INSTALLER_FIN_SECU' => "Sie sollten jetzt die Dateien install.php und inc/install-inc.php von Ihrem Server löschen. Dies ist zwar normalerweise nicht erforderlich, Sie sollten es aber dennoch tun, um die Sicherheit zusätzlich zu erhöhen.", + 'INSTALLER_CONTINUE_ADMIN' => "Weiter zum Administrationsbereich...", + + // Plain installer - general + 'INSTALLER_SQL_IMPORT_FAILED' => "Konnte die SQL-Dateien aus install/ nicht nachladen. Bitte Zugriffsrechte (CHMOD) auf die Dateien überprüfen. Diese sollten 644 mindestens aufweisen.", + 'INSTALLER_PROBLEMS_DETECTED' => "Es wurden bei der Initialisierung des Installationsvorganges Probleme festgestellt.", + 'INSTALLER_CONTENT_404' => "Es wurde kein Content gefunden. Bitte melden Sie dies im Bug-Tracker und nennen Sie alle relevanten Informationen.", + 'INSTALLER_RETURN_MYSQL_PAGE' => "Zurück zu den Datenbank-Einstellungen", + 'INSTALLER_FINALIZER_FAILED' => "Während der Installation ist ein unerwarteter Fehler aufgetreten. Der Finalizer konnte die Installation nicht abschliessen.", + 'INSTALLER_FINALIZER_CANNOT_REGISTER_SQL_PATCHES' => "Währen der Registrierung von ext-sql_patches ist ein unerwarteter Fehler entstanden.", 'INSTALLER_MISSING_DUMPS' => "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).", - 'INSTALLER_ENABLE_BACKLINK' => "Backlink (=Rückverlinkung zu mxchange.org setzen?) rel="external" ist gesetzt. Bitte nicht den Backlink einbauen, und nofollow verwenden! Das schadet allen.", 'INSTALLER_WRONG_PAGE' => "Sie oder dieses Script haben eine falsche Seite ausgewählt.", 'INSTALLER_NEXT_PAGE' => "Weiter zur nächsten Seite...", - 'INSTALLER_HEADER_TEXT_PAGE1' => "Server-Pfad, Basis-URL und Webseitentitel", - 'INSTALLER_HEADER_TEXT_PAGE2' => "Datenbankzugangsdaten: Hostname, Login, Passwort, Tabellentyp usw.", - 'INSTALLER_HEADER_TEXT_PAGE3' => "SMTP-Server Einstellungen", - 'INSTALLER_HEADER_TEXT_PAGE4' => "Cascading Stylesheet-Datei", - 'INSTALLER_HEADER_TEXT_PAGE5' => "Verschiedene Einstellungen", - 'INSTALLER_HEADER_MYSQL_ERRORS' => "Fehler beim Verbinden zur Datenbank.", - 'INSTALLER_TEXT_PAGE_1' => "Geben Sie hier den absoluten Server-Pfad (/ihr/server/pfad/) mit abschliessendem Slash (/), die Basis-URL (vorgegebene Werte stimmen meistens) und den Titel Ihres {?mt_word2?} ein.", - 'INSTALLER_TEXT_PAGE_2' => "Geben Sie hier die Daten vom Datenbankserver ein, die Ihnen vom Hoster mitgeteilt wurden. Es wird dann anschliessend versucht, eine Testverbindung aufzubauen.", - 'INSTALLER_TEXT_PAGE_3' => "Geben Sie hier die Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standard-Einstellungen.", - 'INSTALLER_TEXT_PAGE_4' => "Geben Sie hier die URL Ihrer hochgeladenen CSS-Datei an. Wenn Sie die bestehende Standard-Datei verwenden möchten, so klicken Sie einfach auf Weiter.", - 'INSTALLER_TEXT_PAGE_5' => "Hier können Sie weitere Einstellungen vornehmen, wie zum Beispiel den Ausgabe-Modus festlegen, in der der HTML-Code ausgegeben werden soll, usw.", - 'INSTALLER_TEXT_MYSQL_ERRORS' => "Es konnte keine Verbindung zur Datenbank aufgebaut werden! Ist das Login richtig? Ist auch die UMSCHALT-Taste nicht betätigt? (zweite grüne Lampe leuchtet!) Ist somit das Passwort richtig?

    Hier sind / ist alle Fehler aufgelistet:", - 'INSTALLER_SERVER_PATH' => "Absoluter Server-Pfad", - 'INSTALLER_BASE_URL' => "Basis-URL", - 'INSTALLER_HP_TITLE' => "{?mt_word?}-Titel", - 'INSTALLER_HP_SLOGAN' => "Werbespruch", - 'INSTALLER_HP_EMAIL' => "E-Mail-Adresse", - 'INSTALLER_MYSQL_HOST' => "Server-Hostname", - 'INSTALLER_MYSQL_DBASE' => "Datenbank", - 'INSTALLER_MYSQL_PREFIX' => "Präfix für alle Tabellen", - 'INSTALLER_MYSQL_TABLE_TYPE' => "Tabellentyp: (MyISAM ist meistens ausreichend)", - 'INSTALLER_TABLE_TYPE_MYISAM' => "MyISAM (langsamer, da Tabelle gelockt wird)", - 'INSTALLER_TABLE_TYPE_INNODB' => "InnoDB (schneller, da zweilenweis gelockt wird)", - 'INSTALLER_MYSQL_LOGIN' => "Ihr Loginname", - 'INSTALLER_MYSQL_PASSWORD1' => "Ihr Passwort", - 'INSTALLER_MYSQL_PASSWORD2' => "Passwortwiederholung", - 'INSTALLER_CSS_URL' => "URL zur CSS-Datei (relativ)", + 'INSTALLER_MYSQL_ERRORS_TITLE' => "Fehler beim Verbinden zur Datenbank.", + 'INSTALLER_MYSQL_ERRORS' => "Es konnte keine Verbindung zur Datenbank aufgebaut werden! Ist das Login richtig? Ist auch die UMSCHALT-Taste nicht betätigt? (zweite grüne Lampe leuchtet!) Ist somit das Passwort richtig?

    Hier sind / ist alle Fehler aufgelistet:", + + // Plain installer: fatal error messages 'INSTALLER_FATAL_NO' => "Fataler Fehler im Installer Nr. #", 'INSTALLER_FATAL_NO_MHOST' => "Sie haben keinen Hostnamen eingeben.", 'INSTALLER_FATAL_NO_MDBASE' => "Bitte geben Sie einen Datenbankname ein.", 'INSTALLER_FATAL_NO_MLOGIN' => "Bitte geben Sie Ihr Loginname zum Datenbank-Server ein.", 'INSTALLER_FATAL_NO_MPASSWORD1' => "Sie haben kein Passwort eingegeben! Dies ist sehr unsicher und wird daher als Fehler gewertet.", 'INSTALLER_FATAL_NO_MPASSWORD2' => "Bitte geben Sie noch die Passwortbestätigung ein.", - 'INSTALLER_FATAL_MPASSWORD1_MPASSWORD2' => "Ihre beiden Passwörter sind nicht identisch.", + + // Installation pages titles + 'INSTALLER_PAGE_INIT_TITLE' => "Installationsroute initialisiert gerade", + 'INSTALLER_PAGE_WELCOME_TITLE' => "Willkommen zur Installation von {?TITLE?}, dem freien {?mt_word?}-Script.", + 'INSTALLER_BASE_DATA_TITLE' => "Server-Pfad, Basis-URL und Webseitentitel", + 'INSTALLER_DATABASE_CONFIG_TITLE' => "Datenbankzugangsdaten: Hostname, Login, Passwort, Tabellentyp usw.", + 'INSTALLER_SMTP_CONFIG_TITLE' => "SMTP-Server Einstellungen", + 'INSTALLER_OTHER_CONFIG_TITLE' => "Verschiedene Einstellungen", + + // Installation pages descriptions + 'INSTALLER_BASE_DATA_DESCRIPTION' => "Geben Sie hier den absoluten Server-Pfad (/ihr/server/pfad/) mit abschliessendem Slash (/), die Basis-URL (vorgegebene Werte stimmen meistens) und den Titel Ihres {?mt_word2?} ein.", + 'INSTALLER_DATABASE_CONFIG_DESCRIPTION' => "Geben Sie hier die Daten vom Datenbankserver ein, die Ihnen vom Hoster mitgeteilt wurden. Es wird dann anschliessend versucht, eine Testverbindung aufzubauen.", + 'INSTALLER_SMTP_CONFIG_DESCRIPTION' => "Geben Sie hier die Ihre Zugangsdaten zum SMTP-Server (ausgehender Mailserver) ein, wenn der mail()-Befehl auf Ihrem Server deaktiviert sein sollte. Oder lassen Sie alle Felder leer für Standard-Einstellungen.", + 'INSTALLER_OTHER_CONFIG_DESCRIPTION' => "Hier können Sie weitere Einstellungen vornehmen, wie zum Beispiel den Ausgabe-Modus festlegen, in der der HTML-Code ausgegeben werden soll, usw.", + + // Installation page - Base data + 'INSTALLER_LABEL_BASE_PATH' => "Absoluter Server-Pfad:", + 'INSTALLER_LABEL_BASE_URL' => "Basis-URL:", + 'INSTALLER_LABEL_MAIN_TITLE' => "{?mt_word?}-Titel:", + 'INSTALLER_LABEL_SLOGAN' => "Werbespruch:", + 'INSTALLER_LABEL_WEBMASTER' => "E-Mail-Adresse:", + + // Installation page - database configuration + 'INSTALLER_MYSQL_HOST' => "Server-Hostname:", + 'INSTALLER_MYSQL_DBASE' => "Datenbank:", + 'INSTALLER_MYSQL_PREFIX' => "Präfix für alle Tabellen:", + 'INSTALLER_MYSQL_TABLE_TYPE' => "Tabellentyp:", + 'INSTALLER_MYSQL_TABLE_TYPE_NOTICE' => "MyISAM ist meistens ausreichend.", + 'INSTALLER_TABLE_TYPE_MYISAM' => "MyISAM (langsamer, da Tabelle gelockt wird)", + 'INSTALLER_TABLE_TYPE_INNODB' => "InnoDB (schneller, da zweilenweis gelockt wird)", + 'INSTALLER_MYSQL_LOGIN' => "Ihr Loginname:", + 'INSTALLER_MYSQL_PASSWORD1' => "Ihr Passwort:", + 'INSTALLER_MYSQL_PASSWORD2' => "Passwortwiederholung:", + + // Installation page - Other settings 'INSTALLER_OUTPUT_MODE' => "Ausgabemodus des HTML-Codes", - 'INSTALLER_MODE_RENDER' => "HTML-Code wird vom Server komplett erzeugt und dann ausgegeben", - 'INSTALLER_MODE_DIRECT' => "HTML-Code wird sofort ausgegegeben. (Langsam)", - 'INSTALLER_WARN_NO_PASSWORD' => "Warnen, wenn kein Passwort angegeben wurde?", - 'INSTALLER_SQL_IMPORT_FAILED' => "Konnte die SQL-Dateien aus install/ nicht nachladen. Bitte Zugriffsrechte (CHMOD) auf die Dateien überprüfen. Diese sollten 644 mindestens aufweisen.", - 'INSTALLER_CONFIG_WRITE_FOOTER' => "Scriptname, -version und -author anzeigen?", - 'INSTALLER_PROBLEMS_DETECTED' => "Es wurden bei der Initialisierung des Installationsvorganges Probleme festgestellt.", - 'INSTALLER_MAIN_HEADER' => "Installation des Scriptes {?TITLE?}", - 'INSTALLER_RETURN_MYSQL_PAGE' => "Zurück zu den Datenbank-Einstellungen", - 'INSTALLER_FINALIZER_FAILED' => "Während der Installation ist ein unerwarteter Fehler aufgetreten. Der Finalizer konnte die Installation nicht abschliessen.", - 'INSTALLER_MAYBE_DONE' => "Die Installation ist möglicherweise abgeschlossen oder es ist ein unerwarteter Fehler aufgetreten.", - 'INSTALLER_FINISHED' => "Die Installation ist abgeschlossen.", - 'INSTALLER_FIN_SECU' => "Sie sollten jetzt die Dateien install.php und inc/install-inc.php von Ihrem Server löschen. Dies ist zwar normalerweise nicht erforderlich, Sie sollten es aber dennoch tun, um die Sicherheit zusätzlich zu erhöhen.", - 'INSTALLER_CONTINUE_ADMIN' => "Weiter zum Administrationsbereich...", - 'INSTALLER_CONTENT_404' => "Es wurde kein Content gefunden. Bitte melden Sie dies im Bug-Tracker und nennen Sie alle relevanten Informationen.", + 'INSTALLER_MODE_RENDER' => "In $GLOBALS "rendern"", + 'INSTALLER_MODE_DIRECT' => "Im Ausgabebuffer cachen", + 'INSTALLER_ENABLE_BACKLINK' => "Backlink zu {?SERVER_URL?} setzen?", + 'INSTALLER_ENABLE_BACKLINK_NOTICE' => "Derzeit ist rel="external" für den Backlink gesetzt. Bitte nicht den Backlink eingebaut lassen und rel="nofollow" verwenden. Das schadet allen.", + + // Installation notes + 'INSTALLER_BASE_PATH_NOTICE' => "Mit abschließendem /.", + 'INSTALLER_BASE_URL_NOTICE' => "Ohne abschließendem /.", + 'INSTALLER_SMTP_HOST_NOTICE' => "Zum Beispiel mail.ihre-domain.example", + + // AJAX title + 'INSTALLER_AJAX_ERROR_TITLE' => "AJAX-Abfrage im Installer fehlgeschlagen", + 'INSTALLER_AJAX_WARNING_TITLE' => "Warnung: Es sind ungespeicherte Änderungen vorhanden", + 'INSTALLER_AJAX_TEST_TITLE' => "AJAX-Testergebnis positiv", -// SMTP input - 'INSTALLER_TEXT_SMTP_HOST' => "SMTP-Servername (z.B. mail.provider.tld)", - 'INSTALLER_TEXT_SMTP_USER' => "SMTP-Benutzername", - 'INSTALLER_TEXT_SMTP_PASSWORD1' => "SMTP-Kennwort", - 'INSTALLER_TEXT_SMTP_PASSWORD2' => "SMTP-Kennwortwiederholung", + // Installer switches + 'INSTALLER_SWITCH_PLAIN' => "Kompatiblitätsmodus", + 'INSTALLER_SWITCH_START' => "Zur Startseite zurückkehren ...", + 'INSTALLER_SWITCH_AJAX' => "Zur "interaktiven" AJAX-Version ...", + + // SMTP input + // @TODO Move this to e.g. ext-smtp + 'INSTALLER_SMTP_HOST' => "SMTP-Servername:", + 'INSTALLER_SMTP_USER' => "SMTP-Benutzername:", + 'INSTALLER_SMTP_PASSWORD1' => "SMTP-Kennwort:", + 'INSTALLER_SMTP_PASSWORD2' => "SMTP-Kennwortwiederholung:", 'INSTALLER_SMTP_HOSTNAME_EMPTY' => "SMTP-Servername leer gelassen.", 'INSTALLER_SMTP_PASSWORD1_EMPTY' => "SMTP-Passwort leer gelassen.", 'INSTALLER_SMTP_PASSWORD2_EMPTY' => "SMTP-Passwortwiederholung leer gelassen.", 'INSTALLER_SMTP_PASS_MISMATCH' => "SMTP-Passwort und -wiederholung stimmen nicht überein.", + + // Tab-navigation links + 'INSTALLER_TAB_NAVIGATION_WELCOME_TITLE' => "Zur Willkommensseite", + 'INSTALLER_TAB_NAVIGATION_WELCOME_LINK' => "Willkommen", + 'INSTALLER_TAB_NAVIGATION_BASE_DATA_TITLE' => "Seite 1: Basis-Pfad, Titel und Slogan", + 'INSTALLER_TAB_NAVIGATION_BASE_DATA_LINK' => "Grunddaten", + 'INSTALLER_TAB_NAVIGATION_DATABASE_CONFIG_TITLE' => "Seite 2: Datenbank-Konfiguration", + 'INSTALLER_TAB_NAVIGATION_DATABASE_CONFIG_LINK' => "Datenbankzugang", + 'INSTALLER_TAB_NAVIGATION_SMTP_CONFIG_TITLE' => "Seite 3: SMTP-Daten konfigurieren", + 'INSTALLER_TAB_NAVIGATION_SMTP_CONFIG_LINK' => "SMTP-Daten", + 'INSTALLER_TAB_NAVIGATION_OTHER_CONFIG_TITLE' => "Seite 5: Sonstige Grundeinstellungen", + 'INSTALLER_TAB_NAVIGATION_OTHER_CONFIG_LINK' => "Sonstiges", + 'INSTALLER_TAB_NAVIGATION_OVERVIEW_TITLE' => "Installationszusammenfassung", + 'INSTALLER_TAB_NAVIGATION_OVERVIEW_LINK' => "Zusammenfassung", + + // Changed elements - base data + 'INSTALLER_CHANGED_ELEMENT_BASE_PATH' => "Sie haben den Basis-Pfad zu allen Scripten geändert.", + 'INSTALLER_CHANGED_ELEMENT_BASE_URL' => "Sie haben die Basis-URL für alle URLs geändert.", + 'INSTALLER_CHANGED_ELEMENT_MAIN_TITLE' => "Sie haben den {?mt_word?}-Titel geändert.", + 'INSTALLER_CHANGED_ELEMENT_SLOGAN' => "Sie haben den Werbespruch geändert.", + 'INSTALLER_CHANGED_ELEMENT_WEBMASTER' => "Sie haben die Email-Adresse für den Webmaster geändert.", + + // Changed elements - database configuration + 'INSTALLER_CHANGED_ELEMENT_MYSQL_HOST' => "Sie haben den Hostnamen für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_DBASE' => "Sie haben den Datenbanknamen für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_PREFIX' => "Sie haben den Tabellenpräfix für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_TYPE' => "Sie haben den Tabellentyp für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_LOGIN' => "Sie haben den Login für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_PASSWORD1' => "Sie haben das Passwort für die Datenbankverbindung geändert.", + 'INSTALLER_CHANGED_ELEMENT_MYSQL_PASSWORD2' => "Sie haben die Passwortwiederholung für die Datenbankverbindung geändert.", + + // Changed elements - SMTP configuration + 'INSTALLER_CHANGED_ELEMENT_SMTP_HOST' => "Sie haben den SMTP-Hostnamen geändert.", + 'INSTALLER_CHANGED_ELEMENT_SMTP_USER' => "Sie haben den SMTP-Benutzernamen geändert.", + 'INSTALLER_CHANGED_ELEMENT_SMTP_PASSWORD1' => "Sie haben das SMTP-Passwort geändert.", + 'INSTALLER_CHANGED_ELEMENT_SMTP_PASSWORD2' => "Sie haben die Wiederholung für das SMTP-Passwort geändert.", + + // Changed elements - other configuration + 'INSTALLER_CHANGED_ELEMENT_OUTPUT_MODE' => "Sie haben den Ausgabemodus geändert.", + 'INSTALLER_CHANGED_ELEMENT_WARN_NO_PASS' => "Sie haben die Warnung für ein leeres Datenbankpasswort geändert.", + 'INSTALLER_CHANGED_ELEMENT_WRITE_FOOTER' => "Sie haben die Einstellung für das Ausgeben der Fusszeile geändert.", + 'INSTALLER_CHANGED_ELEMENT_ENABLE_BACKLINK' => "Sie haben die Einstellung für den Backlink zu {?SERVER_URL?} geändert.", + + // Fieldset legends + 'INSTALLER_BASE_DATA_LEGEND_BASE_URL_PATH' => "Basis-Pfad und -URL:", + 'INSTALLER_BASE_DATA_LEGEND_TITLE_SLOGAN' => "{?mt_word?}-Titel und Werbespruch:", + 'INSTALLER_DATABASE_LEGEND_HOST_DBASE_PREFIX_TYPE' => "Hostname, Datenbankname, Präfix und Tabellentyp:", + 'INSTALLER_DATABASE_LEGEND_LOGIN_PASSWORD' => "Datenbanklogin und -passwort:", + 'INSTALLER_SMTP_LEGEND_OPTIONAL_CONFIG' => "Optionale SMTP-Daten:", + 'INSTALLER_OTHER_CONFIG_LEGEND_ET_CETERA' => "Sonstige Einstellungen:", + + // Save changes + 'INSTALLER_SAVE_CHANGES_FAILED' => "Die Änderungen konnten leider nicht gespeichert werden, da einige fehlerhaft sind. Bitte korregieren Sie die rot hervorgehobenen Einträge und probieren Sie es erneut.", + 'INSTALLER_SAVE_CHANGES_DONE' => "Änderungen gespeichert.", + + // Post-Check - General failure messages + 'INSTALLER_POST_CHECK_DATABASE_CONFIG_FAILED' => "Beim testweisen Aufbauen einer Datenbankverbindung ist ein Fehler entstanden: %s", + + // Post-Check - Database connection + 'INSTALLER_POST_DATABASE_PASSWORD1_EMPTY' => "Das Passwort zur Datenbank ist leer, jedoch ist die Passwortwiederholung gesetzt.", + 'INSTALLER_POST_DATABASE_PASSWORD2_EMPTY' => "Das Passwort zur Datenbank ist gesetzt, jedoch ist die Passwortwiederholung leer.", + 'INSTALLER_POST_DATABASE_PASSWORDS_MISMATCH' => "Die von Ihnen eingegebenen Passwörter stimmen nicht überein.", + 'INSTALLER_POST_DATABASE_CONNECT_ERROR' => "Verbindung zur Datenbank fehlgeschlagen. mysql_error(): {%pipe,getLastSqlError%}", + 'INSTALLER_POST_DATABASE_SELECT_FAILED' => "Auswahl der Datenbank klappte nicht. mysql_error(): {%pipe,getLastSqlError%}", + 'INSTALLER_POST_DATABASE_ENGINES_SQL_ERROR' => "SQL-Fehler beim Abfragen der Storage-Engines. mysql_error(): {%pipe,getLastSqlError%}", + 'INSTALLER_POST_DATABASE_NO_ENGINES_ACTIVE' => "Es konnten keine aktiven Storage-Engines gefunden werden. Bitte kontaktieren Sie Ihren Hoster.", + 'INSTALLER_POST_DATABASE_ENGINE_UNSUPPORTED' => "Die von Ihnen ausgewählte Storage-Engine wird nicht unterstützt. Meistens gilt dies für InnoDB, dann müssen Sie einfach MyISAM nehmen.", + 'INSTALLER_POST_DATABASE_IN_USE' => "Die von Ihnen ausgewählte Datenbank weist Tabellen auf, die von einer älteren Installation stammen. Damit keine Datenverluste entstehen, wurde die Installation abgebrochen. Bitte verwenden Sie eine neue Datenbank oder leeren Sie die alte.", + + // Final check on 'overview' page + 'INSTALLER_OVERVIEW_FINAL_CHECK_FAILED' => "Leider kann die Installation nicht abgeschlossen werden, da nicht alle Angaben vollständig und korrekt sind.", + 'INSTALLER_OVERVIEW_FINAL_CHECK_DONE' => "Die Installation kann nun abgeschlossen werden.", )); // [EOF] diff --git a/inc/language/logs_de.php b/inc/language/logs_de.php index 8aaff21bc6..6c8cb3d487 100644 --- a/inc/language/logs_de.php +++ b/inc/language/logs_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/mailid_de.php b/inc/language/mailid_de.php index bf94ffe72e..fce79a7a1d 100644 --- a/inc/language/mailid_de.php +++ b/inc/language/mailid_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,6 +54,21 @@ addMessages(array( 'MEMBER_SUBMIT_CODE' => "Abschicken", 'MEMBER_MAILID_TOTAL_POINTS' => "Ihr Kontostand beträgt jetzt {%%pipe,translateComma=%s%%} {?POINTS?}.", 'MEMBER_MAILID_CLICK_BUTTON' => "Einmal den Button anklicken", + + // Points accounts - subject + 'POINTS_SUBJECT_MAILID_OKAY' => "Vergütung einer Mailbestätigung", + 'POINTS_SUBJECT_MAILID_OKAY_REF' => "Referralvergütung einer Mailbestätigung", + 'POINTS_SUBJECT_MAILID_PAYBACK' => "Bestätungscode falsch", + + // Admin - subject lines + 'ADMIN_DIRECT_MAILID_OKAY_SUBJECT' => "Direktgutschrift von korrekte Mailbestätigung aufgebucht", + 'ADMIN_REFERRAL_MAILID_OKAY_SUBJECT' => "Referralgutschrift von korrekte Mailbestätigung aufgebucht", + 'ADMIN_REFERRAL_MAILID_OKAY_REF_SUBJECT' => "Anteilige Referralgutschrift von korrekte Mailbestätigung aufgebucht", + + // Member - subject lines + 'MEMBER_DIRECT_MAILID_OKAY_SUBJECT' => "Direktgutschrift durch korrekte Mailbestätigung erhalten", + 'MEMBER_REFERRAL_MAILID_OKAY_SUBJECT' => "Referralgutschrift durch korrekte Mailbestätigung erhalten", + 'MEMBER_REFERRAL_MAILID_OKAY_REF_SUBJECT' => "Anteilige Referralgutschrift durch korrekte Mailbestätigung erhalten", )); // [EOF] diff --git a/inc/language/maintenance_de.php b/inc/language/maintenance_de.php index 76541172b9..697da8c6d9 100644 --- a/inc/language/maintenance_de.php +++ b/inc/language/maintenance_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/mediadata_de.php b/inc/language/mediadata_de.php index f64a8bf28d..c00390dc6c 100644 --- a/inc/language/mediadata_de.php +++ b/inc/language/mediadata_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/menu_de.php b/inc/language/menu_de.php index 156309f8c8..3c008b3f0d 100644 --- a/inc/language/menu_de.php +++ b/inc/language/menu_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/mods_de.php b/inc/language/mods_de.php index e42f523421..27546c2e15 100644 --- a/inc/language/mods_de.php +++ b/inc/language/mods_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/mydata_de.php b/inc/language/mydata_de.php index 5293a5f233..339acdb82c 100644 --- a/inc/language/mydata_de.php +++ b/inc/language/mydata_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 2aff468c8f..77f466a2d5 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -131,10 +131,10 @@ addMessages(array( 'ADMIN_NETWORK_TYPE_HANDLER_REMOVED' => "Es wurden %s Werbeart-Handler gelöscht.", 'ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED' => "Es wurden %s Abfrageparameter gelöscht.", // - Form notes - 'ADMIN_ADD_NETWORK_NOTICE' => "Mehr Datenschutz bei POST-Abfragen bedeutet, dass die von den Internetanbietern betriebenen Caches (Proxy) die POST-Daten nicht mitloggen (so eine Art Kodex). Der Zeichensatz ist meistens ISO-8859-1 oder WINDOWS-1252.", + 'ADMIN_ADD_NETWORK_NOTICE' => "Besserer Datenschutz bei POST-Abfragen bedeutet, dass die von den Internetanbietern betriebenen Caches (Proxy) die POST-Daten nicht mitloggen (so eine Art Kodex). Der Zeichensatz ist meistens ISO-8859-1 oder WINDOWS-1252.", 'ADMIN_LIST_NETWORK_NOTICE' => "Seien Sie mit dem Löschen und Editieren vonallgemeinen Daten der Werbenetzwerke sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten.", 'ADMIN_LIST_NETWORK_REFERRAL_LINK_NOTICE' => "Wenn Sie Ihren Referral-Link eingeben, verwenden Sie bitte nicht dieses Formular, sondern das unter [API-Zugangsdaten]. Sollten Sie hier Ihren Referral-Link eingetragen haben, ist dies nicht weiter schlimm, er wird jedoch nicht veröffentlicht.", - 'ADMIN_ADD_NETWORK_HANDLER_TYPE_NOTICE' => "Fügen Sie hier weitere Werbearten-Handler dem ausgwählten Werbenetzwerk hinzu. Die Klick- und Banner-URL müssen dabei Platzhalter enthalten, die Sie der Dokumentation und dem Forum entnehmen können. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: http://www.some-sponsor.invalid/inteface/script.php, falsch: http://www.some-sponsor.invalid/inteface/script.php?uid=123&pw=xyzxyzxyz", + 'ADMIN_ADD_NETWORK_HANDLER_TYPE_NOTICE' => "Fügen Sie hier weitere Werbearten-Handler dem ausgwählten Werbenetzwerk hinzu. Die Klick- und Banner-URL müssen dabei Platzhalter enthalten, die Sie der Dokumentation und dem Forum entnehmen können. Die API-URL muss nur bis zum Fragezeichen eingegeben werden. Richtig: http://www.some-sponsor.example/inteface/script.php, falsch: http://www.some-sponsor.example/inteface/script.php?uid=123&pw=xyzxyzxyz", 'ADMIN_NETWORK_TYPE_HANDLER_LIST_NOTICE' => "Seien Sie mit dem Löschen und Editieren von Werbeart-Handlern sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Platzhaltern (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", 'ADMIN_ADD_NETWORK_REQUEST_PARAMETER_NOTICE' => "Fügen Sie hier weitere Abfrageparameter dem ausgwählten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei Abfrageparameter den GET- bzw. POST-Parameternamen an.", 'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_NOTICE' => "Seien Sie mit dem Löschen und Editieren von Abfrageparameter sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Abfragenamen (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", @@ -190,7 +190,7 @@ addMessages(array( 'ADMIN_NETWORK_ROW_SEPARATOR' => "Trennzeichen f. Zeilen:", 'ADMIN_NETWORK_REQUEST_TYPE' => "HTTP-Abfragetyp:", 'ADMIN_NETWORK_REQUEST_TYPE_GET' => "GET (meistens richtig)", - 'ADMIN_NETWORK_REQUEST_TYPE_POST' => "POST (mehr Datenschutz)", + 'ADMIN_NETWORK_REQUEST_TYPE_POST' => "POST (besserer Datenschutz)", 'ADMIN_NETWORK_CHARSET' => "Zeichensatz:", 'ADMIN_NETWORK_REQUIRE_ID_CARD' => "ID verlangt?", 'ADMIN_NETWORK_SEPARATOR' => "Trennzeichen:", diff --git a/inc/language/newsletter_de.php b/inc/language/newsletter_de.php index e36fc912e7..f42384f95b 100644 --- a/inc/language/newsletter_de.php +++ b/inc/language/newsletter_de.php @@ -19,7 +19,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/nickname_de.php b/inc/language/nickname_de.php index ea6e65994b..ed02ab9ef2 100644 --- a/inc/language/nickname_de.php +++ b/inc/language/nickname_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,9 +48,9 @@ addMessages(array( 'MEMBER_NICKNAME_CHANGE_SUBMIT' => "Nickname ändern", 'MEMBER_NICKNAME_ALREADY_IN_USE' => "Der von Ihnen eingegebene Nickname wird bereits verwendet.", 'MEMBER_NICKNAME_SAVED' => "Nickname wurde gespeichert.", - 'GUEST_ENTER_LOGIN_NICKNAME' => "Nickname o. Login-Id", + 'GUEST_ENTER_LOGIN_NICKNAME' => "Nickname o. Mitglieds-Id", 'MEMBER_NICKNAME_ALLOWED_CHARS' => "Erlaubte Zeichen:", - 'MEMBER_NICKNAME_IS_INVALID' => "Ungütige Zeichen im Nicknamen gefunden oder ist zu kurz.", + 'MEMBER_NICKNAME_IS_INVALID' => "Ungültige Zeichen im Nicknamen gefunden oder ist zu kurz.", 'MEMBER_NICKNAME_YOUR_REFERRAL_LINK' => "Ihr Nickname-Reflink", 'MEMBER_NO_NICKNAME_SET' => "Sie haben noch keinen Nickname eingerichtet! Damit können Sie sich alternativ zur Mitglied-Id einloggen.", 'MEMBER_PLEASE_CLICK_NICKNAME_FORM' => "Hier können Sie sich nun einen einrichten...", diff --git a/inc/language/online_de.php b/inc/language/online_de.php index d6be1bd161..3eaf6d456b 100644 --- a/inc/language/online_de.php +++ b/inc/language/online_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/optimize_de.php b/inc/language/optimize_de.php index 5102b35e37..9395238042 100644 --- a/inc/language/optimize_de.php +++ b/inc/language/optimize_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/order_de.php b/inc/language/order_de.php index 80590346f1..7bb0e639c2 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,57 +42,67 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( - 'ADMIN_CONFIG_ORDER_TITLE' => "Einstellungen - Mailbuchung", - 'ADMIN_CONFIG_ORDER_MISC_TITLE' => "Weitere Einstellungen", + // Admin configuration + 'ADMIN_CONFIG_ORDER_TITLE' => "Einstellungen an der Mailbuchung", 'ADMIN_CONFIG_ORDER_SELECT_MAX' => "Wie viele Mailbuchungen können die Mitglieder maximal pro Tag versenden?", - 'ADMIN_CONFIG_ORDER_OPTION_MAX' => "Die Mitglieder können so viele Mailbuchungen wie möglich tätigen.", + 'ADMIN_CONFIG_ORDER_OPTION_MAX' => "Die Mitglieder können so viele Mailbuchungen wie möglich tätigen (bis alle Empfänger aufgebraucht sind).", 'ADMIN_CONFIG_ORDER_OPTION_ORDER' => "Die Mitglieder könen nur so viele Mailbuchungen tätigen, wie sie den Mailempfang eingestellt haben.", 'ADMIN_CONFIG_ORDER_MIN_RECEIVER_PER_ORDER' => "Minimale Anzahl Empfänger pro Mailbuchung", - 'ADMIN_ORDER_SELECTION_COLUMN' => "Tabellenspalte, nach der umsortiert werden soll", - 'ADMIN_ORDER_SELECTION_MODE' => "Sortierreihenfolge", - 'ADMIN_ORDER_SELECTION_SETTINGS' => "Auswahlverfahren der Empfänger", + 'ADMIN_CONFIG_ORDER_SELECTION_COLUMN' => "Tabellenspalte, nach der umsortiert werden soll", + 'ADMIN_CONFIG_ORDER_SELECTION_MODE' => "Sortierreihenfolge", 'ADMIN_CONFIG_MAX_TEXT_LENGTH' => "Maximale Länge des Werbetextes", - 'ADMIN_CONFIG_MAX_UNCONFIRMED_MAILS' => "Maximale Anzahl unbest. Mails (Mailbuchung)", + 'ADMIN_CONFIG_MAX_UNCONFIRMED_MAILS' => "Maximale erlaubter Anzahl unbest. Mails um eine Mailbuchung durchzuführen", 'ADMIN_CONFIG_CHECK_EMAIL_TEXT' => "Sind URLs im Werbetext erlaubt?", 'ADMIN_CONFIG_CHECK_EMAIL_SUBJECT' => "Sind URLs in der Betreffzeile erlaubt?", 'ADMIN_CONFIG_URL_BLACKLIST' => "Black-Liste für gebuchte URLs aktivieren?", + 'ADMIN_CONFIG_ORDER_NOTICE' => "Das Auswahlverfahren von Mailempfängern wirkt sich nur auf kleinere Buchungen - mit weniger Empfänger als maximal möglich - aus.", + // Admin config - repay options + 'ADMIN_CONFIG_REPAY_POINTS_REPAY' => "Dem Mitglied wieder gutschreiben", + 'ADMIN_CONFIG_REPAY_POINTS_JACKPOT' => "In den Jackpot legen", + 'ADMIN_CONFIG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verfällt dann)", + 'ADMIN_REPAY_ON_DELETE_MODE' => "Wenn Sie eine Mailbuchung löschen, wie sollen die ausgegebenen {?POINTS?} gehandhabt werden?", + + // Admin config - legends + 'ADMIN_CONFIG_ORDER_SELECTION_LEGEND' => "Auswahlverfahren der Empfänger", + 'ADMIN_CONFIG_ORDER_MISC_LEGEND' => "Sonstige Einstellungen", + 'ADMIN_CONFIG_ORDER_SELECT_MAX_LEGEND' => "Maximale Buchungen pro Tag, pro Mitglied", + // @TODO Find better text + 'ADMIN_CONFIG_ORDER_MEMBER_LEGEND' => "Weitere Einstellungen", + + // Admin config - columns + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_USERID' => "Mitgliedsnummer", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_ZIP' => "Postleitzahl", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_COUNTRY' => "Land", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_EMAIL' => "EMail-Adresse", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_BIRTH_YEAR' => "Geburtsjahr", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_LAST_ONLINE' => "Als letztes Online", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_REFERRAL_CLICKS' => "Klicks auf Ref-Link", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_TOTAL_LOGINS' => "Gesamtlogins", + 'ADMIN_CONFIG_ORDER_SELECT_COLUMN_MAIL_ORDERS' => "Heutige Mailbuchungen", + + // Member strings 'MEMBER_ORDER_ALLOWED_RECEIVE' => "Sie können heute noch %s von %s Mailbuchungen aufgeben.", 'MEMBER_ORDER_ALLOWED_MAX' => "Sie können solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind.", 'MEMBER_ORDER_ALLOWED_UNKNOWN' => "Fehler in Konfiguration erkannt! cfg={?order_max_full?} Bitte den Administrator benachrichtigen.", 'MEMBER_ORDER_MAX_ALLOWED' => "Maximale Mailbuchungen", 'MEMBER_ORDER_ALLOWED_EXHAUSTED' => "Sie können keine weiteren Mails mehr versenden, oder stellen Sie bitte den Empfang höher ein.", - 'MEMBER_ENTER_INVALID_URL' => "Ungütige URL eingegeben.", + 'MEMBER_ENTER_INVALID_URL' => "Ungültige URL eingegeben.", 'MEMBER_NO_MAIL_TYPE_SELECTED' => "Bitte wählen Sie eine Mailart aus.", 'MEMBER_ORDER_NO_POINTS' => "Sie haben keine {?POINTS?} mehr zum Versenden übrig.", 'MEMBER_ORDER_NO_PAYMENTS' => "Der Admin dieses {?mt_word3?} hat noch keine Mailarten definiert.", 'MEMBER_ORDER_LINKS_LEFT' => "Sie haben %s unbestätigte Mails. Bitte bestätigen Sie diese zuerst. Wenn Sie weniger als {?unconfirmed?} Mails im Account haben, können Sie auch wieder buchen.", - 'ADMIN_ORDER_SELECT_COLUMN_USERID' => "Mitgliedsnummer", - 'ADMIN_ORDER_SELECT_COLUMN_ZIP' => "Postleitzahl", - 'ADMIN_ORDER_SELECT_COLUMN_COUNTRY' => "Land", - 'ADMIN_ORDER_SELECT_COLUMN_EMAIL' => "EMail-Adresse", - 'ADMIN_ORDER_SELECT_COLUMN_BIRTH_YEAR' => "Geburtsjahr", - 'ADMIN_ORDER_SELECT_COLUMN_LAST_ONLINE' => "Als letztes Online", - 'ADMIN_ORDER_SELECT_COLUMN_REFERRAL_CLICKS' => "Klicks auf Ref-Link", - 'ADMIN_ORDER_SELECT_COLUMN_TOTAL_LOGINS' => "Gesamtlogins", - 'ADMIN_ORDER_SELECT_COLUMN_MAIL_ORDERS' => "Heutige Mailbuchungen", - - 'ORDER_DEFAULT_SUBJECT' => "Betreffzeile in allen Mails", - 'ORDER_DEFAULT_TEXT' => "Geben Sie hier Ihren Werbetext ein.", 'ADMIN_AUTOSEND_INACTIVE' => "Der Auto-Versand ist in Ihrem {?mt_word?} derzeit deaktiviert. Bitte loggen Sie sich in den Admin-Bereich ein und schalten Sie diese Mailbuchung frei.", 'ADMIN_AUTOSEND_ACTIVE' => "Der Auto-Versand ist in Ihrem {?mt_word?} derzeit aktiviert. Die Mailbuchung wird aktiviert und dann automatisch versand.", 'MEMBER_AUTOSEND_INACTIVE' => "Der Auto-Versand ist in unserem {?mt_word?} derzeit deaktiviert. Ihre Mailbuchung wird bald von einem Administrator überprüft und dann freigegeben.", 'MEMBER_AUTOSEND_ACTIVE' => "Der Auto-Versand ist in unserem {?mt_word?} derzeit aktiviert. Ihr Mailbuchung wurde aktiviert und wird bald automatisch versant.", -// Repay deleted mails constants - 'ADMIN_CONFIG_REPAY_POINTS_REPAY' => "Dem Mitglied wieder gutschreiben", - 'ADMIN_CONFIG_REPAY_POINTS_JACKPOT' => "In den Jackpot legen", - 'ADMIN_CONFIG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verfällt dann)", - 'ADMIN_REPAY_ON_DELETE_MODE' => "Wenn Sie eine Mailbuchung löschen, wie sollen die ausgegebenen {?POINTS?} gehandhabt werden?", - 'ADMIN_TASK_TYPE_MEMBER_ORDER' => "Mailbuchung vom Mitglied", 'ADMIN_UNLOCK_EMAIL_LINK' => "Mailbuchung ansehen", + + // Points accounts + 'POINTS_ACCOUNT_TYPE_ORDER_POINTS' => "Werbeguthaben", )); // [EOF] diff --git a/inc/language/other_de.php b/inc/language/other_de.php index f031df28de..cbecbe7e72 100644 --- a/inc/language/other_de.php +++ b/inc/language/other_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -78,7 +78,7 @@ addMessages(array( 'ADMIN_CONFIG_MINIMUM_AGE' => "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?", 'ADMIN_CONFIG_SQL_TITLE' => "SQL-Einstellungen", 'ADMIN_CONFIG_DISPLAY_DEBUG_SQLS' => "Sollen die SQL-Abfragen für Administratoren zu Debug-Zwecken angezeigt werden?. Das Einschalten dieser Einstellung kann enorme Performanceverluste bedeuten.", - 'ADMIN_CONFIG_INTERNAL_STATS_TITLE' => "Interne Statistik Einstellungen", + 'ADMIN_CONFIG_INTERNAL_STATS_TITLE' => "Interne Statistik-Einstellungen", 'ADMIN_CONFIG_INTERNAL_STATS_ENABLED' => "Sollen die internen Statistiken eingeschaltet sein? Das Abschalten dieser Statistiken kann etwas Performance bringen, ist aber für Performancemessungen vorraussetzend.", )); diff --git a/inc/language/payout_de.php b/inc/language/payout_de.php index 0ccc2cfc33..0defc12a60 100644 --- a/inc/language/payout_de.php +++ b/inc/language/payout_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -100,7 +100,7 @@ addMessages(array( 'MEMBER_PAYOUT_ID_INVALID' => "Auszahlungs-Id ist ungültig. Bitte Support benachrichtigen.", 'MEMBER_PAYOUT_POINTS_NOT_ENOUGTH' => "Sie haben nicht ausreichend {?POINTS?} angesammelt.", 'MEMBER_PAYOUT_NOW_TITLE' => "Auszahlungsanforderung an uns senden:", - 'MEMBER_PAYOUT_SEND_NOW' => "Auszahlung anfordern", + 'MEMBER_PAYOUT_SEND_SUBMIT' => "Auszahlung anfordern", 'MEMBER_PAYOUT_SELECTED_TYPE' => "Auszahlungstyp", 'MEMBER_PAYOUT_MAXIMUM_POSSIBLE' => "Maximal auszahlbar", 'MEMBER_PAYOUT_REQUESTED_AMOUNT' => "Auszuzahlender Betrag", diff --git a/inc/language/profile_de.php b/inc/language/profile_de.php index d916ce1ef5..c8c667e215 100644 --- a/inc/language/profile_de.php +++ b/inc/language/profile_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/rallye_de.php b/inc/language/rallye_de.php index 4e29715476..e38abaf048 100644 --- a/inc/language/rallye_de.php +++ b/inc/language/rallye_de.php @@ -18,7 +18,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,108 +44,121 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( - 'ADMIN_RALLYE_ADD_NEW_TITLE' => "Neue Ref-Rallye hinzufügen", - 'ADD_RALLYE' => "Rallye hinzufügen", - 'ADD_RALLYE_PRICE' => "Preis hinzufügen", - 'RALLYE_START_DAY' => "Beginn der Referral-Rallye", - 'RALLYE_END_DAY' => "Ende der Referral-Rallye", - 'RALLYE_AUTO_ADD_USER' => "Neue Mitglieder nehmen automatisch dran teil", - 'RALLYE_IS_ACTIVE' => "Rallye ist aktiv", - 'RALLYE_SEND_NOTIFY' => "Autom. Benachrichtigung an Mitglieder senden", - 'RALLYE_OVERLAP_TIMES' => "Rallyes dürfen nicht zeitgleich laufen.", - 'RALLYE_TITLE' => "Rallye-Titel", - 'RALLYE_DESCR' => "Kurze Beschreibung / Freier HTML-Code der Referral-Rallye", - 'RALLYE_TEMPLATE' => "Template (anstelle freien HTML-Codes)", - 'RALLYE_PROBLEM_CREATE' => "Problem beim Erzeugen der Referral-Rallye.", - 'RALLYE_NO_RALLYES_SETUP' => "Bitte fügen Sie zuerst eine neue Referral-Rallye hinzu.", - 'RALLYE_CONFIG_PRICES' => "Preise einrichten für Referral-Rallye %s", - 'RALLYE_PRICE_LEVEL' => "Platz eingeben (1, 2, 3, usw.)", - 'RALLYE_PRICE_POINTS' => "Preis in {?POINTS?}", - 'RALLYE_PRICE_INFOS' => "Preisbeschreibung (Sie können auch nur die Beschreibung eingeben!)", - 'RALLYE_PRICE_ALREADY_FOUND' => "Sie haben bereits für diesen Platz einen Preis vergeben oder ist identisch mit anderen Preisen.", - 'RALLYE_PRICE_LEVEL_SAVED' => "Preis wurde hinzugefügt.", - 'RALLYE_EDIT_DELETE_PRICES' => "Ändern und Löschen von Referral-Rallye-Preisen", + 'ADMIN_RALLYE_START_DAY' => "Beginn der Referral-Rallye", + 'ADMIN_RALLYE_END_DAY' => "Ende der Referral-Rallye", + 'ADMIN_SELECT_RALLYE_AUTO_ADD_USERS' => "Neue Mitglieder nehmen automatisch dran teil", + 'ADMIN_RALLYE_IS_ACTIVE' => "Rallye ist aktiv", + 'ADMIN_SELECT_RALLYE_SEND_NOTIFY' => "Autom. Benachrichtigung an Mitglieder senden", + 'ADMIN_RALLYE_OVERLAP_TIMES' => "Rallyes dürfen nicht zeitgleich laufen.", + 'ADMIN_ENTER_RALLYE_DESCRIPTION' => "Kurze Beschreibung / Freier HTML-Code der Referral-Rallye", + 'ADMIN_SELECT_RALLYE_TEMPLATE' => "Template (anstelle freien HTML-Codes)", + 'ADMIN_RALLYE_PROBLEM_CREATE' => "Problem beim Erzeugen der Referral-Rallye.", + 'ADMIN_RALLYE_NO_RALLYES_SETUP' => "Bitte fügen Sie zuerst eine neue Referral-Rallye hinzu.", + 'ADMIN_RALLYE_PRICE_POINTS' => "Preis in {?POINTS?}", + 'ADMIN_RALLYE_PRICE_INFOS' => "Preisbeschreibung (Sie können auch nur die Beschreibung eingeben!)", + 'ADMIN_RALLYE_PRICE_ALREADY_FOUND' => "Sie haben bereits für diesen Platz einen Preis vergeben oder ist identisch mit anderen Preisen.", + 'ADMIN_RALLYE_PRICE_LEVEL_SAVED' => "Preis wurde hinzugefügt.", 'RALLYE_LEVEL' => "Platz", - 'RALLYE_PRICE_INFO' => "Infos", - 'RALLYE_EDIT_SELECTED_PRICES' => "Preise/Plätze ändern", - 'RALLYE_CHANGE_PRICES' => "Ändern", + 'ADMIN_RALLYE_PRICE_INFO' => "Infos", 'RALLYE_ID' => "Rallye-Id", - 'RALLYE_EDIT_DELETE_RALLYES' => "Ändern / Löschen von Referral-Rallyes (Grunddaten)", - 'RALLYE_ADMIN_ID' => "Admin-Login", - 'RALLYE_TSTART' => "Anfang", - 'RALLYE_TEND' => "Ende", - 'RALLYE_EDIT_DELETE_NOTICE' => "Wenn Sie die Grunddaten der ausgewählten Referral-Rallyes ändern / löschen wollen, markieren Sie diese per Kästchen. Wollen Sie die Preise ändern, klicken Sie den Referral-Rallye-Titel an. Aktive Referral-Rallyes können nicht geändert werden, sondern müssen erst deaktiviert werden.", + 'ADMIN_RALLYE_TITLE' => "Rallye-Titel", + 'ADMIN_RALLYE_ADMIN_LOGIN' => "Admin-Login", + 'ADMIN_RALLYE_STARTED' => "Anfang", + 'ADMIN_RALLYE_ENDED' => "Ende", + 'ADMIN_LIST_RALLYES_NOTICE' => "Wenn Sie die Grunddaten der ausgewählten Referral-Rallyes ändern / löschen wollen, markieren Sie diese per Kästchen. Wollen Sie die Preise ändern, klicken Sie den Referral-Rallye-Titel oder die Anzahl eingerichteter Preise an.", 'ADMIN_RALLYE_PRICES_NOTICE' => "Wenn Sie die Referral-Rallye-Preise hinzufügen, ändern oder löschen wollen, klicken Sie einfach den Referral-Rallye-Titel an.", - 'RALLYE_ENTRIES_DELETED' => "Einträge gelöscht.", - 'RALLYE_ENTRIES_CHANGED' => "Einträge geändert.", - 'RALLYE_ENTRIES_NOT_DELETED' => "Bitte wählen Sie mindestens einen Eintrag zum Löschen aus.", - 'RALLYE_DESCR2' => "Kurzbeschreibung", - 'RALLYE_TEMPLATE2' => "Template", - 'RALLYE_AUTO_ADD' => "Autom. Teilnahme", + 'ADMIN_RALLYE_PRICES_DELETED' => "Rallye-Preise gelöscht.", + 'ADMIN_RALLYE_PRICES_CHANGED' => "Rallye-Preise geändert.", + 'ADMIN_RALLYE_PRICES_NOT_DELETED' => "Bitte wählen Sie mindestens einen Eintrag zum Löschen aus.", + 'ADMIN_RALLYE_DESCRIPTION' => "Kurzbeschreibung", + 'ADMIN_RALLYE_TEMPLATE' => "Template", + 'ADMIN_RALLYE_AUTO_ADD_USERS' => "Autom. Teilnahme", 'RALLYE_ACTIVE' => "Aktiviert", 'RALLYE_NOTIFY' => "Benachrichtigen", 'RALLYE_NOTIFIED' => "Benachrichtigt", 'RALLYE_ASSIGNED_PRICES' => "Bereits eingerichtete Preise", 'RALLYE_ASSIGNED_USERS' => "Teilnehmende Mitglieder", - 'RALLYE_LIST_OVERVIEW_TITLE' => "Datenblätter der Referral-Rallyes", - 'RALLYE_NO_RALLYES_SELECTED' => "Sie haben keine Rallyes zum Editieren ausgewählt.", - 'RALLYE_DEACTIVATE_NOW' => "Rallye deaktivieren", - 'RALLYE_ACTIVATE_NOW' => "Rallye aktivieren", - 'RALLYE_STOP_NOTIFY_NOW' => "Nicht mehr benachrichtigen", - 'RALLYE_START_NOTIFY_NOW' => "Mitglieder autom. benachrichtigen", - 'RALLYE_EDIT_ONLY_INACTIVE_NOTICE' => "Es können nur deaktivierte Referral-Rallyes bearbeitet bzw. gelöscht werden. Beim Löschen werden alle dazu verknüpften Daten ebenfalls ohne Vorwarnung gelöscht.", - 'RALLYE_DELETE_NOTHING_SELECTED' => "Keine Referral-Rallye(s) zum Löschen ausgewählt.", - 'RALLYE_DELETED' => "Rallye(s) wurde(n) gelöscht.", + 'ADMIN_RALLYE_NO_RALLYES_SELECTED' => "Sie haben keine Rallyes zum Editieren ausgewählt.", + 'ADMIN_RALLYE_DEACTIVATE_NOW' => "Rallye deaktivieren", + 'ADMIN_RALLYE_ACTIVATE_NOW' => "Rallye aktivieren", + 'ADMIN_RALLYE_STOP_NOTIFY_NOW' => "Nicht mehr benachrichtigen", + 'ADMIN_RALLYE_START_NOTIFY_NOW' => "Mitglieder autom. benachrichtigen", + 'ADMIN_RALLYE_EDIT_ONLY_INACTIVE_NOTICE' => "Es können nur deaktivierte Referral-Rallyes bearbeitet bzw. gelöscht werden. Beim Löschen werden alle dazu verknüpften Daten ebenfalls ohne Vorwarnung gelöscht.", + 'ADMIN_RALLYE_DELETE_NOTHING_SELECTED' => "Keine Referral-Rallye(s) zum Löschen ausgewählt.", + 'ADMIN_RALLYE_NO_PRICES_SELECTED' => "Sie haben keine Rallye-Preise ausgewählt! Zurück zu den Preisen", + 'ADMIN_RALLYE_DELETED' => "Rallye(s) wurde(n) gelöscht.", 'RALLYE_MEMBER_NO_PRICES' => "--> Keine Preise für Modus %s ausgesetzt! <--", 'RALLYE_MEMBER_PRICES_ADDED' => "Die Preise", 'RALLYE_PRICE' => ". Platz", - 'RALLYE_MEMBER_NOTIFY' => "REF-RALLYE GESTARTET: %s", - 'RALLYE_ADMIN_NOTIFY' => "Neue Ref-Rallye: %s", - 'RALLYE_ADMIN_USERS_404' => "Zur ausgewählten Referral-Rallye sind noch keine Mitglieder hinzugefügt worden.", - 'RALLYE_LIST_USERS' => "Teilnehmende Mitglieder an der Referral-Rallye %s", + 'ADMIN_RALLYE_USERS_404' => "Zur ausgewählten Referral-Rallye sind noch keine Mitglieder hinzugefügt worden.", + 'ADMIN_LIST_RALLYE_USERS_TITLE2' => "Teilnehmende Mitglieder an der Referral-Rallye %s", 'RALLYE_OLD_REFS' => "Refs vor Referral-Rallye", 'RALLYE_NEW_REFS' => "Neue Refs", - 'RALLYE_STOP_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder deaktivieren", - 'RALLYE_START_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder aktivieren", + 'ADMIN_RALLYE_STOP_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder deaktivieren", + 'ADMIN_RALLYE_START_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder aktivieren", 'RALLYE_REFS' => "Geworbene Mitglieder", '_RALLYE_PRICE' => "Platz", 'RALLYE_EXPIRE_ONE_DAY' => "Rallye endet in weniger als 24 Stunden.", 'RALLYE_HAS_EXPIRED' => "Diese Referral-Rallye ist beendet.", - 'RALLYE_ADMIN_EXPIRED' => "Rallye beendet", - 'RALLYE_ADMIN_EXPIRED_SUBJECT' => "Rallye beendet: %s", - 'RALLYE_MEMBER_EXPIRED_SUBJECT' => "REF-RALLYE BEENDET: %s. Platz", + 'ADMIN_RALLYE_EXPIRED_TASK' => "Rallye beendet", 'RALLYE_YOU_CAN_WIN' => "Was Sie gewinnen können", 'RALLYE_OUR_WINNERS_ARE' => "Unsere Gewinner sind dieses Mal", 'RALLYE_PRICE_IS' => "Hat gewonnen", - 'RALLYE_HAPPY_WINNERS' => "Wir gratulieren allen Gewinnern.", - 'RALLYE_ADMIN_PURGED_SUBJECT' => "[HINWEIS:] Referral-Rallye '%s' entfernt", - 'RALLYE_ADMIN_EXPIRED_TEXT' => "Eine Referral-Rallye ist beendet worden. Bitte kontrollieren Sie diese und führen Sie ggf. weitere Schritte durch.", - 'RALLYE_ADMIN_PURGED_TEXT' => "Eine oder mehr Referral-Rallye(s) ist/sind gelöscht worden.", - 'RALLYE_EDIT_RALLYES' => "Rallye-Grunddaten ändern", - 'RALLYE_CHANGE_ADMIN' => "Änderungen speichern", - 'RALLYE_CHANGED' => "Änderungen gespeichert.", + 'ADMIN_RALLYE_PURGED_TASK' => "Referral-Rallye bereinigt", + 'ADMIN_RALLYE_EXPIRED_TEXT' => "Eine Referral-Rallye ist beendet worden. Bitte kontrollieren Sie diese und führen Sie ggf. weitere Schritte durch.", + 'ADMIN_RALLYE_PURGED_TEXT' => "Eine oder mehr Referral-Rallye(s) ist/sind gelöscht worden.", + 'ADMIN_RALLYE_CHANGED' => "Änderungen gespeichert.", 'RALLYE_REFERRAL_POINTS' => "Verdienst durch Refs", 'RALLYE_REGISTER_NOW' => "Jetzt kostenlos und unverbindlich anmelden.", 'RALLYE_GET_REFERRAL_LINK' => "Jetzt dran teilnehmen.", 'ADMIN_TASK_TYPE_RALLYE_EXPIRED' => "Rallye wurde beendet", 'ADMIN_TASK_TYPE_RALLYE_PURGED' => "Rallye wurde gelöscht", - 'RALLYE_LIST_USERS_TITLE' => "Alle teilnehmenden Mitglieder auflisten.", - 'RALLYE_REFERRAL_POINTS_NOTICE' => "Die {?POINTS?} in der Spalte Verdienst durch Refs geben den Verdienst in erster Ebene vor der Referral-Rallye an und wird sich bis Ende der Referral-Rallye nicht verändern.", - 'RALLYE_MIN_USERS' => "Gesamtzahl der Mitglieder, ab der Referral-Rallye automatisch endet.", - 'RALLYE_MIN_PRICES' => "Mindestens zu belegende Plätze", - 'RALLYE_MIN_USERS_MINI' => "Mitgliederanzahl erreicht", - 'RALLYE_MIN_PRICES_MINI' => "Minimum Plätze", + 'ADMIN_RALLYE_REFERRAL_POINTS_NOTICE' => "Die {?POINTS?} in der Spalte Verdienst durch Refs geben den Verdienst in erster Ebene vor der Referral-Rallye an und wird sich bis Ende der Referral-Rallye nicht verändern.", + 'ADMIN_RALLYE_MIN_USERS' => "Gesamtzahl der Mitglieder, ab der Referral-Rallye automatisch endet.", + 'ADMIN_RALLYE_MIN_PRICES' => "Mindestens zu belegende Plätze", + 'ADMIN_RALLYE_MIN_USERS_MINI' => "Mitgliederanzahl erreicht", + 'ADMIN_RALLYE_MIN_PRICES_MINI' => "Minimum Plätze", 'RALLYE_END_NO_USER_LIMITATION' => "Die Referral-Rallye endet ohne Mitgliederbegrenzung.", 'RALLYE_END_NO_PRICE_LIMITATION' => "Die Referral-Rallye endet ohne Platzbelegungsbegrenzung.", 'RALLYE_END_USERS' => "Die Referral-Rallye endet, wenn wir %s Mitglieder in unserem {?mt_word?} haben.", 'RALLYE_END_PRICES' => "Die Referral-Rallye endet, wenn mindestens %s Plätze belegt sind.", 'RALLYE_LIMITATIONS' => "Einschränkungen an der Dauer der Referral-Rallye", - 'RALLYE_REMOVE_PRICES' => "Rallye-Preis(e) entfernen", - 'RALLYE_NO_TEMPLATES_FOUND' => "Keine Templates gefunden.", - 'ADMIN_LIST_RALLYES_PRICING' => "Auflisten von Referral-Rallyes - Preise einrichten", + 'ADMIN_RALLYE_TEMPLATES_404' => "Keine Templates gefunden.", + 'RALLYE_NONE_ACTIVE' => "Derzeit ist noch keine Rallye im Gange. Bitte kommen Sie später noch einmal wieder.", + + // Title lines + 'ADMIN_RALLYE_ADD_NEW_TITLE' => "Neue Ref-Rallye hinzufügen", + 'ADMIN_LIST_RALLYE_PRICES_TITLE' => "Preise einrichten für Referral-Rallye %s", + 'ADMIN_ENTER_RALLYE_PRICE_LEVEL' => "Platz eingeben (1, 2, 3, usw.)", + 'ADMIN_LIST_RALLYE_PRICES_SIMPLE_TITLE' => "Ändern und Löschen von Referral-Rallye-Preisen", + 'ADMIN_EDIT_RALLYE_PRICES_TITLE' => "Preise/Plätze ändern", + 'ADMIN_LIST_RALLYES_TITLE' => "Ändern / Löschen von Referral-Rallyes (Grunddaten)", + 'ADMIN_LIST_RALLYE_DATA_OVERVIEW_TITLE' => "Datenblätter der Referral-Rallyes", + 'ADMIN_EDIT_RALLYES_TITLE' => "Rallye-Grunddaten ändern", + 'ADMIN_DELETE_RALLYES_TITLE' => "Rallye komplett löschen", + 'ADMIN_LIST_RALLYE_USERS_TITLE' => "Alle teilnehmenden Mitglieder auflisten", + 'ADMIN_DELETE_RALLYE_PRICES_TITLE' => "Ausgewähle Rallye-Preis(e) löschen", + 'ADMIN_LIST_RALLYES_PRICES_TITLE' => "Auflisten von Referral-Rallyes - Preise einrichten", 'GUEST_RALLYE_HAS_STARTED_TITLE' => "{?MAIN_TITLE?} - Referral-Rallye gestartet", 'RALLYE_NONE_ACTIVE_TITLE' => "Keine Referral-Rallyes aktiv", - 'RALLYE_NONE_ACTIVE' => "Derzeit ist noch keine Rallye im Gange. Bitte kommen Sie später noch einmal wieder.", + + // Admin - submit buttons + 'ADMIN_ADD_RALLYE_SUBMIT' => "Rallye hinzufügen", + 'ADMIN_ADD_RALLYE_PRICE_SUBMIT' => "Preis hinzufügen", + 'ADMIN_CHANGE_RALLYE_SUBMIT' => "Änderungen speichern", + 'ADMIN_REMOVE_RALLYE_SUBMIT' => "Rallyes löschen", + 'ADMIN_REMOVE_RALLYE_PRICES_SUBMIT' => "Rallye-Preis(e) löschen", + 'ADMIN_CHANGE_RALLYE_PRICES_SUBMIT' => "Ändern", + + // Subject lines + 'MEMBER_RALLYE_NOTIFY_SUBJECT' => "REF-RALLYE GESTARTET: %s", + 'ADMIN_RALLYE_NOTIFY_SUBJECT' => "Neue Ref-Rallye: %s", + 'ADMIN_RALLYE_EXPIRED_SUBJECT' => "Rallye beendet: %s", + 'RALLYE_MEMBER_EXPIRED_SUBJECT' => "REF-RALLYE BEENDET: %s. Platz", + 'ADMIN_RALLYE_PURGED_SUBJECT' => "[HINWEIS:] Referral-Rallye '%s' entfernt", + + // Points accounts - subject + 'POINTS_SUBJECT_RALLYE_WINNER' => "Gewinnausschüttung der Referral-Rallye", )); // [EOF] diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index 9bc94ebf2b..11ba359421 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -61,7 +61,7 @@ addMessages(array( 'MEMBER_REFBACK_LEVEL_REFID' => "Werber", 'MEMBER_REFBACK_STATUS' => "Referral-Status", 'MEMBER_REFBACK_PERCENTS' => "Refback-Prozente", - 'MEMBER_REFBACK_POINTS' => "Refback Vergütung", + 'MEMBER_REFBACK_POINTS' => "Refback-Vergütung", 'MEMBER_REFBACK_EDIT' => "Einstellen", 'MEMBER_REFBACK_EDIT_TITLE' => "Refback für ausgewähltes Mitglied einstellen:", 'MEMBER_REFBACK_DELETED_SUBMIT' => "Nicht möglich", @@ -86,6 +86,20 @@ addMessages(array( // Subject lines 'ADMIN_REFBACK_SUBJECT' => "Es wurde Refback eingestellt", 'MEMBER_REFBACK_SUBJECT' => "Für Sie wurde Refback eingestellt", + + // Points accounts - subject + 'POINTS_SUBJECT_REFBACK' => "Refback-Gutschrift", + 'POINTS_SUBJECT_REFBACK_REF' => "Anteilige Refback-Gutschrift", + + // Admin - Subject lines for points_data + 'ADMIN_DIRECT_REFBACK_SUBJECT' => "Refbackgutschrift durch Direktgutschrift von Mitglied %s erhalten", + 'ADMIN_REFERRAL_REFBACK_SUBJECT' => "Refbackgutschrift durch Referralgutschrift von Mitglied %s erhalten", + 'ADMIN_REFERRAL_REFBACK_REF_SUBJECT' => "Anteilige Refbackgutschrift durch Referralgutschrift von Mitglied %s erhalten", + + // Member - Subject lines for points_data + 'MEMBER_DIRECT_REFBACK_SUBJECT' => "Refbackgutschrift durch Direktgutschrift von Mitglied %s erhalten", + 'MEMBER_REFERRAL_REFBACK_SUBJECT' => "Refbackgutschrift durch Referralgutschrift von Mitglied %s erhalten", + 'MEMBER_REFERRAL_REFBACK_REF_SUBJECT' => "Anteilige Refbackgutschrift durch Referralgutschrift von Mitglied %s erhalten", )); // [EOF] diff --git a/inc/language/register_de.php b/inc/language/register_de.php index f3f2a864f7..a91837b5bb 100644 --- a/inc/language/register_de.php +++ b/inc/language/register_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,6 +57,25 @@ addMessages(array( 'ADMIN_CONFIG_REGISTER_GENERATE_PASSWORD_EMPTY' => "Soll bei leergelassenem Passwort in der Anmeldung eines per Zufall generiert werden?", 'ADMIN_CONFIG_REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?", 'GUEST_EMAIL_IS_ALREADY_REGISTERED' => "Sie haben sich bereits mit dieser Email-Adresse angemeldet, oder jemand anderes verwendet Ihre. Doppelte Anmeldungen sind bei uns verboten.", + 'PRE_USER_REGISTRATION_FAILED' => "Anmeldung fehlgeschlagen: Pre-Filterkette nicht gelaufen! Bitte melden Sie dies beim zuständigen Webmaster.", + + // Points accounts - subject + 'POINTS_SUBJECT_REGISTER_WELCOME' => "Anmeldegutschrift", + 'POINTS_SUBJECT_REGISTER_WELCOME_REF' => "Anteilige Anmeldegutschrift", + 'POINTS_SUBJECT_REFERRAL_BONUS' => "Einmalige Werbeprämie", + 'POINTS_SUBJECT_REFERRAL_BONUS_REF' => "Anteilige einml. Werbeprämie", + + // Admin - subject lines + 'ADMIN_DIRECT_REGISTER_WELCOME_SUBJECT' => "Willkommensgutschrift Mitglied gutgeschrieben", + 'ADMIN_DIRECT_REFERRAL_BONUS_SUBJECT' => "Werbeprämie per Direktgutschrift gutgeschrieben", + 'ADMIN_REFERRAL_REFERRAL_BONUS_SUBJECT' => "Werbeprämie per Referralgutschrift gutgeschrieben", + 'ADMIN_REFERRAL_REFERRAL_BONUS_REF_SUBJECT' => "Anteilige Werbeprämie per Referralgutschrift gutgeschrieben", + + // Member - subject lines + 'MEMBER_DIRECT_REGISTER_WELCOME_SUBJECT' => "Willkommensgutschrift erhalten", + 'MEMBER_DIRECT_REFERRAL_BONUS_SUBJECT' => "Werbeprämie per Direktgutschrift erhalten", + 'MEMBER_REFERRAL_REFERRAL_BONUS_SUBJECT' => "Werbeprämie per Referralgutschrift erhalten", + 'MEMBER_REFERRAL_REFERRAL_BONUS_REF_SUBJECT' => "Anteilige Werbeprämie per Referralgutschrift erhalten", )); // [EOF] diff --git a/inc/language/removeip_de.php b/inc/language/removeip_de.php index 3b4f260f2c..78ab9ab2fe 100644 --- a/inc/language/removeip_de.php +++ b/inc/language/removeip_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/repair_de.php b/inc/language/repair_de.php index 5a92ba742e..11240ffde4 100644 --- a/inc/language/repair_de.php +++ b/inc/language/repair_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/rewrite_de.php b/inc/language/rewrite_de.php index 75d71bcf23..529965e692 100644 --- a/inc/language/rewrite_de.php +++ b/inc/language/rewrite_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/sponsor_de.php b/inc/language/sponsor_de.php index 67a675a8f7..9815409cf1 100644 --- a/inc/language/sponsor_de.php +++ b/inc/language/sponsor_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,6 +42,7 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( + // Unsorted 'SPONSOR_NOT_INITIALIZED' => "Sponsorenbereich noch nicht eingerichtet.", 'ADMIN_CONFIG_SPONSOR_TITLE' => "Allgemeine Einstellungen", 'ADMIN_CONFIG_SPONSOR_MIN_POINTS' => "Minimum buchbare {?POINTS?}", @@ -102,7 +103,7 @@ addMessages(array( 'SPONSOR_ID' => "Sponsor-Id", 'SPONSOR_STATUS' => "Sponsor-Status", 'SPONSOR_REFERRALS' => "Sponsoren geworben", - 'ADMIN_SPONSOR_INVALID_MODE' => "Ungütiger Modus %s angegeben.", + 'ADMIN_SPONSOR_INVALID_MODE' => "Ungültiger Modus %s angegeben.", 'ADMIN_SPONSOR_MODUS_TPL_404' => "Modus-Template %s nicht gefunden.", 'ADMIN_ADD_POINTS_TO_SPONSOR' => "{?POINTS?} gutschreiben", 'ADMIN_SUB_POINTS_FROM_SPONSOR' => "{?POINTS?} abziehen", @@ -114,7 +115,6 @@ addMessages(array( 'ADMIN_SPONSOR_POINTS_ADDED' => "{?POINTS?} wurden gutgeschrieben.", 'ADMIN_SPONSOR_POINTS_SUBTRACTED' => "{?POINTS?} wurden abgezogen.", 'ADMIN_SPONSOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS' => "Sie können keine auf Freischaltung wartende oder unbestätigte Accounts sperren/freigeben.", -// @TODO Rewrite these four constants to one and use sprintf() 'ADMIN_HEADER_DELETE_SPONSOR' => "Sponsorenaccount %s löschen", 'ADMIN_TEXT_DELETE_SPONSOR' => "Möchten Sie den Sponsoren %s mit samt aller seiner Bestellungen unwiederruflich löschen?", 'ADMIN_SPONSOR_DELETED' => "Sponsorenaccount %s entfernt.", @@ -136,7 +136,7 @@ addMessages(array( 'SPONSOR_TERMS_HEADER' => "Allgemeine Geschäftsbedingungen", 'ADMIN_SPONSOR_ACCOUNT_404_ALREADY_CONFIRMED' => "Das von Ihnen angegebene Sponsoraccount %s konnte entweder nicht gefunden werden, oder ist bereits freigegeben.", -// Add payment types + // Add payment types 'ADMIN_SPONSOR_NO_PAYTYPES' => "Noch keine Buchungspakete eingerichtet.", 'ADMIN_ADD_SPONSOR_PAYTYPE_TITLE' => "Neue Buchungspaket hinzufügen", 'ADMIN_ADD_SPONSOR_PAYTYPE' => "Buchungspaket hinzufügen", @@ -165,7 +165,7 @@ addMessages(array( 'SPONSOR_REFID_WAS' => "Sie wurden vom Sponsor geworben", 'SPONSOR_ACCOUNT_IS_PENDING' => "EMail-Adresse bestätigt! Sie haben soeben eine EMail mit weiteren Anweisungen erhalten.", -// Header / text / email messages + // Header / text / email messages 'SPONSOR_LOCK_SPONSOR_HEADER' => "Sponsorenaccount sperren", 'SPONSOR_UNLOCK_SPONSOR_HEADER' => "Sponsorenaccount freigeben", 'SPONSOR_LOCK_SPONSOR_TEXT' => "Wollen Sie das ausgewählte Sponsorenaccount sperren? Falls ja, wird eine Mail an den Sponsor geschickt. Bitte geben Sie auch eine plaubsible Begründung der Sperrung mit an.", @@ -177,7 +177,7 @@ addMessages(array( 'SPONSOR_EMAIL_CNTRY_ZIP_CITY' => "Ländercode, PLZ, Wohnort", 'SPONSOR_PASS_UNCHANGED' => "- Nicht geändert! -", -// Guest headers + // Guest headers 'GUEST_SPONSOR_WANT_BECOME_HEADER' => "Sie wollen unser Sponsor sein?", 'GUEST_SPONSOR_INFOS_PRICING_HEADER' => "Hier sind Preise und was Sie für Ihr Geld bekommen.", 'GUEST_SPONSOR_PRICING_HEADER' => "Unsere Preise sind einfach fair! Schauen Sie selbst:", @@ -185,19 +185,19 @@ addMessages(array( 'GUEST_SPONSOR_PRICING_FOOTER' => "Vergleichen Sie mal...", 'GUEST_SPONSOR_ACTIONS_FOOTER' => "Und was bieten Ihnen andere?", -// Link descriptions + // Link descriptions 'ADMIN_SPONSOR_DETAILS_LINK_TITLE' => "Details des Sponsorenaccounts anzeigen", 'ADMIN_SPONSOR_EDIT_LINK_TITLE' => "Sponsorenaccount ändern", 'ADMIN_SPONSOR_ADD_POINTS_LINK_TITLE' => "{?POINTS?} gutschreiben", 'ADMIN_SPONSOR_SUB_POINTS_LINK_TITLE' => "{?POINTS?} abziehen", -// Performable actions on a sponsor's account + // Performable actions on a sponsor's account 'ADMIN_SPONSOR_ACTION_EDIT' => "Sponsor ändern", 'ADMIN_SPONSOR_ACTION_DELETE' => "Sponsor löschen", 'ADMIN_SPONSOR_ACTION_LOCK' => "Sponsoren ent-/sperren", 'ADMIN_LIST_SPONSOR_ORDERS' => "Bestellungen bearbeiten", -// Subject lines + // Subject lines 'SPONSOR_UNLOCKED_SUBJECT' => "HINWEIS: Freischaltung Ihres Sponsorenaccounts", 'ADMIN_SPONSOR_ADD_POINTS_SUBJECT' => "HINWEIS: Gutschrift durch den Admin.", 'ADMIN_SPONSOR_SUB_POINTS_SUBJECT' => "HINWEIS: Abzug durch den Admin.", @@ -217,7 +217,7 @@ addMessages(array( 'ADMIN_SPONSOR_SETTINGS_SUBJECT' => "Sponsor hat seine Einstellungen geändert.", 'SPONSOR_SETTINGS_SUBJECT' => "HINWEIS: Änderung Ihrer Einstellungen", -// Sponsor registration errors + // Sponsor registration errors 'SPONSOR_SURNAME_EMPTY' => "Sie haben keinen Vornamen eingegeben.", 'SPONSOR_FAMILY_EMPTY' => "Sie haben keinen Nachnamen eingegeben.", 'SPONSOR_STREET_NR1_EMPTY' => "Sie haben keine Straße eingegeben.", @@ -251,7 +251,7 @@ addMessages(array( 'SPONSOR_ACCOUNT_FAILED' => "Sponsorenaccount konnte nicht geladen werden: {%%pipe,translateSponsorStatus=%s%%}", 'SPONSOR_ACCOUNT_EMAIL_FAILED' => "Konnten Sponsorenaccount nicht freigeben! Bitte benachrichtigen Sie den Support.", -// Login form + // Login form 'SPONSOR_LOGIN_WELCOME' => "Willkommen zum Sponsorenlogin", 'SPONSOR_ENTER_ID' => "Sponsor-Id", 'SPONSOR_ENTER_PASSWORD' => "Passwort", @@ -278,7 +278,7 @@ addMessages(array( 'SPONSOR_ACCOUNT_STATUS_FAILED' => "Unerwarteter Zustand des Scriptes erreicht! Bitte Support benachrichtigen.", 'SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN' => "Ihr Sponsorenaccount ist wieder freigegeben! Sie können sich nun erneut einloggen.", -// Sponsor area + // Sponsor area 'SPONSOR_NO_MAIN_MENUS_ACTIVE' => "Keine Hauptmenüs aktiviert.", 'SPONSOR_NO_SUB_MENUS_ACTIVE' => "Keine Untermenüs aktiviert.", 'SPONSOR_CONTENT_404' => "Konnte das Sponsor-Modul %s auf dem Server nicht finden.", @@ -294,7 +294,7 @@ addMessages(array( 'SPONSOR_UNKNOWN_WHAT' => "Scripte-Fehler: Unbekannte Sponsor-Aktion {%pipe,getWhat%} erkannt.", 'SPONSOR_SETTINGS_SAVED' => "Neue Einstellungen gespeichert.", -// Error messages + // Error messages 'SPONSOR_NO_MESSAGE_GENERATED' => "Fehler bei der Verarbeitung: Keine Nachricht generiert.", 'SPONSOR_NO_CURRENT_PASSWORD_ENTERED' => "Sie haben Ihr derzeit gespeichertes Passwort nicht eingegeben.", 'SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB' => "Das von Ihnen und das in der Datenbank hinterlegte Passwort stimmen nicht überein.", @@ -303,6 +303,11 @@ addMessages(array( 'SPONSOR_PASSWORD_TWO_EMPTY' => "Zweites einzugebenes Passwort ist leer.", 'SPONSOR_PASSWORD_TOO_SHORT' => "Eingegebenes Passwort entspricht nicht der Mindestlänge von {?pass_len?} Zeichen.", 'SPONSOR_ACCOUNT_DATA_NOT_SAVED' => "Ihre Daten wurden nicht gespeichert.", + + // Module titles + 'MODULE_SPONSOR_TITLE' => "Sponsorbereich" + 'MODULE_SPONSOR_CONFIRM_TITLE' => "Sponsor-Bestätigung" + 'MODULE_SPONSOR_REF_TITLE' => "Sponsor-Referrallink" )); // [EOF] diff --git a/inc/language/support_de.php b/inc/language/support_de.php index 0958454d7a..28df156737 100644 --- a/inc/language/support_de.php +++ b/inc/language/support_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index 2061d2d22f..fed5628dec 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,11 +54,10 @@ addMessages(array( 'ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT' => "Prozent auf dynamische Vergütung/ Verweildauer/Reload-Sperre:", 'ADMIN_CONFIG_SURFBAR_MAX_ORDER' => "Maximal durch Mitglied in Surfbar buchbare URLs:", 'ADMIN_CONFIG_SURFBAR_RESTART_TIME' => "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind:", - 'ADMIN_CONFIG_SURFBAR_AUTOSTART' => "Surfbar soll nach Ruhezeit automatisch starten?", + 'ADMIN_CONFIG_SURFBAR_AUTO_START' => "Surfbar soll nach Ruhezeit automatisch starten?", 'ADMIN_CONFIG_SURFBAR_STATS_RELOAD' => "Reload-Zeit der Statistik unterhalb der beworbenen Seite:", 'ADMIN_CONFIG_SURFBAR_PURGE_DELETED' => "Verweildauer gelöschter URLs in der Datenbank:", 'ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED' => "Verweildauer migrierter URLs in der Datenbank:", - 'ADMIN_CONFIG_SURFBAR_NOTICE' => "Hinweise: Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen. Migrierte URLs sind aus Mailbuchungen übernommene URLs, die das Mitglied noch bestätigen muss. Werden URLs aus freigeschalteten Mailbuchungen in die Surfbar "migriert" so muss erst das Mitglied der Aufnahme zustimmen. Tut es dies nicht, wird die URL wieder aus der Surfbar entfernt. Eine sofortige Freischaltung ist nicht möglich.", 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE' => "Auf welche Seite soll umgeleitet werden, wenn das Mitglied alle gebuchten URLs besucht hat? (Wenn sie also im Reload-Lock sind)", 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL' => "Auf interne Pausenseite umleiten.", 'ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL' => "Auf externe Seite umleiten.
    (Bitte angeben)", @@ -77,10 +76,26 @@ addMessages(array( 'ADMIN_SURFBAR_STATS_TITLE' => "Mitglieder-Statistik der Surfbar", 'ADMIN_SURFBAR_URL_STATS_TITLE' => "URL-bezogene Statistik der Surfbar", 'ADMIN_LIST_SURFBAR_ACTIONS_TITLE' => "Mitglieder-Aktionen der Surfbar auflisten", + 'ADMIN_EDIT_SURFBAR_ACTIONS_TITLE' => "Mitglieder-Aktionen ändern", + + // Admin submit buttons + 'ADMIN_SURFBAR_EDIT_URL_SUBMIT' => "URLs ändern", + 'ADMIN_SURFBAR_EDIT_URL_NOW_SUBMIT' => "URLs jetzt ändern", + 'ADMIN_SURFBAR_DELETE_URL_SUBMIT' => "URLs löschen", + 'ADMIN_SURFBAR_DELETE_URL_NOW_SUBMIT' => "URLs jetzt entfernen", + 'ADMIN_SURFBAR_UNDELETE_URL_SUBMIT' => "Löschung zurücknehmen", + 'ADMIN_SURFBAR_UNDELETE_URL_NOW_SUBMIT' => "URLs jetzt wiederherstellen", + 'ADMIN_SURFBAR_UNLOCK_URL_SUBMIT' => "URL ent-/sperren", + 'ADMIN_SURFBAR_LOCK_URL_NOW_SUBMIT' => "URL jetzt ent-/sperren", + 'ADMIN_SURFBAR_CONFIRM_URL_SUBMIT' => "URL(s) freigeben", + 'ADMIN_SURFBAR_REJECT_URL_SUBMIT' => "URL(s) ablehnen", + 'ADMIN_SURFBAR_ADD_URL_SUBMIT' => "URL hinzufügen", + 'ADMIN_EDIT_SURFBAR_ACTIONS_SUBMIT' => "Mitgliedsaktionen editieren", + 'ADMIN_CHANGE_SURFBAR_ACTIONS_SUBMIT' => "Mitglieder-Aktionen ändern", // General admin text 'ADMIN_SURFBAR_URLS_404' => "Es konnten keine URLs in der Surfbar gefunden werden.", - 'ADMIN_SURFBAR_ACTIONS_404' => "Es konnten keine Mitgliederaktionen in der Surfbar gefunden werden.", + 'ADMIN_SURFBAR_ACTIONS_404' => "Es konnten keine Mitglieder-Aktionen in der Surfbar gefunden werden.", 'ADMIN_SURFBAR_REWARD' => "Vergütung", 'ADMIN_SURFBAR_COSTS' => "Kosten", 'ADMIN_SURFBAR_PAYMENT' => "Payment", @@ -89,34 +104,25 @@ addMessages(array( 'ADMIN_SURFBAR_REGISTERED' => "URL aufgenommen", 'ADMIN_SURFBAR_LAST_LOCKED' => "Zuletzt gesperrt", 'ADMIN_SURFBAR_LOCK_REASON' => "Sperrgrund", - 'ADMIN_SURFBAR_EDIT_URL' => "URLs ändern", - 'ADMIN_SURFBAR_EDIT_URL_NOW' => "URLs jetzt ändern", - 'ADMIN_SURFBAR_DELETE_URL' => "URLs löschen", - 'ADMIN_SURFBAR_DELETE_URL_NOW' => "URLs jetzt entfernen", - 'ADMIN_SURFBAR_UNDELETE_URL' => "Löschung zurücknehmen", - 'ADMIN_SURFBAR_UNDELETE_URL_NOW' => "URLs jetzt wiederherstellen", - 'ADMIN_SURFBAR_UNLOCK_URL' => "URL ent-/sperren", - 'ADMIN_SURFBAR_LOCK_URL_NOW' => "URL jetzt ent-/sperren", - 'ADMIN_SURFBAR_CONFIRM_URL' => "URL(s) freigeben", - 'ADMIN_SURFBAR_REJECT_URL' => "URL(s) ablehnen", 'ADMIN_SURFBAR_UNLOCK_DONE' => "Freischaltung ausgewählter URL(s) vollständig. :-)", 'ADMIN_SURFBAR_UNLOCK_FAILED' => "Freischaltung fehlgeschlagen. Bitte nachschauen, welche URLs nicht freigegeben wurden.", 'ADMIN_SURFBAR_URL_ADDED' => "URL wurde der Surfbar hinzugefügt.", 'ADMIN_SURFBAR_URL_NOT_ADDED' => "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?", - 'ADMIN_SURFBAR_ADD_URL' => "URL hinzufügen", 'ADMIN_SURFBAR_NO_STATS' => "Keine Surfbar-Statistiken vorhanden.", 'ADMIN_SURFBAR_VISITED_URLS' => "Aufgerufene URLs", 'ADMIN_SURFBAR_TOTAL_VISITS' => "Gesamtbesuche", 'ADMIN_SURFBAR_TOTALS' => "Zusammenfassung", 'ADMIN_SURFBAR_LAST_ONLINE' => "Letzter Aufruf der URL", 'ADMIN_SURFBAR_NO_URL_STATS' => "Keine URL-bezogene Statistik gefunden", - 'ADMIN_SURFBAR_NO_ACTIONS' => "Keine Mitgliederaktionen gefunden. Bitte installieren Sie die Surfbar neu.", + 'ADMIN_SURFBAR_NO_ACTIONS' => "Keine Mitglieder-Aktionen gefunden. Bitte installieren Sie die Surfbar neu.", 'ADMIN_SURFBAR_MEMBER_ACTION' => "Mitgliedaktion", 'ADMIN_SURFBAR_CURRENT_STATUS' => "Aktueller Status", 'ADMIN_SURFBAR_NEW_STATUS' => "Neuer Status", - 'ADMIN_SURFBAR_EDIT_ACTIONS' => "Mitgliedsaktionen editieren", - 'ADMIN_LIST_SURFBAR_ACTIONS_NOTICE' => "Hinweise: Sie sollten zur Sicherheit Ihres {?mt_word2?} den neuen Status nie auf {--SURFBAR_URL_STATUS_ACTIVE--} z.B. bei der Mitgliedaktion {--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--} einstellen.", 'ADMIN_SURFBAR_URL' => "Gebuchte URL", + 'ADMIN_CHANGE_SURFBAR_ACTIONS_STATUS' => "Derzeitigen URL-Status ändern:", + 'ADMIN_CHANGE_SURFBAR_ACTIONS_ACTION' => "Mitglieder-Aktion ändern:", + 'ADMIN_CHANGE_SURFBAR_ACTIONS_NEW_STATUS' => "Neuen URL-Status ändern:", + 'ADMIN_SURFBAR_ACTIONS_ID' => "Aktions-Id:", // Admin titles 'ADMIN_SURFBAR_UNLOCK_URLS_TITLE' => "Surfbar - URLs freihschalten/ablehnen", @@ -126,13 +132,21 @@ addMessages(array( 'ADMIN_SURFBAR_LOCK_URLS_TITLE' => "Surfbar - URLs sperren/entsperren", 'ADMIN_SURFBAR_UNDELETE_URLS_TITLE' => "Surfbar - gelöschte URLs wiederherstellen", + // Admin notices + 'ADMIN_CONFIG_SURFBAR_NOTICE' => "Hinweise: Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen. Migrierte URLs sind aus Mailbuchungen übernommene URLs, die das Mitglied noch bestätigen muss. Werden URLs aus freigeschalteten Mailbuchungen in die Surfbar "migriert" so muss erst das Mitglied der Aufnahme zustimmen. Tut es dies nicht, wird die URL wieder aus der Surfbar entfernt. Eine sofortige Freischaltung ist nicht möglich.", + 'ADMIN_LIST_SURFBAR_ACTIONS_NOTICE' => "Hinweise: Sie sollten zur Sicherheit Ihres {?mt_word2?} den neuen Status nie auf {--SURFBAR_URL_STATUS_ACTIVE--} z.B. bei der Mitgliedaktion {--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--} einstellen.", + 'ADMIN_EDIT_SURFBAR_ACTIONS_NOTICE' => "Seien Sie beim Ändern von Mitglieder-Aktionen, URL-Status und neuen Status sehr vorsichtig! Eventuell kann der Besuchertausch Ihres {?mt_word2?} nicht mehr einwandfrei funktionieren.", + // Member titles 'MEMBER_SURFBAR_LIST_TITLE' => "Ihre URLs in der Surfbar verwalten", + // Member submit buttons + 'MEMBER_SURFBAR_ADD_URL_SUBMIT' => "URL in Surfbar buchen", + 'MEMBER_SURFBAR_TEST_URL_SUBMIT' => "URL anzeigen", + // General member text 'MEMBER_SURFBAR_URL_ADDED' => "URL hinzugefügt und wartet auf Freischaltung.", 'MEMBER_SURFBAR_URL_NOT_ADDED' => "URL konnte nicht hinzugefügt werden, da ein Fehler vorliegt.", - 'MEMBER_SURFBAR_ADD_URL' => "URL in Surfbar buchen", 'MEMBER_SURFBAR_NO_MORE_ALLOWED' => "Sie können leider nicht mehr URLs in der Surfbar buchen, da Sie das Maximum erreicht haben.", 'MEMBER_SURFBAR_NO_URLS_FOUND' => "Sie haben noch keine URLs für die Surfbar gebucht.", 'MEMBER_SURFBAR_VIEWS_TOTAL' => "Views", @@ -141,7 +155,6 @@ addMessages(array( 'MEMBER_SURFBAR_LAST_LOCKED' => "Letzte Sperre", 'MEMBER_SURFBAR_LOCK_REASON' => "Sperrgrund", 'MEMBER_SURFBAR_ACTIONS' => "Aktionen", - 'MEMBER_SURFBAR_TEST_URL' => "URL anzeigen", 'MEMBER_SURFBAR_LIST_NOTICE' => "Hinweise: Bitte beachten Sie, dass Editieren, erneutes Aktivieren von gestoppten URLs und nochmalige Anmeldung nach Ablehnung eine Freischaltung durch unsere Administratoren nötig ist. Migrierte URLs sind in der Surfbar nicht freigegeben und bedarfen einer Buchungsbestätigung ("Jetzt buchen" bitte dazu anklicken) Ihrerseits, da die Bewerbung Ihrer URL in der Surfbar zusätzliche {?POINTS?}-Kosten bedeuten. Die aktuellen Kosten entnehmen Sie bitte der Seite "Surfbar starten" oder "URL buchen" aus dem Surfbar-Mitgliedsmenü.", 'MEMBER_SURFBAR_ACTION_DONE' => "Ausgewählte Aktion ausgeführt.", 'MEMBER_SURFBAR_ACTION_FAILED' => "Ausgewählte Aktion konnte nicht vollständig ausgeführt werden.", @@ -157,6 +170,7 @@ addMessages(array( 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat wartende URL zurückgenommen", 'ADMIN_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT' => "[Surfbar:] Mitglied hat angehaltene URL gelöscht", 'ADMIN_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT' => "[Surfbar:] URL abgelehnt", + 'ADMIN_SURFBAR_NOTIFY_URL_REJECTED_PENDING_SUBJECT' => "[Surfbar:] Erneute Anmeldung einer URL", 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_SUBJECT' => "[Surfbar:] URL-Buchung zugestimmt", 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_ACTIVE_SUBJECT' => "[Surfbar:] URL-Buchung freigeschaltet", 'ADMIN_SURFBAR_NOTIFY_URL_PENDING_REJECTED_SUBJECT' => "[Surfbar:] URL-Buchung abgelehnt", @@ -188,6 +202,7 @@ addMessages(array( 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_DELETED_SUBJECT' => "[Surfbar:] Sie haben Ihre wartende URL zurückgenommen", 'MEMBER_SURFBAR_NOTIFY_URL_STOPPED_DELETED_SUBJECT' => "[Surfbar:] Sie haben Ihre gestoppte URL gelöscht", 'MEMBER_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT' => "[Surfbar:] Ihre URL wurde abgelehnt", + 'MEMBER_SURFBAR_NOTIFY_URL_REJECTED_PENDING_SUBJECT' => "[Surfbar:] Erneute Anmeldung Ihrer URL", 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_SUBJECT' => "[Surfbar:] Zustimmung zur URL-Buchung erhalten", 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_ACTIVE_SUBJECT' => "[Surfbar:] Ihre URL wurde freigeschaltet", 'MEMBER_SURFBAR_NOTIFY_URL_PENDING_REJECTED_SUBJECT' => "[Surfbar:] Ihre URL wurde abgelehnt", @@ -248,6 +263,13 @@ addMessages(array( // Guest texts 'GUEST_SURFBAR_LOGIN_HEADER' => "Login zur Surfbar:", + + // Points accounts - subject + 'POINTS_SUBJECT_SURFBAR' => "Vergütung im Besuchertausch", + 'POINTS_SUBJECT_MONTHLY_SURFBAR' => "Monatl. Reset (Besuchertausch)", + + // Module title + 'MODULE_SURFBAR_TITLE' => "Besuchertausch", )); // [EOF] diff --git a/inc/language/task_de.php b/inc/language/task_de.php index 888154b548..909620ae63 100644 --- a/inc/language/task_de.php +++ b/inc/language/task_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,6 +51,7 @@ addMessages(array( 'ADMIN_TASK_UNCONFIRMED' => "Unbestätigt", 'ADMIN_TASK_LOCKED' => "Gesperrt", 'ADMIN_TASK_RANDOM_REFID' => "Zufallsreferral", + 'ADMIN_TASK_TESTERS' => "Testbenutzer", 'ADMIN_TASK_NEW_TASKS' => "Ohne Zuweisung", 'ADMIN_TASK_CLOSED_TASKS' => "Geschlossen", 'ADMIN_TASK_YOUR_TASKS' => "Ihre Aufgaben", diff --git a/inc/language/theme_de.php b/inc/language/theme_de.php index cf7d727fd4..cb0199e934 100644 --- a/inc/language/theme_de.php +++ b/inc/language/theme_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/timezone_de.php b/inc/language/timezone_de.php index d408419577..ee8c32eb01 100644 --- a/inc/language/timezone_de.php +++ b/inc/language/timezone_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/top10_de.php b/inc/language/top10_de.php index c712740084..03f7c011be 100644 --- a/inc/language/top10_de.php +++ b/inc/language/top10_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/transfer_de.php b/inc/language/transfer_de.php index 5067251a9c..85e2d207fd 100644 --- a/inc/language/transfer_de.php +++ b/inc/language/transfer_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,6 +42,7 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( + // Admin messages 'ADMIN_CONFIG_TRANSFER_TITLE' => "Einstellungen zu {?POINTS?}-Überweisungen", 'ADMIN_CONFIG_TRANSFER_MAX' => "Maximal angezeigte Einträge", 'ADMIN_CONFIG_TRANSFER_AGE' => "Maximales Alter von Einträgen", @@ -51,49 +52,58 @@ addMessages(array( 'ADMIN_CONFIG_TRANSFER_CODE_NOTICE' => "0 deaktiviert den Touring-Code.", 'ADMIN_CONFIG_AUTOPURGE_TRANSFER' => "Veraltete Einträge automatisch löschen? (purge)", 'ADMIN_TRANSFER_POINTS_TOTAL' => "Gesamttransfersumme", - 'TRANSFER_LIST_INCOMING' => "Eingehende Überweisungen", - 'TRANSFER_LIST_OUTGOING' => "Ausgehende Überweisungen", - 'TRANSFER_ALLOW_OPT_IN' => "Wollen Sie {?POINTS?}-Überweisungen von anderen Mitgliedern erhalten?", - 'TRANSFER_TO_MEMBER_NOW' => "Neue {?POINTS?}-Überweisung starten", - 'TRANSFER_PLEASE_ALLOW_OPT_IN' => "Bitte erst Empfangen von Überweisungen erlauben.", - 'TRANSFER_NOW_LINK' => "Überweisung zum anderen Mitglied tätigen", - 'TRANSFER_NOW_TITLE' => "Starten Sie hier eine Überweisung von {?POINTS?} an ein anderes Mitglied.", - 'TRANSFER_SELECT_TARGET_USERID' => "Empfänger auswählen", - 'TRANSFER_NO_ONE_ELSE_OPT_IN' => "Niemand weiteres möchte Überweisungen empfangen.", - 'TRANSFER_POINTS_MAXIMUM' => "Maximaler Betrag", - 'TRANSFER_POINTS_AMOUNT' => "Zu überweisende {?POINTS?}", - 'TRANSFER_NO_CODE' => "Nicht erforderlich.", + 'ADMIN_TRANSFER_FROM_USERID' => "Sender", + 'ADMIN_TRANSFER_TO_USERID' => "Empfänger", + 'ADMIN_DELETE_TRANSFERS_SUBMIT' => "Überweisungen löschen", + + // Admin/member shared messages 'TRANSFER_POINTS_REASON' => "Verwendungszweck", - 'TRANSFER_POINTS_SECURITY_CODE' => "Touring-Code eingeben", - 'TRANSFER_ENTER_PASSWORD' => "Ihr Passwort eingeben", - 'TRANSFER_ADD_NEW' => "Transfer abschliessen", - 'TRANSFER_INVALID_CODE' => "Ungütigen Touring-Code eingegeben.", - 'TRANSFER_INVALID_PASSWORD' => "Eingegebenes und gespeichertes Passwort stimmen nicht überein.", - 'TRANSFER_INVALID_POINTS' => "Kann nicht mehr überweisen, als dass Sie an Guthaben haben.", - 'TRANSFER_INVALID_REASON' => "Bitte einen Verwendungszweck eingeben.", - 'TRANSFER_INVALID_RECIPIENT' => "Bitte wählen Sie einen Empfänger aus.", - 'TRANSFER_INVALID_DATA' => "Konnte Absender- und Empfängerdaten nicht verifizieren.", - 'TRANSFER_ADMIN_SUBJECT' => "{?POINTS?}-Transfer abgeschlossen", - 'TRANSFER_MEMBER_RECIPIENT_SUBJECT' => "{?POINTS?}-Überweisung durch Mitglied", - 'TRANSFER_MEMBER_SENDER_SUBJECT' => "{?POINTS?}-Überweisung an Mitglied", - 'TRANSFER_ADMIN_AUTOPURGE' => "Auto-Löschung von Transfer-Einträgen", - 'TRANSFER_COMPLETED' => "Überweisung vollständig.", - 'TRANSFER_CONTINUE_OVERVIEW' => "Weiter zur Übersichtsseite...", - 'TRANSFER_LATEST_IS' => "Einstellung gesperrt, letzte Überweisung war am %s", 'TRANSFER_LIST_ALL' => "Gesamte Überweisungsliste anzeigen", - 'TRANSFER_NO_INCOMING_TRANSFERS' => "Keine eingehenden Überweisungen gefunden.", - 'TRANSFER_NO_OUTGOING_TRANSFERS' => "Keine ausgehenden Überweisungen gefunden.", 'TRANSFER_NO_INOUT_TRANSFERS' => "Keine Überweisungen gefunden.", - 'TRANSFER_TOTAL_INCOMING' => "Gesamteingänge", - 'TRANSFER_TOTAL_OUTGOING' => "Gesamtausgänge", 'TRANSFER_TOTAL_BALANCE' => "Saldo", 'TRANSFER_ID' => "Trans-Id", 'TRANSFER_STAMP' => "Buchungstag", - 'TRANSFER_PARTY' => "Empf./Sender", - 'TRANSFER_FROM_USERID' => "Sender", - 'TRANSFER_TO_USERID' => "Empfänger", - 'TRANSFER_TOTAL_SUM' => "Gesamt transferierte {?POINTS?}", - 'TRANSFER_DELETE' => "Einträge löschen", + + // Member languages + 'MEMBER_LIST_INCOMING_TRANSFER_TITLE' => "Eingehende Überweisungen", + 'MEMBER_LIST_OUTGOING_TRANSFER_TITLE' => "Ausgehende Überweisungen", + 'MEMBER_ALLOW_TRANSFER_OPT_IN' => "Wollen Sie {?POINTS?}-Überweisungen von anderen Mitgliedern erhalten?", + 'MEMBER_START_NEW_TRANSFER' => "Neue {?POINTS?}-Überweisung starten", + 'MEMBER_PLEASE_ALLOW_TRANSFER_RECEIVE' => "Bitte erst Empfangen von Überweisungen erlauben.", + 'MEMBER_TRANSFER_NOW_LINK' => "Überweisung zum anderen Mitglied tätigen", + 'MEMBER_TRANSFER_NOW_LINK_TITLE' => "Starten Sie hier eine Überweisung von {?POINTS?} an ein anderes Mitglied.", + 'MEMBER_SELECT_TRANSFER_TARGET_USERID' => "Empfänger auswählen", + 'MEMBER_TRANSFER_NO_ONE_ELSE_OPT_IN' => "Niemand weiteres möchte Überweisungen empfangen.", + 'MEMBER_TRANSFER_POINTS_MAXIMUM' => "Maximaler Betrag", + 'MEMBER_TRANSFER_POINTS_AMOUNT' => "Zu überweisende {?POINTS?}", + 'MEMBER_TRANSFER_NO_CODE' => "Nicht erforderlich.", + 'MEMBER_ENTER_TRANSFER_POINTS_REASON' => "Verwendungszweck eingeben", + 'MEMBER_TRANSFER_POINTS_SECURITY_CODE' => "Touring-Code eingeben", + 'MEMBER_ENTER_TRANSFER_PASSWORD' => "Ihr Passwort eingeben", + 'MEMBER_TRANSFER_ADD_NEW_SUBMIT' => "Transfer abschliessen", + 'MEMBER_TRANSFER_INVALID_CODE' => "Ungültigen Touring-Code eingegeben.", + 'MEMBER_TRANSFER_INVALID_PASSWORD' => "Eingegebenes und gespeichertes Passwort stimmen nicht überein.", + 'MEMBER_TRANSFER_INVALID_POINTS' => "Kann nicht mehr überweisen, als dass Sie an Guthaben haben.", + 'MEMBER_TRANSFER_INVALID_REASON' => "Bitte einen Verwendungszweck eingeben.", + 'MEMBER_TRANSFER_INVALID_RECIPIENT' => "Bitte wählen Sie einen Empfänger aus.", + 'MEMBER_TRANSFER_INVALID_DATA' => "Konnte Absender- und Empfängerdaten nicht verifizieren.", + 'MEMBER_TRANSFER_COMPLETED' => "Überweisung vollständig.", + 'MEMBER_TRANSFER_CONTINUE_OVERVIEW' => "Weiter zur Übersichtsseite...", + 'MEMBER_TRANSFER_LATEST_IS' => "Einstellung gesperrt, letzte Überweisung war am %s", + 'MEMBER_TRANSFER_NO_INCOMING_TRANSFERS' => "Keine eingehenden Überweisungen gefunden.", + 'MEMBER_TRANSFER_NO_OUTGOING_TRANSFERS' => "Keine ausgehenden Überweisungen gefunden.", + 'MEMBER_TRANSFER_TOTAL_INCOMING' => "Gesamteingänge", + 'MEMBER_TRANSFER_TOTAL_OUTGOING' => "Gesamtausgänge", + 'MEMBER_TRANSFER_PARTY' => "Empf./Sender", + + // Subject lines + 'ADMIN_TRANSFER_SUBJECT' => "{?POINTS?}-Transfer abgeschlossen", + 'ADMIN_TRANSFER_AUTOPURGE_SUBJECT' => "Auto-Löschung von Transfer-Einträgen", + 'MEMBER_TRANSFER__RECIPIENT_SUBJECT' => "{?POINTS?}-Überweisung durch Mitglied", + 'MEMBER_TRANSFER__SENDER_SUBJECT' => "{?POINTS?}-Überweisung an Mitglied", + + // Points accounts - subject + 'POINTS_SUBJECT_TRANSFER' => "Überweisung durch Mitglied", )); // [EOF] diff --git a/inc/language/update_de.php b/inc/language/update_de.php index 2e32f5dfe5..752a062fe6 100644 --- a/inc/language/update_de.php +++ b/inc/language/update_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/usage_de.php b/inc/language/usage_de.php index 7fd235f646..069cc21288 100644 --- a/inc/language/usage_de.php +++ b/inc/language/usage_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/user_de.php b/inc/language/user_de.php index d861f69fce..fc65a05cc8 100644 --- a/inc/language/user_de.php +++ b/inc/language/user_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,8 +44,8 @@ if (!defined('__SECURITY')) { addMessages(array( 'ADMIN_USER_PAGENAV' => "Seiten", 'ADMIN_CONFIG_USER_TITLE' => "Konfiguration - Mitgliederliste", - 'ADMIN_CONFIG_USER_LIMIT' => "Anzahl Mitglieder pro Seite", - 'ADMIN_CONFIG_USER_ALPHA' => "Azanhl Buchstaben pro Zeile", + 'ADMIN_CONFIG_USER_LIMIT' => "Anzahl Mitglieder pro Seite:", + 'ADMIN_CONFIG_USER_ALPHA' => "Azanhl Buchstaben pro Zeile:", 'ADMIN_USER_ACCOUNT_SAVED' => "Mitgliedsaccount gespeichert.", 'ADMIN_USER_ACCOUNT_NOT_SAVED' => "Mitgliedsaccount nicht gespeichert.", 'ADMIN_USER_ACCOUNT_LOCKED' => "Mitgliedsaccount %s wurde gesperrt.", @@ -64,6 +64,51 @@ addMessages(array( 'ADMIN_USER_ACTION_LINK_SUB_POINTS_TITLE' => "Dem Mitglied {?POINTS?} abziehen", 'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT_TITLE' => "Das Mitgliederaccount bestätigen", 'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT' => "Bestätigen", + + // Legends + 'ADMIN_CONFIG_USER_LEGEND' => "Konfiguration zur Mitgliederliste", + 'ADMIN_CONFIG_TESTER_USER_LEGEND' => "Konfiguration zu Testbenutzerdaten", + 'ADMIN_ADD_TESTER_USER_LEGEND' => "Grunddaten eingeben/Referral auswählen", + 'ADMIN_ADD_TESTER_USER_CATEGORIES_LEGEND' => "Interessensgebiete", + 'ADMIN_ADD_TESTER_USER_MAX_RECEIVE_LEGEND' => "Maximalen Mailempfang pro Tag", + 'ADMIN_ADD_TESTER_USER_PASSWORDS_LEGEND' => "Passwort und -wiederholung", + + // Tester user accounts: + // - Configuration + 'ADMIN_CONFIG_TESTER_USER_MAXIMUM' => "Grösster Suffix für Testbenutzer:", + 'ADMIN_CONFIG_TESTER_USER_GENDER' => "Anrede:", + 'ADMIN_CONFIG_TESTER_USER_SURNAME_PREFIX' => "Präfix für Testbenutzer:", + 'ADMIN_CONFIG_TESTER_USER_FAMILY' => "Nachname:", + 'ADMIN_CONFIG_TESTER_USER_STREET_NR' => "Straße + Hausnummer:", + 'ADMIN_CONFIG_TESTER_USER_ZIP' => "Postleitzahl:", + 'ADMIN_CONFIG_TESTER_USER_CITY' => "Wohnort:", + 'ADMIN_CONFIG_TESTER_USER_EMAIL' => "Email-Adresse:", + 'ADMIN_CONFIG_TESTER_USER_PASSWORD' => "Passwort:", + 'ADMIN_CONFIG_TESTER_USER_DEFAULT_REFID' => "Testbenutzer immer standardmäßig verwenden:", + 'ADMIN_CONFIG_TESTER_USER_CHECK_CAT' => "Sollen alle Kategorien vorausgewählt sein?", + 'ADMIN_CONFIG_TESTER_USER_CHECK_CAT_NOTICE' => "(Nein=Alle abgewählt)", + + // - Adding new tester account + 'ADMIN_ADD_TESTER_USER_NOTICE' => "Es sind bereits {%pipe,getTotalTesterUsers,translateComma%} von maximal {%config,translateComma=tester_user_maximum%} Testbenutzern angelegt.", + 'ADMIN_ADD_TESTER_USER_TITLE' => "Neuen Testbenutzer anlegen", + 'ADMIN_ADD_TESTER_USER_SUBMIT' => "Testbenutzer anlegen", + 'ADMIN_ADD_TESTER_USER_GENDER' => "Anrede auswählen:", + 'ADMIN_ADD_TESTER_USER_SURNAME' => "Vorname (NICHT SPÄTER ÄNDERN!):", + 'ADMIN_ADD_TESTER_USER_FAMILY' => "Nachname eingeben:", + 'ADMIN_ADD_TESTER_USER_STREET_NR' => "Straße + Hausnummer eingeben:", + 'ADMIN_ADD_TESTER_USER_ZIP' => "Postleitzahl eingeben:", + 'ADMIN_ADD_TESTER_USER_CITY' => "Wohnort eingeben:", + 'ADMIN_ADD_TESTER_USER_EMAIL' => "Email-Adresse eingeben:", + 'ADMIN_ADD_TESTER_USER_PASSWORD1' => "Passwort eingeben:", + 'ADMIN_ADD_TESTER_USER_PASSWORD2' => "Passwort wiederholen:", + 'ADMIN_ADD_TESTER_USER_DEFAULT_REFID' => "Referral-Account auswählen:", + 'ADMIN_ADD_TESTER_USER_BIRTHDAY' => "Geburtstag:", + 'ADMIN_ADD_TESTER_USER_COUNTRY' => "Land auswählen:", + + // Success/error messages + 'ADMIN_TESTER_USER_ACCOUNT_CREATION_DONE' => "Es wurde ein Testbenutzeraccount angelegt und sofort freigeschaltet.", + 'ADMIN_MAXIMUM_USER_TESTER_REACHED' => "Sie haben die maximale Anzahl an Testbenutzer angelegt. Entweder sollten Sie wieder welche löschen oder die maximale Anzahl erhöhen (hartkodiertes Maximum ist jedoch 100.000 (99.999+0=100.000).", + 'ADMIN_TESTER_USER_ACCOUNT_CREATION_FAILED' => "Das Anlegen eines Testbenuters ist fehlgeschlagen.", )); // [EOF] diff --git a/inc/language/validator_de.php b/inc/language/validator_de.php index 21c74c208b..20104de793 100644 --- a/inc/language/validator_de.php +++ b/inc/language/validator_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/language/wernis_de.php b/inc/language/wernis_de.php index eb466ade8a..70e7974aa5 100644 --- a/inc/language/wernis_de.php +++ b/inc/language/wernis_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -136,6 +136,9 @@ addMessages(array( 'MEMBER_WERNIS_MODE_WITHDRAW' => "Wernis einzahlen", 'MEMBER_WERNIS_MODE_PAYOUT' => "Wernis auszahlen", 'MEMBER_WERNIS_LIST_WERNIS' => "Überweisungsliste von/an WDS66-Hauptaccount", + + // Points accounts - subject + 'POINTS_SUBJECT_WERNIS_WITHDRAW' => "Einzahlung vom WDS66-Account", )); // [EOF] diff --git a/inc/language/yoomedia_de.php b/inc/language/yoomedia_de.php index 635b278674..01d5daf347 100644 --- a/inc/language/yoomedia_de.php +++ b/inc/language/yoomedia_de.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/_functions.php b/inc/libs/_functions.php index 5c45183a8d..7e0a7b8dff 100644 --- a/inc/libs/_functions.php +++ b/inc/libs/_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/active_functions.php b/inc/libs/active_functions.php index 05809f8044..810fec6695 100644 --- a/inc/libs/active_functions.php +++ b/inc/libs/active_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index 15f781889d..5f5075a574 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -164,7 +164,7 @@ LIMIT 1", $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&id=' . bigintval($email) . '%}'; } else { // This is strange and needs fixing - debug_report_bug(__FUNCTION__, __LINE__, 'email[' . gettype($email) . ']=' . $email . ',mod=' . $mod . ' - This should not happen.'); + reportBug(__FUNCTION__, __LINE__, 'email[' . gettype($email) . ']=' . $email . ',mod=' . $mod . ' - This should not happen.'); } // Return rewritten (?) email address @@ -354,7 +354,17 @@ function generateAdminAccessModeSelectionBox ($adminId = NULL) { $OUT = ''; @@ -369,7 +379,19 @@ function generateAdminMenuModeSelectionBox ($adminId = NULL) { $OUT = ''; @@ -474,7 +496,7 @@ ORDER BY // Sends out mail to all administrators // IMPORTANT: Please use sendAdminNotification() instead of calling this function directly -function sendAdminsEmails ($subj, $template, $content, $userid) { +function sendAdminsEmails ($subject, $template, $content, $userid) { // Trim template name $template = trim($template); @@ -490,12 +512,16 @@ function sendAdminsEmails ($subj, $template, $content, $userid) { // Create new entry (to all admins) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`,`mail_template`) VALUES (0, '%s')", array($template), __FUNCTION__, __LINE__); + + // Select all email adresses (default) + $result = SQL_QUERY('SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC', + __FUNCTION__, __LINE__); } else { // Load admin ids... // @TODO This can be, somehow, rewritten $adminIds = array(); while ($content = SQL_FETCHARRAY($result)) { - $adminIds[] = $content['admin_id']; + array_push($adminIds, $content['admin_id']); } // END - while // Free memory @@ -506,15 +532,18 @@ function sendAdminsEmails ($subj, $template, $content, $userid) { // "implode" ids and query string $adminId = implode(',', $adminIds); + + // To which admin shall we sent it? if ($adminId == '-1') { + // Is an "event" if (isExtensionActive('events')) { // Add line to user events - EVENTS_ADD_LINE($subj, $message, $userid); + EVENTS_ADD_LINE($subject, $message, $userid); } else { // Log error for debug - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,userid=%s", + logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension 'ext-events' missing: template=%s,subj=%s,userid=%s", $template, - $subj, + $subject, $userid )); } @@ -529,9 +558,18 @@ function sendAdminsEmails ($subj, $template, $content, $userid) { } } + // Default is no special mail header + $mailHeader = ''; + + // Is the template a bug report? + if ($template == 'admin_report_bug') { + // Then set 'Reply-To:' again + $mailHeader = 'Reply-To: webmaster@mxchange.org' . chr(10); + } // END - if + // Load email addresses and send away while ($content = SQL_FETCHARRAY($result)) { - sendEmail($content['email'], $subj, $message); + sendEmail($content['email'], $subject, $message, 'N', $mailHeader); } // END - while // Free memory @@ -616,7 +654,7 @@ function getAminsExpertWarning () { function getAdminLoginFailures ($adminId) { // Admin login should not be empty if (empty($adminId)) { - debug_report_bug(__FUNCTION__, __LINE__, 'adminId is empty.'); + reportBug(__FUNCTION__, __LINE__, 'adminId is empty.'); } // END - if // By default no admin is found @@ -652,7 +690,7 @@ function getAdminLoginFailures ($adminId) { function getAdminLastFailure ($adminId) { // Admin login should not be empty if (empty($adminId)) { - debug_report_bug(__FUNCTION__, __LINE__, 'adminId is empty.'); + reportBug(__FUNCTION__, __LINE__, 'adminId is empty.'); } // END - if // By default no admin is found @@ -688,7 +726,7 @@ function getAdminLastFailure ($adminId) { // Wrapper functions //----------------------------------------------------------------------------- -// Wrapper function to check wether expert setting warning is enabled +// Wrapper function to check whether expert setting warning is enabled function isAdminsExpertWarningEnabled () { return (getAminsExpertWarning() == 'Y'); } diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 275cdfcacc..fde4b07587 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ function addPointsAutoPurge ($userid, $points) { // Is the userid valid? if (!isValidUserId($userid)) { // Please report all these bugs - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid call. userid=' . $userid . ',points=' . $points); + reportBug(__FUNCTION__, __LINE__, 'Invalid call. userid=' . $userid . ',points=' . $points); } // END - if // Add points over the ref system directly now @@ -57,7 +57,7 @@ function addPointsAutoPurge ($userid, $points) { sendEmail($userid, '{--MEMBER_AUTOPURGE_SUBJECT--}', $message); } -// Checks wether auto-purging is enabled +// Checks whether auto-purging is enabled function isAutoPurgingActive () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -81,7 +81,7 @@ function getAutopurgeInactive () { return $GLOBALS[__FUNCTION__]; } -// Checks wether purging of inactive accounts is enabled +// Checks whether purging of inactive accounts is enabled function isAutopurgeInactiveEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index f2702a945b..120333bf97 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -104,7 +104,7 @@ function getBegNewMemberNotify () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_new_member_notify is enabled +// Checks whether beg_new_member_notify is enabled function isBegNewMemberNotifyEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -248,7 +248,7 @@ function getBegIncludeOwn () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_include_own is "Y" +// Checks whether beg_include_own is "Y" function isBegIncludeOwnEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -272,7 +272,7 @@ function getBegActive () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_active is "Y" +// Checks whether beg_active is "Y" function isBegActiveEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -296,7 +296,7 @@ function getBegRallye () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_rallye is "Y" +// Checks whether beg_rallye is "Y" function isBegRallyeEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -320,7 +320,7 @@ function getBegRallyeEnableNotify () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_rallye_enable_notify is "Y" +// Checks whether beg_rallye_enable_notify is "Y" function isBegRallyeEnableNotifyEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -344,7 +344,7 @@ function getBegRallyeDisableNotify () { return $GLOBALS[__FUNCTION__]; } -// Checks wether beg_rallye_disable_notify is "Y" +// Checks whether beg_rallye_disable_notify is "Y" function isBegRallyeDisableNotifyEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/birthday_functions.php b/inc/libs/birthday_functions.php new file mode 100644 index 0000000000..9ea5bd2171 --- /dev/null +++ b/inc/libs/birthday_functions.php @@ -0,0 +1,60 @@ + diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 57d2dc975e..eb23d16747 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -256,7 +256,7 @@ function handleBonusPoints ($mode, $userid) { break; default: // This should not happen - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid bonus-mode ' . getBonusMode() . ' detected.'); + reportBug(__FUNCTION__, __LINE__, 'Invalid bonus-mode ' . getBonusMode() . ' detected.'); break; } // END - switch @@ -279,7 +279,7 @@ function purgeExpiredTurboBonus() { // Wrapper Functions //----------------------------------------------------------------------------- -// Determines wether the "bonus rallye" is active +// Determines whether the "bonus rallye" is active function isBonusRallyeActive () { // Do we have cache? if (!isset($GLOBALS['bonus_rallye_active'])) { @@ -291,7 +291,7 @@ function isBonusRallyeActive () { return $GLOBALS['bonus_rallye_active']; } -// Determines wether the "bonus new_member_notify" is active +// Determines whether the "bonus new_member_notify" is active function isBonusNewMemberNotifyEnabled () { // Do we have cache? if (!isset($GLOBALS['bonus_new_member_notify_active'])) { @@ -351,5 +351,29 @@ function getTurboRates () { return $GLOBALS[__FUNCTION__]; } +// Getter for login_timeout +function getLoginTimeout () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('login_timeout'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for bonus_ref +function getBonusRef () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('bonus_ref'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/booking_functions.php b/inc/libs/booking_functions.php index 4ef69c9eb0..cbbde72590 100644 --- a/inc/libs/booking_functions.php +++ b/inc/libs/booking_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 0c342e1257..11537e3d74 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/country_functions.php b/inc/libs/country_functions.php index 66a2fed694..6131323401 100644 --- a/inc/libs/country_functions.php +++ b/inc/libs/country_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -66,5 +66,25 @@ function generateCountryInfo ($id) { return $ret; } +// Adds a country code selection box +function addCountryCodeSelectionBox ($countryCode = NULL) { + // The admin may see all + $whereStatement = "WHERE `is_active`='Y'"; + + // Is admin? + if (isAdmin()) { + // Then display all codes + $whereStatement = ''; + } // END - if + + // Generate the HTML code + $OUT = ''; + + // Return it + return $OUT; +} + // [EOF] ?> diff --git a/inc/libs/coupon_functions.php b/inc/libs/coupon_functions.php index 2ee0f69a15..62bc2d4167 100644 --- a/inc/libs/coupon_functions.php +++ b/inc/libs/coupon_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/debug_functions.php b/inc/libs/debug_functions.php index cc15320b6c..c6efd06b42 100644 --- a/inc/libs/debug_functions.php +++ b/inc/libs/debug_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 154c2afe98..fd1c866ba4 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/earning_functions.php b/inc/libs/earning_functions.php index 2507db9257..7beda40637 100644 --- a/inc/libs/earning_functions.php +++ b/inc/libs/earning_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -173,7 +173,7 @@ LIMIT 1", array( getMemberId() ), __FUNCTION__, __LINE__); - // Determine wether something has changed + // Determine whether something has changed $status = (!SQL_HASZEROAFFECTED()); // Has the record changed? diff --git a/inc/libs/events_functions.php b/inc/libs/events_functions.php index a964936daf..b001338933 100644 --- a/inc/libs/events_functions.php +++ b/inc/libs/events_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index 011621f52e..6d22963d26 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,20 +40,35 @@ if (!defined('__SECURITY')) { die(); } // END - if -// Template helper function to create selection box for all forced-ad types -function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $default = NULL) { - // Add all types through the filter - $forcedAdTypes = runFilterChain('add_forced_ads_types', array()); +// Translate forced ad type +function translateForcedAdsType ($status) { + // Is the status null or empty? + if (is_null($status)) { + // Is NULL + $status = 'NULL'; + } elseif (empty($status)) { + // Is empty (string) + $status = 'EMPTY'; + } // END - if - // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($forcedAdTypes, 'forced_ads_type', 'type'); + // Default status is unknown + $return = '{%message,ADMIN_FORCED_ADS_TYPE_UNKNOWN=' . $status . '%}'; - // Return prepared content - return $content; + // Construct message id + $messageId = 'ADMIN_FORCED_ADS_TYPE_' . $status; + + // Is it there? + if (isMessageIdValid($messageId)) { + // Then use it as message string + $return = '{--' . $messageId . '--}'; + } // END - if + + // Return the status + return $return; } -// Translate the status IN/OUT -function translateForcedAdsType ($status) { +// Translate forced campaign status +function translateForcedCampaignStatus ($status) { // Is the status null or empty? if (is_null($status)) { // Is NULL @@ -64,10 +79,10 @@ function translateForcedAdsType ($status) { } // END - if // Default status is unknown - $return = '{%message,ADMIN_FORCED_ADS_TYPE_UNKNOWN=' . $status . '%}'; + $return = '{%message,ADMIN_FORCED_CAMPAIGN_TYPE_UNKNOWN=' . $status . '%}'; // Construct message id - $messageId = 'ADMIN_FORCED_ADS_TYPE_' . $status; + $messageId = 'ADMIN_FORCED_CAMPAIGN_TYPE_' . $status; // Is it there? if (isMessageIdValid($messageId)) { @@ -79,17 +94,47 @@ function translateForcedAdsType ($status) { return $return; } -// "Getter" for an array of data from all Forced-PopUps +// Translate visibility +function translateForcedCostsVisibility ($visibility) { + // Is the status null or empty? + if (is_null($visibility)) { + // Is NULL + $visibility = 'NULL'; + } elseif (empty($visibility)) { + // Is empty (string) + $visibility = 'EMPTY'; + } // END - if + + // Default status is unknown + $return = '{%message,ADMIN_FORCED_ADS_VISIBILITY_UNKNOWN=' . $visibility . '%}'; + + // Construct message id + $messageId = 'ADMIN_FORCED_ADS_VISIBILITY_' . $visibility; + + // Is it there? + if (isMessageIdValid($messageId)) { + // Then use it as message string + $return = '{--' . $messageId . '--}'; + } // END - if + + // Return the status + return $return; +} + +// "Getter" for an array of data from all Forced-PopUps except user's function getForcedPopupDataByEarningArray ($content) { - debug_report_bug(__FUNCTION__, __LINE__, 'content=' . print_r($content, true)); + die('content=
    ' . print_r($content, true) . '
    ' . debug_get_printable_backtrace()); + + // Finally return the content + return $content; } -// Generator (somewhat getter) for network type options +// Generator (somewhat getter) for forced-ads type options function generateForcedAdsTypeOptions ($type = NULL) { // Is this cached? if (!isset($GLOBALS[__FUNCTION__][$type])) { // Generate output and cache it - $GLOBALS[__FUNCTION__][$type] = generateOptionList( + $GLOBALS[__FUNCTION__][$type] = generateOptions( '/ARRAY/', array( 'BANNER', @@ -108,5 +153,408 @@ function generateForcedAdsTypeOptions ($type = NULL) { return $GLOBALS[__FUNCTION__][$type]; } +// Generator (somewhat getter) for forcec-costs visibility options +function generateForcedCostsVisibilityOptions ($visibility = NULL) { + // Is this cached? + if (!isset($GLOBALS[__FUNCTION__][$visibility])) { + // Generate output and cache it + $GLOBALS[__FUNCTION__][$visibility] = generateOptions( + '/ARRAY/', + array( + 'ALL', + 'MEMBER', + 'SPONSOR', + 'NONE' + ), + array(), + $visibility, + '', '', + array(), + 'translateForcedCostsVisibility' + ); + } // END - if + + // Return content + return $GLOBALS[__FUNCTION__][$visibility]; +} + +// "Getter" for an array of all given forced ads +function getArrayFromForcedAdsByType ($forcedType = NULL) { + // Init array + $forcedAds = array(); + + // Init WHERE (default) + $where = ''; + + // Is forced type not NULL? + if (!is_null($forcedType)) { + // Then set proper WHERE + $where = sprintf("WHERE `forced_ads_type`='%s'", SQL_ESCAPE($forcedType)); + } // END - if + + // Search all given types + $result = SQL_QUERY('SELECT + `forced_ads_id`, + `forced_ads_ad_url`, + `forced_ads_click_url`, + `forced_ads_width`, + `forced_ads_height`, + `forced_ads_alt_text`, + `forced_ads_framebreaker`, + `forced_ads_type`, + `forced_ads_views_counter`, + `forced_ads_clicks_counter`, + UNIX_TIMESTAMP(`forced_ads_added`) AS `forced_ads_added`, + `forced_ads_userid` +FROM + `{?_MYSQL_PREFIX?}_forced_ads` +' . $where . ' +ORDER BY + `forced_ads_id` ASC', __FUNCTION__, __LINE__); + + // Do we have at least one entry? + if (!SQL_HASZERONUMS($result)) { + // Get all elements + while ($content = SQL_FETCHARRAY($result)) { + // Add it + $forcedAds[$content['forced_ads_id']] = $content; + } // END - while + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Return it + return $forcedAds; +} + +// "Getter" for an array of all forced costs from given visibility or all +function getArrayFromForcedCostsByVisibility ($visibility = NULL) { + // Init array + $forcedCosts = array(); + $where = ''; + + // Is visibility not NULL? + if (!is_null($visibility)) { + // Then add WHERE statement + $where = sprintf(" WHERE `forced_costs_visibility`='%s'", SQL_ESCAPE($visibility)); + } // END - if + + // Search all given types + $result = SQL_QUERY("SELECT + `forced_costs_id`, + `forced_costs_price_click`, + `forced_costs_payment_click`, + `forced_costs_visibility` +FROM + `{?_MYSQL_PREFIX?}_forced_costs` +".$where." +ORDER BY + `forced_costs_id` ASC", __FUNCTION__, __LINE__); + + // Do we have at least one entry? + if (!SQL_HASZERONUMS($result)) { + // Get all elements + while ($content = SQL_FETCHARRAY($result)) { + // Add it + $forcedCosts[$content['forced_costs_id']] = $content; + } // END - while + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Return it + return $forcedCosts; +} + +// "Getter" for an array of all forced campaigns from given array and status +function getArrayFromForcedCampaignsByArray ($ids, $status) { + // Init array + $forcedCampaigns = array(); + + // Search all given types + $result = SQL_QUERY_ESC("SELECT + `forced_campaign_id`, + UNIX_TIMESTAMP(`forced_campaign_created`) AS `forced_campaign_created`, + `forced_campaign_status`, + UNIX_TIMESTAMP(`forced_campaign_last_locked`) AS `forced_campaign_last_locked`, + `forced_campaign_lock_reason`, + `forced_campaign_expired`, + `forced_campaign_ordered_clicks`, + `forced_campaign_payment_api`, + `forced_campaign_reload_lock`, + `forced_campaign_minimum_stay`, + `forced_ads_id`, + `forced_campaign_userid`, + `forced_costs_id` +FROM + `{?_MYSQL_PREFIX?}_forced_campaigns` +WHERE + `forced_campaign_id` IN (%s) AND + `forced_campaign_status`='%s' +ORDER BY + `forced_campaign_id` ASC", + array( + implode(', ', $ids), + $status + ), __FUNCTION__, __LINE__); + + // Do we have at least one entry? + if (!SQL_HASZERONUMS($result)) { + // Get all elements + while ($content = SQL_FETCHARRAY($result)) { + // Add it + $forcedCampaigns[$content['forced_campaign_id']] = $content; + } // END - while + } // END - if + + // Free result + SQL_FREERESULT($result); + + // Return it + return $forcedCampaigns; +} + +// "Activates" forced campaigns from POST data +function doForcedAdminActivateCampaigns () { + // Do some sanity checks + if (!isAdmin()) { + // Not allowed to call + return false; + } elseif (countPostSelection('forced_campaign_id') == 0) { + // No selections made + return false; + } + + // Get an array from all pending campaigns + $forcedCampaigns = getArrayFromForcedCampaignsByArray(array_keys(postRequestElement('forced_campaign_id')), 'PENDING'); + + // By default all worked (at this point) + $activated = true; + + // Run through all entries + foreach ($forcedCampaigns as $campaignId => $campaignData) { + // Change the status of this campaign + if (!changeForcedCampaignStatus($campaignId, 'PENDING', 'ACTIVE', $campaignData)) { + // One didn't work, but continue with others + $activated = false; + } // END - if + } // END - foreach + + // Return status + return $activated; +} + +// Changes the status of a forced campaign from previous to new status +function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'campaignId=' . $campaignId . ',prevStatus=' . $prevStatus . ',data[]=' . gettype($data) . ',newStatus=' . $newStatus . ' - ENTERED!'); + // Make new status always lower-case + $newStatus = strtolower($newStatus); + + // Prepare array + $filterData = array( + 'campaign_id' => $campaignId, + 'prev_status' => $prevStatus, + 'new_status' => $newStatus, + 'data' => $data, + 'abort' => NULL + ); + + // Run pre filter chain + $filterData = runFilterChain('pre_change_forced_campaign_status', $filterData); + + // Abort here? + if (!is_null($filterData['abort'])) { + // Abort here + return $filterData['abort']; + } // END - if + + // Update the status now + // ---------- Comment out for debugging/developing member actions! --------- + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_forced_campaigns` SET `forced_campaign_status`='%s' WHERE `forced_campaign_id`=%s LIMIT 1", + array( + $newStatus, + bigintval($campaignId) + ), __FUNCTION__, __LINE__); + // ---------- Comment out for debugging/developing member actions! --------- + + // Was that fine? + // ---------- Comment out for debugging/developing member actions! --------- + if (SQL_AFFECTEDROWS() != 1) { + // No, something went wrong + return false; + } // END - if + // ---------- Comment out for debugging/developing member actions! --------- + + // Run post filter chain + $filterData = runFilterChain('post_change_forced_campaign_status', $filterData); + + // Check if generic 'data' is there + assert(isset($filterData['data'])); + + // All done! + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'campaignId=' . $campaignId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); + return true; +} + +// Notify admin(s) with a selected message and content +function doForcedNotifyAdmin ($messageType, $content) { + // Prepare template name + $templateName = sprintf("admin_forced_%s", $messageType); + + // Prepare subject + $subject = sprintf("{--ADMIN_FORCED_NOTIFY_%s_SUBJECT--}", + strtoupper($messageType) + ); + + // Is the subject line there? + if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) { + // Set default subject if following eval() wents wrong + $subject = '{%message,ADMIN_FORCED_NOTIFY_DEFAULT_SUBJECT=' . strtoupper($messageType) . '%}'; + } // END - if + + // Translate some data if present + $content = prepareForcedContentForTemplate($content); + + // Send the notification out + return sendAdminNotification($subject, $templateName, $content, $content['forced_campaign_userid']); +} + +// Notify the user about the performed action +function doForcedNotifyMember ($messageType, $content) { + // Skip notification if userid is NULL + if (is_null($content['forced_campaign_userid'])) { + // NULL is silently ignored + return true; + } // END - if + + // Prepare template name + $templateName = sprintf("member_forced_%s", $messageType); + + // Prepare subject + $subject = sprintf("{--MEMBER_FORCED_NOTIFY_%s_SUBJECT--}", + strtoupper($messageType) + ); + + // Is the subject line there? + if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) { + // Set default subject if following eval() wents wrong + $subject = '{--MEMBER_FORCED_NOTIFY_DEFAULT_SUBJECT--}'; + } // END - if + + // Translate some data if present + $content = prepareForcedContentForTemplate($content); + + // Load template + $mailText = loadEmailTemplate($templateName, $content, $content['forced_campaign_userid']); + + // Send the email + return sendEmail($content['forced_campaign_userid'], $subject, $mailText); +} + +// Translates some data for template usage +// @TODO Can't we use our new expression language instead of this ugly code? +function prepareForcedContentForTemplate ($content) { + // Prepare some code + if (isset($content['forced_campaign_created'])) $content['forced_campaign_created'] = generateDateTime($content['forced_campaign_created'], 2); + + // Return translated content + return $content; +} + +// ---------------------------------------------------------------------------- +// Template helper functions +// ---------------------------------------------------------------------------- + +// Template helper function to create selection box for all forced-ad types +function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $default = NULL) { + // Add all types through the filter + $forcedAdTypes = runFilterChain('add_forced_ads_types', array()); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($forcedAdTypes, 'forced_ads_type', 'type', '', '', '', $default); + + // Return prepared content + return $content; +} + +// Template helper function to create selection box for costs visibility +function doTemplateForcedCostsVisiblitySelectionBox ($templateName, $clear = false, $default = NULL) { + // Init array + $costsVisibility = array( + 0 => array('visibility' => 'ALL'), + 1 => array('visibility' => 'MEMBER'), + 2 => array('visibility' => 'SPONSOR'), + 3 => array('visibility' => 'NONE') + ); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($costsVisibility, 'forced_costs_visibility', 'visibility', '', '', '', $default); + + // Return prepared content + return $content; +} + +// Template helper function to create selection box for foreced ads +function doTemplateForcedAdSelectionBox ($templateName, $clear, $default = NULL) { + // Get back an array of all forced popups + $forcedAds = getArrayFromForcedAdsByType(); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($forcedAds, 'forced_ads_id', 'forced_ads_id', '', '', '', $default, 'forced_ads_type'); + + // Return prepared content + return $content; +} + +// Template helper function to create selection box for foreced costs +function doTemplateForcedCostsSelectionBox ($templateName, $clear, $default = NULL) { + // Get back an array of all forced popups + $forcedCosts = getArrayFromForcedCostsByVisibility(); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', true); + + // Return prepared content + return $content; +} + +// Template helper function to create selection box for foreced campaign userid +function doTemplateForcedCampaignUseridSelectionBox ($templateName, $clear, $default = NULL) { + // Generate the selection box without all + $content = addMemberSelectionBox($default, false, true, true, 'forced_campaign_userid'); + + // Return prepared content + return $content; +} + +// ---------------------------------------------------------------------------- +// XML call-back functions +// ---------------------------------------------------------------------------- + +// For 'doing' add forced-ads, the column-index is required +function addXmlSpecialAdminAddDoForcedAds () { + // So set it all here + $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; +} + +// For 'doing' add forced-campaigns, the column-index is required +function addXmlSpecialAdminAddDoForcedCampaigns () { + // So set it all here + $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; +} + +// For 'doing' add forced-costs, the column-index is required +function addXmlSpecialAdminAddDoForcedCosts () { + // So set it all here + $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction'] = 'column'; + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_values'] = array(); + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column'; +} + // [EOF] ?> diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index b38e212039..bd09b0a29e 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -87,7 +87,7 @@ LIMIT 1", sendEmail($content['userid'], '{--MEMBER_HOLIDAY_UNLOCK_SUBJECT--}', $message); // Remember userid for admin - $admin .= $content['userid']."\n"; + $admin .= $content['userid'].chr(10); } // END - if // Send mail to admins diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index c8db16ae1b..86584ac608 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,8 +45,8 @@ function addValidHtmlTags() { $OUT = ''; if (!is_array($GLOBALS['html_tags'])) return ""; foreach ($GLOBALS['html_tags'] as $tag) { - $OUT .= ', ' . strtoupper($tag); - } + $OUT .= ', ' . strtolower($tag); + } // END - foreach $OUT = substr($OUT, 2); return $OUT; } @@ -118,7 +118,7 @@ function insertUrlsIntoHtml ($text) { } // END - if // And now go forward... - $idx = '0'; + $idx = 0; while ($idx < strlen($test)) { $check = substr($test, $idx, 1); if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) { @@ -134,20 +134,21 @@ function insertUrlsIntoHtml ($text) { } // END - if // Now replace the email against anchor with mailto and pray... - $PARTS[] = $check2 . '' . $check . ''; + array_push($PARTS, $check2 . '' . $check . ''); // Remove email from testing string (see above why...) $test = substr($test, strlen($check)); } // Now put all parts together - $text = ''; $PARTS[] = $test; + $text = ''; + array_push($PARTS, $test); foreach ($PARTS as $part) { $text .= $part; } // END - foreach // Replace new-lines agains
    -s and finally compile possible own HTML tags out... - return preCompileCode(str_replace("\n", "
    \n", $text)); + return preCompileCode(str_replace(chr(10), "
    \n", $text)); } // [EOF] diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index 94a6fc2316..20be2a86b6 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/mailid_functions.php b/inc/libs/mailid_functions.php index fc14099623..071665144c 100644 --- a/inc/libs/mailid_functions.php +++ b/inc/libs/mailid_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -62,7 +62,7 @@ function handleMailIdErrorCode ($errorCode) { default: logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect'))); - redirectToUrl('modules.php?module=index&code=' . getCode('UNKNOWN_STATUS') . '&ext=mailid'); + redirectToUrl('modules.php?module=index&code=' . getCode('UNKNOWN_REDIRECT') . '&ext=mailid'); break; } // END - switch } // END - if diff --git a/inc/libs/maintenance_functions.php b/inc/libs/maintenance_functions.php index 1bf0aed813..c824b1ffce 100644 --- a/inc/libs/maintenance_functions.php +++ b/inc/libs/maintenance_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -56,7 +56,7 @@ function getMaintenance () { return $GLOBALS[__FUNCTION__]; } -// Checks wether 'maintenance' is "YES" +// Checks whether 'maintenance' is "YES" function isMaintenanceEnabled () { // Is the cache entry set if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index 820ecc1e5d..7139fbdf77 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index d90c329cae..bc7c2c4004 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -55,7 +55,7 @@ function detectNetworkProcessForm () { // 'do' must be provided in URL if (!isGetRequestElementSet('do')) { // Not provided! - debug_report_bug(__FUNCTION__, __LINE__, 'No "do" has been provided. Please fix your templates.'); + reportBug(__FUNCTION__, __LINE__, 'No "do" has been provided. Please fix your templates.'); } // END - if // Default is invalid @@ -76,7 +76,7 @@ function detectNetworkProcessForm () { // Has the form being detected? if ($GLOBALS['network_form_name'] == 'invalid') { // Not supported - debug_report_bug(__FUNCTION__, __LINE__, 'POST form could not be detected.'); + reportBug(__FUNCTION__, __LINE__, 'POST form could not be detected.'); } // END - if } @@ -103,7 +103,7 @@ function doAdminNetworkProcessForm () { // Is the function valid? if (!function_exists($functionName)) { // Invalid function name - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', false); + reportBug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', false); } // END - if // Init global arrays @@ -113,7 +113,7 @@ function doAdminNetworkProcessForm () { call_user_func($functionName); } -// Checks wether the (short) network name is already used (valid) +// Checks whether the (short) network name is already used (valid) function isNetworkNameValid ($name) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_id` FROM `{?_MYSQL_PREFIX?}_network_data` WHERE `network_short_name`='%s' LIMIT 1", @@ -129,7 +129,7 @@ function isNetworkNameValid ($name) { return $isValid; } -// Checks wether the given network type is already used (valid) +// Checks whether the given network type is already used (valid) function isNetworkTypeHandleValid ($type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_type_id` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_id`=%s AND `network_type_handler`='%s' LIMIT 1", @@ -148,7 +148,7 @@ function isNetworkTypeHandleValid ($type, $networkId) { return $isValid; } -// Checks wether the given network request parameter is already used (valid) +// Checks whether the given network request parameter is already used (valid) function isNetworkRequestElementValid ($key, $type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_request_param_id` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_id`=%s AND `network_type_id`=%s AND `network_request_param_key`='%s' LIMIT 1", @@ -168,7 +168,7 @@ function isNetworkRequestElementValid ($key, $type, $networkId) { return $isValid; } -// Checks wether the given vcheck request parameter is already used (valid) +// Checks whether the given vcheck request parameter is already used (valid) function isNetworkVcheckElementValid ($key, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_vcheck_param_id` FROM `{?_MYSQL_PREFIX?}_network_vcheck_params` WHERE `network_id`=%s AND `network_vcheck_param_key`='%s' LIMIT 1", @@ -187,7 +187,7 @@ function isNetworkVcheckElementValid ($key, $networkId) { return $isValid; } -// Checks wether the given network API array translation +// Checks whether the given network API array translation function isNetworkArrayTranslationValid ($key, $type, $networkId) { // Query for it $result = SQL_QUERY_ESC("SELECT `network_array_id` FROM `{?_MYSQL_PREFIX?}_network_array_translation` WHERE `network_id`=%s AND `network_type_id`=%s AND `network_array_index`='%s' LIMIT 1", @@ -212,7 +212,7 @@ function getNetworkDataById ($networkId, $column = '') { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.'); } // END - if // Set current network id @@ -267,7 +267,7 @@ function getNetworkDataByTypeId ($networkId, $column = '') { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.'); } // END - if // Set current network id @@ -330,7 +330,7 @@ function getNetworkTypeDataById ($networkId) { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network type id ' . $networkId . ' is smaller than 1.'); } // END - if // By default we have no data @@ -369,7 +369,7 @@ function getNetworkRequestParamsDataById ($networkId) { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkId . ' is smaller than 1.'); } // END - if // By default we have no data @@ -408,7 +408,7 @@ function doNetworkUpdateDataByArray ($networkId, $networkData) { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network id ' . $networkId . ' is smaller than 1.'); } // END - if // Just call our inner method @@ -420,7 +420,7 @@ function doNetworkUpdateTypeByArray ($networkId, $networkTypeData) { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network type handler id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network type handler id ' . $networkId . ' is smaller than 1.'); } // END - if // Just call our inner method @@ -432,7 +432,7 @@ function doNetworkUpdateParamsByArray ($networkId, $networkParamData) { // Ids lower one are not accepted if ($networkId < 1) { // Not good, should be fixed - debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkId . ' is smaller than 1.'); + reportBug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $networkId . ' is smaller than 1.'); } // END - if // Just call our inner method @@ -601,7 +601,7 @@ function generateNetworkTypeOptions ($networkId) { // Is this cached? if (!isset($GLOBALS[__FUNCTION__][$networkId])) { // Generate output and cache it - $GLOBALS[__FUNCTION__][$networkId] = generateOptionList( + $GLOBALS[__FUNCTION__][$networkId] = generateOptions( 'network_types', 'network_type_id', 'network_type_handler', @@ -625,7 +625,7 @@ function generateNetworkTypesAvailableOptions ($defaultType = NULL) { // Is it cached? if (!isset($GLOBALS[__FUNCTION__][$defaultType])) { // Generate list - $GLOBALS[__FUNCTION__][$defaultType] = generateOptionList( + $GLOBALS[__FUNCTION__][$defaultType] = generateOptions( '/ARRAY/', array( 'banner', @@ -675,7 +675,7 @@ function generateNetworkRequestKeyOptions () { // Is it cached? if (!isset($GLOBALS[__FUNCTION__])) { // Generate and cache it - $GLOBALS[__FUNCTION__] = generateOptionList( + $GLOBALS[__FUNCTION__] = generateOptions( '/ARRAY/', array( 'id', @@ -711,7 +711,7 @@ function generateNetworkVcheckKeyOptions () { // Is it cached? if (!isset($GLOBALS[__FUNCTION__])) { // Generate and cache it - $GLOBALS[__FUNCTION__] = generateOptionList( + $GLOBALS[__FUNCTION__] = generateOptions( '/ARRAY/', array( 'network_key', @@ -745,7 +745,7 @@ function generateNetworkTranslationOptions ($default = '') { // Is it cached? if (!isset($GLOBALS[__FUNCTION__][$default])) { // Generate and cache it - $GLOBALS[__FUNCTION__][$default] = generateOptionList( + $GLOBALS[__FUNCTION__][$default] = generateOptions( 'network_translations', 'network_translation_id', 'network_translation_name', @@ -766,7 +766,7 @@ function generateNetworkRequestTypeOptions ($default = '') { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$default])) { // Generate the list - $GLOBALS[__FUNCTION__][$default] = generateOptionList( + $GLOBALS[__FUNCTION__][$default] = generateOptions( '/ARRAY/', array( 'GET', @@ -789,7 +789,7 @@ function generateNetworkApiActiveOptions ($default = '') { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$default])) { // Generate the list - $GLOBALS[__FUNCTION__][$default] = generateYesNoOptionList($default); + $GLOBALS[__FUNCTION__][$default] = generateYesNoOptions($default); } // END - if // Return cache @@ -804,7 +804,7 @@ function translateNetworkTranslationName ($name) { // Is the message id there? if (!isMessageIdValid($messageId)) { // Not valid type - debug_report_bug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); } // END - if // Return message id @@ -819,7 +819,7 @@ function translateNetworkTypeHandler ($type) { // Is the message id there? if (!isMessageIdValid($messageId)) { // Not valid type - debug_report_bug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); } // END - if // Return message id @@ -834,7 +834,7 @@ function translateNetworkRequestType ($type) { // Is the message id there? if (!isMessageIdValid($messageId)) { // Not valid type - debug_report_bug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'type=' . $type . ' is invalid.'); } // END - if // Return message id @@ -849,7 +849,7 @@ function translateNetworkRequestParameterKey ($param) { // Is the message id there? if (!isMessageIdValid($messageId)) { // Not valid param - debug_report_bug(__FUNCTION__, __LINE__, 'param=' . $param . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'param=' . $param . ' is invalid.'); } // END - if // Return message id @@ -864,7 +864,7 @@ function translateNetworkVcheckParameterKey ($param) { // Is the message id there? if (!isMessageIdValid($messageId)) { // Not valid param - debug_report_bug(__FUNCTION__, __LINE__, 'param=' . $param . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'param=' . $param . ' is invalid.'); } // END - if // Return message id @@ -954,7 +954,7 @@ function isNetworkApiConfigured ($networkId) { return $GLOBALS[__FUNCTION__][$networkId]; } -// Checks wether the given network type handler is configured +// Checks whether the given network type handler is configured function isNetworkTypeHandlerConfigured ($networkId, $networkTypeId) { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$networkId][$networkTypeId])) { @@ -976,7 +976,7 @@ function isNetworkTypeHandlerConfigured ($networkId, $networkTypeId) { // Handles the network-payment-check request function handleNetworkPaymentCheckRequest () { // @TODO Implement this function - debug_report_bug(__FUNCTION__, __LINE__, 'Not yet implemented.'); + reportBug(__FUNCTION__, __LINE__, 'Not yet implemented.'); } //------------------------------------------------------------------------------ @@ -1070,7 +1070,7 @@ function doAdminNetworkProcessHandleNetworkTypes () { $OUT .= loadTemplate('admin_delete_network_types_row', true, $networkTypeData); } else { // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); + reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); } } // END - if } // END - if @@ -1085,7 +1085,7 @@ function doAdminNetworkProcessHandleNetworkTypes () { loadTemplate('admin_delete_network_types', false, $OUT); } else { // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); + reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); } // Don't display the list/add new form @@ -1128,7 +1128,7 @@ function doAdminNetworkProcessHandleRequestParams () { $OUT .= loadTemplate('admin_delete_network_request_params_row', true, $networkRequestData); } else { // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); + reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); } } // END - if } // END - if @@ -1143,7 +1143,7 @@ function doAdminNetworkProcessHandleRequestParams () { loadTemplate('admin_delete_network_request_params', false, $OUT); } else { // Problem! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); + reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.'); } // Don't display the list/add new form @@ -1179,7 +1179,7 @@ function doAdminNetworkProcessChangeNetworks () { // Do we have this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing - debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); + reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); } // END - if // Add this entry @@ -1289,7 +1289,7 @@ function doAdminNetworkProcessChangeHandlerTypes () { // Do we have this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing - debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); + reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); } // END - if // Fix empty network_type_banner_url to NULL @@ -1342,7 +1342,7 @@ function doAdminNetworkProcessChangeRequestParams () { // Do we have this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing - debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); + reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); } // END - if // Fix empty network_request_param_default to NULL @@ -1594,19 +1594,8 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { } // END - if } // END - foreach - // Initialize variables - $content = array(); - $id = 'network_max_reload_time_ye'; - $skip = false; - - // Get all POST data - $postData = postRequestArray(); - - // Convert "reload time selections" - convertSelectionsToEpocheTime($postData, $content, $id, $skip); - - // Set the POST array back - setPostRequestArray($postData); + // Convert data in POST array + convertSelectionsToEpocheTimeInPostData($content, 'network_max_reload_time_ye', $skip); // Is there already an entry? if (isNetworkTypeHandlerConfigured(getRequestElement('network_id'), getRequestElement('network_type_id'))) { @@ -1696,17 +1685,8 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { } // END - if } // END - foreach - // Initialize variables - $content = array(); - $id = 'network_max_reload_time_ye'; - $skip = false; - $postData = postRequestArray(); - - // Convert "reload time selections" - convertSelectionsToEpocheTime($postData, $content, $id, $skip); - - // Set the POST array back - setPostRequestArray($postData); + // Convert time selections in POST data + convertSelectionsToEpocheTimeInPostArray('network_max_reload_time_ye'); // Is there already an entry? if (!isNetworkTypeHandlerConfigured(getRequestElement('network_id'), getRequestElement('network_type_id'))) { @@ -1822,7 +1802,7 @@ function doAdminNetworkProcessExport () { // Is the 'what' key valid? if (!isset($validExports[getWhat()])) { // Not valid - debug_report_bug(__FUNCTION__, __LINE__, 'what=' . getWhat() . ' - not supported'); + reportBug(__FUNCTION__, __LINE__, 'what=' . getWhat() . ' - not supported'); } // END - if // Generate call-back, some tables require to export not all columns @@ -1831,10 +1811,10 @@ function doAdminNetworkProcessExport () { // Is the call-back function there? if (!function_exists($callbackName)) { // No, this is really bad - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid call-back function ' . $callbackName . ' detected.'); + reportBug(__FUNCTION__, __LINE__, 'Invalid call-back function ' . $callbackName . ' detected.'); } elseif (isset($GLOBALS[__FUNCTION__][$callbackName])) { // Already called! - debug_report_bug(__FUNCTION__, __LINE__, 'Double-call of export function ' . $callbackName . ' detected.'); + reportBug(__FUNCTION__, __LINE__, 'Double-call of export function ' . $callbackName . ' detected.'); } // Call the function @@ -1901,7 +1881,7 @@ function doAdminNetworkExportTypes () { // 'network_id' must be set if (!isGetRequestElementSet('network_id')) { // Only network handlers of one network will be exported per time - debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + reportBug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); } // END - if // Get all network types of given network @@ -1942,7 +1922,7 @@ ORDER BY $SQL .= 'NULL'; } else { // Column is set - $SQL .= "'" . $content['network_type_banner_url'] . "'"; + $SQL .= chr(39) . $content['network_type_banner_url'] . chr(39); } // Add more @@ -1964,7 +1944,7 @@ function doAdminNetworkExportRequestParams () { // 'network_id' must be set if (!isGetRequestElementSet('network_id')) { // Only network request parameters of one network will be exported per time - debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + reportBug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); } // END - if // Get all network types of given network @@ -2003,7 +1983,7 @@ ORDER BY $SQL .= "NULL),\n"; } else { // Column is set - $SQL .= "'" . $content['network_request_param_default'] . "'),\n"; + $SQL .= chr(39) . $content['network_request_param_default'] . "'),\n"; } } // END - while @@ -2022,7 +2002,7 @@ function doAdminNetworkExportVcheckParams () { // 'network_id' must be set if (!isGetRequestElementSet('network_id')) { // Only network vcheck parameters of one network will be exported per time - debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + reportBug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); } // END - if // Get all network types of given network @@ -2058,7 +2038,7 @@ ORDER BY $SQL .= "NULL),\n"; } else { // Column is set - $SQL .= "'" . $content['network_vcheck_param_default'] . "'),\n"; + $SQL .= chr(39) . $content['network_vcheck_param_default'] . "'),\n"; } } // END - while @@ -2077,7 +2057,7 @@ function doAdminNetworkExportArrayTranslation () { // 'network_id' must be set if (!isGetRequestElementSet('network_id')) { // Only network API array index translations of one network will be exported per time - debug_report_bug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); + reportBug(__FUNCTION__, __LINE__, 'network_id not provided, please fix your links.'); } // END - if // Get all network types of given network diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 36d12ffe11..a2b3c0ae62 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -93,7 +93,7 @@ function insertNewsletterUrls ($text) { } // And now go forward... - $idx = '0'; + $idx = 0; while ($idx < strlen($test)) { $check = substr($test, $idx, 1); if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) { @@ -109,14 +109,15 @@ function insertNewsletterUrls ($text) { } // Now replace the email against anchor with mailto and pray... - $PARTS[] = $check2 . $check; + array_push($PARTS, $check2 . $check); // Remove email from testing string (see above why...) $test = substr($test, strlen($check)); } // Now put all parts together - $text = ''; $PARTS[] = $test; + $text = ''; + array_push($PARTS, $test); foreach ($PARTS as $part) { $text .= $part; } diff --git a/inc/libs/nickname_functions.php b/inc/libs/nickname_functions.php index 9d501390db..1e8084013b 100644 --- a/inc/libs/nickname_functions.php +++ b/inc/libs/nickname_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// Checks wether the nickname is active +// Checks whether the nickname is active function isNicknameOrUserid ($useridNick) { // By default nothing is found... $ret = false; @@ -78,7 +78,7 @@ function getNickname ($userid) { $result = false; // Nickname or userid used? - if ('' . round($userid) . '' === '' . $userid . '') { + if ('' . bigintval($userid, true, false) . '' === '' . $userid . '') { // Userid given, so try to load user data if (fetchUserData($userid)) { // Load nickname from database diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index 869ba8e2e2..bc8818fa22 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/optimize_functions.php b/inc/libs/optimize_functions.php index efcdbd16c0..ee3e22c941 100644 --- a/inc/libs/optimize_functions.php +++ b/inc/libs/optimize_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -82,7 +82,7 @@ function repairOptimizeDatabase () { $opt = SQL_FETCHARRAY($result1); // Add data to array - $ret['tables'][] = array($row['Name'], $opt['Msg_text'], $rep['Msg_text'], $total, $gain); + array_push($ret['tables'], array($row['Name'], $opt['Msg_text'], $rep['Msg_text'], $total, $gain)); // Count total table data $ret['total_size'] += $total; diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index f6da85ea79..5aa1383fe8 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,6 +43,7 @@ if (!defined('__SECURITY')) { // Generates a selection list for mail order function addOrderSelectionOptions ($default) { // Currenty the list is hardcoded... + // @TODO Move this array into a filter $LIST = array('userid', 'zip', 'country', 'email', 'birth_year', 'last_online', 'ref_clicks', 'total_logins', 'mail_orders'); $OUT = ''; foreach ($LIST as $item) { @@ -58,7 +59,7 @@ function addOrderSelectionOptions ($default) { } // END - if // Add option line - $OUT .= ''; + $OUT .= ''; } // END - foreach // Return the output @@ -81,7 +82,7 @@ function getOrderMultiPage () { return $GLOBALS[__FUNCTION__]; } -// Determines wether 'order_multi_page' is set to 'Y' +// Determines whether 'order_multi_page' is set to 'Y' function isOrderMultiPageEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index 2d49e5802d..98d1858473 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ function displayDebugSqls () { } // END - foreach // Load main template - $GLOBALS['page_footer'] .= loadTemplate('admin_other_sqls', true, $OUT); + $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', true, $OUT); } // [EOF] diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 7dea181c69..82c4048dea 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -99,7 +99,7 @@ function getPayoutPoints ($userid) { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$userid])) { // Determine it - $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points'); + $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - getUserUsedPoints($userid); } // END - if // Return it diff --git a/inc/libs/politician_stop_functions.php b/inc/libs/politician_stop_functions.php index 005eaac0c7..0ec6401762 100644 --- a/inc/libs/politician_stop_functions.php +++ b/inc/libs/politician_stop_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index b76c47c8fc..7a3664c68e 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -68,7 +68,7 @@ function getResendProfileUpdate () { return $GLOBALS[__FUNCTION__]; } -// Determines wether sending profile update notification is enabled +// Determines whether sending profile update notification is enabled function isSendProfileUpdateEnabled() { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index feffef0f61..d885505291 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Auto-start referral rallyes function autostartReferralRallyes ($result) { // Load all rallyes (usally we have only one rallye active per time! - list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result); // Free result SQL_FREERESULT($result); @@ -56,22 +56,7 @@ SET WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FUNCTION__, __LINE__); - - // Transfer all neccessary data to the $content array - $content['userid_cnt'] = getTotalConfirmedUser(); - $content['start'] = generateDateTime($start, 2); - $content['end'] = generateDateTime($end , 2); - $content['now_t'] = generateDateTime(time(), 2); - $content['title'] = $title; - $content['id'] = $id; // id for the rallye details link - - // Determine min_users and min_prices - $content['min_users'] = determineReferralRallyeMinimumUsers($min_users); - $content['min_prices'] = determineReferralRallyeMinimumPrices($min_prices); - - // Load prices - $content['prices'] = addReferralRallyePrices($id); + array(bigintval($content['id'])), __FUNCTION__, __LINE__); // Query all users $result_user = SQL_QUERY("SELECT @@ -80,6 +65,7 @@ FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `userid` ASC", __FUNCTION__, __LINE__); @@ -103,12 +89,13 @@ WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1", - array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__); - if (SQL_HASZERONUMS($result_ref)) { + array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__); + // Do we have an entry? + if (SQL_HASZERONUMS($result_ref)) { // Add userid and his ref count to table $result_ref = SQL_QUERY_ESC("SELECT - SUM(p.points) AS `points` + SUM(p.`points`) AS `points` FROM `{?_MYSQL_PREFIX?}_user_points` AS p LEFT JOIN @@ -116,7 +103,8 @@ LEFT JOIN ON p.userid=d.userid WHERE - d.`status`='CONFIRMED' AND + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND d.`max_mails` > 0 AND d.`mails_confirmed` >= {?ref_payout?} AND p.`ref_depth`=1 AND @@ -135,11 +123,19 @@ WHERE // Add info line SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` -(`rallye_id`,`userid`,`refs`,`curr_points`) - VALUES -(%s, %s, %s, %s)", +( + `rallye_id`, + `userid`, + `refs`, + `curr_points` +) VALUES ( + %s, + %s, + %s, + %s +)", array( - bigintval($id), + bigintval($content['id']), bigintval($content['userid']), bigintval($count), $cpoints @@ -154,19 +150,21 @@ WHERE $content['refs'] = $count; // Shall I notify this member? - if (($notify == 'Y') && ($un)) { + if (($content['send_notify'] == 'Y') && ($un === true)) { // Load email template and send it to the user $message = loadEmailTemplate('member_rallye_notify', $content, $content['userid']); - sendEmail($content['userid'], '{%message,RALLYE_MEMBER_NOTIFY=' . $title . '%}', $message); + sendEmail($content['userid'], '{%message,MEMBER_RALLYE_NOTIFY_SUBJECT=' . $content['title'] . '%}', $message); } // END - if } // END - while // Choose the right admin template $templ = 'admin_rallye_no_notify'; - if ($notify == 'Y') $templ = 'admin_rallye_notify'; + if ($content['send_notify'] == 'Y') { + $templ = 'admin_rallye_notify'; + } // END - if // Send email to admin - sendAdminNotification('{%message,RALLYE_ADMIN_NOTIFY=' . $title . '%}', $templ, $prices); + sendAdminNotification('{%message,ADMIN_RALLYE_NOTIFY_SUBJECT=' . $content['title'] . '%}', $templ, $content); // Free memory SQL_FREERESULT($result_user); @@ -176,13 +174,15 @@ WHERE function addReferralRallyePrices ($rallye, $mode = 'email') { // Output mode switch($mode) { - case 'email': $mode = "\n"; break; + case 'email': $mode = chr(10); break; case 'html' : $mode = '
    '; break; } // END - switch // Load prices $result_prices = SQL_QUERY_ESC("SELECT - `price_level`,`points`,`info` + `price_level`, + `points`, + `info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE @@ -194,15 +194,17 @@ ORDER BY // Entries found? if (!SQL_HASZERONUMS($result_prices)) { // Load prices - if ($mode == "\n") $prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode; - $prices = ''; + if ($mode == chr(10)) { + $prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode; + } // END - if + while ($content = SQL_FETCHARRAY($result_prices)) { - $prices .= $content['price_level']. '{--RALLYE_PRICE--}: '; + $prices .= $content['price_level']. '{--RALLYE_PRICE--}:'; if (!empty($content['info'])) { $prices .= $content['info']; } else { - $prices .= $content['points'] . ' {?POINTS?}'; + $prices .= '{%pipe,translateComma=' . $content['points'] . '%} {?POINTS?}'; } $prices .= '' . $mode; } // END - if @@ -215,7 +217,9 @@ ORDER BY } // Add last line for email mode - if ($mode == "\n") $prices .= '------------------------------'; + if ($mode == chr(10)) { + $prices .= '------------------------------'; + } // END - if // Return price list return $prices; @@ -224,27 +228,32 @@ ORDER BY // function addReferralRallyeTopUsers ($mode, $rallye, $default=0) { // Init variables - $min_users = 0; $min_prices = 0; + $min_users = 0; + $min_prices = 0; // First check how many prices are set - $prices = countSumTotalData($rallye, 'rallye_prices', 'id', 'rallye_id', true); + $prices = getTotalRallyePrices($rallye); // And load only limited users - $result = SQL_QUERY_ESC("SELECT - u.userid, u.refs, u.curr_points, rd.min_users, rd.min_prices + $result = SQL_QUERY_ESC("SELECT DISTINCT + u.`userid`, + u.`refs`, + u.`curr_points`, + rd.`min_users`, + rd.`min_prices` FROM `{?_MYSQL_PREFIX?}_rallye_users` AS u -LEFT JOIN +INNER JOIN `{?_MYSQL_PREFIX?}_refsystem` AS r ON u.userid=r.userid -LEFT JOIN +INNER JOIN `{?_MYSQL_PREFIX?}_rallye_data` AS rd ON - u.rallye_id=rd.id + u.`rallye_id`=rd.`id` WHERE u.`rallye_id`=%s AND - r.counter > 0 + r.`counter` > 0 ORDER BY u.refs DESC", array(bigintval($rallye)), __FUNCTION__, __LINE__); @@ -257,27 +266,29 @@ ORDER BY ); // Load all users - while ($content = SQL_FETCHARRAY($result)) { + while ($row = SQL_FETCHARRAY($result)) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $row['userid'] . ',refs=' . $row['refs']); // Get current refs - $count = getReferralRallyeRefsCount($content['userid'], $content['refs']); + $count = getReferralRallyeRefsCount($row['userid'], $row['refs']); // Points of ref's $result_ref = SQL_QUERY_ESC("SELECT - p.points + p.`points` FROM `{?_MYSQL_PREFIX?}_user_points` AS p LEFT JOIN `{?_MYSQL_PREFIX?}_user_data` AS d ON - p.userid=d.userid + 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 >= {?ref_payout?} + d.`userid`=%s AND + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND + p.`ref_depth`=1 AND + d.`max_mails` > 0 AND + d.`mails_confirmed` >= {?ref_payout?} LIMIT 1", - array(bigintval($content['userid'])), __FUNCTION__, __LINE__); + array(bigintval($row['userid'])), __FUNCTION__, __LINE__); // Get points list($refpoints) = SQL_FETCHROW($result_ref); @@ -285,15 +296,18 @@ LIMIT 1", // Free result SQL_FREERESULT($result_ref); - if (empty($refpoints)) $refpoints = '0'; + // Fix empty values (ugly code again) + if (empty($refpoints)) { + $refpoints = '0'; + } // END - if // Init userid for list $userid = '---'; // List only users with at least one ref! - //* DEBUG: */ debugOutput('*'.$count.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints.'*'); - if (($count > 0) && ($refpoints > $content['curr_points'])) { - $userid = $content['userid']; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count=' . $count . ',userid=' . $userid . ',refpoints=' . $refpoints . ',curr_points=' . $row['curr_points']); + if (($count > 0) && ($refpoints > $row['curr_points'])) { + $userid = $row['userid']; } else { $count = ''; } @@ -301,23 +315,23 @@ LIMIT 1", // Save values to array $content['userid'][] = $userid; $content['ref'][] = $count; - $content['cpoints'][] = $content['curr_points']; - $min_users = $content['min_users']; - $min_prices = $content['min_prices']; + $content['cpoints'][] = $row['curr_points']; + $min_users = $row['min_users']; + $min_prices = $row['min_prices']; } // END - while // Free memory SQL_FREERESULT($result); // Sort whole array - array_pk_sort($content, array('ref', 'cpoints'), 0, 1, true); + array_pk_sort($content, array('cpoints', 'ref'), 0, 1, true); // Generate table $OUT = ''; - for ($idx = '0'; $idx < $prices; $idx++) { + for ($idx = 0; $idx < $prices; $idx++) { // Prepare marking of default (maybe current user's) id $start = ''; $end = ''; - if (($content['userid'][$idx] == $default) && ($default > 0)) { + if (($default > 0) && (isset($content['userid'][$idx])) && ($content['userid'][$idx] == $default)) { $start = ''; $end = ''; } // END - if @@ -327,9 +341,8 @@ LIMIT 1", 'idx' => ($idx + 1), 'start' => $start, 'end' => $end, - 'userid' => $content['userid'][$idx], - 'ref' => $content['ref'][$idx], - 'infos' => '' + 'userid' => (isset($content['userid'][$idx])) ? $content['userid'][$idx] : '---', + 'ref' => (isset($content['ref'][$idx])) ? $content['ref'][$idx] : '---' ); // Load row template and switch color @@ -345,6 +358,20 @@ LIMIT 1", return loadTemplate($mode . '_list_rallye', true, $content); } +// Sends out a notification about the rallye +function sendRallyeNotification ($userid, $content) { + // Translate more data + $content['start_time'] = generateDateTime($content['start_time'], 2); + $content['end_time'] = generateDateTime($content['end_time'] , 2); + $content['now_time'] = generateDateTime(time(), 2); + $content['ref'] = '0'; + $content['refs'] = getUsersTotalReferrals($userid); + + // Send notification to member + $message = loadEmailTemplate('member_rallye_notify', $content, $userid); + sendEmail($userid, '{%message,MEMBER_RALLYE_NOTIFY_SUBJECT=' . $content['title'] . '%}', $message); +} + // Run this function only when a new member has confirmed his email address! function addUserToReferralRallye ($userid, $content = array()) { $add = ''; @@ -356,7 +383,12 @@ function addUserToReferralRallye ($userid, $content = array()) { // Check for an auto-add rallye $result = SQL_QUERY("SELECT - `id`,`title`,`start_time`,`end_time`,`send_notify`".$add." + `id`, + `title`, + `start_time`, + `end_time`, + `send_notify` + ".$add." FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE @@ -367,38 +399,19 @@ WHERE LIMIT 1", __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Init variables - $min_users = '0'; $min_prices = '0'; + $min_users = '0'; + $min_prices = '0'; - // Load data - if (isExtensionInstalledAndNewer('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); - } + // Load and merge data + $content = merge_array($content, SQL_FETCHARRAY($result)); // Free result SQL_FREERESULT($result); - if ($notify == 'Y') { + // Notify the user? + if ($content['send_notify'] == 'Y') { // Transfer all neccessary data to $content array - $content['start'] = generateDateTime($start, 2); - $content['end'] = generateDateTime($end , 2); - $content['now_t'] = generateDateTime(time(), 2); - $content['title'] = $title; - $content['id'] = $id; // id for the rallye details link - $content['ref'] = '0'; - $content['refs'] = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); - - // Load prices - $content['prices'] = addReferralRallyePrices($id); - - // Determine min_users/prices tring - $content['min_users'] = determineReferralRallyeMinimumUsers($min_users); - $content['min_prices'] = determineReferralRallyeMinimumPrices($min_prices); - - // Send notification to member - $message = loadEmailTemplate('member_rallye_notify', $content, $userid); - sendEmail($userid, '{%message,RALLYE_MEMBER_NOTIFY=' . $title . '%}', $message); + sendRallyeNotification($userid, $content); } // END - if // Check if line is already included... @@ -411,7 +424,7 @@ WHERE `userid`=%s LIMIT 1", array( - bigintval($id), + bigintval($content['id']), bigintval($userid) ), __FUNCTION__, __LINE__); @@ -420,11 +433,17 @@ LIMIT 1", // Add userid and his ref count to table SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` -(`rallye_id`,`userid`,`refs`) - VALUES -(%s,%s,0)", +( + `rallye_id`, + `userid`, + `refs` +) VALUES ( + %s, + %s, + 0 +)", array( - bigintval($id), + bigintval($content['id']), bigintval($userid) ), __FUNCTION__, __LINE__); } // END - if @@ -434,33 +453,60 @@ LIMIT 1", } // END - if } -// -function markReferralRallyesAsExpired ($result) { +// "Getter" for total rallye winners +function getTotalRallyeWinners ($rallyeId) { + // Is cache set? + if (!isset($GLOBALS[__FUNCTION__][$rallyeId])) { + // Default total is zero + $GLOBALS[__FUNCTION__][$rallyeId] = '0'; + + // Get prices + $prices = getArrayFromReferralRallyeUsers($rallyeId); + + // "Walk" through all entries + foreach ($prices['userid'] as $key => $userid) { + // Check for userid + $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); + + // Allow valid and active users with at least one ref + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'rallyeId=' . $rallyeId . ',userid=' . $userid . ',ref=' . $prices['ref'][$key] . ',cpoints=' . $prices['cpoints'][$key]); + if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) { + $GLOBALS[__FUNCTION__][$rallyeId]++; + } // END - if + } // END - foreach + } // END - if + + // Return it + return $GLOBALS[__FUNCTION__][$rallyeId]; +} + +// Stops the given rallye result (from SQL layer) by marking it as expirced +function stopRallyeByResult ($result) { // Load rallye data - list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result); // Free result SQL_FREERESULT($result); // Init array - $content = array(); $count = '0'; $users = array(); - $content['title'] = $title; - $content['start'] = generateDateTime($start, 1); - $content['end'] = generateDateTime($end , 1); - $content['now_t'] = generateDateTime(time(), 1); + $content['start_time'] = generateDateTime($content['start_time'], 1); + $content['end_time'] = generateDateTime($content['end_time'] , 1); + $content['now_time'] = generateDateTime(time(), 1); // Load users array (!) with assigned prices - $prices = getArrayFromReferralRallyeUsers($id); + $prices = getArrayFromReferralRallyeUsers($content['id']); // Just count... $total = '0'; foreach ($prices['userid'] as $key => $userid) { - // Check status - // active = 1: account is still confirmed - // active = 0: account is deleted or locked - $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); + /* + * Check status + * active = 1: account is still confirmed + * active = 0: account is deleted or locked + */ + $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); $prices['active'][$key] = $active; @@ -470,15 +516,15 @@ function markReferralRallyesAsExpired ($result) { } // END - if } // END - foreach - if (($total < $min_prices) || ($total == '0')) { + // Check on 'min_prices' condition + if (($total < $content['min_prices']) || (getTotalConfirmedUser() < $content['min_users'])) { // Do not end this rallye! - unset($content); return; } // END - if // Expire rallye SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `expired`='Y' WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FUNCTION__, __LINE__); + array(bigintval($content['id'])), __FUNCTION__, __LINE__); // Run array through (by userid is the most important 2nd-level-array) foreach ($prices['userid'] as $key => $userid) { @@ -511,7 +557,7 @@ function markReferralRallyesAsExpired ($result) { addPointsThroughReferralSystem('rallye_winner:' . $winnerLevel, $userid, $content['points']); } // END - if - if ($notify == 'Y') { + if ($content['send_notify'] == 'Y') { // Prepare infos for the mail template if (!empty($content['info'])) { // Take direct infos @@ -537,7 +583,7 @@ function markReferralRallyesAsExpired ($result) { } // END - foreach // Select template depending on notfication is switch on / off - if ($notify == 'Y') { + if ($content['send_notify'] == 'Y') { $templ = 'admin_rallye_expired'; } elseif (is_array($users['userid'])) { $templ = 'admin_rallye_expired_no'; @@ -548,10 +594,10 @@ function markReferralRallyesAsExpired ($result) { $content['count'] = $count; // Send mail to admin - sendAdminNotification('{%message,RALLYE_ADMIN_EXPIRED_SUBJECT=' . $title . '%}', $templ, $content); + sendAdminNotification('{%message,ADMIN_RALLYE_EXPIRED_SUBJECT=' . $content['title'] . '%}', $templ, $content); // Add task (we ignore the task id here) - createNewTask('{--RALLYE_ADMIN_EXPIRED--}: ' . $title, '{--RALLYE_ADMIN_EXPIRED_TEXT--}', 'RALLYE_EXPIRED'); + createNewTask('{--ADMIN_RALLYE_EXPIRED_TASK--}: ' . $content['title'], '{--ADMIN_RALLYE_EXPIRED_TEXT--}', 'RALLYE_EXPIRED'); } // @@ -570,6 +616,7 @@ FROM WHERE `userid` IN(%s) AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ' ) . " ORDER BY `userid` ASC LIMIT %s", @@ -615,8 +662,8 @@ ORDER BY // Transfer elements while ($content = SQL_FETCHARRAY($result)) { $prices['level'][] = $content['price_level']; - $prices['points'][] = $content['points']; - $prices['info'][] = $content['info']; + array_push($prices['points'], $content['points']); + array_push($prices['info'], $content['info']); } // END - while // Free memory @@ -629,7 +676,9 @@ ORDER BY // function getArrayFromReferralRallyeUsers ($rallye) { // Fix zero points to 0.00000 - if (getConfig('ref_payout') == '0') setConfigEntry('ref_payout', '0.00000'); + if (getRefPayout() == '0') { + setConfigEntry('ref_payout', '0.00000'); + } // END - if // Init multi array $users = array( @@ -638,8 +687,22 @@ function getArrayFromReferralRallyeUsers ($rallye) { 'cpoints' => array(), ); - // Load users userid old points earned - $result_user = SQL_QUERY_ESC("SELECT `userid`,`refs`,`curr_points` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s ORDER BY `userid` ASC", + /* + * Load users: + * - userid = User's id number + * - refs = Old amount of referrals (before the rallye has started) + * - curr_points = Current amount of total points + */ + $result_user = SQL_QUERY_ESC("SELECT + `userid`, + `refs`, + `curr_points` +FROM + `{?_MYSQL_PREFIX?}_rallye_users` +WHERE + `rallye_id`=%s +ORDER BY + `userid` ASC", array(bigintval($rallye)), __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result_user)) { // Load current ref count @@ -647,20 +710,21 @@ function getArrayFromReferralRallyeUsers ($rallye) { // Points of ref's $result_ref = SQL_QUERY_ESC("SELECT - SUM(p.points) AS `points` + SUM(p.`points`) AS `points` FROM `{?_MYSQL_PREFIX?}_user_points` AS p LEFT JOIN `{?_MYSQL_PREFIX?}_user_data` AS d ON - p.userid=d.userid + p.`userid`=d.`userid` WHERE - d.`status`='CONFIRMED' AND - d.max_mails > 0 AND - d.mails_confirmed >= {?ref_payout?} AND - p.ref_depth=1 AND - p.points > 0 AND - d.userid=%s + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ' ) . " AND + d.`max_mails` > 0 AND + d.`mails_confirmed` >= {?ref_payout?} AND + p.`ref_depth`=1 AND + p.`points` > 0 AND + d.`userid`=%s LIMIT 1", array(bigintval($content['userid'])), __FUNCTION__, __LINE__); @@ -674,16 +738,16 @@ LIMIT 1", if (empty($refpoints)) $refpoints = '0'; // Store calculated new refs to array - $users['userid'][] = $content['userid']; - $users['ref'][] = abs($count - $content['refs']); - $users['cpoints'][] = $refpoints - $content['curr_points']; + array_push($users['userid'], $content['userid']); + array_push($users['ref'], abs($count - $content['refs'])); + array_push($users['cpoints'], $refpoints - $content['curr_points']); } // END - while // Free memory SQL_FREERESULT($result_user); // Sort array for refs (descending) - array_pk_sort($users, array('ref', 'cpoints'), 0, 1, true); + array_pk_sort($users, array('cpoints', 'ref'), 0, 1, true); // Load prices array (!) $prices = getArrayFromReferralRallyePrices($rallye); @@ -705,23 +769,25 @@ LIMIT 1", // @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId() function addReferralRallyeWinners ($mode, $rallye, $default=0) { // First check how many prices are set - $prices = countSumTotalData(bigintval($rallye), 'rallye_prices', 'id', 'rallye_id', true); + $prices = getTotalRallyePrices($rallye); // Load data $content = getArrayFromReferralRallyeUsers($rallye); // Generate table $OUT = ''; - for ($idx = '0'; $idx < $prices; $idx++) { - // Check status - // active = 1: account is still confirmed - // active = 0: account is deleted or locked - $active = countSumTotalData($content['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); + for ($idx = 0; $idx < $prices; $idx++) { + /* + * Check status + * active = 1: account is still confirmed + * active = 0: account is deleted or locked + */ + $active = countSumTotalData($content['userid'][$idx], 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); if ((empty($content['ref'][$idx])) || ($content['ref'][$idx] == '0') || ($active == '0') || ('' . round($content['cpoints'][$idx]) . '' == '0') || (empty($content['cpoints'][$idx]))) { // Allow valid and active users with at least one ref to get points - $content['ref'][$idx] = '---'; - $content['userid'][$idx] = '---'; + $content['ref'][$idx] = '---'; + $content['userid'][$idx] = '---'; } // END - if if (!empty($content['info'][$idx])) { @@ -769,7 +835,10 @@ function purgeExpiredReferralRallyes () { // Check for expired rallyes $EXPIRE = 3; // @TODO The hard-coded value... $result_rallye = SQL_QUERY_ESC("SELECT - `id`,`title`,`start_time`,`end_time` + `id`, + `title`, + `start_time`, + `end_time` FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE @@ -789,7 +858,7 @@ WHERE $content['now_time'] = generateDateTime(time(), 1); // Send mail to admin - sendAdminNotification('{%message,RALLYE_ADMIN_PURGED_SUBJECT=' . $content['title'] . '%}', 'admin_rallye_purged', $content); + sendAdminNotification('{%message,ADMIN_RALLYE_PURGED_SUBJECT=' . $content['title'] . '%}', 'admin_rallye_purged', $content); // Purge whole rallye addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", @@ -800,7 +869,7 @@ WHERE array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); // Add task (we ignore the task id here - createNewTask('{--RALLYE_ADMIN_PURGED--}: ' . $content['title'], '{--RALLYE_ADMIN_PURGED_TEXT--}', 'RALLYE_PURGED'); + createNewTask('{--ADMIN_RALLYE_PURGED_TASK--}: ' . $content['title'], '{--ADMIN_RALLYE_PURGED_TEXT--}', 'RALLYE_PURGED'); } // END - while // Run all SQLs @@ -842,11 +911,11 @@ function addReferralRallyeTemplateSelection ($name = 'template', $default = '') if (!empty($ral[0])) { // Generate selection box for all found templates $OUT = ''; } else { // No rallye templates found - $OUT = '{--RALLYE_NO_TEMPLATES_FOUND--}'; + $OUT = '{--ADMIN_RALLYE_TEMPLATES_404--}'; } // Return selection @@ -882,7 +951,7 @@ function getReferralRallyeRefsCount ($currUserid, $oldReferralCount = '0') { } // END - foreach //* DEBUG: */ debugOutput('
    '.print_r($GLOBALS['cache_array']['refsystem'], true).'
    '); - //* DEBUG: */ shutdown(); + //* DEBUG: */ doShutdown(); if ($count > 0) { // Count cache hits @@ -954,5 +1023,17 @@ function determineReferralRallyeMinimumPrices ($min_prices) { return $return; } +// "Getter" for total rallye prices by given id +function getTotalRallyePrices ($rallyeId) { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__][$rallyeId])) { + // Determine it + $GLOBALS[__FUNCTION__][$rallyeId] = countSumTotalData($rallyeId, 'rallye_prices', 'id', 'rallye_id', true); + } // END - if + + // Return it + return $GLOBALS[__FUNCTION__][$rallyeId]; +} + // [EOF] ?> diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 300ee3aacd..fe4ef4adcf 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -98,7 +98,7 @@ LIMIT 1', // Something must have been updated if (SQL_HASZEROAFFECTED()) { // Please report this bug - debug_report_bug(__FUNCTION__, __LINE__, 'Nothing has been updated in user_refs,userid=' . $userid . ',refid=' . convertNullToZero($refid) . ',refbackPoints=' . $refbackPoints); + reportBug(__FUNCTION__, __LINE__, 'Nothing has been updated in user_refs,userid=' . $userid . ',refid=' . convertNullToZero($refid) . ',refbackPoints=' . $refbackPoints); } // END - if // Add points again, but only directly @@ -138,7 +138,7 @@ function getRefbackPercents ($userid, $refid) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ' - ENTERED!'); if ((!isValidUserId($userid)) || (!isValidUserId($refid))) { // userid and/or refid is invalid - debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . convertNullToZero($userid) . ', refid=' . convertNullToZero($refid) . ' - Both must be > 0'); + reportBug(__FUNCTION__, __LINE__, 'userid=' . convertNullToZero($userid) . ', refid=' . convertNullToZero($refid) . ' - Both must be > 0'); } elseif ($userid == $refid) { // Skip identical ids return 0; @@ -160,7 +160,7 @@ function getRefbackPercents ($userid, $refid) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ',percents=' . $GLOBALS['refback_percents'][$userid][$refid]); } else { // Please report all findings - debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ' - No entry found. :-('); + reportBug(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ' - No entry found. :-('); } // Free result @@ -196,7 +196,7 @@ ORDER BY // Add all while ($content = SQL_FETCHARRAY($result)) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . convertNullToZero($refid) . ',level=' . $level . ',userid=' . $content['userid']); - $userIds[] = $content['userid']; + array_push($userIds, $content['userid']); } // END - while } // END - if @@ -342,7 +342,7 @@ function updateMemberRefbackPercents ($id, $percents, $note) { // Prepare email content $content['refback_percents'] = $percents; - $content['refback_note'] = $note; + $content['refback_notice'] = $note; // Load member email template $mail = loadEmailTemplate('member_refback', $content, $content['refid']); @@ -361,7 +361,7 @@ function updateMemberRefbackPercents ($id, $percents, $note) { return $status; } -// Checks wether refback is enabled +// Checks whether refback is enabled function isRefbackEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 7dddc8fb29..667b83c0f7 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// +// Checks whether all required registration fields are set function ifRequiredRegisterFieldsAreSet (&$array) { // By default all is fine $ret = true; @@ -71,19 +71,31 @@ function ifRequiredRegisterFieldsAreSet (&$array) { } // Generates a 'category table' for the registration form -function registerGenerateCategoryTable ($mode) { +function registerGenerateCategoryTable ($mode, $configEntry = 'register_default') { // Init output $OUT = ''; - // Guests are mostly not interested in how many members has - // choosen an individual category + /* + * Guests are mostly not interested in how many members has choosen an + * individual category. + */ $whereStatement = "WHERE `visible`='Y' "; // Admins are allowed to see every category... - if (isAdmin()) $whereStatement = ''; + if (isAdmin()) { + $whereStatement = ''; + } // END - if // Look for categories - $result = SQL_QUERY('SELECT `id`,`cat`,`visible` FROM `{?_MYSQL_PREFIX?}_cats` ' . $whereStatement . ' ORDER BY `sort` ASC', + $result = SQL_QUERY('SELECT + `id`, + `cat`, + `visible` +FROM + `{?_MYSQL_PREFIX?}_cats` +' . $whereStatement . ' +ORDER BY + `sort` ASC', __FUNCTION__, __LINE__); if (!SQL_HASZERONUMS($result)) { @@ -95,7 +107,7 @@ function registerGenerateCategoryTable ($mode) { $content['default_no'] = ''; // Mark categories - if ((postRequestElement('cat', $content['id']) == 'Y') || ((isRegisterDefaultEnabled()) && (!isPostRequestElementSet('cat', $content['id'])))) { + if ((postRequestElement('cat', $content['id']) == 'Y') || ((getConfig($configEntry) == 'Y') && (!isPostRequestElementSet('cat', $content['id'])))) { $content['default_yes'] = ' checked="checked"'; } else { $content['default_no'] = ' checked="checked"'; @@ -126,7 +138,7 @@ function registerOutputFailedMessage ($messageId, $extra='') { } } -// Checks wether the registration data is complete +// Checks whether the registration data is complete function isRegistrationDataComplete () { // Init elements $GLOBALS['registration_ip_timeout'] = false; @@ -138,9 +150,10 @@ function isRegistrationDataComplete () { // First we only check the submitted data then we continue... :) // - // Did he agree to our Terms Of Usage? + // Did he agree to the terms of usage? if (postRequestElement('agree') != 'Y') { setPostRequestElement('agree', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'agree=N - User did not agree with terms of usage.'); $isOkay = false; } // END - if @@ -148,16 +161,19 @@ function isRegistrationDataComplete () { // that, he has to click on a confirmation link :P ) if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) { setPostRequestElement('email', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter proper email address.'); $isOkay = false; } // END - if // And what about surname and family's name? if (!isPostRequestElementSet('surname')) { setPostRequestElement('surname', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter surname.'); $isOkay = false; } // END - if if (!isPostRequestElementSet('family')) { setPostRequestElement('family', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter family name.'); $isOkay = false; } // END - if @@ -186,6 +202,7 @@ function isRegistrationDataComplete () { setPostRequestElement('pass2', '!'); // ... which is both not okay + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Random password generation not possible, isExtensionInstalledAndNewer(register, 0.5.5)=' . intval(isExtensionInstalledAndNewer('register', '0.5.5')) . ',isRegisterGeneratePasswordEmptyEnabled()=' . intval(isRegisterGeneratePasswordEmptyEnabled())); $isOkay = false; } } // END - if @@ -193,17 +210,25 @@ function isRegistrationDataComplete () { // Did he enter his password twice? if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { + // Both passwords did not match setPostRequestElement('pass1', '!'); setPostRequestElement('pass2', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter same passwords.'); } else { if (!isPostRequestElementSet('pass1')) { + // Password 1 is empty setPostRequestElement('pass1', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter pass1.'); } else { + // Password 2 is empty setPostRequestElement('pass1', ''); } if (!isPostRequestElementSet('pass2')) { + // Password 2 is empty setPostRequestElement('pass2', '!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter pass2.'); } else { + // Password 1 is empty setPostRequestElement('pass2', ''); } } @@ -213,11 +238,12 @@ function isRegistrationDataComplete () { // Is the password long enouth? if ((strlen(postRequestElement('pass1')) < getPassLen()) && ($isOkay === true)) { $GLOBALS['registration_short_password'] = true; + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a short password.'); $isOkay = false; } // END - if // Do this check only when no admin is logged in - if (is_array(postRequestElement('cat'))) { + if (ifPostContainsSelections('cat')) { // Only continue with array foreach (postRequestElement('cat') as $id => $answer) { // Is this category choosen? @@ -235,6 +261,7 @@ function isRegistrationDataComplete () { // Does the email address already exists in our database? if ((isEmailTaken(postRequestElement('email'))) && (!isAdmin())) { setPostRequestElement('email', '?'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.'); $isOkay = false; } // END - if } // END - if @@ -254,59 +281,29 @@ function isRegistrationDataComplete () { } // Do the registration -function doRegistration () { - // Generate hash which will be inserted into confirmation mail - $hash = generateHash(sha1( - // Get total confirmed, ... - getTotalConfirmedUser() . getEncryptSeparator() . - // ... unconfirmed ... - getTotalUnconfirmedUser() . getEncryptSeparator() . - // ... and locked users - getTotalLockedUser() . getEncryptSeparator() . - postRequestElement('month') . '-' . - postRequestElement('day') . '-' . - postRequestElement('year') . getEncryptSeparator() . - detectServerName() . getEncryptSeparator() . - detectRemoteAddr() . getEncryptSeparator() . - detectUserAgent() . '/' . - getSiteKey() . '/' . - getDateKey() . '/' . - getConfig('CACHE_BUSTER') - )); - - // Old way with enterable two-char-code - $countryRow = '`country`'; - $countryData = substr(postRequestElement('cntry'), 0, 2); - - // Add design when extension ext-theme is v0.0.8 or greater - // @TODO Rewrite these all to a single filter - $GLOBALS['register_sql_columns'] = ''; - $GLOBALS['register_sql_data'] = ''; - if (isExtensionInstalledAndNewer('theme', '0.0.8')) { - // Okay, add design here - $GLOBALS['register_sql_columns'] .= ', `curr_theme`'; - $GLOBALS['register_sql_data'] .= ", '{%%pipe,getCurrentTheme%%}'"; +function doUserRegistration () { + // Do not register an account on absent ext-user + if (!isExtensionInstalled('user')) { + // Please report this + reportBug(__FUNCTION__, __LINE__, 'Tried to register a user account without ext-user installed.'); } // END - if - // Check if I shall disable sending mail to newly registered members out about active/begging rallye - // - // First comes first: begging rallye - if ((isExtensionInstalledAndNewer('beg', '0.2.7')) && (!isBegNewMemberNotifyEnabled())) { - $GLOBALS['register_sql_columns'] .= ', `beg_rallye_enable_notify`, `beg_rallye_disable_notify`'; - $GLOBALS['register_sql_data'] .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()'; - } // END - if + // Init filter data + $filterData = array( + // Initialization not done by default + 'init_done' => false + ); - // Second: active rallye - if ((isExtensionActive('bonus')) && (!isBonusNewMemberNotifyEnabled())) { - $GLOBALS['register_sql_columns'] .= ', `bonus_rallye_enable_notify`, `bonus_rallye_disable_notify`'; - $GLOBALS['register_sql_data'] .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()'; - } // END - if + // Run the pre-registration chain + $filterData = runFilterChain('pre_user_registration', $filterData); - // Write user data to table - if (isExtensionActive('country')) { - // Save with new selectable country code - $countryRow = '`country_code`'; - $countryData = bigintval(postRequestElement('country_code')); + // Did the initialization work? + if ($filterData['init_done'] === false) { + // Something bad happened! + displayMessage('{--PRE_USER_REGISTRATION_FAILED--}'); + + // Stop here + return false; } // END - if // Create user's account... @@ -334,7 +331,7 @@ function doRegistration () { `joined`, `last_update`, `ref_payout` - ".$GLOBALS['register_sql_columns']." + " . $GLOBALS['register_sql_columns'] . " ) VALUES ( '%s', '%s', @@ -351,20 +348,21 @@ function doRegistration () { %s, %s, %s, - 'UNCONFIRMED', + '%s', '%s', '{%%pipe,detectRemoteAddr%%}', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), {?ref_payout?} - ".$GLOBALS['register_sql_data'].")", + " . $GLOBALS['register_sql_data'] . " +)", array( - $countryRow, + $GLOBALS['register_country_row'], substr(postRequestElement('gender'), 0, 1), postRequestElement('surname'), postRequestElement('family'), postRequestElement('street_nr'), - $countryData, + $GLOBALS['register_country_data'], bigintval(postRequestElement('zip')), postRequestElement('city'), postRequestElement('email'), @@ -375,19 +373,20 @@ function doRegistration () { bigintval(postRequestElement('max_mails')), bigintval(postRequestElement('max_mails')), convertZeroToNull(postRequestElement('refid')), - $hash + postRequestElement('status'), + $GLOBALS['register_confirm_hash'] ), __FUNCTION__, __LINE__); // Get his userid - $userid = bigintval(SQL_INSERTID()); + $filterData['register_insert_id'] = bigintval(SQL_INSERTID()); // Did this work? - if ($userid == '0') { + if (!isValidUserId($filterData['register_insert_id'])) { // Something bad happened! displayMessage('{--USER_NOT_REGISTERED--}'); // Stop here - return; + return false; } // END - if // Shall we reset random refid? Only possible with latest ext-user @@ -397,26 +396,43 @@ function doRegistration () { } // END - if // Update referral table - updateReferralCounter($userid); + updateReferralCounter($filterData['register_insert_id']); // Write his welcome-points initReferralSystem(); - addPointsThroughReferralSystem('register_welcome', $userid, getPointsRegister()); + addPointsThroughReferralSystem( + // Subject + 'register_welcome', + // New user's id + $filterData['register_insert_id'], + // Points + getPointsRegister(), + // Referral id (or NULL if none set) + convertZeroToNull(postRequestElement('refid')) + ); // Write catgories - if ((is_array(postRequestElement('cat'))) && (count(postRequestElement('cat')))) { + if (ifPostContainsSelections('cat')) { + // Write all entries foreach (postRequestElement('cat') as $categoryId => $joined) { + // "Join" this group? if ($joined == 'Y') { // Insert category entry - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`,`cat_id`) VALUES (%s, %s)", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s, %s)", array( - $userid, + $filterData['register_insert_id'], bigintval($categoryId) ), __FUNCTION__, __LINE__); } // END - if } // END - foreach } // END - if + // Registration phase is done here, so for tester accounts we end here + if (((getExtensionVersion('user') >= '0.5.0')) && (isTesterUserName(postRequestElement('surname'))) && (ifTesterAccountsAllowed())) { + // All fine here + return true; + } // END - if + // ... rewrite a zero referral id to the main title if (!isValidUserId(postRequestElement('refid'))) { setPostRequestElement('refid', getMainTitle()); @@ -427,8 +443,8 @@ function doRegistration () { // Prepare data array for the email template // Start with the gender... $content = array( - 'hash' => $hash, - 'userid' => $userid, + 'hash' => $GLOBALS['register_confirm_hash'], + 'userid' => $filterData['register_insert_id'], 'gender' => SQL_ESCAPE(postRequestElement('gender')), 'surname' => SQL_ESCAPE(postRequestElement('surname')), 'family' => SQL_ESCAPE(postRequestElement('family')), @@ -436,15 +452,15 @@ function doRegistration () { 'street' => SQL_ESCAPE(postRequestElement('street_nr')), 'city' => SQL_ESCAPE(postRequestElement('city')), 'zip' => bigintval(postRequestElement('zip')), - 'country' => $countryData, + 'country' => $GLOBALS['register_country_data'], 'refid' => SQL_ESCAPE(postRequestElement('refid')), 'password' => SQL_ESCAPE(postRequestElement('pass1')), ); } else { // No ZIP code entered $content = array( - 'hash' => $hash, - 'userid' => $userid, + 'hash' => $GLOBALS['register_confirm_hash'], + 'userid' => $filterData['register_insert_id'], 'gender' => SQL_ESCAPE(postRequestElement('gender')), 'surname' => SQL_ESCAPE(postRequestElement('surname')), 'family' => SQL_ESCAPE(postRequestElement('family')), @@ -452,7 +468,7 @@ function doRegistration () { 'street' => SQL_ESCAPE(postRequestElement('street_nr')), 'city' => SQL_ESCAPE(postRequestElement('city')), 'zip' => '', - 'country' => $countryData, + 'country' => $GLOBALS['register_country_data'], 'refid' => SQL_ESCAPE(postRequestElement('refid')), 'password' => SQL_ESCAPE(postRequestElement('pass1')), ); @@ -470,13 +486,16 @@ function doRegistration () { } // END - switch // Display information to the user that he got mail and send it away - $messageGuest = loadEmailTemplate('guest_register_done', $content, $userid, false); + $messageGuest = loadEmailTemplate('guest_register_done', $content, $filterData['register_insert_id'], false); // Send mail to user (confirmation link!) - sendEmail($userid, '{--GUEST_CONFIRM_LINK_SUBJECT--}', $messageGuest); + sendEmail($filterData['register_insert_id'], '{--GUEST_CONFIRM_LINK_SUBJECT--}', $messageGuest); // Send mail to admin - sendAdminNotification('{--ADMIN_NEW_ACCOUNT_SUBJECT--}', 'admin_register_done', $content, $userid); + sendAdminNotification('{--ADMIN_NEW_ACCOUNT_SUBJECT--}', 'admin_register_done', $content, $filterData['register_insert_id']); + + // All fine + return true; } //----------------------------------------------------------------------------- @@ -495,7 +514,7 @@ function getDisplayRefid () { return $GLOBALS[__FUNCTION__]; } -// Checks wether 'display_refid' is "YES" +// Checks whether 'display_refid' is "YES" function isDisplayRefidEnabled () { // Is the cache entry set? if (!isset($GLOBALS[__FUNCTION__])) { @@ -531,7 +550,7 @@ function getRegisterDefault () { return $GLOBALS[__FUNCTION__]; } -// Checks wether 'register_default' is "YES" +// Checks whether 'register_default' is "YES" function isRegisterDefaultEnabled () { // Is the cache entry set? if (!isset($GLOBALS[__FUNCTION__])) { @@ -555,7 +574,7 @@ function getRegisterGeneratePasswordEmpty () { return $GLOBALS[__FUNCTION__]; } -// Checks wether 'register_generate_password_empty' is "YES" +// Checks whether 'register_generate_password_empty' is "YES" function isRegisterGeneratePasswordEmptyEnabled () { // Is the cache entry set? if (!isset($GLOBALS[__FUNCTION__])) { @@ -567,5 +586,15 @@ function isRegisterGeneratePasswordEmptyEnabled () { return $GLOBALS[__FUNCTION__]; } +// ---------------------------------------------------------------------------- +// Template helper functions +// ---------------------------------------------------------------------------- + +// Template helper for generating a category selection table for admin area with given configuration entry +function doTemplateAdminRegisterCategoryTable ($templateName, $clear = false, $configEntry) { + // Call the inner function + return registerGenerateCategoryTable('admin', $configEntry); +} + // [EOF] ?> diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 85c995ec1d..509828e926 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 23ff4bfd00..1db2b7ce21 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index a2b9d11c33..ee1f9050b9 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -101,7 +101,10 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() break; case 'url': - if (!isUrlValid($v)) $SAVE = false; + if (!isUrlValid($v)) { + // Don't save the URL + $SAVE = false; + } // END - if break; default: @@ -112,7 +115,8 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() if ((!empty($k)) && ($skip == false)) { // Add data - $DATA['keys'][] = $k; $DATA['values'][] = $v; + array_push($DATA['keys'] , $k); + array_push($DATA['values'], $v); } // END - if } // END - if } // END - foreach @@ -135,31 +139,31 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Remove last ", " from SQL string $sql = substr($sql, 0, -2)." WHERE `id`=%s LIMIT 1"; - $DATA['values'][] = bigintval(getRequestElement('id')); + array_push($DATA['values'], bigintval(getRequestElement('id'))); // Generate message $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_UPDATED--}', 'updated', $messageArray); $ret = 'updated'; } elseif (($ALREADY === false) || (($postData['force'] == 1) && (isAdmin()))) { // Add new sponsor, first add more data - $DATA['keys'][] = 'status'; + array_push($DATA['keys'], 'status'); if (($update === true) && (isAdmin()) && (getWhat() == 'add_sponsor')) { // Only allowed for admin - $DATA['values'][] = 'PENDING'; + array_push($DATA['values'], 'PENDING'); // Add remote IP address as well - $DATA['keys'][] = 'remote_addr'; - $DATA['values'][] = detectRemoteAddr(); + array_push($DATA['keys'], 'remote_addr'); + array_push($DATA['values'], detectRemoteAddr()); } else { // Guest area - $DATA['values'][] = 'UNCONFIRMED'; + array_push($DATA['values'], 'UNCONFIRMED'); // Generate hash code - $DATA['keys'][] = 'hash'; + array_push($DATA['keys'], 'hash'); // @TODO Rewrite this to API function - $DATA['values'][] = md5(session_id() . getEncryptSeparator() . $postData['email'] . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . time()); - $DATA['keys'][] = 'remote_addr'; - $DATA['values'][] = detectRemoteAddr(); + array_push($DATA['values'], md5(session_id() . getEncryptSeparator() . $postData['email'] . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . time())); + array_push($DATA['keys'], 'remote_addr'); + array_push($DATA['values'], detectRemoteAddr()); } // Search the entry @@ -227,7 +231,7 @@ function translateSponsorStatus ($status) { $ret = getMessage($constantName); } else { // Not found - //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); + //* DEBUG: */ reportBug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); $ret = '{%message,ACCOUNT_STATUS_UNKNOWN=' . $status . '%}'; } @@ -416,7 +420,7 @@ function saveSponsorData ($postData, $content) { $sql .= " `" . secureString($key) . "`='%s',"; // We will secure this later inside the SQL_QUERY_ESC() function - $DATA[] = secureString($value); + array_push($DATA, secureString($value)); } // END - foreach // Check if email has changed @@ -431,7 +435,7 @@ function saveSponsorData ($postData, $content) { // Generate hash code // @TODO Rewrite this to API function $HASH = md5(session_id() . getEncryptSeparator() . $postData['email'] . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . getEncryptSeparator() . time()); - $DATA[] = $HASH; + array_push($DATA, $HASH); } // END - if } // END - if // Remove last commata @@ -442,8 +446,7 @@ function saveSponsorData ($postData, $content) { // Add SQL tail data $sql .= " WHERE `id`=%s AND `password`='%s' LIMIT 1"; - $DATA[] = bigintval(getSession('sponsor_id')); - $DATA[] = getSession('sponsor_pass'); + array_push($DATA, bigintval(getSession('sponsor_id')), getSession('sponsor_pass')); // Saving data was completed... ufff... switch (getWhat()) { @@ -451,11 +454,11 @@ function saveSponsorData ($postData, $content) { if ($EMAIL === true) { $message = '{--SPONSOR_ACCOUNT_EMAIL_CHANGED--}'; $templ = 'admin_sponsor_change_email'; - $subj = '{--ADMIN_SPONSOR_ACC_EMAIL_SUBJECT--}'; + $subject = '{--ADMIN_SPONSOR_ACC_EMAIL_SUBJECT--}'; } else { $message = '{--SPONSOR_ACCOUNT_DATA_SAVED--}'; $templ = 'admin_sponsor_change_data'; - $subj = '{--ADMIN_SPONSOR_ACC_DATA_SUBJECT--}'; + $subject = '{--ADMIN_SPONSOR_ACC_DATA_SUBJECT--}'; } break; @@ -463,21 +466,21 @@ function saveSponsorData ($postData, $content) { // Set message template and subject for admin $message = '{--SPONSOR_SETTINGS_SAVED--}'; $templ = 'admin_sponsor_settings'; - $subj = '{--ADMIN_SPONSOR_SETTINGS_SUBJECT--}'; + $subject = '{--ADMIN_SPONSOR_SETTINGS_SUBJECT--}'; break; default: // Unknown sponsor what value! logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", getWhat())); $message = '{--SPONSOR_UNKNOWN_WHAT--}'; $templ = ''; - $subj = ''; + $subject = ''; break; } // END - switch // Has an entry updated? if (!SQL_HASZEROAFFECTED()) { // Template and subject are set? - if (!empty($templ) && !empty($subj)) { + if (!empty($templ) && !empty($subject)) { // Run SQL command and check for success $result = SQL_QUERY_ESC($sql, $DATA, __FUNCTION__, __LINE__); @@ -485,7 +488,7 @@ function saveSponsorData ($postData, $content) { $content['new_data'] = $postData; // Send email to admins - sendAdminNotification($subj, $templ, $content); + sendAdminNotification($subject, $templ, $content); // Shall we send mail to the sponsor's new email address? if ($content['receive_warnings'] == 'Y') { @@ -568,7 +571,7 @@ function doProcessSponsorFormRequest ($messageArray = array()) { switch ($status) { case 'added': // Sponsor successfully added with account status = UNCONFIRMED! // Check for his id number - $result = SQL_QUERY_ESC("SELECT `id`,`hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE '%s' REGEXP `email` LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`, `hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE '%s' REGEXP `email` LIMIT 1", array(postRequestElement('email')), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // id found so let's load it for the confirmation email @@ -666,7 +669,7 @@ function fetchSponsorData ($sponsor_id, $column = 'id') { // Don't look for invalid sponsor_ids... if (!isValidUserId($sponsor_id)) { // Invalid, so abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Sponsor id ' . $sponsor_id . ' is invalid.'); + reportBug(__FUNCTION__, __LINE__, 'Sponsor id ' . $sponsor_id . ' is invalid.'); } elseif (isSponsorDataValid()) { // Use cache, so it is fine return true; @@ -738,7 +741,7 @@ function getFetchedSponsorData ($keyColumn, $sponsor_id, $valueColumn) { // Zero ids are not valid if ($sponsor_id == 0) { // Abort here - debug_report_bug(__FUNCTION__, __LINE__, 'Zero sponsor_id provided'); + reportBug(__FUNCTION__, __LINE__, 'Zero sponsor_id provided'); } // END - if // Is it cached? @@ -791,7 +794,7 @@ function getCurrentSponsorId () { // Sponsorid must be set before it can be used if (!isCurrentSponsorIdSet()) { // Not set - debug_report_bug(__FUNCTION__, __LINE__, 'Sponsor id is not set.'); + reportBug(__FUNCTION__, __LINE__, 'Sponsor id is not set.'); } // END - if // Return the sponsor_id @@ -819,7 +822,7 @@ function isValidSponsorId ($sponsor_id) { function getSponsorData ($column) { // Sponsor id should not be zero if (!isValidUserId(getCurrentSponsorId())) { - debug_report_bug(__FUNCTION__, __LINE__, 'Sponsor id is zero.'); + reportBug(__FUNCTION__, __LINE__, 'Sponsor id is zero.'); } // END - if // Return the value @@ -842,7 +845,7 @@ function destroySponsorSession () { (setSession('sponsor_id', '')) && (setSession('sponsor_pass', '')) && ( - ((isExtensionActive('theme')) && (setTheme(''))) || + ((isExtensionActive('theme')) && (setMailerTheme(''))) || (!isExtensionActive('theme')) ) ); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 1636cbc8fb..b61ab64914 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,79 +43,79 @@ if (!defined('__SECURITY')) { //------------------------------------------------------------------------------ // Admin functions //------------------------------------------------------------------------------ -// + // Admin has added an URL with given user id and so on -function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) { +function doSurfbarAdminAddUrl ($url, $limit, $reload) { // Do some pre-checks if (!isAdmin()) { // Not an admin - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Not admin.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Not admin.", $url, $limit, $reload)); return false; } elseif (!isUrlValid($url)) { // URL invalid - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid URL.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid URL.", $url, $limit, $reload)); return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, 0)) { + } elseif (ifSurfbarHasUrlUserId($url, 0)) { // URL already found in surfbar! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Already added.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Already added.", $url, $limit, $reload)); return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { + } elseif (!ifSurfbarMemberAllowedMoreUrls()) { // No more allowed! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: No more URLs allowed.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: No more URLs allowed.", $url, $limit, $reload)); return false; } elseif ('' . ($limit + 0) . '' != '' . $limit . '') { // Invalid limit entered - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid limit entered.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid limit entered.", $url, $limit, $reload)); return false; } elseif ('' . ($reload + 0) . '' != '' . $reload . '') { // Invalid amount entered - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid reload entered.", $url, $limit, $reload)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid reload entered.", $url, $limit, $reload)); return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, 0, 'ACTIVE', 'unlock', array('limit' => $limit, 'reload' => $reload)); + return doSurfbarRegisterUrl($url, 0, 'ACTIVE', 'unlock', array('limit' => $limit, 'reload' => $reload)); } // Admin unlocked an email so we can migrate the URL -function SURFBAR_ADMIN_MIGRATE_URL ($url, $userid) { +function doSurfbarAdminMigrateUrl ($url, $userid) { // Do some pre-checks if (!isAdmin()) { // Not an admin - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Not admin, url=' . $url . ',userid=' . $userid); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Not admin, url=' . $url . ',userid=' . $userid); return false; } elseif (!isUrlValid($url)) { // URL invalid - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Invalid URL, url=' . $url . ',userid=' . $userid); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Invalid URL, url=' . $url . ',userid=' . $userid); return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, $userid)) { + } elseif (ifSurfbarHasUrlUserId($url, $userid)) { // URL already found in surfbar! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Already added, url=' . $url . ',userid=' . $userid); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Already added, url=' . $url . ',userid=' . $userid); return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($userid)) { + } elseif (!ifSurfbarMemberAllowedMoreUrls($userid)) { // No more allowed! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Maximum exceeded, url=' . $url . ',userid=' . $userid); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Maximum exceeded, url=' . $url . ',userid=' . $userid); return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, $userid, 'MIGRATED', 'migrate'); + return doSurfbarRegisterUrl($url, $userid, 'MIGRATED', 'migrate'); } // Admin function for unlocking URLs -function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { +function doSurfbarAdminUnlockUrlIds ($IDs) { // Is this an admin or invalid array? if (!isAdmin()) { // Not admin or invalid ids array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); return false; } elseif (!is_array($IDs)) { // No array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); return false; } elseif (count($IDs) == 0) { // Empty array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); return false; } @@ -125,7 +125,7 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { // Update the status for all ids foreach ($IDs as $id => $dummy) { // Test all ids through (ignores failed) - $done = (($done) && (SURFBAR_CHANGE_STATUS($id, 'PENDING', 'ACTIVE'))); + $done = (($done) && (changeSurfbarUrlStatus($id, 'PENDING', 'ACTIVE'))); } // END - if // Return total status @@ -133,19 +133,19 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { } // Admin function for rejecting URLs -function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { +function doSurfbarAdminRejectUrlIds ($IDs) { // Is this an admin or invalid array? if (!isAdmin()) { // Not admin or invalid ids array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); return false; } elseif (!is_array($IDs)) { // No array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); return false; } elseif (count($IDs) == 0) { // Empty array - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); return false; } @@ -155,60 +155,56 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { // 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'))); + $done = (($done) && (changeSurfbarUrlStatus($id, 'PENDING', 'REJECTED'))); } // END - if // Return total status return $done; } -// //------------------------------------------------------------------------------ // Member functions //------------------------------------------------------------------------------ -// + // Member has added an URL -function SURFBAR_MEMBER_ADD_URL ($url, $limit) { +function doSurfbarMemberAddUrl ($url, $limit) { // Do some pre-checks if (!isMember()) { // Not a member - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not member'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: isMember()=false'); return false; } elseif ((!isUrlValid($url)) && (!isAdmin())) { // URL invalid - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid, url=' . $url . ',limit=' . $limit); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid, url=' . $url . ',limit=' . $limit); return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, getMemberId())) { + } elseif (ifSurfbarHasUrlUserId($url, getMemberId())) { // URL already found in surfbar! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Already found, url=' . $url . ',limit=' . $limit); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Already found, url=' . $url . ',limit=' . $limit); return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS(getMemberId())) { + } elseif (!ifSurfbarMemberAllowedMoreUrls(getMemberId())) { // No more allowed! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Maximum exceeded, url=' . $url . ',limit=' . $limit); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Maximum exceeded, url=' . $url . ',limit=' . $limit); return false; } elseif (''.($limit + 0).'' != ''.$limit.'') { // Invalid amount entered - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid limit, url=' . $url . ',limit=' . $limit); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid limit, url=' . $url . ',limit=' . $limit); return false; } // Register the new URL - return SURFBAR_REGISTER_URL($url, getMemberId(), 'PENDING', 'reg', array('limit' => $limit)); + return doSurfbarRegisterUrl($url, getMemberId(), 'PENDING', 'reg', array('limit' => $limit)); } // Create list of actions depending on status for the user -function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { +function generateSurfbarMemberActions ($urlId, $status) { // Load all actions in an array for given status - $actionArray = SURFBAR_GET_ARRAY_FROM_STATUS($status); - - // Init HTML code - $OUT = ' -'; + $actionArray = getSurfbarArrayFromStatus($status); // Calculate width $width = round(100 / count($actionArray)); // "Walk" through all actions and create forms + $OUT = ''; foreach ($actionArray as $actionId => $action) { // Add form for this action $OUT .= loadTemplate('member_list_surfbar_form', true, array( @@ -218,35 +214,34 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) { )); } // END - foreach - // Close table - $OUT .= ' -
    '; + // Load main template + $output = loadTemplate('member_list_surfbar_table', true, $OUT); // Return code - return $OUT; + return $output; } // Do the member form request -function SURFBAR_MEMBER_DO_FORM ($formData, $urlArray) { +function doSurfbarMemberByFormData ($formData, $urlArray) { // By default no action is performed $performed = false; // Is this a member? if (!isMember()) { // No member! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not member'); + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: isMember()=false'); return false; - } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) { + } elseif ((!isset($formData['url_id'])) || (!isset($formData['action']))) { // Important form elements are missing! /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid form data, required field id/action not found'); return false; - } elseif (!isset($urlArray[$formData['id']])) { + } elseif (!isset($urlArray[$formData['url_id']])) { // Id not found in cache - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Field id not found in cache'); + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Field url_id not found in cache'); return false; - } elseif (!SURFBAR_VALIDATE_MEMBER_ACTION_STATUS($formData['action'], $urlArray[$formData['id']]['url_status'])) { + } elseif (!isSurfbarMemberActionStatusValid($formData['action'], $urlArray[$formData['url_id']]['url_status'])) { // Action not allowed for current URL status - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Action not allowed to perform. action=' . $formData['action'] . ',url_status=' . $urlArray[$formData['id']]['url_status'] . 'id=' . $formData['id']); + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Action not allowed to perform. action=' . $formData['action'] . ',url_status=' . $urlArray[$formData['url_id']]['url_status'] . ',url_id=' . $formData['url_id']); return false; } @@ -260,38 +255,72 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $urlArray) { } // END - if // Create the function name for selected action - $functionName = sprintf("SURFBAR_MEMBER_%s_ACTION", strtoupper($action)); + $functionName = sprintf("doSurfbarMember%sAction", firstCharUpperCase($action)); // Is the function there? if (function_exists($functionName)) { // Add new status - $urlArray[$formData['id']]['new_status'] = SURFBAR_GET_NEW_STATUS('new_status'); + $urlArray[$formData['url_id']]['new_status'] = gerSurfbarNewStatus('new_status'); // Extract URL data for call-back - $urlData = array(merge_array($urlArray[$formData['id']], array($action => $formData))); + $urlData = array(merge_array($urlArray[$formData['url_id']], array($action => $formData))); // Action found so execute it $performed = call_user_func_array($functionName, $urlData); } else { // Log invalid request - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid member action! action=' . $formData['action'] . ',id=' . $formData['id'] . ',function=' . $functionName); + reportBug(__FUNCTION__, __LINE__, 'Invalid member action! action=' . $formData['action'] . ',url_id=' . $formData['url_id'] . ',function=' . $functionName); } // Return status return $performed; } +// Getter for surfbar_actions table by given id number +function getSurfbarActionsDataById ($columnName, $id) { + // Is cache set? + if (!isset($GLOBALS[__FUNCTION__][$id][$columnName])) { + // Default is not found + $GLOBALS[__FUNCTION__][$id][$columnName] = '*INVALID*'; + + // Search for it + $result = SQL_QUERY_ESC("SELECT `%s` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_id`=%s LIMIT 1", + array( + $columnName, + bigintval($id) + ), __FUNCTION__, __LINE__); + + // Is there an entry? + if (SQL_NUMROWS($result) == 1) { + // Load it + list($GLOBALS[__FUNCTION__][$id][$columnName]) = SQL_FETCHROW($result); + } // END - if + + // Free result + SQL_FREERESULT($result); + } // END - if + + // Return value + return $GLOBALS[__FUNCTION__][$id][$columnName]; +} + // Validate if the requested action can be performed on current URL status -function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) { +function isSurfbarMemberActionStatusValid ($action, $status) { // Search for the requested action/status combination in database $result = SQL_QUERY_ESC("SELECT `actions_new_status` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_action`='%s' AND `actions_status`='%s' LIMIT 1", - array($action, $status), __FUNCTION__, __LINE__); + array( + strtoupper($action), + strtoupper($status) + ), __FUNCTION__, __LINE__); // Is the entry there? $isValid = (SQL_NUMROWS($result) == 1); + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'action=' . $action . ',status=' . $status . ',isValid=' . intval($isValid)); + // Fetch the new status if found - if ($isValid) { + if ($isValid === true) { // Load new status list($GLOBALS['surfbar_cache']['new_status']) = SQL_FETCHROW($result); } // END - if @@ -303,82 +332,81 @@ function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) { return $isValid; } -// //------------------------------------------------------------------------------ // Member actions //------------------------------------------------------------------------------ -// + // Retreat a booked URL -function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) { +function doSurfbarMemberRetreatAction ($urlData) { // Create the data array for next function call $data = array( - $urlData['id'] => $urlData + $urlData['url_id'] => $urlData ); // Simply change the status here - return SURFBAR_CHANGE_STATUS ($urlData['id'], $urlData['url_status'], $urlData['new_status'], $data); + return changeSurfbarUrlStatus ($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], $data); } // Book an URL now (from migration) -function SURFBAR_MEMBER_BOOKNOW_ACTION ($urlData) { +function doSurfbarMemberBooknowAction ($urlData) { // Create the data array for next function call $data = array( - $urlData['id'] => $urlData + $urlData['url_id'] => $urlData ); // Simply change the status here - return SURFBAR_CHANGE_STATUS ($urlData['id'], $urlData['url_status'], $urlData['new_status'], $data); + return changeSurfbarUrlStatus ($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], $data); } // Show edit form or do the changes -function SURFBAR_MEMBER_EDIT_ACTION ($urlData) { +function doSurfbarMemberEditAction ($urlData) { // Is the "execute" flag there? if (isset($urlData['edit']['execute'])) { // Execute the changes - return SURFBAR_MEMBER_EXECUTE_ACTION('edit', $urlData); + return executeSurfbarMemberAction('edit', $urlData); } // END - if // Display form - return SURFBAR_MEMBER_DISPLAY_ACTION_FORM('edit', $urlData); + return displaySurfbarMemberActionForm('edit', $urlData); } // Show delete form or do the changes -function SURFBAR_MEMBER_DELETE_ACTION ($urlData) { +function doSurfbarMemberDeleteAction ($urlData) { // Is the "execute" flag there? if (isset($urlData['delete']['execute'])) { // Execute the changes - return SURFBAR_MEMBER_EXECUTE_ACTION('delete', $urlData); + return executeSurfbarMemberAction('delete', $urlData); } // END - if // Display form - return SURFBAR_MEMBER_DISPLAY_ACTION_FORM('delete', $urlData); + return displaySurfbarMemberActionForm('delete', $urlData); } // Pause active banner -function SURFBAR_MEMBER_PAUSE_ACTION ($urlData) { - return SURFBAR_CHANGE_STATUS($urlData['id'], $urlData['url_status'], $urlData['new_status'], array($urlData['id'] => $urlData)); +function doSurfbarMemberPauseAction ($urlData) { + return changeSurfbarUrlStatus($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], array($urlData['url_id'] => $urlData)); } // Unpause stopped banner -function SURFBAR_MEMBER_UNPAUSE_ACTION ($urlData) { +function doSurfbarMemberUnpauseAction ($urlData) { // Fix missing entry for template $urlData['edit'] = $urlData['unpause']; $urlData['edit']['url'] = $urlData['url']; - $urlData['edit']['limit'] = SURFBAR_GET_VIEWS_MAX(); + $urlData['edit']['limit'] = gerSurfbarViewsMax(); // Return status change - return SURFBAR_CHANGE_STATUS($urlData['id'], $urlData['url_status'], $urlData['new_status'], array($urlData['id'] => $urlData)); + return changeSurfbarUrlStatus($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], array($urlData['url_id'] => $urlData)); } // Resubmit locked URL -function SURFBAR_MEMBER_RESUBMIT_ACTION ($urlData) { - return SURFBAR_CHANGE_STATUS($urlData['id'], $urlData['url_status'], $urlData['new_status'], array($urlData['id'] => $urlData)); +function doSurfbarMemberResubmitAction ($urlData) { + return changeSurfbarUrlStatus($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], array($urlData['url_id'] => $urlData)); } // Display selected "action form" -function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { +function displaySurfbarMemberActionForm ($action, $urlData) { // Translate some data if present - $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content); + $content = prepareSurfbarContentForTemplate($content); // Include fields only for action 'edit' if ($action == 'edit') { @@ -388,7 +416,7 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { $urlData['limited'] = 'false'; // Is this URL limited? - if (SURFBAR_GET_VIEWS_MAX() > 0) { + if (gerSurfbarViewsMax() > 0) { // Then rewrite form data $urlData['limited_yes'] = ' checked="checked"'; $urlData['limited_no'] = ''; @@ -404,7 +432,7 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { } // Execute choosen action -function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { +function executeSurfbarMemberAction ($action, $urlData) { // By default nothing is executed $executed = false; @@ -415,25 +443,26 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { } // END - if // Construct function name - $functionName = sprintf("SURFBAR_MEMBER_EXECUTE_%s_ACTION", strtoupper($action)); + $functionName = sprintf("executeSurfbarMember%sAction", firstCharUpperCase($action)); // Is that function there? if (function_exists($functionName)) { // Execute the function if (call_user_func_array($functionName, array($urlData)) == true) { // Update status as well - $executed = SURFBAR_CHANGE_STATUS($urlData['id'], $urlData['url_status'], $urlData['new_status'], array($urlData['id'] => $urlData)); + $executed = changeSurfbarUrlStatus($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], array($urlData['url_id'] => $urlData)); } // END - if } else { // Not found - debug_report_bug(__FUNCTION__, __LINE__, 'Callback function ' . $functionName . ' not found.'); + reportBug(__FUNCTION__, __LINE__, 'Callback function ' . $functionName . ' does not exist.'); } // Return status return $executed; } + // "Execute edit" function: Update changed data -function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) { +function executeSurfbarMemberEditAction ($urlData) { // Default is nothing done $status = false; @@ -455,7 +484,7 @@ LIMIT 1", $urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], - $urlData['id'], + $urlData['url_id'], $urlData['url_status'] ), __FUNCTION__, __LINE__); @@ -466,29 +495,30 @@ LIMIT 1", // Return status return $status; } + // "Execute delete" function: Does nothing... -function SURFBAR_MEMBER_EXECUTE_DELETE_ACTION ($urlData) { +function executeSurfbarMemberDeleteAction ($urlData) { // Nothing special to do (see above function for such "special actions" to perform) return true; } -// + //------------------------------------------------------------------------------ // Self-maintenance functions //------------------------------------------------------------------------------ -// + // Main function -function SURFBAR_HANDLE_SELF_MAINTENANCE () { +function doSurfbarSelfMaintenance () { // Handle URLs which limit has depleted so we can stop them - SURFBAR_HANDLE_DEPLETED_VIEWS(); + doHandleSurfbarDepletedViews(); // Handle low-points amounts - SURFBAR_HANDLE_LOW_POINTS(); + doHandleSurfbarLowPoints(); } // Handle URLs which limit has depleted -function SURFBAR_HANDLE_DEPLETED_VIEWS () { +function doHandleSurfbarDepletedViews () { // Get all URLs - $urlArray = SURFBAR_GET_URL_DATA(0, 'url_views_max', 'url_id', 'ASC', 'url_id', " AND `url_views_allowed` > 0 AND `url_status`='ACTIVE'"); + $urlArray = getSurfbarUrlData(0, 'url_views_max', 'url_id', 'ASC', 'url_id', " AND `url_views_allowed` > 0 AND `url_status`='ACTIVE'"); // Do we have some entries? if (count($urlArray) > 0) { @@ -503,15 +533,15 @@ function SURFBAR_HANDLE_DEPLETED_VIEWS () { ); // Handle the status - SURFBAR_CHANGE_STATUS($id, 'ACTIVE', 'DEPLETED', $urlData); + changeSurfbarUrlStatus($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 () { +function doHandleSurfbarLowPoints () { // Get all userids - $userids = SURFBAR_DETERMINE_DEPLETED_USERIDS(getConfig('surfbar_warn_low_points')); + $userids = determineSurfbarDepletedUserids(getConfig('surfbar_warn_low_points')); // "Walk" through all URLs foreach ($userids['url_userid'] as $userid => $dummy) { @@ -525,7 +555,7 @@ function SURFBAR_HANDLE_LOW_POINTS () { ); // Notify this user - SURFBAR_NOTIFY_USER('low_points', $content); + doSurfbarNotifyMember('low_points', $content); // Update last notified SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `surfbar_low_notified`=NOW() WHERE `userid`=%s LIMIT 1", @@ -541,16 +571,16 @@ function SURFBAR_HANDLE_LOW_POINTS () { // // Looks up by an URL -function SURFBAR_LOOKUP_BY_URL ($url, $userid) { +function ifSurfbarHasUrlUserId ($url, $userid) { // Now lookup that given URL by itself - $urlArray = SURFBAR_GET_URL_DATA($url, 'url', 'url_id', 'ASC', 'url_id', sprintf(" AND `url_userid`=%s", bigintval($userid))); + $urlArray = getSurfbarUrlData($url, 'url', 'url_id', 'ASC', 'url_id', sprintf(" AND `url_userid`=%s", bigintval($userid))); // Was it found? return (count($urlArray) > 0); } // Load URL data by given search term and column -function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'url_id', $order = 'url_id', $sort = 'ASC', $group = 'url_id', $add = '') { +function getSurfbarUrlData ($searchTerm, $column = 'url_id', $order = 'url_id', $sort = 'ASC', $group = 'url_id', $add = '') { // By default nothing is found $GLOBALS['last_url_data'] = array(); @@ -560,9 +590,9 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'url_id', $order = 'url_id $searchTerm = bigintval($searchTerm); } // END - if - // If the column is 'id' there can be only one entry + // If the column is 'url_id' there can be only one entry $limit = ''; - if ($column == 'id') { + if ($column == 'url_id') { $limit = "LIMIT 1"; } // END - if @@ -618,8 +648,8 @@ ORDER BY return $GLOBALS['last_url_data']; } -// Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first! -function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) { +// Registers an URL with the surfbar. You should have called ifSurfbarHasUrlUserId() first! +function doSurfbarRegisterUrl ($url, $userid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) { // Make sure by the user registered URLs are always pending if ($addMode == 'reg') { $status = 'PENDING'; @@ -641,7 +671,7 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r } // END - if // Insert the URL into database - $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content); + $content['insert_id'] = insertSurfbarUrlByArray($content); // Is this id valid? if ($content['insert_id'] == '0') { @@ -652,18 +682,18 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r // If in reg-mode we notify admin if (($addMode == 'reg') || (getConfig('surfbar_notify_admin_unlock') == 'Y')) { // Notify admin even when he as unlocked an email - SURFBAR_NOTIFY_ADMIN('url_' . $addMode, $content); + doSurfbarNotifyAdmin('url_' . $addMode, $content); } // END - if // Send mail to user - SURFBAR_NOTIFY_USER('url_' . $addMode, $content); + doSurfbarNotifyMember('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) { +function insertSurfbarUrlByArray ($urlData) { // Get userid $userid = bigintval($urlData['url_userid']); @@ -689,7 +719,7 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { } // Notify admin(s) with a selected message and content -function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { +function doSurfbarNotifyAdmin ($messageType, $content) { // Prepare template name $templateName = sprintf("admin_surfbar_%s", $messageType); @@ -705,14 +735,14 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { } // END - if // Translate some data if present - $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content); + $content = prepareSurfbarContentForTemplate($content); // Send the notification out return sendAdminNotification($subject, $templateName, $content, $content['url_userid']); } // Notify the user about the performed action -function SURFBAR_NOTIFY_USER ($messageType, $content) { +function doSurfbarNotifyMember ($messageType, $content) { // Skip notification if userid is zero if ($content['url_userid'] == '0') { return false; @@ -733,7 +763,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { } // END - if // Translate some data if present - $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content); + $content = prepareSurfbarContentForTemplate($content); // Load template $mailText = loadEmailTemplate($templateName, $content, $content['url_userid']); @@ -744,7 +774,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { // Translates some data for template usage // @TODO Can't we use our new expression language instead of this ugly code? -function SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE ($content) { +function prepareSurfbarContentForTemplate ($content) { // Prepare some code if (isset($content['url_registered'])) $content['url_registered'] = generateDateTime($content['url_registered'], 2); if (isset($content['url_last_locked'])) $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2); @@ -823,7 +853,7 @@ function translateMemberSurfbarActionToSubmit ($action) { } // Determine reward -function SURFBAR_DETERMINE_REWARD ($onlyMin = false) { +function determineSurfbarReward ($onlyMin = false) { // Static values are default $reward = getConfig('surfbar_static_reward'); @@ -831,9 +861,9 @@ function SURFBAR_DETERMINE_REWARD ($onlyMin = false) { if (getSurfbarPaymentModel() == 'DYNAMIC') { // "Calculate" dynamic reward if ($onlyMin === true) { - $reward += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); + $reward += calculateSurfbarDynamicMininumValue(); } else { - $reward += SURFBAR_CALCULATE_DYNAMIC_ADD(); + $reward += calculateSurfbarDynamicAddValue(); } } // END - if @@ -842,7 +872,7 @@ function SURFBAR_DETERMINE_REWARD ($onlyMin = false) { } // Determine costs -function SURFBAR_DETERMINE_COSTS ($onlyMin=false) { +function determineSurfbarCosts ($onlyMin=false) { // Static costs is default $costs = getConfig('surfbar_static_costs'); @@ -850,9 +880,9 @@ function SURFBAR_DETERMINE_COSTS ($onlyMin=false) { if (getSurfbarPaymentModel() == 'DYNAMIC') { // "Calculate" dynamic costs if ($onlyMin) { - $costs += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); + $costs += calculateSurfbarDynamicMininumValue(); } else { - $costs += SURFBAR_CALCULATE_DYNAMIC_ADD(); + $costs += calculateSurfbarDynamicAddValue(); } } // END - if @@ -861,22 +891,22 @@ function SURFBAR_DETERMINE_COSTS ($onlyMin=false) { } // "Calculate" dynamic add -function SURFBAR_CALCULATE_DYNAMIC_ADD () { +function calculateSurfbarDynamicAddValue () { // Get min/max values - $min = SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); - $max = SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE(); + $min = calculateSurfbarDynamicMininumValue(); + $max = calculateSurfbarDynamicMaximumValue(); // "Calculate" dynamic part and return it return mt_rand($min, $max); } // Determine right template name -function SURFBAR_DETERMINE_TEMPLATE_NAME() { +function determineSurfbarTemplateName() { // Default is the frameset $templateName = 'surfbar_frameset'; // Any frame set? ;-) - if (isGetRequestElementSet('frame')) { + if (!isFullPage()) { // Use the frame as a template name part... ;-) $templateName = sprintf("surfbar_frame_%s", getRequestElement('frame') @@ -887,10 +917,12 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() { 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 () { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Fixed surf lock is ' . getConfig('surfbar_static_lock') . ' - ENTERED!'); +/** + * Check if the "reload lock" of the current user is full, call this function + * before you call ifSurfbarReloadLock(). + */ +function isSurfbarReloadFull () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Fixed surf lock is ' . getConfig('surfbar_static_lock') . ' - ENTERED!'); // Default is full! $isFull = true; @@ -898,12 +930,12 @@ function SURFBAR_CHECK_RELOAD_FULL () { $GLOBALS['surfbar_cache']['surf_lock'] = getConfig('surfbar_static_lock'); // Do we have dynamic model? - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'surf_lock=' . $GLOBALS['surfbar_cache']['surf_lock'] . ' - BEFORE'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'surf_lock=' . $GLOBALS['surfbar_cache']['surf_lock'] . ' - BEFORE'); if (getSurfbarPaymentModel() == 'DYNAMIC') { // "Calculate" dynamic lock - $GLOBALS['surfbar_cache']['surf_lock'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); + $GLOBALS['surfbar_cache']['surf_lock'] += calculateSurfbarDynamicAddValue(); } // END - if - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'surf_lock=' . $GLOBALS['surfbar_cache']['surf_lock'] . ' - AFTER'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'surf_lock=' . $GLOBALS['surfbar_cache']['surf_lock'] . ' - AFTER'); // Ask the database $result = SQL_QUERY_ESC("SELECT @@ -916,7 +948,7 @@ ON u.`url_id`=l.`locks_url_id` WHERE l.`locks_userid`=%s AND - (UNIX_TIMESTAMP() - {%%pipe,SURFBAR_GET_SURF_LOCK%%}) < UNIX_TIMESTAMP(l.`locks_last_surfed`) AND + (UNIX_TIMESTAMP() - {%%pipe,gerSurfbarSurfLock%%}) < UNIX_TIMESTAMP(l.`locks_last_surfed`) AND ( ((UNIX_TIMESTAMP(l.`locks_last_surfed`) - u.`url_fixed_reload`) < 0 AND u.`url_fixed_reload` > 0) OR u.`url_fixed_reload` = 0 @@ -938,20 +970,20 @@ LIMIT 1", SQL_FREERESULT($result); // Get total URLs - $total = SURFBAR_GET_TOTAL_URLS(); + $total = getSurfbarTotalUrls(); // Do we have some URLs in lock? Admins can always surf on own URLs! - $isFull = ((SURFBAR_GET_USER_LOCKS() == $total) && ($total > 0)); + $isFull = ((getSurfbarUserLocks() == $total) && ($total > 0)); // Return result - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userLocks=' . SURFBAR_GET_USER_LOCKS() . ',total=' . $total . 'isFull=' . intval($isFull) . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userLocks=' . getSurfbarUserLocks() . ',total=' . $total . 'isFull=' . intval($isFull) . ' - EXIT!'); 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 = NULL) { +function getSurfbarTotalUrls ($status = 'ACTIVE', $excludeUserId = NULL) { // Determine depleted user account - $userids = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + $userids = determineSurfbarDepletedUserids(); // If we dont get any user ids back, there are no URLs if (count($userids['url_userid']) == 0) { @@ -971,7 +1003,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = NULL) { FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE - `url_userid` NOT IN (".implode(', ', $userids['url_userid']).") AND + (`url_userid` NOT IN (".implode(', ', $userids['url_userid']).") OR `url_userid` IS NULL) AND `url_status`='%s' LIMIT 1", array($status), __FUNCTION__, __LINE__ @@ -984,20 +1016,20 @@ LIMIT 1", SQL_FREERESULT($result); // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $count); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $count . ' - EXIT!'); // Return result return $count; } -// Check wether the user is allowed to book more URLs -function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = NULL) { +// Check whether the user is allowed to book more URLs +function ifSurfbarMemberAllowedMoreUrls ($userid = NULL) { // Is this admin and userid is zero or does the user has some URLs left to book? - return (((is_null($userid)) && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array('REJECTED')) < getSurfbarMaxOrder())); + return (((is_null($userid)) && (isAdmin())) || (getSurfbarTotalUserUrls($userid, '', array('REJECTED')) < getSurfbarMaxOrder())); } // Get total amount of URLs of given status for current user -function SURFBAR_GET_TOTAL_USER_URLS ($userid = NULL, $status = '', $exclude = '') { +function getSurfbarTotalUserUrls ($userid = NULL, $status = '', $exclude = '') { // Is the user 0 and user is logged in? if ((is_null($userid)) && (isMember())) { // Then use this userid @@ -1013,16 +1045,16 @@ function SURFBAR_GET_TOTAL_USER_URLS ($userid = NULL, $status = '', $exclude = ' // Is the status set? if (is_array($status)) { // Only URLs with these status - $add = sprintf(" WHERE `url_status` IN('%s')", implode("','", $status)); + $add = sprintf(" AND `url_status` IN('%s')", implode("','", $status)); } elseif (!empty($status)) { // Only URLs with this status - $add = sprintf(" WHERE `url_status`='%s'", $status); + $add = sprintf(" AND `url_status`='%s'", $status); } elseif (is_array($exclude)) { // Exclude URLs with these status - $add = sprintf(" WHERE `url_status` NOT IN('%s')", implode("','", $exclude)); + $add = sprintf(" AND `url_status` NOT IN('%s')", implode("','", $exclude)); } elseif (!empty($exclude)) { // Exclude URLs with this status - $add = sprintf(" WHERE `url_status` != '%s'", $exclude); + $add = sprintf(" AND `url_status` != '%s'", $exclude); } // Get amount from database @@ -1033,47 +1065,47 @@ function SURFBAR_GET_TOTAL_USER_URLS ($userid = NULL, $status = '', $exclude = ' } // Generate a validation code for the given id number -function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',salt=' . $salt . ' - ENTERED!'); +function generateSurfbarValidationCode ($urlId, $salt = '') { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',salt=' . $salt . ' - ENTERED!'); // Init hash with invalid value if (empty($salt)) { // Generate random hashed string $GLOBALS['surfbar_cache']['salt'] = sha1(generatePassword(mt_rand(200, 255))); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newSalt='.SURFBAR_GET_SALT().'', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newSalt='.gerSurfbarSalt().'', false); } else { // Use this as salt! $GLOBALS['surfbar_cache']['salt'] = $salt; - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'oldSalt='.SURFBAR_GET_SALT().'', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'oldSalt='.gerSurfbarSalt().'', false); } // Hash it with md5() and salt it with the random string - $hashedCode = generateHash(md5($urlId . getEncryptSeparator() . getMemberId()), SURFBAR_GET_SALT()); + $hashedCode = generateHash(md5($urlId . getEncryptSeparator() . getMemberId()), gerSurfbarSalt()); // Finally encrypt it PGP-like and return it $valHashedCode = encodeHashForCookie($hashedCode); // Return hashed value - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',salt=' . $salt . ',urlId=' . $urlId . ',salt=' . $salt . ',valHashedCode=' . $valHashedCode . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',salt=' . $salt . ',urlId=' . $urlId . ',salt=' . $salt . ',valHashedCode=' . $valHashedCode . ' - EXIT!'); return $valHashedCode; } // Check validation code -function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',check=' . $check . ',salt=' . $salt . ' - ENTERED!'); +function isSurfbarValidationCodeValid ($urlId, $check, $salt) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',check=' . $check . ',salt=' . $salt . ' - ENTERED!'); // Secure id number $urlId = bigintval($urlId); // Now generate the code again - $code = SURFBAR_GENERATE_VALIDATION_CODE($urlId, $salt); + $code = generateSurfbarValidationCode($urlId, $salt); // Return result of checking hashes and salts - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',(code==check)=' . intval($code == $check) . ',(salt==salts_last_salt)=' . intval($salt == SURFBAR_GET_DATA('salts_last_salt')) . ' - EXIT!'); - return (($code == $check) && ($salt == SURFBAR_GET_DATA('salts_last_salt'))); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',(code==check)=' . intval($code == $check) . ',(salt==salts_last_salt)=' . intval($salt == getSurfbarData('salts_last_salt')) . ' - EXIT!'); + return (($code == $check) && ($salt == getSurfbarData('salts_last_salt'))); } // Lockdown the userid/id combination (reload lock) -function SURFBAR_LOCKDOWN_ID ($urlId) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',getMemberId()=' . getMemberId() . ' - ENTERED!'); +function addSurfbarReloadLockById ($urlId) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',getMemberId()=' . getMemberId() . ' - ENTERED!'); // Search for an entry $countLock = countSumTotalData(getMemberId(), 'surfbar_locks', 'locks_id', 'locks_userid', true, ' AND `locks_url_id`=' . bigintval($urlId)); @@ -1094,34 +1126,34 @@ function SURFBAR_LOCKDOWN_ID ($urlId) { getMemberId() ), __FUNCTION__, __LINE__); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',getMemberId()=' . getMemberId() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',getMemberId()=' . getMemberId() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - EXIT!'); } // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf" -function SURFBAR_PAY_POINTS () { +function doSurfbarPayPoints () { // Remove it from the URL owner - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.SURFBAR_GET_USERID().',costs='.SURFBAR_GET_COSTS() . ' - ENTERED!'); - if (isValidUserId(SURFBAR_GET_USERID())) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.gerSurfbarUserid().',costs='.gerSurfbarCosts() . ' - ENTERED!'); + if (isValidUserId(gerSurfbarUserid())) { // Subtract points and ignore return status - subtractPoints(sprintf("surfbar_%s", getSurfbarPaymentModel()), SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); + subtractPoints(sprintf("surfbar_%s", getSurfbarPaymentModel()), gerSurfbarUserid(), gerSurfbarCosts()); } // END - if - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getMemberId().',reward='.SURFBAR_GET_REWARD()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getMemberId().',reward='.gerSurfbarReward()); // Init referral system here initReferralSystem(); // Book it to the user and ignore return status - addPointsThroughReferralSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), SURFBAR_GET_REWARD()); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.SURFBAR_GET_USERID().',costs='.SURFBAR_GET_COSTS() . ' - EXIT!'); + addPointsThroughReferralSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), gerSurfbarReward()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.gerSurfbarUserid().',costs='.gerSurfbarCosts() . ' - EXIT!'); } // Updates the statistics of current URL/userid -function SURFBAR_UPDATE_INSERT_STATS_RECORD () { +function updateInsertSurfbarStatisticsRecord () { // Init add $add = ''; // Get allowed views - $allowed = SURFBAR_GET_VIEWS_ALLOWED(); + $allowed = gerSurfbarViewsAllowed(); // Do we have a limit? if ($allowed > 0) { @@ -1131,13 +1163,13 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () { // Update URL stats SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url_views_total`=`url_views_total`+1' . $add . ' WHERE `url_id`=%s LIMIT 1', - array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__); + array(gerSurfbarId()), __FUNCTION__, __LINE__); // Update the stats entry SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_surfbar_stats` SET `stats_count`=`stats_count`+1 WHERE `stats_userid`=%s AND `stats_url_id`=%s LIMIT 1', array( getMemberId(), - SURFBAR_GET_ID() + gerSurfbarId() ), __FUNCTION__, __LINE__); // Was that update okay? @@ -1146,7 +1178,7 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () { SQL_QUERY_ESC('INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_stats` (`stats_userid`,`stats_url_id`,`stats_count`) VALUES (%s,%s,1)', array( getMemberId(), - SURFBAR_GET_ID() + gerSurfbarId() ), __FUNCTION__, __LINE__); } // END - if @@ -1161,51 +1193,51 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () { } // Update the salt for validation and statistics -function SURFBAR_UPDATE_SALT_STATS () { +function updateSurfbarSaltStatistics () { // Update salt - SURFBAR_GENERATE_VALIDATION_CODE(SURFBAR_GET_ID()); + generateSurfbarValidationCode(gerSurfbarId()); // Make sure only valid salts can pass - if (SURFBAR_GET_SALT() == 'INVALID') { + if (gerSurfbarSalt() == 'INVALID') { // Invalid provided - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid salt provided, id=' . SURFBAR_GET_ID() . ',getMemberId()=' . getMemberId()); + reportBug(__FUNCTION__, __LINE__, 'Invalid salt provided, id=' . gerSurfbarId() . ',getMemberId()=' . getMemberId()); } // END - if // Update statistics record - SURFBAR_UPDATE_INSERT_STATS_RECORD(); + updateInsertSurfbarStatisticsRecord(); // Simply store the salt from cache away in database... SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_salts` SET `salts_last_salt`='%s' WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1", array( - SURFBAR_GET_SALT(), - SURFBAR_GET_ID(), + gerSurfbarSalt(), + gerSurfbarId(), getMemberId() ), __FUNCTION__, __LINE__); // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'salt=' . SURFBAR_GET_SALT() . ',id=' . SURFBAR_GET_ID() . ',userid=' . getMemberId() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - UPDATE!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'salt=' . gerSurfbarSalt() . ',id=' . gerSurfbarId() . ',userid=' . getMemberId() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - UPDATE!'); // Was that okay? if (SQL_HASZEROAFFECTED()) { // Insert missing entry! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_salts` (`salts_url_id`,`salts_userid`,`salts_last_salt`) VALUES (%s, %s, '%s')", array( - SURFBAR_GET_ID(), + gerSurfbarId(), getMemberId(), - SURFBAR_GET_SALT() + gerSurfbarSalt() ), __FUNCTION__, __LINE__); } // END - if // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'affectedRows=' . SQL_AFFECTEDROWS() . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'affectedRows=' . SQL_AFFECTEDROWS() . ' - EXIT!'); // Return if the update was okay return (!SQL_HASZEROAFFECTED()); } // Check if the reload lock is active for given id -function SURFBAR_CHECK_RELOAD_LOCK ($urlId) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $urlId . ' - ENTERED!'); +function ifSurfbarReloadLock ($urlId) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $urlId . ' - ENTERED!'); // Ask the database $result = SQL_QUERY_ESC("SELECT COUNT(`locks_id`) AS cnt FROM @@ -1213,7 +1245,7 @@ FROM WHERE `locks_userid`=%s AND `locks_url_id`=%s AND - (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(`locks_last_surfed`) + (UNIX_TIMESTAMP() - ".gerSurfbarSurfLock().") < UNIX_TIMESTAMP(`locks_last_surfed`) ORDER BY `locks_last_surfed` ASC LIMIT 1", @@ -1227,12 +1259,12 @@ LIMIT 1", SQL_FREERESULT($result); // Return check - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',count=' . $count . ',SURFBAR_GET_SURF_LOCK()=' . SURFBAR_GET_SURF_LOCK() . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',count=' . $count . ',gerSurfbarSurfLock()=' . gerSurfbarSurfLock() . ' - EXIT!'); return ($count == 1); } // Determine which user hash no more points left -function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) { +function determineSurfbarDepletedUserids ($limit=0) { // Init array $userids = array( 'url_userid' => array(), @@ -1257,7 +1289,8 @@ INNER JOIN ON u.`url_userid`=d.`userid` WHERE - u.`url_userid` NOT IN (%s,0) AND + u.`url_userid` NOT IN (%s) AND + u.`url_userid` IS NOT NULL AND u.`url_status`='ACTIVE' GROUP BY u.`url_userid` @@ -1287,12 +1320,12 @@ ORDER BY while ($content = SQL_FETCHARRAY($result)) { // Get total points $points = getTotalPoints($content['url_userid']); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ',points=' . $points); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ',points=' . $points); // Shall we add this to ignore? if ($points <= $limit) { // Ignore this one! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ' has depleted points amount!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ' has depleted points amount!'); $userids['url_userid'][$content['url_userid']] = $content['url_userid']; $userids['points'][$content['url_userid']] = $points; $userids['notified'][$content['url_userid']] = $content['notified']; @@ -1303,14 +1336,14 @@ ORDER BY SQL_FREERESULT($result); // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UIDs::count=' . count($userids) . ' (with own userid=' . getMemberId() . ')'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UIDs::count=' . count($userids) . ' (with own userid=' . getMemberId() . ')'); // Return result return $userids; } // Determine how many users are Online in surfbar -function SURFBAR_DETERMINE_TOTAL_ONLINE () { +function determineSurfbarTotalOnline () { // Count all users in surfbar modue and return the value $result = SQL_QUERY('SELECT `stats_id` @@ -1332,9 +1365,9 @@ GROUP BY } // Determine waiting time for one URL -function SURFBAR_DETERMINE_WAIT_TIME () { +function determineSurfbarWaitingTime () { // Get fixed reload lock - $fixed = SURFBAR_GET_FIXED_RELOAD(); + $fixed = getSurfbarFixedReload(); // Is the fixed reload time set? if ($fixed > 0) { @@ -1348,7 +1381,7 @@ function SURFBAR_DETERMINE_WAIT_TIME () { // Which payment model do we have? if (getSurfbarPaymentModel() == 'DYNAMIC') { // "Calculate" dynamic time - $time += SURFBAR_CALCULATE_DYNAMIC_ADD(); + $time += calculateSurfbarDynamicAddValue(); } // END - if // Return value @@ -1356,15 +1389,15 @@ function SURFBAR_DETERMINE_WAIT_TIME () { } // Changes the status of an URL from given to other -function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data = array()) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - ENTERED!'); +function changeSurfbarUrlStatus ($urlId, $prevStatus, $newStatus, $data = array()) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',data[]=' . gettype($data) . ',newStatus=' . $newStatus . ' - ENTERED!'); // Make new status always lower-case $newStatus = strtolower($newStatus); // Get URL data for status comparison if missing if ((!is_array($data)) || (count($data) == 0)) { // Fetch missing URL data - $data = SURFBAR_GET_URL_DATA($urlId); + $data = getSurfbarUrlData($urlId); } // END - if // Prepare array @@ -1373,7 +1406,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data = array() 'prev_status' => $prevStatus, 'new_status' => $newStatus, 'data' => $data, - 'abort' => null + 'abort' => NULL ); // Run pre filter chain @@ -1383,7 +1416,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data = array() if (!is_null($filterData['abort'])) { // Abort here return $filterData['abort']; - } + } // END - if // Update the status now // ---------- Comment out for debugging/developing member actions! --------- @@ -1405,16 +1438,16 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data = array() // Run post filter chain $filterData = runFilterChain('post_change_surfbar_url_status', $filterData); - // Extract data from it again - $data = $filterData['data']; + // Check if generic 'data' is there + assert(isset($filterData['data'])); // All done! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); return true; } // Calculate minimum value for dynamic payment model -function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { +function calculateSurfbarDynamicMininumValue () { // Addon is zero by default $addon = '0'; @@ -1425,16 +1458,16 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { $totalUsers = getTotalConfirmedUser(); // Get online users - $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); + $onlineUsers = determineSurfbarTotalOnline(); // Calculate addon $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers); // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', 0); + $totalUrls = getSurfbarTotalUrls('ACTIVE', 0); // Get user's total URLs - $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, 'ACTIVE'); + $userUrls = getSurfbarTotalUserUrls(0, 'ACTIVE'); // Calculate addon if ($totalUrls > 0) { @@ -1448,7 +1481,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { } // Calculate maximum value for dynamic payment model -function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { +function calculateSurfbarDynamicMaximumValue () { // Addon is zero by default $addon = '0'; @@ -1465,7 +1498,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { $addon += abs($max * $percent * $totalUsers); // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS('ACTIVE', 0); + $totalUrls = getSurfbarTotalUrls('ACTIVE', 0); // Calculate addon $addon += abs($max * $percent * $totalUrls); @@ -1475,12 +1508,12 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { } // Calculate dynamic lock -function SURFBAR_CALCULATE_DYNAMIC_LOCK () { +function calculateSurfbarDynamicLock () { // Default lock is 30 seconds $addon = 30; // Get online users - $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); + $onlineUsers = determineSurfbarTotalOnline(); // Calculate lock $addon = abs(log($onlineUsers / $addon + 1)); @@ -1490,7 +1523,7 @@ function SURFBAR_CALCULATE_DYNAMIC_LOCK () { } // "Getter" for lock ids array -function SURFBAR_GET_LOCK_IDS () { +function getSurfbarLockIdsArray () { // Prepare some arrays $IDs = array(); $USE = array(); @@ -1512,17 +1545,17 @@ ORDER BY // Load all entries while ($content = SQL_FETCHARRAY($result)) { // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'next - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',rest='.(time() - $content['last_surfed']).'/'.SURFBAR_GET_SURF_LOCK()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'next - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',rest='.(time() - $content['last_surfed']).'/'.gerSurfbarSurfLock()); // Skip entries that are too old - if (($content['last_surfed'] > (time() - SURFBAR_GET_SURF_LOCK())) && (!in_array($content['locks_url_id'], $ignored))) { + if (($content['last_surfed'] > (time() - gerSurfbarSurfLock())) && (!in_array($content['locks_url_id'], $ignored))) { // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'okay - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'okay - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); // Add only if missing or bigger if ((!isset($IDs[$content['locks_url_id']])) || ($IDs[$content['locks_url_id']] > $content['last_surfed'])) { // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ADD - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ADD - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); // Add this id $IDs[$content['locks_url_id']] = $content['last_surfed']; @@ -1530,10 +1563,10 @@ ORDER BY } // END - if } else { // Debug message - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ignore - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ignore - lid='.$content['locks_id'].',url='.$content['locks_url_id'].',last='.$content['last_surfed']); // Ignore these old entries! - $ignored[] = $content['locks_url_id']; + array_push($ignored, $content['locks_url_id']); unset($IDs[$content['locks_url_id']]); unset($USE[$content['locks_url_id']]); } @@ -1547,7 +1580,7 @@ ORDER BY } // "Getter" for maximum random number -function SURFBAR_GET_MAX_RANDOM ($userids, $add) { +function getSurfbarMaximumRandom ($userids, $add) { // Count max availabe entries $result = SQL_QUERY("SELECT sbu.url_id AS cnt @@ -1570,7 +1603,7 @@ GROUP BY sbu.url_id ASC", __FUNCTION__, __LINE__); // Log last query - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS()); // Fetch max rand $maxRand = SQL_NUMROWS($result); @@ -1583,20 +1616,20 @@ GROUP BY } // Load all URLs of the current user and return it as an array -function SURFBAR_GET_USER_URLS () { +function getSurfbarUserUrls () { // Init array $urlArray = array(); // Begin the query $result = SQL_QUERY_ESC("SELECT - u.url_id, - u.url_userid, - u.url, - u.url_status, - u.url_views_total, - u.url_views_max, - u.url_views_allowed, - UNIX_TIMESTAMP(u.url_registered) AS `url_registered`, + u.`url_id`, + u.`url_userid`, + u.`url`, + u.`url_status`, + u.`url_views_total`, + u.`url_views_max`, + u.`url_views_allowed`, + UNIX_TIMESTAMP(u.`url_registered`) AS `url_registered`, UNIX_TIMESTAMP(u.`url_last_locked`) AS `url_last_locked`, u.`url_lock_reason` FROM @@ -1605,8 +1638,8 @@ WHERE u.`url_userid`=%s AND u.`url_status` != 'DELETED' ORDER BY - u.url_id ASC", - array(getMemberId()), __FUNCTION__, __LINE__); + u.`url_id` ASC", + array(getMemberId()), __FUNCTION__, __LINE__); // Are there entries? if (!SQL_HASZERONUMS($result)) { @@ -1625,7 +1658,7 @@ ORDER BY } // "Getter" for member action array for given status -function SURFBAR_GET_ARRAY_FROM_STATUS ($status) { +function getSurfbarArrayFromStatus ($status) { // Init array $returnArray = array(); @@ -1638,7 +1671,7 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) { // Load all actions // @TODO This can be somehow rewritten while ($content = SQL_FETCHARRAY($result)) { - $returnArray[] = $content['actions_action']; + array_push($returnArray, $content['actions_action']); } // END - if } // END - if @@ -1650,9 +1683,9 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) { } // Reload to configured stop page -function SURFBAR_RELOAD_TO_STOP_PAGE ($page = 'stop') { +function redirectToSurfbarStopPage ($page = 'stop') { // Internal or external? - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'page=' . $page . ' - ENTERED!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'page=' . $page . ' - ENTERED!'); if ((getConfig('surfbar_pause_mode') == 'INTERNAL') || (getConfig('surfbar_pause_url') == '')) { // Reload to internal page redirectToUrl('surfbar.php?frame=' . $page); @@ -1662,10 +1695,12 @@ function SURFBAR_RELOAD_TO_STOP_PAGE ($page = 'stop') { } } -// 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 = NULL) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ' - ENTERED!'); +/** + * Determine next id for surfbar or get data for given id, always call this + * before you call other getters below this function! + */ +function determineSurfbarNextId ($urlId = NULL) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ' - ENTERED!'); // Default is no id and no random number $nextId = '0'; $randNum = '0'; @@ -1673,7 +1708,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = NULL) { // Is the id set? if (is_null($urlId)) { // Get array with lock ids - $USE = SURFBAR_GET_LOCK_IDS(); + $USE = getSurfbarLockIdsArray(); // Shall we add some URL ids to ignore? $add = ''; @@ -1690,10 +1725,10 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = NULL) { } // END - if // Determine depleted user account - $userids = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + $userids = determineSurfbarDepletedUserids(); // Get maximum randomness factor - $maxRand = SURFBAR_GET_MAX_RANDOM($userids['url_userid'], $add); + $maxRand = getSurfbarMaximumRandom($userids['url_userid'], $add); // If more than one URL can be called generate the random number! if ($maxRand > 1) { @@ -1702,7 +1737,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = NULL) { } // END - if // And query the database - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'randNum='.$randNum.',maxRand='.$maxRand.',surfLock='.SURFBAR_GET_SURF_LOCK()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'randNum='.$randNum.',maxRand='.$maxRand.',surfLock='.gerSurfbarSurfLock()); $result = SQL_QUERY_ESC("SELECT sbu.url_id, sbu.url_userid, @@ -1724,7 +1759,7 @@ LEFT JOIN ON sbu.url_id=l.locks_url_id WHERE - sbu.`url_userid` NOT IN (".implode(',', $userids['url_userid']).") AND + (sbu.`url_userid` NOT IN (".implode(',', $userids['url_userid']).") OR sbu.`url_userid` IS NULL) AND sbu.url_status='ACTIVE' AND (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0)) ".$add." @@ -1759,7 +1794,7 @@ LEFT JOIN ON sbu.url_id=l.locks_url_id WHERE - sbu.url_userid != %s AND + (sbu.url_userid != %s OR sbu.url_userid IS NULL) AND sbu.url_status='ACTIVE' AND sbu.url_id=%s AND (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0)) @@ -1769,52 +1804,52 @@ LIMIT 1", } // Is there an id number? - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS()); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS()); if (SQL_NUMROWS($result) == 1) { // Load/cache data - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - BEFORE', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - BEFORE', false); $GLOBALS['surfbar_cache'] = merge_array($GLOBALS['surfbar_cache'], SQL_FETCHARRAY($result)); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - AFTER', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - AFTER', false); // Determine waiting time - $GLOBALS['surfbar_cache']['time'] = SURFBAR_DETERMINE_WAIT_TIME(); + $GLOBALS['surfbar_cache']['time'] = determineSurfbarWaitingTime(); // Is the last salt there? if (is_null($GLOBALS['surfbar_cache']['salts_last_salt'])) { // Then repair it wit the static! - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', false); $GLOBALS['surfbar_cache']['salts_last_salt'] = ''; } // END - if // Fix missing last_surfed if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) { // Fix it here - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false); $GLOBALS['surfbar_cache']['last_surfed'] = '0'; } // END - if // Get base/fixed reward and costs - $GLOBALS['surfbar_cache']['reward'] = SURFBAR_DETERMINE_REWARD(); - $GLOBALS['surfbar_cache']['costs'] = SURFBAR_DETERMINE_COSTS(); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'BASE/STATIC - reward='.SURFBAR_GET_REWARD().'|costs='.SURFBAR_GET_COSTS()); + $GLOBALS['surfbar_cache']['reward'] = determineSurfbarReward(); + $GLOBALS['surfbar_cache']['costs'] = determineSurfbarCosts(); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'BASE/STATIC - reward='.gerSurfbarReward().'|costs='.gerSurfbarCosts()); // Only in dynamic model add the dynamic bonus! if (getSurfbarPaymentModel() == 'DYNAMIC') { // Calculate dynamic reward/costs and add it - $GLOBALS['surfbar_cache']['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - $GLOBALS['surfbar_cache']['costs'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'DYNAMIC+ - reward='.SURFBAR_GET_REWARD().'|costs='.SURFBAR_GET_COSTS()); + $GLOBALS['surfbar_cache']['reward'] += calculateSurfbarDynamicAddValue(); + $GLOBALS['surfbar_cache']['costs'] += calculateSurfbarDynamicAddValue(); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'DYNAMIC+ - reward='.gerSurfbarReward().'|costs='.gerSurfbarCosts()); } // END - if // Now get the id - $nextId = SURFBAR_GET_ID(); + $nextId = gerSurfbarId(); } // END - if // Free result SQL_FREERESULT($result); // Return result - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',nextId=' . $nextId . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',nextId=' . $nextId . ' - EXIT!'); return $nextId; } @@ -1882,122 +1917,189 @@ function getSurfbarPaymentModel () { return $GLOBALS[__FUNCTION__]; } +//------------------------------------------------------------------------------ +// Template helper functions +//------------------------------------------------------------------------------ + +// Template helper to generate a selection box for surfbar actions +function doTemplateSurfbarActionsActionSelectionBox ($templateName, $clear = false, $default = NULL) { + // Init array + $actionsAction = array( + 0 => array('actions_action' => 'EDIT'), + 1 => array('actions_action' => 'DELETE'), + 2 => array('actions_action' => 'PAUSE'), + 3 => array('actions_action' => 'UNPAUSE'), + 4 => array('actions_action' => 'FRAMETEST'), + 5 => array('actions_action' => 'RETREAT'), + 6 => array('actions_action' => 'RESUBMIT'), + 7 => array('actions_action' => 'BOOKNOW') + ); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($actionsAction, 'surfbar_actions_action', 'actions_action', '', '', '', $default, '', false, true); + + // Return prepared content + return $content; +} + +// Template helper to generate a selection box for surfbar status +function doTemplateSurfbarActionsStatusSelectionBox ($templateName, $clear = false, $default = NULL) { + // Init array + $status = array( + 0 => array('actions_status' => 'PENDING'), + 1 => array('actions_status' => 'ACTIVE'), + 2 => array('actions_status' => 'LOCKED'), + 3 => array('actions_status' => 'STOPPED'), + 4 => array('actions_status' => 'REJECTED'), + 5 => array('actions_status' => 'DELETED'), + 6 => array('actions_status' => 'MIGRATED'), + 7 => array('actions_status' => 'DEPLETED') + ); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($status, 'surfbar_actions_status', 'actions_status', '', '', '', $default, '', false, true); + + // Return prepared content + return $content; +} + +// Template helper to generate a selection box for surfbar status +function doTemplateSurfbarActionsNewStatusSelectionBox ($templateName, $clear = false, $default = NULL) { + // Init array + $status = array( + 0 => array('actions_new_status' => 'PENDING'), + 1 => array('actions_new_status' => 'ACTIVE'), + 2 => array('actions_new_status' => 'LOCKED'), + 3 => array('actions_new_status' => 'STOPPED'), + 4 => array('actions_new_status' => 'REJECTED'), + 5 => array('actions_new_status' => 'DELETED'), + 6 => array('actions_new_status' => 'MIGRATED'), + 7 => array('actions_new_status' => 'DEPLETED') + ); + + // Handle it over to generateSelectionBoxFromArray() + $content = generateSelectionBoxFromArray($status, 'surfbar_actions_new_status', 'actions_new_status', '', '', '', $default, '', true, true); + + // Return prepared content + return $content; +} + //------------------------------------------------------------------------------ // PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE IF THEY DON'T "WRAP" // THE $GLOBALS['surfbar_cache'] ARRAY! //------------------------------------------------------------------------------ // Initializes the surfbar -function SURFBAR_INIT () { +function initSurfbar () { // Init cache array $GLOBALS['surfbar_cache'] = array(); } // Private getter for data elements -function SURFBAR_GET_DATA ($element) { - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ' - ENTERED!'); +function getSurfbarData ($element) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ' - ENTERED!'); // Default is null $data = NULL; // Is the entry there? - if (isset($GLOBALS['surfbar_cache'][$element])) { + if ((isset($GLOBALS['surfbar_cache'][$element])) || (is_null($GLOBALS['surfbar_cache'][$element]))) { // Then take it $data = $GLOBALS['surfbar_cache'][$element]; } else { // END - if - print('
    ');
    +		print('surfbar_cache=
    ');
     		print_r($GLOBALS['surfbar_cache']);
     		print('
    '); - debug_report_bug(__FUNCTION__, __LINE__, 'Element ' . $element . ' not found.'); + reportBug(__FUNCTION__, __LINE__, 'Element ' . $element . ' not found.'); } // Return result - /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element[' . $element . ']=[' . gettype($data) . ']' . $data . ' - EXIT!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element[' . $element . ']=[' . gettype($data) . ']' . $data . ' - EXIT!'); return $data; } // Getter for reward from cache -function SURFBAR_GET_REWARD () { +function gerSurfbarReward () { // Get data element and return its contents - return SURFBAR_GET_DATA('reward'); + return getSurfbarData('reward'); } // Getter for costs from cache -function SURFBAR_GET_COSTS () { +function gerSurfbarCosts () { // Get data element and return its contents - return SURFBAR_GET_DATA('costs'); + return getSurfbarData('costs'); } // Getter for URL from cache -function SURFBAR_GET_URL () { +function gerSurfbarUrl () { // Get data element and return its contents - return SURFBAR_GET_DATA('url'); + return getSurfbarData('url'); } // Getter for salt from cache -function SURFBAR_GET_SALT () { +function gerSurfbarSalt () { // Get data element and return its contents - return SURFBAR_GET_DATA('salt'); + return getSurfbarData('salt'); } // Getter for id from cache -function SURFBAR_GET_ID () { +function gerSurfbarId () { // Get data element and return its contents - return SURFBAR_GET_DATA('url_id'); + return getSurfbarData('url_id'); } // Getter for userid from cache -function SURFBAR_GET_USERID () { +function gerSurfbarUserid () { // Get data element and return its contents - return SURFBAR_GET_DATA('url_userid'); + return getSurfbarData('url_userid'); } // Getter for user reload locks -function SURFBAR_GET_USER_LOCKS () { +function getSurfbarUserLocks () { // Get data element and return its contents - return SURFBAR_GET_DATA('user_locks'); + return getSurfbarData('user_locks'); } // Getter for reload time -function SURFBAR_GET_RELOAD_TIME () { +function gerSurfbarReloadTime () { // Get data element and return its contents - return SURFBAR_GET_DATA('time'); + return getSurfbarData('time'); } // Getter for allowed views -function SURFBAR_GET_VIEWS_ALLOWED () { +function gerSurfbarViewsAllowed () { // Get data element and return its contents - return SURFBAR_GET_DATA('url_views_allowed'); + return getSurfbarData('url_views_allowed'); } // Getter for maximum views -function SURFBAR_GET_VIEWS_MAX () { +function gerSurfbarViewsMax () { // Get data element and return its contents - return SURFBAR_GET_DATA('url_views_max'); + return getSurfbarData('url_views_max'); } // Getter for fixed reload -function SURFBAR_GET_FIXED_RELOAD () { +function getSurfbarFixedReload () { // Get data element and return its contents - return SURFBAR_GET_DATA('url_fixed_reload'); + return getSurfbarData('url_fixed_reload'); } // Getter for surf lock -function SURFBAR_GET_SURF_LOCK () { +function gerSurfbarSurfLock () { // Get data element and return its contents - return SURFBAR_GET_DATA('surf_lock'); + return getSurfbarData('surf_lock'); } // Getter for new status -function SURFBAR_GET_NEW_STATUS () { +function gerSurfbarNewStatus () { // Get data element and return its contents - return SURFBAR_GET_DATA('new_status'); + return getSurfbarData('new_status'); } // Getter for last salt -function SURFBAR_GET_LAST_SALT () { +function gerSurfbarLastSalt () { // Get data element and return its contents - return SURFBAR_GET_DATA('salts_last_salt'); + return getSurfbarData('salts_last_salt'); } // [EOF] diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 5f705a06b5..b8258a4d0d 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -67,7 +67,7 @@ function outputAdvancedOverview (&$result_main) { foreach ( array( // Member accounts - 'confirmed_members','unconfirmed_members','locked_members','random_refid', + 'confirmed_members','unconfirmed_members','locked_members','random_refid','testers', // Tasks 'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks', // Mail orders @@ -93,19 +93,17 @@ function outputAdvancedOverview (&$result_main) { // // Confirmed accounts $value = getTotalConfirmedUser(); - if ($value > 0) { $content['confirmed_members'] = '' . $value . ''; } // END - if // Unconfirmed accounts $value = getTotalUnconfirmedUser(); - if ($value > 0) { $content['unconfirmed_members'] = '' . $value . ''; } // END - if - // And locked accounts + // Locked accounts $value = getTotalLockedUser(); if ($value > 0) { $content['locked_members'] = '' . $value . ''; @@ -117,6 +115,14 @@ function outputAdvancedOverview (&$result_main) { if ($value > 0) { $content['random_refid'] = '' . $value . ''; } // END - if + + if (isExtensionInstalledAndNewer('user', '0.5.0')) { + // And tester accounts + $value = getTotalTesterUsers(); + if ($value > 0) { + $content['testers'] = '' . $value . ''; + } // END - if + } // END - if } // END - if // @@ -241,7 +247,7 @@ function outputAdvancedOverview (&$result_main) { // Both extensions must be there if ((isExtensionActive('autopurge')) && (isExtensionActive('user'))) { // Start finding them... - $EXCLUDE_LIST = ''; + $EXCLUDE_LIST = ' '; // Check for more extensions // @TODO These can be rewritten to filter @@ -253,28 +259,35 @@ function outputAdvancedOverview (&$result_main) { // Recent ext-holiday found $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; } // END - if + if (isExtensionInstalledAndNewer('user', '0.5.0')) { + // Exclude test accounts + $EXCLUDE_LIST = runFilterChain('user_exclusion_sql', $EXCLUDE_LIST); + } // END - if // Check for all accounts addSql("SELECT - d.userid, d.email, d.last_online + d.`userid`, + d.`email`, + d.`last_online` FROM `{?_MYSQL_PREFIX?}_user_data` AS d WHERE - d.`status`='CONFIRMED' AND + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND (UNIX_TIMESTAMP() - d.`joined`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - d.`last_online`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - d.`ap_notified`) >= {?ap_inactive_since?} ".$EXCLUDE_LIST." ORDER BY - d.userid ASC"); + d.`userid` ASC"); $WHATs[] = 'list_autopurge'; $DESCRs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE--}'; $TITLEs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE--}'; - } + } // END - if if ((isExtensionInstalledAndNewer('sql_patches', '0.3.4')) && (isExtensionActive('user'))) { // Check for accounts without referral - addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ORDER BY `userid` ASC"); + addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ' . runFilterChain('user_exclusion_sql', ' ') . ' ORDER BY `userid` ASC'); $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL--}'; $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL_TITLE--}'; $WHATs[] = 'list_user&do=norefs'; @@ -300,14 +313,6 @@ ORDER BY $TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}'; } // END - if - if (isExtensionActive('primera')) { - // List new primera requests - addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_primera` ORDER BY `userid` ASC'); - $WHATs[] = 'list_primera'; - $DESCRs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL--}'; - $TITLEs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL_TITLE--}'; - } // END - if - if (isExtensionActive('holiday')) { // List holiday requests addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC'); @@ -330,9 +335,9 @@ ORDER BY $add = runFilterChain('add_bonus_points_user_columns', ''); // Active rallye, so add more point columns, if not empty - $USE = '`turbo_bonus`'; + $pointsColumns = '`turbo_bonus`'; if (!empty($add)) { - $USE = '(0' . $add . ')'; + $pointsColumns = '(0' . $add . ')'; } // END - if // Init variable @@ -345,12 +350,12 @@ ORDER BY } // END - if addSql("SELECT - " . $USE . " AS `points` + " . $pointsColumns . " AS `points` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND - " . $USE . " > 0 + " . $pointsColumns . " > 0 " . $lastOnline . " ORDER BY `points` DESC, diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index c114071e33..02b8ea4c15 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -81,8 +81,8 @@ ORDER BY if (isIncludeReadable($inc)) { // And save all data in array loadInclude($inc); - $themesArray['theme_unix'][] = $content['theme_path']; - $themesArray['theme_name'][] = $GLOBALS['theme_data']['name']; + array_push($themesArray['theme_unix'], $content['theme_path']); + array_push($themesArray['theme_name'], $GLOBALS['theme_data']['name']); } // END - if } // END - while @@ -145,7 +145,7 @@ function getThemeVersion ($name) { return $cver; } -// Checks wether a theme is found in db +// Checks whether a theme is found in db function ifThemeExists ($name) { // Get theme and is it not nul? return ((isExtensionActive('theme')) && (getThemeId($name) > 0)); @@ -225,12 +225,14 @@ function getActualTheme () { $ret = 'default'; // Load default theme if not empty from configuration - if ((isConfigEntrySet('default_theme')) && (getConfig('default_theme') != '')) $ret = getConfig('default_theme'); + if ((isConfigEntrySet('default_theme')) && (getConfig('default_theme') != '')) { + $ret = getConfig('default_theme'); + } // END - if - if (!isSessionVariableSet('mailer_theme')) { + if (!isMailerThemeSet()) { // Set default theme - setTheme($ret); - } elseif ((isSessionVariableSet('mailer_theme')) && (isExtensionInstalledAndNewer('sql_patches', '0.1.4'))) { + setMailerTheme($ret); + } elseif ((isMailerThemeSet()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.4'))) { //die("
    ".print_r($GLOBALS['cache_array']['themes'], true)."
    "); // Get theme from cookie $ret = getSession('mailer_theme'); @@ -247,31 +249,23 @@ function getActualTheme () { // Installation mode active if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) { // Set cookie from URL data - setTheme(getRequestElement('theme')); + setMailerTheme(getRequestElement('theme')); } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme')))) { // Set cookie from posted data - setTheme(postRequestElement('theme')); + setMailerTheme(postRequestElement('theme')); } // Set return value $ret = getSession('mailer_theme'); } else { // Invalid design, reset cookie - setTheme($ret); + setMailerTheme($ret); } // Return theme value return $ret; } -/** - * Setter for theme in session (This setter does return the success of - * setSession() which is required e.g. for destroySponsorSession(). - */ -function setTheme ($newTheme) { - return setSession('mailer_theme', $newTheme); -} - // Get id from theme function getThemeId ($name) { // Default id diff --git a/inc/libs/timezone_functions.php b/inc/libs/timezone_functions.php index 3acb6ca324..43d7a09f86 100644 --- a/inc/libs/timezone_functions.php +++ b/inc/libs/timezone_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/transfer_functions.php b/inc/libs/transfer_functions.php index 8a0e490d5d..14888c7900 100644 --- a/inc/libs/transfer_functions.php +++ b/inc/libs/transfer_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -76,7 +76,7 @@ function autoPurgeTransfers ($max, $age) { // Only send email to admin(s) when we have removed entries if ($removed > 0) { - sendAdminNotification('{--TRANSFER_ADMIN_AUTOPURGE--}', 'admin_transfer_ap', $removed); + sendAdminNotification('{--ADMIN_TRANSFER_AUTOPURGE_SUBJECT--}', 'admin_transfer_ap', $removed); } // END - if } diff --git a/inc/libs/uberwach_functions.php b/inc/libs/uberwach_functions.php index 11272674e5..bcd6764eb1 100644 --- a/inc/libs/uberwach_functions.php +++ b/inc/libs/uberwach_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Loads the snippet for the uberwach action function loadUberwachSnippet () { // Simply load the template here - $GLOBALS['page_footer'] .= loadTemplate('uberwach_snippet', true); + $GLOBALS['__page_footer'] .= loadTemplate('uberwach_snippet', true); } // [EOF] diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 63fb9f9bc3..566c762b0c 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -41,17 +41,19 @@ if (!defined('__SECURITY')) { } // END - if // Add links for selecting some users -function alpha ($sortby) { +function addAlphabeticalSorting ($sortby) { $add = ''; - foreach (array('page','offset','do','status') as $param) { + foreach (array('page', 'offset', 'do', 'status') as $param) { if (isGetRequestElementSet($param)) { $add .= '&' . $param . '=' . getRequestElement($param); } // END - if } // END - foreach - /* Creates the list of letters and makes them a link. */ + // Creates the list of letters and makes them a link. $alphabet = 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,'); $num = count($alphabet) - 1; + + // Add all letter links $OUT = ''; while (list($counter, $ltr) = each($alphabet)) { if (getRequestElement('letter') == $ltr) { @@ -62,16 +64,16 @@ function alpha ($sortby) { $OUT .= '' . $ltr . ''; } - if ((($counter / getConfig('user_alpha')) == round($counter / getConfig('user_alpha'))) && ($counter > 0)) { + if ((($counter / getUserAlpha()) == round($counter / getUserAlpha())) && ($counter > 0)) { $OUT .= ']
    ['; - } elseif ( $counter != $num ) { + } elseif ($counter != $num) { $OUT .= '|'; } } // END - while // Prepare content $content = array ( - 'alpha_selection' => $OUT + 'alpha_selection' => $OUT, ); // Load template @@ -159,7 +161,7 @@ function addPageNavigation ($numPages) { } // END - foreach // Letter and so on - $OUT .= '&letter=' . getRequestElement('letter') . '&sortby=' . getRequestElement('sortby') . '&page=' . $page . '&offset=' . getConfig('user_limit') . '%}">'; + $OUT .= '&letter=' . getRequestElement('letter') . '&sortby=' . getRequestElement('sortby') . '&page=' . $page . '&offset=' . getUserLimit() . '%}">'; } $OUT .= $page; @@ -224,29 +226,31 @@ LIMIT 1", } // Selects a random user id as the new referral id if they have at least X confirmed mails in this run -// @TODO Double-check configuration entry here function determineRandomReferralId () { // Default is zero refid $refid = NULL; // Is the extension version fine? - if (isExtensionInstalledAndNewer('user', '0.3.4')) { + if ((isRandomReferralIdEnabled()) && (isExtensionInstalledAndNewer('user', '0.3.4'))) { // Get all user ids - $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= {?user_min_confirmed?}"); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, runFilterChain('user_exclusion_sql', ' AND `rand_confirmed` >= {?user_min_confirmed?}')); // Do we have at least one? if ($totalUsers > 0) { - // Then choose random number - $randNum = mt_rand(0, ($totalUsers - 1)); + // Then choose random userid + $randUserid = mt_rand(0, ($totalUsers - 1)); // Look for random user - $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= {?user_min_confirmed?} ORDER BY `rand_confirmed` DESC LIMIT %s, 1", - array($randNum), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` " . runFilterChain('user_exclusion_sql', "WHERE `status`='CONFIRMED'") . ' AND `rand_confirmed` >= {?user_min_confirmed?} ORDER BY `rand_confirmed` DESC LIMIT %s, 1', + array($randUserid), __FUNCTION__, __LINE__); // Do we have one entry there? if (SQL_NUMROWS($result) == 1) { // Use that userid as new referral id list($refid) = SQL_FETCHROW($result); + + // Debug message + /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ' - choosen!'); } // END - if // Free result @@ -298,6 +302,9 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p } // END - if } // END - if + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',isUserDataValid()=' . intval(isUserDataValid()) . ',userStatus=' . getUserData('status') . ',errorCode=' . $errorCode . ',ext=' . $ext . ',isFound=' . intval($isFound)); + // Is there an entry? if (($errorCode == '0') && (isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) { // Check for old MD5 passwords @@ -391,7 +398,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p $errorCode = generateErrorCodeFromUserStatus(getUserData('status')); // Set userid in session - setSession('current_userid', getUserData('userid')); + setSession('userid', getUserData('userid')); } elseif (!isUserDataValid()) { // User id not found $errorCode = getCode('WRONG_ID'); @@ -575,7 +582,7 @@ function doConfirmUserAccount ($hash) { // Fetch user data if (!fetchUserData($userid)) { // Not found, should not happen - debug_report_bug(__FILE__, __LINE__, 'User account ' . $userid . ' not found.'); + reportBug(__FILE__, __LINE__, 'User account ' . $userid . ' not found.'); } // END - if // Load all data and add points @@ -708,7 +715,7 @@ function getConfirmationMessageFromUserStatus ($status) { break; default: // This should not happen - debug_report_bug(__FUNCTION__, __LINE__, 'Unknown user status ' . $status . ' detected.'); + reportBug(__FUNCTION__, __LINE__, 'Unknown user status ' . $status . ' detected.'); break; } // END - switch @@ -716,6 +723,83 @@ function getConfirmationMessageFromUserStatus ($status) { return $message; } +// "Getter" for total tester accounts +function getTotalTesterUsers () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = countSumTotalData('', 'user_data', 'userid', '', true, runFilterChain('user_inclusion_sql')); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether the admin is allowed to create more tester accounts +function isNewUserTesterAllowed () { + // By default only admins are allowed + if (!isAdmin()) { + // This should not happen and must be fixed + reportBug(__FUNCTION__, __LINE__, 'isAdmin()=false - Not allowed.'); + } // END - if + + // Are more tester accounts allowed? + $isAllowed = (getTotalTesterUsers() < bigintval(getTesterUserMaximum() + 1)); + + // Return result + return $isAllowed; +} + +// "Getter" for next free tester account number +function getNextFreeTesterUserNumber () { + // Get current total amount because we start with zero + $nextTester = getTotalTesterUsers(); + + // Prepend zeros + $nextTester = prependZeros($nextTester, 6); + + // Return it + return $nextTester; +} + +// Wrapper function to return a selection box for tester user default referral id +function addTesterUserDefaultRefidSelectionBox ($fieldName = 'tester_user_default_refid') { + // Return it + return addMemberSelectionBox(getConfig('tester_user_default_refid'), false, true, true, $fieldName, " WHERE `surname` LIKE '{?tester_user_surname_prefix?}%'"); +} + +// Checks whether given surname is a test user name +function isTesterUserName ($surname) { + // Determine it + return (substr($surname, 0, strlen(getTesterUserSurnamePrefix())) == getTesterUserSurnamePrefix()); +} + +// Creates a tester account from given POST data +function createTesterUserAccount () { + // Add generated surname + setPostRequestElement('surname', (getTesterUserSurnamePrefix() . getNextFreeTesterUserNumber())); + + // Is the registration data complete? + if (!isRegistrationDataComplete()) { + // Then abort here + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isRegistrationDataComplete()=false, please check if you e.g. have selected the required minimum of categories.'); + return false; + } // END - if + + // Do registration + $isCreated = doUserRegistration(); + + // Remove cache to force recalculation of total tester accounts + unset($GLOBALS['getTotalTesterUsers']); + + // Return status + return $isCreated; +} + +//----------------------------------------------------------------------------- +// EL code functions +//----------------------------------------------------------------------------- + // Expression call-back function for fetching user data function doExpressionUser ($data) { // Use current userid by default @@ -759,6 +843,10 @@ function doExpressionUser ($data) { return $code; } +//----------------------------------------------------------------------------- +// Template helper functions +//----------------------------------------------------------------------------- + // Template call-back function for list_user admin function function doTemplateAdminListUserTitle ($template, $clear = false) { // Init title with "all accounts" @@ -782,7 +870,7 @@ function doTemplateDisplayUsername ($template, $clear = false, $userid = NULL) { // Is a userid set? if (!isValidUserId($userid)) { // Please don't call this without a valid userid - debug_report_bug(__FUNCTION__, __LINE__, 'template=' . $template . ',clear=' . intval($clear) . ',userid[' . gettype($userid) . ']=' . intval($userid) . ' - Invalid userid provided.'); + reportBug(__FUNCTION__, __LINE__, 'template=' . $template . ',clear=' . intval($clear) . ',userid[' . gettype($userid) . ']=' . intval($userid) . ' - Invalid userid provided.'); } // END - if // Do we have cache? @@ -795,5 +883,153 @@ function doTemplateDisplayUsername ($template, $clear = false, $userid = NULL) { return $GLOBALS[__FUNCTION__][$userid]; } +// ---------------------------------------------------------------------------- +// Wrapper functions for configuration entries +// ---------------------------------------------------------------------------- + +// Getter for user_alpha +function getUserAlpha () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('user_alpha'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for user_limit +function getUserLimit () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('user_limit'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_surname_prefix +function getTesterUserSurnamePrefix () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_surname_prefix'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_maximum +function getTesterUserMaximum () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_maximum'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_check_cat +function getTesterUserCheckCat () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_check_cat'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_gender +function getTesterUserGender () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_gender'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_family +function getTesterUserFamily () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_family'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_password +function getTesterUserPassword () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_password'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_street_nr +function getTesterUserStreetNr () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_street_nr'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_zip +function getTesterUserZip () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_zip'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_city +function getTesterUserCity () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_city'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for tester_user_email +function getTesterUserEmail () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('tester_user_email'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 20fa4a4b91..aed931703e 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index f515b525cc..0294ab98c6 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -160,12 +160,12 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { // If we have no result, abort here if (count($dummy) == 0) { // Empty response from API - debug_report_bug(__FUNCTION__, __LINE__, 'Empty result from API received. response()=' . count($response) . ',type=' . $type); + reportBug(__FUNCTION__, __LINE__, 'Empty result from API received. response()=' . count($response) . ',type=' . $type); return array(); } // END - if // The result is now still raw, so we must split it up and trim spaces away - $responseLine = trim(implode("\n", $dummy)); + $responseLine = trim(implode(chr(10), $dummy)); // Last line should never be a pipe! if (substr($responseLine, -1, 1) == '|') { @@ -208,13 +208,17 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { } // Is the waiting time below one second? Then fix it to one (zero seconds are not yet supported!) - if ($data['wait'] < 1) $data['wait'] = 1; + if ($data['wait'] < 1) { + $data['wait'] = 1; + } // END - if // Half of waiting time is a good reward! $data['reward'] = round($data['wait'] / 2 + 0.4); // Is the reward below one? - if ($data['reward'] < 1) $data['reward'] = 1; + if ($data['reward'] < 1) { + $data['reward'] = 1; + } // END - if // Load template loadTemplate('admin_send_yoomedia', false, $data); @@ -308,7 +312,7 @@ function translateYooMediaError ($errorCode) { $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode]; } else { // Log missing entries - debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown error code %s[%s] detected.", $errorCode, gettype($errorCode))); + reportBug(__FUNCTION__, __LINE__, sprintf("Unknown error code %s[%s] detected.", $errorCode, gettype($errorCode))); } // Return value @@ -410,11 +414,11 @@ function YOOMEDIA_GET_ERRORCODE_FROM_RESULT ($response) { $code = $codeArray[0]; // Remove all new-line characters - $codeArray = explode("\n", $code); + $codeArray = explode(chr(10), $code); $code = $codeArray[0]; // Remove carrige-return - $code = trim(str_replace("\n", '', $code)); + $code = trim(str_replace(chr(10), '', $code)); // Is it still empty? if (empty($code)) { @@ -427,7 +431,7 @@ function YOOMEDIA_GET_ERRORCODE_FROM_RESULT ($response) { $code = '0'; } else { // Should not happen! - debug_report_bug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:
    ' . print_r($response, true) . '
    '); + reportBug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:
    ' . print_r($response, true) . '
    '); } // Return error code diff --git a/inc/load_cache.php b/inc/load_cache.php index bf03f5a1b9..1a25749fff 100644 --- a/inc/load_cache.php +++ b/inc/load_cache.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/load_config.php b/inc/load_config.php index 541bde300c..0bb8a7aa36 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,7 +51,7 @@ $GLOBALS['config_local_loaded'] = false; // Is the local configuration there? if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadable('inc/config.php'))) { // We are better in installation mode - $GLOBALS['mailer_installing'] = true; + $GLOBALS['__mailer_installing'] = true; // Define default main_title here setConfigEntry('MAIN_TITLE', 'Your mail-exchange title'); @@ -60,7 +60,7 @@ if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadab setConfigEntry('OUTPUT_MODE', 'render'); // Both exist! This is bad and should be avoided by the admin - debug_report_bug(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at inc/config.php along with the new file '.getCachePath().'config-local.php. Please remove inc/config.php to avoid incompatiblity issues. Thank you.'); + reportBug(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at inc/config.php along with the new file '.getCachePath().'config-local.php. Please remove inc/config.php to avoid incompatiblity issues. Thank you.'); } elseif (isIncludeReadable(getCachePath() . 'config-local.php')) { // Then load it loadIncludeOnce(getCachePath() . 'config-local.php'); @@ -75,7 +75,7 @@ if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadab // @TODO Rewrite them to avoid this else block setConfigEntry('MAIN_TITLE', 'Your mail-exchanger title'); setConfigEntry('SLOGAN' , 'Your cool slogan here'); - setConfigEntry('WEBMASTER' , 'you@some-hoster.tld.invalid'); + setConfigEntry('WEBMASTER' , 'you@some-hoster.example'); // Set output mode here setConfigEntry('OUTPUT_MODE', 'render'); @@ -87,10 +87,10 @@ if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallation outputHtml('{--MAILER_WARNING--}:'); if (isInstalled()) { // You have changed my configuration file! - debug_report_bug(__FILE__, __LINE__, '{--DIE_CONFIG_CHANGED_YOU--}'); + reportBug(__FILE__, __LINE__, '{--DIE_CONFIG_CHANGED_YOU--}'); } else { // Please run the installation script (maybe again) - debug_report_bug(__FILE__, __LINE__, '{--DIE_RUN_INSTALL_MYSQL--}'); + reportBug(__FILE__, __LINE__, '{--DIE_RUN_INSTALLER_MYSQL--}'); } } elseif ((!isInstalling()) && (!isInstallationPhase()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) { // No database password entered diff --git a/inc/loader/load- b/inc/loader/load- index de62187ebb..a01d875336 100644 --- a/inc/loader/load- +++ b/inc/loader/load- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-admins.php b/inc/loader/load-admins.php index c7111d689d..be115a4a3c 100644 --- a/inc/loader/load-admins.php +++ b/inc/loader/load-admins.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -131,7 +131,7 @@ if (isExtensionInstalledAndNewer('admins', '0.3')) { // Do we have 'admin_id' or regular entries? if ($key != 'admin_id') { // Regular entry so use id - $admins[$key][$GLOBALS['cache_array']['admin_acls']['admin_id'][$idx]][] = $entry[$idx]; + array_push($admins[$key][$GLOBALS['cache_array']['admin_acls']['admin_id'][$idx]], $entry[$idx]); } // END - if } // END - foreach } // END - foreach diff --git a/inc/loader/load-config.php b/inc/loader/load-config.php index 0641a92eb1..d62984bb41 100644 --- a/inc/loader/load-config.php +++ b/inc/loader/load-config.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-earning.php b/inc/loader/load-earning.php index fabe21e658..3a809ce0bd 100644 --- a/inc/loader/load-earning.php +++ b/inc/loader/load-earning.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-extension.php b/inc/loader/load-extension.php index ac83a0f813..2d5fd5b96b 100644 --- a/inc/loader/load-extension.php +++ b/inc/loader/load-extension.php @@ -18,7 +18,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -67,7 +67,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache // Load extension file itself if (($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y')) { - $EXT_POOL[] = $ext_name; + array_push($EXT_POOL, $ext_name); } // END - if // Version number diff --git a/inc/loader/load-filter.php b/inc/loader/load-filter.php index 61bb5ffe1d..58b8687d5b 100644 --- a/inc/loader/load-filter.php +++ b/inc/loader/load-filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-imprint.php b/inc/loader/load-imprint.php index 5257a9ba5a..d904fd9cf6 100644 --- a/inc/loader/load-imprint.php +++ b/inc/loader/load-imprint.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php index 84e1dc4fdd..78fed2c674 100644 --- a/inc/loader/load-modules.php +++ b/inc/loader/load-modules.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i $GLOBALS['cache_instance']->removeCacheFile(); // We should fix this - debug_report_bug(__FILE__, __LINE__, 'modArray=
    ' . print_r($modArray, true) . '
    Please try to reload to fix this.'); + reportBug(__FILE__, __LINE__, 'modArray=
    ' . print_r($modArray, true) . '
    Please try to reload to fix this.'); } // END - if // Rewrite some parts @@ -68,7 +68,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // Is ext-sql_patches newer or equal 0.3.6? if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { // Add 'has_menu' - $entries[] = 'has_menu'; + array_push($entries, 'has_menu'); } // END - if // Add all diff --git a/inc/loader/load-points_data.php b/inc/loader/load-points_data.php index 2033281d65..220567a81a 100644 --- a/inc/loader/load-points_data.php +++ b/inc/loader/load-points_data.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('points_data')) && ($GLOBALS['cac $GLOBALS['cache_instance']->removeCacheFile(); // Not found, so better abort here - debug_report_bug(__FILE__, __LINE__, 'points_data has been generated, but does not contain "subject". Please try to reload to fix this.'); + reportBug(__FILE__, __LINE__, 'points_data has been generated, but does not contain "subject". Please try to reload to fix this.'); } // END - if // Init temporary array diff --git a/inc/loader/load-refdepths.php b/inc/loader/load-refdepths.php index f30616e593..879f242a0d 100644 --- a/inc/loader/load-refdepths.php +++ b/inc/loader/load-refdepths.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-refsystem.php b/inc/loader/load-refsystem.php index 5215581fd8..ccfb5aa821 100644 --- a/inc/loader/load-refsystem.php +++ b/inc/loader/load-refsystem.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-revision.php b/inc/loader/load-revision.php index ea80061e9d..4f05363bad 100644 --- a/inc/loader/load-revision.php +++ b/inc/loader/load-revision.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/loader/load-themes.php b/inc/loader/load-themes.php index a20956953e..7507530122 100644 --- a/inc/loader/load-themes.php +++ b/inc/loader/load-themes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/mails/_mails.php b/inc/mails/_mails.php index 4457a2879f..6f5316c876 100644 --- a/inc/mails/_mails.php +++ b/inc/mails/_mails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,12 @@ if (!defined('__SECURITY')) { die(); } elseif (!isExtensionActive('')) { + // Do not execute script on missing/out-dated extension ext- + return; +} elseif (!isHtmlOutputMode()) { + // Do not execute script if not in HTML mode return; } -// Do not execute when script is in CSS mode -if (!isHtmlOutputMode()) return; - // [EOF] ?> diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index db78e472b6..fb2292c127 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,12 +39,13 @@ if (!defined('__SECURITY')) { die(); } elseif ((!isExtensionActive('beg')) || (isExtensionInstalledAndOlder('beg', '0.2.8'))) { + // Do not execute script on missing/out-dated extension ext-beg + return; +} elseif (!isHtmlOutputMode()) { + // Do not execute script if not in HTML mode return; } -// Do not execute when script is in CSS mode -if (!isHtmlOutputMode()) return; - // Create timemark from saved month $mark = mktime(0, 0, 0, getLastMonth(), getDay(), getYear()); $sql = ''; $mode = ''; @@ -77,7 +78,7 @@ switch (getBegRallye()) { if (!empty($sql)) { // The SQL command needs to be finisched here (only confirmed accounts!) - $sql .= ") AND `status`='CONFIRMED' ORDER BY `last_online` ASC"; + $sql .= ')' . runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'") . ' ORDER BY `last_online` ASC'; // No IP locking setuped by default $content['ip_locker'] = '{--BEG_NO_LIMITATION--}'; @@ -118,7 +119,7 @@ LIMIT 1", // Load email template and send it to the user! if ($sentBonusMails === true) { // Add userid to queue - $userids[] = $content['userid']; + array_push($userids, $content['userid']); } else { // Send normal notification mail to the members $message = loadEmailTemplate('beg_' . $mode . '_notify', $content, $content['userid']); diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 495c2b52cb..d52b33b278 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,12 +39,13 @@ if (!defined('__SECURITY')) { die(); } elseif ((!isExtensionActive('bonus')) || (isExtensionInstalledAndOlder('bonus', '0.9.2'))) { + // Do not execute script on missing/out-dated extension ext-bonus + return; +} elseif (!isHtmlOutputMode()) { + // Do not execute script if not in HTML mode return; } -// Do not execute when script is in CSS mode -if (!isHtmlOutputMode()) return; - // Create timemark from saved month $mark = mktime(0, 0, 0, getLastMonth(), getDay(), getYear()); $sql = ''; $mode = ''; @@ -77,7 +78,7 @@ switch (getConfig('bonus_active')) { if (!empty($sql)) { // The SQL command needs to be finisched here (only confirmed accounts!) - $sql .= ") AND `status`='CONFIRMED' ORDER BY `last_online` ASC"; + $sql .= ')' . runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'") . ' ORDER BY `last_online` ASC'; // Normal notification mails or bonus mails? $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == 'enable') && (isExtensionActive('bonus'))); @@ -107,7 +108,7 @@ LIMIT 1", // Load email template and send it to the user! if ($sentBonusMails === true) { // Add userid to queue - $userids[] = $content['userid']; + array_push($userids, $content['userid']); } else { // Send normal notification mail to the members $message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']); diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index 7ec3e1eb8d..5405846410 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -76,36 +76,42 @@ FROM LEFT JOIN `{?_MYSQL_PREFIX?}_user_data` AS u ON - d.userid=u.userid + d.`userid`=u.`userid` WHERE - u.`status`='CONFIRMED' AND - d.points <= %s AND - d.points >= ({?doubler_min?} * 2) AND - d.completed='N' AND - d.is_ref='N' + u.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND + d.`points` <= %s AND + d.`points` >= ({?doubler_min?} * 2) AND + d.`completed`='N' AND + d.`is_ref`='N' ORDER BY - d.timemark ASC", + d.`timemark` ASC", array( $DOUBLER_POINTS ), __FILE__, __LINE__); // Check for accounts with limitation $result_main = SQL_QUERY_ESC("SELECT - d.id, d.userid, d.points, d.remote_ip, d.timemark + 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 + d.`userid`=u.`userid` WHERE - u.`status`='CONFIRMED' AND - d.points <= %s AND - d.points >= ({?doubler_min?} * 2) AND - d.completed='N' AND - d.is_ref='N' + u.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND + d.`points` <= %s AND + d.`points` >= ({?doubler_min?} * 2) AND + d.`completed`='N' AND + d.`is_ref`='N' ORDER BY - d.timemark ASC + d.`timemark` ASC LIMIT {?doubler_max_sent?}", array( $DOUBLER_POINTS diff --git a/inc/math-functions.php b/inc/math-functions.php index e659c9228f..b649618e54 100644 --- a/inc/math-functions.php +++ b/inc/math-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/module-functions.php b/inc/module-functions.php index 8af427efc3..15d2f30465 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,56 +42,62 @@ if (!defined('__SECURITY')) { // "Getter" for module title function getModuleTitle ($module) { - // Init variables - $data['title'] = ''; - $result = false; - - // Is the script installed? - if ((isInstalled()) && ($module != 'error')) { - // Check if cache is valid - if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($module, $GLOBALS['cache_array']['modules']['module']))) { - // Load from cache - $data['title'] = $GLOBALS['cache_array']['modules']['title'][$module]; - - // Update cache hits - incrementStatsEntry('cache_hits'); - } elseif (!isExtensionActive('cache')) { - // Load from database - $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", - array($module), __FUNCTION__, __LINE__); - - // Is the entry there? - if (SQL_NUMROWS($result) == 1) { - // Get the title from database - $data = SQL_FETCHARRAY($result); - } // END - if + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__][$module])) { + // Init variables + $data['title'] = ''; + $result = false; + + // Is the script installed? + if ((isInstalled()) && ($module != 'error')) { + // Check if cache is valid + if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($module, $GLOBALS['cache_array']['modules']['module']))) { + // Load from cache + $data['title'] = $GLOBALS['cache_array']['modules']['title'][$module]; + + // Update cache hits + incrementStatsEntry('cache_hits'); + } elseif (!isExtensionActive('cache')) { + // Load from database + $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", + array($module), __FUNCTION__, __LINE__); + + // Is the entry there? + if (SQL_NUMROWS($result) == 1) { + // Get the title from database + $data = SQL_FETCHARRAY($result); + } // END - if + + // Free the result + SQL_FREERESULT($result); + } + } // END - if - // Free the result - SQL_FREERESULT($result); - } - } // END - if + // Trim name + $data['title'] = trim($data['title']); + + // Still no luck or empty title? + if (empty($data['title'])) { + // Is it 'error'? + if ($module == 'error') { + // Error (real module was not found) + $data['title'] = '{--MODULE_ERROR_404--}'; + } else { + // No name found + $data['title'] = '{%message,UNKNOWN_MODULE_DETECTED_TITLE=' . $module . '%}'; + if ((is_resource($result)) && (SQL_HASZERONUMS($result))) { + // Add module to database and ignore return value + checkModulePermissions($module); + } // END - if + } + } // END - if - // Trim name - $data['title'] = trim($data['title']); - - // Still no luck or empty title? - if (empty($data['title'])) { - // Is it 'error'? - if ($module == 'error') { - // Error (real module was not found) - $data['title'] = '{--MODULE_ERROR_404--}'; - } else { - // No name found - $data['title'] = '{%message,UNKNOWN_MODULE_DETECTED_TITLE=' . $module . '%}'; - if ((is_resource($result)) && (SQL_HASZERONUMS($result))) { - // Add module to database and ignore return value - checkModulePermissions($module); - } // END - if - } + // Store in cache + $GLOBALS[__FUNCTION__][$module] = $data['title']; } // END - if - // Return name - return $data['title']; + // Return it + return $GLOBALS[__FUNCTION__][$module]; } // Checks if module_status entry is there @@ -110,14 +116,14 @@ function getModuleStatus ($module) { // Is the module_status entry there? if (!isModuleStatusSet($module)) { // Abort - debug_report_bug('Module status not set. module=' . $module); + reportBug('Module status not set. module=' . $module); } // END - if // Return it return $GLOBALS['module_status'][$module]; } -// Checks wether the given module is registered +// Checks whether the given module is registered function isModuleRegistered ($module) { // By default nothing is found $found = false; @@ -165,7 +171,7 @@ function isModuleRegistered ($module) { return $found; } -// Checks wether the given module is locked by just checking the cache +// Checks whether the given module is locked by just checking the cache function isModuleLocked ($module) { // Determine if there a cache entry and is it set $return = ((isset($GLOBALS['cache_array']['modules']['locked'][$module])) && ($GLOBALS['cache_array']['modules']['locked'][$module] == 'Y')); @@ -174,7 +180,7 @@ function isModuleLocked ($module) { return $return; } -// Checks wether the given module is hidden by just checking the cache +// Checks whether the given module is hidden by just checking the cache function isModuleHidden ($module) { // Determine if there a cache entry and is it set $return = ((isset($GLOBALS['cache_array']['modules']['hidden'][$module])) && ($GLOBALS['cache_array']['modules']['hidden'][$module] == 'Y')); @@ -183,7 +189,7 @@ function isModuleHidden ($module) { return $return; } -// Checks wether the given module is mem_only by just checking the cache +// Checks whether the given module is mem_only by just checking the cache function isModuleMemberOnly ($module) { // Determine if there a cache entry and is it set $return = ((isset($GLOBALS['cache_array']['modules']['mem_only'][$module])) && ($GLOBALS['cache_array']['modules']['mem_only'][$module] == 'Y')); @@ -192,7 +198,7 @@ function isModuleMemberOnly ($module) { return $return; } -// Checks wether the given module is admin_only by just checking the cache +// Checks whether the given module is admin_only by just checking the cache function isModuleAdminOnly ($module) { // Determine if there a cache entry and is it set $return = ((isset($GLOBALS['cache_array']['modules']['admin_only'][$module])) && ($GLOBALS['cache_array']['modules']['admin_only'][$module] == 'Y')); @@ -392,11 +398,11 @@ function ifModuleHasMenu ($module, $forceDb = false) { } // Adds a SQL for given module -function addModuleSql ($module, $locked, $hidden, $adminOnly, $memOnly) { +function addModuleSql ($module, $title, $locked, $hidden, $adminOnly, $memOnly) { // Is the module already registered? if (!isModuleRegistered($module)) { // Add it - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`locked`,`hidden`,`admin_only`,`mem_only`) VALUES ('" . $module . "','" . $locked . "','" . $hidden . "','" . $adminOnly . "','" . $memOnly . "')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`,`title`,`locked`,`hidden`,`admin_only`,`mem_only`) VALUES ('" . $module . "','" . $title . "','" . $locked . "','" . $hidden . "','" . $adminOnly . "','" . $memOnly . "')"); } else { // Already registered logDebugMessage(__FUNCTION__, __LINE__, sprintf("Already registered: module=%s,locked=%s,hidden=%s,admin=%s,mem=%s", @@ -455,14 +461,14 @@ function loadModule () { case 'locked': // Set HTTP status - setHttpStatus('403 FORBIDDEN'); + setHttpStatus('403 Forbidden'); if (!isIncludeReadable($GLOBALS['module_inc'])) { // Set HTTP status again - setHttpStatus('404 NOT FOUND'); + setHttpStatus('404 Not Found'); // Module does addionally not exists - addFatalMessage(__FUNCTION__, __LINE__, '{--MODULE_REGISTRY_404--}'); + addFatalMessage(__FUNCTION__, __LINE__, '{--MODULE_REGISTRY_LOCKED_404--}'); } // END - if // Add fatal message @@ -506,12 +512,19 @@ function doIncludeModule () { addFatalMessage(__FUNCTION__, __LINE__, '{--MYSQL_ERRORS--}'); } + // Is the module valid? if (($isModuleValid === true) && (!is_null($GLOBALS['module_inc']))) { + // Run pre-filter + runFilterChain('pre_module_load'); + // Everything is okay so we can load the module loadIncludeOnce($GLOBALS['module_inc']); + + // Run post-filter + runFilterChain('post_module_load'); } // END - if - // Add the footer (this will call shutdown()) + // Add the footer (this will call doShutdown()) loadIncludeOnce('inc/footer.php'); } diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 2aa70e1b6b..b9578683dd 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Load include file @@ -234,10 +234,10 @@ if (!isAdminRegistered()) { // Check if the admin has submitted data or not if ((isFormSent()) && ((!isPostRequestElementSet('admin_login')) || (!isPostRequestElementSet('admin_password')) || (strlen(postRequestElement('admin_password')) < getConfig('minium_admin_pass_length')))) { - setPostRequestElement('ok', '***'); + setPostRequestElement('login', '***'); } // END - if - if ((isFormSent()) && (postRequestElement('ok') != '***')) { + if ((isFormSent('login')) && (postRequestElement('login') != '***')) { // All required data was entered so we check his account $ret = ifAdminLoginDataIsValid(postRequestElement('admin_login'), postRequestElement('admin_password')); @@ -249,13 +249,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setPostRequestElement('ok', $ret); + setPostRequestElement('login', $ret); $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestElement('admin_login') . '%}'; destroyAdminSession(); break; case 'password': // Wrong password - setPostRequestElement('ok', $ret); + setPostRequestElement('login', $ret); $ret = '{--WRONG_PASS--} [{--ADMIN_RESET_PASS--}]'; destroyAdminSession(); break; @@ -277,7 +277,7 @@ if (!isAdminRegistered()) { $content['login_message'] = ''; $content['pass_message'] = ''; - if (isFormSent()) { + if (isFormSent('login')) { // Set messages to zero $loginMessage = ''; $passwdMessage = ''; @@ -286,7 +286,7 @@ if (!isAdminRegistered()) { if (!isPostRequestElementSet('admin_login')) { // No login entered? $loginMessage = '{--ADMIN_NO_LOGIN--}'; - } elseif ((!empty($ret)) && (postRequestElement('ok') == '404')) { + } elseif ((!empty($ret)) && (postRequestElement('login') == '404')) { // An error comes back from login? $loginMessage = $ret; } @@ -298,7 +298,7 @@ if (!isAdminRegistered()) { } elseif (strlen(postRequestElement('admin_password')) < getConfig('minium_admin_pass_length')) { // Or password too short? $passwdMessage = '{--ADMIN_SHORT_PASS--}'; - } elseif ((!empty($ret)) && (postRequestElement('ok') == 'password')) { + } elseif ((!empty($ret)) && (postRequestElement('login') == 'password')) { // An error comes back from login? $passwdMessage = $ret; } @@ -356,20 +356,12 @@ if (!isAdminRegistered()) { runFilterChain('check_admin_acl'); // Check for version and switch between old menu system and new intelligent menu system - if ((adminGetMenuMode() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) { - // Default area is the entrance, of course - $area = 'entrance'; - - // Check for similar URL variable - if (isGetRequestElementSet('area')) { - $area = getRequestElement('area'); - } // END - if - - // Load logical-area menu-system file - loadIncludeOnce('inc/modules/admin/lasys-inc.php'); + if (adminGetMenuMode() == 'NEW') { + // Load include for admin AJAX + loadIncludeOnce('inc/ajax/ajax_admin.php'); - // Create new-style menu system will logical areas - doAdminLogicalArea($area, $action, getWhat()); + // Load main template + loadTemplate('admin_ajax_main'); } else { /* * This little call constructs the whole default old and lacky menu system @@ -380,13 +372,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setPostRequestElement('ok', $ret); + setPostRequestElement('login', $ret); displayMessage('{%message,ADMIN_ACCOUNT_404=' . getCurrentAdminId() . '%}'); destroyAdminSession(); break; case 'password': // Wrong password - setPostRequestElement('ok', $ret); + setPostRequestElement('login', $ret); displayMessage('{--WRONG_PASS--}'); destroyAdminSession(); break; diff --git a/inc/modules/admin/action- b/inc/modules/admin/action- index c2fd484e5f..a9aa88b6aa 100644 --- a/inc/modules/admin/action- +++ b/inc/modules/admin/action- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-admins.php b/inc/modules/admin/action-admins.php index 1fc5202128..11df2791ed 100644 --- a/inc/modules/admin/action-admins.php +++ b/inc/modules/admin/action-admins.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-bank.php b/inc/modules/admin/action-bank.php index c45a6e6272..334d9e25d9 100644 --- a/inc/modules/admin/action-bank.php +++ b/inc/modules/admin/action-bank.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-country.php b/inc/modules/admin/action-country.php index 9b05efbcda..92bbbd20d9 100644 --- a/inc/modules/admin/action-country.php +++ b/inc/modules/admin/action-country.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-coupon.php b/inc/modules/admin/action-coupon.php index c46aadc8d1..f1e3e3c4dd 100644 --- a/inc/modules/admin/action-coupon.php +++ b/inc/modules/admin/action-coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-doubler.php b/inc/modules/admin/action-doubler.php index 38cec6ab01..81623a6885 100644 --- a/inc/modules/admin/action-doubler.php +++ b/inc/modules/admin/action-doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-email.php b/inc/modules/admin/action-email.php index 52ce5e4b63..d12190be1b 100644 --- a/inc/modules/admin/action-email.php +++ b/inc/modules/admin/action-email.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-forced.php b/inc/modules/admin/action-forced.php index 702ba8ca99..70750e36b3 100644 --- a/inc/modules/admin/action-forced.php +++ b/inc/modules/admin/action-forced.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-grade.php b/inc/modules/admin/action-grade.php index dee21d9a1c..8f9e2a7396 100644 --- a/inc/modules/admin/action-grade.php +++ b/inc/modules/admin/action-grade.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-holiday.php b/inc/modules/admin/action-holiday.php index 655756ff76..0bcd0f9350 100644 --- a/inc/modules/admin/action-holiday.php +++ b/inc/modules/admin/action-holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-login.php b/inc/modules/admin/action-login.php index ea0ad36f94..082a6f2db2 100644 --- a/inc/modules/admin/action-login.php +++ b/inc/modules/admin/action-login.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index fc9bbeb347..21de2213b8 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-menu.php b/inc/modules/admin/action-menu.php index 8935f93e54..b4898a8352 100644 --- a/inc/modules/admin/action-menu.php +++ b/inc/modules/admin/action-menu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-misc.php b/inc/modules/admin/action-misc.php index 4c4657c20a..9e5334b70a 100644 --- a/inc/modules/admin/action-misc.php +++ b/inc/modules/admin/action-misc.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-mods.php b/inc/modules/admin/action-mods.php index 4f4f67cb07..4e2dac5245 100644 --- a/inc/modules/admin/action-mods.php +++ b/inc/modules/admin/action-mods.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-network.php b/inc/modules/admin/action-network.php index c58120631f..9470c94373 100644 --- a/inc/modules/admin/action-network.php +++ b/inc/modules/admin/action-network.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-newsletter.php b/inc/modules/admin/action-newsletter.php index 8016991c32..0720550635 100644 --- a/inc/modules/admin/action-newsletter.php +++ b/inc/modules/admin/action-newsletter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-payouts.php b/inc/modules/admin/action-payouts.php index 5980ffee50..f4ca2f2ca7 100644 --- a/inc/modules/admin/action-payouts.php +++ b/inc/modules/admin/action-payouts.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-rallye.php b/inc/modules/admin/action-rallye.php index 868b27ea3e..1cc1926816 100644 --- a/inc/modules/admin/action-rallye.php +++ b/inc/modules/admin/action-rallye.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-repair.php b/inc/modules/admin/action-repair.php index 2b7cbcbb78..3aa6494c5f 100644 --- a/inc/modules/admin/action-repair.php +++ b/inc/modules/admin/action-repair.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-setup.php b/inc/modules/admin/action-setup.php index 31f86585cd..e329c40bb4 100644 --- a/inc/modules/admin/action-setup.php +++ b/inc/modules/admin/action-setup.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-sponsor.php b/inc/modules/admin/action-sponsor.php index e3fddaf700..c51b931c65 100644 --- a/inc/modules/admin/action-sponsor.php +++ b/inc/modules/admin/action-sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-stats.php b/inc/modules/admin/action-stats.php index f4234e77dd..beeceecd07 100644 --- a/inc/modules/admin/action-stats.php +++ b/inc/modules/admin/action-stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-surfbar.php b/inc/modules/admin/action-surfbar.php index 53faa29346..71ce991180 100644 --- a/inc/modules/admin/action-surfbar.php +++ b/inc/modules/admin/action-surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php index f4267c41b0..2c37b8e28a 100644 --- a/inc/modules/admin/action-task.php +++ b/inc/modules/admin/action-task.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-theme.php b/inc/modules/admin/action-theme.php index 65eb3c2857..90f7d5e16f 100644 --- a/inc/modules/admin/action-theme.php +++ b/inc/modules/admin/action-theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-transfer.php b/inc/modules/admin/action-transfer.php index cc193c9d62..09e2be9db9 100644 --- a/inc/modules/admin/action-transfer.php +++ b/inc/modules/admin/action-transfer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/action-user.php b/inc/modules/admin/action-user.php index 605e38d4d4..4050ffa5e2 100644 --- a/inc/modules/admin/action-user.php +++ b/inc/modules/admin/action-user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/admin/action-wernis.php b/inc/modules/admin/action-wernis.php index b518380549..100db075d5 100644 --- a/inc/modules/admin/action-wernis.php +++ b/inc/modules/admin/action-wernis.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index ae6191a043..2bee0b51c1 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -130,7 +130,7 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) { if ($adminHash != '-1') { // Now, we need to encode the password in the same way the one is encoded in database $testHash = encodeHashForCookie($adminHash); - //* DEBUG: */ debugOutput('adminLogin=' . $adminLogin . ',passHash='.$passHash.',adminHash='.$adminHash.',testHash='.$testHash); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminLogin=' . $adminLogin . ',passHash='.$passHash.',adminHash='.$adminHash.',testHash='.$testHash); // If they both match, the login data is valid if ($testHash == $passHash) { @@ -143,25 +143,14 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) { } // END - if // Return status - //* DEBUG: */ debugOutput('ret='.$ret); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret='.$ret); return $ret; } // Do an admin action function doAdminAction () { - // Get default what - $what = getWhat(); - - //* DEBUG: */ debugOutput(__LINE__.'*'.$what.'/'.getModule().'/'.getAction().'/'.getWhat().'*'); - - // Remove any spaces from variable - if (empty($what)) { - // Default admin action is the overview page - $what = 'overview'; - } else { - // Secure it - $what = secureString($what); - } + // Determine correct 'what' value + $what = determineWhat(); // Get action value $action = getActionFromModuleWhat(getModule(), $what); @@ -191,12 +180,12 @@ WHERE `action`='%s' AND ( ( - `what`='%s' AND `what` != 'overview' + `what`='%s' AND `what` != 'welcome' ) OR ( ( `what`='' OR `what` IS NULL ) AND ( - '%s'='overview' + '%s'='welcome' ) ) ) @@ -233,14 +222,16 @@ LIMIT 1", loadTemplate('admin_main_footer', false, $content); } -// Checks wether current admin is allowed to access given action/what combination -// (only one is allowed to be null!) +/** + * Checks whether current admin is allowed to access given action/what + * combination (only one is allowed to be null!). + */ function isAdminAllowedAccessMenu ($action, $what = NULL) { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$action][$what])) { // ACL is always 'allow' when no ext-admins is installed // @TODO This can be rewritten into a filter - $GLOBALS[__FUNCTION__][$action][$what] = ((!isExtensionInstalledAndNewer('admins', '0.2.0')) || (isAdminsAllowedByAcl($action, $what))); + $GLOBALS[__FUNCTION__][$action][$what] = ((!isExtensionInstalledAndNewer('admins', '0.2.0')) || ((isExtensionActive('admins')) && (isAdminsAllowedByAcl($action, $what)))); } // END - if // Return the cached value @@ -279,9 +270,6 @@ ORDER BY // Filename $inc = sprintf("inc/modules/admin/action-%s.php", $mainContent['main_action']); - // Is the file readable? - $readable = isIncludeReadable($inc); - // Is the current admin allowed to access this 'action' menu? if (isAdminAllowedAccessMenu($mainContent['main_action'])) { if ($SUB === false) { @@ -292,7 +280,8 @@ ORDER BY $OUT .= '
  • · '; - if ($readable === true) { + // Is the file readable? + if (isIncludeReadable($inc)) { if (($mainContent['main_action'] == $action) && (empty($what))) { $OUT .= ''; } else { @@ -304,7 +293,8 @@ ORDER BY $OUT .= $mainContent['main_title']; - if ($readable === true) { + // Is the file readable? + if (isIncludeReadable($inc)) { if (($mainContent['main_action'] == $action) && (empty($what))) { $OUT .= ''; } else { @@ -364,52 +354,59 @@ ORDER BY if (ifAdminMenuHasEntries($mainContent['main_action'])) { // Sub menu has been called $SUB = true; - $OUT .= '
      '; - // Load all entries - while ($subContent = SQL_FETCHARRAY($result_what)) { - // Filename - $inc = sprintf("inc/modules/admin/what-%s.php", $subContent['sub_what']); - - // Is the file readable? - $readable = isIncludeReadable($inc); - - // Is the current admin allowed to access this 'what' menu? - if (isAdminAllowedAccessMenu(NULL, $subContent['sub_what'])) { - // Insert compiled title and description - $GLOBALS['menu']['title'][$subContent['sub_what']] = $subContent['sub_title']; - $GLOBALS['menu']['description'][$subContent['sub_what']] = $subContent['sub_descr']; - $OUT .= '
    • + // Do we have entries? + if (!SQL_HASZERONUMS($result_what)) { + // Start HTML code + $OUT .= '
  • '; - } // END - if - } // END - while + } // END - if + } // END - while + + // Finish HTML output + $OUT .= ''; + } // END - if // Free memory SQL_FREERESULT($result_what); - $OUT .= ''; } // END - if // Close li-tag @@ -460,12 +457,15 @@ ORDER BY } // Create a member selection box -function addMemberSelectionBox ($userid = NULL, $add_all = false, $return = false, $none = false, $field = 'userid') { +function addMemberSelectionBox ($userid = NULL, $add_all = false, $return = false, $none = false, $field = 'userid', $whereStatement = " WHERE `surname` NOT LIKE '{?tester_user_surname_prefix?}%'") { // Output selection form with all confirmed user accounts listed $result = SQL_QUERY('SELECT - `userid`,`surname`,`family` + `userid`, + `surname`, + `family` FROM `{?_MYSQL_PREFIX?}_user_data` +' . $whereStatement . ' ORDER BY `userid` ASC', __FUNCTION__, __LINE__); @@ -481,8 +481,11 @@ ORDER BY // Load all entries while ($content = SQL_FETCHARRAY($result)) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . intval($userid) . '/' . $content['userid']); $OUT .= ''; } // END - if - $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email'); + $OUT .= generateOptions('admins', 'id', 'login', $content['admin_id'], 'email'); $OUT .= ''; // Transfer ids @@ -85,9 +85,9 @@ if (isFormSent('edit')) { // Prepare content $content['id'] = $id; $content['mail_template'] = $template; - $content['admins'] = generateOptionList('admins', 'id', 'login', '', 'email');; + $content['admins'] = generateOptions('admins', 'id', 'login', '', 'email');; - if ($adminId2 > 0) { + if (isValidUserId($adminId2)) { // Add form for an additional admin $OUT .= loadTemplate('admin_admins_mails_edit_form', true, $content); } // END - if @@ -137,7 +137,7 @@ ORDER BY addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET `admin_id`=%s WHERE `id`=%s ORDER BY `id` LIMIT 1", array($content['admin_id'], $id), __FILE__, __LINE__, false)); - if (($content['admin_id'] < 1) && (isPostRequestElementSet('template', $id))) { + if ((!isValidUserId($content['admin_id'])) && (isPostRequestElementSet('template', $id))) { // Remove any other admin entries addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'", array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false)); diff --git a/inc/modules/admin/what-bonus.php b/inc/modules/admin/what-bonus.php index 7ec23cded9..b6e3279a5e 100644 --- a/inc/modules/admin/what-bonus.php +++ b/inc/modules/admin/what-bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index 589d69ae2a..dfa33c8949 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,8 +46,6 @@ addYouAreHereLink('admin', __FILE__); // Activated? if (ifInternalStatsEnabled()) { // Prepare data for the template - $content['db_hits'] = getStatsEntry('db_hits'); - $content['cache_hits'] = getStatsEntry('cache_hits'); $content['total_hits'] = (getStatsEntry('db_hits') + getStatsEntry('cache_hits')); $content['cache_perc'] = (getStatsEntry('cache_hits') / $content['total_hits'] * 100); diff --git a/inc/modules/admin/what-config_ b/inc/modules/admin/what-config_ index 2c7d39d59e..dec9005dcc 100644 --- a/inc/modules/admin/what-config_ +++ b/inc/modules/admin/what-config_ @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_active.php b/inc/modules/admin/what-config_active.php index d8f77a1a90..c75c29dafb 100644 --- a/inc/modules/admin/what-config_active.php +++ b/inc/modules/admin/what-config_active.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_admin.php b/inc/modules/admin/what-config_admin.php index 5c0d96621d..02b1803549 100644 --- a/inc/modules/admin/what-config_admin.php +++ b/inc/modules/admin/what-config_admin.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index 22da0498b7..bf00a05fe9 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 853d037f81..323428b03d 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_birthday.php b/inc/modules/admin/what-config_birthday.php index 9511582874..d42f8d9088 100644 --- a/inc/modules/admin/what-config_birthday.php +++ b/inc/modules/admin/what-config_birthday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 0bc5676d6a..00ab82d3a2 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,8 +51,12 @@ if (isFormSent()) { setPostRequestElement('turbo_rates', ''); $RATES = array(); foreach (postRequestElement('rate') as $rate) { + // Convert German comma to dot $rate = trim(convertCommaToDot($rate)); - if (!empty($rate)) $RATES[] = $rate; + + if (!empty($rate)) { + array_push($RATES, $rate); + } // END - if } // END - foreach setPostRequestElement('turbo_rates', trim(implode(';', $RATES))); unsetPostRequestElement('rate'); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 5fd1ef8f92..0cd9676bc7 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -70,7 +70,7 @@ if (isFormSent('add')) { // Display message displayMessage($content); -} elseif ((isFormSent()) && (isPostRequestElementSet('id')) && (is_array(postRequestElement('id')))) { +} elseif ((isFormSent()) && (ifPostContainsSelections('id'))) { // Change or delete categories... $TEXT = ''; foreach (postRequestElement('id') as $id => $cat) { diff --git a/inc/modules/admin/what-config_coupon.php b/inc/modules/admin/what-config_coupon.php index 1637fbe46e..e21ae269b2 100644 --- a/inc/modules/admin/what-config_coupon.php +++ b/inc/modules/admin/what-config_coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index 1e9c9915b9..d207c70492 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -65,7 +65,7 @@ if (isFormSent()) { // Number of rows to display (option lines!!!) foreach (array('new','pay','old') as $entry) { - $content['display_' . $entry] = generateOptionList( + $content['display_' . $entry] = generateOptions( '/ARRAY/', array( 5, diff --git a/inc/modules/admin/what-config_extensions.php b/inc/modules/admin/what-config_extensions.php index 361ec31082..bbcbf61230 100644 --- a/inc/modules/admin/what-config_extensions.php +++ b/inc/modules/admin/what-config_extensions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_holiday.php b/inc/modules/admin/what-config_holiday.php index a4f93e62d1..288ac131bd 100644 --- a/inc/modules/admin/what-config_holiday.php +++ b/inc/modules/admin/what-config_holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index aecc2ca5f6..def2a8c5d0 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_imprint.php b/inc/modules/admin/what-config_imprint.php index 132470cd8a..9330d322aa 100644 --- a/inc/modules/admin/what-config_imprint.php +++ b/inc/modules/admin/what-config_imprint.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 132897acc4..d5c0f8595f 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -72,9 +72,9 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Start of this exchange - if (getConfig('mt_start') > 0) { + if (getMtStart() > 0) { // Only show start - $content['mt_start'] = '' . generateDateTime(getConfig('mt_start'), 3) . ''; + $content['mt_start'] = '' . generateDateTime(getMtStart(), 3) . ''; } else { // Make start editable $content['mt_start'] = diff --git a/inc/modules/admin/what-config_menu.php b/inc/modules/admin/what-config_menu.php index 406d4325f8..0d7f41dc97 100644 --- a/inc/modules/admin/what-config_menu.php +++ b/inc/modules/admin/what-config_menu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index c5b66e5602..2d5f2e810d 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_network_api.php b/inc/modules/admin/what-config_network_api.php index 8ab691266e..341d1e4b14 100644 --- a/inc/modules/admin/what-config_network_api.php +++ b/inc/modules/admin/what-config_network_api.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_network_types.php b/inc/modules/admin/what-config_network_types.php index fd4efcfe2c..f6af185807 100644 --- a/inc/modules/admin/what-config_network_types.php +++ b/inc/modules/admin/what-config_network_types.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_newsletter.php b/inc/modules/admin/what-config_newsletter.php index c2028fc2f7..7bc1cdd86d 100644 --- a/inc/modules/admin/what-config_newsletter.php +++ b/inc/modules/admin/what-config_newsletter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_nickname.php b/inc/modules/admin/what-config_nickname.php index bbbc0f2faa..0815ab941e 100644 --- a/inc/modules/admin/what-config_nickname.php +++ b/inc/modules/admin/what-config_nickname.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_order.php b/inc/modules/admin/what-config_order.php index 2eb9838eef..e1773f1355 100644 --- a/inc/modules/admin/what-config_order.php +++ b/inc/modules/admin/what-config_order.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 27e28fc05f..f789d2a384 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 022278ebe6..43d6d7354d 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 11c5475390..f444ac4459 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -119,14 +119,18 @@ if (isFormSent()) { array('allow_direct_pay', 'ref_payout'), array(postRequestElement('allow_direct_pay'), $REF) ); - if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) { + if ((getRefPayout() == '0') && (postRequestElement('ref_payout') > 0)) { // Update account's ref_payout for "must-confirm" - addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) + addSql(sprintf("UPDATE + `{?_MYSQL_PREFIX?}_user_data` +SET + `ref_payout`=(%s - `mails_confirmed`) WHERE `mails_confirmed` < %s", $REF, $REF)); - } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) { + } elseif ((getRefPayout() > 0) && (postRequestElement('ref_payout') == '0')) { // Update account's ref_payout for "not-must-confirm" addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); + // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `locked_points`=0 WHERE `locked_points` > 0"); } diff --git a/inc/modules/admin/what-config_proxy.php b/inc/modules/admin/what-config_proxy.php index 6079d3bdcb..b83af2ffd2 100644 --- a/inc/modules/admin/what-config_proxy.php +++ b/inc/modules/admin/what-config_proxy.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 95ec381583..96d315663e 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,19 +37,19 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point addYouAreHereLink('admin', __FILE__); -if (isGetRequestElementSet('rallye')) { +if (isGetRequestElementSet('rallye_id')) { // Price submitted? if (isFormSent('add')) { if ((isPostRequestElementSet('level')) && ((isPostRequestElementSet('points')) || (isPostRequestElementSet('info')))) { // Submitted data is valid, but maybe we already have this price level? $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1", - array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye_id')), bigintval(postRequestElement('level'))), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Ok, new price level entered! @@ -59,18 +59,18 @@ if (isGetRequestElementSet('rallye')) { VALUES (%s, %s, '%s', '%s')", array( - bigintval(getRequestElement('rallye')), + bigintval(getRequestElement('rallye_id')), bigintval(postRequestElement('level')), - postRequestElement('points'), + convertCommaToDot(postRequestElement('points')), postRequestElement('info') ), __FILE__, __LINE__); - displayMessage('{--RALLYE_PRICE_LEVEL_SAVED--}'); + displayMessage('{--ADMIN_RALLYE_PRICE_LEVEL_SAVED--}'); } else { // Free memory SQL_FREERESULT($result); // Price level found - displayMessage('{--RALLYE_PRICE_ALREADY_FOUND--}'); + displayMessage('{--ADMIN_RALLYE_PRICE_ALREADY_FOUND--}'); } } } elseif (isFormSent('do_delete')) { @@ -83,9 +83,9 @@ if (isGetRequestElementSet('rallye')) { } // END - foreach // Output message - displayMessage('{--RALLYE_ENTRIES_DELETED--}'); + displayMessage('{--ADMIN_RALLYE_PRICES_DELETED--}'); } else { - displayMessage('{--RALLYE_ENTRIES_NOT_DELETED--}'); + displayMessage('{--ADMIN_RALLYE_PRICES_NOT_DELETED--}'); } } elseif (isFormSent('do_edit')) { // Change entries @@ -107,14 +107,14 @@ LIMIT 1", array( postRequestElement('rallye_id', $id), bigintval($level), - postRequestElement('points', $id), - postRequestElement('infos', $id), + convertCommaToDot(postRequestElement('points', $id)), + postRequestElement('info', $id), $id ), __FILE__, __LINE__); } // Output message - displayMessage('{--RALLYE_ENTRIES_CHANGED--}'); + displayMessage('{--ADMIN_RALLYE_PRICES_CHANGED--}'); } if (isFormSent('edit')) { @@ -124,30 +124,43 @@ LIMIT 1", $OUT = ''; foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye - $result = SQL_QUERY_ESC("SELECT `rallye_id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT + `id`, + `rallye_id`, + `price_level`, + `points`, + `info` +FROM + `{?_MYSQL_PREFIX?}_rallye_prices` +WHERE + `id`=%s +LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); + + // Fetch data $content = SQL_FETCHARRAY($result); + + // Free result SQL_FREERESULT($result); // Add more content - $content['rallye_content'] = generateOptionList('rallye_data', 'id', 'title', $content['rallye_id']); + $content['rallye_content'] = generateOptions('rallye_data', 'id', 'title', $content['rallye_id']); // Load row template and switch color - $OUT .= loadTemplate('admin_config_rallye_edit_row', true, $content); + $OUT .= loadTemplate('admin_edit_rallye_prices_row', true, $content); } // END - foreach // Remember row content $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye_id'] = bigintval(getRequestElement('rallye_id')); // Load main template - loadTemplate('admin_config_rallye_edit', false, $content); + loadTemplate('admin_edit_rallye_prices', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; - displayMessage($content); + displayMessage('{%message,ADMIN_RALLYE_NO_PRICES_SELECTED=' . getRequestElement('rallye_id') . '%}'); } } elseif (isFormSent('delete')) { // Check if at last one line is selected @@ -156,37 +169,51 @@ LIMIT 1", $OUT = ''; foreach (postRequestElement('sel') as $id => $sel) { // Load data to selected rallye - $result = SQL_QUERY_ESC("SELECT `rallye_id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT + `id`, + `rallye_id`, + `price_level`, + `points`, + `info` +FROM + `{?_MYSQL_PREFIX?}_rallye_prices` +WHERE + `id`=%s +LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); + + // Fetch data $content = SQL_FETCHARRAY($result); + + // Free result SQL_FREERESULT($result); // Load row template and switch color - $OUT .= loadTemplate('admin_config_rallye_del_row', true, $content); + $OUT .= loadTemplate('admin_delete_rallye_prices_row', true, $content); } // END - foreach $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye_id'] = bigintval(getRequestElement('rallye_id')); // Load main template - loadTemplate('admin_config_rallye_del', false, $content); + loadTemplate('admin_delete_rallye_prices', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; + $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; displayMessage($content); } } else { - // a rallye was selected, so check if there are already prices assigned... + // A rallye was selected, so check if there are already prices assigned... $result = SQL_QUERY_ESC("SELECT `id`,`price_level`,`points`,`info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Load all prices for the selected rallye $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch color - $OUT .= loadTemplate('admin_config_rallye_prices_row', true, $content); + $OUT .= loadTemplate('admin_list_rallye_prices_simple_row', true, $content); } // END - while // Free memory @@ -196,21 +223,27 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye_id'] = bigintval(getRequestElement('rallye_id')); // Load main template - loadTemplate('admin_config_rallye_prices', false, $content); + loadTemplate('admin_list_rallye_prices_simple', false, $content); } // END - if } // Add form for adding new price level - if (!isFormSent('edit')) { - loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye')); + if ((!isFormSent('edit')) && (!isFormSent('delete'))) { + loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye_id')); } // END - if } else { // No rallye selected so display all available without prices $result = SQL_QUERY("SELECT - d.id, d.admin_id, d.start_time, d.end_time, d.title, a.login, d.is_active + d.id AS `rallye_id`, + d.admin_id, + d.start_time, + d.end_time, + d.title, + a.login, + d.is_active FROM `{?_MYSQL_PREFIX?}_rallye_data` AS d LEFT JOIN @@ -224,9 +257,8 @@ ORDER BY $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - // @TODO rename: start->start_time, end->end_time - $content['start'] = generateDateTime($content['start_time'], '3'); - $content['end'] = generateDateTime($content['end_time'] , '3'); + $content['start_time'] = generateDateTime($content['start_time'], '3'); + $content['end_time'] = generateDateTime($content['end_time'] , '3'); // Load row template and switch color $OUT .= loadTemplate('admin_list_rallye_prices_row', true, $content); @@ -239,7 +271,7 @@ ORDER BY loadTemplate('admin_list_rallye_prices', false, $OUT); } else { // No rallyes setup so far - displayMessage('{--RALLYE_NO_RALLYES_SETUP--}'); + displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SETUP--}'); } } diff --git a/inc/modules/admin/what-config_refback.php b/inc/modules/admin/what-config_refback.php index 2139750b76..b064ea0c8e 100644 --- a/inc/modules/admin/what-config_refback.php +++ b/inc/modules/admin/what-config_refback.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index 41bc8009c5..04b4387c95 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index 12d75fc4c9..b48a373775 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 711c093e32..340d36aeb4 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -18,7 +18,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_removeip.php b/inc/modules/admin/what-config_removeip.php index 8b69aff5cf..1954b8fc40 100644 --- a/inc/modules/admin/what-config_removeip.php +++ b/inc/modules/admin/what-config_removeip.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index fbdad66842..5543933613 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,9 +50,9 @@ if (isFormSent()) { // Now you can never deselect the admin module, bah!!! ;-) if (($sel == 'Y') || ($mod == 'admin')) { // Add module to queue - $MODs[] = $mod; - } - } + array_push($MODs, $mod); + } // END - if + } // END - foreach // Implode array to string and remove posted mod array setPostRequestElement('rewrite_skip', implode(':', $MODs)); diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index 7093bde856..934acac81b 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index 48c0ef5d3a..d0c87d9626 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/admin/what-config_sponsor.php b/inc/modules/admin/what-config_sponsor.php index 61f8e265a9..2dfb880e6d 100644 --- a/inc/modules/admin/what-config_sponsor.php +++ b/inc/modules/admin/what-config_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_stats.php b/inc/modules/admin/what-config_stats.php index 4dd8807488..6936eb4702 100644 --- a/inc/modules/admin/what-config_stats.php +++ b/inc/modules/admin/what-config_stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 3503ac0d0b..def280a4f8 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_timezone.php b/inc/modules/admin/what-config_timezone.php index bde15b5fb5..cbd48fa65f 100644 --- a/inc/modules/admin/what-config_timezone.php +++ b/inc/modules/admin/what-config_timezone.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_title.php b/inc/modules/admin/what-config_title.php index 0079af39c5..d591b3c599 100644 --- a/inc/modules/admin/what-config_title.php +++ b/inc/modules/admin/what-config_title.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_top10.php b/inc/modules/admin/what-config_top10.php index 6848e17772..ad048afc37 100644 --- a/inc/modules/admin/what-config_top10.php +++ b/inc/modules/admin/what-config_top10.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index 3fcdb93b5b..e905ac3300 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_user.php b/inc/modules/admin/what-config_user.php index 4d867cf1ee..698c20abaf 100644 --- a/inc/modules/admin/what-config_user.php +++ b/inc/modules/admin/what-config_user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,8 +47,11 @@ if (isFormSent()) { // Save settings adminSaveSettingsFromPostData(); } else { + // Prepare gender selection box + $content['tester_user_gender_selection'] = generateGenderSelectionBox(getConfig('tester_user_gender'), 'tester_user_gender'); + // Load form template - loadTemplate('admin_config_user'); + loadTemplate('admin_config_user', false, $content); } // [EOF] diff --git a/inc/modules/admin/what-config_validator.php b/inc/modules/admin/what-config_validator.php index 8af98671e6..b239445ad9 100644 --- a/inc/modules/admin/what-config_validator.php +++ b/inc/modules/admin/what-config_validator.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 8bfd67aeb1..1b9fd7b9f8 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index d7a1ea4658..26717ff115 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -55,7 +55,7 @@ if (isFormSent()) { } } else { // Erotic selection - for ($idx = '0'; $idx <= 2; $idx++) { + for ($idx = 0; $idx <= 2; $idx++) { $content['yoomedia_erotic_allowed_' . $idx] = ''; } // END - for diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index 9b566b697b..2651db4b79 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index b416b3d0bd..8db0aa4c2e 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 3b7a9b0db2..07673f7616 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ if (isGetRequestElementSet('id')) { $content['reason'] = postRequestElement('reason'); // Prepare message and send it away - $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestElement('id'))); + $message = loadEmailTemplate('sponsor_deleted', $content, bigintval(getRequestElement('id'))); sendEmail($content['email'], '{--ADMIN_SPONSOR_DELETE_SUBJECT--}', $message); // Remove account diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index acc7054d03..246ab32973 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -107,7 +107,7 @@ $content['title'] = '{--TRANSFER_LIST_ALL--}'; // Show delete button here $content['delete'] = ' -'; +'; // Load final template loadTemplate('admin_list_transfer', false, $content); diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 00e7e343ab..69698955e8 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 887262cb61..78665e009f 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 93d133e3a1..8dff51a427 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point @@ -128,8 +128,7 @@ LIMIT 1", } // END - if // Convert time selection - $content = array(); $id = 'warning_interval_ye'; $skip = false; - convertSelectionsToEpocheTime(postRequestArray(), $content, $id, $skip); + convertSelectionsToEpocheTimeInPostData('warning_interval_ye'); // Save the sponsor handleSponsorRequest(postRequestArray()); diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 617549bc50..73b1ff5978 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -18,7 +18,7 @@ * @TODO Add support for ext-country * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 043bfdd40f..a2c6ec2cd7 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 428a6be1e1..226fa76ffb 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-email_stats.php b/inc/modules/admin/what-email_stats.php index 3bb7cfbdda..10866a9119 100644 --- a/inc/modules/admin/what-email_stats.php +++ b/inc/modules/admin/what-email_stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 10641a5907..b346d479b1 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 4e53ff7d3e..8e7c9ca55c 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -67,13 +67,13 @@ ORDER BY // @TODO Cant this be rewritten? while ($content = SQL_FETCHARRAY($result_menu)) { // Menu actions - $menus[] = $content['action']; + array_push($menus, $content['action']); // Menu titles - $titles[] = $content['title']; + array_push($titles, $content['title']); // Below this menu point should the new be added so we simply increase the sort value by 1 :-) - $below[] = $content['sort'] + 1; + array_push($below, $content['sort'] + 1); } // END - while // Remove double eintries @@ -116,13 +116,13 @@ ORDER BY `sort` ASC", // Read menu structure while ($content = SQL_FETCHARRAY($result)) { // Menu actions - $menus[$value_main][] = $content['what']; + array_push($menus[$value_main], $content['what']); // Menu titles - $titles[$value_main][] = $content['title']; + array_push($titles[$value_main], $content['title']); // Below this menu point should the new be added so we simply increase the sort value by 1 :-) - $below[$value_main][] = $content['sort'] + 1; + array_push($below[$value_main], $content['sort'] + 1); } // END - while // Remove double eintries diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 4bfdc91a1d..bca220d8f9 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -215,7 +215,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) { // Is highest position $NAVI = '{--LOWER--}'; - } elseif ($count == SQL_NUMROWS($result)) { + } elseif (SQL_NUMROWS($result) == $count) { // Is lowest position $NAVI = '{--HIGHER--}'; } elseif ($content['sort'] > 0) { diff --git a/inc/modules/admin/what-holiday_list.php b/inc/modules/admin/what-holiday_list.php index 50ba8e5bd8..9c0e7c3aae 100644 --- a/inc/modules/admin/what-holiday_list.php +++ b/inc/modules/admin/what-holiday_list.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-holiday_remove.php b/inc/modules/admin/what-holiday_remove.php index b932544dd5..8bfec71caa 100644 --- a/inc/modules/admin/what-holiday_remove.php +++ b/inc/modules/admin/what-holiday_remove.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_admins_acls.php b/inc/modules/admin/what-list_admins_acls.php index 559223c08f..c1de42d5fa 100644 --- a/inc/modules/admin/what-list_admins_acls.php +++ b/inc/modules/admin/what-list_admins_acls.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,7 +60,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { // Prepare data for the row template $content = array( 'id' => $content['id'], - 'admins_selection' => generateOptionList('admins', 'id', 'login', $content['admin_id'], 'default_acl'), + 'admins_selection' => generateOptions('admins', 'id', 'login', $content['admin_id'], 'default_acl'), 'action_selection' => adminMenuSelectionBox_DEPRECATED('action', $content['action_menu'], $content['id']), 'what_selection' => adminMenuSelectionBox_DEPRECATED('what', $content['what_menu'], $content['id']), ); @@ -221,7 +221,7 @@ VALUES (%s,'%s','%s','%s')", } // END - if // Prepare some constants for the template - $content['admins_selection'] = generateOptionList('admins', 'id', 'login', '', 'default_acl'); + $content['admins_selection'] = generateOptions('admins', 'id', 'login', '', 'default_acl'); $content['action_selection'] = adminMenuSelectionBox_DEPRECATED('action'); $content['what_selection'] = adminMenuSelectionBox_DEPRECATED('what'); diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index a312663747..5bad1b5779 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 33e0b206c0..a8d1c1720c 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); // Check if there is enougth selected $show = true; -if ((isPostRequestElementSet('id')) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { +if (ifPostContainsSelections('id')) { // Okay, which button was pressed? if (isFormSent('change')) { // Change permissions diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 03656ae703..c168877428 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -64,13 +64,17 @@ if (isBegRallyeEnabled()) { // Check if at least one is in the active rallye $result = SQL_QUERY("SELECT - `userid`,`email`,`beg_points`,`last_online` + `userid`, + `email`, + `beg_points`, + `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `beg_points` > 0 " . $lastOnline . " + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `beg_points` DESC, `last_online` DESC, @@ -81,7 +85,8 @@ ORDER BY $OUT = ''; $count = 1; $total = '0'; while ($content = SQL_FETCHARRAY($result)) { // Init variables - $WIN1 = ''; $WIN2 = ''; + $WIN1 = ''; + $WIN2 = ''; // Maybe he can win his active beg? if ($count <= getBegRanks()) { diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 7b3524d3cd..068106e5d4 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,7 +54,7 @@ if (isBonusRallyeActive()) { } // END - if // Old version ??? - $USE = '`turbo_bonus`'; + $pointsColumns = '`turbo_bonus`'; // Run filter chain to find more columns $add = runFilterChain('add_bonus_points_user_columns', ''); @@ -62,7 +62,7 @@ if (isBonusRallyeActive()) { // Add them, if some where configured if (!empty($add)) { // Add more bonus points here - $USE = '(0' . $add . ')'; + $pointsColumns = '(0' . $add . ')'; } // END - if // Init variables @@ -78,14 +78,15 @@ if (isBonusRallyeActive()) { $result = SQL_QUERY("SELECT `userid`, `email`, - " . $USE . " AS `points`, + " . $pointsColumns . " AS `points`, `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND - " . $USE . " > 0 + " . $pointsColumns . " > 0 " . $lastOnline . " + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `points` DESC, `last_online` DESC, diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index fecc5764b0..d7d6dd1e42 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 2523a39fe1..35cb317465 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -79,7 +79,9 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl 'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}' )); } elseif (((isFormSent('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) { - if (count(postRequestElement('id')) > 0) { + // Do we have entries? + if (ifPostContainsSelections('id')) { + // Is the proper form sent? if (isFormSent('edit')) { // Edit template $row = 'admin_edit_country_row'; @@ -155,7 +157,7 @@ LIMIT 1"); } elseif ((isFormSent('do_delete')) && (isPostRequestElementSet('id'))) { // Remove $IDs = implode(',', array_keys(postRequestElement('id'))); - addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id')).""); + addSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (' . $IDs . ') LIMIT ' . countPostSelection('id') . ''); // Create message $message = '{--ADMIN_COUNTRIES_REMOVED--}'; diff --git a/inc/modules/admin/what-list_coupon.php b/inc/modules/admin/what-list_coupon.php index e438316d82..ff5474fdd8 100644 --- a/inc/modules/admin/what-list_coupon.php +++ b/inc/modules/admin/what-list_coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,7 +51,10 @@ if (isGetRequestElementSet('coupon_id')) { UNIX_TIMESTAMP(u.`cashed_on`) AS `cashed_on`, UNIX_TIMESTAMP(d.`coupon_created`) AS `coupon_created`, UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`, - d.`points`, d.`total_created`, d.`total_cashed`, d.`coupon_description` + d.`points`, + d.`total_created`, + d.`total_cashed`, + d.`coupon_description` FROM `{?_MYSQL_PREFIX?}_user_coupons` AS u INNER JOIN @@ -67,7 +70,7 @@ ORDER BY ), __FILE__, __LINE__); // Do we have entries? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Init variable $OUT = ''; @@ -107,7 +110,7 @@ ORDER BY d.`id` ASC', __FILE__, __LINE__); // Do we have entries? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Init variable $OUT = ''; diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 4ede5eee50..4bcb982a76 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_email_max_rec.php b/inc/modules/admin/what-list_email_max_rec.php index cae2ae1475..12c9599acc 100644 --- a/inc/modules/admin/what-list_email_max_rec.php +++ b/inc/modules/admin/what-list_email_max_rec.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_forced_ads.php b/inc/modules/admin/what-list_forced_ads.php index c1e30869e3..b728277d3d 100644 --- a/inc/modules/admin/what-list_forced_ads.php +++ b/inc/modules/admin/what-list_forced_ads.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_ads_id')) || (!is_array(postRequestElement('forced_ads_id'))) || (count(postRequestElement('forced_ads_id')) == 0))) { +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_ads_id'))) { // Not found so output message displayMessage('{--ADMIN_FORCED_ADS_NO_SELECTIONS--}'); diff --git a/inc/modules/admin/what-list_forced_campaigns.php b/inc/modules/admin/what-list_forced_campaigns.php index 48992aec85..3a1ad98836 100644 --- a/inc/modules/admin/what-list_forced_campaigns.php +++ b/inc/modules/admin/what-list_forced_campaigns.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_campaigns_id')) || (!is_array(postRequestElement('forced_campaigns_id'))) || (count(postRequestElement('forced_campaigns_id')) == 0))) { +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_campaign_id'))) { // Not found so output message displayMessage('{--ADMIN_FORCED_CAMPAIGNS_NO_SELECTIONS--}'); @@ -77,6 +77,24 @@ if (isFormSent('add')) { } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_forced_campaigns'); +} elseif (isFormSent('lock')) { + // Un-/lock selected campaigns. This does not work for pending campaigns + showEntriesByXmlCallback('admin_lock_show_forced_campaigns'); + + // Do not show the list of URLs after this template + $show = false; +} elseif (isFormSent('do_lock')) { + // Un-/lock selected campaigns. This does not work for pending campaigns + showEntriesByXmlCallback('admin_lock_do_forced_campaigns'); +} elseif (isFormSent('activate')) { + // List activation of selected campaigns. This does not work for locked campaigns + if (doForcedAdminActivateCampaigns()) { + // Has all worked + displayMessage('{--ADMIN_FORCED_CAMPAIGNS_ACTIVATED_DONE--}'); + } else { + // Something went wrong + displayMessage('{--ADMIN_FORCED_CAMPAIGNS_ACTIVATED_FAILED--}'); + } } // Show entries? @@ -85,11 +103,16 @@ if ($show === false) { return false; } // END - if -// List all URLs +// List all campaigns showEntriesByXmlCallback('admin_list_forced_campaigns'); +// Init array +$content = array( + 'reload' => createTimeSelections(0, 'forced_campaign_reload_lock', 'Dhms') +); + // Display form for adding a forced-ad -loadTemplate('admin_add_forced_campaign'); +loadTemplate('admin_add_forced_campaign', false, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_forced_costs.php b/inc/modules/admin/what-list_forced_costs.php index 57bb08b4aa..81c683069e 100644 --- a/inc/modules/admin/what-list_forced_costs.php +++ b/inc/modules/admin/what-list_forced_costs.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestElementSet('forced_costs_id')) || (!is_array(postRequestElement('forced_costs_id'))) || (count(postRequestElement('forced_costs_id')) == 0))) { +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_costs_id'))) { // Not found so output message displayMessage('{--ADMIN_FORCED_COSTS_NO_SELECTIONS--}'); diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index f69f814f28..772b46616b 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 0acde7aa19..714045236c 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -51,22 +51,26 @@ if (!isExtensionActive('mailid')) { if (isGetRequestElementSet('userid')) { // Check if the user already exists if (fetchUserData(getRequestElement('userid'))) { - // Grab user's all unconfirmed mails - // @TODO Try to rewrite this to a filter + // Default is ext-bonus is not installed + $rowName = 'stats_id'; + + // Is ext-bonus installed? if (isExtensionActive('bonus')) { - // Load bonus id - $result = SQL_QUERY_ESC("SELECT `stats_id`,`bonus_id`,`link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); - } else { - // Load stats id (2nd will be ignored later! But it is needed for the same fetchrow command) - $result = SQL_QUERY_ESC("SELECT `stats_id`,`stats_id`,`link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); - } + // Use bonus_id + $linkDataName = 'bonus_id'; + } // END - if + + // Load user links data + $result = SQL_QUERY_ESC("SELECT `userid`, `stats_id`, `%s`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", + array( + $linkDataName, + bigintval(getRequestElement('userid')) + ), __FILE__, __LINE__); // Do we have some entries? if (!SQL_HASZERONUMS($result)) { // Some unconfirmed mails left - if (getRequestElement('delete') == "all") { + if (getRequestElement('delete') == 'all') { // Delete all unconfirmed mails by this user SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s LIMIT %s", array(bigintval(getRequestElement('userid')), SQL_NUMROWS($result)), __FILE__, __LINE__); @@ -82,61 +86,55 @@ if (isGetRequestElementSet('userid')) { $OUT = ''; // List all unconfirmed mails - // @TODO Find a way to rewrite this. See some lines above for different queries - while (list($id, $id2, $type) = SQL_FETCHROW($result)) { - // Initializes all variables - $mailId = ''; - $problemMessage = '{--ADMIN_GENERAL_MAIL_PROBLEM--}'; + while ($linkData = SQL_FETCHARRAY($result)) { + // Initializes all other elements + $linkData['mail_id'] = ''; + $linkData['problem'] = '{--ADMIN_GENERAL_MAIL_PROBLEM--}'; $result_data = false; // Load data from stats table... // @TODO Rewrite this to includes/filter - switch ($type) { + switch ($linkData['link_type']) { case 'NORMAL': - $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp_ordered` AS `timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__); - $type = 'mailid'; $mailId = $id; $problemMessage = '{--NORMAL_MAIL_PROBLEM--}'; - $LINK = '' . $id . ''; + $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp_ordered` AS `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", + array(bigintval($linkData['stats_id'])), __FILE__, __LINE__); + $linkData['link_type'] = 'mailid'; + $linkData['mail_id'] = $linkData['stats_id']; + $linkData['problem'] = '{--NORMAL_MAIL_PROBLEM--}'; break; case 'BONUS': - $result_data = SQL_QUERY_ESC("SELECT `subject`,`timestamp`,`cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval($id2)), __FILE__, __LINE__); - $type = 'bonusid'; $mailId = $id2; $problemMessage = '{--BONUS_MAIL_PROBLEM--}'; - $LINK = '' . $id2 . ''; + $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", + array(bigintval($linkData['bonus_id'])), __FILE__, __LINE__); + $linkData['link_type'] = 'bonusid'; + $linkData['mail_id'] = $linkData['bonus_id']; + $linkData['problem'] = '{--BONUS_MAIL_PROBLEM--}'; break; default: // Problem in application detected! - // Log the error - logDebugMessage(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type)); + reportBug(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $linkData['link_type'])); break; } // END - switch // Do we have an entry? if (SQL_NUMROWS($result_data) == 1) { // Mail was found - $content = SQL_FETCHARRAY($result_data); + $mailData = merge_array($linkData, SQL_FETCHARRAY($result_data)); // Fix empty subject - if (empty($content['subject'])) { + if (empty($mailData['subject'])) { // The subject line is empty so we use the default - $content['subject'] = '{--DEFAULT_SUBJECT_LINE--}'; + $mailData['subject'] = '{--DEFAULT_SUBJECT_LINE--}'; } // END - if // Prepare data for the row template - $content['link'] = $LINK; - $content['timestamp'] = generateDateTime($content['timestamp'], 0); + $mailData['timestamp'] = generateDateTime($mailData['timestamp'], 0); // Load row template - $OUT .= loadTemplate('admin_list_links_row', true, $content); + $OUT .= loadTemplate('admin_list_links_row', true, $mailData); } else { // Load template for error - $OUT .= loadTemplate('admin_list_links_problem', true, - array( - 'problem' => $problemMessage, - 'mail_id' => $mailId - ) - ); + $OUT .= loadTemplate('admin_list_links_problem', true, $linkData); } // Free result @@ -144,10 +142,12 @@ if (isGetRequestElementSet('userid')) { } // END - while // Remember list in constant for the template - $content['email'] = '' . getUserData('email') . ''; - $content['rows'] = $OUT; - $content['nums'] = SQL_NUMROWS($result); - $content['userid'] = bigintval(getRequestElement('userid')); + $content = array( + 'email' => '' . getUserData('email') . '', + 'rows' => $OUT, + 'nums' => SQL_NUMROWS($result), + 'userid' => bigintval(getRequestElement('userid')), + ); // Free memory SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-list_network_array_translation.php b/inc/modules/admin/what-list_network_array_translation.php index 4b7a3734d3..85cebb6d00 100644 --- a/inc/modules/admin/what-list_network_array_translation.php +++ b/inc/modules/admin/what-list_network_array_translation.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_network_request_params.php b/inc/modules/admin/what-list_network_request_params.php index 78d8887e6b..116c9592bb 100644 --- a/inc/modules/admin/what-list_network_request_params.php +++ b/inc/modules/admin/what-list_network_request_params.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index 5366184a77..859fe3852e 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_network_vcheck_params.php b/inc/modules/admin/what-list_network_vcheck_params.php index b0347f8e36..167c499534 100644 --- a/inc/modules/admin/what-list_network_vcheck_params.php +++ b/inc/modules/admin/what-list_network_vcheck_params.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/admin/what-list_networks.php b/inc/modules/admin/what-list_networks.php index 8a686a1002..1f90f6ea5c 100644 --- a/inc/modules/admin/what-list_networks.php +++ b/inc/modules/admin/what-list_networks.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_nickname.php b/inc/modules/admin/what-list_nickname.php index 7f6f70e465..a52ef8323d 100644 --- a/inc/modules/admin/what-list_nickname.php +++ b/inc/modules/admin/what-list_nickname.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index d1c7db19ef..82fc0c9317 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 1ad813d8af..58bb57a2dd 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -70,7 +70,7 @@ if (isGetRequestElementSet('pid')) { // Load user's data if (!fetchUserData($userid)) { // Abort here because it is not valid! - debug_report_bug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.'); + reportBug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.'); } // END - if if ((getRequestElement('do') == 'accept') && (getUserData('email') != '')) { @@ -131,7 +131,7 @@ LIMIT 1", // Clear task if ($taskId > 0) { runFilterChain('solve_task', $taskId); - } + } // END - if // Clear payout request SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-list_point_accounts.php b/inc/modules/admin/what-list_point_accounts.php index 8549996049..b6f542d442 100644 --- a/inc/modules/admin/what-list_point_accounts.php +++ b/inc/modules/admin/what-list_point_accounts.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,5 +43,59 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addYouAreHereLink('admin', __FILE__); +// By default show the list... +$show = true; + +// Check for 'url_id' element +if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('id'))) { + // Not found so output message + displayMessage('{--ADMIN_POINT_ACCOUNTS_NO_SELECTIONS--}'); + + // Abort here + return; +} // END - if + +// Edit or delete button hit? +if (isFormSent('add')) { + // Add new forced ad + if (doAdminAddPointsAccountByType(postRequestArray(), 'CUSTOM')) { + // Did work + displayMessage('{--ADMIN_POINT_ACCOUNT_ADDED--}'); + } else { + // Doesn't work + displayMessage('{--ADMIN_POINT_ACCOUNT_NOT_ADDED--}'); + } +} elseif (isFormSent('edit')) { + // Show only custom entries for editing + showEntriesByXmlCallback('admin_edit_show_point_accounts'); + + // Do not show the list of URLs after this template + $show = false; +} elseif (isFormSent('do_edit')) { + // Change data of only custom entries + showEntriesByXmlCallback('admin_edit_do_point_accounts'); +} elseif ((isFormSent('delete')) && (ifPointsAccountTypeMatchesPost('CUSTOM'))) { + // Show only custom entries for deleting + showEntriesByXmlCallback('admin_delete_show_point_accounts'); + + // Do not show the list of URLs after this template + $show = false; +} elseif ((isFormSent('do_delete')) && (ifPointsAccountTypeMatchesPost('CUSTOM'))) { + // Remove only custom entries + showEntriesByXmlCallback('admin_delete_do_point_accounts'); +} + +// Show entries? +if ($show === false) { + // No, a form has already been show + return false; +} // END - if + +// List all campaigns +showEntriesByXmlCallback('admin_list_point_accounts'); + +// Display form for adding a forced-ad +loadTemplate('admin_add_point_accounts'); + // [EOF] ?> diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index c4eafb6ad1..14c2124e01 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $message = ''; // Quick actions on a rallye -if (isGetRequestElementSet('rallye')) { +if (isGetRequestElementSet('rallye_id')) { // Init SQL queries initSqls(); @@ -56,13 +56,13 @@ if (isGetRequestElementSet('rallye')) { switch (getRequestElement('activate')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='Y' WHERE `id`=%s AND `is_active`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='N' WHERE `id`=%s AND `is_active`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; } // END - switch @@ -71,13 +71,13 @@ if (isGetRequestElementSet('rallye')) { switch (getRequestElement('notify')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='Y' WHERE `id`=%s AND `send_notify`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='N' WHERE `id`=%s AND `send_notify`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; } // END - switch @@ -86,13 +86,13 @@ if (isGetRequestElementSet('rallye')) { switch (getRequestElement('auto')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='Y' WHERE `id`=%s AND `auto_add_new_user`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='N' WHERE `id`=%s AND `auto_add_new_user`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) ); break; } // END - switch @@ -121,10 +121,10 @@ if (isGetRequestElementSet('rallye')) { runFilterChain('run_sqls'); // Output message - $message = '{--RALLYE_DELETED--}'; + $message = '{--ADMIN_RALLYE_DELETED--}'; } else { // No rallye selected to delete! - $message = '{--RALLYE_DELETE_NOTHING_SELECTED--}'; + $message = '{--ADMIN_RALLYE_DELETE_NOTHING_SELECTED--}'; } } elseif (isFormSent('do_edit')) { // Change rallye @@ -138,8 +138,8 @@ if (isGetRequestElementSet('rallye')) { $id = bigintval($id); // Generate timestamps - $START = mktime(postRequestElement('start_hour', $id), postRequestElement('start_min', $id), postRequestElement('start_sec', $id), postRequestElement('start_month', $id), postRequestElement('start_day', $id), postRequestElement('start_year', $id)); - $END = mktime(postRequestElement('end_hour', $id) , postRequestElement('end_min', $id) , postRequestElement('end_sec', $id) , postRequestElement('end_month', $id) , postRequestElement('end_day', $id) , postRequestElement('end_year', $id) ); + $START = mktime(postRequestElement('start_time_hour', $id), postRequestElement('start_time_min', $id), 0, postRequestElement('start_time_month', $id), postRequestElement('start_time_day', $id), postRequestElement('start_time_year', $id)); + $END = mktime(postRequestElement('end_time_hour', $id) , postRequestElement('end_time_min', $id) , 0, postRequestElement('end_time_month', $id) , postRequestElement('end_time_day', $id) , postRequestElement('end_time_year', $id) ); // Update entry addSql(SQL_QUERY_ESC("UPDATE @@ -171,11 +171,21 @@ LIMIT 1", runFilterChain('run_sqls'); // Output message - $message = '{--RALLYE_CHANGED--}'; + $message = '{--ADMIN_RALLYE_CHANGED--}'; } } -if (isFormSent('edit')) { +// edit/delete are both handled the same way +if ((isFormSent('edit')) || (isFormSent('delete'))) { + // Default is 'edit' + $mode = 'edit'; + + // Is delete button used? + if (isFormSent('delete')) { + // Then set it + $mode = 'delete'; + } // END - if + // Check for selections if (ifPostContainsSelections()) { // Make all selected and deactivated rallyes editable @@ -183,63 +193,79 @@ if (isFormSent('edit')) { foreach (postRequestElement('sel') as $id => $selected) { // Load rallye basic data $result = SQL_QUERY_ESC("SELECT - `title`,`descr`,`template`,`start_time`,`end_time`,`min_users`,`min_prices` + `title`, + `descr`, + `template`, + `start_time`, + `end_time`, + `min_users`, + `min_prices` FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); + // Fetch an array $content = SQL_FETCHARRAY($result); // Free result SQL_FREERESULT($result); - // Starting day - $content['s_sec'] = addSelectionBox('sec' , getSecond($content['start_time']) , 'start', $id); - $content['s_min'] = addSelectionBox('min' , getMinute($content['start_time']) , 'start', $id); - $content['s_hour'] = addSelectionBox('hour' , getShortHour($content['start_time']), 'start', $id); - $content['s_day'] = addSelectionBox('day' , getDay($content['start_time']) , 'start', $id); - $content['s_month'] = addSelectionBox('month', getMonth($content['start_time']) , 'start', $id); - $content['s_year'] = addSelectionBox('year' , getYear($content['start_time']) , 'start', $id); - - // Ending day - $content['e_sec'] = addSelectionBox('sec' , getSecond($content['end_time']) , 'end' , $id); - $content['e_min'] = addSelectionBox('min' , getMinute($content['end_time']) , 'end' , $id); - $content['e_hour'] = addSelectionBox('hour' , getShortHour($content['end_time']) , 'end' , $id); - $content['e_day'] = addSelectionBox('day' , getDay($content['end_time']) , 'end' , $id); - $content['e_month'] = addSelectionBox('month', getMonth($content['end_time']) , 'end' , $id); - $content['e_year'] = addSelectionBox('year' , getYear($content['end_time']) , 'end' , $id); - - // Remember other values - $content['templ'] = addReferralRallyeTemplateSelection('templ['.$id.']', $content['template']); - $content['id'] = $id; + // Only for editing ... + if ($mode == 'edit') { + // Starting day + $content['s_min'] = addSelectionBox('min' , getMinute($content['start_time']) , 'start_time', $id); + $content['s_hour'] = addSelectionBox('hour' , getShortHour($content['start_time']), 'start_time', $id); + $content['s_day'] = addSelectionBox('day' , getDay($content['start_time']) , 'start_time', $id); + $content['s_month'] = addSelectionBox('month', getMonth($content['start_time']) , 'start_time', $id); + $content['s_year'] = addSelectionBox('year' , getYear($content['start_time']) , 'start_time', $id); + + // Ending day + $content['e_min'] = addSelectionBox('min' , getMinute($content['end_time']) , 'end_time' , $id); + $content['e_hour'] = addSelectionBox('hour' , getShortHour($content['end_time']) , 'end_time' , $id); + $content['e_day'] = addSelectionBox('day' , getDay($content['end_time']) , 'end_time' , $id); + $content['e_month'] = addSelectionBox('month', getMonth($content['end_time']) , 'end_time' , $id); + $content['e_year'] = addSelectionBox('year' , getYear($content['end_time']) , 'end_time' , $id); + + // Remember other values + $content['templ'] = addReferralRallyeTemplateSelection('templ[' . $id . ']', $content['template']); + } else { + // Convert timestamps into human-readable + $content['start_time'] = generateDateTime($content['start_time'], '2'); + $content['end_time'] = generateDateTime($content['end_time'] , '2'); + } + + // Remember id number + $content['rallye_id'] = bigintval($id); // Output row - $OUT .= loadTemplate('admin_edit_rallyes_row', true, $content); + $OUT .= loadTemplate('admin_' . $mode . '_rallyes_row', true, $content); } // END - foreach // Load final template - loadTemplate('admin_edit_rallyes', false, $OUT); + loadTemplate('admin_' . $mode . '_rallyes', false, $OUT); } else { // Nothing selected to edit - displayMessage('{--RALLYE_NO_RALLYES_SELECTED--}'); + displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SELECTED--}'); } -} elseif ((getRequestElement('sub') == 'users') && (getRequestElement('rallye') > 0)) { +} elseif ((getRequestElement('sub') == 'users') && (getRequestElement('rallye_id') > 0)) { // List users and their refs before start and current $result = SQL_QUERY_ESC("SELECT - `userid`,`refs`,`curr_points` + `userid`, + `refs`, + `curr_points` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s ORDER BY `userid` ASC", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { $OUT = ''; - $content['rallye'] = getRequestElement('rallye'); + $content['rallye_id'] = bigintval(getRequestElement('rallye_id')); while ($row = SQL_FETCHARRAY($result)) { // Check for referral count $count = getReferralRallyeRefsCount($row['userid'], $row['refs']); @@ -255,7 +281,7 @@ ORDER BY } // END - if // Get user points - $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1"); + $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1"); //* DEBUG: */ debugOutput(basename(__FILE__).':userid='.$row['userid'].',points='.$points.',opoints='.$row['curr_points']); // Prepare content @@ -273,8 +299,8 @@ ORDER BY } // END - while // Remember rows - $content['rows'] = $OUT; - $content['rallye'] = getRequestElement('rallye'); + $content['rows'] = $OUT; + $content['rallye_id'] = bigintval(getRequestElement('rallye_id')); // Free memory SQL_FREERESULT($result); @@ -283,13 +309,24 @@ ORDER BY loadTemplate('admin_list_rallye_usr', false, $content); } else { // No entries found? - displayMessage('{--RALLYE_ADMIN_USERS_404--}'); + displayMessage('{--ADMIN_RALLYE_USERS_404--}'); } } else { // Start listing rallyes $result = SQL_QUERY("SELECT - `id`,`admin_id`,`title`,`descr`,`template`,`start_time`,`end_time`, - `auto_add_new_user`,`is_active`,`send_notify`,`notified`,`min_users`,`min_prices` + `id` AS `rallye_id`, + `admin_id`, + `title`, + `descr`, + `template`, + `start_time`, + `end_time`, + `auto_add_new_user`, + `is_active`, + `send_notify`, + `notified`, + `min_users`, + `min_prices` FROM `{?_MYSQL_PREFIX?}_rallye_data` ORDER BY @@ -301,19 +338,19 @@ ORDER BY $OUT = ''; while ($data = SQL_FETCHARRAY($result)) { // Count joined userids - $users = countSumTotalData($data['id'], 'rallye_users', 'id', 'rallye_id', true); + $users = countSumTotalData($data['rallye_id'], 'rallye_users', 'rallye_id', 'rallye_id', true); // Did some users joined this rallye? if ($users > 0) { // List joined users - $users = '' . $users . ''; + $users = '{%pipe,translateComma=' . $users . '%}'; } // END - if // Transfer data into array for the template $row = array( - 'select' => '', + 'select' => '', 'admin_id' => $data['admin_id'], - 'id' => $data['id'], + 'rallye_id' => $data['rallye_id'], 'title' => $data['title'], 'template' => $data['template'], 'users_content' => $users, @@ -323,7 +360,7 @@ ORDER BY 'send_notify' => $data['send_notify'], 'auto_add_new_user' => $data['auto_add_new_user'], 'notified' => $data['notified'], - 'prices_cnt' => countSumTotalData($data['id'], 'rallye_prices', 'id', 'rallye_id', true), + 'prices_cnt' => countSumTotalData($data['rallye_id'], 'rallye_prices', 'rallye_id', 'rallye_id', true), 'descr' => $data['descr'], 'min_users' => $data['min_users'], 'min_prices' => $data['min_prices'], @@ -333,13 +370,13 @@ ORDER BY switch ($data['is_active']) { case 'Y': // Rallye is active so do not edit it! - $row['select'] = '
    ' . $row['id'] . '
    '; - $row['active_title'] = '{--RALLYE_DEACTIVATE_NOW--}'; + $row['select'] = '
    ' . $row['rallye_id'] . '
    '; + $row['active_title'] = '{--ADMIN_RALLYE_DEACTIVATE_NOW--}'; $row['active'] = '0'; break; case 'N': - $row['active_title'] = '{--RALLYE_ACTIVATE_NOW--}'; + $row['active_title'] = '{--ADMIN_RALLYE_ACTIVATE_NOW--}'; $row['active'] = 1; break; } // END - switch @@ -347,12 +384,12 @@ ORDER BY // Notification to members? switch ($data['send_notify']) { case 'Y': - $row['notify_title'] = '{--RALLYE_STOP_NOTIFY_NOW--}'; + $row['notify_title'] = '{--ADMIN_RALLYE_STOP_NOTIFY_NOW--}'; $row['notify'] = '0'; break; case 'N': - $row['notify_title'] = '{--RALLYE_START_NOTIFY_NOW--}'; + $row['notify_title'] = '{--ADMIN_RALLYE_START_NOTIFY_NOW--}'; $row['notify'] = 1; break; } // END - switch @@ -360,12 +397,12 @@ ORDER BY // Auto-add of new joined members? switch ($data['auto_add_new_user']) { case 'Y': - $row['auto_title'] = '{--RALLYE_STOP_AUTO_ADD_NOW--}'; + $row['auto_title'] = '{--ADMIN_RALLYE_STOP_AUTO_ADD_NOW--}'; $row['auto'] = '0'; break; case 'N': - $row['auto_title'] = '{--RALLYE_START_AUTO_ADD_NOW--}'; + $row['auto_title'] = '{--ADMIN_RALLYE_START_AUTO_ADD_NOW--}'; $row['auto'] = 1; break; } // END - switch @@ -384,7 +421,7 @@ ORDER BY loadTemplate('admin_list_rallyes', false, $content); } else { // No rallyes setup so far - displayMessage('{--RALLYE_NO_RALLYES_SETUP--}'); + displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SETUP--}'); } } diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 2c410a5e8a..c1367118a8 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -11,7 +11,7 @@ * Kurzbeschreibung : Alle generierten Refs eines Mitgliedes anzeigen * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -48,15 +48,16 @@ if (isGetRequestElementSet('userid')) { // User found? if (fetchUserData($userid)) { // Get total refs - $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); - $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); + $totalReferrals = getUsersTotalReferrals($userid); + $totalLockedReferrals = getUsersTotalLockedReferrals($userid); // Output info message - displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck)); + displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $totalReferrals, $totalLockedReferrals)); // Load all referral levels $result_levels = SQL_QUERY("SELECT - `level`,`percents` + `level`, + `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE @@ -80,11 +81,11 @@ ORDER BY // Do we have levels? if (!SQL_HASZERONUMS($result_refs)) { // Count entries - $menge = countSumTotalData($userid, 'user_data', 'userid', 'refid', true); - $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); + $totalReferrals = getUsersTotalReferrals($userid, $levels['level']); + $totalLockedReferrals = getUsersTotalLockedReferrals($userid, $levels['level']); // Output info message - $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck); + $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $totalReferrals, $totalLockedReferrals); // Init variables $OUT_REFS = ''; @@ -100,12 +101,8 @@ ORDER BY // @TODO Try to rewrite some to EL $content = array( 'userid' => getUserData('userid'), - 'gender' => getUserData('gender'), - 'refs_link' => 0, - 'surname' => getUserData('surname'), - 'family' => getUserData('family'), + 'refs_link' => '0', 'email' => '[' . getUserData('email') . ']', - 'status' => getUserData('status'), 'registered' => generateDateTime(getUserData('joined'), 3), ); diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 2fd5305818..fe3fe710ba 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 7655eb61c1..77676c6544 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index df01ab3fbe..9cca77305e 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index ff09e4c080..34865328c8 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : List surfbar member actions * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Auflistung von Mitgliederaktionen der Surfbar * + * Kurzbeschreibung : Auflistung von Mitglieder-Aktionen der Surfbar * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index e8bed5d229..d06b8285a7 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = true; // Check for 'url_id' element -if ((countRequestPost() > 0) && ((!isPostRequestElementSet('url_id')) || (!is_array(postRequestElement('url_id'))) || (count(postRequestElement('url_id')) == 0))) { +if ((countRequestPost() > 0) && (!ifPostContainsSelections('url_id'))) { // Not found so output message displayMessage('{--ADMIN_SURFBAR_NO_SELECTIONS--}'); diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 3d842ec5d5..5d6c226cb7 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -101,7 +101,7 @@ ORDER BY __FILE__, __LINE__); if ((ifPostContainsSelections()) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (isPostRequestElementSet('unassign')) { + if (isFormSent('unassign')) { // Unassign from tasks foreach (postRequestElement('sel') as $id => $sel) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1", @@ -121,7 +121,7 @@ ORDER BY } // END - foreach } else { // Unknown action performed - debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=
    %s
    ", print_r(postRequestArray(), true))); + reportBug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=
    %s
    ", print_r(postRequestArray(), true))); } // Update query diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 959ee3f4bf..52e14432ef 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,12 @@ addYouAreHereLink('admin', __FILE__); // We only need outgoing transfers $result = SQL_QUERY('SELECT - `userid` AS `from_userid`,`to_userid`,`trans_id`,`points`,`reason`,`time_trans` + `userid` AS `from_userid`, + `to_userid`, + `trans_id`, + `points`, + `reason`, + `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 0b9172531c..6dadfa922b 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 649aec6ab3..28f967faa1 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -75,7 +75,22 @@ if (isGetRequestElementSet('userid')) { // Does the account exists? $result_user = SQL_QUERY_ESC("SELECT - `userid`,`country`,`email`,`birth_day`,`birth_month`,`birth_year`,`last_online`,`used_points`,`emails_sent`,`joined`,`last_update`,`last_profile_sent`,`notified`,`emails_received`,`mails_confirmed`".$MORE." + `userid`, + `country`, + `email`, + `birth_day`, + `birth_month`, + `birth_year`, + `last_online`, + `used_points`, + `emails_sent`, + `joined`, + `last_update`, + `last_profile_sent`, + `notified`, + `emails_received`, + `mails_confirmed` + ".$MORE." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE @@ -94,9 +109,15 @@ LIMIT 1", $content['links'] = getTotalUnconfirmedMails($userid); // Add links to the numbers - if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . ']'; - if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['refs'] . '%}]'; - if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['cats'] . '%}]'; + if ($content['links'] > 0) { + $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . ']'; + } // END - if + if ($content['refs'] > 0) { + $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['refs'] . '%}]'; + } // END - if + if ($content['cats'] > 0) { + $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['cats'] . '%}]'; + } // END - if // Calculate timestamp for birthday $stamp = mktime(0, 0, 0, $content['birth_month'], $content['birth_day'], $content['birth_year']); @@ -204,31 +225,56 @@ LIMIT 1", } break; + case 'testers': // Test accounts + // Add statement through filter + $whereStatement = runFilterChain('user_inclusion_sql', $whereStatement); + break; + default: // Invalid list mode - debug_report_bug(__FILE__, __LINE__, sprintf("Invalid do %s detected.", getRequestElement('do'))); + reportBug(__FILE__, __LINE__, sprintf("Invalid do %s detected.", SQL_ESCAPE(secureString(getRequestElement('do'))))); break; } // END - switch + + // If it is not 'testers', add exclusion SQL + if (getRequestElement('do') != 'testers') { + // Exclude tester users + $whereStatement = runFilterChain('user_exclusion_sql', $whereStatement); + } // END - if } // END - if // Generate master query string - $sql = sprintf("SELECT `userid`,`email`,`emails_sent`,`mails_confirmed`,`emails_received`" . $MORE . " FROM `{?_MYSQL_PREFIX?}_user_data`" . $whereStatement . " ORDER BY `%s` ASC", + $sql = sprintf("SELECT + `userid`, + `email`, + `emails_sent`, + `mails_confirmed`, + `emails_received` + " . $MORE . " +FROM + `{?_MYSQL_PREFIX?}_user_data` +" . $whereStatement . " +ORDER BY + `%s` ASC", getRequestElement('sortby') ); // Prepare SQL and run it $result_master = SQL_QUERY($sql, __FILE__, __LINE__); - // Calculate page count (0.5 fixes a bug with page count) - if (getConfig('user_limit') == '0') { + // Is the user limit zero? + if (getUserLimit() == '0') { + // Then set it to default ... setConfigEntry('user_limit', 100); + + // ... but output warning displayMessage('{--EXTENSION_WARNING_USER_LIMIT--}'); } // END - if - // Activate the extension please! - $numPages = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5); + // Calculate page count (0.5 fixes a bug with page count) + $numPages = round(SQL_NUMROWS($result_master) / getUserLimit() + 0.5); if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); - if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('user_limit')); + if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getUserLimit()); // Add limitation to SQL string and run him again $sql .= ' LIMIT ' . (getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')) . ', ' . getRequestElement('offset'); @@ -236,9 +282,6 @@ LIMIT 1", // Are there some entries? if (!SQL_HASZERONUMS($result_master)) { - // We have some (new?) registrations! - $templateContent['user_count'] = getTotalConfirmedUser(); - // Sorting links and number of pages $templateContent['sort_links'] = addSortLinks(getRequestElement('letter'), getRequestElement('sortby')); $templateContent['num_pages'] = $numPages; @@ -278,8 +321,30 @@ LIMIT 1", $content['email'] = '[' . $content['email'] . ']'; $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2'); $content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true); - $content['own_points'] = countSumTotalData($content['userid'], 'user_points', 'points') + countSumTotalData($content['userid'], 'user_points', 'order_points'); - $content['locked_points'] = countSumTotalData($content['userid'], 'user_points', 'locked_points') + countSumTotalData($content['userid'], 'user_points', 'locked_order_points'); + + // Prepare array for filter + $data = array( + 'userid' => $content['userid'], + 'points' => 0 + ); + + // Run the filter chain + $data = runFilterChain('get_own_points', $data); + + // Copy points + $content['own_points'] = $data['points']; + + // Prepare array for filter again + $data = array( + 'userid' => $content['userid'], + 'points' => 0 + ); + + // Run the filter chain + $data = runFilterChain('get_locked_points', $data); + + // Copy points + $content['locked_points'] = $data['points']; // If we have at least one referral, make it clickable to referral list if ($content['refs'] > 0) { diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index a2ea24fd7c..91b7914e14 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 52a78cbd4d..bf6969fcd8 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software. You can redistribute it and/or modify * diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index cfeab36e6f..c932979a54 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -72,7 +72,7 @@ if (isGetRequestElementSet('id')) { } // Load email message - $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestElement('id'))); + $message = loadEmailTemplate('sponsor_locked', $content, bigintval(getRequestElement('id'))); // And send it away sendEmail($content['email'], $subject, $message); diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 79cc7c84e2..7fa06f1fcf 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index e3ba9580c3..3c51dfa5c9 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -80,7 +80,7 @@ if (isGetRequestElementSet('access')) { // Output the logfile's content and exit print($content); - shutdown(); + doShutdown(); } else { // Not readable! displayMessage('{%message,LOGFILE_NOT_READABLE=' . $access . '%}'); diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index 29fb38b59c..08b729e539 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index e36e9ea5ba..2ac057db62 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -63,13 +63,13 @@ if (!isFormSent()) { // @TODO Cant this be rewritten? while ($content = SQL_FETCHARRAY($result)) { // Menu actions - $menus[] = $content['action']; + array_push($menus, $content['action']); // Menu titles - $titles[] = $content['title']; + array_push($titles, $content['title']); // Below this menu point should the new be added so we simply increase the sort value by 1 :-) - $below[] = $content['sort'] + 1; + array_push($below, $content['sort'] + 1); } // END - if // Free memory @@ -108,13 +108,13 @@ if (!isFormSent()) { // Read menu structure while ($content = SQL_FETCHARRAY($result)) { // Menu actions - $menus[$value_main][] = $content['what']; + array_push($menus[$value_main], $content['what']); // Menu titles - $titles[$value_main][] = $content['title']; + array_push($titles[$value_main], $content['title']); // Below this menu point should the new be added so we simply increase the sort value by 1 :-) - $below[$value_main][] = $content['sort'] + 1; + array_push($below[$value_main], $content['sort'] + 1); } // END - while // Free memory diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index e2b878f263..05ad9b72fa 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index 571df6957c..16c12d8826 100644 --- a/inc/modules/admin/what-optimize.php +++ b/inc/modules/admin/what-optimize.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -56,7 +56,7 @@ foreach ($content['tables'] as $row_array) { if (empty($row_array[1])) $row_array[1] = 'NONE'; // Get repair/optimization status - $repairStatus = '{--ADMIN_OPTIMIZE_STATUS_' . str_replace('__', '_', str_replace(',', '', str_replace('+', '', str_replace("'", '', str_replace(' ', '_', strtoupper($row_array[1])))))) . '--}'; + $repairStatus = '{--ADMIN_OPTIMIZE_STATUS_' . str_replace(array('__', ',', '+', chr(39), ' '), array('_', '', '', '', '_'), strtoupper($row_array[1])) . '--}'; $optimizeStatus = '{--ADMIN_OPTIMIZE_STATUS_UNSUPPORTED--}'; if ($row_array[4] > 0) { diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php index 75cf7740d9..f551ef47b7 100644 --- a/inc/modules/admin/what-overview.php +++ b/inc/modules/admin/what-overview.php @@ -1,103 +1,3 @@ 0)) { - $OUT = ''; - foreach ($GLOBALS['menu']['description'] as $key => $value) { - // Prepare content - $content = array( - 'title' => $GLOBALS['menu']['title'][$key], - 'text' => $value - ); - - // Load row template - $OUT .= loadTemplate('admin_menu_hints_row', true, $content); - } // END - foreach - - // Load base template - loadTemplate('admin_menu_hints', false, $OUT); - } -} elseif ($taskExt === false) { - if (isExtensionActive('task')) { - // Output warning message - displayMessage('{%message,EXTENSION_WARNING_EXTENSION_INACTIVE=task%}'); - } // END - if - - // List selected tasks on overview when task management is not active - outputSeletectedTasks(postRequestArray(), $result_tasks); -} - -// [EOF] +// @DEPRECATED ?> diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 07e2a54fc4..ef16f138e4 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-query_network_apis.php b/inc/modules/admin/what-query_network_apis.php index 844cb6238b..30d7709580 100644 --- a/inc/modules/admin/what-query_network_apis.php +++ b/inc/modules/admin/what-query_network_apis.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 1a6d1dd7e4..6dc0917809 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-repair_amnu.php b/inc/modules/admin/what-repair_amnu.php index 4993fa42a1..f686b5d05f 100644 --- a/inc/modules/admin/what-repair_amnu.php +++ b/inc/modules/admin/what-repair_amnu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ $result_fix = SQL_QUERY("SELECT `id`,`action` FROM `{?_MYSQL_PREFIX?}_admin_menu $count = '0'; $repairedWeights = '0'; while ($content = SQL_FETCHARRAY($result_fix)) { // Store act value for later usage in sorting sub menus - $actions[] = $content['action']; + array_push($actions, $content['action']); // Fix weight SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-repair_cats.php b/inc/modules/admin/what-repair_cats.php index c1d0713c8d..419361d151 100644 --- a/inc/modules/admin/what-repair_cats.php +++ b/inc/modules/admin/what-repair_cats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $result = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` GROUP BY `userid` ORDER BY `userid` ASC", __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Nothing is removed for now... ;-) - $REMOVED = '0'; + $removedRows = '0'; // Check if found userid is also found in user_data table while ($content = SQL_FETCHARRAY($result)) { @@ -56,13 +56,13 @@ if (!SQL_HASZERONUMS($result)) { // Ok, we found something to remove SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s", array(bigintval($content['userid'])), __FILE__, __LINE__); - $REMOVED += SQL_AFFECTEDROWS(); + $removedRows += SQL_AFFECTEDROWS(); } // END - if } // END - while - if ($REMOVED > 0) { + if ($removedRows > 0) { // Entries repaired - $content = '{%message,ADMIN_REPAIR_ENTRIES_FIXED=' . $REMOVED . '%}'; + $content = '{%message,ADMIN_REPAIR_ENTRIES_FIXED=' . $removedRows . '%}'; } else { // Nothing repaired $content = '
    {--ADMIN_REPAIR_NOTHING_FIXED--}
    '; diff --git a/inc/modules/admin/what-repair_gmnu.php b/inc/modules/admin/what-repair_gmnu.php index e9c64523d1..6a8a74913a 100644 --- a/inc/modules/admin/what-repair_gmnu.php +++ b/inc/modules/admin/what-repair_gmnu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ $result_fix = SQL_QUERY("SELECT `id`,`action` FROM `{?_MYSQL_PREFIX?}_guest_menu $count = '0'; $repairedWeights = '0'; while ($content = SQL_FETCHARRAY($result_fix)) { // Store act value for later usage in sorting sub menus - $actions[] = $content['action']; + array_push($actions, $content['action']); // Fix weight $result_sort = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-repair_lang.php b/inc/modules/admin/what-repair_lang.php index c2bc0ebdfd..176829cb46 100644 --- a/inc/modules/admin/what-repair_lang.php +++ b/inc/modules/admin/what-repair_lang.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-repair_mmnu.php b/inc/modules/admin/what-repair_mmnu.php index fc1cb9d637..7ac68a44f2 100644 --- a/inc/modules/admin/what-repair_mmnu.php +++ b/inc/modules/admin/what-repair_mmnu.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ $result_fix = SQL_QUERY("SELECT `id`,`action` FROM `{?_MYSQL_PREFIX?}_member_men $count = '0'; $repairedWeights = '0'; while ($content = SQL_FETCHARRAY($result_fix)) { // Store action value for later usage in sorting sub menus - $actions[] = $content['action']; + array_push($actions, $content['action']); // Fix weight SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1", @@ -72,7 +72,7 @@ foreach ($actions as $action) { while ($content = SQL_FETCHARRAY($result_fix)) { // Fix weight SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1", - array($count, $content['id']), __FILE__, __LINE__); + array($count, $content['id']), __FILE__, __LINE__); $repairedWeights += SQL_AFFECTEDROWS(); // Count one up diff --git a/inc/modules/admin/what-repair_refs.php b/inc/modules/admin/what-repair_refs.php index 31cf69994f..68f087d370 100644 --- a/inc/modules/admin/what-repair_refs.php +++ b/inc/modules/admin/what-repair_refs.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index a66c30fea1..852457782e 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-send_coupon.php b/inc/modules/admin/what-send_coupon.php index 469329ba74..9cfb2f5607 100644 --- a/inc/modules/admin/what-send_coupon.php +++ b/inc/modules/admin/what-send_coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -54,11 +54,20 @@ if (isFormSent()) { displayMessage('{--ADMIN_SEND_COUPON_DESCRIPTION_NOT_ENTERED--}'); } else { // All fields are set, so we can start looking for users who wants to receive coupons - $result = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `receiving_coupons`='Y' ORDER BY `userid` ASC", + $result = SQL_QUERY("SELECT + `userid` +FROM + `{?_MYSQL_PREFIX?}_user_data` +WHERE + `status`='CONFIRMED' AND + `receiving_coupons`='Y' + " . runFilterChain('user_exclusion_sql', ' ') . " +ORDER BY + `userid` ASC", __FILE__, __LINE__); // Do we have entries left? - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // Convert timestamp selections $expirationTime = time() + createEpocheTimeFromSelections('coupon_default_time', postRequestArray()); @@ -88,7 +97,7 @@ if (isFormSent()) { * table-unique "id". The function generatePassword() can do * this job for us but we want to exclude some characters. */ - $couponCode = generatePassword(30, array('-','+','_','/','.')); + $couponCode = generatePassword(30, array('-', '+', '_', '/', '.')); // Is it really unique? $isUnique = (countSumTotalData($couponCode, 'user_coupons', 'id', 'coupon_code', true) == 0); @@ -96,7 +105,11 @@ if (isFormSent()) { // The above loop should always set $couponCode, so we can now insert it SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_coupons` (`coupon_id`,`userid`,`coupon_code`) VALUES (%s,%s,'%s')", - array($couponId, $userid, $couponCode), __FILE__, __LINE__); + array( + $couponId, + $userid, + $couponCode + ), __FILE__, __LINE__); // Fill array with all required data $content = array( @@ -114,7 +127,7 @@ if (isFormSent()) { sendEmail($userid, '{--MEMBER_COUPON_SUBJECT--}', $mailText); // Rember this user for the admin email - $adminUserids[] = $userid; + array_push($adminUserids, $userid); } // END - while // Prepare content for template diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index d94191ef98..9661bdcd0e 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -45,11 +45,13 @@ addYouAreHereLink('admin', __FILE__); if (isFormSent()) { $result = SQL_QUERY("SELECT - `userid`,`email` + `userid`, + `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND `nl_receive`='Y' + `status`='CONFIRMED' AND + `nl_receive`='Y' ORDER BY `userid` ASC", __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 56e294d474..6d4d26cc76 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 439e4a1e98..bef68109a7 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index a414fbad4f..2f52593d77 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 760181af57..254c7d9152 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -80,7 +80,7 @@ if (ifPostContainsSelections()) { $postData['default_theme'] = getRequestElement('default_theme'); // Set session - setTheme($postData['default_theme']); + setMailerTheme($postData['default_theme']); // Set it in config and current theme as well setConfigEntry('default_theme', $postData['default_theme']); diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index c0fe085887..7388ea48ea 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { - die(); + exit(); } // END - if // Add description as navigation point @@ -107,12 +107,12 @@ foreach ($includes as $inc) { loadInclude($inc); // Add found theme to array - $themes['theme_unix'][] = $dir; - $themes['theme_name'][] = $GLOBALS['theme_data']['name']; - $themes['theme_author'][] = $GLOBALS['theme_data']['author']; - $themes['theme_email'][] = $GLOBALS['theme_data']['email']; - $themes['theme_url'][] = $GLOBALS['theme_data']['url']; - $themes['theme_version'][] = $GLOBALS['theme_data']['version']; + array_push($themes['theme_unix'] , $dir); + array_push($themes['theme_name'] , $GLOBALS['theme_data']['name']); + array_push($themes['theme_author'] , $GLOBALS['theme_data']['author']); + array_push($themes['theme_email'] , $GLOBALS['theme_data']['email']); + array_push($themes['theme_url'] , $GLOBALS['theme_data']['url']); + array_push($themes['theme_version'], $GLOBALS['theme_data']['version']); } // END - while // Sort array by Uni* name diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index c91c068a33..85bbeedc10 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -84,7 +84,7 @@ LIMIT 1", // @TODO Rewrite these if-blocks to a filter if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { // Then "migrate" the URL to the surfbar - SURFBAR_ADMIN_MIGRATE_URL($content['url'], $content['sender']); + doSurfbarAdminMigrateUrl($content['url'], $content['sender']); } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index b66eb9fd95..052984e391 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -99,7 +99,7 @@ ORDER BY // Set default email $content['email'] = '{--SPONSOR_NO_ADMIN--}'; - if ($content['admin_id'] > 0) { + if (isValidUserId($content['admin_id'])) { // Load admin's email address for contact $content['email'] = getAdminEmail($content['admin_id']); } // END - if diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index bd6542d0b4..ba10c41ae6 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,18 +44,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Is the form sent? -if ((isPostRequestElementSet('unlock')) && (is_array(postRequestElement('url_id'))) && (count(postRequestElement('url_id')) > 0)) { +if ((isPostRequestElementSet('unlock')) && (ifPostContainsSelections('url_id'))) { // Unlock selected URLs - if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestElement('url_id'))) { + if (doSurfbaradminUnlockUrlIds(postRequestElement('url_id'))) { // Unlock done! :-) displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { // Unlock failed! displayMessage('{--ADMIN_SURFBAR_UNLOCK_FAILED--}'); } -} elseif ((isPostRequestElementSet('reject')) && (is_array(postRequestElement('url_id'))) && (count(postRequestElement('url_id')) > 0)) { +} elseif ((isPostRequestElementSet('reject')) && (ifPostContainsSelections('url_id'))) { // Reject selected URLs - if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestElement('url_id'))) { + if (doSurfbaradminRejectUrlIds(postRequestElement('url_id'))) { // Unlock done! :-) displayMessage('{--ADMIN_SURFBAR_UNLOCK_DONE--}'); } else { diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index f3b4890f3e..7e893ecc0c 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,9 +60,9 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ // Which is the latest version on server? $ONLINE = array( - 'version' => trim(str_replace("\n", '', $response[0])), - 'changed' => trim(str_replace("\n", '', $response[1])), - 'revision' => trim(str_replace("\n", '', $response[2])), + 'version' => trim(str_replace(chr(10), '', $response[0])), + 'changed' => trim(str_replace(chr(10), '', $response[1])), + 'revision' => trim(str_replace(chr(10), '', $response[2])), 'code' => '200 OK' ); } else { diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 70df56b23f..b18804cc84 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -59,8 +59,8 @@ if (isGetRequestElementSet('image')) { getConfig('usage_base') ); } else { - if (strpos(getRequestElement('image'), "\\") > 0) { - setGetRequestElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); + if (strpos(getRequestElement('image'), chr(92)) > 0) { + setGetRequestElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), chr(92)))); } // END - if $FQFN = sprintf("%s%s/%s_usage_%s.png", getPath(), @@ -76,7 +76,7 @@ if (isGetRequestElementSet('image')) { imagepng($image); imagedestroy($image); } // END - if - shutdown(); + doShutdown(); } elseif (isGetRequestElementSet('usage')) { $FQFN = sprintf("%s%s/usage_%s.html", getPath(), @@ -91,11 +91,28 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) { // Until here... // Replace URLs - $content = str_replace('usage.png' , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=usage&image=usage', $content); - $content = str_replace('daily_usage_' , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=daily&image=' , $content); - $content = str_replace('hourly_usage_', '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=hourly&image=' , $content); - $content = str_replace('ctry_usage_' , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=ctry&image=' , $content); - $content = str_replace('usage_' , '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&usage=' , str_replace('.html', '', $content)); + $content = str_replace( + // From: + array( + 'usage.png', + 'daily_usage_', + 'hourly_usage_', + 'ctry_usage_', + 'usage_', + '.html', + ), + // To: + array( + '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=usage&image=usage', + '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=daily&image=', + '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=hourly&image=', + '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&type=ctry&image=', + '{?URL?}/modules.php?module=admin&what=' . getWhat() . '&usage=', + '', + ), + // Target to replace on: + $content + ); $test = strtolower($content); // Do we need to strip out above and including plus trailing tag? diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 10d53320ab..7ad700cbd1 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Is a user id given? -if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) { +if ((isGetRequestElementSet('userid')) && (isValidUserId(getRequestElement('userid')))) { // Is a user account found? if (fetchUserData(getRequestElement('userid'))) { // Load the data diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index 2d086315d5..46fa7c584b 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/modules/admin/what-welcome.php b/inc/modules/admin/what-welcome.php new file mode 100644 index 0000000000..6f993700f0 --- /dev/null +++ b/inc/modules/admin/what-welcome.php @@ -0,0 +1,103 @@ + 0)) { + $OUT = ''; + foreach ($GLOBALS['menu']['description'] as $key => $value) { + // Prepare content + $content = array( + 'title' => $GLOBALS['menu']['title'][$key], + 'text' => $value + ); + + // Load row template + $OUT .= loadTemplate('admin_menu_hints_row', true, $content); + } // END - foreach + + // Load base template + loadTemplate('admin_menu_hints', false, $OUT); + } +} elseif ($taskExt === false) { + if (isExtensionActive('task')) { + // Output warning message + displayMessage('{%message,EXTENSION_WARNING_EXTENSION_INACTIVE=task%}'); + } // END - if + + // List selected tasks on overview when task management is not active + outputSeletectedTasks(postRequestArray(), $result_tasks); +} + +// [EOF] +?> diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 26fb072a5b..5379718129 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Initial message part diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 6210bd1b75..c889918668 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if $mode = 'guest'; @@ -72,7 +72,7 @@ if (isGetRequestElementSet('order')) { } } // END - if -if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGetRequestElementSet('frame'))) { +if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (!isFullPage())) { // Default URL is ours $url = getUrl(); @@ -87,7 +87,12 @@ if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGe // Add missing element $frame = ''; - if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); + if (!isFullPage()) { + $frame = getRequestElement('frame'); + } // END - if + + // Switch on 'frame' + // @TODO Rewrite this somehow switch ($frame) { case '': switch ($mode) { diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index dab55af94c..d2070110d8 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (isBlockModeEnabled()) { // Block mode detected return; diff --git a/inc/modules/guest/action-admin.php b/inc/modules/guest/action-admin.php index 07060b2c1a..8b4b401009 100644 --- a/inc/modules/guest/action-admin.php +++ b/inc/modules/guest/action-admin.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (isBlockModeEnabled()) { // Block mode detected return; diff --git a/inc/modules/guest/action-main.php b/inc/modules/guest/action-main.php index 500698e450..82e94d2af1 100644 --- a/inc/modules/guest/action-main.php +++ b/inc/modules/guest/action-main.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (isBlockModeEnabled()) { // Block mode detected return; diff --git a/inc/modules/guest/action-members.php b/inc/modules/guest/action-members.php index 2672040b3f..8e4681f2ee 100644 --- a/inc/modules/guest/action-members.php +++ b/inc/modules/guest/action-members.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (isBlockModeEnabled()) { // Block mode detected return; diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 8f90d91acf..05e5e18720 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif ((!isExtensionActive('online')) && (!isAdmin())) { // Just skip this extension return; diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index ad6c42e52a..06f7c43335 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software. You can redistribute it and/or modify * @@ -36,7 +36,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (isBlockModeEnabled()) { // Block mode detected return; diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 1d7b578dfe..c35eaacc60 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isBlockModeEnabled()) { // Non-block mode detected return; @@ -57,7 +57,10 @@ if (isAdmin()) { $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true); } +// Default is no box $OUT = ''; + +// Choose from it if ($num_themes > 1) { // If more than 1 is installed output selection box $OUT = generateThemeSelectionBox(); diff --git a/inc/modules/guest/what- b/inc/modules/guest/what- index 398d66ae4a..e1fe5e1d8f 100644 --- a/inc/modules/guest/what- +++ b/inc/modules/guest/what- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // Add description as navigation point diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index 96c09bd54d..76dc94f8ef 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -56,6 +56,7 @@ FROM WHERE `last_online` >= {?START_TDAY?} AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `last_online` DESC LIMIT {?active_limit?}", __FILE__, __LINE__); diff --git a/inc/modules/guest/what-admin.php b/inc/modules/guest/what-admin.php index e489a784bc..a32cc5074c 100644 --- a/inc/modules/guest/what-admin.php +++ b/inc/modules/guest/what-admin.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // A simple redirect... diff --git a/inc/modules/guest/what-agb.php b/inc/modules/guest/what-agb.php index a47d0bbfd9..9a95edc79a 100644 --- a/inc/modules/guest/what-agb.php +++ b/inc/modules/guest/what-agb.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 189792dd23..af9bedbecc 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index d6e3e7f441..bcb07f0d4a 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index 4ab2c69a22..4aa07a942b 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-extensions.php b/inc/modules/guest/what-extensions.php index 96ecf8a726..663ef9ead2 100644 --- a/inc/modules/guest/what-extensions.php +++ b/inc/modules/guest/what-extensions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-impressum.php b/inc/modules/guest/what-impressum.php index 16c98fa519..323c50b033 100644 --- a/inc/modules/guest/what-impressum.php +++ b/inc/modules/guest/what-impressum.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // Add description as navigation point diff --git a/inc/modules/guest/what-infos.php b/inc/modules/guest/what-infos.php index e0ec8f3864..3a1ab7791d 100644 --- a/inc/modules/guest/what-infos.php +++ b/inc/modules/guest/what-infos.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 60228452a6..49228e9cf3 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -60,7 +60,7 @@ $add = ''; if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $userid = getMemberId(); -} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) { +} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent('login'))) { // Set userid and crypt password when login data was submitted if (isNicknameUsed(postRequestElement('id'))) { // Nickname entered @@ -94,12 +94,21 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { if (isMember()) { // Login immidiately... $url = 'modules.php?module=login'; -} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { +} elseif ((isFormSent('login')) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); -} elseif (isFormSent()) { - // Try the login (see inc/libs/user_functions.php) - $url = doUserLogin(postRequestElement('id'), postRequestElement('password')); +} elseif (isFormSent('login')) { + // Are both 'id' and 'password' set? + if ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password'))) { + // Try the login (see inc/libs/user_functions.php) + $url = doUserLogin(postRequestElement('id'), postRequestElement('password')); + } elseif (!isPostRequestElementSet('id')) { + // Empty 'id' + $errorCode = getCode('LOGIN_EMPTY_ID'); + } else { + // Empty 'password' + $errorCode = getCode('LOGIN_EMPTY_PASSWORD'); + } } elseif ((isPostRequestElementSet('new_pass')) && (!empty($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) $errorCode = doNewUserPassword(postRequestElement('email'), $userid); @@ -117,17 +126,13 @@ $content['message'] = ''; // Login problems? if (!empty($errorCode)) { // Do we have a userid set? - if (isSessionVariableSet('current_userid')) { + if (isSessionVariableSet('userid')) { // Then prefetch data for this account - fetchUserData(getSession('current_userid')); + fetchUserData(getSession('userid')); } // END - if // @TODO Move this HTML code into a template - $content['message'] = ' - - ' . getMessageFromErrorCode($errorCode) . ' - -'; + $content['message'] = loadTemplate('guest_login_error_message', true, $errorCode); } // END - if // Display login form with resend-password form diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index fea217d32f..f008903b9e 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -59,13 +59,13 @@ $content['user_locked'] = getTotalLockedUser(); $content['user_count'] = ($content['user_confirmed'] + $content['user_unconfirmed'] + $content['user_locked']); // Start of this exchange -$content['mt_start'] = generateDateTime(getConfig('mt_start'), 3); +$content['mt_start'] = generateDateTime(getMtStart(), '3'); // Project timestamp when number of members are reached $PROJECTED = '0'; if ($content['user_count'] > 0) { // @TODO Find a better formular than this one - $PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start')); + $PROJECTED = round((time() - getMtStart()) / $content['user_count'] * getConfig('mt_stage') + getMtStart()); } // END - if // Generate timestamp @@ -90,7 +90,11 @@ $content['max'] = countSumTotalData('CONFIRMED', 'user_data', 'max_mails', 'stat $content['rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0"); // Initial lots of variables -$bmails = '0'; $sent = '0'; $max = '0'; $rec = '0'; $clicks = '0'; +$bmails = '0'; +$sent = '0'; +$max = '0'; +$rec = '0'; +$clicks = '0'; // Mail orders (only current) $nmails = getMediadataEntry('normal_orders'); diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 55dbf0f355..408e2c041a 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -52,33 +52,43 @@ if ((!isExtensionActive('rallye')) && (!isAdmin())) { outputHtml('
    '); // Check for possible running rallyes -$ADD = " AND d.is_active='Y'"; +$ADD = " AND d.`is_active`='Y'"; if (isAdmin()) $ADD = ''; $result = SQL_QUERY("SELECT - d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices + d.`id`, + d.`admin_id`, + a.`login`, + d.`title`, + d.`descr`, + d.`template`, + d.`start_time`, + d.`end_time`, + d.`min_users`, + d.`min_prices` FROM `{?_MYSQL_PREFIX?}_rallye_data` AS d INNER JOIN `{?_MYSQL_PREFIX?}_admins` AS a ON - d.admin_id=a.id + d.`admin_id`=a.`id` WHERE - d.notified='Y'" . $ADD . " + d.`notified`='Y' + " . $ADD . " ORDER BY - d.end_time + d.`end_time` ASC LIMIT 1", __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Found some (normally one... - list($id, $adminId, $login, $title, $descr, $templ, $start, $end, $min_users, $min_prices) = SQL_FETCHROW($result); + $content = SQL_FETCHARRAY($result); $expired = false; - if ($end < time()) { + if (($content['end_time'] < time()) && (getTotalConfirmedUser() >= $content['min_users']) && (getTotalRallyeWinners($content['id']) >= $content['min_prices'])) { // Rallye is expired $content['extras'] = '{--RALLYE_HAS_EXPIRED--}'; $expired = true; - } elseif (time() >= ($end - getOneDay())) { + } elseif (time() >= ($content['end_time'] - getOneDay())) { // Rallye will expire in less one day! $content['extras'] = '{--RALLYE_EXPIRE_ONE_DAY--}'; } else { @@ -86,37 +96,31 @@ if (SQL_NUMROWS($result) == 1) { } // Set admin line (currently set to impressum, later to contact form) - // @TODO Reactivate this: $content['admin'] = '' . $login . ''; - - // Set title - $content['title'] = $title; + // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; // Handle description... - if ((empty($descr)) && (!empty($templ))) { + if ((empty($content['descr'])) && (!empty($content['template']))) { // Use description from template - $content['descr'] = loadTemplate('rallye_' . $templ, true); - } else { - // Use description from database - $content['descr'] = $descr; - } + $content['descr'] = loadTemplate('rallye_' . $content['template'], true); + } // END - if // Set start and end time - $content['start'] = generateDateTime($start, 1); - $content['end'] = generateDateTime($end , 1); + $content['start_time'] = generateDateTime($content['start_time'], 1); + $content['end_time'] = generateDateTime($content['end_time'] , 1); // Determine min_users - $content['min_users'] = determineReferralRallyeMinimumUsers($min_users); + $content['min_users'] = determineReferralRallyeMinimumUsers($content['min_users']); // Determine min prices (now in function) - $content['min_prices'] = determineReferralRallyeMinimumPrices($min_prices); + $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']); if ($expired === true) { - $content['prices'] = addReferralRallyeWinners('guest', $id); + $content['prices'] = addReferralRallyeWinners('guest', $content['id']); $content['top_users'] = '
    ' . $content['extras'] . '
    '; $content['can_win_this'] = '{--RALLYE_OUR_WINNERS_ARE--}'; } else { - $content['prices'] = addReferralRallyePrices($id, 'html'); - $content['top_users'] = addReferralRallyeTopUsers('guest', $id, getMemberId()); + $content['prices'] = addReferralRallyePrices($content['id'], 'html'); + $content['top_users'] = addReferralRallyeTopUsers('guest', $content['id'], getMemberId()); $content['can_win_this'] = '{--RALLYE_YOU_CAN_WIN--}'; } diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 04686ab297..3ef7b69b32 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -55,7 +55,7 @@ if (!isExtensionActive('register')) { //* DEBUG: */ debugOutput('isFormSent=' . intval(isFormSent()) . ',isRegistrationDataComplete=' . intval(isRegistrationDataComplete()) . ',isAdmin=' . intval(isAdmin())); if ((isFormSent()) && (isRegistrationDataComplete())) { // Do the registration here - doRegistration(); + doUserRegistration(); // Output success registration displayMessage('{--REGISTRATION_DONE--}'); @@ -142,17 +142,8 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { $content[$entry] = SQL_ESCAPE(postRequestElement($entry)); } // END - foreach - // The admin may see all - $whereStatement = "WHERE `is_active`='Y'"; - if (isAdmin()) { - $whereStatement = ''; - } // END - if - // Prepare country selection box - $OUT = ''; - $content['country'] = $OUT; + $content['country'] = addCountryCodeSelectionBox(postRequestElement('country_code')); // Set must-fillout fields $content = runFilterChain('register_must_fillout', $content); diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index 7d2179e528..a55e1e6e56 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index cc3966051d..c8a724f3a4 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 165d912205..017688f261 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -148,12 +148,12 @@ LIMIT 1", SQL_FREERESULT($result); } elseif ($mode == 'activate') { // Send activation link again - if (isFormSent()) { + if (isFormSent('login')) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('login'); } - if (isFormSent()) { + if (isFormSent('login')) { // Check email $result = SQL_QUERY_ESC("SELECT `id`,`hash`,`status`,`remote_addr`,`gender`,`surname`,`family`, @@ -199,12 +199,12 @@ LIMIT 1", } } elseif ($mode == 'lost_pass') { // Send new password - if (isFormSent()) { + if (isFormSent('login')) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestElementSet('email')) unsetPostRequestElement('login'); } // END - if - if (isFormSent()) { + if (isFormSent('login')) { // Check email $result = SQL_QUERY_ESC("SELECT `id`,`hash`,`remote_addr`,`gender`,`surname`,`family`, @@ -254,7 +254,7 @@ LIMIT 1", // Load form loadTemplate('guest_sponsor_lost'); } -} elseif (isFormSent()) { +} elseif (isFormSent('login')) { // Check status and login data ... $result = SQL_QUERY_ESC("SELECT `status` diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 14c62e9a47..ed4025993a 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -58,17 +58,17 @@ if (isFormSent()) { // 1. Salutation / Surname / family name if (!isPostRequestElementSet('gender')) { // Surname is empty - $formErrors[] = '{--SPONSOR_NO_GENDER_SELECTED--}'; + array_push($formErrors, '{--SPONSOR_NO_GENDER_SELECTED--}'); } // END - if if (!isPostRequestElementSet('surname')) { // Surname is empty - $formErrors[] = '{--SPONSOR_SURNAME_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_SURNAME_EMPTY--}'); } // END - if if (!isPostRequestElementSet('family')) { // Surname is empty - $formErrors[] = '{--SPONSOR_FAMILY_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_FAMILY_EMPTY--}'); } // END - if // 2. Company name @@ -76,121 +76,121 @@ if (isFormSent()) { if (((!isPostRequestElementSet('company')) && ((isPostRequestElementSet('tax_ident')) || (isPostRequestElementSet('position')))) || ((isPostRequestElementSet('company')) && (!isPostRequestElementSet('tax_ident')))) { if (!isPostRequestElementSet('company')) { // Company name is empty - $formErrors[] = '{--SPONSOR_COMPANY_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_COMPANY_EMPTY--}'); } elseif (!isPostRequestElementSet('tax_ident')) { // Tax ident number name is empty - $formErrors[] = '{--SPONSOR_TAX_IDENT_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_TAX_IDENT_EMPTY--}'); } if (!isPostRequestElementSet('position')) { // Not fatal but not nice: position in company is empty - $formErrors[] = '{--SPONSOR_POSITION_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_POSITION_EMPTY--}'); } // END - if } // END - if // 3. Street and number if (!isPostRequestElementSet('street_nr1')) { // Street name and house number are empty - $formErrors[] = '{--SPONSOR_STREET_NR1_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_STREET_NR1_EMPTY--}'); } elseif ((isPostRequestElementSet('street_nr2')) && (!isPostRequestElementSet('street_nr1'))) { // 1st line for street is empty, but 2nd line not - $formErrors[] = '{--SPONSOR_STREET_NR1_EMPTY_2_NOT--}'; + array_push($formErrors, '{--SPONSOR_STREET_NR1_EMPTY_2_NOT--}'); } // 4. Country code if (!isPostRequestElementSet('country')) { // Country code is empty - $formErrors[] = '{--kSPONSOR_COUNTRY_EMPTY--}'; + array_push($formErrors, '{--kSPONSOR_COUNTRY_EMPTY--}'); } elseif (strlen(postRequestElement('country')) != 2) { // Country code is invalid - $formErrors[] = '{--SPONSOR_COUNTRY_IS_INVALID--}'; + array_push($formErrors, '{--SPONSOR_COUNTRY_IS_INVALID--}'); } // 3. ZIP code if (!isPostRequestElementSet('zip')) { // ZIP code is empty - $formErrors[] = '{--SPONSOR_ZIP_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_ZIP_EMPTY--}'); } elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) { // ZIP is invalid - $formErrors[] = '{--SPONSOR_ZIP_IS_INVALID--}'; + array_push($formErrors, '{--SPONSOR_ZIP_IS_INVALID--}'); setPostRequestElement('zip', ''); } // 4. City if (!isPostRequestElementSet('city')) { // City is empty - $formErrors[] = '{--SPONSOR_CITY_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_CITY_EMPTY--}'); } // END - if // 5. Phone number if (!isPostRequestElementSet('phone')) { // City is empty - $formErrors[] = '{--SPONSOR_PHONE_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_PHONE_EMPTY--}'); } // END - if // 6. Homepage URL if (!isPostRequestElementSet('url')) { // Homepage URL is empty - $formErrors[] = '{--SPONSOR_URL_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_URL_EMPTY--}'); } elseif (!isUrlValid(postRequestElement('url'))) { // Homepage URL is invalid - $formErrors[] = '{--SPONSOR_URL_IS_INVALID--}'; + array_push($formErrors, '{--SPONSOR_URL_IS_INVALID--}'); setPostRequestElement('url', ''); } // 7. Light validation of email address if ((!isPostRequestElementSet('email')) || (postRequestElement('email') == '@')) { // Email is invalid/empty - $formErrors[] = '{--SPONSOR_EMAIL_IS_INVALID--}'; + array_push($formErrors, '{--SPONSOR_EMAIL_IS_INVALID--}'); } elseif (isSponsorRegisteredWithEmail(postRequestElement('email'))) { // Email already found in database! - $formErrors[] = '{--SPONSOR_EMAIL_IS_ALREADY_REGISTERED--}'; + array_push($formErrors, '{--SPONSOR_EMAIL_IS_ALREADY_REGISTERED--}'); setPostRequestElement('email', ''); } // 8. Pay type selected? if (!isPostRequestElementSet('pay_type')) { // Not pay type selected - $formErrors[] = '{--SPONSOR_NO_PAYTYPE_SELECTED--}'; + array_push($formErrors, '{--SPONSOR_NO_PAYTYPE_SELECTED--}'); } // END - if // 9. Interval of mails if (!isPostRequestElementSet('warning_interval')) { // No warning interval selected - $formErrors[] = '{--SPONSOR_NO_WARNING_INTERVAL_SELECTED--}'; + array_push($formErrors, '{--SPONSOR_NO_WARNING_INTERVAL_SELECTED--}'); } // END - if // 10. Mail notifications disabled/enabled if (!isPostRequestElementSet('receive_warnings')) { // Option not selected! - $formErrors[] = '{--SPONSOR_NO_RECEIVE_WARNINGS_SELECTED--}'; + array_push($formErrors, '{--SPONSOR_NO_RECEIVE_WARNINGS_SELECTED--}'); } // END - if // Did he enter his password twice? if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { // Passwords missmatch - $formErrors[] = '{--SPONSOR_PASSWORDS_MISMATCH--}'; + array_push($formErrors, '{--SPONSOR_PASSWORDS_MISMATCH--}'); } else { if (!isPostRequestElementSet('pass1')) { // Password 1 is empty - $formErrors[] = '{--SPONSOR_PASSWORD1_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_PASSWORD1_EMPTY--}'); } if (!isPostRequestElementSet('pass2')) { // Password 2 is empty - $formErrors[] = '{--SPONSOR_PASSWORD2_EMPTY--}'; + array_push($formErrors, '{--SPONSOR_PASSWORD2_EMPTY--}'); } } } elseif (strlen(postRequestElement('pass1')) < getPassLen()) { // Password is to short! - $formErrors[] = '{--SPONSOR_PASSWORD_TOO_SHORT--}'; + array_push($formErrors, '{--SPONSOR_PASSWORD_TOO_SHORT--}'); } // Check if he has accepted the terms&conditions if (!isPostRequestElementSet('terms')) { // Homepage URL is empty - $formErrors[] = '{--SPONSOR_TERMS_NOT_ACCEPTED--}'; + array_push($formErrors, '{--SPONSOR_TERMS_NOT_ACCEPTED--}'); } // END - if // If there is something wrong/missing stop registration diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 0a0c4c267a..0eb2d02042 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -72,7 +72,7 @@ switch (getRequestElement('do')) { default: // Unsupported mode - debug_report_bug(__FILE__, __LINE__, sprintf("Unsupported mode %s detected.", secureString(getRequestElement('do')))); + reportBug(__FILE__, __LINE__, sprintf("Unsupported mode %s detected.", secureString(getRequestElement('do')))); break; } @@ -83,8 +83,8 @@ $ltitle = '{--GUEST_STATS_' . strtoupper($lmode) . '--}'; switch (getConfig('guest_stats')) { case 'MEMBERS': // Statistics about your members // Only males / females - $male = countSumTotalData('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); - $female = countSumTotalData('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'"); + $male = countSumTotalData('M', 'user_data', 'userid', 'gender', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); + $female = countSumTotalData('F', 'user_data', 'userid', 'gender', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); // List every month $months = array(); @@ -93,10 +93,12 @@ switch (getConfig('guest_stats')) { $month = $idx; // Append leading zero - if ($idx < 10) $month = '0' . $idx; + if ($idx < 10) { + $month = '0' . $idx; + } // END - if // Count months - $months[$month] = countSumTotalData(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'"); + $months[$month] = countSumTotalData(bigintval($month), 'user_data', 'userid', 'birth_month', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); } // END - for // Members in categories @@ -122,8 +124,8 @@ switch (getConfig('guest_stats')) { $content['unconfirmed'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status` != 'CONFIRMED'", __FILE__, __LINE__)); $content['total_males'] = $male; $content['total_females'] = $female; - $content['tmem_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_TDAY?} AND `status`='CONFIRMED'", __FILE__, __LINE__)); - $content['ymem_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_YDAY?} AND `last_online` < {?START_TDAY?} AND `status`='CONFIRMED'", __FILE__, __LINE__)); + $content['tmem_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_TDAY?}" . runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'"), __FILE__, __LINE__)); + $content['ymem_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_YDAY?} AND `last_online` < {?START_TDAY?}" . runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'"), __FILE__, __LINE__)); $content['treg_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= {?START_TDAY?}", __FILE__, __LINE__)); $content['yreg_count'] = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= {?START_YDAY?} AND `joined` < {?START_TDAY?}", __FILE__, __LINE__)); $content['lmode'] = $lmode; @@ -135,7 +137,7 @@ switch (getConfig('guest_stats')) { if ($SW == 2) $OUT .= ''; // Prepare data for template - $data = array( + $row = array( 'l_class' => $l, 'm_descr' => $GLOBALS['month_descr'][$month], 'r_class' => $r, @@ -144,7 +146,7 @@ switch (getConfig('guest_stats')) { ); // Load row template - $OUT .= loadTemplate('guest_stats_month_row', true, $data); + $OUT .= loadTemplate('guest_stats_month_row', true, $row); if ($SW == 2) { $r2 = ''; @@ -162,13 +164,13 @@ switch (getConfig('guest_stats')) { $OUT = ''; foreach ($cat_cnt as $id => $count) { // Prepare data for the template - $data = array( + $row = array( 'cat' => $cats[$id], 'count' => $count, ); // Load row template and switch colors - $OUT .= loadTemplate('guest_stats_cats_row', true, $data); + $OUT .= loadTemplate('guest_stats_cats_row', true, $row); } // END - foreach $content['cats_rows'] = $OUT; diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 6610fa1ed1..f369b02da0 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point @@ -59,6 +59,7 @@ FROM WHERE `total_logins` > 0 AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " ORDER BY `total_logins` DESC LIMIT {?top10_max?}", __FILE__, __LINE__); @@ -112,6 +113,7 @@ ON WHERE p.points > 0 AND d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " GROUP BY p.userid ORDER BY @@ -165,6 +167,7 @@ ON WHERE r.counter > 0 AND d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " GROUP BY r.userid ORDER BY diff --git a/inc/modules/guest/what-welcome.php b/inc/modules/guest/what-welcome.php index cd8e84353b..27194d3a92 100644 --- a/inc/modules/guest/what-welcome.php +++ b/inc/modules/guest/what-welcome.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index 9365dd9f4a..586bd10650 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Special file diff --git a/inc/modules/index.php b/inc/modules/index.php index 245b01f945..928ec04109 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isExtensionInstalled('sql_patches')) { // Redirect to admin area redirectToUrl('admin.php'); diff --git a/inc/modules/loader.php b/inc/modules/loader.php index ae9528261f..294abf4d83 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Is an URL specified? diff --git a/inc/modules/login.php b/inc/modules/login.php index 6e71c9176a..e859f451db 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { // Redirect to login form with displayed error code redirectToUrl('modules.php?module=index&what=login&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule()); diff --git a/inc/modules/member/action- b/inc/modules/member/action- index b8acbcf2a2..0a397965cc 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index aa2e72f0bc..30f89ce50a 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index 8e151921d5..2f09914657 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-coupon.php b/inc/modules/member/action-coupon.php index 326da6372a..e82aa862f0 100644 --- a/inc/modules/member/action-coupon.php +++ b/inc/modules/member/action-coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-earn.php b/inc/modules/member/action-earn.php index e1092c19cd..0fb58b84a6 100644 --- a/inc/modules/member/action-earn.php +++ b/inc/modules/member/action-earn.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index fc00eb7965..db755ec64c 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index 0ce73a6416..eda3904c24 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index b5f87a2172..3230e06098 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index a20bc016b3..f537afa2dc 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index c5042d4880..fba7fa1c9e 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index d343e01c00..78acae2d2e 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index ab9b4dd1e8..f93b28fbf7 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (isBlockModeEnabled()) { diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index 3a97042cd0..1c0f1f7d1c 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } elseif (!isBlockModeEnabled()) { @@ -59,6 +59,10 @@ if (isAdmin()) { $num_themes = countSumTotalData('', 'themes', 'id', '', true); } +// Default is no box +$OUT = ''; + +// Choose from it if ($num_themes > 1) { // If more than 1 is installed output selection box $OUT = generateThemeSelectionBox(); diff --git a/inc/modules/member/what- b/inc/modules/member/what- index e5cd2b45bb..6a28ff8c5c 100644 --- a/inc/modules/member/what- +++ b/inc/modules/member/what- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 14326b9fc7..09948bd2ae 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 59193370fb..1d0f5a1917 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index 9bfc593520..142660a206 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index 14326b9fc7..09948bd2ae 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index 9bfc593520..142660a206 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 845ec0d565..5ba96f9755 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 5e97cec37e..f6b2fb9359 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -69,6 +69,7 @@ FROM WHERE `beg_points` > 0 AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " " . $lastOnline . " ORDER BY `beg_points` DESC, diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index ccc9fbd0a9..ee31c8b790 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -52,9 +52,9 @@ if ((!isExtensionActive('bonus')) && (!isAdmin())) { // Add more bonus points here $add = runFilterChain('add_bonus_points_user_columns', ''); -$USE = '`turbo_bunus`'; +$pointsColumns = '`turbo_bunus`'; if (!empty($add)) { - $USE = '(0' . $add . ')'; + $pointsColumns = '(0' . $add . ')'; } // END - if // Init variables @@ -70,13 +70,14 @@ if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) { // Let's check if there are some points left we can 'pay'... $result = SQL_QUERY_ESC("SELECT `userid`, - ".$USE." AS `points`, + ".$pointsColumns." AS `points`, `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - " . $USE . " > 0 AND + " . $pointsColumns . " > 0 AND `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " " . $lastOnline . " ORDER BY `points` DESC, diff --git a/inc/modules/member/what-book_surfbar.php b/inc/modules/member/what-book_surfbar.php index 24cc1cee03..7b65d6d7fe 100644 --- a/inc/modules/member/what-book_surfbar.php +++ b/inc/modules/member/what-book_surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { // Redirect redirectToIndexMemberOnlyModule(); @@ -52,7 +52,7 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { } // END - if // Still allowed to book more URLs? -if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { +if (!ifSurfbarMemberAllowedMoreUrls()) { // No more URLs allowed to book! displayMessage('{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}'); } elseif ((isFormSent()) && (isPostRequestElementSet('limited'))) { @@ -66,7 +66,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { $message = '{--MEMBER_SURFBAR_URL_NOT_ADDED--}'; // Register the new URL - $insertId = SURFBAR_MEMBER_ADD_URL(postRequestElement('url'), postRequestElement('limit')); + $insertId = doSurfbarMemberAddUrl(postRequestElement('url'), postRequestElement('limit')); // Was this fine? if ($insertId > 0) { diff --git a/inc/modules/member/what-booking.php b/inc/modules/member/what-booking.php index d428985dba..7211ec693d 100644 --- a/inc/modules/member/what-booking.php +++ b/inc/modules/member/what-booking.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-cash_coupon.php b/inc/modules/member/what-cash_coupon.php index 7718abc36c..fedbe03e84 100644 --- a/inc/modules/member/what-cash_coupon.php +++ b/inc/modules/member/what-cash_coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -110,7 +110,7 @@ LIMIT 1", // Does it work? if (SQL_HASZEROAFFECTED()) { // Abort it here, it always must work - debug_report_bug(__FILE__, __LINE__, 'User coupon cannot be updated! coupon_id=' . $content['coupon_id']); + reportBug(__FILE__, __LINE__, 'User coupon cannot be updated! coupon_id=' . $content['coupon_id']); } // END - if // Update count as well @@ -120,7 +120,7 @@ LIMIT 1", // Does it work? if (SQL_HASZEROAFFECTED()) { // Abort it here, it always must work - debug_report_bug(__FILE__, __LINE__, 'Coupon data cannot be updated! coupon_id=' . $content['coupon_id']); + reportBug(__FILE__, __LINE__, 'Coupon data cannot be updated! coupon_id=' . $content['coupon_id']); } // END - if // Run post filter chain diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 26b06a457f..1789239edf 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -71,42 +71,33 @@ if (!SQL_HASZERONUMS($result)) { // Start counting all $count = '0'; + // Ini SQLs here + initSqls(); + // Go through all entries foreach (postRequestElement('cat') as $categoryId => $joined) { - // Ini sql here - $sql = ''; - // Has the user joined on this category? switch ($joined) { case 'Y': - $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", - array(getMemberId(), bigintval($categoryId)), __FILE__, __LINE__); - - // Debug message - //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'categoryId='.$categoryId.',joined='.$joined.',getMemberId()='.getMemberId().',SQL_HASZERONUMS()='.intval(SQL_HASZERONUMS($result_user))); - - if (SQL_HASZERONUMS($result_user)) { - $sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`,`cat_id`) VALUES (%s,%s)"; + // Check if this category has an entry + if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', true, sprintf(" AND `cat_id`=%s", bigintval($categoryId))) == 0) { + // No, so add it + addSql(sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`,`cat_id`) VALUES (%s,%s)", getMemberId(), bigintval($categoryId))); } // END - if - - // Free memory - SQL_FREERESULT($result_user); break; case 'N': - $sql = "DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1"; + addSql(sprintf("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", getMemberId(), bigintval($categoryId))); break; } // END - switch - - if (!empty($sql)) { - // Run SQL command - SQL_QUERY_ESC(trim($sql), array(getMemberId(), bigintval($categoryId)), __FILE__, __LINE__); - - // Count this row - $count += SQL_AFFECTEDROWS(); - } // END - if } // END - foreach + // Do we have entries? + if (countSqls() > 0) { + // Run SQL commands + $count = runFilterChain('run_sqls'); + } // END - if + // Categories saved? if ($count > 0) { // Output message @@ -121,17 +112,10 @@ if (!SQL_HASZERONUMS($result)) { displayMessage('{--CHOOSE_MORE_CATEGORIES--}'); } // END - if - // Put some data into constants for the template - $content['rows'] = (SQL_NUMROWS($result) * 2 + 4); - - // Load header template - loadTemplate('member_cats_header', false, $content); - - // Start switching colors and load all visible categories - // @TODO Rewrite this to use $OUT .= ... + // Load all categories of this member $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { - // Default he has not joined + // Default he has not joined, add color switch $content['jn'] = ' checked="checked"'; $content['jy'] = ''; @@ -150,12 +134,15 @@ if (!SQL_HASZERONUMS($result)) { } // END - if } - // Load row template and switch colors - loadTemplate('member_cat_row', false, $content); + // Load row template + $OUT .= loadTemplate('member_cats_row', true, $content); } // END - while + // Free result + SQL_FREERESULT($result); + // Load footer template - loadTemplate('member_cats_footer'); + loadTemplate('member_cats', false, $OUT); } } else { // No cateogries are defined yet diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index 76406561f1..d02038b257 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-earning.php b/inc/modules/member/what-earning.php index 8c93babde9..c0b2ab5343 100644 --- a/inc/modules/member/what-earning.php +++ b/inc/modules/member/what-earning.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -66,7 +66,7 @@ ORDER BY d.`earning_sorting` ASC', __FILE__, __LINE__); // Do we have entries? -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // Init output $OUT = ''; diff --git a/inc/modules/member/what-guest.php b/inc/modules/member/what-guest.php index 97935fb008..528cb3819e 100644 --- a/inc/modules/member/what-guest.php +++ b/inc/modules/member/what-guest.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index fc92311e16..0281633689 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 9c963f7135..d7f695a43c 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } diff --git a/inc/modules/member/what-list_coupon.php b/inc/modules/member/what-list_coupon.php index aa364d47a4..e0d0c9c6d5 100644 --- a/inc/modules/member/what-list_coupon.php +++ b/inc/modules/member/what-list_coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -74,7 +74,7 @@ ORDER BY u.`cashed_on` DESC", array(getMemberId()), __FILE__, __LINE__); // Do we have entries? -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // Init variable $OUT = ''; diff --git a/inc/modules/member/what-list_surfbar.php b/inc/modules/member/what-list_surfbar.php index 39c79cbbba..b783520296 100644 --- a/inc/modules/member/what-list_surfbar.php +++ b/inc/modules/member/what-list_surfbar.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -51,15 +51,15 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { } // END - if // Load user URLs -$urlArray = SURFBAR_GET_USER_URLS(); +$urlArray = getSurfbarUserUrls(); // Are there entries or form is submitted? -if ((isFormSent()) && (isPostRequestElementSet('action')) && (isPostRequestElementSet('id'))) { +if ((isFormSent()) && (isPostRequestElementSet('action')) && (isPostRequestElementSet('url_id'))) { // Process the form - if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $urlArray)) { + if (doSurfbarMemberByFormData(postRequestArray(), $urlArray)) { // Action performed but shall we display it? if (((postRequestElement('action') != 'edit') && (postRequestElement('action') != 'delete')) || (isPostRequestElementSet('execute'))) { - // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed + // Display "action done" message if action is whether 'edit' nor 'delete' or has been executed displayMessage('{--MEMBER_SURFBAR_ACTION_DONE--}'); } // END - if } else { @@ -77,7 +77,7 @@ if ((isFormSent()) && (isPostRequestElementSet('action')) && (isPostRequestEleme } // END - if $content['url_registered'] = generateDateTime($content['url_registered'], '2'); $content['url_last_locked'] = generateDateTime($content['url_last_locked'], '2'); - $content['actions'] = SURFBAR_MEMBER_ACTIONS($content['url_id'], $content['url_status']); + $content['actions'] = generateSurfbarMemberActions($content['url_id'], $content['url_status']); // Load row template $OUT .= loadTemplate('member_list_surfbar_row', true, $content); diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index ffc1932f40..7bc1b6cd85 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -17,7 +17,7 @@ * @TODO Rewrite the code to a filter * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -49,7 +49,7 @@ $url = 'modules.php?module=index&code='; if (destroyMemberSession()) { // Remove theme cookie as well if (isExtensionActive('theme')) { - setTheme(''); + setMailerTheme(''); } // END - if // Logout completed diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 83392c1cb0..4ed6637853 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -98,8 +98,22 @@ switch ($mode) { case 'edit': // Edit data if (isExtensionActive('country', true)) { - // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - $result = SQL_QUERY_ESC("SELECT `surname`,`family`,`street_nr`,`country_code`,`zip`,`city`,`email`,`birth_day`,`birth_month`,`birth_year`,`gender`,`max_mails`,`receive_mails`,`last_update` + // New way + $result = SQL_QUERY_ESC("SELECT + `surname`, + `family`, + `street_nr`, + `country_code`, + `zip`, + `city`, + `email`, + `birth_day`, + `birth_month`, + `birth_year`, + `gender`, + `max_mails`, + `receive_mails`, + `last_update` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE @@ -107,8 +121,22 @@ WHERE LIMIT 1", array(getMemberId()), __FILE__, __LINE__); } else { - // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - $result = SQL_QUERY_ESC("SELECT `surname`,`family`,`street_nr`,`country`,`zip`,`city`,`email`,`birth_day`,`birth_month`,`birth_year`,`gender`,`max_mails`,`receive_mails`,`last_update` + // Old way + $result = SQL_QUERY_ESC("SELECT + `surname`, + `family`, + `street_nr`, + `country`, + `zip`, + `city`, + `email`, + `birth_day`, + `birth_month`, + `birth_year`, + `gender`, + `max_mails`, + `receive_mails`, + `last_update` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE @@ -118,7 +146,7 @@ LIMIT 1", } // Get line - $content = merge_array($content, SQL_FETCHARRAY($result, 0, false)); + $content = merge_array($content, SQL_FETCHARRAY($result)); // Free result SQL_FREERESULT($result); @@ -127,6 +155,7 @@ LIMIT 1", // How far is last change on his profile away from now? if (($content['update_check'] > time()) && (!isAdmin()) && (getProfileLock() > 0)) { + // Profile is locked, so output propper message $content['update_check'] = '{%message,MEMBER_PROFILE_LOCKED=' . generateDateTime($content['update_check'] + getProfileLock(), '0') . '%}'; // You cannot change your account @@ -168,7 +197,7 @@ LIMIT 1", // Generate selection box $OUT = ''; $content['country'] = $OUT; } else { @@ -231,11 +260,17 @@ LIMIT 1", SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET - `gender`='%s',`surname`='%s',`family`='%s', + `gender`='%s', + `surname`='%s', + `family`='%s', `street_nr`='%s', - `country_code`=%s,`zip`=%s,`city`='%s', + `country_code`=%s, + `zip`=%s, + `city`='%s', `email`='%s', - `birth_day`=%s,`birth_month`=%s,`birth_year`=%s, + `birth_day`=%s, + `birth_month`=%s, + `birth_year`=%s, `max_mails`='%s', `last_update`=UNIX_TIMESTAMP()".$AND.", `notified`='N', @@ -263,11 +298,17 @@ LIMIT 1", SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET - `gender`='%s',`surname`='%s',`family`='%s', + `gender`='%s', + `surname`='%s', + `family`='%s', `street_nr`='%s', - `country`='%s',`zip`=%s,`city`='%s', + `country`='%s', + `zip`=%s, + `city`='%s', `email`='%s', - `birth_day`=%s,`birth_month`=%s,`birth_year`=%s, + `birth_day`=%s, + `birth_month`=%s, + `birth_year`=%s, `max_mails`='%s', `last_update`=UNIX_TIMESTAMP()".$AND.", `notified`='N', diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 1fa6fecb3f..5312676f66 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -69,14 +69,13 @@ if ($isValid === true) { // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !) $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != %s LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); + array( + postRequestElement('nickname'), + getMemberId() + ), __FILE__, __LINE__); // Is it not in use? if (SQL_HASZERONUMS($result)) { - // Nickname not in use, so set it now - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); - // Prepare array $filterData = array( 'history_subject' => 'NICKNAME_CHANGED', @@ -87,6 +86,13 @@ if ($isValid === true) { // Run filter chain runFilterChain('add_history_entry', $filterData); + // Nickname not in use, so set it now + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", + array( + postRequestElement('nickname'), + getMemberId() + ), __FILE__, __LINE__); + // Change message $content = '{--MEMBER_NICKNAME_SAVED--}'; } // END - if diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index e87be3b9ac..a44255e8ac 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -35,7 +35,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } elseif (!isMember()) { redirectToIndexMemberOnlyModule(); } @@ -54,7 +54,7 @@ $ALLOWED = getUserData('receive_mails') - getUserData('mail_orders'); if (getConfig('order_max_full') == 'MAX') $ALLOWED = getUserData('receive_mails'); // Now check his points amount -$total = getTotalPoints(getMemberId()); +$totalPoints = getTotalPoints(getMemberId()); if ((isExtensionInstalledAndNewer('holiday', '0.1.3')) && (isUserDataEnabled('holiday_active'))) { // Holiday is active! @@ -63,7 +63,9 @@ if ((isExtensionInstalledAndNewer('holiday', '0.1.3')) && (isUserDataEnabled('ho // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back... - $result = SQL_QUERY_ESC("SELECT `id`,`data_type` + $result = SQL_QUERY_ESC("SELECT + `id`, + `data_type` FROM `{?_MYSQL_PREFIX?}_pool` WHERE @@ -98,7 +100,7 @@ LIMIT 1", } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", '', str_replace("\r", '', postRequestElement('text'))); + $TEST = str_replace(array(chr(10), chr(13)), array('', ''), postRequestElement('text')); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { @@ -110,7 +112,7 @@ LIMIT 1", // Shall I test the subject line against URLs? if (getConfig('allow_url_in_subject') == 'Y') { // Check the subject line for issues - setPostRequestElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); + setPostRequestElement('subject', str_replace(chr(92), '[nl]', substr(postRequestElement('subject'), 0, 200))); if ((isInStringIgnoreCase('https://', postRequestElement('subject'))) || (isInStringIgnoreCase('http://', postRequestElement('subject'))) || (isInStringIgnoreCase('www', postRequestElement('subject')))) { // URL in subject found $url = 'modules.php?module=login&what=order&code=' . getCode('SUBJECT_URL'); @@ -158,7 +160,7 @@ LIMIT 1", if (!isPostRequestElementSet('text')) $url = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code - setPostRequestElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); + setPostRequestElement('text', str_replace(array('<', '>'), array('{OPEN_HTML}', '{CLOSE_HTML}'), postRequestElement('text'))); } } // END - if @@ -174,32 +176,23 @@ LIMIT 1", // Still no error? if (empty($url)) { - // Check if category and number of receivers is okay - $add = ''; - if ((isOrderMultiPageEnabled()) && (isPostRequestElementSet('zip')) && (postRequestElement('zip') != '')) { - // Choose recipients by ZIP code - $add = sprintf(" AND d.zip LIKE '%s%%'", - bigintval(postRequestElement('zip')) - ); - } // END - if - // Check for userids $result = SQL_QUERY_ESC("SELECT - c.userid + c.`userid` FROM `{?_MYSQL_PREFIX?}_user_cats` AS c -LEFT JOIN +INNER JOIN `{?_MYSQL_PREFIX?}_user_data` AS d ON - c.userid=d.userid + c.`userid`=d.`userid` WHERE - c.cat_id=%s AND - c.userid != '%s' AND - d.`status`='CONFIRMED' AND - d.receive_mails > 0 - ".$add." + c.`cat_id`=%s AND + c.`userid` != %s AND + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND + d.`receive_mails` > 0 ORDER BY - d.{?order_select?} {?order_mode?}", + d.`{?order_select?}` {?order_mode?}", array( bigintval(postRequestElement('cat')), getMemberId() @@ -233,7 +226,7 @@ LIMIT 1", if ($holidayContent['userid'] > 0) { // Add receiver - $TEST[] = $holidayContent['userid']; + array_push($TEST, $holidayContent['userid']); $count++; } // END - if } // END - while @@ -260,7 +253,7 @@ LIMIT 1", } // END - if // Calculate used points - $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('mail_type'))); + $usedPoints = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('mail_type'))); // Fix empty zip code if (!isPostRequestElementSet('zip')) { @@ -268,8 +261,8 @@ LIMIT 1", } // END - if // Check if he has enougth points for this order and selected more than 0 receivers - if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) { - // Gettings points is okay, so we can add $USED later from + if (($usedPoints > 0) && ($usedPoints <= $totalPoints) && ($content['target_send'] > 0)) { + // Gettings points is okay, so we can add $usedPoints later from if (($id == '0') || ($type != 'TEMP')) { // New order $id = '0'; @@ -466,14 +459,18 @@ LIMIT 1", // Display order form $result_cats = SQL_QUERY("SELECT - `id`,`cat` + `id`, + `cat` FROM `{?_MYSQL_PREFIX?}_cats` ".$whereStatement." ORDER BY `sort` ASC", __FILE__, __LINE__); + + // Some categories found? if (!SQL_HASZERONUMS($result_cats)) { - if ($total > 0) { + // Enought points left? + if ($totalPoints > 0) { // Initialize array... $categories = array( 'id' => array(), @@ -495,7 +492,7 @@ ORDER BY // ... and begin loading stuff while ($categoriesContent = SQL_FETCHARRAY($result_cats)) { $categories['id'][] = bigintval($categoriesContent['id']); - $categories['name'][] = $categoriesContent['cat']; + array_push($categories['name'], $categoriesContent['cat']); // Select users in current category $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC", @@ -508,20 +505,20 @@ ORDER BY if (isExtensionInstalledAndNewer('holiday', '0.1.3')) { // Check user's holiday status $result_holiday = SQL_QUERY_ESC("SELECT - COUNT(d.userid) AS `cnt` + COUNT(d.`userid`) AS `cnt` FROM `{?_MYSQL_PREFIX?}_user_data` AS d LEFT JOIN `{?_MYSQL_PREFIX?}_user_holidays` AS h ON - d.userid=h.userid + d.`userid`=h.`userid` WHERE - d.userid=%s AND - d.receive_mails > 0 AND + d.`userid`=%s AND + d.`receive_mails` > 0 AND d.`status`='CONFIRMED' AND d.`holiday_active`='Y' AND - h.holiday_start < UNIX_TIMESTAMP() AND - h.holiday_end > UNIX_TIMESTAMP() + h.`holiday_start` < UNIX_TIMESTAMP() AND + h.`holiday_end` > UNIX_TIMESTAMP() LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); @@ -559,7 +556,7 @@ LIMIT 1", // Free memory SQL_FREERESULT($result_userids); - $categories['userids'][] = $userid_cnt; + array_push($categories['userids'], $userid_cnt); } // END - while // Free memory @@ -570,24 +567,22 @@ LIMIT 1", $types = array(); if (!SQL_HASZERONUMS($result)) { - // Check for message id in URL - $message = getMessageFromErrorCode(getRequestElement('code')); - - if (!empty($message)) { - // We got system message so we drop it out to the user - displayMessage($message); + // Is the error code set? + if (isGetRequestElementSet('code')) { + // Display error message + displayMessage(getMessageFromErrorCode(getRequestElement('code'))); } // END - if // Load all email types... - while ($types[] = SQL_FETCHROW($result)) { - // Nothing to do here... ;-) + while ($type = SQL_FETCHARRAY($result)) { + array_push($types, $type); } // END - while // Free memory SQL_FREERESULT($result); // Output user's points - $content['total_points'] = $total; + $content['total_points'] = $totalPoints; // Check how many mail orders he has placed today and how many he's allowed to send switch (getConfig('order_max_full')) { @@ -616,7 +611,14 @@ LIMIT 1", // Check if we already have an order placed and make it editable $result = SQL_QUERY_ESC("SELECT - `subject`,`text`,`payment_id`,`timestamp`,`url`,`target_send`,`cat_id`,`zip` + `subject`, + `text`, + `payment_id`, + `timestamp`, + `url`, + `target_send`, + `cat_id`, + `zip` FROM `{?_MYSQL_PREFIX?}_pool` WHERE @@ -641,8 +643,8 @@ LIMIT 1", // Default output for that your members don't forget it... $content['url'] = 'http://'; $content['target_send'] = '{?order_min?}'; - $content['subject'] = '{--ORDER_DEFAULT_SUBJECT--}'; - $content['text'] = '{--ORDER_DEFAULT_TEXT--}'; + $content['subject'] = ''; + $content['text'] = ''; } // Free result @@ -650,21 +652,16 @@ LIMIT 1", if ((isPostRequestElementSet('data')) || ((getOrderMultiPage() != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { // Pre-output categories - $content['category_selection'] = ''; - foreach ($categories['id'] as $key => $value) { - $content['category_selection'] .= ' '; + foreach ($categories['id'] as $key => $value) { + $OUT .= ' '; } // END - foreach } else { // No cateogries are defined yet @@ -1612,8 +1633,7 @@ VALUES ('%s','%s','%s',%s,%s,'NEW', UNIX_TIMESTAMP(),'%s',%s,%s,%s)", // Generate a receiver list for given category and maximum receivers function generateReceiverList ($categoryId, $receiver, $mode = '') { // Init variables - $CAT_TABS = ''; - $CAT_WHERE = ''; + $extraColumns = ''; $receiverList = ''; $result = false; @@ -1627,32 +1647,32 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') { $receiver = getTotalReceivers($mode); } // END - if + // Exclude (maybe exclude) testers + $addWhere = runFilterChain('user_exclusion_sql', ' '); + // Category given? if ($categoryId > 0) { // Select category - $CAT_TABS = "LEFT JOIN `{?_MYSQL_PREFIX?}_user_cats` AS c ON d.`userid`=c.`userid`"; - $CAT_WHERE = sprintf(" AND c.`cat_id`=%s", $categoryId); + $extraColumns = "LEFT JOIN `{?_MYSQL_PREFIX?}_user_cats` AS c ON d.`userid`=c.`userid`"; + $addWhere = sprintf(" AND c.`cat_id`=%s", $categoryId); } // END - if // Exclude users in holiday? if (isExtensionInstalledAndNewer('holiday', '0.1.3')) { // Add something for the holiday extension - $CAT_WHERE .= " AND d.`holiday_active`='N'"; + $addWhere .= " AND d.`holiday_active`='N'"; } // END - if + // Include only HTML recipients? if ((isExtensionActive('html_mail')) && ($mode == 'html')) { - // Only include HTML receivers - $result = SQL_QUERY_ESC("SELECT d.`userid` FROM `{?_MYSQL_PREFIX?}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED' AND d.`html`='Y'".$CAT_WHERE." ORDER BY d.`{?order_select?}` {?order_mode?} LIMIT %s", - array( - $receiver - ), __FUNCTION__, __LINE__); - } else { - // Include all - $result = SQL_QUERY_ESC("SELECT d.`userid` FROM `{?_MYSQL_PREFIX?}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED'".$CAT_WHERE." ORDER BY d.`{?order_select?}` {?order_mode?} LIMIT %s", - array( - $receiver - ), __FUNCTION__, __LINE__); - } + $addWhere .= " AND d.`html`='Y'"; + } // END - if + + // Run query + $result = SQL_QUERY_ESC("SELECT d.`userid` FROM `{?_MYSQL_PREFIX?}_user_data` AS d ".$extraColumns." WHERE d.`status`='CONFIRMED' ".$addWhere." ORDER BY d.`{?order_select?}` {?order_mode?} LIMIT %s", + array( + $receiver + ), __FUNCTION__, __LINE__); // Entries found? if ((SQL_NUMROWS($result) >= $receiver) && ($receiver > 0)) { @@ -1736,7 +1756,6 @@ function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId = } // Updates last module / online time -// @TODO Fix inconsistency between last_module and getWhat() function updateLastActivity($userid) { // Is 'what' set? if (isWhatSet()) { @@ -1744,34 +1763,85 @@ function updateLastActivity($userid) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET - `last_module`='%s', + `%s`='%s', `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1", array( + getUserLastWhatName(), getWhat(), detectRemoteAddr(), bigintval($userid) ), __FUNCTION__, __LINE__); } else { // No what set, needs to be ignored (last_module is last_what) - // @TODO Rename last_module to last_what to make it more clear SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET + `%s`=NULL, `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1", array( + getUserLastWhatName(), detectRemoteAddr(), bigintval($userid) ), __FUNCTION__, __LINE__); } } +/** + * Checks if given subject is found and if not, adds an SQL query to the + * extension registration queue. + */ +function registerExtensionPointsData ($subject, $columnName, $lockedMode, $paymentMethod) { + // Default is old extension version + $add = ''; + + // Is the extension equal or newer 0.8.9? + if (isExtensionInstalledAndNewer('sql_patches', '0.8.9')) { + // Then add provider + $add = " AND `account_provider`='EXTENSION'"; + } // END - if + + // Is the 'subject' there? + if (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 0) { + // Not found so add an SQL query + addExtensionSql(sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('%s','%s','%s','%s')", + $subject, + $columnName, + $lockedMode, + $paymentMethod + )); + } // END - if +} + +/** + * Checks if given subject is found and if so, adds an SQL query to the + * extension unregistration queue. + */ +function unregisterExtensionPointsData ($subject) { + // Default is old extension version + $add = ''; + + // Is the extension equal or newer 0.8.9? + if (isExtensionInstalledAndNewer('sql_patches', '0.8.9')) { + // Then add provider + $add = " AND `account_provider`='EXTENSION'"; + } // END - if + + // Is the 'subject' there? + if (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 1) { + // Found one or more, so add an SQL query + addExtensionSql(sprintf("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_points_data` WHERE `subject`='%s'" . $add . " LIMIT 1", + $subject + )); + } // END - if +} + // [EOF] ?> diff --git a/inc/pool/pool- b/inc/pool/pool- index d8fcdb4c8b..f89e234c40 100644 --- a/inc/pool/pool- +++ b/inc/pool/pool- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index b127dac665..8ed43487d7 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,26 +49,53 @@ if ((isResetModeEnabled()) || (!isHtmlOutputMode())) { return false; } -// Need this here // Only send bonus mail when bonus extension is active and maximum send-mails is not reached if ($GLOBALS['pool_cnt'] < getMaxSend()) { + // Default is ext-html_mail is gone + $add = ''; + // Do we need to send out bonus mails? if (isExtensionActive('html_mail')) { - // 0 1 2 3 4 5 6 7 8 9 10 11 - $result_bonus = SQL_QUERY("SELECT `id`,`subject`,`text`,`receivers`,`points`,`time`,`data_type`,`timestamp`,`url`,`cat_id`,`target_send`,`html_msg` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='NEW' ORDER BY `timestamp` DESC", __FILE__, __LINE__); - } else { - // 0 1 2 3 4 5 6 7 8 9 10 - $result_bonus = SQL_QUERY("SELECT `id`,`subject`,`text`,`receivers`,`points`,`time`,`data_type`,`timestamp`,`url`,`cat_id`,`target_send` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='NEW' ORDER BY `timestamp` DESC", __FILE__, __LINE__); - } - - if (!SQL_HASZERONUMS($result_bonus)) { + // With HTML support + $add = ', `html_msg`'; + } // END - if + + // Run query + $result_main = SQL_QUERY("SELECT + `id`, + `subject`, + `text`, + `receivers`, + `points`, + `time`, + `data_type`, + `timestamp`, + `url`, + `cat_id`, + `target_send` + " . $add . " +FROM + `{?_MYSQL_PREFIX?}_bonus` +WHERE + `data_type`='NEW' +ORDER BY + `timestamp` DESC", __FILE__, __LINE__); + + // Some mails left? + if (!SQL_HASZERONUMS($result_main)) { + // Init SQLs here + initSqls(); + // Send these mails away... $count2 = ''; - while ($mailData = SQL_FETCHARRAY($result_bonus)) { + while ($mailData = SQL_FETCHARRAY($result_main)) { // Message is active in queue SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='QUEUE' WHERE `id`=%s LIMIT 1", array(bigintval($mailData['id'])), __FILE__, __LINE__); + // Default is no users left + $receivers = array(); + // "Explode" all receivers into an array if (isInString(';', $mailData['receivers'])) { // There's more than one receiver in the list... @@ -76,14 +103,13 @@ if ($GLOBALS['pool_cnt'] < getMaxSend()) { } elseif (!empty($mailData['points'])) { // Only one user left $receivers = array($mailData['receivers']); - } else { - // No users left - $receivers = array(0); } $temporaryReceivers = $receivers; - // Now, if we are good little boys and girls Santa Claus left us some user-ids. - // We can now send mails to them... + /* + * Now, if we are good little boys and girls Santa Claus left us + * some user-ids and send out mails to them. + */ foreach ($receivers as $key => $userid) { // Load personal data if (fetchUserData($userid)) { @@ -111,16 +137,17 @@ if ($GLOBALS['pool_cnt'] < getMaxSend()) { // Count one up and remove entry from dummy array $GLOBALS['pool_cnt']++; unset($temporaryReceivers[$key]); + // Is ext-user installed? if (isExtensionInstalledAndNewer('user', '0.1.4')) { + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',mailData[id]=' . $mailData['id']); // Update mails received for receiver - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_received`=`emails_received`+1 WHERE `userid`=%s LIMIT 1", - array(bigintval($userid)), __FILE__, __LINE__); + addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_received`=`emails_received`+1 WHERE `userid`=%s LIMIT 1", bigintval($userid))); } // END - if - // Do we have send maximum mails? + // Is the size of pool reached or nothing to sent left? if (($GLOBALS['pool_cnt'] >= getMaxSend()) || (countSelection($temporaryReceivers) == 0)) { - // Yes, we have - //* DEBUG: */ debugOutput('*EXIT/L:'.__LINE__); + // Yes, it is. So abort here break; } // END - if break; @@ -132,6 +159,9 @@ if ($GLOBALS['pool_cnt'] < getMaxSend()) { } // END - if } // END - foreach + // Run all SQLs + runFilterChain('run_sqls'); + // Update mediadata if version is 0.0.4 or higher if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) { // Update entry (or add missing @@ -180,13 +210,16 @@ LIMIT 1", bigintval($mailData['id']) ), __FILE__, __LINE__); //* DEBUG: */ debugOutput('*L:'.__LINE__.'
    '.print_r($temporaryReceivers, true).'
    !!!'); + + // Run any SQLs + runFilterChain('run_sqls'); break; } } // END - while } // END - if // Free memory - SQL_FREERESULT($result_bonus); + SQL_FREERESULT($result_main); // Remove variable unset($mailText); diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 9fe3822ada..83032754aa 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -60,8 +60,16 @@ if (isExtensionActive('html_mail')) { // Main query $result_main = SQL_QUERY("SELECT - `id`,`sender` AS `sender_userid`,`subject`,`text`,`receivers`, - `payment_id`,`timestamp`,`url`,`target_send`,`cat_id` + `id`, + `sender` AS `sender_userid`, + `subject`, + `text`, + `receivers`, + `payment_id`, + `timestamp`, + `url`, + `target_send`, + `cat_id` ".$HTML." FROM `{?_MYSQL_PREFIX?}_pool` @@ -78,7 +86,7 @@ $pointsBack = array(0); if (!SQL_HASZERONUMS($result_main)) { // Parse all mails - while ($mailData = SQL_FETCHARRAY($result_main, 0, false)) { + while ($mailData = SQL_FETCHARRAY($result_main)) { // Set mail order as 'active'. That means it will be sent out SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='ACTIVE' WHERE `id`=%s AND `data_type`='NEW' LIMIT 1", array($mailData['id']), __FILE__, __LINE__); diff --git a/inc/purge/purge- b/inc/purge/purge- index fd579acc3e..6d2b403cc3 100644 --- a/inc/purge/purge- +++ b/inc/purge/purge- @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/purge/purge-coupon.php b/inc/purge/purge-coupon.php index ba4249ea88..8502b3dd10 100644 --- a/inc/purge/purge-coupon.php +++ b/inc/purge/purge-coupon.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -68,7 +68,7 @@ if (SQL_NUMROWS($result) > 0) { // Start purging all while ($content = SQL_FETCHARRAY($result)) { // Add id - $ids[] = $content['id']; + array_push($ids, $content['id']); // Translate some data $content['coupon_created'] = generateDateTime($content['coupon_created'], '2'); diff --git a/inc/purge/purge-general.php b/inc/purge/purge-general.php index ad9ad46475..77ef4a9aff 100644 --- a/inc/purge/purge-general.php +++ b/inc/purge/purge-general.php @@ -17,7 +17,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/purge/purge-inact.php b/inc/purge/purge-inact.php index 6786cb1714..d9278d309c 100644 --- a/inc/purge/purge-inact.php +++ b/inc/purge/purge-inact.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -75,7 +75,8 @@ if (isAutopurgeInactiveEnabled()) { FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND + `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_since?} @@ -95,7 +96,7 @@ ORDER BY $content = merge_array($content, $row); // Remember userids for the admin - $userids[] = $content['userid']; + array_push($userids, $content['userid']); // Get date/time from timestamp $content['last_online'] = generateDateTime($content['last_online'], 0); @@ -110,7 +111,7 @@ ORDER BY } // END - while // Remove last comma - $useridsContent = implode("\n", $userids); + $useridsContent = implode(chr(10), $userids); // Send mail notification to admin sendAdminNotification('{--ADMIN_AUTOPURGE_INACTIVE_SUBJECT--}', 'admin_autopurge_inactive', $useridsContent); @@ -128,7 +129,8 @@ ORDER BY FROM `{?_MYSQL_PREFIX?}_user_data` WHERE - `status`='CONFIRMED' AND + `status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_time?} AND @@ -144,7 +146,7 @@ ORDER BY // Delete inactive accounts while ($content = SQL_FETCHARRAY($result_inactive)) { // Remember userids for the admin - $userids[] = $content['userid']; + array_push($userids, $content['userid']); // Get date/time from timestamp $content['last_online'] = generateDateTime($content['last_online'], 0); @@ -154,7 +156,7 @@ ORDER BY } // END - while // Display all userids - $useridsContent = implode("\n", $userids); + $useridsContent = implode(chr(10), $userids); // Send mail notification to admin if (getConfig('ap_in_notify') == 'Y') { diff --git a/inc/purge/purge-mails.php b/inc/purge/purge-mails.php index aabaf12a79..ca8282eacf 100644 --- a/inc/purge/purge-mails.php +++ b/inc/purge/purge-mails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ WHERE ORDER BY `sender` ASC", __FILE__, __LINE__); -// Reset counter... +// Init counter... $deletedStats = '0'; // Do we have "purged" mails? @@ -72,17 +72,6 @@ if (!SQL_HASZERONUMS($result_mails)) { // Get all affected (deleted) rows $deletedStats += SQL_AFFECTEDROWS(); - - // Reset query (to prevent possible errors) ...; - $result_mails = SQL_QUERY("SELECT - `sender` -FROM - `{?_MYSQL_PREFIX?}_pool` -WHERE - `data_type`='DELETED' AND - (UNIX_TIMESTAMP() - `timestamp`) >= {?ap_dm_timeout?} -ORDER BY - `sender` ASC", __FILE__, __LINE__); } // END - if } // END - while } // END - if diff --git a/inc/purge/purge-tasks.php b/inc/purge/purge-tasks.php index 821297e527..c1c3a8ff91 100644 --- a/inc/purge/purge-tasks.php +++ b/inc/purge/purge-tasks.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * diff --git a/inc/purge/purge-unconfirmed.php b/inc/purge/purge-unconfirmed.php index 847ba6c0f0..0371f26ca3 100644 --- a/inc/purge/purge-unconfirmed.php +++ b/inc/purge/purge-unconfirmed.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -79,7 +79,7 @@ ORDER BY } // END - while // Remove last comma - $userids = str_replace(', ', "\n", substr($userids, 0, -2)); + $userids = str_replace(', ', chr(10), substr($userids, 0, -2)); // Send mail notification to admin if (getConfig('ap_un_notify') == 'Y') { diff --git a/inc/referral-functions.php b/inc/referral-functions.php index 39302c95b4..6078e378fa 100644 --- a/inc/referral-functions.php +++ b/inc/referral-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -109,29 +109,29 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU setCurrentUserId($userid); // Check user account - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',points=' . $points . ',paymentMethod=' . $paymentMethod . ',sendNotify=' . intval($sendNotify)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',points=' . $points . ',paymentMethod=' . $paymentMethod . ',sendNotify=' . intval($sendNotify)); if (fetchUserData($userid)) { - // Determine wether the user has some mails to click before he/she gets the points - $locked = ifUserPointsLocked($userid); + // Determine whether the user has some mails to click before he/she gets the points + $isLocked = ifUserPointsLocked($userid); // Detect database column - $pointsColumn = determinePointsColumnFromSubjectLocked($subject, $locked); + $pointsColumn = determinePointsColumnFromSubjectLocked($subject, $isLocked); // Get percents - $per = getReferralLevelPercents($GLOBALS['ref_level']); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',points=' . $points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ',per=' . $per . ',mode=' . $paymentMethod . ',pointsColumn=' . $pointsColumn . ',locked=' . intval($locked) . ',refid=' . getUserData('refid')); + $percents = getReferralLevelPercents($GLOBALS['ref_level']); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',points=' . $points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ',percents=' . $percents . ',mode=' . $paymentMethod . ',pointsColumn=' . $pointsColumn . ',isLocked=' . intval($isLocked) . ',refid=' . getUserData('refid')); // Some percents found? - if ($per > 0) { + if ($percents > 0) { // Calculate new points - $ref_points = $points * $per / 100; + $ref_points = $points * $percents / 100; // Pay refback here if level > 0 and in ref-mode - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',points=' . $points . ',paymentMethod=' . $paymentMethod); - if (($userid != $refid) && ($paymentMethod == 'REFERRAL') && (isValidUserId(getUserData('refid'))) && (isExtensionActive('refback'))) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - BEFORE!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',points=' . $points . ',paymentMethod=' . $paymentMethod); + if (($userid != $refid) && (substr($subject, 0, 8) != 'refback:') &&($paymentMethod == 'REFERRAL') && (isValidUserId(getUserData('refid'))) && (isExtensionActive('refback'))) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - BEFORE!'); $ref_points = addRefbackPoints($userid, getUserData('refid'), $points, $ref_points); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - AFTER!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',ref_points=' . $ref_points . ',depth=' . convertNullToZero($GLOBALS['ref_level']) . ' - AFTER!'); } // END - if // Update points... @@ -183,7 +183,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU 'column' => $pointsColumn, 'notify' => $sendNotify, 'refid' => $refid, - 'locked' => $locked, + 'locked' => $isLocked, 'points_mode' => 'add', 'add_mode' => $paymentMethod, 'added' => $added @@ -196,13 +196,26 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU $added = $filterData['added']; //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added=' . intval($added) . ' - AFTER FILTER'); - // Points updated, maybe I shall send him an email? - if (($sendNotify === true) && (isValidUserId(getUserData('refid'))) && ($locked === false)) { + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . $refid . ',paymentMethod=' . $paymentMethod . ',sendNotify=' . intval($sendNotify) . ',isLocked=' . intval($isLocked)); + + // Send "referral confirmed" mails out? + if ((isValidUserid($refid)) && ($refid != $userid) && ($sendNotify === true)) { + // Calculate the referral's points and percents + $percentsReferral = getReferralLevelPercents($GLOBALS['ref_level'] + 1); + + // Calculate new points + $ref_points = $ref_points * $percentsReferral / 100; + // Prepare content $content = array( - 'percents' => $per, - 'level' => bigintval($GLOBALS['ref_level']), - 'points' => $ref_points, + 'userid' => bigintval($userid), + 'refid' => $refid, + 'level' => bigintval($GLOBALS['ref_level'] + 1), + 'percents' => $percentsReferral, + 'points' => ($paymentMethod == 'REFERRAL' ? $ref_points : '0'), + 'payment_method' => $paymentMethod, + 'subject' => $subject, ); // Load email template @@ -210,24 +223,44 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU // Send email sendEmail($userid, '{--THANX_REFERRAL_ONE_SUBJECT--}', $message); - } elseif (($sendNotify === true) && (!isValidUserId(getUserData('refid'))) && ($locked === false) && ($paymentMethod == 'DIRECT')) { - // Prepare content + } // END - if + + // Points updated, maybe I shall send him an email? + if (($sendNotify === true) && ($isLocked === false)) { + // "Explode" subject + $subjectArray = explode(':', $subject); + $subjectUserid = (isset($subjectArray[1])) ? $subjectArray[1] : '0'; + + // Generic delivery of mails, so prepare data $content = array( - 'reason' => '{--REASON_DIRECT_PAYMENT--}', - 'subject' => $subject, - 'points' => $ref_points + 'userid' => $userid, + 'percents' => $percents, + 'level' => bigintval($GLOBALS['ref_level']), + 'points' => $ref_points, + 'column' => $pointsColumn, + 'subject' => $subjectArray[0], + 'subject_userid' => $subjectUserid, + 'payment_method' => $paymentMethod, ); - // Load message - $message = loadEmailTemplate('member_add_points', $content, $userid); + // Load email template + $message = loadEmailTemplate('member_' . $subjectArray[0] . '_' . strtolower($paymentMethod), $content, $userid); - // And sent it away - sendEmail($userid, '{--DIRECT_PAYMENT_SUBJECT--}', $message); - if (!isGetRequestElementSet('mid')) { - // Output message to admin - displayMessage('{--ADMIN_POINTS_ADDED--}'); - } // END - if - } + // Send email + sendEmail($userid, '{%message,MEMBER_' . $paymentMethod . '_' . strtoupper($subjectArray[0]) . '_SUBJECT=' . $subjectUserid . '%}', $message); + + // Also send admin notification + sendAdminNotification( + // Subject + '{%message,ADMIN_' . $paymentMethod . '_' . strtoupper($subjectArray[0]) . '_SUBJECT=' . $subjectUserid . '%}', + // Template name + 'admin_' . $subjectArray[0] . '_' . strtolower($paymentMethod), + // Template content (data array) + $content, + // User id + $userid + ); + } // END - if // Increase referral level, if payment method is REFERRAL if ($paymentMethod == 'REFERRAL') { @@ -239,11 +272,20 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Referral level *NOT* increased, ref_level=' . convertNullToZero($GLOBALS['ref_level']) . ',points=' . $points . ',refid=' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod); } + // Remove any :x + $subject = removeDoubleDotFromSubject($subject); + // Maybe there's another ref? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refid(var|data)=' . convertNullToZero($refid) . '|' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refid(var|data)=' . convertNullToZero($refid) . '|' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod . ',subject=' . $subject . ',ref_level=' . $GLOBALS['ref_level']); if ((isValidUserId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($paymentMethod == 'REFERRAL')) { + // Is _ref there? + if (substr($subject, -4, 4) == '_ref') { + // Then remove it, no double _ref suffix! + $subject = substr($subject, 0, -4); + } // END - if + // Then let's credit him here... - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',points=' . $points . ',ref_points=' . $ref_points . ',added[' . gettype($added) . ']=' . intval($added) . ' - ADVANCE!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',refid=' . convertNullToZero(getUserData('refid')) . ',points=' . $points . ',ref_points=' . $ref_points . ',added[' . gettype($added) . ']=' . intval($added) . ',ref_level=' . $GLOBALS['ref_level'] . ' - ADVANCE!'); $added = ($added && addPointsThroughReferralSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, getFetchedUserData('userid', getUserData('refid'), 'refid'))); } // END - if } // END - if @@ -414,16 +456,20 @@ function getPointsDataArrayFromSubject ($subject) { // Extension ext-sql_patches must be up-to-date if (isExtensionInstalledAndOlder('sql_patches', '0.8.2')) { // Please update ext-sql_patches - debug_report_bug(__FUNCTION__, __LINE__, 'sql_patches is out-dated. Please update to at least 0.8.2 to continue. subject=' . $subject); - } // END - if + reportBug(__FUNCTION__, __LINE__, 'sql_patches is out-dated. Please update to at least 0.8.2 to continue. subject=' . $subject); + } elseif (substr($subject, -8, 8) == '_ref_ref') { + // Please report ALL finiding + reportBug(__FUNCTION__, __LINE__, 'subject=' . $subject . ' contains invalid double-suffix _ref.'); + } // Remove any double-dot from it - $subjectArray = explode(':', $subject); - $subject = $subjectArray[0]; - unset($subjectArray); + $subject = removeDoubleDotFromSubject($subject); // If we have cache, shortcut it here if (isset($GLOBALS['cache_array']['points_data'][$subject])) { + // Count cache hit + incrementStatsEntry('cache_hits'); + // Return it return $GLOBALS['cache_array']['points_data'][$subject]; } // END - if @@ -487,7 +533,7 @@ function getPaymentMethodFromSubject ($subject) { return $paymentMethod; } -// Checks wether notification of points recipient is enabled +// Checks whether notification of points recipient is enabled function isPaymentRecipientNotificationEnabled ($subject) { // Get the points_data entry $pointsData = getPointsDataArrayFromSubject($subject); @@ -524,14 +570,14 @@ function loadReferralTable ($userid) { $GLOBALS['referral_refid'][$userid] = array(); // Get all level entries from the refsystem table - $result = SQL_QUERY_ESC('SELECT `level` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s ORDER BY `level` ASC', + $GLOBALS['referral_result'][$userid] = SQL_QUERY_ESC('SELECT `level` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s ORDER BY `level` ASC', array($userid), __FUNCTION__, __LINE__); // Do we have entries? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',SQL_NUMROWS()=' . SQL_NUMROWS($result)); - if (SQL_NUMROWS($result) > 0) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',SQL_NUMROWS()=' . SQL_NUMROWS($GLOBALS['referral_result'][$userid])); + if (SQL_NUMROWS($GLOBALS['referral_result'][$userid]) > 0) { // Then walk through all levels - while (list($level) = SQL_FETCHROW($result)) { + while (list($level) = SQL_FETCHROW($GLOBALS['referral_result'][$userid])) { // Init array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level); $GLOBALS['referral_refid'][$userid][$level] = array(); @@ -539,30 +585,31 @@ function loadReferralTable ($userid) { // Level is = 1? if ($level == 1) { // Load all referrals of this user - $result_refs = SQL_QUERY_ESC('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC', + $GLOBALS['referral_result_refs'][$userid] = SQL_QUERY_ESC('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC', array($userid), __FUNCTION__, __LINE__); // Do we have entries? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',SQL_NUMROWS()=' . SQL_NUMROWS($result_refs)); - if (SQL_NUMROWS($result_refs) > 0) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',SQL_NUMROWS()=' . SQL_NUMROWS($GLOBALS['referral_result_refs'][$userid])); + if (SQL_NUMROWS($GLOBALS['referral_result_refs'][$userid]) > 0) { // Then again walk through all - while (list($refid) = SQL_FETCHROW($result_refs)) { + while (list($refid) = SQL_FETCHROW($GLOBALS['referral_result_refs'][$userid])) { // Add this refid - $GLOBALS['referral_refid'][$userid][$level][] = $refid; - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . $refid); + array_push($GLOBALS['referral_refid'][$userid][$level], $refid); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . $refid . ' - ADDED!'); + // Load the refid's array as well loadReferralTable($refid); } // END - while } // END - if // Free result - SQL_FREERESULT($result_refs); + SQL_FREERESULT($GLOBALS['referral_result_refs'][$userid]); } // END - if } // END - while } // END - if // Free result - SQL_FREERESULT($result); + SQL_FREERESULT($GLOBALS['referral_result'][$userid]); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - EXIT!'); } @@ -572,7 +619,7 @@ function addMissingReferralLevels ($userid) { // If the array is gone, you have called this function without calling loadReferralTable() if (!isset($GLOBALS['referral_refid'][$userid])) { // Please fix your code - debug_report_bug(__FUNCTION__, __LINE__, 'Called without calling loadReferralTable() before! userid=' . $userid); + reportBug(__FUNCTION__, __LINE__, 'Called without calling loadReferralTable() before! userid=' . $userid); } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',count()=' . count($GLOBALS['referral_refid'][$userid])); @@ -603,7 +650,7 @@ function addMissingReferralLevels ($userid) { if ((!isset($GLOBALS['referral_refid'][$userid][$newLevel])) || (!in_array($refRefid, $GLOBALS['referral_refid'][$userid][$newLevel]))) { // Then we must add this ref's refid to the userid's next level //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',newLevel=' . $newLevel . ',refRefid=' . $refRefid . ' - ADDED!'); - $GLOBALS['referral_refid'][$userid][$newLevel][] = $refRefid; + array_push($GLOBALS['referral_refid'][$userid][$newLevel], $refRefid); // Add also this user's (maybe) missing levels addMissingReferralLevels($refRefid); @@ -613,6 +660,7 @@ function addMissingReferralLevels ($userid) { } // END - foreach } // END - foreach } // END - foreach + //die('
    '.print_r($GLOBALS['referral_refid'][$userid],true).'
    '); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - EXIT!'); } @@ -622,7 +670,7 @@ function flushReferralTableToDatabase ($userid) { // If the array is gone, you have called this function without calling loadReferralTable() if (!isset($GLOBALS['referral_refid'][$userid])) { // Please fix your code - debug_report_bug(__FUNCTION__, __LINE__, 'Called without calling loadReferralTable() before! userid=' . $userid); + reportBug(__FUNCTION__, __LINE__, 'Called without calling loadReferralTable() before! userid=' . $userid); } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',count()=' . count($GLOBALS['referral_refid'][$userid])); @@ -674,5 +722,89 @@ function flushReferralTableToDatabase ($userid) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - EXIT!'); } +// Generator (somewhat getter) for points_data, locked_mode +function generatePointsLockedModeOptions ($lockedMode = NULL) { + // Is this cached? + if (!isset($GLOBALS[__FUNCTION__][$lockedMode])) { + // Generate output and cache it + $GLOBALS[__FUNCTION__][$lockedMode] = generateOptions( + '/ARRAY/', + array( + 'LOCKED', + 'UNLOCKED' + ), + array(), + $lockedMode, + '', '', + array(), + 'translatePointsLockedMode' + ); + } // END - if + + // Return content + return $GLOBALS[__FUNCTION__][$lockedMode]; +} + +// Generator (somewhat getter) for points_data, payment_method +function generatePointsPaymentMethodOptions ($paymentMethod = NULL) { + // Is this cached? + if (!isset($GLOBALS[__FUNCTION__][$paymentMethod])) { + // Generate output and cache it + $GLOBALS[__FUNCTION__][$paymentMethod] = generateOptions( + '/ARRAY/', + array( + 'DIRECT', + 'REFERRAL' + ), + array(), + $paymentMethod, + '', '', + array(), + 'translatePointsPaymentMethod' + ); + } // END - if + + // Return content + return $GLOBALS[__FUNCTION__][$paymentMethod]; +} + +// Generator (somewhat getter) for points_data, notify_recipient +function generatePointsNotifyRecipientOptions ($notifyRecipient = NULL) { + // Is this cached? + if (!isset($GLOBALS[__FUNCTION__][$notifyRecipient])) { + // Generate output and cache it + $GLOBALS[__FUNCTION__][$notifyRecipient] = generateOptions( + '/ARRAY/', + array( + 'Y', + 'N' + ), + array(), + $notifyRecipient, + '', '', + array(), + 'translatePointsNotifyRecipient' + ); + } // END - if + + // Return content + return $GLOBALS[__FUNCTION__][$notifyRecipient]; +} + +// Setter for referral id (no bigintval, or nicknames will fail!) +function setReferralId ($refid) { + $GLOBALS['__refid'] = $refid; +} + +// Checks if 'refid' is valid +function isReferralIdValid () { + return ((isset($GLOBALS['__refid'])) && (getReferralId() !== NULL) && (getReferralId() > 0)); +} + +// Getter for referral id +function getReferralId () { + return $GLOBALS['__refid']; +} + // [EOF] ?> diff --git a/inc/request-functions.php b/inc/request-functions.php index 6a17a3c324..c4afd304a9 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -156,7 +156,8 @@ function postRequestElement ($element, $subElement = NULL) { // Checks if an element in $_POST exists function isPostRequestElementSet ($element, $subElement = NULL) { if (is_null($subElement)) { - return ((isset($GLOBALS['raw_request']['post'][$element])) && (('' . $GLOBALS['raw_request']['post'][$element] . '') != '')); + if (!is_string($element)) die(gettype($element)); + return ((isset($GLOBALS['raw_request']['post'][$element])) && ((is_array($GLOBALS['raw_request']['post'][$element])) || (('' . $GLOBALS['raw_request']['post'][$element] . '') != ''))); } else { return ((isset($GLOBALS['raw_request']['post'][$element][$subElement])) && (('' . $GLOBALS['raw_request']['post'][$element][$subElement] . '') != '')); } @@ -230,29 +231,21 @@ function setPostRequestElement ($element, $value) { $GLOBALS['cache_request']['post'][$element][null] = $value; } -// Checks wether a form was sent. If so, the $_POST['ok'] element must be set +// Checks whether a form was sent. If so, the $_POST['ok'] element must be set function isFormSent ($requestParameter = 'ok') { // Simply wrap it! return isPostRequestElementSet($requestParameter); } -// Checks if 'content_type' is set -function isContentTypeSet () { - return isset($GLOBALS['content_type']); -} - -// Setter for content type -function setContentType ($contentType) { - $GLOBALS['content_type'] = (string) $contentType; -} - -// Getter for content type -function getContentType () { - return $GLOBALS['content_type']; -} - // Getter for request URI function getRequestUri () { + // Is it not set? + if (!isset($_SERVER['REQUEST_URI'])) { + // Return empty string + return ''; + } // END - if + + // Return it return $_SERVER['REQUEST_URI']; } diff --git a/inc/revision-functions.php b/inc/revision-functions.php index 318f337e26..40ff69b3f6 100644 --- a/inc/revision-functions.php +++ b/inc/revision-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -55,11 +55,20 @@ function initRepositoryData () { // Default branch 'Tag' => 8 ); + + // Add Revision, Date, Tag and Author + $GLOBALS['repository_search_for'] = array( + 'File', + 'Revision', + 'Date', + 'Tag', + 'Author' + ); } // "Getter" for revision/version data function getRepositoryData ($type = 'Revision') { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret[' . $type . '] - ENTRY!'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret[' . $type . '] - ENTERED!'); // Default is an invalid value to find bugs... :-) $ret = 'INVALID'; @@ -89,10 +98,10 @@ function getRepositoryData ($type = 'Revision') { $new = true; } else { // Revision file found - $ins_vers = explode("\n", readFromFile($FQFN)); + $ins_vers = explode(chr(10), readFromFile($FQFN)); // Get array for mapping information - $mapper = array_flip(getSearchFor()); + $mapper = array_flip($GLOBALS['repository_search_for']); //* DEBUG: */ debugOutput('
    mapper='.print_r($mapper, true).'
    ins_vers=
    '.print_r($ins_vers, true).'
    '); // Is the content valid? @@ -115,7 +124,7 @@ function getRepositoryData ($type = 'Revision') { // Has it been updated? if ($new === true) { // Write it - writeToFile($FQFN, implode("\n", getArrayFromRepositoryData())); + writeToFile($FQFN, implode(chr(10), getArrayFromRepositoryData())); // ... and call recursive $ret = getRepositoryData($type); @@ -124,20 +133,10 @@ function getRepositoryData ($type = 'Revision') { } // Return the value - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret[' . $type . ']=' . $ret); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret[' . $type . ']=' . $ret . ' - EXIT!'); return $ret; } -// Repares an array we are looking for -// The returned Array is needed twice (in getArrayFromRepositoryData() and in getRepositoryData() in the old .revision-fallback) so I puted it in an extra function to not polute the global namespace -function getSearchFor () { - // Add Revision, Date, Tag and Author - $searchFor = array('File', 'Revision', 'Date', 'Tag', 'Author'); - - // Return the created array - return $searchFor; -} - // Extracts requested revision info from given file data function extractRevisionInfoFromData ($fileData, $search) { // Default is to return empty string @@ -196,7 +195,7 @@ function getArrayFromRepositoryData () { $GLOBALS['cache_array']['revision']['File'][0] = $last_changed['path_name']; // This foreach loops the $searchFor-Tags (array('Revision', 'Date', 'Tag', 'Author') --> could easaly extended in the future) - foreach (getSearchFor() as $search) { + foreach ($GLOBALS['repository_search_for'] as $search) { // This extracts the requested data $search from file data $last_file if ($search != 'File') { // Skip 'File' because we have set it some lines above @@ -228,12 +227,12 @@ function getArrayFromRepositoryData () { // Invalid request reply? if (!isset($version[11])) { // Cannot continue here - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid response from check-updates3.php, count should be at least 11, is ' . count($version)); + reportBug(__FUNCTION__, __LINE__, 'Invalid response from check-updates3.php, count should be at least 11, is ' . count($version)); } // END - if // Prepare content // Only sets not setted or not proper values to the Online-Server-Fallback-Solution - foreach (getSearchFor() as $entry) { + foreach ($GLOBALS['repository_search_for'] as $entry) { // Is it not set or empty? if ((!isset($GLOBALS['cache_array']['revision'][$entry][0])) || (empty($GLOBALS['cache_array']['revision']['File'][0]))) { // Is default data entry nummerical? diff --git a/inc/session-functions.php b/inc/session-functions.php index 95d26340ba..706a483c1c 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,12 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Unset/set session variables function setSession ($var, $value) { // Abort in CSS mode here - if (isCssOutputMode()) return true; + if (isCssOutputMode()) { + return true; + } // END - if // Trim value and session variable $var = trim(secureString($var)); @@ -54,22 +56,22 @@ function setSession ($var, $value) { // Remove the session //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UNSET:' . $var . '=' . getSession($var)); unset($GLOBALS['_SESSION'][$var]); - if (phpversion() >= '5.3.1') { - // session_unregister() is deprecated as of 5.3.1 + if (isPhpVersionEqualNewer('5.3.0')) { + // session_unregister() is deprecated as of 5.3.0 return true; } else { - // PHP version < 5.3.1 + // PHP version < 5.3.0 return session_unregister($var); } } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) { // Set session //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value); $GLOBALS['_SESSION'][$var] = $value; - if (phpversion() >= '5.3.1') { - // session_unregister() is deprecated as of 5.3.1 + if (isPhpVersionEqualNewer('5.3.0')) { + // session_unregister() is deprecated as of 5.3.0 return true; } else { - // PHP version < 5.3.1 + // PHP version < 5.3.0 return session_register($var); } } elseif (!empty($value)) { @@ -84,13 +86,13 @@ function setSession ($var, $value) { return true; } -// Check wether a session variable is set +// Check whether a session variable is set function isSessionVariableSet ($var) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'var=' . $var . ' set in session'); + // Warning: DO NOT call logDebugMessage() from here, this will cause an endless loop return (isset($GLOBALS['_SESSION'][$var])); } -// Returns wether the value of the session variable or NULL if not set +// Returns whether the value of the session variable or NULL if not set function getSession ($var) { // Default is not found ;-) $value = NULL; @@ -106,6 +108,12 @@ function getSession ($var) { return $value; } +// Get whole session array +function getSessionArray () { + // Simply return it + return $GLOBALS['_SESSION']; +} + // Destroy user session function destroyMemberSession () { // Reset userid diff --git a/inc/session.php b/inc/session.php index d45062c744..49c0ab1219 100644 --- a/inc/session.php +++ b/inc/session.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Is ext-sql_patches there and newer? diff --git a/inc/sql-functions.php b/inc/sql-functions.php index fae901b273..9982711f40 100644 --- a/inc/sql-functions.php +++ b/inc/sql-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,10 +42,11 @@ if (!defined('__SECURITY')) { // Init SQLs array function initSqls () { - setSqlsArray(array()); + // Init generic array + setSqlsArray(array('generic' => array())); } -// Checks wether the sqls array is initialized +// Checks whether the sqls array is initialized function isSqlsInitialized () { return ((isset($GLOBALS['sqls'])) && (is_array($GLOBALS['sqls']))); } @@ -69,7 +70,7 @@ function getSqls () { // Add an SQL to the list function addSql ($sql) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, countSqls())); - $GLOBALS['sqls']['generic'][] = (string) $sql; + array_push($GLOBALS['sqls']['generic'], $sql); } // Merge SQLs together @@ -112,7 +113,7 @@ function countSqls () { return $count; } -// Checks wether the SQLs array is filled +// Checks whether the SQLs array is filled function isSqlsValid () { //* DEBUG: */ debugOutput(__FUNCTION__ . ':' . intval(isSqlsInitialized()) . '/' . countSqls() . '/' . getCurrentExtensionName()); return ( @@ -206,7 +207,7 @@ function getInsertSqlFromArray ($array, $tableName) { $SQL .= sprintf('%01.5f', $value); } else { // Everything else might be a string, so add ticks around it - $SQL .= "'" . SQL_ESCAPE($value) . "',"; + $SQL .= chr(39) . SQL_ESCAPE($value) . chr(39) . ','; } } // END - foreach diff --git a/inc/stats-functions.php b/inc/stats-functions.php index 343a7c510c..a965d71c15 100644 --- a/inc/stats-functions.php +++ b/inc/stats-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -64,7 +64,8 @@ function isStatsEntrySet ($entry) { // Increments a statistics entry function incrementStatsEntry ($entry, $amount=1) { // Do we have stats enabled? - if (!ifInternalStatsEnabled()) { + if ((!ifInternalStatsEnabled()) && ($entry != 'db_hits')) { + // Abort here return; } // END - if @@ -74,7 +75,7 @@ function incrementStatsEntry ($entry, $amount=1) { $GLOBALS['stats'][$entry] += $amount; } else { // Write it - $GLOBALS['stats'][$entry] = $amount; + setStatsEntry($entry, $amount); } } @@ -179,6 +180,18 @@ function FILTER_FLUSH_STATS () { if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifInternalStatsEnabled())) { // Write statistics to temporary table writeStatsTable(); + + // Count db/cache hits in database + updateConfiguration( + array( + 'db_hits', + 'cache_hits' + ), array( + getStatsEntry('db_hits'), + getStatsEntry('cache_hits') + ), + '+' + ); } // END - if } diff --git a/inc/stylesheet.php b/inc/stylesheet.php index ab881f0286..29b7304c5c 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,13 +43,27 @@ if (!defined('__SECURITY')) { // Default styles $stylesList = array( 'general.css', + 'ajax.css', ); // Add stylesheet for installation -if ((isInstallationPhase())) $stylesList[] = 'install.css'; +if ((isInstallationPhase())) { + array_push($stylesList, 'install.css'); +} // END - if // When no CSS output-mode is set, set it to file-output -if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', 'FILE'); +if (!isConfigEntrySet('css_php')) { + setConfigEntry('css_php', 'FILE'); +} // END - if + +// Get current theme +$currentTheme = getCurrentTheme(); + +// Has the theme changed? +if ($currentTheme != getSession('mailer_theme')) { + // Then set it + setMailerTheme($currentTheme); +} // END - if // Output CSS files or content or link to css.php ? if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) { @@ -57,7 +71,7 @@ if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) { $stylesList = merge_array($stylesList, getExtensionCssFiles()); // Generate base path - $basePath = sprintf("%stheme/%s/css/", getPath(), getCurrentTheme()); + $basePath = sprintf("%stheme/%s/css/", getPath(), $currentTheme); // Output inclusion lines foreach ($stylesList as $value) { @@ -68,15 +82,15 @@ if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) { if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) { switch (getConfig('css_php')) { case 'DIRECT': // Just link them (unsupported) - $GLOBALS['page_header'] .= ''; + $GLOBALS['__page_header'] .= ''; break; case 'FILE': // Output contents - $GLOBALS['page_header'] .= readFromFile($FQFN); + $GLOBALS['__page_header'] .= readFromFile($FQFN); break; default: // Invalid mode! - debug_report_bug(__FILE__, __LINE__, sprintf("Invalid css_php value %s detected.", getConfig('css_php'))); + reportBug(__FILE__, __LINE__, sprintf("Invalid css_php value %s detected.", getConfig('css_php'))); break; } // END - switch } // END - if @@ -102,7 +116,7 @@ if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) { } // END - foreach // Load template - $GLOBALS['page_header'] .= loadTemplate('css_inline', true, $OUT); + $GLOBALS['__page_header'] .= loadTemplate('css_inline', true, $OUT); } else { // Now we load all CSS files from css.php! $OUT = ''; + $GLOBALS['__page_header'] .= $OUT . '%}{%ext,version=sql_patches%}" />'; } // [EOF] diff --git a/inc/template-functions.php b/inc/template-functions.php index 205c96de97..34469e68de 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,7 +50,7 @@ function enableTemplateHtml ($enable = true) { $GLOBALS['is_template_html'] = (bool) $enable; } -// Checks wether the template is HTML or not by previously set flag +// Checks whether the template is HTML or not by previously set flag // Default: true function isTemplateHtml () { // Is the output_mode other than 0 (HTML), then no comments are enabled @@ -95,60 +95,62 @@ function getColorSwitchCode ($template) { // Output HTML code directly or 'render' it. You addionally switch the new-line character off function outputHtml ($htmlCode, $newLine = true) { // Init output - if (!isset($GLOBALS['output'])) { - $GLOBALS['output'] = ''; + if (!isset($GLOBALS['__output'])) { + $GLOBALS['__output'] = ''; } // END - if + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getOutputMode()=' . getOutputMode() . ',htmlCode(length)=' . strlen($htmlCode) . ',output(length)=' . strlen($GLOBALS['__output'])); // Do we have HTML-Code here? if (!empty($htmlCode)) { // Yes, so we handle it as you have configured switch (getOutputMode()) { case 'render': - // That's why you don't need any \n at the end of your HTML code... :-) + // But if PHP is caching, then we don't need to do that if (getPhpCaching() == 'on') { // Output into PHP's internal buffer outputRawCode($htmlCode); // That's why you don't need any \n at the end of your HTML code... :-) if ($newLine === true) { - print("\n"); + outputRawCode(chr(10)); } // END - if } else { // Render mode for old or lame servers... - $GLOBALS['output'] .= $htmlCode; + $GLOBALS['__output'] .= $htmlCode; // That's why you don't need any \n at the end of your HTML code... :-) if ($newLine === true) { - $GLOBALS['output'] .= "\n"; + $GLOBALS['__output'] .= chr(10); } // END - if } break; case 'direct': - // If we are switching from render to direct output rendered code - if ((!empty($GLOBALS['output'])) && (getPhpCaching() != 'on')) { - outputRawCode($GLOBALS['output']); - $GLOBALS['output'] = ''; + // If we are switching from 'render' to 'direct' mode, all data in '__output' must be flushed and cleared + if ((!empty($GLOBALS['__output'])) && (getPhpCaching() != 'on')) { + outputRawCode($GLOBALS['__output']); + $GLOBALS['__output'] = ''; } // END - if // The same as above... ^ outputRawCode($htmlCode); if ($newLine === true) { - print("\n"); + outputRawCode(chr(10)); } // END - if break; default: // Huh, something goes wrong or maybe you have edited config.php ??? - debug_report_bug(__FUNCTION__, __LINE__, '{--FATAL_ERROR--}: {--NO_RENDER_DIRECT--}'); + reportBug(__FUNCTION__, __LINE__, '{--FATAL_ERROR--}: {--NO_RENDER_DIRECT--}'); break; } // END - switch - } elseif ((getPhpCaching() == 'on') && ((!isset($GLOBALS['header'])) || (count($GLOBALS['header']) == 0)) && (!isRawOutputMode())) { + } elseif ((getPhpCaching() == 'on') && ((!isset($GLOBALS['http_header'])) || (count($GLOBALS['http_header']) == 0)) && (!isRawOutputMode())) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getPhpCaching()=' . getPhpCaching() . ',isset(http_header)=' . intval(isset($GLOBALS['http_header'])) . ',getScriptOutputMode()=' . getScriptOutputMode() . ''); // Output cached HTML code - $GLOBALS['output'] = ob_get_contents(); + $GLOBALS['__output'] = ob_get_contents(); // Clear output buffer for later output if output is found - if (!empty($GLOBALS['output'])) { + if (!empty($GLOBALS['__output'])) { clearOutputBuffer(); } // END - if @@ -159,8 +161,8 @@ function outputHtml ($htmlCode, $newLine = true) { compileFinalOutput(); // Output code here, DO NOT REMOVE! ;-) - outputRawCode($GLOBALS['output']); - } elseif ((getOutputMode() == 'render') && (!empty($GLOBALS['output'])) && (!isRawOutputMode())) { + outputRawCode($GLOBALS['__output']); + } elseif ((getOutputMode() == 'render') && (!empty($GLOBALS['__output'])) && (!isRawOutputMode())) { // Send all HTTP headers sendHttpHeaders(); @@ -168,7 +170,7 @@ function outputHtml ($htmlCode, $newLine = true) { compileFinalOutput(); // Output code here, DO NOT REMOVE! ;-) - outputRawCode($GLOBALS['output']); + outputRawCode($GLOBALS['__output']); } else { // And flush all headers flushHttpHeaders(); @@ -177,15 +179,17 @@ function outputHtml ($htmlCode, $newLine = true) { // Compiles the final output function compileFinalOutput () { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ',getScriptOutputMode()=' . getScriptOutputMode() . ' - ENTERED!'); // Add page header and footer addPageHeaderFooter(); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '__output(length)=' . strlen($GLOBALS['__output']) . ' - After addPageHeaderFooter() call.'); // Do the final compilation - $GLOBALS['output'] = doFinalCompilation($GLOBALS['output']); + $GLOBALS['__output'] = compileUriCode(doFinalCompilation($GLOBALS['__output'])); // Extension 'rewrite' installed? if ((isExtensionActive('rewrite')) && (!isCssOutputMode())) { - $GLOBALS['output'] = rewriteLinksInCode($GLOBALS['output']); + $GLOBALS['__output'] = rewriteLinksInCode($GLOBALS['__output']); } // END - if // Compress it? @@ -193,13 +197,13 @@ function compileFinalOutput () { * @TODO On some pages this is buggy if (!empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (isInStringIgnoreCase('gzip', $_SERVER['HTTP_ACCEPT_ENCODING']))) { // Compress it for HTTP gzip - $GLOBALS['output'] = gzencode($GLOBALS['output'], 9); + $GLOBALS['__output'] = gzencode($GLOBALS['__output'], 9); // Add header addHttpHeader('Content-Encoding: gzip'); } elseif (!empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (isInStringIgnoreCase('deflate', $_SERVER['HTTP_ACCEPT_ENCODING']))) { // Compress it for HTTP deflate - $GLOBALS['output'] = gzcompress($GLOBALS['output'], 9); + $GLOBALS['__output'] = gzcompress($GLOBALS['__output'], 9); // Add header addHttpHeader('Content-Encoding: deflate'); @@ -207,7 +211,7 @@ function compileFinalOutput () { */ // Add final length - addHttpHeader('Content-Length: ' . strlen($GLOBALS['output'])); + addHttpHeader('Content-Length: ' . strlen($GLOBALS['__output'])); // Flush all headers flushHttpHeaders(); @@ -238,7 +242,7 @@ function doFinalCompilation ($code, $insertComments = true, $enableCodes = true) // Was that eval okay? if (empty($newContent)) { // Something went wrong! - debug_report_bug(__FUNCTION__, __LINE__, 'Evaluation error:
    ' . linenumberCode($eval) . '
    ', false); + reportBug(__FUNCTION__, __LINE__, 'Evaluation error:
    ' . linenumberCode($eval) . '
    ', false); } // END - if // Use it again @@ -255,7 +259,7 @@ function doFinalCompilation ($code, $insertComments = true, $enableCodes = true) } // END - while // Add debugging data in HTML code, if mode is enabled - if ((isDebugModeEnabled()) && ($insertComments === true)) { + if ((isDebugModeEnabled()) && ($insertComments === true) && ((isHtmlOutputMode()) || (isCssOutputMode()))) { // Add loop count $code .= ''; } // END - if @@ -267,7 +271,7 @@ function doFinalCompilation ($code, $insertComments = true, $enableCodes = true) // Output the raw HTML code function outputRawCode ($htmlCode) { // Output stripped HTML code to avoid broken JavaScript code, etc. - print(str_replace('{BACK}', "\\", $htmlCode)); + print(str_replace('{BACK}', chr(92), $htmlCode)); // Flush the output if only getPhpCaching() is not 'on' if (getPhpCaching() != 'on') { @@ -281,10 +285,10 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC // @TODO Remove these sanity checks if all is fine if (!is_bool($return)) { // $return has to be boolean - debug_report_bug(__FUNCTION__, __LINE__, 'return[] is not bool (' . gettype($return) . ')'); + reportBug(__FUNCTION__, __LINE__, 'return[] is not bool (' . gettype($return) . ')'); } elseif (!is_string($template)) { // $template has to be string - debug_report_bug(__FUNCTION__, __LINE__, 'template[] is not string (' . gettype($template) . ')'); + reportBug(__FUNCTION__, __LINE__, 'template[] is not string (' . gettype($template) . ')'); } // Init returned content @@ -327,10 +331,10 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC // Normal HTML output? if ((isHtmlOutputMode()) && (substr($template, 0, 3) != 'js_')) { // Add surrounding HTML comments to help finding bugs faster - $ret = '' . $GLOBALS['tpl_content'][$template] . ''; + $code = '' . $GLOBALS['tpl_content'][$template] . ''; // Prepare eval() command - $GLOBALS['template_eval'][$template] = '$ret = "' . getColorSwitchCode($template) . compileCode(escapeQuotes($ret), false, true, true, $compileCode) . '";'; + $GLOBALS['template_eval'][$template] = '$ret = "' . getColorSwitchCode($template) . compileCode(escapeQuotes($code), false, true, true, $compileCode) . '";'; } elseif (substr($template, 0, 3) == 'js_') { // JavaScripts don't like entities, dollar signs and timings $GLOBALS['template_eval'][$template] = '$ret = decodeEntities("' . compileRawCode(escapeJavaScriptQuotes($GLOBALS['tpl_content'][$template]), false, true, true, $compileCode) . '");'; @@ -349,7 +353,7 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC } elseif ((isAdmin()) || ((isInstalling()) && (!isInstalled()))) { // Only admins shall see this warning or when installation mode is active $ret = '
    - {--TEMPLATE_404--} + {--TEMPLATE_404--}
    (' . $template . ') @@ -367,7 +371,10 @@ function loadTemplate ($template, $return = false, $content = array(), $compileC // Code set? if ((isset($GLOBALS['template_eval'][$template])) && ($GLOBALS['template_eval'][$template] != '404')) { // Eval the code + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template=' . $template . ' - BEFORE EVAL'); + ///* DEBUG: */ print('
    '.htmlentities($GLOBALS['template_eval'][$template]).'
    '); eval($GLOBALS['template_eval'][$template]); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template=' . $template . ' - AFTER EVAL'); } // END - if // Do we have some content to output or return? @@ -445,6 +452,9 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load // Make sure all template names are lowercase! $template = strtolower($template); + // Set current template + $GLOBALS['current_template'] = $template; + // Is content an array? if (is_array($content)) { // Add expiration to array @@ -460,37 +470,6 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load } } // END - if - // Load user's data - // @DEPRECATED Loading the user data by given userid is deprecated because it is not related to template loading - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UID=' . $userid . ',template=' . $template . ',content[]=' . gettype($content)); - if ((isValidUserId($userid)) && (is_array($content))) { - // If nickname extension is installed, fetch nickname as well - if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) { - // Load by nickname - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - NICKNAME!'); - fetchUserData($userid, 'nickname'); - } elseif (isNicknameUsed($userid)) { - // Non-number characters entered but no ext-nickname found - debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ': is no id number and ext-nickname is gone.'); - } else { - // Load by userid - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - USERID!'); - fetchUserData($userid); - } - - // Merge data if valid - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - BEFORE!'); - if ((isUserDataValid()) && ($loadUserData === true)) { - // It is valid - $content = merge_array($content, getUserDataArray()); - - // But we don't like hashed passwords be mailed - unset($content['password']); - } // END - if - - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - AFTER!'); - } // END - if - // Base directory $basePath = sprintf("%stemplates/%s/emails/", getPath(), getLanguage()); @@ -556,28 +535,36 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load // "Getter" for menu CSS classes, mainly used in templates function getMenuCssClasses ($data) { - // $data needs to be converted into an array - $content = explode('|', $data); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'data=' . $data); - // Non-existent index 2 will happen in menu blocks - if (!isset($content[2])) { - $content[2] = ''; - } // END - if + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__][$data])) { + // $data needs to be converted into an array + $content = explode('|', $data); + + // Non-existent index 2 will happen in menu blocks + if (!isset($content[2])) { + $content[2] = ''; + } // END - if + + // Re-construct the array: 0=visible,1=locked,2=prefix + $content['visible'] = $content[0]; + $content['locked'] = $content[1]; - // Re-construct the array: 0=visible,1=locked,2=prefix - $content['visible'] = $content[0]; - $content['locked'] = $content[1]; + // Call our "translator" function + $content = translateMenuVisibleLocked($content, $content[2]); - // Call our "translator" function - $content = translateMenuVisibleLocked($content, $content[2]); + // Set it in cache + $GLOBALS[__FUNCTION__][$data] = ($content['visible_css'] . ' ' . $content['locked_css']); + } // END - if - // Return CSS classes - return ($content['visible_css'] . ' ' . $content['locked_css']); + // Return cache + return $GLOBALS[__FUNCTION__][$data]; } // Generate XHTML code for the CAPTCHA -function generateCaptchaCode ($code, $type, $type, $userid) { - return 'Code ' . $code . ''; +function generateCaptchaCode ($code, $type, $urlId, $userid) { + return 'Code ' . $code . ''; } // Compiles the given HTML/mail code @@ -595,12 +582,12 @@ function compileCode ($code, $simple = false, $constants = true, $full = true, $ $code = compileRawCode($code, $simple, $constants, $full); // Get timing - $compiled = microtime(true); + $compilationTime = $startCompile - microtime(true); // Add timing if enabled if (isTemplateHtml()) { // Add timing, this should be disabled in - $code .= ''; + $code .= ''; } // END - if // Return compiled code @@ -627,14 +614,16 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true // Compile more through a filter $code = runFilterChain('compile_code', $code); - // Compile message strings - $code = str_replace('{--', '{%message,', str_replace('--}', '%}', $code)); + // First compile these chars + array_unshift($secChars['to'] , '{--' , '--}'); + array_unshift($secChars['from'], '{%message,', '%}' ); // Compile QUOT and other non-HTML codes $code = str_replace($secChars['to'], $secChars['from'], $code); // Find $content[bla][blub] entries preg_match_all('/\$content((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Second regex gave ' . count($matches[0]) . ' matches.'); // Are some matches found? if ((count($matches) > 0) && (count($matches[0]) > 0)) { @@ -650,10 +639,10 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true $test = substr($found, 0, strlen($match)); // Does this entry exist? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'found=' . $found . ',match=' . $match . ',set=' . $set); + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'found=' . $found . ',match=' . $match . ',set=' . $set); if ($test == $match) { // Match found - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'fuzzyFound!'); + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'fuzzyFound!'); $fuzzyFound = true; break; } // END - if @@ -666,15 +655,15 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true // Take all string elements if ((is_string($matches[3][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key.'_' . $matches[3][$key]]))) { - // Replace it in the code - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',match=' . $match); - $newMatch = str_replace('[', "['", str_replace(']', "']", str_replace('$', '{COMPILE_DOLLAR}', $match))); + // Replace it in the code, replace dollar sign so it won't be detected by next regex (see there) + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',match=' . $match); + $newMatch = str_replace(array('[', ']', '$'), array("['", "']", '{COMPILE_DOLLAR}'), $match); $code = str_replace($match, '".' . $newMatch . '."', $code); $matchesFound[$key . '_' . $matches[3][$key]] = 1; $matchesFound[$match] = true; } elseif (!isset($matchesFound[$match])) { // Not yet replaced! - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match); + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match); $code = str_replace($match, '".' . $match . '."', $code); $matchesFound[$match] = 1; } else { @@ -684,7 +673,13 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true } // END - foreach } // END - if - // Find $fooBar entries + /* + * Find $foobar, $foo_bar and $fooBar entries. This regex would also find + * $content[foo_bar] which would result in {DOLLAR}content[foo_bar] and + * therefore the variable's value won't be inserted. This is why + * {COMPILE_DOLLAR} is being used in above loop and at the end of this + * function being replace with the original dollar sign again. + */ preg_match_all('/\$([a-z_A-Z\[\]]){0,}/', $code, $matches); // Are some matches found? @@ -694,11 +689,15 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true // Trim match $match = trim($match); - // Is the first part not $content and not empty? + // Debug message + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match); + + // Is the first part not $content/$userid and not empty? + // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates if ((!empty($match)) && (substr($match, 0, 8) != '$content') && ($match != '$userid')) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match); - // Then replace $ with $ - $matchSecured = str_replace('$', '$', $match); + //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match . ' - SECURED!'); + // Then replace $ with {DOLLAR} + $matchSecured = str_replace('$', '{DOLLAR}', $match); // And in $code as well $code = str_replace($match, $matchSecured, $code); @@ -798,7 +797,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'fo case 'sec': case 'min': for ($idx = 0; $idx < 60; $idx+=5) { - if (strlen($idx) == 1) $idx = '0' . $idx; + if (strlen($idx) == 1) $idx = 0 . $idx; $OUT .= '
    + +
    + {--ADMIN_CONFIG_BIRTHDAY_NOTICE--} +
    diff --git a/templates/de/html/admin/admin_config_network_api.tpl b/templates/de/html/admin/admin_config_network_api.tpl index 6cc1027c00..53ba902b0a 100644 --- a/templates/de/html/admin/admin_config_network_api.tpl +++ b/templates/de/html/admin/admin_config_network_api.tpl @@ -6,6 +6,7 @@ {%message,ADMIN_CONFIG_NETWORK_API_TITLE=$content[network_title]%} + {--ADMIN_CONFIG_NETWORK_API_ENTER_AFFILIATE_ID--}
    @@ -16,6 +17,7 @@ + {--ADMIN_CONFIG_NETWORK_API_ENTER_API_PASSWORD--}
    @@ -28,6 +30,7 @@ + {--ADMIN_CONFIG_NETWORK_API_ENTER_REFERRAL_LINK--}
    @@ -38,6 +41,7 @@ + diff --git a/templates/de/html/admin/admin_config_network_types.tpl b/templates/de/html/admin/admin_config_network_types.tpl index b343862398..74b7710b97 100644 --- a/templates/de/html/admin/admin_config_network_types.tpl +++ b/templates/de/html/admin/admin_config_network_types.tpl @@ -1,4 +1,5 @@
    +
    - - - - - + diff --git a/templates/de/html/admin/admin_config_rallye_edit.tpl b/templates/de/html/admin/admin_config_rallye_edit.tpl index 9a048d453e..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_edit.tpl +++ b/templates/de/html/admin/admin_config_rallye_edit.tpl @@ -1,32 +1 @@ -
    -
    -
    diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index bbc4d82c9a..84e5c90e33 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -1,133 +1,120 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {--ADMIN_CONFIG_ORDER_TITLE--}: -
    - {--ADMIN_CONFIG_ORDER_SELECT_MAX--} - - - {--ADMIN_CONFIG_ORDER_OPTION_MAX--} -
    - - {--ADMIN_CONFIG_ORDER_OPTION_ORDER--} -
    - {--ADMIN_CONFIG_MAX_UNCONFIRMED_MAILS--}: - - -
    - {--ADMIN_CONFIG_MAX_TEXT_LENGTH--}: - - -
    - {--ADMIN_CONFIG_CHECK_EMAIL_TEXT--} - - {%template,ConfigurationYesNoSelectionBox=allow_url_in_text%} -
    - {--ADMIN_CONFIG_CHECK_EMAIL_SUBJECT--} - - {%template,ConfigurationYesNoSelectionBox=allow_url_in_subject%} -
    - {--ADMIN_CONFIG_URL_BLACKLIST--} - - {%template,ConfigurationYesNoSelectionBox=url_blacklist%} -
    {--ADMIN_REPAY_ON_DELETE_MODE--} - -
    - {--ADMIN_ORDER_SELECTION_SETTINGS--}: -
    - {--ADMIN_ORDER_SELECTION_COLUMN--}: - - -
    {--ADMIN_ORDER_SELECTION_MODE--}: - -
    - {--ADMIN_CONFIG_ORDER_MISC_TITLE--}: -
    - {--ADMIN_CONFIG_ORDER_MIN_RECEIVER_PER_ORDER--}: - - -
    +
    +
    + {--ADMIN_CONFIG_ORDER_TITLE--} +
    + +
    + {--ADMIN_CONFIG_ORDER_SELECT_MAX_LEGEND--} + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + {--ADMIN_CONFIG_ORDER_MEMBER_LEGEND--} + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + {%template,ConfigurationYesNoSelectionBox=allow_url_in_text%} +
    +
    + +
    + +
    + {%template,ConfigurationYesNoSelectionBox=allow_url_in_subject%} +
    +
    + +
    + +
    + {%template,ConfigurationYesNoSelectionBox=url_blacklist%} +
    +
    + +
    + +
    + +
    +
    +
    + +
    + {--ADMIN_CONFIG_ORDER_SELECTION_LEGEND--} + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + {--ADMIN_CONFIG_ORDER_MISC_LEGEND--} + +
    + +
    + +
    +
    +
    + + +
    + +
    + {--ADMIN_CONFIG_ORDER_NOTICE--} +
    diff --git a/templates/de/html/admin/admin_config_payouts_edit.tpl b/templates/de/html/admin/admin_config_payouts_edit.tpl index 02b6f5a1c4..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_payouts_edit.tpl +++ b/templates/de/html/admin/admin_config_payouts_edit.tpl @@ -1 +1 @@ - + diff --git a/templates/de/html/admin/admin_config_rallye_del.tpl b/templates/de/html/admin/admin_config_rallye_del.tpl index 8b1725dd0e..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_del.tpl +++ b/templates/de/html/admin/admin_config_rallye_del.tpl @@ -1,31 +1 @@ -
    -
    - - - - - - - - - - - $content[rows] - - - -
    - {--RALLYE_REMOVE_PRICES--} -
    - {--ID_SELECT--} - - {--RALLYE_LEVEL--}: - - {--RALLYE_PRICE_POINTS--}: - - {--RALLYE_PRICE_INFO--}: -
    -
    -
    + diff --git a/templates/de/html/admin/admin_config_rallye_del_row.tpl b/templates/de/html/admin/admin_config_rallye_del_row.tpl index eedc4847ae..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_del_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_del_row.tpl @@ -1,14 +1 @@ -
    - $content[rallye_id] - - $content[price_level] - - {%pipe,translateComma=$content[points]%} - - {%pipe,fixEmptyContentToDashes=$content[info]%} -
    - - - - - - - - - - $content[rows] - - - -
    - {--RALLYE_EDIT_SELECTED_PRICES--} -
    - {--RALLYE_ID--}: - - {--RALLYE_LEVEL--}: - - {--RALLYE_PRICE_POINTS--}: - - {--RALLYE_PRICE_INFO--}: -
    - -
    + diff --git a/templates/de/html/admin/admin_config_rallye_edit_row.tpl b/templates/de/html/admin/admin_config_rallye_edit_row.tpl index 8f12c53c52..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_edit_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_edit_row.tpl @@ -1,16 +1 @@ - - - - - - - - - - - - - - + diff --git a/templates/de/html/admin/admin_config_rallye_prices.tpl b/templates/de/html/admin/admin_config_rallye_prices.tpl index a241a0b8ed..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_prices.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices.tpl @@ -1,33 +1 @@ -
    -
    - - - - - - - - - - - $content[rows] - - - -
    - {--RALLYE_EDIT_DELETE_PRICES--} -
    - {--ID_SELECT--} - - {--RALLYE_LEVEL--}: - - {--RALLYE_PRICE_POINTS--}: - - {--RALLYE_PRICE_INFO--}: -
    -
    -
    + diff --git a/templates/de/html/admin/admin_config_rallye_prices_row.tpl b/templates/de/html/admin/admin_config_rallye_prices_row.tpl index 527c9270ed..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_rallye_prices_row.tpl +++ b/templates/de/html/admin/admin_config_rallye_prices_row.tpl @@ -1,14 +1 @@ - - - - - - $content[price_level] - - - {%pipe,translateComma=$content[points]%} - - - {%pipe,fixEmptyContentToDashes=$content[info]%} - - + diff --git a/templates/de/html/admin/admin_config_refid.tpl b/templates/de/html/admin/admin_config_refid.tpl index 04d97cd78a..49c3b384a2 100644 --- a/templates/de/html/admin/admin_config_refid.tpl +++ b/templates/de/html/admin/admin_config_refid.tpl @@ -1,59 +1,57 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {--ADMIN_CONFIG_REFID_TITLE--} -
    {--ADMIN_CONFIG_SELECT_DEFAULT_REFID--}: - $content[def_refid] -
    {--ADMIN_CONFIG_SELECT_REFID_TARGRT--}: - -
    - {--ADMIN_CONFIG_RANDOM_REFID_TITLE--} -
    {--ADMIN_CONFIG_RANDOM_ZERO_REFID--} - -
    {--ADMIN_CONFIG_RANDOM_MIN_CONFIRMED--} - -
    +
    +
    + {--ADMIN_CONFIG_REFID_TITLE--} +
    + +
    + {--ADMIN_CONFIG_REFID_GENERAL_LEGEND--} + +
    + +
    + $content[def_refid] +
    +
    + +
    + +
    + +
    +
    +
    + +
    + {--ADMIN_CONFIG_RANDOM_REFID_LEGEND--} + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + +
    diff --git a/templates/de/html/admin/admin_config_stats.tpl b/templates/de/html/admin/admin_config_stats.tpl index 2ce70624f7..6cedde5fb9 100644 --- a/templates/de/html/admin/admin_config_stats.tpl +++ b/templates/de/html/admin/admin_config_stats.tpl @@ -42,7 +42,7 @@ - + diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl index c338b590f3..37036e70a6 100644 --- a/templates/de/html/admin/admin_config_surfbar.tpl +++ b/templates/de/html/admin/admin_config_surfbar.tpl @@ -140,10 +140,10 @@ - {--ADMIN_CONFIG_SURFBAR_AUTOSTART--} + {--ADMIN_CONFIG_SURFBAR_AUTO_START--} - {%template,ConfigurationYesNoSelectionBox=surfbar_autostart%} + {%template,ConfigurationYesNoSelectionBox=surfbar_auto_start%} diff --git a/templates/de/html/admin/admin_config_title.tpl b/templates/de/html/admin/admin_config_title.tpl index d1a39f382d..5bddc467f5 100644 --- a/templates/de/html/admin/admin_config_title.tpl +++ b/templates/de/html/admin/admin_config_title.tpl @@ -1,53 +1,52 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - {--ADMIN_CONFIG_TITLE_SETTINGS--} -
    {--ADMIN_CONFIG_TITLE_ENABLE_DECORATIONS--}:$content[enable_title_deco]
    {--ADMIN_CONFIG_TITLE_ENABLE_MODULE_TITLE--}:$content[enable_mod_title]
    {--ADMIN_CONFIG_TITLE_ENABLE_WHAT_TITLE--}:$content[enable_what_title]
    - {--ADMIN_CONFIG_TITLE_DECORATIONS--} -
    {--ADMIN_CONFIG_TITLE_LEFT--}: - -
    {--ADMIN_CONFIG_TITLE_MIDDLE--}: - -
    {--ADMIN_CONFIG_TITLE_RIGHT--}: - -
    +
    +
    + {--ADMIN_CONFIG_TITLE_SETTINGS--} +
    + +
    + {--ADMIN_CONFIG_TITLE_LEGEND--} +
    + +
    $content[enable_title_deco]
    +
    + +
    + +
    $content[enable_mod_title]
    +
    + +
    + +
    $content[enable_what_title]
    +
    +
    + +
    + {--ADMIN_CONFIG_TITLE_DECORATIONS--} + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    +
    + + +
    diff --git a/templates/de/html/admin/admin_config_user.tpl b/templates/de/html/admin/admin_config_user.tpl index 4e69c020bf..6e5fa7bdb8 100644 --- a/templates/de/html/admin/admin_config_user.tpl +++ b/templates/de/html/admin/admin_config_user.tpl @@ -1,29 +1,89 @@
    - - - - - - - - - - - - - - - -
    - {--ADMIN_CONFIG_USER_TITLE--} -
    {--ADMIN_CONFIG_USER_LIMIT--}: - -
    {--ADMIN_CONFIG_USER_ALPHA--}: - -
    +
    +
    + {--ADMIN_CONFIG_USER_TITLE--} +
    + +
    + {--ADMIN_CONFIG_USER_LEGEND--} +
    + +
    +
    + +
    + +
    +
    +
    + +
    + {--ADMIN_CONFIG_TESTER_USER_LEGEND--} +
    + +
    +
    + +
    + +
    $content[tester_user_gender_selection]
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    {%template,ConfigurationYesNoSelectionBox=tester_user_check_cat%}
    + +
    + {--ADMIN_CONFIG_TESTER_USER_CHECK_CAT_NOTICE--} +
    +
    + +
    + +
    {%pipe,addTesterUserDefaultRefidSelectionBox%}
    +
    +
    + + +
    diff --git a/templates/de/html/admin/admin_contct_user_form.tpl b/templates/de/html/admin/admin_contct_user_form.tpl index 882a375411..cefd999df3 100644 --- a/templates/de/html/admin/admin_contct_user_form.tpl +++ b/templates/de/html/admin/admin_contct_user_form.tpl @@ -1,3 +1,4 @@ +
    @@ -19,3 +20,4 @@
    +
    diff --git a/templates/de/html/admin/admin_delete_forced_ads.tpl b/templates/de/html/admin/admin_delete_forced_ads.tpl new file mode 100644 index 0000000000..669c7b41c1 --- /dev/null +++ b/templates/de/html/admin/admin_delete_forced_ads.tpl @@ -0,0 +1,18 @@ +
    +
    + + + + + $content + + + +
    + {--ADMIN_DELETE_FORCED_ADS_TITLE--} +
    +
    +
    diff --git a/templates/de/html/admin/admin_delete_forced_ads_row.tpl b/templates/de/html/admin/admin_delete_forced_ads_row.tpl new file mode 100644 index 0000000000..c1710e4e5e --- /dev/null +++ b/templates/de/html/admin/admin_delete_forced_ads_row.tpl @@ -0,0 +1,48 @@ + + + {--ADMIN_FORCED_ADS_ADDED--}:
    + + $content[forced_ads_added] + + + {--ADMIN_FORCED_ADS_AD_URL--}:
    + $content[forced_ads_ad_url] + + + + + {--ADMIN_FORCED_ADS_ALTERNATE_TEXT--}:
    + $content[forced_ads_alt_text] + + + {--ADMIN_FORCED_ADS_CLICK_URL--}:
    + {--ADMIN_TEST_URL--} + + + + + {--ADMIN_FORCED_ADS_WIDTH--}:
    + $content[forced_ads_width] + + + {--ADMIN_FORCED_ADS_HEIGHT--}:
    + $content[forced_ads_height] + + + + + {--ADMIN_FORCED_ADS_USERID--}:
    + {%pipe,generateUserProfileLink=$content[forced_ads_userid]%} + + + {--ADMIN_FORCED_ADS_TYPE--}:
    + {%pipe,translateForcedAdsType=$content[forced_ads_type]%} + + + + + {--ADMIN_FORCED_ADS_HAS_FRAMEBREAKER--}
    + {%pipe,translateYesNo=$content[forced_ads_framebreaker]%} + +   + diff --git a/templates/de/html/admin/admin_delete_forced_costs.tpl b/templates/de/html/admin/admin_delete_forced_costs.tpl new file mode 100644 index 0000000000..8039d7e912 --- /dev/null +++ b/templates/de/html/admin/admin_delete_forced_costs.tpl @@ -0,0 +1,18 @@ +
    +
    + + + + + $content + + + +
    + {--ADMIN_DELETE_FORCED_COSTS_TITLE--} +
    +
    +
    diff --git a/templates/de/html/admin/admin_delete_forced_costs_row.tpl b/templates/de/html/admin/admin_delete_forced_costs_row.tpl new file mode 100644 index 0000000000..d6ba7eb34b --- /dev/null +++ b/templates/de/html/admin/admin_delete_forced_costs_row.tpl @@ -0,0 +1,15 @@ + + + {--ADMIN_FORCED_COSTS_PRICE_CLICK--}:
    + + {%pipe,translateComma=$content[forced_costs_price_click]%} ({?POINTS?}) + + + {--ADMIN_FORCED_COSTS_PAYMENT_CLICK--}:
    + {%pipe,translateComma=$content[forced_costs_payment_click]%} ({?POINTS?}) + + + {--ADMIN_FORCED_COSTS_VISIBILITY--}:
    + {%pipe,translateForcedCostsVisibility=$content[forced_costs_visibility]%} + + diff --git a/templates/de/html/admin/admin_delete_rallye_prices.tpl b/templates/de/html/admin/admin_delete_rallye_prices.tpl new file mode 100644 index 0000000000..58f2b35eb0 --- /dev/null +++ b/templates/de/html/admin/admin_delete_rallye_prices.tpl @@ -0,0 +1,31 @@ +
    +
    + + + + + + + + + + + $content[rows] + + + +
    + {--ADMIN_DELETE_RALLYE_PRICES_TITLE--} +
    + {--ID_SELECT--} + + {--RALLYE_LEVEL--}: + + {--ADMIN_RALLYE_PRICE_POINTS--}: + + {--ADMIN_RALLYE_PRICE_INFO--}: +
    +
    +
    diff --git a/templates/de/html/admin/admin_delete_rallye_prices_row.tpl b/templates/de/html/admin/admin_delete_rallye_prices_row.tpl new file mode 100644 index 0000000000..aee2c9ab44 --- /dev/null +++ b/templates/de/html/admin/admin_delete_rallye_prices_row.tpl @@ -0,0 +1,15 @@ + + + $content[id] + + + + $content[price_level] + + + {%pipe,translateComma=$content[points]%} + + + {%pipe,fixEmptyContentToDashes=$content[info]%} + + diff --git a/templates/de/html/admin/admin_delete_rallyes.tpl b/templates/de/html/admin/admin_delete_rallyes.tpl new file mode 100644 index 0000000000..151e742a1a --- /dev/null +++ b/templates/de/html/admin/admin_delete_rallyes.tpl @@ -0,0 +1,18 @@ +
    +
    + + + + + $content + + + +
    + {--ADMIN_DELETE_RALLYES_TITLE--}: +
    +
    +
    diff --git a/templates/de/html/admin/admin_delete_rallyes_row.tpl b/templates/de/html/admin/admin_delete_rallyes_row.tpl new file mode 100644 index 0000000000..c82ee59467 --- /dev/null +++ b/templates/de/html/admin/admin_delete_rallyes_row.tpl @@ -0,0 +1,43 @@ + + {--ADMIN_RALLYE_TITLE--}: + + $content[title] + + + + + {--ADMIN_RALLYE_DESCRIPTION--}: + +
    $content[descr]
    + + + + {--ADMIN_RALLYE_TEMPLATE--}: + + $content[template] + + + + {--ADMIN_RALLYE_START_DAY--}: + + $content[start_time] + + + + {--ADMIN_RALLYE_END_DAY--}: + + $content[end_time] + + + + {--ADMIN_RALLYE_MIN_USERS_MINI--}: + + {%pipe,translateComma=$content[min_users]%} + + + + {--ADMIN_RALLYE_MIN_PRICES_MINI--}: + + {%pipe,translateComma=$content[min_prices]%} + + diff --git a/templates/de/html/admin/admin_delete_surfbar_urls.tpl b/templates/de/html/admin/admin_delete_surfbar_urls.tpl index fbb53ab37f..b14d5bacde 100644 --- a/templates/de/html/admin/admin_delete_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_delete_surfbar_urls.tpl @@ -14,7 +14,7 @@ $content - + diff --git a/templates/de/html/admin/admin_edit_config_network_type_form.tpl b/templates/de/html/admin/admin_edit_config_network_type_form.tpl index f851d3fcc1..e32a887ed1 100644 --- a/templates/de/html/admin/admin_edit_config_network_type_form.tpl +++ b/templates/de/html/admin/admin_edit_config_network_type_form.tpl @@ -9,34 +9,42 @@ ({%network,getNetworkDataById,network_title=%network_id%%})
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL--} {%template,NoYesSelectionBox=set_all%}
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MAX_RELOAD_TIME--} ({--TIME_UNIT--})
    $content[network_max_reload_time] ({%pipe,translateTimeUnit=$content[network_type_reload_time_unit]%})
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_WAITING_TIME--}
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_REMAIN_CLICKS--}
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_PAYMENT--}
    +
    {--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALLOW_EROTIC--}
    + + diff --git a/templates/de/html/admin/admin_edit_country_row.tpl b/templates/de/html/admin/admin_edit_country_row.tpl index 42f7eac1aa..4995f05292 100644 --- a/templates/de/html/admin/admin_edit_country_row.tpl +++ b/templates/de/html/admin/admin_edit_country_row.tpl @@ -10,7 +10,7 @@ diff --git a/templates/de/html/admin/admin_edit_email_max_rec.tpl b/templates/de/html/admin/admin_edit_email_max_rec.tpl index c43acecc71..9591bb1d51 100644 --- a/templates/de/html/admin/admin_edit_email_max_rec.tpl +++ b/templates/de/html/admin/admin_edit_email_max_rec.tpl @@ -1,5 +1,5 @@
    -
    + diff --git a/templates/de/html/admin/admin_edit_forced_campaigns.tpl b/templates/de/html/admin/admin_edit_forced_campaigns.tpl new file mode 100644 index 0000000000..d2a37f0616 --- /dev/null +++ b/templates/de/html/admin/admin_edit_forced_campaigns.tpl @@ -0,0 +1,22 @@ +
    + +
    diff --git a/templates/de/html/admin/admin_edit_forced_ads_row.tpl b/templates/de/html/admin/admin_edit_forced_ads_row.tpl index e9757f52d2..2c70a09aea 100644 --- a/templates/de/html/admin/admin_edit_forced_ads_row.tpl +++ b/templates/de/html/admin/admin_edit_forced_ads_row.tpl @@ -1,7 +1,7 @@
    - {--ADMIN_FORCED_ADS_ADDED--}
    - + {--ADMIN_FORCED_ADS_ADDED--}:
    + $content[forced_ads_added]
    @@ -11,7 +11,7 @@
    - {--ADMIN_CHANGE_FORCED_ADS_ALT_TEXT--}
    + {--ADMIN_CHANGE_FORCED_ADS_ALTERNATE_TEXT--}
    @@ -45,7 +45,7 @@ {--ADMIN_CHANGE_FORCED_ADS_FRAMEBREAKER--}
     
    + + + + $content + + + +
    + {--ADMIN_EDIT_FORCED_CAMPAIGN_TITLE--} +
    +
    +
    + +
    + {--ADMIN_EDIT_FORCED_CAMPAIGN_NOTICE--} +
    diff --git a/templates/de/html/admin/admin_edit_forced_campaigns_row.tpl b/templates/de/html/admin/admin_edit_forced_campaigns_row.tpl new file mode 100644 index 0000000000..9077e3e9d2 --- /dev/null +++ b/templates/de/html/admin/admin_edit_forced_campaigns_row.tpl @@ -0,0 +1,42 @@ + + + {--ADMIN_FORCED_CAMPAIGN_CREATED--}:
    + + $content[forced_campaign_created] + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_ORDERED_CLICKS--}
    + + + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_PAYMENT_API--}
    + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_RELOAD_LOCK--}
    + $content[forced_campaign_reload_lock] + + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_MINIMUM_STAY--}
    + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_ADS_ID--}
    + {%template,ForcedAdSelectionBox=$content[forced_ads_id]%} + + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_USERID--}
    + $content[forced_campaign_userid] + + + + {--ADMIN_CHANGE_FORCED_CAMPAIGN_COSTS_ID--}
    + {%template,ForcedCostsSelectionBox=$content[forced_costs_id]%} + + diff --git a/templates/de/html/admin/admin_edit_forced_costs.tpl b/templates/de/html/admin/admin_edit_forced_costs.tpl new file mode 100644 index 0000000000..0000f0d632 --- /dev/null +++ b/templates/de/html/admin/admin_edit_forced_costs.tpl @@ -0,0 +1,18 @@ +
    +
    + + + + + $content + + + +
    + {--ADMIN_EDIT_FORCED_COSTS_TITLE--} +
    +
    +
    diff --git a/templates/de/html/admin/admin_edit_forced_costs_row.tpl b/templates/de/html/admin/admin_edit_forced_costs_row.tpl new file mode 100644 index 0000000000..394a7dd741 --- /dev/null +++ b/templates/de/html/admin/admin_edit_forced_costs_row.tpl @@ -0,0 +1,20 @@ + + + {--ADMIN_CHANGE_FORCED_COSTS_PRICE_CLICK--}
    + + ({?POINTS?}) + + + {--ADMIN_CHANGE_FORCED_COSTS_PAYMENT_CLICK--}
    + ({?POINTS?}) + + + + + {--ADMIN_CHANGE_FORCED_COSTS_VISIBILITY--}
    + + +   + diff --git a/templates/de/html/admin/admin_edit_networks_row.tpl b/templates/de/html/admin/admin_edit_networks_row.tpl index 167ddd6517..308e8b10c3 100644 --- a/templates/de/html/admin/admin_edit_networks_row.tpl +++ b/templates/de/html/admin/admin_edit_networks_row.tpl @@ -39,7 +39,7 @@ {--ADMIN_NETWORK_REQUIRE_ID_CARD--} diff --git a/templates/de/html/admin/admin_edit_points_data.tpl b/templates/de/html/admin/admin_edit_points_data.tpl new file mode 100644 index 0000000000..5c106837c4 --- /dev/null +++ b/templates/de/html/admin/admin_edit_points_data.tpl @@ -0,0 +1,18 @@ +
    +
    + + + + + $content + + + +
    + {--ADMIN_EDIT_POINTS_DATA_TITLE--} +
    +
    +
    diff --git a/templates/de/html/admin/admin_edit_points_data_row.tpl b/templates/de/html/admin/admin_edit_points_data_row.tpl new file mode 100644 index 0000000000..96c47fdbc4 --- /dev/null +++ b/templates/de/html/admin/admin_edit_points_data_row.tpl @@ -0,0 +1,37 @@ + + + + $content[subject] +
    ({%pipe,translatePointsSubject=$content[subject]%})
    + + + {--ADMIN_POINTS_ACCOUNT_COLUMN_NAME--}
    + {%pipe,translatePointsAccountType=$content[column_name]%} + + + + + {--ADMIN_CHANGE_POINTS_LOCKED_MODE--}
    + + + + {--ADMIN_CHANGE_POINTS_PAYMENT_METHOD--}
    + + + + + + {--ADMIN_CHANGE_POINTS_NOTIFY_RECIPIENT--}
    + + + + {--ADMIN_POINTS_ACCOUNT_PROVIDER--}
    + {%pipe,translatePointsAccountProvider=$content[account_provider]%} + + diff --git a/templates/de/html/admin/admin_edit_rallye_prices.tpl b/templates/de/html/admin/admin_edit_rallye_prices.tpl new file mode 100644 index 0000000000..1a608bb6dc --- /dev/null +++ b/templates/de/html/admin/admin_edit_rallye_prices.tpl @@ -0,0 +1,32 @@ +
    +
    + + + + + + + + + + + $content[rows] + + + +
    + {--ADMIN_EDIT_RALLYE_PRICES_TITLE--} +
    + {--RALLYE_ID--}: + + {--RALLYE_LEVEL--}: + + {--ADMIN_RALLYE_PRICE_POINTS--}: + + {--ADMIN_RALLYE_PRICE_INFO--}: +
    +
    +
    diff --git a/templates/de/html/admin/admin_edit_rallye_prices_row.tpl b/templates/de/html/admin/admin_edit_rallye_prices_row.tpl new file mode 100644 index 0000000000..9010786a9e --- /dev/null +++ b/templates/de/html/admin/admin_edit_rallye_prices_row.tpl @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/templates/de/html/admin/admin_edit_rallyes.tpl b/templates/de/html/admin/admin_edit_rallyes.tpl index eb35f5b9f9..06cbb1fdb7 100644 --- a/templates/de/html/admin/admin_edit_rallyes.tpl +++ b/templates/de/html/admin/admin_edit_rallyes.tpl @@ -3,13 +3,14 @@ + {--ADMIN_EDIT_RALLYES_TITLE--}: + $content
    - {--RALLYE_EDIT_RALLYES--}:
    diff --git a/templates/de/html/admin/admin_edit_rallyes_row.tpl b/templates/de/html/admin/admin_edit_rallyes_row.tpl index 5b80e776be..e75bd8d514 100644 --- a/templates/de/html/admin/admin_edit_rallyes_row.tpl +++ b/templates/de/html/admin/admin_edit_rallyes_row.tpl @@ -1,42 +1,45 @@ - {--RALLYE_TITLE--}: + {--ADMIN_RALLYE_TITLE--}: - + + - {--RALLYE_DESCR--}: + {--ADMIN_ENTER_RALLYE_DESCRIPTION--}: - + - {--RALLYE_TEMPLATE--}: - $content[templ] + {--ADMIN_SELECT_RALLYE_TEMPLATE--}: + + $content[templ] + - {--RALLYE_START_DAY--}: + {--ADMIN_RALLYE_START_DAY--}: -
    $content[s_day]. $content[s_month]. $content[s_year]
    -
    $content[s_hour]: $content[s_min]: $content[s_sec]
    +
    $content[s_day] . $content[s_month] . $content[s_year]
    +
    $content[s_hour] : $content[s_min] : 00
    - {--RALLYE_END_DAY--}: + {--ADMIN_RALLYE_END_DAY--}: -
    $content[e_day]. $content[e_month]. $content[e_year]
    -
    $content[e_hour]: $content[e_min]: $content[e_sec]
    +
    $content[e_day] . $content[e_month] . $content[e_year]
    +
    $content[e_hour] : $content[e_min] : 00
    - {--RALLYE_MIN_USERS_MINI--}: + {--ADMIN_RALLYE_MIN_USERS_MINI--}: - + - {--RALLYE_MIN_PRICES_MINI--}: - - + {--ADMIN_RALLYE_MIN_PRICES_MINI--}: + + diff --git a/templates/de/html/admin/admin_edit_surfbar_actions.tpl b/templates/de/html/admin/admin_edit_surfbar_actions.tpl new file mode 100644 index 0000000000..4396f8d56d --- /dev/null +++ b/templates/de/html/admin/admin_edit_surfbar_actions.tpl @@ -0,0 +1,22 @@ +
    +
    + + + + +$content + + + +
    + {--ADMIN_EDIT_SURFBAR_ACTIONS_TITLE--} +
    +
    +
    + +
    + {--ADMIN_EDIT_SURFBAR_ACTIONS_NOTICE--} +
    diff --git a/templates/de/html/admin/admin_edit_surfbar_actions_row.tpl b/templates/de/html/admin/admin_edit_surfbar_actions_row.tpl new file mode 100644 index 0000000000..f3750ab957 --- /dev/null +++ b/templates/de/html/admin/admin_edit_surfbar_actions_row.tpl @@ -0,0 +1,22 @@ + + + {--ADMIN_SURFBAR_ACTIONS_ID--} + + $content[actions_id] + + + {--ADMIN_CHANGE_SURFBAR_ACTIONS_STATUS--}
    + {%template,SurfbarActionsStatusSelectionBox=$content[actions_id]%} + + + + + + {--ADMIN_CHANGE_SURFBAR_ACTIONS_ACTION--}
    + {%template,SurfbarActionsActionSelectionBox=$content[actions_id]%} + + + {--ADMIN_CHANGE_SURFBAR_ACTIONS_NEW_STATUS--}
    + {%template,SurfbarActionsNewStatusSelectionBox=$content[actions_id]%} + + diff --git a/templates/de/html/admin/admin_edit_surfbar_urls.tpl b/templates/de/html/admin/admin_edit_surfbar_urls.tpl index fac0758540..d3e9ecd12e 100644 --- a/templates/de/html/admin/admin_edit_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_edit_surfbar_urls.tpl @@ -14,7 +14,7 @@ $content - + diff --git a/templates/de/html/admin/admin_export_network_array_translation.tpl b/templates/de/html/admin/admin_export_network_array_translation.tpl index 340b74d113..e72b4d7440 100644 --- a/templates/de/html/admin/admin_export_network_array_translation.tpl +++ b/templates/de/html/admin/admin_export_network_array_translation.tpl @@ -1,14 +1,12 @@
    +
    + {--ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_TITLE--} +
    -
    - {--ADMIN_EXPORT_NETWORK_ARRAY_TRANSLATION_TITLE--} -
    - -
    -
    $content
    -
    - +
    +
    $content
    +
    diff --git a/templates/de/html/admin/admin_export_network_data.tpl b/templates/de/html/admin/admin_export_network_data.tpl index c6dd14faa4..f182aef169 100644 --- a/templates/de/html/admin/admin_export_network_data.tpl +++ b/templates/de/html/admin/admin_export_network_data.tpl @@ -1,14 +1,12 @@
    +
    + {--ADMIN_EXPORT_NETWORK_DATA_TITLE--} +
    -
    - {--ADMIN_EXPORT_NETWORK_DATA_TITLE--} -
    - -
    -
    $content
    -
    - +
    +
    $content
    +
    diff --git a/templates/de/html/admin/admin_footer.tpl b/templates/de/html/admin/admin_footer.tpl index 484536a4c0..305dd9b4dc 100644 --- a/templates/de/html/admin/admin_footer.tpl +++ b/templates/de/html/admin/admin_footer.tpl @@ -1,16 +1,12 @@ diff --git a/templates/de/html/admin/admin_form_selection_box.tpl b/templates/de/html/admin/admin_form_selection_box.tpl index 167119dc3e..96c525a1b8 100644 --- a/templates/de/html/admin/admin_form_selection_box.tpl +++ b/templates/de/html/admin/admin_form_selection_box.tpl @@ -6,7 +6,7 @@
    {--ADMIN_SELECTION_BOX_TITLE--}
    -
    +
    {--ADMIN_SELECT_USER--}: - + diff --git a/templates/de/html/admin/admin_list_beg.tpl b/templates/de/html/admin/admin_list_beg.tpl index 6ad91d9822..fb425b79b5 100644 --- a/templates/de/html/admin/admin_list_beg.tpl +++ b/templates/de/html/admin/admin_list_beg.tpl @@ -2,7 +2,7 @@ diff --git a/templates/de/html/admin/admin_list_beg_form.tpl b/templates/de/html/admin/admin_list_beg_form.tpl index 2f816b59ce..0540ebfb09 100644 --- a/templates/de/html/admin/admin_list_beg_form.tpl +++ b/templates/de/html/admin/admin_list_beg_form.tpl @@ -1,5 +1,5 @@ - +
    diff --git a/templates/de/html/admin/admin_list_forced_campaigns.tpl b/templates/de/html/admin/admin_list_forced_campaigns.tpl new file mode 100644 index 0000000000..dc97e8e17b --- /dev/null +++ b/templates/de/html/admin/admin_list_forced_campaigns.tpl @@ -0,0 +1,38 @@ +
    +
    +
    - {--ADMIN_LIST_BEG_TITLE--}/ + {--ADMIN_LIST_BEG_TITLE--}
    + + + + + + + + + + + + + + + + +$content + + + +
    + {--ADMIN_LIST_FORCED_CAMPAIGNS_TITLE--} +
    {--ID_SELECT--}{--_USERID--}{--ADMIN_FORCED_CAMPAIGN_STATUS--}{--ADMIN_FORCED_CAMPAIGN_ORDERED_CLICKS--}{--ADMIN_FORCED_CAMPAIGN_PAYMENT_API--}{--ADMIN_FORCED_CAMPAIGN_RELOAD_LOCK--}{--ADMIN_FORCED_CAMPAIGN_MINIMUM_STAY--}{--ADMIN_FORCED_CAMPAIGN_LAST_LOCKED--}{--ADMIN_FORCED_CAMPAIGN_LOCK_REASON--}{--ADMIN_FORCED_CAMPAIGN_EXPIRED--}{--ADMIN_FORCED_CAMPAIGN_CREATED--}
    + +
    + +
    + {--ADMIN_LIST_FORCED_CAMPAIGN_NOTICE--} +
    diff --git a/templates/de/html/admin/admin_list_forced_campaigns_row.tpl b/templates/de/html/admin/admin_list_forced_campaigns_row.tpl new file mode 100644 index 0000000000..37c487296c --- /dev/null +++ b/templates/de/html/admin/admin_list_forced_campaigns_row.tpl @@ -0,0 +1,35 @@ + + + + + + {%pipe,generateUserProfileLink=$content[forced_campaign_userid]%} + + + {%pipe,translateForcedCampaignStatus=$content[forced_campaign_status]%} + + + {%pipe,translateComma=$content[forced_campaign_ordered_clicks]%} + + + {%pipe,translateComma=$content[forced_campaign_payment_api]%} + + + $content[forced_campaign_reload_lock] + + + $content[forced_campaign_minimum_stay] + + + $content[forced_campaign_last_locked] + + + {%pipe,fixEmptyContentToDashes=$content[forced_campaign_lock_reason]%} + + + $content[forced_campaign_expired] + + + $content[forced_campaign_created] + + diff --git a/templates/de/html/admin/admin_list_forced_costs.tpl b/templates/de/html/admin/admin_list_forced_costs.tpl new file mode 100644 index 0000000000..5f34c50198 --- /dev/null +++ b/templates/de/html/admin/admin_list_forced_costs.tpl @@ -0,0 +1,25 @@ +
    +
    + + + + + + + + + + +$content + + + +
    + {--ADMIN_LIST_FORCED_COSTS_TITLE--} +
    {--ID_SELECT--}{--ADMIN_FORCED_COSTS_PRICE_CLICK--}{--ADMIN_FORCED_COSTS_PAYMENT_CLICK--}{--ADMIN_FORCED_COSTS_VISIBILITY--}
    +
    +
    diff --git a/templates/de/html/admin/admin_list_forced_costs_row.tpl b/templates/de/html/admin/admin_list_forced_costs_row.tpl new file mode 100644 index 0000000000..1f73af9410 --- /dev/null +++ b/templates/de/html/admin/admin_list_forced_costs_row.tpl @@ -0,0 +1,14 @@ + + + + + + {%pipe,translateComma=$content[forced_costs_price_click]%} + + + {%pipe,translateComma=$content[forced_costs_payment_click]%} + + + {%pipe,translateForcedCostsVisibility=$content[forced_costs_visibility]%} + + diff --git a/templates/de/html/admin/admin_list_links_row.tpl b/templates/de/html/admin/admin_list_links_row.tpl index ad3ea264cd..e89396e066 100644 --- a/templates/de/html/admin/admin_list_links_row.tpl +++ b/templates/de/html/admin/admin_list_links_row.tpl @@ -1,6 +1,14 @@ - $content[link] - $content[subject] - $content[timestamp] - {%pipe,getCategory=$content[cat_id]%} + + $content[mail_id] + + + $content[subject] + + + $content[timestamp] + + + {%pipe,getCategory=$content[cat_id]%} + diff --git a/templates/de/html/admin/admin_list_networks_row.tpl b/templates/de/html/admin/admin_list_networks_row.tpl index d44c69750b..e47dea204a 100644 --- a/templates/de/html/admin/admin_list_networks_row.tpl +++ b/templates/de/html/admin/admin_list_networks_row.tpl @@ -22,7 +22,7 @@ $content[network_row_separator] - $content[network_request_type] + $content[network_request_type] $content[network_charset] diff --git a/templates/de/html/admin/admin_list_notify_emails_row.tpl b/templates/de/html/admin/admin_list_notify_emails_row.tpl index 9ecc0e252c..704cbd1532 100644 --- a/templates/de/html/admin/admin_list_notify_emails_row.tpl +++ b/templates/de/html/admin/admin_list_notify_emails_row.tpl @@ -1,68 +1,68 @@ - - {--EMAIL_SUBJECT--}:
    - $content[subject] - - - {--EMAIL_TEXT--}:
    -
    $content[text]
    - + +
    {--EMAIL_SUBJECT--}:
    +
    $content[subject]
    + + +
    {--EMAIL_TEXT--}:
    +
    $content[text]
    + - - {--EMAIL_POINTS--}:
    - {%pipe,translateComma=$content[points]%} {?POINTS?} - - - {--EMAIL_SECONDS--}:
    - {%pipe,createFancyTime=$content[time]%} - - - {--EMAIL_CATEGORY--}:
    - {%pipe,getCategory=$content[cat_id]%} - + +
    {--EMAIL_POINTS--}:
    +
    {%pipe,translateComma=$content[points]%} {?POINTS?}
    + + +
    {--EMAIL_SECONDS--}:
    +
    {%pipe,createFancyTime=$content[time]%}
    + + +
    {--EMAIL_CATEGORY--}:
    +
    {%pipe,getCategory=$content[cat_id]%}
    + - - {--EMAIL_RECEIVERS--}:
    - {%pipe,translateComma=$content[mails_sent]%} - ({--EMAIL_RUIDS--}: {%pipe,convertReceivers=$content[receivers]%}) - - - {--USERS_LINKS--}:
    - $content[unconfirmed_content] - - - {--EMAIL_POOL_TYPE--}:
    - {%pipe,translatePoolType=$content[data_type]%} - + +
    {--EMAIL_RECEIVERS--}:
    +
    {%pipe,translateComma=$content[mails_sent]%}
    +
    ({--EMAIL_RUIDS--}: {%pipe,convertReceivers=$content[receivers]%})
    + + +
    {--USERS_LINKS--}:
    +
    $content[unconfirmed_content]
    + + +
    {--EMAIL_POOL_TYPE--}:
    +
    {%pipe,translatePoolType=$content[data_type]%}
    + - - {--EMAIL_TSEND--}:
    - {%pipe,translateComma=$content[target_send]%} - - - {--EMAIL_URL--}:
    - {--ADMIN_TEST_URL--} - - - {--EMAIL_TIMESTAMP--}:
    - $content[timestamp] - + +
    {--EMAIL_TSEND--}:
    +
    {%pipe,translateComma=$content[target_send]%}
    + + +
    {--EMAIL_URL--}:
    + + + +
    {--EMAIL_TIMESTAMP--}:
    +
    $content[timestamp]
    + - -
    {--EMAIL_URL--}:
    -
    $content[url]
    - - - {--_UNUSED--}:
    - --- - + +
    {--EMAIL_URL--}:
    +
    $content[url]
    + + +
    {--_UNUSED--}:
    +
    ---
    + - - {--ADMIN_DELETE_NOTIFY_MAIL--} - + + {--ADMIN_DELETE_NOTIFY_MAIL--} + diff --git a/templates/de/html/admin/admin_list_points_accounts.tpl b/templates/de/html/admin/admin_list_points_accounts.tpl new file mode 100644 index 0000000000..05b7c892f6 --- /dev/null +++ b/templates/de/html/admin/admin_list_points_accounts.tpl @@ -0,0 +1,28 @@ +
    +
    + + + + + + + + + + + + + +$content + + + +
    + {--ADMIN_LIST_POINTS_ACCOUNTS_TITLE--} +
    {--ID_SELECT--}{--ADMIN_POINTS_ACCOUNT_SUBJECT--}{--ADMIN_POINTS_ACCOUNT_COLUMN_NAME--}{--ADMIN_POINTS_ACCOUNT_LOCKED_MODE--}{--ADMIN_POINTS_ACCOUNT_PAYMENT_METHOD--}{--ADMIN_POINTS_ACCOUNT_NOTIFY_RECIPIENT--}{--ADMIN_POINTS_ACCOUNT_PROVIDER--}
    +
    +
    diff --git a/templates/de/html/admin/admin_list_points_accounts_row.tpl b/templates/de/html/admin/admin_list_points_accounts_row.tpl new file mode 100644 index 0000000000..6b7c50e6bd --- /dev/null +++ b/templates/de/html/admin/admin_list_points_accounts_row.tpl @@ -0,0 +1,24 @@ + + + + + + $content[subject] +
    ({%pipe,translatePointsSubject=$content[subject]%})
    + + + {%pipe,translatePointsAccountType=$content[column_name]%} + + + {%pipe,translatePointsLockedMode=$content[locked_mode]%} + + + {%pipe,translatePointsPaymentMethod=$content[payment_method]%} + + + {%pipe,translateYesNo=$content[notify_recipient]%} + + + {%pipe,translatePointsAccountProvider=$content[account_provider]%} + + diff --git a/templates/de/html/admin/admin_list_rallye_prices.tpl b/templates/de/html/admin/admin_list_rallye_prices.tpl index c376bb56a1..dcc12f8d15 100644 --- a/templates/de/html/admin/admin_list_rallye_prices.tpl +++ b/templates/de/html/admin/admin_list_rallye_prices.tpl @@ -2,19 +2,19 @@ - - - - + + + + $content
    - {--ADMIN_LIST_RALLYES_PRICING--}: + {--ADMIN_LIST_RALLYES_PRICES_TITLE--}:
    {--RALLYE_TITLE--}:{--RALLYE_ADMIN_ID--}:{--RALLYE_TSTART--}:{--RALLYE_TEND--}:{--ADMIN_RALLYE_TITLE--}:{--ADMIN_RALLYE_ADMIN_LOGIN--}:{--ADMIN_RALLYE_STARTED--}:{--ADMIN_RALLYE_ENDED--}:
    diff --git a/templates/de/html/admin/admin_list_rallye_prices_row.tpl b/templates/de/html/admin/admin_list_rallye_prices_row.tpl index f3454446c6..d3f185e365 100644 --- a/templates/de/html/admin/admin_list_rallye_prices_row.tpl +++ b/templates/de/html/admin/admin_list_rallye_prices_row.tpl @@ -1,6 +1,6 @@ - $content[title] + $content[title] {%pipe,generateAdminLink=$content[admin_id]%} - $content[start] - $content[end] + $content[start_time] + $content[end_time] diff --git a/templates/de/html/admin/admin_list_rallye_prices_simple.tpl b/templates/de/html/admin/admin_list_rallye_prices_simple.tpl new file mode 100644 index 0000000000..61e6231c3e --- /dev/null +++ b/templates/de/html/admin/admin_list_rallye_prices_simple.tpl @@ -0,0 +1,33 @@ +
    +
    + + + + + + + + + + + $content[rows] + + + +
    + {--ADMIN_LIST_RALLYE_PRICES_SIMPLE_TITLE--} +
    + {--ID_SELECT--} + + {--RALLYE_LEVEL--}: + + {--ADMIN_RALLYE_PRICE_POINTS--}: + + {--ADMIN_RALLYE_PRICE_INFO--}: +
    +
    +
    diff --git a/templates/de/html/admin/admin_list_rallye_prices_simple_row.tpl b/templates/de/html/admin/admin_list_rallye_prices_simple_row.tpl new file mode 100644 index 0000000000..527c9270ed --- /dev/null +++ b/templates/de/html/admin/admin_list_rallye_prices_simple_row.tpl @@ -0,0 +1,14 @@ + + + + + + $content[price_level] + + + {%pipe,translateComma=$content[points]%} + + + {%pipe,fixEmptyContentToDashes=$content[info]%} + + diff --git a/templates/de/html/admin/admin_list_rallye_usr.tpl b/templates/de/html/admin/admin_list_rallye_usr.tpl index 928a73ea22..894e76ed2b 100644 --- a/templates/de/html/admin/admin_list_rallye_usr.tpl +++ b/templates/de/html/admin/admin_list_rallye_usr.tpl @@ -2,7 +2,7 @@ @@ -14,7 +14,7 @@ $content[rows]
    - {%message,RALLYE_LIST_USERS=$content[rallye]%}: + {%message,ADMIN_LIST_RALLYE_USERS_TITLE2=$content[rallye_id]%}:
    diff --git a/templates/de/html/admin/admin_list_rallyes.tpl b/templates/de/html/admin/admin_list_rallyes.tpl index 250cf0701e..d72b52b0cf 100644 --- a/templates/de/html/admin/admin_list_rallyes.tpl +++ b/templates/de/html/admin/admin_list_rallyes.tpl @@ -3,12 +3,12 @@ - + $content[rows] @@ -23,5 +23,6 @@
    - {--RALLYE_EDIT_ONLY_INACTIVE_NOTICE--} + {--ADMIN_LIST_RALLYES_NOTICE--} + {--ADMIN_RALLYE_EDIT_ONLY_INACTIVE_NOTICE--}
    diff --git a/templates/de/html/admin/admin_list_rallyes_row.tpl b/templates/de/html/admin/admin_list_rallyes_row.tpl index eadf0922d2..c578e82faa 100644 --- a/templates/de/html/admin/admin_list_rallyes_row.tpl +++ b/templates/de/html/admin/admin_list_rallyes_row.tpl @@ -1,42 +1,42 @@ diff --git a/templates/de/html/admin/admin_list_refs_level.tpl b/templates/de/html/admin/admin_list_refs_level.tpl index d2daccb67a..adb797fdc5 100644 --- a/templates/de/html/admin/admin_list_refs_level.tpl +++ b/templates/de/html/admin/admin_list_refs_level.tpl @@ -1,13 +1,14 @@
    - {--RALLYE_EDIT_DELETE_RALLYES--}: + {--ADMIN_LIST_RALLYES_TITLE--}:
    {--ID_SELECT--}{--RALLYE_LIST_OVERVIEW_TITLE--}:{--ADMIN_LIST_RALLYE_DATA_OVERVIEW_TITLE--}:
    $content[select] - {--RALLYE_TITLE--}:
    - $content[title] + {--ADMIN_RALLYE_TITLE--}:
    + $content[title]
    - {--RALLYE_DESCR2--}:
    + {--ADMIN_RALLYE_DESCRIPTION--}:
    {%pipe,fixEmptyContentToDashes=$content[descr]%}
    - {--RALLYE_ADMIN_ID--}:
    + {--ADMIN_RALLYE_ADMIN_LOGIN--}:
    {%pipe,generateAdminLink=$content[admin_id]%}
    - {--RALLYE_TSTART--}:
    + {--ADMIN_RALLYE_STARTED--}:
    $content[start_date]
    - {--RALLYE_TEND--}:
    + {--ADMIN_RALLYE_ENDED--}:
    $content[end_date]
    - {--RALLYE_TEMPLATE2--}:
    + {--ADMIN_RALLYE_TEMPLATE--}:
    {%pipe,fixEmptyContentToDashes=$content[template]%}
    - {--RALLYE_AUTO_ADD--}:
    - {%pipe,translateYesNo=$content[auto_add_new_user]%} + {--ADMIN_RALLYE_AUTO_ADD_USERS--}:
    + {%pipe,translateYesNo=$content[auto_add_new_user]%}
    {--RALLYE_ACTIVE--}:
    - {%pipe,translateYesNo=$content[is_active]%} + {%pipe,translateYesNo=$content[is_active]%}
    {--RALLYE_NOTIFY--}:
    - {%pipe,translateYesNo=$content[send_notify]%} + {%pipe,translateYesNo=$content[send_notify]%}
    {--RALLYE_NOTIFIED--}:
    @@ -46,7 +46,7 @@
    {--RALLYE_ASSIGNED_PRICES--}:
    - {%pipe,translateComma=$content[prices_cnt]%} + {%pipe,translateComma=$content[prices_cnt]%}
    {--RALLYE_ASSIGNED_USERS--}:
    @@ -60,11 +60,11 @@
    - {--RALLYE_MIN_USERS_MINI--}:
    + {--ADMIN_RALLYE_MIN_USERS_MINI--}:
    $content[min_users]
    - {--RALLYE_MIN_PRICES_MINI--}:
    + {--ADMIN_RALLYE_MIN_PRICES_MINI--}:
    $content[min_prices]
    - + @@ -16,7 +17,7 @@ $content[rows] - diff --git a/templates/de/html/admin/admin_list_refs_norefs.tpl b/templates/de/html/admin/admin_list_refs_norefs.tpl index a6f55889b3..3519b26a8c 100644 --- a/templates/de/html/admin/admin_list_refs_norefs.tpl +++ b/templates/de/html/admin/admin_list_refs_norefs.tpl @@ -1,5 +1,5 @@ - diff --git a/templates/de/html/admin/admin_list_refs_row.tpl b/templates/de/html/admin/admin_list_refs_row.tpl index da67d45d53..d19c89f9a8 100644 --- a/templates/de/html/admin/admin_list_refs_row.tpl +++ b/templates/de/html/admin/admin_list_refs_row.tpl @@ -1,5 +1,6 @@ - + + diff --git a/templates/de/html/admin/admin_list_sponsor_row.tpl b/templates/de/html/admin/admin_list_sponsor_row.tpl index 5c664bd997..45f4673212 100644 --- a/templates/de/html/admin/admin_list_sponsor_row.tpl +++ b/templates/de/html/admin/admin_list_sponsor_row.tpl @@ -1,39 +1,51 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff --git a/templates/de/html/admin/admin_list_surfbar_actions.tpl b/templates/de/html/admin/admin_list_surfbar_actions.tpl index c3873bc152..b7eeb9fb21 100644 --- a/templates/de/html/admin/admin_list_surfbar_actions.tpl +++ b/templates/de/html/admin/admin_list_surfbar_actions.tpl @@ -24,7 +24,7 @@ $content
    + {%message,ADMIN_LIST_REFERRALS_LEVEL=$content[level]%}
    $content[info]
    {--_USERID--}{--_REFID--} {--REFS_COUNT--} {--SURNAME_FAMILY--} {--EMAIL--}
    + {%message,ADMIN_LIST_USER_NO_REFERRALS=$content[userid]%}
    {%pipe,generateUserProfileLink=$content[userid]%}{%pipe,generateUserProfileLink=$content[userid]%}{%user,refid,generateUserProfileLink=$content[userid]%} $content[refs_link] {%user,gender,translateGender=$content[userid]%} {%user,surname=$content[userid]%} {%user,family=$content[userid]%} $content[email]
    {--ID_SELECT--}{--SURNAME_FAMILY--}:{--SPONSOR_POINTS_LEFT--}: + {--ID_SELECT--} + + {--SURNAME_FAMILY--}: + + {--SPONSOR_POINTS_LEFT--}: +
    - [$content[id]] - - {%pipe,translateGender=$content[gender]%} $content[surname] $content[family] - - {%pipe,translateComma=$content[points]%} {?POINTS?} - + [$content[id]] + + {%pipe,translateGender=$content[gender]%} $content[surname] $content[family] + + {%pipe,translateComma=$content[points]%} {?POINTS?} +
    - {--SPONSOR_STATUS--}: - {--SPONSOR_CREATED--}:{--LAST_ONLINE_SHORT--}:{--REMOTE_IP--}: + {--SPONSOR_STATUS--}: + + {--SPONSOR_CREATED--}: + + {--LAST_ONLINE_SHORT--}: + + {--REMOTE_IP--}: +
    - [{%pipe,translateSponsorStatus=$content[status]%}] - - $content[sponsor_created] - - $content[last_online] - - $content[remote_addr] - + [{%pipe,translateSponsorStatus=$content[status]%}] + + $content[sponsor_created] + + $content[last_online] + + $content[remote_addr] +
    diff --git a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl index d08d4d1c11..05cc5bf2e3 100644 --- a/templates/de/html/admin/admin_list_surfbar_actions_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_actions_row.tpl @@ -1,6 +1,6 @@ - + {%pipe,translateSurfbarUrlStatus=$content[actions_status]%} diff --git a/templates/de/html/admin/admin_list_surfbar_urls.tpl b/templates/de/html/admin/admin_list_surfbar_urls.tpl index 1b80e70c87..13ed58d13a 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls.tpl @@ -20,10 +20,10 @@ $content - - - - + + + + diff --git a/templates/de/html/admin/admin_list_transfer.tpl b/templates/de/html/admin/admin_list_transfer.tpl index b354570efb..dc5b684d07 100644 --- a/templates/de/html/admin/admin_list_transfer.tpl +++ b/templates/de/html/admin/admin_list_transfer.tpl @@ -14,10 +14,10 @@ {--TRANSFER_STAMP--} - {--TRANSFER_FROM_USERID--} + {--ADMIN_TRANSFER_FROM_USERID--} - {--TRANSFER_TO_USERID--} + {--ADMIN_TRANSFER_TO_USERID--} {--TRANSFER_POINTS_REASON--} diff --git a/templates/de/html/admin/admin_list_user.tpl b/templates/de/html/admin/admin_list_user.tpl index e3e345a361..a5919f3c19 100644 --- a/templates/de/html/admin/admin_list_user.tpl +++ b/templates/de/html/admin/admin_list_user.tpl @@ -5,7 +5,7 @@ {%template,AdminListUserTitle%}: - {%pipe,getRequestElement,alpha=sortby%} + {%pipe,getRequestElement,addAlphabeticalSorting=sortby%} $content[sort_links] {%pipe,addPageNavigation=$content[num_pages]%} $content[rows] diff --git a/templates/de/html/admin/admin_lock_surfbar_urls.tpl b/templates/de/html/admin/admin_lock_surfbar_urls.tpl index 0a9b83689c..1eedfe6c25 100644 --- a/templates/de/html/admin/admin_lock_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_lock_surfbar_urls.tpl @@ -17,7 +17,7 @@ $content - + diff --git a/templates/de/html/admin/admin_login_form.tpl b/templates/de/html/admin/admin_login_form.tpl index f34d9b11b1..68b515f593 100644 --- a/templates/de/html/admin/admin_login_form.tpl +++ b/templates/de/html/admin/admin_login_form.tpl @@ -53,7 +53,7 @@ - + diff --git a/templates/de/html/admin/admin_main_footer.tpl b/templates/de/html/admin/admin_main_footer.tpl index 6c229665cf..f9a969e900 100644 --- a/templates/de/html/admin/admin_main_footer.tpl +++ b/templates/de/html/admin/admin_main_footer.tpl @@ -7,7 +7,7 @@
    - + diff --git a/templates/de/html/install/install_main_plain.tpl b/templates/de/html/install/install_main_plain.tpl new file mode 100644 index 0000000000..1b292b92e1 --- /dev/null +++ b/templates/de/html/install/install_main_plain.tpl @@ -0,0 +1,14 @@ +
    + : : : {--INSTALLER_MAIN_TITLE--} : : : +
    + +
    + {%pipe,getInstallerContent%} +
    + +
    + + +
    + + diff --git a/templates/de/html/install/install_menu.tpl b/templates/de/html/install/install_menu.tpl new file mode 100644 index 0000000000..765418eab9 --- /dev/null +++ b/templates/de/html/install/install_menu.tpl @@ -0,0 +1,8 @@ + diff --git a/templates/de/html/install/install_page1.tpl b/templates/de/html/install/install_page1.tpl index ac15c35448..fd79c54e95 100644 --- a/templates/de/html/install/install_page1.tpl +++ b/templates/de/html/install/install_page1.tpl @@ -1,34 +1,34 @@ -
    -
    - +
    + +
    - - + - + - + - + - + diff --git a/templates/de/html/install/install_page2.tpl b/templates/de/html/install/install_page2.tpl index 27619a3265..63e66ccfa3 100644 --- a/templates/de/html/install/install_page2.tpl +++ b/templates/de/html/install/install_page2.tpl @@ -1,36 +1,36 @@ -
    - -
    -
    {--INSTALLER_HEADER_TEXT_PAGE1--}
    +
    + {--INSTALLER_BASE_DATA_TITLE--}
    - {--INSTALLER_TEXT_PAGE_1--} + {--INSTALLER_BASE_DATA_DESCRIPTION--}
    {--INSTALLER_SERVER_PATH--}:{--INSTALLER_LABEL_BASE_PATH--} ({--INSTALLER_BASE_PATH_NOTICE--})
    {--INSTALLER_BASE_URL--} ({--BASE_URL_NOTICE--}):{--INSTALLER_LABEL_BASE_URL--} ({--INSTALLER_BASE_URL_NOTICE--}):
    {--INSTALLER_HP_TITLE--}:{--INSTALLER_LABEL_MAIN_TITLE--}
    {--INSTALLER_HP_SLOGAN--}:{--INSTALLER_LABEL_SLOGAN--}
    {--INSTALLER_HP_EMAIL--}:{--INSTALLER_LABEL_WEBMASTER--}
    +
    + +
    - + - + - + - + - + - + - + diff --git a/templates/de/html/install/install_page3.tpl b/templates/de/html/install/install_page3.tpl index e25c17db0b..844ee53b85 100644 --- a/templates/de/html/install/install_page3.tpl +++ b/templates/de/html/install/install_page3.tpl @@ -1,36 +1,36 @@ -
    - -
    -
    {--INSTALLER_HEADER_TEXT_PAGE2--}
    + {--INSTALLER_DATABASE_CONFIG_TITLE--}
    - {--INSTALLER_TEXT_PAGE_2--} + {--INSTALLER_DATABASE_CONFIG_DESCRIPTION--}
    {--INSTALLER_MYSQL_HOST--}:{--INSTALLER_MYSQL_HOST--}
    {--INSTALLER_MYSQL_DBASE--}:{--INSTALLER_MYSQL_DBASE--}
    {--INSTALLER_MYSQL_PREFIX--}:{--INSTALLER_MYSQL_PREFIX--}
    {--INSTALLER_MYSQL_TABLE_TYPE--}:{--INSTALLER_MYSQL_TABLE_TYPE--}
    {--INSTALLER_MYSQL_LOGIN--}:{--INSTALLER_MYSQL_LOGIN--}
    {--INSTALLER_MYSQL_PASSWORD1--}:{--INSTALLER_MYSQL_PASSWORD1--}
    {--INSTALLER_MYSQL_PASSWORD2--}:{--INSTALLER_MYSQL_PASSWORD2--}
    +
    + +
    - - + - + - + - + diff --git a/templates/de/html/install/install_page5.tpl b/templates/de/html/install/install_page5.tpl index fd5bf7c350..e89367bb64 100644 --- a/templates/de/html/install/install_page5.tpl +++ b/templates/de/html/install/install_page5.tpl @@ -1,18 +1,18 @@ -
    - -
    -
    {--INSTALLER_HEADER_TEXT_PAGE3--}
    +
    + {--INSTALLER_SMTP_CONFIG_TITLE--}
    - {--INSTALLER_TEXT_PAGE_3--} + {--INSTALLER_SMTP_CONFIG_DESCRIPTION--}
    {--INSTALLER_TEXT_SMTP_HOST--}:{--INSTALLER_SMTP_HOST--}
    {--INSTALLER_TEXT_SMTP_USER--}:{--INSTALLER_SMTP_USER--}
    {--INSTALLER_TEXT_SMTP_PASSWORD1--}:{--INSTALLER_SMTP_PASSWORD1--}
    {--INSTALLER_TEXT_SMTP_PASSWORD2--}:{--INSTALLER_SMTP_PASSWORD2--}
    +
    + +
    - - + - + - + - + - - -
    -
    {--INSTALLER_HEADER_TEXT_PAGE5--}
    +
    + {--INSTALLER_OTHER_CONFIG_TITLE--}
    - {--INSTALLER_TEXT_PAGE_5--} + {--INSTALLER_OTHER_CONFIG_DESCRIPTION--}
    {--INSTALLER_OUTPUT_MODE--}:{--INSTALLER_OUTPUT_MODE--}
    {--INSTALLER_WARN_NO_PASSWORD--}:{--INSTALLER_WARN_NO_PASSWORD--}
    {--INSTALLER_CONFIG_WRITE_FOOTER--}:{--INSTALLER_CONFIG_WRITE_FOOTER--}
    {--INSTALLER_ENABLE_BACKLINK--}:{--INSTALLER_ENABLE_BACKLINK--} + +
    + {--INSTALLER_BASE_PATH_NOTICE--} +
    + + +
    + + + +
    + {--INSTALLER_BASE_URL_NOTICE--} +
    +
    + + +
    + {--INSTALLER_BASE_DATA_LEGEND_TITLE_SLOGAN--} +
    + + +
    + +
    + + +
    + +
    + + +
    +
    + + + diff --git a/templates/de/html/install/install_page_database_config.tpl b/templates/de/html/install/install_page_database_config.tpl new file mode 100644 index 0000000000..58576759f9 --- /dev/null +++ b/templates/de/html/install/install_page_database_config.tpl @@ -0,0 +1,59 @@ +
    +
    + {--INSTALLER_DATABASE_CONFIG_TITLE--} +
    + +
    + {--INSTALLER_DATABASE_CONFIG_DESCRIPTION--} +
    + +
    +
    + {--INSTALLER_DATABASE_LEGEND_HOST_DBASE_PREFIX_TYPE--} +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + + +
    + {--INSTALLER_MYSQL_TABLE_TYPE_NOTICE--} +
    +
    +
    + +
    + {--INSTALLER_DATABASE_LEGEND_LOGIN_PASSWORD--} +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    + +
    diff --git a/templates/de/html/install/install_page_init.tpl b/templates/de/html/install/install_page_init.tpl new file mode 100644 index 0000000000..4ea300966f --- /dev/null +++ b/templates/de/html/install/install_page_init.tpl @@ -0,0 +1,10 @@ +
    +
    + {--INSTALLER_PAGE_INIT_TITLE--} +
    + +
    + Einen Augenblick, die Installation wird vorbereitet ... +
    + +
    diff --git a/templates/de/html/install/install_page_other_config.tpl b/templates/de/html/install/install_page_other_config.tpl new file mode 100644 index 0000000000..9e729065e7 --- /dev/null +++ b/templates/de/html/install/install_page_other_config.tpl @@ -0,0 +1,47 @@ +
    +
    + {--INSTALLER_OTHER_CONFIG_TITLE--} +
    + +
    + {--INSTALLER_OTHER_CONFIG_DESCRIPTION--} +
    + +
    +
    + {--INSTALLER_OTHER_CONFIG_LEGEND_ET_CETERA--} +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + + +
    + {--INSTALLER_ENABLE_BACKLINK_NOTICE--} +
    +
    +
    +
    + +
    diff --git a/templates/de/html/install/install_page_smtp_config.tpl b/templates/de/html/install/install_page_smtp_config.tpl new file mode 100644 index 0000000000..7dfba3dd8d --- /dev/null +++ b/templates/de/html/install/install_page_smtp_config.tpl @@ -0,0 +1,39 @@ +
    +
    + {--INSTALLER_SMTP_CONFIG_TITLE--} +
    + +
    + {--INSTALLER_SMTP_CONFIG_DESCRIPTION--} +
    + +
    +
    + {--INSTALLER_SMTP_LEGEND_OPTIONAL_CONFIG--} +
    + + + +
    + {--INSTALLER_SMTP_HOST_NOTICE--} +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    + +
    diff --git a/templates/de/html/install/install_page_welcome.tpl b/templates/de/html/install/install_page_welcome.tpl new file mode 100644 index 0000000000..fa9772d282 --- /dev/null +++ b/templates/de/html/install/install_page_welcome.tpl @@ -0,0 +1,39 @@ +
    +
    + {--INSTALLER_PAGE_WELCOME_TITLE--} +
    + +
    + Dieses Script wird Ihnen dabei helfen, den {?mt_word?} schrittweise zu + installieren. Dabei werden z.B. der absolute Serverpfad, URL, Ihre + Email-Adresse (Webmaster) und Daten zur Datenbank abgefragt, um dann + testweise eine Verbindung aufzubauen. Anschließend können Sie + optional Ihre SMTP-Zugangsdaten zu Ihrer Email-Adresse eingeben, da nicht + auf jedem Server der PHP-Befehl mail() aktiviert ist. +
    + +
    + Sie werden während der Installation Schritt-Für-Schritt durch die + einzelnen Installationsschritte gebracht. Sie brauchen dazu weder + Programmiererkenntnisse noch ein abgschlossenes Informatikstudium. Bitte + halten Sie die MySQL-und eventuelle SMTP-Zugangsdaten von Ihrem Hoster + bereit. +
    + +
    + Nach Abschluss der Installation sollten Sie als nächstes das erste + Administrator-Login einrichten, da sonst jeder beliebiger Anderer dies tun + kann. Anschliessend können Sie sich zum ersten Mal in den Adminbereich + einloggen und weitere Einstellungen verfeinern, sowie Erweiterungen + installieren. +
    + +
    + {?TITLE?} empfiehlt Ihnen, dann alle Installationsdateien von Ihrem Server + aus Sicherheitsgründen zu löschen. Sie sollten auch nur auf das + Verzeichnis inc/cache/ (und alle Unterordner) die CHMOD-Rechte 0777 geben, + nicht jedoch auf die restlichen Verzeichnisse (wie z.B. inc/, templates/, + theme/ usw.), da sonst zu viele Dateien beschreibbar sind, was nicht + nötig ist und ein Sicherheitsrisko darstellt. +
    +
    diff --git a/templates/de/html/install/install_selector.tpl b/templates/de/html/install/install_selector.tpl new file mode 100644 index 0000000000..e662c2a094 --- /dev/null +++ b/templates/de/html/install/install_selector.tpl @@ -0,0 +1,96 @@ +
    + : : : {--INSTALLER_MAIN_TITLE--} : : : +
    + +
    +
    + {--INSTALLER_AJAX_ERROR_TITLE--} +
    +
    + X +
    +
    +
    + +
    +
    + +
    +
    + {--INSTALLER_AJAX_TEST_TITLE--} +
    +
    + X +
    +
    +
    + +
    +
    + +
    +
    +
    + {--INSTALLER_SELECTOR_TITLE--} +
    + +
    + Sie können jetzt zwischen zwei Installationsvarrianten + entscheiden. Die erste ist eine moderne, interaktive und auf dem + AJAX-Framework jQuery basierend. Die zweite ist mit jedem Browser + kompatibel und funktioniert vollständig ohne JavaScript. +
    + +
    + Ersteres können Sie nur verwenden, wenn auch Ihr Browser aktuelles + JavaScript versteht, letzteres funktioniert auf jedem Browser. Ihr + Browser wird nun auf AJAX-Kompatiblität getestet. Sollte ein + kleines Fenster nach 3 Sekunden erscheinen, funktioniert jquery bei + Ihnen. Anderfalls sollten Sie die Standardversion auswählen. +
    + +
    +
    +
    + + +
    +
    +
    + 3 Sekunde(n) +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + diff --git a/templates/de/html/install/install_warning_next.tpl b/templates/de/html/install/install_warning_next.tpl new file mode 100644 index 0000000000..d3e014aec7 --- /dev/null +++ b/templates/de/html/install/install_warning_next.tpl @@ -0,0 +1,14 @@ +
    + Sie haben die farblich markierten Formularfelder noch nicht abgespeichert. + Wenn Sie ohne zu speichern fortfahren, gehen diese verloren und es sind + weiter die Standard-Einstellungen verwendet. +
    + +
    + Hier sind alle geänderten Felder aufgelistet: + $content[out] +
    + +
    + +
    diff --git a/templates/de/html/install/install_warning_previous.tpl b/templates/de/html/install/install_warning_previous.tpl new file mode 100644 index 0000000000..218f364dac --- /dev/null +++ b/templates/de/html/install/install_warning_previous.tpl @@ -0,0 +1,14 @@ +
    + Sie haben die farblich markierten Formularfelder noch nicht abgespeichert. + Wenn Sie ohne zu speichern fortfahren, gehen diese verloren und es sind + weiter die Standard-Einstellungen verwendet. +
    + +
    + Hier sind alle geänderten Felder aufgelistet: + $content[out] +
    + +
    + +
    diff --git a/templates/de/html/install/install_warning_tab.tpl b/templates/de/html/install/install_warning_tab.tpl new file mode 100644 index 0000000000..a4ba248817 --- /dev/null +++ b/templates/de/html/install/install_warning_tab.tpl @@ -0,0 +1,14 @@ +
    + Sie haben die farblich markierten Formularfelder noch nicht abgespeichert. + Wenn Sie ohne zu speichern fortfahren, gehen diese verloren und es sind + weiter die Standard-Einstellungen verwendet. +
    + +
    + Hier sind alle geänderten Felder aufgelistet: + $content[out] +
    + +
    + +
    diff --git a/templates/de/html/install/install_welcome.tpl b/templates/de/html/install/install_welcome.tpl index 333d2dc4cb..6ecee3c338 100644 --- a/templates/de/html/install/install_welcome.tpl +++ b/templates/de/html/install/install_welcome.tpl @@ -1,34 +1,47 @@ -
    - Willkommen zum Installationsscript vom Mailer-Projekt, dem - freien {?mt_word?}-Script! +
    +
    +
    + {--INSTALLER_PAGE_WELCOME_TITLE--}
    - Dieses Script wird Ihnen dabei helfen, den {?mt_word?} zu installieren, die - Datenbank einzurichten und den {?mt_word?} vorzukonfigurieren. + Dieses Script wird Ihnen dabei helfen, den {?mt_word?} schrittweise zu + installieren. Dabei werden z.B. der absolute Serverpfad, URL, Ihre + Email-Adresse (Webmaster) und Daten zur Datenbank abgefragt, um dann + testweise eine Verbindung aufzubauen. Anschließend können Sie + optional Ihre SMTP-Zugangsdaten zu Ihrer Email-Adresse eingeben, da nicht + auf jedem Server der PHP-Befehl mail() aktiviert ist.
    Sie werden während der Installation Schritt-Für-Schritt durch die einzelnen Installationsschritte gebracht. Sie brauchen dazu weder Programmiererkenntnisse noch ein abgschlossenes Informatikstudium. Bitte - halten Sie die MySQL-Daten von Ihrem Hoster bereit. + halten Sie die MySQL-und eventuelle SMTP-Zugangsdaten von Ihrem Hoster + bereit.
    - Nach erfolgreicher Installation sollten Sie als nächstes das erste - Administrator-Login einrichten. Anschliessend können Sie sich einloggen - und weitere Einstellungen verfeinern. + Nach Abschluss der Installation sollten Sie als nächstes das erste + Administrator-Login einrichten, da sonst jeder beliebiger Anderer dies tun + kann. Anschliessend können Sie sich zum ersten Mal in den Adminbereich + einloggen und weitere Einstellungen verfeinern, sowie Erweiterungen + installieren.
    - Das Entwickler-Team empfiehlt Ihnen, dann alle Installationsdateien von Ihrem - Server zu löschen. + {?TITLE?} empfiehlt Ihnen, dann alle Installationsdateien von Ihrem Server + aus Sicherheitsgründen zu löschen. Sie sollten auch nur auf das + Verzeichnis inc/cache/ (und alle Unterordner) die CHMOD-Rechte 0777 geben, + nicht jedoch auf die restlichen Verzeichnisse (wie z.B. inc/, templates/, + theme/ usw.), da sonst zu viele Dateien beschreibbar sind, was nicht + nötig ist und ein Sicherheitsrisko darstellt.
    +
    diff --git a/templates/de/html/js/js_admin_ajax.tpl b/templates/de/html/js/js_admin_ajax.tpl new file mode 100644 index 0000000000..2d233a9b4d --- /dev/null +++ b/templates/de/html/js/js_admin_ajax.tpl @@ -0,0 +1,86 @@ +/** + * JavaScript for admin AJAX stuff + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +// Make both windows drag'n'drop-able +$().ready(function() { + // Fade default content in + window.setTimeout("requestAjaxContent('admin', 'admin_content', '$content[admin_page]', false)", 250); + + // Set default tab id + defaultTabId = '$content[admin_page]'; + + // Set 'save-changes' button id + saveChangesId = 'save_changes'; + + //----------------------------------------- + // Tab navigation + //----------------------------------------- + $('a').each(function (i) { + $(this).on('click', {index:i}, function (event) { + // Do we have a valid index? + if (indexTranslation[event.data.index] != null) { + // Prevent default action + event.preventDefault(); + + // Valid found, so initialize the POST request + requestAjaxContent('admin', 'admin_content', indexTranslation[event.data.index], false); + } // END - if + }); + }); + + //----------------------------------------- + // Close buttons + //----------------------------------------- + $('#admin_error_close').click(function () { + // Close the window + closeErrorWindow('admin'); + }); + + $('#admin_warning_close').click(function () { + // Close the window + closeWarningWindow('admin'); + }); + + //----------------------------------------- + // Save changes + //----------------------------------------- + $('#' + saveChangesId).click(function () { + // Save changes + saveChanges('admin'); + }); + + //----------------------------------------- + // Drag'N'Drop + //----------------------------------------- + $('#admin_warning').draggable({ + opacity: 0.85 + }); + + $('#admin_error').draggable({ + opacity: 0.85 + }); +}); diff --git a/templates/de/html/js/js_admin_menu_onclick.tpl b/templates/de/html/js/js_admin_menu_onclick.tpl index 5605e5298c..11f5d85d80 100644 --- a/templates/de/html/js/js_admin_menu_onclick.tpl +++ b/templates/de/html/js/js_admin_menu_onclick.tpl @@ -1 +1 @@ - onclick="return changeMenuFoldState('$content[menu_mode]', '$content[main_action]', '$content[action]', '$content[what]')" + diff --git a/templates/de/html/js/js_cookies_disabled.tpl b/templates/de/html/js/js_cookies_disabled.tpl index dd5ae369d1..1968b4781a 100644 --- a/templates/de/html/js/js_cookies_disabled.tpl +++ b/templates/de/html/js/js_cookies_disabled.tpl @@ -1,5 +1,35 @@ +/** + * JavaScript for if cookies are disabled + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +// Loader for URL with COOKIES_DISABLED coded function Loader() { document.location.href = '{%url,js=modules.php?module=index&what=login%}&code={%code=COOKIES_DISABLED%}'; } +// Load after about 2 seconds window.setTimeout("Loader()", 2000); diff --git a/templates/de/html/js/js_install_ajax.tpl b/templates/de/html/js/js_install_ajax.tpl new file mode 100644 index 0000000000..3a23fd00ee --- /dev/null +++ b/templates/de/html/js/js_install_ajax.tpl @@ -0,0 +1,104 @@ +/** + * JavaScript for installation AJAX stuff + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ +// Make both windows drag'n'drop-able +$().ready(function() { + // Fade default content in + window.setTimeout("requestAjaxContent('install', 'install_content', '$content[install_page]', true)", 250); + + // Set default tab id + defaultTabId = '$content[install_page]'; + + // Set 'save-changes' button id + saveChangesId = 'save_changes'; + + //----------------------------------------- + // Tab navigation + //----------------------------------------- + $('a').each(function (i) { + $(this).on('click', {index:i}, function (event) { + // Do we have a valid index? + if (indexTranslation[event.data.index] != null) { + // Prevent default action + event.preventDefault(); + + // Valid found, so initialize the POST request + requestAjaxContent('install', 'install_content', indexTranslation[event.data.index], true); + } // END - if + }); + }); + + //----------------------------------------- + // Close buttons + //----------------------------------------- + $('#install_error_close').click(function () { + // Close the window + closeErrorWindow('install'); + }); + + $('#install_warning_close').click(function () { + // Close the window + closeWarningWindow('install'); + }); + + //----------------------------------------- + // Footer navigation + //----------------------------------------- + $('#next_page').click(function () { + // 'next' button has been clicked + doFooterPage('install', 'install_content', 'next'); + }); + + $('#previous_page').click(function () { + // 'previous' button has been clicked + doFooterPage('install', 'install_content', 'previous'); + }); + + $('#installer_switch').click(function () { + // Switch installer (to plain) + switchInstaller('plain'); + }); + + //----------------------------------------- + // Save changes + //----------------------------------------- + $('#' + saveChangesId).click(function () { + // Save changes + saveChanges('install'); + }); + + //----------------------------------------- + // Drag'N'Drop + //----------------------------------------- + $('#install_warning').draggable({ + opacity: 0.85 + }); + + $('#install_error').draggable({ + opacity: 0.85 + }); +}); diff --git a/templates/de/html/js/js_order_send.tpl b/templates/de/html/js/js_order_send.tpl index 939b03f26c..ef32d52b92 100644 --- a/templates/de/html/js/js_order_send.tpl +++ b/templates/de/html/js/js_order_send.tpl @@ -1,3 +1,31 @@ +/** + * JavaScript for ext-order + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + var counter = document.getElementById('counter'); var form = document.getElementById('form'); var ok = document.getElementById('ok'); diff --git a/templates/de/html/js/js_surfbar_frame_top.tpl b/templates/de/html/js/js_surfbar_frame_top.tpl index 1126345eb5..9a1b5a0bef 100644 --- a/templates/de/html/js/js_surfbar_frame_top.tpl +++ b/templates/de/html/js/js_surfbar_frame_top.tpl @@ -1,18 +1,46 @@ -var currCounter = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}"; -var maxCounter = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}"; -var counter = document.getElementById("surfbar_counter"); -var points = document.getElementById("surfbar_points"); -var reload = document.getElementById("surfbar_reload"); -var max = document.getElementById("surfbar_max"); +/** + * JavaScript for ext-surfbar - top frame + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +var currCounter = '{%pipe,gerSurfbarReloadTime=$content[url_id]%}'; +var maxCounter = '{%pipe,gerSurfbarReloadTime=$content[url_id]%}'; +var counter = document.getElementById('surfbar_counter'); +var points = document.getElementById('surfbar_points'); +var reload = document.getElementById('surfbar_reload'); +var max = document.getElementById('surfbar_max'); var countDown = null; function startStopCounter () { if (countDown == null) { // Start counter - document.getElementById("start").innerHTML = "{--MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT--}"; - countDown = window.setInterval("startCounter()", 1000); + document.getElementById('start').innerHTML = '{--MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT--}'; + countDown = window.setInterval('startCounter()', 1000); } else { - document.getElementById("start").innerHTML = "{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}"; + document.getElementById('start').innerHTML = '{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}'; window.clearInterval(countDown); countDown = null; } @@ -20,17 +48,17 @@ function startStopCounter () { } function init () { - countDown = window.setInterval("startCounter()", 1000); - window.setTimeout("initCounter()", 500); + countDown = window.setInterval('startCounter()', 1000); + window.setTimeout('initCounter()', 500); } function confirm () { if (parent.surfbar_url != null) { // Is in right frameset - parent.surfbar_url.location.href = "{%url=surfbar.php?id=$content[url_id]&check=$content[check]&salt=$content[salt]%}"; + parent.surfbar_url.location.href = '{%url=surfbar.php?id=$content[url_id]&check=$content[check]&salt=$content[salt]%}'; } else { // Called frame=top directly - window.location.href = "{%url=surfbar.php%}"; + window.location.href = '{%url=surfbar.php%}'; } } @@ -40,7 +68,7 @@ function reloadSurfbar () { parent.surfbar_stats.location.reload(); } else { // Called frame=top directly - window.location.href = "{%url=surfbar.php%}"; + window.location.href = '{%url=surfbar.php%}'; } this.location.reload(); } @@ -48,16 +76,16 @@ function reloadSurfbar () { function initCounter () { if (parent.surfbar_url != null) { // Is in right frameset - parent.surfbar_url.location.href = '{%pipe,SURFBAR_GET_URL=$content[url_id]%}'; + parent.surfbar_url.location.href = '{%pipe,gerSurfbarUrl=$content[url_id]%}'; } else { // Called frame=top directly - window.location.href = "{%url=surfbar.php%}"; + window.location.href = '{%url=surfbar.php%}'; } - counter.innerHTML = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}"; - points.innerHTML = "{%pipe,SURFBAR_GET_REWARD,translateComma=$content[url_id]%}"; - reload.innerHTML = "{%pipe,SURFBAR_GET_USER_LOCKS%}"; - max.innerHTML = "{%pipe,SURFBAR_GET_TOTAL_URLS%}"; + counter.innerHTML = '{%pipe,gerSurfbarReloadTime=$content[url_id]%}'; + points.innerHTML = '{%pipe,gerSurfbarReward,translateComma=$content[url_id]%}'; + reload.innerHTML = '{%pipe,getSurfbarUserLocks%}'; + max.innerHTML = '{%pipe,getSurfbarTotalUrls%}'; } function startCounter () { @@ -71,7 +99,7 @@ function startCounter () { if (currCounter == 0) { clearInterval(countDown); confirm(); - window.setTimeout("reloadSurfbar()", 500); + window.setTimeout('reloadSurfbar()', 500); } } diff --git a/templates/de/html/js/js_surfbar_member_book.tpl b/templates/de/html/js/js_surfbar_member_book.tpl index c6fa3c7466..fa74e28ed3 100644 --- a/templates/de/html/js/js_surfbar_member_book.tpl +++ b/templates/de/html/js/js_surfbar_member_book.tpl @@ -1,3 +1,31 @@ +/** + * JavaScript for ext-surfbar - member booking script + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + var limit = document.getElementById('limit'); var span = document.getElementById('span_limit'); var limited_no = document.getElementById('limited_no'); diff --git a/templates/de/html/js/js_surfbar_member_edit.tpl b/templates/de/html/js/js_surfbar_member_edit.tpl index b8e754ee13..9cab677d39 100644 --- a/templates/de/html/js/js_surfbar_member_edit.tpl +++ b/templates/de/html/js/js_surfbar_member_edit.tpl @@ -1,3 +1,31 @@ +/** + * JavaScript for ext-surfbar - member editing page + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + var limit = document.getElementById('limit'); var span = document.getElementById('span_limit'); var old_limit = {%pipe,bigintval=$content[views_max]%}; diff --git a/templates/de/html/js/js_surfbar_stopped.tpl b/templates/de/html/js/js_surfbar_stopped.tpl index 6e04e692af..74f71b7edf 100644 --- a/templates/de/html/js/js_surfbar_stopped.tpl +++ b/templates/de/html/js/js_surfbar_stopped.tpl @@ -1,14 +1,42 @@ +/** + * JavaScript for ext-surfbar - Stopped + * -------------------------------------------------------------------- + * $Revision:: $ + * $Date:: $ + * $Tag:: 0.2.1-FINAL $ + * $Author:: $ + * -------------------------------------------------------------------- + * Copyright (c) 2003 - 2009 by Roland Haeder + * Copyright (c) 2009 - 2012 by Mailer Developer Team + * For more information visit: http://mxchange.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + var interval = null; -var countDown = "{?surfbar_restart_time?}"; -var timer = document.getElementById("surfbar_counter"); -var buttonDiv = document.getElementById("surfbar_button"); +var countDown = '{?surfbar_restart_time?}'; +var timer = document.getElementById('surfbar_counter'); +var buttonDiv = document.getElementById('surfbar_button'); function restart () { this.location.reload(); } function showButton () { - buttonDiv.innerHTML = "
    "; + buttonDiv.innerHTML = '
    '; } function counter () { @@ -26,8 +54,8 @@ function counter () { } function init () { - interval = window.setInterval("counter()", 1000); - timer.innerHTML = "{?surfbar_restart_time?}"; + interval = window.setInterval('counter()', 1000); + timer.innerHTML = '{?surfbar_restart_time?}'; } -window.setTimeout("init()", 500); +window.setTimeout('init()', 500); diff --git a/templates/de/html/mailid/mailid_timer.tpl b/templates/de/html/mailid/mailid_timer.tpl index eaf77a7c88..f61e320659 100644 --- a/templates/de/html/mailid/mailid_timer.tpl +++ b/templates/de/html/mailid/mailid_timer.tpl @@ -14,8 +14,8 @@ function startCounter() { timer--; document.confirm.counter.value = timer; if (timer == 0) { - document.location.href = '{%url,js=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=confirm&code=$content[rand]%}'; clearInterval(Counter); + document.location.href = '{%url,js=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=confirm&code=$content[rand]%}'; } } //--> diff --git a/templates/de/html/mediadata.tpl b/templates/de/html/mediadata.tpl index 1d4e2633b6..b2dea6d73e 100644 --- a/templates/de/html/mediadata.tpl +++ b/templates/de/html/mediadata.tpl @@ -1,7 +1,9 @@
    - + @@ -21,15 +23,15 @@ - + - + - + @@ -41,14 +43,16 @@ $content[out_user] - + - + diff --git a/templates/de/html/member/member_beg.tpl b/templates/de/html/member/member_beg.tpl index cef2931940..e6d09fdbe8 100644 --- a/templates/de/html/member/member_beg.tpl +++ b/templates/de/html/member/member_beg.tpl @@ -3,21 +3,21 @@
    {--MEMBER_BEG_LINK_TITLE--}
    -
    +
    {--MEMBER_BEG_YOUR_LINK--}
    {?URL?}/beg.php?userid=$content[userid]
    -
    +
    {--MEMBER_BEG_CLICKS_TOTAL--} {%user,beg_clicks,translateComma%}
    -
    +
    {--MEMBER_BEG_POINTS--}
    -
    +
    {%message,MEMBER_BEG_TIMEOUT%}
    - diff --git a/templates/de/html/member/member_book_surfbar_dynamic.tpl b/templates/de/html/member/member_book_surfbar_dynamic.tpl index d448e67972..b34e184478 100644 --- a/templates/de/html/member/member_book_surfbar_dynamic.tpl +++ b/templates/de/html/member/member_book_surfbar_dynamic.tpl @@ -1,5 +1,5 @@ -
    +
    URL in Surfbar buchen - Dynamisch: @@ -22,14 +22,14 @@
    Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens - {%pipe,SURFBAR_DETERMINE_COSTS,translateComma=true%} {?POINTS?}. + {%pipe,determineSurfbarCosts,translateComma=true%} {?POINTS?}. Surfen Sie mit der Surfbar erhalten Sie mindestens - {%pipe,SURFBAR_DETERMINE_REWARD,translateComma=true%} {?POINTS?} + {%pipe,determineSurfbarReward,translateComma=true%} {?POINTS?} auf Ihr Konto gutgeschrieben.
    Sie haben bereits - {%pipe,SURFBAR_GET_TOTAL_USER_URLS,translateComma%} + {%pipe,getSurfbarTotalUserUrls,translateComma%} von maximal {%config,translateComma=surfbar_max_order%} erlaubten URLs gebucht. @@ -38,7 +38,7 @@
    - +
    diff --git a/templates/de/html/member/member_book_surfbar_static.tpl b/templates/de/html/member/member_book_surfbar_static.tpl index 195cb14848..e7c7128852 100644 --- a/templates/de/html/member/member_book_surfbar_static.tpl +++ b/templates/de/html/member/member_book_surfbar_static.tpl @@ -21,17 +21,17 @@
    Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen {%pipe,SURFBAR_DETERMINE_COSTS,translateComma=true%}{?POINTS?}. Surfen Sie mit - der Surfbar erhalten Sie {%pipe,SURFBAR_DETERMINE_REWARD,translateComma=true%} + class="surfbar_points">{%pipe,determineSurfbarCosts,translateComma=true%}{?POINTS?}. Surfen Sie mit + der Surfbar erhalten Sie {%pipe,determineSurfbarReward,translateComma=true%} {?POINTS?} auf Ihr Konto gutgeschrieben.

    - Sie haben bereits {%pipe,SURFBAR_GET_TOTAL_USER_URLS,translateComma%} von maximal + Sie haben bereits {%pipe,getSurfbarTotalUserUrls,translateComma%} von maximal {%config,translateComma=surfbar_max_order%} erlaubten URLs gebucht.
    - +
    diff --git a/templates/de/html/member/member_cash_coupon.tpl b/templates/de/html/member/member_cash_coupon.tpl index 29af0bab0d..d41bbe7f91 100644 --- a/templates/de/html/member/member_cash_coupon.tpl +++ b/templates/de/html/member/member_cash_coupon.tpl @@ -1,5 +1,5 @@
    - +
    {--MEMBER_CASH_COUPON_TITLE--} @@ -18,7 +18,7 @@
    -
    +
    {--MEMBER_COUPON_CHANGE_STATUS_TITLE--} diff --git a/templates/de/html/member/member_cat_row.tpl b/templates/de/html/member/member_cat_row.tpl index 90574573ad..11f5d85d80 100644 --- a/templates/de/html/member/member_cat_row.tpl +++ b/templates/de/html/member/member_cat_row.tpl @@ -1,9 +1 @@ -
    - - - + diff --git a/templates/de/html/member/member_cats.tpl b/templates/de/html/member/member_cats.tpl new file mode 100644 index 0000000000..2d4bcc6d6d --- /dev/null +++ b/templates/de/html/member/member_cats.tpl @@ -0,0 +1,17 @@ +
    + +
    {--MEDIA_DATA_GENERAL--} + {--MEDIA_DATA_GENERAL--} +
    {--USER_MT_START--}:
    {--USERS_CONFIRMED--}:{%pipe,translateComma=$content[user_confirmed]%}{%pipe,getTotalConfirmedUser,translateComma%}
    {--USERS_UNCONFIRMED--}:{%pipe,translateComma=$content[user_unconfirmed]%}{%pipe,getTotalUnconfirmedUser,translateComma%}
    {--USERS_LOCKED--}:{%pipe,translateComma=$content[user_locked]%}{%pipe,getTotalLockedUser,translateComma%}
    {--USERS_MAX_MAILS--}:
    {--MEDIA_DATA_MAIL--} + {--MEDIA_DATA_MAIL--} +
    {--USERS_STATS--}: {%pipe,translateComma=$content[user_stats]%}
    {--USERS_MAX_PER_DAY--}:{--USERS_MAX_MAILS_PER_DAY--}: {%pipe,translateComma=$content[max]%}
    $content[cat] - - {--YES--} - - {--NO--} -
    + + + + +$content + + + +
    {--CATEGORY_NAME--}{--SELECT_CAT--}
    + +
    diff --git a/templates/de/html/member/member_cats_footer.tpl b/templates/de/html/member/member_cats_footer.tpl index 64051c458d..11f5d85d80 100644 --- a/templates/de/html/member/member_cats_footer.tpl +++ b/templates/de/html/member/member_cats_footer.tpl @@ -1,9 +1 @@ -
    - -
    + diff --git a/templates/de/html/member/member_cats_header.tpl b/templates/de/html/member/member_cats_header.tpl index 462be13630..11f5d85d80 100644 --- a/templates/de/html/member/member_cats_header.tpl +++ b/templates/de/html/member/member_cats_header.tpl @@ -1,7 +1 @@ -
    -
    - - - - - + diff --git a/templates/de/html/member/member_cats_row.tpl b/templates/de/html/member/member_cats_row.tpl new file mode 100644 index 0000000000..90574573ad --- /dev/null +++ b/templates/de/html/member/member_cats_row.tpl @@ -0,0 +1,9 @@ + + + + diff --git a/templates/de/html/member/member_earning_popup_form_row.tpl b/templates/de/html/member/member_earning_popup_form_row.tpl index dda9314841..d378454bc7 100644 --- a/templates/de/html/member/member_earning_popup_form_row.tpl +++ b/templates/de/html/member/member_earning_popup_form_row.tpl @@ -4,7 +4,7 @@
    {%message,MEMBER_EARNING_POPUP_FORM_TITLE=$content[earning_provider]%}
    -
    +
    {--MEMBER_EARNING_ENTER_DAILY_POPUP_AMOUNT--}
    diff --git a/templates/de/html/member/member_earning_popup_row.tpl b/templates/de/html/member/member_earning_popup_row.tpl index fe10b6e4f6..210b63377f 100644 --- a/templates/de/html/member/member_earning_popup_row.tpl +++ b/templates/de/html/member/member_earning_popup_row.tpl @@ -11,7 +11,7 @@
    {--MEMBER_EARNING_CHANGE_IS_ACTIVE--}
    diff --git a/templates/de/html/member/member_edit_refback.tpl b/templates/de/html/member/member_edit_refback.tpl index e1bf775206..1ff3037889 100644 --- a/templates/de/html/member/member_edit_refback.tpl +++ b/templates/de/html/member/member_edit_refback.tpl @@ -6,11 +6,11 @@ {--MEMBER_REFBACK_EDIT_TITLE--}
    {--MEMBER_REFBACK_REFID--}: $content[refid]
    -
    +
    {--MEMBER_ENTER_REFBACK_PERCENTS--}: %
    -
    +
    {--MEMBER_ENTER_REFBACK_NOTICE_FOR_RECIPIENT--}:
    diff --git a/templates/de/html/member/member_html_mail_settings.tpl b/templates/de/html/member/member_html_mail_settings.tpl index 066262c492..76fa344726 100644 --- a/templates/de/html/member/member_html_mail_settings.tpl +++ b/templates/de/html/member/member_html_mail_settings.tpl @@ -3,7 +3,7 @@
    {--CATEGORY_NAME--}{--SELECT_CAT--}
    $content[cat] + + {--YES--} + + {--NO--} +
    diff --git a/templates/de/html/member/member_list_beg.tpl b/templates/de/html/member/member_list_beg.tpl index 930851f028..344b962897 100644 --- a/templates/de/html/member/member_list_beg.tpl +++ b/templates/de/html/member/member_list_beg.tpl @@ -20,7 +20,7 @@
    - {--MEMBER_HTML_INTRO--} + {--MEMBER_HTML_TITLE--}
    -
    {--BEG_RALLYE_CONDITIONS--}:
    diff --git a/templates/de/html/member/member_list_rallye.tpl b/templates/de/html/member/member_list_rallye.tpl index b012436861..373c355a84 100644 --- a/templates/de/html/member/member_list_rallye.tpl +++ b/templates/de/html/member/member_list_rallye.tpl @@ -8,12 +8,12 @@ $content[rows] -
      -
    • Es werden nur aktive User gewertet.
    • -
    • {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
    • -
    • {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
    • -
    • Der Rechtsweg ist ausgeschlossen.
    • -
    +
      +
    • Es werden nur aktive User gewertet.
    • +
    • {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
    • +
    • {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
    • +
    • Der Rechtsweg ist ausgeschlossen.
    • +
    diff --git a/templates/de/html/member/member_list_rallye_row.tpl b/templates/de/html/member/member_list_rallye_row.tpl index d88f39fb4d..a355702ae5 100644 --- a/templates/de/html/member/member_list_rallye_row.tpl +++ b/templates/de/html/member/member_list_rallye_row.tpl @@ -1,6 +1,5 @@ - $content[idx]. - $content[start].{%pipe,fixEmptyContentToDashes=$content[userid]%}.$content[end] - $content[start].{%pipe,fixEmptyContentToDashes=$content[ref]%}.$content[end] - $content[start].{%pipe,fixEmptyContentToDashes=$content[infos]%}.$content[end] + $content[idx] + $content[start]{%pipe,fixEmptyContentToDashes=$content[userid]%}$content[end] + $content[start]{%pipe,fixEmptyContentToDashes=$content[ref]%}$content[end] diff --git a/templates/de/html/member/member_list_refback.tpl b/templates/de/html/member/member_list_refback.tpl index 4ec68d8cfc..57207486b3 100644 --- a/templates/de/html/member/member_list_refback.tpl +++ b/templates/de/html/member/member_list_refback.tpl @@ -1,5 +1,5 @@
    -
    +
    {--MEMBER_REFBACK_TITLE--}
    $content diff --git a/templates/de/html/member/member_list_surfbar_table.tpl b/templates/de/html/member/member_list_surfbar_table.tpl new file mode 100644 index 0000000000..1d02cd8292 --- /dev/null +++ b/templates/de/html/member/member_list_surfbar_table.tpl @@ -0,0 +1,5 @@ + + +$content + +
    diff --git a/templates/de/html/member/member_mail_normal_active.tpl b/templates/de/html/member/member_mail_normal_active.tpl index 72b674b829..84f424d73b 100644 --- a/templates/de/html/member/member_mail_normal_active.tpl +++ b/templates/de/html/member/member_mail_normal_active.tpl @@ -1,4 +1,5 @@ -
    +
    +
    - + - + - + - + - + - + - + - + @@ -57,4 +58,5 @@
    @@ -6,47 +7,47 @@
    {--CONFIRM_LINK--}:{--CONFIRM_LINK--}: {--EMAIL_STATUS_ACTIVE--}
    {--EMAIL_SENDER--}:{--EMAIL_SENDER--}: $content[sender]
    {--EMAIL_SUBJECT--}:{--EMAIL_SUBJECT--}: $content[subject]
    {--EMAIL_TEXT--}:{--EMAIL_TEXT--}:
    $content[text]
    {--EMAIL_CATEGORY--}:{--EMAIL_CATEGORY--}: {%pipe,getCategory=$content[cat_id]%}
    {--EMAIL_TIMESTAMP--}:{--EMAIL_TIMESTAMP--}: $content[timestamp]
    {--EMAIL_TIME--}:{--EMAIL_TIME--}: {%pipe,createFancyTime=$content[time]%}
    {--EMAIL_POINTS--}:{--EMAIL_POINTS--}: {%pipe,translateComma=$content[points]%} {?POINTS?}
    -
    +
    +
    diff --git a/templates/de/html/member/member_order-back.tpl b/templates/de/html/member/member_order-back.tpl index 7cf08d5f2c..11f5d85d80 100644 --- a/templates/de/html/member/member_order-back.tpl +++ b/templates/de/html/member/member_order-back.tpl @@ -1,10 +1 @@ -
    - -
    - {--MEMBER_THANX_ORDER--} -
    -
    - -
    - -
    + diff --git a/templates/de/html/member/member_order-html_ext.tpl b/templates/de/html/member/member_order-html_ext.tpl index 7691111d41..11f5d85d80 100644 --- a/templates/de/html/member/member_order-html_ext.tpl +++ b/templates/de/html/member/member_order-html_ext.tpl @@ -1,6 +1 @@ - - - {--MEMBER_HTML_VALID_TAGS--}:
    - $content - - + diff --git a/templates/de/html/member/member_order-html_intro.tpl b/templates/de/html/member/member_order-html_intro.tpl index 6d1a04201a..11f5d85d80 100644 --- a/templates/de/html/member/member_order-html_intro.tpl +++ b/templates/de/html/member/member_order-html_intro.tpl @@ -1,15 +1 @@ - - - {--MEMBER_HTML_ORDER_INTRO--} - - - - - {--MEMBER_HTML_MSG--}: - - - - {--MEMBER_NORMAL_MSG--}: - - - + diff --git a/templates/de/html/member/member_order-zip1.tpl b/templates/de/html/member/member_order-zip1.tpl index 677a17026c..11f5d85d80 100644 --- a/templates/de/html/member/member_order-zip1.tpl +++ b/templates/de/html/member/member_order-zip1.tpl @@ -1,32 +1 @@ - - - {--MEMBER_ORDER_PAGE1_INTRO--} - - - - -
    - Geben Sie hier die ersten ein bis drei Stellen der Postleitzahl ein, - in der gesendet werden soll. -
    - -
    - Beispiele: -
      -
    • 1 : Sendet nur an Mitglieder, deren Postleitzahl mit 1 anfängt.
    • -
    • 12 : Sendet nur an Mitglieder, deren Postleitzahl mit 12 anfängt.
    • -
    • 123 : Sendet nur an Mitglieder, deren Postleitzahl mit 123 anfängt.
    • -
    -
    - -
    - Oder geben Sie nichts ein, wenn Sie diese Option nicht wünschen. -
    - - - - {--MEMBER_ENTER_ZIP_CODE--}: - - - - + diff --git a/templates/de/html/member/member_order-zip2.tpl b/templates/de/html/member/member_order-zip2.tpl index ab59fa768f..11f5d85d80 100644 --- a/templates/de/html/member/member_order-zip2.tpl +++ b/templates/de/html/member/member_order-zip2.tpl @@ -1,17 +1 @@ - - - {--MEMBER_ORDER_PAGE2_INTRO--} - - - - - - - - - -
    {--MEMBER_ENTER_ZIP_CODE--} - -
    - - + diff --git a/templates/de/html/member/member_order_html_ext.tpl b/templates/de/html/member/member_order_html_ext.tpl new file mode 100644 index 0000000000..b2c02e1ef3 --- /dev/null +++ b/templates/de/html/member/member_order_html_ext.tpl @@ -0,0 +1,5 @@ +
    + {--MEMBER_HTML_VALID_TAGS--}:
    + {%pipe,addValidHtmlTags%} + +
    diff --git a/templates/de/html/member/member_order_html_intro.tpl b/templates/de/html/member/member_order_html_intro.tpl new file mode 100644 index 0000000000..c50feea37f --- /dev/null +++ b/templates/de/html/member/member_order_html_intro.tpl @@ -0,0 +1,12 @@ +
    + {--MEMBER_HTML_ORDER_TITLE--} +
    + +
    +
    + {--MEMBER_HTML_MESSAGE--} + + {--MEMBER_NORMAL_MESSAGE--} + +
    +
    diff --git a/templates/de/html/member/member_order_page1.tpl b/templates/de/html/member/member_order_page1.tpl index 72a279ac87..3b09f801ed 100644 --- a/templates/de/html/member/member_order_page1.tpl +++ b/templates/de/html/member/member_order_page1.tpl @@ -1,14 +1,18 @@
    - +
    +
    + {--MEMBER_ORDER_PAGE1_TITLE--} +
    + $content[zip_content] + $content[html_extension] -
    - - -
    + + +
    diff --git a/templates/de/html/member/member_order_page2.tpl b/templates/de/html/member/member_order_page2.tpl index 1003195210..d8954f64aa 100644 --- a/templates/de/html/member/member_order_page2.tpl +++ b/templates/de/html/member/member_order_page2.tpl @@ -1,67 +1,79 @@
    - +
    +
    + {--MEMBER_ORDER_PAGE2_TITLE--} +
    + $content[zip_content] -
    - - - - - - - - - - - - - - - + + + + +
    + +
    + + (Minimum: {?order_min?}) +
    +
    + +
    + +
    + +
    +
    + $content[html_extension] - - - - - - - - - - - - - - - - - -
    {--SELECT_MAIL_TYPE--}: $content[type_selection] -
    {--SELECT_CATEGORY--}: + + + +
    + +
    +
    - {--ENTER_RECEIVER--}: Minimum: {?order_min?} -
    {--ENTER_SUBJECT--}:
    {--ENTER_TEXT--}:
    - {--MEMBER_PLEASE_NOTICE--} -
    -
    -
      -
    1. Bitte prüfen Sie unbedingt vor dem Absenden die Verfügbarkeit und Framekiller-Freiheit ihrer beworbenen Adresse!
    2. -
    3. Unsere AGBs vergessen? [Hier sind sie nochmal].
    4. -
    5. Gesperrte URLs können nicht ein zweites Mal beworben werden.
    6. -
    7. Ihre Seite wird vor dem entgültigem Absenden auf Framekiller hin automatisch doppelt geprüft. Sollten Sie also nur Ihre beworbene Seite sehen, enthält diese einen Frame-Killer.
    8. -
    9. Ist Sponsor-Mail ausgewählt, wird die beworbene Seite nicht geladen, sondern eine neutrale Seite mit unseren Sponsor-Bannern!
    10. -
    11. Fremde {?mt_word3?} dürfen während der gesamten Startphase (bis 100 aktive Mitglieder) nicht mehr beworben werden und werden von uns abgelehnt!
    12. -
    -
    -
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + {--MEMBER_PLEASE_NOTICE--} +
      +
    1. Bitte prüfen Sie unbedingt vor dem Absenden die Verfügbarkeit und Framekiller-Freiheit ihrer beworbenen Adresse!
    2. +
    3. Unsere AGBs vergessen? [Hier sind sie nochmal].
    4. +
    5. Gesperrte URLs können nicht ein zweites Mal beworben werden.
    6. +
    7. Ihre Seite wird vor dem entgültigem Absenden auf Framekiller hin automatisch doppelt geprüft. Sollten Sie also nur Ihre beworbene Seite sehen, enthält diese einen Frame-Killer.
    8. +
    9. Ist Sponsor-Mail ausgewählt, wird die beworbene Seite nicht geladen, sondern eine neutrale Seite mit unseren Sponsor-Bannern!
    10. +
    11. Fremde {?mt_word3?} dürfen während der gesamten Startphase (bis 100 aktive Mitglieder) nicht mehr beworben werden und werden von uns abgelehnt!
    12. +
    +
    + + +
    diff --git a/templates/de/html/member/member_order_thanks.tpl b/templates/de/html/member/member_order_thanks.tpl new file mode 100644 index 0000000000..19785b6dd3 --- /dev/null +++ b/templates/de/html/member/member_order_thanks.tpl @@ -0,0 +1,15 @@ +
    +
    +
    + {--MEMBER_THANX_ORDER_TITLE--} +
    + +
    + {--MEMBER_THANX_ORDER--} +
    + +
    +
    +
    +
    diff --git a/templates/de/html/member/member_order_zip1.tpl b/templates/de/html/member/member_order_zip1.tpl new file mode 100644 index 0000000000..798516e4da --- /dev/null +++ b/templates/de/html/member/member_order_zip1.tpl @@ -0,0 +1,23 @@ +
    + Geben Sie hier die ersten ein bis drei Stellen der Postleitzahl ein, in der gesendet werden soll. +
    + +
    + Beispiele: +
      +
    • 1 : Sendet nur an Mitglieder, deren Postleitzahl mit 1 anfängt.
    • +
    • 12 : Sendet nur an Mitglieder, deren Postleitzahl mit 12 anfängt.
    • +
    • 123 : Sendet nur an Mitglieder, deren Postleitzahl mit 123 anfängt.
    • +
    +
    + +
    + Oder geben Sie nichts ein, wenn Sie diese Option nicht wünschen. +
    + +
    +
    + {--MEMBER_ENTER_ZIP_CODE--} + +
    +
    diff --git a/templates/de/html/member/member_order_zip2.tpl b/templates/de/html/member/member_order_zip2.tpl new file mode 100644 index 0000000000..48caccf2ce --- /dev/null +++ b/templates/de/html/member/member_order_zip2.tpl @@ -0,0 +1,4 @@ +
    + {--MEMBER_ENTER_ZIP_CODE--} + +
    diff --git a/templates/de/html/member/member_payout_form.tpl b/templates/de/html/member/member_payout_form.tpl index 749b14b03e..cbfdb38f9c 100644 --- a/templates/de/html/member/member_payout_form.tpl +++ b/templates/de/html/member/member_payout_form.tpl @@ -41,7 +41,7 @@ - + @@ -54,6 +54,6 @@
    diff --git a/templates/de/html/member/member_payout_form_banner.tpl b/templates/de/html/member/member_payout_form_banner.tpl index e65a662523..e5808f2a7f 100644 --- a/templates/de/html/member/member_payout_form_banner.tpl +++ b/templates/de/html/member/member_payout_form_banner.tpl @@ -41,7 +41,7 @@ - + diff --git a/templates/de/html/member/member_points.tpl b/templates/de/html/member/member_points.tpl index d342497ab2..ee6df86aad 100644 --- a/templates/de/html/member/member_points.tpl +++ b/templates/de/html/member/member_points.tpl @@ -21,7 +21,7 @@ {--POINTS_USED--} - -{%user,used_points,translateComma%} {?POINTS?} + -{%user,used_points,translateComma=$content[userid]%} {?POINTS?} - - diff --git a/templates/de/html/member/member_receive_table.tpl b/templates/de/html/member/member_receive_table.tpl index 71afe46129..a0c040d3c0 100644 --- a/templates/de/html/member/member_receive_table.tpl +++ b/templates/de/html/member/member_receive_table.tpl @@ -2,7 +2,7 @@
    - {--MAX_PER_DAY--}: + {--MAX_MAILS_PER_DAY--}:
    - {--TRANSFER_SELECT_TARGET_USERID--}: + {--MEMBER_SELECT_TRANSFER_TARGET_USERID--}: $content[userid_selection] @@ -11,7 +11,7 @@
    - {--TRANSFER_POINTS_MAXIMUM--}: + {--MEMBER_TRANSFER_POINTS_MAXIMUM--}: {%pipe,translateComma=$content[max_transferable]%} {?POINTS?} @@ -19,7 +19,7 @@
    - {--TRANSFER_POINTS_AMOUNT--}: + {--MEMBER_TRANSFER_POINTS_AMOUNT--}: {?POINTS?} @@ -27,7 +27,7 @@
    - {--TRANSFER_POINTS_REASON--}: + {--MEMBER_ENTER_TRANSFER_POINTS_REASON--}: @@ -35,7 +35,7 @@
    - {--TRANSFER_POINTS_SECURITY_CODE--}: + {--MEMBER_TRANSFER_POINTS_SECURITY_CODE--}: $content[captcha_code] @@ -43,7 +43,7 @@
    - {--TRANSFER_ENTER_PASSWORD--}: + {--MEMBER_ENTER_TRANSFER_PASSWORD--}: @@ -52,7 +52,7 @@
    diff --git a/templates/de/html/member/member_transfer_overview.tpl b/templates/de/html/member/member_transfer_overview.tpl index c3874e5166..ef6cc07471 100644 --- a/templates/de/html/member/member_transfer_overview.tpl +++ b/templates/de/html/member/member_transfer_overview.tpl @@ -2,11 +2,11 @@ @@ -18,7 +18,7 @@ diff --git a/templates/de/html/member/member_transfer_row.tpl b/templates/de/html/member/member_transfer_row.tpl index ea95d1cb0a..209b642cd5 100644 --- a/templates/de/html/member/member_transfer_row.tpl +++ b/templates/de/html/member/member_transfer_row.tpl @@ -1,17 +1,17 @@ - - - - - + + + + + diff --git a/templates/de/html/member/member_transfer_settings.tpl b/templates/de/html/member/member_transfer_settings.tpl index 7d583e19c1..95662a006c 100644 --- a/templates/de/html/member/member_transfer_settings.tpl +++ b/templates/de/html/member/member_transfer_settings.tpl @@ -2,7 +2,7 @@
    - {--TRANSFER_LIST_INCOMING--}:
    + {--MEMBER_LIST_INCOMING_TRANSFER_TITLE--}:
    $content[in_link]
    - {--TRANSFER_LIST_OUTGOING--}:
    + {--MEMBER_LIST_OUTGOING_TRANSFER_TITLE--}:
    $content[out_link]
    - {--TRANSFER_TO_MEMBER_NOW--}:
    + {--MEMBER_START_NEW_TRANSFER--}:
    $content[new_link]
    -
    $content[trans_id]
    -
    -
    $content[time_trans]
    -
    -
    $content[party_userid]
    -
    -
    $content[reason]
    -
    -
    {%pipe,translateComma=$content[points]%}
    -
    +
    $content[trans_id]
    +
    +
    $content[time_trans]
    +
    +
    $content[party_userid]
    +
    +
    $content[reason]
    +
    +
    {%pipe,translateComma=$content[points]%}
    +
    - {--TRANSFER_ALLOW_OPT_IN--} + {--MEMBER_ALLOW_TRANSFER_OPT_IN--} {--YES--}
    diff --git a/templates/de/html/member/member_unconfirmed_table.tpl b/templates/de/html/member/member_unconfirmed_table.tpl index 63bd7e0e65..f42860088f 100644 --- a/templates/de/html/member/member_unconfirmed_table.tpl +++ b/templates/de/html/member/member_unconfirmed_table.tpl @@ -1,3 +1,4 @@ +
    @@ -16,3 +17,4 @@ $content[rows]
    {--CONFIRM_LINK2--}:
    +
    diff --git a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl index 10c0fbca38..99d3641819 100644 --- a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl @@ -1,3 +1,4 @@ +
    @@ -13,3 +14,4 @@ $content[rows]
    {--CONFIRM_LINK2--}:
    +
    diff --git a/templates/de/html/member/member_welcome_header.tpl b/templates/de/html/member/member_welcome_header.tpl index 5e96622859..1fabb96ce7 100644 --- a/templates/de/html/member/member_welcome_header.tpl +++ b/templates/de/html/member/member_welcome_header.tpl @@ -1,6 +1,6 @@
    - {--LAST_ONLINE--}: $content[last_online]
    - {--LAST_MODULE--}: $content[last_module] + {--MEMBER_LAST_ONLINE--}: $content[last_online]
    + {--MEMBER_LAST_WHAT--}: $content[last_what]
    diff --git a/templates/de/html/page_header.tpl b/templates/de/html/page_header.tpl index f4424ef386..de66eba94f 100644 --- a/templates/de/html/page_header.tpl +++ b/templates/de/html/page_header.tpl @@ -8,4 +8,5 @@ + diff --git a/templates/de/html/redirect_url.tpl b/templates/de/html/redirect_url.tpl index 5098b72395..199263f292 100644 --- a/templates/de/html/redirect_url.tpl +++ b/templates/de/html/redirect_url.tpl @@ -2,7 +2,7 @@ $content - + diff --git a/templates/de/html/surfbar/surfbar_login_form.tpl b/templates/de/html/surfbar/surfbar_login_form.tpl index 6793c5cbe7..84b3d429cf 100644 --- a/templates/de/html/surfbar/surfbar_login_form.tpl +++ b/templates/de/html/surfbar/surfbar_login_form.tpl @@ -19,7 +19,7 @@
    diff --git a/templates/xml/admin/admin_add_do_forced_ads.xml b/templates/xml/admin/admin_add_do_forced_ads.xml index b880f6329a..b3423ce422 100644 --- a/templates/xml/admin/admin_add_do_forced_ads.xml +++ b/templates/xml/admin/admin_add_do_forced_ads.xml @@ -5,7 +5,7 @@ This template provides meta data for adding forced-ads to the database. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -42,13 +42,13 @@ MA 02110-1301 USA And all column names to read/write, leave this list tag empty for all (*). //--> - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_add_do_forced_costs.xml b/templates/xml/admin/admin_add_do_forced_costs.xml new file mode 100644 index 0000000000..29c6335f44 --- /dev/null +++ b/templates/xml/admin/admin_add_do_forced_costs.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_delete_do_forced_ads.xml b/templates/xml/admin/admin_delete_do_forced_ads.xml new file mode 100644 index 0000000000..2895d49fd3 --- /dev/null +++ b/templates/xml/admin/admin_delete_do_forced_ads.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_delete_do_forced_costs.xml b/templates/xml/admin/admin_delete_do_forced_costs.xml new file mode 100644 index 0000000000..a47f72010a --- /dev/null +++ b/templates/xml/admin/admin_delete_do_forced_costs.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_delete_do_surfbar_urls.xml b/templates/xml/admin/admin_delete_do_surfbar_urls.xml index 9e0e1278dc..d9f7918a1f 100644 --- a/templates/xml/admin/admin_delete_do_surfbar_urls.xml +++ b/templates/xml/admin/admin_delete_do_surfbar_urls.xml @@ -6,7 +6,7 @@ the admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -76,4 +76,8 @@ MA 02110-1301 USA This' type can again only be 'string' (remember why?). //--> + + diff --git a/templates/xml/admin/admin_delete_show_forced_ads.xml b/templates/xml/admin/admin_delete_show_forced_ads.xml new file mode 100644 index 0000000000..b81695d2f5 --- /dev/null +++ b/templates/xml/admin/admin_delete_show_forced_ads.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_delete_show_forced_costs.xml b/templates/xml/admin/admin_delete_show_forced_costs.xml new file mode 100644 index 0000000000..56dd0ac971 --- /dev/null +++ b/templates/xml/admin/admin_delete_show_forced_costs.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_delete_show_surfbar_urls.xml b/templates/xml/admin/admin_delete_show_surfbar_urls.xml index b7cba9d2ca..6a035fb0a0 100644 --- a/templates/xml/admin/admin_delete_show_surfbar_urls.xml +++ b/templates/xml/admin/admin_delete_show_surfbar_urls.xml @@ -6,7 +6,7 @@ area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -47,10 +47,10 @@ MA 02110-1301 USA A column name list entry. The type is always string, or do you have numerical column names? //--> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_do_forced_costs.xml b/templates/xml/admin/admin_edit_do_forced_costs.xml new file mode 100644 index 0000000000..950ff33436 --- /dev/null +++ b/templates/xml/admin/admin_edit_do_forced_costs.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_do_point_accounts.xml b/templates/xml/admin/admin_edit_do_point_accounts.xml new file mode 100644 index 0000000000..f0280cfa99 --- /dev/null +++ b/templates/xml/admin/admin_edit_do_point_accounts.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_do_surfbar_urls.xml b/templates/xml/admin/admin_edit_do_surfbar_urls.xml index 7b28a420f4..584d9e0a1e 100644 --- a/templates/xml/admin/admin_edit_do_surfbar_urls.xml +++ b/templates/xml/admin/admin_edit_do_surfbar_urls.xml @@ -6,7 +6,7 @@ area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -58,6 +58,11 @@ MA 02110-1301 USA + + + @@ -75,5 +80,9 @@ MA 02110-1301 USA Raw userid column ($key) to skip which is always an invalid (?) entry This' type can again only be 'string' (remember why?). //--> - + + + diff --git a/templates/xml/admin/admin_edit_show_forced_ads.xml b/templates/xml/admin/admin_edit_show_forced_ads.xml index 5a8c17aa4d..060badac53 100644 --- a/templates/xml/admin/admin_edit_show_forced_ads.xml +++ b/templates/xml/admin/admin_edit_show_forced_ads.xml @@ -5,7 +5,7 @@ This template provides meta data for editing forced ads. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -77,10 +77,6 @@ MA 02110-1301 USA call-back function. See function handleExtraValues() for details. //--> - - @@ -90,7 +86,7 @@ MA 02110-1301 USA //--> @@ -112,7 +108,7 @@ MA 02110-1301 USA //--> @@ -120,6 +116,11 @@ MA 02110-1301 USA + + + diff --git a/templates/xml/admin/admin_edit_show_forced_campaigns.xml b/templates/xml/admin/admin_edit_show_forced_campaigns.xml new file mode 100644 index 0000000000..e8797e360e --- /dev/null +++ b/templates/xml/admin/admin_edit_show_forced_campaigns.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_show_forced_costs.xml b/templates/xml/admin/admin_edit_show_forced_costs.xml new file mode 100644 index 0000000000..7f41209db3 --- /dev/null +++ b/templates/xml/admin/admin_edit_show_forced_costs.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_show_point_accounts.xml b/templates/xml/admin/admin_edit_show_point_accounts.xml new file mode 100644 index 0000000000..79a4f65e72 --- /dev/null +++ b/templates/xml/admin/admin_edit_show_point_accounts.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_show_surfbar_actions.xml b/templates/xml/admin/admin_edit_show_surfbar_actions.xml new file mode 100644 index 0000000000..a0fc8f93f5 --- /dev/null +++ b/templates/xml/admin/admin_edit_show_surfbar_actions.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_edit_show_surfbar_urls.xml b/templates/xml/admin/admin_edit_show_surfbar_urls.xml index 553e9c4c32..e9465a0202 100644 --- a/templates/xml/admin/admin_edit_show_surfbar_urls.xml +++ b/templates/xml/admin/admin_edit_show_surfbar_urls.xml @@ -6,7 +6,7 @@ area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -61,7 +61,6 @@ MA 02110-1301 USA //--> - + + + diff --git a/templates/xml/admin/admin_list_forced_ads.xml b/templates/xml/admin/admin_list_forced_ads.xml index af04ae650a..8f22414a5a 100644 --- a/templates/xml/admin/admin_list_forced_ads.xml +++ b/templates/xml/admin/admin_list_forced_ads.xml @@ -5,7 +5,7 @@ This template provides meta data for listing Forced-Ads. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org diff --git a/templates/xml/admin/admin_list_forced_campaigns.xml b/templates/xml/admin/admin_list_forced_campaigns.xml index bc53245a62..5695045ca2 100644 --- a/templates/xml/admin/admin_list_forced_campaigns.xml +++ b/templates/xml/admin/admin_list_forced_campaigns.xml @@ -5,7 +5,7 @@ This template provides meta data for listing forced compains. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org diff --git a/templates/xml/admin/admin_list_forced_costs.xml b/templates/xml/admin/admin_list_forced_costs.xml index ea4d59a308..fc557e2d9c 100644 --- a/templates/xml/admin/admin_list_forced_costs.xml +++ b/templates/xml/admin/admin_list_forced_costs.xml @@ -5,7 +5,7 @@ This template provides meta data for listing forced costs. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org diff --git a/templates/xml/admin/admin_list_nickname_history.xml b/templates/xml/admin/admin_list_nickname_history.xml new file mode 100644 index 0000000000..8c263407bb --- /dev/null +++ b/templates/xml/admin/admin_list_nickname_history.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_list_point_accounts.xml b/templates/xml/admin/admin_list_point_accounts.xml new file mode 100644 index 0000000000..7a5cfe18e1 --- /dev/null +++ b/templates/xml/admin/admin_list_point_accounts.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/xml/admin/admin_list_surfbar_actions.xml b/templates/xml/admin/admin_list_surfbar_actions.xml index b15cbcd618..9e5bd7615b 100644 --- a/templates/xml/admin/admin_list_surfbar_actions.xml +++ b/templates/xml/admin/admin_list_surfbar_actions.xml @@ -6,7 +6,7 @@ admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org diff --git a/templates/xml/admin/admin_list_surfbar_urls.xml b/templates/xml/admin/admin_list_surfbar_urls.xml index 2174689b42..e9f20a0640 100644 --- a/templates/xml/admin/admin_list_surfbar_urls.xml +++ b/templates/xml/admin/admin_list_surfbar_urls.xml @@ -6,7 +6,7 @@ area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org diff --git a/templates/xml/admin/admin_lock_do_surfbar_urls.xml b/templates/xml/admin/admin_lock_do_surfbar_urls.xml index b150957581..f970ff0ab8 100644 --- a/templates/xml/admin/admin_lock_do_surfbar_urls.xml +++ b/templates/xml/admin/admin_lock_do_surfbar_urls.xml @@ -6,7 +6,7 @@ in the admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -88,4 +88,8 @@ MA 02110-1301 USA This' type can again only be 'string' (remember why?). //--> + + diff --git a/templates/xml/admin/admin_lock_show_surfbar_urls.xml b/templates/xml/admin/admin_lock_show_surfbar_urls.xml index dbe15dbb99..ae28d18b0a 100644 --- a/templates/xml/admin/admin_lock_show_surfbar_urls.xml +++ b/templates/xml/admin/admin_lock_show_surfbar_urls.xml @@ -6,7 +6,7 @@ admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -47,11 +47,11 @@ MA 02110-1301 USA A column name list entry. The type is always string, or do you have numerical column names? //--> - - - - - + + + + + + + diff --git a/templates/xml/admin/admin_undelete_do_surfbar_urls.xml b/templates/xml/admin/admin_undelete_do_surfbar_urls.xml index a512d002c8..0420548067 100644 --- a/templates/xml/admin/admin_undelete_do_surfbar_urls.xml +++ b/templates/xml/admin/admin_undelete_do_surfbar_urls.xml @@ -6,7 +6,7 @@ the admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -86,4 +86,8 @@ MA 02110-1301 USA This' type can again only be 'string' (remember why?). //--> + + diff --git a/templates/xml/admin/admin_undelete_show_surfbar_urls.xml b/templates/xml/admin/admin_undelete_show_surfbar_urls.xml index c560d11331..bcc63c2084 100644 --- a/templates/xml/admin/admin_undelete_show_surfbar_urls.xml +++ b/templates/xml/admin/admin_undelete_show_surfbar_urls.xml @@ -6,7 +6,7 @@ admin area. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -47,11 +47,11 @@ MA 02110-1301 USA A column name list entry. The type is always string, or do you have numerical column names? //--> - - - - - + + + + + + + diff --git a/templates/xml/admin_list_data_template.xml b/templates/xml/admin_list_data_template.xml index fa6084450b..6decdeeade 100644 --- a/templates/xml/admin_list_data_template.xml +++ b/templates/xml/admin_list_data_template.xml @@ -6,7 +6,7 @@ of it is not yet implemented (e.g. the table join part). @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -17,13 +17,13 @@ the Free Software Foundation; either version 2 of the License, or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -MA 02110-1301 USA +MA 02110-1301 USA //--> - - @@ -180,4 +176,8 @@ MA 02110-1301 USA + + diff --git a/templates/xml/template.xml b/templates/xml/template.xml index 378ccd7558..7690902d70 100644 --- a/templates/xml/template.xml +++ b/templates/xml/template.xml @@ -7,7 +7,7 @@ author tag intact. @author Roland Haeder @version 0.2.1-FINAL @copyright (c) 2003 - 2009 by Roland Haeder -@copyright (c) 2009 - 2011 by Mailer Developer Team +@copyright (c) 2009 - 2012 by Mailer Developer Team @license GNU GPL 2.0 or any newer version @link http://mxchange.org @@ -18,11 +18,11 @@ the Free Software Foundation; either version 2 of the License, or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -MA 02110-1301 USA +MA 02110-1301 USA //--> diff --git a/theme/business/css/ajax.css b/theme/business/css/ajax.css new file mode 100644 index 0000000000..d3ef0d5f6f --- /dev/null +++ b/theme/business/css/ajax.css @@ -0,0 +1,155 @@ +ul#footernav { + list-style-type: none; + margin: 0px; + padding: 5px; + background-color: #eeeeff; + border: 1px solid #000000; + height: 23px; + width: 680px; + text-align: right; +} + +ul#footernav li { + float: right; + margin: 2px 2px 2px 4px; +} + +ul#tabnav { + list-style-type: none; + margin: 0px; + padding-left: 30px; + padding-bottom: 24px; + z-index: 0; +} + +ul#tabnav li { + float: left; + height: 21px; + background-color: #eeeeff; + margin: 2px 2px 0px 2px; + border-top: 1px solid #000000; + border-left: 1px solid #000000; + border-right: 1px solid #000000; + z-index: 1; +} + +ul#tabnav a { + z-index: 1; +} + +ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited { + display: block; + color: #2e51a9; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited { + display: block; + color: #e0e0e0; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active { + background-color: #ddddee; + color: #0a2d85; +} + +ul#tabnav a:hover { + padding: 4px 4px 3px 4px; + border-bottom: 1px solid #000000; +} + +ul#tabnav li.tab_active { + padding-bottom: 0px; + border-bottom: 0px none; +} + +.tabnav_disabled, .tabnav_disabled:visited { + cursor: default; + height: 7px; + background-color: #aaaaaa; + color: #e0e0e0; +} + +.ajax_error, .ajax_warning { + z-index: 200; + min-height: 10px; + overflow: visible; + padding: 5px; + display: none; + position: absolute; + top: 100px; + left: 26%; +} + +.ajax_error { + background-color: #990000; +} + +.ajax_warning { + background-color: #999900; +} + +.ajax_error_title, .ajax_warning_title { + border: 1px solid #ffffff; + padding: 3px; + color: #ffffff; + float: left; + width: 461px; +} + +.ajax_error_title { + background-color: #bb0000; +} + +.ajax_warning_title { + background-color: #bbbb00; +} + +.ajax_error_close, .ajax_warning_close { + border: 1px solid #ffffff; + float: right; + width: 10px; + z-index: 200; + min-height: 10x; + margin-left: 5px; + padding: 3px; + color: #ffffff; + text-align: center; +} + +.ajax_error_close { + background-color: #bb0000; +} + +.ajax_warning_close { + background-color: #bbbb00; +} + +.ajax_error_content, .ajax_warning_content { + width: 470px; + border: 1px solid #ffffff; + margin-top: 5px; + color: #ffffff; + padding: 10px; +} + +.field_changed { + border: 5px groove #bbbb00; +} + +.field_changed:hover { + border: 5px groove #ffff00; +} + +.field_failed { + border: 5px groove #bb0000; +} + +.field_failed:hover { + border: 5px groove #ff0000; +} diff --git a/theme/business/css/general.css b/theme/business/css/general.css index 550b43a1cc..73f794f668 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -41,12 +41,33 @@ A:hover { input, textarea, select, option { color: #000000; - background-color: #ffffff; border: 1px solid #000000; text-decoration: none; } -ul,ol { +fieldset { + border: 1px solid #000000; + margin-top: 10px; + padding: 10px; +} + +fieldset:hover, input:hover, select:hover, option:hover, textarea:hover { + border-color: #000080; +} + +input:hover, select:hover, option:hover, textarea:hover { + color: #000080; +} + +legend { + font-weight: bold; + color: #000000; + background-color: transparent; + padding-left: 5px; + padding-right: 5px; +} + +ul, ol { margin-top: 0px; margin-bottom: 0px; } @@ -168,6 +189,15 @@ a.logout_box { margin: 5px; } +.bug_table { + background-color: #ffffff; + margin: 0px; + max-width: 100%; + min-width: 400px; + overflow: auto + color: #000000; +} + .form_submitmenu { min-width: 500px; max-width: 90%; @@ -187,11 +217,6 @@ a.logout_box { height: 20px; } -.form_field { - border: solid 1px #000000; - background-color: #eeeeff; -} - .admin_alpha { text-align: center; height: 40px; @@ -212,7 +237,7 @@ a.logout_box { background-color: #ffffff; } -.table_header { +.table_header, .bug_table_header { text-align: center; color: #000000; vertical-align: middle; @@ -494,6 +519,11 @@ ul.copyright_box { color: #ffffff; } +.disabled:hover { + background-color: #aaaaaa; + color: #ffffff; +} + .mini_select { border: solid 1px #000000; background-color: #eeeeff; @@ -546,11 +576,11 @@ ul.show_timings_block { background-color: #ffffff; margin-top: 2px; width: 150px; - border: solid 1px #000000; height: 14px; } span.show_timings_column { + border: solid 1px #000000; display: inline-block; } @@ -650,3 +680,29 @@ li.listing { .good { color: #00aa00; } + +.table_row { + text-align: left; + clear: both; + margin: 0px; + padding: 0px; + padding-top: 5px; + padding-bottom: 5px; + height: 28px; +} + +.table_row label { + float: left; + width: 45%; +} + +.form_field { + border: solid 1px #000000; + background-color: #eeeeff; +} + +.field_note { + float: left; + text-align: left; + font-style: italic; +} diff --git a/theme/business/css/install.css b/theme/business/css/install.css index 6d5ecf411c..0489443edc 100644 --- a/theme/business/css/install.css +++ b/theme/business/css/install.css @@ -1,23 +1,38 @@ -.install_main { - color: #000000; - background-color: #FFFFFF; +.install_content { + background-color: #ffffff; text-decoration: none; + border: 1px solid #000000; + padding: 5px; + width: 670px; + z-index: 20; +} + +.install_main_ajax { + padding-bottom: 6px; } .install_header { color: #000000; - background-color: #EEEEFF; + background-color: #eeeeff; font-size: 20px; text-decoration: underline; height: 30px; - vertical-align: middle; padding-top: 5px; padding-bottom: 5px; + margin-bottom: 5px; } .install_fatalcontent { text-align: left; - background-color: #FFFFFF; + background-color: #ffffff; +} + +.install_title { + padding-top: 5px; + padding-bottom: 10px; + font-size: 16px; + font-weight: bold; + color: #000000; } .install_error, .install_finished { @@ -31,7 +46,31 @@ padding-bottom: 10px; } +.install_footer { + padding-bottom: 10px; +} + .install_right { text-align: right; padding-right: 5px; } + +.install_menu_ajax { + width: 700px; +} + +.install_content_container { + height: 420px; + width: 700px; + z-index: 10; + overflow: hidden; + padding-bottom: 10px; +} + +.install_tab { +} + +.table_row label.install_label { + float: left; + width: 30%; +} diff --git a/theme/business/theme.php b/theme/business/theme.php index 52ebcf76d7..4241199fd5 100644 --- a/theme/business/theme.php +++ b/theme/business/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/theme/default/css/ajax.css b/theme/default/css/ajax.css new file mode 100644 index 0000000000..59ed0a535d --- /dev/null +++ b/theme/default/css/ajax.css @@ -0,0 +1,158 @@ +ul#footernav { + list-style-type: none; + margin: 0px; + padding: 5px; + background-color: #ddeedd; + border: 1px solid #009900; + height: 23px; + width: 680px; + text-align: right; +} + +ul#footernav li { + float: right; + margin: 2px 2px 2px 4px; +} + +ul#tabnav { + list-style-type: none; + margin: 0px; + padding-left: 30px; + padding-bottom: 24px; + z-index: 0; +} + +ul#tabnav li { + float: left; + height: 21px; + background-color: #ddeedd; + margin: 2px 2px 0px 2px; + border-top: 1px solid #009900; + border-left: 1px solid #009900; + border-right: 1px solid #009900; + z-index: 1; +} + +ul#tabnav a { + z-index: 1; +} + +ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited { + display: block; + color: #2e51a9; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited { + display: block; + color: #e0e0e0; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active { + background-color: #ccddcc; + color: #000099; +} + +ul#tabnav a:hover { + padding: 4px 4px 3px 4px; + border-bottom: 1px solid #000099; +} + +ul#tabnav li.tab_active { + padding-bottom: 0px; + border-bottom: 0px none; +} + +.tabnav_disabled, .tabnav_disabled:visited { + cursor: default; + height: 7px; + background-color: #aaaaaa; + color: #e0e0e0; +} + +.ajax_error, .ajax_warning { + z-index: 200; + min-height: 10px; + overflow: visible; + padding: 5px; + display: none; + position: absolute; + top: 100px; + left: 26%; +} + +.ajax_error { + background-color: #990000; +} + +.ajax_warning { + background-color: #999900; +} + +.ajax_error_title, .ajax_warning_title { + border: 1px solid #ffffff; + padding: 3px; + color: #ffffff; + float: left; + width: 461px; +} + +.ajax_error_title { + background-color: #bb0000; +} + +.ajax_warning_title { + background-color: #bbbb00; +} + +.ajax_error_close, .ajax_warning_close { + border: 1px solid #ffffff; + float: right; + width: 10px; + z-index: 200; + min-height: 10x; + margin-left: 5px; + padding: 3px; + color: #ffffff; + text-align: center; +} + +.ajax_error_close { + background-color: #bb0000; +} + +.ajax_warning_close { + background-color: #bbbb00; +} + +.ajax_error_message { +} + +.ajax_error_content, .ajax_warning_content { + width: 470px; + border: 1px solid #ffffff; + margin-top: 5px; + color: #ffffff; + padding: 10px; +} + +.field_changed { + border: 5px groove #bbbb00; +} + +.field_changed:hover { + border: 5px groove #ffff00; +} + +.field_failed { + border: 5px groove #bb0000; +} + +.field_failed:hover { + border: 5px groove #ff0000; +} diff --git a/theme/default/css/general.css b/theme/default/css/general.css index 84a430d2f3..37da3a0016 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -4,14 +4,7 @@ body { font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; font-size: 12px; letter-spacing: 1px; - scrollbar-base-color: #E9E4AE; - scrollbar-face-color: #CDEFCD; - scrollbar-highlight-color: #eeffee; - scrollbar-shadow-color: #CDEFCD; - scrollbar-3dlight-color: #dddddd; - scrollbar-arrow-color: #000000; - scrollbar-track-color: #ccEFcc; - scrollbar-darkshadow-color: #999999; + margin: 0px; margin-left: 0px; margin-right: 0px; @@ -61,9 +54,27 @@ select, option { text-decoration: none; } +fieldset { + border: 1px solid #009900; + margin-top: 10px; + padding: 10px; +} + +legend { + font-weight: bold; + color: #009900; + background-color: transparent; + padding-left: 5px; + padding-right: 5px; +} + input:hover, textarea:hover { border-color: #00dd44; - color: #007700; + color: #006600; +} + +fieldset:hover { + border-color: #00dd44; } input.form_delete:hover { @@ -97,6 +108,7 @@ pre { color: #00aa44; border-color: #009900; cursor: pointer; + background-color: #eeffee; } .form_delete { @@ -124,10 +136,6 @@ pre { font-size: 12px; } -.form_submit { - background-color: #eeffee; -} - .banner { background-color: #eeffee; width: 488px; @@ -140,8 +148,6 @@ pre { } .form_select { - border: groove 1px #009900; - background-color: #eeffee; } .description_header, .message { @@ -200,6 +206,15 @@ a.logout_box { margin: 5px; } +.bug_table { + background-color: #eeffee; + margin: 0px; + max-width: 100%; + min-width: 400px; + overflow: auto + color: #000000; +} + .form_submitmenu { min-width: 500px; max-width: 90%; @@ -219,10 +234,6 @@ a.logout_box { height: 20px; } -.form_field { - border: groove 1px #009900; -} - .normal { border-style: groove; } @@ -231,7 +242,7 @@ a.logout_box { background-color: #ddeedd; } -.table_header { +.table_header, .bug_table_header { text-align: center; color: #009900; vertical-align: middle; @@ -531,7 +542,13 @@ ul.copyright_box { .disabled { border-style: groove; background-color: #aaaaaa; - color: #ff9900; + color: #e0e0e0; + cursor: default; +} + +.disabled:hover { + background-color: #aaaaaa; + color: #e0e0e0; } .mini_select { @@ -583,13 +600,13 @@ ul.show_timings_block { background-color: #eeffee; margin-top: 2px; width: 150px; - border: solid 1px #009900; height: 14px; font-size: 10px; } span.show_timings_column { display: inline-block; + border: solid 1px #009900; } li.show_timings_column { @@ -696,3 +713,28 @@ li.listing { .good { color: #00aa00; } + +.table_row { + text-align: left; + clear: both; + margin: 0px; + padding: 0px; + padding-top: 5px; + padding-bottom: 5px; + height: 28px; +} + +.table_row label { + float: left; + width: 45%; +} + +.form_field { + border: groove 1px #009900; +} + +.field_note { + float: left; + text-align: left; + font-style: italic; +} diff --git a/theme/default/css/install.css b/theme/default/css/install.css index c0d492e67f..658e41172d 100644 --- a/theme/default/css/install.css +++ b/theme/default/css/install.css @@ -1,31 +1,40 @@ -.install_main { - background-color: #DDEEDD; +.install_content { + background-color: #ddeedd; text-decoration: none; + border: 1px solid #009900; + padding: 5px; + width: 670px; + z-index: 20; +} + +.install_main_ajax { + padding-bottom: 6px; } .install_header { color: #009900; - background-color: #CCDDCC; + background-color: #ddeedd; font-size: 20px; text-decoration: underline; height: 30px; padding-top: 5px; padding-bottom: 5px; + margin-bottom: 5px; } .install_fatalcontent { text-align: left; - background-color: #DDEEDD; + background-color: #ddeedd; } .install_error { font-size: 20px; - color: #AA0000; + color: #aa0000; } .install_finished { font-size: 20px; - color: #00AA00; + color: #00aa00; } .install_welcome { @@ -34,6 +43,14 @@ font-size: 16px; } +.install_title { + padding-top: 5px; + padding-bottom: 10px; + font-size: 16px; + font-weight: bold; + color: #009900; +} + .install_footer { padding-bottom: 10px; } @@ -43,8 +60,22 @@ padding-right: 5px; } -.install_menu { +.install_menu_ajax { + width: 700px; +} + +.install_content_container { + height: 420px; + width: 700px; + z-index: 10; + overflow: hidden; + padding-bottom: 10px; +} + +.install_tab { +} + +.table_row label.install_label { float: left; - width: 120px; - border: 1px solid #ff0000; + width: 30%; } diff --git a/theme/default/theme.php b/theme/default/theme.php index 332bd6a3fb..5d99efc875 100644 --- a/theme/default/theme.php +++ b/theme/default/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/theme/desert/css/ajax.css b/theme/desert/css/ajax.css new file mode 100644 index 0000000000..8676896827 --- /dev/null +++ b/theme/desert/css/ajax.css @@ -0,0 +1,157 @@ +ul#footernav { + list-style-type: none; + margin: 0px; + padding: 5px; + background-color: #ffffcc; + border: 1px solid #880000; + height: 23px; + width: 680px; + text-align: right; +} + +ul#footernav li { + float: right; + margin: 2px 2px 2px 4px; +} + +ul#tabnav { + list-style-type: none; + margin: 0px; + padding-left: 30px; + padding-bottom: 24px; + z-index: 0; +} + +ul#tabnav li { + float: left; + height: 21px; + background-color: #ffffcc; + margin: 2px 2px 0px 2px; + border-top: 1px solid #880000; + border-left: 1px solid #880000; + border-right: 1px solid #880000; + z-index: 1; +} + +ul#tabnav a { + z-index: 1; +} + +ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited { + display: block; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited { + display: block; + color: #e0e0e0; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active { + background-color: #cccc99; + color: #550000; +} + +ul#tabnav a:hover { + padding: 4px 4px 3px 4px; + border-bottom: 1px solid #880000; +} + +ul#tabnav li.tab_active { + padding-bottom: 0px; + border-bottom: 0px none; +} + +.tabnav_disabled, .tabnav_disabled:visited { + cursor: default; + height: 7px; + background-color: #aaaaaa; + color: #e0e0e0; +} + +.ajax_error, .ajax_warning { + z-index: 200; + min-height: 10px; + overflow: visible; + padding: 5px; + display: none; + position: absolute; + top: 100px; + left: 26%; +} + +.ajax_error { + background-color: #990000; +} + +.ajax_warning { + background-color: #999900; +} + +.ajax_error_title, .ajax_warning_title { + border: 1px solid #ffffff; + padding: 3px; + color: #ffffff; + float: left; + width: 461px; +} + +.ajax_error_title { + background-color: #bb0000; +} + +.ajax_warning_title { + background-color: #bbbb00; +} + +.ajax_error_close, .ajax_warning_close { + border: 1px solid #ffffff; + float: right; + width: 10px; + z-index: 200; + min-height: 10x; + margin-left: 5px; + padding: 3px; + color: #ffffff; + text-align: center; +} + +.ajax_error_close { + background-color: #bb0000; +} + +.ajax_warning_close { + background-color: #bbbb00; +} + +.ajax_error_message { +} + +.ajax_error_content, .ajax_warning_content { + width: 470px; + border: 1px solid #ffffff; + margin-top: 5px; + color: #ffffff; + padding: 10px; +} + +.field_changed { + border: 5px groove #bbbb00; +} + +.field_changed:hover { + border: 5px groove #ffff00; +} + +.field_failed { + border: 5px groove #bb0000; +} + +.field_failed:hover { + border: 5px groove #ff0000; +} diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index 7ec4218f5a..1e30da0d3f 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -39,13 +39,28 @@ A:hover { background-color: transparent; } -input,textarea,select,option { +input, textarea, select, option { color: #880000; - background-color: #ffffcc; + background-color: #eeeebb; border: 1px solid #880000; text-decoration: none; } +fieldset { + border: 1px solid #880000; + margin-top: 10px; + padding: 10px; +} + +fieldset:hover, input:hover, select:hover, option:hover, textarea:hover { + border-color: #550000; +} + +input:hover, select:hover, option:hover, textarea:hover { + background-color: #cccc99; + color: #550000; +} + ul,ol { margin-top: 0px; margin-bottom: 0px; @@ -57,22 +72,7 @@ pre { padding: 5px; } -.form_reset { - border: groove 1px #880000; - color: #880000; - cursor: pointer; -} - -.form_submit { - color: #880000; - border-color: #880000; - cursor: pointer; -} - -.form_delete { - border-style: groove; - color: #880000; - border-color: #880000; +.form_reset, .form_submit, .form_delete { cursor: pointer; } @@ -94,7 +94,7 @@ pre { } .form_submit { - background-color: #ffffcc; + background-color: #eeeebb; } .banner { @@ -110,17 +110,17 @@ pre { .form_select { border: solid 1px #880000; - background-color: #ddddaa; + background-color: #eeeebb; } .description_header, .message { - background-color: #ddddaa; + background-color: #cccc99; color: #880000; text-align: center; } .admin_menu { - background-color: #ddddaa; + background-color: #cccc99; color: #880000; width: 230px; height: 25px; @@ -169,6 +169,15 @@ a.logout_box { margin: 5px; } +.bug_table { + background-color: #ffffcc; + margin: 0px; + max-width: 100%; + min-width: 400px; + overflow: auto + color: #880000; +} + .form_submitmenu { min-width: 500px; max-width: 90%; @@ -178,7 +187,7 @@ a.logout_box { text-align: center; color: #880000; vertical-align: middle; - background-color: #ddddaa; + background-color: #cccc99; height: 60px; } @@ -188,11 +197,6 @@ a.logout_box { height: 20px; } -.form_field { - border: solid 1px #880000; - background-color: #ddddaa; -} - .normal { border-style: groove; } @@ -201,11 +205,11 @@ a.logout_box { background-color: #ffffcc; } -.table_header { +.table_header, .bug_table_header { text-align: center; color: #880000; vertical-align: middle; - background-color: #ddddaa; + background-color: #cccc99; padding-bottom: 5px; padding-top: 5px; } @@ -213,7 +217,7 @@ a.logout_box { .guest_login_header { color: #880000; vertical-align: middle; - background-color: #ddddaa; + background-color: #cccc99; } .guest_menu, .member_menu { @@ -223,7 +227,7 @@ a.logout_box { } .guest_menu_title, .member_menu_title { - background-color: #ddddaa; + background-color: #cccc99; color: #880000; height: 25px; width: 200px; @@ -310,7 +314,7 @@ ul.copyright_box { } .media_header { - background-color: #ddddaa; + background-color: #cccc99; text-align: center; color: #880000; height: 26px; @@ -331,27 +335,27 @@ ul.copyright_box { } .admin_sep_footer { - background-color: #ddddaa; + background-color: #cccc99; font-size: 1px; } .admin_sep_footer2 { - background-color: #ddddaa; + background-color: #cccc99; font-size: 1px; } .member_refbanner, .member_update, .admin_delete_link { - background-color: #ddddaa; + background-color: #cccc99; } .table_footer { - background-color: #ddddaa; + background-color: #cccc99; text-align: center; padding: 5px; } .admin_task_header { - background-color: #ddddaa; + background-color: #cccc99; color: #880000; vertical-align: middle; font-size: 18px; @@ -462,7 +466,7 @@ ul.copyright_box { } .menu_blur:hover { - background-color: #ddddaa; + background-color: #cccc99; } .admin_alpha { @@ -481,11 +485,17 @@ ul.copyright_box { border-style: groove; background-color: #aaaaaa; color: #ffffcc; + cursor: default; +} + +.disabled:hover { + background-color: #aaaaaa; + color: #ffffcc; } .mini_select { border: solid 1px #880000; - background-color: #ddddaa; + background-color: #cccc99; font-size: 10px; } @@ -520,7 +530,7 @@ ul.copyright_box { ul.show_timings_block { border: solid 1px #880000; - background-color: #ddddaa; + background-color: #cccc99; font-size: 10px; width: 645px; height: 20px; @@ -531,11 +541,11 @@ ul.show_timings_block { background-color: #ffffcc; margin-top: 2px; width: 150px; - border: solid 1px #880000; height: 14px; } span.show_timings_column { + border: solid 1px #880000; display: inline-block; } @@ -550,7 +560,7 @@ span.show_timings_data { .login_failure_header { text-align: center; - background-color: #ddddaa; + background-color: #cccc99; font-weight: bold; } @@ -636,3 +646,29 @@ li.listing { .good { color: #00aa00; } + +.table_row { + text-align: left; + clear: both; + margin: 0px; + padding: 0px; + padding-top: 5px; + padding-bottom: 5px; + height: 28px; +} + +.table_row label { + float: left; + width: 45%; +} + +.form_field { + border: solid 1px #880000; + background-color: #eeeebb; +} + +.field_note { + float: left; + text-align: left; + font-style: italic; +} diff --git a/theme/desert/css/install.css b/theme/desert/css/install.css index 641b6bfe6c..81c4b5f98c 100644 --- a/theme/desert/css/install.css +++ b/theme/desert/css/install.css @@ -1,33 +1,42 @@ -.install_main { +.install_content { color: #880000; - background-color: #FFFFCC; + background-color: #ffffcc; text-decoration: none; + border: 1px solid #880000; + padding: 5px; + width: 670px; + z-index: 20; +} + +.install_main_ajax { + padding-bottom: 6px; } .install_header { color: #880000; - background-color: #DDDDAA; - width: 400px; + background-color: #cccc99; height: 30px; font-size: 20px; text-decoration: underline; padding-top: 5px; padding-bottom: 5px; + margin-bottom: 5px; } -.install_fatalcontent { - text-align: left; - background-color: #FFFFCC; +.install_error { + font-size: 20px; + color: #aa0000; } -.install_error, .install_finished { - font-size: 20px; +.install_title { + padding-top: 5px; + padding-bottom: 10px; + font-size: 16px; + font-weight: bold; color: #880000; } -.install_welcome { - color: #880000; - padding-top: 5px; +.install_footer { padding-bottom: 10px; } @@ -35,3 +44,23 @@ text-align: right; padding-right: 5px; } + +.install_menu_ajax { + width: 700px; +} + +.install_content_container { + height: 420px; + width: 700px; + z-index: 10; + overflow: hidden; + padding-bottom: 10px; +} + +.install_tab { +} + +.table_row label.install_label { + float: left; + width: 30%; +} diff --git a/theme/desert/css/task.css b/theme/desert/css/task.css index de5bda5c91..7fc2701b23 100644 --- a/theme/desert/css/task.css +++ b/theme/desert/css/task.css @@ -5,7 +5,7 @@ .admin_task_title { text-align: center; height: 23px; - background-color: #ddddaa; + background-color: #cccc99; color: #880000; } diff --git a/theme/desert/theme.php b/theme/desert/theme.php index 3f17ca1716..050cf52596 100644 --- a/theme/desert/theme.php +++ b/theme/desert/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/theme/org/css/.htaccess b/theme/org/css/.htaccess index 14249c50bd..e69de29bb2 100644 --- a/theme/org/css/.htaccess +++ b/theme/org/css/.htaccess @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/theme/org/css/ajax.css b/theme/org/css/ajax.css new file mode 100644 index 0000000000..59ed0a535d --- /dev/null +++ b/theme/org/css/ajax.css @@ -0,0 +1,158 @@ +ul#footernav { + list-style-type: none; + margin: 0px; + padding: 5px; + background-color: #ddeedd; + border: 1px solid #009900; + height: 23px; + width: 680px; + text-align: right; +} + +ul#footernav li { + float: right; + margin: 2px 2px 2px 4px; +} + +ul#tabnav { + list-style-type: none; + margin: 0px; + padding-left: 30px; + padding-bottom: 24px; + z-index: 0; +} + +ul#tabnav li { + float: left; + height: 21px; + background-color: #ddeedd; + margin: 2px 2px 0px 2px; + border-top: 1px solid #009900; + border-left: 1px solid #009900; + border-right: 1px solid #009900; + z-index: 1; +} + +ul#tabnav a { + z-index: 1; +} + +ul#tabnav li.tab_enabled a:link, ul#tabnav li.tab_enabled a:visited { + display: block; + color: #2e51a9; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_disabled a:link, ul#tabnav li.tab_disabled a:visited { + display: block; + color: #e0e0e0; + border-bottom: 0px none; + padding: 4px; + height: 13px; +} + +ul#tabnav li.tab_enabled a:hover, ul#tabnav li.tab_active { + background-color: #ccddcc; + color: #000099; +} + +ul#tabnav a:hover { + padding: 4px 4px 3px 4px; + border-bottom: 1px solid #000099; +} + +ul#tabnav li.tab_active { + padding-bottom: 0px; + border-bottom: 0px none; +} + +.tabnav_disabled, .tabnav_disabled:visited { + cursor: default; + height: 7px; + background-color: #aaaaaa; + color: #e0e0e0; +} + +.ajax_error, .ajax_warning { + z-index: 200; + min-height: 10px; + overflow: visible; + padding: 5px; + display: none; + position: absolute; + top: 100px; + left: 26%; +} + +.ajax_error { + background-color: #990000; +} + +.ajax_warning { + background-color: #999900; +} + +.ajax_error_title, .ajax_warning_title { + border: 1px solid #ffffff; + padding: 3px; + color: #ffffff; + float: left; + width: 461px; +} + +.ajax_error_title { + background-color: #bb0000; +} + +.ajax_warning_title { + background-color: #bbbb00; +} + +.ajax_error_close, .ajax_warning_close { + border: 1px solid #ffffff; + float: right; + width: 10px; + z-index: 200; + min-height: 10x; + margin-left: 5px; + padding: 3px; + color: #ffffff; + text-align: center; +} + +.ajax_error_close { + background-color: #bb0000; +} + +.ajax_warning_close { + background-color: #bbbb00; +} + +.ajax_error_message { +} + +.ajax_error_content, .ajax_warning_content { + width: 470px; + border: 1px solid #ffffff; + margin-top: 5px; + color: #ffffff; + padding: 10px; +} + +.field_changed { + border: 5px groove #bbbb00; +} + +.field_changed:hover { + border: 5px groove #ffff00; +} + +.field_failed { + border: 5px groove #bb0000; +} + +.field_failed:hover { + border: 5px groove #ff0000; +} diff --git a/theme/org/css/general.css b/theme/org/css/general.css index 16188144b7..7a926aed3e 100644 --- a/theme/org/css/general.css +++ b/theme/org/css/general.css @@ -1,60 +1,79 @@ body { - background-color : #ddeedd; - color : #000000; - font-family : Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size : 14px; - - scrollbar-base-color : #E9E4AE; - scrollbar-face-color : #CDEFCD; - scrollbar-highlight-color : #F4F9BE; - scrollbar-shadow-color : #CDEFCD; - scrollbar-3dlight-color : #DDDDDD; - scrollbar-arrow-color : #000000; - scrollbar-track-color : #CCEFCC; - scrollbar-darkshadow-color : #999999; - - margin : 0px; - margin-left : 0px; - margin-right : 0px; - margin-top : 0px; - margin-bottom : 0px; + background-color: #ddeedd; + color: #000000; + font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; + font-size: 12px; + letter-spacing: 1px; + + margin: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 0px; + margin-bottom: 0px; } table { - table-layout : auto; - border-spacing : 0px; - overflow : auto; + table-layout: auto; + border-spacing: 0px; + overflow: auto; } A { - font-style : normal; - font-family : Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size : 14px; + font-style: normal; text-decoration : none; } A:link { - color : #2e51a9; + color: #2e51a9; } A:visited { - color : #2e51a9; + color: #2e51a9; } A:active { - color : #2e51a9; - background-color : transparent; + color: #2e51a9; + background-color: transparent; } A:hover { - background-color : transparent; + background-color: transparent; } input, textarea, select, option { - color : #2e51a9; - background-color : #EEFFEE; - border-color : #BBBBBB; - text-decoration : none; + color: #2e51a9; + background-color: #eeffee; + border: 1px solid #009900; + text-decoration: none; +} + +fieldset { + border: 1px solid #009900; + margin-top: 10px; + padding: 10px; +} + +legend { + font-weight: bold; + color: #009900; + background-color: transparent; + padding-left: 5px; + padding-right: 5px; +} + +input:hover, textarea:hover, select:hover, option:hover { + color: #0a2d85; + background-color: #ccddcc; + border-color: #005500; +} + +fieldset:hover { + border-color: #00dd44; +} + +input.form_delete:hover { + background-color: #770044; + color: #aabbaa; } ul, ol { @@ -94,44 +113,53 @@ pre { } .form_reset { - border : groove 1px #000000; - color : #0000AA; + border: groove 1px #009900; + color: #0000AA; } .form_submit { - color : #0000AA; - border-color : #000000; + color: #0000aa; + border: 1px groove #009900; + cursor: pointer; + background-color: #eeffee; } .form_delete { - border-style : groove 1px #000000; - color : #881111; + border-style: groove 1px #009900; + color: #881111; } -.form_submit { - background-color : #ddeedd; +.banner { + background-color: #ddeedd; + width: 488px; } -.banner { - background-color : #ddeedd; - width : 488px; +.disabled { + border-style: groove; + background-color: #aaaaaa; + color: #e0e0e0; + cursor: default; +} + +.disabled:hover { + background-color: #aaaaaa; + color: #e0e0e0; } .fatal_error { - background-color : #ddeedd; - color : #eedddd; - font-size : 11px; + background-color: #ddeedd; + color: #eedddd; + font-size: 11px; } .form_select { - border : solid 1px; - border-color : #000000; - background-color : #EEFFEE; + border: solid 1px #009900; + background-color: #EEFFEE; } .admin.register, .description_header { - background-color : #ddeedd; - color : #000000; + background-color: #ddeedd; + color: #000000; } .code { @@ -165,14 +193,9 @@ pre { } .member_data { - background-color : #ddeedd; - color : #000000; - height : 20px; -} - -.form_field { - border : solid 1px; - border-color : #000000; + background-color: #ddeedd; + color: #000000; + height: 20px; } .normal { @@ -183,18 +206,18 @@ pre { background-color : #DDEEDD; } -.table_header { - color : #000000; - vertical-align : middle; - background-color : #DDEEDD; - padding-bottom : 5px; - padding-top : 5px; +.table_header, .bug_table_header { + color: #000000; + vertical-align: middle; + background-color: #DDEEDD; + padding-bottom: 5px; + padding-top: 5px; } .guest_login_header { - color : #000000; - vertical-align : middle; - background-color : #DDEEDD; + color: #000000; + vertical-align: middle; + background-color: #DDEEDD; } .guest_menu { @@ -320,14 +343,14 @@ pre { } .media_left { - font-size : 14px; + font-size : 12px; width : 200px; } .media_right { color : #000000; font-weight : bold; - font-size : 14px; + font-size : 12px; width : 70px; } @@ -347,6 +370,7 @@ pre { .table_footer { padding: 5px; + margin-top: 5px; text-align: center; background-color: #DDEEDD; } @@ -414,7 +438,7 @@ pre { .you_are_here { white-space : nowrap; - font-size : 14px; + font-size : 12px; } .tiny { font-size : 10px; } @@ -516,3 +540,28 @@ li.listing { .good { color: #00aa00; } + +.table_row { + text-align: left; + clear: both; + margin: 0px; + padding: 0px; + padding-top: 5px; + padding-bottom: 5px; + height: 28px; +} + +.table_row label { + float: left; + width: 45%; +} + +.form_field { + border: groove 1px #009900; +} + +.field_note { + float: left; + text-align: left; + font-style: italic; +} diff --git a/theme/org/css/install.css b/theme/org/css/install.css index 5137d6c724..ca59a14138 100644 --- a/theme/org/css/install.css +++ b/theme/org/css/install.css @@ -1,32 +1,67 @@ -.install_main { +.install_content { color: #000000; - background-color: #FFFFFF; + background-color: #ddeedd; text-decoration: none; + border: 1px solid #009900; + padding: 5px; + width: 670px; + z-index: 20; +} + +.install_main_ajax { + padding-bottom: 6px; } .install_header { color: #000000; - background-color: #EEEEFF; + background-color: #bbccbb; font-size: 20px; text-decoration: underline; + text-align: center; heigth: 30px; - vertical-align: middle; padding-top: 5px; padding-bottom: 5px; + margin-bottom: 5px; } -.install_fatalcontent { - text-align: left; - background-color: #FFFFFF; -} - -.install_error,.install_finished { +.install_error { font-size: 20px; - color: #000000; + color: #aa0000; } -.install_welcome { - color: #000000; +.install_title { padding-top: 5px; padding-bottom: 10px; + font-size: 16px; + font-weight: bold; + color: #009900; +} + +.install_footer { + padding-bottom: 10px; +} + +.install_right { + text-align: right; + padding-right: 5px; +} + +.install_menu_ajax { + width: 700px; +} + +.install_content_container { + height: 420px; + width: 700px; + z-index: 10; + overflow: hidden; + padding-bottom: 10px; +} + +.install_tab { +} + +.table_row label.install_label { + float: left; + width: 30%; } diff --git a/theme/org/css/user.css b/theme/org/css/user.css index acc765f55b..19e0af8056 100644 --- a/theme/org/css/user.css +++ b/theme/org/css/user.css @@ -1,5 +1 @@ -.admin_pagenav { - text-align : center; - height : 20px; - vertical-align : middle; -} +// @DEPRECATED diff --git a/theme/org/theme.php b/theme/org/theme.php index b203486251..fa72890eb4 100644 --- a/theme/org/theme.php +++ b/theme/org/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/theme/schleuder/css/ajax.css b/theme/schleuder/css/ajax.css new file mode 100644 index 0000000000..68c5f0847b --- /dev/null +++ b/theme/schleuder/css/ajax.css @@ -0,0 +1,11 @@ + +.ajax_error_message { +} + +.ajax_error_content, .ajax_warning_content { + width: 470px; + border: 1px solid #ffffff; + margin-top: 5px; + color: #ffffff; + padding: 10px; +} diff --git a/theme/schleuder/css/general.css b/theme/schleuder/css/general.css index b0355932a0..3dce90d393 100644 --- a/theme/schleuder/css/general.css +++ b/theme/schleuder/css/general.css @@ -130,13 +130,13 @@ pre { align : center; } -.table_header { - background-color : #69b2ff; - color : #FFFFFF; - text-align : center; - align : center; - height : 25px; - font-size : 14px; +.table_header, .bug_table_header { + background-color: #69b2ff; + color: #FFFFFF; + text-align: center; + align: center; + height: 25px; + font-size: 14px; padding-bottom: 5px; padding-top: 5px; } diff --git a/theme/schleuder/css/install.css b/theme/schleuder/css/install.css index a7cd7db9b1..dcf667eb31 100644 --- a/theme/schleuder/css/install.css +++ b/theme/schleuder/css/install.css @@ -1,4 +1,4 @@ -.install_main { +.install_content { color: #000000; background-color: #FFFFFF; text-decoration: none; @@ -25,8 +25,15 @@ color: #000000; } -.install_welcome { - color: #000000; +.install_title { padding-top: 5px; padding-bottom: 10px; + font-size: 16px; + font-weight: bold; + color: #000000; +} + +.table_row label.install_label { + float: left; + width: 30%; } diff --git a/theme/schleuder/theme.php b/theme/schleuder/theme.php index 4ca19b59ec..e460dc737c 100644 --- a/theme/schleuder/theme.php +++ b/theme/schleuder/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/theme/ship-simu/css/general.css b/theme/ship-simu/css/general.css index f6a077e1b6..f5aff0ff16 100644 --- a/theme/ship-simu/css/general.css +++ b/theme/ship-simu/css/general.css @@ -127,7 +127,7 @@ pre { color : #000000; } -.table_header { +.table_header, .bug_table_header { background-color : #EEEEFF; color : #000000; text-align : center; diff --git a/theme/ship-simu/theme.php b/theme/ship-simu/theme.php index 620a4c7592..1e81721814 100644 --- a/theme/ship-simu/theme.php +++ b/theme/ship-simu/theme.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,7 +37,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // diff --git a/view.php b/view.php index 35f5666748..2e9c3e813e 100644 --- a/view.php +++ b/view.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,11 +39,11 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['startTime'] = microtime(true); +$GLOBALS['__start_time'] = microtime(true); // Set module -$GLOBALS['__module'] = 'view'; -$GLOBALS['output_mode'] = -1; +$GLOBALS['__module'] = 'view'; +$GLOBALS['__output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); @@ -80,7 +80,7 @@ if ((isGetRequestElementSet('user')) && (isGetRequestElementSet('banner'))) { } // Shutdown -shutdown(); +doShutdown(); // [EOF] ?>