<!--#include file="../../conn.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/const.asp"-->
<!--#include file="../inc/check.asp"-->
<%
Dim InstallDir_ChannelDir,Channel_Setting

If ChannelID=0 Then
	ChannelID=2
Else
	InstallDir_ChannelDir = Trim(NewAsp.InstallDir & NewAsp.ChannelDir)
	Channel_Setting = Split(NewAsp.Channel_Setting & "|||||||||||||||", "|||")
End If
If Not ChkAdmin("Soft_"&ChannelID) Then
	Call Transfer_error()
End If
'================================================
'函数名：FormatSoftsize
'作  用：格式化软件的大小
'================================================
Function FormatSoftsize(ByVal para)
	On Error Resume Next
	Dim parasize
	parasize = CCur(para)

	If parasize = 0 Then
		FormatSoftsize = "未知"
		Exit Function
	End If
	If parasize > 1024*1024+5200 Then
		FormatSoftsize = FormatRound(Round(parasize / (1024*1024), 2)) & " GB"
		Exit Function
	ElseIf parasize > 1024+5 Then
		FormatSoftsize = FormatRound(Round(parasize / 1024, 2)) & " MB"
		Exit Function
	Else
		FormatSoftsize = FormatRound(parasize) & " KB"
		Exit Function
	End If
	FormatSoftsize = "未知"
End Function

Function FormatRound(ByVal m_Parameter)
	Dim m_strParameter,m_strlen
	m_Parameter = CStr(m_Parameter)
	m_strlen = len(m_Parameter)
	If InStr(m_Parameter,".") = 0 Then
		If m_strlen > 2 Then
			m_strParameter = m_Parameter
		ElseIf m_strlen = 2 Then
			m_strParameter = m_Parameter & ".0"
		Else
			m_strParameter = m_Parameter & ".00"
		End If
	Else
		If m_strlen > 3 Then
			m_strParameter = m_Parameter
		Else
			m_strParameter = m_Parameter & "0"
		End If
	End If
	FormatRound = m_strParameter
End Function
%>