diff options
| author | Pim van den Berg | 2009-09-28 19:53:38 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2009-09-28 20:05:29 +0200 |
| commit | db5bc6fbd9a568bd3267fecff076da455d5e23f7 (patch) | |
| tree | 7d215ed55f1aee8a41172def9707e58e9d91c003 /inc/html.inc.php | |
| parent | add a footer to each page (diff) | |
| download | apt-panopticon_cgp-db5bc6fbd9a568bd3267fecff076da455d5e23f7.zip apt-panopticon_cgp-db5bc6fbd9a568bd3267fecff076da455d5e23f7.tar.gz apt-panopticon_cgp-db5bc6fbd9a568bd3267fecff076da455d5e23f7.tar.bz2 apt-panopticon_cgp-db5bc6fbd9a568bd3267fecff076da455d5e23f7.tar.xz | |
change webdir/weburl and include/require usage
- Don't depend on includes from files that are included.
- Don't use webdir with includes/requires (also because webdir couldn't
be available in some cases).
- Use common.inc.php instead of config.php in all plugins to have all
configuration settings available.
Diffstat (limited to 'inc/html.inc.php')
| -rw-r--r-- | inc/html.inc.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php index 1001381..0a5b342 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
| @@ -1,13 +1,17 @@ | |||
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | require_once 'conf/common.inc.php'; | ||
| 4 | require_once 'inc/rrdtool.class.php'; | ||
| 5 | |||
| 3 | function html_start() { | 6 | function html_start() { |
| 7 | global $CONFIG; | ||
| 4 | echo <<<EOT | 8 | echo <<<EOT |
| 5 | <!DOCTYPE HTML> | 9 | <!DOCTYPE HTML> |
| 6 | <html> | 10 | <html> |
| 7 | <head> | 11 | <head> |
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 12 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 9 | <title>Collectd Graph Panel</title> | 13 | <title>Collectd Graph Panel</title> |
| 10 | <link rel="stylesheet" href="layout/style.css" type="text/css"> | 14 | <link rel="stylesheet" href="{$CONFIG['weburl']}/layout/style.css" type="text/css"> |
| 11 | </head> | 15 | </head> |
| 12 | <body> | 16 | <body> |
| 13 | 17 | ||
| @@ -22,8 +26,6 @@ function html_end() { | |||
| 22 | EOT; | 26 | EOT; |
| 23 | } | 27 | } |
| 24 | 28 | ||
| 25 | require_once 'conf/common.inc.php'; | ||
| 26 | require_once 'inc/rrdtool.class.php'; | ||
| 27 | function host_summary($hosts) { | 29 | function host_summary($hosts) { |
| 28 | global $CONFIG; | 30 | global $CONFIG; |
| 29 | 31 | ||
