<?php
/**
 * HuSNS - 添加圈子后台页面
 */
?>
<div class="admin-page">
    <div class="page-header">
        <h2>添加圈子</h2>
        <a href="<?php echo Helper::url('admin/circles'); ?>" class="btn">返回列表</a>
    </div>
    
    <?php if ($this->hasFlash('success')): ?>
    <div class="alert alert-success"><?php echo $this->flash('success'); ?></div>
    <?php endif; ?>
    
    <?php if ($this->hasFlash('error')): ?>
    <div class="alert alert-error"><?php echo $this->flash('error'); ?></div>
    <?php endif; ?>
    
    <form method="post" enctype="multipart/form-data">
        <input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?? ''; ?>">
        
        <div class="form-group">
            <label>圈子名称 *</label>
            <input type="text" name="name" required placeholder="请输入圈子名称">
        </div>
        
        <div class="form-group">
            <label>圈子描述</label>
            <textarea name="description" rows="4" placeholder="请输入圈子描述"></textarea>
        </div>
        
        <div class="form-group">
            <label>圈子头像</label>
            <input type="file" name="avatar" accept="image/*">
            <p style="color: #999; font-size: 12px;">支持 JPG、PNG 格式，建议尺寸 100x100</p>
        </div>
        
        <div class="form-group">
            <label>圈子横幅</label>
            <input type="file" name="banner" accept="image/*">
            <p style="color: #999; font-size: 12px;">支持 JPG、PNG 格式，建议尺寸 800x200</p>
        </div>
        
        <div class="form-group">
            <label>圈子类型</label>
            <label>
                <input type="radio" name="is_private" value="0" checked> 公开圈子
            </label>
            <label>
                <input type="radio" name="is_private" value="1"> 私密圈子
            </label>
        </div>
        
        <div style="margin-top: 20px;">
            <button type="submit" class="btn btn-primary">创建圈子</button>
            <a href="<?php echo Helper::url('admin/circles'); ?>" class="btn">取消</a>
        </div>
    </form>
</div>