<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="../include/Lebi_Config.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_space.asp
'* 最后更新 2011-09-22 by 56770.kingdge
'*****************************************
Dim admin_flag
admin_flag=",10.7,"
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_admin.inc"
include "lang/"& LangFilePath &"/lang_space.inc"
CurrentId = 0
CurrentUrl = "admin_space.asp"
LB_Head()
LB_Menu()
%>
<div class="tabmenu mainwidth">
      <ul>
		<li class="current"><a href="admin_space.asp"><span><%=Lang_Menu(155)%></span></a></li>
		<li><a href="admin_license.asp"><span><%=Lang_Menu(61)%></span></a></li>
        <li><a href="Admin_Config.asp"><span><%=Lang_Menu(187)%></span></a></li>
        <li><a href="Admin_upgrade.asp"><span><%=Lang_Menu(190)%></span></a></li>
      </ul>
</div>
<%
Response.Write("<div class=""tab-mainbody"">")
Response.Write("<div class=""tab-mainbody2"">")
If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
		adminflag()
End If
If OutSubmit = 1 Then CheckOutSubmit()
Get_Usersurl()
Dim okOS,okCpus,okCPU
'=====================系统空间参数=========================
Sub ShowSpaceInfo(drvpath)
	dim fso,d,size,showsize
	set fso=server.createobject("scripting.filesystemobject")
	drvpath=server.mappath(drvpath)
	set d=fso.getfolder(drvpath)
	size=d.size
	showsize=size & "&nbsp;Byte"
	if size>1024 then
	   size=(Size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;KB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;MB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;GB"
	end if
	response.write "" & showsize & ""
End Sub

Sub Showspecialspaceinfo(method)
	dim fso,d,fc,f1,size,showsize,drvpath
	set fso=server.createobject("scripting.filesystemobject")
	drvpath=server.mappath("../default.asp")
	drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
	set d=fso.getfolder(drvpath)
	if method="All" then
		size=d.size
	elseif method="Program" then
		set fc=d.Files
		for each f1 in fc
			size=size+f1.size
		next
	end if
	showsize=size & "&nbsp;Byte"
	if size>1024 then
	   size=(Size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;KB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;MB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;GB"
	end if
	response.write "<font face=verdana>" & showsize & "</font>"
end sub

Function Drawbar(drvpath)
	dim fso,drvpathroot,d,size,totalsize,barsize
	set fso=server.createobject("scripting.filesystemobject")
	drvpathroot=server.mappath("../default.asp")
	drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
	set d=fso.getfolder(drvpathroot)
	totalsize=d.size
	drvpath=server.mappath(drvpath)
	if fso.FolderExists(drvpath) then
		set d=fso.getfolder(drvpath)
		size=d.size
	End If
	barsize=cint((size/totalsize)*400)
	Drawbar=barsize
End Function

Function Drawspecialbar()
	dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
	set fso=server.createobject("scripting.filesystemobject")
	drvpathroot=server.mappath("../default.asp")
	drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
	set d=fso.getfolder(drvpathroot)
	totalsize=d.size
	set fc=d.files
	for each f1 in fc
		size=size+f1.size
	next
	barsize=cint((size/totalsize)*400)
	Drawspecialbar=barsize
End Function

Function GetAllSpace()
	Dim fso,drvpath,d,size
	set fso=server.createobject("scripting.filesystemobject")
	drvpath=server.mappath("../default.asp")
	drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
	set d=fso.getfolder(drvpath)
	size=d.size
	set fso=nothing
	GetAllSpace = size
End Function

Function GetFileSize(FileName)
	Dim fso,drvpath,d,size,showsize
	set fso=server.createobject("scripting.filesystemobject")
	drvpath=server.mappath(FileName)
	'drvpath=server.mappath("Admin_space.asp")
	'drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
	set d=fso.getfile(drvpath)
	size=d.size
	showsize=size & "&nbsp;Byte"
	if size>1024 then
	   size=(Size/1024)
	   showsize=size & "&nbsp;KB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;MB"
	end if
	if size>1024 then
	   size=(size/1024)
	   showsize=formatnumber(size,2) & "&nbsp;GB"
	end if
	set fso=nothing
	GetFileSize = showsize
End Function

Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If 0 = Err Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function

Sub GetSysInfo()
	On Error Resume Next
	Dim WshShell,WshSysEnv
	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)"
End Sub
GetSysInfo()
Dim t
t = GetAllSpace
Dim FoundFso
FoundFso = False
FoundFso = IsObjInstalled("Scripting.FileSystemObject")
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="space" class="classtable">
<tr>
<td height="30" align="left" colspan="3" class="classhead">
<%=Lang_Menu(155)%>
</td>
<td align="right" class="classhead">
<%=QuickMenu("Admin_upfile.asp|"& Lang_Menu(153) &"","admin_license.asp|"& Lang_Menu(61) &"")%>
</td>
</tr>
<tr>
<td height="30" colspan="4" class="classtop">
<%=Lang_Space(1)%>
</td>
</tr>
<tr class="classrow">
	<td height="30" class="classrow"><%=Lang_Admin(5)%></td>
	<td colspan="3" class="classrow">56770 EShop Version <%=copy_soft%> <script src="http://www.56770.com/post/b.asp?u=<%= server.urlencode(Request.ServerVariables("SERVER_NAME") & Eshop_Url) %>&v=<%= copy_soft %>&n=<%= sys_name %>&m=<%= sys_mail %>"></script></td>
</tr>
<tr class="classrow">
	<td height="30" class="classrow"><%=Lang_Admin(7)%></td>
	<td class="classrow"><%=Lang_Admin(8)%></td>
	<td height="30" class="classrow"><%=Lang_Admin(9)%></td>
	<td class="classrow"><a href="http://www.56770.com/About/contact.html" target="_blank">http://www.56770.com/About/contact.html</a></td>
</tr>
<tr class="classrow">
<td width="15%" height="30" class="classrow"><%=Lang_Admin(6)%></td>
<td width="35%" class="classrow">2005SR04603</td>
<td width="15%" class="classrow"><%=Lang_Space(2)%></td>
<td width="35%" class="classrow"><%
if IsSqlDataBase = 1 Then
        Response.write" Ms Sql"
else
        Response.write" Access"
end     if
%></td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Space(3)%></td>
<td class="classrow"><%=Request.ServerVariables("SERVER_NAME")%> / <%=Request.ServerVariables("LOCAL_ADDR")%></td>
<td class="classrow"><%=Lang_Space(4)%></td>
<td class="classrow"><%
	If IsSqlDataBase = 0 Then
		Response.write "<img src=""images/bar.gif"" width="""& drawbar("../database") &""" height=""10"" alt="""
		showSpaceinfo("../database")
		Response.write """>"
	Else
		Response.write "<font color=gray>"& Lang_Space(5) &"</font>"
	End If
%></td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Space(6)%></td>
<td class="classrow"><img src="images/bar.gif" width=<%=drawbar("../pic/gg")%> height=10 alt="<%showSpaceinfo("../pic/gg")%>"></td>
<td class="classrow"><%=Lang_Space(7)%></td>
<td class="classrow"><img src="images/bar.gif" width=<%=drawbar("../"& picpath)%> height=10 alt="<%showSpaceinfo("../"& picpath)%>"></td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Space(8)%></td>
<td class="classrow"><img src="images/bar.gif" width=<%=drawbar("../html")%> height=10 alt="<%showSpaceinfo("../html")%>"></td>
<td class="classrow"><%=Lang_Space(9)%></td>
<td class="classrow"><%showspecialspaceinfo("All")%></td>
</tr>
<tr>
<td height="30" colspan="4" class="classtop">
<%=Lang_Space(10)%>
</td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Space(11)%></td>
<td class="classrow"><%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
<td class="classrow"><%=Lang_Space(12)%></td>
<td class="classrow"><%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Space(13)%></td>
<td class="classrow"><%=okos%></td>
<td class="classrow"><%=Lang_Space(14)%></td>
<td class="classrow"><%=okcpus%></td>
</tr>
<tr class="classrow">
<td height="30" class="classrow"><%=Lang_Space(15)%></td>
<td class="classrow" colspan="3"><%=Replace(Server.Mappath("Admin_space.asp"),AdminPath&"\Admin_space.asp","")%></td>
</tr>
<tr>
<td height="30" colspan="4"  class="classtop"><%=Lang_Space(16)%></td>
</tr>
<tr class="classrow">
<td class="classrow" height="30"><%=Lang_Admin(20)%></td>
<td class="classrow"><%
If FoundFso Then
	Response.Write "<font color=green><b>√</b></font>"
Else
	Response.Write "<font color=red><b>×</b></font>"
End If
%></td>
<td class="classrow"><%=Lang_Admin(22)%></td>
<td class="classrow"><%
If IsObjInstalled("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="classrow">
<td class="classrow" height="30"><%=Lang_Admin(23)%></td>
<td class="classrow"><%
If IsObjInstalled("CDONTS.NewMail") Then
	Response.Write "<font color=green><b>√</b></font>"
Else
	Response.Write "<font color=red><b>×</b></font>"
End If
%></td>
<td class="classrow"><%=Lang_Admin(24)%></td>
<td class="classrow"><%
If IsObjInstalled("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="classrow">
<td class="classrow" height="30"><%=Lang_Admin(21)%></td>
<td class="classrow"><%
If IsObjInstalled("Adodb.Stream") Then
	Response.Write "<font color=green><b>√</b></font>"
Else
	Response.Write "<font color=red><b>×</b></font>"
End If
%></td>
<td class="classrow"><%=Lang_Admin(25)%></td>
<td class="classrow"><%
If IsObjInstalled("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="classrow">
<td class="classrow" height="30"><%=Lang_Admin(26)%></td>
<td class="classrow"><%
If IsObjInstalled("SoftArtisans.FileUp") Then
	Response.Write "<font color=green><b>√</b></font>"
Else
	Response.Write "<font color=red><b>×</b></font>"
End If
%></td>
<td class="classrow"><%=Lang_Admin(27)%></td>
<td class="classrow"><%
If IsObjInstalled("Persits.Jpeg") Then
	Response.Write "<font color=green><b>√</b></font>"
Else
	Response.Write "<font color=red><b>×</b></font>"
End If
%></td>
</tr>
</table>
<script>tdshow("space");</script>
</div>
</div>
<%LB_Footer()%>