function makeHtmlmenu()
Local nDruk:=0, nDrukafstand:= 0.5, nDrukstart:= 0, nMeter:=1
Local nFotoH:= 3.5, nFotoB:= 3.5, nFotoBlarge := 2.5
Public cSubgroep:=""
use artikel index artikel shared NEW
use fotodata index fotodata shared NEW
aDbf := {}
AADD(aDbf, { "Titel", "C", 30, 0 })
AADD(aDbf, { "Code", "C", 8, 0 })
DbCreate( "indexhtm.dbf", aDbf)
use indexhtm NEW
select indexhtm
index on indexhtm->titel to indexhtm
use fotoinde index fotoinde shared new
htmlmenu->(dbgotop())
//=========================
cFile = "c:\maveco\website\catalog.htm"
FCatalog := FCREATE(cFile)
FWRITE(FCatalog, MEMOREAD("c:\maveco\html\catbase.htm") + chr(10) )
DO while !htmlmenu->(eof())
If !htmlmenu->selected
htmlmenu->(dbskip())
loop
EndIF
// Catalogus items worden toegevoegd.
FWRITE(FCatalog, '<tr>' + chr(10) )
FWRITE(FCatalog, '<td width="40" height="40"> <div align="center">' + chr(10) )
FWRITE(FCatalog, '<a href="groepen/menu'+lower(alltrim(htmlmenu->code))+'.htm" onClick="window.self.location='+"'groepen/grp"+lower(alltrim(htmlmenu->code))+".htm'"+'" target="Menu Left">' + chr(10) )
FWRITE(FCatalog, '<img src="images/'+lower(alltrim(htmlmenu->foto))+'.jpg" width="40" height="40" border="0"> </a>' + chr(10) )
FWRITE(FCatalog, '</td>' + chr(10) )
FWRITE(FCatalog, '<td width="450" height="32"> <div align="center">' + chr(10) )
FWRITE(FCatalog, '<a href="groepen/menu'+lower(alltrim(htmlmenu->code))+'.htm" onClick="window.self.location='+"'groepen/grp"+lower(alltrim(htmlmenu->code))+".htm'"+'" target="Menu Left">' + chr(10) )
FWRITE(FCatalog, alltrim(htmlmenu->htmltitel) + '</a>' + chr(10) )
FWRITE(FCatalog, '</td>' + chr(10) )
// FWRITE(FCatalog, '<a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left">'+alltrim(htmlmenu->htmltitel)+'</a><br>' + chr(10) )
// FWRITE(FCatalog, '' + chr(10) )
// FWRITE(FCatalog, '<td width="39" height="32"> <div align="center"> <a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left'+alltrim(htmlmenu->htmltitel)+'</a><br></td>' + chr(10) )
FWRITE(FCatalog, '</tr>' + chr(10) )
// FWRITE(FCatalog, '<a href="menu%20bedrijfskleding.htm" onClick="window.self.location='bedrijfskleding.htm'" target="Menu Left"><img src="images/groepen/bedrijfskleding.jpg" width="40" height="40" border="0"></a></div>' + chr(10) )
// FWRITE(FCatalog, '<a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left">'+alltrim(htmlmenu->htmltitel)+'</a><br>' + chr(10) )
//=========================
cFile = "c:\maveco\website\groepen\grp"+alltrim(htmlmenu->code)+".htm"
FGroep := FCREATE(cFile)
FWRITE(FGroep, "<html>" + chr(10) )
FWRITE(FGroep, "<head>" + chr(10) )
FWRITE(FGroep, '<title>'+alltrim(htmlmenu->htmltitel)+'</title>' + chr(10))
FWRITE(FGroep, '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' + chr(10))
FWRITE(FGroep, '</HEAD> ' + chr(10))
FWRITE(FGroep, '<body bgcolor="#FFFFFF" text="#000000" background="../Internet%20Sources/Achtergrond.jpg" leftmargin="30">' + chr(10))
FWRITE(FGroep, '<table width="600" border="1" cellspacing="5" cellpadding="0">' + chr(10))
FWRITE(FGroep, '<tr bgcolor="#00CCFF"><td colspan="4"><div align="center"><font color="#0000FF"><b>' + chr(10))
FWRITE(FGroep, '<font size="5">'+alltrim(htmlmenu->htmltitel)+ chr(10))
FWRITE(FGroep, '</font></b></font></div></td></tr>' + chr(10))
FWRITE(FGroep, '<tr valign="top"><td colspan="4" height="99"><div align="center"></div><div align="left">' + chr(10))
FWRITE(FGroep, '<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Informatie over de groep</font></div></td></tr>' + chr(10))
FWRITE(FGroep, '<tr bgcolor="#72B8B8"><td colspan="4" height="26"><div align="center"><font color="#666666"><b>Klik om deze groep te openen </b> </font> </div> </td> </tr> ' + chr(10))
//=========================
cFile = "c:\maveco\website\groepen\menu"+alltrim(htmlmenu->code)+".htm"
FIndex := FCREATE(cFile)
FWRITE(FIndex, MEMOREAD("c:\maveco\html\menubase.htm") + chr(10) )
FWRITE(Findex, '<img src="../assets/lijn.gif" width="160" height="13"><br>' + chr(10) )
FWRITE(Findex, '<font size="4" color="#999999"><b><font color="#FFFFFF">'+alltrim(htmlmenu->htmltitel)+'</font></b></font>' + chr(10) )
FWRITE(Findex, '<img src="../assets/lijn.gif" width="160" height="13"><br></p></div> ' + chr(10) )
FWRITE(Findex, '<table width="170" border="0" cellspacing="0" cellpadding="0" align="left" height="0">' + chr(10) )
aPages := {}
cMaat = alltrim(htmlmenu->files1)
do while at(",",cMaat) > 0
AADD(aPages,substr(cMaat,1,4))
cMaat = substr(cMaat,at(",",cMaat)+1)
loop
enddo
AADD(aPages,alltrim(cMaat))
aHtmlFoto:={"","","",""} // 4 elementen
aHtmlPage:={"","","",""}
aHtmlTitel:={"","","",""}
nPos = 1
For i = 1 to len(aPages)
if !fotoinde->(dbseek(aPages[i]))
msginfo("Pagina "+aPages[i]+" bestaat niet")
endif
FWRITE(Findex, '<tr><td width="181"><div align="center"><font size="2"><a href="../html/maveco%20folder/pag'+alltrim(fotoinde->code)+'.htm" target="Menu Right">'+alltrim(fotoinde->index)+'</a></font></div></td></tr>' + chr(10) )
CreateOneHtmlPag()
indexhtm->(dbappend())
indexhtm->titel = alltrim(fotoinde->Titel)
indexhtm->Code = alltrim(aPages[i])
aHtmlFoto[nPos] = '"../images/'+lower(alltrim(fotoinde->foto))+'.jpg" '
aHtmlPage[nPos] = aPages[i]
aHtmlTitel[nPos] = alltrim(fotoinde->index)
nPos ++
if nPos = 5 .or. I = len(aPages)
FWRITE(Fgroep, '<tr> ' + chr(10))
for m = 1 to 4
FWRITE(Fgroep, '<td width="160" height="20"> ' + chr(10)) // foto = toch groter
if !empty(aHtmlpage[m])
FWRITE(Fgroep, '<div align="center">' + chr(10))
FWRITE(Fgroep, '<a href="../html/maveco%20folder/pag'+lower(aHtmlpage[m])+'.htm">' + chr(10))
FWRITE(Fgroep, '<img src=' + aHtmlFoto[m] + ' border = "0" vspace="5" hspace="5" align="top"></a></div>' + chr(10))
endif
FWRITE(Fgroep, '</td> ' + chr(10))
next
FWRITE(Fgroep, '</tr> ' + chr(10))
FWRITE(Fgroep, '<tr> ' + chr(10))
for m = 1 to 4
if empty(aHtmlpage[m])
FWRITE(Fgroep, '<td width="160" height="26" > ' + chr(10))
else
FWRITE(Fgroep, '<td width="160" height="26" bgcolor="#72B8B8"> ' + chr(10))
endif
FWRITE(Fgroep, '<div align="center">' + chr(10))
FWRITE(Fgroep, '<a href="../html/maveco%20folder/pag'+lower(aHtmlpage[m])+'.htm">' + chr(10))
FWRITE(Fgroep, '<font size="2">' + chr(10))
FWRITE(Fgroep, aHtmlTitel[m] + chr(10))
FWRITE(Fgroep, '</font></div>' + chr(10))
FWRITE(Fgroep, '</td> ' + chr(10))
next
FWRITE(Fgroep, '</tr> ' + chr(10))
nPos = 1
aHtmlFoto:={"","","",""} // 4 elementen
aHtmlPage:={"","","",""}
aHtmlTitel:={"","","",""}
endif
Next
FWRITE(Fgroep, '</tr>' + chr(10))
FWRITE(Fgroep, '</table>' + chr(10))
cHtmladdto = "c:\maveco\html\info"+lower(alltrim(htmlmenu->code))+".htm"
if file(cHtmladdto)
FWRITE(FGroep, MEMOREAD(cHtmladdto) + chr(10) )
endif
fClose(fgroep)
FWRITE(Findex, '</table>' + chr(10) )
FWRITE(Findex, '</div>' + chr(10) )
FWRITE(Findex, '</body>' + chr(10) )
FWRITE(Findex, '</html>' + chr(10) )
fClose(findex)
htmlmenu->(dbskip())
enddo
FWRITE(FCatalog, '</font></b></p></div></td></tr></table>' + chr(10) )
FWRITE(FCatalog, '<p align="center"><b><font color="#FF0000"><img src="index.jpg" width="96" height="22"><a name="Index"></a></font></b></p>'+ chr(10) )
FWRITE(FCatalog, '<p align="center"><font size="4" color="#FF0000">'+ chr(10) )
FWRITE(FCatalog, '<a href="#A">A </a><a href="#B">B </a><a href="#C">C </a><a href="#D">D </a><a href="#E">E </a><a href="#F">F </a><a href="#G">G </a>' + chr(10) )
FWRITE(FCatalog, '<a href="#H">H </a><a href="#I">I </a><a href="#J">J </a><a href="#K">K </a><a href="#L">L </a><a href="#M">M </a><a href="#N">N </a>'+ chr(10) )
FWRITE(FCatalog, '<a href="#O">O </a><a href="#P">P </a><a href="#Q">Q </a><a href="#R">R </a><a href="#S">S </a><a href="#T">T </a><a href="#U">U </a>'+ chr(10) )
FWRITE(FCatalog, '<a href="#V">V </a><a href="#W">W </a><a href="#Q">X </a><a href="#Y">Y </a><a href="#Z">Z </a></font></p>'+ chr(10) )
FWRITE(FCatalog, '<p align="center"> </p>'+ chr(10) )
aAlfa:={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
indexhtm->(dbgotop())
For I = 1 to 26
cLetter = aAlfa[I]
FWRITE(FCatalog, '<p align="center"><img src="assets/lijn.gif" width="220" height="15"><font size="5" color="#000000" ><b> '+cLetter+' </b></font><img src="assets/lijn.gif" width="220" height="15"><a name="'+cLetter+'"></a></p>'+ chr(10) )
if upper(left(Indexhtm->titel,1)) = cLetter
FWRITE(FCatalog, '<p align="center"><font size="4" color="#FF0000">'+ chr(10) )
do while upper(left(Indexhtm->titel,1)) = cLetter
FWRITE(FCatalog,'<a href="html/maveco%20folder/pag'+lower(alltrim(indexhtm->Code))+'.htm">' + chr(10))
FWRITE(FCatalog, alltrim(indexhtm->titel)+ '<br></a> '+ chr(10) )
Indexhtm->(dbskip())
enddo
FWRITE(FCatalog, '</font></p>'+ chr(10) )
endif
next
FWRITE(FCatalog, '</body></html>'+ chr(10) )
fClose(fCatalog)
close all
return