Advertisement
Advertisement
| 04.03.2008 at 09:20AM PDT, ID: 23293342 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: |
<CFIF isDefined("Form.isLogo")>
<cfif isdefined("form.upload_now")>
<!--- Get photo count to see if we are already at our limit --->
<cfquery name="getphotos" datasource="security">
SELECT Count(logoID) AS PhotoCount
FROM logo
WHERE memberID = #memberID#
</cfquery>
<cfset destination="c:\coldfusion8\wwwroot\myMobi\photos\m"&#memberID#&"\logo\" >
<cfif Not DirectoryExists(destination) >
<cfdirectory action="create" directory="#destination#" >
</cfif>
<!--- Check limit --->
<cfif getphotos.PhotoCount GTE 4>
Sorry, too many photos
<cfelse>
<!--- Upload file --->
<cffile action="upload" filefield="ul_path" destination="#destination#" accept="image/jpg, image/jpeg" nameconflict="Overwrite" >
<cfset clientFile = #cffile.clientFile#>
<cfoutput>File uploaded succesfully #destination##serverFile#</cfoutput>
<!--- Check filetype --->
<cfif cffile.ClientFileExt NEQ "jpg" AND cffile.ClientFileExt NEQ "jpeg">
File is wrong type. You can only upload JPG file types.
<cffile action="delete" file="#destination#">
</cfif>
<!--- Make sure file upload was success, then create database record --->
<cfif FileExists("#destination##cffile.serverFile#")>
<cftry>
<cfquery name="createPhotoRecord" datasource="security">
INSERT INTO logo(memberid,location,filename)
VALUES(<cfqueryparam cfsqltype="CF_SQL_BIGINT" value="#memberid#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#destination#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#clientFile#">)
</cfquery>
<cfcatch>
<br>-->File replaced.<br>
</cfcatch>
</cftry>
<cfelse>
</cfif>
</cfif>
</cfif>
|