phbmedal.html 3.41 KB
{template 'common/header'}
{template 'common'}
<ul class="nav nav-tabs">
		<li><a href="{php echo $this->createWebUrl('fansmanager');}">代理</a></li>
	<li ><a href="{php echo $this->createWebUrl('fansmanager', array('op'=>'nocheck'));}">非代理</a></li>

	<li {if $operation == 'post'}class="active"{/if}><a href="{php echo $this->createWebUrl('phbmedal', array('op' => 'post'))}">{if !empty($phbmedal['id'])}编辑 {else} 添加{/if}粉丝排行头衔</a></li>
	<li {if $operation == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('phbmedal', array('op' => 'display'))}">管理粉丝排行头衔</a></li>
</ul>
{if $operation == 'post'}
<div class="main">

<div class="panel panel-info">
	<div class="panel-heading">粉丝排行头衔详细设置</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
		<input type="hidden" name="id" value="{$phbmedal['id']}" />
		<input type="hidden" name="c" value="site" />
		<input type="hidden" name="a" value="entry" />
		<input type="hidden" name="m" value="wwx_fxxt" />
		<input type="hidden" name="do" value="phbmedal" />
		<input type="hidden" name="op" value="post" />

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>头衔名称:</label>
	<div class="col-sm-4 col-xs-12">
<input type="text" name="medal_name" class="form-control" value="{$phbmedal['medal_name']}" />
	</div>
</div>
			 

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label">所需粉丝数:</label>
	<div class="col-sm-4 col-xs-4">
<input type="text" name="fans_count" class="form-control" value="{$phbmedal['fans_count']}" />
	</div>
</div>


<div class="form-group col-sm-12">
					<input name="submit" type="submit" value="提交" class="btn btn-primary span3">
					<input type="hidden" name="token" value="{$_W['token']}" />
</div>

		</form>
	</div>
</div>



</div>

{elseif $operation == 'display'}
<div class="main">
<div class="panel panel-info">
	<div class="panel-heading">粉丝排行头衔详细设置</div>
	<div class="panel-body">
		<form action="" method="post" onsubmit="return formcheck(this)">
		<table class="table table-hover">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:200px;">头衔名称</th>
					<th style="width:90px;">所需粉丝数</th>
					<th style="width:80px;">操作</th>
				</tr>
			</thead>
			<tbody>
			{loop $list $row}
				<tr>
							<td></td>
					<td>{$row['medal_name']}</td>
          	<td>{$row['fans_count']}</td>                            
          <td><a href="{php echo $this->createWebUrl('phbmedal', array('op' => 'post', 'id' => $row['id']))}">编辑</a>&nbsp;&nbsp;<a href="{php echo $this->createWebUrl('phbmedal', array('op' => 'delete', 'id' => $row['id']))}" onclick="return confirm('确认删除此头衔吗?');return false;">删除</a></td>
							
				</tr>
			
			{/loop}
				<tr>
					<td></td>
					<td colspan="4">
						<a href="{php echo $this->createWebUrl('phbmedal', array('op' => 'post'))}"><i class="fa fa-plus-square"></i> 添加新头衔</a>
					</td>
				</tr>
				<tr>
					<td></td>
					<td colspan="4">
						<input name="submit" type="submit" class="btn btn-primary" value="提交">
						<input type="hidden" name="token" value="{$_W['token']}" />
					</td>
				</tr>
			</tbody>
		</table>
		</form>
	</div>
</div>
</div>
{/if}
{template 'common/footer'}