From 2b81eb361ef2074d8ce60484e4a41a426be2ab23 Mon Sep 17 00:00:00 2001 From: Stuart Wyatt Date: Tue, 7 Apr 2015 13:29:45 -0700 Subject: BIND package code clean up Code cleanup to reflect coding style guidelines and consistency Tabs only, always uses braces, spacing C/C++ style comments Use array_key_exists instead of key_exists $config[] keys are always enclosed in quotes and use single quotes for literals --- config/bind/bind.widget.php | 94 ++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 44 deletions(-) (limited to 'config/bind/bind.widget.php') diff --git a/config/bind/bind.widget.php b/config/bind/bind.widget.php index dc6b3bf0..1e8c0cc8 100644 --- a/config/bind/bind.widget.php +++ b/config/bind/bind.widget.php @@ -1,4 +1,4 @@ -"; - echo" "; + echo " "; } -function close_table(){ - echo" "; - echo""; - + +function close_table() +{ + echo " "; + echo ""; + } -$pfb_table=array(); -$img['Sick']=""; -$img['Healthy']=""; +$pfb_table = array(); +$img['Sick'] = ""; +$img['Healthy'] = ""; #var_dump($pfb_table); #exit; -?>
+
".ucfirst($fields[0])."\n"; - print "{$fields[1]}\n"; + open_table(); + foreach ($status as $line) { + $fields = explode(":", $line); + print "" . ucfirst($fields[0]) . "\n"; + print "{$fields[1]}\n"; } -close_table(); -echo"
"; + close_table(); + echo "
"; -?> - + function activitycallback_bind(transport) { + $('bind').innerHTML = transport.responseText; + setTimeout('getstatus_postfix()', 5000); + } + getstatus_bind(); + -- cgit v1.2.3