diff options
author | MaZderMind | 2015-03-07 17:58:07 +0100 |
---|---|---|
committer | MaZderMind | 2015-03-14 13:46:47 +0100 |
commit | 844a7d53f2d78bafba479c0d931277246ade61de (patch) | |
tree | 7a9ab7e3ddcafa878f89deecc03c6de742fa2efa /pages/feedback.php | |
parent | 8bb9b119a34717782e41124030917bd86d47f754 (diff) |
Renames pages -> view
Diffstat (limited to 'pages/feedback.php')
-rw-r--r-- | pages/feedback.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/pages/feedback.php b/pages/feedback.php deleted file mode 100644 index 8b87b01..0000000 --- a/pages/feedback.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -require_once('lib/bootstrap.php'); - -if( - !isset($_POST['datetime']) || - !isset($_POST['net']) || - !isset($_POST['os']) || - !isset($_POST['player']) || - !isset($_POST['stream']) || - !isset($_POST['provider']) || - !isset($_POST['issuetext']) -) { - echo $tpl->render(array( - 'page' => 'feedback', - 'title' => 'Give Feedback', - 'room' => null, - )); -} -else -{ - $db = new PDO(get('FEEDBACK.DSN')); - $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - - $stm = $db->prepare(' - INSERT INTO feedback (reported, datetime, net, os, player, stream, ipproto_v4, ipproto_v6, provider, issues, issuetext) - VALUES (:reported, :datetime, :net, :os, :player, :stream, :ipproto_v4, :ipproto_v6, :provider, :issues, :issuetext) - '); - - $stm->execute(array( - 'reported' => time(), - 'datetime' => strtotime($_POST['datetime']), - 'net' => $_POST['net'], - 'os' => $_POST['os'], - 'player' => $_POST['player'], - 'stream' => $_POST['stream'], - 'ipproto_v4' => isset($_POST['ipproto']) && is_array($_POST['ipproto']) && in_array('v4', $_POST['ipproto']), - 'ipproto_v6' => isset($_POST['ipproto']) && is_array($_POST['ipproto']) && in_array('v6', $_POST['ipproto']), - 'provider' => $_POST['provider'], - 'issues' => isset($_POST['issues']) && is_array($_POST['issues']) ? implode(',', $_POST['issues']) : '', - 'issuetext' => $_POST['issuetext'], - )); -} |