<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="com.gx.webpage.engine.menupage.designdbengine.factory.*" %>
<%@ page import="com.gx.webpage.engine.menupage.designdbengine.valueobject.*" %>
<%@ page import="com.gx.webpage.framework.valueobject.*" %>
<%@ page import="com.gx.webpage.engine.menupage.designdbengine.api.*" %>
<%@ page import="com.gx.webpage.framework.util.inoutformat.DataBean" %>
<%
	String errStr = "";
	String firstParentMenuUuid = "";
  boolean isError = false;
	UserInfoCtxModel uicm = new UserInfoCtxModel();
	String menuTable = "";
	try{
        EbiMenuMgr delegate = MenuFactory.getInstance().getEbiMenuMgr();
				Collection col1 = delegate.findSysMenusBySystemIdAndLevel(
									SysMenuModel.SYSID_WEBPAGE3,SysMenuModel.MENULEVEL_ONE,false,uicm,request);
		if(col1==null || col1.size()==0)
		{
			menuTable = "<table class=MainMenuItemTable><tr><td class=Error>您无访问本系统的权限，请与管理员联系</table>";
		}else{
			Iterator it1=col1.iterator();
			int minNum = 0;
			menuTable = "<table class=MainMenuItemTable><tr>";
			while(it1.hasNext()){
				SysMenuModel sm1 = (SysMenuModel)it1.next();
				if(minNum==0){
					minNum = sm1.getIndexNum();
					firstParentMenuUuid = sm1.getUuid();
				}else if(sm1.getIndexNum()<minNum){
					firstParentMenuUuid = sm1.getUuid();
				}
				menuTable += "<td class=MainMenuItemTableTD>"
				          +"<a class=RootMenu href=\"javascript:menuLinkClick('"+sm1.getUuid()+"','"+sm1.getTargetPage()+"')\">"
				          + sm1.getName()
				          + "</a></td>";
			}
			menuTable += "</table>";
		}
	}catch(Exception err){
	    menuTable = "";
		errStr = DataBean.getErrStr(err);
        isError = true;
	}
%>
<html>
<head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="./../../../webpage/common/css/common.css" rel="StyleSheet"  type="text/css" />
<script language="javascript" src="./../../../webpage/common/engine/constant.js"></script>
<script language="JScript.Encode" src="./../../../webpage/common/engine/common.js"></script>
<script language="JScript.Encode" src="./../../../webpage/common/engine/TimerControl.js"></script>
<script language="javascript">
function menuLinkClick(menuUuid,target)
{
	window.webpageMain.window.navigate(target);
	window.iframe_MenuPath.window.navigate("./menu/menuPath.jsp?menuUuid="+menuUuid);
}
</script>
    <title>WebPage3.0开发平台</title>
</head>
<body class=MainFrame>
<table class=FullSizeTable cellpadding=0 cellspacing=0>
    <tr class=HeadBanner >
        <td>
        <table class=FullSizeTable cellpadding=0 cellspacing=0>
            <tr class=HeadBanner>
            <td width=100><img src="./../../../webpage/common/image/logo.gif"></td>
            <td><b><i>&nbsp;&nbsp;&nbsp;&nbsp;WebPage3.0开发平台</i></b>
            </td>
            <td align=right valign=top>
                <table>
                    <tr>
                    </tr>
                </table>
            </td>
            </tr>
        </table>
        </td>
    </tr>
    <tr class=MainMenuTR>
        <td>
            <table class=FullSizeTable cellpadding=0 cellspacing=0>
                <tr>
                <td class=MainMenuItemTableCurTD id=curMainMenu onclick="switchSysBar();" align=center>当前主菜单</td>
                <td>
                    <%= menuTable%>
                </td>
                </tr>
            </table>
        </td>
    <tr>
    <td>
        <table class=FullSizeTable cellpadding=0 cellspacing=0 border=1 BORDERCOLOR="#90B0ED">
            <tr>
            <td height=18>
            	<iframe id="iframe_MenuPath" name="iframe_MenuPath"
                    width="100%" height="18" border="0" frameborder="0"
                    scrolling="no" src="./menu/menuPath.jsp?menuUuid=<%=firstParentMenuUuid%>">
                </iframe>
            </td></tr>
            <tr>
            <td>
               <iframe name="webpageMain" width="100%" height="100%"  border="0" frameborder="0"
                    src="./../../../webpage/definition/formsList.jsp"></iframe>
            </td>
            </tr>
        </table>
    </tr>
    <tr class=FootBanner>
        <td align=center>
            <div id="footP" class=LogFoot>
            北京广享科技有限公司&nbsp;&nbsp;&copy版权所有&nbsp;2002-2006<br>
            <a href="http://www.webpagev.com">http://www.webpagev.com</a>&nbsp;&nbsp;
            E-Mail:cfpflow@yahoo.com.cn<br>
            </div>
        </td>
    </tr>
</table>
</body>
</html>
