<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp" %>
<%@include file="/inc/checklogin.jsp" %>
<%@include file="inc/header.jsp" %>
<div id="c">
<%@include file="inc/left.jsp" %>
<div id="right">
<%@include file="inc/position.jsp" %>
<div class="right">
<div id="right_box">
<script type="text/javascript">
function checkform(){
	if(document.modifyForm.ipcount.value<0){
		alert('不能输入小于0的数值！');
		document.modifyForm.ipcount.focus();
		return false;
	}else if(document.modifyForm.outemail.value!=""&&!checkEmail('outemail')){
		alert('发件邮箱不合法！请重新填写');
		document.modifyForm.outemail.focus();
		return false;
	}else if(document.modifyForm.inemail.value!=""&&!checkEmail('inemail')){
		alert('收件邮箱不合法！请重新填写');
		document.modifyForm.inemail.focus();
		return false;
	}else if(document.modifyForm.inemail2.value!=""&&!checkEmail('inemail2')){
		alert('备用邮箱不合法！请重新填写');
		document.modifyForm.inemail2.focus();
		return false;
	}else {
		return true;
	}
}
</script>
<form method="post" name="modifyForm" action="fun/F_config.jsp" onSubmit="return checkform();">
<input type="hidden" name="action" value="edit" />
<div class="tags">
  <div id="tagstitle"> <a id="one1" onClick="setTab('one',1,20)" class="hover" href="#">网站配置</a><!--<a href="javascript:void(0)" class="hover" style="margin-left:20px;" onclick="$('input').removeAttr('readonly');$('select').removeAttr('disabled');$('#submit01').removeAttr('disabled');">启用修改</a><a href="javascript:void(0)" class="btn_a" style=" margin-left:30px;" onClick="window.location.href='fun/F_config.jsp?action=init';">刷新配置</a>-->&nbsp;&nbsp;<input  type="button" name="initconfigbtn" value="刷新配置" onclick="window.location.href='fun/F_config.jsp?action=init';" style="height:35px; width:80px; margin:0 0 0 20px;"/></div>
  <div id="tagscontent" class="right_box">
<div id="con_one_1"  >
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="table1">

<tr>
<td colspan="3" align="center"><strong><font color="#FF0000">必须保证以下填写的资料正确，否则可能会导致网址无法正常运行</font></strong></td>
</tr>
<tr>
<td width="19%" align="right">网站的顶级域名</td>
<td width="2%">&nbsp;</td>
<td width="79%">
 <input type="text" name="topdomain" id="topdomain" value="<%=Config.get("topdomain")%>"  class="input" />
 &nbsp;例如baidu.com，去掉http://或www或 / 等等</td>
</tr>
<tr>
<td width="19%" align="right">站点名称</td>
<td width="2%">&nbsp;</td>
<td width="79%">
<input type="text" name="sitename" id="sitename" value="<%=Config.get("sitename")%>"  class="input" /></td>
</tr>
<tr>
	<td width="19%" align="right">登陆验证码</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
		
		
		
		<select id="vcode" name="vcode" class="select">
		<option value="1" <%=Config.geti("vcode")==1?"selected":""%>>启用</option>
		<option value="0" <%=Config.geti("vcode")==0?"selected":""%>>停用</option>
		</select></td>
</tr>
<tr>
	<td width="19%" align="right">发件邮箱</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
		
		
		
		<input type="text" name="outemail" id="outemail" value="<%=Config.get("outemail")%>"  class="input" />&nbsp;推荐163邮箱</td>
</tr>
    

<tr>
<td width="19%" align="right">发件邮箱密码</td>
<td width="2%">&nbsp;</td>
<td width="79%">



                <input type="password" name="emailpassword" id="emailpassword" value="<%=Config.get("emailpassword")%>"  class="input" /></td>
       </tr>
    

<tr>
<td width="19%" align="right">收件邮箱</td>
<td width="2%">&nbsp;</td>
<td width="79%">
 <input type="text" name="inemail" id="inemail" value="<%=Config.get("inemail")%>"  class="input" />&nbsp;推荐163邮箱<a href="javascript:testemail('inemail');" class="btn_e" style="float:right;margin-right:80px;">测试</a></td>
</tr>
<tr>
<td width="19%" align="right">备用邮箱</td>
<td width="2%">&nbsp;</td>
<td width="79%">
 <input type="text" name="inemail2" id="inemail2" value="<%=Config.get("inemail2")%>"  class="input" />&nbsp;推荐163邮箱<a href="javascript:testemail('inemail2');" class="btn_e" style="float:right;margin-right:80px;">测试</a></td>
</tr>
<tr>
	<td width="19%" align="right">启用短信功能</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
		<select id="usesms" name="usesms" class="select">
		<option value="1" <%=ConfigUtil.usesms?"selected":""%>>启用</option>
		<option value="0" <%=!ConfigUtil.usesms?"selected":""%>>停用</option>
		</select>&nbsp;因运营商接口各异，如需添加调整此功能(付费)，请联系作者QQ：<a href="http://wpa.qq.com/msgrd?v=3&amp;uin=86827185&amp;site=qq&amp;menu=yes" target="_blank">86827185</a></td>
</tr>
<tr>
	<td width="19%" align="right">接收订单短信手机</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
		<input type="text" name="noticephone" id="noticephone" value="<%=Config.get("noticephone")%>"  class="input" />&nbsp;&nbsp;为空即不启用此功能</td>
</tr>
<tr>
	<td width="19%" align="right">启用删除功能</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
		<select id="usedel" name="usedel" class="select">
		<option value="1" <%=Config.geti("usedel")==1?"selected":""%>>启用</option>
		<option value="0" <%=Config.geti("usedel")==0?"selected":""%>>停用</option>
		</select>
	</td>
</tr>
<tr>
	<td width="19%" align="right">限制IP购买次数</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
	<input name="ipcount" type="text"  class="input" id="ipcount" value="<%=Config.get("ipcount")%>" maxlength="3" title="建议填写4次即可" />
	&nbsp;&nbsp;0为不限制（一天内／同一IP）</td>
</tr>
<tr>
	<td width="19%" align="right">启用un编码模式</td>
	<td width="2%">&nbsp;</td>
	<td width="79%">
	<select id="unicode" name="unicode" class="select">
		<option value="1" <%=Config.geti("unicode")==1?"selected":""%>>启用</option>
		<option value="0" <%=Config.geti("unicode")==0?"selected":""%>>停用</option>
		</select> &nbsp;&nbsp;防止被电脑防护软件警告欺诈</td>
</tr>
<tr>
	<td colspan="3" align="center"><a href="PayTypeEdit.jsp?payid=2" target="_blank">配置支付宝</a></td>
	</tr>
</table>
   </div>
      </div>
</div>
<input id="submit01" type="submit" name="submit" value=" 提交 " class="btn_a" />
</form>

<div class="clear"></div>
</div>
</div>

<div class="right_bottom">
</div>
</div>

<div id="footer">
</div>
</div>
<script language="javascript">
function testemail(email){
	    if(!checkEmail(email)){
			alert('请输入合法的邮件地址');	
			return;
		}
		$.ajax({
		contentType: "application/x-www-form-urlencoded; charset=utf-8", 
		url:'/msg.do',
		async:false,
		data:'action=testemail&email='+$("#"+email).val(),
		type:'POST',
		success:function(html){
		alert($.trim(html));
		}
		})
	}
</script>
<%@include file="inc/msg.jsp" %>
<%@include file="inc/footer.jsp" %>
