;C: HTML-Bibliothek (2.5) fr PaleoTax IC 2.04
;C: HTML Program Library (2.5) for PaleoTax IC 2.04
; --------------------
; STANDARD 2.1
; 28. 7.1999 / 5. 9.1999 / 10.10.2000 / 16.05.2002 / 22.05.2005 / 15.1.2006
; 2.3 : 28.8.2006
; 2.4 : 21.9.2007
; 2.5 : 16.10.2008 (SR10)
; mod. 20.4.2011
EXIT
; --- Init HTML ---
:HTML_Init
#echo off
#debug off
#program off
#status off
#format html
#version IC204&LIB25C
define icversion,c
mov icversion,'IC204&LIB25'
define cn,i
define rg,i
define count,i
define ch,c
DEFINE GR,i
DEFINE old,i
DEFINE oldspec,i
DEFINE creflit,c
DEFINE famidxtitle,C
DEFINE famsubtitle,C
DEFINE famtitle,C
DEFINE first,i
DEFINE fname,C
DEFINE footer,c
DEFINE genidxtitle,C
DEFINE gensubtitle,C
DEFINE gentitle,C
DEFINE gr_ow,s
DEFINE gr_rec,i
DEFINE groupID,C
DEFINE ibin,i
DEFINE ibookp,i
DEFINE indexfilename,c
DEFINE ix,i
DEFINE ixf,i
DEFINE iy,i
DEFINE litidxtitle,C
DEFINE littitle,C
DEFINE litsubtitle,C
DEFINE ll,i
DEFINE locidxtitle,C
DEFINE locrec,i
DEFINE locs,i
DEFINE locsubtitle,C
DEFINE loctitle,C
DEFINE luidxtitle,C
DEFINE lusubtitle,C
DEFINE lutitle,C
DEFINE odb,c
DEFINE outpath,C
DEFINE outpathg,C
DEFINE pb,i
DEFINE R,I
DEFINE rc,i
DEFINE single,i
DEFINE sl,c
DEFINE sloc,C
DEFINE specidxtitle,C
DEFINE specsubtitle,C
DEFINE spectitle,C
DEFINE stype,C
DEFINE subject,C
DEFINE titel,C
DEFINE titel1,C
DEFINE titel2,C
DEFINE tprec,i
DEFINE user,c
;---
DEFINE agenderd,c,default,6
DEFINE agendere,c,default,6
DEFINE awordartd,c,default,4
DEFINE awordarte,c,default,4
stor agenderd,1,"unbekannt"
stor agenderd,2,"m„nnlich"
stor agenderd,3,"weiblich"
stor agenderd,4,"Neutrum"
stor agenderd,5,"variabel"
stor agenderd,6,"ohne Zuweisung"
stor agendere,1,"unknown"
stor agendere,2,"male"
stor agendere,3,"female"
stor agendere,4,"neuter"
stor agendere,5,"variable"
stor agendere,6,"out of designation"
stor awordartd,1,"unbekannt"
stor awordartd,2,"Substantiv"
stor awordartd,3,"Adjektiv"
stor awordartd,4,"Verbal.Substantiv"
stor awordarte,1,"unknown"
stor awordarte,2,"noun"
stor awordarte,3,"adjective"
stor awordarte,4,"verbal noun"
; ---
DEFINE kt,c
DEFINE ktrvatd,c
DEFINE ktdtd,c
DEFINE ktdw20,c
MOV kt,'
'
MOV ktrvatd,''
MOV ktdtd,' | : | '
MOV ktdw20,' | '
OUTPL ''
OUTPL ''
OUTPL ''
OUTPL ''
CMP single,1
JE ShortLeadIn
; Titel, User
OUTL ''+groupID+''
OUTPL ''
OUTL ''
:Gruppe
OUTPL ''
OUTPL ''
OUTPL ''
; Titelzeilen
OUT ''+titel+''
OUT IFF(titel1='','',' '+titel1+'')
OUT IFF(titel2='','',''+titel2+'')
OUTPL ''
; Menuepunkte 1 bis 5
OUTL ktdw20+IFF(sw_largecap=1,upcase(indexfilename),indexfilename)+'"> Home '
OUTL ktdw20+IFF(sw_largecap=1,'FAMILIES.HTM','families.htm')+'"> '+getm(860)+' '
OUTL ktdw20+IFF(sw_largecap=1,'GENERA.HTM','genera.htm')+'"> '+getm(863)+' '
OUTL ktdw20+IFF(sw_largecap=1,'SPECIES.HTM','species.htm')+'"> '+getm(864)+' '
OUTL ktdw20+IFF(sw_largecap=1,'LITERAT.HTM','literat.htm')+'"> '+getm(898)+' '
; Menuepunkte 5 bis x
OUTL ktdw20+IFF(sw_largecap=1,'LOCALITY.HTM','locality.htm')+'"> '+getm(865)+' '
OUTL ktdw20+IFF(sw_largecap=1,'LITHOS.HTM','lithos.htm')+'"> '+getm(895)+' '
OUTL ' '
:ShortLeadIn
RET
; --- Close HTML ---
:HTML_CloseFile
OUTL ' '+IFF(footer<>'',''+footer+' ','')+IFF(user<>'',' Updated '+date+' - © '+user+'.','')+''
STRM
RET
; --- Link HTML ---
; _____ Literatur (go rc) + PUT
:HTML_Literatur
CMP rc,0
JE HTML_LitEnde
FILE publicat
GO rc
OUT iff(single=1,'','','.htm">'))
OUT substr(author.fname,1,1)+''+upcase(substr(author.fname,2,50))+''
CMP @author3,0
JE HTML_Lit1
OUTP ' et al.'
JMP HTML_Lit3
:HTML_Lit1
CMP @author2,0
JE HTML_Lit3
OUT ' & '+substr(author2.fname,1,1)+''+upcase(substr(author2.fname,2,50))+''
:HTML_Lit3
OUT IFF(iy=1,' '+year+refl,'')
CMP single,1
JE HTML_LitEnde
OUTPL ''
CMP HTML,1
JE HTML_LitEnde
PUT HTML,1
FLSH
:HTML_LitEnde
RET
; _____ Literatur (go rc) ohne Link
:HTML_Literatur_plain
CMP rc,0
JE HTML_LitPlainEnde
FILE publicat
GO rc
OUT substr(author.fname,1,1)+''+upcase(substr(author.fname,2,50))+''
CMP @author3,0
JE HTML_Lit1pl
OUTP ' et al.'
JMP HTML_Lit3pl
:HTML_Lit1pl
CMP @author2,0
JE HTML_Lit3pl
OUT ' & '+substr(author2.fname,1,1)+''+upcase(substr(author2.fname,2,50))+''
:HTML_Lit3pl
OUT IFF(iy=1,' '+year+refl,'')
:HTML_LitPlainEnde
RET
; _____ OriginalGattung + Art ohne GO + PUT
:HTML_OGenSpec
MOV rc,@o_genus
CALL htmllink_genus
OUTP ' '
FILE species
CMP o_subgen,0
JE nsg3
MOV rc,@o_subgen
OUTP '('
CALL HTMLLink_Genus
OUTP ') '
FILE species
:nsg3
CMP sname,'sp.'
JNE artok
OUTPL ' sp.'
JMP HTML_OGenSpec_Exit
:artok
OUT IFF(single=1,'','','.htm">'))+''+sname+IFF(subname='','',' '+subname)+''
CMP single,1
JE nolink3
OUTP ' '
CMP HTML,1
JE nolink3
PUT html,1
FLSH
:nolink3
MOV rc,@sauthor
OUTP ' '
CALL HTML_Literatur
:HTML_OGenSpec_Exit
RET
; _____ CurrentGattung + Art mit und ohne GO + PUT
:HTML_CGenSpecGo
CMP rc,0
JE artend
FILE species
GO rc
; erwartet hier den richtig positionierten Datensatz in SPECIES
:HTML_CGenSpec
MOV rc,@c_genus
CALL htmllink_genus
OUTP ' '
FILE species
CMP sname,'sp.'
JNE artokc
OUTP 'sp.'
JMP artend
:artokc
OUT iff(single=1,'','','.htm">'))+''+sname+IFF(subname='','',' '+subname)+''
CMP single,1
JE nolink5
OUTP ''
CMP HTML,1
JE nolink5
PUT html,1
FLSH
:nolink5
MOV rc,@sauthor
OUTP ' '
CALL HTML_Literatur
:ArtEnd
RET
; _____ Gattung + PUT
:HTMLLink_Genus
CMP rc,0
JE htmllink_genus_end
FILE genera
GO rc
OUT iff(single=1,'','','.htm">'))+''+gname+''
CMP single,1
JE htmllink_genus_end
OUTP ''
CMP HTML,1
JE htmllink_genus_end
PUT html,1
FLSH
:htmllink_genus_end
RET
; _____ Familie + PUT
:HTMLLink_Family
CMP rc,0
JE htmllink_family_end
FILE families
GO rc
OUT IFF(single=1,'','','.htm">'))
OUT famname
CMP single,1
JE htmllink_family_end
OUTP ''
CMP HTML,1
JE htmllink_family_end
PUT html,1
FLSH
:htmllink_family_end
file genera
RET
; _____ Lokalit×t mit GO (rc) + PUT
:HTML_Lokalitaet
CMP rc,0
JE locexit
FILE locality
GO rc
OUT iff(single=1,'','','.htm">'))+region.rcountry.coname
OUT IFF((region.rname='*') or (region.rname='') or (region.rname='?'),'',', '+region.rname)
OUT iff(outcrop='*' or outcrop='','',', '+outcrop)+IFF(smplpnt='','',', '+smplpnt)
OUT IFF(bed='','',', '+bed)+iff(single=1,'','')
CMP @locage,0
JE locende
OUT ' -- '+locage.agename
:locende
cmp single,1
JE locexit
OUTP ''
CMP HTML,1
JE locexit
PUT html,1
FLSH
:locexit
RET
; _____ Lithos mit GO (rc) + PUT
:HTML_Lithos
CMP rc,0
JE locexit
FILE lithos
GO rc
OUT iff(single=1,'','','.htm">'))
out luname+iff(single=1,'','')+iff(liage=0,'',' ('+liage.agename+')')
cmp single,1
je luexit
CMP HTML,1
JE luexit
PUT html,1
FLSH
:luexit
RET
; --- Einzelne Objekte : Literatur ---
:Ref2HTML
CMP single,1
JE noLitCreate ; keine eigene Datei & Keine Headerzeile
; --- Titelzeile
OUT ''+author.fname
CMP @author3,0
JE w18
OUTP ' et al.'
JMP w38
:w18
CMP @author2,0
JE w38
OUTP ' & '+author2.fname
:w38
OUT ' '+year+refl
:keinautor8
OUT ' '
:NoLitCreate
OUTL kt+ktrvatd+getm(866)+ktdtd+author.fname+IFF(author.cname='','',', '+author.cname)+' |
'
CMP @author2,0
JE year
OUTL ktrvatd+getm(866)+' 2'+ktdtd+author2.fname+IFF(author2.cname='','',', '+author2.cname)+''
CMP @author3,0
JE year
OUTL ktrvatd+getm(866)+' 3'+ktdtd+author3.fname+IFF(author3.cname='','',', '+author3.cname)+''
CMP @author4,0
JE year
OUTL ktrvatd+getm(866)+' 4'+ktdtd+author4.fname+IFF(author4.cname='','',', '+author4.cname)+''
CMP @author5,0
JE year
OUTL ktrvatd+getm(866)+' 5'+ktdtd+author5.fname+IFF(author5.cname='','',', '+author5.cname)+''
:year
OUTL ktrvatd+getm(867)+ktdtd+year+''
CMP refl,''
JE titel
OUTL ktrvatd+getm(868)+ktdtd+refl+''
:titel
#format 7
OUTL ktrvatd+getm(869)+ktdtd
OUTL Title
#format html
OUTPL ''
MOV ibookp,0
MOV creflit,referenc
MOV pb,recno
FILE pinbook
cmp reccount,0 ; 15.5.2011
je endbook ; 15.5.2011
FIND pb
JNF endbook
CMP pb,publno
JNE endbook
OUT ktrvatd+getm(871)+ktdtd
MOV ibookp,bookno.publ
CMP bookno.author,0
JE btitel2
OUT bookno.author.fname+iff(bookno.author.cname='','',', '+bookno.author.cname)
OUT IFF(bookno.author3<>0,' et al.',IFF(bookno.author2=0,'',bookno.author2.fname+iff(bookno.author2.cname='','',', '+bookno.author2.cname)))+': '
:btitel2
OUT bookno.title+''
:endbook
FILE publicat
GO pb
MOV ibookp,iff(ibookp=0,publ,ibookp)
CMP ibookp,0
JE NoPubl_ref
FILE publs
GO ibookp
CMP pname,''
JE Publ_verlag
OUTL ktrvatd+getm(870)+ktdtd+pname+''
:publ_verlag
CMP phouse,0
JE publ_ref
OUTL ktrvatd+getm(1079)+ktdtd+phouse.phname+''
:publ_ref
CMP creflit,''
JE publ_town
OUTL ktrvatd+getm(872)+ktdtd+creflit+''
:publ_town
CMP ptown,0
JE endtab
OUTL ktrvatd+getm(873)+ktdtd+ptown.tname+''
JMP endtab
:NoPubl_Ref
CMP creflit,''
JE endtab
OUTL ktrvatd+getm(872)+ktdtd+creflit+''
:endtab
FILE publicat
GO pb
OUT '
'
CMP single,1
JE NoLitClose
CALL HTML_CloseFile
:NoLitClose
RET
; --- Einzelne Objekte : Familien ---
:Fam2HTML
; --- Titelzeile
OUT ''+famname+'
'
MOV old,recno
; ---- Author
CMP fauthor,0
JE KeinFamAuthor
OUT kt+''+getm(866)+ktdtd
MOV rc,@fauthor
CALL HTML_Literatur
FILE families
OUTL ' |
'
:KeinFamAuthor
; ---- Ordnung
CMP famorder,0
JE KeineOrdnung
OUTL ktrvatd+getm(1824)+ktdtd+famorder.orname+''
:KeineOrdnung
; ---- SOrdnung
CMP famsorder,0
JE KeineSOrdnung
OUTL ktrvatd+getm(1352)+ktdtd+famsorder.orname+''
:KeineSOrdnung
; --- Notiz
OUTL ''
CMP (sw_famnote=1) and (famnote>0),0
JE Gattungsliste
OUTP '
'
OUTTEXT famnote
OUTP ''
; --- Gattungen
:Gattungsliste
mov oldspec,0
MOV gr,recno
FILE genera
OUT '
'+getm(863)+'
'
USEIND ~htm6
:beg_genlist
cmp (supfam=gr) or (subfam=gr) or (family=gr),0
JE skip_genlist
OUT '- '
MOV rc,recno
OUT IFF(sw_genbrk=1 and numspec=0,'[','')
CALL HTMLLink_Genus
OUT IFF(sw_genbrk=1 and numspec=0,']','')
FILE genera
:skip_genlist
SKIP
JNEOF beg_genlist
OUT '
'
USEIND
FILE families
GO old
:Family_Ende
RET
; --- Einzelne Objekte : Gattungen ---
:Gen2HTML
MOV old,recno
; --- Titelzeile
:noGenCreate
OUT ''+gname+'
'+kt
CMP sw_gensyn,0
JE GenAutor
MOV r,0
FILE gensyn
CMP reccount,0
JE EndGSyn2
USEIND ~htmD
FIND old
JNF JunSyn
:CmpGSensyn
CMP old,Gsensyn
JNE CloseSenSyn
OUT IFF(r=0,''+getm(862)+ktdtd,', ')
MOV rc,gjunsyn
MOV r,1
CALL HTMLLink_Genus
FILE gensyn
SKIP
JNEOF CmpGSenSyn
:CloseSenSyn
CMP r,0
JE JunSyn
OUTL ' |
'
:JunSyn
reset
cmp reccount,0 ; 15.5.2011
je endgsyn ; 15.5.2011
MOV r,0
USEIND ~htmC
FIND old
JNF EndGSyn
:CmpGJunsyn
CMP old,GJunsyn
JNE CloseJunSyn
OUT IFF(r=0,''+getm(1037)+ktdtd,', ')
MOV rc,gsensyn
MOV r,1
CALL HTMLLink_Genus
FILE gensyn
SKIP
JNEOF CmpGJunSyn
:CloseJunSyn
CMP r,0
JE EndGSyn
OUTL ' |
'
:EndGSyn
USEIND
:EndGSyn2
FILE genera
GO old
; ---- Author
:GenAutor
CMP gauthor,0
JE KeineGattung
OUT ''+getm(866)+ktdtd
MOV rc,@gauthor
CALL HTML_Literatur
FILE genera
OUTL ' |
'
:KeineGattung
; ---- Super-Familie
CMP supfam,0
JE KeineSupFamilie
OUT ktrvatd+getm(1351)+ktdtd
MOV rc,supfam
CALL HTMLLink_Family
OUTL ''
:KeineSupFamilie
; ---- Familie
CMP family,0
JE KeineFamilie
OUT ktrvatd+getm(874)+ktdtd
MOV rc,family
CALL HTMLLink_Family
OUTL ''
:KeineFamilie
; ---- Sub-Familie
CMP subfam,0
JE KeineSubFamilie
OUT ktrvatd+getm(1350)+ktdtd
MOV rc,subfam
CALL HTMLLink_Family
OUTL ''
:KeineSubFamilie
; ---- Typusart
:Typusart
CMP sw_Typusart,0
JE tsend
MOV r,recno
FILE typespec
cmp reccount,0 ; 15.5.2011
je ts_notfound ; 15.5.2011
FIND r
CMP r,ts_genus
JNE ts_notfound
OUT ktrvatd+getm(875)+ktdtd
MOV r,ts_spec
FILE species
GO r
CALL HTML_OGenSpec
OUTPL ''
FILE typespec
CMP ts_asgnd,0
JE ts_notfound
OUT ''+getm(876)+ktdtd
MOV rc,@ts_asgnd
CALL HTML_Literatur
OUTPL ' |
'
:ts_notfound
FILE genera
go old
:tsend
; --- Stratigr. Verbreitung
file genera
CMP (sw_gage=0) or (@gage_l=0) or (@gage_u=0),0
JNE g_etym
OUT ktrvatd+getm(1353)+ktdtd+IFF(gage_l.namefrom='',gage_l.ageiugs,gage_l.namefrom)+' - '
OUTL IFF(gage_u.nameto='',gage_u.ageiugs,gage_u.nameto)+''
; --- Etymologie
:g_etym
CMP sw_etym,0
JE ge_notiz
OUTL ktrvatd+getm(1357)+ktdtd+geetym+''
OUTL ktrvatd+getm(1358)+ktdtd+iff(language='GER',agenderd[gegender+1],agendere[gegender+1])+''
OUTL ktrvatd+getm(1359)+ktdtd+iff(language='GER',awordartd[gewclass+1],awordarte[gewclass+1])+''
; --- Notiz
:ge_notiz
OUTPL ''
CMP (sw_gennote=1) and (gnote>0),0
JE ge_artliste
OUTP '
'
OUTTEXT gnote
OUTP ''
; --- Artliste
:ge_artliste
mov oldspec,0
MOV gr,recno
FILE species
OUT '
'+getm(878)+'
'
USEIND ~htm1
FIND STR(gr)+'*'
:beg3
CMP (o_genus=0) or (html=0),0
JNE skip3
CMP @o_genus,GR
JNE ogend
OUT '- '
CALL HTML_OGenSpec
FILE species
:skip3
SKIP
JNEOF beg3
RESET
:ogend
OUT '
'
; ---
MOV oldspec,0
FILE species
OUT ''+getm(879)+'
'
USEIND ~htm2
FIND STR(gr)+'*'
:beg4
CMP (c_genus=0) or (html=0),0
JNE skip4
CMP @c_genus,GR
JNE cgend
OUT '- '
CALL HTML_OGenSpec
FILE species
:skip4
SKIP
JNEOF beg4
:cgend
OUT '
'
; ------ Bilder
CMP sw_graph,0
JE NoGenBild
MOV gr_ow,odb+'.GENERA'
MOV gr_rec,gr
CALL HTML_GRAPH
; ------ Ende
:NoGenBild
FILE genera
go old
:Genus_Ende
RET
; --- Prozeduren zur Gattung
:GeneraInit
MOV subject,'G'
FILE TYPESPEC
INDEX TS_GENUS,~HTM9,U
FILE species
INDEX STR(@o_genus)+'*'+sname+subname,~htm1,U
INDEX STR(@c_genus)+'*'+sname+subname,~htm2,U
FILE genera
MOV titel1,IFF(gentitle='',getm(863),gentitle)
MOV titel2,gensubtitle
CMP sw_gensyn,0
JE GenInitRet
FILE gensyn
INDEX GJUNSYN,~htmC,U
INDEX GSENSYN,~htmD,U
:GenInitRet
RET
; ----------------
:GeneraExit
FILE species
USEIND
FILE TYPESPEC
USEIND
RET
; --- Einzelne Objekte : Arten ---
:Species_To_HTML
; --- Titelzeile
OUTL ''+c_genus.gname+' '+sname+IFF(subname='','',' '+subname)+'
'+kt
FILE species
; --- Autor
CMP sauthor,0
JE s_Origen
OUT ''+getm(866)+ktdtd
MOV rc,@sauthor
CALL HTML_Literatur
FILE species
OUTL ' |
'
; --- Originalgattung
:s_origen
CMP sw_OrigDescr,1
JNE CurrentGenus
OUT ''+getm(880)+ktdtd
MOV rc,@o_genus
CALL HTMLLink_Genus
OUTP ' '
FILE species
CMP o_subgen,0
JE nsg1
MOV rc,@o_subgen
OUTP '('
CALL HTMLLink_Genus
OUTP ') '
FILE species
:nsg1
OUTL ' |
'
; Gegenw. Gatttung
:CurrentGenus
OUT ''+getm(881)+ktdtd
MOV rc,@c_genus
CALL HTMLLink_Genus
OUTP ' '
FILE species
CMP c_subgen,0
JE nsg2
OUTP '('
MOV rc,@c_subgen
CALL HTMLLink_Genus
OUTP ') '
FILE species
:nsg2
OUTL ' |
'
CMP @gassign,0
JE status
; --- Gattung zugewiesen
CMP sw_CurGenAss,1
JNE status
OUT ktrvatd+getm(882)+ktdtd
MOV rc,@gassign
CALL HTML_Literatur
OUTL ''
; --- Status
:status
FILE species
CMP @validity,0
JE house
OUTL ktrvatd+getm(883)+ktdtd+validity.vname+''
; --- Housing ---
:house
MOV r,recno
MOV ibin,recno
CMP sw_TypeMat,0
JE IstSynonym
MOV tprec,recno
CALL TAX_TYPES_INIT
;in : tprec - Record nach species / out : stype = string
;wenn out leer ist, kann beendet werden, sonst muss TAX_TYPES_NEXT aufgerufen werden, bis stypes = '' ist
CMP stype,''
JE types_end
OUTL ktrvatd+getm(884)+ktdtd+stype+''
:StartType
CALL TAX_TYPES_NEXT
;in : ./.
;out : stype = string
CMP stype,''
JE types_end
OUTL ktrvatd+' | '+stype+''
JMP StartType
:types_end
file species
go ibin
; Ist diese Art eventuell ein jngeres Synonym von ???
; dann ist der Rest obsolet, weil er nicht existiert !
:IstSynonym
FILE binomina
CMP reccount,0 ; 15.5.2011
JE NoSynonym ; 15.5.2011
FIND ibin
CMP senior,species
JE NoSynonym
OUT ' '+getm(1160)
MOV rc,senior
CALL HTML_CGenSpecGo
OUT ' '+getm(1161)
FILE binomina
MOV rc,@assign
CALL HTML_Literatur
OUTPL ') '
FILE species
GO ibin
JMP SpecBild
:NoSynonym
FILE species
GO ibin
; --- Stratigr. Verbreitung
:age
CMP (sw_sage=0) or (@sage_l=0) or (@sage_l=0),0
JNE s_etym
OUT ktrvatd+getm(1353)+ktdtd+IFF(sage_l.namefrom='',sage_l.ageiugs,sage_l.namefrom)+' - '
OUTL IFF(sage_u.nameto='',sage_u.ageiugs,sage_u.nameto)+''
; --- Etymologie
:s_etym
CMP sw_etym,0
JE se_notiz
OUTL ktrvatd+getm(1357)+ktdtd+spetym+''
OUTL ktrvatd+getm(1358)+ktdtd+iff(language='GER',agenderd[spgender+1],agendere[spgender+1])+''
OUTL ktrvatd+getm(1359)+ktdtd+iff(language='GER',awordartd[spwclass+1],awordarte[spwclass+1])+''
; --- Notiz
:se_notiz
OUTL ''
CMP (sw_specnote=1) and (snote>0),0
JE citations
OUTP ' '
OUTTEXT snote
OUTP ' '
; --- Citations
:citations
OUTL ' '+getm(885)+''+kt
MOV iy,0
FILE citation
CMP reccount,0 ; 15.5.2011
JE endcitat ; 15.5.2011
FIND str(r)+'#'
:beginCit
CMP now_ass.@senior,r
JNE endcitat
CMP @source,0
JE skipCit
CMP citate,''
JE skipCit
OUT ' | '
CMP sw_synmode,1
JNE NoSynMode
OUT synmode+' '
:NoSynMode
OUT IFF(excluded<>0,'non','')+' | '+source.year+' | '+citate+' -- '
MOV rc,@source
CALL HTML_Literatur
FILE citation
OUT ', '+cref+' |
'
:skipCit
SKIP
JNEOF beginCit
:endcitat
OUTPL ''
MOV iy,1
; --- Vorkommen
MOV ix,-1
FILE occurr
CMP reccount,0 ; 15.5.2011
JE endloc ; 15.5.2011
OUTL ''+getm(886)+'
'
FIND str(r)+'#'
OUT ''
:beginocc
CMP ocitate.now_ass.@senior,r
JNE endloc
CMP ix,@locality
JE skipOcc
MOV ix,@locality
MOV rc,@locality
CALL HTML_Lokalitaet
FILE occurr
OUTL '
'
:SkipOcc
skip
JNEOF beginOcc
:endloc
OUT '
'
; ------ Bilder
:SpecBild
CMP sw_graph,0
JE SpecReturn
MOV gr_ow,odb+'.SPECIES'
MOV gr_rec,ibin
CALL HTML_GRAPH
; ------ Ende
:SpecReturn
RET
; ------ Vorbereiten
:SpeciesInit
MOV subject,'S'
MOV titel1,IFF(spectitle='',getm(864),spectitle)
MOV titel2,specsubtitle
FILE types
INDEX t_spec,~HTMA,U
FILE citation
INDEX str(now_ass.@senior)+'#'+source.year,~htm3,U
FILE occurr
INDEX str(ocitate.now_ass.@senior)+'#'+locality.region.rcountry.coname+locality.region.rname+locality.outcrop+locality.smplpnt,~htm4,U
FILE binomina
INDEX species,~HTMB,U
FILE species
RET
:SpeciesExit
FILE types
USEIND
FILE citation
USEIND
FILE occurr
USEIND
FILE binomina
USEIND
FILE species
RET
; --- Einzelne Objekte : Lokalit×ten ---
:Loc2HTML
OUT ''+region.rcountry.coname
out IFF(region.rname='*' or region.rname='' or region.rname='?','',', '+region.rname)
OUTL IFF(outcrop='*' or outcrop='','','
'+outcrop)+'
'
OUTL kt+ktrvatd+getm(887)+ktdtd+region.rcountry.coname+''
OUTL IFF(region.rname='*' or region.rname='' or region.rname='?','',ktrvatd+getm(888)+ktdtd+region.rname+'')
OUTL IFF(outcrop='*' or outcrop='' or outcrop='?','',ktrvatd+getm(889)+ktdtd+outcrop+'')
OUTL IFF(smplpnt='','',ktrvatd+getm(890)+ktdtd+smplpnt+'')
OUTL IFF(bed='','',ktrvatd+getm(891)+ktdtd+bed+'')
CMP sw_llData,0
JE locliteratur
CMP bg,0
JNE lage
CMP lg,0
JE locliteratur
:lage
OUT ktrvatd+getm(892)+ktdtd
OUT str(BG)+'ø '+str(BM)+CHR(39)+' '+str(BS)+'" '+BD+' - '+str(LG)+'ø '+str(LM)+CHR(39)+' '+str(LS)+'" '+LD
CMP sw_lltype,0
JE locliteratur
OUT #32+IFF(lltype='S','[Town]',iff(lltype='L','[Locality]',iff(lltype='R','[Region]',IFF(lltype='M','[Map]',''))))
OUT IFF(lltype='X','[Reference]',iff(lltype='P','[Peak]',iff(lltype='E','[DB MS Encarta]',IFF(lltype='D','[DB 3D]',''))))+''
; --- Literatur
:locliteratur
CMP sw_LocLit,0
JE LocAge
MOV sl,basename+'.LOCALITY#'+str(recno)+'#'
MOV ll,recno
MOV first,1
FILE dbliter
CMP reccount,0 ; 15.5.2011
JE endeLL ; 15.5.2011
FIND sl
:beginLL
CMP ll,dbrecord
JNE endeLL
CMP first,1
JE FirstLL
OUTP '; '
JMP KeinFirstLL
:FirstLL
MOV first,0
OUT ktrvatd+getm(1033)+ktdtd
:KeinFirstLL
MOV rc,litrecord
CALL HTML_Literatur ; Rufe Literatur
FILE dbliter
SKIP
JNEOF beginLL
:endeLL
CMP first,1
JE KeineReferenz
OUTPL ''
:KeineReferenz
FILE locality
; --- Alter
:LocAge
CMP @locage,0
JE biozone
OUT ktrvatd+getm(893)+ktdtd
OUT locage.agename
OUTL ''
; --- Bioz
:biozone
CMP locage.@biozone,0
JE litho
OUTL ktrvatd+getm(894)+ktdtd+locage.biozone.biozname+IFF(locage.biozonet=0,'',' - '+locage.biozonet.biozname)+''
; --- Lithostr.
:litho
CMP @loclitho,0
JE anzahl
OUT ktrvatd+getm(895)+ktdtd
MOV rc,loclitho
CALL html_lithos
file locality
OUTL ''
; --- Anzahl
:anzahl
; --- Ende
OUTPL ''
; --- Species
MOV r,recno
MOV locs,0
FILE occurr
CMP reccount,0 ; 15.5.2011
JE SpeciesOfLocalityEnd ; 15.5.2011
OUTL ''+getm(864)+'
'
FIND STR(r)+'*'
:SpeciesOfLocality
CMP @locality,r
JNE SpeciesOfLocalityEnd
CMP locs,ocitate.now_ass.senior
JE skip_occ
MOV locs,ocitate.now_ass.senior
MOV rc,ocitate.now_ass.senior
CALL HTML_CGenSpecGo
OUTL '
'
:skip_occ
FILE occurr
SKIP
JNEOF SpeciesOfLocality
:SpeciesOfLocalityEnd
; --- Bilder
CMP sw_graph,0
JE NoLocBild
MOV gr_ow,odb+'.LOCALITY'
MOV gr_rec,r
CALL HTML_GRAPH
:NoLocBild
File locality
RET
:LocalityInit
MOV subject,'L'
FILE occurr
INDEX STR(@locality)+'*'+ocitate.now_ass.senior.c_genus.gname+ocitate.now_ass.senior.sname+ocitate.now_ass.senior.subname,~htm5,U
MOV titel1,getm(897) ;'Occurrences'
MOV titel1,IFF(loctitle='',getm(897),loctitle)
MOV titel2,locsubtitle
CMP sw_LocLit,0
JE IndexeOK
MOV sw_LocLit,0
FILE dbliter
CMP reccount,0
JE IndexeOK
CALL GetBaseName
INDEX basename+'.'+owner+'#'+str(dbrecord)+'#'+litrecord.author.fname+litrecord.year+litrecord.refl,~lc4,U
MOV sw_LocLit,1
:IndexeOK
RET
:LocalityExit
FILE citation
USEIND
RET
; --- LITHOS
:Lithos2HTML
outl ''+luname+'
'
OUTL kt+ktrvatd+getm(1235)+ktdtd+luname+''
OUTL IFF(liage=0,'',ktrvatd+getm(893)+ktdtd+liage.agename+'')
OUTPL ''
; Lokalit„tenliste
MOV ix,-1
OUTL ''+getm(865)+'
'
MOV r,recno
FILE locality
CMP reccount,0 ; 15.5.2011
JE EndLiLocs ; 15.5.2011
FIND str(r)+'*'
jnf EndLiLocs
:beginLiLocs
CMP r,loclitho
JNE EndLiLocs
CMP html,1
JNE skipLiLocs
MOV rc,recno
CALL HTML_Lokalitaet
OUTL '
'
:skipLiLocs
skip
JNEOF beginLiLocs
:EndLiLocs
FILE lithos
GO r
; ### Artliste ?
RET
; --- Nachbereitung = Indexe anlegen ---
:HTML_Index
; --- FAMILIEN ---
MOV titel1,IFF(famtitle='',getm(860),famtitle)
MOV titel2,famidxtitle
MOV fname,outpath+'FAMILIES.HTM'
CALL html_SubCreateFile
FILE families
INDEX famname,~htmF,O
CALL HTML_Marken
mov ch,'@'
mov count,0
OUTP ''
:beginFa
cmp html,0
je skipFa
;:rudfa
CMP ch,substr(famname,1,1)
JE KeinAnkerFam
CMP count,0
JE IfamNoHR
OUTPL '
'
:IfamNoHR
mov count,0
;MOV ch,chr(ord(substr(ch,1,1))+1)
MOV ch,substr(famname,1,1)
OUT ''
;JMP rudfa
:KeinAnkerFam
OUTL '- ','.htm">')+famname+''
MOV count,count+1
:skipFa
skip
JNEOF beginFa
OUTP '
'
CALL html_CloseFile
USEIND
; ---GATTUNGEN ---
MOV titel1,IFF(gentitle='',getm(863),gentitle)
MOV titel2,genidxtitle
MOV fname,outpath+'GENERA.HTM'
CALL html_SubCreateFile
FILE genera
INDEX gname,~htm6,U
CALL HTML_Marken
mov ch,'@'
mov count,0
OUTP ''
:beginG
cmp html,0
je skipG
;:rudg
CMP ch,substr(gname,1,1)
JE KeinAnker
CMP count,0
JE IgenNoHR
OUTPL '
'
:IgenNoHR
mov count,0
MOV ch,substr(gname,1,1)
OUT ''
:KeinAnker
OUT '- '+IFF(sw_genbrk=1 and numspec=0,'[','')+'','.htm">')
OUTL gname+''+IFF(sw_genbrk=1 and numspec=0,']','')
MOV count,count+1
:skipG
skip
JNEOF beginG
OUTP '
'
CALL html_CloseFile
USEIND
; --- ARTEN ---
MOV titel1,IFF(spectitle='',getm(864),spectitle)
MOV titel2,specidxtitle
FILE species
MOV fname,outpath+'SPECIES.HTM'
CALL html_SubCreateFile
INDEX sname+c_genus.gname,~htm7,U
CALL HTML_Marken
mov ch,'@'
mov count,0
OUTP ''
:beginS
CMP html,0
JE skipS
CMP c_genus,0 ; 22.10.2001
JE skips ; 22.10.2001
CMP ch,substr(sname,1,1)
JE KeinAnkerSpec
CMP count,0
JE IspeNoHR
OUTPL '
'
:IspeNoHR
MOV ch,substr(sname,1,1)
mov count,0
OUTL ''
:KeinAnkerSpec
OUT '- ','.htm">')+sname+IFF(subname='','',' '+subname)+''
OUT ' ','.htm">')+c_genus.gname+' '
CMP c_subgen,0
JE NoSubGen
OUT ' (','.htm">')+c_subgen.gname+') '
:NoSubGen
OUT '[','.htm">')+o_genus.gname+'] '
MOV rc,sauthor
CALL HTML_Literatur_plain
OUTPL ' '
FILE species
MOV count,count+1
:skipS
skip
JNEOF beginS
OUTP '
'
CALL html_CloseFile
USEIND
; --- Lokalitaeten ---
MOV titel1,IFF(loctitle='',getm(897),loctitle)
MOV titel2,locidxtitle
FILE locality
MOV fname,outpath+'LOCALITY.HTM'
CALL html_SubCreateFile
mov cn,0
mov rg,0
CALL HTML_Marken
mov ch,'@'
mov count,0
index region.rcountry.coname+region.rname+outcrop+smplpnt+bed+locage.agename,~htm8,U
OUTP ''
:beginL
cmp html,0
je skipL
CMP outcrop,''
JE skipL
CMP region.@rcountry,cn
JE KeinAnkerL
MOV rg,0
OUTPL '
'
CMP count,0
JE IlocNoHR
OUTPL '
'
:IlocNoHR
mov cn,region.@rcountry
CMP ch,substr(region.rcountry.coname,1,1)
JE LandName
MOV ch,substr(region.rcountry.coname,1,1)
mov count,0
OUT ''
:LandName
OUT ''+region.rcountry.coname+'
'
:KeinAnkerL
CMP rg,@region
JE keinReg
OUT '
'+IFF(region.rname='*' or region.rname='','?',region.rname)+'
'
MOV rg,@region
:keinReg
OUT '- ','.htm">')+outcrop+IFF(smplpnt='','',', '+smplpnt)+IFF(bed='','',', '+bed)+''
OUTL IFF(locage=0,' ',' - '+locage.agename)
MOV count,count+1
:skipL
skip
jneof beginL
OUTP '
'
CALL html_CloseFile
USEIND
; --- Literatur ---
MOV titel1,IFF(littitle='',getm(898),littitle)
MOV titel2,litidxtitle
FILE publicat
MOV fname,outpath+'LITERAT.HTM'
CALL html_SubCreateFile
CALL HTML_Marken
mov ch,'@'
mov count,0
index author.fname+author.cname+author2.fname+author3.fname+year+refl,~htm10,U
OUTP ''
:beginLi
cmp html,0
je skipLi
CMP upcase(substr(author.fname,1,1)),ch
JE KeinAnkerLi
CMP count,0
JE ILitNoHR
OUTPL '
'
:ILitNoHR
MOV ch,upcase(substr(author.fname,1,1))
mov count,0
OUTL ''
:KeinAnkerLi
OUT '- ','.htm">')+author.fname+iff(author.cname='','',', '+author.cname)+IFF(author2>0,'; '+author2.fname+iff(author2.cname='','',', '+author2.cname),'')
OUTL IFF(author3>0,'; '+author3.fname+iff(author3.cname='','',', '+author3.cname),'')+' '+year+' '+refl+''
MOV count,count+1
:skipLi
skip
jneof beginLi
OUTP '
'
CALL html_CloseFile
USEIND
; --- LITHOS.HTM
MOV titel1,IFF(lutitle='',getm(895),lutitle)
MOV titel2,luidxtitle
FILE lithos
MOV fname,outpath+'LITHOS.HTM'
CALL html_SubCreateFile
mov cn,0
mov rg,0
CALL HTML_Marken
mov ch,'@'
mov count,0
index luname,~htm12,U
OUTP ''
:beginLito
cmp html,0
je skipLito
CMP ch,upcase(substr(luname,1,1))
JE KeinAnkerLito
CMP count,0
JE ILitoNoHR
OUTPL '
'
:ILitoNoHR
mov count,0
MOV ch,upcase(substr(luname,1,1))
OUT ''
:KeinAnkerLito
OUTL '- ','.htm">')+luname+''
MOV count,count+1
:skipLito
skip
JNEOF beginLito
OUTP '
'
CALL html_CloseFile
USEIND
; --- INDEX.HTM ---
MOV titel1,getm(896) ; 'Main Page'
MOV fname,outpath+IFF(sw_largecap=1,upcase(indexfilename),indexfilename)
MOV titel1,''
MOV titel2,''
CALL html_SubCreateFile
CALL html_CloseFile
RET
:HTML_Marken
mov count,65
outP ''
:beginGZ
OUT ''+CHR(count)+' '
mov count,count+1
CMP count,91
JNE BeginGZ
outP '
'
RET
:HTML_Graph
CMP (sw_graph=0) or (gr_rec=0),0
JNE HTML_Graph_exit
FILE dbpictur
FIND gr_ow+'#'+str(gr_rec)
JNF HTML_Graph_exit
:HTML_Graph_Next
CMP (owner=gr_ow) and (dbrecord=gr_rec),1
JNE HTML_Graph_exit
CMP (sw_graph=1) or (sw_graph=2 and inhtml=T) or (sw_graph=3 and inhtml=F),0
JE HTML_Graph_skip
CMP pcrecord.pgraph,'' ; 29.4.2008
JE HTML_Graph_skip ; 29.4.2008
OUT '
'
OUTL '
'
OUTL ''+pcrecord.ptext+'
'
OUTL ''
TXT.WL pcrecord.pgraph
:HTML_Graph_skip
SKIP
JNEOF HTML_Graph_Next
:HTML_Graph_exit
RET
#I HTML_DEF.PRF
#I MLIB21.PRF