?> > <input type="hidden" name="action" value="new_award" /> <div class="control-group"> <label for="award_title" class="control-label form-required">Title:</label> <div class="controls"> <input id="award_title" name="award_title" class="award_text_input" type="text" maxlength="4096"></input> </div> </div> <div class="control-group"> <label for="award_title" class="control-label form-required">Terms of Award:</label> <div class="controls"> <textarea id="award_terms" name="award_terms" class="award_text_area" rows="5"></textarea> </div> </div> <div class="form-actions pull-right"> <input type="submit" class="btn btn-primary" value="Add Award" /> </div> </form> <div class="clear"></div> <div class="clear"></div> <div id="awards_listing"> <?php echo awards_list($awards); ?> </div> <?php }
function process_awards_admin() { if (isset($_POST['action'])) { $action = $_POST['action']; switch ($action) { case "add_award_recipient": case "remove_award_recipient": case "edit_award_details": $award_id = isset($_POST['award_id']) ? $_POST['award_id'] : 0; if ($award_id) { $award = InternalAward::get($award_id); process_manage_award_details(); display_status_messages(); echo award_recipients_list($award); } break; case "remove_award": $award_id = isset($_POST['award_id']) ? $_POST['award_id'] : 0; if (!$award_id) { break; } case "new_award": process_manage_award_details(); display_status_messages(); $awards = InternalAwards::get(true); if ($awards) { echo awards_list($awards); } break; } } }