www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > album/album_add_save.asp

    <%
''===================================================================
'= ASP FILENAME	: /album/album_add_save.asp
'= CREATED TIME : 2006-5-5
'= LAST MODIFIED: 2006-5-5
'= 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 = "./album_inc.asp" -->
<!-- #include file = "../inc/logic/logic_album.asp" -->
<!-- #include file = "../class/class_file_up.asp" -->
<%
'========================================================
'==   Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE	= "album/album_add_save.asp"

'== 页面标题/功能
Const CONST_PAGE_TITLE	= "添加相片"

'== 功能函数名字空间
Const CONST_ACTION_FUNC	= "FormSaveUpPhotoCtl"

'== 相对根目录路径 
GBL_strHomeURL			= "../"

'== 页面构造
Call ActionBuild()

'== 请求校验与过滤
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)

'== 页面析构
Call ActionOver()

%>

<%
''===================================================================
'= Function    : FormSaveUpPhotoCtl()
'= Time		   : Created At 2006-5-5
'= Input       : 
'= Description : 添加相片
'==================================================================='
Function FormSaveUpPhotoCtl()
	Dim strFormName,strPicName,strHtmlCode,strSuccUrl,strInfo

	'== 上传文件
	If Not UpLoadAlbumFileLogic("file1",strPicName,GBL_objFormData) Then Exit Function

	'== 服务器端数据校验(muti-data类型不能做通用数据校验)
	GBL_blnServerDataCheck = False

	Dim strPicTitle : strPicTitle = GBL_objFormData.Item("PicTitle")
	strInfo = "相片标题"
	If DataCheck(arrAlbumAddDataChk(0)(0),strPicTitle,strInfo,"1|DTC_LESS_MORE_LEN|20|") Then
		Call GBL_objException.catchErr(E_DATA_PUB,strInfo)
		FormSaveUpPhotoCtl = False
		Exit Function
	End If
	Dim strPicType : strPicType = GBL_objFormData.Item("PicType")
	strInfo = "相片类型"
	If DataCheck(arrAlbumAddDataChk(1)(0),strPicType,strInfo,arrAlbumAddDataChk(1)(3)) Then
		Call GBL_objException.catchErr(E_DATA_PUB,strInfo)
		FormSaveUpPhotoCtl = False
		Exit Function
	End If
	
	'== 数据获取
	'Call CnvFormData(strAlbumAddFormName,GBL_objFormData)

	'== 保留上传记录
	If Not SaveAlbumLogic(GBL_intUserId,GBL_objFormData,strPicName) Then Exit Function

	'== Update user photo number
	Call RecordCounter("CLASS_USER","USER_PHOTO",1,"AND USER_ID=" & GBL_intUserId)

	'== Update user level
	Call UpdateLevel(GBL_intAlbumLevel)

	'== 成功处理
	strHtmlCode = "您上传文件成功"
	strSuccUrl = "album/album_list.asp"
	Call SuccExecute(strHtmlCode,strSuccUrl)

End Function

%>