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

📄 admin_data.asp

📁 淘客网上商店网站程序 淘客网上商店网站程序 淘客网上商店网站程序
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	DataBase=Cl.Checkstr(Request("DataBase"))
	if StrSql="" then
		Call Cl.OutMsg(0,"执行SQL语句失败,命令不能为空!","javascript:history.go(-1)")
	Else
		OpenConn : OpenConn_U
		if Instr(StrSql,"@$@$@")>0 then
			StrSql=Split(StrSql,"@$@$@")
			for i=0 to Ubound(StrSql)
				On Error Resume Next
				if DataBase="User" then
					Conn.Execute(StrSql(i))
				else
					Conn_U.Execute(StrSql(i))
				end if
				if Err then
					StrMsg=StrMsg & "<li><font color='red'>执行SQL语句“"&StrSql(i)&"”失败,原因:"&Err.Description&"</font></li>" & vbcrlf
					Err.Clear
				else
					StrMsg=StrMsg & "<li><font color='blue'>执行SQL语句“"&StrSql(i)&"”成功!</font></li>" & vbcrlf
					'Call OutMsg("执行SQL语句成功!","Admin_Data.asp?Action=DoSqlMain")
				end if
			Next
			Session("DoSql")=DataBase
			Call Cl.ShowSuc(StrMsg)
		Else
			On Error Resume Next
			if DataBase="User" then
				Conn.Execute(StrSql)
			else
				Conn_U.Execute(StrSql)
			end if
			if Err then
				Err.Clear
				Call Cl.OutMsg(0,"执行SQL语句失败,原因:"&Err.Description,"javascript:history.go(-1)")
			else
				Session("DoSql")=DataBase
				Call Cl.OutMsg(0,"执行SQL语句成功!","Admin_Data.asp?Action=DoSqlMain")
			end if
		end if
	end if
end sub

Sub ServerInfo()
'on error resume next
%>
<br />
<script language="JScript" runat="server">
function getJVer(){
  //获取JScript 版本
  return ScriptEngineMajorVersion() +"."+ScriptEngineMinorVersion()+"."+ ScriptEngineBuildVersion();
}
</script>
<table border="0" cellspacing="1" cellpadding="5" align=center class="Border">
	<tr class="title">
		<td height=25 colspan=5 align=center>系统信息检测情况</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>当前网站版本</td>
		<td width="24%">
		<a href="http://www.aspoo.cn/Soft/" target=_blank><%=ClCMS_Version%></a></td>
		<td width="2%"></td>
		<td width="25%">数据库类型:</td>
		<td width="24%">
		<%
		If IsSqlDataBase = 1 Then
			Response.Write "Sql Server"
		Else
			Response.Write "Access"
		End If
		%></td>
	</tr>
	<tr class="title">
		<td  width="100%" height=23 colspan=5 align=center>服务器相关信息</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>服务器名/IP</td>
		<td width="24%">
		名:<%=Request.ServerVariables("SERVER_NAME")%><br />
		IP:<%=Request.ServerVariables("LOCAL_ADDR")%>
		</td>
		<td width="8" ></td>
		<td width="25%">服务器操作系统</td>
		<td width="24%"><%=GetSysInfo(0)%></td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>服务器脚本解释引擎</td>
		<td width="24%"><%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %><br /><%="JScript/" & getjver()%></td>
		<td width="2%"></td>
		<td width="25%">IIS 版本</td>
		<td width="24%"><%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>脚本超时时间</td>
		<td width="24%"><%=Server.ScriptTimeout%> 秒</td>
		<td width="8" ></td>
		<td width="25%">服务器CPU数量</td>
		<td width="24%"><%=GetSysInfo(1)%> 个</td>
	</tr>
	<tr class="tdbg">
		<td width="100%" height=23 colspan=5>
		本文件路径:<%=Server.Mappath("Admin_data.asp")%>
		</td>
	</tr>
	<tr class="title">
		<td width="100%" colspan=5 height=23 align=center>主要组件信息</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>FSO文件读写</td>
		<td width="24%">
		<%
		If ObjInstalled Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="2%"></td>
		<td width="25%">Jmail发送邮件支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("JMail.SmtpMail") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%></td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>CDONTS发送邮件支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("CDONTS.NewMail") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="8" ></td>
		<td width="25%">AspEmail发送邮件支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("Persits.MailSender") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>无组件上传支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("Adodb." & "Str" & "eam") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="2%"></td>
		<td width="25%">AspUpload上传支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("Persits.Upload") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>SA-FileUp上传支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("SoftArtisans.FileUp") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="8" ></td>
		<td width="25%">DvFile-Up上传支持</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("DvFile.Upload") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>CreatePreviewImage生成预览图片</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("CreatePreviewImage.cGvbox") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="2%"></td>
		<td width="25%">AspJpeg生成预览图片</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("Persits.Jpeg") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="25%" height=23>SA-ImgWriter生成预览图片</td>
		<td width="24%">
		<%
		If Cl.ChkObjInstalled("SoftArtisans.ImageGen") Then
			Response.Write "<font color=green><b>√</b></font>"
		Else
			Response.Write "<font color=red><b>×</b></font>"
		End If
		%>
		</td>
		<td width="8" ></td>
		<td width="25%"></td>
		<td width="24%"></td>
	</tr>
	<FORM action="Admin_Data.asp?action=ServerInfo" method=post id=form1 name=form1>
	<tr class="tdbg">
		<td width="100%" height=23 colspan=5>
		<%
		If Request("classname")<>"" Then
			If Cl.ChkObjInstalled(Request("classname")) Then
				Response.Write "<font color=green><b>本服务器支持 "&Request("classname")&" 组件</b></font><br />"
			Else
				Response.Write "<font color=red><b>本服务器不支持 "&Request("classname")&" 组件</b></font><br />"
			End If
		End If
		%>
		其它组件支持情况查询:<input class=input type=text value="" name="classname" size=30>
		<INPUT type=submit value="查 询" id=submit1 name=submit1>
		输入组件的 ProgId 或 ClassId
		</td>
	</tr>
	</form>
</table>
<%Response.Flush%>
<table border="0" cellspacing="1" cellpadding="5" height="1" align=center width="95%" class="Border">
	<tr class="tdbg">
		<td  width="100%" colspan=5 height=23>
		<B>磁盘文件操作速度测试</B>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="100%" colspan=5 height=23>
<%
	Response.Write "正在重复创建、写入和删除文本文件50次..."

	Dim thetime3,tempfile,iserr,t1,FsoObj,tempfileOBJ,t2
	Set FsoObj=Server.CreateObject(Trim(Cl.Web_Info(13)))
	on error resume next
	iserr=False
	t1=timer
	tempfile=server.MapPath("./") & "\aspchecktest.txt"
	For i=1 To 50
		Err.Clear
		Set tempfileOBJ = FsoObj.CreateTextFile(tempfile,true)
		If Err <> 0 Then
			Response.Write "创建文件错误!"
			iserr=True
			Err.Clear
			Exit For
		End If
		tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck"
		If Err <> 0 Then
			Response.Write "写入文件错误!"
			iserr=True
			Err.Clear
			Exit For
		End If
		tempfileOBJ.close
		Set tempfileOBJ = FsoObj.GetFile(tempfile)
		tempfileOBJ.Delete 
		If Err <> 0 Then
			Response.Write "删除文件错误!"
			iserr=True
			Err.Clear
			Exit For
		end if
		Set tempfileOBJ=Nothing
	Next
	t2=timer
	If Not iserr Then
		thetime3=cstr(int(( (t2-t1)*10000 )+0.5)/10)
		Response.Write "...已完成!本服务器执行此操作共耗时 <font color=red>" & thetime3 & " 毫秒</font>"
	End If
%>
		</td>
	</tr>
</table>
<%Response.Flush%>
<table border="0" cellspacing="1" cellpadding="5" height="1" align=center width="95%" class="Border">
	<tr class="tdbg">
		<td width="100%" colspan=5 height=23>
		<B>ASP脚本解释和运算速度测试</B>
		</td>
	</tr>
	<tr class="tdbg">
		<td  width="100%" colspan=5 height=23>
<%

	Response.Write "整数运算测试,正在进行50万次加法运算..."
	dim lsabc,thetime,thetime2
	t1=timer
	for i=1 to 500000
		lsabc= 1 + 1
	next
	t2=timer
	thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10)
	Response.Write "...已完成!共耗时 <font color=red>" & thetime & " 毫秒</font><br />"


	Response.Write "浮点运算测试,正在进行20万次开方运算..."
	t1=timer
	for i=1 to 200000
		lsabc= 2^0.5
	next
	t2=timer
	thetime2=cstr(int(( (t2-t1)*10000 )+0.5)/10)
	Response.Write "...已完成!共耗时 <font color=red>" & thetime2 & " 毫秒</font><br />"
%>
		</td>
	</tr>
</table>
<%
end sub

Function GetSysInfo(strtype)
	on error resume next
	Dim WshShell,WshSysEnv
	Set WshShell = server.CreateObject("WScr" & "ipt" & "." & "Sh" & "ell")
	Set WshSysEnv = WshShell.Environment("SYSTEM")
	if strtype=1 then
		GetSysInfo=cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
	elseif strtype=2 then
		GetSysInfo=cstr(WshSysEnv("PROCESSOR_IDENTIFIER"))
	else
		GetSysInfo=cstr(WshSysEnv("OS"))
		if GetSysInfo="" then GetSysInfo="(未知)"
	end if
end Function
%>
<%
'<!--
'┌───────────────────────────────────────────────────────┐
'│                                                       │
'│      CreateLive CMS Version 4.0                       │
'│                      Powered by Aspoo.CN      │
'│                                            │
'│     邮箱: support@aspoo.cn      Info@aspoo.cn      │
'│      QQ: 3315263               596197794            │
'│      网站: www.aspoo.cn          www.aspoo.com        │
'│      论坛: bbs.aspoo.cn          bbs.aspoo.com        │
'│                                                       │
'│  Copyright (C) 2005-2007 Aspoo.CN All Rights Reserved.     │
'└───────────────────────────────────────────────────────┘
'-->
%>

⌨️ 快捷键说明

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