aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/host.php
diff options
context:
space:
mode:
authorPim van den Berg2009-12-28 10:59:29 +0100
committerPim van den Berg2009-12-28 10:59:29 +0100
commit0808310391b8ecb5b8cdee3c922ffccc076c8daa (patch)
treea704d189bddd04ce2aee978134a6b95ae1bf74db /host.php
parentload plugins on the host page via ajax (diff)
downloadapt-panopticon_cgp-0808310391b8ecb5b8cdee3c922ffccc076c8daa.zip
apt-panopticon_cgp-0808310391b8ecb5b8cdee3c922ffccc076c8daa.tar.gz
apt-panopticon_cgp-0808310391b8ecb5b8cdee3c922ffccc076c8daa.tar.bz2
apt-panopticon_cgp-0808310391b8ecb5b8cdee3c922ffccc076c8daa.tar.xz
replace duplicate code by function plugin_header
Diffstat (limited to 'host.php')
-rw-r--r--host.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/host.php b/host.php
index 17cb499..42179f3 100644
--- a/host.php
+++ b/host.php
@@ -22,7 +22,7 @@ if(!$plugins) {
22foreach($CONFIG['overview'] as $plugin) { 22foreach($CONFIG['overview'] as $plugin) {
23 if (in_array($plugin, $plugins)) { 23 if (in_array($plugin, $plugins)) {
24 printf('<div id="%s">'."\n", $plugin); 24 printf('<div id="%s">'."\n", $plugin);
25 printf("<h3><span class=\"point\" onclick=\"javascript:rmP('%s','%s')\"><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); 25 plugin_header($host, $plugin, 0);
26 graphs_from_plugin($host, $plugin); 26 graphs_from_plugin($host, $plugin);
27 print "</div>\n"; 27 print "</div>\n";
28 } 28 }
@@ -33,10 +33,10 @@ foreach($plugins as $plugin) {
33 if (!in_array($plugin, $CONFIG['overview'])) { 33 if (!in_array($plugin, $CONFIG['overview'])) {
34 printf('<div id="%s">'."\n", $plugin); 34 printf('<div id="%s">'."\n", $plugin);
35 if ($splugin == $plugin) { 35 if ($splugin == $plugin) {
36 printf("<h3><span class=\"point\" onclick=\"javascript:rmP('%s','%s')\"><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); 36 plugin_header($host, $plugin, 0);
37 graphs_from_plugin($host, $plugin); 37 graphs_from_plugin($host, $plugin);
38 } else { 38 } else {
39 printf("<h3><span class=\"point\" onclick=\"javascript:getP('%s','%s')\"><img src=\"%s/layout/plus.gif\" alt=\"[+]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); 39 plugin_header($host, $plugin, 1);
40 } 40 }
41 print "</div>\n"; 41 print "</div>\n";
42 } 42 }