aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/html.inc.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 /inc/html.inc.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 'inc/html.inc.php')
-rw-r--r--inc/html.inc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index b1cb80f..e93cc66 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -40,6 +40,22 @@ function html_end() {
40EOT; 40EOT;
41} 41}
42 42
43function plugin_header($host, $plugin, $status) {
44 global $CONFIG;
45
46 if ($status == 1) {
47 $f = 'get';
48 $i = 'plus';
49 $a = '+';
50 } else {
51 $f = 'rm';
52 $i = 'minus';
53 $a = '-';
54 }
55
56 return printf("<h3><span class=\"point\" onclick=\"javascript:%sP('%s','%s')\"><img src=\"%s/layout/%s.gif\" alt=\"[%s]\"> %s</span></h3>\n", $f, $host, $plugin, $CONFIG['weburl'], $i, $a, $plugin);
57}
58
43function host_summary($hosts) { 59function host_summary($hosts) {
44 global $CONFIG; 60 global $CONFIG;
45 61