[Openfirst-cvscommit] awards/admin index.php,1.24,1.25
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-06-30 03:28:39
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9748/awards/admin Modified Files: index.php Log Message: damn! was using $ofDB! Changed all instances of $ofDB to $ogDB Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** index.php 30 Jun 2005 01:58:52 -0000 1.24 --- index.php 30 Jun 2005 03:28:30 -0000 1.25 *************** *** 79,93 **** if ($award != '' || $firstaward){ if($firstaward) { ! $sql = 'SELECT * FROM '.$ofDB->quoteTable('firstawards'). ! ' WHERE '.$ofDB->quoteField('AwardName').'='.$ofDB->quoteData($firstawardname). ' LIMIT 0,1'; ! $faq = $ofDB->query($sql); ! $fa = $ofDB->fetchObject($faq); $award = $fa->AwardName; $description = $fa->Description; } $sql = 'INSERT INTO '. ! $ofDB->quoteTable('awards').' SET '. ! $ofDB->quoteFDPairs(array('AwardName' => $award, 'FIRSTAward' => $firstaward, 'Event' => $event, --- 79,93 ---- 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, *************** *** 97,101 **** 'Recipient' => $recipient )); ! $ofDB->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>"); --- 97,101 ---- '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>"); *************** *** 141,147 **** // If the user has elected to modify an award, fill the form with those details. if(!$CreateNew) { ! $sql = 'SELECT * FROM '.$ofDB->quoteTable('awards'). ! ' WHERE '.$ofDB->quoteField('ID').'='.$ofDB->quoteData('AwardID'); ! $award = $ofDB->fetchObject($ofDB->query($sql)); $award->template = false; --- 141,147 ---- // 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; *************** *** 191,196 **** <select name='firstawardname'> <?php ! $faq = $ofDB->query('SELECT * FROM '.$ofDB->quoteTable('firstawards').' ORDER BY '.$ofDB->quoteField('AwardName')); ! while($fa = $ofDB->fetchObject($faq)) { echo "<option value='$fa->AwardName'"; if ($award->AwardName == $fa->AwardName) echo 'selected'; --- 191,196 ---- <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'; *************** *** 283,288 **** <?php // Loop through awards ordered by date ! $query = $ofDB->query('SELECT * FROM '.$ofDB->quoteTable('awards').' ORDER BY '.$ofDB->quoteName('Date')); ! while($awards = $ofDB->fetchObject($query)){ ?> <tr> --- 283,288 ---- <?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> *************** *** 296,300 **** <?php } ! if($ofDB->numberOfRows($query) == 0){ echo '<tr><td colspan="6">No awards entered!</td></tr>'; } --- 296,300 ---- <?php } ! if($ogDB->numberOfRows($query) == 0){ echo '<tr><td colspan="6">No awards entered!</td></tr>'; } |