openfirst-cvscommit Mailing List for openFIRST (Page 22)
Brought to you by:
xtimg
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(210) |
Jul
(39) |
Aug
(153) |
Sep
(147) |
Oct
(173) |
Nov
(81) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(33) |
Feb
(18) |
Mar
|
Apr
(62) |
May
|
Jun
(100) |
Jul
(38) |
Aug
(58) |
Sep
(1) |
Oct
|
Nov
(25) |
Dec
(172) |
2005 |
Jan
(31) |
Feb
(12) |
Mar
(67) |
Apr
(92) |
May
(247) |
Jun
(34) |
Jul
(36) |
Aug
(192) |
Sep
(15) |
Oct
(42) |
Nov
(92) |
Dec
(4) |
2006 |
Jan
|
Feb
(21) |
Mar
|
Apr
|
May
|
Jun
(53) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(4) |
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Astronouth7303 <ast...@us...> - 2005-05-27 16:08:04
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23844 Modified Files: index.php Log Message: Added class liteModule Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.php 27 May 2005 00:02:24 -0000 1.14 --- index.php 27 May 2005 16:07:51 -0000 1.15 *************** *** 39,43 **** <tr> <?php ! if(isset($headers) == false) { echo("You may: <a href='config/'>login to configure openFIRST options</a>."); } --- 39,43 ---- <tr> <?php ! if(isset($Headers) == false) { echo("You may: <a href='config/'>login to configure openFIRST options</a>."); } *************** *** 86,94 **** echo '<ul> '; ! foreach($Modules as $code=>$info) { ! if ($info['active'] ! #&& $info['show'] ) { ! echo '<li><a href="'.htmlentities("$BasePath/$code").'">'.htmlentities($info['name']).'</a></li> '; } --- 86,94 ---- echo '<ul> '; ! foreach($Modules as $code=>$mod) { ! if ($mod->getActive() ! #&& $mod->getShowOnMenu() ) { ! echo '<li><a href="'.htmlentities("$BasePath/$code").'">'.htmlentities($mod->getName()).'</a></li> '; } |
From: Astronouth7303 <ast...@us...> - 2005-05-27 16:08:03
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23844/includes Modified Files: compatibility.php globals.php Added Files: liteModule.php Log Message: Added class liteModule --- NEW FILE: liteModule.php --- <?php /* * openFIRST.base - includes/mdoules.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Jamie Bliss <ja...@op...> * * 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. * * 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: Defines the liteModule class, which loads metadata about a module // from DB. Similar to the Module class, except that it won't handle // XML. Only for common use. class liteModule { /*private*/ var $mName, $mID, $mVersion, $mAuthor, $mMaintainer; /*private*/ var $mIncludes, $mNavBar, $mAdminBar; /*private*/ var $mActive, $mShowOnMenu, $mDir; function liteModule($Values = array()) { $this->mActive = $this->mShowOnMenu = false; $this->mVersion = 'CVS'; $this->mIncludes = array(); if (isset($Values['name'])) $this->mName = $Values['name']; if (isset($Values['id'])) $this->mID = $Values['id']; if (isset($Values['version'])) $this->mVersion = $Values['version']; if (isset($Values['author'])) $this->mAuthor = $Values['author']; if (isset($Values['maintainer'])) $this->mMaintainer = $Values['maintainer']; if (isset($Values['includes'])) $this->mIncludes = $Values['includes']; if (isset($Values['nav'])) $this->mNavBar = $Values['nav']; if (isset($Values['admin'])) $this->mAdminBar = $Values['admin']; if (isset($Values['active'])) $this->mActive = $Values['active']; if (isset($Values['show'])) $this->mShowOnMenu = $Values['show']; if (isset($Values['dir'])) $this->mDir = $Values['dir']; if (is_null($this->mIncludes)) { $this->mIncludes = array(); } else if (!is_array($this->mIncludes)) { $this->mIncludes = array((string)$this->mIncludes); } if (!isset($this->mDir) && isset($this->mID)) $this->mDir = $this->mID; #Remove any null values foreach ($this->mIncludes as $key => $file) { if (trim($file) == '') unset($this->mIncludes[$key]); } if (trim($this->mMaintainer) == '') { $this->mMaintainer = $this->mAuthor; } if (trim($this->mAuthor) == '') { $this->mAuthor = $this->mMaintainer; } } /*** STATIC FUNCTIONS ***/ /** Creates a liteModule object from a SQL result object */ /*static*/ function createFromRecord(&$rec) { $values = array( 'name' => $rec->label, 'id' => $rec->modulename, 'version' => $rec->version, 'author' => $rec->Author, 'maintainer' => $rec->Maintainer, 'includes' => explode(',', $rec->includes), 'nav' => $rec->modulenavigation, 'admin' => $rec->adminnavigation, 'active' => (bool)$rec->active, 'show' => (bool)$rec->showonmenu, 'dir' => $rec->dir ); return new liteModule($values); } /** Creates a liteModule object from given values */ /*static*/ function createFromValues($code, $name, $version, $includes, $adminnav, $modulenav, $active, $show) { $values = array( 'name' => $name, 'id' => $code, 'version' => $version, 'includes' => explode(',', $includes), 'nav' => $modulenav, 'admin' => $adminnav, 'active' => (bool)$active, 'show' => (bool)$show ); return new liteModule($values); } /** Creates a liteModule object from a Module object */ /*static*/ function createFromModule(&$module) { $values = array( 'name' => $module->getName(), 'id' => $module->getID(), 'version' => $module->getVersion(), 'author' => $module->getAuthor(), 'maintainer' => $module->getMaintainer(), 'includes' => $module->getIncludes(), 'nav' => $module->getNavBar(), 'admin' => $module->getAdminBar(), ); return new liteModule($values); } /*** PUBLIC PROPERTIES ***/ /*public*/ function getName() { return $this->mName; } /*public*/ function getID() { return $this->mID; } /*public*/ function getVersion() { return $this->mVersion; } /*public*/ function getAuthor() { return $this->mAuthor; } /*public*/ function getMaintainer() { return $this->mMaintainer; } /*public*/ function getIncludes() { return $this->mIncludes; } /*public*/ function getNavBar() { return $this->mNavBar; } /*public*/ function getAdminBar() { return $this->mAdminBar; } /*public*/ function getShowOnMenu() { return $this->mShowOnMenu; } /*public*/ function getActive() { return $this->mActive; } /*public*/ function getDir() { return $this->mDir; } } ?> Index: compatibility.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/compatibility.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compatibility.php 26 May 2005 21:00:03 -0000 1.1 --- compatibility.php 27 May 2005 16:07:51 -0000 1.2 *************** *** 27,31 **** */ ! // Purpose: Provides functions and constants not available in certain versions of PHP. if (!defined('PATH_SEPARATOR')) { --- 27,38 ---- */ ! // Purpose: Provides functions and constants not available in certain ! // versions of PHP. Also die if there are common functions not ! // available. ! ! // We use glob enough that we should either write a substitute or just refuse to work ! if(!function_exists('glob')) { ! die('You really should upgrade PHP, seeing as you don't even have <a href="http://www.php.net/manual/en/function.glob.php"><code>glob()</code></a>.'); ! } if (!defined('PATH_SEPARATOR')) { *************** *** 36,39 **** --- 43,47 ---- case osUNIX: + default: define('PATH_SEPARATOR', ':'); break; Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/globals.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** globals.php 27 May 2005 00:02:24 -0000 1.4 --- globals.php 27 May 2005 16:07:51 -0000 1.5 *************** *** 43,49 **** } ! define('osUNKNOWN', -1); ! define('osUNIX', 0); ! define('osWINDOWS', 1); #Add more operating systems here --- 43,48 ---- } ! define('osUNIX', 'unix'); ! define('osWINDOWS', 'windows'); #Add more operating systems here *************** *** 64,81 **** require_once('dbase.php'); require_once('auth.php'); ! require_once('sitesettings.php'); ! if (!isset($sqlTablePrefix)) { ! $sqlTablePrefix = 'ofirst_'; ! } if(function_exists("ofirst_dbconnect") == false) { ! die("Your version of PHP has not been compiled with SQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request SQL support for your version of PHP."); ! } ! ! // We use glob enough, that we should either write a substitute, or just refuse to work ! if(!function_exists('glob')) { ! die('You really should upgrade PHP, seeing as you don't even have <a href="http://us2.php.net/manual/en/function.glob.php"><code>glob()</code></a>.'); } --- 63,74 ---- require_once('dbase.php'); require_once('auth.php'); + require_once('liteModule.php'); ! $sqlTablePrefix = 'ofirst_'; ! require_once('sitesettings.php'); if(function_exists("ofirst_dbconnect") == false) { ! die('Your version of PHP has not been compiled with SQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request SQL support for your version of PHP.'); } *************** *** 83,88 **** // Determine what module the user is viewing ! $currentmodule = str_replace($BasePath, '', $_SERVER['SCRIPT_NAME']); ! $currentmodule = substr($currentmodule, 1, strpos($currentmodule, '/', 2) - 1); // Include the functions using glob(); --- 76,81 ---- // Determine what module the user is viewing ! $curmodule = str_replace($BasePath, '', $_SERVER['SCRIPT_NAME']); ! $curmodule = substr($curmodule, 1, strpos($curmodule, '/', 2) - 1); // Include the functions using glob(); *************** *** 93,177 **** $headers = ''; ! $incl = ofirst_dbquery('SELECT * FROM ofirst_config'); $Modules = array(); - function AddModule($code, $name, $version, $includes, $adminnav, $modulenav, $active, $show) { - global $Modules, $BasePath; - $Modules[$code] = array( - 'name' => $name, - 'ver' => $version, - 'inc' => $includes, - 'admin' => $adminnav, - 'nav' => $modulenav, - # 'admin' => str_ireplace('$BasePath', $BasePath, $adminnav), - # 'nav' => str_ireplace('$BasePath', $BasePath, $modulenav), - 'active' => (bool)$active, - 'show' => (bool)$show - ); - } - // If there is no error then run the module add feature if(ofirst_dberrno() == 0) { // Begin to loop through modules from the databaes while($module = ofirst_dbfetch_object($incl)) { ! AddModule($module->modulename, ! $module->label, ! $module->version, ! explode(',', $module->includes), ! $module->adminnavigation, ! $module->modulenavigation, ! $module->active, ! $module->showonmenu ! ); // Check if the value is try, if it is then run an include ! if($module->active == true) { ! // Check if there are includes that need to be included ! if(!( $module->includes == '')){ ! // If the list is not empty then explode the value and put it into inclist ! $inclist = explode(',',$module->includes); ! // This is to remove an error that you have if you don't check if there are more then 2 ! if(is_array($inclist)){ ! ! // Loop through the inclist and add them according to their paths ! foreach($inclist As $inc){ ! include_once("$fBasePath/$module->modulename/$inc"); ! } ! } else { ! // If there is only 1 include available then use this line to include it instead ! include_once("$fBasePath/$module->modulename/$module->includes"); ! } ! } ! ! // If the module has requested to be shown on the menu then add it ! if( (bool) $module->showonmenu == true) { ! // If it is the current module then color the item ! if ($currentmodule == $module->modulename){ ! $headers .= " » <a class='menu selected' href='$BasePath/$module->modulename'>".ucwords($module->modulename)."</a> | "; ! ! // Declare important variables so that headers can pick them up and preview them ! ! $adminnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $module->adminnavigation)." <a href='http://bugzilla.openfirst.org'>Report Bug</a>"; ! $subnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $module->modulenavigation); ! } else { ! $headers .= " » <a class='menu' href='$BasePath/$module->modulename'>".ucwords($module->modulename)."</a> | "; ! } ! } ! } ! } ! } ! ! if (!preg_match('/\A[a-zA-Z0-9]+\z/',session_id())) { ! session_regenerate_id(); ! } ! session_write_close(); ?> --- 86,147 ---- $headers = ''; ! $incl = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('config')); $Modules = array(); + $CurrentModule = null; // If there is no error then run the module add feature if(ofirst_dberrno() == 0) { // Begin to loop through modules from the databaes while($module = ofirst_dbfetch_object($incl)) { ! $thisModule =& liteModule::createFromRecord($module); ! $Modules[] =& $thisModule; ! // Check if the value is try, if it is then run an include ! if($thisModule->getActive()) { ! $inclist = $thisModule->getIncludes(); ! $dir = $thisModule->getDir(); ! $modulename = $thisModule->getID(); ! $showonmenu = $thisModule->getShowOnMenu(); ! $name = $thisModule->getName(); ! $modulenavigation = $thisModule->getNavBar(); ! $adminnavigation = $thisModule->getAdminBar(); ! ! // Loop through the inclist and add them according to their paths ! foreach($inclist As $inc){ ! include_once("$fBasePath/$modulename/$inc"); ! } ! ! // If the module has requested to be shown on the menu then add it ! if ( (bool) $module->showonmenu == true) { ! // If it is the current module then color the item ! if ($curmodule == $modulename){ ! $CurrentModule =& $thisModule; ! $headers .= " » <a class='menu selected' href='$BasePath/$dir'>".htmlentities($name)."</a> | "; ! ! // Declare important variables so that headers can pick them up and preview them ! ! $adminnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $adminnavigation)." <a href='http://bugzilla.openfirst.org'>Report Bug</a>"; ! $subnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $modulenavigation); ! } else { ! $headers .= " » <a class='menu' href='$BasePath/$dir'>".htmlentities($name)."</a> | "; ! } ! } ! } ! } ! } ! ! if (!preg_match('/\A[a-zA-Z0-9]+\z/',session_id())) { ! session_regenerate_id(); ! } ! session_write_close(); ?> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 16:04:03
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23074/config Modified Files: openfirst.info.xml Log Message: Added dir field to config Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/base/config/openfirst.info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openfirst.info.xml 27 May 2005 14:36:31 -0000 1.1 --- openfirst.info.xml 27 May 2005 16:03:48 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- <!-- Empty tags with no attributes serve as flags. Should be self explainatory --> <field name="modulename"><type>varchar<length>25</length></type> <not_null /> <default></default></field> + <field name="dir"><type>varchar<length>25</length></type> <not_null /></field> <field name="UpdateDate"><type>datetime</type> <not_null /></field> <field name="label"><type>varchar<length>25</length></type></field> *************** *** 36,39 **** --- 37,46 ---- <unique /> </key> + <key name="dir"> + <cols> + <col>dir</col> + </cols> + <unique /> + </key> </keys> </table> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 14:37:50
|
Update of /cvsroot/openfirst/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3435/modules Modified Files: index.php openfirst.info.xml Log Message: index.php shows currently available modules. Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/modules/openfirst.info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openfirst.info.xml 27 May 2005 13:56:55 -0000 1.1 --- openfirst.info.xml 27 May 2005 14:37:40 -0000 1.2 *************** *** 3,10 **** <version>CVS</version> <author>Jamie Bliss</author> - <maintainer>Jamie Bliss</maintainer> <navbar><![CDATA[ ! <a href="$basepath/modules/export.php">Export module info</a> | <a href="$basepath/modules/info.php">Generate info file</a> ]]></navbar> </module> --- 3,11 ---- <version>CVS</version> <author>Jamie Bliss</author> <navbar><![CDATA[ ! <a href="$basepath/modules/index.php">Show available modules</a> | ! <a href="$basepath/modules/export.php">Export module info</a> | ! <a href="$basepath/modules/info.php">Generate info file</a> ]]></navbar> </module> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/modules/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 26 May 2005 23:27:30 -0000 1.3 --- index.php 27 May 2005 14:37:40 -0000 1.4 *************** *** 22,27 **** * */ ! require_once("../includes/globals.php"); ! header("location: $BasePath/modules/info.php"); ?> --- 22,135 ---- * */ ! require_once('../includes/globals.php'); ! require_once('modules.php'); ! ! $files = glob("$fBasePath/*/openfirst.info.xml"); ! ! $oMods = array(); + foreach($files as $file) { + $oMods[] =& Module::createFromFile($file); + } + + include($Header); ?> + <table> + <thead> + <tr> + <th>ID</th> + <th>Name</th> + <th>Version</th> + <th>Author</th> + <th>Maintainer</th> + <th>Includes</th> + <th>Navbar</th> + <th>Adminbar</th> + <th>Setup script</th> + <th>Remove script</th> + <th>Upgrade script</th> + </tr> + </thead> + <tbody> + <?php foreach($oMods as $mod) { + echo ' <tr> + '; + + echo ' <td><code class="ID">'; + echo htmlentities($mod->getID()); + echo '</code></td> + '; + + echo ' <td>'; + echo htmlentities($mod->getName()); + echo '</td> + '; + + echo ' <td>'; + echo htmlentities($mod->getVersion()); + echo '</td> + '; + + echo ' <td>'; + echo htmlentities($mod->getAuthor()); + echo '</td> + '; + + echo ' <td>'; + echo htmlentities($mod->getMaintainer()); + echo '</td> + '; + + echo ' <td>'; + $incs = $mod->getIncludes(); + if (count($incs) <= 0) { + echo '‍'; + } else { + echo ' + <ul> + '; + foreach($incs as $inc) { + echo ' <li><code class="file">'; + echo htmlentities($inc); + echo '</code></li> + '; + } + echo ' </ul> + '; + } + echo '</td> + '; + + echo ' <td>'; + echo htmlentities($mod->getNavBar()); + echo '</td> + '; + + echo ' <td>'; + echo htmlentities($mod->getAdminBar()); + echo '</td> + '; + + echo ' <td><code class="file">'; + echo htmlentities($mod->getSetupScript()); + echo '</code></td> + '; + + echo ' <td><code class="file">'; + echo htmlentities($mod->getRemoveScript()); + echo '</code></td> + '; + + echo ' <td><code class="file">'; + echo htmlentities($mod->getUpgradeScript()); + echo '</code></td> + '; + + echo ' </tr> + '; + } + ?> + </tbody> + </table> + <?php + include($Footer); ?> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 14:36:40
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3183/config Added Files: openfirst.info.xml Log Message: more fixes, etc. config/openfirst.info.xml only specifies the basic DB setup, so that standard classes can be used to set it up. openfirst.base IS NOT A MODULE. --- NEW FILE: openfirst.info.xml --- <module id="openfirst.base"> <!-- NOTE: This file defines the basic DB layout when installing or upgrading. openfirst.base is a psuedomodule. --> <name>Base</name> <version>CVS</version> <author>The openFIRST Team</author> <!-- Database setup --> <db> <table id="config"> <fields> <!-- Empty tags with no attributes serve as flags. Should be self explainatory --> <field name="modulename"><type>varchar<length>25</length></type> <not_null /> <default></default></field> <field name="UpdateDate"><type>datetime</type> <not_null /></field> <field name="label"><type>varchar<length>25</length></type></field> <field name="Author"><type>tinytext</type></field> <field name="Maintainer"><type>tinytext</type><default>null</default></field> <field name="version"><type>varchar<length>10</length></type> <not_null /> <default>CVS</default></field> <field name="showonmenu"><type>BOOL</type> <not_null /> <default>0</default></field> <field name="active"><type>BOOL</type> <not_null /> <default>0</default></field> <field name="adminnavigation"><type>text</type></field> <field name="modulenavigation"><type>text</type></field> <field name="includes"><type>text</type></field> </fields> <keys> <key> <cols> <col>modulename</col> </cols> <primary /> </key> <key name="modulename"> <cols> <col>modulename</col> </cols> <unique /> </key> </keys> </table> <table id="firstawards"> <fields> <field name="user"><type>varchar<length>128</length></type><not_null /></field> <field name="firstname"><type>tinytext</type></field> <field name="lastname"><type>tinytext</type></field> <field name="lastseen"><type>datetime</type></field> <field name="ip"><type>tinytext</type></field> <field name="password"><type>text</type></field> <field name="authcode"><type>text</type></field> <field name="membertype"><type>tinytext</type></field> <field name="division"><type>tinytext</type></field> <field name="year"><type>year</type></field> <field name="email"><type>text</type></field> <field name="icq"><type>int<length>11</length></type></field> <field name="aim"><type>tinytext</type></field> <field name="msn"><type>tinytext</type></field> <field name="yim"><type>tinytext</type></field> <field name="jabber"><type>tinytext</type></field> <field name="description"><type>text</type></field> <field name="signature"><type>tinytext</type></field> <field name="dateregistered"><type>datetime</type></field> <field name="picturelocation"><type>tinytext</type></field> <field name="team"><type>int<length>11</length></type></field> <field name="skills"><type>text</type></field> </fields> <keys> <key name="user"> <cols> <col>user</col> </cols> <unique /> </key> </keys> </table> </db> </module> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 14:36:40
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3183/includes Modified Files: modules.php Log Message: more fixes, etc. config/openfirst.info.xml only specifies the basic DB setup, so that standard classes can be used to set it up. openfirst.base IS NOT A MODULE. Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** modules.php 27 May 2005 13:59:48 -0000 1.6 --- modules.php 27 May 2005 14:36:31 -0000 1.7 *************** *** 69,73 **** } } ! } } --- 69,75 ---- } } ! } ! ! if (is_null($this->mMaintainer)) $this->mMaintainer = $this->mAuthor; } |
From: Astronouth7303 <ast...@us...> - 2005-05-27 13:59:58
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27433/includes Modified Files: modules.php Log Message: Fixed bugs, now nav/admin bars can be gotten Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** modules.php 27 May 2005 13:53:19 -0000 1.5 --- modules.php 27 May 2005 13:59:48 -0000 1.6 *************** *** 200,206 **** $this->mMaintainer = $this->mxmlCurTag->Contents[0]; } else if ($name == 'NAVBAR') { ! $this->mNavbar = $this->mxmlCurTag->Contents[0]; } else if ($name == 'ADMINBAR') { ! $this->mAdminbar = $this->mxmlCurTag->Contents[0]; } else if ($name == 'INCLUDES') { $this->mIncludesTag =& $this->mxmlCurTag; --- 200,206 ---- $this->mMaintainer = $this->mxmlCurTag->Contents[0]; } else if ($name == 'NAVBAR') { ! $this->mNavBar = $this->mxmlCurTag->Contents[0]; } else if ($name == 'ADMINBAR') { ! $this->mAdminBar = $this->mxmlCurTag->Contents[0]; } else if ($name == 'INCLUDES') { $this->mIncludesTag =& $this->mxmlCurTag; |
From: Astronouth7303 <ast...@us...> - 2005-05-27 13:57:04
|
Update of /cvsroot/openfirst/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26877/modules Added Files: openfirst.info.xml Removed Files: openfirst.info.php Log Message: Switched from PHP to XML --- NEW FILE: openfirst.info.xml --- <module id="openfirst.modules"> <name>Modules</name> <version>CVS</version> <author>Jamie Bliss</author> <maintainer>Jamie Bliss</maintainer> <navbar><![CDATA[ <a href="$basepath/modules/export.php">Export module info</a> | <a href="$basepath/modules/info.php">Generate info file</a> ]]></navbar> </module> --- openfirst.info.php DELETED --- |
From: Astronouth7303 <ast...@us...> - 2005-05-27 13:53:30
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26298/includes Modified Files: modules.php Log Message: Added property-getting functions Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** modules.php 27 May 2005 00:02:24 -0000 1.4 --- modules.php 27 May 2005 13:53:19 -0000 1.5 *************** *** 62,71 **** $this->mIncludes = array(); // Handle includes ! $IncludeTags = $this->mIncludesTag->Contents; ! foreach($IncludeTags as $tag) { ! if (is_object($tag) && is_a($tag, 'xmlElement')) { ! $this->mIncludes[] = $tag->Contents[0]; } ! } } --- 62,73 ---- $this->mIncludes = array(); // Handle includes ! if (is_object($this->mIncludesTag)) { ! $IncludeTags = $this->mIncludesTag->Contents; ! foreach($IncludeTags as $tag) { ! if (is_object($tag) && is_a($tag, 'xmlElement')) { ! $this->mIncludes[] = $tag->Contents[0]; ! } } ! } } *************** *** 91,94 **** --- 93,145 ---- } + /*** PUBLIC PROPERTIES ***/ + /*public*/ function getName() { + return $this->mName; + } + + /*public*/ function getID() { + return $this->mID; + } + + /*public*/ function getVersion() { + return $this->mVersion; + } + + /*public*/ function getAuthor() { + return $this->mAuthor; + } + + /*public*/ function getMaintainer() { + return $this->mMaintainer; + } + + /*public*/ function getIncludes() { + return $this->mIncludes; + } + + /*public*/ function getNavBar() { + return $this->mNavBar; + } + + /*public*/ function getAdminBar() { + return $this->mAdminBar; + } + + /*public*/ function getTables() { + return $this->mTables; + } + + /*public*/ function getSetupScript() { + return $this->mSetupScript; + } + + /*public*/ function getRemoveScript() { + return $this->mRemoveScript; + } + + /*public*/ function getUpgradeScript() { + return $this->mUpgradeScript; + } + /*** PRIVATE FUNCTIONS ***/ /*private*/ function getModuleDTD() { *************** *** 118,129 **** if (isset($this->mxmlCurTag)) { $this->mxmlCurTag =& $this->mxmlCurTag->addElement($name, $attrs); - $this->mRootElement =& $this->mxmlCurTag; } else { $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); } ! if ($name == 'module') { if (isset($attrs['ID'])) $this->mID = $attrs['ID']; ! } else if ($name == 'script') { if (!isset($attrs['rel']) || !isset($attrs['src'])) break; $type = $attrs['rel']; --- 169,180 ---- if (isset($this->mxmlCurTag)) { $this->mxmlCurTag =& $this->mxmlCurTag->addElement($name, $attrs); } else { $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); + $this->mRootElement =& $this->mxmlCurTag; } ! if ($name == 'MODULE') { if (isset($attrs['ID'])) $this->mID = $attrs['ID']; ! } else if ($name == 'SCRIPT') { if (!isset($attrs['rel']) || !isset($attrs['src'])) break; $type = $attrs['rel']; *************** *** 140,158 **** function endElement($parser, $name) { ! if ($name == 'name') { $this->mName = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'version') { $this->mVersion = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'author') { $this->mAuthor = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'maintainer') { $this->mMaintainer = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'navbar') { $this->mNavbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'adminbar') { $this->mAdminbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'includes') { $this->mIncludesTag =& $this->mxmlCurTag; ! } else if ($name == 'db') { $this->mDBTag =& $this->mxmlCurTag; } --- 191,209 ---- function endElement($parser, $name) { ! if ($name == 'NAME') { $this->mName = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'VERSION') { $this->mVersion = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'AUTHOR') { $this->mAuthor = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'MAINTAINER') { $this->mMaintainer = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'NAVBAR') { $this->mNavbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'ADMINBAR') { $this->mAdminbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'INCLUDES') { $this->mIncludesTag =& $this->mxmlCurTag; ! } else if ($name == 'DB') { $this->mDBTag =& $this->mxmlCurTag; } |
From: Astronouth7303 <ast...@us...> - 2005-05-27 00:26:37
|
Update of /cvsroot/openfirst/awards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4984/awards Modified Files: openfirst.info.xml Log Message: XML errors Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/awards/openfirst.info.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openfirst.info.xml 26 May 2005 21:35:56 -0000 1.2 --- openfirst.info.xml 27 May 2005 00:26:14 -0000 1.3 *************** *** 1,5 **** <module id="openfirst.awards"> <!-- Info --> ! <!-- This is not used, accept as meta data --> <name>Awards</name> <version>CVS</version> --- 1,5 ---- <module id="openfirst.awards"> <!-- Info --> ! <!-- This is not used, except as meta data --> <name>Awards</name> <version>CVS</version> *************** *** 15,21 **** <!-- Either entities or CDATA can be used. Just make sure it's parsed into the literal HTML. --> <!-- Note the two ways of including BasePath. --> ! <navbar> ! <a href="&BasePath;/awards/">View Awards</a> ! </navbar> <adminbar><![CDATA[ <a href="$BasePath/awards/admin/">Manage Awards</a> --- 15,21 ---- <!-- Either entities or CDATA can be used. Just make sure it's parsed into the literal HTML. --> <!-- Note the two ways of including BasePath. --> ! <navbar><![CDATA[ ! <a href="$BasePath/awards/">View Awards</a> ! ]]></navbar> <adminbar><![CDATA[ <a href="$BasePath/awards/admin/">Manage Awards</a> *************** *** 31,35 **** <field name="Description"><type>text</type></field> <field name="Event"><type>tinytext</type></field> ! <field name="Date"><type>date</type><default>&null;</default></field> <field name="Recipient"><type>tinytext</type></field> <field name="Image"><type>tinytext</type></field> --- 31,35 ---- <field name="Description"><type>text</type></field> <field name="Event"><type>tinytext</type></field> ! <field name="Date"><type>date</type><default>null</default></field> <field name="Recipient"><type>tinytext</type></field> <field name="Image"><type>tinytext</type></field> *************** *** 44,50 **** <primary /> </key> ! </key> </table> ! <table id="firstawards"></table> <fields> <field name="AwardName"><type>tinytext</type></field> --- 44,50 ---- <primary /> </key> ! </keys> </table> ! <table id="firstawards"> <fields> <field name="AwardName"><type>tinytext</type></field> *************** *** 66,70 **** <record> <col name="AwardName">Regional Finalist</col> ! <col name="Description">This award celebrates the team or alliance that makes it to the final match of the competition. </record> <record> --- 66,70 ---- <record> <col name="AwardName">Regional Finalist</col> ! <col name="Description">This award celebrates the team or alliance that makes it to the final match of the competition.</col> </record> <record> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 00:02:36
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32023 Modified Files: index.php Log Message: fixes, etc. Added $usingPHP5 Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** index.php 26 May 2005 23:41:48 -0000 1.13 --- index.php 27 May 2005 00:02:24 -0000 1.14 *************** *** 35,39 **** global $Modules; ?> ! <h1>OpenFIRST Web Portal</h1> <table> <tr> --- 35,39 ---- global $Modules; ?> ! <h1>openFIRST Web Portal</h1> <table> <tr> |
From: Astronouth7303 <ast...@us...> - 2005-05-27 00:02:35
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32023/includes Modified Files: globals.php modules.php Log Message: fixes, etc. Added $usingPHP5 Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/globals.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** globals.php 26 May 2005 23:26:31 -0000 1.3 --- globals.php 27 May 2005 00:02:24 -0000 1.4 *************** *** 54,57 **** --- 54,60 ---- } + #Because of the differences between versions, this may be needed. + $usingPHP5 = version_compare(PHP_VERSION, '5.0.0', '>='); + require_once('compatibility.php'); Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** modules.php 26 May 2005 23:37:54 -0000 1.3 --- modules.php 27 May 2005 00:02:24 -0000 1.4 *************** *** 60,64 **** unset($hXML); ! $this->mIncludes = array() // Handle includes $IncludeTags = $this->mIncludesTag->Contents; --- 60,64 ---- unset($hXML); ! $this->mIncludes = array(); // Handle includes $IncludeTags = $this->mIncludesTag->Contents; *************** *** 120,124 **** $this->mRootElement =& $this->mxmlCurTag; } else { - $ClassName = $xmlClassNames['']; $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); } --- 120,123 ---- *************** *** 163,167 **** function characterData($parser, $data) { ! $this->mxmlCurTag =& $this->mxmlCurTag->addCData($data); } } --- 162,166 ---- function characterData($parser, $data) { ! $this->mxmlCurTag->addCData($data); } } *************** *** 170,174 **** var $Name, $Attributes, $Contents, $parent; ! /*public*/ function Element($Name, $Attributes, &$ParentElement=null) { $this->Name = $Name; $this->Attributes = $Attributes; --- 169,173 ---- var $Name, $Attributes, $Contents, $parent; ! /*public*/ function xmlElement($Name, $Attributes, &$ParentElement=null) { $this->Name = $Name; $this->Attributes = $Attributes; *************** *** 178,181 **** --- 177,184 ---- /*public*/ function addCData($Text) { + if (count($this->Contents) == 0) { + $this->Contents[] = $Text; + return; + } end($this->Contents); if (is_object(current($this->Contents))) { *************** *** 189,193 **** global $xmlClassNames; $ClassName = $xmlClassNames['Element']; ! return $this->Contents[] =& new $ClassName($Name, $Attrs, &$this); } --- 192,196 ---- global $xmlClassNames; $ClassName = $xmlClassNames['Element']; ! return $this->Contents[] =& new xmlElement($Name, $Attrs, &$this); } |
From: Astronouth7303 <ast...@us...> - 2005-05-27 00:02:32
|
Update of /cvsroot/openfirst/base/includes/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32023/includes/functions Modified Files: debug.php Log Message: fixes, etc. Added $usingPHP5 Index: debug.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/functions/debug.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debug.php 26 May 2005 21:00:03 -0000 1.2 --- debug.php 27 May 2005 00:02:23 -0000 1.3 *************** *** 39,43 **** $sqlConnection, $PassSaveDisabled, $regEnabled, $Server, $BasePath, $fBasePath, $Home, $StylePath, $fStylePath, $Header, $Footer, $MailNotify, $MailFrom; ! global $osType, $currentmodule, $user, $lastquery; global $NO_ADD_BUG; $dberrno = ofirst_dberrno(); --- 39,43 ---- $sqlConnection, $PassSaveDisabled, $regEnabled, $Server, $BasePath, $fBasePath, $Home, $StylePath, $fStylePath, $Header, $Footer, $MailNotify, $MailFrom; ! global $osType, $currentmodule, $user, $lastquery, $usingPHP5; global $NO_ADD_BUG; $dberrno = ofirst_dberrno(); *************** *** 52,55 **** --- 52,57 ---- } + if ($usingPHP5 && $errno == 2048) return; + $details = "MD5: $checksum Database Type: $DBaseType |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:41:58
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28416 Modified Files: index.php Log Message: changed to require_once() Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.php 26 May 2005 23:26:31 -0000 1.12 --- index.php 26 May 2005 23:41:48 -0000 1.13 *************** *** 29,33 **** // Purpose: provide a basic starting point for the OpenFIRST web portal. ! include("includes/globals.php"); include($Header); --- 29,33 ---- // Purpose: provide a basic starting point for the OpenFIRST web portal. ! require_once("includes/globals.php"); include($Header); |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:38:04
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27553/includes Modified Files: modules.php Log Message: Added <script> tag Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modules.php 26 May 2005 21:27:45 -0000 1.2 --- modules.php 26 May 2005 23:37:54 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- /*private*/ var $mName, $mID, $mVersion, $mAuthor, $mMaintainer; /*private*/ var $mIncludes, $mNavBar, $mAdminBar, $mTables; + /*private*/ var $mSetupScript, $mRemoveScript, $mUpgradeScript; // XML *************** *** 125,128 **** --- 126,140 ---- if ($name == 'module') { if (isset($attrs['ID'])) $this->mID = $attrs['ID']; + } else if ($name == 'script') { + if (!isset($attrs['rel']) || !isset($attrs['src'])) break; + $type = $attrs['rel']; + $file = $attrs['src']; + if ($type == 'setup') { + $this->mSetupScript = $file; + } else if ($type == 'remove') { + $this->mRemoveScript = $file; + } else if ($type == 'upgrade') { + $this->mUpgradeScript = $file; + } } } |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:27:40
|
Update of /cvsroot/openfirst/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25532/modules Modified Files: export.php index.php info.php Log Message: updates Index: export.php =================================================================== RCS file: /cvsroot/openfirst/modules/export.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** export.php 15 May 2005 13:22:51 -0000 1.2 --- export.php 26 May 2005 23:27:30 -0000 1.3 *************** *** 22,26 **** * */ ! include_once("../config/globals.php"); function GetVarValue($var) { --- 22,26 ---- * */ ! require_once("../includes/globals.php"); function GetVarValue($var) { *************** *** 32,38 **** } ! $incl = ofirst_dbquery('SELECT * FROM ofirst_config'); ! include_once($header); ?><fieldset> <legend>Code</legend> --- 32,38 ---- } ! $incl = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('config')); ! include_once($Header); ?><fieldset> <legend>Code</legend> *************** *** 89,92 **** </dl></fieldset> <?php ! include_once($footer); ?> --- 89,92 ---- </dl></fieldset> <?php ! include_once($Footer); ?> Index: info.php =================================================================== RCS file: /cvsroot/openfirst/modules/info.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** info.php 15 May 2005 13:22:51 -0000 1.3 --- info.php 26 May 2005 23:27:30 -0000 1.4 *************** *** 22,26 **** * */ ! include_once("../config/globals.php"); $posted = false; --- 22,26 ---- * */ ! require_once("../includes/globals.php"); $posted = false; *************** *** 84,93 **** ); ! include_once($header); ?><html> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data"> ! <fieldset style="left:auto; right:auto; padding:.5em; width:auto; margin: 1em;"> <legend>Info</legend> ! <div><table style="border: none 0px;"> <colgroup> <col id="labels" style="text-align:right;" /> --- 84,93 ---- ); ! include_once($Header); ?><html> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data"> ! <fieldset class="left" style="left:auto; right:auto; padding:.5em; width:auto; margin: 1em;"> <legend>Info</legend> ! <div class="left"><table class="left" style="border: none 0px;"> <colgroup> <col id="labels" style="text-align:right;" /> *************** *** 113,117 **** } </script> ! <input type="text" id="'.htmlentities($key).'name" name="'.htmlentities($key).'name" value="" style="width: 75%;" /><input type="button" value="Add" onclick="'.htmlentities($key).'Add()" style="width: 25%;" /><br /> <select size="6" name="'.htmlentities($key).'" id="'.htmlentities($key).'" style="width: 100%; display:block">'; foreach($item['value'] as $value) { --- 113,117 ---- } </script> ! <input type="text" id="'.htmlentities($key).'name" name="'.htmlentities($key).'name" value="" style="width: 75%;" />‍<input type="button" value="Add" onclick="'.htmlentities($key).'Add()" style="width: 24%;" /><br /> <select size="6" name="'.htmlentities($key).'" id="'.htmlentities($key).'" style="width: 100%; display:block">'; foreach($item['value'] as $value) { *************** *** 130,135 **** ?> <tr> ! <td>‌</td> ! <td><input type="submit" value="Submit" /></td> </tr> </table></div> --- 130,134 ---- ?> <tr> ! <td colspan="2" class="center"><input type="submit" value="Submit" /></td> </tr> </table></div> *************** *** 174,177 **** } ! include_once($footer); ?> --- 173,176 ---- } ! include_once($Footer); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/modules/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 15 May 2005 13:22:51 -0000 1.2 --- index.php 26 May 2005 23:27:30 -0000 1.3 *************** *** 22,27 **** * */ ! include_once("../config/globals.php"); ! header("location: $basepath/modules/info.php"); ?> --- 22,27 ---- * */ ! require_once("../includes/globals.php"); ! header("location: $BasePath/modules/info.php"); ?> |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:27:14
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25446/awards/admin Modified Files: index.php Log Message: updates Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** index.php 26 May 2005 21:00:31 -0000 1.22 --- index.php 26 May 2005 23:27:05 -0000 1.23 *************** *** 56,72 **** $DisplayForm = false; } // If user has posted create then insert new award record if ($CreateNew && !$DisplayForm){ ! if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ ! if($_POST['firstaward'] == "1") { $faq = ofirst_dbquery('SELECT * FROM '. ofirst_dbquote_table('firstawards'). ! ' WHERE ' ofirst_dbquote_name('AwardName'). '='. ! ofirst_dbquote_data($_POST['firstawardname'])); $fa = ofirst_dbfetch_object($faq); ! $_POST['award'] = $fa->AwardName; ! $_POST['description'] = $fa->Description; } --- 56,88 ---- $DisplayForm = false; } + + $firstaward = false; + if (isset($_POST['firstaward'])) $firstaward = $_POST['firstaward'] == '1' ? true : false; + $award = ''; + if (isset($_POST['award'])) $award = $_POST['award']; + $event = ''; + if (isset($_POST['event'])) $event = $_POST['event']; + $date = date('Y-n-j'); + if (isset($_POST['date'])) $date = $_POST['date']; + $recipient = ''; + if (isset($_POST['recipient'])) $recipient = $_POST['recipient']; + $description = ''; + if (isset($_POST['description'])) $description = $_POST['description']; + $type = 'gold'; + if (isset($_POST['type'])) $type = $_POST['type']; + // If user has posted create then insert new award record if ($CreateNew && !$DisplayForm){ ! if ($award != "" || $firstaward){ ! if($firstaward) { $faq = ofirst_dbquery('SELECT * FROM '. ofirst_dbquote_table('firstawards'). ! ' WHERE '. ofirst_dbquote_name('AwardName'). '='. ! ofirst_dbquote_data($firstaward)); $fa = ofirst_dbfetch_object($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; } *************** *** 74,80 **** ofirst_dbquote_table('awards').' ('. ofirst_dbquote_name(array('AwardName', 'FIRSTAward', 'Event', 'Date', 'Image', 'Description', 'Recipient')). ! ') values(' ! ofirst_dbquote_data(array($_POST['award'],$_POST['firstaward'],$_POST['event'],$_POST['date'],$_POST['type'],$_POST['description'],$_POST['recipient'])). ! ')'; #or die("INSERT: ".ofirst_dberror()) or die(trigger_error('an openFIRST DB error')) --- 90,96 ---- ofirst_dbquote_table('awards').' ('. ofirst_dbquote_name(array('AwardName', 'FIRSTAward', 'Event', 'Date', 'Image', 'Description', 'Recipient')). ! ') values('. ! ofirst_dbquote_data(array($award, $firstaward, $event, $date, $type, $description, $recipient)). ! ')') #or die("INSERT: ".ofirst_dberror()) or die(trigger_error('an openFIRST DB error')) *************** *** 91,114 **** if (!$CreateNew && !$DisplayForm){ ! if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ ! if($_POST['firstaward'] == "1") { $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '. ofirst_dbquote_name('AwardName').'='. ! ofirst_dbquote_data($_POST['firstawardname'])); $fa = ofirst_dbfetch_object($faq); ! $_POST['award'] = $fa->AwardName; ! $_POST['description'] = $fa->Description; } ofirst_dbquery('UPDATE '.ofirst_dbquote_table('awards').' SET '. ofirst_dbquote_fd_pairs(array( ! 'AwardName' => $_POST['award'], ! 'FIRSTAward' => $_POST['firstaward'], ! 'Event' => $_POST['event'], ! 'Date' => $_POST['date'], ! 'Image' => $_POST['type'], ! 'Description' => $_POST['description'], ! 'Recipient' => $_POST['recipient'])). ! ' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data($_POST['AwardID'])) or die("UPDATE: ".ofirst_dberror()); --- 107,130 ---- if (!$CreateNew && !$DisplayForm){ ! if ($award != "" || $firstaward){ ! if ($firstaward) { $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '. ofirst_dbquote_name('AwardName').'='. ! ofirst_dbquote_data($firstawardname)); $fa = ofirst_dbfetch_object($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; } ofirst_dbquery('UPDATE '.ofirst_dbquote_table('awards').' SET '. ofirst_dbquote_fd_pairs(array( ! 'AwardName' => $award, ! 'FIRSTAward' => $firstaward, ! 'Event' => $event, ! 'Date' => $date, ! 'Image' => $type, ! 'Description' => $description, ! 'Recipient' => $recipient)). ! ' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data(AwardID)) or die("UPDATE: ".ofirst_dberror()); *************** *** 123,127 **** // If the user has elected to modify an award, fill the form with those details. if(!$CreateNew) { ! $award = ofirst_dbfetch_object(ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data($_POST['AwardID']))); $award->template = false; --- 139,143 ---- // If the user has elected to modify an award, fill the form with those details. if(!$CreateNew) { ! $award = ofirst_dbfetch_object(ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data('AwardID'))); $award->template = false; *************** *** 142,148 **** <form method="post" action="index.php"> <table> <tr> ! <th> </th> ! <th><?php if (!$award->template) { echo("Modify an Existing Award --- 158,169 ---- <form method="post" action="index.php"> <table> + <colgroup> + <col /> + </colgroup> + <colgroup> + <col /> + </colgroup> <tr> ! <th colspan="2"><?php if (!$award->template) { echo("Modify an Existing Award *************** *** 155,181 **** <tr> <th>Award Name</th> ! <td> ! <input type='radio' name='firstaward' value='1' <?php if ($award->FIRSTAward) echo 'checked="checked"'; ?>> FIRST Award ! <select name='firstawardname'> ! <?php ! $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' ORDER BY '.ofirst_dbquote_name('AwardName')); ! while($fa = ofirst_dbfetch_object($faq)) { ! echo "<option value='$fa->AwardName'"; ! if ($award->AwardName == $fa->AwardName) echo 'selected'; ! echo ">$fa->AwardName</option>"; ! } ! ?> ! </select> ! <br /><input type='radio' name='firstaward' value='1' <?php if (!$award->FIRSTAward) echo 'checked="checked"'; ?>> Custom Award ! <input name="award" type="text" id="award" value="<?php if (!$award->FIRSTAward) echo $award->AwardName; ?>"> </td> </tr> <tr> <th>Regional/Event</th> ! <td><input name="event" type="text" id="event" value="<?php echo $award->Event; ?>"></td> </tr> <tr> <th>Date</th> ! <td><input name="date" type="text" id="date" value="<?php echo $award->Date; ?>" size="10"> --- 176,220 ---- <tr> <th>Award Name</th> ! <td class="left"> ! <table class="no-space left"> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='1' <?php if ($award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> FIRST Award</td> ! </td> ! <td> ! <select name='firstawardname'> ! <?php ! $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' ORDER BY '.ofirst_dbquote_name('AwardName')); ! while($fa = ofirst_dbfetch_object($faq)) { ! echo "<option value='$fa->AwardName'"; ! if ($award->AwardName == $fa->AwardName) echo 'selected'; ! echo ">$fa->AwardName</option>"; ! } ! ?> ! </select> ! </td> ! </tr> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='0' <?php if (!$award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> Custom Award</td> ! </td> ! <td> ! <input name="award" type="text" id="award" value="<?php if (!$award->FIRSTAward) echo $award->AwardName; ?>"> ! </td> ! </tr> ! </table> </td> </tr> <tr> <th>Regional/Event</th> ! <td class="left"><input name="event" type="text" id="event" value="<?php echo $award->Event; ?>"></td> </tr> <tr> <th>Date</th> ! <td class="left"><input name="date" type="text" id="date" value="<?php echo $award->Date; ?>" size="10"> *************** *** 184,188 **** <tr> <th>Recipient</th> ! <td><input name="recipient" type="text" id="recipient" value="<?php echo $award->Recipient; ?>"></td> --- 223,227 ---- <tr> <th>Recipient</th> ! <td class="left"><input name="recipient" type="text" id="recipient" value="<?php echo $award->Recipient; ?>"></td> *************** *** 194,202 **** <tr> <th>Award Type</th> ! <td><table> <tr> ! <td><img src="<?php echo($basepath); ?>/awards/awardsgold.png" alt="Gold"></td> ! <td><img src="<?php echo($basepath); ?>/awards/awardssilver.png" alt="Silver"></td> ! <td><img src="<?php echo($basepath); ?>/awards/awardsbronze.png" alt="Bronze"></td> </tr> <tr> --- 233,241 ---- <tr> <th>Award Type</th> ! <td class="left"><table> <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsgold.png" alt="Gold"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardssilver.png" alt="Silver"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsbronze.png" alt="Bronze"></td> </tr> <tr> *************** *** 220,229 **** </tr> <tr> ! <th> </th> <?php if($award->template) { ?> ! <td><input name="create" type="submit" id="create" value="Create Award"></td> <?php } else { ?> ! <td><input name="modify" type="submit" id="modify" value="Modify Award"></td> <?php } ?> </tr> </table> --- 259,269 ---- </tr> <tr> ! <td colspan="2" class="center"> <?php if($award->template) { ?> ! <input name="create" type="submit" id="create" value="Create Award"> <?php } else { ?> ! <input name="modify" type="submit" id="modify" value="Modify Award"></td> <?php } ?> + </td> </tr> </table> *************** *** 231,236 **** <table> <tr> ! <th> </th> ! <th>Award Name</th> <th>Event</th> <th>Date</th> --- 271,275 ---- <table> <tr> ! <th colspan="2">Award Name</th> <th>Event</th> <th>Date</th> *************** *** 244,248 **** ?> <tr> ! <td><img src="<?php echo($basepath); ?>/awards/awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> <td><?php echo $awards->AwardName; ?></td> <td><?php echo $awards->Event; ?></td> --- 283,287 ---- ?> <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> <td><?php echo $awards->AwardName; ?></td> <td><?php echo $awards->Event; ?></td> *************** *** 266,269 **** showlogin(); } ! include_once($footer); ?> --- 305,308 ---- showlogin(); } ! include_once($Footer); ?> |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:27:14
|
Update of /cvsroot/openfirst/awards/setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25446/awards/setup Modified Files: setup.mysql Log Message: updates Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/awards/setup/setup.mysql,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** setup.mysql 12 Apr 2004 20:48:20 -0000 1.9 --- setup.mysql 26 May 2005 23:27:05 -0000 1.10 *************** *** 1,4 **** ! CREATE TABLE `ofirst_awards` (`ID` int(6) unsigned NOT NULL auto_increment, `AwardName` tinytext, `Description` text,`Event` tinytext, `Date` date default NULL, `Recipient` tinytext, `Image` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! ALTER TABLE `ofirst_awards` ADD column Description TEXT; INSERT INTO ofirst_config SET modulename='awards',showonmenu='0',active='0',adminnavigation='<a href="$basepath/awards/admin/">Manage Awards</a>',modulenavigation='<a href="$basepath/awards/">View Awards</a>'; ALTER TABLE `ofirst_awards` ADD column FIRSTAward BOOL; --- 1,10 ---- ! CREATE TABLE `ofirst_awards` ( `ID` int(6) unsigned NOT NULL auto_increment, ! `AwardName` tinytext, ! `Description` text, ! `Event` tinytext, ! `Date` date default NULL, ! `Recipient` tinytext, ! `Image` tinytext, ! PRIMARY KEY (`ID`)); INSERT INTO ofirst_config SET modulename='awards',showonmenu='0',active='0',adminnavigation='<a href="$basepath/awards/admin/">Manage Awards</a>',modulenavigation='<a href="$basepath/awards/">View Awards</a>'; ALTER TABLE `ofirst_awards` ADD column FIRSTAward BOOL; |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:27:14
|
Update of /cvsroot/openfirst/awards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25446/awards Modified Files: index.php Log Message: updates Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** index.php 26 May 2005 21:00:31 -0000 1.16 --- index.php 26 May 2005 23:27:05 -0000 1.17 *************** *** 45,50 **** <table> <tr> ! <th> </th> ! <th>Award Name</th> <th>Event</th> <th>Date</th> --- 45,49 ---- <table> <tr> ! <th colspan="2">Award Name</th> <th>Event</th> <th>Date</th> *************** *** 57,62 **** <tr valign="top"> <td><img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td><b><?php echo $awards->AwardName; ?></b><br> ! <?php echo $awards->Description; ?> </td> <td><?php echo $awards->Event; ?></td> <td><?php echo $awards->Date; ?></td> --- 56,63 ---- <tr valign="top"> <td><img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td> ! <h3><?php echo $awards->AwardName; ?></h3> ! <p><?php echo $awards->Description; ?></p> ! </td> <td><?php echo $awards->Event; ?></td> <td><?php echo $awards->Date; ?></td> *************** *** 80,85 **** <table> <tr> ! <th> </th> ! <th>Award Name</th> <th>Event</th> <th>Date</th> --- 81,85 ---- <table> <tr> ! <th colspan="2">Award Name</th> <th>Event</th> <th>Date</th> *************** *** 92,97 **** <tr valign="top"> <td><img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td><b><?php echo $awards->AwardName; ?></b><br> ! <?php echo $awards->Description; ?> </td> <td><?php echo $awards->Event; ?></td> <td><?php echo $awards->Date; ?></td> --- 92,99 ---- <tr valign="top"> <td><img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td> ! <h3><?php echo $awards->AwardName; ?></h3> ! <p><?php echo $awards->Description; ?></p> ! </td> <td><?php echo $awards->Event; ?></td> <td><?php echo $awards->Date; ?></td> |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:26:40
|
Update of /cvsroot/openfirst/base/style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25284/style Modified Files: footers.php headers.php style.css Log Message: updates Index: footers.php =================================================================== RCS file: /cvsroot/openfirst/base/style/footers.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** footers.php 25 May 2005 21:44:38 -0000 1.1 --- footers.php 26 May 2005 23:26:31 -0000 1.2 *************** *** 1,5 **** <?php ! if(! isset($basepath)){ ! $basepath = "http://openfirst.sourceforge.net/"; } ?></div> --- 1,5 ---- <?php ! if(! isset($BasePath)){ ! $BasePath = "http://openfirst.sourceforge.net/"; } ?></div> *************** *** 7,22 **** <hr /> <div id="copyright" class="menu center"> ! © Copyright 2002-2003 by <?php echo $title; ?>. All rights reserved. </div> <?php if(isset($user->membertype) && $user->membertype == "administrator"){ ! echo "<div id=\"adiminlink\">[ <a href='".htmlentities($basepath)."/config/index.php'>Administrator Options / Configuration Area</a> ]</div>"; } ?> <div class="right menu"> <a class="logo" href="http://openfirst.sourceforge.net"> ! <img src="<?php echo htmlentities("$basepath"); ?>/images/poweredby-small.png" alt="Powered by openFIRST" /> ! </a> ! <a class="valid" href="http://validator.w3.org/check?uri=http%3A//openfirst.sourceforge.net/"> ! <img src="<?php echo htmlentities("$basepath"); ?>/images/w3c401.png" alt="Valid HTML 4.01" /> </a> </div> --- 7,19 ---- <hr /> <div id="copyright" class="menu center"> ! © Copyright 2002-2003 by <?php echo $Title; ?>. All rights reserved. </div> <?php if(isset($user->membertype) && $user->membertype == "administrator"){ ! echo "<div id=\"adiminlink\">[ <a href='".htmlentities($BasePath)."/config/index.php'>Administrator Options / Configuration Area</a> ]</div>"; } ?> <div class="right menu"> <a class="logo" href="http://openfirst.sourceforge.net"> ! <img src="<?php echo htmlentities("$StylePath"); ?>/images/poweredby-small.png" alt="Powered by openFIRST" /> </a> </div> Index: style.css =================================================================== RCS file: /cvsroot/openfirst/base/style/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** style.css 26 May 2005 21:00:03 -0000 1.2 --- style.css 26 May 2005 23:26:31 -0000 1.3 *************** *** 39,42 **** --- 39,44 ---- #adminmenu { color: white; + background-image: url(images/back-admin.png); + text-align: left; } #adminmenu a:link { *************** *** 140,144 **** } ! .center { margin-left: auto; margin-right: auto; --- 142,146 ---- } ! .center, .center > * { margin-left: auto; margin-right: auto; *************** *** 146,150 **** } ! .right { margin-left: auto; margin-right: 0; --- 148,152 ---- } ! .right, .right > * { margin-left: auto; margin-right: 0; *************** *** 152,156 **** } ! .left { margin-left: 0; margin-right: auto; --- 154,158 ---- } ! .left, .left > * { margin-left: 0; margin-right: auto; *************** *** 286,287 **** --- 288,299 ---- text-align: left; } + + .no-space, + table.no-space tr, table.no-space td, table.no-space th { + margin: 0; + padding: 0; + } + + margin: 0; + padding: 0; + } Index: headers.php =================================================================== RCS file: /cvsroot/openfirst/base/style/headers.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** headers.php 26 May 2005 21:00:03 -0000 1.2 --- headers.php 26 May 2005 23:26:31 -0000 1.3 *************** *** 1,5 **** <?php ! if(! isset($basepath)){ ! $basepath = 'http://openfirst.sourceforge.net'; $title = "openFIRST Team"; } --- 1,5 ---- <?php ! if(! isset($BasePath)){ ! $BasePath = 'http://openfirst.sourceforge.net'; $title = "openFIRST Team"; } *************** *** 85,89 **** ?> <tr> ! <td id="adminmenu" background="<?php echo($StylePath); ?>/images/back-admin.png"><b>Admin Options -</b> <?php // Print admin navigation bar --- 85,89 ---- ?> <tr> ! <td id="adminmenu"><b>Admin Options -</b> <?php // Print admin navigation bar *************** *** 100,105 **** <?php ! if ($basepath == 'http://openfirst.sourceforge.net') { ! unset($basepath); } --- 100,105 ---- <?php ! if ($BasePath == 'http://openfirst.sourceforge.net') { ! unset($BasePath); } |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:26:40
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25284 Modified Files: index.php Log Message: updates Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.php 26 May 2005 21:00:03 -0000 1.11 --- index.php 26 May 2005 23:26:31 -0000 1.12 *************** *** 103,107 **** } echo("</td></tr>"); ! echo("<tr><td class=sub>Welcome to the $title portal.</td></tr>"); echo("<tr><td valign=top>"); if(function_exists("shownews")) { --- 103,107 ---- } echo("</td></tr>"); ! echo("<tr><td class=sub>Welcome to the $Title portal.</td></tr>"); echo("<tr><td valign=top>"); if(function_exists("shownews")) { |
From: Astronouth7303 <ast...@us...> - 2005-05-26 23:26:40
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25284/includes Modified Files: dbase.php globals.php Log Message: updates Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dbase.php 26 May 2005 21:00:03 -0000 1.2 --- dbase.php 26 May 2005 23:26:31 -0000 1.3 *************** *** 390,394 **** $value .= ofirst_dbquote_name($text).','; } ! $value = substr($text, 0, -1); return $value; } else { --- 390,394 ---- $value .= ofirst_dbquote_name($text).','; } ! $value = substr($value, 0, -1); return $value; } else { *************** *** 405,409 **** $value .= ofirst_dbquote_table($text).','; } ! $value = substr($text, 0, -1); return $value; } else { --- 405,409 ---- $value .= ofirst_dbquote_table($text).','; } ! $value = substr($value, 0, -1); return $value; } else { *************** *** 414,426 **** #Used for quoting data function ofirst_dbquote_data($data) { ! if (is_array($name)) { $value = ''; ! foreach ($name as $text) { $value .= ofirst_dbquote_data($text).','; } ! $value = substr($text, 0, -1); return $value; } else { return "'".ofirst_dbescape($data)."'"; } --- 414,427 ---- #Used for quoting data function ofirst_dbquote_data($data) { ! if (is_array($data)) { $value = ''; ! foreach ($data as $text) { $value .= ofirst_dbquote_data($text).','; } ! $value = substr($value, 0, -1); return $value; } else { return "'".ofirst_dbescape($data)."'"; + } } *************** *** 436,440 **** $value .= ','; } ! $value = substr($text, 0, -1); return $value; } --- 437,441 ---- $value .= ','; } ! $value = substr($value, 0, -1); return $value; } Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/globals.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** globals.php 26 May 2005 21:00:03 -0000 1.2 --- globals.php 26 May 2005 23:26:31 -0000 1.3 *************** *** 129,133 **** $inclist = explode(',',$module->includes); // This is to remove an error that you have if you don't check if there are more then 2 ! if(count($inclist) >= 2){ // Loop through the inclist and add them according to their paths --- 129,133 ---- $inclist = explode(',',$module->includes); // This is to remove an error that you have if you don't check if there are more then 2 ! if(is_array($inclist)){ // Loop through the inclist and add them according to their paths *************** *** 150,155 **** // Declare important variables so that headers can pick them up and preview them ! $adminnav = str_ireplace('$BasePath', $BasePath, $module->adminnavigation) . " <a href='http://bugzilla.openfirst.org'>Report Bug</a>"; ! $subnav = str_ireplace('$BasePath', $BasePath, $module->modulenavigation); } else { --- 150,160 ---- // Declare important variables so that headers can pick them up and preview them ! $adminnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $module->adminnavigation)." <a href='http://bugzilla.openfirst.org'>Report Bug</a>"; ! ! $subnav = str_ireplace(array('$BasePath', '$StylePath'), ! array($BasePath, $StylePath), ! $module->modulenavigation); } else { |
From: Astronouth7303 <ast...@us...> - 2005-05-26 21:36:04
|
Update of /cvsroot/openfirst/awards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32615/awards Modified Files: openfirst.info.xml Log Message: Removed the type "MyISAM" Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/awards/openfirst.info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openfirst.info.xml 26 May 2005 21:00:48 -0000 1.1 --- openfirst.info.xml 26 May 2005 21:35:56 -0000 1.2 *************** *** 25,29 **** <db> <table id="awards"> - <type>MyISAM</type> <fields> <!-- Empty tags with no attributes serve as flags. Should be self explainatory --> --- 25,28 ---- |
From: Astronouth7303 <ast...@us...> - 2005-05-26 21:28:02
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30814/includes Modified Files: modules.php Log Message: XML parser finnished, code to update still needs to be added Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modules.php 26 May 2005 21:00:03 -0000 1.1 --- modules.php 26 May 2005 21:27:45 -0000 1.2 *************** *** 28,36 **** class Module { ! /*private*/ var $mName, $mCode, $mVersion, $mAuthor, $mMaintainer; /*private*/ var $mIncludes, $mNavBar, $mAdminBar, $mTables; // XML /*private*/ var $mxmlCurTag, $mRootElement; function Module($File) { --- 28,38 ---- class Module { ! /*private*/ var $mName, $mID, $mVersion, $mAuthor, $mMaintainer; /*private*/ var $mIncludes, $mNavBar, $mAdminBar, $mTables; // XML /*private*/ var $mxmlCurTag, $mRootElement; + // Specific tags for later. + /*private*/ var $mIncludesTag, $mDBTag; function Module($File) { *************** *** 56,59 **** --- 58,70 ---- xml_parser_free($hXML); unset($hXML); + + $this->mIncludes = array() + // Handle includes + $IncludeTags = $this->mIncludesTag->Contents; + foreach($IncludeTags as $tag) { + if (is_object($tag) && is_a($tag, 'xmlElement')) { + $this->mIncludes[] = $tag->Contents[0]; + } + } } *************** *** 111,117 **** --- 122,150 ---- $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); } + + if ($name == 'module') { + if (isset($attrs['ID'])) $this->mID = $attrs['ID']; + } } function endElement($parser, $name) { + if ($name == 'name') { + $this->mName = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'version') { + $this->mVersion = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'author') { + $this->mAuthor = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'maintainer') { + $this->mMaintainer = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'navbar') { + $this->mNavbar = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'adminbar') { + $this->mAdminbar = $this->mxmlCurTag->Contents[0]; + } else if ($name == 'includes') { + $this->mIncludesTag =& $this->mxmlCurTag; + } else if ($name == 'db') { + $this->mDBTag =& $this->mxmlCurTag; + } + $this->mxmlCurTag =& $this->mxmlCurTag->getParent(); } *************** *** 133,137 **** /*public*/ function addCData($Text) { ! return $this->Contents[] = $Text; } --- 166,175 ---- /*public*/ function addCData($Text) { ! end($this->Contents); ! if (is_object(current($this->Contents))) { ! $this->Contents[] = $Text; ! } else { ! $this->Contents[key($this->Contents)] .= $Text; ! } } |
From: Astronouth7303 <ast...@us...> - 2005-05-26 21:01:10
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25926/awards/admin Modified Files: index.php Log Message: radical changes, with more to come Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** index.php 14 Mar 2005 04:13:41 -0000 1.21 --- index.php 26 May 2005 21:00:31 -0000 1.22 *************** *** 22,27 **** * */ ! include_once("../../config/globals.php"); ! include_once($header); // Check if user is an admin then allow processes --- 22,27 ---- * */ ! include_once("../../includes/globals.php"); ! include_once($Header); // Check if user is an admin then allow processes *************** *** 31,35 **** // If user has posted delete then delete specified record in querystring DELETE if (isset($_GET['DELETE'])){ ! ofirst_dbquery("DELETE FROM ofirst_awards WHERE ID = '".$_GET['DELETE']."'") or die("DELETE: ". ofirst_dberror()); echo("<p>Award information has been deleted.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); --- 31,41 ---- // If user has posted delete then delete specified record in querystring DELETE if (isset($_GET['DELETE'])){ ! ofirst_dbquery('DELETE FROM '. ! ofirst_dbquote_table('awards'). ! ' WHERE '. ! ofirst_dbquote_name('ID'). ! ' = '. ! ofirst_dbquote_data($_GET['DELETE']) ! ) or die("DELETE: ". ofirst_dberror()); echo("<p>Award information has been deleted.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); *************** *** 50,59 **** $DisplayForm = false; } - # print_r($_POST); // If user has posted create then insert new award record if ($CreateNew && !$DisplayForm){ if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ if($_POST['firstaward'] == "1") { ! $faq = ofirst_dbquery("SELECT * FROM ofirst_firstawards WHERE AwardName=\"" . $_POST['firstawardname'] ."\""); $fa = ofirst_dbfetch_object($faq); $_POST['award'] = $fa->AwardName; --- 56,69 ---- $DisplayForm = false; } // If user has posted create then insert new award record if ($CreateNew && !$DisplayForm){ if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ if($_POST['firstaward'] == "1") { ! $faq = ofirst_dbquery('SELECT * FROM '. ! ofirst_dbquote_table('firstawards'). ! ' WHERE ' ! ofirst_dbquote_name('AwardName'). ! '='. ! ofirst_dbquote_data($_POST['firstawardname'])); $fa = ofirst_dbfetch_object($faq); $_POST['award'] = $fa->AwardName; *************** *** 61,73 **** } ! ofirst_dbquery("INSERT INTO ofirst_awards (AwardName,FIRSTAward, Event,Date,Image,Description,Recipient) values( ! '".addslashes($_POST['award'])."', ! '".addslashes($_POST['firstaward'])."', ! '".addslashes($_POST['event'])."', ! '".addslashes($_POST['date'])."', ! '".addslashes($_POST['type'])."', ! '".addslashes($_POST['description'])."', ! '".addslashes($_POST['recipient'])."')") ! /*or die("INSERT: ".ofirst_dberror())*/ or die(trigger_error('an openFIRST DB error')) ; --- 71,81 ---- } ! ofirst_dbquery('INSERT INTO '. ! ofirst_dbquote_table('awards').' ('. ! ofirst_dbquote_name(array('AwardName', 'FIRSTAward', 'Event', 'Date', 'Image', 'Description', 'Recipient')). ! ') values(' ! ofirst_dbquote_data(array($_POST['award'],$_POST['firstaward'],$_POST['event'],$_POST['date'],$_POST['type'],$_POST['description'],$_POST['recipient'])). ! ')'; ! #or die("INSERT: ".ofirst_dberror()) or die(trigger_error('an openFIRST DB error')) ; *************** *** 77,81 **** echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); } ! die(include_once($footer)); } --- 85,89 ---- echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); } ! die(include_once($Footer)); } *************** *** 85,89 **** if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ if($_POST['firstaward'] == "1") { ! $faq = ofirst_dbquery("SELECT * FROM ofirst_firstawards WHERE AwardName=\"" . $_POST['firstawardname'] . "\""); $fa = ofirst_dbfetch_object($faq); $_POST['award'] = $fa->AwardName; --- 93,99 ---- if($_POST['award']!="" || (isset($_POST['firstaward']) && $_POST['firstaward'] == '1')){ if($_POST['firstaward'] == "1") { ! $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '. ! ofirst_dbquote_name('AwardName').'='. ! ofirst_dbquote_data($_POST['firstawardname'])); $fa = ofirst_dbfetch_object($faq); $_POST['award'] = $fa->AwardName; *************** *** 91,101 **** } ! ofirst_dbquery("UPDATE ofirst_awards SET AwardName='".$_POST['award']."', ! FIRSTAward = '".addslashes($_POST['firstaward'])."', ! Event = '".addslashes($_POST['event'])."', ! Date = '".addslashes($_POST['date']). "', ! Image = '".addslashes($_POST['type'])."', ! Description = '".addslashes($_POST['description'])."', ! Recipient = '".addslashes($_POST['recipient'])."' WHERE ID='" . $_POST["AwardID"] . "';") or die("UPDATE: ".ofirst_dberror()); --- 101,114 ---- } ! ofirst_dbquery('UPDATE '.ofirst_dbquote_table('awards').' SET '. ! ofirst_dbquote_fd_pairs(array( ! 'AwardName' => $_POST['award'], ! 'FIRSTAward' => $_POST['firstaward'], ! 'Event' => $_POST['event'], ! 'Date' => $_POST['date'], ! 'Image' => $_POST['type'], ! 'Description' => $_POST['description'], ! 'Recipient' => $_POST['recipient'])). ! ' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data($_POST['AwardID'])) or die("UPDATE: ".ofirst_dberror()); *************** *** 110,114 **** // If the user has elected to modify an award, fill the form with those details. if(!$CreateNew) { ! $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); $award->template = false; --- 123,127 ---- // If the user has elected to modify an award, fill the form with those details. if(!$CreateNew) { ! $award = ofirst_dbfetch_object(ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data($_POST['AwardID']))); $award->template = false; *************** *** 146,150 **** <select name='firstawardname'> <?php ! $faq = ofirst_dbquery("SELECT * FROM ofirst_firstawards ORDER BY AwardName"); while($fa = ofirst_dbfetch_object($faq)) { echo "<option value='$fa->AwardName'"; --- 159,163 ---- <select name='firstawardname'> <?php ! $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' ORDER BY '.ofirst_dbquote_name('AwardName')); while($fa = ofirst_dbfetch_object($faq)) { echo "<option value='$fa->AwardName'"; *************** *** 227,231 **** <?php // Loop through awards ordered by date ! $query = ofirst_dbquery("SELECT * FROM ofirst_awards ORDER BY Date"); while($awards = ofirst_dbfetch_object($query)){ ?> --- 240,244 ---- <?php // Loop through awards ordered by date ! $query = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' ORDER BY '.ofirst_dbquote_name('Date')); while($awards = ofirst_dbfetch_object($query)){ ?> *************** *** 241,245 **** } if(ofirst_dbnum_rows($query) == 0){ ! echo "<tr><td> </td><td> </td><td>No awards entered!</td><td> </td><td> </td><td> </td></tr>"; } ?> --- 254,258 ---- } if(ofirst_dbnum_rows($query) == 0){ ! echo '<tr><td colspan="6">No awards entered!</td></tr>'; } ?> |