… | |
… | |
130 | |
130 | |
131 | sub conn::diridx { |
131 | sub conn::diridx { |
132 | my $self = shift; |
132 | my $self = shift; |
133 | |
133 | |
134 | my $data = $self->get_statdata; |
134 | my $data = $self->get_statdata; |
|
|
135 | |
|
|
136 | my $uptime = int (time - $::starttime); |
|
|
137 | $uptime = sprintf "%02dd %02d:%02d", |
|
|
138 | int ($uptime / (60 * 60 * 24)), |
|
|
139 | int ($uptime / (60 * 60)) % 24, |
|
|
140 | int ($uptime / 60) % 60; |
135 | |
141 | |
136 | <<EOF; |
142 | <<EOF; |
137 | <html> |
143 | <html> |
138 | <head><title>$self->{uri}</title></head> |
144 | <head><title>$self->{uri}</title></head> |
139 | <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000"> |
145 | <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000"> |
140 | <h1>$data->{path}</h1> |
146 | <h1>$data->{path}</h1> |
141 | $data->{top} |
147 | $data->{top} |
142 | <small><div align="right"><tt>$self->{remote_addr}/$self->{country} - $::conns connection(s) - myhttpd/$VERSION</tt></div></small> |
148 | <small><div align="right"><tt>$self->{remote_addr}/$self->{country} - $::conns connection(s) - uptime $uptime - myhttpd/$VERSION</tt></div></small> |
143 | <hr> |
149 | <hr> |
144 | $data->{stat} |
150 | $data->{stat} |
145 | $data->{bot} |
151 | $data->{bot} |
146 | </body> |
152 | </body> |
147 | </html> |
153 | </html> |