<%@ page language="C#" autoeventwireup="true" inherits="admin_manage_domainitem, localhost_deploy" %>
<%@ Register Src='../../common/formitem.ascx' TagName='formitem' TagPrefix='uc1' %>
<!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">
<title>域名重定向编辑页</title>
<link href='/admin/common/client.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' >
function checkOther()
{
	var re = new RegExp("^http://","ig");
	var b_tip=false;
	if($('R_Source').value!="")
	{
  	b_tip=!re.test($('R_Source').value);
  	if(b_tip)
  	{
  		$('spn_R_Source').innerHTML="<br />来源地址必须以“http://”开头。";
  	}
  }	
  
  var s_se="";
  for(i=0;i<3;i++)
  {
  	if($('frmitem').chkse[i].checked)
  	{
  		s_se+="1";
  	}
  	else
  	{
  		s_se+="0";
  	}
  }
  
  
  
  $('R_SE').value=s_se;
  
  return b_tip;
}
</script>
</head>
<body>
<br />
<%
	Formitem.Table="Sys_301DomainReWrite";
	Formitem.Head="域名301重定向";
	Formitem.Action="";
	Formitem.AddOther("@@Csharp.SetInputHidden('R_SE','##Table[\"User_Class\"].R_SE##')@@");
	Formitem.AddItem("@@Csharp.SetInputText('来源地址','R_Source','"+Formitem.ChooseValue("@@Table[\"Sys_301DomainReWrite\"].R_Source@@","http://"+Request.Url.Host+"/")+"','90','true','<br />来源地址和目标地址都可以是正则表达式。来源地址必须<br />以http://开头，以 / 结尾。')@@");
	Formitem.AddItem("@@Csharp.SetInputText('目标地址','R_Target','##Table[\"Sys_301DomainReWrite\"].R_Target##','90','true','')@@");
	Formitem.AddItem("<td  class='tright'>搜索引擎：</td><td  class='tleft'><input type='checkbox' name='chkse' id='chkse' />百度&nbsp;<input type='checkbox' id='chkse'  name='chkse'  />Google&nbsp; <input type='checkbox' id='chkse'  name='chkse' />Yahoo&nbsp;</td>");
%>	
<uc1:formitem ID='Formitem' runat='server' />
<script type='text/javascript' >
function GetSE()
{
	var s_se=$('R_SE').value;
	
  for(i=0;i<s_se.length;i++)
  {
  	
  	if(s_se.substr(i,1)=="1")
  	{
  		$('frmitem').chkse[i].checked=true;
  	}
  	else
  	{
  		$('frmitem').chkse[i].checked=false;
  	}
  }
}
GetSE();
</script>
</body>
</html>   
