<%@ page language="C#" autoeventwireup="true" inherits="SiteServer_Main, v5star.Web" theme="" enableviewstate="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>VSCMS管理系统</title>
    <link href="Style/easyui.css" rel="stylesheet" type="text/css" />
    <link href="Style/icon.css" rel="stylesheet" type="text/css" />
    <link href="Style/main.css" rel="stylesheet" type="text/css" />
    <link href="Style/leftmenu.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Script/jquery.js"></script>
    <script type="text/javascript" src="../Script/jquery.easyui.js"></script>
    <script type="text/javascript"> 
	function ShowNode(id, url, label){				
	var mainTab = $( "#mytab" );
    var added = false;
    $( "iframe", mainTab ).each( function(i){
        var frm = this.id;//alert(this.id);		 
        if ( frm == id ) {
            added = $(this);
        }
    });    
    if (added){
        mainTab.tabs( "select",label);
        return;
    }
    var obj=$("<iframe/>").attr({
	    "id":id,
        "frameBorder": "0",
        "scrolling": "auto",
        "allowTransparency": "true",
        "src": url
    }).css({
        "width": "100%",
        "height":"100%",
		"visibility":"inherit",
		"z-index":"1"
    }); 
    mainTab.tabs( "add", {title:label,closable:true,content:obj});     
}
$(document).ready(function(){
$("li").toggle(
      function () {
        $(this).css({"color":"blue"});
      },
      function () {
        $(this).css({"color":"red"});
      }
);    
$("#MyMenu li").mouseover(function(){ 
    $(this).addClass("over");}).mouseout(function(){
    $(this).removeClass("over");})
    $("#MyMenu li:even").addClass("alt");
}); 

window.onbeforeunload =function(){ 
if(window.event.clientY   <   0   ||   window.event.altKey){   
    $.ajax({url: "Logout.aspx",cache: false});   
  }
}
</script>
</head>
<body class="easyui-layout">
        <div region="north" style="height: 60px; padding: 0px; background-image: url(../images/top-gray.gif);
            background-repeat: no-repeat; background-position: right top" valign="bottom">
            <img src="images/cmslogo.jpg" alt="多功能后台" />
        </div>
        <div region="west" split="true" title="<%=UserName%>" icon="icon-im" style="width: 160px;
            padding: 1px; overflow: hidden;">
            <div class="easyui-accordion bgcolor" fit="true" border="false" id="MyMenu">
                <asp:Repeater ID="LeftMenu" runat="server" OnItemDataBound="LeftMenu_ItemDataBound">
                    <ItemTemplate>
                        <div icon="icon-tt" style="overflow: auto;" title="<%# Eval("M_CName")%>">
                            <ul>
                                <asp:Repeater ID="LeftMenu_Sub" runat="server">
                                    <ItemTemplate>
                                        <li onclick="ShowNode('<%# Eval("ModuleID")%>','<%# Eval("M_Directory")%>','<%# Eval("M_CName")%>')">
                                            <%# Eval("M_CName")%>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            
                <div icon="icon-tt" style="overflow: auto;" title="关于系统">
                    <ul>
                        <li onclick="ShowNode('-1','About.aspx','版本信息')">关于作者</li>
                        <li onclick="ShowNode('-2','LoginLog.aspx','登录日志')">登录日志</li>
                        <li onclick="ShowNode('-3','UserPwd.aspx','修改密码')">修改密码</li>
                        <li onclick="javascript: window.top.location.href = 'Logout.aspx'">退出系统</li>
                    </ul>
                </div>
            </div>
        </div>
        <div region="center" title="<a href='http://www.v5star.com'  target='_blank'>VSCMS 官网</a>"
            icon="icon-url" style="overflow: hidden;">
            <div class="easyui-tabs" fit="true" border="false" id="mytab">
                <div title="Default" style="padding: 10px; overflow: hidden;">
                    <iframe scrolling="auto" frameborder="0" src="Welcome.aspx" style="width: 100%; height: 100%;
                        visibility: inherit;"></iframe>
                </div>
            </div>
        </div>
        <div region="south" style="height: 30px; padding: 5px; background: #efefef;">
            <div class="easyui-layout" fit="true" style="background: #ccc;">
                <div region="center" style="text-align: center; vertical-align: bottom;">
                    版权所有 &copy; 2010</div>
            </div>
        </div>
    </body>
</html>
