| 157 | } |
| 158 | |
| 159 | bool WebReport::handleAuthedRequest(int level, const HTTPRequest& request, HTTPReply& reply) { |
| 160 | evenLine = false; |
| 161 | valid = level == 1; |
| 162 | reports = NULL; |
| 163 | |
| 164 | reply.returnCode = HTTPReply::e200OK; |
| 165 | std::string& page = reply.body; |
| 166 | |
| 167 | std::string action; |
| 168 | request.getParam("action", action); |
| 169 | |
| 170 | reply.docType = HTTPReply::eHTML; |
| 171 | |
| 172 | reports = bz_getReports(); |
| 173 | report = -1; |
| 174 | |
| 175 | if (!templateSystem.processTemplateFile(page, "report.tmpl")) { |
| 176 | templateSystem.processTemplate(page, reportDefaultTemplate); |
| 177 | } |
| 178 | |
| 179 | if (reports) { |
| 180 | bz_deleteStringList(reports); |
| 181 | } |
| 182 | |
| 183 | return true; |
| 184 | } |
| 185 | |
| 186 | void WebReport::loadDefaultTemplates(void) { |
| 187 | reportDefaultTemplate = "<html><body>[?IF Valid][*START Reports][$Report]<br>[*END Reports]There are no reports, sorry[*EMPTY Reports][?ELSE Valid]Invalid Login, sorry[?END Valid]</body></html>"; |
nothing calls this directly
no test coverage detected