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;
        }
    }
}
 /**
  * Returns the InternalAward object of the related award
  * @return InternalAward
  */
 public function getAward()
 {
     return InternalAward::get($this->award_id);
 }
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed("awards", "update", false)) {
    add_error("Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.");
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    if (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], array("trim", "int")))) {
        $award_id = $tmp_input;
    } else {
        $award_id = 0;
    }
    if ($award_id) {
        require_once "Models/awards/InternalAwards.class.php";
        process_manage_award_details();
        $award = InternalAward::get($award_id);
        echo "<div id=\"award_messages\">";
        display_status_messages();
        echo "</div>";
        $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/awards?section=award_details&id=" . $award_id, "title" => "Award: " . $award->getTitle());
        $PAGE_META["title"] = "Award Details: " . $award->getTitle();
        $PAGE_META["description"] = "";
        $PAGE_META["keywords"] = "";
        ?>
<script type="text/javascript">
	jQuery(document).ready(function($) {
		if (location.hash !== '') $('a[href="' + location.hash + '"]').tab('show');

		return $('a[data-toggle="tab"]').on('shown', function(e) {
			return location.hash = $(e.target).attr('href').substr(1);
		});