$cheatlogs = new CheatLogs($db, $user); list($result, $totalCount) = $cheatlogs->query(array("limit" => $_GET["limit"], "index" => $_GET["index"], "userid" => $_GET["userid"])); httpResponse($result, $totalCount); break; case validateRoute('GET', 'admin-mailbox'): $adminMailbox = new AdminMailbox($db, $user); list($result, $totalCount) = $adminMailbox->query(array("limit" => $_GET["limit"], "index" => $_GET["index"])); httpResponse($result, $totalCount); break; case validateRoute('POST', 'admin-mailbox'): $adminMailbox = new AdminMailbox($db, $user); $adminMailbox->create($postdata); httpResponse(); break; case validateRoute('PATCH', 'admin-mailbox/\\d+'): $adminMailbox = new AdminMailbox($db, $user); $adminMailbox->update((int) $params[1], $postdata); httpResponse(); break; case validateRoute('GET', 'comments'): $comments = new Comments($db, $user, $torrent); list($result, $totalCount) = $comments->getAllComments((int) $_GET["limit"] ?: 10, (int) $_GET["index"] ?: 0); httpResponse($result, $totalCount); break; case validateRoute('GET', 'search'): $sqlerrors = new SqlErrors($db, $user); list($result, $totalCount) = $user->search($_GET); httpResponse($result, $totalCount); break; case validateRoute('POST', 'reseed-requests'): $logs = new Logs($db, $user);