<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.Master" AutoEventWireup="true" CodeBehind="ShopConfigAdd.aspx.cs" Inherits="SocoShop.Web.Admin.ShopConfigAdd" %>
<%@ Register Assembly="SkyCES.EntLib" Namespace="SkyCES.EntLib" TagPrefix="SkyCES"%>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>基础配置</div>
<div  class="listBlock">
    <ul>
        <li class="listOn" id="TitleDefault" onclick="SwitchBlock('Default')">基本设置</li>
        <li id="TitleProduct" onclick="SwitchBlock('Product')">产品设置</li>
        <li id="TitleUser" onclick="SwitchBlock('User')">用户设置</li>
        <li id="TitleEmail" onclick="SwitchBlock('Email')">Email设置</li>
    </ul>	
</div>
<div class="line"></div>
<div class="add"  id="ContentDefault">
    <ul>
		<li class="left">标题：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Title" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">版权：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Copyright" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">作者：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Author" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">关键字：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Keywords" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">描述：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Description" TextMode="MultiLine" Height="50px" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">验证码类型：</li>
		<li class="right"><asp:RadioButtonList ID="CodeType" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="1" Selected="True">纯数字</asp:ListItem><asp:ListItem Value="2">纯字母</asp:ListItem><asp:ListItem Value="3">数字字母混合</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">验证码长度：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="CodeLength" runat="server" CanBeNull="必填"  RequiredFieldType="数据校验"/></li>
		<li class="left">验证码杂点数：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="CodeDot" runat="server" CanBeNull="必填"  RequiredFieldType="数据校验"/></li>
	</ul>
	<ul>
		<li class="left">开始年份：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="StartYear" runat="server" CanBeNull="必填"  RequiredFieldType="数据校验"/></li>

		<li class="left">结束年份：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="EndYear" runat="server" CanBeNull="必填"  RequiredFieldType="数据校验"/></li>
	</ul>
	<ul>
		<li class="left">服务电话：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="Tel" runat="server" /></li>
			<li class="left">备案号：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="RecordCode" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">统计代码：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="StaticCode" runat="server" TextMode="MultiLine" Height="50px"/></li>
	</ul>	
	<ul>
		<li class="left">首页投票ID：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="VoteID" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
		<li class="left">容许匿名投票：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousVote" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">投票时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="200px" ID="VoteRestrictTime" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/>（秒）（少于等于0表示不限制）</li>
	</ul>	
	<ul>
		<li class="left">完成操作关闭弹窗：</li>
		<li class="right"><asp:RadioButtonList ID="SaveAutoClosePop" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不关闭</asp:ListItem><asp:ListItem Value="1">自动关闭</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">弹窗关闭后刷新：</li>
		<li class="right"><asp:RadioButtonList ID="PopCloseRefresh" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不刷新</asp:ListItem><asp:ListItem Value="1">自动刷新</asp:ListItem></asp:RadioButtonList></li>
	</ul>
</div>
<div class="add"  id="ContentProduct" style="display:none">
    <ul>
		<li class="left">产品库存系统：</li>    
		<li class="right"><asp:RadioButtonList ID="ProductStorageType" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="1" Selected="True">自身的库存系统</asp:ListItem><asp:ListItem Value="2">导入第三方的库存系统</asp:ListItem></asp:RadioButtonList></li>
	</ul>
    <ul>
		<li class="left">热门关键词：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="HotKeyword" runat="server"/></li>
	</ul>
	<ul>
		<li class="left">容许匿名评论：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousComment" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">评论默认状态：</li>
		<li class="right"><asp:RadioButtonList ID="CommentDefaultStatus" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="1" Selected="True">未处理</asp:ListItem><asp:ListItem Value="2">显示</asp:ListItem><asp:ListItem Value="3">不显示</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">评论时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="200px" ID="CommentRestrictTime" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/>（秒）（少于等于0表示不限制）</li>
	</ul>
	<ul>
		<li class="left">容许匿名支持/反对：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousCommentOperate" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">支持/反对时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="200px" ID="CommentOperateRestrictTime" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/>（秒）（少于等于0表示不限制）</li>
	</ul>
	<ul>
		<li class="left">容许匿名回复：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousReply" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">回复时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="200px" ID="ReplyRestrictTime" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/>（秒）（少于等于0表示不限制）</li>
	</ul>
	<ul>
		<li class="left">容许匿名提交标签：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousAddTags" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	<ul>
		<li class="left">提交标签时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="200px" ID="AddTagsRestrictTime" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/>（秒）（少于等于0表示不限制）</li>
	</ul>
	<ul>
		<li class="left">容许匿名购物：</li>
		<li class="right"><asp:RadioButtonList ID="AllowAnonymousAddCart" RepeatDirection="Horizontal" runat="server"><asp:ListItem Value="0" Selected="True">不容许</asp:ListItem><asp:ListItem Value="1">容许</asp:ListItem></asp:RadioButtonList></li>
	</ul>
</div>
<div class="add"  id="ContentUser" style="display:none">
    <ul>
		<li class="left">禁止注册用户名：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="ForbiddenName" runat="server"  TextMode="MultiLine" Height="80px"/> 多个名字之间用"|"隔开</li>
	</ul>
	<ul>
		<li class="left">密码长度：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="PasswordMinLength" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /> 到 <SkyCES:TextBox CssClass="input" Width="100px" ID="PasswordMaxLength" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
	</ul>
	<ul>
		<li class="left">用户名长度：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="UserNameMinLength" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /> 到 <SkyCES:TextBox CssClass="input" Width="100px" ID="UserNameMaxLength" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /></li>
	</ul>
	<ul>
		<li class="left">注册审核：</li>
		<li class="right"><asp:RadioButtonList ID="RegisterCheck" runat="server" RepeatDirection="Horizontal"><asp:ListItem Value="1" Selected="True">无需审核</asp:ListItem><asp:ListItem Value="2">邮件验证</asp:ListItem><asp:ListItem Value="3">人工审核</asp:ListItem></asp:RadioButtonList></li>
	</ul>
	 <ul>
		<li class="left">注册协议：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="Agreement" runat="server"  TextMode="MultiLine" Height="400px"/> </li>
	</ul>
	<ul>
		<li class="left">找回密码时间限制：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="100px" ID="FindPasswordTimeRestrict" runat="server" CanBeNull="必填" RequiredFieldType="数据校验" /> （小时） （-1表示不限制）</li>
	</ul>
</div>
<div class="add"  id="ContentEmail" style="display:none">
    <ul>
		<li class="left">用户名：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="EmailUserName" runat="server" /></li>
	</ul>
	<ul>
		<li class="left">密码：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="EmailPassword" runat="server"/></li>
	</ul>
	<ul>
		<li class="left">服务器地址：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="EmailServer" runat="server"/></li>
	</ul>
	<ul>
		<li class="left">端口号：</li>
		<li class="right"><SkyCES:TextBox CssClass="input" Width="400px" ID="EmailServerPort" runat="server" CanBeNull="必填" RequiredFieldType="数据校验"/></li>
	</ul>
	<ul>
		<li class="left">Email测试：</li>
		<li class="right">收件箱：<input  id="ToEmail" type="text" class="input"  style="width:200px"/> <input class="button" type="button" value="测试" onclick="testSendEmail()" /></li>
	</ul>
</div>
<div class="action">
    <asp:Button CssClass="button" ID="SubmitButton" Text=" 确 定 " runat="server" OnClick="SubmitButton_Click" />
</div>
<script language="javascript" type="text/javascript">
//发送email
function testSendEmail(){
    var emailUserName=o("ctl00_ContentPlaceHolder_EmailUserName").value;
    var emailPassword=o("ctl00_ContentPlaceHolder_EmailPassword").value;
    var emailServer=o("ctl00_ContentPlaceHolder_EmailServer").value;    
    var emailServerPort=o("ctl00_ContentPlaceHolder_EmailServerPort").value;
    var toEmail=o("ToEmail").value;
    var url="Ajax.aspx?Action=TestSendEmail&EmailUserName="+emailUserName+"&EmailPassword="+emailPassword+"&EmailServer="+emailServer+"&EmailServerPort="+emailServerPort+"&ToEmail="+toEmail;
    Ajax.requestURL(url,dealTestSendEmail);
}
function dealTestSendEmail(data){
    if(data=="ok"){
        alertMessage("发送成功");
    }
    else{
        alertMessage("发送失败");
    }
}
</script>
</asp:Content>
