From: Roland Häder Date: Fri, 31 Jul 2009 16:23:44 +0000 (+0000) Subject: Script extended with JavaScript templates and ext-uberwach added, see http://www... X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=444470f309a050293341c95917beb89d60a394b9 Script extended with JavaScript templates and ext-uberwach added, see http://www.uberwach.de for details --- diff --git a/.gitattributes b/.gitattributes index 278d7ab8fc..37887effc1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -160,6 +160,7 @@ inc/extensions/ext-task.php -text inc/extensions/ext-theme.php -text inc/extensions/ext-top10.php -text inc/extensions/ext-transfer.php -text +inc/extensions/ext-uberwach.php -text inc/extensions/ext-usage.php -text inc/extensions/ext-user.php -text inc/extensions/ext-wernis.php -text @@ -177,6 +178,7 @@ inc/hooks.php -text inc/img/.htaccess -text inc/install-inc.php -text inc/js/.htaccess -text +inc/js/js-uberwach.php -text inc/language-functions.php -text inc/language.php -text inc/language/.htaccess -text @@ -261,6 +263,7 @@ inc/libs/surfbar_functions.php -text inc/libs/task_functions.php -text inc/libs/theme_functions.php -text inc/libs/transfer_functions.php -text +inc/libs/uberwach_functions.php -text inc/libs/user_functions.php -text inc/libs/wernis_functions.php -text inc/libs/yoomedia_functions.php -text @@ -1279,6 +1282,7 @@ templates/de/html/ext/ext_task.tpl -text templates/de/html/ext/ext_theme.tpl -text templates/de/html/ext/ext_top10.tpl -text templates/de/html/ext/ext_transfer.tpl -text +templates/de/html/ext/ext_uberwach.tpl -text templates/de/html/ext/ext_usage.tpl -text templates/de/html/ext/ext_user.tpl -text templates/de/html/ext/ext_wernis.tpl -text @@ -1356,6 +1360,8 @@ templates/de/html/install/install_page1.tpl -text templates/de/html/install/install_page2.tpl -text templates/de/html/install/install_page3.tpl -text templates/de/html/install/install_welcome.tpl -text +templates/de/html/js/.htaccess -text +templates/de/html/js/js_uberwach.tpl -text templates/de/html/lead_code.tpl -text templates/de/html/loader.tpl -text templates/de/html/login_failed_js.tpl -text @@ -1541,6 +1547,8 @@ templates/de/html/theme/.htaccess -text templates/de/html/theme/theme_one.tpl -text templates/de/html/theme/theme_select_box.tpl -text templates/de/html/theme/theme_select_form.tpl -text +templates/de/html/uberwach/.htaccess -text +templates/de/html/uberwach/uberwach_snippet.tpl -text templates/de/html/welcome.tpl -text templates/en/html/admin/admin_welcome.tpl -text templates/en/html/impressum.tpl -text @@ -1558,6 +1566,7 @@ theme/business/css/sponsor.css -text theme/business/css/surfbar.css -text theme/business/css/top10.css -text theme/business/css/transfer.css -text +theme/business/css/uberwach.css -text theme/business/images/code_bg.jpg -text theme/business/images/code_bg.png -text theme/business/theme.php -text @@ -1572,6 +1581,7 @@ theme/default/css/sponsor.css -text theme/default/css/surfbar.css -text theme/default/css/top10.css -text theme/default/css/transfer.css -text +theme/default/css/uberwach.css -text theme/default/images/code_bg.jpg -text theme/default/images/code_bg.png -text theme/default/theme.php -text @@ -1588,6 +1598,7 @@ theme/desert/css/sponsor.css -text theme/desert/css/surfbar.css -text theme/desert/css/top10.css -text theme/desert/css/transfer.css -text +theme/desert/css/uberwach.css -text theme/desert/images/code_bg.jpg -text theme/desert/images/code_bg.png -text theme/desert/images/help/bullet.png -text @@ -1596,4 +1607,6 @@ 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/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php new file mode 100644 index 0000000000..00aa73a4c5 --- /dev/null +++ b/inc/extensions/ext-uberwach.php @@ -0,0 +1,92 @@ + diff --git a/inc/footer.php b/inc/footer.php index f35efd9cbf..765c02eb09 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -47,6 +47,7 @@ if (!defined('__SECURITY')) { // 1234 5 54 45 5 5 543 3 321 if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && ($GLOBALS['footer_sent'] != '2'))) && (getOutputMode() != '1'))) { // Output the generated HTML code or do nothing in direct-mode + // @TODO Rewrite these all into filters if (getTotalFatalErrors() > 0) { // Output fatal error messages loadIncludeOnce('inc/fatal_errors.php'); @@ -70,6 +71,12 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && displayParsingTime(); } // END - if + // Shall we include the uberwach snippet? + if ((EXT_IS_ACTIVE('uberwach')) && ($GLOBALS['header_sent'] == '2')) { + // Then display it here + loadUberwachSnippet(); + } // END - if + // Load page footer LOAD_TEMPLATE('page_footer'); diff --git a/inc/functions.php b/inc/functions.php index ea7a4297b0..5acdb2688c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -289,13 +289,16 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { } elseif (strpos($template, 'la_') > -1) { // 'Logical-area' template found $mode = 'la/'; + } elseif (strpos($template, 'js_') > -1) { + // JavaScript template found + $mode = 'js/'; } else { // Test for extension $test = substr($template, 0, strpos($template, '_')); if (EXT_IS_ACTIVE($test)) { // Set extra path to extension's name - $mode = $test.'/'; - } + $mode = $test . '/'; + } // END - if } //////////////////////// diff --git a/inc/js/js-uberwach.php b/inc/js/js-uberwach.php new file mode 100644 index 0000000000..a73fe0779e --- /dev/null +++ b/inc/js/js-uberwach.php @@ -0,0 +1,48 @@ + diff --git a/inc/libs/uberwach_functions.php b/inc/libs/uberwach_functions.php new file mode 100644 index 0000000000..1f8f48fafd --- /dev/null +++ b/inc/libs/uberwach_functions.php @@ -0,0 +1,52 @@ + diff --git a/js.php b/js.php index 2868eb1291..cf93e394b3 100644 --- a/js.php +++ b/js.php @@ -61,8 +61,8 @@ if ((isInstalled()) && (REQUEST_ISSET_GET('tag'))) { loadIncludeOnce('inc/header.php'); // Prepare include file for looking - $INC = sprintf("inc/js/tag-%s.php", - REQUEST_GET('tag') + $INC = sprintf("inc/js/js-%s.php", + REQUEST_GET('tag') ); // Is that file readable? diff --git a/templates/de/html/ext/ext_uberwach.tpl b/templates/de/html/ext/ext_uberwach.tpl new file mode 100644 index 0000000000..bee69b1ff1 --- /dev/null +++ b/templates/de/html/ext/ext_uberwach.tpl @@ -0,0 +1,25 @@ +Intention der Aktion "ÜBERWACH!"
+
+Die große Koalition aus CDU & SPD will Deutschland in Zeiten des +internationalen Terrors zu einem sicheren Land fÜr uns alle machen.
+
+Das klingt auf den ersten Blick gut, ist es aber auf den zweiten gar nicht.
+
+Denn das wenig mehr an Sicherheit sollen wir, die BÜrger dieses Landes, +teuer mit einem großen Verlust an persönlicher Freiheit bezahlen. De +facto droht die Bundesrepublik Deutschland durch die geplanten Maßnahmen +zu einem präventiven Überwachungsstaat umgebaut zu werden.
+
+Die Aktion “ÜBERWACH!” will auf diese besorgniserregende Entwicklung +aufmerksam machen, indem sie den Spieß umdreht und den Geruch der +Überwachung den Bundes- und Landesministerien, sowie den Regierungs- +und Oppositionsparteien selbst unter die Nase reibt.
+
+Übrigens: Fakten und Hintergrundinfos zu den Plänen der +Bundesregierung sowie zahlreiche Möglichkeiten zum aktiven Protest +findest du auf den Seiten des Arbeitskreises Vorratsdatenspeicherung.
+
+Quelle: www.uberwach.de diff --git a/templates/de/html/js/.htaccess b/templates/de/html/js/.htaccess new file mode 100644 index 0000000000..03688ee918 --- /dev/null +++ b/templates/de/html/js/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/templates/de/html/js/js_uberwach.tpl b/templates/de/html/js/js_uberwach.tpl new file mode 100644 index 0000000000..2b3f424e7f --- /dev/null +++ b/templates/de/html/js/js_uberwach.tpl @@ -0,0 +1,75 @@ +// www.uberwach.de - v2.2.2 +(function () { + var ips=['193.17.232.0-193.17.247.255','192.109.71.0-192.109.71.255','193.17.88.0-193.17.95.255','193.158.73.40-193.158.73.47','193.102.16.0-193.102.16.255','193.17.88.0-193.17.95.255','193.175.51.0-193.175.51.255','193.196.130.0-193.196.131.255','193.22.240.0-193.22.241.255','193.22.246.0-193.22.247.255','194.117.124.151-194.117.124.151','194.180.44.0-194.180.48.255','194.196.76.0-194.196.76.255','194.94.100.0-194.94.103.255','194.94.221.0-194.94.221.255','194.95.96.0-194.95.97.255','195.112.175.60-195.112.175.63','195.127.210.128-195.127.210.159','195.145.115.232-195.145.115.239','195.145.199.224-195.145.199.231','195.158.157.240-195.158.157.247','195.243.81.0-195.243.81.7','195.30.232.120-195.30.232.123','195.30.232.128-195.30.232.191','195.37.100.0-195.37.101.255','195.37.130.0-195.37.131.255','212.18.22.160-212.18.22.191','213.139.136.112-213.139.136.127','213.139.146.132-213.139.146.135','213.160.31.96-213.160.31.103','217.110.186.216-217.110.186.223','217.19.187.0-217.19.187.15','217.19.187.64-217.19.187.95','217.19.187.96-217.19.187.103','217.6.229.216-217.6.229.223','217.89.43.24-217.89.43.31','80.146.186.80-80.146.186.87','80.150.3.144-80.150.3.151','82.135.124.112-82.135.124.127','82.195.68.0-82.195.69.255','80.146.207.248-80.146.207.255','195.50.146.0-195.50.146.255','212.84.192.192-212.84.192.255','62.153.115.56-62.153.115.63','62.154.194.88-62.154.194.95','212.222.53.128-212.222.53.255','213.68.139.68-213.68.139.71','193.175.83.0-193.175.83.255','194.95.166.0-194.95.166.255','194.95.176.0-194.95.179.255','192.129.8.0-192.129.8.255','193.159.218.0-193.159.219.191','62.134.61.0-62.134.61.255','193.159.218.0-193.159.219.191','83.243.48.0-83.243.55.255','164.133.0.0-164.133.255.255','195.37.188.64-195.37.188.127','195.37.188.192-195.37.188.223','195.37.191.32-195.37.191.47','80.245.144.0-80.245.147.255','217.6.26.216-217.6.26.223','217.7.176.24-217.7.176.27','193.197.150.208-193.197.150.223','194.25.241.128-194.25.241.143','62.225.163.152-62.225.163.159','212.202.112.152-212.202.112.159','217.7.170.48-217.7.170.51','87.193.145.200-87.193.145.207','87.193.146.16-87.193.146.23','213.23.143.176-213.23.143.191','213.23.40.248-213.23.40.255','213.23.41.16-213.23.41.23','213.23.41.8-213.23.41.15','217.7.101.96-217.7.101.103','62.153.210.128-62.153.210.135','62.153.237.8-62.153.237.15','193.17.86.0-193.17.87.255','193.197.144.0-193.197.144.255','195.125.241.128-195.125.241.143','195.158.157.64-195.158.157.127','213.128.100.96-213.128.100.103','195.244.234.192-195.244.234.255','217.18.179.240-217.18.179.251','62.245.144.216-62.245.144.223','62.245.178.136-62.245.178.143','212.202.117.133-212.202.117.133','80.86.167.64-80.86.167.111','87.234.227.176-87.234.227.183','212.202.166.48-212.202.166.55','217.110.149.88-217.110.149.95','217.110.174.224-217.110.174.231','217.110.45.8-217.110.45.15','87.193.167.233-87.193.167.233','195.243.128.224-195.243.128.231','212.60.22.151-212.60.22.151','212.88.128.200-212.88.128.207','213.139.133.208-213.139.133.223','213.139.146.96-213.139.146.99','213.139.146.76-213.139.146.79','213.139.151.128-213.139.151.143','217.110.149.48-217.110.149.55','62.157.167.64-62.157.167.71','217.19.190.216-217.19.190.223','62.154.250.0-62.154.250.7','83.236.232.216-83.236.232.223','213.183.13.0-213.183.13.31','213.183.5.88-213.183.5.95','212.82.39.8-212.82.39.15','212.84.227.0-212.84.227.255','212.9.165.232-212.9.165.239','213.183.160.212-213.183.160.215','213.183.187.110-213.183.187.110','62.156.191.128-62.156.191.255','80.146.207.248-80.146.207.255']; + var filter=function() { + for (var i=0,l=ips.length;i=ip2long(d[0]) && ip<=ip2long(d[1])); + }; + var ip2long=function(ip) { + var p = ip.split('.'); + return (parseFloat(p[0]*16777216)+parseFloat(p[1]*65536)+parseFloat(p[2]*256)+parseFloat(p[3])); + }; + var addStyles=function(c) { + if(document.createStyleSheet){ + document.createStyleSheet(c); + } else { + var d=document.createElement('link'); + d.rel='stylesheet'; + d.href=c; + document.getElementsByTagName("head")[0].appendChild(d); + } + }; + var hint=function(c,i,t){ + var d = document.createElement('div'); + d.setAttribute('id','au_hi'); + d.setAttribute('class',c); + d.setAttribute('className',c); + d.innerHTML = '

Aktion UBERWACH!Der Zugriff auf diese Seite wurde '+t+' protokolliert. Über die Aktion "ÜBERWACH!"

'; + var b = document.body; + b.appendChild(d); + b.style.marginTop=px(getCSS(b,"marginTop"))+30+"px"; + }; + var getCSS=function(e,p){ + if(document.defaultView && document.defaultView.getComputedStyle) + return document.defaultView.getComputedStyle(e,"").getPropertyValue(p.replace(/([A-Z])/g,"-$1").toLowerCase()); + else if(e.currentStyle) + return e.currentStyle[p]; + else if(e.style) + return e.style[p]; + return false; + } + var px=function(v) { + var u = v.match(/em|px|ex|in|mm|cm|pt|%|pc/); + if(!document.createElement || u=="") return parseInt(v); + var d = document.createElement('div'); + var s = d.style; + s.position = 'absolute'; + s.padding = 0; + s.margin = 0; + s.border= "none"; + s.width = '1' + u; + document.body.appendChild(d); + v = d.offsetWidth*parseInt(v); + document.body.removeChild(d); + return v; + } + var main = function(){ + addStyles('/uberwach.css'); + if (filter()) + hint('au_hi_r', 'http://www.uberwach.de/wanze-kamera.gif?'+escape(window.location), 'so eben von der Aktion "ÜBERWACH!"'); + else + hint('au_hi_g', '{!URL!}/uberwach/uberwach-kamera-gruen.gif', 'von der Aktion "ÜBERWACH!" nicht '); + }; + if (window.addEventListener) { + window.addEventListener('load', main, false); + } else if (window.attachEvent) { + window.attachEvent('onload', main); + } +})(); diff --git a/templates/de/html/uberwach/.htaccess b/templates/de/html/uberwach/.htaccess new file mode 100644 index 0000000000..03688ee918 --- /dev/null +++ b/templates/de/html/uberwach/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/templates/de/html/uberwach/uberwach_snippet.tpl b/templates/de/html/uberwach/uberwach_snippet.tpl new file mode 100644 index 0000000000..a4452be7c7 --- /dev/null +++ b/templates/de/html/uberwach/uberwach_snippet.tpl @@ -0,0 +1,8 @@ + + + + + + diff --git a/theme/business/css/uberwach.css b/theme/business/css/uberwach.css new file mode 100644 index 0000000000..35b79f2c93 --- /dev/null +++ b/theme/business/css/uberwach.css @@ -0,0 +1,54 @@ +#au_hi { + position:absolute; + z-index:1234; + top:0; + right:0; + left:0; + padding:0; + margin:0; + border-left:none; + border-right:none; + border-top:1px solid #FFFFFF; + border-bottom:1px solid #ACA899; + height:27px; + display:block; + width:100%; + overflow:hidden; + float:none; +} +#au_hi p { + border:none; + width:auto; + background:none; + margin:0; + padding:0 7px; + font-size:11px; + color:#003366; + float:none; + text-align:left; +} +#au_hi img { + border:none; + background:none; + margin:0; + padding:0 7px; + width:19px; + height:19px; +} +#au_hi a, #au_hi a:hover { + border:none; + background:none; + margin:0; + padding:0; + font-size:11px; + color:#003366; + text-decoration:underline; +} +.au_hi_r { + background:none; + background-color:#FFCCAA; +} +.au_hi_g { + background:none; + background-color:#D5FFAA; +} diff --git a/theme/default/css/uberwach.css b/theme/default/css/uberwach.css new file mode 100644 index 0000000000..35b79f2c93 --- /dev/null +++ b/theme/default/css/uberwach.css @@ -0,0 +1,54 @@ +#au_hi { + position:absolute; + z-index:1234; + top:0; + right:0; + left:0; + padding:0; + margin:0; + border-left:none; + border-right:none; + border-top:1px solid #FFFFFF; + border-bottom:1px solid #ACA899; + height:27px; + display:block; + width:100%; + overflow:hidden; + float:none; +} +#au_hi p { + border:none; + width:auto; + background:none; + margin:0; + padding:0 7px; + font-size:11px; + color:#003366; + float:none; + text-align:left; +} +#au_hi img { + border:none; + background:none; + margin:0; + padding:0 7px; + width:19px; + height:19px; +} +#au_hi a, #au_hi a:hover { + border:none; + background:none; + margin:0; + padding:0; + font-size:11px; + color:#003366; + text-decoration:underline; +} +.au_hi_r { + background:none; + background-color:#FFCCAA; +} +.au_hi_g { + background:none; + background-color:#D5FFAA; +} diff --git a/theme/desert/css/uberwach.css b/theme/desert/css/uberwach.css new file mode 100644 index 0000000000..35b79f2c93 --- /dev/null +++ b/theme/desert/css/uberwach.css @@ -0,0 +1,54 @@ +#au_hi { + position:absolute; + z-index:1234; + top:0; + right:0; + left:0; + padding:0; + margin:0; + border-left:none; + border-right:none; + border-top:1px solid #FFFFFF; + border-bottom:1px solid #ACA899; + height:27px; + display:block; + width:100%; + overflow:hidden; + float:none; +} +#au_hi p { + border:none; + width:auto; + background:none; + margin:0; + padding:0 7px; + font-size:11px; + color:#003366; + float:none; + text-align:left; +} +#au_hi img { + border:none; + background:none; + margin:0; + padding:0 7px; + width:19px; + height:19px; +} +#au_hi a, #au_hi a:hover { + border:none; + background:none; + margin:0; + padding:0; + font-size:11px; + color:#003366; + text-decoration:underline; +} +.au_hi_r { + background:none; + background-color:#FFCCAA; +} +.au_hi_g { + background:none; + background-color:#D5FFAA; +} diff --git a/uberwach/uberwach-button-gruen.gif b/uberwach/uberwach-button-gruen.gif new file mode 100644 index 0000000000..c9daf7d4b5 Binary files /dev/null and b/uberwach/uberwach-button-gruen.gif differ diff --git a/uberwach/uberwach-kamera-gruen.gif b/uberwach/uberwach-kamera-gruen.gif new file mode 100644 index 0000000000..4412bcbc72 Binary files /dev/null and b/uberwach/uberwach-kamera-gruen.gif differ