[Openfirst-cvscommit] SF.net SVN: openfirst: [167] tags
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-21 15:38:43
|
Revision: 167 Author: astronouth7303 Date: 2006-06-21 08:38:19 -0700 (Wed, 21 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=167&view=rev Log Message: ----------- Adding openfirst.awards and openfirst.modules 2.0a1 (for reference) Added Paths: ----------- tags/openfirst.awards-2.0a1/ tags/openfirst.awards-2.0a1/awards/ tags/openfirst.awards-2.0a1/awards/NOTES tags/openfirst.awards-2.0a1/awards/admin/ tags/openfirst.awards-2.0a1/awards/admin/index.php tags/openfirst.awards-2.0a1/awards/awards.php tags/openfirst.awards-2.0a1/awards/awardsbronze.png tags/openfirst.awards-2.0a1/awards/awardsfirst.gif tags/openfirst.awards-2.0a1/awards/awardsgold.png tags/openfirst.awards-2.0a1/awards/awardssilver.png tags/openfirst.awards-2.0a1/awards/index.php tags/openfirst.awards-2.0a1/awards/openfirst.info.xml tags/openfirst.modules-2.0a1/ tags/openfirst.modules-2.0a1/awards/ tags/openfirst.modules-2.0a1/awards/NOTES tags/openfirst.modules-2.0a1/awards/admin/ tags/openfirst.modules-2.0a1/awards/admin/index.php tags/openfirst.modules-2.0a1/awards/awards.php tags/openfirst.modules-2.0a1/awards/awardsbronze.png tags/openfirst.modules-2.0a1/awards/awardsfirst.gif tags/openfirst.modules-2.0a1/awards/awardsgold.png tags/openfirst.modules-2.0a1/awards/awardssilver.png tags/openfirst.modules-2.0a1/awards/index.php tags/openfirst.modules-2.0a1/awards/openfirst.info.xml Property changes on: tags/openfirst.awards-2.0a1/awards ___________________________________________________________________ Name: of:module + openfirst.awards Added: tags/openfirst.awards-2.0a1/awards/NOTES =================================================================== --- tags/openfirst.awards-2.0a1/awards/NOTES (rev 0) +++ tags/openfirst.awards-2.0a1/awards/NOTES 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,11 @@ +openFIRST.awards + +--- + +** December 25, 2003 Release ** + +David Di Biase - Module approved. + +Tim Ginn - Module approved. + +Greg Inozemtsev - Module approved. Property changes on: tags/openfirst.awards-2.0a1/awards/NOTES ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/plain Name: svn:eol-style + native Property changes on: tags/openfirst.awards-2.0a1/awards/admin ___________________________________________________________________ Name: of:module + openfirst.awards Added: tags/openfirst.awards-2.0a1/awards/admin/index.php =================================================================== --- tags/openfirst.awards-2.0a1/awards/admin/index.php (rev 0) +++ tags/openfirst.awards-2.0a1/awards/admin/index.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,312 @@ +<?php +/* + * openFIRST.awards - admin/index.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: David Di Biase <dav...@ea...> + * + * 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 + * + */ + include_once("../../includes/globals.php"); + include_once($Header); + + // Check if user is an admin then allow processes + if(isset($user->user)){ + + if($user->membertype=="administrator"){ + // 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>"); + die(include_once($footer)); + } + $DisplayForm = true; + $CreateNew = true; + if (array_key_exists('AwardID', $_POST)) { + $CreateNew = false; + $DisplayForm = false; + } + if (array_key_exists('create', $_POST)) { + $CreateNew = true; + $DisplayForm = false; + } + if (array_key_exists('modify', $_POST)) { + $CreateNew = false; + $DisplayForm = false; + } + + $firstaward = false; + if (isset($_POST['firstaward'])) $firstaward = $_POST['firstaward'] == '1' ? true : false; + $firstawardname = ''; + if (isset($_POST['firstawardname'])) $firstawardname = $_POST['firstawardname']; + $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) { + $sql = 'SELECT * FROM '.$ogDB->quoteTable('firstawards'). + ' WHERE '.$ogDB->quoteField('AwardName').'='.$ogDB->quoteData($firstawardname). + ' LIMIT 0,1'; + $faq = $ogDB->query($sql); + $fa = $ogDB->fetchObject($faq); + $award = $fa->AwardName; + $description = $fa->Description; + } + $sql = 'INSERT INTO '. + $ogDB->quoteTable('awards').' SET '. + $ogDB->quoteFDPairs(array('AwardName' => $award, + 'FIRSTAward' => $firstaward, + 'Event' => $event, + 'Date' => $date, + 'Image' => $type, + 'Description' => $description, + 'Recipient' => $recipient + )); + $ogDB->query($sql) or die(trigger_error('an openFIRST DB error')); + + echo("<p>Congratulations on your new award. Award submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } else { + echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } + die(include_once($Footer)); + } + + // If the user has submitted modifications to an award, then make them. + + 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()); + + echo("<p>Award modifications submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } else { + echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } + die(include_once($footer)); + } + + + // If the user has elected to modify an award, fill the form with those details. + if(!$CreateNew) { + $sql = 'SELECT * FROM '.$ogDB->quoteTable('awards'). + ' WHERE '.$ogDB->quoteField('ID').'='.$ogDB->quoteData('AwardID'); + $award = $ogDB->fetchObject($ogDB->query($sql)); + $award->template = false; + + } else { + $award = (object)''; + $award->template = true; + $award->AwardName = 'Autodesk Visualization Award'; + $award->Description = ''; + $award->Event = ''; + $award->Date = date('Y-n-j'); + $award->Recipient = 'Team Award'; + $award->Image = 'gold'; + $award->FIRSTAward = '1'; + } +?> + +<h1>Manage Award Information</h1> +<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 + <input type='hidden' id='AwardID' name='AwardID' value='$award->ID'>"); + } else { + echo("Add A New Award"); + } + ?></th> + </tr> + <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 = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('firstawards').' ORDER BY '.$ogDB->quoteField('AwardName')); + while($fa = $ogDB->fetchObject($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"> + <sub>(Use this syntax: Year-Month-Day)</sub></td> + </tr> + <tr> + <th>Recipient</th> + <td class="left"><input name="recipient" type="text" id="recipient" value="<?php + echo $award->Recipient; + ?>"></td> + </tr> + <tr> + <th>Description<br />(leave blank for FIRST Awards)</th> + <td><textarea name="description" cols="30" rows="5"><?php echo $award->Description; ?></textarea></td> + </tr> + <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> + <td><div align="center"> + <input name="type" type="radio" value="gold" <?php + if (strcasecmp($award->Image, 'gold') == 0) echo 'checked="checked"'; + ?>> + </div></td> + <td><div align="center"> + <input type="radio" name="type" value="silver" <?php + if (strcasecmp($award->Image, 'silver') == 0) echo 'checked="checked"'; + ?>> + </div></td> + <td><div align="center"> + <input type="radio" name="type" value="bronze" <?php + if (strcasecmp($award->Image, 'bronze') == 0) echo 'checked="checked"'; + ?>> + </div></td> + </tr> + </table></td> + </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> +</form> +<table> + <tr> + <th colspan="2">Award Name</th> + <th>Event</th> + <th>Date</th> + <th>Recipient</th> + <th>Option</th> + </tr> +<?php + // Loop through awards ordered by date + $query = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('awards').' ORDER BY '.$ogDB->quoteName('Date')); + while($awards = $ogDB->fetchObject($query)){ +?> + <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> + <td><?php echo $awards->Date; ?></td> + <td><?php echo $awards->Recipient; ?></td> + <td><div align="center">[ <a href='./?DELETE=<?php echo $awards->ID; ?>'>Delete</a> | <a href='./?MODIFY=<?php echo $awards->ID; ?>'>Modify</a> ]</div></td> + </tr> +<?php + } + if($ogDB->numberOfRows($query) == 0){ + echo '<tr><td colspan="6">No awards entered!</td></tr>'; + } +?> +</table> +<br /> +<?php + } else { + echo("<h1>Manage Award Information</h1><p>Only administrators can use this feature</p>"); + } + } else { + showlogin(); + } + include_once($Footer); +?> Property changes on: tags/openfirst.awards-2.0a1/awards/admin/index.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.awards-2.0a1/awards/awards.php =================================================================== --- tags/openfirst.awards-2.0a1/awards/awards.php (rev 0) +++ tags/openfirst.awards-2.0a1/awards/awards.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,39 @@ +<?php +/* + * openFIRST.awards - awards.php + * + * Copyright (C) 2005, + * 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 AwardModule class, a child of the Module class. + +class AwardModule extends Module { + function getSlugURI($slug) { + /* + supported forms: + %Date% (some parsable date) + %Title% (The title exists) + %ID% (just an integer) + */ + } +} + +$awardmod =& new AwardModule(basename(dirname(__FILE__))); +$ogModuleManager->addModuleFromObject($awardmod); +?> Property changes on: tags/openfirst.awards-2.0a1/awards/awards.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.awards-2.0a1/awards/awardsbronze.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.awards-2.0a1/awards/awardsbronze.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.awards-2.0a1/awards/awardsfirst.gif =================================================================== (Binary files differ) Property changes on: tags/openfirst.awards-2.0a1/awards/awardsfirst.gif ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/gif Added: tags/openfirst.awards-2.0a1/awards/awardsgold.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.awards-2.0a1/awards/awardsgold.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.awards-2.0a1/awards/awardssilver.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.awards-2.0a1/awards/awardssilver.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.awards-2.0a1/awards/index.php =================================================================== --- tags/openfirst.awards-2.0a1/awards/index.php (rev 0) +++ tags/openfirst.awards-2.0a1/awards/index.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,103 @@ +<?php +/* + * openFIRST.awards - index.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: David Di Biase <dav...@ea...> + * + * 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 + * + */ + include_once("../includes/globals.php"); + include_once($Header); + + $where = array(); + if (isset($_REQUEST['id'])) { + $where[] = $ogDB->quoteField('ID').'='.$ogDB->quoteData($_REQUEST['id']); + } + if (isset($_REQUEST['name'])) { + $where[] = $ogDB->quoteField('AwardName').'='.$ogDB->quoteData($_REQUEST['name']); + } + if (isset($_REQUEST['event'])) { + $where[] = $ogDB->quoteField('Event').'='.$ogDB->quoteData($_REQUEST['event']); + } + if (isset($_REQUEST['date'])) { + $where[] = $ogDB->quoteField('Date').'='.$ogDB->quoteData($_REQUEST['date']); + } + if (isset($_REQUEST['recipient'])) { + $where[] = $ogDB->quoteField('Recipient').'='.$ogDB->quoteData($_REQUEST['recipient']); + } + if (isset($_REQUEST['image'])) { + $where[] = $ogDB->quoteField('Image').'='.$ogDB->quoteData($_REQUEST['image']); + } + if (isset($_REQUEST['first'])) { + $firstarg = trim($_REQUEST['first']); + if (strcasecmp($firstarg, 'yes') == 0 || strcasecmp($firstarg, 'y') == 0 || strcasecmp($firstarg, 1) == 0 || strcasecmp($firstarg, 'true' ) == 0) $first = true; + if (strcasecmp($firstarg, 'no' ) == 0 || strcasecmp($firstarg, 'n') == 0 || strcasecmp($firstarg, 0) == 0 || strcasecmp($firstarg, 'false') == 0) $first = false; + $where[] = $ogDB->quoteField('FIRSTAward').'='.$ogDB->quoteData($first); + } + + + // Query database for award information + $sql = 'SELECT * FROM '.$ogDB->quoteTable('awards'). + ((count($where) > 0) ? ' WHERE '.implode(' OR ', $where) : ''). + ' ORDER BY '.$ogDB->quoteField('Date').' DESC'; + $query = $ogDB->query($sql); + if ($query === false) { + echo $ogDB->errorNumber().': '.$ogDB->errorString().'<br />'; + var_dump($sql); + } + $amount = $ogDB->numberOfRows($query); +?> +<h1>Team Awards</h1> +<p>This team has won <b><?php echo $amount; ?></b> award(s)<?php if (count($where) > 0) echo ' that fit the criteria'; ?>.</p> +<?php + // If more then one award is present then show the values + if($amount > 0) { +?> +<table> + <tr> + <th colspan="2">Award Name</th> + <th>Event</th> + <th>Date</th> + <th>Recipient</th> + </tr> +<?php + // Loop through awards ordered by date + while($awards = $ogDB->fetchObject($query)){ +?> + <tr valign="top"> + <td> + <img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>" /> + <?php if ($awards->FIRSTAward) { ?><img src="awardsfirst.gif" /><?php } ?> + </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> + <td><?php echo $awards->Recipient; ?></td> + </tr> +<?php } ?> +</table> + +<?php + } + $ogDB->freeResult($query); + + include_once($Footer); +?> Property changes on: tags/openfirst.awards-2.0a1/awards/index.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.awards-2.0a1/awards/openfirst.info.xml =================================================================== --- tags/openfirst.awards-2.0a1/awards/openfirst.info.xml (rev 0) +++ tags/openfirst.awards-2.0a1/awards/openfirst.info.xml 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,173 @@ +<?xml version="1.0"?> +<module xmlns="http://openfirst.org/xml/module/1.0" id="openfirst.awards"> + <!-- Info --> + <!-- This is not used, except as meta data --> + <name>Awards</name> + <version>2.0a1</version> + <author>David Di Biase</author> + <maintainer>Jamie Bliss</maintainer> + + <includes> + <include>$fModPath/awards.php</include> + </includes> + + <!-- Configuration --> + <!-- Either entities or CDATA can be used. Just make sure it's parsed into the literal XHTML. --> + <!-- Note the two ways of including BasePath. --> + <navbar><![CDATA[ + <a href="$ModPath/">View Awards</a> + ]]></navbar> + <adminbar><![CDATA[ + <a href="$ModPath/admin/">Manage Awards</a> + ]]></adminbar> + + <!-- Database setup --> + <db> + <table name="awards"> + <fields> + <!-- Should be self explainatory --> + <field name="ID" null="no" autoincrement="yes"><type length="6" unsigned="yes">int</type></field> + <field name="AwardName"><type>tinytext</type></field> + <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> + <field name="Description"><type>TEXT</type></field> + <field name="FIRSTAward"><type>BOOL</type></field> + </fields> + <keys> + <key type="PRIMARY"> + <col>ID</col> + </key> + </keys> + </table> + <!-- Need to change this to an ID-based system. --> + <table name="firstawards"> + <fields><!--The longest is currently 42 chars--> + <field name="fa_id" null="no" autoincrement="yes"><type>int</type></field> + <field name="AwardName" null="no"><type>tinytext</type></field> + <field name="Description"><type>text</type></field> + </fields> + <keys> + <key type="primary"> + <col>fa_id</col> + </key> + </keys> + <rows> + <row> + <col name="AwardName">Chairman's Award</col> + <col name="Description">The FIRST Robotics Competition is about much more than the mechanics of building a robot or winning a competitive event. It is about the impact FIRST has on those who participate in the program and the impact of FIRST on the community at large. The FIRST mission is to change the way America's young people regard science and technology and to inspire an appreciation for the real-life rewards and career opportunities in these fields.</col> + </row> + <row> + <col name="AwardName">Regional Finalists</col> + <col name="Description">This award celebrates the team or alliance that makes it to the final match of the competition.</col> + </row> + <row> + <col name="AwardName">Leadership in Control</col> + <col name="Description">This award celebrates an innovative control system or application of control components to provide unique machine functions.</col> + </row> + <row> + <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> + </row> + <row> + <col name="AwardName">Rookie All-Star</col> + <col name="Description">This award celebrates the rookie team exemplifying a young but strong partnership effort, as well as implementing the mission of FIRST to inspire students to learn more about science and technology.</col> + </row> + <row> + <col name="AwardName">Website Award</col> + <col name="Description">This award recognizes excellence in student-designed, build, and managed FIRST team websites.</col> + </row> + <row> + <col name="AwardName">Xerox - Creativity</col> + <col name="Description">The award celebrates creative design, use of a component, or a creative or unique strategy of play.</col> + </row> + <row> + <col name="AwardName">The Allaire Medal - Leadership Exemplified</col> + <col name="Description">The Allaire Medal recognizes leadership exemplified, and is awarded to an individual student on the winning Chairman's Award team. Named in honor of Paul A. Allaire, a long-serving FIRST Chairman of the Board, the Allaire Medal is given to the student who has demonstrated outstanding leadership on his/her FIRST team, within his/her school and community, and whose personal character best embodies the spirit of FIRST.</col> + </row> + <row> + <col name="AwardName">Woodie Flowers Awards</col> + <col name="Description">The Woodie Flwers Award celebrates effective communication in the art and science of engineering and design. Dr. William Murphy and Small Parts, Inc. began this prestigious award in 1996. For the 2004 season, this award is being enhanced to honor more exemplary communicators in the FIRST community. Following Dr. Murphy's lead, FIRST Whishes to bring more attention to these FIRST heroes.</col> + </row> + <row> + <col name="AwardName">The Autodesk Inventor ® Award</col> + <col name="Description">Presented by Autodesk, Inc., this award recognizes the team that best understands, communicates, and documents the distinct phases of the design process from concept to completion.</col> + </row> + <row> + <col name="AwardName">The Autodesk Visualization Award</col> + <col name="Description">Presented by Autodesk, Inc. this award recognizes excellence in student animation that clearly and creatively illustrates the spirit of the FIRST Robtoics Compettion.</col> + </row> + <row> + <col name="AwardName">Champion</col> + <col name="Description">This award celebrates the team or alliance that wins the Championship.</col> + </row> + <row> + <col name="AwardName">Championship Finalist</col> + <col name="Description">This award celebrates the team or alliance that makes it to the final match of the Championship.</col> + </row> + <row> + <col name="AwardName">Division Finalist</col> + <col name="Description">This award celebrates the team or alliance that wins the final match in their division at the Championship.</col> + </row> + <row> + <col name="AwardName">Rookie Inspiration</col> + <col name="Description">Award celebrates a rookie team for outstanding effort as a FIRST team in a community outreach & recruiting students to engineering. This team models gracious professionalism on and off the field and is a true inspiration to others</col> + </row> + <row> + <col name="AwardName">Woodie Flowers Finalist Award</col> + <col name="Description">Awarded to an outstanding engineer or teacher participating in each of the robotics Regional Competions. Students choose and write about a person on their team who best demonstrates excellence in teaching science, math, and creative design. These Regional winners will receive consideration for the Championship Woodie Flowers Award.</col> + </row> + <row> + <col name="AwardName">Judges' Award</col> + <col name="Description">During the couse of the competition, the judging panel may encounter a team whose unique efforts, performance, or dyanmics merit recognition.</col> + </row> + <row> + <col name="AwardName">Kleiner Perkins Caufield & Byers-Entrepreneurship</col> + <col name="Description">Celebrates the Entrepreneurial Spirit. This award reconizes a team, which since its inception has developed the framework fer a comprehensive business plan in order to scope, manage, and obtain team objectives. This team displays entrepreneurial enthusiam and the vital business skills for a self-sustaining program.</col> + </row> + <row> + <col name="AwardName">Motorola-Quality</col> + <col name="Description">This award celebrates machine robustness in concept and fabrication</col> + </row> + <row> + <col name="AwardName">Regional Champion</col> + <col name="Description">This award celebrates the team or alliance that makes it to the final match of the competition.</col> + </row> + <row> + <col name="AwardName">General Motors-Industrial Design</col> + <col name="Description">the award celebrates form and function in an efficiently designed machine that effectively achieves the game challenge.</col> + </row> + <row> + <col name="AwardName">Highest Rookie Seed</col> + <col name="Description">this award celebrates the highest-seeded rookie team at the conclusion of the qualifying rounds</col> + </row> + <row> + <col name="AwardName">Imagery</col> + <col name="Description">This award celebrates attractiveness in engineering and outstanding visual aesthetic integration from the machine to team appearance</col> + </row> + <row> + <col name="AwardName">Johnson & Johnson-Sportsman</col> + <col name="Description">This award celebrates outstanding sportsmanship and continues gracious professionalism in the heat of competition, both on and off the playing field</col> + </row> + <row> + <col name="AwardName">Delphi-'driving Tomorrow's Techology'</col> + <col name="Description">Celebrates an elegant and advantageous machine featue. Reconizes any aspect of engeering elegance including , but not limited to: design,wiring methods, material seection, programming techniques, and unique machine attributes. The criteria for this award are based on the teams ability to concisely verbally describe , as well as demonstrate, this chosen machine feature</col> + </row> + <row> + <col name="AwardName">Engeering Inspiration</col> + <col name="Description">Award celebrates a team's outstanding success in advancing respect and appreciation for engeering and engineers, both within their school, as well as their community . Criteria include: the extent and effectiveness of the team's efforts to recruit students to engineering , the extent and effectiveof the team's community outreach efforts, and the measurable success of those efforts. this is the second highest team award FIRST bestows</col> + </row> + <row> + <col name="AwardName">Autodesk Visualization Award</col> + <col name="Description">Reconizes student animation that 'clearly and creatively' shows the spirt of FIRST Robotics Competition.Autodesk will award excellence in content,creativity,and mastery af multimedia</col> + </row> + <row> + <col name="AwardName">Daimler Chrysler-Team Spirit</col> + <col name="Description">This award celebrates extraordinary enthusiasm and spirit through an exceptional partnership and teamwork.</col> + </row> + </rows> + </table> + </db> +</module> Property changes on: tags/openfirst.awards-2.0a1/awards/openfirst.info.xml ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/xml Name: svn:eol-style + LF Property changes on: tags/openfirst.modules-2.0a1/awards ___________________________________________________________________ Name: of:module + openfirst.awards Added: tags/openfirst.modules-2.0a1/awards/NOTES =================================================================== --- tags/openfirst.modules-2.0a1/awards/NOTES (rev 0) +++ tags/openfirst.modules-2.0a1/awards/NOTES 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,11 @@ +openFIRST.awards + +--- + +** December 25, 2003 Release ** + +David Di Biase - Module approved. + +Tim Ginn - Module approved. + +Greg Inozemtsev - Module approved. Property changes on: tags/openfirst.modules-2.0a1/awards/NOTES ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/plain Name: svn:eol-style + native Property changes on: tags/openfirst.modules-2.0a1/awards/admin ___________________________________________________________________ Name: of:module + openfirst.awards Added: tags/openfirst.modules-2.0a1/awards/admin/index.php =================================================================== --- tags/openfirst.modules-2.0a1/awards/admin/index.php (rev 0) +++ tags/openfirst.modules-2.0a1/awards/admin/index.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,312 @@ +<?php +/* + * openFIRST.awards - admin/index.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: David Di Biase <dav...@ea...> + * + * 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 + * + */ + include_once("../../includes/globals.php"); + include_once($Header); + + // Check if user is an admin then allow processes + if(isset($user->user)){ + + if($user->membertype=="administrator"){ + // 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>"); + die(include_once($footer)); + } + $DisplayForm = true; + $CreateNew = true; + if (array_key_exists('AwardID', $_POST)) { + $CreateNew = false; + $DisplayForm = false; + } + if (array_key_exists('create', $_POST)) { + $CreateNew = true; + $DisplayForm = false; + } + if (array_key_exists('modify', $_POST)) { + $CreateNew = false; + $DisplayForm = false; + } + + $firstaward = false; + if (isset($_POST['firstaward'])) $firstaward = $_POST['firstaward'] == '1' ? true : false; + $firstawardname = ''; + if (isset($_POST['firstawardname'])) $firstawardname = $_POST['firstawardname']; + $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) { + $sql = 'SELECT * FROM '.$ogDB->quoteTable('firstawards'). + ' WHERE '.$ogDB->quoteField('AwardName').'='.$ogDB->quoteData($firstawardname). + ' LIMIT 0,1'; + $faq = $ogDB->query($sql); + $fa = $ogDB->fetchObject($faq); + $award = $fa->AwardName; + $description = $fa->Description; + } + $sql = 'INSERT INTO '. + $ogDB->quoteTable('awards').' SET '. + $ogDB->quoteFDPairs(array('AwardName' => $award, + 'FIRSTAward' => $firstaward, + 'Event' => $event, + 'Date' => $date, + 'Image' => $type, + 'Description' => $description, + 'Recipient' => $recipient + )); + $ogDB->query($sql) or die(trigger_error('an openFIRST DB error')); + + echo("<p>Congratulations on your new award. Award submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } else { + echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } + die(include_once($Footer)); + } + + // If the user has submitted modifications to an award, then make them. + + 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()); + + echo("<p>Award modifications submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } else { + echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); + } + die(include_once($footer)); + } + + + // If the user has elected to modify an award, fill the form with those details. + if(!$CreateNew) { + $sql = 'SELECT * FROM '.$ogDB->quoteTable('awards'). + ' WHERE '.$ogDB->quoteField('ID').'='.$ogDB->quoteData('AwardID'); + $award = $ogDB->fetchObject($ogDB->query($sql)); + $award->template = false; + + } else { + $award = (object)''; + $award->template = true; + $award->AwardName = 'Autodesk Visualization Award'; + $award->Description = ''; + $award->Event = ''; + $award->Date = date('Y-n-j'); + $award->Recipient = 'Team Award'; + $award->Image = 'gold'; + $award->FIRSTAward = '1'; + } +?> + +<h1>Manage Award Information</h1> +<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 + <input type='hidden' id='AwardID' name='AwardID' value='$award->ID'>"); + } else { + echo("Add A New Award"); + } + ?></th> + </tr> + <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 = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('firstawards').' ORDER BY '.$ogDB->quoteField('AwardName')); + while($fa = $ogDB->fetchObject($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"> + <sub>(Use this syntax: Year-Month-Day)</sub></td> + </tr> + <tr> + <th>Recipient</th> + <td class="left"><input name="recipient" type="text" id="recipient" value="<?php + echo $award->Recipient; + ?>"></td> + </tr> + <tr> + <th>Description<br />(leave blank for FIRST Awards)</th> + <td><textarea name="description" cols="30" rows="5"><?php echo $award->Description; ?></textarea></td> + </tr> + <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> + <td><div align="center"> + <input name="type" type="radio" value="gold" <?php + if (strcasecmp($award->Image, 'gold') == 0) echo 'checked="checked"'; + ?>> + </div></td> + <td><div align="center"> + <input type="radio" name="type" value="silver" <?php + if (strcasecmp($award->Image, 'silver') == 0) echo 'checked="checked"'; + ?>> + </div></td> + <td><div align="center"> + <input type="radio" name="type" value="bronze" <?php + if (strcasecmp($award->Image, 'bronze') == 0) echo 'checked="checked"'; + ?>> + </div></td> + </tr> + </table></td> + </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> +</form> +<table> + <tr> + <th colspan="2">Award Name</th> + <th>Event</th> + <th>Date</th> + <th>Recipient</th> + <th>Option</th> + </tr> +<?php + // Loop through awards ordered by date + $query = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('awards').' ORDER BY '.$ogDB->quoteName('Date')); + while($awards = $ogDB->fetchObject($query)){ +?> + <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> + <td><?php echo $awards->Date; ?></td> + <td><?php echo $awards->Recipient; ?></td> + <td><div align="center">[ <a href='./?DELETE=<?php echo $awards->ID; ?>'>Delete</a> | <a href='./?MODIFY=<?php echo $awards->ID; ?>'>Modify</a> ]</div></td> + </tr> +<?php + } + if($ogDB->numberOfRows($query) == 0){ + echo '<tr><td colspan="6">No awards entered!</td></tr>'; + } +?> +</table> +<br /> +<?php + } else { + echo("<h1>Manage Award Information</h1><p>Only administrators can use this feature</p>"); + } + } else { + showlogin(); + } + include_once($Footer); +?> Property changes on: tags/openfirst.modules-2.0a1/awards/admin/index.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.modules-2.0a1/awards/awards.php =================================================================== --- tags/openfirst.modules-2.0a1/awards/awards.php (rev 0) +++ tags/openfirst.modules-2.0a1/awards/awards.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,39 @@ +<?php +/* + * openFIRST.awards - awards.php + * + * Copyright (C) 2005, + * 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 AwardModule class, a child of the Module class. + +class AwardModule extends Module { + function getSlugURI($slug) { + /* + supported forms: + %Date% (some parsable date) + %Title% (The title exists) + %ID% (just an integer) + */ + } +} + +$awardmod =& new AwardModule(basename(dirname(__FILE__))); +$ogModuleManager->addModuleFromObject($awardmod); +?> Property changes on: tags/openfirst.modules-2.0a1/awards/awards.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.modules-2.0a1/awards/awardsbronze.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.modules-2.0a1/awards/awardsbronze.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.modules-2.0a1/awards/awardsfirst.gif =================================================================== (Binary files differ) Property changes on: tags/openfirst.modules-2.0a1/awards/awardsfirst.gif ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/gif Added: tags/openfirst.modules-2.0a1/awards/awardsgold.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.modules-2.0a1/awards/awardsgold.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.modules-2.0a1/awards/awardssilver.png =================================================================== (Binary files differ) Property changes on: tags/openfirst.modules-2.0a1/awards/awardssilver.png ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + image/png Added: tags/openfirst.modules-2.0a1/awards/index.php =================================================================== --- tags/openfirst.modules-2.0a1/awards/index.php (rev 0) +++ tags/openfirst.modules-2.0a1/awards/index.php 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,103 @@ +<?php +/* + * openFIRST.awards - index.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: David Di Biase <dav...@ea...> + * + * 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 + * + */ + include_once("../includes/globals.php"); + include_once($Header); + + $where = array(); + if (isset($_REQUEST['id'])) { + $where[] = $ogDB->quoteField('ID').'='.$ogDB->quoteData($_REQUEST['id']); + } + if (isset($_REQUEST['name'])) { + $where[] = $ogDB->quoteField('AwardName').'='.$ogDB->quoteData($_REQUEST['name']); + } + if (isset($_REQUEST['event'])) { + $where[] = $ogDB->quoteField('Event').'='.$ogDB->quoteData($_REQUEST['event']); + } + if (isset($_REQUEST['date'])) { + $where[] = $ogDB->quoteField('Date').'='.$ogDB->quoteData($_REQUEST['date']); + } + if (isset($_REQUEST['recipient'])) { + $where[] = $ogDB->quoteField('Recipient').'='.$ogDB->quoteData($_REQUEST['recipient']); + } + if (isset($_REQUEST['image'])) { + $where[] = $ogDB->quoteField('Image').'='.$ogDB->quoteData($_REQUEST['image']); + } + if (isset($_REQUEST['first'])) { + $firstarg = trim($_REQUEST['first']); + if (strcasecmp($firstarg, 'yes') == 0 || strcasecmp($firstarg, 'y') == 0 || strcasecmp($firstarg, 1) == 0 || strcasecmp($firstarg, 'true' ) == 0) $first = true; + if (strcasecmp($firstarg, 'no' ) == 0 || strcasecmp($firstarg, 'n') == 0 || strcasecmp($firstarg, 0) == 0 || strcasecmp($firstarg, 'false') == 0) $first = false; + $where[] = $ogDB->quoteField('FIRSTAward').'='.$ogDB->quoteData($first); + } + + + // Query database for award information + $sql = 'SELECT * FROM '.$ogDB->quoteTable('awards'). + ((count($where) > 0) ? ' WHERE '.implode(' OR ', $where) : ''). + ' ORDER BY '.$ogDB->quoteField('Date').' DESC'; + $query = $ogDB->query($sql); + if ($query === false) { + echo $ogDB->errorNumber().': '.$ogDB->errorString().'<br />'; + var_dump($sql); + } + $amount = $ogDB->numberOfRows($query); +?> +<h1>Team Awards</h1> +<p>This team has won <b><?php echo $amount; ?></b> award(s)<?php if (count($where) > 0) echo ' that fit the criteria'; ?>.</p> +<?php + // If more then one award is present then show the values + if($amount > 0) { +?> +<table> + <tr> + <th colspan="2">Award Name</th> + <th>Event</th> + <th>Date</th> + <th>Recipient</th> + </tr> +<?php + // Loop through awards ordered by date + while($awards = $ogDB->fetchObject($query)){ +?> + <tr valign="top"> + <td> + <img src="awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>" /> + <?php if ($awards->FIRSTAward) { ?><img src="awardsfirst.gif" /><?php } ?> + </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> + <td><?php echo $awards->Recipient; ?></td> + </tr> +<?php } ?> +</table> + +<?php + } + $ogDB->freeResult($query); + + include_once($Footer); +?> Property changes on: tags/openfirst.modules-2.0a1/awards/index.php ___________________________________________________________________ Name: of:module + openfirst.awards Name: svn:mime-type + text/x-php Name: svn:eol-style + native Added: tags/openfirst.modules-2.0a1/awards/openfirst.info.xml =================================================================== --- tags/openfirst.modules-2.0a1/awards/openfirst.info.xml (rev 0) +++ tags/openfirst.modules-2.0a1/awards/openfirst.info.xml 2006-06-21 15:38:19 UTC (rev 167) @@ -0,0 +1,173 @@ +<?xml version="1.0"?> +<module xmlns="http://openfirst.org/xml/module/1.0" id="openfirst.awards"> + <!-- Info --> + <!-- This is not used, except as meta data --> + <name>Awards</name> + <version>2.0a1</version> + <author>David Di Biase</author> + <maintainer>Jamie Bliss</maintainer> + + <includes> + <include>$fModPath/awards.php</include> + </includes> + + <!-- Configuration --> + <!-- Either entities or CDATA can be used. Just make sure it's parsed into the literal XHTML. --> + <!-- Note the two ways of including BasePath. --> + <navbar><![CDATA[ + <a href="$ModPath/">View Awards</a> + ]]></navbar> + <adminbar><![CDATA[ + <a href="$ModPath/admin/">Manage Awards</a> + ]]></adminbar> + + <!-- Database setup --> + <db> + <table name="awards"> + <fields> + <!-- Should be self explainatory --> + <field name="ID" null="no" autoincrement="yes"><type length="6" unsigned="yes">int</type></field> + <field name="AwardName"><type>tinytext</type></field> + <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> + <field name="Description"><type>TEXT</type></field> + <field name="FIRSTAward"><type>BOOL</type></field> + </fields> + <keys> + <key type="PRIMARY"> + <col>ID</col> + </key> + </keys> + </table> + <!-- Need to change this to an ID-based system. --> + <table name="firstawards"> + <fields><!--The longest is currently 42 chars--> + <field name="fa_id" null="no" autoincrement="yes"><type>int</type></field> + <field name="AwardName" null="no"><type>tinytext</type></field> + <field name="Description"><type>text</type></field> + </fields> + <keys> + <key type="primary"> + <col>fa_id</col> + </key> + </keys> + <rows> + <row> + <col name="AwardName">Chairman's Award</col> + <col name="Description">The FIRST Robotics Competition is about much more than the mechanics of building a robot or winning a competitive event. It is about the impact FIRST has on those who participate in the program and the impact of FIRST on the community at large. The FIRST mission is to change the way America's young people regard science and technology and to inspire an appreciation for the real-life rewards and career opportunities in these fields.</col> + </row> + <row> + <col name="AwardName">Regional Finalists</col> + <col name="Description">This award celebrates the team or alliance that makes it to the final match of the competition.</col> + </row> + <row> + <col name="AwardName">Leadership in Control</col> + <col name="Description">This award celebrates an innovative control system or application of control components to provide unique machine functions.</col> + </row> + <row> + <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> + </row> + <row> + <col name="AwardName">Rookie All-Star</col> + <col name="Description">This award celebrates the rookie team exemplifying a young but strong partnership effort, as well as implementing the mission of FIRST to inspire students to learn more about science and technology.</col> + </row> + <row> + <col name="AwardName">Website Award</col> + <col name="Description">This award recognizes excellence in student-designed, build, and managed FIRST team websites.</col> + </row> + <row> + <col name="AwardName">Xerox - Creativity</col> + <col name="Description">The award celebrates creative design, use of a component, or a creative or unique strategy of play.</col> + </row> + <row> + <col name="AwardName">The Allaire Medal - Leadership Exemplified</col> + <col name="Description">The Allaire Medal recognizes leadership exemplified, and is awarded to an individual student on the winning Chairman's Award team. Named in honor of Paul A. Allaire, a long-serving FIRST Chairman of the Board, the Allaire Medal is given to the student who has demonstrated outstanding leadership on his/her FIRST team, within his/her school and community, and whose personal character best embodies the spirit of FIRST.</col> + </row> + <row> + <col name="AwardName">Woodie Flowers Awards</col> + <col name="Description">The Woodie Flwers Award celebrates effective communication in the art and science of engineering and design. Dr. William Murphy and Small Parts, Inc. began this prestigious award in 1996. For the 2004 season, this award is being enhanced to honor more exemplary communicators in the FIRST community. Following Dr. Murphy's lead, FIRST Whishes to bring more attention to these FIRST heroes.</col> + </row> + <row> + <col name="AwardName">The Autodesk Inventor ® Award</col> + <col name="Description">Presented by Autodesk, Inc., this award recognizes the team that best understands, communicates, and documents the distinct phases of the design process from concept to completion.</col> + </row> + <row> + <col name="AwardName">The Autodesk Visualization Award</col> + <col name="Description">Presented by Autodesk, Inc. this award recognizes excellence in student animation that clearly and creatively ill... [truncated message content] |