Alter Version

This commit is contained in:
Walter Hupfeld
2024-02-16 15:35:01 +01:00
parent 6e85cec1da
commit 0df6729f8b
393 changed files with 173746 additions and 6 deletions

20
ajax/ajax_rating.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
$dbFilename="../db/locations.db";
require_once("../config.php");
$mode = trim($_POST['mode']);
$id = (int)$_POST['id'];
$value = (int)$_POST['value'];
if ($mode=="up") {
$db->exec("UPDATE location SET thumb_ups=thumb_ups+1 WHERE id=".$id);
echo "success";
} elseif ($mode=="down") {
$db->exec("UPDATE location SET thumb_downs=thumb_ups+1 WHERE id=".$id);
echo "success";
} else {
echo "error";
};