Browse code

Statistik-Funktion entfernt

Bernd Wurst authored on29/07/2019 07:26:02
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,86 +0,0 @@
1
-<?php
2
-/*
3
-This file belongs to the Webinterface of schokokeks.org Hosting
4
-
5
-Written 2008-2018 by schokokeks.org Hosting, namely
6
-  Bernd Wurst <bernd@schokokeks.org>
7
-  Hanno Böck <hanno@schokokeks.org>
8
-
9
-To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10
-
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12
-http://creativecommons.org/publicdomain/zero/1.0/
13
-
14
-Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15
-*/
16
-
17
-require_once("inc/base.php");
18
-require_once("vhosts.php");
19
-
20
-require_role(ROLE_SYSTEMUSER);
21
-
22
-$section = 'vhosts_stats';
23
-
24
-warning('Diese Statistiken werden in Kürze abgeschafft. Wenn Sie eine solche Funktion weiterhin nutzen möchten, können Sie mit dem Programm "webalizer" selbst solche Statistiken erstellen lassen. Auf Anfrage können wir Ihnen die bestehenden Daten verfügbar machen um die rückblickenden Auswertungen zu erhalten.');
25
-
26
-// Stellt sicher, dass der angegebene VHost dem User gehört
27
-$vhost = get_vhost_details($_REQUEST['vhost']);
28
-
29
-if (! isset($_REQUEST['file'])) {
30
-    $_REQUEST['file'] = 'index.html';
31
-}
32
-
33
-if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-9]+)?|index)\.(png|html)/', $_REQUEST['file'])) {
34
-    system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
35
-}
36
-
37
-$path = '/home/stats/webalizer/data/' . idn_to_ascii($vhost['fqdn'], 0, INTL_IDNA_VARIANT_UTS46);
38
-$file = $path . '/' . $_REQUEST['file'];
39
-
40
-if (is_file($file)) {
41
-    DEBUG("opening file ".$file);
42
-    if (preg_match('/\.png/', $file)) {
43
-        //Binärdateien
44
-        header("Content-Type: image/png");
45
-        header("Content-Length: " . filesize($file));
46
-        header("Content-Transfer-Encoding: binary\n");
47
-
48
-        $fp = fopen($file, "r");
49
-        fpassthru($fp);
50
-        die();
51
-    }
52
-
53
-    $html = iconv('latin9', 'utf8', file_get_contents($file));
54
-    DEBUG($html);
55
-    // Nur content vom HTML
56
-    $html = preg_replace(':^.*?<BODY[^>]*>(.*)</BODY>.*$:si', '$1', $html);
57
-    DEBUG($html);
58
-
59
-    // <BR> rewriten
60
-    $html = preg_replace('/<BR>/', '<BR />', $html);
61
-    // <HR> rewriten
62
-    $html = preg_replace('/<HR>/', '<HR />', $html);
63
-    // <P> rewriten
64
-    $html = preg_replace('/<P>/', '<BR />', $html);
65
-    // NOWRAP rewriten
66
-    $html = preg_replace('/NOWRAP/', 'nowrap="nowrap"', $html);
67
-    // lowercase tag names and keys
68
-    $html = preg_replace_callback('/(<[^ >]+[ >])/', function ($s) {
69
-        return strtolower($s[0]);
70
-    }, $html);
71
-    $html = preg_replace_callback('/( [A-Z]+=)/', function ($s) {
72
-        return strtolower($s[0]);
73
-    }, $html);
74
-    // xml-values mit anführungszeichen
75
-    $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
76
-    // Bilder rewriten
77
-    $html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html);
78
-
79
-    // Bilder rewriten
80
-    $html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
81
-    // Interne Links rewriten
82
-    $html = preg_replace('!href="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'href="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
83
-    output($html);
84
-} else {
85
-    system_failure("Die Statistiken konnten nicht gefunden werden. Beachten Sie bitte, dass die Erstellung regelmäßig nachts geschieht. Neu in Auftrag gegebene Statistiken können Sie erst am darauffolgenden Tag betrachten.");
86
-}
Browse code

warning about shutdown of the statistics feature

Bernd Wurst authored on07/05/2019 13:06:34
Showing1 changed files
... ...
@@ -21,6 +21,8 @@ require_role(ROLE_SYSTEMUSER);
21 21
 
22 22
 $section = 'vhosts_stats';
23 23
 
24
+warning('Diese Statistiken werden in Kürze abgeschafft. Wenn Sie eine solche Funktion weiterhin nutzen möchten, können Sie mit dem Programm "webalizer" selbst solche Statistiken erstellen lassen. Auf Anfrage können wir Ihnen die bestehenden Daten verfügbar machen um die rückblickenden Auswertungen zu erhalten.');
25
+
24 26
 // Stellt sicher, dass der angegebene VHost dem User gehört
25 27
 $vhost = get_vhost_details($_REQUEST['vhost']);
26 28
 
Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -42,7 +42,7 @@ if (is_file($file)) {
42 42
         header("Content-Type: image/png");
43 43
         header("Content-Length: " . filesize($file));
44 44
         header("Content-Transfer-Encoding: binary\n");
45
-    
45
+
46 46
         $fp = fopen($file, "r");
47 47
         fpassthru($fp);
48 48
         die();
... ...
@@ -73,7 +73,7 @@ if (is_file($file)) {
73 73
     $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
74 74
     // Bilder rewriten
75 75
     $html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html);
76
-  
76
+
77 77
     // Bilder rewriten
78 78
     $html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
79 79
     // Interne Links rewriten
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 9
 To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 14
 Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
... ...
@@ -24,66 +24,61 @@ $section = 'vhosts_stats';
24 24
 // Stellt sicher, dass der angegebene VHost dem User gehört
25 25
 $vhost = get_vhost_details($_REQUEST['vhost']);
26 26
 
27
-if (! isset($_REQUEST['file']))
28
-{
29
-  $_REQUEST['file'] = 'index.html';
27
+if (! isset($_REQUEST['file'])) {
28
+    $_REQUEST['file'] = 'index.html';
30 29
 }
31 30
 
32
-if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-9]+)?|index)\.(png|html)/', $_REQUEST['file']))
33
-{
34
-  system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
31
+if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-9]+)?|index)\.(png|html)/', $_REQUEST['file'])) {
32
+    system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
35 33
 }
36 34
 
37 35
 $path = '/home/stats/webalizer/data/' . idn_to_ascii($vhost['fqdn'], 0, INTL_IDNA_VARIANT_UTS46);
38 36
 $file = $path . '/' . $_REQUEST['file'];
39 37
 
40
-if ( is_file($file) )
41
-{
42
-  DEBUG("opening file ".$file);
43
-  if (preg_match('/\.png/', $file))
44
-  {
45
-    //Binärdateien
46
-    header("Content-Type: image/png");
47
-    header("Content-Length: " . filesize($file));
48
-    header("Content-Transfer-Encoding: binary\n");
38
+if (is_file($file)) {
39
+    DEBUG("opening file ".$file);
40
+    if (preg_match('/\.png/', $file)) {
41
+        //Binärdateien
42
+        header("Content-Type: image/png");
43
+        header("Content-Length: " . filesize($file));
44
+        header("Content-Transfer-Encoding: binary\n");
49 45
     
50
-    $fp = fopen($file, "r");
51
-    fpassthru($fp);
52
-    die();
53
-  }
54
-
55
-  $html = iconv('latin9', 'utf8', file_get_contents($file));
56
-  DEBUG($html);
57
-  // Nur content vom HTML
58
-  $html = preg_replace(':^.*?<BODY[^>]*>(.*)</BODY>.*$:si', '$1', $html);
59
-  DEBUG($html);
60
-
61
-  // <BR> rewriten
62
-  $html = preg_replace('/<BR>/', '<BR />', $html);
63
-  // <HR> rewriten
64
-  $html = preg_replace('/<HR>/', '<HR />', $html);
65
-  // <P> rewriten
66
-  $html = preg_replace('/<P>/', '<BR />', $html);
67
-  // NOWRAP rewriten
68
-  $html = preg_replace('/NOWRAP/', 'nowrap="nowrap"', $html);
69
-  // lowercase tag names and keys
70
-  $html = preg_replace_callback('/(<[^ >]+[ >])/', function ($s) { return strtolower($s[0]); }, $html);
71
-  $html = preg_replace_callback('/( [A-Z]+=)/', function ($s) { return strtolower($s[0]); }, $html);
72
-  // xml-values mit anführungszeichen
73
-  $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
74
-  // Bilder rewriten
75
-  $html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html);
46
+        $fp = fopen($file, "r");
47
+        fpassthru($fp);
48
+        die();
49
+    }
50
+
51
+    $html = iconv('latin9', 'utf8', file_get_contents($file));
52
+    DEBUG($html);
53
+    // Nur content vom HTML
54
+    $html = preg_replace(':^.*?<BODY[^>]*>(.*)</BODY>.*$:si', '$1', $html);
55
+    DEBUG($html);
56
+
57
+    // <BR> rewriten
58
+    $html = preg_replace('/<BR>/', '<BR />', $html);
59
+    // <HR> rewriten
60
+    $html = preg_replace('/<HR>/', '<HR />', $html);
61
+    // <P> rewriten
62
+    $html = preg_replace('/<P>/', '<BR />', $html);
63
+    // NOWRAP rewriten
64
+    $html = preg_replace('/NOWRAP/', 'nowrap="nowrap"', $html);
65
+    // lowercase tag names and keys
66
+    $html = preg_replace_callback('/(<[^ >]+[ >])/', function ($s) {
67
+        return strtolower($s[0]);
68
+    }, $html);
69
+    $html = preg_replace_callback('/( [A-Z]+=)/', function ($s) {
70
+        return strtolower($s[0]);
71
+    }, $html);
72
+    // xml-values mit anführungszeichen
73
+    $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
74
+    // Bilder rewriten
75
+    $html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html);
76 76
   
77
-  // Bilder rewriten
78
-  $html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
79
-  // Interne Links rewriten
80
-  $html = preg_replace('!href="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'href="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
81
-  output($html);
82
-}
83
-else
84
-{
85
-  system_failure("Die Statistiken konnten nicht gefunden werden. Beachten Sie bitte, dass die Erstellung regelmäßig nachts geschieht. Neu in Auftrag gegebene Statistiken können Sie erst am darauffolgenden Tag betrachten.");
77
+    // Bilder rewriten
78
+    $html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
79
+    // Interne Links rewriten
80
+    $html = preg_replace('!href="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'href="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
81
+    output($html);
82
+} else {
83
+    system_failure("Die Statistiken konnten nicht gefunden werden. Beachten Sie bitte, dass die Erstellung regelmäßig nachts geschieht. Neu in Auftrag gegebene Statistiken können Sie erst am darauffolgenden Tag betrachten.");
86 84
 }
87
-
88
-
89
-
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Ermögliche die Verwendung von erweiterten Zeichen (z.B. im Domainnamen)

Bernd Wurst authored on22/12/2017 07:39:52
Showing1 changed files
... ...
@@ -34,7 +34,7 @@ if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-
34 34
   system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
35 35
 }
36 36
 
37
-$path = '/home/stats/webalizer/data/' . idn_to_ascii($vhost['fqdn']);
37
+$path = '/home/stats/webalizer/data/' . idn_to_ascii($vhost['fqdn'], 0, INTL_IDNA_VARIANT_UTS46);
38 38
 $file = $path . '/' . $_REQUEST['file'];
39 39
 
40 40
 if ( is_file($file) )
Browse code

Benutze idn_to_ascii für den Zugriff auf stats-Verzeichnis

Bernd Wurst authored on10/09/2016 06:44:43
Showing1 changed files
... ...
@@ -34,7 +34,7 @@ if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-
34 34
   system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
35 35
 }
36 36
 
37
-$path = '/home/stats/webalizer/data/' . $vhost['fqdn'];
37
+$path = '/home/stats/webalizer/data/' . idn_to_ascii($vhost['fqdn']);
38 38
 $file = $path . '/' . $_REQUEST['file'];
39 39
 
40 40
 if ( is_file($file) )
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

preg_replace(/.../e) ersetzt durch preg_replace_callback()

Bernd Wurst authored on04/02/2014 11:39:53
Showing1 changed files
... ...
@@ -67,8 +67,8 @@ if ( is_file($file) )
67 67
   // NOWRAP rewriten
68 68
   $html = preg_replace('/NOWRAP/', 'nowrap="nowrap"', $html);
69 69
   // lowercase tag names and keys
70
-  $html = preg_replace('/(<[^ ]+ )/e', "strtolower('$1')", $html);
71
-  $html = preg_replace('/( [A-Z]+=)/e', "strtolower('$1')", $html);
70
+  $html = preg_replace_callback('/(<[^ >]+[ >])/', function ($s) { return strtolower($s[0]); }, $html);
71
+  $html = preg_replace_callback('/( [A-Z]+=)/', function ($s) { return strtolower($s[0]); }, $html);
72 72
   // xml-values mit anführungszeichen
73 73
   $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
74 74
   // Bilder rewriten
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on19/01/2013 10:49:50
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on11/03/2012 15:40:04
Showing1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 by schokokeks.org Hosting, namely
6
+  Bernd Wurst <bernd@schokokeks.org>
7
+  Hanno Böck <hanno@schokokeks.org>
8
+
9
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10
+
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12
+http://creativecommons.org/publicdomain/zero/1.0/
13
+
14
+Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15
+*/
2 16
 
3 17
 require_once("inc/base.php");
4 18
 require_once("vhosts.php");
Browse code

Diverse XML-Fehler behoben

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1690 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on09/03/2010 15:12:06
Showing1 changed files
... ...
@@ -44,10 +44,26 @@ if ( is_file($file) )
44 44
   $html = preg_replace(':^.*?<BODY[^>]*>(.*)</BODY>.*$:si', '$1', $html);
45 45
   DEBUG($html);
46 46
 
47
+  // <BR> rewriten
48
+  $html = preg_replace('/<BR>/', '<BR />', $html);
49
+  // <HR> rewriten
50
+  $html = preg_replace('/<HR>/', '<HR />', $html);
51
+  // <P> rewriten
52
+  $html = preg_replace('/<P>/', '<BR />', $html);
53
+  // NOWRAP rewriten
54
+  $html = preg_replace('/NOWRAP/', 'nowrap="nowrap"', $html);
55
+  // lowercase tag names and keys
56
+  $html = preg_replace('/(<[^ ]+ )/e', "strtolower('$1')", $html);
57
+  $html = preg_replace('/( [A-Z]+=)/e', "strtolower('$1')", $html);
58
+  // xml-values mit anführungszeichen
59
+  $html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html);
47 60
   // Bilder rewriten
48
-  $html = preg_replace('/SRC="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'SRC="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
61
+  $html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html);
62
+  
63
+  // Bilder rewriten
64
+  $html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
49 65
   // Interne Links rewriten
50
-  $html = preg_replace('!HREF="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'HREF="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
66
+  $html = preg_replace('!href="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'href="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
51 67
   output($html);
52 68
 }
53 69
 else
Browse code

Webalizer/Statistik-Funktionalität

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1615 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on22/01/2010 07:48:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,59 @@
1
+<?php
2
+
3
+require_once("inc/base.php");
4
+require_once("vhosts.php");
5
+
6
+require_role(ROLE_SYSTEMUSER);
7
+
8
+$section = 'vhosts_stats';
9
+
10
+// Stellt sicher, dass der angegebene VHost dem User gehört
11
+$vhost = get_vhost_details($_REQUEST['vhost']);
12
+
13
+if (! isset($_REQUEST['file']))
14
+{
15
+  $_REQUEST['file'] = 'index.html';
16
+}
17
+
18
+if (!preg_match('/((daily_|hourly_|ctry_)?(usage|agent|search|ref|url|site)(_[0-9]+)?|index)\.(png|html)/', $_REQUEST['file']))
19
+{
20
+  system_failure("Ungültiger Dateiname: »".filter_input_general($_REQUEST['file'])."«");
21
+}
22
+
23
+$path = '/home/stats/webalizer/data/' . $vhost['fqdn'];
24
+$file = $path . '/' . $_REQUEST['file'];
25
+
26
+if ( is_file($file) )
27
+{
28
+  DEBUG("opening file ".$file);
29
+  if (preg_match('/\.png/', $file))
30
+  {
31
+    //Binärdateien
32
+    header("Content-Type: image/png");
33
+    header("Content-Length: " . filesize($file));
34
+    header("Content-Transfer-Encoding: binary\n");
35
+    
36
+    $fp = fopen($file, "r");
37
+    fpassthru($fp);
38
+    die();
39
+  }
40
+
41
+  $html = iconv('latin9', 'utf8', file_get_contents($file));
42
+  DEBUG($html);
43
+  // Nur content vom HTML
44
+  $html = preg_replace(':^.*?<BODY[^>]*>(.*)</BODY>.*$:si', '$1', $html);
45
+  DEBUG($html);
46
+
47
+  // Bilder rewriten
48
+  $html = preg_replace('/SRC="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'SRC="showstats?vhost='.$vhost['id'].'&amp;file=$1"', $html);
49
+  // Interne Links rewriten
50
+  $html = preg_replace('!HREF="(./)?((usage|agent|search|ref|url|site|index)(_[0-9]+)?\.html)"!', 'HREF="showstats?vhost='.$vhost['id'].'&amp;file=$2"', $html);
51
+  output($html);
52
+}
53
+else
54
+{
55
+  system_failure("Die Statistiken konnten nicht gefunden werden. Beachten Sie bitte, dass die Erstellung regelmäßig nachts geschieht. Neu in Auftrag gegebene Statistiken können Sie erst am darauffolgenden Tag betrachten.");
56
+}
57
+
58
+
59
+