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


PHP Paginator::page_links方法代码示例

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


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

示例1: index

 public function index()
 {
     $this->view->js_link[] = $this->make_link('js', SITE_ASSETS, 'pages/sidebar_search.js');
     $this->view->js_link[] = $this->make_link('js', SITE_ASSETS, 'pages/common.js');
     // alapbeállítások lekérdezése
     $this->view->settings = $this->munkak_model->get_settings();
     // 3 legfrissebb munka
     $this->view->latest_jobs = $this->munkak_model->jobs_query(3);
     $this->view->title = 'Munka diákoknak | Multijob Iskolaszövetkezet.';
     $this->view->description = 'Munka diákoknak a Multijob Iskolaszövetkezetnél. Diákmunka az ország több területén.';
     $this->view->keywords = 'diákmunka, alkalmi munka, multijob';
     // paginator
     include LIBS . '/pagine_class.php';
     // paginátor objektum létrehozása (paraméter neve, limit)
     $pagine = new Paginator('oldal', 9);
     // adatok lekérdezése limittel
     $this->view->jobs_data = $this->munkak_model->jobs_filter_query($pagine->get_limit(), $pagine->get_offset());
     // szűrési feltételeknek megfelelő összes rekord száma
     $filter_count = $this->munkak_model->jobs_filter_count_query();
     $pagine->set_total($filter_count);
     // lapozó linkek
     $this->view->pagine_links = $pagine->page_links($this->registry->uri_path);
     //$this->view->debug(true);
     $this->view->render('munkak/tpl_munkak');
 }
开发者ID:hillmediakft,项目名称:multijob,代码行数:25,代码来源:munkak.php

示例2: cat

 public function cat($slug)
 {
     $pages = new Paginator('10', 'page');
     $pages->set_total(count($this->_model->getcatposttotal($slug)));
     $data['posts'] = $this->_model->getcatposts($slug, $pages->get_limit());
     $data['page_links'] = $pages->page_links();
     $data['cats'] = $this->_model->getcats();
     $data['title'] = $data['posts'][0]->catTitle;
     View::rendertemplate('header', $data);
     View::render('blog/cats', $data);
     View::rendertemplate('footer', $data);
 }
开发者ID:fabioassuncao,项目名称:build-a-blog,代码行数:12,代码来源:blog.php

示例3: catch

        ?>
                                </td>

                                <?php 
        echo '</tr>';
    }
} catch (PDOException $e) {
    echo $e->getMessage();
}
?>
        </table>

	<br />

	<?php 
echo $pages->page_links();
?>

	<p style="text-align: right;">
		<a href="add-user.php" style="text-decoration: none;"><input type="button" class="button" value="Ajouter un membre" /></a>
	</p>
	</div>
        
	<?php 
require '../sidebar.php';
?>
        
    	<div class="clear"></div>
    </div>
</div>
开发者ID:sybix,项目名称:freeostorrent,代码行数:30,代码来源:users.php

示例4: catch

		     			data-ad-slot="9006638131"></ins></center>
					<script>
						(adsbygoogle = window.adsbygoogle || []).push({});
					</script>';
            echo '</div>';
            echo '</div>';
        }
    }
} catch (PDOException $e) {
    echo $e->getMessage();
}
?>
			</div>
			<div class="pagination col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<?php 
echo $pages->page_links('c-' . $_GET['id'] . '&');
?>
			</div>
        </div>
		</div>
	</div>
	<footer class="footer">
      <div class="container">
        <a href="index.php"><img id="footer-image" src="images/the_jungle_times-square-transparent.png"></a>
        <div id="footer-text">
        	<p align="right" class="text-muted"><a href="http://www.twitter.com/TheJungleTimes" target="_blank">Twitter</a> | <a href="http://www.facebook.com/TheJungleTimes" target="_blank">Facebook</a></p>
        	<p align="right" class="text-muted">&copy; 2015 <strong>The Jungle Times</strong></p>
        	<p align="right" class="text-muted">Site by <a href="http://www.jacobvarner.com" target="_blank">Jacob Varner</a></p>
      	</div>
      </div>
    </footer>
开发者ID:jacobvarner,项目名称:aujungletimes-php,代码行数:31,代码来源:catpost.php

示例5: while

    while ($row = $stmt->fetch()) {
        echo '<br /><div><fieldset>';
        echo '<span style="font-weight: bold; font-size: 12pt;"><a style="text-decoration: none;" href="' . $row['postSlug'] . '">' . $row['postTitle'] . '</a></span>';
        echo '<br />Posté le ' . date('j M Y', strtotime($row['postDate'])) . ', dans ';
        $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID');
        $stmt2->execute(array(':postID' => $row['postID']));
        $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC);
        $links = array();
        foreach ($catRow as $cat) {
            $links[] = "<a href='c-" . $cat['catSlug'] . "'>" . $cat['catTitle'] . "</a>";
        }
        echo implode(", ", $links);
        echo '</div></fieldset>';
    }
    echo '<br /><br />';
    echo $pages->page_links("a-{$month}-{$year}&");
} catch (PDOException $e) {
    echo $e->getMessage();
}
?>
				        </div>
        
	<?php 
require 'sidebar.php';
?>
        
    	<div class="clear"></div>
    </div>
</div>

<div id="footer">
开发者ID:sybix,项目名称:freeostorrent,代码行数:31,代码来源:archives.php

示例6: catch

        if (intval($row["downloaded"]) > 0) {
            $ratio = number_format($row["uploaded"] / $row["downloaded"], 2);
        } else {
            $ratio = '&#8734;';
        }
        echo '<td style="text-align: center;">' . $ratio . '</td>';
        echo '</tr>';
    }
} catch (PDOException $e) {
    echo $e->getMessage();
}
?>
        </table>

	<?php 
echo $pages->page_links('?tri=' . $tri . '&ordre=' . $ordre . '&');
?>

</div>

	<?php 
require 'sidebar.php';
?>
        
    	<div class="clear"></div>
    </div>
</div>

<div id="footer">
	<?php 
require 'includes/footer.php';
开发者ID:sybix,项目名称:freeostorrent,代码行数:31,代码来源:membres.php

示例7: displayView

 function displayView($view, $id = 0)
 {
     $tpl_vars = array();
     switch ($view) {
         case 'about':
             break;
         case 'config':
             $dev_infos = $this->_getPocheVersion('dev');
             $dev = trim($dev_infos[0]);
             $check_time_dev = date('d-M-Y H:i', $dev_infos[1]);
             $prod_infos = $this->_getPocheVersion('prod');
             $prod = trim($prod_infos[0]);
             $check_time_prod = date('d-M-Y H:i', $prod_infos[1]);
             $compare_dev = version_compare(POCHE, $dev);
             $compare_prod = version_compare(POCHE, $prod);
             $themes = $this->tpl->getInstalledThemes();
             $languages = $this->language->getInstalledLanguages();
             $token = $this->user->getConfigValue('token');
             $http_auth = isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['REMOTE_USER']) ? true : false;
             $only_user = $this->store->listUsers() > 1 ? false : true;
             $tpl_vars = array('themes' => $themes, 'languages' => $languages, 'dev' => $dev, 'prod' => $prod, 'check_time_dev' => $check_time_dev, 'check_time_prod' => $check_time_prod, 'compare_dev' => $compare_dev, 'compare_prod' => $compare_prod, 'token' => $token, 'user_id' => $this->user->getId(), 'http_auth' => $http_auth, 'only_user' => $only_user);
             Tools::logm('config view');
             break;
         case 'edit-tags':
             # tags
             $entry = $this->store->retrieveOneById($id, $this->user->getId());
             if (!$entry) {
                 $this->messages->add('e', _('Article not found!'));
                 Tools::logm('error : article not found');
                 Tools::redirect();
             }
             $tags = $this->store->retrieveTagsByEntry($id);
             $tpl_vars = array('entry_id' => $id, 'tags' => $tags, 'entry' => $entry);
             break;
         case 'tags':
             $token = $this->user->getConfigValue('token');
             //if term is set - search tags for this term
             $term = Tools::checkVar('term');
             $tags = $this->store->retrieveAllTags($this->user->getId(), $term);
             if (Tools::isAjaxRequest()) {
                 $result = array();
                 foreach ($tags as $tag) {
                     $result[] = $tag['value'];
                 }
                 echo json_encode($result);
                 exit;
             }
             $tpl_vars = array('token' => $token, 'user_id' => $this->user->getId(), 'tags' => $tags);
             break;
         case 'search':
             if (isset($_GET['search'])) {
                 $search = filter_var($_GET['search'], FILTER_SANITIZE_STRING);
                 $tpl_vars['entries'] = $this->store->search($search, $this->user->getId());
                 $count = count($tpl_vars['entries']);
                 $this->pagination->set_total($count);
                 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')), $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&'));
                 $tpl_vars['page_links'] = $page_links;
                 $tpl_vars['nb_results'] = $count;
                 $tpl_vars['searchterm'] = $search;
             }
             break;
         case 'view':
             $entry = $this->store->retrieveOneById($id, $this->user->getId());
             if ($entry != NULL) {
                 Tools::logm('view link #' . $id);
                 $content = $entry['content'];
                 if (function_exists('tidy_parse_string')) {
                     $tidy = tidy_parse_string($content, array('indent' => true, 'show-body-only' => true), 'UTF8');
                     $tidy->cleanRepair();
                     $content = $tidy->value;
                 }
                 # flattr checking
                 $flattr = NULL;
                 if (FLATTR) {
                     $flattr = new FlattrItem();
                     $flattr->checkItem($entry['url'], $entry['id']);
                 }
                 # tags
                 $tags = $this->store->retrieveTagsByEntry($entry['id']);
                 $tpl_vars = array('entry' => $entry, 'content' => $content, 'flattr' => $flattr, 'tags' => $tags);
             } else {
                 Tools::logm('error in view call : entry is null');
             }
             break;
         default:
             # home, favorites, archive and tag views
             $tpl_vars = array('entries' => '', 'page_links' => '', 'nb_results' => '', 'listmode' => isset($_COOKIE['listmode']) ? true : false);
             //if id is given - we retrieve entries by tag: id is tag id
             if ($id) {
                 $tpl_vars['tag'] = $this->store->retrieveTag($id, $this->user->getId());
                 $tpl_vars['id'] = intval($id);
             }
             $count = $this->store->getEntriesByViewCount($view, $this->user->getId(), $id);
             if ($count > 0) {
                 $this->pagination->set_total($count);
                 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')), $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . ($id ? '&id=' . $id : '') . '&'));
                 $tpl_vars['entries'] = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit(), $id);
                 $tpl_vars['page_links'] = $page_links;
                 $tpl_vars['nb_results'] = $count;
             }
//.........这里部分代码省略.........
开发者ID:nsbasicus,项目名称:wallabag,代码行数:101,代码来源:Poche.class.php

示例8: sscanf

            //$tablerow = ($x%2 == 0)? 'tableRow1': 'tableRow2';
            //$tablerow = ++$i % 2 ? 'tableRow1':'tableRow2';
            //echo '<tr class="'.$tablerow.'">';
            echo '<tr>';
            sscanf($data['messages_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde);
            echo '<td>' . $jour . '-' . $mois . '-' . $annee . ' à ' . $heure . ':' . $minute . ':' . $seconde . '</td>';
            echo '<td><a style="text-decoration: none;" href="' . SITEURL . '/messages_lire.php?id_message=' . $data['id_message'] . '">' . stripslashes(htmlentities(trim($data['messages_titre']), ENT_QUOTES, "UTF-8")) . '</a></td>';
            echo '<td>' . stripslashes(htmlentities(trim($data['expediteur']), ENT_QUOTES, "UTF-8")) . '</td>';
            echo '</tr>';
        }
        ?>
</table>

<?php 
        echo '<div style="text-align: center;">';
        echo $pages->page_links('?membre=' . $row['username'] . '&');
        echo '</div>';
        ?>

	<br /><br />

	<?php 
    }
    // fin else
    ?>

       	</div>
        
	<?php 
    require '../sidebar.php';
    ?>
开发者ID:sybix,项目名称:freeostorrent,代码行数:31,代码来源:profil.php

示例9: displayView

 function displayView($view, $id = 0)
 {
     $tpl_vars = array();
     switch ($view) {
         case 'about':
             break;
         case 'config':
             $dev_infos = $this->_getPocheVersion('dev');
             $dev = trim($dev_infos[0]);
             $check_time_dev = date('d-M-Y H:i', $dev_infos[1]);
             $prod_infos = $this->_getPocheVersion('prod');
             $prod = trim($prod_infos[0]);
             $check_time_prod = date('d-M-Y H:i', $prod_infos[1]);
             $compare_dev = version_compare(POCHE, $dev);
             $compare_prod = version_compare(POCHE, $prod);
             $themes = $this->tpl->getInstalledThemes();
             $languages = $this->language->getInstalledLanguages();
             $token = $this->user->getConfigValue('token');
             $http_auth = isset($_SERVER['REMOTE_USER']);
             $only_user = $this->store->listUsers() > 1 ? false : true;
             $https = substr(Tools::getPocheUrl(), 0, 5) == 'https';
             $tpl_vars = array('themes' => $themes, 'languages' => $languages, 'dev' => $dev, 'prod' => $prod, 'check_time_dev' => $check_time_dev, 'check_time_prod' => $check_time_prod, 'compare_dev' => $compare_dev, 'compare_prod' => $compare_prod, 'token' => $token, 'user_id' => $this->user->getId(), 'http_auth' => $http_auth, 'only_user' => $only_user, 'https' => $https);
             Tools::logm('config view');
             break;
         case 'edit-tags':
             # tags
             $entry = $this->store->retrieveOneById($id, $this->user->getId());
             if (!$entry) {
                 $this->messages->add('e', _('Article not found!'));
                 Tools::logm('error : article not found');
                 Tools::redirect();
             }
             $tags = $this->store->retrieveTagsByEntry($id);
             $all_tags = $this->store->retrieveAllTags($this->user->getId());
             $maximus = 0;
             foreach ($all_tags as $eachtag) {
                 // search for the most times a tag is present
                 if ($eachtag["entriescount"] > $maximus) {
                     $maximus = $eachtag["entriescount"];
                 }
             }
             foreach ($all_tags as $key => $eachtag) {
                 // get the percentage of presence of each tag
                 $percent = floor($eachtag["entriescount"] / $maximus * 100);
                 if ($percent < 20) {
                     // assign a css class, depending on the number of entries count
                     $cssclass = 'smallesttag';
                 } elseif ($percent >= 20 and $percent < 40) {
                     $cssclass = 'smalltag';
                 } elseif ($percent >= 40 and $percent < 60) {
                     $cssclass = 'mediumtag';
                 } elseif ($percent >= 60 and $percent < 80) {
                     $cssclass = 'largetag';
                 } else {
                     $cssclass = 'largesttag';
                 }
                 $all_tags[$key]['cssclass'] = $cssclass;
             }
             $tpl_vars = array('entry_id' => $id, 'tags' => $tags, 'alltags' => $all_tags, 'entry' => $entry);
             break;
         case 'tags':
             $token = $this->user->getConfigValue('token');
             //if term is set - search tags for this term
             $term = Tools::checkVar('term');
             $tags = $this->store->retrieveAllTags($this->user->getId(), $term);
             if (Tools::isAjaxRequest()) {
                 $result = array();
                 foreach ($tags as $tag) {
                     $result[] = $tag['value'];
                 }
                 echo json_encode($result);
                 exit;
             }
             $tpl_vars = array('token' => $token, 'user_id' => $this->user->getId(), 'tags' => $tags);
             break;
         case 'search':
             if (isset($_GET['search'])) {
                 $search = filter_var($_GET['search'], FILTER_SANITIZE_STRING);
                 $tpl_vars['entries'] = $this->store->search($search, $this->user->getId());
                 $count = count($tpl_vars['entries']);
                 $this->pagination->set_total($count);
                 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')), $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&'));
                 $tpl_vars['page_links'] = $page_links;
                 $tpl_vars['nb_results'] = $count;
                 $tpl_vars['searchterm'] = $search;
             }
             break;
         case 'view':
             $entry = $this->store->retrieveOneById($id, $this->user->getId());
             if ($entry != NULL) {
                 Tools::logm('view link #' . $id);
                 $content = $entry['content'];
                 if (function_exists('tidy_parse_string')) {
                     $tidy = tidy_parse_string($content, array('indent' => true, 'show-body-only' => true), 'UTF8');
                     $tidy->cleanRepair();
                     $content = $tidy->value;
                 }
                 # flattr checking
                 $flattr = NULL;
                 if (FLATTR) {
//.........这里部分代码省略.........
开发者ID:Kwadz,项目名称:wallabag,代码行数:101,代码来源:Poche.class.php


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