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

📄 config.asp

📁 ASP企业网络管理系统
💻 ASP
字号:
<!--#include file="../include/adovbs.inc" -->
<%
'On Error Resume Next
'if recordset is open close it, &H00000001 = AdStateOpen
if Session("rs").state = AdStateOpen then
	Session("rs").close
end if

function CheckSession()
	if session("login_name") = "" or session("member_id") = "" then
		CheckSession = ""
	else
		CheckSession = Session("mode")
	end if
end function

function safeConvert(strOrig)
	dim strTemp
	if isnull(strOrig) then
		strTemp = strOrig
		'Response.Write("strOrig : [" & strOrig & "]<br>")
	else
		'Response.Write("strTemp : [" & strOrig & "]<br>")
		strTemp = Server.HTMLEncode(strOrig)
		strTemp = Replace(strTemp,chr(10),"<br>")
		strTemp = Replace(strTemp," ","&nbsp")
		strTemp = Replace(strTemp,chr(9),"&nbsp&nbsp&nbsp&nbsp")
		'strTemp = Replace(strTemp,",",",")
		'strTemp = Replace(strTemp,"'","’")
		'strTemp = Replace(strTemp,"&quote","”")
		'strTemp = Replace(strTemp,".","。")
	end if
	safeConvert = strTemp
end function
function convertBack(strOrig)
	dim strTemp
	strTemp = strOrig
	if not isnull(strOrig) then
		'strTemp = Replace(strTemp,"。",".")
		strTemp = Replace(strTemp," "," ")
		'strTemp = Replace(strTemp,",",",")
		strTemp = Replace(strTemp,"<br>",chr(10))
		strTemp = Replace(strTemp,"&lt","<")
		strTemp = Replace(strTemp,"&gt",">")
		strTemp = Replace(strTemp,"&quot",chr(34))
		strTemp = Replace(strTemp,"&nbsp"," ")
	end if
	convertBack = strTemp
end function
function r2v(str)
	dim tmp
	tmp=Replace(str,rP,vP,1,-1,1)
	r2v=Replace(tmp,"\","/")
	'Response.Write r2v & "<br>" & rP & "<br>" & vP
end function

function GetWLen(str)
	dim i,l
	l = len(str)
	for i=1 to l
		if asc(mid(str,i,1)) > 255 then
			l = l + 1
		end if
	next
	GetWLen = l
end function

function SubWStr(str,start,leng)
	dim i,realLen
	realLen = 0
	for i=1 to Len(str)
		if realLen <= leng + 1 then
		  if asc(mid(str,i,1)) > 255 then
        realLen = realLen + 2
      else
        realLen = realLen + 1
			end if
		else
			Exit For
		end if
	next
	SubWStr = mid(str,start,i)
end function

function CutString(str,l)
	dim strR
	strR = CStr(str)
	if GetWLen(strR) > l + 3 then
		strR = SubWStr(strR,1,l) & "..."
	end if
	CutString = strR
end function

function CutDate(sDate)
	dim arr,dateR
	dateR = Cstr(sDate)
	arr = split(dateR," ")
	CutDate = arr(0)
end function

%>

⌨️ 快捷键说明

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