0, 'path' => '/', 'domain' => '', 'secure' => true, 'httponly' => true, 'samesite' => 'Lax' ]); session_start(); session_regenerate_id(true); try { $option = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_MULTI_STATEMENTS => false ); $pdo = new PDO('mysql:charset=utf8mb4;dbname='.DB_NAME.';host='.DB_HOST , DB_USER, DB_PASS, $option); } catch(PDOException $e) { // 接続エラーのときエラー内容を取得する $error_message[] = $e->getMessage(); } //ログイン認証--------------------------------------------------- blockedIP($_SERVER['REMOTE_ADDR']); $is_login = uwuzuUserLogin($_SESSION, $_COOKIE, $_SERVER['REMOTE_ADDR'], "user"); if($is_login === false){ header("Location: ../index.php"); exit; }else{ $userid = safetext($is_login['userid']); $username = safetext($is_login['username']); $loginid = safetext($is_login["loginid"]); $role = safetext($is_login["role"]); $sacinfo = safetext($is_login["sacinfo"]); $myblocklist = safetext($is_login["blocklist"]); $myfollowlist = safetext($is_login["follow"]); $is_Admin = safetext($is_login["admin"]); } if (!(empty($pdo))) { $notiQuery = $pdo->prepare("SELECT COUNT(*) as notification_count FROM notification WHERE touserid = :userid AND userchk = 'none'"); $notiQuery->bindValue(':userid', $userid); $notiQuery->execute(); $notiData = $notiQuery->fetch(PDO::FETCH_ASSOC); $notificationcount = $notiData['notification_count']; if(isset($_GET['ueuseid'])) { $ueuseid = safetext(str_replace('!', '', $_GET['ueuseid'])); } } //返信先id取得 if (!(empty($pdo))) { $toUserIdQuery = $pdo->prepare("SELECT account FROM ueuse WHERE uniqid = :ueuseid ORDER BY datetime ASC LIMIT 1"); $toUserIdQuery->bindValue(':ueuseid', $ueuseid, PDO::PARAM_STR); $toUserIdQuery->execute(); $toUserId_res = $toUserIdQuery->fetch(); if(!(empty($toUserId_res))){ $touserid = $toUserId_res["account"]; }else{ $touserid = null; } } //-----------------URLから取得---------------- if(isset($_GET['text'])) { $ueuse = safetext(urldecode($_GET['text'])); }elseif(isset($_COOKIE['ueuse'])) { $ueuse = safetext($_COOKIE['ueuse']); } if( !empty($_POST['logout']) ) { if (isset($_SERVER['HTTP_COOKIE'])) { $cookies = explode(';', $_SERVER['HTTP_COOKIE']); foreach($cookies as $cookie) { $parts = explode('=', $cookie); $name = trim($parts[0]); setcookie($name, '', time()-1000); setcookie($name, '', time()-1000, '/'); } } // リダイレクト先のURLへ転送する $url = '../index.php'; header('Location: ' . $url, true, 303); // すべての出力を終了 exit; } // データベースの接続を閉じる $pdo = null; ?> ID <?php echo safetext($ueuseid); ?> のユーズ - <?php echo safetext($serversettings["serverinfo"]["server_name"]);?>

@さんに返信

ユーズ