首页 > 五指CMS > 正文

五指cms 排序的实现
2014-11-26 21:23:13   来源:   评论:0 点击:

<?php defined(& 39;IN_WZ& 39;) or exit(& 39;No direct script access allowed& 39;);?><?phpinclude $this->template(& 39;header& 39;,& 39;core& 39;);?><body><section class="wrapper">
<?php defined('IN_WZ') or exit('No direct script access allowed');?>
<?php
include $this->template('header','core');
?>
<body>

<section class="wrapper">
    <!-- page start-->
    <div class="row">
        <div class="col-lg-12">

<form name="myform" action="?m=content&f=block&v=html<?php echo $this->su();?>" method="post">
            <section class="panel">
                <?php echo $this->menu($GLOBALS['_menuid']);?>

                <div class="panel-body" id="panel-bodys">
                    <table class="table table-striped table-advance table-hover">
                        <thead>
                        <tr>
                            <th class="tablehead">选择</th>
                            <th class="hidden-phone tablehead">ID</th>
                            <th class="tablehead">名称</th>
                            <th class="tablehead">ssi调用代码 <a href="http://www.wuzhicms.com/help-block-ssi.html" target="_blank"><i class="icon-help"></i></a></th>
                            <th class="tablehead">常规调用 <a href="http://www.wuzhicms.com/help-block-code.html" target="_blank"><i class="icon-help"></i></a></th>
                            <th class="hidden-phone tablehead">更新时间</th>
                            <th class="tablehead">管理操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php
                        foreach($result AS $r) {
                            ?>
                            <tr title="下次更新时间:<?php echo date('Y-m-d H:i',$r['timing']);?>">

                                <td><input name="blockids[]" type="checkbox" value="<?php echo $r['blockid'];?>" <?php if(!$r['createhtml']) echo 'disabled';?>></td>
                                <td><?php echo $r['blockid'];?></td>
                                <td><?php echo $r['name'];?></td>
                                <td><div class="blockcode"><textarea><!--#include virtual="<?php echo WWW_PATH;?>webs/<?php echo $r['blockid'];?>.html"-->
<!--<?php echo $r['name'];?>--></textarea></div></td>
                                <td>{block=<?php echo $r['blockid'];?>}</td>
                                <td ><?php echo time_format($r['updatetime']);?></td>

                                <td>
                                    <?php if($r['type']==1) {?><a href="?m=content&f=block&v=item_listing&blockid=<?php echo $r['blockid'];?><?php echo $this->su();?>" class="btn btn-info btn-xs">列表</a><?php }?>
                                    <a href="?m=content&f=block&v=edit&blockid=<?php echo $r['blockid'];?><?php echo $this->su();?>" class="btn btn-primary btn-xs">修改</a>
                                    <a href="javascript:makedo('?m=content&f=block&v=delete&blockid=<?php echo $r['blockid'];?><?php echo $this->su();?>', '确认删除该记录?')"
                                       class="btn btn-danger btn-xs">删除</a>
                                </td>
                            </tr>
                        <?php
                        }
                        ?>



                        </tbody>
                    </table>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="pull-left"> <button type="submit" name="submit" class="btn btn-default btn-sm">生成静态</button>
                                </div>
                                <div class="pull-right">
                                    <ul class="pagination pagination-sm mr0">
                                        <?php echo $pages;?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
</form>
        </div>
    </div>

    <!-- page end-->
</section>
<script src="<?php echo R;?>js/bootstrap.min.js"></script>
<script src="<?php echo R;?>js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="<?php echo R;?>js/pxgrids-scripts.js"></script>
</body>
</html>
/**

 * 列表排序
 */
public function item_sort() {
    if(isset($GLOBALS['submit'])) {
        foreach($GLOBALS['sorts'] as $cid => $n) {
            $n = intval($n);
            $this->db->update('block_data',array('sort'=>$n),array('id'=>$cid));
        }
        MSG(L('operation success'));
    } else {
        MSG(L('operation failure'));
    }
}

相关热词搜索:五指

上一篇:wuzhicms 类的加载-数据库查询操作
下一篇:五指cms核心配置文件 web_config.php

分享到: 收藏