Subversion Repositories Koakuma

Rev

Rev 29 | Rev 31 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 30
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: koakuma.cgi.in 29 2024-10-02 08:56:47Z nishi $
2
# $Id: koakuma.cgi.in 30 2024-10-02 09:14:03Z nishi $
3
 
3
 
4
set KOAKUMA_VERSION "1.00"
4
set KOAKUMA_VERSION "1.00"
5
set components ""
5
set components ""
6
 
6
 
7
chan configure stdout -buffering none
7
chan configure stdout -buffering none
Line 239... Line 239...
239
	rputs	"	<head>"
239
	rputs	"	<head>"
240
	rputs	"		<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
240
	rputs	"		<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
241
	rputs	"		<title>$title - Koakuma</title>"
241
	rputs	"		<title>$title - Koakuma</title>"
242
	rputs	"		<link rel=\"stylesheet\" href=\"$css\">"
242
	rputs	"		<link rel=\"stylesheet\" href=\"$css\">"
243
	set msie " src=\"$koakuma_png\""
243
	set msie " src=\"$koakuma_png\""
244
	set msie2 ""
-
 
245
	if { [info exists "env(HTTP_USER_AGENT)"] } {
244
	if { [info exists "env(HTTP_USER_AGENT)"] } {
246
		if { [regexp {MSIE 6} "$env(HTTP_USER_AGENT)"] } {
245
		if { [regexp {MSIE 6} "$env(HTTP_USER_AGENT)"] } {
247
			set msie " style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='$koakuma_png', sizingMethod='scale');\" src=\"/static/transparent.gif\""
246
			set msie " style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='$koakuma_png', sizingMethod='scale');\" src=\"/static/transparent.gif\""
248
			set msie2 " style=\"margin-top: 20px;\""
-
 
249
		}
247
		}
250
	}
248
	}
251
	rputs	"	</head>"
249
	rputs	"	</head>"
252
	rputs	"	<body>"
250
	rputs	"	<body>"
253
	rputs	"		<a href=\"/koakuma\" id=\"gomain\">"
251
	rputs	"		<a href=\"/koakuma\" id=\"gomain\">"
Line 256... Line 254...
256
	rputs	"		<div id=\"space\"></div>"
254
	rputs	"		<div id=\"space\"></div>"
257
	rputs	"		<div id=\"title\">"
255
	rputs	"		<div id=\"title\">"
258
	rputs	"			Koakuma"
256
	rputs	"			Koakuma"
259
	rputs	"		</div>"
257
	rputs	"		</div>"
260
	rputs	"		<a href=\"$env(SCRIPT_NAME)\">Root</a>"
258
	rputs	"		<a href=\"$env(SCRIPT_NAME)\">Root</a>"
261
	rputs	"		<div id=\"clearfix\"></div>"
-
 
262
	if { "$has_toc" == "1" } {
259
	if { "$has_toc" == "1" } {
263
		rputs	"		<div id=\"doc\">"
260
		rputs	"		<div id=\"doc\">"
264
	} else {
261
	} else {
265
		rputs	"		<div id=\"doc-notoc\">"
262
		rputs	"		<div id=\"doc-notoc\">"
266
	}
263
	}
-
 
264
	rputs	"		<div style=\"clear: both;\"></div>"
267
	if { "$has_toc" == "1" } {
265
	if { "$has_toc" == "1" } {
268
		rputs	"		<div id=\"toc\"$msie2>"
266
		rputs	"		<div id=\"toc\">"
-
 
267
		rputs	"			<div id=\"tocinside\">"
269
		rputs	"			<div id=\"toctitle\">TOC</div>"
268
		rputs	"				<div id=\"toctitle\">TOC</div>"
270
		foreach sect $toc {
269
		foreach sect $toc {
271
			if { "[string range "[regsub -all { } "$sect" "-"]" 0 0]" == "-" } {
270
			if { "[string range "[regsub -all { } "$sect" "-"]" 0 0]" == "-" } {
272
				rputs "<a class=\"shiftlink\" href=\"#TOC-[regsub {^-} "[regsub -all { } "$sect" "-"]" ""]\">[regsub {^-} "$sect" ""]</a><br>"
271
				rputs "<a class=\"shiftlink\" href=\"#TOC-[regsub {^-} "[regsub -all { } "$sect" "-"]" ""]\">[regsub {^-} "$sect" ""]</a><br>"
273
			} else {
272
			} else {
274
				rputs "<a href=\"#TOC-[regsub -all { } "$sect" "-"]\">$sect</a><br>"
273
				rputs "<a href=\"#TOC-[regsub -all { } "$sect" "-"]\">$sect</a><br>"
275
			}
274
			}
276
		}
275
		}
-
 
276
		rputs	"			</div>"
277
		rputs	"		</div>"
277
		rputs	"		</div>"
278
	}
278
	}
279
	rputs	"			<div id=\"docinside\">"
279
	rputs	"			<div id=\"docinside\">"
280
	rputs	"				<h1>$title</h1>"
280
	rputs	"				<h1>$title</h1>"
281
}
281
}