1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 03:24:41 +00:00

Version 1.2.5

This commit is contained in:
だいちまる
2023-08-19 17:49:56 +09:00
committed by GitHub
parent 6845f31a4a
commit 9ede52e05e
74 changed files with 9283 additions and 6961 deletions
+27 -27
View File
@@ -1,27 +1,27 @@
<?php
require('../db.php');
if (isset($_POST['uniqid'])){
$postUniqid = $_POST['uniqid'];
try {
$pdo = new PDO('mysql:charset=UTF8;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
// 削除クエリを実行
$deleteQuery = $pdo->prepare("DELETE FROM ueuse WHERE uniqid = :uniqid");
$deleteQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
$res = $deleteQuery->execute();
if ($res) {
echo json_encode(['success' => true]);
exit;
} else {
echo json_encode(['success' => false, 'error' => '削除に失敗しました。']);
exit;
}
} catch(PDOException $e) {
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
exit;
}
}
?>
<?php
require('../db.php');
if (isset($_POST['uniqid'])){
$postUniqid = htmlentities($_POST['uniqid']);
try {
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
// 削除クエリを実行
$deleteQuery = $pdo->prepare("DELETE FROM ueuse WHERE uniqid = :uniqid");
$deleteQuery->bindValue(':uniqid', $postUniqid, PDO::PARAM_STR);
$res = $deleteQuery->execute();
if ($res) {
echo json_encode(['success' => true]);
exit;
} else {
echo json_encode(['success' => false, 'error' => '削除に失敗しました。']);
exit;
}
} catch(PDOException $e) {
echo json_encode(['success' => false, 'error' => 'データベースエラー:' . $e->getMessage()]);
exit;
}
}
?>