func.asp
资源名称:NetPhone.rar [点击查看]
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:3k
源码类别:
IP电话/视频会议
开发平台:
ASP/ASPX
- <%
- sub showerr(str)
- response.write "<script>alert('"&str&"');history.go(-1);</script>"
- response.end
- end sub
- sub showmsg(str,url)
- response.write "<script>alert('"&str&"');location.href='"&url&"';</script>"
- end sub
- function htmlencode(fString)
- fString = replace(fString, ">", ">")
- fString = replace(fString, "<", "<")
- fString = Replace(fString, chr(32), " ")
- fString = Replace(fString, CHR(10) & CHR(10), "</p><p>")
- fString = Replace(fString, CHR(10), "<br>")
- htmlencode=fString
- End Function
- Sub DoDelFile(sPathFile)
- On Error Resume Next
- Dim oFSO
- Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
- oFSO.DeleteFile(Server.MapPath(sPathFile))
- Set oFSO = Nothing
- End Sub
- function getfilename(str)
- dim pos
- pos=instr(str,".")
- if str<>"" then
- str=mid(str,pos,len(str))
- end if
- getfilename=str
- end function
- FUNCTION NEWS_CLASSNAME(STR)
- DIM RS_CLASS
- SET RS_CLASS=CONN.EXECUTE("SELECT NEWS_CLASS FROM HR_NEWS_CLASS WHERE ID="&STR)
- NEWS_CLASSNAME=RS_CLASS("NEWS_CLASS")
- END FUNCTION
- FUNCTION CLASSNAME(STR)
- DIM RS_CLASS
- SET RS_CLASS=CONN.EXECUTE("SELECT classname FROM CLASS WHERE ID="&STR)
- CLASSNAME=RS_CLASS("classname")
- END FUNCTION
- FUNCTION NCLASSNAME(STR)
- DIM RS_CLASS
- SET RS_CLASS=CONN.EXECUTE("SELECT nclassname FROM NCLASS WHERE ID="&STR)
- NCLASSNAME=RS_CLASS("nclassname")
- END FUNCTION
- function xsqx(xsqx1)
- dim abc1
- if xsqx1=0 then
- abc1="禁止会员"
- elseif xsqx1=1 then
- abc1="普通会员"
- elseif xsqx1=2 then
- abc1="黄金会员"
- elseif xsqx1=3 then
- abc1="钻石会员"
- else
- abc1="末注册"
- end if
- xsqx=abc1
- end function
- function spjp(xsqx1)
- dim abc1
- if xsqx1=1 then
- abc1="公开货品"
- elseif xsqx1=2 then
- abc1="A类货品"
- elseif xsqx1=3 then
- abc1="B类货品"
- end if
- spjp=abc1
- end function
- function address(sip)
- if isnumeric(left(sip,2)) then
- set iprs=server.createobject("adodb.recordset")
- if sip="127.0.0.1" then sip="192.168.0.1"
- str1=left(sip,instr(sip,".")-1)
- sip=mid(sip,instr(sip,".")+1)
- str2=left(sip,instr(sip,".")-1)
- sip=mid(sip,instr(sip,".")+1)
- str3=left(sip,instr(sip,".")-1)
- str4=mid(sip,instr(sip,".")+1)
- if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then
- else
- num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
- sql="select Top 1 country,city from ip where ip1 <="&num&" and ip2 >="&num&""
- iprs.open sql,conn,1,1
- if iprs.eof and iprs.bof then
- country="亚洲"
- city=""
- else
- country=iprs(0)
- city=iprs(1)
- end if
- iprs.close
- set iprs=nothing
- set cmd=nothing
- end if
- address=country&city
- else
- address="未知"
- end if
- end function
- %>