<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="backer.aspx.cs" Inherits="Maticsoft.Web.User.backer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="titleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../Images/59e6ce7c3f399e8b0809a90e4c3f09b0.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="m-favicon" style="margin-top: 20px;">
        <asp:Repeater ID="usermsg" runat="server">
            <ItemTemplate>
                <div class="wrap clearfix">
                    <p class="z-portrait">
                        <img src="/image/<%#Eval("headimg") %>"></p>
                    <div class="z-introduced">
                        <div class="z-chance clearfix">
                            <div class="ch-left">
                                <h2 class="fl">
                                    <%#Eval("realname") %></h2>
                                <div class="ch-left" data-info="<%#Eval("id") %>|<%#Eval("realname") %>|<%#Eval("id") %>">
                                    <a class="z-browse z-message <%=Request.Cookies["login"] == null ? "Js-showLogin" : "Js-reply"%>" href="javascript:;">私信</a>
                                </div>
                                <div class="clearfix">
                                </div>
                                <span>
                                    <%#Eval("address") %></span>
                            </div>
                        </div>
                        <div class="z-calculations">
                            <!--p class="ca-01">
                            <i></i>广东,深圳</p-->
                            <p class="ca-02">
                                <i></i>上次登录<%#Eval("logintime") %></p>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div class="wrap m-ulitem">
        <div class="particulars-nav clearfix">
            <ul class="clearfix">
                <!-- 点击样式调用a标签里的class 和i标签 -->
                <li <%=Request.QueryString["type"] == "backer"? "class='mm-op'" : ""%>><a href="?type=backer&uid=<%=Request.QueryString["uid"] %>">支持的项目</a></li>
                <li <%=Request.QueryString["type"] == "index"? "class='mm-op'" : ""%>><a href="?type=index&uid=<%=Request.QueryString["uid"] %>">发起的项目</a></li>
            </ul>
        </div>
        <div class="m-location">
            <%--<div class="m-footprint">
            <p class="m-footprintimg">
                <img src="/images/prompt.png"></p>
            <h2>
                很抱歉......这儿是个荒地：（</h2>
            <p>
                Ta还没有支持任何项目</p>
        </div>--%>
            <ul class="clearfix item-list">
                <asp:Repeater ID="projectList" runat="server">
                    <ItemTemplate>
                        <li>
                            <div class="list-item">
                                <a class="item-figure" href="/project.aspx?id=<%#Eval("id") %>" target="_blank">
                                    <img src="/user/image/<%#Eval("smallImg") %>" alt="<%#Eval("seoName") %>" title="<%#Eval("seoName") %>">
                                </a>
                                <div class="z-lump ">
                                    <h2>
                                        <a href="/project.aspx?id=<%#Eval("id") %>" target="_blank">
                                            <%#Eval("LengName") %></a></h2>
                                    <p class="z-raising">
                                        已筹资<i><%#money() %></i></p>
                                    <div class="progress-bar">
                                        <span class="progress bg-yellow" style="width: <%#int.Parse(bfb().ToString().Split('.')[0]) >= 100 ? "100%" : bfb()%>;"></span>
                                    </div>
                                    <div class="item-rate clearfix">
                                        <span class="rate1">
                                            <%#Maticsoft.Web.Config.extend.bfbText(Eval("target"),Eval("id")) %></span> <span class="rate2"><em>剩余时间</em><%#Duration()%>天 </span>
                                    </div>
                                </div>
                                <p class="z-assist clearfix">
                                    <a class="assist1" target="_blank" title="点击数" href="/project.aspx?id=<%#Eval("id") %>">
                                        <%#Eval("lookcount")%></a> <a class="assist2" target="_blank" title="支持者" href="/project.aspx?id=<%#Eval("id") %>">
                                            <%#Maticsoft.Web.Config.extend.zhichi(Eval("id"))%></a>
                                </p>
                            </div>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <div class="pager" style="clear: both">
        </div>
    </div>
        <script>
            $(".a-btn-blue").live("click", function () {
                var content = $("textarea[name='message']").val();
                var sid = $("#sid").val();
                if (!content) {
                    alert('什么都没写，我怎么留言啊？逗我呢');
                    $("textarea[name='msgs']").focus();
                    return;
                }
                $.ajax({
                    type: 'get',
                    cache: false,
                    url: 'message.aspx?action=relpy&msg=' + content + "&sid=" + sid,
                    success: function (msg) {
                        if (msg.indexOf('1') > -1) {
                            wx.alert("留言成功");
                        } else {
                            wx.alert("留言失败");
                        }
                    },
                    error: function () {
                        wx.alert("异常，请联系管理员");
                    }
                });
            });
    </script>
    <script id="Js-mess-tpl" type="text">
    <div class="m-message">
        <div class="title">
            <h3 class="">发送私信</h3>
            <a href="javascript:;" class="btn-close Js-pop-close">×</a>
        </div> 
        <div class="pop-body">
                <div class="pop-msg">
                    <h3>收件人：<&name&></h3>
                    <textarea name="message"></textarea>
                    <input type="hidden" id="sid" name="top_id" value="<&sid&>">
                </div>
                <div class="btn">
                    <a class="a-btn-gray Js-pop-close">
                        取消
                    </a>
                    <a class="a-btn-blue btn-effect-blue" type="button">
                        发送
                    </a>
                </div>
        </div>
    </div>
</script>

</asp:Content>
