inactive_control_row($th);
end_table(1);
//-----------------------------------------------------------------------------------
start_table(TABLESTYLE2);
if ($selected_id != "") {
    if ($Mode == 'Edit') {
        //editing an existing status code
        $myrow = get_account_type($selected_id);
        $_POST['id'] = $myrow["id"];
        $_POST['name'] = $myrow["name"];
        $_POST['parent'] = $myrow["parent"];
        if ($_POST['parent'] == '-1') {
            $_POST['parent'] == "";
        }
        $_POST['class_id'] = $myrow["class_id"];
        hidden('selected_id', $myrow['id']);
        hidden('old_id', $myrow["id"]);
    } else {
        hidden('selected_id', $selected_id);
        hidden('old_id', $_POST["old_id"]);
    }
}
text_row_ex(_("ID:"), 'id', 10);
text_row_ex(_("Name:"), 'name', 50);
gl_account_types_list_row(_("Subgroup Of:"), 'parent', null, _("None"), true);
class_list_row(_("Class:"), 'class_id', null);
end_table(1);
submit_add_or_update_center($selected_id == "", '', 'both');
end_form();
//------------------------------------------------------------------------------------
end_page();
示例#2
0
    } else {
        $parent_text = get_account_type_name($myrow["parent"]);
    }
    label_cell($myrow["name"]);
    label_cell($parent_text);
    label_cell($bs_text);
    edit_link_cell("selected_id=" . $myrow["id"]);
    delete_link_cell("selected_id=" . $myrow["id"] . "&delete=1");
    end_row();
}
end_table();
//-----------------------------------------------------------------------------------
hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Account Group"));
start_form();
start_table($table_style2);
if ($selected_id != "") {
    //editing an existing status code
    $myrow = get_account_type($selected_id);
    $_POST['name'] = $myrow["name"];
    $_POST['parent'] = $myrow["parent"];
    $_POST['class_id'] = $myrow["class_id"];
    hidden('selected_id', $selected_id);
}
text_row_ex(tr("Name:"), 'name', 50);
gl_account_types_list_row(tr("Subgroup Of:"), 'parent', null, true, tr("None"), true);
class_list_row(tr("Class Type:"), 'class_id', null);
end_table(1);
submit_add_or_update_center($selected_id == "");
end_form();
//------------------------------------------------------------------------------------
end_page();