forked from aolserver/aolserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.adp
200 lines (174 loc) · 4.75 KB
/
index.adp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<%
set uptime [ns_info uptime]
if {$uptime < 60} {
set uptime [format %.2d $uptime]
} elseif {$uptime < 3600} {
set mins [expr $uptime / 60]
set secs [expr $uptime - ($mins * 60)]
set uptime "[format %.2d $mins]:[format %.2d $secs]"
} else {
set hours [expr $uptime / 3600]
set mins [expr ($uptime - ($hours * 3600)) / 60]
set secs [expr $uptime - (($hours * 3600) + ($mins * 60))]
set uptime "${hours}:[format %.2d $mins]:[format %.2d $secs]"
}
set config ""
lappend config "Build Date" [ns_info builddate]
lappend config "Build Label" [ns_info label]
lappend config "Build Platform" [ns_info platform]
lappend config "Build Version" [ns_info version]
lappend config "Build Patch Level" [ns_info patchlevel]
lappend config " " " "
lappend config "Binary" [ns_info nsd]
lappend config "Process ID" [ns_info pid]
lappend config "Uptime" $uptime
lappend config "Host Name" [ns_info hostname]
lappend config "Address" [ns_info address]
lappend config "Server Config" [ns_info config]
lappend config "Server Log" [ns_info log]
lappend config "Access Log" [ns_accesslog file]
lappend config " " " "
lappend config "Tcl Version" [info tclversion]
lappend config "Tcl Patch Level" [info patchlevel]
lappend config " " " "
lappend config "Home Directory" [ns_info home]
lappend config "Page Root" [ns_info pageroot]
lappend config "Tcl Library" [ns_info tcllib]
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Welcome to AOLserver</title>
<style type="text/css">
body {
font-family: verdana, arial;
font-size: 10pt;
color: #000;
background-color: #fff;
}
a:link, a:visited, a:active {
text-decoration: none;
color: blue;
}
b {
font-style: bold;
}
h1 {
font-family: verdana, arial;
font-style: bold;
font-size: 14pt;
}
h2 {
font-family: verdana, arial;
font-style: bold;
font-size: 12pt;
}
table {
border: solid 1px #000000;
}
td {
font-family: verdana, arial;
font-size: 10pt;
border-right: solid 1px #cccccc;
border-bottom: solid 1px #cccccc;
}
p {
font-family: verdana, arial;
font-size: 12pt;
}
#nav{
margin-top: 1em;
margin-bottom: 0.5em;
}
#nav ul {
background-color: #ececec;
text-align: left;
margin-left: 0;
padding-left: 0;
padding-top: 2px;
padding-bottom: 2px;
border-bottom: 1px solid #cccccc;
}
#nav li {
font-family: verdana, arial;
font-size: 10pt;
list-style-type: none;
padding: 0.25em 1em;
border-left: 1px solid white;
display: inline;
}
#nav li:first-child {
border: none;
}
</style>
</head>
<body>
<div id="nav">
<ul>
<li><a href="http://www.aolserver.com/">AOLserver.com</a></li>
<li><a href="http://panoptic.com/wiki/aolserver/">Wiki</a></li>
<li><a href="http://panoptic.com/wiki/aolserver/Tcl%20API">Tcl API</a></li>
<li><a href="http://aolserver.com/docs/devel/c/api">C API</a></li>
<li><a href="http://aolserver.com/lists.php">Mailing Lists</a></li>
<li> </li>
</ul>
</div>
<h1>AOLserver <%=[ns_info version]%></h1>
<p>Congratulations, you have successfully installed AOLserver <%=[ns_info version]%>!</p>
<h2>Configuration</h2>
<table cellpadding="3" cellspacing="0">
<tr>
<td><b>Key</b></td>
<td><b>Value</b></td>
<tr>
<%
foreach {key value} $config {
ns_adp_puts "<tr><td>$key</td><td>$value</td></tr>"
}
%>
</table>
<h2>Loaded AOLserver Modules</h2>
<table cellpadding="3" cellspacing="0">
<tr>
<td><b>Type</b></td>
<td><b>Name</b></td>
<td><b>Location</b></td>
</tr>
<%
set server [ns_info server]
set modSection [ns_configsection ns/server/$server/modules]
set tclDir [ns_info tcllib]
set binDir "[ns_info home]/bin"
foreach {name binary} [ns_set array $modSection] {
if {[string match "tcl" $binary]} {
set type "Tcl"
set location "$tclDir/$name"
} else {
set type "C"
set location "$binDir/$binary"
}
ns_adp_puts "<tr><td>$type</td><td>$name</td><td>$location</td></tr>"
}
%>
</table>
<%
set modules [info loaded]
if {[string length $modules]} {
ns_adp_puts "\
<h2>Loaded Tcl Modules</h2>
<table cellpadding=\"3\" cellspacing=\"0\">
<tr>
<td><b>Name</b></td>
<td><b>Location</b></td>
</tr>"
foreach module [info loaded] {
foreach {binary name} $module {
ns_adp_puts "<tr><td>$name</td><td>$binary</td></tr>"
}
}
ns_adp_puts "</table>"
}
%>
</body>
</html>