[Openfirst-cvscommit] awards index.php,1.14,1.15
Brought to you by:
xtimg
From: Tim G. <xt...@us...> - 2004-04-12 21:02:14
|
Update of /cvsroot/openfirst/awards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15754 Modified Files: index.php Log Message: Categorise awards into FIRST awards and non-FIRST awards, add functionality of selecting from FIRST awards and filling in descriptions automatically (largely thanks to the efforts of Steve Herold) Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.php 14 Feb 2004 14:40:20 -0000 1.14 --- index.php 12 Apr 2004 20:48:19 -0000 1.15 *************** *** 26,34 **** // Query database for award information ! $query = ofirst_dbquery("SELECT * FROM ofirst_awards ORDER BY Date DESC"); $amount = ofirst_dbnum_rows($query); ?> <h1>Team Awards</h1> ! <p>This team has won <strong><?php echo $amount; ?></strong> award(s).</p> <?php // If more then one award is present then show the values --- 26,69 ---- // Query database for award information ! $query = ofirst_dbquery("SELECT * FROM ofirst_awards WHERE FIRSTAward='1' ORDER BY Date DESC"); $amount = ofirst_dbnum_rows($query); ?> <h1>Team Awards</h1> ! <p>This team has won <strong><?php echo $amount; ?></strong> <a href='http://www.usfirst.org/'>FIRST</a> award(s).</p> ! <?php ! // If more then one award is present then show the values ! if($amount > 0) { ! ?> ! <table> ! <tr> ! <th> </th> ! <th>Award Name</th> ! <th>Event</th> ! <th>Date</th> ! <th>Recipient</th> ! </tr> ! <?php ! // Loop through awards ordered by date ! while($awards = ofirst_dbfetch_object($query)){ ! ?> ! <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> ! <td><?php echo $awards->Recipient; ?></td> ! </tr> ! <?php } ?> ! </table> ! ! <?php ! } ! // Query database for award information ! $query = ofirst_dbquery("SELECT * FROM ofirst_awards WHERE FIRSTAward='0' ORDER BY Date DESC"); ! $amount = ofirst_dbnum_rows($query); ! ?> ! <h1>Team Awards</h1> ! <p>This team has won <strong><?php echo $amount; ?></strong> award(s) from sources other than FIRST.</p> <?php // If more then one award is present then show the values |