/** * @param $edit_page */ function print_types($edit_page) { $specmanagement_database_api = new specmanagement_database_api(); $specmanagement_print_api = new specmanagement_print_api(); $types = $specmanagement_database_api->get_full_types(); for ($type_index = 0; $type_index < count($types); $type_index++) { $type = $types[$type_index]; $type_id = $type[0]; $type_string = $type[1]; $type_options_set = $type[2]; $type_options = explode(';', $type_options_set); $option_show_duration = $type_options[0]; $option_show_expenses_overview = $type_options[1]; $option_show_directory = $type_options[2]; $specmanagement_print_api->printRow(); echo '<input type="hidden" name="type_ids[]" value="' . $type_id . '"/>'; print_name($type_string); print_duration($edit_page, $type_index, $option_show_duration); print_expoverview($edit_page, $type_index, $option_show_expenses_overview); print_dictionary($edit_page, $type_index, $option_show_directory); echo '</tr>'; } }
$response['BLOCKED_MSG'] = "Invalid username or password"; } break; case 'status': if ($mac === FALSE) { break; } if ($mac == '02:ba:de:af:fe:01') { unset($response['BLOCKED_MSG']); $response['CODE'] = "ACCEPT"; $response['SECONDS'] = 120; $response['DOWNLOAD'] = 3000; $response['UPLOAD'] = 400; } else { $response['BLOCKED_MSG'] = "Unknown Client"; } break; case 'acct': case 'logout': if ($mac === FALSE) { break; } unset($response['BLOCKED_MSG']); $response['CODE'] = "OK"; break; } } /* calculate new request authenticator based on answer and request -> send it out */ calculate_new_ra($response, $secret); print_dictionary($response);