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

📄 char.inc

📁 电脑知识十万个为什么-v1.5注册版.zip
💻 INC
字号:
<%
   const iis3onchsys=false       '是否运行于IIS3+中文NT(或pws10a+中文win95)
   const pwsonchsys=true         '本参数是历史遗留问题,请不要改动它的值
   const ANNOUNCE_ALL=false      '是否允许一贴多投
   const PrevAnnounce=false      '是否允许显示前贴内容(如同回复EMAIL一样回复帖子)
   const PRECHAR="> "            '    回复帖子时候的前导字符串,只有当PrevAnnounce=true时有效
   const ANNOUNCE_MAXBYTE=16384  '帖子内容最大的字节数
   const SCRIPT_TIMEOUT=300        '服务器ASP脚本超时时间值,建议不要使用   
   CONST REFRESH_TIME=0          '帖子列表刷新时间,如果其值<100时无效不刷新
   const TIME_ADJUST=0  'hour    '如果服务器远在海外,用于调整帖子加贴时间(调整为北京时间),其值您自定
   const Need_password=true       '是否加贴时每次都需要输入口令

   dim WINNT_CHINESE
   WINNT_CHINESE=(len("是否加贴")=4)

   function strLength(str)
       if WINNT_CHINESE then
          dim l,t,c
          dim i
          l=len(str)
          t=l
          for i=1 to l
             c=asc(mid(str,i,1))
             if c<0 then c=c+65536
             if c>255 then
                t=t+1
             end if
          next
          strLength=t
       else 
          strLength=len(str)
       end if
   end function 



   function htmlencode(str)
    dim result
    dim l
    if isnull(str) then
       htmlencode=""
       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(34)
	                result=result+"&quot;"
	           case "&"
	                result=result+"&amp;"
	           case chr(13)
	                result=result+"<br>"
	           case chr(9)
	                result=result+"&nbsp;&nbsp;&nbsp;&nbsp;"
	           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 else
	                result=result+mid(str,i,1)
         end select
       next 
       htmlencode=result
   end function

   function htmlencode2(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(34)
	                result=result+"&quot;"
	           case "&"
	                result=result+"&amp;"
	           case chr(9)
	                result=result+"    "
	           case else
	                result=result+mid(str,i,1)
         end select
       next 
       htmlencode2=result
   end function


   sub ShowBody(Str)
    dim result
    dim l
    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(34)
	                result=result+"&quot;"
	           case "&"
	                result=result+"&amp;"
	           case chr(13)
	                result=result+"<br>"
	           case chr(9)
	                result=result+"&nbsp;&nbsp;&nbsp;&nbsp;"
	           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 else
	                result=result+mid(str,i,1)
         end select
       next 
       response.write result
   end sub

   sub display(str)
     if not isNULL(str) then 
           showbody str
     end if
   end sub
   
   
   


%>

⌨️ 快捷键说明

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