Advertisement
Advertisement
| 06.30.2008 at 01:07AM PDT, ID: 23526168 |
|
[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: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: |
<cfquery name="artikel" datasource="#dsn#">
SELECT a.Art_ID, a.Photo1, a.Photo2
From artikel a
WHERE Art_ID = 244
</cfquery>
<cfset errors = "">
<cfif CGI.REQUEST_METHOD IS "POST">
<!--- Upload helper --->
<cfparam name="SERVERFILE1" default="images_1.jpg">
<cfparam name="SERVERFILE2" default="images_1.jpg">
<cfset newWidth = 300>
<cfset newHeight = 225>
<CFSET thispath = expandpath("./images")>
<cfif structKeyExists(form,"foto1") and len(form.foto1)>
<!--- uploads a file to our website --->
<CFFILE action="upload" filefield="foto1" destination="#thispath#" nameconflict="MAKEUNIQUE" >
<cfif Lcase(file.ClientFileExt)NEQ "gif"
AND Lcase(file.ClientFileExt) NEQ "jpg"
AND Lcase(file.ClientFileExt) NEQ "jpeg">
<cffile action="delete" file="#thispath#/#cffile.serverfile#">
<cfset errors = errors & "Hauptfoto ist kein Foto!">
<cfelseif file.Filesize GT 500 * 1024>
<cffile action="delete" file="#thispath#/#cffile.serverfile#">
<cfset errors = errors & "Mainimage is too big!<br />">
<cfelse>
<cfimage name="uploadedImage"
source="#thispath#/#cffile.serverFile#" >
<cfimage action="resize"
height="#newHeight#"
width="#newWidth#"
source="#uploadedImage#"
destination="#thispath#/#cffile.serverFile#"
overwrite="true"/> <CFSET ServerFile1 = FILE.SERVERFILE></cfif></cfif>
<cfif structKeyExists(form,"foto2") and len(form.foto2)>
<CFFILE action="upload" filefield="foto2" destination="#thispath#" nameconflict="MAKEUNIQUE">
<cfif Lcase(file.ClientFileExt) NEQ "gif"
AND Lcase(file.ClientFileExt) NEQ "jpg"
AND Lcase(file.ClientFileExt) NEQ "jpeg">
<cffile action="delete" file="#thispath#/#cffile.serverfile#">
<cfset errors = errors & "Foto2 ist kein Foto!">
<cfelseif file.Filesize GT 500 * 1024>
<cffile action="delete" file="#thispath#/#cffile.serverfile#">
<cfset errors = errors & "Foto2 ist zu gross!<br />">
<cfelse>
<cfimage name="uploadedImage"
source="#thispath#/#cffile.serverFile#" >
<cfimage action="resize"
height="#newHeight#"
width="#newWidth#"
source="#uploadedImage#"
destination="#thispath#/#cffile.serverFile#"
overwrite="true"/>
<CFSET ServerFile2 = FILE.SERVERFILE>
</cfif></cfif>
<cfquery name="imageupload" datasource="#dsn#">
Update dbo.artikel
SET photo1 =<Cfif len(ServerFile1)>'#ServerFile1#'<cfelse>photo1</cfif>,
photo2 =<Cfif len(ServerFile2)>'#ServerFile2#'<cfelse>photo2</cfif>
Where Art_Id= 244
</cfquery>
<cflocation url="InsertPhoto.cfm">
</cfif>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<cfif errors neq "">
<div><table cellspacing="0" cellpadding="0" class="Tablewarnings">
<tr>
<td><img src="img/warning.png" /></td>
<td><cfoutput>
<p>
<b>Check out the errors:<br />
#errors#
</b>
</p>
</cfoutput></td>
</tr>
</table></div></cfif>
<form action="#CGI.SCRIPT_NAME#" method="post" enctype="multipart/form-data" name="UpdateForm" id="UpdateForm">
<table cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td><table width="664" >
<tr>
<td height="18" colspan="6" > </td>
</tr>
<tr>
<td width="78" rowspan="2" class="textfoto">Hauptfoto:</td>
<td width="241" ><input name="imageField" type="image" id="imageField" src="images/<cfoutput>#artikel.Photo1#</cfoutput>" width="80" height="60" /></td>
<td width="67">Foto 2:</td>
<td colspan="2"><input name="imageField3" type="image" id="imageField3" src="images/<cfoutput>#artikel.Photo2#</cfoutput>" width="80" height="60" /></div></td>
</tr>
<tr>
<td id="foto1">
<input name="foto1" type="file" size="14" /></td>
<td colspan="2" id="foto3"> </td>
<td><div align="center">
<input name="foto3" type="file"
id="foto2" size="14" />
</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><input type="submit" lang="de" height="30" width="60" name="update" id="update" value="Upload" />
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
|