improve scoring to store to presubmitted localhost, fix style and
[ViQa-Kissu.git] / score.php
blob4be5bb2e0b48af6bfffbcd5f83051e40e20fd9b7
1 <?php
2 require_once 'inc/functions.php';
3 require_once "inc/scoring.php";
5 if(isset($_GET['id'])){
6 $count_obj = Scoring::get($_GET['id'], $_GET['board']);
8 if(isset($count_obj['count'])){
9 echo $count_obj['count'];
11 else {
12 echo "err";
15 else if(isset($_POST['id'])){
16 Scoring::post($_POST['id'], $_POST['board'], $_SERVER['REMOTE_ADDR']);
17 $count_obj = Scoring::get($_POST['id'], $_POST['board']);
18 if(isset($count_obj['count'])){
19 echo $count_obj['count'];
21 else {
22 echo "err";