<!-- #Include File="Include/AMH_Onlogin.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Function AllPath(ByVal oPath)
	AllPath = Cls.Web_Dir & oPath
	AllPath = Server.MapPath(AllPath)
End Function
	Dim burl,fso,obj,obj2,tmp1,tmp2,now_online,sum_pay,Nnm_Topic,Num_Data
	Dim ChannelConut, Cii
	Call AMH_Title(1)
        If Request.QueryString("ErrorLevel")<>"" Then
	Call AMH_Td("错误信息")
%>
<tr>
<td height=200 colspan=2 align=center>
对不起，您的管理级别(<font class=red><%=login_level%></font>)低于您要管理项目的级别(<font class=red><%=Request.QueryString("ErrorLevel")%></font>)！<br /><br /><br />
如果您需要，请联系网站超级管理员来提升您的管理权限。

</td>
</tr>
<%
  Response.Write vbcrlf&"</table>"
  Response.Write ukong
  Call AMH_Ender("")
  Response.End()
End If
	Call AMH_Td("网站统计信息")
	burl="?"&trim(request.querystring())
	If burl<>"?" Then burl=burl&"&"
	now_online=Cint(Cls.Cache_Get("LK_Online"))
	ChannelConut = Cls.Channel_Menu
%>
<tr>
<td width='20%'>当前使用版本：</td>
<td width='80%'><font face="Verdana, Arial, Helvetica, sans-serif"><b><%Response.Write Cls.pro_edition%></b></font></td>
</tr>
<tr>
<td width='20%'>网站基本信息：</td>
<td width='80%'>
<%
	For Cii = 0 To Ubound(ChannelConut,2)
		If Int(ChannelConut(5,Cii)) <> 2 And Int(ChannelConut(11,Cii)) <> 4 And Not Cbool(ChannelConut(7,Cii)) Then
			Response.Write "<font class=red>"&ChannelConut(29,Cii)&"</font> "&ChannelConut(15,Cii)&ChannelConut(13,Cii)&"，"
		End If
		If Int(ChannelConut(11,Cii)) = 4 Then
			Nnm_Topic=ChannelConut(29,Cii)
			Num_Data=ChannelConut(30,Cii)
		End If
	Next
	Erase ChannelConut
%>
 [<a href="AMH_Channel.asp?Action=Count" title="请注意定时更新，以确保数据的准确性"><font class=blue>更新数据</font></a>]
 </td>
</tr>
<tr>
<td></td><td>
网站共有 <font class=red><%Response.Write Cls.Web_InfoNo(0,0)%></font> 位用户，最新注册用户是： <%Response.Write format_user_view(Cls.Web_InfoNo(1,0),1,0)%></td>
</tr>
<tr>
<td></td>
<td>论坛主题总数 <font class=red><%Response.Write Nnm_Topic%></font> 贴，论坛贴子总数 <font class=red><%Response.Write Num_Data%></font> 贴，今日论坛贴数 <font class=red><%Response.Write Cls.Web_InfoNo(7,0)%></font> 贴，当前 <font class=red><%Response.Write now_online%></font> 人在线</td>
</tr>
<tr>
<td>网站统计信息：</td>
<td>网站自 <font class=blue><%Response.Write Cls.Time_Type(Cls.Web_InfoNo(5,0),4)%></font> 起，总访问量 <font class=red><%Response.Write Cls.Web_InfoNo(2,0)%></font> 人次，最高峰同时 <font class=red><%Response.Write Cls.Web_InfoNo(3,0)%></font> 人在线（发生在<font class=blue><%Response.Write Cls.Time_Type(Cls.Web_InfoNo(4,0),1)%></font>）</td>
</tr>
</table>
<%
	Response.Write uKong
	Response.Write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
	Call AMH_Td("网站快捷管理操作")
%>
<tr>
<td width='20%'>网站用户搜索：</td>
<td width='80%'>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='AMH_user.asp' method=get>
  <input type=hidden name=AsaiMHMod value='search'>
  <tr>
  <td>关键字：</td>
  <td><input type=text name=keyword value='' size=20 maxlength=20></td>
  <td width=5></td>
  <td><select name=sea_type>
  <option value='username'>按用户名</option>
  <option value='email'>按用户邮件</option>
  <option value='nname'>按用户头衔</option>
  </select></td>
  <td width=5></td>
  <td><input type=submit value='搜索用户' class=btn></td>
  <td width=10></td>
  <td><%Response.Write img_admin("","")%>&nbsp;<a href='AMH_user.asp'>用户管理</a></td>
  </tr>
  </form>
  </table>
</td>
</tr>
<tr>
<td>商城订单搜索：</td>
<td>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='AMH_shop_order.asp' method=get>
  <input type=hidden name=AsaiMHMod value='search'>
  <tr>
  <td>关键字：</td>
  <td><input type=text name=keyword value='' size=20 maxlength=20></td>
  <td width=5></td>
  <td><select name=sea_type>
  <option value='ordernum'>按订单号</option>
  <option value='username'>按注册用户</option>
  <option value='nname'>按真实姓名</option>
  </select></td>
  <td width=5></td>
  <td><input type=submit value='搜索订单' class=btn></td>
  <td width=10></td>
  <td><%Response.Write img_admin("","")%>&nbsp;<a href='AMH_shop_order.asp'>订单管理</a></td>
  </tr>
  </form>
  </table>
</td>
</tr>
<tr>
<td>快捷管理链接：</td>
<td>
  <table border=0 cellspacing=0 cellpadding=2>
  <tr>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_ads.asp'>广告管理</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_Sql.asp'>执行SQL</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_Config.asp' class=red2>配置管理</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_Channel.asp' class=yellow>频道管理</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_Template.asp' class=red>模板管理</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_Event.asp'>管理日记</a></td>
  <td>&nbsp;<%Response.Write img_admin("","")%>&nbsp;<a href='AMH_CreateIndex.asp'>生成首页</a></td>
  </tr>
  </table>
</td>
</tr>
<tr>
<td>消费记录管理：</td>
<td>
  <table border=0>
  <tr>
<%
	If ChkAdmins Then
		SQL="Select Sum(e_amount) from AsaiMHNotesEmoney Where e_ispay=1"
		Set Rs=Cls.Exec(SQL,1)
		sum_pay=Rs(0)
		Rs.Close
		If Not IsNumeric(sum_pay) Then sum_pay=0
%>
  <td><%Response.Write img_admin("s_emoney","")%>&nbsp;总支付金额：<font class=red><%Response.Write sum_pay%></font>&nbsp;元</td>
  <td width=5></td>
<%
	End If
%>
  <td><%Response.Write img_admin("","")%>&nbsp;<a href='AMH_notes.asp'>消费记录</a></td>
  <td width=5></td>
  <td><%Response.Write img_admin("s_imp","")%>&nbsp;<a href='AMH_notes.asp?AsaiMHMod=emoney&action=ispay'>已支付购买</a></td>
  <td width=5></td>
  <td><%Response.Write img_admin("","")%>&nbsp;<a href='AMH_notes.asp?AsaiMHMod=emoney&action=nopay'>未支付购买</a></td>
  </tr>
  </table>
</td>
</tr>
<%
  Response.Write vbcrlf&"</table>"
  Response.Write ukong

  Response.Write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
  Call AMH_td("系统当前配置情况")
  If Cls.Code_Query("system_info")="yes" Then
%>
<table border=0 cellspacing=0 cellpadding=0 class=table3>
<tr align=center valign=top>
<td width='60%'>
  <table cellspacing=1 cellpadding=3 class=table0>
  <tr><td colspan=2 align=center class=tr1>服务器的有关参数</td></tr>
  <tr><td height=22 width='22%'>服务器名：</td><td width='78%'>&nbsp;<%Response.Write Request.ServerVariables("SERVER_NAME")%></td></tr>
  <tr><td height=22>服务器IP：</td><td>&nbsp;<%Response.Write Request.ServerVariables("LOCAL_ADDR")%></td></tr>
  <tr><td height=22>服务器端口：</td><td>&nbsp;<%Response.Write Request.ServerVariables("SERVER_PORT")%></td></tr>
  <tr><td height=22>服务器时间：</td><td>&nbsp;<%Response.Write now%></td></tr>
  <tr><td height=22>IIS版本：</td><td>&nbsp;<%response.write Request.ServerVariables("SERVER_SOFTWARE")%></td></tr>
<%
		Dim WshShell,WshSysEnv,okOS,okCPUS,okCPU
		on error resume next
		Set WshShell = server.CreateObject("WScript.Shell")
		Set WshSysEnv = WshShell.Environment("SYSTEM")
		okOS = cstr(WshSysEnv("OS"))
		okCPUS = cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
		okCPU = cstr(WshSysEnv("PROCESSOR_IDENTIFIER"))
		If IsNull(okCPUS) Then
			okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
		Elseif okCPUS="" Then
			okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
		End If
		If Request.ServerVariables("OS")="" Then okOS=okOS & "(可能是 Windows Server 2003)"
%>
  <tr><td height=22>服务器操作系统：</td><td>&nbsp;<%=okOS%></td></tr>
  <tr><td height=22>脚本超时时间：</td><td>&nbsp;<%response.write Server.ScriptTimeout%> 秒</td></tr>
  <tr><td height=22>站点物理路径：</td><td>&nbsp;<%response.write request.ServerVariables("APPL_PHYSICAL_PATH")%></td></tr>
  <tr><td height=22>服务器CPU情况：</td><td>&nbsp;[<%=okCPUS%> 个][<%=okCPU%>]</td></tr>
  <tr><td height=22>服务器解译引擎：</td><td>&nbsp;<%response.write ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td></tr>
  </table>
</td>
<td width='40%'>
  <table cellspacing=1 cellpadding=3 class=table0>
  <tr><td colspan=2 align=center class=tr1>组件支持有关参数</td></tr>
  <tr><td height=22 width='48%'>ADO 数据对像：</td><td width='52%'>&nbsp;<%Response.Write AMH_object_install("adodb.connection",1)%></td></tr>
  <tr><td height=22>FSO 文本文件读写：</td><td>&nbsp;<%Response.Write AMH_object_install(Cls.Fso_Sys_Var,0)%></td></tr>
  <tr><td height=22>Stream 文件流：</td><td>&nbsp;<%Response.Write AMH_object_install("Adodb.Stream",0)%></td></tr>
  <tr><td height=22>Jmail 邮件收发：</td><td>&nbsp;<%Response.Write AMH_object_install("JMail.SMTPMail",1)%></td></tr>
  <tr><td height=22>ASPmail 发信：</td><td>&nbsp;<%Response.Write AMH_object_install("SMTPsvg.Mailer",1)%></td></tr>
  <tr><td height=22>CDONTS 虚拟SMTP发信：</td><td>&nbsp;<%Response.Write AMH_object_install("CDONTS.NewMail",1)%></td></tr>
  <tr><td height=22>LyfUpload 上传组件：</td><td>&nbsp;<%Response.Write AMH_object_install("LyfUpload.UploadFile",1)%></td></tr>
  <tr><td height=22>AspUpload 上传组件：</td><td>&nbsp;<%Response.Write AMH_object_install("Persits.Upload.1",1)%></td></tr>
  <tr><td height=22>SA-FileUp 上传组件：</td><td>&nbsp;<%Response.Write AMH_object_install("SoftArtisans.FileUp",1)%></td></tr>
  <tr><td height=22>AspJpeg 图像处理组件：</td><td>&nbsp;<%Response.Write AMH_object_install("Persits.Jpeg",1)%></td></tr>
  </table>
</td>
</tr>
</table>
<%
	Else
		Response.Write vbcrlf&"<tr><td colspan=2 height=40>&nbsp;&nbsp;"&img_admin("s_imp","")&"&nbsp;<a href='"&burl&"system_info=yes#system_info'>点击查看系统当前配置情况</td></tr>"
	End If
	Response.Write ukong

	Response.Write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
	Call AMH_Td("系统当前占用空间情况")
	Dim s_system,s_images,s_data,s_ads,s_skin,s_style,s_upload,s_pro,s_other,sys_path,sys_num_folder,sys_num_file,sys_cdate
	If Cls.Code_Query("filesystem_info")="yes" Then
		If object_install(Cls.Fso_Sys_Var) Then
			on error resume next
			tmp1=server.mappath(Cls.Web_Dir)
			Set fso=server.createobject(Cls.Fso_Sys_Var)
			Set obj=fso.getfolder(tmp1)
			s_system=obj.size
			sys_path=tmp1
			sys_num_folder=obj.subfolders.count
			sys_num_file=obj.files.count
			sys_cdate=obj.datecreated
			s_pro=0
			set obj2=obj.files
			For Each tmp2 In obj2
				s_pro=s_pro+tmp2.size
			Next
			Set obj2=nothing
			Set obj=nothing
			Set obj=fso.getfolder(AllPath("Upload/"))
			s_upload=obj.size
			set obj=nothing
			if not fso.folderexists(tmp1&"upload") then s_system=s_system+s_upload
			set obj=fso.getfolder(AllPath("DataBase/"))
			s_data=obj.size
			set obj=nothing
			set obj=fso.getfolder(AllPath("Images/"))
			s_images=obj.size
			set obj=nothing
			set obj=fso.getfolder(AllPath("Ads/"))
			s_ads=obj.size
			set obj=nothing
			set obj=fso.getfolder(AllPath("Skin/"))
			s_skin=obj.size
			set obj=nothing
			set obj=fso.getfolder(AllPath("Style/"))
			s_style=obj.size
			set obj=nothing
			set obj=fso.getfolder(AllPath("Include/"))
			s_pro=s_pro+obj.size
			set obj=nothing
			set fso=nothing
			s_other=s_system-s_data-s_images-s_ads-s_skin-s_style-s_upload-s_pro
			If Err Then Err.Clear
%>
<tr><td colspan=2>
<a name="filesystem_info"></a>
  <table border=0>
  <tr><td colspan=4><%Response.Write img_admin("s_imp","")%>&nbsp;<a alt='物理路径：<%Response.Write sys_path%><br />创建时间：<%Response.Write sys_cdate%>'>系统目录</a>占用空间总量为 <%Response.Write byte_size(s_system)%>，共有 <font class=red><%Response.Write sys_num_folder%></font> 个文件夹，<font class=red><%Response.Write sys_num_file%></font> 个文件，其中：</td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;系统程序占用空间：</td><td><%Response.Write byte_imgs(s_system,s_pro,1)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;数 据 库占用空间：</td><td><%Response.Write byte_imgs(s_system,s_data,2)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;系统图片占用空间：</td><td><%Response.Write byte_imgs(s_system,s_images,2)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;网站Skin占用空间：</td><td><%Response.Write byte_imgs(s_system,s_skin,3)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;广告数据占用空间：</td><td><%Response.Write byte_imgs(s_system,s_ads,4)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;ＪＳ文件占用空间：</td><td><%Response.Write byte_imgs(s_system,s_style,5)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;上传文件占用空间：</td><td><%Response.Write byte_imgs(s_system,s_upload,6)%></td></tr>
  <tr><td><%Response.Write img_admin("","")%>&nbsp;其它文件占用空间：</td><td><%Response.Write byte_imgs(s_system,s_other,7)%></td></tr>
  </table>
</td></tr>
<%
		Else
			Response.Write vbcrlf&"<tr><td colspan=2 class=red height=40>&nbsp;&nbsp;"&img_admin("","")&"&nbsp;您的空间不支持 FSO 文本文件读写，因此不能进行此项检测！</td></tr>"
		End If
	Else
		Response.Write vbcrlf&"<tr><td colspan=2 height=40>&nbsp;&nbsp;"&img_admin("s_imp","")&"&nbsp;<a href='"&burl&"filesystem_info=yes#filesystem_info'>点击查看系统当前占用空间情况</td></tr>"
	End If
	Response.Write uKong
	Response.Write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
	Call AMH_Td(""&Cls.pro_edition&" 版权、常用联系方法、技术支持")
%>
<tr>
<td width='20%'>产品版权：</td>
<td width='80%'>版权所有 &copy; <a href='Http://77ya.Com/' target=_blank>阿赛工作室</a></td>
</tr>
<tr>
<td width="100">支持网站：</td>
<td><%Response.Write img_admin("s_url","")%>&nbsp;<a href='Http://77ya.Com/' target=_blank>访问官方网站</a>&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr>
<td>联系方式：</td>
<td><%Response.Write img_admin("s_email","")%>&nbsp;<a href="mailto:guoyansai@qq.com">guoyansai@qq.com</a></td>
</tr>
<%
  Response.Write vbcrlf&"</table>"
  Response.Write ukong
Call AMH_Ender("")

Function byte_imgs(svar,bvar,bnum)
	Dim tmp1
	tmp1=bvar/svar
	byte_imgs="<font class=tims>"&byte_size(bvar)&"</font>&nbsp;</td><td align=right><font class=tims>"&formatpercent(tmp1,2)&"</font>&nbsp;</td><td><img src='"&Cls.Web_Dir&"Images/vote/vb"&bnum&".gif' border=0 width='"&formatnumber(360*tmp1,2)&"' height=10 align=absmiddle>"
End Function

Function byte_size(svar)
	Dim temp1
	if svar>=1073741824 then
		temp1=int((svar/1073741824)*1000)/1000 & "</font> GB"
	elseif svar>=1048576 then
		temp1=int((svar/1048576)*1000)/1000 & "</font> MB"
	elseif svar>=1024 then
		temp1=int((svar/1024)*1000)/1000 & "</font> KB"
	else
		temp1=svar & "</font> B"
	End If
	byte_size="<font class=red>"&temp1
End Function

Function AMH_object_install(obj,objver)
	on error resume next
	Dim obj_AsaiMH,tmp1
	err=0
	set obj_AsaiMH=server.createobject(obj)
	if -2147221005=Err then
		err.clear
		AMH_object_install="<font class=red><b>×</b></font>&nbsp;<font class=Gys>不支持</font>"
	else
		tmp1=""
		if objver=1 then
			tmp1=obj_AsaiMH.version
			if Cls.Is_Null(tmp1)="" then tmp1=obj_AsaiMH.about
			tmp1=replace(tmp1,"Version","")
			tmp1=trim(tmp1)
			tmp1="&nbsp;<font class=tims><font class=blue>"&tmp1&"</font></font>"
		End If
		AMH_object_install="<b>√</b>&nbsp;<font class=Gys>支持</font>"&tmp1
	End If
	set obj_AsaiMH=nothing
	if -2147221005=Err then err.clear
End Function
%>
