Hey Doc... been screwing around with the html code...

Code:

$HTMLLog = @scriptdir + '\test.htm'
$ImageLocation = ''


$WL = '<html>'+@CRLF
+'<head>'+@CRLF
+'<meta http-equiv="Content-Language" content="en-us">'+@CRLF
+'<meta name="GENERATOR" content=KiXtart '+@KIX+'>'+@CRLF
+'<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">'+@CRLF
+'<title>'+ 'Details on ' + @WKSTA +'</title>'+@CRLF
+'</head>'+@CRLF
+'<body bgproperties="fixed" background="'+$ImageLocation+'">'+@CRLF
+'<p>'+@CRLF
+'<table border="0" width="25%" id="table1">'+@CRLF
+'<tr>'+@CRLF
+'<td><font color="#669999" size="4">Details generated by KiXtart ' + @KIX + '</font></td>'+@CRLF
+'</tr>'+@CRLF
+'</table>'+@CRLF
+'</p>'+@CRLF

+'<p><b><font size="5" color="#800000">USER / ACCOUNT INFORMATION</font></b></p>'+@CRLF
+'<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">'+@CRLF


$color= '#000000','#000000','#ff0000','#000000','#ff0000'

$line = 'Section Title',' ',' ',' ',' '
$wl = $wl + HTMLRow($line, $color)

$line = ' ','element11','element12','element13','element14'
$wl = $wl + HTMLRow($line, $color)

$line = ' ','element21','element22','element23','element24'
$wl = $wl + HTMLRow($line, $color)

$line = ' ','element31','element32','element33','element34'
$wl = $wl + HTMLRow($line, $color)


$WL = $WL + '</table>'+@CRLF
+ '</body>'+@CRLF
+ '</html>'+@CRLF

del $HTMLLog

$Handle = FreeFileHandle()
$OpenFile = Open($Handle, $HTMLLog,5)
$WL = WriteLine($Handle,$WL + @CRLF)
$CloseFile = Close($Handle)

Function HTMLRow($arrElements, $arrColor)
$cols=Ubound($arrelements)
if not Ubound($arrelements) =Ubound($arrColor)
exit 1
endif
$colWidth = 100/($cols+1)
$HTMLRow = ' <tr>'+@CRLF
for $item = 0 to $cols
$HTMLRow = $HTMLRow +' <td width="'+$colwidth+'%" height="19"><font color="'+$arrColor[$item]+'"><b>'+$arrElements[$item]+'</b></td>'+@CRLF
next
$HTMLRow = $HTMLRow +' </tr>'+@CRLF
Endfunction



Edited by Radimus (2005-10-11 09:59 PM)
_________________________
How to ask questions the smart way <-----------> Before you ask