Check if the current operation is paged (ASP)

xiaoxiao2021-03-05  45

'***************************************************

'Check if it is paged (by comparing parameter values ​​other than the number of pages: queryString page)

'***************************************************

Function isturnPage (STRPAGEVAR)

Dim Filelast, Filenow, Strval, Vararray1, Vararray2

DIM ILOC, BLNTURNING

BLNTURNING = TRUE

FileLast = Request.ServerVariables ("http_referer")

Iloc = INSTR (1, Filelast, "?", 1)

ILOC> 0 THEN

FileLast = MID (FileLast, Iloc 1)

For Each Strval in Request.QueryString

IF strval <> strpagevar then

If Request.QueryString (Strval <> getQueryString (Strval, FileLast) THEN

BLNTURNING = FALSE

EXIT for

END IF

END IF

NEXT

END IF

ISturnPage = blnTurbing

END FUNCTION

'***************************************************

'Take the value of Strqueystring, such as getQueryString ("Page", "ST = 1 & Page = 2 & SS = YES") = 2

'***************************************************

Function getQueryString (Strval, StrQueryString)

DIM ILOC, ISTART, IEND, VARARRAY

DIM K

Iloc = INSTR (1, strQueryString, "=", 1)

IF (iloc> 0) THEN

Vararray = split (strQueryString, "&")

For K = 0 to Ubound (Vararray)

iStart = INSTR (1, Vararray (k), Strval, 1)

IEND = INSTR (1, Vararray (k), "=", 1)

IF iStart> 0 THEN

GetQueryString = MID (Vararray (K), IEND 1)

EXIT for

END IF

NEXT

Else

GetQueryString = "" "

END IF

END FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-36565.html

New Post(0)