* Copyright (C) 2006 James Grant * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation, version 2. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ ?> 'committee_main.php', 'SFIAB Configuration' => 'config/index.php'), 'new_version_checker'); echo i18n("Checking for new versions will access a remote server, if you wish to continue click the 'Check for new versions' link below"); echo '
'; echo '
'; echo i18n('Your currently installed version: %1', array($config['version'])); echo '
'; function loadVersions() { $ret = array(); // FIXME Replace // if($v=file("http://www.sfiab.ca/version.txt")) if (false) { list($version, $date) = explode("\t", trim($v[0])); $ret['version'] = $version; $ret['date'] = $date; } else echo error(i18n('There was an error connecting to the version checker server')); return $ret; } if (get_value_from_array($_GET, 'action') == 'check') { $v = loadVersions(); echo i18n('Newest version available: %1 (%2)', array(get_value_from_array($v, 'version'), get_value_from_array($v, 'date'))); echo '
'; echo '
'; $val = version_compare(get_value_from_array($config, 'version', ''), get_value_from_array($v, 'version', ' ')); if ($val == 0) { echo happy(i18n('Your current version (%1) is up-to-date', array($config['version']))); } else if ($val < 0) { echo error(i18n('There is a new version available!
Newest version: %1 Released on %2', array($v['version'], $v['date']))); echo i18n('The newest version can be downloaded from http://www.sfiab.ca/download.php'); } else if ($val > 0) { echo happy(i18n('You are running a newer (probably a development) version (%1) that is newer than the most recent release (%2)', array(get_value_from_array($config, 'version'), get_value_from_array($v, 'version')))); } } else echo '' . i18n('Check for new versions') . '
'; send_footer(); ?>