Warning, /frameworks/syntax-highlighting/autotests/input/highlight.asp is written in an unsupported language. File is not indexed.
0001 <% 'kate: hl ASP; 0002 if ( instr(request.servervariables("PATH_INFO"),"login.asp") <= 0 and instr(request.servervariables("PATH_INFO"),"inset") <= 0 and instr(request.servervariables("PATH_INFO"),"Data") <= 0 and instr(request.servervariables("PATH_INFO"),"dropDown") <= 0 ) then 0003 Session("originalRequestedPage") = Request.ServerVariables("PATH_INFO") & "?" & Request.ServerVariables("QUERY_STRING") 0004 end if 0005 0006 function countRecords( rsToCount ) 0007 numRecs = 0 0008 0009 do until rsToCount.eof 0010 numRecs = numRecs + 1 0011 0012 rsToCount.movenext 0013 loop 0014 0015 rsToCount.close ' just to make sure nobody 0016 ' tries to operate on the recordset, 0017 ' which has already reached eof 0018 0019 countRecords = numRecs 0020 end function 0021 0022 function unique( rs, sortColumn ) ' return unique instances of text in sortColumn within rs 0023 dim sorted() 0024 0025 redim sorted(1) 0026 dim i 0027 i = 0 0028 do until rs.eof 0029 if (not find( rs(sortColumn), sorted )) then 0030 redim preserve sorted(i+1) 0031 sorted(i) = rs(sortColumn) 0032 i = i + 1 0033 end if 0034 rs.MoveNext 0035 loop 0036 0037 redim preserve sorted(i-1) ' the function will add an extra blank entry to the array 0038 0039 rs.Close ' close the recordset - we'll be using it again - and reset i - well be using it again, too 0040 0041 unique = sorted 0042 end function 0043 0044 sub testSub( variable ) ' do nothing impressive... 0045 dim newVar 0046 0047 newVar = variable 0048 0049 if ( variable = true ) 0050 response.end 0051 else %> 0052 0053 <p>We are writing text.</p> 0054 <p class="stuff"><%=newVar%></p> 0055 <p>We have written text and outputted a variable.</p> 0056 0057 <% end if 0058 end sub %>