Index: ossp-pkg/quos/TODO RCS File: /v/ossp/cvs/ossp-pkg/quos/TODO,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/quos/TODO,v' 2>/dev/null --- TODO 2004/10/25 15:19:20 1.2 +++ TODO 2004/10/25 15:42:43 1.3 @@ -10,3 +10,9 @@ perl-util apache +- apache.conf: + Alias /quos/ /u/rse/wrk/ossp/quos/ + + Options +ExecCGI + + Index: ossp-pkg/quos/quos.cgi RCS File: /v/ossp/cvs/ossp-pkg/quos/quos.cgi,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/quos/quos.cgi,v' 2>/dev/null --- quos.cgi 2004/10/25 14:35:11 1.1 +++ quos.cgi 2004/10/25 15:42:43 1.2 @@ -28,16 +28,73 @@ require 5.008; use CGI; use String::Divert; +use IO::File; -# ...FIXME... +# create objects +my $cgi = new CGI; +my $html = new String::Divert; +$html->overload(1); -my $html = ''; -$html .= "
"; -$html .= "..."; -$html .= "Browse"; -$html .= "..."; -$html .= "
"; -print STDOUT $html; +# generate outer canvas +$html .= "
\n"; +$html->fold("quos"); +$html .= "
\n"; +$html >> "quos"; + +# generate browse part +$html .= "

"; +$html .= ""; +$html .= "Browse\n"; +$html->fold("browse"); +$html .= "\n"; +$html .= "\n"; + +# generate query part +$html .= "

"; +$html .= ""; +$html .= "Query\n"; +$html->fold("query"); +$html .= "\n"; +$html .= "\n"; + +# generate view part +$html .= "

"; +$html .= ""; +$html .= "View\n"; +$html->fold("view"); +$html .= "\n"; +$html .= "\n"; + +# generate result part +$html .= "

"; +$html .= ""; +$html .= "Result\n"; +$html->fold("result"); +$html .= "\n"; +$html .= "\n"; + +# sample +$html >> "query"; +$html .= "this is the query part"; +$html << 1; + +# read HTML skeleton +my $io = new IO::File "); +$io->close(); +$html->undivert(0); +$skel =~ s|\%BODY\%|$html|s; +$html = $skel; + +# create HTTP response +my $http = $cgi->header( + -type => 'text/html', + -expires => '+10s' +); +$http .= $html; +print STDOUT $http; __END__ Index: ossp-pkg/quos/quos.css RCS File: /v/ossp/cvs/ossp-pkg/quos/quos.css,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/quos/quos.css,v' 2>/dev/null --- quos.css 2004/10/25 14:35:11 1.1 +++ quos.css 2004/10/25 15:42:43 1.2 @@ -28,8 +28,26 @@ background: #f0f0f0; } -.quos SPAN.titlebrowse { - color: #ffffff; - background: #000000; +.quos SPAN.browse { + background: #cccccc; +} +.quos SPAN.browse SPAN.title { + font-weight: bold; + font-size: 200%; + color: #ffffff; +} +.quos SPAN.query { + background: #cc3333; +} +.quos SPAN.query SPAN.title { + font-weight: bold; + font-size: 400%; + color: #cccc33; +} +.quos SPAN.view { + background: #33cc33; +} +.quos SPAN.result { + background: #3333cc; }