From eb8b66013fe41e6cc073f3653c657deab525cda9 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Mon, 7 Sep 2015 20:44:02 +0200 Subject: openbgpd code style fixes --- config/openbgpd/openbgpd_status.php | 70 ++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 40 deletions(-) (limited to 'config/openbgpd') diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index 58d63795..ed23499f 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -1,9 +1,9 @@ = 6) - $pgtitle = array("OpenBGPD", "Status"); -else - $pgtitle = "OpenBGPD: Status"; - +$pgtitle = array("OpenBGPD", "Status"); include("head.inc"); function doCmdT($command, $limit = "all", $filter = "", $header_size = 0) { @@ -88,9 +84,9 @@ function doCmdT($command, $limit = "all", $filter = "", $header_size = 0) { function countCmdT($command) { $fd = popen("{$command} 2>&1", "r"); $c = 0; - while (fgets($fd) !== FALSE) + while (fgets($fd) !== FALSE) { $c++; - + } pclose($fd); return $c; @@ -118,7 +114,7 @@ function showCmdT($idx, $data) { echo "\n"; } - echo "
";	/* no newline after pre */
+	echo "
"; // no newline after pre
 	echo "Gathering data, please wait...\n";
 	echo "
\n"; echo "\n"; @@ -127,7 +123,7 @@ function showCmdT($idx, $data) { /* Define a command, with a title, to be executed later. */ function defCmdT($idx, $title, $command, $has_filter = false, $header_size = 0) { global $commands; - $title = htmlspecialchars($title,ENT_NOQUOTES); + $title = htmlspecialchars($title, ENT_NOQUOTES); $commands[$idx] = array( 'title' => $title, 'command' => $command, @@ -140,16 +136,18 @@ function listCmds() { global $commands; echo "

This status page includes the following information:\n"; echo "

\n"; } /* Execute all of the commands which were defined by a call to defCmd. */ function execCmds() { global $commands; - foreach ($commands as $idx => $command) + foreach ($commands as $idx => $command) { showCmdT($idx, $command); + } } ?> @@ -216,8 +214,9 @@ function execCmds() { function exec_all_cmds() { $command) { - if ($command['has_filter']) + if ($command['has_filter']) { echo "\t\tupdate_count('{$idx}', {$command['header_size']});\n"; + } echo "\t\tupdate_filter('{$idx}', {$command['header_size']});\n"; } ?> @@ -231,11 +230,6 @@ else //]]> -' . $pgtitle . '

'; -?> -
@@ -251,17 +245,13 @@ else ?> - - - + + +
- -
- - - -
+
+
+ -
-- cgit v1.2.3