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

📄 funccomm.asp

📁 一个比较完整的企业erp系统
💻 ASP
字号:

<%
	Function gfnFormatString(str)
	'格式化字符串,主要用于显示有TextArea提交的字符串
		Dim targetStr
		targetStr = replace(str, ">", "&gt;")
		targetStr = replace(str, "<", "&lt;")
		targetStr = Replace(targetStr,vbCrLf,"<BR>")
		targetStr = Replace(targetStr,vbCr,"<BR>")
		targetStr = Replace(targetStr,vbLf,"<BR>")
		'targetStr = Replace(targetStr," ","&nbsp;")
		gfnFormatString = targetStr
		Exit Function
	End Function

function checkStr(str)
	if isnull(str) then
		checkStr = ""
		exit function 
	end if
	checkStr=replace(str,"'","''")
end function

' 判断数字是否整形
function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
end function


' 过滤表单字符
function HTMLcode(fString)
if not isnull(fString) then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
    HTMLcode = fString
end if
end function

function formatDate(date)
iStart = instr(date,"-")
iEnd =  instrrev(date,":") 
iLength = iEnd-iStart
formatDate = mid(date,iStart+1,iLength-1)
end function 

function DoattFile(FileName,Desc)
  if instr("jpg.gif",GetExtendName(FileName)) <> 0 then
  DoattFile = "<img src='/FileMain/UpFile/"&FileName&"'>"
  else
  DoattFile =  "文件名:<a href='/FileMain/UpFile/"&FileName&"'>"&FileName&"</a> 描述:" &Desc 
  end if
end Function

function GetExtendName(FileName)
	dim ExtName
	ExtName = LCase(FileName)
	ExtName = right(ExtName,3)
	ExtName = right(ExtName,3-Instr(ExtName,"."))
	GetExtendName = ExtName
end function

sub addClickNum(id)
  set objCmd = server.CreateObject("adodb.Command")
   objCmd.ActiveConnection =  MM_webdata_STRING
   SqlQuery = "Update luntan set click = click+1 where id="&id&""
   objCmd.CommandText = SqlQuery
   objCmd.Execute 
end sub

sub addReplyNum(id)
  set objCmd = server.CreateObject("adodb.Command")
   objCmd.ActiveConnection =  MM_webdata_STRING
   SqlQuery = "Update luntan set reply = reply+1 where id="&id&""
   objCmd.CommandText = SqlQuery
   objCmd.Execute 
end sub

sub addartCount()
   set objCmd = server.CreateObject("adodb.Command")
   objCmd.ActiveConnection =  MM_webdata_STRING
   SqlQuery = "Update UserMain set artcount = artcount+1 where id="&trim(Request.Cookies("Jimmy")("UserID")) &""
   objCmd.CommandText = SqlQuery
   objCmd.Execute
end sub
%>

	

⌨️ 快捷键说明

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