📄 edit_photo.aspx.vb
字号:
' ***************************************************
' * 本程序由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 _EDIT_PHOTO
Inherits System.Web.UI.Page
Implements IHttpHandler, AspToAspX_Interface
Public AspToAspX_Host_Class_Object As Object
Public upload,file,upfile,formPath,ServerPath,FSPath,formName,companyName,oFile,upfilecount,SaveFileName,SavePathFileName
Public userid
Public id
Public url
Public upfiletype
Public upfilesize
Public sql
Public rm
Public photo_name
Public photo_note
Public pic
Public reurl
Public inFolder
Public filesize
Public vfname
Public Random
Public FileExt
Public filetype
Public fname
Public todbpath
Public MypicFile
Public rs As ADODB.Recordset
Public linkdb
Public ft
Public ku
Public ckiesdomain
Public conndb
Public ConnectionString
Public username
Public userimg
Public homepagetitle
Public cssfile
Public bokeer
Public blog_mid
Public blogheadimg
Public clubuser_id
Public rs8
Public ASPX_CONN As _CONN
Public ASPX_INC_MD5 As _INC_MD5
Public ASPX_UPFILE_CLASS As _UPFILE_CLASS
Public ASPX_BBSUSER As _BBSUSER
Public ASPX_ASPJPG As _ASPJPG
Public ASPX_INC_PUBLICFUN As _INC_PUBLICFUN
Public ASPX_ISPICFUN As _ISPICFUN
Public ASPX_MEMBERINFO As _MEMBERINFO
Public ASPX_USERNAV As _USERNAV
Public ASPX_USERCALOG As _USERCALOG
Public ASPX_TAIL As _TAIL
#Region "..."
Public Sub AspToAspX_InitIncludeFiles()
ASPX_CONN = New _CONN()
ASPX_CONN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_CONN.AspToAspX_InitIncludeFiles()
ASPX_INC_MD5 = New _INC_MD5()
ASPX_INC_MD5.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_INC_MD5.AspToAspX_InitIncludeFiles()
ASPX_UPFILE_CLASS = New _UPFILE_CLASS()
ASPX_UPFILE_CLASS.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_UPFILE_CLASS.AspToAspX_InitIncludeFiles()
ASPX_BBSUSER = New _BBSUSER()
ASPX_BBSUSER.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_BBSUSER.AspToAspX_InitIncludeFiles()
ASPX_ASPJPG = New _ASPJPG()
ASPX_ASPJPG.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_ASPJPG.AspToAspX_InitIncludeFiles()
ASPX_INC_PUBLICFUN = New _INC_PUBLICFUN()
ASPX_INC_PUBLICFUN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_INC_PUBLICFUN.AspToAspX_InitIncludeFiles()
ASPX_ISPICFUN = New _ISPICFUN()
ASPX_ISPICFUN.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_ISPICFUN.AspToAspX_InitIncludeFiles()
ASPX_MEMBERINFO = New _MEMBERINFO()
ASPX_MEMBERINFO.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_MEMBERINFO.AspToAspX_InitIncludeFiles()
ASPX_USERNAV = New _USERNAV()
ASPX_USERNAV.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_USERNAV.AspToAspX_InitIncludeFiles()
ASPX_USERCALOG = New _USERCALOG()
ASPX_USERCALOG.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_USERCALOG.AspToAspX_InitIncludeFiles()
ASPX_TAIL = New _TAIL()
ASPX_TAIL.AspToAspX_Host_Class_Object = AspToAspX_Host_Class_Object
ASPX_TAIL.AspToAspX_InitIncludeFiles()
End Sub
Public Sub AspToAspX_UnloadIncludeFiles()
ASPX_CONN.AspToAspX_UnloadIncludeFiles()
ASPX_CONN = Nothing
ASPX_INC_MD5.AspToAspX_UnloadIncludeFiles()
ASPX_INC_MD5 = Nothing
ASPX_UPFILE_CLASS.AspToAspX_UnloadIncludeFiles()
ASPX_UPFILE_CLASS = Nothing
ASPX_BBSUSER.AspToAspX_UnloadIncludeFiles()
ASPX_BBSUSER = Nothing
ASPX_ASPJPG.AspToAspX_UnloadIncludeFiles()
ASPX_ASPJPG = Nothing
ASPX_INC_PUBLICFUN.AspToAspX_UnloadIncludeFiles()
ASPX_INC_PUBLICFUN = Nothing
ASPX_ISPICFUN.AspToAspX_UnloadIncludeFiles()
ASPX_ISPICFUN = Nothing
ASPX_MEMBERINFO.AspToAspX_UnloadIncludeFiles()
ASPX_MEMBERINFO = Nothing
ASPX_USERNAV.AspToAspX_UnloadIncludeFiles()
ASPX_USERNAV = Nothing
ASPX_USERCALOG.AspToAspX_UnloadIncludeFiles()
ASPX_USERCALOG = Nothing
ASPX_TAIL.AspToAspX_UnloadIncludeFiles()
ASPX_TAIL = Nothing
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
AspToAspXGlobal.Application = Application
AspToAspXGlobal.Server = Server
AspToAspXGlobal.Response = Response
AspToAspXGlobal.Request = Request
AspToAspXGlobal.Session = Session
AspToAspX_Host_Class_Object = Me
AspToAspX_InitIncludeFiles()
AspToAspX_Page_Init()
End Sub
Public Sub AspToAspX_Page_Init()
On Error GoTo _AspToAspX_Err
ASPX_CONN.AspToAspX_Page_Init ( )
ASPX_INC_MD5.AspToAspX_Page_Init ( )
ASPX_UPFILE_CLASS.AspToAspX_Page_Init ( )
ASPX_BBSUSER.AspToAspX_Page_Init ( )
ASPX_ASPJPG.AspToAspX_Page_Init ( )
ASPX_INC_PUBLICFUN.AspToAspX_Page_Init ( )
ASPX_ISPICFUN.AspToAspX_Page_Init ( )
userid = AspToAspX_CInt ( getcookie ( "clubuser_id" ) ) '9
Response.Write ( vbCrLf )
ASPX_MEMBERINFO.AspToAspX_Page_Init ( )
id = AspToAspX_CInt ( Request ( "id" ) ) '13
FTBBS_HTML_MB ( ft ) '14
url = Application ( "FTBBSMB" ) ( 10 , 0 ) '15
upfiletype = Application ( "FTBBSMB" ) ( 12 , 0 ) '16
upfilesize = Application ( "FTBBSMB" ) ( 13 , 0 ) '17
sql = "select * from " & ft & "ftbbs_upload where id=" & id '18
rm = New ADODB.Recordset ( ) '19
rm.Open ( sql , conn , 1 , 3 ) '20
If Not rm.EOF Then '21
photo_name = AspToAspX_CheckDBNull(rm.Fields ( "photo_name" ) .Value) '22
photo_note = AspToAspX_CheckDBNull(rm.Fields ( "pic_note" ) .Value) '23
pic = AspToAspX_CheckDBNull(rm.Fields ( "upload_pic" ) .Value) '24
End If '25
If AspToAspX_CheckDBNull ( Request ( "act" ) ) = "y" Then '26
upload = New Ftbbs_Class ( AspToAspX_Host_Class_Object ) '28
upload.AllowExt = upfiletype '29
upload.GetData ( upfilesize ) '30
id = upload.Form ( "id" ) '31
photo_name = upload.Form ( "photo_name" ) '32
photo_note = upload.Form ( "photo_note" ) '33
reurl = upload.Form ( "reurl" ) '34
pic = upload.Form ( "pic" ) '35
inFolder = AspToAspX_Split ( pic , "/" ) ( 0 ) '36
formPath = inFolder & "/" & userid '38
If AspToAspX_CheckDBNull ( right ( formPath , 1 ) ) < > "/" Then
formPath = formPath & "/"
End If
'39
If upload.isErr Then '40
Select Case upload.isErr '41
Case 1 '42
Response.Write ( "<font color=red>上传文件不能为空</font>" ) '43
Case 2 '44
Response.Write ( "系统限制上传文件大小在<font color=red>" & upfilesize & "</font>字节以下." ) '45
End Select '46
Else '47
For Each formName In upload.file '48
oFile = upload.file ( formname ) '49
filesize = oFile.FileSize '50
vfname = makefilename ( DateAndTime.Now ) '51
Randomize ( ) '52
Random = AspToAspX_Int ( ( 1000 - 100 + 1 ) * AspToAspX_Rnd + 100 ) '53
vfname = vfname & "_" & Random '54
FileExt = oFile.FileExt '55
filetype = oFile.FileMIME '56
fname = formPath & vfname & "." & FileExt '57
todbpath = vfname & "." & FileExt '58
MypicFile = pic '60
DelFile ( MypicFile , fso ) '61
SavePathFileName = Server.MapPath ( fname ) '62
If AspToAspX_CheckDBNull ( filetype ) = "text/plain" Then '63
Response.Write ( "" ) '64
Else '65
upload.SaveToFile ( formName , SavePathFileName ) '66
End If '67
If upload.iserr Then '68
Response.Write ( upload.errmessage ) '69
Else '70
If AspToAspX_CheckDBNull ( Application ( "FTBBSMB" ) ( 15 , 0 ) ) = 1 And AspToAspX_CheckDBNull ( FileExt ) = "jpg" Then '71
imgtmlogo ( fname ) '72
End If '73
ispic ( SavePathFileName ) '74
sql = "update " & ft & "ftbbs_upload set upload_pic='" & formPath & vfname & "." & FileExt & "',photo_name='" & photo_name & "',pic_note='" & photo_note & "' where id=" & id '75
conn.Execute ( sql ) '76
AspToAspX_Response_Redirect ( reurl ) '77
End If '78
oFile = Nothing '79
Next '80
End If '81
End If '82
Response.Write ( vbCrLf )
Response.Write ( "<html><head><meta http-equiv=content-type content=""text/html; charset=utf-8"">" & Chr ( 13 ) ) '84
Response.Write ( "<title>" ) '85
Response.Write ( username ) '85
Response.Write ( "的相册管理中心</title>" & Chr ( 13 ) ) '85
Response.Write ( "<link rel=""stylesheet"" type=""text/css"" href=""" ) '86
Response.Write ( cssfile ) '86
Response.Write ( """>" & Chr ( 13 ) ) '86
Response.Write ( "</head>" & Chr ( 13 ) ) '87
Response.Write ( "<body>" & Chr ( 13 ) ) '88
Response.Write ( "<center>" & Chr ( 13 ) ) '89
ASPX_USERNAV.AspToAspX_Page_Init ( )
Response.Write ( "<div id=""main"" align=""left"">" & Chr ( 13 ) ) '91
Response.Write ( "<script language=javascript src=""js/windowsize.js""></script>" & Chr ( 13 ) ) '92
Response.Write ( "" & Chr ( 9 ) & "<div id=""header"">" & Chr ( 13 ) ) '93
Response.Write ( "" & Chr ( 9 ) & "<div class=""lc""><div class=""rc""></div></div>" & Chr ( 13 ) ) '94
Response.Write ( "" & Chr ( 9 ) & "<div class=""tit""><a href=""home.aspx?userid=" ) '95
Response.Write ( userid ) '95
Response.Write ( """ class=""titlink"" title=""" ) '95
Response.Write ( username ) '95
Response.Write ( "的空间"">" ) '95
Response.Write ( username ) '95
Response.Write ( "</a></div>" & Chr ( 13 ) ) '95
Response.Write ( "" & Chr ( 9 ) & "<div class=""desc"">" ) '96
Response.Write ( homepagetitle ) '96
Response.Write ( "</div>" & Chr ( 13 ) ) '96
Response.Write ( "" & Chr ( 9 ) & "<div id=""tabline""> </div>" & Chr ( 13 ) ) '97
Response.Write ( "" & Chr ( 9 ) & "<div id=""tab""><a href=""home.aspx?userid=" ) '98
Response.Write ( userid ) '98
Response.Write ( """ class=""on"">主页</a><a href=""boker.aspx?userid=" ) '98
Response.Write ( userid ) '98
Response.Write ( """>博客</a><span>|</span><a href=""myphoto.aspx?userid=" ) '98
Response.Write ( userid ) '98
Response.Write ( """>相册</a><span>|</span><a href=""myinfo.aspx?userid=" ) '98
Response.Write ( userid ) '98
Response.Write ( """>个人档案</a>" & Chr ( 13 ) ) '98
Response.Write ( "" & Chr ( 9 ) & "</div>" & Chr ( 13 ) ) '99
Response.Write ( "</div>" & Chr ( 13 ) ) '100
Response.Write ( "<div class=""stage"">" & Chr ( 13 ) ) '101
Response.Write ( "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" id=""layout"">" & Chr ( 13 ) ) '102
Response.Write ( "<tr>" & Chr ( 13 ) ) '103
Response.Write ( "<td valign=""top"" class=""c2t3"">" & Chr ( 13 ) ) '104
Response.Write ( "<div id=""mod_profile"" class=""mod"" rel=""drag"">" & Chr ( 13 ) ) '105
ASPX_USERCALOG.AspToAspX_Page_Init ( )
Response.Write ( "</div>" & Chr ( 13 ) ) '107
Response.Write ( "</td>" & Chr ( 13 ) ) '108
Response.Write ( " <td valign=""top"" class=""c2t1""> " & Chr ( 13 ) ) '109
Response.Write ( " <div id=""mod_bloglist"" class=""mod"" rel=""drag"">" & Chr ( 13 ) ) '110
Response.Write ( " <table width=""77%"" border=""0"" align=""center"" class=""maintbbg"" cellspacing=""1"" cellpadding=""2"">" & Chr ( 13 ) ) '111
Response.Write ( " <form name=""form1"" method=""post"" action=""?act=y"" ENCTYPE=""multipart/form-data"">" & Chr ( 13 ) ) '112
Response.Write ( "" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & " <tr class=""f12bg""> " & Chr ( 13 ) ) '113
Response.Write ( " <td height=""50"" colspan=""2"" class=new14> <div align=""center""><strong>修 改 相 片</strong></div></td>" & Chr ( 13 ) ) '114
Response.Write ( " </tr>" & Chr ( 13 ) ) '115
Response.Write ( " <tr> " & Chr ( 13 ) ) '116
Response.Write ( " <td width=""100%"" height=""1"" colspan=""2"" bgcolor=""#336699"" class=new14><spacer height=""1"" type=""block""></td>" & Chr ( 13 ) ) '117
Response.Write ( " </tr>" & Chr ( 13 ) ) '118
Response.Write ( " <tr> " & Chr ( 13 ) ) '119
Response.Write ( " <td width=""100%"" height=""20"" colspan=""2""></td>" & Chr ( 13 ) ) '120
Response.Write ( " </tr>" & Chr ( 13 ) ) '121
Response.Write ( " <tr class=""f12bg""> " & Chr ( 13 ) ) '122
Response.Write ( " <td height=""30"">" & Chr ( 13 ) ) '123
Response.Write ( "<div align=""right"">相册:</div></td>" & Chr ( 13 ) ) '124
Response.Write ( " <td height=""25"">" & Chr ( 13 ) ) '125
Response.Write ( "" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & "<select name=""photo_name"" id=""photo_name"">" & Chr ( 13 ) ) '126
sql = "select * from " & ft & "ftblog_type where userid=" & userid & " and blogphoto=1 order by indate desc" '128
rs = New ADODB.Recordset ( ) '129
rs.Open ( sql , conn , 1 , 3 ) '130
Do While Not rs.EOF '131
Response.Write ( vbCrLf )
Response.Write ( " <option value=""" ) '133
Response.Write ( AspToAspX_CheckDBNull(rs.Fields ( "blogtype" ) .Value) ) '133
Response.Write ( """ " ) '133
If AspToAspX_CheckDBNull ( AspToAspX_CheckDBNull(rs.Fields ( "blogtype" ) .Value) ) = photo_name Then '133
Response.Write ( " selected " ) '133
End If '133
Response.Write ( ">" ) '133
Response.Write ( AspToAspX_CheckDBNull(rs.Fields ( "blogtype" ) .Value) ) '133
Response.Write ( "</option>" & Chr ( 13 ) ) '133
Response.Write ( " " ) '134
rs.MoveNext ( ) '135
Loop '136
rs.Close ( ) '137
Response.Write ( vbCrLf )
Response.Write ( " </select>" & Chr ( 13 ) ) '139
Response.Write ( " <a href=""blog_group.aspx?nav=a"">创建相册</a></td>" & Chr ( 13 ) ) '140
Response.Write ( " </tr>" & Chr ( 13 ) ) '141
Response.Write ( " <tr> " & Chr ( 13 ) ) '142
Response.Write ( " <td width=""23%"" height=""11"" class=""maintbtr3"" valign=""middle""> " & Chr ( 13 ) ) '143
Response.Write ( " <div align=""right"">相片:</div></td>" & Chr ( 13 ) ) '144
Response.Write ( " <td width=""77%"" height=""30"" class=""maintbtr3"">" & Chr ( 13 ) ) '145
Response.Write ( " <input NAME=""photofile"" TYPE=""file"" id=""photofile"">" & Chr ( 13 ) ) '146
Response.Write ( " </td>" & Chr ( 13 ) ) '147
Response.Write ( " </tr>" & Chr ( 13 ) ) '148
Response.Write ( " <tr> " & Chr ( 13 ) ) '149
Response.Write ( " <td width=""23%"" height=""11"" class=""maintbtr3"" valign=""middle""> " & Chr ( 13 ) ) '150
Response.Write ( " <div align=""right"">说明:</div></td>" & Chr ( 13 ) ) '151
Response.Write ( " <td width=""77%"" height=""30"" class=""maintbtr3""><input name=""photo_note"" type=""text"" id=""photo_note"" size=""35"" maxlength=""30""> " & Chr ( 13 ) ) '152
Response.Write ( " </td>" & Chr ( 13 ) ) '153
Response.Write ( " </tr>" & Chr ( 13 ) ) '154
Response.Write ( " <tr> " & Chr ( 13 ) ) '155
Response.Write ( " <td height=""50"" colspan=""2"" class=""maintbtr3""> <div align=""center"">" & Chr ( 13 ) ) '156
Response.Write ( "" & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & Chr ( 9 ) & " <input name=""id"" type=""hidden"" id=""id"" value=""" ) '157
Response.Write ( id ) '157
Response.Write ( """>" & Chr ( 13 ) ) '157
Response.Write ( " <input name=""pic"" type=""hidden"" id=""pic"" value=""" ) '158
Response.Write ( pic ) '158
Response.Write ( """>" & Chr ( 13 ) ) '158
Response.Write ( " <input name=""reurl"" type=""hidden"" id=""reurl"" value=""" ) '159
Response.Write ( AspToAspX_GetRequestServerVariables ( "Http_REFERER" ) ) '159
Response.Write ( """>" & Chr ( 13 ) ) '159
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -