File: highlight.asp.dark.html

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (65 lines) | stat: -rw-r--r-- 7,941 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.asp</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (ASP) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#2980b9;font-weight:bold">&lt;%</span> <span style="color:#7a7c7d">'</span><span style="color:#3f8058">kate:</span><span style="color:#7a7c7d"> </span><span style="color:#7f8c8d">hl</span><span style="color:#f44f4f"> ASP</span><span style="color:#7f8c8d">;</span>
<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#27ae60">(</span> <span style="color:#8e44ad">instr</span><span style="color:#27ae60">(</span><span style="color:#8e44ad">request</span>.<span style="color:#8e44ad">servervariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"PATH_INFO"</span><span style="color:#27ae60">),</span><span style="color:#f44f4f">"login.asp"</span><span style="color:#27ae60">)</span> &lt;= <span style="color:#f67400">0</span> <span style="font-weight:bold">and</span> <span style="color:#8e44ad">instr</span><span style="color:#27ae60">(</span><span style="color:#8e44ad">request</span>.<span style="color:#8e44ad">servervariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"PATH_INFO"</span><span style="color:#27ae60">),</span><span style="color:#f44f4f">"inset"</span><span style="color:#27ae60">)</span> &lt;= <span style="color:#f67400">0</span> <span style="font-weight:bold">and</span> <span style="color:#8e44ad">instr</span><span style="color:#27ae60">(</span><span style="color:#8e44ad">request</span>.<span style="color:#8e44ad">servervariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"PATH_INFO"</span><span style="color:#27ae60">),</span><span style="color:#f44f4f">"Data"</span><span style="color:#27ae60">)</span> &lt;= <span style="color:#f67400">0</span> <span style="font-weight:bold">and</span> <span style="color:#8e44ad">instr</span><span style="color:#27ae60">(</span><span style="color:#8e44ad">request</span>.<span style="color:#8e44ad">servervariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"PATH_INFO"</span><span style="color:#27ae60">),</span><span style="color:#f44f4f">"dropDown"</span><span style="color:#27ae60">)</span> &lt;= <span style="color:#f67400">0</span> <span style="color:#27ae60">)</span> <span style="color:#fdbc4b;font-weight:bold">then</span>
	<span style="color:#8e44ad">Session</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"originalRequestedPage"</span><span style="color:#27ae60">)</span> = <span style="color:#8e44ad">Request</span>.<span style="color:#8e44ad">ServerVariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"PATH_INFO"</span><span style="color:#27ae60">)</span> <span style="font-weight:bold">&amp;</span> <span style="color:#f44f4f">"?"</span> <span style="font-weight:bold">&amp;</span> <span style="color:#8e44ad">Request</span>.<span style="color:#8e44ad">ServerVariables</span><span style="color:#27ae60">(</span><span style="color:#f44f4f">"QUERY_STRING"</span><span style="color:#27ae60">)</span>
<span style="color:#fdbc4b;font-weight:bold">end if</span>

<span style="font-weight:bold">function</span> countRecords<span style="color:#27ae60">(</span> rsToCount <span style="color:#27ae60">)</span>
	numRecs = <span style="color:#f67400">0</span>

	<span style="color:#fdbc4b;font-weight:bold">do</span> <span style="color:#fdbc4b;font-weight:bold">until</span> rsToCount.<span style="font-weight:bold">eof</span>
		numRecs = numRecs + <span style="color:#f67400">1</span>

		rsToCount.<span style="font-weight:bold">movenext</span>
	<span style="color:#fdbc4b;font-weight:bold">loop</span>

	rsToCount.<span style="font-weight:bold">close</span> <span style="color:#7a7c7d">' just to make sure nobody</span>
		<span style="color:#7a7c7d">' tries to operate on the recordset,</span>
		<span style="color:#7a7c7d">' which has already reached eof</span>

	countRecords = numRecs
<span style="font-weight:bold">end function</span>

<span style="font-weight:bold">function</span> unique<span style="color:#27ae60">(</span> rs<span style="color:#27ae60">,</span> sortColumn <span style="color:#27ae60">)</span> <span style="color:#7a7c7d">' return unique instances of text in sortColumn within rs</span>
	<span style="font-weight:bold">dim</span> sorted<span style="color:#27ae60">()</span>

	<span style="font-weight:bold">redim</span> sorted<span style="color:#27ae60">(</span><span style="color:#f67400">1</span><span style="color:#27ae60">)</span>
	<span style="font-weight:bold">dim</span> i
	i = <span style="color:#f67400">0</span>
	<span style="color:#fdbc4b;font-weight:bold">do</span> <span style="color:#fdbc4b;font-weight:bold">until</span> rs.<span style="font-weight:bold">eof</span>
		<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#27ae60">(</span><span style="font-weight:bold">not</span> find<span style="color:#27ae60">(</span> rs<span style="color:#27ae60">(</span>sortColumn<span style="color:#27ae60">),</span> sorted <span style="color:#27ae60">))</span> <span style="color:#fdbc4b;font-weight:bold">then</span>
			<span style="font-weight:bold">redim</span> <span style="font-weight:bold">preserve</span> sorted<span style="color:#27ae60">(</span>i+<span style="color:#f67400">1</span><span style="color:#27ae60">)</span>
			sorted<span style="color:#27ae60">(</span>i<span style="color:#27ae60">)</span> = rs<span style="color:#27ae60">(</span>sortColumn<span style="color:#27ae60">)</span>
		 	i = i + <span style="color:#f67400">1</span>
		<span style="color:#fdbc4b;font-weight:bold">end if</span>
		rs.<span style="font-weight:bold">MoveNext</span>
	<span style="color:#fdbc4b;font-weight:bold">loop</span>

	<span style="font-weight:bold">redim</span> <span style="font-weight:bold">preserve</span> sorted<span style="color:#27ae60">(</span>i-<span style="color:#f67400">1</span><span style="color:#27ae60">)</span> <span style="color:#7a7c7d">' the function will add an extra blank entry to the array</span>

	rs.<span style="font-weight:bold">Close</span> 	<span style="color:#7a7c7d">' close the recordset - we'll be using it again - and reset i - well be using it again, too</span>

	unique = sorted
<span style="font-weight:bold">end function</span>

<span style="font-weight:bold">sub</span> testSub<span style="color:#27ae60">(</span> variable <span style="color:#27ae60">)</span> <span style="color:#7a7c7d">' do nothing impressive...</span>
	<span style="font-weight:bold">dim</span> newVar

	newVar = variable

	<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#27ae60">(</span> variable = <span style="font-weight:bold">true</span> <span style="color:#27ae60">)</span>
		<span style="color:#8e44ad">response</span>.<span style="color:#8e44ad">end</span>
	<span style="color:#fdbc4b;font-weight:bold">else</span> <span style="color:#2980b9;font-weight:bold">%></span>

<span style="font-weight:bold">&lt;p></span>We are writing text.<span style="font-weight:bold">&lt;/p></span>
<span style="font-weight:bold">&lt;p</span><span style="color:#27ae60"> class=</span><span style="color:#f44f4f">"stuff"</span><span style="font-weight:bold">></span><span style="color:#2980b9;font-weight:bold">&lt;%</span>=newVar<span style="color:#2980b9;font-weight:bold">%></span><span style="font-weight:bold">&lt;/p></span>
<span style="font-weight:bold">&lt;p></span>We have written text and outputted a variable.<span style="font-weight:bold">&lt;/p></span>

<span style="color:#2980b9;font-weight:bold">&lt;%</span> 	<span style="color:#fdbc4b;font-weight:bold">end if</span>
<span style="font-weight:bold">end sub</span> <span style="color:#2980b9;font-weight:bold">%></span>
</pre></body></html>