summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.asp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kate/tests/highlight.asp
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/tests/highlight.asp')
-rw-r--r--kate/tests/highlight.asp58
1 files changed, 58 insertions, 0 deletions
diff --git a/kate/tests/highlight.asp b/kate/tests/highlight.asp
new file mode 100644
index 000000000..07a8619e1
--- /dev/null
+++ b/kate/tests/highlight.asp
@@ -0,0 +1,58 @@
+<% 'kate: hl ASP;
+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
+ Session("originalRequestedPage") = Request.ServerVariables("PATH_INFO") & "?" & Request.ServerVariables("QUERY_STRING")
+end if
+
+function countRecords( rsToCount )
+ numRecs = 0
+
+ do until rsToCount.eof
+ numRecs = numRecs + 1
+
+ rsToCount.movenext
+ loop
+
+ rsToCount.close ' just to make sure nobody
+ ' tries to operate on the recordset,
+ ' which has already reached eof
+
+ countRecords = numRecs
+end function
+
+function unique( rs, sortColumn ) ' return unique instances of text in sortColumn within rs
+ dim sorted()
+
+ redim sorted(1)
+ dim i
+ i = 0
+ do until rs.eof
+ if (not find( rs(sortColumn), sorted )) then
+ redim preserve sorted(i+1)
+ sorted(i) = rs(sortColumn)
+ i = i + 1
+ end if
+ rs.MoveNext
+ loop
+
+ redim preserve sorted(i-1) ' the function will add an extra blank entry to the array
+
+ rs.Close ' close the recordset - we'll be using it again - and reset i - well be using it again, too
+
+ unique = sorted
+end function
+
+sub testSub( variable ) ' do nothing impressive...
+ dim newVar
+
+ newVar = variable
+
+ if ( variable = true )
+ response.end
+ else %>
+
+<p>We are writing text.</p>
+<p class="stuff"><%=newVar%></p>
+<p>We have written text and outputted a variable.</p>
+
+<% end if
+end sub %> \ No newline at end of file