<%
/* ---------------------------------------------------------------------------------------- */
/* Copyright [2009] [System & Method Technologies]                                          */
/*                                                                                          */
/* Licensed under the Apache License, Version 2.0 (the "License");                          */
/* you may not use this file except in compliance with the License.                         */
/* You may obtain a copy of the License at                                                  */
/*                                                                                          */
/*     http://www.apache.org/licenses/LICENSE-2.0                                           */
/*                                                                                          */
/* Unless required by applicable law or agreed to in writing, software                      */
/* distributed under the License is distributed on an "AS IS" BASIS,                        */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                 */
/* See the License for the specific language governing permissions and                      */
/* limitations under the License.                                                           */
/* ---------------------------------------------------------------------------------------- */
/*                                                                                          */
/* This program can be used as a basic template for loading application specific menus      */
/*                                                                                          */
/*                                                                                          */
/* Project . . . : IceBreak                                                                 */
/* Design  . . . : Niels Liisberg                                                           */
/* Function  . . : simple demo menu driver                                                  */
/*                                                                                          */
/* By       Date       Task    Description                                                  */
/* -------- ---------- ------- ------------------------------------------------------------ */
/* NLI      05.09.2009 0000000 New program - Subproject IceCap                              */
/* ---------------------------------------------------------------------------------------- */
H TEXT('iceCap: Simple menu driver')
H BNDDIR('EXTUTILITY')
fmenudemo  if   e           k disk
   
/include qasphdr,extUtility
d path            s             32    varying
d menu            s             10       
                                                            
// ----------------------------------------------------------------------------------------
// Take a peek with:  select * from icemnudevd/menudemo
// Call it from the url with hive and name: menuDemo.aspx?menu=ROOT
// example: http://dkexp05:60421/menu/menuDemo.aspx?menu=ROOT
// ----------------------------------------------------------------------------------------
 /free                                                      
            
	SetContentType('text/plain; charset=windows-1252');
	
	path = qryStr('path': form('path'));
	menu = qrystr('node': form('node'));
  if menu = 'root' or menu = '';
    menu = qrystr('menu');
  endif;

	extMenuBegin(path);
	
	setll menu menuDemoR;
	reade menu menuDemoR;
	dow not %eof(menuDemo);
	  if subMenu > '';
			extSubMenu ( menuText : subMenu);
		else;
		  extMenuItem( menuText : menuLink);
		endif;
  	reade menu menuDemoR;
	endDo;
	
  extMenuEnd();
	
	return; 
