create or replace package wow is type web_page is table of varchar2(255) index by binary_integer; procedure sig; procedure sig(cname in varchar2); procedure get_page ( thepage out web_page, irows in out integer ); wowgif varchar2(255) := '/demo/images/carrier_logo.gif'; end; --
/ create or replace package body wow is --

invocations integer := 0; last_timing number := NULL; procedure sig is begin htp.line; htp.p('This page is generated at '|| to_char(sysdate,'Dy, mm/dd/yy hh24:mi') || ' EST from ' || htf.url('http://naos.npac.syr.edu:1963/', 'NPAC Oracle Server')||''); end; --

procedure sig(cname in varchar2) is begin sig; htp.url('/cgi-bin/wow/wow.showsource?cname=' || cname, 'Inspect pl/sql source code'); end; --

procedure get_page ( thepage out web_page, irows in out integer ) is rc integer := 0; j integer; k integer := 1; begin if invocations = 0 and upper(wowgif) != 'NONE' then --thepage(1):=''||htf.gif(wowgif); thepage(1):=''; --thepage(1):=''; invocations := 1; k := 2; end if; for j in k..irows loop dbms_output.get_line(thepage(j),rc); if rc = 1 then irows := j-1; exit; end if; end loop; exception when others then raise_application_error(-20001,'wow.get_page() error ' || to_char(sqlcode)); end; --

end; / show error; /