<?php if(!$this->tpl_var['userhash']){ ?>
<?php $this->_compileInclude('header'); ?>
<body>
<?php $this->_compileInclude('nav'); ?>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2">
			<?php $this->_compileInclude('menu'); ?>
		</div>
		<div class="span10" id="datacontent">
<?php } ?>
			<ul class="breadcrumb">
				<li><a href="index.php?<?php echo $this->tpl_var['_app']; ?>-master"><?php echo $this->tpl_var['apps'][$this->tpl_var['_app']]['appname']; ?></a> <span class="divider">/</span></li>
				<li class="active">订单管理</li>
			</ul>
			<ul class="nav nav-tabs">
				<li class="active">
					<a href="#">订单列表</a>
				</li>
			</ul>
			<form action="index.php?bank-master-orders-batremove" method="post">
				<fieldset>
					<table class="table table-hover">
						<thead>
							<tr>
								<th><input type="checkbox" class="checkall" target="delids"/></th>
								<th>订单号</th>
								<th>订单客户</th>
								<th>充值金额</th>
								<th>下单时间</th>
								<th>订单状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<?php $oid = 0;
 foreach($this->tpl_var['orders']['data'] as $key => $order){ 
 $oid++; ?>
							<tr>
								<td><input type="checkbox" name="delids[<?php echo $order['ordersn']; ?>]" value="1"></td>
								<td><?php echo $order['ordersn']; ?></td>
								<td><?php echo $order['orderuserinfo']['username']; ?></td>
								<td><?php echo $order['orderprice']; ?></td>
								<td><?php echo date('Y-m-d',$order['ordercreatetime']); ?></td>
								<td>
						        	<div class="dropdown">
							        	<a class="dropdown-toggle" href="#" data-toggle="dropdown"><?php echo $this->tpl_var['orderstatus'][$order['orderstatus']]; ?><strong class="caret"></strong></a>
							        	<ul class="dropdown-menu">
								        	<li><a href="javascript:;">更改状态</a></li>
											<li class="divider"></li>
											<?php $oid = 0;
 foreach($this->tpl_var['orderstatus'] as $key => $os){ 
 $oid++; ?>
											<?php if($key > $order['orderstatus']){ ?>
											<li><a class="ajax" href="index.php?<?php echo $this->tpl_var['_app']; ?>-master-orders-change&ordersn=<?php echo $order['ordersn']; ?>&orderstatus=<?php echo $key; ?>&page=<?php echo $this->tpl_var['page']; ?>"><?php echo $os; ?></a></li>
											<?php } ?>
											<?php } ?>
										</ul>
				                    </div>
						        </td>
								<td>
									<div class="btn-group">
										<a class="btn ajax" href="index.php?<?php echo $this->tpl_var['_app']; ?>-master-orders-remove&ordersn=<?php echo $order['ordersn']; ?>&page=<?php echo $this->tpl_var['page']; ?><?php echo $this->tpl_var['u']; ?>" title="删除订单"><em class="icon-remove"></em></a>
									</div>
								</td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
					<div class="control-group">
			            <div class="controls">
				            <label class="radio inline">
				                <input type="radio" name="action" value="delete" checked/>删除
				            </label>
				            <?php $sid = 0;
 foreach($this->tpl_var['search'] as $key => $arg){ 
 $sid++; ?>
				            <input type="hidden" name="search[<?php echo $key; ?>]" value="<?php echo $arg; ?>"/>
				            <?php } ?>
				            <label class="radio inline">
				            	<button class="btn btn-primary" type="submit">提交</button>
				            </label>
				            <input type="hidden" name="page" value="<?php echo $this->tpl_var['page']; ?>"/>
				        </div>
			        </div>
					<div class="pagination pagination-right">
						<ul><?php echo $this->tpl_var['orders']['pages']; ?></ul>
					</div>
				</fieldset>
			</form>
<?php if(!$this->tpl_var['userhash']){ ?>
		</div>
	</div>
</div>
</body>
</html>
<?php } ?>