From: Roland Häder Date: Tue, 3 Nov 2009 15:22:29 +0000 (+0000) Subject: New extension added, ext-uberwach rewritten (unfinished), some fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26ea563a90454a2cde58f8cd134542a0d8f14780;p=mailer.git 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 --- 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 0000000000..483e6831fc Binary files /dev/null and b/img/politician-stop/politiker-stopp-print-kopf.png differ diff --git a/img/politician-stop/politiker-stopp_150x24.png b/img/politician-stop/politiker-stopp_150x24.png new file mode 100644 index 0000000000..4f92ce95bf Binary files /dev/null and b/img/politician-stop/politiker-stopp_150x24.png differ diff --git a/img/uberwach/uberwach-button-gruen.gif b/img/uberwach/uberwach-button-gruen.gif new file mode 100644 index 0000000000..c9daf7d4b5 Binary files /dev/null and b/img/uberwach/uberwach-button-gruen.gif differ diff --git a/img/uberwach/uberwach-kamera-gruen.gif b/img/uberwach/uberwach-kamera-gruen.gif new file mode 100644 index 0000000000..4412bcbc72 Binary files /dev/null and b/img/uberwach/uberwach-kamera-gruen.gif differ diff --git a/inc/config-global.php b/inc/config-global.php index cc8d5e1110..6b193f4b47 100644 --- a/inc/config-global.php +++ b/inc/config-global.php @@ -92,8 +92,8 @@ setConfigEntry('COPY', 'Copyright © 2003 - 2009, by Roland Häder'); // CFG: CACHE-PATH setConfigEntry('CACHE_PATH', getConfig('PATH') . 'inc/cache/'); -// CFG: STATS-ENABLED (performance impact, we use files now) -setConfigEntry('STATS_ENABLED', 'N'); +// CFG: STATS-ENABLED (temporary tables, if your database crashs all is gone) +setConfigEntry('STATS_ENABLED', 'Y'); // Connect to the MySQL database... loadIncludeOnce('inc/mysql-connect.php'); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 465e0d5b2c..a5b6d67c78 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -119,12 +119,12 @@ Query string:
} // 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. +

+
diff --git a/uberwach/uberwach-button-gruen.gif b/uberwach/uberwach-button-gruen.gif deleted file mode 100644 index c9daf7d4b5..0000000000 Binary files a/uberwach/uberwach-button-gruen.gif and /dev/null differ diff --git a/uberwach/uberwach-kamera-gruen.gif b/uberwach/uberwach-kamera-gruen.gif deleted file mode 100644 index 4412bcbc72..0000000000 Binary files a/uberwach/uberwach-kamera-gruen.gif and /dev/null differ