From 3dc6bb6035a2b8ab7d15eb0a19b9819a0e7732cf Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 20 Apr 2005 22:25:10 +0000 Subject: Alter auto update tabs behavior. Show the version information and insert a Invoke Auto Upgrade button --- usr/local/www/system_firmware_check.php | 208 ++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100755 usr/local/www/system_firmware_check.php (limited to 'usr/local/www/system_firmware_check.php') diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php new file mode 100755 index 0000000..f479198 --- /dev/null +++ b/usr/local/www/system_firmware_check.php @@ -0,0 +1,208 @@ +#!/usr/local/bin/php +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$d_isfwfile = 1; +require("guiconfig.inc"); +require("xmlrpc_client.inc"); + +function old_checkversion() { + global $g; + $versioncheck_base_url = 'www.pfSense.com'; + $versioncheck_path = '/pfSense/checkversion.php'; + $post = "platform=" . rawurlencode(trim(file_get_contents("/etc/platform"))) . + "&version=" . rawurlencode(trim(file_get_contents("/etc/version"))); + $rfd = @fsockopen($versioncheck_base_url, 80, $errno, $errstr, 3); + if ($rfd) { + $hdr = "POST {$versioncheck_path} HTTP/1.0\r\n"; + $hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $hdr .= "User-Agent: pfSense-webConfigurator/1.0\r\n"; + $hdr .= "Host: www.pfSense.com\r\n"; + $hdr .= "Content-Length: " . strlen($post) . "\r\n\r\n"; + + fwrite($rfd, $hdr); + fwrite($rfd, $post); + + $inhdr = true; + $resp = ""; + while (!feof($rfd)) { + $line = fgets($rfd); + if ($inhdr) { + if (trim($line) == "") + $inhdr = false; + } else { + $resp .= $line; + } + } + + fclose($rfd); + + if($_GET['autoupgrade'] <> "") + return; + + return $resp; + } + + return null; +} + +?> + + + +<?=gentitle("System: Firmware: Invoke Auto Upgrade");?> + + + + + + + +

System: Firmware: Invoke Auto Upgrade

+ +
+ + + + + + + +
+ +
+ + + + +
+ +
+
+
+ + + + +
+
+
+ +
+ +document.progressbar.style.visibility='hidden';\n"; + +?> + + + + + + + + + \ No newline at end of file -- cgit v1.1