Update of /cvsroot/openfirst/base/config
In directory sc8-pr-cvs1:/tmp/cvs-serv22847
Added Files:
version.php
Log Message:
Add version checking ability to config module
--- NEW FILE: version.php ---
<?php
/*
* openFIRST.base - config/version.php
*
* Copyright (C) 2003,
* openFIRST Project
* Original Author: Tim Ginn <tim...@po...>
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
* 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; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// Purpose: set up OpenFIRST modules
include("../config/globals.php");
include($header);
if(isset($user->user) == true && $user->membertype == "administrator") {
?>
<h1>Version Information</h1>
<p>The version as displayed on your pages is <?php echo $title . " " . $version; ?></p>
<table>
<tr><th>Status</th><th>File</th><th>Module</th><th>Description</th><th>Link</th></tr>
<?php
if(function_exists("glob")) {
foreach (glob("../*/*/*/*/*/*/*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
foreach (glob("../*/*/*/*/*/*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
foreach (glob("../*/*/*/*/*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
foreach (glob("../*/*/*/*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
foreach (glob("../*/*/*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
foreach (glob("../*") as $filename) {
if(is_file($filename)) {
$mod = str_replace("../", "", $filename);
$mod = substr($mod, 0, strpos($mod, "/", 2));
$fil = str_replace("../$mod/", "", $filename);
@include("http://update.openfirst.org/versions.php?md5=" . md5_file($filename) . "&module=$mod&file=$fil");
}
}
} else {
echo("<p>The version information requires the <strong>glob</strong> function, which your version
of PHP does not have. In the future there will be version for systems without
<strong>glob</strong> glob functionality, but at the moment only a <strong>glob</strong>
version is provided.</p>");
}
?>
</table>
<?php } else {
showlogin();
}
include($footer); ?>
|