<%@ page language="C#" autoeventwireup="true" inherits="user_coupons_do, ZKCMS" maintainscrollpositiononpostback="true" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register TagName="meta" TagPrefix="UC" Src="~/s/include/meta.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/s/include/head.ascx" %>
<%@ Register TagName="tip_bar" TagPrefix="UC" Src="~/s/include/tip_bar.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/s/include/foot.ascx" %>
<%@ Register TagName="side_menu" TagPrefix="UC" Src="~/user/side_menu.ascx" %>
<!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">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>会员中心_
        <%=ZK.config("sitetitle") %></title>
    <meta name="keywords" content="<%=ZK.config("sitekeywords") %>" />
    <meta name="description" content="<%=ZK.config("sitedescription") %>" />
    <UC:meta ID="meta1" runat="server" />
    <style type="text/css">.tt{width:90px;}
    .self_tip
    {
    	border:solid 1px #ffe5a5;
    	background:#fff5de url(/s/skin/prompt_small.gif) no-repeat 10px 9px;
    	padding:6px 6px 6px 32px;
    	color:#666;
    	width:703px;
    }
    </style>
</head>
<body>
    <div class="wrap">
        <a name="pagetop" id="pagetop"></a>
        <UC:head ID="head1" runat="server" />
        <UC:tip_bar ID="tip_bar1" runat="server" />
        <form id="form1" runat="server" autocomplete="off">
        <div class="box">
            <div class="hot">
                <div class="fl" style="width: 180px">
                    <div class="c1 mt5">
                        <div class="b">
                            <div class="fl">
                            </div>
                            <div class="con" style="width: 80px">
                                功能菜单</div>
                            <div class="fr">
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="v">
                            <UC:side_menu ID="side_menu1" runat="server" />
                            <script type="text/javascript">showonly_user_side_menu("2");</script>
                        </div>
                    </div>
                </div>
                <div class="fr flow" style="width: 765px">
                    <div class="c1 mt5">
                        <div class="b">
                            <div class="fl"></div>
                            <div class="con"><asp:Literal ID="PathTitleActType" runat="server">发布</asp:Literal>优惠券</div>
                            <div class="fr"></div>
                            <div class="clear"></div>
                        </div>
                        <div class="v">
                            <div class="do1">

                                <script type="text/javascript">var ContinueMake=1;                
            function check(){if(ContinueMake!=1){setTimeout(check,1000);return false;}              
            if(document.getElementById("title").value==""){alert("请填写信息标题！");return false;}
            if(document.getElementById("title").value.length<5){alert("信息标题太短！");return false;}
            if(!ifHasChn(document.getElementById("title").value)){alert("信息标题不符合规范！");return false;}   
            if(document.getElementById("endtime").value==""){alert("优惠券有效期限不能为空！");return false;}  
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>       
            if(<%=ZK.config("switchvalidatecode1") %>==1)if(document.getElementById("vc").value==""){alert("验证码不能为空！");return false;}else{if(document.getElementById("msg_vc").innerHTML!=""&&document.getElementById("msg_vc").innerHTML.indexOf("请输入")==-1){alert("验证码不正确！");return false;}}   

            }
                                </script>

                                <asp:Literal ID="Literal_ModTip" runat="server"></asp:Literal>
                                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                            
                                    <tr>
                                        <td class="tt">
                                            <b>优惠券名称：</b><asp:HiddenField ID="HiddenField_AddSwitch" runat="server" Value="0" />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="title" runat="server" MaxLength="60" CssClass="inp4" Width="392" onmouseover="document.getElementById('HiddenField_AddSwitch').value='1'"></asp:TextBox><span
                                                style="margin-left: 10px"><asp:Label ID="Label2" runat="server" CssClass="msgon" Text="请填写优惠券名称！"></asp:Label></span><asp:HiddenField
                                                    ID="HiddenField_enable" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                         <b>优惠券图片：</b>
                                        </td>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" style="cursor: default">
                                                <tr>
                                                    <td>
                                                        <div class="abs" style="*display: none">
                                                            <table width="400" border="0" cellspacing="0" cellpadding="0" height="24">
                                                                <tr>
                                                                    <td id="upimg1_txt" width="322" style="border: solid 1px #ccc">
                                                                        &nbsp;
                                                                    </td>
                                                                    <td>
                                                                        &nbsp;
                                                                    </td>
                                                                    <td width="72" style="border: solid 1px #ccc" class="ce" style="color: #333">
                                                                        浏览...
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        <asp:FileUpload ID="upimg1" runat="server" size="55" CssClass="inp4 self_inp4" ToolTip="jpg,jpeg,gif,bmp,png" />
                                                    </td>
                                                    <td style="padding-left: 8px">
                                                        <div id="thumbnailviewbox">
                                                            <asp:Literal ID="thumbnailview" runat="server"></asp:Literal></div>
                                                        <asp:HiddenField ID="thumbnail" runat="server" />
                                                    </td>
                                                </tr>
                                            </table>
                                            <style type="text/css">
                                                .self_inp4
                                                {
                                                    width: 393px; *width:400px;height:20px;*height:24px;filter:-moz-opacity:0;opacity:0;font-size:12px;}
                                                #CustomArea td
                                                {
                                                    padding-top: 5px;
                                                }
                                                #CustomArea .self_custom_inp
                                                {
                                                    font-size: 12px;
                                                    padding-left: 6px;
                                                }
                                            </style>

                                            <script type="text/javascript">
                                     if (navigator.userAgent.indexOf('Firefox') >= 0){document.getElementById("upimg1").style.width="400px";  document.getElementById("upimg1").style.height="24px";}
                                            </script>

                                        </td>
                                    </tr>
                                 
                             
                                    <tr>
                                        <td class="tt">
                                            优惠券介绍：
                                        </td>
                                        <td>
                                            <%@ register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
                                            <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/s/tool/fck/" Height="400"
                                                Width="620" ToolbarSet="Basic">
                                            </FCKeditorV2:FCKeditor>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            <b>有效期限：</b>
                                        </td>
                                        <td><div style="width:300px"><asp:TextBox ID="endtime" runat="server" MaxLength="10" CssClass="inp4" Width="120" style="float:left"></asp:TextBox>
                                        <div class="clear"></div></div>
                                            
                                        </td>
                                    </tr>
                              
                                 
                                    <tr>
                                        <td class="tt">
                                            醒目设置：
                                        </td>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:DropDownList ID="istop" runat="server" Width="98" CssClass="">
                                                            <asp:ListItem></asp:ListItem>
                                                            <asp:ListItem Value="1">信息置顶</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td style="padding-left: 5px">
                                                        <asp:DropDownList ID="isred" runat="server" Width="98" CssClass="">
                                                            <asp:ListItem></asp:ListItem>
                                                            <asp:ListItem Value="1">标题套红</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td width="440" style="padding-left: 8px">
                                                        <div style="margin-top: -12px">
                                                            <span class="msgon" style="float: none">
                                                                <asp:Literal ID="Literal_remaining" runat="server" Visible="false"><a href="chongzhi.aspx" style="color:#ff6600" target="_blank">您的余额不足，请充值！</a></asp:Literal>信息置顶需花费<%=ZK.isTopMoneyCost %>金币，标题套红需花费<%=ZK.isRedMoneyCost %>金币。</span>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr id="VCBOX">
                                        <td class="tt">
                                            <b>验证码：</b><%=WMcompare.IsEqual(ZK.config("switchvalidatecode1"), "0", "<script type=\"text/javascript\">document.getElementById(\"VCBOX\").style.display=\"none\";</script>", "")%>
                                        </td>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:TextBox ID="vc" runat="server" MaxLength="4" CssClass="inp4" Width="60" onkeyup="if(this.value.length>0)check_vc();"></asp:TextBox>
                                                    </td>
                                                    <td style="padding-left: 5px; width: 300px">
                                                        <img src="/s/tool/fun/ValidateCode.aspx?type=en&len=4&height=24&str=&cookie=vc_user_coupons_do"
                                                            title="点击刷新验证码" onclick="this.src='/s/tool/fun/ValidateCode.aspx?type=en&len=4&height=24&str=&cookie=vc_user_coupons_do&rd'+Math.random()"
                                                            style="cursor: pointer" align="absmiddle" /><span id="msg_vc" style="margin-left: 10px"><span
                                                                class="msgon">请输入验证码！</span></span>
                                                    </td>
                                                </tr>
                                            </table>

                                            <script type="text/javascript">
function check_vc(){if(document.getElementById("vc").value!=""){
ContinueMake=0;ajax("get","/s/tool/fun/ValidateCode.aspx?act=check&cookie=vc_user_coupons_do&value="+base64en(document.getElementById("vc").value)+"&msg="+encodeURI("验证码输入不正确！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText.indexOf("验证码输入不正确！")!=-1)document.getElementById("msg_vc").innerHTML=xmlHttp.responseText;else document.getElementById("msg_vc").innerHTML="";ContinueMake=1;}});
}}
                                          
                                          
                                            </script>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:Button ID="ButtonSubmit" runat="server" CssClass="but4" Text="确定发布" OnClick="ButtonSubmit_Click"
                                                OnClientClick="return check()" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" /><asp:Label ID="Label1" runat="server" Visible="false"><span
                                                style="margin-left: 10px"><span class="msgon">您不是VIP会员无权发布优惠券，只有VIP会员才拥有此权限，请<a href="vip.aspx" target="_blank" style="color:#f60">升级成为VIP</a>会员！</span></span></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        
          
    <script type="text/javascript" src="/skin/public/calendar/js/mootools.js"></script>
	<script type="text/javascript" src="/skin/public/calendar/js/calendar.rc4.js"></script>
	<%--<script type="text/javascript">window.addEvent('domready',function(){myCal1 = new Calendar({endtime: 'Y-m-d' }, { direction: 1, tweak: {x: 6, y: 0} });});</script>--%>
	<script type="text/javascript">window.onload=function(){myCal1 = new Calendar({endtime: 'Y-m-d' }, { direction: 1, tweak: {x: 6, y: 0} });}</script>
	<link rel="stylesheet" type="text/css" href="/skin/public/calendar/css/calendar.css" />                               
    <style type="text/css">button.calendar{margin-left:4px; margin-top:1px;}</style>                                       
                                            
     </form><UC:foot ID="foot1" runat="server" /></div></body></html><script src="city.aspx"></script>
