<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_AdsClickRecorde, WebApp_deploy" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript" src="../Js/AdsClickRecorde.js"></script>
    <div class="pageTitle">未结广告收入：<asp:Literal ID="allAdsEP" runat="server" /> 个点击
        <asp:Button ID="Button1" runat="server" Text="结算收入" OnClick="CountAds" OnClientClick="return confirm('系统将您的广告收入转化为您的帐户积分，确定执行操作吗？')" />
    </div>
    <br />
    <div style="padding:3px;  text-indent:10px;">推广地址：
    <input readonly="readonly" id="myUrl" style="width:280px" value="<%=config["SiteUrl"].ToString() %>Click.aspx?uid=<%=user.UserID %>" />&nbsp;&nbsp;
    <input type="button" value="复制" onclick="clipboardData.setData('text','<%=config["SiteUrl"].ToString() %>Click.aspx?uid=<%=user.UserID %>');alert('复制成功！');" />
    </div>
    <br />
    <asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" AllowPaging="True" PageSize="50" CssClass="tableHead">
            <Columns>
                <asp:BoundField ReadOnly="True" DataField="ID" HeaderText="编号" ItemStyle-Width="50px"></asp:BoundField>
                <asp:BoundField DataField="CreateTime" HeaderText="发生日期" ItemStyle-Width="150px"></asp:BoundField>
                <asp:BoundField DataField="ComeIP" HeaderText="来自IP" ItemStyle-Width="100px"></asp:BoundField>
                <asp:BoundField DataField="AddPoint" HeaderText="得到积分" ItemStyle-Width="100px"></asp:BoundField>
                <asp:TemplateField HeaderText="来源地址">
                    <ItemTemplate>
                        <div style="white-space:normal; word-break:break-all;"><asp:Literal ID="comeurl" runat="server" Text='<%# Eval("comeurl") %>' /></div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
                    <EmptyDataTemplate>
                          
                    <table class="tableHeader" style="width:98%"><tr><th>编号</th><th>发生日期</th><th>来自IP</th><th>得到积分</th><th>来源地址</th></tr>
                    <tr><td colspan="5">没有符合查询条件的记录！</td></tr>
                    </table>
					
                    </EmptyDataTemplate>
    </asp:GridView>
    <div style="padding:3px;text-indent:5px;">共<asp:Label ID="AllRecorde" runat="server" />条记录</div>
    <div style="padding:3px;text-indent:5px;">注：系统只显示最近50条记录。</div>
    
    <div>
        <fieldset>
        <legend>邮件推荐</legend>
        <div>
          <label for="Name">收件人E-Mail:</label>
          <asp:TextBox ID="txtEmail" runat="Server" />*<asp:RegularExpressionValidator 
                ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" 
                ErrorMessage="格式不对！" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="不能为空！"></asp:RequiredFieldValidator>
            <br />
        </div>
        <div>
          <label for="Email"><span class="txtff6600_12">温馨提示:</span></label>
          <span>1、为确保你关心的人能收到邀请信，发送之前请仔细核对填写的邮箱地址，如果发送多个地址，请用“,”(小写)分开.
          2、请不要发送邀请信给不熟悉的人士，避免给别人带来不必要的困扰。</span></div>
        <div>
          <label for="Email">收件人姓名:</label>
          <asp:TextBox ID="txtPerson" runat="server" />
          <br />
        </div>
        <div>
          <label for="password">邮件主题:</label>
          <asp:TextBox ID="txtSubject" runat="Server" />*<asp:RequiredFieldValidator 
                ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSubject" 
                ErrorMessage="不能为空！"></asp:RequiredFieldValidator>
            <br />
        </div>
        <div>
          <label for="confirm_password">您的姓名:</label>
          <asp:TextBox ID="txtFromName" runat="Server" />
          </div>
        <br/>
        <div> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="txtff6600_12">推荐信模板:</span>
          <a href="javascript:createContentA(0)" title='点击加载 亲朋 模板'>亲朋</a> | <a href="javascript:createContentA(1)" title='点击加载 同学 模板'>同学</a> | <a href="javascript:createContentA(2)" title='点击加载 幽默 模板'>幽默</a> | <a href="javascript:createContentA(3)" title='点击加载 中秋节 模板'>中秋节</a> | <a href="javascript:createContentA(4)" title='点击加载 端午节 模板'>端午节</a> | <a href="javascript:createContentA(5)" title='点击加载 春节 模板'>春节</a>
        </div>
        <div>
          <label for="confirm_password"></label>
          <asp:TextBox ID="txtContent" runat="Server" TextMode="multiLine" Width="70%" Height="180px" />*<asp:RequiredFieldValidator
              ID="RequiredFieldValidator3" runat="server" ErrorMessage="不能为空！" ControlToValidate="txtContent"></asp:RequiredFieldValidator>
          <br />*以上均为必填项
        </div>
        <div>
            <asp:ImageButton ID="ImageButton1" runat="server" 
                ImageUrl="../Images/an_23.jpg" onclick="ImageButton1_Click" />
        </div>
        </fieldset>

      </div>
     <script type="text/javascript">
            var name="<%=txtContent.ClientID %>";
            function createContentA(i){
                var s=createContent(i);
                var n=document.getElementById("<%=txtPerson.ClientID %>").value;
                if(n.length<1)n="****";
                var url=document.getElementById("myUrl").value;
                var now = new Date();
                year = now.getYear();//取得年份
                if (year < 2000) {
                    year += 1900;//如果年份值小于100，则加上1900
                }
                var dat = year + "/" + (now.getMonth() + 1) + "/" + now.getDate(); 
                document.getElementById(name).value=s.replace("****",n).replace("{1}",url).replace("{1}",url)+document.getElementById('<%=txtFromName.ClientID %>').value+"   "+dat;
            }
            
            function checkText(){
                var ret=true;
                if(document.getElementById('<%=txtEmail.ClientID %>').value.length<1)
                    ret=false;
                if(ret && document.getElementById('<%=txtSubject.ClientID %>').value.length<1)
                    ret=false;
                if(ret && document.getElementById('<%=txtContent.ClientID %>').value.length<1)
                    ret=false;
                    
                if(!ret)
                    alert("请填写好*的选项！");
                return ret;
            }
      </script>
</asp:Content>

