コード例 #1
0
function CreateAbsenceTypeSelect()
{
    $absenceTypes = RetrieveAbsenceTypes();
    if ($absenceTypes != NULL) {
        echo '<select class="form-control" name="absenceType">';
        foreach ($absenceTypes as $absenceType) {
            echo '<option value="' . $absenceType[ABS_TYPE_ID] . '">' . $absenceType[ABS_TYPE_NAME] . '</option>';
        }
    }
    echo '</select>';
}
コード例 #2
0
function DisplayAbsenceTypeBody()
{
    $absenceTypes = RetrieveAbsenceTypes();
    if ($absenceTypes != NULL) {
        foreach ($absenceTypes as $absenceType) {
            echo "<tr>";
            echo "<td>" . $absenceType[ABS_TYPE_NAME] . "</td>";
            echo "<td>" . $absenceType[ABS_TYPE_USES_LEAVE] . "</td>";
            echo "<td>" . $absenceType[ABS_TYPE_CAN_BE_DENIED] . "</td>";
            echo '<td> <button class="btn btn-success" type="submit" ' . 'name="amend"  value="' . $absenceType[ABS_TYPE_ID] . '">Amend</button></td>';
            echo '<td> <button class="btn btn-danger" type="submit" ' . 'name="delete"  value="' . $absenceType[ABS_TYPE_ID] . '">Delete</button></td>';
            echo '</tr>';
        }
    }
}
コード例 #3
0
function GenerateAbsenceTypeSelect()
{
    $absenceTypes = RetrieveAbsenceTypes();
    if ($absenceTypes != NULL) {
        echo '<select class="form-control" name="absenceType">';
        foreach ($absenceTypes as $absenceType) {
            if ($absenceType[ABS_TYPE_ID] == $request[APPR_ABS_ABS_TYPE_ID]) {
                echo '<option selected="selected" value="' . $absenceType[ABS_TYPE_ID] . '">' . $absenceType[ABS_TYPE_NAME] . '</option>';
            } else {
                echo '<option value="' . $absenceType[ABS_TYPE_ID] . '">' . $absenceType[ABS_TYPE_NAME] . '</option>';
            }
        }
    }
    echo '</select>';
}
コード例 #4
0
function GetAnnualLeaveAbsenceTypeID()
{
    $filter[ABS_TYPE_NAME] = ANNUAL_LEAVE;
    $absenceTypes = RetrieveAbsenceTypes($filter);
    $absenceTypeID = NULL;
    if (count($absenceTypes) == 1) {
        $absenceTypeID = $absenceTypes[0][ABS_TYPE_ID];
    }
    return $absenceTypeID;
}