Function CreateOneHtmlPag() // Dbf is already open !!
cFile = "c:\maveco\website\html\maveco folder\pag"+alltrim(fotoinde->code)+".htm"
Fzoeken := FCREATE(cFile)
FWRITE(Fzoeken, "<html>" + chr(10) )
FWRITE(Fzoeken, "<head>" + chr(10) )
FWRITE(Fzoeken, '<title>'+alltrim(fotoinde->titel)+'</title>' + chr(10))
FWRITE(Fzoeken, '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' + chr(10))
FWRITE(Fzoeken, '</HEAD> ' + chr(10))
FWRITE(Fzoeken, '<body bgcolor="#FFFFFF" text="#000000" background="../../Internet%20Sources/Achtergrond.jpg" leftmargin="30">' + chr(10))
FWRITE(Fzoeken, '<table width="600" border="1" cellspacing="5" cellpadding="0"> ' + chr(10))
FWRITE(Fzoeken, '<tr>' + chr(10))
FWRITE(Fzoeken, '<td colspan="4"> ' + chr(10))
FWRITE(Fzoeken, '<div align="center"><font color="#0000FF"><b><font size="5">'+alltrim(fotoinde->titel) +'</font></b></font></div> ' + chr(10))
FWRITE(Fzoeken, '</td> ' + chr(10))
FWRITE(Fzoeken, '</tr> ' + chr(10))
FWRITE(Fzoeken, '<tr>' + chr(10))
FWRITE(Fzoeken, '<td width="140" height="99"> ' + chr(10))
FWRITE(Fzoeken, '<div align="center"><font color="#0000FF" size="5">'+alltrim(fotoinde->code)+'</font></div> ' + chr(10))
FWRITE(Fzoeken, '</td> ' + chr(10))
FWRITE(Fzoeken, '<td colspan="3" valign="top" height="77">' + chr(10))
aText = formatMemo("FOTOPAG",fotoinde->info)
FWRITE(Fzoeken, '<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">' + chr(10))
for mTel = 1 to Len(aText)
FWRITE(Fzoeken, alltrim(aText[mTel])+'<br>' + chr(10))
next
FWRITE(Fzoeken, '</font></p> ' + chr(10))
FWRITE(Fzoeken, '</td> ' + chr(10))
FWRITE(Fzoeken, '</tr> ' + chr(10))
fotodata->(dbseek(fotoinde->code))
aInfo:={"","","",""} // 4 lege velden
aPic150:={"","","",""}
aPic400:={"","","",""}
aHtmlFoto150:={"","","",""}
aHtmlFoto400:={"","","",""}
aHtmlArtNr :={"","","",""}
aHtmlNom1 :={"","","",""}
aHtmlNom2 :={"","","",""}
nPosPag = 1
do while fotodata->code = fotoinde->code
if empty(fotodata->artikel_nr)
fotodata->(dbskip())
loop
endif
artikel->(dbseek(fotodata->artikel_nr))
if artikel->(rlock())
artikel->fotopag = fotoinde->code
artikel->online = "PAG "+fotoinde->code
artikel->(dbunlock())
endif
aPic150[nPosPag] = "c:\pictures\web150\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg"
aPic400[nPosPag] = "c:\pictures\web400\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg"
if file(aPic150[nPosPag])
cTarget = lower("c:\maveco\website\pictures\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg")
copy file &(aPic150[nPosPag]) to &cTarget
endif
if file(aPic400[nPosPag])
cTarget = lower("c:\maveco\website\pictures\b"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg")
copy file &(aPic400[nPosPag]) to &cTarget
endif
aHtmlFoto150[nPosPag] = '"../../images/'+lower(substr(artikel->artikel_nr,1,3))+lower(substr(artikel->artikel_nr,5,2))+lower(substr(artikel->artikel_nr,8,2))+'.jpg" '
//aHtmlFoto400[nPosPag] = "'../../images/b"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg' "
aHtmlArtNr[nPosPag] = lower(fotodata->artikel_nr)
aHtmlNom1[nPosPag] = left(fotodata->benaming,25)
aHtmlNom2[nPosPag] = substr(fotodata->benaming,26)
aHtmlArtNr[nPosPag] = fotodata->artikel_nr
nPosPag ++
if nPosPag = 5 .or. fotodata->code <> fotoinde->code
FWRITE(Fzoeken, '<tr> ' + chr(10))
for mDat = 1 to 4
FWRITE(Fzoeken, '<td width="160" height="140"> ' + chr(10))
FWRITE(Fzoeken, '<div align="center">' + chr(10))
FWRITE(Fzoeken, '<a href="../../zoekindex.php?loc=zoekdetail&pcode=true&perform_query=true&pcode_query=' + lower(alltrim(aHtmlArtNr[mDat])) + '">' + chr(10))
FWRITE(Fzoeken, '<img src=' + lower(aHtmlFoto150[mDat]) + ' alt="Klik om te vergroten" border = "0" vspace="5" hspace="5" align="top" ></a></div>' + chr(10))
// FWRITE(Fzoeken, '<font size="1">' + chr(10))
// FWRITE(Fzoeken, alltrim(aHtmlNom1[m])+'<br>'+ chr(10))
// FWRITE(Fzoeken, alltrim(aHtmlNom2[m])+ chr(10))
// FWRITE(Fzoeken, '<br><b><font size="2">' + chr(10))
// FWRITE(Fzoeken, alltrim(aHtmlArtNr[m]) + chr(10))
// FWRITE(Fzoeken, '</b></font></div>' + chr(10))
FWRITE(Fzoeken, '</td> ' + chr(10))
next
FWRITE(Fzoeken, '</tr> ' + chr(10))
FWRITE(Fzoeken, '<tr> ' + chr(10))
for mDat = 1 to 4
if empty(aHtmlArtNr[mDat])
FWRITE(Fzoeken, '<td width="160" height="26" > ' + chr(10))
else
FWRITE(Fzoeken, '<td width="160" height="26" bgcolor="#72B8B8"> ' + chr(10))
endif
FWRITE(Fzoeken, '<div align="center">' + chr(10))
// FWRITE(Fzoeken, '<a href="../../zoekindex.php?loc=zoekdetail&pcode=true&perform_query=true&pcode_query=' + alltrim(aHtmlArtNr[m]) + '">' + chr(10))
// FWRITE(Fzoeken, '<img src=' + aHtmlFoto150[m] + ' alt="Klik om te vergroten" border = "0" vspace="5" hspace="5" align="top" ></a> <br>' + chr(10))
FWRITE(Fzoeken, '<b><font size="2">' + chr(10))
FWRITE(Fzoeken, lower(alltrim(aHtmlArtNr[mDat]))+'<br>' + chr(10))
FWRITE(Fzoeken, '</b><font size="1">' + chr(10))
FWRITE(Fzoeken, alltrim(aHtmlNom1[mDat])+'<br>'+ chr(10))
FWRITE(Fzoeken, alltrim(aHtmlNom2[mDat])+ chr(10))
FWRITE(Fzoeken, '</font></div>' + chr(10))
next
FWRITE(Fzoeken, '</tr> ' + chr(10))
nPosPag = 1
aInfo:={"","","",""} // 4 lege velden
aPic150:={"","","",""}
aPic400:={"","","",""}
aHtmlFoto150:={"","","",""}
aHtmlFoto400:={"","","",""}
aHtmlArtNr :={"","","",""}
aHtmlNom1 :={"","","",""}
aHtmlNom2 :={"","","",""}
endif
fotodata->(dbskip())
enddo
FWRITE(Fzoeken, '</table>' + chr(10))
FWRITE(Fzoeken, '</body>' + chr(10))
FWRITE(Fzoeken, '</html>' + chr(10))
fClose(fZoeken)
return