void WebStats::getURLData(const char* url, int requestID, const URLParams ¶maters, bool get)
| 874 | |
| 875 | //void WebStats::getURLData(const char* url, int requestID, const URLParams ¶maters, bool get) |
| 876 | bool WebStats::handleRequest(const HTTPRequest& request, HTTPReply& reply) { |
| 877 | groupLoop = 0; |
| 878 | flagHistoryLoop = 0; |
| 879 | playeRecord = NULL; |
| 880 | flagReportID = -1; |
| 881 | |
| 882 | std::string& page = reply.body; |
| 883 | templateSystem.startTimer(); |
| 884 | |
| 885 | std::string action, playerID, flagID; |
| 886 | request.getParam("action", action); |
| 887 | request.getParam("playerid", playerID); |
| 888 | request.getParam("flagid", flagID); |
| 889 | |
| 890 | if (action == "player" && playerID.size()) { |
| 891 | doPlayerReport(page, atoi(playerID.c_str())); |
| 892 | } |
| 893 | if (action == "flag" && flagID.size()) { |
| 894 | doFlagReport(page, atoi(flagID.c_str())); |
| 895 | } |
| 896 | else { |
| 897 | doStatReport(page, action); |
| 898 | } |
| 899 | |
| 900 | reply.docType = HTTPReply::eHTML; |
| 901 | |
| 902 | return true; |
| 903 | } |
| 904 | |
| 905 | // Local Variables: *** |
| 906 | // mode: C++ *** |
no test coverage detected