?? user_show_upload_save.asp
字號:
<%
'===================================================================
'= ASP FILENAME : /user/user_show_upload_save.asp
'= CREATED TIME : 2006-6-24
'= LAST MODIFIED: 2006-6-24
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 用戶簽名圖保存
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/customer/include_customer_action_execute.asp" -->
<!-- #include file = "./user_inc.asp" -->
<!-- #include file = "../inc/logic/logic_user.asp" -->
<!-- #include file = "../class/class_file_up.asp" -->
<%
'========================================================
'== Action參數(shù)設(shè)置
'========================================================
'== 頁面名
Const CONST_PAGE_FILE = "user/user_show_upload_save.asp"
'== 頁面標題/功能
Const CONST_PAGE_TITLE = "用戶簽名圖保存"
'== 功能函數(shù)名字空間
Const CONST_ACTION_FUNC = "FormSaveShowUpload"
'== 相對根目錄路徑
GBL_strHomeURL = "../"
'== 頁面構(gòu)造
Call ActionBuild()
'== 請求校驗與過濾
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
'== 頁面析構(gòu)
Call ActionOver()
%>
<%
'===================================================================
'= Function : FormSaveShowUpload()
'= Time : Created At 2006-6-24
'= Input : None
'= Description : 用戶簽名圖保存
'===================================================================
Function FormSaveShowUpload()
Dim strOldPwd,strNewPwd,strNewPwd2,strPicName
Dim strAddInfo
'== 服務(wù)器端數(shù)據(jù)校驗
'If Not ServerDataCheck(arrUserShowUploadDataChk) Then
' Exit Function
'End If
Dim claUpLoad,objFileUp,iCount,strUpFilePath,intFileMaxSize,strFileType,intNameSet
Dim intTypeFlag,strFormName
strFormName = "file1"
'== 設(shè)置文件類型
strFileType = GBL_strAlbumFileType
'== 設(shè)置文件上限
intFileMaxSize = 50 * 1000
'== 設(shè)置文件保存路徑
strUpFilePath = GBL_strHomeUrl & "user/uploadFace/"
Set claUpLoad = New classFileUpLoad
iCount = 0
strAddInfo = "NULL"
For Each strFormName In claUpLoad.objFile '== 列出所有上傳了的文件
Set objFileUp = claUpLoad.file(strFormName) '== 生成一個文件對象
If objFileUp.FileSize > 0 Then '== the file is not null
If objFileUp.FileSize < intFileMaxSize Then
If strFileType <> "" Then '== check the file type
If Instr(strFileType,GetExtendName(objFileUp.FileName)) And CheckFileType(objFileUp.FileType) Then
intTypeFlag = 1
Else
intTypeFlag = 0
strAddInfo = "不支持您所上傳的文件類型:" & GetExtendName(objFileUp.FileName)
Call GBL_objException.catchErr(E_USER_PUB,strAddInfo)
Exit Function
End If
Else
intTypeFlag = 1
End If
If intTypeFlag = 1 Then
strPicName = GBL_intUserId & "." & GetExtendName(objFileUp.FileName)
objFileUp.SaveAs Server.Mappath(strUpFilePath & strPicName)
iCount = iCount + 1
End If
Else
strAddInfo = "文件大小超出限制,您最多可以上傳 " & intFileMaxSize/1000 & "K字節(jié)的文件數(shù)據(jù)"
Call GBL_objException.catchErr(E_USER_PUB,strAddInfo)
Exit Function
End If
End If
Set objFileUp = Nothing
Next
Set claUpLoad = Nothing
If iCount < 0 Then
Call GBL_objException.catchErr(E_USER_PUB,"上傳文件失敗")
Exit Function
End If
GBL_objFormData.Item("UpFace") = strPicName
If Not SaveUserSignLogic(GBL_intUserId,GBL_objFormData) Then
Exit Function
End If
'== 成功處理
Dim strHtmlCode,strSuccUrl
strHtmlCode = "您的簽名圖修改成功"
strSuccUrl = "user/user_show_upload_form.asp"
Call SuccExecute(strHtmlCode,strSuccUrl)
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -