📄 addurlsave.asp
字号:
<!--#include file="config.asp"-->
<%
function IsValidEmail(email)
dim names, name, i, c
'Check for valid syntax in an email address.
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
dim sql
dim rs
if trim(request("web"))="" then
response.write"<SCRIPT language=JavaScript>alert('站点名称名称不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if trim(request("url"))="" then
response.write"<SCRIPT language=JavaScript>alert('地址不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if trim(request("sort"))="" then
response.write"<SCRIPT language=JavaScript>alert('网址类别不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if IsValidEmail(request("mail"))=false then
response.write"<SCRIPT language=JavaScript>alert('邮件地址有错!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
web=trim(request("web"))
web=Replace(web," ",CHR(13))
web=Replace(web," ",CHR(32))
web=server.htmlencode(web)
sort=trim(request("sort"))
url=trim(request("url"))
url=replace(url,"'","")
lang=trim(request("mail"))
content=trim(request("txtcontent"))
content=Replace(content,"<br>",CHR(10))
content=Replace(content," ",CHR(13))
content=Replace(content," ",CHR(32))
content=server.htmlencode(content)
if web<>"" and url<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_WEBURL where web='"&web&"' or url='"&url&"' order by id desc"
rs.open sql,conn,1,1
if not(rs.eof or rs.bof) then
response.write"<SCRIPT language=JavaScript>alert('对不起,您所添加的站点已存在,请核实!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
rs.close
set rs=nothing
end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_WEBURL"
rs.open sql,conn,1,2
rs.addnew
rs("sort")=sort
rs("lang")=lang
rs("web")=web
rs("url")=url
rs("info")=content
rs("adate")=now()
rs("hits")=0
rs("sh")=1
rs.update
rs.close
set rs=nothing
%>
<html>
<head>
<title><%=webtitle%> -> 网址登陆</title>
<meta name="description" content="<%=webdescription%>">
<meta name="keywords" content="<%=webkeywords%>"><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href='int/index.css' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="favicon.ico">
<link rel="Bookmark" href="favicon.ico">
</head>
<body topmargin="0" leftmargin="0">
<TABLE cellSpacing=0 cellPadding=0 width=773 border=0 align="center">
<TBODY>
<TR>
<TD width=180 height="60"><a href="<%=weburl%>"><img src="<%=weblogo2%>" border=0></img></a></TD>
<TD><iframe id="baiduframe" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="510" height="60"
src="http://unstat.baidu.com/bdun.bsc?tn=xs20&cv=1&cid=61150&csid=&rkcs=16&bgcr=FFFFFF&ftcr=000000&rk=1&bd=0&tbsz=14&tbst=1&sropls=1,4,6,2&wd=510&ht=60&kwnm=6&kwgp=1&sropst=2&bdas=0">
</iframe></TD>
<TD width=81>
<TABLE height=57 cellSpacing=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=right width="100%" height=22><A onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=weburl%>');"
href="#"><FONT color=#008000>[ 设为首页
]</FONT></A></TD></TR>
<TR>
<TD align=right width="100%"><A title=将本站添加到您的收藏夹
onclick="javascript:window.external.AddFavorite('<%=weburl%>','<%=webtitle%>')"
href="#"
;><FONT
color=#800080>[ 加入收藏 ]</FONT></A></TD></TR>
<TR>
<TD vAlign=bottom align=right width="100%"><A href="mailto:<%=webemail%>">[ 联系我们 ]</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE style="MARGIN-TOP: 3px" height=28 cellSpacing=4 cellPadding=0 width=773
background=images/bg_qyxc.gif border=0 align="center">
<TBODY>
<TR>
<TD align="center">| <%
set rs_u=server.createobject("adodb.recordset")
sql_u="select title,url from happywz_URL where space=5 order by id"
rs_u.open sql_u,conn,1,1
while not rs_u.eof
%><a class='Channel' href='<%=rs_u("url")%>'><%=rs_u("title")%></a> | <%rs_u.movenext
wend
rs_u.close
set rs_u=nothing%></TD></TR></TBODY></TABLE>
<table cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#ffffff border=0>
<tr>
<td><table width="650" border="0" class=td1111 align="center">
<tr>
<td height="280"><table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top" align="center"><table width="600" class=td1111 border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="center" class=main_title>您的登陆信息</td>
</tr>
</table>
<table width="600" class=td3303 border="0" cellspacing="1" cellpadding="3" align="center" height="100%">
<tr>
<td class="td1" width="16%" align="right" BGCOLOR="#EFF7FF"><B>登陆说明:</B></td>
<td class="td1" width="84%" BGCOLOR="#FFFFFF"><LI>请确保您登陆的站点符合国家相关的法律法规!<BR>
<LI>我们有权对您登陆的不合法信息进行修改或删除!
<FONT COLOR="#FF0000">
<LI>您必须在您的登陆页面添加我们的首页连接放方能确保您的站点被我们收录!
</FONT></td>
</tr>
<tr>
<td class="td1" width="16%" align="right" BGCOLOR="#EFF7FF" height="26"><b>站点名称:</b></td>
<td class="td1" width="84%" BGCOLOR="#FFFFFF"><%=web%></td>
</tr>
<tr>
<td class="td1" width="16%" align="right" BGCOLOR="#EFF7FF" height="26"><b>站点地址:</b></td>
<td class="td1" width="84%" BGCOLOR="#FFFFFF"><%=url%></td>
</tr>
<tr>
<td class="td1" width="16%" align="right" BGCOLOR="#EFF7FF" height="26"><b>站点分类:</b></td>
<td class="td1" width="84%" BGCOLOR="#FFFFFF"><%=sort%></td>
</tr>
<tr>
<td class="td1" width="16%" align="right" BGCOLOR="#EFF7FF" height="26"><b>站点描述:</b></td>
<td class="td1" width="84%" BGCOLOR="#FFFFFF"><%=content%></td>
</tr>
<tr align="center" BGCOLOR="#FFFFFF">
<td colspan="2" class="td1">[<a href="index.html" class="style2">返回首页</a>]</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<table cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<tr>
<td class=bottom align=middle><table cellSpacing=0 cellPadding=0 width=560 align=center border=0>
<tr vAlign=bottom>
<td vAlign=center align=middle><%=webstat%></td>
</tr>
<tr vAlign=bottom>
<td align=middle height=3></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -