diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-09-11 00:30:29 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-09-11 00:30:29 +0000 |
commit | bddd43b403499550e8adb743a077681a5ef9ae51 (patch) | |
tree | 490b5066f8fc775a95deed54c1f51cd254c0ed56 /usr/local/www | |
parent | 1a0cb96d71f6f55a5799d42064193a35f183da48 (diff) | |
download | pfsense-bddd43b403499550e8adb743a077681a5ef9ae51.zip pfsense-bddd43b403499550e8adb743a077681a5ef9ae51.tar.gz |
Add ability to hook into tabs on various screens. Each tab area will
need to hook into this sytem similar to:
$tab_array = array();
$tab_array[] = array("Port Forward", true, "firewall_nat.php");
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
$tab_array[] = array("Outbound", false, "firewall_nat_out.php");
$tab_array[] = add_package_tab_hooks("firewallnat")
display_top_tabs($tab_array);
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/guiconfig.inc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 289787a..3015ac5 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -974,5 +974,22 @@ function echo_array($array,$return_me=false){ } } +function add_package_tab_hooks($section) { + global $config, $g; + if($config['installedpackages']) { + $tab_array = array(); + foreach($config['installedpackages']['tabs'] as $tab) { + if($tab['section'] == $section) { + $tab_array_tmp = array(); + $tab_array_tmp['name'] = $tab['name']; + $tab_array_tmp['section'] = $tab['section']; + $tab_array_tmp['configfile'] = $tab['configfile']; + $tab_array_tmp['url'] = $tab['url']; + $tab_array[] = $tab_array_tmp; + } + } + return $tab_array; + } +} -?> +?>
\ No newline at end of file |