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


PHP printPagination函数代码示例

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


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

示例1: fillCategory

 private function fillCategory($category_id)
 {
     $limit = $this->params['count_per_page'];
     $start = ($this->engine->url->page_n - 1) * $limit;
     $q = $this->engine->db->query("SELECT id, parent_id, caption_" . $_SESSION['lang'] . " as caption, description_" . $_SESSION['lang'] . " as description, text_" . $_SESSION['lang'] . " as `text`, title_" . $_SESSION['lang'] . " as title, kw_" . $_SESSION['lang'] . " as kw, descr_" . $_SESSION['lang'] . " as descr FROM " . DB_PREF . "materials WHERE id='" . (int) $category_id . "' AND is_category=1 AND enabled=1 ORDER BY date_added DESC");
     if (empty($q->row)) {
         $this->engine->ERROR_404 = true;
         return false;
     } else {
         $category = $q->row;
         $breadcrumbs = array();
         $this->buildBreadcrumbs($category['id'], $breadcrumbs);
         $this->data['breadcrumbs'][0] = array('caption' => '<i class="glyphicon glyphicon-home"></i>', 'link' => $this->engine->url->link('route=home'));
         foreach ($breadcrumbs as $breadcrumb) {
             $this->data['breadcrumbs'][] = array('caption' => $breadcrumb['caption_' . $_SESSION['lang']], 'link' => $this->engine->url->link('route=materials&material_id=' . $breadcrumb['id']));
         }
         $this->data['category'] = array('caption' => $category['caption'], 'description' => $category['description'], 'text' => $category['text']);
         if ($category['title'] != '') {
             $this->engine->document->setTitle($category['title']);
         }
         if ($category['kw'] != '') {
             $this->engine->document->setKeywords($category['kw']);
         }
         if ($category['descr'] != '') {
             $this->engine->document->setDescription($category['descr']);
         }
         $categories = $this->engine->db->query("SELECT id, caption_" . $_SESSION['lang'] . " as caption, description_" . $_SESSION['lang'] . " as description, text_" . $_SESSION['lang'] . " as text, preview FROM " . DB_PREF . "materials WHERE parent_id=" . (int) $category_id . " AND enabled=1 AND is_category = 1 ORDER BY  date_added DESC")->rows;
         $this->data['categories'] = array();
         foreach ($categories as $category) {
             $this->data['categories'][$category['id']] = array('link' => $this->engine->url->link('route=materials&material_id=' . $category['id']), 'caption' => $category['caption'], 'preview' => resizeImage($category['preview'], 100, 100), 'description' => $category['description'], 'text' => $category['text']);
         }
         $materials = $this->engine->db->query("SELECT id, caption_" . $_SESSION['lang'] . " as caption, description_" . $_SESSION['lang'] . " as description, preview, date_added FROM " . DB_PREF . "materials WHERE parent_id=" . (int) $category_id . " AND enabled = 1 AND is_category = 0 ORDER BY date_added DESC LIMIT " . $start . ", " . $limit)->rows;
         $this->data['materials'] = array();
         foreach ($materials as $material) {
             $this->data['materials'][$material['id']] = array('link' => $this->engine->url->link('route=materials&material_id=' . $material['id']), 'caption' => $material['caption'], 'preview' => resizeImage($material['preview'], 150, 150), 'date_added' => $material['date_added'], 'description' => $material['description']);
         }
         $this->data['details_caption'] = $this->params['details_' . $_SESSION['lang']];
         $page_count = $this->getPageCount((int) $category_id, (int) $this->params['count_per_page']);
         $this->data['pagination'] = printPagination($page_count, $this->engine->uri);
         $this->mode = 1;
         $this->engine->ERROR_404 = false;
         return true;
     }
 }
开发者ID:wharin,项目名称:quantum,代码行数:44,代码来源:materials.php

示例2: catch

                    $resultSpace->execute($dataSpace);
                } catch (PDOException $e) {
                    print "<div class='error'>" . $e->getMessage() . "</div>";
                }
                if ($resultSpace->rowCount() == 1) {
                    $rowSpace = $resultSpace->fetch();
                    print $rowSpace["name"] . "<br/>";
                }
            }
            if ($row["locationDetail"] != "") {
                print "<span style='font-size: 85%; font-style: italic'>" . $row["locationDetail"] . "</span>";
            }
            print "</td>";
            print "<td>";
            print $row["status"] . "<br/>";
            if ($row["returnExpected"] != "") {
                print "<span style='font-size: 85%; font-style: italic'>" . dateConvertBack($guid, $row["returnExpected"]) . "</span>";
            }
            print "</td>";
            print "<td>";
            print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/library_lending_item.php&gibbonLibraryItemID=" . $row["gibbonLibraryItemID"] . "&name={$name}&gibbonLibraryTypeID={$gibbonLibraryTypeID}&gibbonSpaceID={$gibbonSpaceID}&status={$status}'><img title='" . _('Edit') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/config.png'/></a> ";
            print "</td>";
            print "</tr>";
            $count++;
        }
        print "</table>";
        if ($result->rowCount() > $_SESSION[$guid]["pagination"]) {
            printPagination($guid, $result->rowCount(), $page, $_SESSION[$guid]["pagination"], "bottom", "name={$name}&gibbonLibraryTypeID={$gibbonLibraryTypeID}&gibbonSpaceID={$gibbonSpaceID}&status={$status}");
        }
    }
}
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:library_lending.php

示例3: __

            echo '</td>';
            echo '</tr>';
            echo "<tr class='comment-{$count}' id='comment-{$count}'>";
            echo '<td colspan=4>';
            echo '<b>' . __($guid, 'Official Name') . ': </b>' . $row['officialName'] . '<br/>';
            echo '<b>' . __($guid, 'Maiden Name') . ': </b>' . $row['maidenName'] . '<br/>';
            echo '<b>' . __($guid, 'Gender') . ': </b>' . $row['gender'] . '<br/>';
            echo '<b>' . __($guid, 'Username') . ': </b>' . $row['username'] . '<br/>';
            echo '<b>' . __($guid, 'Date Of Birth') . ': </b>';
            if ($row['dob'] != '') {
                echo dateConvertBack($guid, $row['dob']);
            }
            echo '<br/>';
            echo '<b>' . __($guid, 'Country of Residence') . ': </b>' . $row['address1Country'] . '<br/>';
            echo '<b>' . __($guid, 'Profession') . ': </b>' . $row['profession'] . '<br/>';
            echo '<b>' . __($guid, 'Employer') . ': </b>' . $row['employer'] . '<br/>';
            echo '<b>' . __($guid, 'Job Title') . ': </b>' . $row['jobTitle'] . '<br/>';
            echo '<b>' . __($guid, 'Date Joined') . ': </b>';
            if ($row['timestamp'] != '') {
                echo dateConvertBack($guid, substr($row['timestamp'], 0, 10));
            }
            echo '<br/>';
            echo '</td>';
            echo '</tr>';
        }
        echo '</table>';
        if ($result->rowCount() > $_SESSION[$guid]['pagination']) {
            printPagination($guid, $result->rowCount(), $page, $_SESSION[$guid]['pagination'], 'bottom', "graduatingYear={$graduatingYear}");
        }
    }
}
开发者ID:GibbonEdu,项目名称:module-alumni,代码行数:31,代码来源:alumni_manage.php

示例4: printPagination

                <th>產品名稱</th>
                <th>縮圖</th>
                <th>狀態</th>
                <th>建議售價</th>
                <th>售價</th>
                <th>外部連結</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = 0; $i < sizeof($ary); $i++) {
    $url = $ary[$i]["url"];
    $photo = $ary[$i]["photo"];
    echo "<tr>" . "<td>" . ($start + $i + 1) . "</a></td>" . "<td>" . $ary[$i]["title"] . "</td>" . "<td><a href='{$photo}' download><img src='{$photo}' class='small photo'></a></td>" . "<td>" . $ary[$i]["available"] . "</td>" . "<td>" . $ary[$i]["recommend_price"] . "</td>" . "<td>" . $ary[$i]["current_price"] . "</td>" . "<td><a href='{$url}' target='_blank'>前往</a></td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./brand.php?id={$brand_id}&page=%d");
?>
 

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:brand.php

示例5: formatName

                    }
                    if ($row["status"] != "Full") {
                        $rowNum = "error";
                    }
                    $count++;
                    //COLOR ROW BY STATUS!
                    print "<tr class={$rowNum}>";
                    print "<td>";
                    print formatName("", $row["preferredName"], $row["surname"], "Student", true);
                    print "</td>";
                    print "<td>";
                    if ($row["yearGroup"] != "") {
                        print _($row["yearGroup"]);
                    }
                    print "</td>";
                    print "<td>";
                    print $row["rollGroup"];
                    print "</td>";
                    print "<td>";
                    print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/student_view_details.php&gibbonPersonID=" . $row["gibbonPersonID"] . "&search={$search}&allStudents={$allStudents}&sort={$sort}'><img title='" . _('View Details') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/plus.png'/></a> ";
                    print "</td>";
                    print "</tr>";
                }
                print "</table>";
                if ($result->rowcount() > $_SESSION[$guid]["pagination"]) {
                    printPagination($guid, $result->rowcount(), $page, $_SESSION[$guid]["pagination"], "bottom", "search={$search}&sort={$sort}");
                }
            }
        }
    }
}
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:student_view.php

示例6: formatName

                $count++;
                //Color rows based on start and end date
                if (!($row["dateStart"] == "" or $row["dateStart"] <= date("Y-m-d")) and ($row["dateEnd"] == "" or $row["dateEnd"] >= date("Y-m-d")) or $row["status"] != "Full") {
                    $rowNum = "error";
                }
                print "<tr class={$rowNum}>";
                print "<td>";
                print formatName("", $row["preferredName"], $row["surname"], "Student", true);
                print "</td>";
                print "<td>";
                print _($row["yearGroup"]);
                print "</td>";
                print "<td>";
                print $row["rollGroup"];
                if ($row["rollOrder"] != "") {
                    print "<br/><span style='font-size: 85%; font-style: italic'>" . $row["rollOrder"] . "</span>";
                }
                print "</td>";
                print "<td>";
                print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/studentEnrolment_manage_edit.php&gibbonStudentEnrolmentID=" . $row["gibbonStudentEnrolmentID"] . "&gibbonSchoolYearID={$gibbonSchoolYearID}&search={$search}'><img title='" . _('Edit') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/config.png'/></a> ";
                print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/studentEnrolment_manage_delete.php&gibbonStudentEnrolmentID=" . $row["gibbonStudentEnrolmentID"] . "&gibbonSchoolYearID={$gibbonSchoolYearID}&search={$search}'><img title='" . _('Delete') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/garbage.png'/></a>";
                print "</td>";
                print "</tr>";
            }
            print "</table>";
            if ($result->rowCount() > $_SESSION[$guid]["pagination"]) {
                printPagination($guid, $result->rowCount(), $page, $_SESSION[$guid]["pagination"], "bottom", "gibbonSchoolYearID={$gibbonSchoolYearID}&search={$search}");
            }
        }
    }
}
开发者ID:actcattest001,项目名称:core,代码行数:31,代码来源:studentEnrolment_manage.php

示例7: printPagination

?>

    <table class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>品牌名稱</th>
                <th>商品數量</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = ($showpage - 1) * $each_page_count; $i < min($showpage * $each_page_count, sizeof($ary)); $i++) {
    $id = $i + 1;
    echo "<td>" . ($i + 1) . "</td>" . "<td><a href='./brand.php?id={$id}' >" . $ary[$i][0] . "</a></td>" . "<td>" . $ary[$i][1] . "</td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./forum.php?page=%d");
?>

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:forum.php

示例8: printPagination

                <th>產品名稱</th>
                <th>縮圖</th>
                <th>狀態</th>
                <th>建議售價</th>
                <th>售價</th>
                <th>外部連結</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = 0; $i < sizeof($ary); $i++) {
    $url = $ary[$i]["url"];
    $photo = $ary[$i]["photo"];
    echo "<tr>" . "<td>" . ($start + $i + 1) . "</a></td>" . "<td>" . $ary[$i]["title"] . "</td>" . "<td><img src='{$photo}' class='small photo'></td>" . "<td>" . $ary[$i]["available"] . "</td>" . "<td>" . $ary[$i]["recommend_price"] . "</td>" . "<td>" . $ary[$i]["current_price"] . "</td>" . "<td><a href='{$url}' target='_blank'>前往</a></td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./store.php?id={$store_id}&page=%d");
?>
 

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:store.php

示例9: printPagination

" 的結果,共有 <span id="totalItem"></span> 項搜尋結果!</div>
    <table class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>產品名稱</th>
                <th>縮圖</th>
                <th>建議售價</th>
                <th>售價</th>
                <th>外部連結</th>
            </tr>
        </thead>
        <tbody id="tbody">
        <div id="loading" style="position: fixed;top: 50%;left: 55%;"  class="text-center dots-loader">
        Loading…
    </div>

        
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./search_item.php?name={$word}&page=%d");
?>
 

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:search_item.php

示例10: __

                echo '$(document).ready(function(){';
                echo "\$(\".comment-{$count}\").hide();";
                echo "\$(\".show_hide-{$count}\").fadeIn(1000);";
                echo "\$(\".show_hide-{$count}\").click(function(){";
                echo "\$(\".comment-{$count}\").fadeToggle(1000);";
                echo '});';
                echo '});';
                echo '</script>';
                if ($row['comment'] != '') {
                    echo "<a title='" . __($guid, 'View Description') . "' class='show_hide-{$count}' onclick='false' href='#'><img style='padding-right: 5px' src='" . $_SESSION[$guid]['absoluteURL'] . "/themes/Default/img/page_down.png' alt='" . __($guid, 'Show Comment') . "' onclick='return false;' /></a>";
                }
                echo '</td>';
                echo '</tr>';
                if ($row['comment'] != '') {
                    echo "<tr class='comment-{$count}' id='comment-{$count}'>";
                    echo '<td colspan=4>';
                    if ($row['comment'] != '') {
                        echo '<b>' . __($guid, 'Comment') . '</b><br/>';
                        echo nl2brr($row['comment']) . '<br/><br/>';
                    }
                    echo '</td>';
                    echo '</tr>';
                }
            }
            echo '</table>';
            if ($result->rowCount() > $_SESSION[$guid]['pagination']) {
                printPagination($guid, $result->rowCount(), $page, $_SESSION[$guid]['pagination'], 'bottom', "gibbonPersonID2={$gibbonPersonID2}&badgesBadgeID2={$badgesBadgeID2}&gibbonSchoolYearID={$gibbonSchoolYearID}");
            }
        }
    }
}
开发者ID:GibbonEdu,项目名称:module-badges,代码行数:31,代码来源:badges_grant.php

示例11: printPagination

?>

    <table class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th>#</th>
                <th>類別名稱</th>
                <th>商品數量</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = ($showpage - 1) * $each_page_count; $i < min($showpage * $each_page_count, sizeof($ary)); $i++) {
    $id = $ary[$i][0];
    echo "<td>" . ($i + 1) . "</td>" . "<td><a href='./category.php?id={$id}' >" . $ary[$i][1] . "</a></td>" . "<td>" . $ary[$i][2] . "</td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./category_list.php?page=%d");
?>

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:category_list.php

示例12: printPagination

                <th>建議售價</th>
                <th>售價</th>
                <th>外部連結</th>
            </tr>
        </thead>
        <tbody> 
<?php 
for ($i = 0; $i < sizeof($ary); $i++) {
    $url = $ary[$i]["url"];
    $photo = $ary[$i]["photo"];
    echo "<tr>" . "<td>" . ($start + $i + 1) . "</a></td>" . "<td>" . $ary[$i]["title"] . "</td>" . "<td><a href='{$photo}' download><img src='{$photo}' class='small photo'></a></td>" . "<td>" . $ary[$i]["available"] . "</td>" . "<td>" . $ary[$i]["recommend_price"] . "</td>" . "<td>" . $ary[$i]["current_price"] . "</td>" . "<td><a href='{$url}' target='_blank'>前往</a></td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
<?php 
printPagination($showpage, $page_max, "./new_product.php?source={$source_id}&store={$store_id}&start_date={$start_date}&end_date={$end_date}&page=%d");
?>
 
<script src="./assets/js/collapse.js"></script>
<script src="./assets/js/transition.js"></script>
<script src="./assets/js/validator.js"></script>
<script src="./assets/js/moment.min.js"></script>
<script src="./assets/js/bootstrap-datepicker.js"></script>
<script src="./assets/js/bootstrap-datetimepicker.js"></script>
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:new_product.php

示例13: printPagination

                <th>產品名稱</th>
                <th>縮圖</th>
                <th>狀態</th>
                <th>建議售價</th>
                <th>售價</th>
                <th>外部連結</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = 0; $i < sizeof($ary); $i++) {
    $url = $ary[$i]["url"];
    $photo = $ary[$i]["photo"];
    echo "<tr>" . "<td>" . ($start + $i + 1) . "</a></td>" . "<td>" . $ary[$i]["title"] . "</td>" . "<td><img src='{$photo}' class='small photo'></td>" . "<td>" . $ary[$i]["available"] . "</td>" . "<td>" . $ary[$i]["recommend_price"] . "</td>" . "<td>" . $ary[$i]["current_price"] . "</td>" . "<td><a href='{$url}' target='_blank'>前往</a></td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./store_personal.php?store_id=" . $store_id . "&page=%d");
?>
 

 
<?php 
include_once "footer.php";
?>

开发者ID:itri980112,项目名称:dashboard,代码行数:29,代码来源:store_personal.php

示例14: nl2brr

            echo '<td>';
            echo "<script type='text/javascript'>";
            echo '$(document).ready(function(){';
            echo "\$(\".comment-{$count}\").hide();";
            echo "\$(\".show_hide-{$count}\").fadeIn(1000);";
            echo "\$(\".show_hide-{$count}\").click(function(){";
            echo "\$(\".comment-{$count}\").fadeToggle(1000);";
            echo '});';
            echo '});';
            echo '</script>';
            echo "<a href='" . $_SESSION[$guid]['absoluteURL'] . '/index.php?q=/modules/Badges/badges_manage_edit.php&badgesBadgeID=' . $row['badgesBadgeID'] . "&search={$search}'><img title='Edit' src='./themes/" . $_SESSION[$guid]['gibbonThemeName'] . "/img/config.png'/></a> ";
            echo "<a href='" . $_SESSION[$guid]['absoluteURL'] . '/index.php?q=/modules/Badges/badges_manage_delete.php&badgesBadgeID=' . $row['badgesBadgeID'] . "&search={$search}'><img title='Delete' src='./themes/" . $_SESSION[$guid]['gibbonThemeName'] . "/img/garbage.png'/></a> ";
            if ($row['description'] != '') {
                echo "<a class='show_hide-{$count}' onclick='false' href='#'><img style='padding-right: 5px' src='" . $_SESSION[$guid]['absoluteURL'] . "/themes/Default/img/page_down.png' title='Show Description' onclick='return false;' /></a>";
            }
            echo '</td>';
            echo '</tr>';
            if ($row['description'] != '') {
                echo "<tr class='comment-{$count}' id='comment-{$count}'>";
                echo "<td style='background-color: #fff' colspan=5>";
                echo nl2brr($row['description']);
                echo '</td>';
                echo '</tr>';
            }
        }
        echo '</table>';
        if ($result->rowCount() > $_SESSION[$guid]['pagination']) {
            printPagination($guid, $result->rowCount(), $page, $_SESSION[$guid]['pagination'], 'bottom', "search={$search}");
        }
    }
}
开发者ID:GibbonEdu,项目名称:module-badges,代码行数:31,代码来源:badges_manage.php

示例15: printPagination

            <tr>
                <th>#</th>
                <th>店家名稱</th>
                <th>店家縮圖</th>
                <th>商城</th>
                <th>商品數量</th>
            </tr>
        </thead>
        <tbody>
        
        <?php 
for ($i = ($showpage - 1) * $each_page_count; $i < min($showpage * $each_page_count, sizeof($ary)); $i++) {
    $url = $ary[$i]["url"];
    $id = $ary[$i]["id"];
    $photo = $ary[$i]["photo"];
    echo "<td>" . ($i + 1) . "</td>" . "<td><a href='./store.php?id={$id}' >" . $ary[$i]["chinese_name"] . "</a></td>" . "<td><a href='{$photo}' download><img src='{$photo}'></td></a>" . "<td><a href='{$url}' target='_blank'>" . $source_ary[$ary[$i]["source"]] . "</a></td>" . "<td>" . $ary[$i]["count"] . "</td>" . "</tr>";
}
?>
  
        </tbody>
    </table>
    <?php 
printPagination($showpage, $page_max, "./store_list.php?page=%d");
?>

 
<?php 
include_once "footer.php";
?>

开发者ID:kaogaau,项目名称:Dashboard,代码行数:29,代码来源:store_list.php


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