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


PHP getPagination函数代码示例

本文整理汇总了PHP中getPagination函数的典型用法代码示例。如果您正苦于以下问题:PHP getPagination函数的具体用法?PHP getPagination怎么用?PHP getPagination使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 public function __construct($module,$cols) {
     $this->cols=$cols;
     $objHTML=ClsNaanalLibrary::getInstance("html");
     $this->objTable=$objHTML->getGenerator()->getTable("search",$cols);
     //$this->objTable->setParam("border",1);
     pageHeaderInclude('js/export.js');
     pageHeaderInclude('js/searchSaved.js');
     pageHeaderInclude('js/suggest.js');
     parent::__construct($module);
     $arrPager=ClsNaanalRequest::getInstance()->getPager();
     $pagination=getPagination("index.php?module={$module}", $this->objAuieoModel->getTotalRecords() , $arrPager["current_page"], $arrPager["items_per_page"]);
     $this->assign("total_records",$this->objAuieoModel->getTotalRecords());
     $this->assign("pagination",$pagination);
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:14,代码来源:ClsVList.php

示例2: __construct

 public function __construct(ClsAuieoArray &$objAuieoModel) 
 {
     $this->objAuieoModel=$objAuieoModel;
     parent::__construct("joborders",7);
     $rows=$objAuieoModel->getRows();
     if($rows>0)
     {
         $this->addRowCheckbox(0);
         $this->addData($this->getSortLink('name', 'Name'),0,0);
         $this->addData($this->getSortLink('phone1', 'Primary Phone'),0,1);
         $this->addData("Key Technologies",0,2);
         $this->addData($this->getSortLink('city', 'Created'),0,3);
         $this->addData($this->getSortLink('owner_user.last_name', 'Owner'),0,4);
         for($i=0;$i<$rows;$i++)
         {
             $this->addRowCheckbox($i+1,$objAuieoModel->getRenderValue($i,0));
             $this->addData($objAuieoModel->getRenderValue($i,1), $i+1, 0);
             $this->addData($objAuieoModel->getRenderValue($i,2), $i+1, 1);
             $this->addData($objAuieoModel->getRenderValue($i,3), $i+1, 2);
             $this->addData($objAuieoModel->getRenderValue($i,4), $i+1, 3);
             $this->addData($objAuieoModel->getRenderValue($i,5), $i+1, 4);
         }
         $this->assign("list",$this->getTable());
     }
     else
     {
         $this->assign("list","No matching entries found.");
     }
     $arrPager=ClsNaanalRequest::getInstance()->getPager();
     $pagination=getPagination("index.php?module=joborders", $rows, $arrPager["current_page"], $arrPager["items_per_page"]);
     $this->assign("pagination",$pagination);
     $this->assign("total_records",$rows);
     $this->assign("filter", ClsJobOrdersFilter::getInstance()->getFilter());
     //$this->addData("test",3,3);
     //$this->addColHeading("good",3);
     //<input type="checkbox" id="checked_<?php echo($data['contactID']); ? >" name="checked_<?php echo($data['contactID']); ? >" />
     
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:38,代码来源:ClsVJobordersList.php

示例3: getPagination

            if ($i != count($list)) {
                ?>
<hr class="forum-list-hr" />
									<?php 
            } else {
                ?>
									<div class="forum-list-no-hr"></div><?php 
            }
        }
    }
} else {
    echo "";
}
?>
									<div class="pull-right"><?php 
echo getPagination($totalCount);
?>
</div>
								</section>
							</div>
						</div>

					</div>
				</div>
			</div>

			<div class="col-xs-3">
				<div>


					<div class="right-want-box">
开发者ID:wait121000,项目名称:zhanglubao,代码行数:31,代码来源:279eff6cb1303dc866ebc9089a2b1776.php

示例4: getUserByReward

function getUserByReward()
{
    $request = $_REQUEST;
    if (empty($request)) {
        return false;
    }
    $a = array();
    foreach ($request as $key => $value) {
        ${$key} = mysql_real_escape_string($value);
        $a[$key] = mysql_real_escape_string($value);
    }
    $is_active = empty($is_active) || is_null($is_active) ? 0 : 1;
    $is_long_list = empty($page) ? true : false;
    if (!empty($start_date) && !empty($end_date)) {
        $from = strtotime(trim($start_date));
        $to = strtotime(trim($end_date));
        $period = "( `p`.`start_date` >= '" . date("Y-m-d", $from) . "' AND `p`.`start_date` <= '" . date("Y-m-d", $to) . "' ) OR ( `p`.`end_date` >= '" . date("Y-m-d", $from) . "' AND `p`.`end_date` <= '" . date("Y-m-d", $to) . "')";
    }
    $total_row = 0;
    $page_limit = 30;
    $limit = $is_long_list ? "" : " LIMIT " . ($page - 1) * $page_limit . ",{$page_limit}";
    if (!$is_long_list) {
        $query = " SELECT COUNT(1) AS `total` \n\t\t\t\t\tFROM `" . REVIEW_REWARDER . "` AS `r` \n\t\t\t\t\tINNER JOIN `" . REVIEW_USERS . "` AS `u` ON `u`.`id` = `r`.`receiver_id`\n\t\t\t\t\tINNER JOIN `" . REVIEW_PERIODS . "` AS `p` ON `p`.`id` = `r`.`period_id`\t\n\t\t\t\t\tWHERE ({$period}) AND  `u`.`confirmed`= 1 AND `u`.`is_active` = {$is_active} AND `r`.`rewarder_points` > 0\n\t\t\t\t\tGROUP BY `u`.`username`";
        if ($result = mysql_query($query)) {
            $total_row = mysql_num_rows($result);
        }
        if ($total_row == 0) {
            respond(array('success' => true, 'message' => "No reward found", 'rewarderlist' => array(), 'sql' => $query));
        }
    }
    $query = " SELECT `u`.`username`, `u`.`nickname`, SUM(`r`.`rewarder_points`) AS `points` \n\t\t\t\tFROM `" . REVIEW_REWARDER . "` AS `r` \n\t\t\t\tINNER JOIN `" . REVIEW_USERS . "` AS `u` ON `u`.`id` = `r`.`receiver_id`\n\t\t\t\tINNER JOIN `" . REVIEW_PERIODS . "` AS `p` ON `p`.`id` = `r`.`period_id`\n\t\t\t\tWHERE ( {$period} ) AND  `u`.`confirmed`= 1 AND `u`.`is_active` = {$is_active} AND `r`.`rewarder_points` > 0\n\t\t\t\tGROUP BY `u`.`username`\n\t\t\t\tORDER BY {$sort} {$dir} {$limit}";
    if (!($result = mysql_query($query))) {
        respond(array('success' => false, 'message' => SL_DB_FAILURE, 'sql' => $query));
    } else {
        $return = array();
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_assoc($result)) {
                $return[] = $row;
            }
        }
        if (!empty($return)) {
            $pagination = "";
            if (!$is_long_list) {
                $total_row = ceil($total_row / $page_limit);
                $pagination = getPagination($page, $total_row);
            }
            respond(array('success' => true, 'rewarderlist' => $return, 'pagination' => $pagination, 'sql' => $query));
        } else {
            respond(array('success' => false, 'message' => 'No users'));
        }
    }
}
开发者ID:highfidelity,项目名称:love,代码行数:52,代码来源:api.php

示例5: getPagination

<ul class="pagination pagination-lg">
<?php 
$npage = getPagination($con, $itemView);
$page = getPage();
$cari = @$_GET['cari'];
if ($page != 1) {
    ?>
    <li>
    	<a href="?<?php 
    if (!empty($cari)) {
        echo "cari=" . $cari . "&";
    }
    ?>
page=<?php 
    echo $page - 1;
    ?>
">
    		<i class="fa fa-long-arrow-left"></i>Previous Page
    	</a>
    </li>
<?php 
}
for ($i = 1; $i <= $npage; $i++) {
    ?>
 
    <li class="<?php 
    if ($page == $i) {
        echo "active";
    }
    ?>
">
开发者ID:adhy57,项目名称:antaCMS,代码行数:31,代码来源:pagination.php

示例6: getPagination

            </header>

        </article>

    <?php 
    }
    ?>

    <div class="row">
        <?php 
    if (function_exists('getPagination')) {
        ?>
            <nav class="twelvecol pagination">
                <?php 
        echo getPagination();
        ?>
            </nav>
        <?php 
    } else {
        ?>
            <nav class="twelvecol pagination">
                <ul>
                    <li class="prev-link">
                        <?php 
        next_posts_link(__('Older'));
        ?>
                    </li>
                    <li class="next-link">
                        <?php 
        previous_posts_link(__('Newer'));
开发者ID:colbyfayock,项目名称:fay.io,代码行数:30,代码来源:search.php

示例7: getPagination

?>
">关注/粉丝</a>
            </li>
        </ul>
    </div>
    <!-- /.navbar-collapse -->
</nav>

            <div class="row uc_content">
                <div class="col-md-7 col-xs-12">
                    <?php 
echo $content;
?>
                    <div class="pull-right">
                        <?php 
echo getPagination($totalCount, 10);
?>
                    </div>
                </div>
                <div class="col-md-5 col-sm-9 col-xs-12 uc_other_link">
                    <div>
    <div class="uc_link_block clearfix col-xs-12">
        <div class="uc_link_top clearfix">
            <div class="uc_title">
                <?php 
if ($uid == is_login()) {
    ?>
我<?php 
} else {
    ?>
TA<?php 
开发者ID:nullog,项目名称:zhanglubao,代码行数:31,代码来源:f5da2fb655af3ddffa1ba40a8fa75530.php

示例8: niceSize

            $datas["niceSize"] = $item[File_List::KEY_TYPE] == File_List::TYPE_FILE ? niceSize($item[File_List::KEY_SIZE]) : '&nbsp;';
        }
        $datas["path"] = $path;
        $datas["real_path"] = $real_path;
        $datas["real_path_urlencode"] = urlencode($real_path);
        $datas["KEY_TYPE"] = $item[File_List::KEY_TYPE];
        $datas["KEY_NAME"] = $item[File_List::KEY_NAME];
        $datas["KEY_NAME_htmlsc"] = htmlspecialchars($item[File_List::KEY_NAME]);
        $datas["KEY_NAME_urlencode"] = urlencode($item[File_List::KEY_NAME]);
        $datas["KEY_DATE"] = date('d/m/y H:i:s', $item[File_List::KEY_DATE]);
        $listing_filtred[$xx] = $datas;
    }
    $smarty->assign("listing_filtred", $listing_filtred);
}
$smarty->assign("getLastItemCount", $file_list->getLastItemCount());
$smarty->assign("getPagination", getPagination($file_list->getLastItemCount(), $start, $limit));
$smarty->assign("totPagination", $start + $limit > $file_list->getLastItemCount() ? $file_list->getLastItemCount() : $start + $limit);
////////////////////////// UPLOAD ///////////////////////////////
$upload_info = $datas_lang["upload_infoPoids"] . "<br>";
if ($dimMaxArray[0] == 0 && $dimMaxArray[1] == 0) {
    $upload_info .= $datas_lang["upload_info0"];
} else {
    if ($dimMaxArray[0] > 0 && $dimMaxArray[1] == 0) {
        $upload_info .= $datas_lang["upload_info1"];
    }
    if ($dimMaxArray[0] == 0 && $dimMaxArray[1] > 0) {
        $upload_info .= $datas_lang["upload_info2"];
    }
    if ($dimMaxArray[0] > 0 && $dimMaxArray[1] > 0) {
        $upload_info .= $datas_lang["upload_info3"];
    }
开发者ID:wedesign-pf,项目名称:code-g,代码行数:31,代码来源:browse.php

示例9: dbFetchAll

} else {
    $loFrameId = 1;
    $hiFrameId = $event['Frames'];
}
$sql = 'SELECT * FROM Frames WHERE EventID = ?';
if ($paged && !empty($_REQUEST['page'])) {
    $sql .= " and FrameId between {$loFrameId} and {$hiFrameId}";
}
$sql .= " order by FrameId";
$frames = dbFetchAll($sql, NULL, array($_REQUEST['eid']));
$scale = getDeviceScale($event['Width'], $event['Height'], $framesPerLine + 0.3);
$pages = (int) ceil($event['Frames'] / $framesPerPage);
if (!empty($_REQUEST['fid'])) {
    $_REQUEST['page'] = $_REQUEST['fid'] / $framesPerPage + 1;
}
$pagination = getPagination($pages, $_REQUEST['page'], $maxShortcuts, '&amp;eid=' . $_REQUEST['eid'] . $filterQuery . $sortQuery, '&amp;');
xhtmlHeaders(__FILE__, translate('Event') . ' - ' . $event['Name']);
?>
<body>
  <div id="page">
    <div id="header">
<?php 
if (canEdit('Events')) {
    ?>
      <div id="headerButtons">
        <a href="?view=events&amp;action=delete&amp;mark_eid=<?php 
    echo $_REQUEST['eid'];
    echo $filterQuery;
    echo $sortQuery;
    ?>
&amp;limit=<?php 
开发者ID:bill-mcgonigle,项目名称:ZoneMinder,代码行数:31,代码来源:event.php

示例10: ListR4

function ListR4($sql, $attr, $link, $SUMMARY_STYLE, $conexion = null)
{
    ## ARRAYS DEFAULT  DC
    $atributosDefault = array('id' => '', 'class' => 'reporteA', 'checked' => '', 'paginador' => '', 'fieldTotal' => '');
    $linkDefault = array('campos' => '', 'args' => '', 'panelId' => '', 'url' => '');
    $linksUrl = array('head' => '', 'body' => '');
    $SUMMARY_STYLE_DEFAULT = array('columns_index' => '', 'summary_css' => '');
    ## CHANGING ARRAYS VALUES
    $atributos = defaultArrayValues($atributosDefault, $attr);
    $SUMMARY_COLS_CSS = defaultArrayValues($SUMMARY_STYLE_DEFAULT, $SUMMARY_STYLE);
    $paginador = explode(',', $atributos['paginador']);
    ////CONSTRUYE PARTE DE LA URL DEL PAGINADOR
    $urlSeg = explode('?', $paginador[1]);
    $urlSegA = $urlSeg[1];
    $urlSegB = explode('=', $urlSegA);
    $urlSegUrl = $urlSegB[0];
    $paginaStart = is_int((int) get('' . $urlSegUrl . 'pagina-start')) && (int) get('' . $urlSegUrl . 'pagina-start') > 0 ? get('' . $urlSegUrl . 'pagina-start') : 1;
    $start = ($paginaStart - 1) * $paginador[0];
    $limit = ' LIMIT ' . $start . ', ' . $paginador[0];
    $sql = filterSql($sql);
    ## EXTRAYENDO EL TOTAL DE FILAS
    getResult($sql, $conexion);
    $count = getResult("SELECT FOUND_ROWS() AS total", $conexion);
    $row = mysql_fetch_object($count);
    $countTotal = $row->total;
    $sql = $sql . $limit;
    $result = getResult($sql, $conexion);
    $pagitacionHtml = getPagination($paginaStart, $countTotal, $paginador[0], $paginador[1]);
    if (!empty($link)) {
        $linkArray = explode('}', $link);
        if (isset($linkArray[1])) {
            $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[1]);
            $linksUrl['head'] = defaultArrayValues($linkDefault, $linkArray[0]);
        } else {
            $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[0]);
        }
    }
    $fieldsName = getFieldsName($result);
    $fieldsFilter = fieldsFilter($fieldsName, $linksUrl);
    //vd($fieldsFilter);vd($atributos);
    $tableHeader = getTableHeader($fieldsFilter, $atributos);
    $tableBody = getTableBody($result, $fieldsFilter, $atributos, $countTotal, $SUMMARY_COLS_CSS);
    $tabla .= "<table id=\"{$atributos['id']}\" class=\"{$atributos['class']}\" style=\"width:100%;clear: both;\">" . "{$tableHeader}{$tableBody}" . "</table>" . "</form>" . "{$pagitacionHtml}";
    if ($atributos['checked'] == "checked") {
        $tabla = "<form method=\"post\" id=\"frm-{$atributos['id']}\">" . $tabla;
        $tabla .= "</form>";
    }
    return $tabla;
}
开发者ID:dice9030,项目名称:GestionLogistico,代码行数:49,代码来源:funciones.php

示例11: while

    while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
        $HTML .= '<tr onclick="window.location.assign(\'/displayinventory/' . $row['id'] . '/\')">';
        $HTML .= '<td>' . $row['datetime'] . '</td>';
        $HTML .= '<td>' . $row['quantity'] . '</td>';
        $HTML .= '<td>' . $row['cost'] . '</td>';
        $HTML .= '<td>' . $row['sell_price'] . '</td>';
        $HTML .= '<td>' . $row['locname'] . '</td>';
        $HTML .= '<td>' . ($row['notes'] != '' ? 'Y' : 'N') . '</td>';
        $HTML .= '</tr>';
    }
} else {
    $HTML = 'No Data Found';
}
$HTML .= '</table></div>';
if ($count > 0) {
    $paginationCount = getPagination($count);
}
$HTML .= '';
//Buttons
if ($count > 0) {
    $HTML .= '<div style="display:table; margin:0 auto;"><ul class="tsc_pagination tsc_paginationC tsc_paginationC01">' . '<li class="first link" id="first">' . '<a  href="javascript:void(0)" onclick="changePagination(\'0\',\'first\',\'inventory\')"><<</a>' . '</li>';
    if ($paginationCount > 18) {
        $bottomPage = 0;
        $topPage = 18;
        if ($id > 9) {
            $bottomPage = $id - 8;
            $HTML .= '<li>...</li>';
            if ($paginationCount < $id + 9) {
                $topPage = $paginationCount;
                $bottomPage = $paginationCount - 18;
            } else {
开发者ID:tcsoftwareaustin,项目名称:vint,代码行数:31,代码来源:loadInventory.php

示例12: empty

$page = empty($_GET['pageno']) ? 1 : $_GET['pageno'];
if (!empty($_GET['orderby'])) {
    $orderBy = $_GET['orderby'];
    $orderBy = $orderBy == 'author' ? 'user' : $orderBy;
}
if (!empty($_GET['order'])) {
    $order = $_GET['order'];
}
// current link
$link = "admin.php?page=s3podcasts-list&orderby={$orderBy}&order={$order}";
// get the number of podcasts in database
$count = $wpdb->get_row('SELECT COUNT(id) AS total FROM wp_s3podcasts');
// get all podcasts
$results = $wpdb->get_results("SELECT * FROM wp_s3podcasts ORDER BY {$orderBy} {$order} LIMIT " . ($page - 1) * $limit . ", {$limit}");
// get pagination html
$pagination = getPagination($link, $count->total, $page, $limit);
// init order links
$orderTitle = $orderUser = $orderDate = 'asc';
switch ($orderBy) {
    case 'title':
        $orderTitle = $order == 'asc' ? 'desc' : 'asc';
        break;
    case 'user':
        $orderUser = $order == 'asc' ? 'desc' : 'asc';
        break;
    case 'date':
        $orderDate = $order == 'asc' ? 'desc' : 'asc';
        break;
}
?>
<div class="wrap">
开发者ID:brunoflmg,项目名称:s3podcasts,代码行数:31,代码来源:list.php

示例13: getPagination

									</div>
								</div>
								<hr class="post_line" /><?php 
        }
    }
} else {
    echo "";
}
?>

								<div class="row">
									<div class="col-xs-12">
										<pull class="pull-right">
										<?php 
echo getPagination($replyTotalCount);
?>
 </pull>
									</div>
								</div>

								<br />

								<!--发表回复-->
								<?php 
if (is_login()) {
    $user = query_user(array('avatar', 'uid'));
    ?>
								<div class="row">
									<div class="col-xs-2">
										<p>
开发者ID:nullog,项目名称:zhanglubao,代码行数:30,代码来源:b23aad7331c0fa9b23e73ae2b3270391.php

示例14: isset

echo $category->name;
?>
</li>
            </ol>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <h4><?php 
echo $category->description;
?>
</h4>
        </div>
    </div>

    <?php 
$count = 0;
$current = isset($_GET['url'][1]) && is_numeric($_GET['url'][1]) ? $_GET['url'][1] : 0;
echo '<div class="row">';
foreach ($category->getProductsForPage($current, 9) as $product) {
    $product->echoProduct();
}
echo '</div>';
getPagination($current, '/categorie/' . $_GET['url'][0], ceil($category->getProductCount() / 9));
?>

    <hr>

</div>
<?php 
include 'php/footer.php';
开发者ID:nozols,项目名称:Slotopdracht_informatica,代码行数:31,代码来源:categorie.php

示例15: getRowsContent

        $search = "";
    }
}
if (empty($search)) {
    $total_records = getRowsContent();
    $pages = ceil($total_records / $rows_for_page);
    if ($total_records == 0) {
        echo "No hay contenido.";
    } else {
        if (isset($_GET['page'])) {
            $page = (int) $_GET['page'];
        } else {
            $page = 0;
        }
        $start_with = $page * $rows_for_page;
        $contenido = getPagination($start_with, $rows_for_page);
        foreach ($contenido as $content) {
            $imagen = RAIZ_APP;
            if (empty($content["caratula"])) {
                $imagen .= "img/no_photo_available.png";
            } else {
                $imagen .= $content["caratula"];
            }
            echo '<div id="indexstyle">';
            echo '<div id="titulo-serie">' . $content["titulo"] . '</div>';
            echo '<div id="cartel"><img src="' . $imagen . '" id="caratula"> </div>';
            echo '<div id="descripcion-basica">' . substr($content["sinopsis"], 0, 400) . "..." . '</div>';
            echo '<div style="clear:both;margin-left: 90%;padding-bottom:2%;"><a href="' . RAIZ_APP . 'includes/descripcion.php?title=' . $content["titulo"] . '">Leer más</a></div>';
            echo '</div>';
        }
        echo '<div id="paginacion"><br/>';
开发者ID:ChristianVelrok,项目名称:Grupo-AW,代码行数:31,代码来源:procesaIndex.php


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