<%@language="vbscript" codepage="936" %>
<%path="../basedata"%>
<!--#include file="../conn/conn_link.asp"-->
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call legalpower%>
<!-- #include file="../Inc/Head.asp" -->
<%
dim id,rs
id=request.querystring("id")
if not idboolean(id) then response.write errorback("发现有错,请返回刷新页面"):response.end
set rs=conn_link.execute("select * from url where url_id="&cint(id))
%>
<script language="VBscript">
function bytes2bstr(vin)
strReturn=""
for ij=1 to LenB(vin)
thischarcode=AscB(MidB(vin,ij,1))
if thischarcode < &H80 then
strReturn=strReturn & chr(thischarcode)
else
NextCharCode=AscB( MidB(vin,ij+1,1) )
strReturn=strReturn & chr( cLng(thischarcode) * &H100 + cint(NextCharCode) )
ij=ij+1
end if
next
bytes2bstr=strReturn
end function
</script>
<script language="javascript">
function xmlhttp(s)
{

var oBao;
if(window.ActiveXObject)
{

if(s != "")
{

	oBao=new ActiveXObject("Microsoft.XMLHTTP")
	oBao.Open("GET",s,false);
	oBao.setRequestHeader("CONTENT-TYPE","applicaton/x-www-form-urlencoded; charset=gb2312");
	oBao.send(null);

	if(oBao.Status == 200 && oBao.ReadyState == 4)
	{
	var xmlhttp=bytes2bstr(oBao.ResponseBody);
	return xmlhttp;

	}
	else
	{
	//alert("地址可能有误码,请检测!");
	var xmlhttp="地址可能有误码,请检测!";
	return xmlhttp;
	}
	oBao=null;
}
else
{
alert("指定地址未输入");
document.getElementById("dl_http").focus();
return "地址可能有误码,请检测!";
}
}
}
function SKhttp()
{
document.getElementById("dltest").value=xmlhttp(document.getElementById("dl_http").value);
}
</script>
<script language="javascript">
function batetest()
{
var dl_http=document.getElementById("dl_http").value;
var dl_into=document.getElementById("dl_into").value;
var dl_alins=document.getElementById("dl_alins").value;
var dl_endtail=document.getElementById("dl_endtail").value;
var dl_strart=document.getElementById("dl_strart").value;
var dl_end=document.getElementById("dl_end").value;
var dl_change_id1=escape(document.getElementById("dl_change_id1").value);
var dl_change_word1=escape(document.getElementById("dl_change_word1").value);
var dl_change_id2=escape(document.getElementById("dl_change_id2").value);
var dl_change_word2=escape(document.getElementById("dl_change_word2").value);
var change_value="";
if(dl_into=="")
{
alert("没有写入入口地址……");
document.getElementById("dl_into").focus();
return false;
}
if(dl_http=="")
{
alert("没有写入指定地址……");
document.getElementById("dl_http").focus();
return false;
}
if(dl_alins=="")
{
alert("没有写入指站别名……");
document.getElementById("dl_alins").focus();
return false;
}
for(i=1;i<3;i++)
{
if(eval('document.getElementById("dl_change_id'+i+'").value') != "" && new RegExp("[^0-9]").test(eval('document.getElementById("dl_change_id'+i+'").value')))
{
alert("变动字段只能写入数字……");
eval('document.getElementById("dl_change_id'+i+'")').focus();
return false;
}
}
if(dl_endtail.length < 1 || new RegExp("[^0-9]").test(dl_endtail))
{
alert("末尾指段只能写入数字……");
document.getElementById("dl_endtail").focus();
return false;
}
if(dl_strart=="")
{
alert("没有写入字符开始……");
document.getElementById("dl_strart").focus();
return false;
}
if(dl_end=="")
{
alert("没有写入字符结束……");
document.getElementById("dl_end").focus();
return false;
}
for(i=1;i<3;i++)
{
if(escape(document.getElementById("dl_change_id"+i).value)!="" && escape(document.getElementById("dl_change_word"+i).value)!=="")
{
var change_value=change_value+"&insert="+escape(document.getElementById("dl_change_id"+i).value)+"&str="+escape(document.getElementById("dl_change_word"+i).value);
}
}

var localurl="advanced_SZ.asp?http="+escape(dl_http)+"&into="+dl_into+"&id="+escape(dl_alins)+"&end="+escape(dl_endtail)+"&dlstart="+escape(dl_strart)+"&dlend="+escape(dl_end)+change_value+"&"+Math.random();;
//alert(xmlhttp(localurl));
//document.getElementById("bate_test").value=unescape(localurl);
document.scripts[0].src=localurl;
}
function check(s)
{
if(s.dl_into.value=="")
{
alert("没有写入入口地址……");
s.dl_into.focus();
return false;
}
if(s.dl_http.value=="")
{
alert("没有写入指定地址……");
s.dl_http.focus();
return false;
}
if(s.dl_alins.value=="")
{
alert("没有写入指站别名……");
s.dl_alins.focus();
return false;
}
if(s.dl_strart.value=="")
{
alert("没有写入字符开始……");
s.dl_strart.focus();
return false;
}
if(s.dl_end.value=="")
{
alert("没有写入字符结束……");
s.dl_end.focus();
return false;
}
for(ik=1;ik<3;ik++)
{
if(eval("s.dl_change_id"+ik+".value") != "" && new RegExp("[^0-9]").test(eval("s.dl_change_id"+ik+".value")))
{
alert("变动字段只能写入数字……");
eval("s.dl_change_id"+ik).focus();
return false;
}
}
if(s.dl_endtail.value.length < 1 || new RegExp("[^0-9]").test(s.dl_endtail.value))
{
alert("末尾指段只能写入数字……");
s.dl_endtail.focus();
return false;
}
}
</script>
<br/>
<div style="text-align:center;">
<table border="1" bordercolor="#A5B6D6" align="center" cellpadding="0" cellspacing="2">
<form method="post" action="advanced_Modify_save.asp?id=<%=id%>" name="form" onsubmit="return check(this)">
  <tr>
    <td colspan="6" height="25" class="southidc" align="center"> <strong>增加盗连地址</strong></td>
  </tr>
  <tr>
    <td width="80" height="20">入口地址</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_into"))%>" size="25" id="dl_into"  name="dl_into" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
    <td width="80">字符开始</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=replace(codedeHTML(rs("url_start")),"&nbsp;"," ")%>" size="25" id="dl_strart"  name="dl_strart" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
  </tr>
  <tr>
    <td height="20">指定地址</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_http"))%>" size="25" id="dl_http" size="30"  name="dl_http" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
    <td>字符结束</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=replace(codedeHTML(rs("url_end")),"&nbsp;"," ")%>" size="25" id="dl_end"  name="dl_end" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
  </tr>
  <tr>
    <td height="20">变动字段</td>
    <td width="100">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_change_id1"))%>" title="数字要大于2" size="10" id="dl_change_id1"  name="dl_change_id1" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
    <td width="120">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_change_word1"))%>" title="要是英文 或者 是数字" size="10" id="dl_change_word1"  name="dl_change_word1" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
    <td>变动字段</td>
    <td width="100">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_change_id2"))%>" title="数字要大于2" size="10" id="dl_change_id2"  name="dl_change_id2" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
    <td width="120">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_change_word2"))%>" title="要是英文 或者 是数字" size="10" id="dl_change_word2"  name="dl_change_word2" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
  </tr>
  <tr>
    <td height="20">末尾指段</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_endTail"))%>" size="20" id="dl_endtail"  name="dl_endtail" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
    <td>指站别名</td>
    <td colspan="2">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_alias"))%>" size="20" id="dl_alins"  name="dl_alins" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/><span style="color:#ff0000">*</span></td>
  </tr>
  <tr>
    <td height="20">代理Proxy</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Proxy"))%>"  size="55" id="dl_Proxy"  name="dl_Proxy" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：IP:端口</td>
  </tr>
  <tr>
    <td height="20">解码语言</td>
    <td colspan="5">&nbsp;<select id="dl_Languages"  name="dl_Languages">
	<option value='gb2312' <%if rs("url_Languages")="gb2312" then response.write "selected"%>>简体中文</option>
	<option value='big5' <%if rs("url_Languages")="big5" then response.write "selected"%>>繁体中文</option>
	<option value='Shift-jIS' <%if rs("url_Languages")="Shift-jIS" then response.write "selected"%>>日文</option>
	<option value='UTF-8' <%if rs("url_Languages")="UTF-8" then response.write "selected"%>>UTF-8</option>
	<option value='windows' <%if rs("url_Languages")="windows" then response.write "selected"%>>西欧默认</option>
	<option value='ISO' <%if rs("url_Languages")="ISO" then response.write "selected"%>>西欧Iso</option>
    </select><span style="color:#ff0000">*</span>
  </tr>
  <tr>
    <td height="20">Content_Type</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Content_Type"))%>"  size="55" id="dl_Content_Type"  name="dl_Content_Type" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：text/html</td>
  </tr>
  <tr>
    <td height="20">cookies</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_cookies"))%>"  size="55" id="dl_cookies"  name="dl_cookies" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
  </tr>
  <tr>
    <td height="20">浏览器语言</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Accept_Language"))%>"  size="20" id="dl_Accept_Language"  name="dl_Accept_Language" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：en-gb,zh-cn</td>
  </tr>
  <tr>
    <td height="20">User_Agent</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_User_Agent"))%>"  size="55" id="dl_User_Agent"  name="dl_User_Agent" value="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; aff-kingsoft-ciba; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
  </tr>
  <tr>
    <td height="20">Accept</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Accept"))%>"  size="20" id="dl_Accept"  name="dl_Accept" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：image/jpeg,*/*</td>
  </tr>
  <tr>
    <td height="20">Connection</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Connection"))%>"  size="20" id="dl_Connection"  name="dl_Connection" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：colse;Keep-Alive</td>
  </tr>
  <tr>
    <td height="20">Cache_Control</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Cache_Control"))%>"  size="20" id="dl_Cache_Control"  name="dl_Cache_Control" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：no-cache</td>
  </tr>
  <tr>
    <td height="20">Pragma</td>
    <td colspan="5">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_Pragma"))%>"  size="20" id="dl_Pragma"  name="dl_Pragma" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/>&nbsp;如：no-cache</td>
  </tr>
  <tr>
    <td height="20">测试结果</td>
    <td colspan="4">&nbsp;<input type="text" value="<%=codedeHTML(rs("url_dl_http"))%>" size="55" id="bate_test"  name="bate_test" onmouseover="this.style.background='#56FF10';" onmouseout="this.style.background='#ffffff'"/></td>
    <td align="center"><input type="button" value="测试" id=""  name="" onclick="return batetest()"/></td>
  </tr>
  <tr>
    <td colspan="6" height="20" align="center"><input type="submit" value="提交"></td>
  </tr>
  </form>
  <tr>
    <td height="25" colspan="6" class="back_southidc" align="center"><strong>代码</strong></td>
  </tr>
  <tr>
    <td height="327" colspan="6" style="padding:0 0;text-align:center;">
    <script src="../js/indexing.js" type="text/javascript"></script>
    <textarea cols="80" rows="20" id="dltest" name="dltest" style="background-color:#000000;color:#ffffff;margin:0 0 0 0;border:1px solid #999999;Overflow:auto;">无法查看源代码说明：Internet  选项--→internet 与 本地 interent --→自定义级别--→通过域访问数据源--→启动--→确定--→应用</textarea>
    </td>
  </tr>
  <tr>
    <td colspan="6" height="25" align="center">
    <input type="button" value="查看" id=""  name="" onclick="return SKhttp()" />
    </td>
  </tr>
</table>
</div>
<%
conn_link.close
set conn_link=nothing
%>
<!-- #include file="../Inc/Foot.asp" -->




