<%@ page title="" language="C#" masterpagefile="~/lovecenter/LoveCenterMaster.master" autoeventwireup="true" inherits="lovecenter_Default, App_Web_ubyenibr" enableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript" src="../js/data.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
                <div class="infos">
                
                <% if (personDetail != null)
                   { %>
                    <div class="left">
                        <div class="face">
                        <table><tr><td valign="middle">
                        <%if (personDetail.face != "")
                          { %>
                        <a href="PersonInfo.aspx"><img src="/uploadfiles/<%= personDetail.face %>"  /></a>
                        <%}
                          else
                          { %>
                        <a href="PersonInfo.aspx"><img src="images/defpic.gif" /></a>
                        <%} %>
                        </td></tr></table>
                        </div>
                        <div class="buttons">
                            <ul>
                                <li class="a"><a href="/personalbum/?uid=<%= personDetail.puid %>" target="_blank">我的空间</a></li>
                                <li class="b"><a href="/lovecenter/album.aspx">我的相册</a></li>
                                <li class="c"><a href="/lovecenter/message.aspx">消息</a></li>
                                <li class="d"><a href="#" class="quit quitsession">退出</a></li>
                            </ul>
                        </div>
                    </div>
                    
                    <div class="right info">
                        <div class="container">
                            <div class="left">
                                <div class="uname"><%= userDr["UserName"]%></div>
                                <div class="stateion"><a href="PersonInfo.aspx">更新我的个人资料</a></div>
                            </div>
                            <div class="right">
                                <div class="welcome"><a href="<%= ConfigurationManager.AppSettings["url_forum"] %>usercpnewpassword.aspx" target="_blank">修改密码</a> | <a href="#" class="quitsession">退出</a></div>
                                <div class="prevlogintime">上次登录：<%= userDr["LastVisit"] %></div>    
                            </div>
                        </div>
                        
                        <div class="bbsstate">
                            <ul>
                                <li>欢迎您：<%= userDr["UserName"] %> <a href="<%= ConfigurationManager.AppSettings["url_forum"] %>usercpprofile.aspx" style="color:#333; text-decoration:none;" target="_blank">修改论坛资料</a></li>
                                <li>UID：<%= userDr["UId"]%></li>
                                <li>发贴数：<%= userDr["Posts"] %></li>
                                <li>积分数：<%= userDr["Credits"] %></li>
                                <li>性别：<%= userDr["Gender"] == "0" ? "保密" : (userDr["Gender"] == "1" ? "男" : "女")%></li>
                                <li>地区：<%= userDr["Location"] %></li>
                            </ul>
                        </div>
                    </div>
                    <% } %>
                    
                    <%if (businessDetail != null)
                      { %>
                      <div class="binfo">
                        <% if (businessDetail.companyname != "")
                           { %>
                          <div class="comname"><%= businessDetail.companyname %></div>
                          <%}
                           else
                           { %>
                          <div class="edit"><a href="BusinessInfo.aspx">未完成公司资料 [填写公司资料]</a></div>
                          <%} %>
                          <table>
                            <tr>
                                <td width="70" class="c">会员等级</td><td width="160"><%= businessDetail.viplevel == 0 ? "普通商家" : "VIP商家"%></td>
                                <td width="70" class="c">联系人</td><td><%= businessDetail.contact == "" ? "-" : businessDetail.contact%></td>
                            </tr>
                            <tr>
                                <td class="c">联系电话</td><td><%= businessDetail.tel == "" ? "-" : businessDetail.tel%></td>
                                <td class="c">移动电话</td><td><%= businessDetail.mobile == "" ? "-" : businessDetail.mobile%></td>
                            </tr>
                            <tr>
                                <td class="c">商家分类</td><td>
                                <script>
                                    dispData(arrBusinessCategorys, <%= businessDetail.parentcid%>);</script> - 
                                <script>
                                    dispData(arrBusinessCategorys, <%= businessDetail.cid %>);</script></td>
                                <td class="c">QQ</td><td><%= businessDetail.qq == "" ? "-" : businessDetail.qq%></td>
                            </tr>
                            <tr>
                                <td class="c">公司所在地</td><td><%= businessDetail.privince  %> <%= businessDetail.city  %></td>
                                <td class="c">官方网站</td><td><%= businessDetail.siteurl == "" ? "-" : businessDetail.siteurl%></td>
                            </tr>
                            <tr>
                                <td class="c">公司地址</td><td><%= businessDetail.address == "" ? "-" : businessDetail.address%></td>
                                <td class="c">营业时间</td><td><%= businessDetail.officetimes == "" ? "-" : businessDetail.officetimes%></td>
                            </tr>
                            
                          </table>
                          <div class="opts">
                            <a href="BusinessInfo.aspx">[更新公司资料]</a> | <a href="/vip/<%= businessDetail.buid  %>/" target="_blank">[查看我的商铺]</a> | <a target="_blank" href="<%= ConfigurationManager.AppSettings["url_forum"] %>usercpnewpassword.aspx">[修改密码]</a>
                          </div>
                      </div>
                      
                    <%} %>
                    <div class="clear"></div>
                    
                    <div class="tit msgico"><div>消息中心</div></div>
                    <div class="cnt msgcenter">
                    
                        <table cellpadding="10" cellspacing="0" border="0" width="100%">
                            <tr>
                                <td><span>我的短消息：</span><a href="Message.aspx"><%= userDr["NewPmCount"] %>条未读</a></td>
                                <td width="120"><span>我的留言：</span><a href="BusinessQuestionsList.aspx?act=mypost"><%= total_leavewords %>条</a></td>
                                <td width="120"><span>新闻评论：</span><%= total_newslw%>条</td>
                            </tr>
                            <%if(LoginedUserDescr.UserType == LoginedUserDescription.EnumUserType.Business){ %>
                            <tr>
                                <td><span>留言回复：</span><a href="BusinessQuestionsList.aspx"><%= total_freebacks%>条</a></td><td></td><td></td>
                            </tr>
                            <%} %>
                        </table>
                    </div>
                    
                    <div class="tit msgico"><div>我的论坛</div></div>
                    <div class="cnt bbsinfo">
                        <ul>
                            <li class="a">
                                <div>
                                    帖子：共发表<%= userDr["Posts"] %>个帖子 <a href="<%= ConfigurationManager.AppSettings["url_forum"] %>/mytopics.aspx">查看我的帖子</a><br />
                                    最后发表于 <%= userDr["LastPost"] %>
                                </div>
                            </li>
                            <li class="a">
                                <div>精华贴：<a href="<%= ConfigurationManager.AppSettings["url_forum"] %>/search.aspx?posterid=current&type=digest"><%= userDr["DigestPosts"] %>个帖子</a></div>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="tit msgico"><div>我最近的帖子</div></div>
                    <div class="cnt msgcenter">
                        <asp:Repeater ID="rptPosts" runat="server">
                            <HeaderTemplate>
                            <table width="100%">
                                <tr class="tit">
                                    <td>主题</td>
                                    <td width="100">日期</td>
                                    <td width="100">最后回复</td>
                                </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><a target="_blank" href="<%= ConfigurationManager.AppSettings["url_forum"] %>showtopic-<%# DataBinder.Eval(Container.DataItem, "tid")%>.aspx"><%# DataBinder.Eval(Container.DataItem, "title")%></a></td>
                                    <td width="100"><%# DataBinder.Eval(Container.DataItem, "postdatetime","{0:d}")%></td>
                                    <td width="100"><%# DataBinder.Eval(Container.DataItem, "lastposter")%></td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                            </table>
                            </FooterTemplate>
                            </asp:Repeater>
                            <% if (rptPosts.Items.Count == 0)
                               { %>
                            <div class="nodata">暂无内容</div>
                            <%} %>
                    </div>
                    
                    <div class="tit msgico"><div>我的消息</div></div>
                    <div class="cnt msgcenter">
                        <asp:Repeater ID="rptMessage" runat="server">
                            <HeaderTemplate>
                            <table width="100%">
                                <tr class="tit">
                                    <td width="60">发件人</td>
                                    <td>主题</td>
                                    <td width="100">日期</td>
                                </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td ><%# DataBinder.Eval(Container.DataItem, "msgfrom")%></td>
                                    <td><a <%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "new")) ? "class='b'" : "" %> target="_blank" href="<%= ConfigurationManager.AppSettings["url_forum"] %>usercpshowpm.aspx?pmid=<%# DataBinder.Eval(Container.DataItem, "pmid")%>"><%# DataBinder.Eval(Container.DataItem, "subject")%></a></td>
                                    <td ><%# DataBinder.Eval(Container.DataItem, "postdatetime", "{0:d}")%></td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                            </table>
                            </FooterTemplate>
                            </asp:Repeater>
                            <% if (rptMessage.Items.Count == 0)
                               { %>
                            <div class="nodata">暂无内容</div>
                            <%} %>
                    </div>
                </div>
                
                <div class="lists right">
                    <div class="rect">
                        <div class="tit">最近访问</div>
                        <div class="cnt">
                            <asp:Repeater ID="rptVisits" runat="server">
                            <HeaderTemplate>
                            <ul class="pics">
                            </HeaderTemplate>
                            <ItemTemplate>
                            <li>
                                <div class="pic"><a ><img src="images/pic_2.gif" /></a></div>
                                <div><%# DataBinder.Eval(Container.DataItem, "[\"name\"]")%><br /><span><%# Utils.GetShortDate(DataBinder.Eval(Container.DataItem, "[\"date\"]"))%></span></div>
                            </li>
                            </ItemTemplate>
                            <FooterTemplate>
                            </ul>
                            </FooterTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                    
                    <div class="rect mg_top">
                        <div class="tit">最新加入</div>
                        <div class="cnt">
                            <asp:Repeater ID="rptRegs" runat="server">
                            <HeaderTemplate>
                            <ul class="pics">
                            </HeaderTemplate>
                            <ItemTemplate>
                            <li>
                                <div class="pic"><a ><img src="images/pic_2.gif" /></a></div>
                                <div><%# DataBinder.Eval(Container.DataItem, "username")%><br /><span><%# Utils.GetShortDate(DataBinder.Eval(Container.DataItem, "joindate")) %></span></div>
                            </li>
                            </ItemTemplate>
                            <FooterTemplate>
                            </ul>
                            </FooterTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                </div>
</asp:Content>

