this is what I came up with.
what ya think?
the looks can be changed as much as one pleases but this is the generic base...
Code:
$header=@wksta,"",""
$HD="1","Model=IBM-DJSA-210","Interface=IDE","Size=10GB"
$HD2="2","Model=COM-CO10-JA0","Interface=SCSI","Size=9GB"
$OS="Operating System","Name=Windows 2000","Service Pack=4","Role=workstation","language=finnish"
$Antivir="Antivirus","Name=Fsecure AV","version=5.52","defTimeStamp=23.10.2004_03"
$Hardware="Hardware",""
$Harddrives="Harddrives","",""
$Harddrives[1]=$hd
$Harddrives[2]=$hd2
$Hardware[1]=$harddrives
$software="Software","",""
$software[1]=$os
$software[2]=$antivir
$header[1]=$hardware
$header[2]=$software
buildHTMLtree($header)
run 'explorer "'+@scriptdir+'\testoutput.htm"'
function buildHTMLtree($data)
if 8<>vartype($data[0]) exit 1 endif
$=redirectoutput(@scriptdir+"\testoutput.htm")
'<span style="cursor:pointer;" onclick="var sauna = document.getElementById(' + "'" + $data[0] + "'"
+ "); if (sauna.style.display == 'none') { sauna.style.display = 'block'; } else { sauna.style.display = 'none'; }"
+ '"><b>' + $data[0] + '</b></span><table id="' + $data[0] + '" style="display:none;"><tr><td width="20"> </td><td>'
$=redirectoutput("")
for $section=1 to ubound($data)
if 0<ubound($data[$section])
if 8<>vartype($data[$section][1])
BuildHTMLtree($data[$section])
else
$=redirectoutput(@scriptdir+"\testoutput.htm")
"<b>" $data[$section][0] "</b>"
'<table><tr><td width="20"></td><td><table>'
for $value=1 to ubound($data[$section])
$=split($data[$section][$value],"=")
"<tr><td></td><td>" $[0] "</td><td>" $[1] "</td></tr>"
next
'</table></td></tr></table>'
$=redirectoutput("")
endif
endif
next
$=redirectoutput(@scriptdir+"\testoutput.htm")
'</td></tr></table><br>'
$=redirectoutput("")
endfunction