forked from joedanz/cf-project-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimg_proc_acct_bd.cfm
20 lines (20 loc) · 1.17 KB
/
img_proc_acct_bd.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<cffile action="upload" accept="image/gif,image/jpg,image/jpeg,image/png" filefield="imagefile"
destination = "#application.userFilesPath#avatars" nameConflict = "MakeUnique">
<cfimage height="72" width="72" nameconflict="overwrite"
srcfile="#application.userFilesPath#avatars/#serverFile#"
destfile="#application.userFilesPath#avatars/#session.user.userid#_72.jpg">
<cfimage height="48" width="48" nameconflict="overwrite"
srcfile="#application.userFilesPath#avatars/#serverFile#"
destfile="#application.userFilesPath#avatars/#session.user.userid#_48.jpg">
<cfimage height="24" width="24" nameconflict="overwrite"
srcfile="#application.userFilesPath#avatars/#serverFile#"
destfile="#application.userFilesPath#avatars/#session.user.userid#_24.jpg">
<cfimage height="16" width="16" nameconflict="overwrite"
srcfile="#application.userFilesPath#avatars/#serverFile#"
destfile="#application.userFilesPath#avatars/#session.user.userid#_16.jpg">
<cftry>
<cffile action="delete" file="#application.userFilesPath#avatars/#serverFile#">
<cfcatch></cfcatch>
</cftry>
<cfset application.user.setImage(session.user.userID,1)>
<cfset session.user.avatar = 1>