git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
136
Data/BulkLoad/EFT/Nominations/plsql/efno_sitemap.bdy
Normal file
136
Data/BulkLoad/EFT/Nominations/plsql/efno_sitemap.bdy
Normal file
@@ -0,0 +1,136 @@
|
||||
CREATE OR REPLACE PACKAGE BODY efno_sitemap IS
|
||||
--
|
||||
g_menu_level NUMBER := 1;
|
||||
--
|
||||
PROCEDURE startup IS
|
||||
--
|
||||
g_page_header VARCHAR2(100) := caco_utilities.get_module_text(2001);
|
||||
--
|
||||
PROCEDURE menuitem(p_module IN VARCHAR2
|
||||
,p_text IN VARCHAR2
|
||||
,p_level IN VARCHAR2 DEFAULT '1'
|
||||
,p_active IN VARCHAR2 DEFAULT 'inact') IS
|
||||
BEGIN
|
||||
--
|
||||
htp.p('<li><a href="' || p_module || '" class="' || 'sitemap' ||
|
||||
p_level || '">' || p_text || '</a>'); --</li>
|
||||
--
|
||||
END menuitem;
|
||||
--
|
||||
-- display the menu, calls itself recursively
|
||||
--
|
||||
PROCEDURE disp_menu(p_start IN system_options.syop_id%TYPE DEFAULT NULL
|
||||
,p_end IN system_options.syop_id%TYPE DEFAULT NULL
|
||||
,p_level IN NUMBER DEFAULT 1) IS
|
||||
--
|
||||
l_drill_id system_options.syop_id%TYPE;
|
||||
l_first_time BOOLEAN := TRUE;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
-- Get all the menu items for the current level
|
||||
--
|
||||
FOR i IN (SELECT so.syop_id_the_parent_of
|
||||
,so.syop_id
|
||||
,DECODE(so.module_name
|
||||
,NULL
|
||||
,'home?p_syop_id=' || so.syop_id
|
||||
,so.module_name) AS module_name
|
||||
,DECODE(so.mtxt_text_number, NULL, so.NAME, mtxt.text) AS name
|
||||
FROM system_options so
|
||||
,profile_options po
|
||||
,user_profiles up
|
||||
,module_text mtxt
|
||||
WHERE so.syop_id = po.syop_id
|
||||
AND so.mtxt_text_number = mtxt.text_number (+)
|
||||
AND mtxt.language (+) = caco_utilities.get_syus_lang
|
||||
AND po.sypr_id = up.sypr_id
|
||||
AND up.syus_id = caco_utilities.get_syus_id
|
||||
AND (so.syop_id_the_parent_of = p_start
|
||||
OR (p_start IS NULL AND
|
||||
so.syop_id_the_parent_of IS NULL))
|
||||
GROUP BY so.syop_id_the_parent_of
|
||||
,so.syop_id
|
||||
,DECODE(so.module_name
|
||||
,NULL
|
||||
,'home?p_syop_id=' || so.syop_id
|
||||
,so.module_name)
|
||||
,DECODE(so.mtxt_text_number, NULL, so.NAME, mtxt.text)
|
||||
,display_seq
|
||||
ORDER BY display_seq
|
||||
,so.syop_id) LOOP
|
||||
--
|
||||
IF p_level < g_menu_level THEN
|
||||
--
|
||||
htp.p('</ul>');
|
||||
--
|
||||
ELSIF p_level > g_menu_level THEN
|
||||
--
|
||||
htp.p('<ul>');
|
||||
--
|
||||
ELSE
|
||||
--
|
||||
htp.p('</li>');
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
g_menu_level := p_level;
|
||||
--
|
||||
menuitem(p_module => i.module_name
|
||||
,p_text => i.NAME
|
||||
,p_level => p_level);
|
||||
--
|
||||
disp_menu(p_start => i.syop_id
|
||||
,p_end => p_end
|
||||
,p_level => p_level + 1);
|
||||
--
|
||||
END LOOP;
|
||||
--
|
||||
END disp_menu;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
IF NOT caco_security.security_check(p_package_name => 'efno_sitemap.startup') THEN
|
||||
RETURN;
|
||||
END IF;
|
||||
--
|
||||
htp.p('<html xmlns="http://www.w3.org/1999/xhtml" lang="en-gb">');
|
||||
wsgl.openpagehead(g_page_header);
|
||||
htp.p('<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
|
||||
htp.p('<LINK REL=stylesheet HREF="caco_system.css?p_type=general" >');
|
||||
--
|
||||
-- caco_system.clock_js;
|
||||
--
|
||||
htp.p('<title>'||g_page_header||'</title>');
|
||||
wsgl.closepagehead;
|
||||
wsgl.openpagebody(FALSE);
|
||||
--
|
||||
htp.p(caco_system.menu);
|
||||
--
|
||||
wsgl.defaultpagecaption(g_page_header
|
||||
,1);
|
||||
--
|
||||
htp.p('<ul class="sitemaplevel1">');
|
||||
--
|
||||
IF caco_utilities.GET_SYUS_ID() <> caco_utilities.GET_SYSTEM_USER() THEN
|
||||
--
|
||||
disp_menu(NULL, NULL);
|
||||
--
|
||||
ELSE
|
||||
--
|
||||
menuitem( caco_system.dad_path || 'home?p_login_requested=Y'
|
||||
, 'Logon' );
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
htp.p('</ul>');
|
||||
--
|
||||
wsgl.closepagebody;
|
||||
--
|
||||
END startup;
|
||||
|
||||
BEGIN
|
||||
-- Initialization
|
||||
NULL;
|
||||
END efno_sitemap;
|
||||
/
|
||||
Reference in New Issue
Block a user