<h2>表情管理</h2>
<div class="form">
	<fieldset>
    	<legend>使用帮助</legend>
		* 添加表情组:请先在你的图片目录下images/bbs/smile/建立相应的目录
		<br/>
        * 添加表情:一个表情组下所有的表情图片都要上传至该表情组的文件夹下才可以进行添加
        <br/>
        * 表情名称:当鼠标悬停时将出现该表情的介绍
	</fieldset>
</div>

<?php echo CHtml::beginForm();?>
<div class="form">
	<fieldset>
		<legend>表情管理</legend>
		<table>
		<thead>
			<tr>
				<th>顺序</th>
				<th>表情组名称</th>
				<th>图片路径</th>
				<th>操作</th>
			</tr>
		</thead>
		<?php if (!empty($category)):?>
		<tbody>
			<?php foreach ($category as $value):?>
				<tr>
					<td><?php echo CHtml::textField('smile['.$value->id.'][displayorder]',$value->displayorder,array('size'=>4));?></td>
					<td><?php echo CHtml::textField('smile['.$value->id.'][name]',$value->name);?></td>
					<td><?php echo CHtml::textField('smile['.$value->id.'][path]',$value->path);?></td>
					<td> [<?php echo CHtml::link('分类表情管理',array('/admin/smiles/list','id'=>$value->id));?>][<?php echo CHtml::link('删除此表情分类',array('/admin/smiles/delete','id'=>$value->id), array('confirm'=>'确定要删除吗？'));?>] </td>
				</tr>
			<?php endforeach;?>
		</tbody>
		<?php endif;?>
		</table>
		<?php echo CHtml::submitButton('提交');?>
	</fieldset>
</div>
<?php echo CHtml::endForm();?>

<?php echo CHtml::beginForm(array('/admin/smiles/addcategory'));?>
<div class="form">
	<fieldset>
		<legend>添加表情组</legend>
		<table>
		<thead>
			<tr>
				<th>顺序</th>
				<th>表情组名称</th>
				<th>图片路径</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><?php echo CHtml::textField('smile[displayorder]',0,array('size'=>4));?></td>
				<td><?php echo CHtml::textField('smile[name]');?></td>
				<td><?php echo CHtml::textField('smile[path]');?></td>
			</tr>
		</tbody>
		</table>
		<?php echo CHtml::submitButton('提交');?>
	</fieldset>
</div>
<?php echo CHtml::endForm();?>