Subversion Repositories Koakuma

Rev

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

Rev 31 Rev 33
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: koakuma.cgi.in 31 2024-10-02 09:25:33Z nishi $
2
# $Id: koakuma.cgi.in 33 2024-10-02 09:29:41Z 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 230... Line 230...
230
 
230
 
231
proc close_projects {} {
231
proc close_projects {} {
232
	file delete "@@PREFIX@@/lib/koakuma/db/projects.lock"
232
	file delete "@@PREFIX@@/lib/koakuma/db/projects.lock"
233
}
233
}
234
 
234
 
-
 
235
set what ""
-
 
236
 
235
proc start_html {title has_toc} {
237
proc start_html {title has_toc} {
236
	global toc env koakuma_png css
238
	global toc env koakuma_png css what
237
	rputs	"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
239
	rputs	"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
238
	rputs	"<html>"
240
	rputs	"<html>"
239
	rputs	"	<head>"
241
	rputs	"	<head>"
240
	rputs	"		<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
242
	rputs	"		<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
241
	rputs	"		<title>$title - Koakuma</title>"
243
	rputs	"		<title>$title - Koakuma</title>"
Line 276... Line 278...
276
		rputs	"			</div>"
278
		rputs	"			</div>"
277
		rputs	"		</div>"
279
		rputs	"		</div>"
278
	}
280
	}
279
	rputs	"			<div id=\"docinside\">"
281
	rputs	"			<div id=\"docinside\">"
280
	rputs	"				<h1>$title</h1>"
282
	rputs	"				<h1>$title</h1>"
-
 
283
	rputs	"				$what"
281
	rputs	"				<div id=\"shift\">"
284
	rputs	"				<div id=\"shift\">"
282
}
285
}
283
proc end_html {has_toc} {
286
proc end_html {has_toc} {
284
	global KOAKUMA_VERSION toc
287
	global KOAKUMA_VERSION toc
285
	rputs	"				</div>"
288
	rputs	"				</div>"
Line 316... Line 319...
316
			exiting 0
319
			exiting 0
317
		}
320
		}
318
		rputs "Content-Type: text/html"
321
		rputs "Content-Type: text/html"
319
	}
322
	}
320
	if { "$path" == "/" } {
323
	if { "$path" == "/" } {
-
 
324
		set what "This is the main page."
321
		set has_projects 0
325
		set has_projects 0
322
		add_toc "Projects"
326
		add_toc "Projects"
323
		open_projects
327
		open_projects
324
		scan_projects {
328
		scan_projects {
325
			upvar 1 has_projects has_projects
329
			upvar 1 has_projects has_projects
Line 617... Line 621...
617
		set has_project [project_exists "$projname"]
621
		set has_project [project_exists "$projname"]
618
		close_projects
622
		close_projects
619
		
623
		
620
		if { "$has_project" != "" } {
624
		if { "$has_project" != "" } {
621
			if { "$projpath" == "" || "$projpath" == "/" } {
625
			if { "$projpath" == "" || "$projpath" == "/" } {
-
 
626
				set what "This is the project page."
622
				add_toc "Description"
627
				add_toc "Description"
623
				tputs "[html_escape "$has_project"]"
628
				tputs "[html_escape "$has_project"]"
624
				add_toc "Details"
629
				add_toc "Details"
625
				tputs	"<table border=\"0\">"
630
				tputs	"<table border=\"0\">"
626
				tputs	"	<tr>"
631
				tputs	"	<tr>"