融合导航和显示数据页面。
载入数据Top页面:
表单中指定target,直接载入表单内容,表单通过action,数据提交到后台进行处理,再渲染回表格数据。
<form action="./index.php?r=backweb/brand/brand" method="post" name="fm" id="fm" target="iframe1">
同个页面加入下面语句,直接载入数据:
<iframe id="iframe1" name="iframe1" οnlοad="this.height=iframe1.document.body.scrollHeight+20" frameborder="0" marginheight="100" marginwidth="0" width="100%" scrolling="no" ></iframe>
<div >
<form action="./index.php?r=backweb/brand/sort" method="post" id="f">
<?php foreach ($infos as $v) {?>
<input type="hidden" name="brand_id[]" value="<?php echo $v['brand_id']; ?>" id="h" />
<?php }?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
<tr>
<th width="80">编号</th>
<th width="80">品牌名</th>
<th width="200">品牌网站</th>
<th width="400">品牌介绍</th>
<th width="80">所属分类</th>
<th width="200">操作</th>
<th width="80">是否可用</th>
<th><input type="submit" name="send" value="排序" style="width:50px;height:25px;" id="submit" /></th>
</tr>
<?php foreach ($infos as $v) {?>
<tr class="tr">
<td class="td_center"><?php echo $v[brand_id]; ?></td>
<td class="td_center"><?php echo $v['brand_name']; ?></td>
<td class="td_center"><a href="<?php echo $v['brand_url']; ?>" style="text-decoration:underline;" ><?php echo $v['brand_url']; ?></a></td>
<td class="td_center"><?php echo $v['brand_info']; ?></td>
<td class="td_center"><a href="./index.php?r=backweb/brand/brand&category_id=<?php echo $v['category_id']; ?>"><?php echo $info[$v['category_id']]; ?></a></td>
<td class="td_center"><span><a href="./index.php?r=backweb/brand/brandupd&brand_id=<?php echo $v['brand_id']; ?>">修改</a>|<a href="./index.php?r=backweb/brand/branddel&brand_id=<?php echo $v['brand_id']; ?>">删除</a></span></td>
<td class="td_center" id="active" ><a href="./index.php?r=backweb/brand/active&brand_id=<?php echo $v['brand_id']; ?>&active_id=<?php echo $v['active'];?>"><?php echo $active[$v['active']]; ?></a></td>
<td class="td_center" ><input type="text" name="sort[]" value="<?php echo $v['brand_sort']; ?>" style="width:40px;text-align:center;" /></td></tr>
</tr>
<?php }?>
</table>
</form>
<div class="page" style="text-align: center;margin-top: 5px">
<div class="pagination">
<ul>
<li class="first-child"><?php echo $page_list[0];?></li>
<li class="disabled" ><?php echo $page_list[1];?></li>
<li class="active"><?php echo $page_list[2];?></li>
<li><?php echo $page_list[3];?></li>
<li><?php echo $page_list[4];?></li>
</ul>
</div>
</div>
</div>