bibis/view/setting.php

22 行
1.4 KiB
PHP

<?php
// Settings form
?>
<h2>設定(ユーザー情報変更)・Settings</h2>
<p>パスワード変更を希望しない場合、新パスワードの欄を空にしてください。</p>
<form action="<?= sitebase('setting/') ?>" method="POST">
<ul>
<li><label for="NAME">名前(最大50文字)・Nickname (50)</label> <input id="NAME" type="text" name="username" value="<?= htmlspecialchars($_SESSION['user']['username_raw'] ?? '') ?>">
<li><label for="BIO">自己紹介(最大1000文字)・Bio (1000)</label> <textarea id="BIO" type="text" name="bio" rows="5" cols="40"><?= $view['bio'] ?></textarea>
<li><label for="PASS">新パスワード・New password</label> <input id="PASS" type="password" name="password">
<li><label for="PASS2">新パスワード(確認用)・New password (confirm)</label> <input id="PASS2" type="password" name="password2">
<?php if (($_SESSION['user']['trip'] ?? '') === ''): ?>
<li><label for="TRIP">2chトリップキー(先頭に「#」不要)</label> <input id="TRIP" type="text" name="tripkey"><br>
BIBISのインスタンスが増えた時になりすましを防ぎます。自分だけの合言葉を入力してください。
<?php else: ?>
<li><b>2chトリップ</b>:<?= htmlspecialchars($_SESSION['user']['trip']) ?>
<li><label><input type="checkbox" name="notrip" value="1">トリップの設定を解除</label>
<?php endif; ?>
<li class="form-li-submit"><button type="submit">変更</button>
</ul>
</form>