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

📄 admin.asp

📁 此系统都是基于ASP+ACCESS技术开发的电子商务平台,属于全自动化、全智能的在线方式管理、维护、更新的网站管理系统。此系统直接上传到你的网站空间就可以使用了
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBSCRIPT" CodePage="936"%>
<%
'glgk.com
Option Explicit
Response.Buffer = True
Server.scriptTimeout="20"
public const mpassword="123456" '设置管理的密码
dim starttime:starttime=timer()

function leftshow(str,leftc)
if len(str)>=leftc then
leftshow=left(str,leftc)&".."
else
leftshow=str
end if
end function

function htmlencode(reString)
dim Str
str=reString
str=replace(str, "&", "&amp;")
str=replace(str, ">", "&gt;")
str=replace(str, "<", "&lt;")
htmlencode=Str
end function

sub cklogin()
if not request.cookies("jqqonline")("password")=mpassword then
response.clear
response.write "Error !!"
response.end
end if
end sub

sub login()
if request.cookies("jqqonline")("error")="2" then
%>
<script language="javascript">
alert("您已经输入了两次错误的密码\n\n请关闭浏览器以后重新尝试")
history.back()
</script>
<%
response.end
end if
if request.form("password")=mpassword then
response.cookies("jqqonline")("password")=request.form("password")
response.redirect "?type=manage"
else
if request.cookies("jqqonline")("error")="" then
response.cookies("jqqonline")("error")="1"
else
response.cookies("jqqonline")("error")="2"
end if
%>
<script language="javascript">
alert("密码错误!")
history.back()
</script>
<%
end if
response.end
end sub


sub editsiteinfo()
Dim infostrSourceFile,infoobjXML
infostrSourceFile=Server.MapPath("xml/info.xml")
Set infoobjXML=Server.CreateObject("Microsoft.XMLDOM")
infoobjXML.load(infostrSourceFile)
Dim infoobjNodes
Set infoobjNodes=infoobjXML.selectSingleNode("xml/qqinfo/qqset[siteid ='1']")
If Not IsNull(infoobjNodes) then
infoobjNodes.childNodes(0).text=htmlencode(request.form("sitename"))
infoobjNodes.childNodes(1).text=htmlencode(request.form("siteskin"))
infoobjNodes.childNodes(2).text=htmlencode(request.form("siteshowx"))
infoobjNodes.childNodes(3).text=htmlencode(request.form("siteshowy"))
infoobjXML.save(infostrSourceFile)
%>
<script language="javascript">
alert("参数修改成功!")
location.href="?type=manage"
</script>
<%
Else
%>
<script language="javascript">
alert("Xml 未成功打开!")
history.back()
</script>
<%
End If
Set infoobjNodes=nothing
Set infoobjXML=nothing
end sub


sub addinfo()
if trim(request.form("qq"))="" or trim(request.form("dis"))="" or trim(request.form("face"))="" then
%>
<script language="javascript">
alert("没有填入必要的数据!")
history.back()
</script>
<%
response.end
end if

dim jtb_color
if trim(request.form("color"))="" then
jtb_color="#000000"
else
jtb_color=htmlencode(request.form("color"))
end if

Dim strSourceFile,objXML,oListNode,oDetailsNode,AllNodesNum
strSourceFile=Server.MapPath("xml/qq.xml")
Set objXML=Server.CreateObject("Microsoft.XMLDOM")
objXML.load(strSourceFile)
Dim objRootlist
Set objRootlist=objXML.documentElement.selectSingleNode("qqlist")
dim id
If objRootlist.hasChildNodes then
id=objRootlist.lastChild.lastChild.text+1
Else
id=1
End If
Set objRootlist=nothing
Set oListNode=objXML.documentElement.selectSingleNode("qqlist").AppendChild(objXML.createElement("qq"))
Set oDetailsNode=oListNode.appendChild(objXML.createElement("qid"))
oDetailsNode.Text=htmlencode(request.form("qq"))
Set oDetailsNode=oListNode.appendChild(objXML.createElement("dis"))
oDetailsNode.Text=htmlencode(request.form("dis"))
Set oDetailsNode=oListNode.appendChild(objXML.createElement("face"))
oDetailsNode.Text=htmlencode(request.form("face"))
Set oDetailsNode=oListNode.appendChild(objXML.createElement("color"))
oDetailsNode.Text=jtb_color
Set oDetailsNode=oListNode.appendChild(objXML.createElement("id"))
oDetailsNode.Text=id
objXML.save(strSourceFile)
Set objRootlist=nothing
Set oListNode=nothing
Set oDetailsNode=nothing
Set objXML=nothing
%>
<script language="javascript">
alert("添加新的QQ号成功!")
location.href="?type=manage"
</script>
<%
response.end
end sub



sub editinfo()
dim editid:editid=request.querystring("id")
if not IsNumeric(editid) or editid="" then
%>
<script language="javascript">
alert("非法操作!")
history.back()
</script>
<%
response.end
else
editid=clng(editid)
end if
if trim(request.form("qq"))="" or trim(request.form("dis"))="" or trim(request.form("face"))="" then
%>
<script language="javascript">
alert("没有添入必要的数据!")
history.back()
</script>
<%
response.end
end if
Dim strSourceFile,objXML
strSourceFile=Server.MapPath("xml/qq.xml")
Set objXML=Server.CreateObject("Microsoft.XMLDOM")
objXML.load(strSourceFile) 
Dim objNodes
Set objNodes=objXML.selectSingleNode("xml/qqlist/qq[id ='"&editid&"']")
If Not IsNull(objNodes) then
objNodes.childNodes(0).text=htmlencode(request.form("qq"))
objNodes.childNodes(1).text=htmlencode(request.form("dis"))
objNodes.childNodes(2).text=htmlencode(request.form("face"))
objNodes.childNodes(3).text=htmlencode(request.form("color"))
objXML.save(strSourceFile)
Set objNodes=nothing
Set objXML=nothing
%>
<script language="javascript">
alert("修改成功!")
location.href="?type=manage"
</script>
<%
else
%>
<script language="javascript">
alert("修改失败!")
location.href="?type=manage"
</script>
<%
end if
response.end
end sub

sub delinfo()
dim delid
delid=request.querystring("id")
if not IsNumeric(delid) or delid="" then
%>
<script language="javascript">
alert("非法操作!")
location.href="<%=jurl%>?type=manage"
</script>
<%
response.end
else
delid=clng(delid)
end if
Dim strSourceFile,objXML
strSourceFile=Server.MapPath("xml/qq.xml")
Set objXML=Server.CreateObject("Microsoft.XMLDOM")
objXML.load(strSourceFile)
Dim objNodes
Set objNodes=objXML.selectSingleNode("xml/qqlist/qq[id ='"&delid&"']")
if Not IsNull(objNodes) then
if request.querystring("yn")="" then
%>
<script language="javascript">
if(confirm("确认要删除[<%=objNodes.childNodes(0).text%>]的信息吗?"))
window.location="?type=manage&act=delete&id=<%=delid%>&yn=1"
else
history.back()
</script>
<%
else
objNodes.parentNode.removeChild(objNodes)
objXML.save(strSourceFile)
%>
<script language="javascript">
alert("删除成功!")
location.href="?type=manage"
</script>
<%
end if
else
%>
<script language="javascript">
alert("没有找到指定的条目!")
location.href="?type=manage"
</script>
<%
End If
Set objNodes=nothing
Set objXML=nothing
response.end
end sub


select case request.querystring("act")
case "login" call login()
case "editsiteinfo" call cklogin():call editsiteinfo()
case "add" call cklogin():call addinfo()
case "edit" call cklogin():call editinfo()
case "delete" call cklogin():call delinfo()
end select
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JQQonline插件信息管理界面</title>
<style type="text/css">
<!--
body{margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;BACKGROUND:#C7E3FE;}
a{font-style:normal;TEXT-DECORATION: none;color:#000000;}
a:hover{font-style:normal;TEXT-DECORATION: none;color:#F4F4F4;}
a:active{font-style:normal;TEXT-DECORATION: none;color:#000000;}
table{font-size: 9pt;font-family: tahoma;color:#000000;}
-->
</style>
</head>
<body>

⌨️ 快捷键说明

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