<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="LMN.Web.Admin.Index" %>

<%@ Import Namespace="LMN.Common" %>
<%@ Import Namespace="LMN.Model" %>
<!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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
    <%=Config.SiteName %></title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
<style type="text/css">
    html, body { overflow: hidden; }
</style>
</head>
<body>
<form id="form1" runat="server">
    <div id="header">
        <div class="logo">
            <div class="link">
                您好，[
                <%=Admin.username %>
                ]。 [ <a href="javascript:;">帐号设置</a> ] [ <a href="Index.aspx?ctl=Main" target="_top">桌面</a> ] [ <a href="Index.aspx?action=logout" target="_top">退出</a> ]</div>
            <h1 class="shopname"><a href="/">
            <%=Config.SiteName %></a></h1>
            <div class="message">
                <!--
      缺货通知: 1; 商品评论: 2-->
                Message here</div>
        </div>
        <div id="menu">
            <div class="menu">
                <%
                    var auths = ",";
                    if (Admin.auths != null) {
                        auths = Admin.auths.Aggregate(auths, (current, auth) => current + (auth.id + ","));
                    }
                    if (Admin.super == 1 || auths.IndexOf(",1,") != -1) { %>
                <a href="Index.aspx?ctl=Shop/Default&act=List" class="tab"><span><span>商品管理</span></span></a>
                <%
                    }
                    if (Admin.super == 1 || auths.IndexOf(",2,") != -1) { %>
                <a href="Index.aspx?ctl=Order/Default&act=Main" class="tab"><span><span>订单管理</span></span></a>
                <%
                    }
                    if (Admin.super == 1 || auths.IndexOf(",3,") != -1) { %>
                <a href="Index.aspx?ctl=Member/Default&act=Main" class="tab"><span><span>会员管理</span></span></a>
                <%
                    }
                    if (Admin.super == 1 || auths.IndexOf(",4,") != -1) { %>
                <a href="Index.aspx?ctl=Promote/Default&act=Main" class="tab"><span><span>营销推广</span></span></a>
                <%}
                    if (Admin.super == 1 || auths.IndexOf(",5,") != -1) { %>
                <a href="Index.aspx?ctl=Page/Default&act=Main" class="tab"><span><span>页面管理</span></span></a>
                <%
                    }
                    if (Admin.super == 1 || auths.IndexOf(",6,") != -1) { %>
                <a href="Index.aspx?ctl=Report/Default&act=Main" class="tab"><span><span>统计报表</span></span></a><%}
                    if (Admin.super == 1 || auths.IndexOf(",7,") != -1 || auths.IndexOf(",8,") != -1) { %>
                <div class="tab blankbutton">
                    <span><span>
                        <%if (Admin.super == 1 || auths.IndexOf(",7,") != -1) {%><a href="Index.aspx?ctl=Config/Default&act=Main">商店配置</a><%}
                          if (Admin.super == 1 || auths.IndexOf(",8,") != -1) {%><a href="Index.aspx?ctl=Tool/Default&act=Main">实用工具</a><%} %></span></span></div>
                <%
                                                                                                                   }%>
                <a class="tab greenbutton" href="../" target="_blank"><span><span>浏览商店</span></span></a>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <iframe id="content" name="content" style="margin: 5px 0 0; border-top: 1px solid #eee; padding: 0px;" src="<%=Ctl%>.aspx?act=<%=Act%>" frameborder="0" scrolling="no" width="1" height="1"></iframe>
</form>
<script type="text/javascript">
    function init(w, h) {
        $("#content").height(h - 86).width(w);
    }
    $(document).ready(function() {
        $(window).wresize(function() {
            init($(window).width(), $(window).height());
        });
        init($(window).width(), $(window).height());
    });
</script>
</body>
</html>
