📄 admin_index_addurlsave.asp
字号:
<!--#include file="config.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
founderr=true
errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='index.asp'>重新登录</a>!"
call diserror()
response.end
end if
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"))="0" or Request("sort")="" 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=Replace(web,"'","’")
web=server.htmlencode(web)
sort=trim(Request("sort"))
url=trim(Request("url"))
url=replace(url,"'","")
lang=trim(Request("mail"))
content=trim(Request("txtcontent"))
if content<>"" then
content=Replace(content,"<br>","")
content=Replace(content," ","")
content=Replace(content," ","")
content=Replace(content,"'","’")
content=server.htmlencode(content)
end if
if Request("shuju")="1" then
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_WEB where wwwsort='"&sort&"' and wwwurl='"&url&"' order by wwwid 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
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_WEB"
rs.open sql,conn,1,2
rs.addnew
rs("wwwsort")=sort
rs("wwwweb")=web
rs("wwwurl")=url
rs("hits")=0
rs("addtime")=now()
rs.update
rs.close
set rs=nothing
elseif Request("shuju")="2" then
if web<>"" and url<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_WEBURL where web='"&web&"' and 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.update
rs.close
set rs=nothing
end if
conn.close
set conn=nothing
%>
<html>
<head>
<title>网址登陆</title> <LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
<meta http-equiv="refresh" content="3;url=admin_index_addurl.asp?sort=<%=sort%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body topmargin="0" leftmargin="0" onmouseover="window.status='开心网址,让你开心上网!!! !';return true"><script>if(top==self)top.location="index.asp" </script>
<TABLE WIDTH="99%" BORDER="0" CELLPADDING="2" CELLSPACING="0" BGCOLOR="0" CLASS="HeaderTdStyle" >
<TR> <TD HEIGHT="26"
COLSPAN="2" ALIGN="center"><B>添加站点信息</B></TD></TR> <TR> <TD WIDTH="70" HEIGHT="30" BGCOLOR=""#0099CF""><B>管理导航:</B></TD><TD
HEIGHT="30" BGCOLOR="#ffffff"> 3秒钟后自动返回添加页面</TD></TR> </TABLE><BR><BR><%if Request("shuju")="2" then%><TABLE WIDTH="88%" BORDER="0" CELLSPACING="1" CELLPADDING="6" ALIGN="center" BGCOLOR="#0099CF">
<TR BGCOLOR="#0099CF"> <TD COLSPAN="2"><B>您所添加的站点信息如下
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -