联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
把序列号key分页后继续累积值的读取方法,后台的分页不生效
类型:迅睿CMS 更新时间:2021-08-12 22:50:17

把序列号key分页后继续累积值的读取方法(https://www.xunruicms.com/doc/1091.html)
{php echo ($page>1 ? $key + (($page-1) * $pagesize) : $key) + 1;}

试了下,后台的分页不生效

回帖
  • 迅睿框架技术-张哥
    #1楼    迅睿框架技术-张哥
    2021-08-12 17:29:03
    Chrome 0
    后台肯定不能了,这个适用于前端模板写法
  • 湘西北的风
    #2楼    湘西北的风
    2021-08-12 18:42:34
    Chrome 0
    后台分页该如何,请教各位大神
  • GoWorkRoom
    #3楼    GoWorkRoom
    2021-08-12 18:49:02
    Chrome 0
    后台循环loop的list标签发来一下
  • 湘西北的风
    #4楼    湘西北的风
    2021-08-12 18:52:30
    Chrome 0
    GoWorkRoom {loop $list $t} <?php $cg = dr_string2array($t['setting']);?> {if !$cg.dev || $cg.dev == 1} <tr class="odd gradeX" id="dr_row_{$t.id}"> {if $ci->_is_admin_auth('del')} <td class="myselect"> <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline"> <input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" /> <span></span> </label> </td> {/if} <td>{dr_lang($t.name)}</td> <td>{$t.table}</td> <td> <label><a href="{dr_url('form/'.$t['table'].'/index')}" class="btn btn-xs blue"> <i class="fa fa-table"></i> {dr_lang('已审核内容')} </a></label> <label><a href="{dr_url('form/'.$t['table'].'_verify/index')}" class="btn btn-xs red"> <i class="fa fa-edit"></i> {dr_lang('待审核内容')} </a></label> {if !$cg.dev}<label><a href="{SITE_URL}index.php?s=form&c={$t.table}&m=post" target="_blank" class="btn btn-xs yellow"> <i class="fa fa-send"></i> {dr_lang('预览')} </a></label>{/if} {if $ci->_is_admin_auth('edit')}<label><a href="{dr_url('form/form/edit', ['id'=>$t.id])}" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a></label>{/if} {if $ci->_is_admin_auth()}<label><a href="{dr_url('field/index', ['rname'=>'form-'.SITE_ID, 'rid'=>$t.id])}" class="btn btn-xs dark"> <i class="fa fa-code"></i> {dr_lang('自定义字段')} </a></label>{/if} {if $ci->_is_admin_auth()}<label><a href="javascript:dr_iframe_show('{dr_lang('导出')}', '{dr_url('form/form/export', ['id'=>$t.id])}');" class="btn btn-xs red"> <i class="fa fa-sign-out"></i> {dr_lang('导出')} </a></label>{/if} </td> </tr> {/if} {/loop}
  • GoWorkRoom
    #5楼    GoWorkRoom
    2021-08-12 22:28:52
    Chrome 0
            
            --------------------------
    {php $key = dr_count($list);$page=max(1,(int)$_GET['page']); echo ($page>1 ? $key + (($page-1) * SYS_ADMIN_PAGESIZE) : $key) + 1;}
  • 湘西北的风
    #6楼    湘西北的风
    2021-08-12 22:32:15
    Chrome 0
    您好,大神,是表单的后台管理页面哦。试了下,好像不生效GoWorkRoom
  • GoWorkRoom
    #7楼    GoWorkRoom
    2021-08-12 22:34:41
    Chrome 0
    适用于后台列表,那你输出什么值
  • 湘西北的风
    #8楼    湘西北的风
    2021-08-12 22:39:48
    Chrome 0


    麻烦问下,这段代码放在什么位置了,我试了下,每页设置500条数据,第一页这个显示501,第二页就是1001...
    GoWorkRoom
  • 天天向上
    #9楼    天天向上
    2021-08-12 22:47:40
    Chrome 0
    {loop $list $key $t}
            <?php $cg = dr_string2array($t['setting']);?>
            {if !$cg.dev || $cg.dev == 1}
            <tr class="odd gradeX" id="dr_row_{$t.id}">
                {if $ci->_is_admin_auth('del')}
                <td class="myselect">
                    <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                        <input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
                        <span></span>
                    </label>
                </td>
                {/if}
                <td>
                {php $page=max(1,(int)$_GET['page']); echo ($page>1 ? $key + (($page-1) * SYS_ADMIN_PAGESIZE) : $key) + 1;}
                
                {dr_lang($t.name)}</td>
                <td>{$t.table}</td>
                <td>
                    <label><a target="_blank" href="{dr_url('form/'.$t['table'].'/index')}" class="btn btn-xs blue"> <i class="fa fa-table"></i> {dr_lang('已审核内容')} </a></label>
                    <label><a target="_blank" href="{dr_url('form/'.$t['table'].'_verify/index')}" class="btn btn-xs red"> <i class="fa fa-edit"></i> {dr_lang('待审核内容')} </a></label>
                    {if !$cg.dev}<label><a target="_blank" href="{SITE_URL}index.php?s=form&c={$t.table}&m=post" target="_blank" class="btn btn-xs yellow"> <i class="fa fa-send"></i> {dr_lang('预览')} </a></label>{/if}
                    {if $ci->_is_admin_auth('edit')}<label><a target="_blank" href="{dr_url('form/form/edit', ['id'=>$t.id])}" class="btn btn-xs green"> <i class="fa fa-edit"></i> {dr_lang('修改')} </a></label>{/if}
                    {if $ci->_is_admin_auth()}<label><a target="_blank" href="{dr_url('field/index', ['rname'=>'form-'.SITE_ID, 'rid'=>$t.id])}" class="btn btn-xs dark"> <i class="fa fa-code"></i> {dr_lang('自定义字段')} </a></label>{/if}
                    {if $ci->_is_admin_auth()}<label><a target="_blank" href="javascript:dr_iframe_show('{dr_lang('导出')}', '{dr_url('form/form/export', ['id'=>$t.id])}');" class="btn btn-xs red"> <i class="fa fa-sign-out"></i> {dr_lang('导出')} </a></label>{/if}
                </td>
            </tr>
            {/if}
            {/loop}
    满意答案
  • 湘西北的风
    #10楼    湘西北的风
    2021-08-12 22:50:17
    Chrome 0
    @天天向上:非常感谢,完美解决