% If Not session("admin_loggedin" & strSUnique) = Session.SessionID then Response.Redirect "default.asp" If lcase(Request.ServerVariables("REQUEST_METHOD")) = "post" then Select Case Request.Form("Flag") Case 1 catID = CLng(Request.Form("D1")) ftype = CStr(Request.Form("D4")) objConn.Execute("UPDATE " & tablPfx & "Cat SET ftype = '" & ftype & "' WHERE catID = " & catID & ";") If mysql then objConn.Execute("UPDATE " & tablPfx & "Scat as t1 LEFT JOIN " & tablPfx & "Scat as t2 ON(t1.catID = " & catID & " AND t2.catID = t1.sCatID) " & _ "SET t1.ftype = '" & ftype & "', t2.ftype = '" & ftype & "' WHERE (t1.catID = " & catID & " OR t2.catID = t1.sCatID);") Else objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE (catID = " & catID & " OR catID = (SELECT TOP 1 sCatID FROM " & tablPfx & "Scat WHERE catID = " & catID & "));") End If Case 2 scatID = CLng(Request.Form("D2")) ftype = CStr(Request.Form("D5")) objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE (sCatID = " & scatID & " OR catID = " & scatID & ");") Case 3 cat3rdID = CLng(Request.Form("D3")) ftype = CStr(Request.Form("D6")) objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = '" & ftype & "' WHERE sCatID = " & cat3rdID & ";") Case 4 objConn.Execute("UPDATE " & tablPfx & "Cat SET ftype = 'default';") objConn.Execute("UPDATE " & tablPfx & "Scat SET ftype = 'default';") End Select Response.Redirect "admin_paymentlink.asp?" & Request.Querystring End If If isNumeric(Request("cid")) then querycatID = CLng(Request("cid")): Else: querycatID = 0 If isNumeric(Request("sid")) then querysubcatID = CLng(Request("sid")): Else: querysubcatID = 0 If isNumeric(Request("3id")) then query3rdcatID = CLng(Request("3id")): Else: query3rdcatID = 0 strCat = "SELECT catID,catName,ftype FROM " & tablPfx & "Cat ORDER BY catName;" Set rs = objConn.Execute(strCat) If not rs.EOF then I = 1 Do While Not rs.EOF currentID = rs("catID") currentName = rs("catName") If I = 1 And querycatID = 0 then querycatID = currentID If CStr(querycatID) = CStr(currentID) then optCat = optCat & "" & vbcrlf catFtype = rs("ftype") Else: optCat = optCat & "" & vbcrlf End If I = I + 1 rs.MoveNext Loop End If rs.close strSCat = "SELECT sCatID,scatName,ftype FROM " & tablPfx & "Scat WHERE catID=" & querycatID & " ORDER BY sCatID;" Set rs = objConn.Execute(strSCat) If not rs.EOF then I = 1 Do While Not rs.EOF currentSubID = rs("sCatID") currentSubName = rs("scatName") If I = 1 And querysubcatID = 0 then querysubcatID = currentSubID If CStr(currentSubID) = CStr(querysubcatID) then optSubCat = optSubCat & "" scatFtype = rs("ftype") Else: optSubCat = optSubCat & "" End If I = I + 1 rs.MoveNext Loop End If rs.close strSCat = "SELECT sCatID,scatName,ftype FROM " & tablPfx & "Scat WHERE catID=" & querysubcatID & " ORDER BY sCatID;" Set rs = objConn.Execute(strSCat) If not rs.EOF then I = 1 Do While Not rs.EOF current3rdID = rs("sCatID") current3rdName = rs("scatName") If I = 1 And query3rdcatID = 0 then query3rdcatID = current3rdID If CStr(current3rdID) = CStr(query3rdcatID) then opt3rdCat = opt3rdCat & "" cat3rdFtype= rs("ftype") Else: opt3rdCat = opt3rdCat & "" End If rs.MoveNext I = I + 1 Loop Else disable3rd = "disabled" End If rs.close If checkDefault(catFtype) then catFtype = "default" If checkDefault(scatFtype) then scatFtype = "default" If checkDefault(cat3rdFtype) then cat3rdFtype = "default" strFees = "SELECT ftype FROM " & tablPfx & "Fees;" Set rs = objConn.Execute(strFees) Do While Not rs.EOF nextFtype = rs(0) opttypeSel = "" & vbcrlf opttype = "" & vbcrlf If nextFtype = catFtype then strCatFtypeOpt = strCatFtypeOpt & opttypeSel Else: strCatFtypeOpt = strCatFtypeOpt & opttype End If If nextFtype = scatFtype then strSCatFtypeOpt = strSCatFtypeOpt & opttypeSel Else: strSCatFtypeOpt = strSCatFtypeOpt & opttype End If If nextFtype = cat3rdFtype then str3rdCatFtypeOpt = str3rdCatFtypeOpt & opttypeSel Else: str3rdCatFtypeOpt = str3rdCatFtypeOpt & opttype End If rs.MoveNext Loop rs.close %>
![]() |
![]() |
|||||
|
||||||
![]() |
![]() |
|||||