%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if if session("UserID") & "" = "" then Response.Redirect "account.asp?fromb2b=1" dim MainCategs, SubCategs, i, counter, tens dim SQL, oConn, oRs, Data, DataExist dim PaperData, PaperDataExist dim BoxData, BoxDataExist dim PaperID, BoxID, Access i = 0 MainCategs = Application("ProdCategs"&lang) SubCategs = Application("ProdSubCategs"&lang) 'PaperID = Request.Form("PaperID") : if PaperID & "" <> "" AND PaperID <> -1 then session("PaperID") = PaperID else session("PaperID") = -1 'BoxID = Request.Form("BoxID") : if BoxID & "" <> "" AND BoxID <> -1 then session("BoxID") = BoxID else session("BoxID") = -1 set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") if Session("UserID") & "" <> "" then SQL = "Select UAccess from [User] where UID=" & session("UserID") oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then if oRs("UAccess") = true then Access = 1 else Access = 0 else Response.Redirect "account.asp?fromb2b=1" end if oRs.close end if set oRs = nothing oConn.close : set oConn = nothing GoToPage = "b2b.asp" menu = "5" %>