-- ************************************************************************************ -- -- This file is: /tmp_mnt/export/projects/kyk20/roman/httpd/kayak/db/telehealth.sql -- -- Jiangang Guo, Last updated: September 1995 -- -- ************************************************************************************ -- ------- specification part for package TELEHEALTH -------------- create or replace package telehealth is type web_page is table of varchar2(255) index by binary_integer; procedure set_page_format; procedure sig; procedure sig(cname in varchar2); procedure get_page ( thepage out web_page, irows in out integer ); procedure get_page1 ( thepage out web_page, irows in out integer ); procedure showsource(cname in varchar2); wowgif varchar2(255) := '/images/telehealth.gif'; end; --
invocations integer := 0; ------- procedure set_page_format creates a menu bar on top of each web page ---- ------- procedure set_page_format also sets up the color format of each web page ---- procedure set_page_format is begin htp.p('
'); -- htp.p('procedure sig(cname in varchar2) is begin sig; htp.anchor('/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.img(wowgif); 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; --
procedure get_page1 ( 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.img(wowgif); -- 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; --
procedure showsource(cname in varchar2) is cursor c1 (a varchar2) is select text from user_source where name=upper(a) order by type, line; begin htp.htitle('Source code for ' || cname); htp.preOpen; for e in c1 (cname)loop htp.p(translate(e.text,chr(10) || chr(13),' ')); end loop; htp.preClose; sig('WOW'); end; --
end; / show errors; /