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

📄 function.asp

📁 狼道公司源码下载
💻 ASP
字号:
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<%
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))<0 then
            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)<=lennum then
      strvalue=str
   else
      p_num=0
      x=0
   do while not p_num > lennum-2
      x=x+1
     if asc(mid(str,x,1))<0 then
        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)<=lennum then
      NameValue=str
   else
      p_num=0
      x=0
   do while not p_num > lennum-2
      x=x+1
     if asc(mid(str,x,1))<0 then
        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+"&lt;"
	           case ">"
	                result=result+"&gt;"
              case chr(13)
	                result=result+"<br>"
	           case chr(34)
	                result=result+"&quot;"
	           case "&"
	                result=result+"&amp;"
              case chr(32)	           
	                'result=result+"&nbsp;"
	                if i+1<=l and i-1>0 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+"&nbsp;"
	                   else
	                      result=result+" "
	                   end if
	                else
	                   result=result+"&nbsp;"	                    
	                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,"@")<1 then 
     China_EngLish=Title
     Exit Function
  end if 	 	 
  ArrTitle=split(Title,"@")
  China_EngLish_Title=ArrTitle(Flag)
End Function
%>

⌨️ 快捷键说明

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