'========È¡µÃ´ø¶Ë¿ÚµÄURL£¬ÍƼöʹÓÃ================
Function Get_ScriptNameUrl()
If request.servervariables("SERVER_PORT")="80" Then
Get_ScriptNameUrl="http://" & request.servervariables("server_name")&lcase(request.servervariables("script_name"))
Else
Get_ScriptNameUrl="http://" & request.servervariables("server_name")&":"&request.servervariables("SERVER_PORT")&lcase(request.servervariables("script_name"))
End If
End Function
'=================ÓÃÕýÔò±í´ïʽͻ³öÏÔʾ×Ö·û´®Öвéѯµ½µÄµ¥´ÊµÄº¯Êý======================
Function BoldWord(strContent,word)
If word="" Then
BoldWord = strContent
Exit Function
End IF
dim objRegExp
Set objRegExp=new RegExp
objRegExp.IgnoreCase =true
objRegExp.Global=True
objRegExp.Pattern="(" & word & ")"
strContent=objRegExp.Replace(strContent,"<font color=""#FF0000""><b>$1</b></font>" )
Set objRegExp=Nothing
BoldWord=strContent
End Function
'===============È¡µÃÓû§µ±Ç°IPµØÖ·===================
Function GetIP()
uIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If uIP = "" Then uIP = Request.ServerVariables("REMOTE_ADDR")
GetIp = uIP
End Function
'===============È¡µÃµ±Ç°³ÌÐò½Å±¾Â·¾¶==================
Function GetScriptName()
ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))'È¡µÃµ±Ç°µØÖ·
If (Request.QueryString <> "") Then
ScriptAddress = ScriptAddress & "?" & Server.HTMLEncode(Request.QueryString)'È¡µÃ´ø²ÎÊýµØÖ·
End If
If Len(ScriptAddress)>250 Then ScriptAddress = Left(ScirptAddress,250)&"..." '½øÐз¾¶½ØÈ¡£¬×î´óΪ250¸ö×Ö·û
GetScriptName = ScriptAddress
End Function
'===========·µ»Ø´ø²ÎÊýµÄUrl£¬¶à¹Ø¼ü×ÖÅÅÐòʱʹÓÃ==============
' RemoveList ²ÎÊý£ºÐèÒª´ÓUrlÖÐÈ¥³ýµÄ²ÎÊý£¬¿ÉÒÔÊǶà¸ö£¬ÖмäÇëÓöººÅ¸ô¿ª
Function KeepUrlStr(RemoveList)
ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))&"?"'È¡µÃµ±Ç°µØÖ·,²¢¼ÓÈë¡°?¡±·ûºÅ
M_ItemUrl = ""
For Each M_item In Request.QueryString
If InStr(RemoveList,M_Item)=0 Then
M_ItemUrl = M_ItemUrl & M_Item &"="& Server.URLEncode(Request.QueryString(""&M_Item&"")) & "&"
End If
Next
KeepUrlStr = ScriptAddress & M_ItemUrl
End Function