當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。