[Openfirst-cvscommit] awards/admin index.php,1.15,1.16
Brought to you by:
xtimg
From: Tim G. <xt...@us...> - 2004-04-12 21:02:15
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15754/admin 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/admin/index.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** index.php 14 Feb 2004 14:40:20 -0000 1.15 --- index.php 12 Apr 2004 20:48:20 -0000 1.16 *************** *** 39,45 **** // If user has posted create then insert new award record if (isset($_POST['create'])){ ! if($_POST['award']!=""){ ! ofirst_dbquery("INSERT INTO ofirst_awards (AwardName,Event,Date,Image,Description,Recipient) values( '".$_POST['award']."', '".$_POST['event']."', '".$_POST['date']."', --- 39,53 ---- // If user has posted create then insert new award record if (isset($_POST['create'])){ ! 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; ! $_POST['description'] = $fa->Description; ! } ! ! ofirst_dbquery("INSERT INTO ofirst_awards (AwardName,FIRSTAward, Event,Date,Image,Description,Recipient) values( '".$_POST['award']."', + '".$_POST['firstaward']."', '".$_POST['event']."', '".$_POST['date']."', *************** *** 59,64 **** if (isset($_POST['modify'])){ ! if($_POST['award']!=""){ ofirst_dbquery("UPDATE ofirst_awards SET AwardName='".$_POST['award']."', Event = '".$_POST['event']."', Date = '".$_POST['date'] . "', --- 67,80 ---- if (isset($_POST['modify'])){ ! 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; ! $_POST['description'] = $fa->Description; ! } ! ofirst_dbquery("UPDATE ofirst_awards SET AwardName='".$_POST['award']."', + FIRSTAward = '".$_POST['firstaward']."', Event = '".$_POST['event']."', Date = '".$_POST['date'] . "', *************** *** 99,103 **** <tr> <th>Award Name</th> ! <td><input name="award" type="text" id="award" value="<?php echo $award->AwardName; ?>"></td> </tr> <tr> --- 115,131 ---- <tr> <th>Award Name</th> ! <td> ! <input type='radio' name='firstaward' value='1' checked='checked'> FIRST Award ! <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'>$fa->AwardName</option>"); ! } ! ?> ! </select> ! <br><input type='radio' name='firstaward' value='0'> Custom Award ! <input name="award" type="text" id="award" value="<?php echo $award->AwardName; ?>"> ! </td> </tr> <tr> *************** *** 125,129 **** </tr> <tr> ! <th>Description</th> <td><textarea name="description" cols="30" rows="5"><?php echo $award->Description; ?></textarea></td> </tr> --- 153,157 ---- </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> |