diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2004-12-12 20:25:24 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2004-12-12 20:25:24 +0000 |
commit | 859329c867ad0deacb58b5c577d1c54f4767a436 (patch) | |
tree | f1769fdc0be8f278de4dd940a4798b5aeddeef2d /usr | |
parent | a7f908dbec43e9764b084ddd8c066f0de8ecc28a (diff) | |
download | pfsense-859329c867ad0deacb58b5c577d1c54f4767a436.zip pfsense-859329c867ad0deacb58b5c577d1c54f4767a436.tar.gz |
* converted return_menu to return_ext_menu in fbegin.inc.
* fixed interfaces left menu from not displaying additional interfaces by saving and restoring config value.
* equipped edit.php with the pfSense theme so it looks uniform
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/edit.php | 6 | ||||
-rwxr-xr-x | usr/local/www/fbegin.inc | 12 | ||||
-rwxr-xr-x | usr/local/www/pkg.php | 7 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr.php | 15 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr_install.php | 7 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr_installed.php | 7 |
6 files changed, 42 insertions, 12 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php index 5ff055d..6a4197b 100755 --- a/usr/local/www/edit.php +++ b/usr/local/www/edit.php @@ -27,6 +27,8 @@ POSSIBILITY OF SUCH DAMAGE. */ +require("guiconfig.inc"); + if (($_POST['submit'] == "Load") && file_exists($_POST['savetopath'])) { $fd = fopen($_POST['savetopath'], "r"); $content = fread($fd, filesize($_POST['savetopath'])); @@ -68,6 +70,8 @@ else (modified for pfSense Edit/Save file by Scott Ullrich, Copyright 2004) */ +include("fbegin.inc"); + // Function: is Blank // Returns true or false depending on blankness of argument. @@ -82,7 +86,7 @@ function puts( $arg ) { echo "$arg\n"; } $Version = ''; $ScriptName = $HTTP_SERVER_VARS['SCRIPT_NAME']; -$Title = 'pfSense: edit file'; +$Title = gentitle("edit file"); // Get year. diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index 32e72d8..a20e108 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -1,5 +1,5 @@ <?php - function return_menu($section) { + function return_ext_menu($section) { global $g; $htmltext = ""; $dh = @opendir($g['www_path'] . "/ext/" . $section); @@ -72,7 +72,7 @@ function showhide(tspan, tri) { <a href="/system_firmware.php" class="navlnk">Firmware</a><br> <a href="/system_advanced.php" class="navlnk">Advanced</a><br> <a href="/pkg_mgr.php" class="navlnk">Package Manager</a><br> - <?php echo return_menu("System"); ?> + <?php echo return_ext_menu("System"); ?> <strong>Interfaces</strong> <?php if (!isset($config['system']['webgui']['noassigninterfaces'])): ?> <a href="/interfaces_assign.php" class="navlnks">(assign)</a> @@ -83,12 +83,12 @@ function showhide(tspan, tri) { <?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): if (!isset($config['interfaces']['opt' . $i]['ovpn'])): ?> <a href="/interfaces_opt.php?index=<?=$i;?>" class="navlnk"><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?></a><br> <?php endif; endfor; ?> - <?php echo return_menu("Interfaces"); ?> + <?php echo return_ext_menu("Interfaces"); ?> <strong>Firewall</strong><br> <a href="/firewall_rules.php" class="navlnk">Rules</a><br> <a href="/firewall_nat.php" class="navlnk">NAT</a><br> <a href="/firewall_aliases.php" class="navlnk">Aliases</a><br> - <?php echo return_menu("Firewall"); ?> + <?php echo return_ext_menu("Firewall"); ?> <strong>Services</strong><br> <a href="/services_dnsmasq.php" class="navlnk">DNS forwarder</a><br> <a href="/services_dyndns.php" class="navlnk">Dynamic @@ -99,7 +99,7 @@ function showhide(tspan, tri) { <a href="/services_proxyarp.php" class="navlnk">Proxy ARP</a><br> <a href="/services_captiveportal.php" class="navlnk">Captive portal</a><br> <a href="/services_wol.php" class="navlnk">Wake on LAN</a><br> - <?php echo return_menu("Services"); ?> + <?php echo return_ext_menu("Services"); ?> <strong>VPN</strong><br> <a href="/vpn_ipsec.php" class="navlnk">IPsec</a><br> <a href="/vpn_pptp.php" class="navlnk">PPTP</a><br> @@ -112,7 +112,7 @@ function showhide(tspan, tri) { <?php if (isset($config['captiveportal']['enable'])): ?> <a href="/status_captiveportal.php" class="navlnk">Captive portal</a><br> <?php endif; ?> - <?php echo return_menu("Status"); ?> + <?php echo return_ext_menu("Status"); ?> <?php if (isset($config['system']['webgui']['expanddiags']) || strstr($_SERVER['SCRIPT_FILENAME'], "diag_") || strstr($_SERVER['SCRIPT_FILENAME'], "reboot")): ?> <a href="javascript:showhide('diag','tri_diag')"><img src="/tri_o.gif" id="tri_diag" width="14" height="10" border="0"></a><strong><a href="javascript:showhide('diag','tri_diag')" class="navlnk">Diagnostics</a></strong><br> <span id="diag"> diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php index 26df475..a4c00b5 100755 --- a/usr/local/www/pkg.php +++ b/usr/local/www/pkg.php @@ -63,7 +63,12 @@ $title = $section . ": " . $package_name </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<?php include("fbegin.inc"); ?> +<?php +$config_tmp = $config; +$config = $pfSense_config; +include("fbegin.inc"); +$config = $config_tmp; +?> <p class="pgtitle"><?=$title?></p> <form action="firewall_nat_out_load_balancing.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index 2610346..31ee1a2 100755 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -63,7 +63,12 @@ if ($_POST) { </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<?php include("fbegin.inc"); ?> +<?php +$config_tmp = $config; +$config = $pfSense_config; +include("fbegin.inc"); +$config = $config_tmp; +?> <p class="pgtitle">System: Package Manager</p> <form action="firewall_nat_out_load_balancing.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> @@ -73,8 +78,14 @@ if ($_POST) { <?php endif; ?> <?php $configa = $config; + +// Allow package location to be overriden +$config_location = "http://www.pfsense.com/packages/pkg_config.xml"; +if($configa['package_location']) + $config_location = $configa['package_location']; + if(!file_exists("/tmp/pkg_config.xml")) { - mwexec("cd {$g['tmp_path']} && /usr/bin/fetch \"http://www.pfsense.com/packages/pkg_config.xml\" >/dev/null 2>&1 "); + mwexec("cd {$g['tmp_path']} && /usr/bin/fetch \"" . $config_location . "\" >/dev/null 2>&1 "); if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) { print_info_box_np("Could not download pkg_config.xml from pfSense.com. Check your DNS settings."); die; diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index af46a39..c8fd24e 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -142,7 +142,12 @@ $a_out = &$pkg_config['packages']; </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<?php include("fbegin.inc"); ?> +<?php +$config_tmp = $config; +$config = $pfSense_config; +include("fbegin.inc"); +$config = $config_tmp; +?> <p class="pgtitle">System: Package Manager: Install Package</p> <form action="firewall_nat_out_load_balancing.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php index a2fc43a..4ec71c3 100755 --- a/usr/local/www/pkg_mgr_installed.php +++ b/usr/local/www/pkg_mgr_installed.php @@ -40,7 +40,12 @@ require("xmlparse_pkg.inc"); </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<?php include("fbegin.inc"); ?> +<?php +$config_tmp = $config; +$config = $pfSense_config; +include("fbegin.inc"); +$config = $config_tmp; +?> <p class="pgtitle">System: Package Manager</p> <form action="firewall_nat_out_load_balancing.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> |