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

📄 shared_vbfunctions.inc

📁 能实现用户注册
💻 INC
字号:
<!--
<SCRIPT RUNAT=Server LANGUAGE="VBSCRIPT">

Function CutOff(FixWhat, Spaces)
	yy=len(FixWhat)
	if yy>Spaces then
		FixWhat=left(FixWhat,Spaces)
	end if
	CutOff=FixWhat
	'CutOff=Replace(FixWhat,"-","")
End Function

Function Pad(FixWhat, Spaces)
	yy=len(FixWhat)
	if yy<Spaces then
		for xx=1 to (Spaces*2)-yy
			FixWhat=FixWhat & " "
		next
	end if
	Pad=FixWhat
End Function

Function RoundCur(FixWhat)
dim LeftOver
FixWhat=FixWhat*100
LeftOver=FixWhat-int(FixWhat)
if LeftOver=0 then
	'doesn't need rounding	
	RoundCur=FixWhat
else
	'needs rounding
	LeftOver=int(LeftOver*10)
	if LeftOver>4 then
		RoundCur=int(FixWhat)+1
	else
		RoundCur=int(FixWhat)
	end if
end if
RoundCur=RoundCur/100
End Function

Function Dollars(FixWhat)
	dim CharCount
	if isnull(FixWhat) then
		Dollars="<CENTER>$-0-</CENTER>"
	else
		CharCount=Len(FixWhat)
		if CharCount<4 then
			Dollars=FixWhat
		else
			if instr(1,FixWhat,".") then
				if CharCount>6 then
					select case CharCount
						case 7: Dollars=Left(FixWhat,1)
						case 8: Dollars=Left(FixWhat,2)
					end select
					Dollars=Dollars & ","
					Dollars=Dollars & Right(FixWhat,6)
				else
					Dollars=FixWhat
				end if
			else
				select case CharCount
					case 4: Dollars=Left(FixWhat,1)
					case 5: Dollars=Left(FixWhat,2)
					case 6: Dollars=Left(FixWhat,3)
					case 7: Dollars=Left(FixWhat,4)
					case 8: Dollars=Left(FixWhat,5)
				end select
				Dollars=Dollars & ","
				Dollars=Dollars & Right(FixWhat,3)
			end if
		end if
	end if
	Dollars="$" & Dollars
End Function

Function Numbers(FixWhat)
	dim CharCount
	if isnull(FixWhat) then
		Numbers="<CENTER>-0-</CENTER>"
	else
		FixWhat=trim(FixWhat)
		CharCount=CInt(Len(FixWhat)-3)
		if CharCount<1 then
			Numbers=FixWhat
		else
			select case CharCount
				case 1: Numbers=Left(FixWhat,1)
				case 2: Numbers=Left(FixWhat,2)
				case 3: Numbers=Left(FixWhat,3)
				case 4: Numbers=Left(FixWhat,4)
				case 5: Numbers=Left(FixWhat,5)
				case 6: Numbers=Left(FixWhat,6)
			end select
			Numbers=Numbers & ","
			Numbers=Numbers & Right(FixWhat,3)
		end if
	end if
End Function

Function Fix(FixWhat)
	if (isnull(FixWhat) or FixWhat="" or len(FixWhat)=0) then
		Fix=" "
	else
		Fix=trim(FixWhat)
	end if
	Fix=Replace(FixWhat,chr(34),"")	
End Function

Function Fiks(FixWhat)
	if (isnull(FixWhat) or FixWhat="") then
		Fiks="<CENTER> - </CENTER>"
	else
		Fiks=trim(FixWhat)
	end if
End Function

Function AnchorDescription(strProductID, strDescription, CategoryID)
	if (isnull(strProductID) or isnull(strDescription)) then
		AnchorDescription=" - "
	else
		AnchorDescription="<A HREF='ProductDescription.asp?strProductID=" & strProductID & "&CategoryID=" & CategoryID & "'>" & strDescription & "</A>"
	end if
End Function

Function AnchorDescriptionSys(strProductID, strDescription, CategoryID)
	if (isnull(strProductID) or isnull(strDescription)) then
		AnchorDescriptionSys=" - "
	else
		AnchorDescriptionSys="<A HREF='ProductDescriptionSys.asp?strProductID=" & strProductID & "&CategoryID=" & CategoryID & "'>" & strDescription & "</A>"
	end if
End Function

</SCRIPT>
-->

⌨️ 快捷键说明

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