<%@ Language=VBScript %> <%'Option Explicit%> <% Response.Buffer=true %> Laundry Carts

Return to Menu
Account Access
<% Dim LaunConn Dim CookCartID Dim objFSO Set LaunConn=Server.CreateObject("ADODB.Connection") LaunConn.Open "DSN=LaundryCarts;" Dim CustID CookCartID = Session("CookCartID") CustID = Session("CustID") %>
Parts Administration
<%if Session("level") <> 4 and Request.querystring("CustID") <> CustID2 then response.redirect ("http://www.laundry-carts.com") end if%> <% 'NOTE - YOU MUST HAVE VBSCRIPT v5.0 INSTALLED ON YOUR WEB SERVER ' FOR THIS LIBRARY TO FUNCTION CORRECTLY. YOU CAN OBTAIN IT ' FREE FROM MICROSOFT WHEN YOU INSTALL INTERNET EXPLORER 5.0 ' OR LATER. ' Create the FileUploader Dim Uploader, File Set Uploader = New FileUploader ' This starts the upload process Uploader.Upload() '****************************************** ' Use [FileUploader object].Form to access ' additional form variables submitted with ' the file upload(s). (used below) '****************************************** Response.Write "Thank you for your upload " & Uploader.Form("fullname") & "
" uniquepartid = Replace(Uploader.Form("uniqueid"), "'", "''") partnumber = Replace(Uploader.Form("partnumber"), "'", "''") Category = Replace(Uploader.Form("Categ"), "'", "''") ' Check if any files were uploaded If Uploader.Files.Count < 2 Then Response.Write "File not uploaded. Select both pictures" Else ' Loop through the uploaded files PictureNumber = "ThumbFileName" For Each File In Uploader.Files.Items ' Check where the user wants to save the file If Uploader.Form("saveto") = "disk" Then ' Save the file File.SaveToDisk "D:\Webs\laundry-carts.com\images\parts\" ElseIf Uploader.Form("saveto") = "database" Then ' Open the table you are saving the file to Set RS = Server.CreateObject("ADODB.Recordset") RS.Open "MyUploadTable", "CONNECT STRING OR ADO.Connection", 2, 2 RS.AddNew ' create a new record RS("filename") = File.FileName RS("filesize") = File.FileSize RS("contenttype") = File.ContentType ' Save the file to the database File.SaveToDatabase RS("filedata") ' Commit the changes and close RS.Update RS.Close End If ' Output the file details to the browser Response.Write "File Uploaded: " & File.FileName & "
" Response.Write "Size: " & File.FileSize & " bytes
" Response.Write "Type: " & File.ContentType & "

" sql = "UPDATE " & Category & " SET " & PictureNumber & " = '" & File.FileName & "'" sql = sql & " WHERE uniquepartid = " & cint(uniquepartid) & ";" 'Response.Write sql launconn.execute(sql) PictureNumber = "PictureFileName" Next End If %> Return to Menu

Return to Menu
 
Call Us: 1-866-891-5513, Email Us: parts@sterlingequipmentco.com
All contents © copyright 2004 Laundry Cart Co., All rights reserved.