狼道公司源码下载

源代码在线查看: function.asp

软件大小: 4607 K
上传用户: singwolf
关键词: 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				
								function strlen(str)
				   dim p_len
				   p_len=0
				   strlen=0
				   if trim(str)"" then
				      p_len=len(trim(str))
				      for xx=1 to p_len
				         if asc(mid(str,xx,1))				            strlen=int(strlen) + 2
				         else
				           strlen=int(strlen) + 1
				         end if
				     next
				   end if
				end function
				
				function StrValue(str,lennum)
				   dim p_num
				   dim i
				   if strlen(str)				      strvalue=str
				   else
				      p_num=0
				      x=0
				   do while not p_num > lennum-2
				      x=x+1
				     if asc(mid(str,x,1))				        p_num=int(p_num) + 2
				     else
				        p_num=int(p_num) + 1
				     end if
				     strvalue=left(trim(str),x)&"…"
				  loop
				  end if
				end function
				
				function NameValue(str,lennum)
				   dim p_num
				   dim i
				   if strlen(str)				      NameValue=str
				   else
				      p_num=0
				      x=0
				   do while not p_num > lennum-2
				      x=x+1
				     if asc(mid(str,x,1))				        p_num=int(p_num) + 2
				     else
				        p_num=int(p_num) + 1
				     end if
				     Namevalue=left(trim(str),x)
				  loop
				  end if
				end function
				
				'Sub HongYuFso(FilePath)
				'   set FSO=Server.CreateObject("Scripting.FileSystemObject")
				'   if FSO.FileExists(FilePath) then
				'      FSO.DeleteFile(FilePath)
				'   end if
				'End Sub
				
				
				function PxhelpEnCode(str)
				    dim result
				    dim l
				    if isNULL(str) then 
				       htmlencode2=""
				       exit function
				    end if
				    l=len(str)
				    result=""
					dim i
					for i = 1 to l
					    select case mid(str,i,1)
					           case "					                result=result+"<"
					           case ">"
					                result=result+">"
				              case chr(13)
					                result=result+""
					           case chr(34)
					                result=result+"""
					           case "&"
					                result=result+"&"
				              case chr(32)	           
					                'result=result+" "
					                if i+10 then
					                   if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9)  then	                      
					                      result=result+" "
					                   else
					                      result=result+" "
					                   end if
					                else
					                   result=result+" "	                    
					                end if
					           case chr(9)
					                result=result+"    "
					           case else
					                result=result+mid(str,i,1)
				         end select
				       next 
				       PxhelpEnCode=result
				   end function
				
				Sub CloseRs()
				  rs.close
				  set rs=nothing
				end sub
				
				Sub CloseConn()
				   Conn.close
				   Set Conn=nothing
				End Sub
				
				Function China_English_Title(Title,Flag)
				  if instr(Title,"@")				     China_EngLish=Title
				     Exit Function
				  end if 	 	 
				  ArrTitle=split(Title,"@")
				  China_EngLish_Title=ArrTitle(Flag)
				End Function
				%>			

相关资源