improve scoring to store to presubmitted localhost, fix style and
[ViQa-Kissu.git] / poll.php
blobc7453f218ea33e67e7af0fff6a2f6ae17a82fdfa
1 <?php
3 require_once 'inc/functions.php';
4 require_once 'inc/polling.php';
6 if(isset($_POST['respond_poll'])){
7 $error = Polling::respondToPoll($_POST['id'], $_POST['response_json'], $_POST['board']);
8 if($error)
9 echo json_encode(array("error"=>$error));
10 else
11 echo Polling::getPollInfo($_POST['id'], $_POST['board']);
13 elseif(isset($_POST['query_poll'])){
14 echo Polling::getPollInfo($_POST['id'], $_POST['board']);