# %W% %G% firstbase.com
#
#
# Serve_modify.m - Copyright by FirstBase Software
#
# This code works with dbmacro, a part of the FirstBase database package.
# For more information, see http://www.firstbase.com
#
# serve a modify_comp form ---
# this form calls modify_comp.m to actually modify the record
#
function serve_modify_comp()
{
comments()
print(html_open("FirstBase Software: Modify Computer Record"))
wheader("Modify Computer Record")
print(html_form_open(dbmacro + apphome + "/m_comp/modify_comp.m?V=" +
random_string))
print(html_center_open())
print(html_table_open())
rec = recno(cb) + ""
print(html_input("HIDDEN", "RECNO", 1, 1, rec))
print(html_input("HIDDEN", "LOCKSTAMP", 1, 1, lockstamp))
print(html_row("Inventory Number:", html_bold(cbase[Inventory])))
print(html_row("Entry Date:",
html_input("TEXT", "enterdate", 10, 10,
formfield(cbase[EnterDate],"d",8))))
print(html_row("Brand Name:",
html_input("TEXT", "brandname", 20, 20, cbase[BrandName])))
print(html_row("Model Name or Number:",
html_input("TEXT", "modelname", 10, 10, cbase[ModelName])))
print(html_row("Serial Number:",
html_input("TEXT", "cpuserno", 25, 25, cbase[CPUSerNo])))
print(html_row("Options:",
html_input("TEXT", "options", 50, 50,
substr(cbase[Options], 1, 50))))
# needs to be burst apart
print(html_row_open())
print(html_cell_open())
print("Machine Type:")
print(html_cell_close())
print(html_cell_open())
print(html_select_open("machtype", 1))
found = 0
for (i = 1; i <= max_value_machtype; i++){
if (value_machtype[i] == cbase[MachType]){
print(html_select_option("SELECTED", value_machtype[i]))
found = 1
}
else if (value_machtype[i] == "OTHER" && found == 0)
print(html_select_option("SELECTED", value_machtype[i]))
else
print(html_select_option(value_machtype[i]))
}
print(html_select_close())
if (found)
OTHER = ""
else
OTHER = cbase[MachType]
print(html_input("TEXT", "other", 26, 26, OTHER))
print(html_row("Machine Name:",
html_input("TEXT", "machname", 20, 20, cbase[MachName])))
print(html_row("Project:",
html_input("TEXT", "project", 50, 50, cbase[Project])))
IP = getenv("REMOTE_ADDR")
IP_TIME = date(now())
print(html_row(html_italics("Additional Saved Information")))
print(html_row("Created by IP Address:", cbase[CreateIP] + " " +
cbase[CreateTime]))
print(html_row("Modified by IP Address:", cbase[ModIP] + " " +
cbase[ModTime]))
print(html_row("Current IP Address:", IP + " " + IP_TIME))
print(html_table_close())
print(html_input("SUBMIT", "Submit", 10, 10,
"Save Changes to Record"))
print(html_input("SUBMIT", "Submit", 10, 10, "Exit"))
print(html_center_close())
print(html_input("HIDDEN", "IP", 1, 1, IP))
print(html_input("HIDDEN", "IP_TIME", 1, 1, IP_TIME))
print(html_form_close())
wfooter("/admin/a_computer.html")
print(html_close())
}
function user_history()
{
for (i = 1; subline(line, cbase[User], i) == AOK; i++){
print(line)
if (i == 1 && ston(line) <= 0)
print(html_br())
if (i >= 10)
break
}
}
function primaryuser_select()
{
init_user()
print(html_select_open("primaryusr", 1))
for (st = firstxrec(ub); st == AOK; st = nextxrec(ub)){
if (current_user == ubase[UsrName])
print(html_select_option("SELECTED", ubase[UsrName]))
else
print(html_select_option(ubase[UsrName]))
}
if (current_user == "[NONE]")
print(html_select_option("SELECTED", "[NONE]"))
else
print(html_select_option("[NONE]"))
print(html_select_close())
end_user()
}
© Copyright 1996-2000 FirstBase Software, Inc. |