home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Examples / publish / admin / addcontent2a.req.cfm < prev    next >
Encoding:
Text File  |  1999-04-12  |  986 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></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('addcontent2.req.cfm?CurrItem=#CurrItem#&CurrPos=#CurrPos#&Type#CurrItem#=#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="addcontent2.req.cfm?CurrItem=#CurrItem#&CurrPos=#CurrPos#&Type#CurrItem#=#File.ServerFile#" ADDTOKEN="NO">
  31.  
  32. </CFIF>    
  33.  
  34. </BODY>
  35. </HTML>
  36.