当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagination::create方法代码示例

本文整理汇总了PHP中Pagination::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::create方法的具体用法?PHP Pagination::create怎么用?PHP Pagination::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


在下文中一共展示了Pagination::create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pagination

 public function pagination($settings = array(), $output = true)
 {
     if (!is_array($settings)) {
         Error::set('Error', 'arrayParameter', '1.(settings)');
     }
     $limit = $this->pagination['limit'];
     $start = $this->pagination['start'];
     $settings['totalRows'] = $this->totalRows(true);
     $settings['limit'] = isset($limit) ? $limit : 10;
     $settings['start'] = isset($start) ? $start : NULL;
     $return = $output === true ? Pagination::create(NULL, $settings) : $settings;
     $this->pagination = array('start' => 0, 'limit' => 0);
     return $return;
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:14,代码来源:DB.php

示例2: pagination

 public function pagination($table = '', $settings = array(), $returnType = 'object')
 {
     if (!is_array($settings)) {
         Error::set(lang('Error', 'arrayParameter', '1.(settings)'));
     }
     if (!empty($this->table)) {
         // Table yöntemi tanımlanmış ise
         // 1. parametre, 2. parametre olarak kullanılsın
         $returnType = $settings;
         $settings = $table;
         $table = $this->table;
         $this->table = NULL;
     }
     $limit = $this->pagination['limit'];
     $start = $this->pagination['start'];
     $this->calcFoundRows()->get($table);
     $result = $returnType === 'object' ? $this->result() : $this->resultArray();
     $return['result'] = $result;
     $return['totalRows'] = $this->totalRows();
     $settings['totalRows'] = $this->foundRows();
     $settings['limit'] = isset($limit) ? $limit : NULL;
     $settings['start'] = isset($start) ? $start : NULL;
     $return['create'] = Pagination::create(NULL, $settings);
     $return['settings'] = $settings;
     return $returnType === 'object' ? (object) $return : $return;
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:26,代码来源:DB.php

示例3:

            ?>
" class="btn btn-primary tool_tip" rel="tooltip" title="Clique para criar vincular"> Administrador </a></td>
							<td style="width: 30px;"><a href="~/usuario/vincular/<?php 
            echo $unidade->IdUnidade . '/' . $usuario->Id . '/3';
            ?>
"  class="btn btn-primary tool_tip" rel="tooltip" title="Clique para criar vincular"> Comum </a></td>
						<?php 
        }
        ?>
					</tr>
				<?php 
    }
    ?>
			<?php 
} else {
    ?>
				<tr>
					<td colspan="4">Não possui unidade cadastrada!</td>
				</tr>
			<?php 
}
?>
        </tbody>
    </table>
</div>
<div class="grid_12" style="text-align: center;">
	<?php 
echo Pagination::create('usuario/v/' . $usuario->Id . '/', $unidades->Total, $p);
?>
</div>
开发者ID:nylmarcos,项目名称:estagio,代码行数:30,代码来源:v.php

示例4:

                        </td>
                        <td style="width: 30px;"><a href="javascript:void(0)" onclick="modal(<?php 
        echo $unidade->Id;
        ?>
,'unidade/excluir/','Tem certeza que deseja excluir a Unidade? ')" class="btn btn-danger tool_tip" rel="tooltip" title="Excluir"> <i class="icon-trash icon-white"></i></a></td>
                        <td style="width: 30px;"><a href="~/unidade/visualizar/<?php 
        echo $unidade->Id;
        ?>
" class="btn btn-success tool_tip" rel="tooltip" title="Visualizar"> <i class="icon-eye-open icon-white"></i></a></td>
                    </tr>
                <?php 
    }
    ?>
            <?php 
} else {
    ?>
                <tr>
                    <td colspan="4">Não possui unidade cadastrada!</td>
                </tr>
            <?php 
}
?>
        </tbody>
    </table>
</div>
<div class="grid_12" style="text-align: center;">
    <?php 
echo Pagination::create('unidade/index/', $unidades->Total, $p);
?>
</div>
开发者ID:nylmarcos,项目名称:estagio,代码行数:30,代码来源:index.php

示例5:

    echo $user->getId();
    ?>
">
                                    <i class="halflings-icon white edit"></i>
                                </a>
                                <a class="btn btn-danger" href="deleteUser.php?id=<?php 
    echo $user->getId();
    ?>
">
                                    <i class="halflings-icon white trash"></i>
                                </a>
                            </td>
                        </tr>
                   <?php 
}
?>
                    </tbody>
                </table>
                <?php 
echo $pagination->create();
?>
            </div>
        </div><!--/span-->
    </div><!--/row-->




</div><!--/.fluid-container-->
<?php 
require_once 'common/footer.php';
开发者ID:dbcdeathdreamer,项目名称:SoftAcad,代码行数:31,代码来源:users.php

示例6: isset

<?php

include "./pagination.php";
$iLimit = 10;
$iPage = isset($_GET['page']) ? $_GET['page'] : 1;
$iStart = $iLimit * $iPage - $iLimit;
$oPaginate = new Pagination();
$aNames = $oPaginate->getNames($iStart, $iLimit);
$oPaginate->setCount($aNames['count']);
$oPaginate->setRange(3);
$oPaginate->setLimit($iLimit);
$oPaginate->setCurrentPage($iPage);
if ($aNames['count'] > 0) {
    foreach ($aNames['names'] as $r) {
        echo $r['name'] . '<br>';
    }
}
echo $oPaginate->create();
开发者ID:atonevbg,项目名称:pagination,代码行数:18,代码来源:index.php


注:本文中的Pagination::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。