[Openfirst-cvscommit] awards/admin index.php,1.18,1.19
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-03-14 02:37:02
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16374/awards/admin Modified Files: index.php Log Message: Fixed some access errors Should modify correctly, too Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** index.php 13 Mar 2005 02:09:00 -0000 1.18 --- index.php 14 Mar 2005 02:36:52 -0000 1.19 *************** *** 95,101 **** if(isset($_GET["MODIFY"])) { $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); } else { ! $award = ''; ! } ?> --- 95,110 ---- if(isset($_GET["MODIFY"])) { $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); + $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'; ! } ?> *************** *** 106,130 **** <th> </th> <th><?php ! if ($award == "") { ! echo("Add A New Award"); ! } else { echo("Modify an Existing Award <input type='hidden' id='AwardID' name='AwardID' value='$award->ID'>"); ! } ?></th> </tr> <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> --- 115,142 ---- <th> </th> <th><?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> ! <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_firstawards ORDER BY 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> *************** *** 136,144 **** <th>Date</th> <td><input name="date" type="text" id="date" value="<?php ! if($award == "") { ! echo date("Y-n-j"); ! } else { ! echo $award->Date; ! } ?>" size="10"> <sub>(Use this syntax: Year-Month-Day)</sub></td> </tr> --- 148,153 ---- <th>Date</th> <td><input name="date" type="text" id="date" value="<?php ! echo $award->Date; ! ?>" size="10"> <sub>(Use this syntax: Year-Month-Day)</sub></td> </tr> *************** *** 146,154 **** <th>Recipient</th> <td><input name="recipient" type="text" id="recipient" value="<?php ! if($award == "") { ! echo ("Team Award"); ! } else { ! echo $award->Recipient; ! } ?>"></td> </tr> <tr> --- 155,160 ---- <th>Recipient</th> <td><input name="recipient" type="text" id="recipient" value="<?php ! echo $award->Recipient; ! ?>"></td> </tr> <tr> *************** *** 166,176 **** <tr> <td><div align="center"> ! <input name="type" type="radio" value="gold" checked> </div></td> <td><div align="center"> ! <input type="radio" name="type" value="silver"> </div></td> <td><div align="center"> ! <input type="radio" name="type" value="bronze"> </div></td> </tr> --- 172,188 ---- <tr> <td><div align="center"> ! <input name="type" type="radio" value="gold" <?php ! if (strcasecmp($award->Image, 'gold') == 0) echo 'selected'; ! ?>> </div></td> <td><div align="center"> ! <input type="radio" name="type" value="silver" <?php ! if (strcasecmp($award->Image, 'silver') == 0) echo 'selected'; ! ?>> </div></td> <td><div align="center"> ! <input type="radio" name="type" value="bronze" <?php ! if (strcasecmp($award->Image, 'bronze') == 0) echo 'selected'; ! ?>> </div></td> </tr> *************** *** 179,183 **** <tr> <th> </th> ! <?php if($award == "") { ?> <td><input name="create" type="submit" id="create" value="Create Award"></td> <?php } else { ?> --- 191,195 ---- <tr> <th> </th> ! <?php if(!is_object($award)) { ?> <td><input name="create" type="submit" id="create" value="Create Award"></td> <?php } else { ?> |