--- HostStatus/HostStatus.cpp 2003/11/17 03:43:17 40 +++ HostStatus/HostStatus.cpp 2004/01/02 01:55:25 65 @@ -16,13 +16,6 @@ int main(int argc, char* argv[]) HostStatus::HostStatus() { -#ifndef __CYGWIN__ - sputenv("TZ=:America/Los_Angeles"); -#else - sputenv("TZ= PST8PDT"); -#endif - tzset(); - string method = sgetenv("REQUEST_METHOD"); parse(method); @@ -183,10 +176,17 @@ void HostStatus::header(const string& me << "Host Status\n" << "\n" << "\n" + << "
\n" << "

Host Status

\n" + << "
\n" + << "
\n" + << "

\"\"

\n" << "

\n" - << "

\n" - << "\n"; if (method != "POST") sputenv("QUERY_STRING=mode=h"); @@ -218,22 +218,44 @@ void HostStatus::header(const string& me } while (!done && hostupdate.good()); + set selected; + + for (multimap::iterator itor = cgi.find("host"); itor != + cgi.upper_bound("host") && itor != cgi.end(); itor++) + { + string host = itor->second; + + if (host != "") selected.insert(host); + } + for (list::iterator itor = hosts.begin(); itor != hosts.end(); itor++) { Host host = *itor; - cout << "\n"; + cout << "" : ">") << host.getHost() << "\n"; } + bool all = host && name && address && platform && since; + cout << "\n" - << " Host\n" - << " Name\n" - << " Address\n" - << " Platform" - << '\n' - << " Since\n" - << "

\n" + << "\n" + << "\n" + << " Host\n" + << " Name\n" + << " Address\n" + << " Platform\n" + << " Since\n" + << "\n" + << "\n" + << "\n" + << "\n" << "
\n" << "\n" << "\n"; @@ -250,5 +272,6 @@ void HostStatus::header(const string& me void HostStatus::footer() { cout << "
\n" + << "
\n" << "\n"; }