DNS Entries
if view.filename then io.write(" for "..view.filename) end ?>
Locations
local currentloc = ""
for i,loc in ipairs(view.value) do
if loc.type == '%' then
if currentloc ~= loc[1] then
if currentloc ~= "" then ?>
end ?>
= loc[1] ?>
end
currentloc = loc[1] ?>
= loc[2] ?> if loc[2] == "" then io.write('*') end ?>
if (loc.errtxt) then ?>
= string.gsub(loc.errtxt, "\n", " ") ?>
end ?>
end
end ?>
if currentloc == "" then ?>
No locations defined
else ?>
end ?>
local function doListIndents(next, indent)
local newentry = {}
for mt in string.gmatch(next, "([^.]+)") do
table.insert(newentry, mt)
end
local revnewentry = {}
for j=#newentry,1,-1 do
table.insert(revnewentry, newentry[j])
end
local i=1
while indent[i] and revnewentry[i] == indent[i] do
i=i+1
end
local ending = #indent-(i-1)
local starting = #newentry-(i-1)
for j=1,ending do
io.write("\n")
end
for j=1,starting do
io.write("
")
io.write(table.concat(newentry, ".", #newentry-(i+j-2), #newentry))
io.write("\n")
end
return revnewentry
end
?>
Records
local indent = {}
for j,entry in ipairs(view.value) do
if entry.type ~= '%' then
indent = doListIndents(entry[1], indent) ?>
= entry.label ?>
= entry.configline ?>
for k=2,#entry do
local option = entry[k]
if (option) and option ~= "" then ?>
= view.fieldlabels[entry.type][k] ?>:
= option ?>
end
end ?>
if entry.errtxt then ?>
= string.gsub(entry.errtxt, "\n", " ") ?>
end ?>
end
end
if #indent == 0 then ?>
No records defined
else
doListIndents("", indent)
end ?>