home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Examples / publish / admin / modifycontent2.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  978 b   |  36 lines

  1. <CFSET RootPath = Reverse(Replace(Reverse(GetTemplatePath()),Reverse("admin\#GetFileFromPath(GetTemplatePath())#"),""))>
  2.  
  3. <CFFILE ACTION="UPLOAD"
  4.         FILEFIELD="UploadedFile"
  5.         DESTINATION="#RootPath#binarydata"
  6.         NAMECONFLICT="SKIP">
  7.  
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  9.  
  10. <HTML>
  11. <HEAD>
  12.     <TITLE>Untitled</TITLE>
  13. </HEAD>
  14.  
  15. <BODY>
  16.  
  17. <CFIF File.FileExisted>
  18.  
  19.     <CFOUTPUT>
  20.         <SCRIPT LANGUAGE="JAVASCRIPT">
  21.            alert('The file "#File.ClientFile#"\nalready exists on the server.\n\nPlease rename your file and try again.');
  22.            location.replace('modifycontent.cfm?ContentIDList=#ContentIDList#&C#ContentIDList#=#URLEncodedFormat("|0")#');
  23.         </SCRIPT>
  24.         The file #File.AttemptedServerFile# already exists on the server.<BR>
  25.         Please rename your file and try again.
  26.     </CFOUTPUT>
  27.  
  28. <CFELSE>
  29.  
  30.     <CFLOCATION URL="modifycontent.cfm?ContentIDList=#ContentIDList#&C#ContentIDList#=#File.ServerFile#" ADDTOKEN="NO">
  31.  
  32. </CFIF>    
  33.  
  34. </BODY>
  35. </HTML>
  36.