# SUBMIT BUTTON
print "<tr>" . NEWLINE;
print "<td colspan='2' class='form-data-c'><input type='submit' value='" . lang_get('add') . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "<br><br>" . NEWLINE;
$screen_details = test_get_screens($project_id, $order_by, $order_dir);
print "<form method=post action='{$page}?order_by={$order_by}&amp;order_dir={$order_dir}'>" . NEWLINE;
print "<table class=hide100>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
$screen_details = test_get_screens($project_id, $order_by, $order_dir, $page_number);
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
if (!empty($screen_details)) {
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    html_tbl_print_header(lang_get('screen_name'), SCREEN_NAME, $order_by, $order_dir, "{$page}?page_number={$page_number}");
    html_tbl_print_header(lang_get('order'), SCREEN_ORDER, $order_by, $order_dir, "{$page}?page_number={$page_number}");
    html_tbl_print_header(lang_get('description'));
    html_tbl_print_header(lang_get('edit'));
    html_tbl_print_header(lang_get('delete'));
    print "</tr>" . NEWLINE;
    foreach ($screen_details as $screen_detail) {
        $screen_id = $screen_detail[SCREEN_ID];
function html_print_field_filter($filter_screen, $filter_search)
{
    $s_project_properties = session_get_project_properties();
    $project_id = $s_project_properties['project_id'];
    print "<table class=width60>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td>" . NEWLINE;
    print "<table class=inner rules=none border=0>" . NEWLINE;
    # TITLES FOR HEADER DIALOG
    print "<tr class=left>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('screen_name') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('search') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "<tr>" . NEWLINE;
    # SCREEN_NAMES
    $screens = test_get_screens($project_id, SCREEN_NAME, "ASC");
    $screen_array = array();
    foreach ($screens as $screen) {
        $screen_array[$screen[SCREEN_ID]] = $screen[SCREEN_NAME];
    }
    print "<td align=center>" . NEWLINE;
    print "<select name='filter_screen'>" . NEWLINE;
    print "<option value=''></option>" . NEWLINE;
    html_print_list_box_from_key_array($screen_array, $filter_screen);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # SEARCH
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='15' maxlength='25' name='filter_search' value='" . $filter_search . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    # FILTER BUTTON
    print "<td align='center' rowspan=4 valign=center><input type='submit' value='Filter'></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>";
    print "<input type=hidden name=field_form_filter_value value=true>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
}
print "<table class=width60>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<form method=post name='add_field' action='field_add_action.php'>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
# FORM TITLE
print "<tr>" . NEWLINE;
print "<td colspan='2'><h4>" . lang_get('add_field') . "</h4></td>" . NEWLINE;
print "</tr>" . NEWLINE;
# FIELD NAME
print "<tr>" . NEWLINE;
print "<td class='form-lbl-r'>" . lang_get('field_name') . " <span class='required'>*</span></td>" . NEWLINE;
print "<td class='form-data-l'><input type='text' size='50' maxlength='50' name='field_name_required' value='" . session_validate_form_get_field("field_name_required") . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
# SCREEN
$screens = test_get_screens($project_id, SCREEN_NAME, "ASC");
$screen_array = array();
foreach ($screens as $screen) {
    $screen_array[$screen[SCREEN_ID]] = $screen[SCREEN_NAME];
}
print "<tr>" . NEWLINE;
print "<td class='form-lbl-r'>" . lang_get('screen_name') . "</td>" . NEWLINE;
print "<td align=left>" . NEWLINE;
print "<select name='screen_id'>";
html_print_list_box_from_key_array($screen_array, session_validate_form_get_field("screen_id"));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>";
# DESCRIPTION
print "<tr>" . NEWLINE;
print "<td class='form-lbl-r'>" . lang_get('description') . "</td>" . NEWLINE;