<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="conn.asp"-->
<!--#include file="common.asp"-->
<!--#include file="md5.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK href="css.css" type=text/css rel=stylesheet>
<%
if session("L_username")="" or session("L_userid")="" then
	response.write "您还没有登录"
	response.end
end if
%>
<%
dim SiteName
dim SiteURL
dim Y_Logo
dim Y_Alt

dim MasterName
dim Email
dim PageWidth
dim Unit

dim IsSort

dim PR
dim Alexa
dim GOOGLE
dim BaiDu

dim IsConfirm
dim IsVerify
dim IsActivation
dim SpecialNote
dim OrderBy
dim MaxPerPage
dim LogoWidth
dim LogoHeight

dim WordsCount
dim AltCount

dim RadEmail
dim RadQQ
dim RadMSN
dim RadTel
dim RadFax
dim RadMobileTel

dim IsUpload

sql="select * from setting"
set rs=conn.execute (sql)
if not rs.eof then
	SiteName=rs("SiteName")
	SiteURL=rs("SiteURL")
	MasterName=rs("MasterName")
	Email=rs("Email")
	Y_Logo=rs("L_Logo")
	Y_Alt=rs("L_Alt")
	
	PageWidth=rs("PageWidth")
	Unit=rs("Unit")
	
	IsSort=rs("IsSort")
	
	PR=rs("PR")
	Alexa=rs("Alexa")
	GOOGLE=rs("GOOGLE")
	BaiDu=rs("BaiDu")
	
	IsConfirm=rs("IsConfirm")
	IsVerify=rs("IsVerify")
	IsActivation=rs("IsActivation")
	SpecialNote=rs("SpecialNote")
	OrderBy=rs("OrderBy")
	MaxPerPage=rs("MaxPerPage")
	LogoWidth=rs("LogoWidth")
	LogoHeight=rs("LogoHeight")
	
	WordsCount=rs("WordsCount")
	AltCount=rs("AltCount")
	
	RadEmail=rs("RadEmail")
	RadQQ=rs("RadQQ")
	RadMSN=rs("RadMSN")
	RadTel=rs("RadTel")
	RadFax=rs("RadFax")
	RadMobileTel=rs("RadMobileTel")

	IsUploadLogo=rs("IsUploadLogo")
	
	rs.close
end if

dim username
dim L_email
dim L_SiteName
dim L_SiteURL
dim L_Logo
dim L_Alt
dim L_MyLink

dim jointime
dim goin
dim goinToday
dim goout
dim gooutToday
dim inToday
dim outToday

dim OwnerClass

sql="select * from link where ID="&session("L_userid")
set rs=conn.execute (sql)
if not rs.eof then
	username=rs("username")
	
	L_email=rs("email")
	L_QQ=rs("QQ")
	L_MSN=rs("MSN")
	L_Tel=rs("Tel")
	L_Fax=rs("Fax")
	L_MobileTel=rs("MobileTel")
	
	L_SiteName=rs("Y_SiteName")
	L_SiteURL=rs("Y_SiteURL")
	L_Logo=rs("Y_Logo")
	L_Alt=rs("Y_Alt")
	L_MyLink=rs("Y_MyLink")
	
	jointime=rs("jointime")
	goin=rs("goin")
	goinToday=rs("goinToday")
	goout=rs("goout")
	gooutToday=rs("goin")
	inToday=rs("inToday")
	outToday=rs("outToday")
	OwnerClass=rs("OwnerClass")
	rs.close
end if

if L_Logo="" then
	L_Logo="http://"
end if

link="http://"&request.ServerVariables("HTTP_HOST")&_
	replace(request.ServerVariables("URL"),"useradmin.asp","linkforward.asp")&_
	"?friendid="&(username)
	
wordlink="<a href="""&link&""" target=_blank title="""&Y_Alt&""">"&SiteName&"</a>"
logolink="<a href="""&link&""" target=_blank><img border=0 src="""&Y_Logo&""" alt="""&Y_Alt&"""></a>"

%>

<%
if request("operate")=1 then
	Call submit1()
end if
if request("operate")=2 then
	Call submit2()
end if
if request("operate")=3 then
	Call submit3()
end if

sub submit3
	sql="update link set GoTop='"&now()&"' where ID="&session("L_userid")
	conn.execute(sql)
	response.write("<script>alert('提交成功,合作愉快!');document.URL='useradmin.asp#3';</script>")
end sub

sub submit2
	sql="delete * from link where ID="&session("L_userid")
	conn.execute(sql)
	response.write("<script>alert('删除成功,希望还有合作机会!');document.URL='default.asp';</script>")
end sub

sub submit1
	L_email=trim(replace(request("email"),"'",""))
	L_QQ=trim(replace(request("QQ"),"'",""))
	L_MSN=trim(replace(request("MSN"),"'",""))
	L_Tel=trim(replace(request("Tel"),"'",""))
	L_Fax=trim(replace(request("Fax"),"'",""))
	L_MobileTel=trim(replace(request("L_MobileTel"),"'",""))

	L_SiteName=trim(replace(request("L_SiteName"),"'",""))
	
	if IsSort=true then
		L_OwnerClass=Cint(request("OwnerClass"))
	end if
	
	passsword=trim(replace(request("passsword"),"'",""))
	repasssword=trim(replace(request("repasssword"),"'",""))
	
	L_Logo=trim(replace(request("L_Logo"),"'",""))
	L_Alt=trim(replace(request("L_Alt"),"'",""))
	
	L_SiteURL=trim(replace(request("L_SiteURL"),"'",""))
	L_MyLink=trim(replace(request("L_MyLink"),"'",""))
	
	if lcase(L_Logo)="http://" then
		L_Logo=""
	end if
	
	if L_SiteName="" or len(L_SiteURL)<13 or len(L_MyLink)<13 then
		response.write "<script>alert(""请填写必需信息"");window.history.back();</script>"
		response.end		
	end if
		
	if not IsRightUrl(L_SiteURL) or not IsRightUrl(L_MyLink) then
		response.write "<script>alert('错误的URL格式!');window.history.back();</script>"
		response.end
	end if
	
	if L_Logo<>"" then
		if not IsRightUrl(L_Logo) then
			response.write "<script>alert('错误的URL格式!');window.history.back();</script>"
			response.end
		end if
	end if
	
	L_QQ=trim(replace(request("QQ"),"'",""))
	L_MSN=trim(replace(request("MSN"),"'",""))
	L_Tel=trim(replace(request("Tel"),"'",""))
	L_Fax=trim(replace(request("Fax"),"'",""))
	L_MobileTel=trim(replace(request("MobileTel"),"'",""))
	
	sql="update link set"&_
		" email='"&L_email&"',QQ='"&L_QQ&"',MSN='"&L_MSN&"',Tel='"&L_Tel&"',Fax='"&L_Fax&"',MobileTel='"&L_MobileTel&"',"&_
		" Y_SiteName='"&L_SiteName&"', Y_SiteURL='"&L_SiteURL&"', Y_Logo='"&L_Logo&"', Y_Alt='"&L_Alt&"', Y_MyLink='"&L_MyLink&"'"	
	if passsword<>"" then
		if passsword<>repasssword then
			response.write "<script>alert(""两次输入的密码不一致!"");window.history.back();</script>"
			response.end		
		end if
		sql=sql&", passsword='"&md5(passsword)&"'"
	else
		sql=sql&""
	end if
	
	if GetWordsCount(L_SiteName)>WordsCount then
		response.write "您的站点的名称字数< "&GetWordsCount(L_SiteName)&" >大于系统规定字数< "&WordsCount&" >"
		response.end
		exit sub		
	end if
	
	if GetWordsCount(L_Alt)>AltCount then
		response.write "您的站点的介绍字数< "&GetWordsCount(L_Alt)&" >大于系统规定字数< "&AltCount&" >"
		response.end
		exit sub
	end if
	
	'第一步,判断我站链接所在位置和申请的链接是否为同一域
	'if left(Y_SiteURL,7)<>"http://" then
	'	response.write "请注意您的URL格式,应以http://开头。"
	''	exit sub		
	'end if
	'Y_SiteURY_Arr=Split(Y_SiteURL,"/")
	'Y_MyLink_Arr=Split(Y_MyLink,"/")
	'if Y_SiteURY_Arr(2)<>Y_MyLink_Arr(2) then
	'	response.write "申请友情链接的域和我站链接代码不在同一个域内。"
	''	response.end
	'	exit sub		
	'end if
	
	'第二步,判断是否已经添加了我站链接代码
	if IsConfirm=true then
		url=L_MyLink
		wstr=getHTTPPage(url,"gb2312") 

		if not Instr(lcase(wstr),lcase("<a href=""http://"&request.ServerVariables("HTTP_HOST")&replace(request.ServerVariables("URL"),"useradmin.asp","linkforward.asp")))>0 then
			response.write "<script>alert('对不起!没有在贵站的指定的位置上发现我站的链接代码。\n请首先在贵站添加我站的链接代码,谢谢。');window.history.back();</script>"
			response.end
			exit sub		
		end if
	end if
		
	'第三步,判断我站链接所在网页页面的PR值
	if PR>0 then
		L_MyLink_PR=getPR(L_MyLink)
		if L_MyLink_PR< PR then
			response.write "<script>alert('对不起,我站的链接代码所在页面PR值<"&L_MyLink_PR&">不符合我站的要求<"&PR&">。');window.history.back();</script>"
			response.end		
		end if
	end if

	'第四步,判断我站链接所在网页的所属域名的Alexa排名
	if Alexa>0 then
		L_MyLink_Alexa=getAlexa(L_MyLink)
		if CDbl(Alexa)<CDbl(L_MyLink_Alexa) then
			response.write "<script>alert('对不起,贵站的Alexa世界排名值<"&RW(L_MyLink_Alexa)&">不符合我站的要求<"&Alexa&">。');window.history.back();</script>"
			response.end		
		end if
	end if

	L_MyLinkArr=split(L_MyLink,"/")
	L_MyLink_Get=L_MyLinkArr(2)
	'第五步,判断GOOGLE收录情况
	if GOOGLE>0 then
		L_MyLink_GOOGLE=getGOOGLE(L_MyLink_Get)
		if CDbl(L_MyLink_GOOGLE)<CDbl(GOOGLE) then
			response.write "<script>alert('对不起,贵站的GLLGLE的收录数量<"&L_MyLink_GOOGLE&">不符合我站的要求<"&GOOGLE&">。');window.history.back();</script>"
			response.end		
		end if
	end if
	
	'第六步,判断BaiDu收录情况
	if BaiDu>0 then
		L_MyLink_BaiDu=getBaiDu(L_MyLink_Get)	
		if CDbl(L_MyLink_BaiDu)<CDbl(BaiDu) then
			response.write "<script>alert('对不起,贵站的BaiDu的收录数量<"&L_MyLink_BaiDu&">不符合我站的要求<"&BaiDu&">。');window.history.back();</script>"
			response.end		
		end if
	end if
	
	if request("OwnerClass")<>"" then
		OwnerClass=request("OwnerClass")
	else
		OwnerClass=0
	end if
	
	InfoStr=""
	if PR>0 then InfoStr=InfoStr&",PR="&L_MyLink_PR&",PRDate='"&now()&"'"
	if Alexa>0 then InfoStr=InfoStr&",Alexa="&L_MyLink_Alexa&",AlexaDate='"&now()&"'"
	if GOOGLE>0 then InfoStr=InfoStr&",GOOGLE="&L_MyLink_GOOGLE&",AlexaDate='"&now()&"'"
	if BaiDu>0 then InfoStr=InfoStr&",BaiDu="&L_MyLink_BaiDu&",AlexaDate='"&now()&"'"
	sql=sql&InfoStr& ",OwnerClass="&OwnerClass&" where ID="&session("L_userid")
	conn.execute (sql)
	response.write "<script>alert(""操作成功!"");document.URL=""useradmin.asp#1"";</script>"
end sub
%>
<title><%response.write SiteName&"-自助友情链接系统 V1.7 - Power By DATA100.NET"%></title>
<script>
function CloseOpen(Num){
	var CurrObj=eval("Tab"+Num);
	if (CurrObj.style.display!="none"){
		CurrObj.style.display="none";
		window.event.srcElement.src="img/collapsed_yes.gif"
	} else {
		CurrObj.style.display="";
		window.event.srcElement.src="img/collapsed_no.gif"
	}
}

function submitform(Num){
	var CurrForm=eval("form"+Num);
	if (Num!=6 && Num!=2 && Num!=3)
		if (checkform(CurrForm)==false) return false;
	CurrForm.action="useradmin.asp";
	CurrForm.method="post";
	CurrForm.submit();
}

function checkform(CurrForm){
	for(i=0;i<CurrForm.elements.length;i++){
		if (CurrForm.elements[i].value=="" || CurrForm.elements[i].value=="http://"){
			if (CurrForm.elements[i].MustBe==3){
				alert("请添加必需信息。");
				CurrForm.elements[i].focus();
				return false;
			}
		}
	}
	if (CurrForm.passsword.value!=CurrForm.repasssword.value){
		alert("两次输入的密码不致。");
		CurrForm.repasssword.focus();
		return false;
	}
}

function openurl(){
	var width,height,left,top;
	width=500;
	height=200;
	left=screen.Width/2-width/2;
	top=(screen.Height-25)/2-height/2;
	window.open ('data100_net_uplogo.asp', 'uplogo', 'height='+height+', width='+width+', top='+top+', left='+left+', toolbar=no, menubar=no,scrollbars=no,resizable=no,location=no, statu s=no')	
}

</script>

</head>
<body>

<table  border="0" align="center" cellpadding="0" cellspacing="0" width="<%=PageWidth&Unit%>">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <table width="99%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
                <tr>
                  <td>&nbsp;当前用户: <%=session("L_username")%></td>
                  <td align="right"><a class="atitle" href="logout.asp">安全退出</a>&nbsp; </td>
                </tr>
              </table>
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <!--隐藏与显示-->
			<table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
            </table></td>
        </tr>
    </table>
      <a name="1" id="1"></a>
      <br>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
      <form id="form5" name="form5">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <table width="99%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
                <tr>
                  <td>&nbsp;修改信息</td>
                  <td align="right">
				  <img height="15" src="img/collapsed_no.gif" width="15" style="cursor: hand;" onClick="CloseOpen(1)">&nbsp; </td>
                </tr>
              </table>
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab1">

                <tr bgcolor="#FFFFFF">
                  <td height="20">密码<%=MustBe%>:</td>
                  <td><input name="passsword" type="password" id="passsword" size="50" maxlength="20" style="width:350px;" MustBe=2>
                  (用于更改密码,不更改密码请<font color="#cc0000">留空</font>)</td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20">确认密码<%=MustBe%>:</td>
                  <td><input name="repasssword" type="password" id="repasssword" size="50" maxlength="20" style="width:350px;" MustBe=2>
                  (用于更改密码,不更改密码请<font color="#cc0000">留空</font>)</td>
                </tr>
                <%if RadEmail>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">电子邮箱
                      <%if RadEmail>2 then response.write MustBe%>
                    :</td>
                  <td><input name="email" type="text" id="email" style="width:350px;" value="<%=L_email%>" size="50" maxlength="80" MustBe=<%=RadEmail%>></tr>
                <%end if%>
                <%if RadQQ>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">QQ
                      <%if RadQQ>2 then response.write MustBe%>
                    :</td>
                  <td><input name="QQ" type="text" id="QQ" style="width:350px;" value="<%=L_QQ%>" size="50" maxlength="80" MustBe=<%=RadQQ%>></tr>
                <%end if%>
                <%if RadMSN>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">MSN
                      <%if RadMSN>2 then response.write MustBe%>
                    :</td>
                  <td><input name="MSN" type="text" id="MSN" style="width:350px;" value="<%=L_MSN%>" size="50" maxlength="80" MustBe=<%=RadMSN%>></tr>
                <%end if%>
                <%if RadTel>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">电话
                      <%if RadTel>2 then response.write MustBe%>
                    :</td>
                  <td><input name="TEL" type="text" id="TEL" style="width:350px;" value="<%=L_TEL%>" size="50" maxlength="80" MustBe=<%=RadTel%>></tr>
                <%end if%>
                <%if RadFax>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">传真
                      <%if RadFax>2 then response.write MustBe%>
                    :</td>
                  <td><input name="FAX" type="text" id="FAX" style="width:350px;" value="<%=L_Fax%>" size="50" maxlength="80" MustBe=<%=RadFax%>></tr>
                <%end if%>
                <%if RadMobileTel>1 then%>
                <tr bgcolor="#e9effe">
                  <td height="20">手机
                      <%if RadMobileTel>2 then response.write MustBe%>
                    :</td>
                  <td><input name="MobileTel" type="text" id="MobileTel" style="width:350px;" value="<%=L_MobileTel%>" size="50" maxlength="80" MustBe=<%=RadMobileTel%>></tr>
                <%end if%>
                <!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
                <tr bgcolor="#FFFFFF">
                  <td width="35%" height="20">贵网站名称<%=MustBe%>:</td>
                  <td><input name="L_SiteName" type="text" id="L_SiteName" style="width:350px;" value="<%=L_SiteName%>" maxlength="200" MustBe=3>
                      <font color=cc0000>(少于<%=WordsCount%>字)</font></td>
                </tr>
                <%if IsSort=true then%>
                <tr bgcolor=#FFFFFF>
                  <td height="20">站点所属类别<%=MustBe%>:</td>
                  <td><select name="OwnerClass" id="OwnerClass" style="width:350px;" MustBe=3>
                      <%
			sql="select * from linkclass "
			set rs=conn.execute (sql)
			if not rs.eof then
				while not rs.eof
			%>
                      <option value=<%=rs("ID")%> <%if int(OwnerClass)=int(rs("ID")) then response.write " selected" end if%> ><%=rs("ClassName")%></option>
                      <%
				rs.movenext
				wend
				rs.close
			end if
			%>
                  </select>                  </td>
                </tr>
                <%end if%>
                <tr bgcolor="#FFFFFF">
                  <td height="20">LOGO图片地址:</td>
                  <td><input name="L_Logo" type="text" id="L_Logo" value="<%=L_Logo%>" maxlength="200" style="width:350px;" MustBe=2>
                      <%if IsUploadLogo then%>
                      <input type="button" name="uploadlogo" style="height:20px;" value="上传LOGO" onClick="openurl('upload')" MustBe=1>
                      <%end if%>                  </td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20">网站简介:</td>
                  <td><textarea name="L_Alt" rows="5" id="L_Alt" style="width:350px;" MustBe=2><%=L_Alt%></textarea>
                      <font color=cc0000>(少于<%=AltCount%>字)</font></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20">您希望我站链接到贵站哪个地址<%=MustBe%>:</td>
                  <td><input name="L_SiteURL" type="text" id="L_SiteURL" value="<%=L_SiteURL%>" maxlength="200" style="width:350px;" MustBe=3></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20">我站的链接代码在贵站哪个位置<%=MustBe%>:</td>
                  <td><input name="L_MyLink" type="text" id="L_MyLink" value="<%=L_MyLink%>"maxlength="200" style="width:350px;" MustBe=3></td>
                </tr>
                <tr align="center" bgcolor="#FFFFFF">
                  <td height="20" colspan="2"><input type="button" name="Submit2" value=" 确定修改 " onClick="submitform(5)">
                    <input name="operate" type="hidden" id="operate" value=1></td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
            </table></td>
        </tr>
      </form >
    </table>
    <a name="2" id="2"></a>
    <br>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <table width="99%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
                <tr>
                  <td>&nbsp;您的代码(请放到贵站的指定页面上)</td>
                  <td align="right"><img height="15" src="img/collapsed_no.gif" width="15"  style="cursor: hand;" onClick="CloseOpen(2)">&nbsp; </td>
                </tr>
              </table>
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab2">
                <tr bgcolor="#FFFFFF">
                  <td width="50%" height="20"><strong>文字链接</strong>:</td>
                  <td><strong>图片链接</strong>:</td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20"><%=wordlink%></td>
                  <td><%=logolink%></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20"><font color=red><strong>标准代码:</strong></font><br>
                      <textarea cols="50" name="textarea2" rows="6"><%=wordlink%></textarea></td>
                  <td><font color=red><strong>标准代码:</strong></font><br>
                      <textarea cols="50" name="textarea" rows="6"><%=logolink%></textarea></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20"><font color=red><strong>指导代码:</strong></font><br>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td>网站名称:</td>
                          <td><input name="Y_SiteName" type="text" value="<%=SiteName%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>站点地址:</td>
                          <td><input name="Y_SiteURL" type="text" value="<%=link%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>站点说明:</td>
                          <td><input name="Y_Alt" type="text" value="<%=Y_Alt%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>LOGO:</td>
                          <td><input name="Y_Logo" type="text" size="50" maxlength="80" readonly></td>
                        </tr>
                    </table></td>
                  <td><font color=red><strong>指导代码:</strong></font><br>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td>网站名称:</td>
                          <td><input name="Y_SiteName" type="text" value="<%=SiteName%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>站点地址:</td>
                          <td><input name="Y_SiteURL" type="text" value="<%=link%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>站点说明:</td>
                          <td><input name="Y_Alt2" type="text" value="<%=Y_Alt%>" size="50" maxlength="80" readonly></td>
                        </tr>
                        <tr>
                          <td>LOGO:</td>
                          <td><input name="Y_Logo2" type="text" value="<%=Y_Logo%>" size="50" maxlength="80" readonly></td>
                        </tr>
                    </table></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="20" colspan="2">※ 如果您的站点也使用类似的友情链接系统,可以按照指导代码添加链接</td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
            </table></td>
        </tr>
    </table>
        <a name="3" id="3"></a><br>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <table width="99%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
                <tr>
                  <td>&nbsp;撤消/提前我的链接</td>
                  <td align="right"><img height="15" src="img/collapsed_no.gif" width="15" style="cursor: hand;" onClick="CloseOpen(3)">&nbsp; </td>
                </tr>
              </table>
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
              </table>
              <!--隐藏与显示-->
              <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab3"><form name="form2">
                <tr bgcolor="#FFFFFF">
                  <td height="20"><input type="button" name="Submit" value=" 确定撤消 " onClick="submitform(2)">
                  <input name="operate" type="hidden" id="operate" value=2>
                  本操作用于从本系统中删除您的账户及贵站的链接信息,请谨慎!</td>
                </tr></form>
				<form name="form3">
                <tr bgcolor="#FFFFFF">
                  <td height="20"><input type="button" name="Submit" value=" 确定提前 " onClick="submitform(3)">
                  <input name="operate" type="hidden" id="operate" value=3>
                  将您的链接提至最前.除置顶链接之外.</td>
                </tr></form>
              </table>
              <!--隐藏与显示-->
              <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td></td>
                </tr>
            </table></td>
        </tr>
    </table>
    <a name="4" id="4"></a><br>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
      <tr>
        <td bgcolor="#FFFFFF"><table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td></td>
            </tr>
          </table>
            <table width="99%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="698cc3" class="title">
              <tr>
                <td>&nbsp;彼此贡献统计</td>
                <td align="right"><img height="15" src="img/collapsed_no.gif" width="15" style="cursor: hand;" onClick="CloseOpen(4)">&nbsp; </td>
              </tr>
            </table>
            <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
            <!--隐藏与显示-->
            <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab4">
              <tr bgcolor="#FFFFFF">
                <td height="20">注册时间:</td>
                <td><%=jointime%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td width="35%" height="20">ܼ总计天数:</td>
                <td><%
				TotolDay=DateDiff("d",jointime,now)+1
				response.write TotolDay
				%></td>
              </tr>
			  <%
			  Rodgoin=Round(goin/TotolDay,2)
			  Rodgoin=CStr(Rodgoin)
			  if left(Rodgoin,1)="." then
			  	Rodgoin=0&Rodgoin
			  end if
			  
			  Rodgoout=Round(goout/TotolDay,2)
			  Rodgoout=CStr(Rodgoout)
			  if left(Rodgoout,1)="." then
			  	Rodgoout=0&Rodgoout
			  end if
			  
			  select case DateDiff("d",inToday,now)
				  case 0
					  LastGoInDay="今天"
				  case 1
					  LastGoInDay="昨天"
				  case 2
					  LastGoInDay="前天"
				 case else
					 LastGoInDay=year(inToday)&"-"&month(inToday)&"-"&day(inToday)
			  end select
			  select case DateDiff("d",outToday,now)
				  case 0
					  LastGoOutDay="今天"
				  case 1
					  LastGoOutDay="昨天"
				  case 2
					  LastGoOutDay="前天"
				 case else
					 LastGoOutDay=year(outToday)&"-"&month(outToday)&"-"&day(outToday)
			  end select
			  %>
              <tr bgcolor="#FFFFFF">
                <td height="20">由贵站点入至我站数量:</td>
                <td><%=goin%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="20">平均点入率:</td>
                <td><%=Rodgoin%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="20">最后点入:</td>
                <td><%=LastGoInDay%>&nbsp;<%=goinToday%></td>
              </tr>              <tr bgcolor="#FFFFFF">
                <td width="35%" height="20">由我站点出至贵站数量:</td>
                <td><%=goout%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td width="35%" height="20">平均点出率: </td>
                <td><%=Rodgoout%></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="20">最后点出: </td>
                <td><%=LastGoOutDay%>&nbsp;<%=gooutToday%></td>
              </tr>              <tr align="center" bgcolor="#FFFFFF">
                <td height="20" colspan="2">&nbsp;</td>
              </tr>
            </table>
            <!---->
            <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
          </table></td>
      </tr>
    </table>
        </td>
  </tr>
</table>
</body>
</html>