DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_HTML_UTILITIES_PVT

Source


1 PACKAGE BODY BIS_HTML_UTILITIES_PVT AS
2 /* $Header: BISVHTMB.pls 115.35 2002/11/19 22:29:54 kiprabha noship $ */
3 ---  Copyright (c) 1998 Oracle Corporation, Redwood Shores, CA, USA
4 ---  All rights reserved.
5 ---
6 ---  FILENAME
7 ---
8 ---    BISVHTMB.pls
9 ---
10 ---  DESCRIPTION
11 ---
12 ---      Package to generate html banner in the PMF forms
13 ---
14 ---  NOTES
15 ---
16 ---  HISTORY
17 ---
18 ---    04-JSN-1999 ANSINGHA Created
19 ---
20 ---   24 AUG 2000 GSANAP Modified the Build_Html_Banner procedure to
21 ---               display the new ui
22 ---
23 ---   28-SEP-2000 Walid.Nasrallah fixed iHelp call by removing quotation mark
24 ---
25 ---   05-OCT-2000 Walid.Nasrallah Modified location of style file
26 ---
27 ---   16-OCT-2000 Added comments to help prevent future confusion
28 ---
29 ---   31-MAY-2001 New ICX Profile for OA_HTML, OA_MEDIA
30 ---		  There are duplicate routines here that already exist in BIS_REPORT_UTIL_PVT
31 ---		  Updated these as well.
32 ---===========================================================================
33 
34 
35 ---===========================================================================
36 --- **************
37 --- There are 10 different versions of this procedure which need to be
38 --- rationalizd.
39 --- 1) has 2 IN  VARCHAR2 agruments.        Calls version 5 and
40 ---                                         sends output to web server via htp.p.
41 ---
42 --- 2) has 3 IN  VARCHAR2 agruments and
43 ---        1 OUT VARCHAR2 agrument.         Calls version 4.
44 ---
45 --- 3) has 5 IN  VARCHAR2 arguments and
46 ---        1 OUT VARCHAR2 agrument.         Calls version 4.
47 ---
48 --- 4) has 3 IN  VARCHAR2 agruments and
49 ---        2 IN  BOOL     agruments and
50 ---        1 OUT VARCHAR2 agrument.         Calls version 5.
51 ---
52 --- 5) has 5 IN  VARCHAR2 agruments and
53 ---        2 IN  BOOL     agruments and
54 ---        1 OUT VARCHAR2 agrument.         Builds html code and puts it in the OUT.
55 ---
56 --- 6) has 2 IN  VARCHAR2 agruments and
57 ---        1 IN  BOOL     agrument.         Inserts iHelp javascript and
58 ---                                         Calls version 8 and
59 ---                                         sends output to web server via htp.p.
60 ---
61 --- 7) has 3 IN  VARCHAR2 agruments and
62 ---        1 IN  BOOL     agruments and
63 ---        1 OUT VARCHAR2 agrument.         Calls version 9.
64 ---
65 ---
66 --- 8) has 5 IN  VARCHAR2 agruments and
67 ---        3 IN  BOOL     agruments and
68 ---        1 OUT VARCHAR2 agrument.         Builds html code (with regular help not iHelp)
69 ---                                         and puts in in the OUT argument.
70 ---
71 --- 9) has 3 IN  VARCHAR2 agruments and
72 ---        3 IN  BOOL     agruments and
73 ---        1 OUT VARCHAR2 agrument.         Inserts INCOMPLETE iHelp call and
74 ---                                         Calls version 8.
75 ---
76 ---10) has 5 IN  VARCHAR2 agruments and
77 ---        1 IN  BOOL     agruments and
78 ---        1 OUT VARCHAR2 agrument.         Pads missing arguments with "FALSE" and
79 ---                                         Calls version 8.
80 ---
81 ---===========================================================================
82 PROCEDURE build_html_banner    ------------------ VERSION 1 (definition of)
83 ( title                 IN  VARCHAR2,
84   help_target           IN  VARCHAR2
85   )
86   is
87      nls_language_code    varchar2(2000);
88      icx_report_images    varchar2(2000);
89      HTML_banner          varchar2(32000);
90 begin
91    nls_language_code := Get_NLS_Language;
92    icx_report_images := Get_Images_Server;
93 
94    --- --- --- This part used to call the ICX banner builder.
95 ---   icx_plug_utilities.toolbar(
96 ---			        p_text => title
97 ---			      , p_disp_help => 'Y'
98 ---			      , p_disp_exit => 'Y'
99 ---			      );
100   --- --- ---
101    Build_HTML_Banner (icx_report_images      -------------- VERSION 5 (call to)
102 		      , help_target
103 		      , nls_language_code
104 		      , title
105 		      , ''
106 		      , FALSE
107 		      , FALSE
108 		      , HTML_Banner
109 		      );
110      htp.p(HTML_Banner);
111 
112 end Build_HTML_Banner;
113 
114 
115 PROCEDURE build_html_banner  ------------- VERSION 2 (definition of)
116 ( rdf_filename  IN  VARCHAR2,
117   title         IN  VARCHAR2,
118   menu_link     IN  VARCHAR2,
119   HTML_Banner   OUT NOCOPY VARCHAR2
120 )
121 is
122 begin
123   Build_HTML_Banner( rdf_filename  ----------------- VERSION 4 (call to)
124                    , title
125                    , menu_link
126                    , FALSE
127                    , FALSE
128                    , HTML_Banner
129                    );
130 end Build_HTML_Banner;
131 
132 PROCEDURE Build_HTML_Banner
133   (icx_report_images     IN  VARCHAR2,  ------- VERSION 3 (defintion of)
134    more_info_directory   IN  VARCHAR2,
135    nls_language_code     IN  VARCHAR2,
136    title                 IN  VARCHAR2,
137    menu_link             IN  VARCHAR2,
138    HTML_Banner           OUT NOCOPY VARCHAR2)
139 is
140 begin
141 
142   Build_HTML_Banner( icx_report_images      ------ VERSION 5 (call to)
143                    , more_info_directory
144                    , nls_language_code
145                    , title
146                    , menu_link
147                    , FALSE
148                    , FALSE
149                    , HTML_Banner
150                    );
151 
152 end Build_HTML_Banner;
153 
154 PROCEDURE build_html_banner                   -------- VERSION 4 (definition of)
155 ( rdf_filename          IN  VARCHAR2,
156   title           IN  VARCHAR2,
157   menu_link           IN  VARCHAR2,
158   related_reports_exist IN  BOOLEAN,
159   parameter_page        IN  BOOLEAN,
160   HTML_Banner           OUT NOCOPY VARCHAR2
161 )
162 is
163 icx_report_images    varchar2(2000);
164 more_info_directory  varchar2(2000);
165 nls_language_code    varchar2(2000);
166 begin
167 
168   icx_report_images := Get_Images_Server;
169   nls_language_code := Get_NLS_Language;
170 
171   Build_HTML_Banner( icx_report_images             ------------ VERSION 5 (call to)
172                    , rdf_filename
173                    , nls_language_code
174                    , title
175                    , menu_link
176                    , related_reports_exist
177                    , parameter_page
178                    , HTML_Banner
179                    );
180 
181 end Build_HTML_Banner;
182 
183 ------------------------------------------------------------------------
184 --- Procedure : Build_HTML_Banner    (Version 5)                      --
185 ---                                                                   --
186 --- parameters : icx_report_images   Images directory                 --
187 ---              more_info_directory more info                        --
188 ---              nls_language_code   language                         --
189 ---              title               report title                     --
190 ---              menu_link           return menu link                 --
191 ---              related_reports_exist shows if related reports exist --
192 ---              parameter_page      shows if it is a parameters page --
193 ---              HTML_BANNER         out string                       --
194 ---                                                                   --
195 --- GSANAP 15-AUG-2000   Modified the procedure to include the new UI --
196 ------------------------------------------------------------------------
197 
198 PROCEDURE build_html_banner   ------------ VERSION 5 (definition of)
199   (icx_report_images     IN  VARCHAR2,
200    more_info_directory   IN  VARCHAR2,
201    nls_language_code     IN  VARCHAR2,
202    title           IN  VARCHAR2,
203    menu_link           IN  VARCHAR2,
204    related_reports_exist IN  BOOLEAN,
205    parameter_page        IN  BOOLEAN,
206    HTML_Banner           OUT NOCOPY VARCHAR2
207    )
208 
209   IS
210       Related_Alt           VARCHAR2(80);
211       Menu_Alt              VARCHAR2(80);
212       Home_Alt              VARCHAR2(80);
213       Help_Alt              VARCHAR2(80);
214 
215    Return_Alt             VARCHAR2(1000);
216    Parameters_Alt         VARCHAR2(1000);
217    NewMenu_Alt            VARCHAR2(80);
218    NewHelp_Alt            VARCHAR2(80);
219    Return_Description     VARCHAR2(1000);
220    Parameters_Description VARCHAR2(1000);
221    NewMenu_Description    VARCHAR2(80);
222    NewHelp_Description    VARCHAR2(80);
223 
224    Related_Description   VARCHAR2(80);
225    Home_Description      VARCHAR2(80);
226    Menu_Description      VARCHAR2(80);
227    Help_Description      VARCHAR2(80);
228    Image_Directory       VARCHAR2(250);
229    Home_page             VARCHAR2(2000);
230    Menu_Padding          NUMBER(5);
231    Home_URL              VARCHAR2(200);
232    Plsql_Agent           VARCHAR2(100);
233    Host_File             VARCHAR2(80);
234    l_profile             VARCHAR2(2000);
235    l_section_header      VARCHAR2(1000);
236 
237    l_css                 VARCHAR2(1000);
238    CSSDirectory          VARCHAR2(1000);
239    l_HTML_HEADER         VARCHAR2(2000);
240    l_HTML_body           VARCHAR2(2000);
241    l_ampersand           VARCHAR2(20):=' ';
242 
243    Parampage_Alt	 VARCHAR2(32000);
244    Parampage_Description VARCHAR2(32000);
245 BEGIN
246 
247      Get_Translated_Icon_Text ('RELATED', Related_Alt, Related_Description);
248      Get_Translated_Icon_Text ('MENU', Menu_Alt, Menu_Description);
249      Get_Translated_Icon_Text ('HOME', Home_Alt, Home_Description);
250      Get_Translated_Icon_Text ('HELP', Help_Alt, Help_Description);
251      Get_Translated_Icon_Text ('PARAMPAGE', Parampage_Alt, Parampage_Description);
252 
253      Get_Translated_Icon_Text ('RETURNTOPORTAL', Return_Alt, Return_Description);
254      Get_Translated_Icon_Text ('PARAMETERS', Parameters_Alt, Parameters_Description);
255      Get_Translated_Icon_Text ('NEWHELP', NewHelp_Alt, NewHelp_Description);
256      Get_Translated_Icon_Text ('NEWMENU', NewMenu_Alt, NewMenu_Description);
257 
258      -- mdamle 05/31/2001 - New ICX Profile for OA_HTML, OA_MEDIA
259      -- l_css := FND_PROFILE.value('ICX_OA_HTML');
260      -- CSSDirectory  := '/' || FND_WEB_CONFIG.TRAIL_SLASH(l_css);
261 	CSSDirectory  := BIS_REPORT_UTIL_PVT.get_html_server;
262 
263      -- mdamle 05/31/2001 - New ICX Profile for OA_HTML, OA_MEDIA
264      -- Image_Directory :=  FND_WEB_CONFIG.TRAIL_SLASH(ICX_REPORT_IMAGES);
265      Image_Directory :=  BIS_REPORT_UTIL_PVT.get_Images_Server;
266      Home_URL := BIS_REPORT_UTIL_PVT.Get_Home_URL;
267      l_section_header := FND_MESSAGE.GET_STRING('BIS','BIS_SPECIFY_PARAMS');
268 
269       l_HTML_Header :=
270 	  '<head>
271        <!- Banner by BISVRUTB.pls V 5 ->
272        <title>' || title || '</title>
273 	<LINK REL="stylesheet" HREF="'
274 	||CSSDirectory
275 	||'bismarli.css">
276 	 <SCRIPT LANGUAGE="JavaScript">'
277    ||
278 	 icx_admin_sig.help_win_syntax(
279 				       more_info_directory
280 				       , NULL
281 				       , 'BIS')
282    ||
283    '
284 	 </SCRIPT>
285 	 </HEAD>
286 	';
287 
288     l_HTML_Body := '<body bgColor="#ffffff" link="#663300" vlink="#996633" alink="#FF6600" text="#000000">';
289 
290 	HTML_Banner := l_HTML_Header||l_HTML_Body ;
291 
292 
293      IF (Parameter_Page) THEN
294         HTML_Banner := HTML_Banner ||
295 '<form method=post action="_action_">
296 <input name="hidden_run_parameters" type=hidden value="_hidden_">
297 <CENTEnR><P>
298 ';
299      END IF;
300 
301      HTML_Banner := HTML_Banner ||
302     '<!- Banner V 5 part 2 ->
303      <table border=0 cellspacing=0 cellpadding=0 width=100%>
304      <tr><td rowspan=2 valign=bottom width=371>
305      <table border=0 cellspacing=0 cellpadding=0 width=100%>
306      <tr align=left><td height=30><img src=' || Image_Directory || 'bisorcl.gif border=no height=23
307 width=141></a></td>
308      <tr align=left> <td valign=bottom><img src=' || Image_Directory || 'biscollg.gif border=no></a></td></td></tr>
309      </table>
310      </td>';
311 
312      IF (NOT Parameter_page) AND (Related_Reports_Exist)
313      THEN
314 	  menu_padding := 1050;
315      ELSE
316 	  menu_padding := 1000;
317      END IF;
318 
319      IF (NOT Parameter_Page) AND (Related_Reports_Exist) THEN
320         Menu_Padding := 50;
321      ELSE
322         Menu_Padding := 1000;
323      END IF;
324 
325      IF (NOT Parameter_Page) THEN
326          Menu_Padding := 50;
327      ELSE
328         Menu_Padding := 1000;
329      END IF;
330 
331    IF (NOT Parameter_Page)
332      AND (Related_Reports_Exist)
333    Then menu_padding := 50;
334    END IF;
335 
336 -- MENU
337 
338     HTML_Banner := HTML_Banner ||
339       '<td colspan=2 rowspan=2 valign=bottom align=right>
340       <table border=0 cellpadding=0 align=right cellspacing=4>
341         <tr valign=bottom>
342           <td width=60 align=center><a href='||menu_link||'Oraclemypage.home onMouseOver="window.status=''' || return_description || '''; return true">
343 <img alt='||Return_Alt||' src='||Image_Directory||'bisrtrnp.gif width=32 border=0 height=32></a></td>
344           <td width=60 align=center><a href=' ||menu_link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || NewMenu_description || '''; return true">
345 <img alt='||NewMenu_Alt||' src='||Image_Directory||'bisnmenu.gif width=32 border=0 height=32></a></td>
346           <td width=60 align=center valign=bottom><a href="javascript:help_window()", onMouseOver="window.status=''' || NewHelp_description || '''; return true">
347 <img alt='||NewHelp_Alt||' src='||Image_Directory||'bisnhelp.gif width=32 border=0 height=32></a></td>
348         </tr>
349         <tr align=center valign=top>
350           <td width=60><a href='||menu_link||'Oraclemypage.home onMouseOver="window.status=''' || return_description || '''; return true">
351 <span class="OraGlobalButtonText">'||return_description||'</span></a></td>
352           <td width=60><a href='||menu_link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || NewMenu_description || '''; return true">
353 <span class="OraGlobalButtonText">'||NewMenu_description||'</span></a></td>
354           <td width=60><a href="javascript:help_window()",  onMouseOver="window.status=''' || Newhelp_description || '''; return true">
355 <span class="OraGlobalButtonText">'||NewHelp_description||'</span></a></td>
356         </tr></table>
357     </td>
358     </tr></table>
359    </table>';
360 
361     HTML_Banner := HTML_Banner ||
362 '<table Border=0 cellpadding=0 cellspacing=0 width=100%>
363   <tbody>
364   <tr><td bgcolor=#ffffff colspan=3 height=1><img height=1 src='||Image_Directory||'bisspace.gif width=1></td>
365   </tr>
366   <tr>
367     <td bgcolor=#31659c colspan=2 height=21><img border=0 height=21 src='||Image_Directory||'bisspace.gif width=1></td>
368     <td bgcolor=#31659c  height=21><font face="Arial, Helvetica, sans-serif" size="4" color="#ffffff">'||l_ampersand||'</font></td>
369     <td background='||Image_Directory||'bisrhshd.gif height=21 width=5><img border=0 height=1
370 src='||Image_Directory||'bisspace.gif width=1></td>
371   </tr>
372   <tr>
373     <td bgcolor=#31659c height=16 width=9><img border=0 height=1 src='||Image_Directory||'bisspace.gif width=9></td>
374     <td bgcolor=#31659c height=16 width=5><img border=0 height=1 src='||Image_Directory||'bisspace.gif width=5></td>
375     <td background='||Image_Directory||'bisbot.gif width=1000><img align=top height=16
376 src='||Image_Directory||'bistopar.gif width=26></td>
377     <td align=left valign=top width=5><img height=8 src='||Image_Directory||'bisrend.gif width=8></td>
378   </tr>
379   <tr>
380     <td align=left background='||Image_Directory||'bisbot.gif height=8 valign=top width=9><img height=8
381 src='||Image_Directory||'bislend.gif width=10></td>
382     <td background='||Image_Directory||'bisbot.gif height=8 width=5><img border=0 height=1
386   </tr>
383 src='||Image_Directory||'bisspace.gif width=1></td>
384     <td align=left valign=top width=1000><img height=8 src='||Image_Directory||'bisarchc.gif width=9></td>
385     <td width=5></td>
387   </tbody>
388 </table>';
389 
390 
391    IF (NOT Parameter_Page) THEN
392     HTML_Banner := HTML_Banner ||
393 '<table width=100% border=0 cellspacing=0 cellpadding=15>
394 <tr><td><table width=100% border=0 cellspacing=0 cellpadding=0>
395         <tr><td class="OraHeader"><font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||title||'</font></td></tr>
396         <tr bgcolor="#CCCC99"><td height=1><img src='||Image_Directory||'bisspace.gif width=1 height=1></td></tr>
397         </table>
398 </td></tr>
399 </table>';
400 
401    ELSE
402     HTML_Banner := HTML_Banner ||
403 '<table width=100% border=0 cellspacing=0 cellpadding=15>
404 <tr><td><table width=100% border=0 cellspacing=0 cellpadding=0>
405         <tr><td class="OraHeader"><font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||title||'</font></td></tr>
406         <tr bgcolor="#CCCC99"><td height=1><img src='||Image_Directory||'bisspace.gif width=1 height=1></td></tr>
407         <tr><td><font face="Arial, Helvetica, sans-serif" size="2">'||l_section_header||'</font></td></tr>
408         </table>
409 </td></tr>
410 </table>';
411    END IF;
412 
413 END Build_HTML_Banner;
414 
415 
416 
417 --- PROCEDURE Build_More_Info_Directory (rdf_filename       IN  VARCHAR2,
418 ---                                      NLS_Language_Code  IN  VARCHAR2,
419 ---                                      Help_Directory     OUT NOCOPY VARCHAR2) IS
420 --- BEGIN
421 ---
422 ---    Help_Directory := FND_PROFILE.value('HELP_BASE_URL');
423 ---
424 ---    Help_Directory := Help_Directory || '/' || NLS_Language_Code || '/' || 'bis' || '/' ||
425 ---                      rdf_filename || '/' || rdf_filename || '.htm';
426 ---
427 --- END;
428 ---
429  PROCEDURE Get_Translated_Icon_Text (Icon_Code        IN  VARCHAR2,
430                                      Icon_Meaning     OUT NOCOPY VARCHAR2,
431                                      Icon_Description OUT NOCOPY VARCHAR2) IS
432  BEGIN
433 
434       SELECT meaning,
435              description
436       INTO   Icon_Meaning,
437              Icon_Description
438       FROM   FND_LOOKUPS
439       WHERE  lookup_code = Icon_Code
440       AND    lookup_type = 'HTML_NAVIGATION_ICONS';
441 
442  EXCEPTION
443       WHEN NO_DATA_FOUND THEN
444            Icon_Meaning     := Icon_Code;
445            Icon_Description := Icon_Code;
446       WHEN OTHERS THEN
447            Icon_Meaning     := Icon_Code;
448            Icon_Description := Icon_Code;
449  END;
450 
451 --------------------------------------------------------------------------------------
452 --                                                                                  --
453 --  Procedure:    Get_Images_Server                                                 --
454 --                                                                                  --
455 --  Description:  Gets the directory structure for all the images used within the   --
456 --                BIS reports.                                                      --
457 --                                                                                  --
458 --  Parameters:   ICX_Report_Images      Directory structure for images             --
459 --                                       (This is a profile option)                 --
460 --                                                                                  --
461 --  Modification History                                                            --
462 --  Date       User Id          Modification                                        --
463 --  Apr 98     cclyde/bhooker   Initial creation                                    --
464 --------------------------------------------------------------------------------------
465 FUNCTION Get_Images_Server RETURN VARCHAR2 IS
466    l_Icx_Report_Images	VARCHAR2(240);
467    result 		boolean;
468 BEGIN
469 	-- mdamle 05/31/01 - New Profile for OA_HTML, OA_MEDIA
470 	-- l_Icx_Report_Images := FND_PROFILE.value('ICX_REPORT_IMAGES');
471 
472 	if icx_sec.g_oa_media is null then
473 		result := icx_sec.validateSession;
474 	end if;
475 
476 	if instr(icx_sec.g_oa_media, 'http:') > 0 then
477 		l_Icx_Report_Images := FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_media);
478 	else
479 		l_Icx_Report_Images := FND_WEB_CONFIG.WEB_SERVER ||   FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_media);
480 	end if;
481 
482         RETURN(l_Icx_Report_Images);
483 
484 
485 END;
486 
487 
488 --------------------------------------------------------------------------------------
489 --                                                                                  --
490 --  Procedure:    Get_NLS_Language                                                  --
491 --                                                                                  --
492 --  Description:  Gets the language code being used by the user.  This determines   --
493 --                the directory structure within a translated environment.          --
494 --                                                                                  --
495 --  Parameters:   NLS_Language_Code    Language being used by the user              --
496 --                                                                                  --
500 --------------------------------------------------------------------------------------
497 --  Modification History                                                            --
498 --  Date       User Id          Modification                                        --
499 --  Apr 98     cclyde/bhooker   Initial creation                                    --
501 FUNCTION Get_NLS_Language RETURN VARCHAR2 IS
502   NLS_LANGUAGE_CODE    VARCHAR2(4);
503 BEGIN
504 
505   SELECT l.language_code
506   INTO   NLS_LANGUAGE_CODE
507   FROM   fnd_languages l,
508          nls_session_parameters p
509   WHERE  p.parameter = 'NLS_LANGUAGE'
510   AND    p.value = l.nls_language;
511 
512   RETURN (NLS_LANGUAGE_CODE);
513 
514 END Get_NLS_Language;
515 
516 
517 --------------------------------------------------------------------------------------
518 --                                                                                  --
519 --  Procedure:    Get_Image_File_Structure                                          --
520 --                                                                                  --
521 --  Description:  Builds the directory structure and file name for each navigation  --
522 --                image.                                                            --
523 --                                                                                  --
524 --  Parameters:   icx_report_images      Directory structure for images             --
525 --                nls_language_code      Language directory for images              --
526 --                rel_rpts_image         Related Reports button image (incl Dir)    --
527 --                back_image             Back button image (incl Directory)         --
528 --                home_image             Home button image (incl Directory)         --
529 --                report_image           Reports link image (incl Directory)        --
530 --                                                                                  --
531 --  Modification History                                                            --
532 --  Date       User Id          Modification                                        --
533 --  Apr 98     cclyde/bhooker   Initial creation                                    --
534 --------------------------------------------------------------------------------------
535 PROCEDURE Get_Image_file_structure (icx_report_images IN  VARCHAR2,
536                                     nls_language_code IN  VARCHAR2,
537                                     report_image      OUT NOCOPY VARCHAR2) IS
538 BEGIN
539 
540   REPORT_IMAGE   := ICX_REPORT_IMAGES || '/' || NLS_LANGUAGE_CODE || '/bisrelrp.gif' ;
541 
542 END Get_Image_file_structure;
543 
544 
545 -- Overlapping procedures that produce Bar with two icons
546 
547 PROCEDURE build_html_banner  --------------------  VERSION 6
548 ( title                 IN  VARCHAR2,
549   help_target           IN  VARCHAR2,
550   icon_show             IN  BOOLEAN
551   )
552   is
553      nls_language_code    varchar2(2000);
554      icx_report_images    varchar2(2000);
555      HTML_banner          varchar2(32000);
556 begin
557    nls_language_code := Get_NLS_Language;
558    icx_report_images := Get_Images_Server;
559 
560    htp.p('<SCRIPT LANGUAGE="JavaScript">');
561    ---
562     icx_admin_sig.help_win_script(help_target||'TOP', NULL , 'BIS');
563    --- HACK TO circumvent target slection withing a help file:
564    --- icx_admin_sig.help_win_script('/OA_DOC/' || help_target ||'?', nls_language_code, 'BIS');
565    htp.p('</SCRIPT>');
566 
567    --- --- --- This part used to call the ICX banner builder.
568 ---   icx_plug_utilities.toolbar(
569 ---			        p_text => title
570 ---			      , p_disp_help => 'Y'
571 ---			      , p_disp_exit => 'Y'
572 ---			      );
573   --- --- ---
574    Build_HTML_Banner (icx_report_images ----------- VERSION 8 (call to )
575 		      , '"javascript:help_window()"'
576 		      , nls_language_code
577 		      , title
578 		      , ''
579 		      , FALSE
580 		      , FALSE
581               , icon_show
582 		      , HTML_Banner
583 		      );
584      htp.p(HTML_Banner);
585 
586 end Build_HTML_Banner;
587 
588 PROCEDURE Build_HTML_Banner
589 ( rdf_filename  IN  VARCHAR2,
590   title         IN  VARCHAR2,
591   menu_link     IN  VARCHAR2,
592   icon_show     IN  BOOLEAN,
593   HTML_Banner   OUT NOCOPY VARCHAR2
594 )
595 is
596 begin
597   Build_HTML_Banner( rdf_filename
598                    , title
599                    , menu_link
600                    , FALSE
601                    , FALSE
602                    , icon_show
603                    , HTML_Banner
604                    );
605 end Build_HTML_Banner;
606 
607 
608 
609 -----------------------------------------------------------------------
610 -- GSANAP 15-AUG-2000   Modified the procedure to include the new UI --
611 -----------------------------------------------------------------------
612 PROCEDURE build_html_banner    ---------- VERSION 8 (definition of)
613   (icx_report_images     IN  VARCHAR2,
614    more_info_directory   IN  VARCHAR2,
615    nls_language_code     IN  VARCHAR2,
616    title                 IN  VARCHAR2,
617    menu_link             IN  VARCHAR2,
618    related_reports_exist IN  BOOLEAN,
619    parameter_page        IN  BOOLEAN,
620    icon_show             IN  BOOLEAN,
624 
621    HTML_Banner           OUT NOCOPY VARCHAR2
622    )
623   IS
625    Return_Alt             VARCHAR2(1000);
626    Parameters_Alt         VARCHAR2(1000);
627    NewMenu_Alt            VARCHAR2(80);
628    NewHelp_Alt            VARCHAR2(80);
629    Return_Description     VARCHAR2(1000);
630    Parameters_Description VARCHAR2(1000);
631    NewMenu_Description    VARCHAR2(80);
632    NewHelp_Description    VARCHAR2(80);
633 
634    Related_Alt           VARCHAR2(80);
635    Menu_Alt              VARCHAR2(80);
636    Home_Alt              VARCHAR2(80);
637    Help_Alt              VARCHAR2(80);
638    Related_Description   VARCHAR2(80);
639    Home_Description      VARCHAR2(80);
640    Menu_Description      VARCHAR2(80);
641    Help_Description      VARCHAR2(80);
642    Image_Directory       VARCHAR2(250);
643    Home_page             VARCHAR2(2000);
644    Menu_Padding          NUMBER(5);
645    Home_URL              VARCHAR2(200);
646    Plsql_Agent           VARCHAR2(100);
647    Host_File             VARCHAR2(80);
648    l_profile             VARCHAR2(2000);
649    l_ampersand         VARCHAR2(20):=' ';
650 
651 BEGIN
652 
653      Get_Translated_Icon_Text ('RELATED', Related_Alt, Related_Description);
654      Get_Translated_Icon_Text ('MENU', Menu_Alt, Menu_Description);
655      Get_Translated_Icon_Text ('HOME', Home_Alt, Home_Description);
656      Get_Translated_Icon_Text ('HELP', Help_Alt, Help_Description);
657 
658      Get_Translated_Icon_Text ('RETURNTOPORTAL', Return_Alt, Return_Description);
659      Get_Translated_Icon_Text ('PARAMETERS', Parameters_Alt, Parameters_Description);
660      Get_Translated_Icon_Text ('NEWHELP', NewHelp_Alt, NewHelp_Description);
661      Get_Translated_Icon_Text ('NEWMENU', NewMenu_Alt, NewMenu_Description);
662 
663 
664      Image_Directory :=  FND_WEB_CONFIG.TRAIL_SLASH(ICX_REPORT_IMAGES);
665      Home_URL := BIS_REPORT_UTIL_PVT.Get_Home_URL;
666 
667      HTML_Banner := '';
668 
669      IF (Parameter_Page) THEN
670         HTML_Banner := HTML_Banner ||
671 '<form method=post action="_action_">
672 <input name="hidden_run_parameters" type=hidden value="_hidden_">
673 <CENTER><P>
674 ';
675      END IF;
676 
677 /*
678      HTML_Banner := HTML_Banner ||
679 '<!- Banner - by BISVHTMB.pls V 8 **>
680 <table border=0 cellspacing=0 cellpadding=0 width=101%>
681 <tr><td rowspan=4 bgcolor=#336699><font size=+3>&'||'nbsp&'||'nbsp;</td>
682     <td bgcolor=#336699 nowrap><B><font face="Arial" point-size=18 color=#FFFFFF>' || TITLE || '</FONT></B></td>
683 ';
684 
685 
686      IF (NOT Parameter_Page) AND (Related_Reports_Exist) THEN
687         HTML_Banner := HTML_Banner ||
688 '   <td rowspan=4 width=1000 bgcolor=#336699 align=right><A HREF="#related_reports" onMouseOver="window.status=''' || Related_Description || '''; return true">
689           <img src=' || Image_Directory || 'bisrelat.gif border=no alt="' || Related_Alt || '" height=26 width=28></a></td>
690 ';
691         Menu_Padding := 50;
692      ELSE
693         Menu_Padding := 1000;
694      END IF;
695      IF (icon_show) THEN
696     HTML_Banner := HTML_Banner ||'    <td rowspan=4 width=' || Menu_Padding || ' bgcolor=#336699 align=right><a href=' || Menu_link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || Menu_Description || '''; return true">
697           <img src=' || Image_Directory || 'bisnmenu.gif border=no alt="' || Menu_Alt || '" height=26
698 width=28></a></td>';
699      else
700     HTML_Banner := HTML_Banner ||'    <td rowspan=4 width=' || Menu_Padding || ' bgcolor=#336699 align=right><font color=#336699 > dummy </font></td>';
701      END IF;
702     HTML_Banner := HTML_Banner || ' <td rowspan=4 width=50 bgcolor=#336699 align=right><a href='|| Home_URL ||' onMouseOver="window.status=''' || Home_Description || '''; return true">
703           <img src=' || Image_Directory || 'bisrtrnp.gif border=no alt="' || Home_Alt || '" height=26
704 width=28></a></td>
705     <td rowspan=4 width=50 bgcolor=#336699 align=center><a href=' || More_Info_Directory || '; onMouseOver="window.status=''' || Help_Description || '''; return true">
706           <img src=' || Image_Directory || 'bisnhelp.gif border=no alt="' || Help_Alt || '" height=26
707 width=28></a></td>';
708 
709 
710 --    HTML_Banner := HTML_Banner ||
711 --      '    <td rowspan=4 width=' ||
712 --      Menu_Padding || ' bgcolor=#336699 align=right><a href='||
713 --      Menu_link || 'OracleNavigate.Responsibility onMouseOver="window.status='''||
714 --      Menu_Description || '''; return true">
715 --      <img src=' ||
716 --      Image_Directory || 'bisnmenu.gif border=no alt="' ||
717 --      Menu_Alt || '" height=26 width=28></a></td>
718 --      <td rowspan=4 width=50 bgcolor=#336699 align=right><a href='||
719 --      Home_URL ||' onMouseOver="window.status='''||
720 --      Home_Description || '''; return true">
721 --      <img src=' ||
722 --      Image_Directory || 'FNDHOME.gif border=no alt="' ||
723 --      Home_Alt || '" height=26 width=28></a></td>
724 --      <td rowspan=4 width=50 bgcolor=#336699 align=right><a href="' ||
725 --      More_Info_Directory || '" TARGET="_blank" onMouseOver="window.status=''' ||
726 --      Help_Description || '''; return true">
727 --      <img src=' ||
728 --      Image_Directory || 'bisnhelp.gif border=no alt="' ||
729 --      Help_Alt || '" height=26 width=28></a></td>
730 --';
731 
732 
733      HTML_Banner := HTML_Banner ||
737 */
734 '<td bgcolor=#336699 rowspan=4><img src=' || Image_Directory || 'bisapplo.gif width=108 height=38></td>
735 </table>
736 ';
738 
739      HTML_Banner := HTML_Banner ||
740      '<table border=0 cellspacing=0 cellpadding=0 width=100%>'||
741      '<tr><td rowspan=2 valign=bottom width=371>'||
742      '<table border=0 cellspacing=0 cellpadding=0 width=100%>'||
743      '<tr align=left><td height=30><img src=' || Image_Directory || 'bisorcl.gif border=no height=23
744 width=141></a></td>'||
745      '<tr align=left> <td valign=bottom><img src=' || Image_Directory || 'biscollg.gif border=no></a></td></td></tr>'||
746      '</table>'||
747      '</td>';
748 
749      IF (NOT Parameter_Page) AND (Related_Reports_Exist) THEN
750         Menu_Padding := 50;
751      ELSE
752         Menu_Padding := 1000;
753      END IF;
754 -- MENU
755 
756 
757     HTML_Banner := HTML_Banner || '<font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||title||' </font>' ||
758     '<table width=100% border=0 cellspacing=0 cellpadding=15>'||
759     '<tr><td>'||
760       '<table width=100% border=0 cellspacing=0 cellpadding=0>'||
761         '<tr bgcolor="#CCCC99">'||
762          '<td height=1><img src='||Image_Directory||'bisspace.gif width=1 height=1></td></tr>'||
763       '</table>'||
764       '</td></tr></table>';
765 
766     HTML_Banner := HTML_Banner ||
767       '<tr>'||
768       '<td colspan=2 rowspan=2 valign=bottom align=right>' ||
769       '<table border=0 cellpadding=0 align=right cellspacing=4>' ||
770         '<tr valign=bottom>' ;
771     HTML_Banner := HTML_Banner ||
772           '<td width=60 align=center> <a href='||menu_Link||'Oraclemypage.home onMouseOver="window.status=''' || Return_Description || '''; return true">';
773     HTML_Banner := HTML_Banner ||
774 '<img alt='||Return_Alt||' src='||Image_Directory||'bisrtrnp.gif width=32 border=0 height="32"></a></td>';
775 
776     HTML_Banner := HTML_Banner ||
777           '<td width=60 align=center>'||
778           '<a href=' || menu_Link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' ||
779 NewMenu_Description || '''; return true"><img alt='||NewMenu_Alt||' src='||Image_Directory||'bisnmenu.gif
780 width="32" border=0 height=32></a></td>'; --          '<td width=60 align=center>'||
781 --          '<a href="' || menu_Link || '"onMouseOver="window.status=''' || Parameters_Description || '''; return true"><img alt='||Parameters_Alt||' src='||Image_Directory||'parameters_but.gif width="32" border=0 height=32></a></td>'||
782 
783    HTML_Banner := HTML_Banner ||
784           '<td width=60 align=center valign=bottom><a href="javascript:help_window()",  onMouseOver="window.status=''' || NewHelp_Description || '''; return true">';
785    HTML_Banner := HTML_Banner ||
786 '<img alt='||NewHelp_Alt||' src='||Image_Directory||'bisnhelp.gif border=0  width =32 height=32></a></td>'||
787         '</tr>';
788 
789    HTML_Banner := HTML_Banner ||
790         '<tr align=center valign=top>'||
791           '<td width=60><a href='||menu_Link||'Oraclemypage.home onMouseOver="window.status=''' || Return_Description || '''; return true"><font size="2" face="Arial, Helvetica, sans-serif">Return to Portal</font></a></td>';
792 
793     HTML_Banner := HTML_Banner ||
794           '<td width=60>'||
795           '<a href=' || menu_Link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || NewMenu_Description || '''; return true"><font face="Arial, Helvetica, sans-serif" size="2">Menu</font></a></td>';
796 --          '<td width=60>'||
797 --          '<a href="' || menu_Link || '"onMouseOver="window.status=''' || Parameters_Description || '''; return true"><font face="Arial, Helvetica, sans-serif" size="2">Parameters</font></a></td>'||
798 
799     HTML_Banner := HTML_Banner ||
800           '<td width=60><a href="javascript:help_window()",  onMouseOver="window.status=''' || NewHelp_Description || '''; return true"><font face="Arial, Helvetica, sans-serif" size="2">Help</font></a></td>'||
801         '</tr></table>'||
802        '</td>'||
803        '</tr></table>'||
804     '</td></tr>'||
805    '</table>';
806 
807     HTML_Banner := HTML_Banner ||
808 '<table Border=0 cellpadding=0 cellspacing=0 width=100%>'||
809   '<tbody>'||
810   '<tr><td bgcolor=#ffffff colspan=3 height=1><img height=1 src='||Image_Directory||'bisspace.gif width=1></td>'||
811   '</tr>'||
812   '<tr>';
813 
814     HTML_Banner := HTML_Banner ||
815     '<td bgcolor=#31659c colspan=2 height=21><img border=0 height=21 src='||Image_Directory||'bisspace.gif width=1></td>'||
816     '<td bgcolor=#31659c  height=21><font face="Arial, Helvetica, sans-serif" size="4" color="#ffffff">'||l_ampersand||'</font></td>';
817 
818     HTML_Banner := HTML_Banner ||
819     '<td background='||Image_Directory||'bisrhshd.gif height=21 width=5><img border=0 height=1
820 src='||Image_Directory||'bisspace.gif width=1></td>'||
821   '</tr>';
822 
823     HTML_Banner := HTML_Banner ||
824   '<tr>'||
825     '<td bgcolor=#31659c height=16 width=9><img border=0 height=1 src='||Image_Directory||'bisspace.gif width=9></td>'||
826     '<td bgcolor=#31659c height=16 width=5><img border=0 height=1 src='||Image_Directory||'bisspace.gif width=5></td>';
827 
828     HTML_Banner := HTML_Banner ||
829     '<td background='||Image_Directory||'bisbot.gif width=1000><img align=top height=16
830 src='||Image_Directory||'bistopar.gif width=26></td>'||
831     '<td align=left valign=top width=5><img height=8 src='||Image_Directory||'bisrend.gif width=8></td>'||
832   '</tr>';
833 
837 src='||Image_Directory||'bislend.gif width=10></td>'||
834     HTML_Banner := HTML_Banner ||
835   '<tr>'||
836     '<td align=left background='||Image_Directory||'bisbot.gif height=8 valign=top width=9><img height=8
838     '<td background='||Image_Directory||'bisbot.gif height=8 width=5><img border=0 height=1
839 src='||Image_Directory||'bisspace.gif width=1></td>';
840 
841     HTML_Banner := HTML_Banner ||
842     '<td align=left valign=top width=1000><img height=8 src='||Image_Directory||'bisarchc.gif width=9></td>'||
843     '<td width=5></td>'||
844   '</tr>'||
845   '</tbody>'||
846 '</table>';
847 
848     HTML_Banner := HTML_Banner||'<br>'|| l_ampersand||l_ampersand||l_ampersand||l_ampersand||'<font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||title||' </font>' ||
849     '<table width=100% border=0 cellspacing=0 cellpadding=0>'||
850     '<tr><td>';
851 
852     HTML_Banner := HTML_Banner ||
853       '<table width=100% border=0 cellspacing=0 cellpadding=0>'||
854         '<tr bgcolor="#CCCC99">'||
855          '<td height=1><img src='||Image_Directory||'bisspace.gif width=1 height=1></td></tr>'||
856       '</table>'||
857       '</td></tr></table>';
858 
859 END Build_HTML_Banner;
860 
861 
862 ----------------------------------
863 --- ************************** ---
864 --- This version is buggy      ---
865 --- because it build a call to ---
866 --- iHelp without defining the ---
867 --- javascript funciton for it ---
868 --- ************************** ---
869 ----------------------------------
870 
871 PROCEDURE build_html_banner   ---- VERSION 9 (definition of)
872 ( rdf_filename          IN  VARCHAR2,
873   title           IN  VARCHAR2,
874   menu_link           IN  VARCHAR2,
875   related_reports_exist IN  BOOLEAN,
876   parameter_page        IN  BOOLEAN,
877   icon_show             IN  BOOLEAN,
878   HTML_Banner           OUT NOCOPY VARCHAR2
879 )
880 is
881 icx_report_images    varchar2(2000);
882 more_info_directory  varchar2(2000);
883 nls_language_code    varchar2(2000);
884 begin
885 
886   icx_report_images := Get_Images_Server;
887   nls_language_code := Get_NLS_Language;
888 
889   Build_HTML_Banner( icx_report_images     -------- VERSION 8 (Call to)
890                    , 'javascript:help_window()'
891                    , nls_language_code
892                    , title
893                    , menu_link
894                    , related_reports_exist
895                    , parameter_page
896                    , icon_show
897                    , HTML_Banner
898                    );
899 
900 end Build_HTML_Banner;
901 
902 
903 PROCEDURE build_html_banner           ---------VERSION 10 (definition of)
904   (icx_report_images     IN  VARCHAR2,
905    more_info_directory   IN  VARCHAR2,
906    nls_language_code     IN  VARCHAR2,
907    title                 IN  VARCHAR2,
908    menu_link             IN  VARCHAR2,
909    icon_show             IN BOOLEAN,
910    HTML_Banner           OUT NOCOPY VARCHAR2)
911 is
912 begin
913 
914   Build_HTML_Banner( icx_report_images    ----        VERSION 8 (call TO)
915                    , more_info_directory
916                    , nls_language_code
917                    , title
918                    , menu_link
919                    , FALSE
920                    , FALSE
921                    , icon_show
922                    , HTML_Banner
923                    );
924 
925 end Build_HTML_Banner;
926 
927 
928 
929 -- End of overlapping procedures
930 
931 END BIS_HTML_UTILITIES_PVT;