<?php
session_start();
if (!isset($_SESSION['id'])) {
    header("Location: login.php");
    exit;
}
$servername = "mysql307.phy.lolipop.lan";
$username = "LAA1587578";
$password = "xnnb86r754k5e";
$dbname = "LAA1587578-ttdbsjp";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("データベース接続失敗: " . $conn->connect_error);
}
$user_id = $_SESSION['id'];
$unread_sql = "SELECT COUNT(*) FROM tweet t
               JOIN follows f ON t.user_id = f.followed_id
               WHERE f.follower_id = ? 
               AND t.arrived = 0";
if ($stmt = $conn->prepare($unread_sql)) {
    $stmt->bind_param("s", $user_id);
    $stmt->execute();
    $stmt->bind_result($unread_count);
    $stmt->fetch();
    $stmt->close();
    $notification_icon = "img/bar/off/notification.gif";
    if ($unread_count > 0) {
        $notification_icon = "img/bar/off/notification_on_notices.gif";
    }
}
$id = $_SESSION['id'];
$account_id = isset($_GET['id']) ? $_GET['id'] : $id;
if (defined('DEBUG') && DEBUG) {
    echo "account_id: " . htmlspecialchars($account_id, ENT_QUOTES, 'UTF-8');
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $action = $_POST['action'] ?? '';
    $followed_id = $_POST['followed_id'] ?? null;
    $follower_id = $_SESSION['id'];
    if ($followed_id && $follower_id) {
        if ($action === 'follow') {
            $sql = "INSERT INTO follows (follower_id, followed_id) VALUES (?, ?)";
        } elseif ($action === 'unfollow') {
            $sql = "DELETE FROM follows WHERE follower_id = ? AND followed_id = ?";
        }
        if (isset($sql) && $stmt = $conn->prepare($sql)) {
            $stmt->bind_param("ss", $follower_id, $followed_id);
            if ($stmt->execute()) {
                $is_following = ($action === 'follow');
            } else {
                echo "操作に失敗しました: " . $stmt->error;
            }
            $stmt->close();
        } else {
            echo "ステートメントの準備に失敗しました: " . $conn->error;
        }
    }
}
$id = isset($_GET['id']) ? $_GET['id'] : $_SESSION['id'];
$follower_id = $_SESSION['id'];
$sql_follow_check = "SELECT COUNT(*) FROM follows WHERE follower_id = ? AND followed_id = ?";
if ($stmt_follow_check = $conn->prepare($sql_follow_check)) {
    $stmt_follow_check->bind_param("ss", $follower_id, $id);
    $stmt_follow_check->execute();
    $stmt_follow_check->bind_result($follow_count);
    $stmt_follow_check->fetch();
    $is_following = $follow_count > 0;
    $stmt_follow_check->close();
} else {
    error_log("フォロー状態確認の準備に失敗しました: " . $conn->error);
}
$sql_follower_count = "
    SELECT COUNT(*) 
    FROM follows 
    WHERE followed_id = ? 
    AND follower_id NOT IN (
        SELECT user_id 
        FROM block 
        WHERE blocked_id = ?
    )
";
$stmt_follower = $conn->prepare($sql_follower_count);
$stmt_follower->bind_param("ss", $id, $id);
$stmt_follower->execute();
$stmt_follower->bind_result($follower_count);
$stmt_follower->fetch();
$stmt_follower->close();

$sql_follow_count = "
    SELECT COUNT(*) 
    FROM follows 
    WHERE follower_id = ? 
    AND followed_id NOT IN (
        SELECT blocked_id 
        FROM block 
        WHERE user_id = ?
    )
";
$stmt_follow = $conn->prepare($sql_follow_count);
$stmt_follow->bind_param("ss", $id, $id);
$stmt_follow->execute();
$stmt_follow->bind_result($follow_count);
$stmt_follow->fetch();
$stmt_follow->close();
$name = "未設定";
$introduce = "";
$link = "";
$region = "未設定";
$hide_message = 0;
$is_official = false;
$account_image = "img/app/general/initial-image.gif";
$sql = "SELECT name, introduce, link, region, hide_message, official, account_image FROM account WHERE id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("s", $account_id);
$stmt->execute();
$stmt->bind_result($result_name, $result_introduce, $result_link, $result_region, $result_hide_message, $result_official, $result_account_image);
$stmt->fetch();
$name = $result_name ?: $name;
$introduce = $result_introduce ?: $introduce;
$link = $result_link ?: $link;
$region = $result_region ?: $region;
$hide_message = $result_hide_message !== NULL ? $result_hide_message : $hide_message;
$is_official = $result_official == 1;
$account_image = $result_account_image ?: $account_image;
$stmt->close();
$user_id = $_SESSION['id'];
$logged_in_user_id = $_SESSION['id'];
$display_user_id = $_GET['id'] ?? $logged_in_user_id;
$tweet_sql = "SELECT tweet_text, created_at, arrived FROM tweet WHERE user_id = ? ORDER BY created_at DESC";
if ($tweet_stmt = $conn->prepare($tweet_sql)) {
    $tweet_stmt->bind_param("s", $display_user_id);
    $tweet_stmt->execute();
    $tweet_result = $tweet_stmt->get_result();
    $tweets = $tweet_result->fetch_all(MYSQLI_ASSOC);
    $tweet_stmt->close();
} else {
    echo "<h4 class='error'>SQLエラー: " . htmlspecialchars($conn->error, ENT_QUOTES, 'UTF-8') . "</h4>";
    exit;
}
$account_id = $_GET['id'] ?? $_SESSION['id'];
$sql = "SELECT join_text FROM `join` WHERE user_id = ?";
$joins = [];
if ($stmt = $conn->prepare($sql)) {
    $stmt->bind_param("s", $account_id);
    $stmt->execute();
    $result = $stmt->get_result();
    while ($row = $result->fetch_assoc()) {
        $joins[] = $row['join_text'];
    }
    $stmt->close();
} else {
    echo "<h4 class='error'>SQLエラー: " . htmlspecialchars($conn->error, ENT_QUOTES, 'UTF-8') . "</h4>";
}
$sql_disponse = "SELECT text, image, url, tag FROM disponse WHERE id = ? ORDER BY created_at DESC";
$stmt_disponse = $conn->prepare($sql_disponse);
$stmt_disponse->bind_param("s", $account_id);
$stmt_disponse->execute();
$stmt_disponse->bind_result($text, $image, $url, $tag);
$disponse_data = [];
while ($stmt_disponse->fetch()) {
    $disponse_data[] = ['text' => $text, 'image' => $image, 'url' => $url, 'tag' => $tag];
}
$stmt_disponse->close();
$tweet_sql = "SELECT tweet_text, created_at, arrived FROM tweet WHERE user_id = ? ORDER BY created_at DESC";
if ($tweet_stmt = $conn->prepare($tweet_sql)) {
    $tweet_stmt->bind_param("s", $display_user_id);
    $tweet_stmt->execute();
    $tweet_result = $tweet_stmt->get_result();
    $tweets = $tweet_result->fetch_all(MYSQLI_ASSOC);
    $tweet_stmt->close();
} else {
    echo "<h4 class='error'>SQLエラー: " . htmlspecialchars($conn->error, ENT_QUOTES, 'UTF-8') . "</h4>";
    exit;
}
$sql_audio = "SELECT audio_title, audio_artist, audio_image, audio_file FROM audio WHERE id = ?";
$stmt_audio = $conn->prepare($sql_audio);
$stmt_audio->bind_param("s", $account_id);
$stmt_audio->execute();
$stmt_audio->bind_result($audio_title, $audio_artist, $audio_image, $audio_file);
$audios = [];
$audio_exists = false;
while ($stmt_audio->fetch()) {
    $audios[] = ['title' => $audio_title, 'artist' => $audio_artist, 'image' => $audio_image, 'file' => $audio_file];
    $audio_exists = true;
}
$stmt_audio->close();
$sql_sns = "SELECT youtube_url, x_url, instagram_url, tiktok_url, soundcloud_url, discord_url 
            FROM `add` WHERE user_id = ?";
$youtube_url = $x_url = $instagram_url = $tiktok_url = $soundcloud_url = $discord_url = '';

if ($stmt = $conn->prepare($sql_sns)) {
    $stmt->bind_param("s", $account_id);
    $stmt->execute();
    $stmt->bind_result($youtube_url, $x_url, $instagram_url, $tiktok_url, $soundcloud_url, $discord_url);
    $stmt->fetch();
    $stmt->close();
} else {
    echo "<h4 class='error'>SQLエラー: " . htmlspecialchars($conn->error, ENT_QUOTES, 'UTF-8') . "</h4>";
}
$user_id = $_SESSION['id'];
$sql = "SELECT genre_name FROM genres WHERE user_id = ?";
if ($stmt = $conn->prepare($sql)) {
    $stmt->bind_param("s", $user_id);
    $stmt->execute();
    $result = $stmt->get_result();
    $genres = [];
    while ($row = $result->fetch_assoc()) {
        $genres[] = htmlspecialchars($row['genre_name'], ENT_QUOTES, 'UTF-8');
    }
    $stmt->close();
} else {
    echo "<p>エラー: ステートメントの準備に失敗しました: " . htmlspecialchars($conn->error, ENT_QUOTES, 'UTF-8') . "</p>";
}
$is_own_account = ($account_id === $_SESSION['id']);
$show_follow_button = !$is_own_account;
$user_id = $_SESSION['id'];
$sql = "SELECT COUNT(*) FROM message WHERE receiver_id = ? AND is_read = 0";
$stmt = $conn->prepare($sql);
$stmt->bind_param("s", $user_id);
$stmt->execute();
$stmt->bind_result($unread_count);
$stmt->fetch();
$stmt->close();
$display_arrived = ($unread_count > 0) ? 'block' : 'none';
$conn->close();
?>
<!DOCTYPE html>
<html lang="ja">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
    <title><?php echo htmlspecialchars($name); ?></title>
    <meta name="description" content="">
    <meta name="robots" content="nonsippet">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="frame.css">
    <link rel="stylesheet" href="css/account.css">
    <link rel="stylesheet" href="css/hosts.css">
    <link rel="stylesheet" href="css/audio.css">
    <link rel="icon" href="favicon.ico" id="favicon">
    <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link
        href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
        rel="stylesheet">
</head>

<body>
    <div class="header">
        <button class="back" onclick="goBack()">
            <img src="img/app/general/back.gif" alt="戻る">
        </button>
        <script>
            function goBack() {
                window.history.back();
            }
        </script>
        <div class="list">
            <a href="follower.php?id=<?php echo htmlspecialchars($id); ?>">
                <img src="img/app/account/follower.gif" alt="フォロワー数">
                <?php echo htmlspecialchars($follower_count); ?>
            </a>
            <a href="follow.php?id=<?php echo htmlspecialchars($id); ?>">
                <img src="img/app/account/follow.gif" alt="フォロー数">
                <?php echo htmlspecialchars($follow_count); ?>
            </a>
        </div>
    </div>
    <br>
    <br>
    <div style="display: flex; justify-content: center;">
        <div class="table">
            <nav>
                <ul>
                    <li>
                        <a href="https://timestrimming.com/index">
                            <img src="img/bar/off/home.gif" alt="ホーム">
                        </a>
                    </li>
                    <li>
                        <a href="https://timestrimming.com/search">
                            <img src="img/bar/off/search.gif" alt="検索..">
                        </a>
                    </li>
                    <li>
                        <a href="https://timestrimming.com/notices_notification">
                            <img src="img/bar/off/notification.gif" alt="通知">
                        </a>
                    </li>
                    <li>
                        <a href="https://timestrimming.com/account">
                            <img src="img/bar/on/account.gif" alt="アカウント">
                        </a>
                    </li>
                    <li>
                        <a href="https://timestrimming.com/library">
                            <img src="img/bar/off/library.gif" alt="ライブラリ">
                        </a>
                    </li>
                    <li>
                        <a href="https://timestrimming.com/messages">
                            <img src="img/bar/off/message.gif" alt="メッセージ">
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="home">
            <div class="user">
                <h2>
                    <img src="<?php echo htmlspecialchars($account_image); ?>" alt="プロフィール画像">
                </h2>
                <span>
                    <h1>
                        <?php echo htmlspecialchars($name); ?>
                        <p>
                            <img src="img/app/general/official.gif" alt="オフィシャル"
                                style="<?php echo $is_official ? '' : 'display: none;'; ?>">
                        </p>
                    </h1>
                </span>
            </div>
            <div class="detail">
                <h3 style="<?php echo $introduce ? 'display: block;' : 'display: none;'; ?>">
                    <?php echo htmlspecialchars($introduce); ?>
                </h3>
                <div class="space-between" style="margin-bottom: 6px;">
                    <div class="flex-end">
                        <?php if ($id !== $_SESSION['id']): ?>
                            <form method="POST" action="">
                                <input type="hidden" name="followed_id" value="<?php echo htmlspecialchars($id); ?>">
                                <?php if ($is_following): ?>
                                    <button type="submit" name="action" value="unfollow">フォロー解除</button>
                                <?php else: ?>
                                    <button type="submit" name="action" value="follow">フォロー</button>
                                <?php endif; ?>
                            </form>
                        <?php endif; ?>
                        <?php if (empty($hide_message) && $id !== $_SESSION['id']): ?>
                            <h4 onclick="window.location.href='message.php?id=<?php echo urlencode($id); ?>';">
                                <img src="img/app/general/send.gif" alt="メッセージ">
                            </h4>
                        <?php endif; ?>
                        <?php if (!$is_own_account): ?>
                            <a href="blocking.php?user_id=<?php echo $account_id; ?>">
                                <img src="img/app/general/option.gif" alt="ブロック">
                            </a>
                        <?php endif; ?>
                    </div>
                    <div class="flex-end">
                        <h5>
                            <img src="img/app/account/region.gif" alt="地域">
                            <?php echo htmlspecialchars($region, ENT_QUOTES, 'UTF-8'); ?>
                        </h5>
                        <a href="settings.php">
                            <img src="img/app/account/settings.gif" alt="設定">
                        </a>
                    </div>
                </div>
            </div>
            <div class="space-between">
                <div class="invisible"></div>
                <div class="flex-end">
                    <?php
                    $displayLink = preg_replace('/^https:\/\//i', '', $link);
                    ?>
                    <a href="<?php echo htmlspecialchars($link); ?>" class="link" target="_blank"
                        style="<?php echo empty($link) ? 'display: none;' : ''; ?>">
                        <img src="img/app/account/link.gif" alt="リンク">
                        <?php echo htmlspecialchars($displayLink); ?>
                    </a>
                </div>
            </div>
            <br>
            <div class="flex-box">
                <a href="" class="on">
                    ステータス
                </a>
                <a href="commented.php?user_id=<?php echo $account_id; ?>" class="off">
                    レコメント中
                </a>
            </div>
            <?php if ($audio_exists): ?>
                <p class="container">
                    <?php foreach ($audios as $audio): ?>
                    <div class="player">
                        <div class="info">
                            <img src="<?php echo htmlspecialchars($audio['image']); ?>" alt="ジャケット画像">
                            <span>
                                <p class="title"><?php echo htmlspecialchars($audio['title']); ?></p>
                                <p class="artist"><?php echo htmlspecialchars($audio['artist']); ?></p>
                            </span>
                        </div>
                        <div class="controls">
                            <button id="playPause">
                                <img id="playPauseIcon" src="img/app/audio/play.gif" alt="Play/Pause">
                            </button>
                            <div class="progress-bar" id="progressBar">
                                <div class="progress" id="progress"></div>
                            </div>
                            <p class="time" id="currentTime">0:00</p>
                            <div class="volume">
                                <input type="range" id="volume" min="0" max="1" step="0.01">
                            </div>
                        </div>
                    </div>
                    <audio id="audio" src="<?php echo htmlspecialchars($audio['file']); ?>"></audio>
                <?php endforeach; ?>
                </p>
            <?php endif; ?>
            <script src="script/audio.js"></script>
            <p class="container">
                <?php if (!empty($text) || !empty($image) || !empty($url) || !empty($tag)): ?>
                <div class="host">
                    <h2>
                        <img src="<?php echo htmlspecialchars($account_image); ?>" alt="プロフィール画像">
                        <?php echo htmlspecialchars($name); ?>
                        <p>
                            <img src="img/app/general/official.gif" alt="オフィシャル"
                                style="<?php echo $is_official ? '' : 'display: none;'; ?>">
                        </p>
                    </h2>
                    <h3>
                        <img src="img/app/general/id.gif" alt="ID">
                        <?php echo htmlspecialchars($id); ?>
                    </h3>
                    <h4>
                        Host
                    </h4>
                </div>
                <h2 class="text">
                    <?php echo htmlspecialchars($text); ?>
                </h2>
                <?php if (!empty($image)): ?>
                    <h3 class="image">
                        <img src="<?php echo htmlspecialchars($image); ?>" alt="コンテンツ画像">
                    </h3>
                <?php endif; ?>
                <?php if (!empty($url)): ?>
                    <?php
                    $display_url = preg_replace('/^https?:\/\//', '', htmlspecialchars($url));
                    ?>
                    <a href="<?php echo htmlspecialchars($url); ?>" class="url" target="_blank">
                        <h2>
                            <img src="img/app/general/favicon.gif" alt="ファビコン">
                        </h2>
                        <span>
                            <h3>
                                <?php echo $display_url; ?>
                            </h3>
                        </span>
                    </a>
                <?php endif; ?>
                <div class="status">
                    <h4>
                        <?php echo htmlspecialchars($tag); ?>
                    </h4>
                    <a href="comment.php?post_id=<?php echo htmlspecialchars($id); ?>">
                        <img src="img/app/general/comment-off.gif" alt="コメント">
                    </a>
                </div>
                <div class="space-between">
                    <a href="comment.php?post_id=<?php echo htmlspecialchars($id); ?>" class="commenting">
                        <img src="img/app/general/actives.gif" alt="コメント">
                        コメント ...
                    </a>
                    <div class="flex-end">
                        <h3 class="comment-count">
                            <img src="img/app/general/comment-count.gif" alt="コメントカウント">
                            <p>
                                参加
                            </p>
                        </h3>
                    </div>
                </div>
            <?php endif; ?>
            </p>
            <?php foreach ($joins as $join): ?>
                <p class="container">
                <div class="here">
                    <img src="<?php echo htmlspecialchars($account_image, ENT_QUOTES, 'UTF-8'); ?>" alt="プロフィール画像">
                    <h2>
                        <?php echo htmlspecialchars($join, ENT_QUOTES, 'UTF-8'); ?>
                    </h2>
                    <?php if (empty($hide_message) && $account_id !== $_SESSION['id']): ?>
                        <a onclick="window.location.href='message.php?id=<?php echo urlencode($account_id); ?>';">
                            参加
                            <img src="img/app/general/send.gif" alt="メッセージ">
                        </a>
                    <?php endif; ?>
                </div>
                </p>
            <?php endforeach; ?>
            <?php foreach ($tweets as $tweet): ?>
                <p class="container">
                <div class="tweeted">
                    <img src="<?php echo htmlspecialchars($account_image); ?>" alt="プロフィール画像">
                    <h2>
                        <?php echo htmlspecialchars($tweet['tweet_text'], ENT_QUOTES, 'UTF-8'); ?>
                    </h2>
                </div>
                <div class="space-between">
                    <div class="invisible"></div>
                    <div class="flex-end">
                        <div class="tweeted">
                            <h3>
                                <img src="img/app/general/data.gif" alt="投稿日時">
                                <?php echo date('m.d', strtotime($tweet['created_at'])); ?>
                                <p>
                                    <?php
                                    $tweet_created_at = strtotime($tweet['created_at']);
                                    $current_time = time();
                                    $one_day_in_seconds = 24 * 60 * 60;
                                    $show_new_icon = ($tweet['arrived'] && ($current_time - $tweet_created_at) <= $one_day_in_seconds);
                                    $show_new_icon = $show_new_icon || ($current_time - $tweet_created_at <= $one_day_in_seconds);
                                    echo '<img src="img/app/general/arrived.gif" alt="新着" style="display: ' . ($show_new_icon ? 'block' : 'none') . ';">';
                                    ?>
                                </p>
                            </h3>
                        </div>
                        <h4 class="tweet">
                            <img src="img/app/general/actives.gif" alt="お知らせ">
                            お知らせ
                        </h4>
                    </div>
                </div>
                </p>
            <?php endforeach; ?>
            <p class="container">
            <div class="add">
                <?php if (!empty($youtube_url)): ?>
                    <a href="<?php echo htmlspecialchars($youtube_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/youtube.gif" alt="YouTube">
                    </a>
                <?php endif; ?>
                <?php if (!empty($x_url)): ?>
                    <a href="<?php echo htmlspecialchars($x_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/x.gif" alt="X">
                    </a>
                <?php endif; ?>
                <?php if (!empty($instagram_url)): ?>
                    <a href="<?php echo htmlspecialchars($instagram_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/instagram.gif" alt="Instagram">
                    </a>
                <?php endif; ?>
                <?php if (!empty($tiktok_url)): ?>
                    <a href="<?php echo htmlspecialchars($tiktok_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/tiktok.gif" alt="TikTok">
                    </a>
                <?php endif; ?>
                <?php if (!empty($soundcloud_url)): ?>
                    <a href="<?php echo htmlspecialchars($soundcloud_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/soundcloud.gif" alt="SoundCloud">
                    </a>
                <?php endif; ?>
                <?php if (!empty($discord_url)): ?>
                    <a href="<?php echo htmlspecialchars($discord_url, ENT_QUOTES, 'UTF-8'); ?>" target="_blank">
                        <img src="img/app/general/discord.gif" alt="Discord">
                    </a>
                <?php endif; ?>
            </div>
            </p>
            <p class="container">
            <div class="genres">
                <img src="img/app/general/hashtag.gif" alt="">
                <?php
                if (!empty($genres)) {
                    echo implode(', ', $genres);
                } else {
                    echo '未設定';
                }
                ?>
            </div>
            </p>
            <style>
                .genres {
                    font-size: 11px;
                    font-weight: 600;
                    background-color: #f5f5f5;
                    border-radius: 100px;
                    padding: 11px 24px;
                    margin: auto 16px;
                    text-align: center;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }

                .genres img {
                    width: 16px;
                    height: 16px;
                }
            </style>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <div class="bottom">
                <h2>
                    <img src="img/icon.gif" alt="アイコン">
                    タイムズトリミング
                </h2>
                <h2 id="year"></h2>
                <script>
                    document.getElementById('year').textContent = new Date().getFullYear();
                </script>
                <h3>
                    Copyright All Rights Reserved.
                </h3>
            </div>
            <br>
            <br>
            <a href="messages.php" class="message">
                <img src="img/app/general/message.gif" alt="メッセージ">
                <?php if ($unread_count > 0): ?>
                    <div class="arrived"></div>
                <?php endif; ?>
            </a>
            <nav class="menu">
                <ul class="bar">
                    <li><a href="https://timestrimming.com/index"><img src="img/bar/off/home.gif" alt="ホーム"></a></li>
                    <li><a href="https://timestrimming.com/search"><img src="img/bar/off/search.gif" alt="検索.."></a>
                    </li>
                    <li><a href="https://timestrimming.com/notices_notification">
                            <img src="<?php echo $notification_icon; ?>" alt="通知">
                        </a></li>
                    <li><a href="https://timestrimming.com/account"><img src="img/bar/on/account.gif" alt="アカウント"></a>
                    </li>
                    <li><a href="https://timestrimming.com/library"><img src="img/bar/off/library.gif" alt="ライブラリ"></a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</body>

</html>