<%@ Master Language="C#" AutoEventWireup="true" CodeFile="master.master.cs" Inherits="master" %>

<!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">
    <title>10228宿舍论坛</title>
    <link href="images/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="top">
        <div id="menu">
            <div id="menu2">
                <a href="Default.aspx">| 主页 |</a>
            <a href="register.aspx">| 注册 |</a>|
            <%
                //消除bug
                if (Session["login"] == null)
                    Session["login"] = "no";
              if (Session["login"].ToString() != "true")
                  Response.Write("<a href=\"login.aspx?action=dsd\">| 登录 |</a>");
              else
              {
                  Response.Write("<a href=\"articleEdit.aspx?action=add\">| 发帖 |</a>");
                  Response.Write("<a href=\"login.aspx?action=logout\">| 退出 |</a>");
              }
            %>
            </div>
      
        </div>
    </div>
    <div id="main">
        <div id="nav">
            <h3>帐号信息</h3>
        <%
            if (Session["login"].ToString() == "true")
            {
        %>
                <div style='margin:5px 15px;width:165px'>欢迎:<asp:Label ID="username" CssClass="label" runat="server" Text=""></asp:Label><br />
                上次登录:<asp:Label ID="lastlogin" runat="server" CssClass="label" Text=""></asp:Label><br />
                <asp:Label ID="status" CssClass="label" runat="server" Text=""></asp:Label>
                <div id="shenfen" runat=server></div>
                发表文章:<asp:Label ID="blognum" CssClass="label" runat="server" Text=""></asp:Label> 篇<br />
                <asp:HyperLink ID="myArticle" runat="server">我的文章</asp:HyperLink><br />
                <asp:HyperLink ID="addArticle" runat="server">添加新文章</asp:HyperLink>
                </div>
        <%
            }
            else
            {
        %>
                <form method=post action="login.aspx?action=login">
                    <table style='margin:5px 10px;padding:0px;width:175px'>
                    <tr><td>帐号</td><td><input type='text' style='width:120px' name='account'></td></tr>
                    <tr><td>密码</td><td><input type='password' style='width:120px' name='pass'></td></tr>
                    <tr><td colspan=2 align=center><input type='submit' value='登录'></td></tr>
                    </table>
                </form>  
        <%
            }
         %>
            <h3>社区在线</h3>
            <div runat=server id="online">
            </div>
        </div>
        <div class="main">
            <div id="mainContent">
            <form id="form1" runat="server">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </form>
            </div>
            <div class="mainFoot">
            </div>
        </div>
    </div>

</body>
        <div id="foot">
    ©2025 - 2025 By 10228宿舍论坛
    </div>

</html>
