mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.4.11 Funium
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
require('../../db.php');
|
||||
require("../../function/function.php");
|
||||
|
||||
header("Content-Type: application/json");
|
||||
header("charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
|
||||
if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safetext(isset($_POST['account_id']))){
|
||||
@@ -22,14 +21,7 @@ if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safe
|
||||
$error_message[] = $e->getMessage();
|
||||
}
|
||||
|
||||
// データベース接続の設定
|
||||
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
|
||||
));
|
||||
|
||||
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
|
||||
$query->execute(array(':userid' => $postUserid));
|
||||
|
||||
@@ -38,8 +30,6 @@ if (safetext(isset($_POST['code'])) && safetext(isset($_POST['userid'])) && safe
|
||||
if($result2["loginid"] === $loginid){
|
||||
if($result2["admin"] === "yes"){
|
||||
try {
|
||||
$pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS);
|
||||
|
||||
// 削除クエリを実行
|
||||
$deleteQuery = $pdo->prepare("DELETE FROM invitation WHERE code = :code");
|
||||
$deleteQuery->bindValue(':code', $postCode, PDO::PARAM_STR);
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
require('../../db.php');
|
||||
require("../../function/function.php");
|
||||
|
||||
header("Content-Type: application/json");
|
||||
header("charset=utf-8");
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
|
||||
if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['account_id'])){
|
||||
@@ -22,14 +21,7 @@ if (isset($_FILES['update_zip']) && isset($_POST['userid']) && isset($_POST['acc
|
||||
$error_message[] = $e->getMessage();
|
||||
}
|
||||
|
||||
// データベース接続の設定
|
||||
$dbh = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST, DB_USER, DB_PASS, array(
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
|
||||
));
|
||||
|
||||
$query = $dbh->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
$query = $pdo->prepare('SELECT * FROM account WHERE userid = :userid limit 1');
|
||||
|
||||
$query->execute(array(':userid' => $postUserid));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user