DBA Data[Home] [Help]

PACKAGE BODY: APPS.ICX_ADMIN_SIG

Source


1 package body icx_admin_sig as
2 /* $Header: ICXADSIB.pls 120.0 2005/10/07 12:08:52 gjimenez noship $ */
3 
4 procedure help_win_script (
5 defHlp in varchar2 default null,
6 language_code in varchar2 default null,
7 application_short_name in varchar2 default 'ICX') is
8 
9 v_language_code varchar2(30);
10 l_target        varchar2(240)  := defhlp;
11 l_url           varchar2(4000) := NULL;
12 l_session_id    number;
13 l_application_short_name  varchar2(30) := 'ICX';
14 l_target_type   varchar2(20) := 'TARGET';
15 
16 begin
17 
18 
19    /*
20    ** Get the default language if one has not been provided
21    */
22    if language_code is null then
23        v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
24    else
25        v_language_code := language_code;
26    end if;
27 
28    /*
29    ** If a help file has been passed in then try to get the
30    ** application short name which is required by fnd_web.help
31    ** If you can't find the application then ignore the file
32    ** and just show the default ICX help page.
33    */
34    if  application_short_name is null then
35 
36      /*
37      ** Get the the current session id
38      */
39      l_session_id := icx_sec.getID(icx_sec.PV_SESSION_ID);
40 
41      /*
42      ** Get the application short name from the function prefix
43      */
44      begin
45 
46      select ffunc.function_name
47      into   l_application_short_name
48      from   fnd_form_functions_vl ffunc,
49             icx_sessions icx
50      where  icx.session_id = l_session_id
51      and    icx.function_id = ffunc.function_id;
52 
53      exception
54      when no_data_found then
55         /*
56         ** If you can't find the application then ignore the file
57         ** and just show the default ICX help page.
58         */
59         l_application_short_name := 'ICX';
60      when others then
61         raise;
62      end;
63 
64       l_application_short_name :=
65             SUBSTR(l_application_short_name, 1,
66             INSTR(l_application_short_name , '_') - 1);
67 
68    else
69 
70        l_application_short_name := application_short_name;
71 
72    end if;
73 
74 
75    /*
76    ** If no target has been specified then get the default ICX Help window
77    */
78    if l_target is null then
79 
80       l_target := 'icxhlpad.htm';
81       l_target_type  := 'FILE';
82 
83    else
84 
85       /*
86       ** check to see if the target is a filename rather than a
87       ** target name.  If it is then strip off the prefix path
88       ** and just leave the filename
89       */
90       if (INSTR(l_target, '/OA_DOC/') > 0) then
91 
92          l_target_type := 'FILE';
93 
94          while (INSTR(l_target, '/') > 0) loop
95 
96             l_target := SUBSTR(l_target, INSTR(l_target, '/') + 1);
97 
98          end loop;
99 
100          /*
101          ** Strip off any parameters at the end of the filename
102          */
103          l_target := SUBSTR(l_target, 1, INSTR(l_target, '?') - 1);
104 
105       end if;
106 
107    end if;
108 
109    /*
110    ** Get the proper syntax for opening the help window
111    */
112    l_url := fnd_help.get_url(l_application_short_name, l_target,
113                              FALSE, l_target_type);
114 
115    /*
116    ** Create the link syntax
117    */
118    htp.p('function help_window(){
119 	     help_win = window.open("'||l_url||'", "help_win","resizable=yes,scrollbars=yes,toolbar=yes,width=600,height=500")}');
120 
121 end;
122 
123 --************************************************************************
124 --                  icx_fnd_help
125 --************************************************************************
126 
127 function icx_fnd_help ( defHlp           in varchar2 default null,
128                         p_application_id in number default 178) return varchar2 is
129 
130 l_url           varchar2(4000) := NULL;
131 l_target_type   varchar2(20) := 'TARGET';
132 l_application_short_name varchar2(50) := NULL;
133 
134 begin
135 
136   begin
137     select application_short_name
138       into l_application_short_name
139       from fnd_application
140      where application_id = p_application_id;
141   exception
142     when no_data_found then
143       /*
144       ** If you can't find the application then ignore the file
145       ** and just show the default ICX help page.
146       */
147       l_application_short_name := 'ICX';
148     when others then
149       raise;
150   end;
151 
152   l_url := fnd_help.get_url(l_application_short_name, defHlp,
153                              FALSE, l_target_type);
154 
155   return l_url;
156 
157 end icx_fnd_help;
158 
159 
160 --Return the proper syntax for generating the help_win javascript function
161 --but don't pipe it out to htp.  This is used by BIS in their reports.
162 function help_win_syntax (
163 defHlp in varchar2 default null,
164 language_code in varchar2 default null,
165 application_short_name in varchar2 default 'ICX') return VARCHAR2 is
166 
167 v_language_code varchar2(30);
168 l_target        varchar2(240)  := defhlp;
169 l_url           varchar2(4000) := NULL;
170 l_session_id    number;
171 l_application_short_name  varchar2(30) := 'ICX';
172 l_target_type   varchar2(20) := 'TARGET';
173 l_syntax        varchar2(32000) := NULL;
174 
175 begin
176 
177 
178    /*
179    ** Get the default language if one has not been provided
180    */
181    if language_code is null then
182        v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
183    else
184        v_language_code := language_code;
185    end if;
186 
187    /*
188    ** If a help file has been passed in then try to get the
189    ** application short name which is required by fnd_web.help
190    ** If you can't find the application then ignore the file
191    ** and just show the default ICX help page.
192    */
193    if  application_short_name is null then
194 
195      /*
196      ** Get the the current session id
197      */
198      l_session_id := icx_sec.getID(icx_sec.PV_SESSION_ID);
199 
200      /*
201      ** Get the application short name from the function prefix
202      */
203      begin
204 
205      select ffunc.function_name
206      into   l_application_short_name
207      from   fnd_form_functions_vl ffunc,
208             icx_sessions icx
209      where  icx.session_id = l_session_id
210      and    icx.function_id = ffunc.function_id;
211 
212      exception
213      when no_data_found then
214         /*
215         ** If you can't find the application then ignore the file
216         ** and just show the default ICX help page.
217         */
218         l_application_short_name := 'ICX';
219      when others then
220         raise;
221      end;
222 
223       l_application_short_name :=
224             SUBSTR(l_application_short_name, 1,
225             INSTR(l_application_short_name , '_') - 1);
226 
227    else
228 
229        l_application_short_name := application_short_name;
230 
231    end if;
232 
233 
234    /*
235    ** If no target has been specified then get the default ICX Help window
236    */
237    if l_target is null then
238 
239       l_target := 'icxhlpad.htm';
240       l_target_type  := 'FILE';
241 
242    else
243 
244       /*
245       ** check to see if the target is a filename rather than a
246       ** target name.  If it is then strip off the prefix path
247       ** and just leave the filename
248       */
249       if (INSTR(l_target, '/OA_DOC/') > 0) then
250 
251          l_target_type := 'FILE';
252 
253          while (INSTR(l_target, '/') > 0) loop
254 
255             l_target := SUBSTR(l_target, INSTR(l_target, '/') + 1);
256 
257          end loop;
258 
259          /*
260          ** Strip off any parameters at the end of the filename
261          */
262          l_target := SUBSTR(l_target, 1, INSTR(l_target, '?') - 1);
263 
264       end if;
265 
266    end if;
267 
268    /*
269    ** Get the proper syntax for opening the help window
270    */
271    l_url := fnd_help.get_url(l_application_short_name, l_target,
272                              FALSE, l_target_type);
273 
274    /*
275    ** Create the link syntax
276    */
277    l_syntax := 'function help_window(){
278 	     help_win = window.open("'||l_url||'", "help_win","resizable=yes,scrollbars=yes,toolbar=yes,width=600,height=500")}';
279 
280    return (l_syntax);
281 
282 end;
283 
284 function background (language_code in varchar2 default null) return varchar2 is
285 
286 v_language_code varchar2(30);
287 
288 begin
289 
290 /* remove this commented code if the dependent code works fine.
291    OA_MEDIA should no longer be made of language specific directories.
292 */
293 --if language_code is null then
294 --      v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
295 --  else
296 --    v_language_code := language_code;
297 --end if;
298     return '/OA_MEDIA/ICXBCKGR.jpg';
299 end;
300 
301 
302 procedure Openheader(defStatus in varchar2 default null, extraOnLoad in varchar2 default null, language_code in varchar2 default null) is
303 
304 v_oa_web varchar2(80);
305 -- v_language_code varchar2(30);
306 
307 begin
308 
309 /* remove this commented code if the dependent code works fine.
310    OA_MEDIA should no longer be made of language specific directories.
311    Also changed the calls to icx_admin_sig.background so v_language_code
312    is not passed as a parameter anymore.
313 */
314 --if language_code is null then
315 --      v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
316 --  else
317 --    v_language_code := language_code;
318 --end if;
319 
320     if defStatus is null then
321        fnd_message.set_name('ICX', 'ICX_OA_WEB');
322        v_oa_web := fnd_message.get;
323 
324 	if extraOnLoad is null then
325           htp.bodyOpen(icx_admin_sig.background,'onLoad="self.defaultStatus='''||v_oa_web||'''; return true"');
326         else
327             htp.bodyOpen(icx_admin_sig.background,'onLoad="self.defaultStatus='''||v_oa_web||'''; '||extraOnLoad||'; return true"');
328         end if;
329 
330      else
331 
332       if extraOnLoad is null then
333       htp.bodyOpen(icx_admin_sig.background,'onLoad="self.defaultStatus='''||defStatus||'''; return true"');
334       else
335       htp.bodyOpen(icx_admin_sig.background,'onLoad="self.defaultStatus='''||defStatus||'''; '||extraOnLoad||'; return true"');
336 
337       end if;
338       end if;
339 
340       htp.tableOpen('','','','','CELLSPACING=0 CELLPADDING=0');
341       htp.tableRowOpen('CENTER','BOTTOM');
342       htp.tableData(htf.img(curl => '/OA_MEDIA/FNDLOGOS.gif', cattributes => 'BORDER=0'),'CENTER','','','','','VALIGN="MIDDLE"');
343       htp.p('<TD WIDTH=1000></TD>');
344 
345 end;
346 
347 procedure Closeheader (language_code in varchar2 default null) is
348 
349 url	varchar2(240) := null;
350 c_title  varchar2(80);
351 c_prompts icx_util.g_prompts_table;
352 --v_language_code varchar2(30);
353 
354 begin
355 /* remove this commented code if the dependent code works fine.
356    OA_MEDIA should no longer be made of language specific directories.
357 */
358 --if language_code is null then
359 --      v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
360 --  else
361 --   v_language_code := language_code;
362 --end if;
363 
364 	icx_util.getprompts(601, 'ICX_HEADER', c_title, c_prompts);
365 	---htp.p('<td width=50></td>');
366 	 htp.tableData(htf.anchor('OracleApps.DMM',htf.img('/OA_MEDIA/FNDSMENU.gif',
367 		'CENTER',icx_util.replace_alt_quotes(c_prompts(3)),'','BORDER=0 WIDTH=55 HEIGHT=38'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(3))||''';return true"'));
368 
369 	 htp.tableData(htf.anchor('icx_admin_sig.Startover', htf.img('/OA_MEDIA/FNDSLOGF.gif',
370 		'CENTER',icx_util.replace_alt_quotes(c_prompts(4)),'','BORDER=0 WIDTH=55 HEIGHT=38'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(4))||''';return true"'));
371 
372             htp.tableData(htf.anchor('javascript:help_window()',htf.img('/OA_MEDIA/FNDSHELP.gif',
373 		'CENTER',icx_util.replace_alt_quotes(c_prompts(5)),'','BORDER=0 WIDTH=46 HEIGHT=38'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(5))||''';return true"'));
374     htp.tableRowClose;
375     htp.tableClose;
376     htp.line;
377 end;
378 
379 
380 procedure Closeheader2 (language_code in varchar2 default null) is
381 
382 url 	varchar2(240) := null;
383 c_title varchar2(80);
384 c_prompts icx_util.g_prompts_table;
385 
386 --v_language_code varchar2(30);
387 
388 begin
389 /* remove this commented code if the dependent code works fine.
390    OA_MEDIA should no longer be made of language specific directories.
391 */
392 --  if language_code is null then
393 --	v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
394 --  else
395 --   v_language_code := language_code;
396 --  end if;
397 
398 	icx_util.getprompts(601, 'ICX_HEADER', c_title, c_prompts);
399 
400         htp.tableData(htf.anchor('icx_admin_sig.Startover', htf.img('/OA_MEDIA/ICXTOP.gif',
401 		'CENTER',icx_util.replace_alt_quotes(c_prompts(4)),'','BORDER=0 WIDTH=55 HEIGHT=28'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(4))||''';return true"'));
402 
403             htp.tableData(htf.anchor('javascript:help_window()',htf.img('/OA_MEDIA/ICXHELP.gif',
404 		'CENTER',icx_util.replace_alt_quotes(c_prompts(5)),'','BORDER=0 WIDTH=46 HEIGHT=28'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(5))||''';return true"'));
405 
406 	htp.tableData(htf.img('/OA_MEDIA/ICXRIGHT.gif','','','','BORDER=0 HEIGHT=28 WIDTH=20'),'CENTER','','','','','VALIGN="MIDDLE"');
407 
408     htp.tableRowClose;
409     htp.tableClose;
410     htp.line;
411 end;
412 
413 procedure toolbar (language_code in varchar2 default null,
414 		   disp_find	 in varchar2 default null,
415 		   disp_mainmenu in varchar2 default 'Y',
416 		   disp_wizard   in varchar2 default 'N',
417 		   disp_help     in varchar2 default 'Y',
418 		   disp_export   in varchar2 default null,
419 		   disp_exit     in varchar2 default 'Y') is
420 
421 url 	varchar2(240) := null;
422 c_title varchar2(80);
423 c_prompts icx_util.g_prompts_table;
424 v_language_code varchar2(30);
425 
426 begin
427 
428 /* remove this commented code if the dependent code works fine.
429    OA_MEDIA should no longer be made of language specific directories.
430    Also changed the calls to icx_admin_sig.background so v_language_code
431    is not passed as a parameter anymore.
432 */
433 
434 --    if language_code is null then
435 --        v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
436 --    else
437 --        v_language_code := language_code;
438 --    end if;
439 
440     if substr(icx_sec.g_mode_code,1,3) = '115'
441     then
442         htp.p('<BODY BGCOLOR="#CCCCCC">');
443         icx_plug_utilities.toolbar(p_text => '',
444                        p_language_code => language_code,
445                        p_disp_find     => disp_find,
446                        p_disp_mainmenu => disp_mainmenu,
447                        p_disp_wizard   => disp_wizard,
448                        p_disp_help     => disp_help,
449                        p_disp_export   => disp_export,
450                        p_disp_exit     => disp_exit);
451     elsif icx_sec.g_mode_code = 'OBIS'
452     then
453         htp.p('<BODY>');
454         icx_plug_utilities.toolbar(p_text => '',
455                        p_language_code => language_code,
456                        p_disp_find     => disp_find,
457                        p_disp_mainmenu => disp_mainmenu,
458                        p_disp_wizard   => disp_wizard,
459                        p_disp_help     => disp_help,
460                        p_disp_export   => disp_export,
461                        p_disp_exit     => disp_exit);
462     else
463 
464     htp.bodyOpen(icx_admin_sig.background);
465 
466     htp.tableOpen('','','','','CELLSPACING=0 CELLPADDING=0 BORDER=0');
467 
468     htp.tableRowOpen('CENTER','BOTTOM');
469     htp.tableData(htf.img(curl => '/OA_MEDIA/FNDLOGOS.gif', cattributes => 'BORDER=0'),
470 		'CENTER','','','','','VALIGN="MIDDLE"');
471     htp.p('<TD WIDTH=1000></TD>');
472 
473     icx_util.getprompts(601, 'ICX_HEADER', c_title, c_prompts);
474 
475     htp.p('<TD>');
476 /*
477 ** inner table for icons
478 */
479     htp.tableOpen(cattributes => 'border=0 cellspacing=0 cellpadding=0');
480 
481     htp.tableRowOpen(calign => 'CENTER');
482 
483     if (disp_wizard = 'Y') then
484         htp.tableData(htf.anchor('javascript:doWizard()',
485 		htf.img('/OA_MEDIA/FNDSWZRD.gif','CENTER',
486 			icx_util.replace_alt_quotes(c_prompts(1)),'',
487 			'BORDER=0 '),'',
488 			'onMouseOver="window.status=''' ||
489 			icx_util.replace_onMouseOver_quotes(c_prompts(1))||
490 			''';return true"'));
491     end if;
492 
493     if (disp_export is not null) then
494         htp.p('<FORM ACTION="OracleON.csv" METHOD="POST" NAME="exportON">');
495         htp.formHidden('S',icx_call.encrypt2(disp_export));
496         htp.p('</FORM>');
497         htp.tableData(htf.anchor('javascript:document.exportON.submit()',
498                 htf.img('/OA_MEDIA/FNDSEXPT.gif','CENTER',
499                         icx_util.replace_alt_quotes(c_prompts(6)),'',
500                         'BORDER=0 '),'',
501                         'onMouseOver="window.status=''' ||
502                         icx_util.replace_onMouseOver_quotes(c_prompts(6))||
503                         ''';return true"'));
504     end if;
505 
506     if (disp_find is not null) then
507         htp.tableData(htf.anchor(disp_find,
508 		htf.img('/OA_MEDIA/FNDSFIND.gif','CENTER',
509 			icx_util.replace_alt_quotes(c_prompts(2)),'',
510 			'BORDER=0 '),'',
511 			'onMouseOver="window.status=''' ||
512 			icx_util.replace_onMouseOver_quotes(c_prompts(2))||
513 			''';return true"'));
514     end if;
515 
516     if (disp_wizard = 'Y' or disp_find is not null or disp_export is not null) then
517 	htp.p('<TD WIDTH=50></TD>');
518     end if;
519 
520     if (disp_mainmenu = 'Y' and icx_sec.g_mode_code <> 'SLAVE') then
521     	htp.tableData(htf.anchor('OracleApps.DMM',
522 		htf.img('/OA_MEDIA/FNDSMENU.gif','CENTER',
523 			icx_util.replace_alt_quotes(c_prompts(3)),'',
524 			'BORDER=0 '),'',
525 			'onMouseOver="window.status=''' ||
526 			icx_util.replace_onMouseOver_quotes(c_prompts(3))
527 			||''';return true" TARGET="_top"'));
528     end if;
529 
530     if (disp_exit = 'Y' and icx_sec.g_mode_code <> 'SLAVE') then
531         htp.tableData(htf.anchor('icx_admin_sig.Startover',
532 		htf.img('/OA_MEDIA/FNDSLOGF.gif','CENTER',
533 		        icx_util.replace_alt_quotes(c_prompts(4)),'','
534 		        BORDER=0 '),'','
535 		        onMouseOver="window.status=''' ||
536 		        icx_util.replace_onMouseOver_quotes(c_prompts(4)) ||
537 		        ''';return true"'));
538     end if;
539 
540     if (disp_help = 'Y') then
541         htp.tableData(htf.anchor('javascript:help_window()',
542 		htf.img('/OA_MEDIA/FNDSHELP.gif','CENTER',
543 			icx_util.replace_alt_quotes(c_prompts(5)),'',
544 			'BORDER=0 '),'',
545 			'onMouseOver="window.status=''' ||
546 			icx_util.replace_onMouseOver_quotes(c_prompts(5))||
547 			''';return true"'));
548     end if;
549 
550     htp.tableRowClose;
551 
552     htp.tableRowOpen(calign => 'CENTER', cvalign => 'TOP');
553 
554     if (disp_wizard = 'Y') then
555         htp.tableData(cvalue => htf.anchor(curl => 'javascript:doWizard()',
556 		      ctext => '<FONT SIZE=2 COLOR=#000000>'||c_prompts(1)||'</FONT>',
557 		      cattributes => 'onMouseOver="window.status=''' || icx_util.replace_onMouseOver_quotes(c_prompts(1))|| ''';return true"'),
558   		      calign=> 'CENTER');
559     end if;
560 
561     if (disp_export is not null) then
562         htp.tableData(cvalue => htf.anchor(curl => 'javascript:document.exportON.submit()',
563                       ctext => '<FONT SIZE=2 COLOR=#000000>'||c_prompts(6)||'</FONT>',
564                       cattributes => 'onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(6))||''';return true"'),
565                       calign=> 'CENTER');
566     end if;
567 
568     if (disp_find is not null) then
569         htp.tableData(cvalue => htf.anchor(curl => disp_find,
570 			    ctext => '<FONT SIZE=2 COLOR=#000000>'||
571 				     c_prompts(2) ||
572 				 '</FONT>',
573 			    cattributes => 'onMouseOver="window.status=''' || icx_util.replace_onMouseOver_quotes(c_prompts(2))|| ''';return true"'),
574 			    calign=> 'CENTER');
575     end if;
576 
577     if (disp_wizard = 'Y' or disp_find is not null or disp_export is not null) then
578         htp.p('<TD WIDTH=50></TD>');
579     end if;
580 
581     if (disp_mainmenu = 'Y' and icx_sec.g_mode_code <> 'SLAVE') then
582     	htp.tableData(cvalue => htf.anchor(curl => 'OracleApps.DMM',
583 			    ctext => '<FONT SIZE=2 COLOR=#000000>'||
584 				     c_prompts(3) ||
585 				 '</FONT>',
586 			    cattributes => 'onMouseOver="window.status=''' || icx_util.replace_onMouseOver_quotes(c_prompts(3))|| ''';return true" TARGET="_top"'),
587 			    calign=> 'CENTER');
588     end if;
589 
590     if (disp_exit = 'Y' and icx_sec.g_mode_code <> 'SLAVE') then
591         htp.tableData(cvalue => htf.anchor(curl => 'icx_admin_sig.Startover',
592 			    ctext => '<FONT SIZE=2 COLOR=#000000>'||
593 				     c_prompts(4)
594 					 || '</FONT>',
595 			    cattributes => 'onMouseOver="window.status=''' || icx_util.replace_onMouseOver_quotes(c_prompts(4))|| ''';return true" TARGET="_top"'),
596 			    calign=> 'CENTER');
597     end if;
598 
599     if (disp_help = 'Y') then
600         htp.tableData(cvalue => htf.anchor(curl => 'javascript:help_window()',
601 			    ctext => '<FONT SIZE=2 COLOR=#000000>'||
602 				     c_prompts(5)
603 					 || '</FONT>',
604 			    cattributes => 'onMouseOver="window.status=''' || icx_util.replace_onMouseOver_quotes(c_prompts(5))|| ''';return true"'),
605 			    calign=> 'CENTER');
606     end if;
607     htp.tableRowClose;
608 
609     htp.tableClose;
610     htp.p('</TD>');
611 /**
612 ** close outer row and table
613 */
614     htp.tableRowClose;
615     htp.tableClose;
616 
617     end if; -- 'OBIS'
618 
619 end toolbar;
620 
621 
622 procedure Startover (language_code in varchar2 default null)is
623 
624 l_url        varchar2(2000) := null;
625 /*
626 l_url1       varchar2(2000) := null;
627 l_url2       varchar2(2000) := null;
628 l_mode_code  varchar2(30);
629 l_session_id number;
630 l_defined    boolean;
631 l_login_id NUMBER; -- added for audits -- mputman
632 */
633 
634 begin
635 
636 -- 2802333 nlbarlow
637 l_url := fnd_sso_manager.getLogoutUrl;
638 
639 owa_util.mime_header('text/html', FALSE);
640 
641 owa_util.redirect_url(l_url);
642 
643 owa_util.http_header_close;
644 
645 /*
646         l_session_id := icx_sec.getsessioncookie;
647 -- bug 2335995 l_session_id is not null
648         if ((l_session_id is not null) and (l_session_id > -1))
649         then
650           update icx_sessions
651              set    disabled_flag = 'Y'
652              where  session_id = l_session_id;
653           commit;
654 
655           select HOME_URL, MODE_CODE, Login_id
656              into   l_url, l_mode_code, l_login_id
657              from   ICX_SESSIONS
658              where  SESSION_ID = l_session_id; -- mputman added (l_)login_id for call to fnd_signon.
659           IF l_login_id IS NOT NULL THEN
660              fnd_signon.audit_end(l_login_id); -- mputman added to end audit session and resps.
661           END IF;
662 
663         else
664           l_url := '';
665           l_mode_code := '';
666         end if;
667 
668         if l_mode_code = '115X'
669         then
670 
671           select HOME_URL
672           into   l_url1
673           from   ICX_PARAMETERS;
674 
675           fnd_profile.get_specific(name_z    => 'APPS_PORTAL',
676                                    val_z     => l_url2,
677                                    defined_z => l_defined );
678 
679           if l_url1 is null
680           then
681             l_url1 := wfa_html.conv_special_url_chars(l_url2);
682           else
683             l_url1 := wfa_html.conv_special_url_chars(l_url1);
684           end if;
685 
686           l_url := replace(l_url2,'home','wwsec_app_priv.logout?p_done_url='||l_url1);
687 
688         end if;
689 
690 	if l_url is null
691 	then
692 	    select HOME_URL
693 	    into   l_url
694 	    from   ICX_PARAMETERS;
695 	end if;
696         owa_util.mime_header('text/html', FALSE);
697 
698         icx_sec.sendsessioncookie(-1);
699 
700         owa_util.redirect_url(l_url);
701 
702         owa_util.http_header_close;
703 */
704 
705 end;
706 
707 procedure footer is
708 begin
709 /*
710     htp.address('Please send any questions or comments to '
711          ||htf.mailto('[email protected]','[email protected]'));
712 */
713     htp.bodyClose;
714     htp.htmlClose;
715 end;
716 
717 
718 procedure error_screen (title varchar2,
719                         language_code in varchar2 default null,
720 			api_msg_count in number default null,
721 			api_msg_data in varchar2 default null) is
722 
723 c_prompts icx_util.g_prompts_table;
724 c_title varchar2(80);
725 v_language_code varchar2(30);
726 
727 begin
728   -- add api messages to icx error page table
729   if api_msg_count is not null then
730     if api_msg_count = 1 then
731       fnd_message.set_encoded(api_msg_data);
732       icx_util.add_error(fnd_message.get);
733     else
734       for i in 1..api_msg_count loop
735 	fnd_message.set_encoded(fnd_msg_pub.Get);
736 	icx_util.add_error(fnd_message.get);
737       end loop;
738     end if;
739   end if;
740 
741   if language_code is null then
742     v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
743   else
744    v_language_code := language_code;
745   end if;
746     icx_util.getprompts(601, 'ICX_ERR_SCRN', c_title, c_prompts);
747     htp.htmlOpen;
748     htp.headOpen;
749 
750     icx_util.copyright;
751 
752 /*
753     htp.p('<SCRIPT LANGUAGE="JavaScript">');
754     htp.p('<!-- Hide from old browsers');
755 
756     icx_admin_sig.help_win_script('',v_language_code);
757 
758     htp.p('// -->');
759     htp.p('</SCRIPT>');
760 */
761 
762     htp.title(c_title);
763     htp.headClose;
764 
765     icx_admin_sig.toolbar(language_code => v_language_code,
766 			  disp_help => 'N');
767     icx_util.error_page_print;
768     htp.nl;
769     htp.tableOpen;
770     htp.tableRowOpen;
771     htp.tableData(htf.anchor('javascript:history.back()',htf.img('/OA_MEDIA/FNDBKFR.gif','',icx_util.replace_alt_quotes(c_prompts(1)),'',
772 	'BORDER=0 HEIGHT=30 WIDTH=30'),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(1))||''';return true"'));
773     htp.tableData(htf.anchor('javascript:history.back()',icx_util.replace_alt_quotes(c_prompts(2)),'','onMouseOver="window.status='''||icx_util.replace_onMouseOver_quotes(c_prompts(2))||''';return true"'));
774     htp.tableRowClose;
775     htp.tableClose;
776     htp.htmlClose;
777 
778 exception
779 	when others then
780 		htp.p(SQLERRM);
781 end;
782 
783 procedure showTable(p_table pp_table,
784 		    row_count in binary_integer default 0,
785                     col_num in binary_integer default 0,
786 		    p_border in binary_integer default 0,
787                     p_cellpadding in binary_integer default 0,
788 		    p_cellspacing in binary_integer default 0,
789 		    p_width in binary_integer default 0,
790 		    p_cell_width in binary_integer default 0,
791 		    p_indent in binary_integer default 0,
792 		    img in varchar2 default 'FNDIBLBL.gif' ) is
793 
794         row_num         binary_integer;
795         row_index       binary_integer;
796         counter         binary_integer;
797         remainder       binary_integer;
798         col_index       binary_integer;
799         real_counter    binary_integer;
800 	v_language_code varchar2(30);
801 
802 begin
803 
804     -- v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
805      real_counter := row_count;
806      row_num  := trunc((row_count/col_num))+1;
807      remainder := mod(row_count, col_num);
808 
809      htp.tableOpen('','','','','BORDER='||p_border || 'CELLPADDING='||
810                    p_cellpadding || 'CELLSPACING='||p_cellspacing);
811      row_index := 1;
812      col_index := 1;
813 
814      while row_index <= row_num loop
815 
816          col_index := 1;
817          counter := row_index;
818          htp.tableRowOpen;
819              while (counter <= row_count and col_index <= col_num and
820                     real_counter <> 0) loop
821 		if (p_cell_width = 0 and p_indent = 0)
822 		then
823 		      htp.tableData(p_table(counter));
824 		else  htp.p('<TD WIDTH='||p_indent||'></TD>');
825 		     htp.tableData('<image src="/OA_MEDIA/'||img||'">'||p_table(counter),'','','','','','WIDTH="'||p_cell_width||'"');
826 		end if;
827 		     htp.p('<TD width='||p_width||'></TD>');
828                 real_counter := real_counter-1 ;
829                     if col_index <= remainder then
830                        counter := counter + row_num;
831                     else
832                         counter := counter + (row_num-1);
833 
834                     end if;
835                     col_index := col_index+1;
836                 end loop;
837          htp.tableRowClose;
838          row_index := row_index+1;
839      end loop;
840      htp.tableClose;
841 end;
842 
843 
844 
845 procedure displayTable(wlcm_table pp_table,
846 		    row_count in binary_integer default 0,
847                     col_num in binary_integer default 0,
848 		    language_code in varchar2 default null,
849 		    img in varchar2 default 'FNDIGRBL.gif') is
850 
851         row_num         binary_integer;
852         row_index       binary_integer;
853         counter         binary_integer;
854         remainder       binary_integer;
855         col_index       binary_integer;
856         real_counter    binary_integer;
857 -- 	v_language_code varchar2(30);
858 
859 begin
860 
861 /* remove the following comments if code dependent on
862    language specific media directory works fine.
863 */
864 
865 --     if language_code is null then
866 --     v_language_code := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
867 --     else
868 --     v_language_code := language_code;
869 --     end if;
870 
871      real_counter := row_count;
872      row_num  := trunc((row_count/col_num))+1;
873      remainder := mod(row_count, col_num);
874      row_index := 1;
875      col_index := 1;
876 
877      while row_index <= row_num loop
878 
879          col_index := 1;
880          counter := row_index;
881          htp.tableRowOpen;
882 --	 htp.p('<TD WIDTH=10></TD>');
883              while (counter <= row_count and col_index <= col_num and
884                     real_counter <> 0) loop
885 		      htp.tableData('<image src="/OA_MEDIA/'  || img || '">','right');
886 		      htp.tableData(wlcm_table(counter), 'left');
887                     real_counter := real_counter-1 ;
888                     if col_index <= remainder then
889                        counter := counter + row_num;
890                     else
891                         counter := counter + (row_num-1);
892 
893                     end if;
894                     col_index := col_index+1;
895                 end loop;
896          htp.tableRowClose;
897          row_index := row_index+1;
898      end loop;
899 end;
900 end icx_admin_sig;