<%@ Page Language="C#" MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true" Inherits="webUser_index" Title="Untitled Page" EnableViewState="false" Codebehind="index.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content1" runat="Server">
    <form runat="server" id="form1" name="form1">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td style="background-image:url('images/tr-1.gif');height:134px;width:24px;">
                </td>
                <td style="background-image: url('images/tr-bg.gif'); height: 134px;">
                    <table width="100%"  border="0" >
                        <tr>
                            <td align="center" style="width: 164px; height: 100px; text-align: center;">
                                <div style="text-align:center; border:2px solid #8abee2; width: 90px; height: 90px;overflow:hidden;">
                                    <asp:Image ID="userImg" runat="server" style="height:90px;" /></div>
                            </td>
                            <td>
                                <div>
                                    您好:
                                    欢迎 [<asp:Label ID="userName" runat="server" Text="Label"></asp:Label>] 进入用户中心!
                                </div>
                                <div>
                                您是第<asp:Label ID="loginCount" runat="server" Text="Label" ForeColor="Green"></asp:Label>
                                    次登录, 你的来源IP为<asp:Label ID="ipText" runat="server" Text="Label" ForeColor="Green"></asp:Label>
                                    ,来自<asp:Label ID="ipAdd" runat="server" Text="Label" ForeColor="Blue"></asp:Label>
                                </div>
                                
                                <div>
                                <hr>
                                    &nbsp;<asp:Label ID="noHomeMsg" runat="server" Text="您还没有开通个人空间"></asp:Label>
                                    <br>
                                    <asp:Button ID="cHomeButton" runat="server" Text="现在开通" OnClick="cHomeButton_Click" /></div>
                            </td>
                            <td style="width:227px;height:100px;background-image: url('images/tr2-bg.gif');padding-left:9px;">
                            <div style="float:left;width:60px;color:#ff0000;">
                             温馨提示
                            </div>
                            <div style="float:left;width:150px;color:#000000;">
                            新短信<asp:Label ID="msgCount" runat="server" Text="Label" ForeColor="Red"></asp:Label>条<br/>
                            待签收文件<asp:Label ID="qsCount" runat="server" Text="Label" ForeColor="Red"></asp:Label>个<br/>
                            发文章<asp:Label ID="fileCount" runat="server" Text="Label" ForeColor="Red"></asp:Label>篇<br/>
                            发评论<asp:Label ID="reCount" runat="server" Text="Label" ForeColor="Red"></asp:Label>条<br/>
                            </div>
                            
                            
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="background-image:url('images/tr-2.gif');height:134px;width:24px;">
                </td>
            </tr>
        </table>
        
        <div style="width: 49%; float: left; height: 130px; margin-left: 4px;">
            <div class="maxTitle">
                我最新的文章
            </div>
            <asp:SqlDataSource ID="myFile" runat="server"
                SelectCommand="SELECT TOP 10 zydn_Menu.MName, zydn_room.mid,zydn_room.tabid, &#13;&#10;      zydn_room.tabname, zydn_room.title, zydn_room.createDate&#13;&#10;FROM zydn_room INNER JOIN&#13;&#10;     zydn_Menu ON zydn_room.mid = zydn_Menu.MID&#13;&#10;ORDER BY zydn_room.id DESC"
                DataSourceMode="DataReader"></asp:SqlDataSource>
            <asp:GridView ID="myFileGrid" runat="server" AutoGenerateColumns="False" DataSourceID="myFile"
                Width="100%" BorderWidth="0px">
                <Columns>
                    <asp:BoundField DataField="MName" HeaderText="栏目" SortExpression="MName">
                        <HeaderStyle CssClass="titleLeft" Width="120px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                    <asp:HyperLinkField DataNavigateUrlFields="mid,tabid,tabname" DataNavigateUrlFormatString="gotoFile.aspx?menuid={0}&amp;tab={2}&amp;tabid={1}"
                        DataTextField="title" HeaderText="标题" Target="_blank">
                        <ItemStyle CssClass="bodyDiv" />
                        <HeaderStyle CssClass="titleLeft" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="createDate" DataFormatString="{0:d}" HeaderText="发布日期"
                        HtmlEncode="False" SortExpression="createDate">
                        <HeaderStyle CssClass="titleRight" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
        </div>
        <div style="width: 49%; float: left; height: 130px; margin-left: 4px;">
            <div class="maxTitle">
                我的评论
            </div>
            
             <asp:GridView ID="myRe" runat="server" AutoGenerateColumns="False" Width="100%"
                BorderWidth="0px">
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="mid,aid,atab" DataNavigateUrlFormatString="gotoFile.aspx?menuid={0}&amp;tab={2}&amp;tabid={1}"
                        DataTextField="Comment" HeaderText="内容" Target="_blank">
                        <ItemStyle CssClass="bodyDiv" Wrap="True" />
                        <HeaderStyle CssClass="titleLeft" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="IsExamine" DataFormatString="{0:d}" HeaderText="审核" HtmlEncode="False"
                        SortExpression="createDate">
                        <HeaderStyle CssClass="titleLeft" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SaveDate" DataFormatString="{0:d}" HeaderText="日期" HtmlEncode="False"
                        SortExpression="createDate">
                        <HeaderStyle CssClass="titleRight" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
            
        </div>
        <div style="width: 100%; clear: both; height: 5px;">
        </div>
        <div style="width: 49%; float: left; height: 130px; margin-left: 4px;">
            <div class="maxTitle">
                我的要签收的文件
            </div>
            <asp:GridView ID="myForFile" runat="server" AutoGenerateColumns="False" Width="100%"
                BorderWidth="0px">
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="mid,tabid,tab" DataNavigateUrlFormatString="gotoFile.aspx?menuid={0}&amp;tab={2}&amp;tabid={1}"
                        DataTextField="fileTitle" HeaderText="标题" Target="_blank">
                        <ItemStyle CssClass="bodyDiv" />
                        <HeaderStyle CssClass="titleLeft" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="toDate" DataFormatString="{0:d}" HeaderText="发出日期" HtmlEncode="False"
                        SortExpression="createDate">
                        <HeaderStyle CssClass="titleLeft" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                    <asp:BoundField DataField="endDate" DataFormatString="{0:d}" HeaderText="终止日期" HtmlEncode="False"
                        SortExpression="createDate">
                        <HeaderStyle CssClass="titleRight" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
        </div>
        <div style="width: 49%; float: left; height: 130px; margin-left: 4px;">
            <div class="maxTitle">
                我的站内短信
            </div>
            <asp:SqlDataSource ID="myMsg" runat="server"
                SelectCommand="select top 10 * from zydn_msg order by id desc " DataSourceMode="DataReader">
            </asp:SqlDataSource>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderWidth="0px"
                DataKeyNames="id" DataSourceID="myMsg" Width="100%">
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="showMsg.aspx?menuindex=1&amp;id={0}"
                        DataTextField="title" HeaderText="主题">
                        <HeaderStyle CssClass="titleLeft" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="fromUser" HeaderText="发信人" SortExpression="fromUser">
                        <HeaderStyle CssClass="titleLeft" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                    <asp:BoundField DataField="isShow" HeaderText="是否阅读" SortExpression="isShow">
                        <ItemStyle CssClass="bodyDiv" HorizontalAlign="Center" />
                        <HeaderStyle CssClass="titleLeft" Width="50px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="savedate" DataFormatString="{0:d}" HeaderText="发信日期" HtmlEncode="False"
                        SortExpression="savedate">
                        <HeaderStyle CssClass="titleRight" Width="80px" />
                        <ItemStyle CssClass="bodyDiv" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
        </div>
    </form>   
</asp:Content>
