ispicfun.aspx.vb
来自「本程序修改自飞天BBS 7.0 将原来的ASP语法迁移为ASP.NET并封装成」· VB 代码 · 共 89 行
VB
89 行
' ***************************************************
' * 本程序由AspToAspX风火轮0.99转换生成 *
' * http://Www.AspToAspX.Cn *
' * Q Q : 139227536 *
' * QQ群: 17152722 *
' * MSN : gzliangjianhua@hotmail.com *
' * EMail AspToDll@vip.163.com *
' ***************************************************
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Math
Imports System.Web.SessionState
Public Class _ISPICFUN
Public AspToAspX_Host_Class_Object As Object
Dim _aspx_FilePath
#Region "..."
Public Sub AspToAspX_InitIncludeFiles()
End Sub
Public Sub AspToAspX_UnloadIncludeFiles()
End Sub
#End Region
Public Sub AspToAspX_Page_Init()
On Error GoTo _AspToAspX_Err
Response.Write ( vbCrLf )
Exit Sub
_AspToAspX_Err:
AspToAspX_WriteLog ("ispicfun_aspx Page_Init:" & Err.Description)
Resume Next
End Sub
'E:\FTBBS_UTF8_7.0\UPLOAD\ISPICFUN.ASP
Public Function ispic(ByRef FilePath )
On Error GoTo _AspToAspX_Err
Dim PicFile
Dim PicText
Dim sTextAll
Dim sStr
Dim sNoString
Dim i
Dim filedel
PicFile = New Scripting.FileSystemObject ( ) '4
PicText = PicFile.OpenTextFile ( FilePath , 1 ) '5
sTextAll = lcase ( PicText.ReadAll ) '6
PicText.Close ( ) '7
PicFile = Nothing '8
sStr = ".getfolder|.createfolder|.deletefolder|.createdirectory|.deletedirectory|.saveas|wscript.shell| script .encode|server.|.createobject|execute|activexobject|language=" '10
sNoString = AspToAspX_Split ( sStr , "|" ) '11
For i = 0 To Val ( UBound ( sNoString ) ) '12
If AspToAspX_CheckDBNull ( InStr ( sTextAll , sNoString ( i ) ) ) > 0 Then '13
filedel = New Scripting.FileSystemObject ( ) '14
filedel.deletefile ( FilePath ) '15
filedel = Nothing '16
Response.Write ( "您上传的文件有问题,上传失败" ) '17
Response.End ( ) '18
End If '19
Next '20
Exit Function
_AspToAspX_Err:
AspToAspX_WriteLog("E:\FTBBS_UTF8_7.0\UPLOAD\ISPICFUN.ASP ispic:" & Err.Description)
Resume Next
End Function
#Region "..."
Public Property FilePath
Get
On Error Resume Next
FilePath = AspToAspX_Host_Class_Object.FilePath
If Err.Number = 438 Then
Err.Clear
FilePath = _aspx_FilePath
End If
End Get
Set(ByVal value)
On Error Resume Next
AspToAspX_Host_Class_Object.FilePath = value
If Err.Number = 438 Then
Err.Clear
_aspx_FilePath = value
End If
End Set
End Property
#End Region
End Class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?