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

📄 admin_toplinkfuntion.asp

📁 ASP源程序采用天空软件小偷中心核件制成
💻 ASP
字号:
<!--#INCLUDE FILE="function.asp" -->
<!--#INCLUDE FILE="Conn.asp" -->
<!--#include file="admin_loginchk.asp"-->
<%admin1%>
<%
dim action
dim ID
ID=request("ID")


if request("action")="modiclass" then
linkname=request("linkname")

set rs=server.createobject("adodb.recordset")
sql="select * from toplink where linkid="&ID
rs.open sql,conn,3,3
rs("linkname")=linkname
rs.update
rs.close

end if

if request("action")="modiurl" then
linkurl=request("linkurl")

set rs=server.createobject("adodb.recordset")
sql="select * from toplink where linkid="&ID
rs.open sql,conn,3,3
rs("linkurl")=linkurl
rs.update
rs.close

end if

if request("action")="upclass" then
set rs=server.createobject("adodb.recordset")
sql="select * from toplink where linkid="&ID
rs.open sql,conn,3,3
rs("orderid")=rs("orderid")-1
rs.update
idtemp=rs("linkid")
ordertemp=rs("orderid")
rs.close

set rs=server.createobject("adodb.recordset")
sql="select * from toplink where orderid="&ordertemp&" and classID<>"&ID
rs.open sql,conn,3,3
rs("orderid")=rs("orderid")+1
rs.update

end if

if request("action")="downclass" then
set rs=server.createobject("adodb.recordset")
sql="select * from toplink where linkid="&ID
rs.open sql,conn,3,3
rs("orderid")=rs("orderid")+1
rs.update
idtemp=rs("linkid")
ordertemp=rs("orderid")
rs.close

set rs=server.createobject("adodb.recordset")
sql="select * from toplink where orderid="&ordertemp&" and linkid<>"&ID
rs.open sql,conn,3,3
rs("orderid")=rs("orderid")-1
rs.update
rs.close
end if

if request("action")="addadmin" then
Master=trim(request("linkinfo"))
if Master="" then
Master="无"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from toplink where linkid="&ID
rs.open sql,conn,3,3
rs("linkinfo")=master
rs.update
rs.close
end if


if request("action")="addclass" then
function changechr(str) 
    changechr=replace(replace(replace(replace(str,"<","&lt;"),">","&gt;"),chr(13),"<br>")," "," ") 
    changechr=replace(changechr,"'","&acute;")
    changechr=replace(changechr,mid(" "" ",2,1),"&quot;")
end function

dim typename
dim howmany
typename=changechr(trim(request("type")))
howmany=request("howmany")
linkurl=trim(request("linkurl"))

If typename="" Then
errmsg=errmsg+"<br>"+"<li>"+"网站名不能为空!请<a href=javascript:history.go(-1)>返回重新填写</a>"
call error()
response.end
end if

If linkurl="" Then
errmsg=errmsg+"<br>"+"<li>"+"网站地址不能为空!请<a href=javascript:history.go(-1)>返回重新填写</a>"
call error()
response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from toplink"
rs.open sql,conn,3,3
do while not rs.eof
if rs("linkname")=typename then
errmsg=errmsg+"<br>"+"<li>"+"已经存在这个网站名称!请<a href=javascript:history.go(-1)>返回重新填写</a>!"
call error()
response.end
end if
rs.movenext
loop
rs.close
set rs=nothing

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from toplink"
rs.open sql,conn,3,3
rs.addnew
rs("linkname")=typename
rs("linkurl")=linkurl
rs("orderid")=howmany+1
rs("linkinfo")="无"
rs.update
rs.close

end if

if request("action")="classinit" then
set rs=server.createobject("adodb.recordset")
sql="select * from toplink order by linkid"
rs.open sql,conn,3,3
i=0
do while not rs.eof
i=i+1
rs("orderid")=i
rs.update
rs.movenext
loop
rs.close

end if


if request("action")="delclass" then
       
	  
	Rem 删除相关栏目下子栏目
        sql="delete from toplink where linkid=" &id
        conn.execute sql
	       
	    if err.Number<>0 then
         err.clear
        response.write " 数 据 库 操 作 失 败 ! "
         end if
			   
end if

set rs=nothing
conn.close
set conn=nothing
response.redirect "admin_toplink.asp"
%>

⌨️ 快捷键说明

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