{"id":333,"date":"2009-01-08T09:39:48","date_gmt":"2009-01-08T01:39:48","guid":{"rendered":""},"modified":"2014-02-27T23:06:06","modified_gmt":"2014-02-27T15:06:06","slug":"asp%e5%b8%b8%e7%94%a8%e5%87%bd%e6%95%b0%e7%9a%8410%e7%bb%8f%e5%85%b8%e5%a4%a7%e6%94%b6%e9%9b%86","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2009\/01\/08\/333.htm","title":{"rendered":"ASP\u5e38\u7528\u51fd\u6570\u768410\u7ecf\u5178\u5927\u6536\u96c6"},"content":{"rendered":"<p>ASP\u5e38\u7528\u51fd\u6570\u768410\u7ecf\u5178\u5927\u6536\u96c6<\/p>\n<p>&#8216;\u8fc7\u6ee4\u7279\u6b8a\u5b57\u7b26<br \/>\n&#8216;*************************************<br \/>\nFunction Filterstr(Str)<br \/>\nIf Isnull(Str) Then<br \/>\nFilterstr = &quot;&quot;<br \/>\nExit Function <br \/>\nEnd If<br \/>\nStr = Replace(Str,Chr(0),&quot;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;&quot;&quot;&quot;,&quot;&amp;quot;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;&lt;&quot;,&quot;&amp;lt;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;&gt;&quot;,&quot;&amp;gt;&quot;,1,-1,1) <br \/>\nStr = Replace(Str,&quot;script&quot;,&quot;&amp;#115;cript&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;SCRIPT&quot;,&quot;&amp;#083;CRIPT&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;Script&quot;,&quot;&amp;#083;cript&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;script&quot;,&quot;&amp;#083;cript&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;object&quot;,&quot;&amp;#111;bject&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;OBJECT&quot;,&quot;&amp;#079;BJECT&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;Object&quot;,&quot;&amp;#079;bject&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;object&quot;,&quot;&amp;#079;bject&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;applet&quot;,&quot;&amp;#097;pplet&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;APPLET&quot;,&quot;&amp;#065;PPLET&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;Applet&quot;,&quot;&amp;#065;pplet&quot;,1,-1,0)<br \/>\nStr = Replace(Str,&quot;applet&quot;,&quot;&amp;#065;pplet&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;[&quot;,&quot;&amp;#091;&quot;)<br \/>\nStr = Replace(Str,&quot;]&quot;,&quot;&amp;#093;&quot;)<br \/>\nStr = Replace(Str,&quot;&quot;&quot;&quot;,&quot;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;=&quot;,&quot;&amp;#061;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;&#8217;&quot;,&quot;&#8221;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;select&quot;,&quot;sel&amp;#101;ct&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;execute&quot;,&quot;&amp;#101xecute&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;exec&quot;,&quot;&amp;#101xec&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;join&quot;,&quot;jo&amp;#105;n&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;union&quot;,&quot;un&amp;#105;on&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;where&quot;,&quot;wh&amp;#101;re&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;insert&quot;,&quot;ins&amp;#101;rt&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;delete&quot;,&quot;del&amp;#101;te&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;update&quot;,&quot;up&amp;#100;ate&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;like&quot;,&quot;lik&amp;#101;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;drop&quot;,&quot;dro&amp;#112;&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;create&quot;,&quot;cr&amp;#101;ate&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;rename&quot;,&quot;ren&amp;#097;me&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;count&quot;,&quot;co&amp;#117;nt&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;chr&quot;,&quot;c&amp;#104;r&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;mid&quot;,&quot;m&amp;#105;d&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;truncate&quot;,&quot;trunc&amp;#097;te&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;nchar&quot;,&quot;nch&amp;#097;r&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;char&quot;,&quot;ch&amp;#097;r&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;alter&quot;,&quot;alt&amp;#101;r&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;cast&quot;,&quot;ca&amp;#115;t&quot;,1,-1,1)<br \/>\nStr = Replace(Str,&quot;exists&quot;,&quot;e&amp;#120;ists&quot;,1,-1,1)<br \/>\nFilterstr = Replace(Str,&quot;&#8217;&quot;,&quot;&#8221;&quot;,1,-1,1)<br \/>\nEnd Function &#8216;*************************************<br \/>\n&#8216;\u8fc7\u6ee4\u7279\u6b8a\u5b57\u7b26<br \/>\n&#8216;*************************************<br \/>\nFunction CheckStr(byVal ChkStr) <br \/>\nDim Str:Str=ChkStr<br \/>\nStr=Trim(Str)<br \/>\nIf IsNull(Str) Then<br \/>\nCheckStr = &quot;&quot;<br \/>\nExit Function <br \/>\nEnd If<br \/>\n&nbsp;&nbsp;&nbsp; Str = Replace(Str, &quot;&amp;&quot;, &quot;&amp;amp;&quot;)<br \/>\n&nbsp;&nbsp;&nbsp; Str = Replace(Str,&quot;&#8217;&quot;,&quot;&amp;#39;&quot;)<br \/>\n&nbsp;&nbsp;&nbsp; Str = Replace(Str,&quot;&quot;&quot;&quot;,&quot;&amp;#34;&quot;)<br \/>\nDim re<br \/>\nSet re=new RegExp<br \/>\nre.IgnoreCase =True<br \/>\nre.Global=True<br \/>\nre.Pattern=&quot;(w)(here)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1h&amp;#101;re&quot;)<br \/>\nre.Pattern=&quot;(s)(elect)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1el&amp;#101;ct&quot;)<br \/>\nre.Pattern=&quot;(i)(nsert)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1ns&amp;#101;rt&quot;)<br \/>\nre.Pattern=&quot;(c)(reate)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1r&amp;#101;ate&quot;)<br \/>\nre.Pattern=&quot;(d)(rop)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1ro&amp;#112;&quot;)<br \/>\nre.Pattern=&quot;(a)(lter)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1lt&amp;#101;r&quot;)<br \/>\nre.Pattern=&quot;(d)(elete)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1el&amp;#101;te&quot;)<br \/>\nre.Pattern=&quot;(u)(pdate)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1p&amp;#100;ate&quot;)<br \/>\nre.Pattern=&quot;(\\s)(or)&quot;<br \/>\n&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1o&amp;#114;&quot;)<br \/>\nSet re=Nothing<br \/>\nCheckStr=Str<br \/>\nEnd Function&#8217;*************************************<br \/>\n&#8216;\u6062\u590d\u7279\u6b8a\u5b57\u7b26<br \/>\n&#8216;*************************************<br \/>\nFunction UnCheckStr(ByVal Str)<br \/>\nIf IsNull(Str) Then<br \/>\nUnCheckStr = &quot;&quot;<br \/>\nExit Function <br \/>\nEnd If<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; Str = Replace(Str,&quot;&amp;#39;&quot;,&quot;&#8217;&quot;)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Str = Replace(Str,&quot;&amp;#34;&quot;,&quot;&quot;&quot;&quot;)<br \/>\nDim re<br \/>\nSet re=new RegExp<br \/>\nre.IgnoreCase =True<br \/>\nre.Global=True<br \/>\nre.Pattern=&quot;(w)(h&amp;#101;re)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1here&quot;)<br \/>\nre.Pattern=&quot;(s)(el&amp;#101;ct)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1elect&quot;)<br \/>\nre.Pattern=&quot;(i)(ns&amp;#101;rt)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1nsert&quot;)<br \/>\nre.Pattern=&quot;(c)(r&amp;#101;ate)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1reate&quot;)<br \/>\nre.Pattern=&quot;(d)(ro&amp;#112;)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1rop&quot;)<br \/>\nre.Pattern=&quot;(a)(lt&amp;#101;r)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1lter&quot;)<br \/>\nre.Pattern=&quot;(d)(el&amp;#101;te)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1elete&quot;)<br \/>\nre.Pattern=&quot;(u)(p&amp;#100;ate)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; str = re.replace(str,&quot;$1pdate&quot;)<br \/>\nre.Pattern=&quot;(\\s)(o&amp;#114;)&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; Str = re.replace(Str,&quot;$1or&quot;)<br \/>\nSet re=Nothing<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Str = Replace(Str, &quot;&amp;amp;&quot;, &quot;&amp;&quot;)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; UnCheckStr=Str<br \/>\nEnd Function&#8217;*************************************<br \/>\n&#8216;\u83b7\u53d6\u5ba2\u6237\u7aef\u6d4f\u89c8\u5668\u4fe1\u606f<br \/>\n&#8216;*************************************<br \/>\nfunction getBrowser(strUA) <br \/>\ndim arrInfo,strType,temp1,temp2<br \/>\nstrType=&quot;&quot;<br \/>\nstrUA=LCase(strUA)<br \/>\narrInfo=Array(&quot;Unkown&quot;,&quot;Unkown&quot;)<br \/>\n&#8216;\u6d4f\u89c8\u5668\u5224\u65ad<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;mozilla&quot;)&gt;0 then arrInfo(0)=&quot;Mozilla&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;icab&quot;)&gt;0 then arrInfo(0)=&quot;iCab&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;lynx&quot;)&gt;0 then arrInfo(0)=&quot;Lynx&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;links&quot;)&gt;0 then arrInfo(0)=&quot;Links&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;elinks&quot;)&gt;0 then arrInfo(0)=&quot;ELinks&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;jbrowser&quot;)&gt;0 then arrInfo(0)=&quot;JBrowser&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;konqueror&quot;)&gt;0 then arrInfo(0)=&quot;konqueror&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;wget&quot;)&gt;0 then arrInfo(0)=&quot;wget&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;ask jeeves&quot;)&gt;0 or Instr(strUA,&quot;teoma&quot;)&gt;0 then arrInfo(0)=&quot;Ask Jeeves\/Teoma&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;wget&quot;)&gt;0 then arrInfo(0)=&quot;wget&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;opera&quot;)&gt;0 then arrInfo(0)=&quot;opera&quot;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;gecko&quot;)&gt;0 then <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strType=&quot;[Gecko]&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=&quot;Mozilla&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;aol&quot;)&gt;0 then arrInfo(0)=&quot;AOL&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;netscape&quot;)&gt;0 then arrInfo(0)=&quot;Netscape&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;firefox&quot;)&gt;0 then arrInfo(0)=&quot;FireFox&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;chimera&quot;)&gt;0 then arrInfo(0)=&quot;Chimera&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;camino&quot;)&gt;0 then arrInfo(0)=&quot;Camino&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;galeon&quot;)&gt;0 then arrInfo(0)=&quot;Galeon&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;k-meleon&quot;)&gt;0 then arrInfo(0)=&quot;K-Meleon&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=arrInfo(0)+strType<br \/>\n&nbsp;&nbsp; end if<br \/>\n&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp; if Instr(strUA,&quot;bot&quot;)&gt;0 or Instr(strUA,&quot;crawl&quot;)&gt;0 then <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strType=&quot;[Bot\/Crawler]&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=&quot;&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;grub&quot;)&gt;0 then arrInfo(0)=&quot;Grub&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;googlebot&quot;)&gt;0 then arrInfo(0)=&quot;GoogleBot&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;msnbot&quot;)&gt;0 then arrInfo(0)=&quot;MSN Bot&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;slurp&quot;)&gt;0 then arrInfo(0)=&quot;Yahoo! Slurp&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=arrInfo(0)+strType<br \/>\nend if<\/p>\n<p>if Instr(strUA,&quot;applewebkit&quot;)&gt;0 then <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strType=&quot;[AppleWebKit]&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=&quot;&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;omniweb&quot;)&gt;0 then arrInfo(0)=&quot;OmniWeb&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;safari&quot;)&gt;0 then arrInfo(0)=&quot;Safari&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=arrInfo(0)+strType<br \/>\nend if<\/p>\n<p>if Instr(strUA,&quot;msie&quot;)&gt;0 then <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strType=&quot;[MSIE&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; temp1=mid(strUA,(Instr(strUA,&quot;msie&quot;)+4),6)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; temp2=Instr(temp1,&quot;;&quot;)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; temp1=left(temp1,temp2-1)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strType=strType &amp; temp1 &amp;&quot;]&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=&quot;Internet Explorer&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;msn&quot;)&gt;0 then arrInfo(0)=&quot;MSN&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;aol&quot;)&gt;0 then arrInfo(0)=&quot;AOL&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;webtv&quot;)&gt;0 then arrInfo(0)=&quot;WebTV&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;myie2&quot;)&gt;0 then arrInfo(0)=&quot;MyIE2&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;maxthon&quot;)&gt;0 then arrInfo(0)=&quot;Maxthon&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;gosurf&quot;)&gt;0 then arrInfo(0)=&quot;GoSurf&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;netcaptor&quot;)&gt;0 then arrInfo(0)=&quot;NetCaptor&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;sleipnir&quot;)&gt;0 then arrInfo(0)=&quot;Sleipnir&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;avant browser&quot;)&gt;0 then arrInfo(0)=&quot;AvantBrowser&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;greenbrowser&quot;)&gt;0 then arrInfo(0)=&quot;GreenBrowser&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;slimbrowser&quot;)&gt;0 then arrInfo(0)=&quot;SlimBrowser&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(0)=arrInfo(0)+strType<br \/>\n&nbsp;&nbsp; end if<\/p>\n<p>&#8216;\u64cd\u4f5c\u7cfb\u7edf\u5224\u65ad<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows&quot;)&gt;0 then arrInfo(1)=&quot;Windows&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows ce&quot;)&gt;0 then arrInfo(1)=&quot;Windows CE&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows 95&quot;)&gt;0 then arrInfo(1)=&quot;Windows 95&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;win98&quot;)&gt;0 then arrInfo(1)=&quot;Windows 98&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows 98&quot;)&gt;0 then arrInfo(1)=&quot;Windows 98&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows 2000&quot;)&gt;0 then arrInfo(1)=&quot;Windows 2000&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows xp&quot;)&gt;0 then arrInfo(1)=&quot;Windows XP&quot;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows nt&quot;)&gt;0 then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arrInfo(1)=&quot;Windows NT&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows nt 5.0&quot;)&gt;0 then arrInfo(1)=&quot;Windows 2000&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows nt 5.1&quot;)&gt;0 then arrInfo(1)=&quot;Windows XP&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;windows nt 5.2&quot;)&gt;0 then arrInfo(1)=&quot;Windows 2003&quot;<br \/>\n&nbsp;&nbsp;&nbsp; end if<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;x11&quot;)&gt;0 or Instr(strUA,&quot;unix&quot;)&gt;0 then arrInfo(1)=&quot;Unix&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;sunos&quot;)&gt;0 or Instr(strUA,&quot;sun os&quot;)&gt;0 then arrInfo(1)=&quot;SUN OS&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;powerpc&quot;)&gt;0 or Instr(strUA,&quot;ppc&quot;)&gt;0 then arrInfo(1)=&quot;PowerPC&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;macintosh&quot;)&gt;0 then arrInfo(1)=&quot;Mac&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;mac osx&quot;)&gt;0 then arrInfo(1)=&quot;MacOSX&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;freebsd&quot;)&gt;0 then arrInfo(1)=&quot;FreeBSD&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;linux&quot;)&gt;0 then arrInfo(1)=&quot;Linux&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;palmsource&quot;)&gt;0 or Instr(strUA,&quot;palmos&quot;)&gt;0 then arrInfo(1)=&quot;PalmOS&quot;<br \/>\n&nbsp;&nbsp;&nbsp; if Instr(strUA,&quot;wap &quot;)&gt;0 then arrInfo(1)=&quot;WAP&quot;<\/p>\n<p>&#8216;arrInfo(0)=strUA <br \/>\ngetBrowser=arrInfo<br \/>\nend function&#8217;*************************************<br \/>\n&#8216;\u83b7\u53d6\u5ba2\u6237\u7aefIP<br \/>\n&#8216;*************************************<br \/>\nfunction getIP() <br \/>\n&nbsp;&nbsp; dim strIP,IP_Ary,strIP_list<br \/>\n&nbsp;&nbsp; strIP_list=Replace(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;),&quot;&#8217;&quot;,&quot;&quot;)<br \/>\n&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp; If InStr(strIP_list,&quot;,&quot;)&lt;&gt;0 Then<br \/>\n&nbsp;&nbsp; IP_Ary = Split(strIP_list,&quot;,&quot;)<br \/>\n&nbsp;&nbsp; strIP = IP_Ary(0)<br \/>\n&nbsp;&nbsp; Else<br \/>\n&nbsp;&nbsp; strIP = strIP_list<br \/>\n&nbsp;&nbsp; End IF<br \/>\n&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp; If strIP=Empty Then strIP=Replace(Request.ServerVariables(&quot;REMOTE_ADDR&quot;),&quot;&#8217;&quot;,&quot;&quot;)<br \/>\n&nbsp;&nbsp; getIP=strIP<br \/>\nEnd Function&#8217;*************************************<br \/>\n&#8216;\u56fe\u7247\u6dfb\u52a0\u6c34\u5370\u51fd\u6570<br \/>\n&#8216;*************************************<br \/>\nsub setWatermark(picFile,stampFile)<br \/>\non error resume next<br \/>\nif CheckObjInstalled(&quot;Persits.Jpeg&quot;)=true then<br \/>\nSet stamp = Server.CreateObject(&quot;Persits.Jpeg&quot;) <br \/>\nstampFile = Server.MapPath(stampFile)<br \/>\nstamp.Open stampFile <br \/>\nSet Photo = Server.CreateObject(&quot;Persits.Jpeg&quot;) <br \/>\npicFile = Server.MapPath(picFile)<br \/>\nPhoto.Open picFile <br \/>\nwh=Photo.width\/2-stamp.Width\/2<br \/>\nht=Photo.height\/2-stamp.Height\/2<br \/>\nPhoto.DrawImage wh,1,stamp,0.2,&amp;HFFFFFF<br \/>\nPhoto.Save picFile<br \/>\nset stamp=nothing<br \/>\nset Photo=nothing<br \/>\nelse<br \/>\nresponse.Write &quot;\u670d\u52a1\u5668\u4e0d\u652f\u6301Persits.Jpeg\u7ec4\u4ef6\uff0c\u6c34\u5370\u6dfb\u52a0\u5931\u8d25\u3002\u540c\u65f6\uff0c\u53ef\u80fd\u5bfc\u81f4\u672c\u7f51\u7ad9\u5f88\u591a\u4e3b\u8981\u529f\u80fd\u4e0d\u80fd\u4f7f\u7528\uff0c\u8bf7\u4e3a\u670d\u52a1\u5668\u5b89\u88c5Persits.Jpeg\u7ec4\u4ef6\u3002&quot;<br \/>\nexit sub<br \/>\nend if<br \/>\nend sub&#8217;*************************************<br \/>\n&#8216;\u5236\u4f5c\u56fe\u7247\u7f29\u7565\u56fe\u51fd\u6570<br \/>\n&#8216;*************************************<br \/>\nsub createMiniPic(picFile,miniFile,miniWidth,miniHeight)<br \/>\non error resume next<br \/>\nif CheckObjInstalled(&quot;Persits.Jpeg&quot;)=true then<br \/>\nResponse.Expires = 0<br \/>\nSet Jpeg = Server.CreateObject(&quot;Persits.Jpeg&quot;)<br \/>\nJpeg.Open(server.mappath(picFile))<br \/>\n&#8216;orgWidth=Jpeg.OriginalWidth<br \/>\n&#8216;orgheight=Jpeg.OriginalHeight<br \/>\n&#8216;scale=orgWidth\/orgheight<br \/>\n&#8216;width=miniHeight*scale<br \/>\n&#8216;if width&gt;miniWidth then width=miniWidth<br \/>\nJpeg.Width = miniWidth<br \/>\nJpeg.Height = miniHeight<br \/>\nJpeg.Save server.mappath(miniFile)<br \/>\nset Jpeg=nothing<br \/>\nelse<br \/>\nresponse.Write &quot;\u670d\u52a1\u5668\u4e0d\u652f\u6301Persits.Jpeg\u7ec4\u4ef6\uff0c\u6c34\u5370\u6dfb\u52a0\u5931\u8d25\u3002\u540c\u65f6\uff0c\u53ef\u80fd\u5bfc\u81f4\u672c\u7f51\u7ad9\u5f88\u591a\u4e3b\u8981\u529f\u80fd\u4e0d\u80fd\u4f7f\u7528\uff0c\u8bf7\u4e3a\u670d\u52a1\u5668\u5b89\u88c5Persits.Jpeg\u7ec4\u4ef6\u3002&quot;<br \/>\nexit sub<br \/>\nend if<br \/>\nend sub<br \/>\n&#8216;*************************************<br \/>\n&#8216;***\u4e8c\u8fdb\u5236\u6570\u636e\u8f6c\u5316\u4e3a\u5b57\u7b26\u4e32\u51fd\u6570<br \/>\n&#8216;*************************************<br \/>\nFunction Bytes2bStr(vin)<br \/>\nif lenb(vin) =0 then<br \/>\nBytes2bStr = &quot;&quot;<br \/>\nexit function<br \/>\nend if<br \/>\n&#8221;\u4e8c\u8fdb\u5236\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<br \/>\nDim BytesStream,StringReturn<br \/>\nset BytesStream = Server.CreateObject(&quot;ADODB.Stream&quot;)<br \/>\nBytesStream.Type = 2 <br \/>\nBytesStream.Open<br \/>\nBytesStream.WriteText vin<br \/>\nBytesStream.Position = 0<br \/>\nBytesStream.Charset = &quot;gb2312&quot;<br \/>\nBytesStream.Position = 2<br \/>\nStringReturn = BytesStream.ReadText<br \/>\nBytesStream.close<br \/>\nset BytesStream = Nothing<br \/>\nBytes2bStr = StringReturn<br \/>\nEnd Function&#8217;*************************************<br \/>\n&#8216;***enctype=&quot;multipart\/form-data&quot;\u7684\u8868<br \/>\n&#8216;\u5355\u6570\u636e\u7684\u6587\u672c\u6570\u636e\u63d0\u53d6\u51fd\u6570<br \/>\n&#8216;*************************************<br \/>\nFunction Myrequest(fldname)<br \/>\n&#8221;\u53d6\u8868\u5355\u6570\u636e\uff0c\u652f\u6301\u5bf9\u540c\u540d\u8868\u5355\u57df\u7684\u8bfb\u53d6<br \/>\ndim i,fldHead,tmpvalue<br \/>\nfor i = 0 to loopcnt-1<br \/>\nfldHead = fldInfo(i,0)<br \/>\nif instr(lcase(fldHead),lcase(fldname))&gt;0 then<br \/>\n&nbsp;&nbsp; &#8221;\u8868\u5355\u5728\u6570\u7ec4\u4e2d\uff0c\u5224\u65ad\u8be5\u8868\u5355\u57df\u5185\u5bb9<br \/>\n&nbsp;&nbsp; tmpvalue = FldInfo(i,1)<br \/>\n&nbsp;&nbsp; if instr(fldHead,&quot;filename=&quot;&quot;&quot;)&lt;1 then<br \/>\n&nbsp;&nbsp;&nbsp; Tmpvalue = Bytes2bStr(tmpvalue)<br \/>\n&nbsp;&nbsp;&nbsp; if myrequest &lt;&gt; &quot;&quot; then <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; myrequest = myrequest &amp; &quot;,&quot; &amp;tmpvalue<br \/>\n&nbsp;&nbsp;&nbsp; else<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp; MyRequest = tmpvalue<br \/>\n&nbsp;&nbsp;&nbsp; end if&nbsp;&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp; else<br \/>\n&nbsp;&nbsp;&nbsp; myrequest = tmpvalue<br \/>\n&nbsp;&nbsp; end if&nbsp;&nbsp;&nbsp; <br \/>\nend if<br \/>\nnext<br \/>\nEnd function&#8217;*************************************<br \/>\n&#8216;***\u83b7\u53d6\u4e0a\u4f20\u8868\u5355\u539f\u4e0a\u4f20\u6587\u4ef6\u6587\u4ef6\u540d<br \/>\n&#8216;*************************************<br \/>\nFunction GetFileName(fldName)<br \/>\n&#8221;\u90fd\u53d6\u539f\u4e0a\u4f20\u6587\u4ef6\u6587\u4ef6\u540d<br \/>\ndim i,fldHead,fnpos<br \/>\nfor i = 0 to loopcnt-1<br \/>\nfldHead = lcase(fldInfo(i,0))<br \/>\nif instr(fldHead,lcase(fldName)) &gt; 0 then<br \/>\n&nbsp;&nbsp; fnpos = instr(fldHead,&quot;filename=&quot;&quot;&quot;)<br \/>\n&nbsp;&nbsp; if fnpos &lt; 1 then exit for<br \/>\n&nbsp;&nbsp; fldHead = mid(fldHead,fnpos+10)<br \/>\n&nbsp;&nbsp; &#8221;\u8868\u5355\u5185\u5bb9<br \/>\n&nbsp;&nbsp; GetFileName = mid(fldHead,1,instr(fldHead,&quot;&quot;&quot;&quot;)-1)<br \/>\n&nbsp;&nbsp; GetfileName = mid(GetFileName,instrRev(GetFileName,&quot;\\&quot;)+1)<br \/>\nend if<br \/>\nnext<br \/>\nEnd function&#8217;*************************************<br \/>\n&#8216;\u83b7\u53d6\u4e0a\u4f20\u8868\u5355\u539f\u4e0a\u4f20\u6587\u4ef6\u7684\u7c7b\u578b\uff0c\u9650\u5b9a\u8bfb<br \/>\n&#8216;\u53d6\u6587\u4ef6\u57df\u7684\u5185\u5bb9<br \/>\n&#8216;*************************************<br \/>\nFunction GetContentType(fldName)<br \/>\ndim i<br \/>\ndim fldHead,cpos<br \/>\nfor i = 0 to loopcnt &#8211; 1<br \/>\nfldHead = lcase(fldInfo(i,0))<br \/>\nif instr(fldHead,lcase(fldName)) &gt; 0 and instr(fldHead,&quot;filename=&quot;&quot;&quot;) &gt;0 then<br \/>\n&nbsp;&nbsp; cpos = instr(fldHead,&quot;content-type: &quot;)<br \/>\n&nbsp;&nbsp; GetContentType = mid(fldHead,cpos+14)<br \/>\nend if<br \/>\nnext<br \/>\nEnd function&#8217;*************************************<br \/>\n&#8216;***\u83b7\u53d6\u4e0a\u4f20\u8868\u5355\u539f\u4e0a\u4f20\u6587\u4ef6\u6269\u5c55\u540d<br \/>\n&#8216;*************************************<br \/>\nFunction GetFileTypeName(Fldname)<br \/>\nIf instr(Fldname,&quot;.&quot;) &gt; 0 Then<br \/>\nGetFileTypeName = right(Fldname,3)<br \/>\nEnd If<br \/>\nEnd Function&#8217;*************************************<br \/>\n&#8216;***&#8217;\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u7c7b\u578b<br \/>\n&#8216;*************************************<br \/>\nFunction IsvalidFile(FileType)<br \/>\nIf instr(PicType,FileType)=0 then<br \/>\nIsvalidFile = false<br \/>\nElse<br \/>\nIsvalidFile = true<br \/>\nEnd if<br \/>\nEnd Function<br \/>\n&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n&#8216;FilterJS(strHTML)<br \/>\n&#8216;\u8fc7\u6ee4\u811a\u672c<br \/>\n&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nFunction FilterJS(byval strHTML)<br \/>\nDim objReg,strContent <br \/>\nIf IsNull(strHTML) OR strHTML=&quot;&quot; Then Exit Function <br \/>\n&nbsp;&nbsp; <br \/>\nSet objReg=New RegExp<br \/>\nobjReg.IgnoreCase =True<br \/>\nobjReg.Global=True<br \/>\nobjReg.Pattern=&quot;(&amp;#)&quot;<br \/>\nstrContent=objReg.Replace(strHTML,&quot;&quot;)<br \/>\nobjReg.Pattern=&quot;(function|meta|value|window\\.|script|js:|about:|file:|Document\\.|vbs:|frame|cookie)&quot;<br \/>\nstrContent=objReg.Replace(strContent,&quot;&quot;)<br \/>\nobjReg.Pattern=&quot;(on(finish|mouse|Exit=|error|click|key|load|focus|Blur))&quot;<br \/>\nstrContent=objReg.Replace(strContent,&quot;&quot;)<br \/>\nFilterJS=strContent<br \/>\nstrContent=&quot;&quot;<br \/>\nSet objReg=Nothing <br \/>\nEnd Function&#8217;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n&#8216;CheckInt(byval strNumber)<br \/>\n&#8216;\u68c0\u67e5\u5e76\u8f6c\u6362\u6574\u5f62\u503c<br \/>\n&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nFunction CheckInt(byval strNumber)<br \/>\nIf isNull(strNumber) OR Not IsNumeric(strNumber) Then<br \/>\nCheckInt=&quot;&quot; <br \/>\nElse<br \/>\nCheckInt=CLNG(strNumber)<br \/>\nEnd If<br \/>\nEnd Function&#8217;\u83b7\u53d6\u8bbf\u95ee\u8005IP<br \/>\nFunction GetIP()&nbsp;&nbsp;&nbsp; Dim strIPAddr<br \/>\n&nbsp;&nbsp;&nbsp; If Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;) = &quot;&quot; OR InStr(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), &quot;unknown&quot;) &gt; 0 Then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strIPAddr = Request.ServerVariables(&quot;REMOTE_ADDR&quot;)<br \/>\n&nbsp;&nbsp;&nbsp; ElseIf InStr(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), &quot;,&quot;) &gt; 0 Then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strIPAddr = Mid(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), 1, InStr(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), &quot;,&quot;)-1)<br \/>\n&nbsp;&nbsp;&nbsp; ElseIf InStr(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), &quot;;&quot;) &gt; 0 Then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strIPAddr = Mid(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), 1, InStr(Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;), &quot;;&quot;)-1)<br \/>\n&nbsp;&nbsp;&nbsp; Else<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strIPAddr = Request.ServerVariables(&quot;HTTP_X_FORWARDED_FOR&quot;)<br \/>\n&nbsp;&nbsp;&nbsp; End If<br \/>\n&nbsp;&nbsp;&nbsp; GetIP = ProtectSQL(Trim(Mid(strIPAddr, 1, 30)))<br \/>\nEnd Function<br \/>\n%&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ASP\u5e38\u7528\u51fd\u6570\u768410\u7ecf\u5178\u5927\u6536\u96c6 &#8216;\u8fc7\u6ee4\u7279\u6b8a\u5b57\u7b26 &#8216;************************************* Function Filterstr(Str) If Isnull(Str) Then F&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-333","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=333"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/333\/revisions"}],"predecessor-version":[{"id":66211,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/333\/revisions\/66211"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=333"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=333"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}