diff options
| author | Pim van den Berg | 2009-12-28 10:59:29 +0100 |
|---|---|---|
| committer | Pim van den Berg | 2009-12-28 10:59:29 +0100 |
| commit | 0808310391b8ecb5b8cdee3c922ffccc076c8daa (patch) | |
| tree | a704d189bddd04ce2aee978134a6b95ae1bf74db /host.php | |
| parent | load plugins on the host page via ajax (diff) | |
| download | apt-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.php | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -22,7 +22,7 @@ if(!$plugins) { | |||
| 22 | foreach($CONFIG['overview'] as $plugin) { | 22 | foreach($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 | } |
