File: index.adp

package info (click to toggle)
aolserver4 4.5.1-15.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,772 kB
  • sloc: ansic: 45,120; tcl: 5,532; sh: 1,021; makefile: 380; pascal: 219; php: 13
file content (29 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (5)
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
<html>
<head>
<title>AOLserver Documentation</title>
</head>
<body>
<%
set dir [file dirname [ns_url2file [ns_conn url]]]
foreach {title section} [list "Programs" 1 "Tcl Commands" n "Library Routines" 3] {
	ns_adp_puts "<h1>$title</h1>"
	ns_adp_puts <table>
	set n 0
	set ncols 3
	foreach file [lsort [glob -nocomplain $dir/*.$section.htm]] {
		if !$n {
			ns_adp_puts <tr>
		}
		set link [file tail $file]
		set page [file rootname [file rootname $link]]
		ns_adp_puts "<td><a href=$link>$page</a><br></td>"
		if {[incr n] == $ncols} {
			ns_adp_puts </tr>
			set n 0
		}
	}
	ns_adp_puts </table>
}
%>
</body>
</html>