<% Dim IsLogin IsLogin = Session("status") if IsLogin<>1 then response.redirect("login.asp?login=no") end if %> <% ' uaktualnienie danych produktu Dim id id = 0 Dim kto kto=Request("kto") Dim ok ok=1 Dim sql if kto="u" then ' deklaracje pol do przeniesienia sql = "UPDATE user SET " sql = sql & "firma = '" & Request.Form("firma") & "', " if CStr(Request.Form("imie"))<>"" or CStr(Request.Form("imie"))<>"" then sql = sql & "imie = '" & Request.Form("imie") & "', " sql = sql & "nazwisko = '" & Request.Form("nazwisko") & "', " end if sql = sql & "adres = '" & Request.Form("adres") & "', " sql = sql & "kod00 = '" & Request.Form("kod00") & "', " sql = sql & "kod000 = '" & Request.Form("kod000") & "', " if CStr(Request.Form("login"))<>"" then sql = sql & "login = '" & Request.Form("login") & "', " end if if CStr(Request.Form("pass"))<>"" then sql = sql & "pass = '" & Request.Form("pass") & "', " end if sql = sql & "miasto = '" & Request.Form("miasto") & "' " sql = sql & "where id = " & Request.Form("id") id = Request.Form("id") else if CStr(Request.Form("pass"))<>"" then sql = "UPDATE admin SET " sql = sql & "pass = '" & Request.Form("pass") & "'" end if end if 'zapis zmian do bazy set rs = dbc.Execute(sql) ' przekierowanie Dim admin admin = Session("admin") if admin=1 then if kto="u" then response.redirect("user_lista.asp") else response.redirect("witam.asp?idk=" & id & "&a=u") end if else response.redirect("witam.asp?idk=" & id & "&a=u") end if %>