28 |
|
{ |
29 |
|
string format = itor->second; |
30 |
|
|
31 |
< |
if (format == "t") |
32 |
< |
{ |
33 |
< |
this->format = table; |
34 |
< |
} |
35 |
< |
else |
36 |
< |
{ |
37 |
< |
this->format = page; |
38 |
< |
} |
31 |
> |
page = format != "t" ? true : false; |
32 |
|
} |
33 |
|
|
34 |
|
display(method); |
82 |
|
hostupdate << '\n' << flush; |
83 |
|
} |
84 |
|
|
85 |
< |
hostupdate.ignore(string::npos, '\n'); |
93 |
< |
hostupdate.ignore(string::npos, '\n'); |
85 |
> |
hostupdate.ignore(26); |
86 |
|
|
87 |
|
list<Host> hosts; |
88 |
|
bool done = false; |
110 |
|
} |
111 |
|
while (!done && hostupdate.good()); |
112 |
|
|
113 |
< |
if (format == page) header(); |
113 |
> |
if (page) header(); |
114 |
|
|
115 |
|
for (list<Host>::iterator itor = hosts.begin(); itor != hosts.end(); itor++) |
116 |
|
{ |
119 |
|
cout << host << flush; |
120 |
|
} |
121 |
|
|
122 |
< |
if (format == page) footer(); |
122 |
> |
if (page) footer(); |
123 |
> |
} |
124 |
> |
|
125 |
> |
void HostStatus::header() |
126 |
> |
{ |
127 |
> |
cout << "<html>\n" |
128 |
> |
<< "<head>\n" |
129 |
> |
<< "<link rel=\"StyleSheet\" href=\"../stylesheets/regular.css\" type\"" |
130 |
> |
<< "text/css\">\n" |
131 |
> |
<< "<title>Host Status</title>\n" |
132 |
> |
<< "</head>\n" |
133 |
> |
<< "<body>\n" |
134 |
> |
<< "<h1 id=\"title\" class=\"center\">Host Status</h1>\n" |
135 |
> |
<< "<table class=\"center\">\n"; |
136 |
> |
} |
137 |
> |
|
138 |
> |
void HostStatus::footer() |
139 |
> |
{ |
140 |
> |
cout << "</table>\n" |
141 |
> |
<< "</html>\n"; |
142 |
|
} |