⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signup.asp

📁 直接在页面上使用标签加入友情链接站点,非使用跳转页面 ,可设置是否要求PR值验证,及所要求PR值大小,可设置是否要求Alexa排名验证,及所要求的Alexa排名次序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			end if
			%>
			</td>
          </tr>
          <tr align="center" bgcolor="#FFFFFF">
		  <form id="form2" name="form2">
            <td height="20" colspan="2">
			<input type="submit" name="Submit" value=" 下一步 " onClick="submitform(2)">
            <input name="step" type="hidden" id="step" value="2">

			<input name="username" type="hidden" id="step" value="<%=username%>">
			<input name="passsword" type="hidden" id="step" value="<%=passsword%>">
			<input name="email" type="hidden" id="step" value="<%=email%>">
			</td>
          </form></tr>
		  </table>
        <!--显示与隐藏的表格-->
        <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td></td>
          </tr>
      </table></td>
  </tr>
</table>
<br>
<%end sub%>

<%sub fullinfo%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#698CC3">
  <form id="form3" name="form3"><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">&nbsp; </td>
          </tr>
        </table>
        <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td></td>
          </tr>
        </table>
        <!--显示与隐藏的表格-->
		<%
		sql="select WordsCount,AltCount from setting"
		set rs=conn.execute (sql)
		if not rs.eof then
			WordsCount=rs("WordsCount")
			AltCount=rs("AltCount")
			rs.close
		end if
		%>
        <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="d6e0ef" style="display:" id="Tab3">
          <tr bgcolor="#FFFFFF">
            <td width="35%" height="20">贵网站名称:</td>
            <td><input name="Y_SiteName" type="text" id="Y_SiteName" size="60" maxlength="200">
            <font color=cc0000>(少于<%=WordsCount%>字)</font></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="20">LOGO图片地址:</td>
            <td><input name="Y_Logo" type="text" id="Y_Logo" value="http://" size="60" maxlength="200"></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="20">网站简介:</td>
            <td><textarea cols="43" name="Y_Alt" rows="5" id="Y_Alt"></textarea>
            <font color=cc0000>(少于<%=AltCount%>字)</font></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="20">您希望链接到贵站哪个地址:</td>
            <td><input name="Y_SiteURL" type="text" id="Y_SiteURL" value="http://" size="60" maxlength="200"></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="20">我站的链接代码在贵站哪个位置:</td>
            <td><input name="Y_MyLink" type="text" id="Y_MyLink" value="http://" size="60" maxlength="200">                            </td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="20" colspan="2">
			</td>
          </tr>
          <tr align="center" bgcolor="#FFFFFF">
            <td height="20" colspan="2">
			<input type="button" name="Submit" value=" 确 定 " onclick="submitform(3)">&nbsp;
			<input type="reset" name="Submit" value=" 重 设 ">
			<input name="step" type="hidden" id="step" value="3">
			
			<input name="username" type="hidden" id="step" value="<%=request("username")%>">
			<input name="passsword" type="hidden" id="step" value="<%=request("passsword")%>">
			<input name="email" type="hidden" id="step" value="<%=request("email")%>">
			</td>
          </tr>
        </table>
        <!--显示与隐藏的表格-->
        <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td></td>
          </tr>
      </table></td>
  </tr></form>
</table>
<br>
<%end sub%>

<%

sub intodb
	dim PR
	dim Alexa
	dim IsConfirm
	dim IsVerify
	dim IsActivation	
	dim WordsCount
	dim AltCount
	
	sql="select PR,Alexa,IsConfirm,IsVerify,IsActivation,WordsCount,AltCount,L_SiteURL from setting"
	set rs=conn.execute (sql)
	if not rs.eof then
		PR=rs("PR")
		Alexa=rs("Alexa")
		IsConfirm=rs("IsConfirm")
		IsVerify=rs("IsVerify")
		IsActivation=rs("IsActivation")
		WordsCount=rs("WordsCount")
		AltCount=rs("AltCount")
		L_SiteURL=rs("L_SiteURL")
		
		rs.close
	end if
	
	dim Y_SiteName
	dim Y_SiteURL
	dim Y_Logo
	dim Y_Alt
	dim Y_MyLink
	
	
	username=trim(replace(request("username"),"'",""))
	passsword=trim(replace(request("passsword"),"'",""))
	email=trim(replace(request("email"),"'",""))
	
	Y_SiteName=trim(replace(request("Y_SiteName"),"'",""))
	Y_Logo=trim(replace(request("Y_Logo"),"'",""))
	Y_Alt=trim(replace(request("Y_Alt"),"'",""))
	Y_SiteURL=trim(replace(request("Y_SiteURL"),"'",""))
	Y_MyLink=trim(replace(request("Y_MyLink"),"'",""))

	if Y_SiteName="" or Y_Logo="" or Y_Alt="" or Y_SiteURL="" or Y_MyLink="" then
		Errmsg = Errmsg+"<li>请填写必需信息。"
		Call ErrList(Errmsg)
		exit sub		
	end if
	
	if GetWordsCount(Y_SiteName)>WordsCount then
		Errmsg = Errmsg+"<li>您的站点的名称字数<"&GetWordsCount(Y_SiteName)&">大于系统规定字数<"&WordsCount&">。"
		Call ErrList(Errmsg)
		exit sub		
	end if
	
	if GetWordsCount(Y_Alt)>AltCount then
		Errmsg = Errmsg+"<li>您的站点的介绍字数<"&GetWordsCount(Y_Alt)&">大于系统规定字数<"&AltCount&">。"
		Call ErrList(Errmsg)
		exit sub		
	end if
	
	'第一步,判断我站链接所在位置和申请的链接是否为同一域
	if left(Y_SiteURL,7)<>"http://" then
		Errmsg = Errmsg+"<li>请注意您的URL格式,应以http://开头。"
		Call ErrList(Errmsg)
		exit sub		
	end if
	Y_SiteURL_Arr=Split(Y_SiteURL,"/")
	Y_MyLink_Arr=Split(Y_MyLink,"/")
	if Y_SiteURL_Arr(2)<>Y_MyLink_Arr(2) then
		Errmsg = Errmsg+"<li>申请友情链接的域和我站链接代码不在同一个域内。"
		Call ErrList(Errmsg)
		exit sub		
	end if
	
	'第二步,判断是否已经添加了我站链接代码
	if IsConfirm=true then
		url=Y_MyLink
		wstr=getHTTPPage(url) 

		if not Instr(lcase(wstr),lcase("<a href=""http://"&request.ServerVariables("HTTP_HOST")&replace(request.ServerVariables("URL"),"signup.asp","linkforward.asp")))>0 then
			Errmsg = Errmsg+"<li>对不起,没有在贵站的指定的位置上发现我站的链接代码。<li>请首先在贵站添加我站的链接代码,谢谢。"
			Call ErrList(Errmsg)
			exit sub		
		end if
	end if
		
	'第三步,判断我站链接所在网页页面的PR值
	
	Dim wstr,str,url,start,over,id
	ID = Y_MyLink
	url="http://rankwhere.com/google-page-rank.php?url="&id&""
	wstr=getHTTPPage(url) 
	start=Newstring(wstr,"has Google")
	over=Newstring(wstr,"NOTE")
	body=mid(wstr,start+0,over-start-10)
	
	body_arr=Split(body," ")
	Y_MyLink_PR=int(body_arr(3))
	if PR>0 then
		if not Y_MyLink_PR>= PR then
			Errmsg = Errmsg+"<li>对不起,我站的链接代码所在页面PR值<"&Y_MyLink_PR&">不符合我站的要求<"&PR&">。"
			Call ErrList(Errmsg)
			exit sub		
		end if
	end if
	
	'第四步,判断我站链接所在网页的所属域名的Alexa排名
	ID = Y_MyLink
	url="http://www.alexa.com/data/details/traffic_details?q=&url="&id&""
	wstr=getHTTPPage(url) 
	start=Newstring(wstr,"span msg=")
	over=start+60
	if len(wstr)=start then
		Y_MyLink_Alexa="未收录"
	else
		body=mid(wstr,start+0,over-start-10)
		body_arr=Split(body,"""")
		Y_MyLink_Alexa_Code=body_arr(1)
		url="http://"&request.ServerVariables("HTTP_HOST")&replace(request.ServerVariables("URL"),"signup.asp","getAlexa.asp")
		
		url=url&"?sMsg="&Y_MyLink_Alexa_Code
		wstr=getHTTPPage(url)
		start=Newstring(wstr,"<begin>")
		over=Newstring(wstr,"<end>")
		body=mid(wstr,start+7,over-start-7)
		
		dim temp_Alexa
		temp_Alexa=""
		if InStr(body,",")>0 then
			body_arr=Split(body,",")
			for i=0 to UBound(body_arr)
				temp_Alexa=temp_Alexa&body_arr(i)
			next
		else
			temp_Alexa=body
		end if
		Y_MyLink_Alexa=Clng(temp_Alexa)
	end if
	if Alexa>0 then
		if Alexa<Y_MyLink_Alexa or Y_MyLink_Alexa="未收录" then
			Errmsg = Errmsg+"<li>对不起,贵站的Alexa世界排名值<"&temp_Alexa&">不符合我站的要求<"&Alexa&">。"
			Call ErrList(Errmsg)
			exit sub		
		end if
	end if
	
	'如果一切合格,添加到友情链接数据库中
	'sql="select ID,Y_SiteName,Y_SiteURL,Y_Logo,Y_Alt,Y_MyLink,PR,PRDate,Alexa,AlexaDate,jointime from link where ID="&session("L_userid")
	sql="select top 1 * from link order by id"
	rs.open sql,conn,1,3
	rs.addnew
	rs("username")=username
	rs("passsword")=md5(passsword)
	rs("email")=email
	
	
	rs("Y_SiteName")=Y_SiteName
	rs("Y_SiteURL")=Y_SiteURL
	rs("Y_Logo")=Y_Logo
	rs("Y_Alt")=Y_Alt
	rs("Y_MyLink")=Y_MyLink
	rs("PR")=Y_MyLink_PR
	rs("PRDate")=now()
	rs("Alexa")=Y_MyLink_Alexa
	rs("AlexaDate")=now()
	rs("jointime")=now()
	rs.update
	
	call finaly(IsActivation)
end sub
%>

<%sub finaly(IsActivation)%>
<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">&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="Tab6">
          <tr bgcolor="#FFFFFF">
            <td height="20">
			<li>您已经成功的申请了友情链接.<br>
			<%
			if IsActivation=true then
				response.write "<li>注意,申请成功后,需要从中贵站的链接入我站一次,进行激活才能显示."
			end if

			%>
			</td>
          </tr>
		  <tr bgcolor="#FFFFFF">
            <td height="20" align="center">
			<input type="button" name="Submit" value=" 查看链接 " onclick="document.URL='link.asp'">&nbsp;
			<input type="button" name="Submit" value=" 关闭窗口 " onclick="window.close()"></td>
          </tr>
        </table>
        <!--显示与隐藏的表格-->
        <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td></td>
          </tr>
      </table>
     </td>
  </tr>
</table>
<%end sub%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -