From 26ea563a90454a2cde58f8cd134542a0d8f14780 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 Nov 2009 15:22:29 +0000 Subject: [PATCH] New extension added, ext-uberwach rewritten (unfinished), some fixes - Referal link fixed - New satire extension 'Politician Stop' added which should politician prevent printing your webpages - Campaign extension 'ext-uberwach', a German campaign against surviliance, extended (unfinished) - Extension ext-network continued but still unfinished - Some more minor fixes --- .gitattributes | 13 +- .../politiker-stopp-print-kopf.png | Bin 0 -> 6266 bytes .../politiker-stopp_150x24.png | Bin 0 -> 2208 bytes .../uberwach}/uberwach-button-gruen.gif | Bin .../uberwach}/uberwach-kamera-gruen.gif | Bin inc/config-global.php | 4 +- inc/db/lib-mysql3.php | 9 +- inc/extensions/ext-imprint.php | 2 +- inc/extensions/ext-network.php | 130 +- inc/extensions/ext-newsletter.php | 24 +- inc/extensions/ext-optimize.php | 13 +- inc/extensions/ext-other.php | 2 +- inc/extensions/ext-politician-stop.php | 99 + inc/extensions/ext-uberwach.php | 12 +- inc/filters.php | 14 +- inc/functions.php | 56 + inc/header.php | 56 +- inc/js/js-jquery.php | 48 + inc/libs/politician_stop_functions.php | 60 + inc/reset/reset_100_bonus.php | 2 +- inc/stats-functions.php | 92 +- ref.php | 6 +- templates/de/html/ext/ext_network.tpl | 4 +- templates/de/html/ext/ext_politician-stop.tpl | 11 + templates/de/html/ext/ext_surfbar.tpl | 2 +- templates/de/html/js/js_jquery.tpl | 4376 +++++++++++++++++ templates/de/html/js/js_uberwach.tpl | 2 +- templates/de/html/page_header.tpl | 3 + templates/de/html/politician_stop/.htaccess | 1 + .../politician_stop_snippet.tpl | 85 + 30 files changed, 4966 insertions(+), 160 deletions(-) create mode 100644 img/politician-stop/politiker-stopp-print-kopf.png create mode 100644 img/politician-stop/politiker-stopp_150x24.png rename {uberwach => img/uberwach}/uberwach-button-gruen.gif (100%) rename {uberwach => img/uberwach}/uberwach-kamera-gruen.gif (100%) create mode 100644 inc/extensions/ext-politician-stop.php create mode 100644 inc/js/js-jquery.php create mode 100644 inc/libs/politician_stop_functions.php create mode 100644 templates/de/html/ext/ext_politician-stop.tpl create mode 100644 templates/de/html/js/js_jquery.tpl create mode 100644 templates/de/html/politician_stop/.htaccess create mode 100644 templates/de/html/politician_stop/politician_stop_snippet.tpl diff --git a/.gitattributes b/.gitattributes index fa4f96d32d..b5b6d7ecf3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -81,6 +81,10 @@ DOCS/validator.sh -text /debug.php -text /doubler.php -text /img.php -text +img/politician-stop/politiker-stopp-print-kopf.png -text +img/politician-stop/politiker-stopp_150x24.png -text +img/uberwach/uberwach-button-gruen.gif -text +img/uberwach/uberwach-kamera-gruen.gif -text inc/.htaccess -text inc/.secret/.htaccess -text inc/autopurge/.htaccess -text @@ -147,6 +151,7 @@ inc/extensions/ext-optimize.php -text inc/extensions/ext-order.php -text inc/extensions/ext-other.php -text inc/extensions/ext-payout.php -text +inc/extensions/ext-politician-stop.php -text inc/extensions/ext-primera.php -text inc/extensions/ext-profile.php -text inc/extensions/ext-rallye.php -text @@ -188,6 +193,7 @@ inc/install-functions.php -text inc/install-inc.php -text inc/js/.htaccess -text inc/js/js- -text +inc/js/js-jquery.php -text inc/js/js-order_send.php -text inc/js/js-surfbar_member_book.php -text inc/js/js-surfbar_member_edit.php -text @@ -268,6 +274,7 @@ inc/libs/optimize_functions.php -text inc/libs/order_functions.php -text inc/libs/other_functions.php -text inc/libs/payout_functions.php -text +inc/libs/politician_stop_functions.php -text inc/libs/primera_functions.php -text inc/libs/rallye_functions.php -text inc/libs/refback_functions.php -text @@ -1281,6 +1288,7 @@ templates/de/html/ext/ext_optimize.tpl -text templates/de/html/ext/ext_order.tpl -text templates/de/html/ext/ext_other.tpl -text templates/de/html/ext/ext_payout.tpl -text +templates/de/html/ext/ext_politician-stop.tpl -text templates/de/html/ext/ext_primera.tpl -text templates/de/html/ext/ext_profile.tpl -text templates/de/html/ext/ext_rallye.tpl -text @@ -1381,6 +1389,7 @@ templates/de/html/install/install_page3.tpl -text templates/de/html/install/install_page5.tpl -text templates/de/html/install/install_welcome.tpl -text templates/de/html/js/.htaccess -text +templates/de/html/js/js_jquery.tpl -text templates/de/html/js/js_order_send.tpl -text templates/de/html/js/js_surfbar_member_book.tpl -text templates/de/html/js/js_surfbar_member_edit.tpl -text @@ -1553,6 +1562,8 @@ templates/de/html/online_now.tpl -text templates/de/html/page_body.tpl -text templates/de/html/page_footer.tpl -text templates/de/html/page_header.tpl -text +templates/de/html/politician_stop/.htaccess -text +templates/de/html/politician_stop/politician_stop_snippet.tpl -text templates/de/html/rallye/.htaccess -text templates/de/html/rallye/rallye_test.tpl -text templates/de/html/redirect_url.tpl -text @@ -1654,6 +1665,4 @@ theme/desert/images/help/left.jpg -text theme/desert/images/help/right.jpg -text theme/desert/images/help/up.jpg -text theme/desert/theme.php -text -uberwach/uberwach-button-gruen.gif -text -uberwach/uberwach-kamera-gruen.gif -text /view.php -text diff --git a/img/politician-stop/politiker-stopp-print-kopf.png b/img/politician-stop/politiker-stopp-print-kopf.png new file mode 100644 index 0000000000000000000000000000000000000000..483e6831fcca7ddc80b625b00b54aba2251b4af9 GIT binary patch literal 6266 zcmV-=7=`DFP)`f z#NFTJ{9auA78v}tv>`We^Z)=C@JU2LRCr#*nr&;-P!z}WS&AblZu<@cNjK0J!htN% z>^p=?N1$Gih0Vbf#DNTkZx*r%v*73ORk7^hg#$4t12-6iXu)EM=%DB3=H@=-_ja`V z?SIcn&w7v5lV@>!e75!C3gGJd*8ch6rYDcA*3$Sig&F*v!JQ_xg7F(D;rYOBNQ)e$ zz`)~SSvUJF7|AbTE8RU#Jw=4MLt6fe&lAf=2NJJKQy4#J%rk9JG!;V z2n6WldbPp`gm4p`S}Q3C;veYKngfRx5}=1FkKp6@wN$Ijufu;zU3T9ij1Kw9IrN=2~1U1dSxZS|iX%M^vi~ zTG?P}nX7kP^+H+;pqVcsS_HI{3utAaowfQ}As8U3trdd-yt-N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L#M4OzHxc?C~dJ{AcU7_-oEclAeEKDs`}eOP%@tV)UHdaWNq%JMLcF_c*j zuW(qU%5u5~?Le31;@-ap8?0n(R}}?TSjeol7b{_hg{L-IA7P7ysXf&;lvxhjz6YDE z#L}u72Uc0g3mdAif;|>>nX7EGklouAme6H6SiV>Z%Pd+i`?aDh7yT7hXo`j0czcX0 zG{-`6WTv_d&?F0(8tym^v#_dtLb5$H&qDrHPxZ5c3l?yzQ84xmaKu7>qN>`e;En~X zDlHY!9^jNkpYNgLVgfj40jo==a%&Ip!UFO`LCG#oE5I8Iz{A<+H;benZzm4`xMtCj ktj`X<@NqD?4q##Y0aF2&#lAjnwg3PC07*qoM6N<$f-55IaR2}S literal 0 HcmV?d00001 diff --git a/img/politician-stop/politiker-stopp_150x24.png b/img/politician-stop/politiker-stopp_150x24.png new file mode 100644 index 0000000000000000000000000000000000000000..4f92ce95bff0f510c670304541883dc46206df3c GIT binary patch literal 2208 zcmV;R2w(S!P) z-rlXPt=87o@9*!%#>Tz9z4!O`rKP2{wYC5E_tqgH&Hw<;2ngOvO83Ubb8~YsF)>0y zLThVlN=iyvT3R6?A$xm!Qc_YmIXQ%cgq)n5V`F2Kl$0qcDd%fz)(8mJ004}PjOSxx z)({ZhAtBxn5Y`wN@2#yE7#Q!2jNSkM?^06loSgU0&iB2&?}UWj7#Q9N2*2c!p=icYd+!Jc_c1Y?oTaU$rOsMf_Xr68LPGaaQr?V= zrJSYKT3Y{WYpr8r=hoKFQd0knjQ?6%_c=M7V`KN$*6&J6=LiVzIXU-hYxgNB?;#=9 zoSb`mgnNX9=OH1bt*v{6jK-9dt+lnzdxY;=THaDp_pPnoLPGE#E4csw29ZfbK~#9! zwU>!^+_n*iVaKwwzCaKsS9V1bgh&G5T1&@rW!aMBqdwxKt=%J1(%NmE^hi%9J(8YD zn*X~4a93JKdVOkNg7+waI0heP!1-Yj8p?R<^qF&Kmp(r~LPsr99(m{?h2bL%dhzbb zi)TYw`r^hMOn9FwhHy;|g>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vQ?@XR+T3V{vp~D56TmSP;J7>XC959dT=<@8I zwf0)L*sNVyzxvI1WQ}T=QQxS8eMw%8n}FZ`0mQqp}Ge7vj?%DJ@^GNx`)MQ z@57PLJ*8#Ei|Ace } // END - if // Count DB hits - if (!isStatsEntrySet('db_hits_run')) { + if (!isStatsEntrySet('db_hits')) { // Count in dummy variable - setStatsEntry('db_hits_run', 1); + setStatsEntry('db_hits', 1); } else { // Count to config array - incrementStatsEntry('db_hits_run'); + incrementStatsEntry('db_hits'); } // Return the result @@ -252,9 +252,6 @@ function SQL_CLOSE ($F, $L) { // Destroy cache unset($GLOBALS['sql_link_res']); - // Move stats - incrementStatsEntry('db_hits', getStatsEntry('db_hits_run')); - // Return the result return $close; } diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index ae40b5c711..1931ea9e2e 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -65,7 +65,7 @@ switch (getExtensionMode()) { // Create imprint data table addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_imprint_data` ( -`imprint_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`imprint_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `imprint_key` VARCHAR(255) NOT NULL DEFAULT '', `imprint_value` VARCHAR(255) NOT NULL DEFAULT '', UNIQUE (`imprint_key`), diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 721765cba9..2ba042dd53 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Generic (sponsor) network connection extension * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Allgemeine Sponsorennetzwerk-Erweiterung * + * Kurzbeschreibung : Allgemeine Werbenetzwerk-Erweiterung * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -53,14 +53,14 @@ enableExtensionProductive(false); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Main table which hold - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_data`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_data`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_data` ( -`network_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`network_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_short_name` VARCHAR(50) NOT NULL DEFAULT '', `network_title` VARCHAR(255) NOT NULL DEFAULT '', `network_reflink` VARCHAR(255) NOT NULL DEFAULT '', -`network_data_seperator CHAR(4) NOT NULL DEFAULT '|', -`network_row_seperator CHAR(4) NOT NULL DEFAULT '|', +`network_data_seperator` CHAR(4) NOT NULL DEFAULT '|', +`network_row_seperator` CHAR(4) NOT NULL DEFAULT '|', `network_request_type` ENUM('GET','POST') NOT NULL DEFAULT 'GET', `network_charset` VARCHAR(20) NOT NULL DEFAULT 'ISO-8859-1', UNIQUE (`network_short_name`), @@ -69,10 +69,10 @@ PRIMARY KEY (`network_id`) // Types the network provider is supporting (e.g. Forced-Banner and so on) // @TODO network_type_name is an internal name and needs documentation - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_types` ( -`network_type_id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`network_id` BIGINT(20) NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_name` VARCHAR(255) NOT NULL DEFAULT '', `network_type_title` VARCHAR(255) NOT NULL DEFAULT '', `network_type_request_url` VARCHAR(255) NOT NULL DEFAULT '', @@ -83,9 +83,9 @@ PRIMARY KEY (`network_type_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Types provideable by networks. ONLY FILL OUT WITH PROPER IDEA!'"); // HTTP parameters (names) for URLs - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_request_params` ( -`network_type_id` BIGINT(20) NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `request_param_max_reload_time` VARCHAR(10) NOT NULL DEFAULT 'reload', `request_param_min_waiting_time` VARCHAR(10) NOT NULL DEFAULT 'ma', `request_param_min_remain_clicks` VARCHAR(10) NOT NULL DEFAULT 'uebrig', @@ -95,10 +95,10 @@ PRIMARY KEY (`network_type_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Request parameters for GET/POST request ONLY FILL OUT WITH PROPER IDEA!'"); // Error status codes - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_type_errors`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_type_codes`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_type_codes` ( -`network_type_code_id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`network_type_id` BIGINT(20) NOT NULL DEFAULT 0, +`network_type_code_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_code_value` VARCHAR(50) NOT NULL DEFAULT '', `network_type_code_type` VARCHAR(100) NOT NULL DEFAULT 'INVALID_TYPE', UNIQUE `code_type` (`network_type_code_value`,`network_type_id`), @@ -107,41 +107,79 @@ PRIMARY KEY (`network_type_code_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Error codes for all types'"); // Code types (internal table) - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_codes`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_codes`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_codes` ( -`network_code_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`network_code_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_code` VARCHAR(100) NOT NULL DEFAULT 'INVALID_CODE', UNIQUE (`network_code`), PRIMARY KEY (`network_code_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Error types, generic data, DO NOT ALTER!'"); + // Valid translation keys (we hate hard-coded arrays, you see?) + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_translations`'); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_translations` ( +`network_translate_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_translation` VARCHAR(100) NOT NULL DEFAULT '', +UNIQUE `type_trans` (`network_type_id`,`network_translation`), +PRIMARY KEY (`network_translate_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Translations for array keys, generic data, DO NOT ALTER!'"); + // Data from the webmaster (you!) - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_config` ( -`network_id` BIGINT(20) NOT NULL DEFAULT 0, -`network_affiliate_id` BIGINT(20) NOT NULL DEFAULT 0, +`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_affiliate_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_api_password` VARCHAR(255) NOT NULL DEFAULT '', -`network_site_id` BIGINT(20) NOT NULL DEFAULT 0, +`network_site_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, UNIQUE `network_affiliate` (`network_id`,`network_affiliate_id`), UNIQUE `affiliate_site` (`network_affiliate_id`,`network_site_id`), PRIMARY KEY (`network_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data from the webmaster (you!)'"); // Configuration data for e.g. reload-time - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_types_config` ( -`network_data_id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`network_id` BIGINT(20) NOT NULL DEFAULT 0, -`network_type_id` BIGINT(20) NOT NULL DEFAULT 0, -`max_reload_time` BIGINT(20) NOT NULL DEFAULT 0, -`min_waiting_time` BIGINT(20) NOT NULL DEFAULT 0, -`min_remain_clicks` BIGINT(20) NOT NULL DEFAULT 0, -`min_payment` BIGINT(20) NOT NULL DEFAULT 0, +`network_data_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`max_reload_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`min_waiting_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`min_remain_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`min_payment` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `allow_erotic` VARCHAR(10) NOT NULL DEFAULT '', -INDEX `network_affiliate` (`network_id`,`network_affiliate_id`), +UNIQUE `provider_type` (`network_id`,`network_type_id`), PRIMARY KEY (`network_data_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data for every type (e.g. reload-time)'"); + // Cache for queried APIs. Re-check depends on config + // `network_cache_refresh` in seconds or if set to zero, full day + // divided by query amount. + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_cache`'); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_cache` ( +`network_cache_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_cache_data` MEDIUMBLOB, +`network_cache_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', +UNIQUE `provider_type` (`network_id`,`network_type_id`), +PRIMARY KEY (`network_cache_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Cache for all queried APIs'"); + + // Array-Element translation tables per type/provider + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_array_translation`'); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_array_translation` ( +`network_translate_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_array_key` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0, +`network_translation` VARCHAR(100) NOT NULL DEFAULT '', +UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`network_array_key`), +UNIQUE `provider_type_trans` (`network_id`,`network_type_id`,`network_translation`), +PRIMARY KEY (`network_translate_id`) +) TYPE={?_TABLE_TYPE?} COMMENT='Cache for all queried APIs'"); + // Insert error code types // - Affiliate id or interface password wrong addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_codes` (`network_code`) VALUES ('AFF_ID_PASS_WRONG')"); @@ -163,24 +201,32 @@ PRIMARY KEY (`network_data_id`) addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_codes` (`network_code`) VALUES ('REQUEST_PARAMS_INCOMPLETE')"); // Admin menu entries - addAdminMenuSql('network',NULL,'Sponsorennetzwerke','Verwalten Sie hier Sponsorennetzwerke (API-Anbindung), versenden Sie deren Mails, oder übernehmen Sie deren Textlinks und vieles mehr. VORSICHT: Das Einrichten von weiteren Sponsorennetzwerken ist nicht leicht, dafür aber sehr flexibel! Sollte ein Netzwerk fehlen, so melden Sie dies bitte im Forum!',4); - addAdminMenuSql('network','config_network','API-Daten','Stellen Sie Ihre Affiliate- Webseiten-Id und API-Passwort ein. Diese erhalten Sie zu über 99% aus dem jeweiligen Zugangsbereich des Anbieters. Sollten Sie bei einem Netzwerk noch nicht angemeldet sein, verwenden Sie bitte meinen Referal-Link.',1); - addAdminMenuSql('network','config_network_types','Werbearten','Stellen Sie hier Reload-Zeiten, Mindestauffenthalt und so weiter pro Werbeart und Sponsorennetzwerk ein. Es werden sonst Standart-Werte (Mimimumwerte: 0, Maximumwerte: sehr gross, Erotik: aus) angenommen, die Sie meistens nicht wollen.',2); - addAdminMenuSql('network','list_networks','Auflisten/Verwalten','Experten-Einstellungen! Hier ändern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Sponsorennetzwerks ab. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Sponsorennetzwerk einrichten möchten.',3); - addAdminMenuSql('network','list_network_types','Werbearten verwalten','Experten-Einstellungen! Hier ändern Sie die Einstellungen zu den Werbearten pro Sponsorennetzwerken. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Sponsorennetzwerk einrichten möchten.',4); - addAdminMenuSql('network','list_network_params','Abfrageparameter','Experten-Einstellungen! Hier stellen Sie die Abfrageparameter (wie sie genannt werden müssen, um das API-Script korrekt aufrufen zu können) ein, pro Sponsorennetzwerk. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Sponsorennetzwerk einrichten möchten.',5); - addAdminMenuSql('network','list_network_code_types','','Experten-Einstellungen! Hier stellen Sie die Rückgabewerte ein, die im Falle eines Fehlers pro API-Script kommen können. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Sponsorennetzwerk einrichten möchten.',7); - addAdminMenuSql('network','list_network_codes','Fehlercodes einstellen','Experten-Einstellungen! Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zurückliefern können. Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden. Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Sponsorennetzwerk einrichten möchten.',7); + addAdminMenuSql('network',NULL,'Werbenetzwerke','Verwalten Sie hier Werbenetzwerke (API-Anbindung), versenden Sie deren Mails, oder übernehmen Sie deren Textlinks und vieles mehr. VORSICHT: Das Einrichten von weiteren Werbenetzwerken ist nicht leicht, dafür aber sehr flexibel! Sollte ein Netzwerk fehlen, so melden Sie dies bitte im Forum!',4); + addAdminMenuSql('network','config_networks','API-Daten','Stellen Sie Ihre Affiliate- Webseiten-Id und API-Passwort ein. Diese erhalten Sie zu über 99% aus dem jeweiligen Zugangsbereich des Anbieters. Sollten Sie bei einem Netzwerk noch nicht angemeldet sein, verwenden Sie bitte meinen Referal-Link.',1); + addAdminMenuSql('network','config_network_types','Werbearten','Stellen Sie hier Reload-Zeiten, Mindestauffenthalt und so weiter pro Werbeart und Werbenetzwerk ein. Es werden sonst Standart-Werte (Mimimumwerte: 0, Maximumwerte: sehr gross, Erotik: aus) angenommen, die Sie meistens nicht wollen.',2); + addAdminMenuSql('network','query_networks','APIs abfragen','Fragt alle eingestellten APIs ab. Die Ergebnisse werden dann für einen einstellbaren Zeitraum gecacht und nicht erneut angefordert.',3); + addAdminMenuSql('network','config_network','Einstellungen','Stellen Sie generelle Einstellungen ein, die für alle Werbenetzwerke gelten, wie z.B. Cache-Erneuerungsinterval. Generell sind aber die Einstellungen in Ordnung, da z.B. sonst Ihre freien Abfragen beim Werbenetzwerk sich zu schnell abbauen.',4); + addAdminMenuSql('network','list_networks','Auflisten/Verwalten','Experten-Einstellungen! Hier ändern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',5); + addAdminMenuSql('network','list_network_types','Werbearten verwalten','Experten-Einstellungen! Hier ändern Sie die Einstellungen zu den Werbearten pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',6); + addAdminMenuSql('network','list_network_params','Abfrageparameter','Experten-Einstellungen! Hier stellen Sie die Abfrageparameter (wie sie genannt werden müssen, um das API-Script korrekt aufrufen zu können) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',7); + addAdminMenuSql('network','list_network_code_types','Rückgabewerte','Experten-Einstellungen! Hier stellen Sie die Rückgabewerte ein, die im Falle eines Fehlers pro API-Script kommen können. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',8); + addAdminMenuSql('network','list_network_codes','Fehlercodes einstellen','Experten-Einstellungen! Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zurückliefern können. Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden. Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und im Forum um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',9); + + // Configuration entries + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `network_cache_refresh` BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15) . ''); break; case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_data`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_type_errors`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_data`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_type_codes`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_translations`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_cache`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_array_translation`'); // Admin menu addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='network'"); diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 5f9e9f34ea..fc184a9be1 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -145,7 +145,7 @@ switch (getExtensionMode()) { // - Main data table addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_data`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_data` ( -`nl_id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`nl_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `nl_subject` VARCHAR(255) NOT NULL DEFAULT '{OPEN_CONFIG}nl_default_subject{CLOSE_CONFIG}', `nl_header_text` MEDIUMTEXT, `nl_footer_text` MEDIUMTEXT, @@ -155,17 +155,17 @@ switch (getExtensionMode()) { `nl_sent` ENUM('Y','N') NOT NULL DEFAULT 'N', `nl_expired` ENUM('Y','N') NOT NULL DEFAULT 'N', `nl_do_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y', -`nl_recipients` BIGINT(20) NOT NULL DEFAULT 0, -`nl_received` BIGINT(20) NOT NULL DEFAULT 0, -`nl_total_clicks` BIGINT(20) NOT NULL DEFAULT 0, +`nl_recipients` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`nl_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`nl_total_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`nl_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='General newsletter data'"); // - Topics data table addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_topics`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_topics` ( -`nl_topic_id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`nl_id` BIGINT(20) NOT NULL DEFAULT 0, +`nl_topic_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`nl_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `nl_topic_title` VARCHAR(255) NOT NULL DEFAULT '', `nl_topic_text` MEDIUMTEXT, INDEX `newsletter_id` (`nl_id`), @@ -175,10 +175,10 @@ PRIMARY KEY (`nl_topic_id`) // - Sponsor orders data table addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_newsletter_orders`"); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_newsletter_orders` ( -`nl_order_id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`nl_sponsor_id` BIGINT(20) NOT NULL DEFAULT 0, -`nl_id` BIGINT(20) NOT NULL DEFAULT 0, -`nl_topic_id` BIGINT(20) NOT NULL DEFAULT 0, +`nl_order_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`nl_sponsor_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`nl_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`nl_topic_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `nl_order_placed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `nl_order_accepted` ENUM('Y','N') NOT NULL DEFAULT 'N', UNIQUE KEY `sponsor_nl_topic` (`nl_sponsor_id`,`nl_id`,`nl_topic_id`), @@ -187,8 +187,8 @@ PRIMARY KEY (`nl_order_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Newsletter orders'"); // Configuration - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 7).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 14).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 7).""); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 14).""); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_subject` VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_header` MEDIUMTEXT"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_footer` MEDIUMTEXT"); diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index cd58bc17f9..478fa60166 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -53,18 +53,19 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_optimize_gain`( - id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, - gain decimal(10,3) NOT NULL DEFAULT '0.000', - PRIMARY KEY (id) + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`"); + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_optimize_gain` ( +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +`gain` decimal(10,3) NOT NULL DEFAULT '0.000', +PRIMARY KEY (`id`) ) TYPE={?_TABLE_TYPE?}"); - addAdminMenuSql('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.',5); + addAdminMenuSql('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Binärdaten aus der Datenbank entfernt werden.',5); break; case 'remove': // Do stuff when removing extension // SQL commands to run addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='optimize'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='optimize' LIMIT 1"); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 4f3b30d031..5a5fb85420 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -208,7 +208,7 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) NOT NULL DEFAULT 10"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt."); diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php new file mode 100644 index 0000000000..8b2a4d3865 --- /dev/null +++ b/inc/extensions/ext-politician-stop.php @@ -0,0 +1,99 @@ + diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index ed1ea89b50..8c5989b4a4 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -53,8 +53,11 @@ switch (getExtensionMode()) { break; case 'remove': // Do stuff when removing extension + // SQLs commands to run + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_uberwach' LIMIT 1"); + // Unregister filter - unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun()); + unregisterFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -68,11 +71,16 @@ 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, getExtensionDryRun()); + registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugefügt"); break; + + case '0.0.2': // SQL queries for v0.0.2 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `uberwach_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addExtensionAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7); + break; } // END - switch break; diff --git a/inc/filters.php b/inc/filters.php index 5cda96ebf2..d1a66567e5 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -456,11 +456,17 @@ function FILTER_COMPILE_EXTENSION ($code) { if ((count($matches) > 0) && (count($matches[3]) > 0)) { // Replace all matches foreach ($matches[3] as $key => $cmd) { - // Construct call-back function name - $functionName = 'getExtension' . ucfirst(strtolower($cmd)); + // By default we have no extension installed, so 'false' is assumed + $replacer = 'false'; - // Call the function - $replacer = call_user_func_array($functionName, $matches[4][$key]); + // Is the extension installed? + if (isExtensionActive($matches[4][$key])) { + // Construct call-back function name + $functionName = 'getExtension' . ucfirst(strtolower($cmd)); + + // Call the function + $replacer = call_user_func_array($functionName, $matches[4][$key]); + } // END - if // Replace it and insert parameter for GET request $code = str_replace($matches[0][$key], sprintf("&%s=%s&rev=%s", $cmd, $replacer, getConfig('CURR_SVN_REVISION')), $code); diff --git a/inc/functions.php b/inc/functions.php index 21938e565e..4fd8e77e91 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3603,6 +3603,62 @@ function convertReceivers ($old) { return str_replace(';', ', ', $old); } +// Determines the right page title +function determinePageTitle () { + // Config and database connection valid? + if ((isConfigLocalLoaded()) && (isConfigurationLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) { + // Init title + $TITLE = ''; + + // Title decoration enabled? + if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." "; + + // Do we have some extra title? + if (isExtraTitleSet()) { + // Then prepent it + $TITLE .= getExtraTitle() . ' by '; + } // END - if + + // Add main title + $TITLE .= getConfig('MAIN_TITLE'); + + // Add title of module? (middle decoration will also be added!) + if ((getConfig('enable_mod_title') == 'Y') || ((!isWhatSet()) && (!isActionSet())) || (getModule() == 'admin')) { + $TITLE .= ' ' . trim(getConfig('title_middle')) . ' ' . getModuleTitle(getModule()); + } // END - if + + // Add title from what file + $mode = ''; + if (getModule() == 'login') $mode = 'member'; + elseif (getModule() == 'index') $mode = 'guest'; + if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, getWhat()); + + // Add title decorations? (right) + if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != '')) $TITLE .= " ".trim(getConfig('title_right')); + + // Remember title in constant for the template + $pageTitle = $TITLE; + } elseif ((isInstalled()) && (isAdminRegistered())) { + // Installed, admin registered but no ext-sql_patches + $pageTitle = '[-- ' . getConfig('MAIN_TITLE').' - '.getModuleTitle(getModule()) . ' --]'; + } elseif ((isInstalled()) && (!isAdminRegistered())) { + // Installed but no admin registered + $pageTitle = sprintf(getMessage('SETUP_OF_MXCHANGE'), getConfig('MAIN_TITLE')); + } elseif ((!isInstalled()) || (!isAdminRegistered())) { + // Installation mode + $pageTitle = getMessage('INSTALLATION_OF_MXCHANGE'); + } else { + // Configuration not found! + $pageTitle = getMessage('NO_CONFIG_FOUND_TITLE'); + + // Do not add the fatal message in installation mode + if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND')); + } + + // Return title + return $pageTitle; +} + ////////////////////////////////////////////////// // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // ////////////////////////////////////////////////// diff --git a/inc/header.php b/inc/header.php index 06da594e4d..261f49b4ef 100644 --- a/inc/header.php +++ b/inc/header.php @@ -41,64 +41,14 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Is the header already sent? if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { // If not in CSS mode generate the header if (getOutputMode() != 1) { - // Config and database connection valid? - if ((isConfigLocalLoaded()) && (isConfigurationLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) { - // Init title - $TITLE = ''; - - // Title decoration enabled? - if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." "; - - // Do we have some extra title? - if (isExtraTitleSet()) { - // Then prepent it - $TITLE .= getExtraTitle() . ' by '; - } // END - if - - // Add main title - $TITLE .= getConfig('MAIN_TITLE'); - - // Add title of module? (middle decoration will also be added!) - if ((getConfig('enable_mod_title') == 'Y') || ((!isWhatSet()) && (!isActionSet())) || (getModule() == 'admin')) { - $TITLE .= ' ' . trim(getConfig('title_middle')) . ' ' . getModuleTitle(getModule()); - } // END - if - - // Add title from what file - $mode = ''; - if (getModule() == 'login') $mode = 'member'; - elseif (getModule() == 'index') $mode = 'guest'; - if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, getWhat()); - - // Add title decorations? (right) - if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != '')) $TITLE .= " ".trim(getConfig('title_right')); - - // Remember title in constant for the template - $content['header_title'] = $TITLE; - } elseif ((isInstalled()) && (isAdminRegistered())) { - // Installed, admin registered but no ext-sql_patches - $content['header_title'] = '[-- ' . getConfig('MAIN_TITLE').' - '.getModuleTitle(getModule()) . ' --]'; - } elseif ((isInstalled()) && (!isAdminRegistered())) { - // Installed but no admin registered - $content['header_title'] = sprintf(getMessage('SETUP_OF_MXCHANGE'), getConfig('MAIN_TITLE')); - } elseif ((!isInstalled()) || (!isAdminRegistered())) { - // Installation mode - $content['header_title'] = getMessage('INSTALLATION_OF_MXCHANGE'); - } else { - // Configuration not found! - $content['header_title'] = getMessage('NO_CONFIG_FOUND_TITLE'); - - // Do not add the fatal message in installation mode - if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND')); - } - - // Save some little memory - unset($TITLE); + // Determine the page title + $content['header_title'] = determinePageTitle(); // Output page header code loadTemplate('page_header', false, $content); diff --git a/inc/js/js-jquery.php b/inc/js/js-jquery.php new file mode 100644 index 0000000000..cd06007108 --- /dev/null +++ b/inc/js/js-jquery.php @@ -0,0 +1,48 @@ + diff --git a/inc/libs/politician_stop_functions.php b/inc/libs/politician_stop_functions.php new file mode 100644 index 0000000000..0561cdb16a --- /dev/null +++ b/inc/libs/politician_stop_functions.php @@ -0,0 +1,60 @@ + diff --git a/inc/reset/reset_100_bonus.php b/inc/reset/reset_100_bonus.php index b3686d40fc..511b107a2f 100644 --- a/inc/reset/reset_100_bonus.php +++ b/inc/reset/reset_100_bonus.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { } // Do not execute when script is in CSS mode or no daily reset -if ((getOutputMode() != 0) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return; +if ((getOutputMode() != 0) || (!isResetModeEnabled())) return; //* DEBUG: */ outputHtml(basename(__FILE__)."
"); // Check for 100% klickrate mails diff --git a/inc/stats-functions.php b/inc/stats-functions.php index da5815c182..1e4b5dac22 100644 --- a/inc/stats-functions.php +++ b/inc/stats-functions.php @@ -45,17 +45,11 @@ if (!defined('__SECURITY')) { function initStatsSystem () { // Is stats cache loaded? if ((!isset($GLOBALS['stats_loaded'])) && (getConfig('STATS_ENABLED') == 'Y')) { - // Load stats cache - $GLOBALS['stats_fqfn'] = sprintf("%sinc/cache/stats.cache", getConfig('PATH')); - - // Is the file readable? - if (isFileReadable($GLOBALS['stats_fqfn'])) { - // Yes, so load it and eval - eval(readFromFile($GLOBALS['stats_fqfn'])); - } else { - // Generate it only - touch($GLOBALS['stats_fqfn']); - } + // Init statistics array + $GLOBALS['stats'] = array(); + + // Load statistics entry from temporary table + loadStatsTable(); // Stats are loaded! $GLOBALS['stats_loaded'] = true; @@ -70,6 +64,9 @@ function isStatsEntrySet ($entry) { // Increments a statistics entry function incrementStatsEntry ($entry, $amount=1) { + // Do we have stats enabled? + if (getConfig('STATS_ENABLED') != 'Y') return; + // Is it there? if (isStatsEntrySet($entry)) { // Then increment it @@ -100,20 +97,73 @@ function setStatsEntry ($entry, $value) { $GLOBALS['stats'][$entry] = $value; } +// Loads stats table +function loadStatsTable () { + // Do we have it there for today? + if (!isStatsTableCreated()) { + // Then create a default one + createStatsTable(); + } // END - if + + // Load it from database + $result = SQL_QUERY_ESC("SELECT `stats_entry`,`stats_value` FROM `{?_MYSQL_PREFIX?}_stats_%s` ORDER BY `stats_entry` ASC", + array(date('Ymd', time())), __FUNCTION__, __LINE__); + + // Read all rows + while ($row = SQL_FETCHARRAY($result)) { + $GLOBALS['stats'][$row['stats_entry']] = $row['stats_value']; + } // END - while + + // Free the result + SQL_FREERESULT($result); +} + +// Checks if the the statistics table is created +function isStatsTableCreated () { + // Ask for it + $result = SQL_QUERY_ESC("SHOW TABLES LIKE '{?_MYSQL_PREFIX?}_stats_%s'", + array(date('Ymd', time())), __FUNCTION__, __LINE__); + + // Do we have a row? + return SQL_NUMROWS($result); +} + +// Create the dummy table +function createStatsTable () { + // Create it here + $result = SQL_QUERY_ESC("CREATE TABLE IF NOT EXISTS `{?_MYSQL_PREFIX?}_stats_%s` ( +`stats_entry` VARCHAR(100) NOT NULL DEFAULT '', +`stats_value` BIGINT(20) NOT NULL DEFAULT 0, +PRIMARY KEY (`stats_entry`) +) TYPE=HEAP COMMENT='Temporary statistics table'", + array(date('Ymd', time())), __FUNCTION__, __LINE__); +} + +// Write all entries to the table +function writeStatsTable () { + // Empty the table first + SQL_QUERY_ESC("TRUNCATE `{?_MYSQL_PREFIX?}_stats_%s`", + array(date('Ymd', time())), __FUNCTION__, __LINE__); + + // Begin the SQL command + $sql = sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_stats_%s` (`stats_entry`,`stats_value`) VALUES ", + date('Ymd', time())); + + // Add all entries to the final query + foreach ($GLOBALS['stats'] as $entry=>$value) { + $sql .= sprintf("('%s', %s),", $entry, bigintval($value)); + } // END - foreach + + // Finalize it and run it + SQL_QUERY(substr($sql, 0, -1), __FUNCTION__, __LINE__); +} + // Filter for flushing statistics function FILTER_FLUSH_STATS () { // Now do we have stats? if ((isset($GLOBALS['stats'])) && (getConfig('STATS_ENABLED') == 'Y')) { - // Then prepare it for writing - foreach ($GLOBALS['stats'] as $key=>$value) { - $stats[] = '$GLOBALS[\'stats\'][\'' . $key . '\'] = ' . $value . ';'; - } // END - foreach - - // Add empty line - $stats[] = ''; - - // And flush all out - writeToFile($GLOBALS['stats_fqfn'], implode("\n", $stats), true); + // Write statistics to temporary table + writeStatsTable(); } // END - if } diff --git a/ref.php b/ref.php index 451bb7eaa3..81a521ec64 100644 --- a/ref.php +++ b/ref.php @@ -46,6 +46,9 @@ $GLOBALS['output_mode'] = -1; // Load the required file(s) require('inc/config-global.php'); +// No refid by default +$URL = 'index.php'; + // Base URL for redirection switch (getConfig('refid_target')) { case 'register': @@ -57,9 +60,6 @@ switch (getConfig('refid_target')) { break; } -// No refid and we add our refid (don't forget to set $def_refid!) -$URL = 'index.php'; - // Get referal ID from ref or refid variable if (isGetRequestElementSet('ref')) $ref = getRequestElement('ref'); elseif (isGetRequestElementSet('refid')) $ref = getRequestElement('refid'); diff --git a/templates/de/html/ext/ext_network.tpl b/templates/de/html/ext/ext_network.tpl index 2292fcb13f..fbe4d42a0e 100644 --- a/templates/de/html/ext/ext_network.tpl +++ b/templates/de/html/ext/ext_network.tpl @@ -1,6 +1,6 @@ Diese Erweiterung bietet eine allgemeine Anbindungsmöglichkeit an diverese -Sponsorennetzwerken an, um z.B. deren Mails zu versenden. Später sollen +Werbenetzwerken an, um z.B. deren Mails zu versenden. Später sollen noch weitere Dinge, wie Textlinks oder Popups folgen. Sollte ein -Sponsorennetzwerk hier fehlen, melden Sie sich bitte im Forum an. Mein Team und ich binden es dann bald in MXChange ein. diff --git a/templates/de/html/ext/ext_politician-stop.tpl b/templates/de/html/ext/ext_politician-stop.tpl new file mode 100644 index 0000000000..e07ebcc9e5 --- /dev/null +++ b/templates/de/html/ext/ext_politician-stop.tpl @@ -0,0 +1,11 @@ +Diese Erweiterung schliesst sich der Protestseite www.politiker-stopp.de an. Dabei wird ein kleines HTML-Schnipsel +(Widget) in Ihren {?mt_word?} eingebunden, dass beim Ausdrucksversuch Ihrer +Seite nicht die eigentliche Seite, sondern eine Protestseite zum Drucker sendet. +Dies gilt gegen Politiker, die versuchen, das Internet gegen die +Kinderpornorgraphie "abzusichern" (eher das Internet zu zensieren).
+
+Und wer es nicht bemerkt hat: Das ist Satire. diff --git a/templates/de/html/ext/ext_surfbar.tpl b/templates/de/html/ext/ext_surfbar.tpl index 6565fcfa62..2cb6afe424 100644 --- a/templates/de/html/ext/ext_surfbar.tpl +++ b/templates/de/html/ext/ext_surfbar.tpl @@ -15,7 +15,7 @@ Basisvergütung gutgeschrieben. Die prozentuale Ref-Vergütung wird jedoch nur von der Basisvergütung berechnet.

Es können auch URLs direkt und nur in die Surfbar gebucht werden. Sie -können zudem eigene URLs (nur aus Sponsorennetzwerken nehmen, wo das +können zudem eigene URLs (nur aus Werbenetzwerken nehmen, wo das Einbinden der URL in eine Surfbar erlaubt ist!) aus dem Adminbereich hinzufügen und dabei eine Reload-Sperre unabhängig von den Standarteinstellungen in Sekunden angeben.
diff --git a/templates/de/html/js/js_jquery.tpl b/templates/de/html/js/js_jquery.tpl new file mode 100644 index 0000000000..926357433e --- /dev/null +++ b/templates/de/html/js/js_jquery.tpl @@ -0,0 +1,4376 @@ +/*! + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.isArray( selector ) ? + selector : + jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.2", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + Array.prototype.slice.call( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: [].push, + sort: [].sort, + splice: [].splice, + + find: function( selector ) { + if ( this.length === 1 ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + })), "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML; + if ( !html ) { + var div = this.ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; + } else + return this.cloneNode(true); + }); + + // Copy the events from the original to the clone + if ( events === true ) { + var orig = this.find("*").andSelf(), i = 0; + + ret.find("*").andSelf().each(function(){ + if ( this.nodeName !== orig[i].nodeName ) + return; + + var events = jQuery.data( orig[i], "events" ); + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + + i++; + }); + } + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, + closer = 0; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { + jQuery.data(cur, "closest", closer); + return cur; + } + cur = cur.parentNode; + closer++; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), this.length > 1 || i > 0 ? + fragment.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && /\S/.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) + return; + + jQuery.each( which, function() { + if ( !extra ) + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + if ( extra === "margin" ) + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + else + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + } + + if ( elem.offsetWidth !== 0 ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and diff --git a/templates/de/html/politician_stop/.htaccess b/templates/de/html/politician_stop/.htaccess new file mode 100644 index 0000000000..3a42882788 --- /dev/null +++ b/templates/de/html/politician_stop/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/templates/de/html/politician_stop/politician_stop_snippet.tpl b/templates/de/html/politician_stop/politician_stop_snippet.tpl new file mode 100644 index 0000000000..74f9c1e633 --- /dev/null +++ b/templates/de/html/politician_stop/politician_stop_snippet.tpl @@ -0,0 +1,85 @@ + + +
+ +

+ Ihr Browser versucht gerade eine Seite aus dem sogenannten Internet + auszudrucken. Das Internet ist ein weltweites Netzwerk von Computern, + das den Menschen ganz neue Möglichkeiten der Kommunikation bietet. +

+ +

+ Da Politiker im Regelfall von neuen Dingen nichts verstehen, halten wir + es für notwendig, sie davor zu schützen. Dies ist im + beidseitigen Interesse, da unnötige Angstzustände bei Ihnen + verhindert werden, ebenso wie es uns vor profilierungs- und + machtsüchtigen Politikern schützt. +

+ +

+ Sollten Sie der Meinung sein, dass Sie diese Internetseite dennoch sehen + sollten, so können Sie jederzeit durch normalen Gebrauch eines + Internetbrowsers darauf zugreifen. Dazu sind aber minimale + Computerkenntnisse erforderlich. Sollten Sie diese nicht haben, + vergessen Sie einfach dieses Internet und lassen uns in Ruhe. +

+ +

+ Die Umgehung dieser Ausdrucksperre ist nach §95a UrhG verboten. +

+ +

+ Mehr Informationen unter www.politiker-stopp.de. +

+
-- 2.30.2