<?php /** @var string $error */ /** @var string $ok */ ?>
<div class="page-head">
    <div><h1>修改密码</h1><div class="desc">修改当前登录账号（<?php echo e($_SESSION['admin_name'] ?? ''); ?>）的密码</div></div>
</div>
<?php if ($error): ?><div class="alert alert-err"><?php echo e($error); ?></div><?php endif; ?>
<?php if ($ok): ?><div class="alert alert-ok"><?php echo e($ok); ?></div><?php endif; ?>
<div class="admin-card" style="max-width:480px">
    <form method="post" action="<?php echo site_url('admin/password'); ?>">
        <?php echo csrf_field(); ?>
        <div class="field"><label>当前密码</label><input type="password" name="current_password" required></div>
        <div class="field"><label>新密码（至少 6 位）</label><input type="password" name="new_password" required></div>
        <div class="field"><label>确认新密码</label><input type="password" name="confirm_password" required></div>
        <div class="form-actions">
            <button class="btn-primary" type="submit">保存修改</button>
        </div>
    </form>
</div>
