# $Id: html.itcl,v 1.22.2.1 2001/12/05 08:05:51 lightn Exp $ proc print_html_header_200 { chan contenttype lastmodified } { puts $chan "HTTP/1.0 200 OK" puts $chan [format "Date: %s GMT" [clock format [clock seconds] -format "%a, %d %b %Y %T" -gmt true]] if { $lastmodified != "" } { puts $chan [format "Last-Modified: %s GMT" [clock format $lastmodified -format "%a, %d %b %Y %T" -gmt true]] } puts $chan "Connection: close" puts $chan "Content-Type: $contenttype" puts $chan "" } proc print_html_header_304 { chan } { puts $chan "HTTP/1.0 304 Not Modified" puts $chan "Connection: close" puts $chan "" } proc print_html_header_401 { chan } { puts $chan "HTTP/1.0 401 Authorization Required" puts $chan "WWW-Authenticate: Basic realm=\"TiVo-web\"" puts $chan "Connection: close" puts $chan "" } proc print_html_header_404 { chan } { puts $chan "HTTP/1.0 404 Not Found" puts $chan "Connection: close" puts $chan "Content-Type: text/html; charset=iso-8859-1" puts $chan "
INTERNAL SERVER ERROR"
puts $chan $action
puts $chan $error
puts $chan ""
}
proc html_start {title} {
set ret "\n"
append ret "\n"
if {$title != ""} {
append ret "| $TT_HTTPD::NAME - v$TT_HTTPD::VERSION | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| $TT_HTTPD::OPTIONS_MENU | ||||||||||||
| $cap |
|---|