% option explicit Response.Buffer = true if session("company_id") <> "" then dim conn dim rs dim ssql dim objUpload dim sSettingId dim sOld_Image dim sOld_Image_2 dim sBackgroundColor dim sMainMenuLinkColor dim sSubMenuLinkColor dim sTitleColor dim sLinkColor dim sSideMenuTitleColor dim sSideMenuFamiliesColor dim sSideMenuItemColor dim sCompanyNameColor dim sTextColor dim sPartnerLinkColor dim sCartTableHeaderColor dim sCartTableBodyColor dim sCartTableFooterColor dim sPageFooterColor dim sLinkHighlightColor dim sMainImagePath dim sMainImageHeight dim sMainImageWidth dim sSubImagePath dim sSubImageHeight dim sSubImageWidth dim FileControler dim myfile dim fsize dim return_page dim item dim value dim file %> <% set FileControler = server.CreateObject("Scripting.FileSystemObject") Set objUpload = Server.CreateObject("aspSmartUpload.SmartUpload") objUpload.Upload sMainImagePath = objUpload.Files.Item(1).FileName sSubImagePath = objUpload.Files.Item(2).FileName 'Select each item in form '************************ For each item In objUpload.Form 'Select each value of the current item '************************************* For each value In objUpload.Form(item) 'get information if item = "setting_id" then sSettingId = value end if if item = "old_main_image" then sOld_Image = value end if if item = "old_sub_image" then sOld_Image_2 = value end if if item = "background_color" then sBackgroundColor = value end if if item = "main_menu_link_color" then sMainMenuLinkColor = value end if if item = "sub_menu_link_color" then sSubMenuLinkColor = value end if if item = "title_color" then sTitleColor = value end if if item = "link_color" then sLinkColor = value end if if item = "side_menu_title_color" then sSideMenuTitleColor = value end if if item = "side_menu_families_color" then sSideMenuFamiliesColor = value end if if item = "side_menu_item_color" then sSideMenuItemColor = value end if if item = "company_name_color" then sCompanyNameColor = value end if if item = "text_color" then sTextColor = value end if if item = "partner_link_color" then sPartnerLinkColor = value end if if item = "link_highlight_color" then sLinkHighlightColor = value end if if item = "cart_table_header_color" then sCartTableHeaderColor = value end if if item = "cart_table_body_color" then sCartTableBodyColor = value end if if item = "cart_table_footer_color" then sCartTableFooterColor = value end if if item = "page_footer_color" then sPageFooterColor = value end if if item = "main_image_height" then sMainImageHeight = value end if if item = "main_image_width" then sMainImageWidth = value end if if item = "sub_image_height" then sSubImageHeight = value end if if item = "sub_image_width" then sSubImageWidth = value end if Next Next If Len(sMainImagePath) > 0 Then sMainImagePath = lcase(sMainImagePath) objUpload.Save server.MapPath("../../../../../member/" & Request.Cookies("storename") & "/images/") set myfile = FileControler.GetFile(server.MapPath("../../../../../member/" & Request.Cookies("storename") & "/images/") & "/" & sMainImagePath) fsize = myfile.size else fsize = 1 End If if fsize >= session("store_design_file_size") then FileControler.DeleteFile server.MapPath("../../../../../member/" & Request.Cookies("storename") & "/images/") & "/" & sMainImagePath Response.Write "