git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
236
Data/BulkLoad/EFT/Nominations/plsql/home.prc
Normal file
236
Data/BulkLoad/EFT/Nominations/plsql/home.prc
Normal file
@@ -0,0 +1,236 @@
|
||||
CREATE OR REPLACE PROCEDURE home( p_syop_id IN VARCHAR2 DEFAULT NULL
|
||||
, p_username IN VARCHAR2 DEFAULT NULL
|
||||
, p_password IN VARCHAR2 DEFAULT NULL
|
||||
, p_action IN VARCHAR2 DEFAULT NULL
|
||||
) IS
|
||||
--
|
||||
-- Application home page
|
||||
--
|
||||
g_header CONSTANT VARCHAR2(160) := '$Header: $';
|
||||
g_revision CONSTANT VARCHAR2(160) := '$Revision: $';
|
||||
--
|
||||
v_first_row BOOLEAN := TRUE;
|
||||
--
|
||||
v_logged_in BOOLEAN;
|
||||
l_cookie owa_cookie.cookie;
|
||||
--
|
||||
FUNCTION breadcrumb (p_syop_id system_options.syop_id%TYPE) RETURN VARCHAR2 IS
|
||||
--
|
||||
v_parent_syop_id system_options.syop_id_the_parent_of%TYPE;
|
||||
v_name system_options.NAME%TYPE;
|
||||
v_return VARCHAR2(4000);
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
SELECT syop_id_the_parent_of
|
||||
,DECODE(syop.mtxt_text_number, NULL, syop.name, caco_utilities.get_module_text(syop.mtxt_text_number) ) AS NAME
|
||||
INTO v_parent_syop_id
|
||||
,v_name
|
||||
FROM system_options syop
|
||||
WHERE syop_id = p_syop_id;
|
||||
--
|
||||
IF v_parent_syop_id IS NULL THEN
|
||||
v_return := htf.anchor(curl => 'home', ctext => 'Home') ||'>'|| htf.anchor(curl => 'home?p_syop_id='||p_syop_id, ctext => v_name);
|
||||
ELSE
|
||||
v_return := breadcrumb(v_parent_syop_id) || '>' || htf.anchor(curl => '#', ctext => v_name);
|
||||
END IF;
|
||||
--
|
||||
RETURN v_return;
|
||||
--
|
||||
EXCEPTION
|
||||
WHEN no_data_found THEN
|
||||
RETURN(NULL);
|
||||
END breadcrumb;
|
||||
--
|
||||
FUNCTION user_logged_in RETURN BOOLEAN IS
|
||||
--
|
||||
l_return BOOLEAN := FALSE;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
IF caco_utilities.get_syus_id <> caco_utilities.get_system_user THEN
|
||||
--
|
||||
l_return := TRUE;
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
RETURN l_return;
|
||||
--
|
||||
END user_logged_in;
|
||||
--
|
||||
PROCEDURE html_header IS
|
||||
BEGIN
|
||||
--
|
||||
htp.p('<html>');
|
||||
htp.comment(ctext => 'Copyright 2009 GL Industrial Services');
|
||||
--
|
||||
END html_header;
|
||||
--
|
||||
PROCEDURE html_footer IS
|
||||
BEGIN
|
||||
--
|
||||
htp.p('</ul>');
|
||||
htp.p('</div>');
|
||||
htp.p('</body>');
|
||||
htp.p('</html>');
|
||||
--
|
||||
END html_footer;
|
||||
--
|
||||
PROCEDURE show_logon_form IS
|
||||
BEGIN
|
||||
--
|
||||
-- Output opening tags
|
||||
--
|
||||
html_header;
|
||||
--
|
||||
-- Not logged in, lets just do without the menu
|
||||
--
|
||||
IF p_username IS NOT NULL THEN
|
||||
--
|
||||
caco_security.process_logon(p_username => p_username
|
||||
,p_password => p_password
|
||||
,h_href => 'home'
|
||||
,p_login_button => 'Login'
|
||||
);
|
||||
END IF;
|
||||
--
|
||||
htp.p('<head id="ctl00_Head1"><title>E.ON F<>ldg<64>z Trade Zrt - Login</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">');
|
||||
htp.p(' <link rel="stylesheet" type="text/css" href="caco_system.eon_css" media="all"/>');
|
||||
htp.p('<div>
|
||||
<a id="ScreenReaderNavigation"></a>
|
||||
<ul class="NurScreenReader">
|
||||
</ul>
|
||||
</div>');
|
||||
|
||||
htp.p('
|
||||
<div id="ContainerSeitenkopfInhalt">
|
||||
<a id="Seitenanfang"></a>
|
||||
<div id="ContainerLogo" style="width: 216px; height: 49px;">
|
||||
<a href="http://www.eon-foldgaz-trade.com" title="E.ON Földgáz Trade Homepage"><img id="imgLogo" src="docs/logo_eft.gif" alt="Logo of E.ON F<>ldg<64>z Trade Zrt" style="width: 216px;
|
||||
|
||||
height: 49px;"></a>
|
||||
</div>
|
||||
<a id="ServiceNavigation"></a>
|
||||
<ul class="ServiceNav">
|
||||
</ul>
|
||||
<br style="clear: right;">
|
||||
<ul class="ServiceNav">
|
||||
|
||||
</ul>
|
||||
<a id="TopNavigation"></a>
|
||||
<ul id="TopNavLevel1">
|
||||
</ul>
|
||||
|
||||
</div>');
|
||||
|
||||
v_logged_in := caco_security.security_check('home');
|
||||
|
||||
htp.p('<div id="ContainerFooter">
|
||||
<div id="ContainerFooterOben">
|
||||
</div>
|
||||
<div id="ContainerFooterUnten">
|
||||
<p id="FooterCopyright">E.ON F<>ldg<64>z Trade Zrt.</p>
|
||||
<ul id="FooterNavRechts">
|
||||
<li><a href='''||caco_system.dad_path||'efno_disclaimer.display'' title="Disclaimer">Disclaimer</a></li>
|
||||
<li><a href="http://www.eon-foldgaz-trade.com/cps/rde/xchg/SID-3F57EEEE-1363C636/eon-foldgaz-trade/hs.xsl/2350.htm" title="Privacy policy">Privacy policy</a></li>
|
||||
<li><a href="http://www.eon-foldgaz-trade.com/cps/rde/xchg/SID-3F57EEEE-1363C636/eon-foldgaz-trade/hs.xsl/2348.htm" title="Imprint">Imprint</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>');
|
||||
--
|
||||
END show_logon_form;
|
||||
--
|
||||
BEGIN
|
||||
--
|
||||
-- Look for client certificate
|
||||
--
|
||||
IF NOT user_logged_in THEN
|
||||
--
|
||||
-- Not logged in
|
||||
--
|
||||
IF owa_util.get_cgi_env('SSL_CLIENT_CERT') IS NOT NULL THEN
|
||||
--
|
||||
-- have a client certificate, process client certificate logon
|
||||
--
|
||||
caco_security.process_certificate_logon;
|
||||
--
|
||||
IF NOT user_logged_in THEN
|
||||
--
|
||||
show_logon_form;
|
||||
--
|
||||
ELSE
|
||||
--
|
||||
-- User authenticated, show the home page
|
||||
--
|
||||
home;
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
ELSE
|
||||
--
|
||||
-- No certificate
|
||||
--
|
||||
show_logon_form;
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
ELSE
|
||||
--
|
||||
-- Logged in, now call standard stuff
|
||||
--
|
||||
html_header;
|
||||
htp.p('<head>');
|
||||
htp.p('<link rel="stylesheet" href="caco_system.css?p_type=general" />');
|
||||
--
|
||||
htp.p('<title>'||caco_utilities.get_system_name||'</title>');
|
||||
--
|
||||
htp.p('</head>');
|
||||
htp.p('<body>');
|
||||
--
|
||||
BEGIN
|
||||
htp.print(caco_system.menu(p_syop_id => p_syop_id));
|
||||
EXCEPTION
|
||||
WHEN OTHERS THEN
|
||||
htp.print('Unable to generate menu - error ' || SQLERRM);
|
||||
END;
|
||||
--
|
||||
htp.p('<div id="breadcrumb">');
|
||||
--
|
||||
IF p_syop_id IS NOT NULL THEN
|
||||
--
|
||||
-- Only if the user has access to this submenu
|
||||
--
|
||||
htp.p(htf.header(nsize => 1
|
||||
,cheader => breadcrumb(p_syop_id)));
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
htp.p('</div>'); --breadcrumb
|
||||
--
|
||||
-- Homepage image
|
||||
--
|
||||
lihp_home_page.homepage_showimage;
|
||||
--
|
||||
-- Print out the hotlinks
|
||||
--
|
||||
lihp_home_page.hotlinks;
|
||||
--
|
||||
-- Print out Messages
|
||||
--
|
||||
lihp_home_page.bulletins;
|
||||
--
|
||||
-- Edit homepage links
|
||||
--
|
||||
lihp_home_page.edit_homepage;
|
||||
--
|
||||
htp.p('</div>');
|
||||
--
|
||||
END IF;
|
||||
--
|
||||
html_footer;
|
||||
--
|
||||
END home;
|
||||
/
|
||||
Reference in New Issue
Block a user