?? 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 + -