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

📄 admin_count.asp

📁 正版创力4.1SQL商业版!!!ASP版。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Inc/Const.asp"-->
<!--#include file="../Inc/Cl_ClsCount.asp"-->
<%
if Not Cl.TrueOtherPurview("Count") then
	Cl.ShowErr("<br /><li>您无此操作权限!</li>")
end if
Dim Action
Dim Style
Dim XMLDoc,Node,ConfigFilePath
Action	= LCase(Request("Action"))
Style	= Trim(Request("Style"))
ConfigFilePath = Server.MapPath(InstallDir & DatabaseDir & "count.config")
Set Count=New Cls_Count
Header
%>
<table border="0" cellspacing="1" cellpadding="0"  align="center" class="border">
	<tr>
		<td class="title" align="center">统计调用样式管理</td>
	</tr>
	<form Name="form1" method="post" action="Admin_Count.asp?Action=delonline">
	<tr class="tdbg"> 
		<td height="30"><strong>管理导航:</strong>
		<a href="Admin_Count.asp">样式列表</a>
		|
		<a href="Admin_Count.asp?Action=Addstyle">添加样式</a>
		|
		<a href="Admin_Count.asp?Action=visitmain">访问量管理</a>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<b>当前在线</b>:总在线:<font color="#ff0033"><b><%=Count.Web_Online(0)%></b></font> 人&nbsp;&nbsp;用户:<font color="#0000ff"><b><%=Count.Web_Online(1)%></b></font> 人&nbsp;&nbsp;游客:<font color="#000000"><b><%=Count.Web_Online(2)%></b></font> 人 &nbsp;&nbsp;<input type="submit" name="Submit" value=" 清除 " style="background:#ffffff;color:#4541FA;border:1px solid #AFBAF3;padding-top:3px;cursor:hand;">
		</td>
	</tr>
	</form>
</table>
<br />
<%
Select Case Action
Case "savevisit"
	Call SaveVisit()
Case "delonline"
	Call DelOnline()
Case "visitmain"
	Call VisitMain()
Case "addstyle","modifystyle"
	Call StyleInfo()
Case "saveaddstyle","savemodifystyle"
	Call StyleSave()
Case "delstyle"
	Call DelStyle()
Case Else
	Call StyleMain()
end Select
Footer
Set Count=Nothing

Sub DelStyle()
	If Style = "" Then
		Cl.ShowErr("请指定样式名称!")
	End If
	Set XmlDoc = Server.CreateObject("MSXML.DOMDocument")
	XmlDoc.Async = False
	If Not XmlDoc.load(ConfigFilePath) Then
		XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><Root/>"
		XmlDoc.Save ConfigFilePath
	End If
	Set Node = XmlDoc.DocumentElement.SelectsingleNode("Item[@Style='"&Style&"']")
	If Node Is Nothing Then
		Cl.ShowErr("样式名称不存在,请正确指定样式名称!")
	End if
	XmlDoc.DocumentElement.RemoveChild(Node)
	XmlDoc.Save ConfigFilePath
	Set Node = Nothing
	Set XMLDoc = Nothing
	Call Cl.OutMsg(0,"恭喜您,操作成功,按确定返回!","Admin_Count.asp")
End Sub

Sub StyleSave()
	Dim RefreshTime,Remark,StyleTemplate,AddTime
	Dim Attributes,createCDATASection,ChildNode
	RefreshTime	= Cl.GetClng(Request("RefreshTime"))
	Remark		= Trim(Request("Remark"))
	StyleTemplate= Trim(Request("Template"))
	If Style = "" Then
		Cl.ShowErr("请指定样式名称!")
	End If
	If RefreshTime=0 Then RefreshTime = 30
	AddTime = FormatDateTime(Now(),0)
	Set XmlDoc = Server.CreateObject("MSXML.DOMDocument")
	XmlDoc.Async = False
	If Not XmlDoc.load(ConfigFilePath) Then
		XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><Root/>"
		XmlDoc.Save ConfigFilePath
	End If
	'XmlDoc.Save ConfigFilePath
	'Response.end
	Set Node = XmlDoc.DocumentElement.SelectsingleNode("Item[@Style='"&Style&"']")
	If Action="saveaddstyle" Then
		If Not(Node Is Nothing) Then
			Set XmlDoc = Nothing
			Cl.ShowErr("样式名称已经存在,请换一个样式名称!")
		End If
	Else
		If Not(Node Is Nothing) Then
			AddTime = Node.selectSingleNode("@AddTime").text
			XmlDoc.DocumentElement.RemoveChild(Node)
		End If
	End If
	Set Node = XmlDoc.createNode(1,"Item","")
	Set Attributes = XmlDoc.createAttribute("Style")
	Attributes.text = Style
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("RefreshTime")
	Attributes.text = RefreshTime
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("UserName")
	Attributes.text = Cl.MemberName
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("UserID")
	Attributes.text = Cl.UserID
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("UserIP")
	Attributes.text = Cl.UserTrueIP
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("AddTime")
	Attributes.text = AddTime
	Node.Attributes.setNamedItem(Attributes)
	Set Attributes = XmlDoc.createAttribute("LastTime")
	Attributes.text = ""
	Node.Attributes.setNamedItem(Attributes)
	Set ChildNode = XmlDoc.createNode(1,"Remark","")
	Set createCDATASection=XmlDoc.createCDATASection(Server.HtmlEnCode(Remark))
	ChildNode.appendChild(createCDATASection)
	Node.appendChild(ChildNode)
	Set ChildNode = XmlDoc.createNode(1,"Template","")
	Set createCDATASection=XmlDoc.createCDATASection(StyleTemplate)
	ChildNode.appendChild(createCDATASection)
	Node.appendChild(ChildNode)
	XmlDoc.DocumentElement.appendChild(Node)
	XmlDoc.Save ConfigFilePath
	Set Node = Nothing
	Set XMLDoc = Nothing
	Call Cl.OutMsg(0,"恭喜您,操作成功,按确定返回!","Admin_Count.asp")
End Sub

Sub StyleInfo()
	Dim RefreshTime,Remark,StyleTemplate
	If Action="modifystyle" Then
		Set XmlDoc = Server.CreateObject("MSXML.DOMDocument")
		XmlDoc.Async = False
		If Not XmlDoc.load(ConfigFilePath) Then
			XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><Root/>"
			XmlDoc.Save ConfigFilePath
		End If
		Set Node = XmlDoc.DocumentElement.SelectsingleNode("Item[@Style='"&Style&"']")
		If Node Is Nothing Then
			Set XmlDoc = Nothing
			Cl.ShowErr("数据不存在!")
		End If
		RefreshTime = Node.SelectSingleNode("@RefreshTime").text
		Remark = Node.SelectSingleNode("Remark").text
		StyleTemplate = Node.SelectSingleNode("Template").text
	Else
		Style = ""
		RefreshTime = 30
		Remark = ""
		StyleTemplate = ""
	End If
%>
<style type="text/css">
#labeltitle {
	padding:0px;
	color:white;
	font-weight: bold;
	background:#0096ce;
	height:25px;
	margin:0px;
}
#labeltitle span {
	padding-top:5px;
	padding-bottom:5px;
	padding-left:5px;
	padding-right:3px;
	cursor:hand;
	height:15px;
}
.current {
	background:#def0fa;
	border-top:1px solid #0096ce;
	border-left:1px solid #0096ce;
	border-right:1px solid #0096ce;
	color:#000000;
}
.currentb {
	border-bottom:1px solid #0096ce;
	border-left:1px solid #0096ce;
	border-right:1px solid #0096ce;
	margin:0px;
	height:180px;
}
#showLabel {
	margin:5px;
	padding:1px;
}
#showLabel ol {
	margin:0px;
	padding:10px;
	list-style-type:none;
}
</style>
<script type="text/javascript">
function Label(id)
{
	for(var i=1;i<7;i++)
	{
		$("t"+i).className="";
		$("b"+i).className="hidden";
	}
	$("t"+id).className="current";
	$("b"+id).className="currentb";
}
</script>
<table border="0" cellspacing="1" cellpadding="0"  align="center" class="border">
	<tr>
		<td class="title" colspan="3" align="center">统计样式编辑</td>
	</tr>
	<form name="form1" method="post" action="Admin_Count.asp">
	<tr class="tdbg">
		<td width="15%" align="right">样式名称:</td>

⌨️ 快捷键说明

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