[Openfirst-cvscommit] base/config first.php,1.68,1.69 index.php,1.17,1.18 install.php,1.28,1.29 modu
Brought to you by:
xtimg
From: Jamie <ast...@us...> - 2006-02-23 16:38:53
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26737/config Modified Files: first.php index.php install.php modules.php version.php Log Message: - Many various bugfixes - Added type aliases to DB - Login/logout pages (login a little buggy) Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** first.php 23 Nov 2005 18:29:54 -0000 1.68 --- first.php 23 Feb 2006 16:38:47 -0000 1.69 *************** *** 108,112 **** $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! include_once($Header); // This a series of statements, each of which are executed. If an error condition occurs, that // branch is ran. --- 108,112 ---- $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! include_once($ogHeader); // This a series of statements, each of which are executed. If an error condition occurs, that // branch is ran. *************** *** 131,135 **** echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; } ! include_once($Footer); die; } else { --- 131,135 ---- echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; } ! include_once($ogFooter); die; } else { Index: install.php =================================================================== RCS file: /cvsroot/openfirst/base/config/install.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** install.php 19 Oct 2005 04:17:09 -0000 1.28 --- install.php 23 Feb 2006 16:38:47 -0000 1.29 *************** *** 1,127 **** ! <?php ! /* ! * openFIRST.base - config/install.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_once("../includes/globals.php"); ! $ogUser->mustBeAdmin(); ! include_once('xmlModule.php'); ! include_once($Header); ! ! ini_set("max_execution_time", 600); // Bypass problem of timeouts when many modules are installed ! // 10 minutes should be sufficient, even for remote database servers ! ! ?> ! ! <h1>Module Installer</h1> ! <p>This utility will create the tables required for certain openFIRST components ! to run.<br /> ! Select the modules you would like to install.<br /> ! <br /> ! <span style="color:red;">Once installed, modules must be enabled from the <a href="modules.php"><strong>Module ! Administrator</strong></a>.</span></p> ! ! <?php ! ! $InstalledModules = $ogModuleManager->getDirs(); ! ! $Modules = array(); ! ! $files = glob("$fBasePath/*/openfirst.info.xml"); ! if (count($files) < 1) { ! ?> ! <p class="error">You have no modules to install or are misconfigured. You can go to <a href="http://www.openfirst.org/">openFIRST.org</a> ! to download them.</p> ! <?php ! include($Footer); ! die(); ! } ! ! foreach($files as $file) { ! $mod = xmlModule::createFromFile($file); ! $Modules[$mod->getDir()] = $mod; ! } ! ! ?> ! <form method="post" action="install.php"> ! <table id="moduleInstall"> ! <colgroup> ! <col /> ! <col /> ! <col class="file" /> ! </colgroup> ! <colgroup> ! <col /> ! </colgroup> ! <thead> ! <tr><th colspan="3">Module</th><th>Status</th></tr> ! </thead> ! <tbody> ! <?php ! ! # Get the meta data ! foreach($Modules as $mod) { ! if ($mod->isBase()) { ! // Hide openfirst.base ! continue; ! } ! ! $dir = $mod->getDir(); ! ! $WasInstalled = $IsInstalled = in_array($dir, $InstalledModules); ! $InstallFailed = $UpgradeFailed = false; ! if(isset($_POST[$dir]) && $_POST[$dir] == "on" && !$IsInstalled) { ! if (($err = $mod->install()) === true) { ! $IsInstalled = true; ! } else { ! $InstallFailed = true; ! } ! } ! echo '<tr><td><input type="checkbox" name="'.htmlentities($dir).'" '; ! if ($IsInstalled) echo 'checked="checked" '; ! echo '/><label for="'.htmlentities($dir).'">'.htmlentities($mod->getName()).'</label></td> ! <td>('.htmlentities($mod->getVersion()).')'.'</td> ! <td>'.htmlentities($dir)."</td>"; ! ! if ($IsInstalled && !$WasInstalled) { ! echo('<td style="background-color: lime; color:black; font-weight:bold;">Module Installation succeeded!</td></tr>'); ! } else if ($InstallFailed) { ! echo('<td style="background-color: red; color:black; font-weight:bold;">Module Installation failed:<br/>'.htmlentities($err).'</td></tr>'); ! } else if ($IsInstalled && $WasInstalled) { ! echo('<td style="background-color: green; color:white;">Module Installed</td></tr>'); ! } else { ! echo('<td style="background-color: gray; color:white;">Module available</td></tr>'); ! } ! } ! ?> ! </table> ! <br /><input type="submit" value="Install Modules" /> ! </form> ! ! <?php ! include($Footer); ?> \ No newline at end of file --- 1,127 ---- ! <?php ! /* ! * openFIRST.base - config/install.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_once("../includes/globals.php"); ! $ogUser->mustBeAdmin(); ! include_once('xmlModule.php'); ! include_once($ogHeader); ! ! ini_set("max_execution_time", 600); // Bypass problem of timeouts when many modules are installed ! // 10 minutes should be sufficient, even for remote database servers ! ! ?> ! ! <h1>Module Installer</h1> ! <p>This utility will create the tables required for certain openFIRST components ! to run.<br /> ! Select the modules you would like to install.<br /> ! <br /> ! <span style="color:red;">Once installed, modules must be enabled from the <a href="modules.php"><strong>Module ! Administrator</strong></a>.</span></p> ! ! <?php ! ! $InstalledModules = $ogModuleManager->getDirs(); ! ! $Modules = array(); ! ! $files = glob("$fBasePath/*/openfirst.info.xml"); ! if (count($files) < 1) { ! ?> ! <p class="error">You have no modules to install or are misconfigured. You can go to <a href="http://www.openfirst.org/">openFIRST.org</a> ! to download them.</p> ! <?php ! include($Footer); ! die(); ! } ! ! foreach($files as $file) { ! $mod = xmlModule::createFromFile($file); ! $Modules[$mod->getDir()] = $mod; ! } ! ! ?> ! <form method="post" action="install.php"> ! <table id="moduleInstall"> ! <colgroup> ! <col /> ! <col /> ! <col class="file" /> ! </colgroup> ! <colgroup> ! <col /> ! </colgroup> ! <thead> ! <tr><th colspan="3">Module</th><th>Status</th></tr> ! </thead> ! <tbody> ! <?php ! ! # Get the meta data ! foreach($Modules as $mod) { ! if ($mod->isBase()) { ! // Hide openfirst.base ! continue; ! } ! ! $dir = $mod->getDir(); ! ! $WasInstalled = $IsInstalled = in_array($dir, $InstalledModules); ! $InstallFailed = $UpgradeFailed = false; ! if(isset($_POST[$dir]) && $_POST[$dir] == "on" && !$IsInstalled) { ! if (($err = $mod->install()) === true) { ! $IsInstalled = true; ! } else { ! $InstallFailed = true; ! } ! } ! echo '<tr><td><input type="checkbox" name="'.htmlentities($dir).'" '; ! if ($IsInstalled) echo 'checked="checked" '; ! echo '/><label for="'.htmlentities($dir).'">'.htmlentities($mod->getName()).'</label></td> ! <td>('.htmlentities($mod->getVersion()).')'.'</td> ! <td>'.htmlentities($dir)."</td>"; ! ! if ($IsInstalled && !$WasInstalled) { ! echo('<td style="background-color: lime; color:black; font-weight:bold;">Module Installation succeeded!</td></tr>'); ! } else if ($InstallFailed) { ! echo('<td style="background-color: red; color:black; font-weight:bold;">Module Installation failed:<br/>'.htmlentities($err).'</td></tr>'); ! } else if ($IsInstalled && $WasInstalled) { ! echo('<td style="background-color: green; color:white;">Module Installed</td></tr>'); ! } else { ! echo('<td style="background-color: gray; color:white;">Module available</td></tr>'); ! } ! } ! ?> ! </table> ! <br /><input type="submit" value="Install Modules" /> ! </form> ! ! <?php ! include($ogFooter); ?> \ No newline at end of file Index: version.php =================================================================== RCS file: /cvsroot/openfirst/base/config/version.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** version.php 26 Oct 2005 20:14:59 -0000 1.12 --- version.php 23 Feb 2006 16:38:47 -0000 1.13 *************** *** 30,34 **** include("../includes/globals.php"); $ogUser->mustBeAdmin(); ! include($Header); // Recursive glob functionality based on original code from: --- 30,34 ---- include("../includes/globals.php"); $ogUser->mustBeAdmin(); ! include($ogHeader); // Recursive glob functionality based on original code from: *************** *** 109,112 **** <?php ! include($Footer); ?> \ No newline at end of file --- 109,112 ---- <?php ! include($ogFooter); ?> \ No newline at end of file Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/config/modules.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** modules.php 22 Nov 2005 16:21:55 -0000 1.12 --- modules.php 23 Feb 2006 16:38:47 -0000 1.13 *************** *** 30,34 **** include("../includes/globals.php"); $ogUser->mustBeAdmin(); ! include($Header); // Check if user wishes to make updates --- 30,34 ---- include("../includes/globals.php"); $ogUser->mustBeAdmin(); ! include($ogHeader); // Check if user wishes to make updates *************** *** 105,107 **** <?php ! include($Footer); ?> \ No newline at end of file --- 105,107 ---- <?php ! include($ogFooter); ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/config/index.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** index.php 19 Oct 2005 04:16:14 -0000 1.17 --- index.php 23 Feb 2006 16:38:47 -0000 1.18 *************** *** 1,104 **** ! <?php ! /* ! * openFIRST.base - config/index.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: Provide a control center for configuration activities. ! ! include("../includes/globals.php"); ! $ogUser->mustBeAdmin(); ! include_once($Header); ! ! ?> ! <h1>openFIRST Configuration Area</h1> ! ! <table width="50%"> ! <tr> ! <th>Administrative Options</th> ! </tr> ! </table> ! ! <?php ! if(is_writable("$fBasePath/includes/sitesettings.php") && file_exists("$fBasePath/includes/first.php")) { ! echo "<p class='warning'><strong>Warning</strong>: Your ! <span class='file'>sitesettings.php</span> file is writable by the web user. ! Also, <span class='file'>first.php</span> is still in existance. After you ! have setup the openFIRST web portal system, it is safe to remove ! <span class='file'>first.php</span>. Removing ! <span class='file'>first.php</span> prevents the accidental reset of ! configuration information and prevents external users from altering your ! configuration. For maximal security, you should also change the filesystem ! permissions so that <span class='file'>sitesettings.php</span> is not ! writable by the web user."; ! } elseif(is_writable("$fBasePath/includes/sitesettings.php")) { ! echo "<p class='warning'><strong>Warning</strong>: Your ! <span class='file'>sitesettings.php</span> file is writable by the web user. ! For maximal security, you should change the filesystem permissions to correct ! this.</p>"; ! } ! ?> ! ! <table> ! <tr> ! <th colspan="2">Statistics</th> ! </tr> ! <tr> ! <th>Database Version</th><td> ! <?php ! // The statistics feature is loosely inspired by that of phpBB. ! echo $ogDB->getVersion(); ! ?></td> ! </tr> ! <tr> ! <th>Database Size</th><td> ! <?php ! echo $ogDB->getSize(); ! ?> ! </td> ! </tr> ! <tr><th>openFIRST Project Statistics</th><td> ! <script type='application/x-javascript' src='http://bugzilla.openfirst.org/openfirst/bugcrushers.php?style=js'></script> ! </td></tr> ! </table> ! ! <br/> ! <table width="50%"> ! <tr> ! <td valign="top"><a href="install.php">Install Modules</a></td> ! <td valign="top">Required to install several new openFIRST modules.</td> ! </tr> ! <tr> ! <td valign="top"><a href="modules.php">Module Administrator</a></td> ! <td valign="top">Required to manage openFIRST modules.</td> ! </tr> ! <tr> ! <td width="30%" valign="top"><a href="version.php">Version Check</a></td> ! <td width="70%" valign="top">Ensure that your version of the openFIRST and ! modules are up to date</td> ! </tr> ! </table> ! <?php ! include($Footer); ?> \ No newline at end of file --- 1,104 ---- ! <?php ! /* ! * openFIRST.base - config/index.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: Provide a control center for configuration activities. ! ! include("../includes/globals.php"); ! $ogUser->mustBeAdmin(); ! include_once($ogHeader); ! ! ?> ! <h1>openFIRST Configuration Area</h1> ! ! <table width="50%"> ! <tr> ! <th>Administrative Options</th> ! </tr> ! </table> ! ! <?php ! if(is_writable("$fBasePath/includes/sitesettings.php") && file_exists("$fBasePath/includes/first.php")) { ! echo "<p class='warning'><strong>Warning</strong>: Your ! <span class='file'>sitesettings.php</span> file is writable by the web user. ! Also, <span class='file'>first.php</span> is still in existance. After you ! have setup the openFIRST web portal system, it is safe to remove ! <span class='file'>first.php</span>. Removing ! <span class='file'>first.php</span> prevents the accidental reset of ! configuration information and prevents external users from altering your ! configuration. For maximal security, you should also change the filesystem ! permissions so that <span class='file'>sitesettings.php</span> is not ! writable by the web user."; ! } elseif(is_writable("$fBasePath/includes/sitesettings.php")) { ! echo "<p class='warning'><strong>Warning</strong>: Your ! <span class='file'>sitesettings.php</span> file is writable by the web user. ! For maximal security, you should change the filesystem permissions to correct ! this.</p>"; ! } ! ?> ! ! <table> ! <tr> ! <th colspan="2">Statistics</th> ! </tr> ! <tr> ! <th>Database Version</th><td> ! <?php ! // The statistics feature is loosely inspired by that of phpBB. ! echo $ogDB->getVersion(); ! ?></td> ! </tr> ! <tr> ! <th>Database Size</th><td> ! <?php ! echo $ogDB->getSize(); ! ?> ! </td> ! </tr> ! <tr><th>openFIRST Project Statistics</th><td> ! <script type='application/x-javascript' src='http://bugzilla.openfirst.org/openfirst/bugcrushers.php?style=js'></script> ! </td></tr> ! </table> ! ! <br/> ! <table width="50%"> ! <tr> ! <td valign="top"><a href="install.php">Install Modules</a></td> ! <td valign="top">Required to install several new openFIRST modules.</td> ! </tr> ! <tr> ! <td valign="top"><a href="modules.php">Module Administrator</a></td> ! <td valign="top">Required to manage openFIRST modules.</td> ! </tr> ! <tr> ! <td width="30%" valign="top"><a href="version.php">Version Check</a></td> ! <td width="70%" valign="top">Ensure that your version of the openFIRST and ! modules are up to date</td> ! </tr> ! </table> ! <?php ! include($ogFooter); ?> \ No newline at end of file |