diff options
author | MaZderMind | 2015-03-31 21:38:03 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 21:38:03 +0200 |
commit | 7a163c226c99eb97fb9ce59ce5774da513bcdfd1 (patch) | |
tree | 19e94eae8e42c0b7cb5efd02d03d3dab95601f04 /view/feedback-read.php | |
parent | f48084e1d68429235a5655a92b463cc5099be646 (diff) |
Feedback Read-View
Diffstat (limited to 'view/feedback-read.php')
-rw-r--r-- | view/feedback-read.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/view/feedback-read.php b/view/feedback-read.php new file mode 100644 index 0000000..4f04a02 --- /dev/null +++ b/view/feedback-read.php @@ -0,0 +1,29 @@ +<?php + +$feedback = new Feedback(); +if(!$feedback->isEnabled()) + throw new NotFoundException('Feedback is disabled'); + +if(!$feedback->isLoggedIn()) +{ + $feedback->requestLogin(); + exit; +} + +$from = isset($_POST['from']) ? strtotime($_POST['from']) : strtotime('2000-01-01'); +$to = isset($_POST['to']) ? strtotime($_POST['to']) : time() + 24*60*60; +$cols = isset($_POST['col']) ? $_POST['col'] : array('reported', 'issuetext'); + +$allcols = array('reported', 'datetime', 'net', 'os', 'player', 'stream', 'ipproto_v4', 'ipproto_v6', 'provider', 'issues', 'issuetext'); + +echo $tpl->render(array( + 'page' => 'feedback-read', + 'title' => 'Read Feedback', + + 'from' => $from, + 'to' => $to, + 'responses' => $feedback->read($from, $to), + + 'columns' => array_intersect($allcols, $cols), + 'allcolumns' => $allcols, +)); |