PROCEDURE LOCALITY AS
CURSOR C1 IS
SELECT DISTINCT LOCNO
FROM DRLOCAT
ORDER BY LOCNO;
X1 VARCHAR2 (100);
BEGIN
HTP.HTMLOPEN;
HTP.P('<BODY BGCOLOR="WHITE">');
HTP.LINE;
HTP.FORMOPEN('LOCALITY_FORM');
HTP.PREOPEN;
OPEN C1;
FETCH C1 INTO X1;
HTP.FORMSELECTOPEN('Page', 'Select Location ID Number:');
WHILE C1%FOUND LOOP
HTP.NL;
HTP.FORMSELECTOPTION(X1);
FETCH C1 INTO X1;
END LOOP;
CLOSE C1;
HTP.FORMSELECTCLOSE;
HTP.PRECLOSE;
HTP.FORMRESET;
HTP.FORMSUBMIT;
HTP.FORMCLOSE;
HTP.LINE;
HTP.HTMLCLOSE;
END;
PROCEDURE LOCALITY_FORM (
PAGE VARCHAR2 := NULL) AS
CURSOR C1 IS
SELECT LOCNO, RIVER, STRATELEV, STRATUNITS, FORMATION, NANNOZONE, GEOLAGE
FROM DRLOCAT
WHERE (LOCNO = PAGE);
CURSOR C2 IS
SELECT DRLOCGRP.LOCGRPCODE, DRLOCGRP.LOCGRPNAME, DRLOCGRP.LOWELEV,
DRLOCGRP.HIGHELEV, DRLOCGRP.ELEVUNITS, DRLOCGRP.STRATSECTION,
DRLOCGRP.MASTART, DRLOCGRP.MAEND
FROM DRLOCAT, DRLOCGRP
WHERE (DRLOCAT.LOCNO = PAGE) AND
(DRLOCGRP.LOCGRPCODE = DRLOCAT.LOCGRPCODE);
CURSOR C3 IS
SELECT DISTINCT DRTAXA.GENUSNAME, DRTAXA.SPECIESNAME, DRSPECIES.SPWEBPAGE
FROM DRTAXA, DRSPECIES
WHERE (DRTAXA.LOCNO = PAGE) AND
(DRSPECIES.GENUSNAME = DRTAXA.GENUSNAME) AND
(DRSPECIES.SPECIESNAME = DRTAXA.SPECIESNAME);
CURSOR C4 IS
SELECT DISTINCT LOCGRPCODE, LOCNO
FROM DRLOCAT;
X1 VARCHAR2 (100);
X2 VARCHAR2 (100);
X3 VARCHAR2 (100);
X4 VARCHAR2 (100);
X5 VARCHAR2 (100);
X6 VARCHAR2 (100);
X7 VARCHAR2 (100);
X8 VARCHAR2 (100);
X9 VARCHAR2 (100);
X10 VARCHAR2 (100);
X11 VARCHAR2 (100);
X12 VARCHAR2 (100);
X13 VARCHAR2 (100);
X14 VARCHAR2 (100);
X15 VARCHAR2 (100);
X16 VARCHAR2 (100);
X17 VARCHAR2 (100);
X18 VARCHAR2 (100);
X19 VARCHAR2 (100);
X20 VARCHAR2 (100);
BEGIN
HTP.HTMLOPEN;
HTP.TITLE('Dominican Republic '||PAGE||' Locality Page' );
HTP.P('<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#009191" VLINK="#551A8B"
ALINK="#00CACA">');
HTP.NL;
OPEN C1;
FETCH C1 INTO X1, X2, X3, X4, X5, X6, X7;
HTP.P('<B>Locality</B> = '||X1||'');
HTP.P(''||X2||', '||X3||' '||X4||', '||X5||' Formation, '||X6||', '||X7||'');
FETCH C1 INTO X1, X2, X3, X4, X5, X6, X7;
CLOSE C1;
HTP.PARAGRAPH;
OPEN C2;
FETCH C2 INTO X8, X9, X10, X11, X12, X13, X14, X15;
HTP.P('<B>Locality Group</B> = '||X8||', '||X9||', '||X10||'
- '||X11||' '||X12||', '||X13||', '||X14||' - '||X15||' Ma');
FETCH C2 INTO X8, X9, X10, X11, X12, X13, X14, X15;
CLOSE C2;
HTP.PARAGRAPH;
HTP.BOLD('Faunal List:');
HTP.OLISTOPEN;
OPEN C3;
FETCH C3 INTO X16, X17, X18;
WHILE C3% FOUND LOOP
HTP.ANCHOR('http://nmita.geology.uiowa.edu/database/corals/systemat/'||X18||'','<I>'||X16||'
'||X17||'</I>');
HTP.NL;
FETCH C3 INTO X16, X17, X18;
END LOOP;
CLOSE C3;
HTP.OLISTCLOSE;
HTP.BOLD('Localities within the '||X9||' section:');
HTP.OLISTOPEN;
OPEN C4;
FETCH C4 INTO X19, X20;
WHILE C4%FOUND LOOP
IF (X19 = X8) THEN
HTP.P(X20);
HTP.NL;
END IF;
FETCH C4 INTO X19, X20;
END LOOP;
CLOSE C4;
HTP.OLISTCLOSE;
HTP.BOLD('For the total fauna identified in section ' || HTF.ANCHOR('http://nmita.geology.uiowa.edu/localities/locgrp/'||X9||'.htm',''||X9||'
click here.'));
HTP.HTMLCLOSE;
END;
In the above form (LOCALITY_FORM) a link is made to the section in which the locality is found. The following code was produced to make the static pages to which the links refer to. By doing this the static pages can be produced quickly and accurately.
PROCEDURE LOCGRP AS
CURSOR C1 IS
SELECT DISTINCT LOCGRPCODE
FROM DRTAXA;
X1 VARCHAR2 (20);
BEGIN
HTP.HTMLOPEN;
HTP.P('<BODY BGCOLOR="WHITE">');
HTP.LINE;
HTP.FORMOPEN('LOCGRP_FORM');
HTP.PREOPEN;
OPEN C1;
FETCH C1 INTO X1;
HTP.FORMSELECTOPEN('Page', 'Select Location Group ID Number:');
WHILE C1%FOUND LOOP
HTP.NL;
HTP.FORMSELECTOPTION(X1);
FETCH C1 INTO X1;
END LOOP;
CLOSE C1;
HTP.FORMSELECTCLOSE;
HTP.PRECLOSE;
HTP.FORMRESET;
HTP.FORMSUBMIT;
HTP.FORMCLOSE;
HTP.LINE;
HTP.HTMLCLOSE;
END;
PROCEDURE LOCGRP_FORM(
PAGE VARCHAR2 := NULL) AS
CURSOR C1 IS
SELECT DRLOCGRP.LOCGRPCODE, DRLOCGRP.LOCGRPNAME, DRLOCGRP.LOWELEV,
DRLOCGRP.HIGHELEV, DRLOCGRP.ELEVUNITS, DRLOCGRP.STRATSECTION,
DRLOCGRP.MASTART, DRLOCGRP.MAEND
FROM DRLOCAT, DRLOCGRP
WHERE (DRLOCAT.LOCGRPCODE = PAGE) AND
(DRLOCGRP.LOCGRPCODE = DRLOCAT.LOCGRPCODE);
CURSOR C2 IS
SELECT DISTINCT LOCNO
FROM DRLOCAT
WHERE (LOCGRPCODE = PAGE);
CURSOR C3 IS
SELECT DISTINCT DRTAXA.GENUSNAME, DRTAXA.SPECIESNAME,
DRSPECIES.GENUSNAME, DRSPECIES.SPECIESNAME, DRSPECIES.SPWEBPAGE
FROM DRTAXA, DRSPECIES
WHERE (PAGE = DRTAXA.LOCGRPCODE) AND
(DRTAXA.GENUSNAME = DRSPECIES.GENUSNAME) AND
(DRTAXA.SPECIESNAME = DRSPECIES.SPECIESNAME);
X1 VARCHAR2(100);
X2 VARCHAR2(100);
X3 VARCHAR2(100);
X4 VARCHAR2(100);
X5 VARCHAR2(100);
X6 VARCHAR2(100);
X7 VARCHAR2(100);
X8 VARCHAR2(100);
X9 VARCHAR2(100);
X10 VARCHAR2(100);
X11 VARCHAR2(100);
X12 VARCHAR2(100);
X13 VARCHAR2(100);
X14 VARCHAR2(100);
BEGIN
HTP.HTMLOPEN;
HTP.TITLE('Dominican Republic '||PAGE||' Section Page' );
HTP.P('<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#009191" VLINK="#551A8B"
ALINK="#00CACA">');
HTP.HEADER(1,'<img SRC="nmitalog.gif"
HSPACE=6
VSPACE=3 BORDER=2 height=32 width=32 align=LEFT><b><font
size=+1><font color="#005EBB">
NMITA:</font><font color="#CA0065">N</font><font
color="#005EBB">eogene</font>
<font color="#CA0065">M</font><font color="#005EBB">arine
B</font><font color="#CA0065">i</font><font color="#005EBB">ota
of </font>
<font color="#CA0065">T</font><font color="#005EBB">ropical</font><font
color="#CA0065">
A</font><font color="#005EBB">merica</font></font></b>
');
HTP.NL;
HTP.LINE;
HTP.NL;
OPEN C1;
FETCH C1 INTO X1, X2, X3, X4, X5, X6, X7, X8;
HTP.P('<B>Locality Group</B> = '||X1||', '||X2||', '||X3||' -
'||X4||' '||X5||', '||X6||', '||X7||' - '||X8||' Ma');
CLOSE C1;
HTP.PARAGRAPH;
HTP.BOLD('Localities within the '||X2||' section:');
HTP.OLISTOPEN;
OPEN C2;
FETCH C2 INTO X9;
WHILE C2%FOUND LOOP
HTP.P(X9);
HTP.NL;
FETCH C2 INTO X9;
END LOOP;
CLOSE C2;
HTP.OLISTCLOSE;
HTP.PARAGRAPH;
HTP.BOLD('Total fauna identified in section '||X2||':');
HTP.OLISTOPEN;
OPEN C3;
FETCH C3 INTO X10, X11, X12, X13, X14;
WHILE C3%FOUND LOOP
HTP.ANCHOR('http://nmita.geology.uiowa.edu/database/corals/systemat/'||X14||'','<I>'||X12||'
'||X13||'</I>');
HTP.NL;
FETCH C3 INTO X10, X11, X12, X13, X14;
END LOOP;
CLOSE C3;
HTP.OLISTCLOSE;
HTP.NL;
HTP.LINE;
HTP.ULISTOPEN;
HTP.LISTITEM('<a href="">
NMITA homepage</a>');
HTP.LISTITEM('<a href="localities/rcgmcomp.html">Dominican
Republic map</a></b>');
HTP.ULISTCLOSE;
HTP.HTMLCLOSE;
END;