?? signup.asp
字號:
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> 申請友情鏈接-第三步(填寫貴站信息)</td>
<td align="right"> </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)">
<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> 申請友情鏈接-第四步(申請成功)</td>
<td align="right"> </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'">
<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 + -