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


PHP pagination::bar方法代码示例

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


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

示例1: defaultAction

 function defaultAction()
 {
     $db = new sql();
     $db->connect();
     $chid = $this->chid;
     include "lib/pagination.class.php";
     include "lib/orderby.class.php";
     $adminConfig = admin::adminConfig();
     for ($i = 1; $i < 4; $i++) {
         $voteTR = "";
         $orderBy = new orderBy("?chid=" . $this->chid . "&", array("id" => "№", "time" => "Дата", "name" => "Заголовок", "company" => "Компания", "gsum" => "Средний бал", "gcount" => "Проголосовало"), array("gsum" => "desc"), $this->field[$i], $this->order[$i], array("field[{$i}]", "order[{$i}]"));
         $pagination = new pagination($orderBy->urlForPage(), $this->page, $adminConfig["recPerPage"], '', "projects", "id");
         $res = $db->query("select projects.id, name, company, category_name, date, sum(IF(grade is null,0, grade))/count(IF(grade is null,0, grade)) as gsum, count(grade) as gcount FROM (projects LEFT JOIN categories ON projects.category = categories.category_id) left join votes on projects.id=votes.id where category={$i} group by projects.id, name, company, category_name, date " . $orderBy->orderByQuery() . " " . $pagination->limit());
         $page = $this->page ? "&page=" . $this->page : "";
         while ($data = $db->fetch_array($res)) {
             $data["date"] = date("d.m.Y", $data["date"]);
             eval('$voteTR.="' . admin::template("voteTR") . '";');
         }
         $pageBar = $pagination->bar();
         $th = $orderBy->bar();
         eval('$content.="' . admin::template("voteMain") . '";');
         $content .= "<br>";
     }
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:25,代码来源:vote.class.php

示例2: defaultAction

 function defaultAction()
 {
     $db = new sql();
     $db->connect();
     $chid = $this->chid;
     include "lib/pagination.class.php";
     include "lib/orderby.class.php";
     $adminConfig = admin::adminConfig();
     $orderBy = new orderBy("?chid=" . $this->chid . "&", array("library" => "№", "time" => "Дата", "name" => "Заголовок", "short_text" => "Подзаголовок", "author" => "Автор"), array("library" => "desc"), $this->field, $this->order);
     $pagination = new pagination($orderBy->urlForPage(), $this->page, $adminConfig["recPerPage"], '', "library", "id");
     $res = $db->query("select library.id as library, name, short_text, time, authors.lastname as author FROM (library LEFT JOIN library_authors ON library.id = library_authors.library) LEFT JOIN authors ON library_authors.author = authors.id GROUP BY library.id" . $orderBy->orderByQuery() . " " . $pagination->limit());
     $page = $this->page ? "&page=" . $this->page : "";
     while ($data = $db->fetch_array($res)) {
         $res1 = $db->query("select id, firstname, secondname, lastname from library_authors left join authors on library_authors.author = authors.id where library_authors.library=" . $data["library"] . " order by lastname, firstname, secondname");
         $typeAuthorsID = admin::getTypeID("authors");
         while ($data1 = $db->fetch_array($res1)) {
             $data["fio"] .= "<li><a href=\"?chid={$typeAuthorsID}&action=edit&id={$data1['id']}\">" . $data1["lastname"] . ($data1["firstname"] ? " " . $data1["firstname"] : "") . ($data1["secondname"] ? " " . $data1["secondname"] : "") . "</a></li>";
         }
         $data["date"] = $data["time"] ? @date("d.m.Y", $data["time"]) : "";
         $data["fio"] = $data["fio"] ? "<ul>" . $data["fio"] . "</ul>" : "";
         eval('$libraryTR.="' . admin::template("libraryTR") . '";');
     }
     $pageBar = $pagination->bar();
     $th = $orderBy->bar();
     eval('$content="' . admin::template("libraryMain") . '";');
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:27,代码来源:library.class.php

示例3: defaultAction

 function defaultAction()
 {
     $db = new sql();
     $db->connect();
     $chid = $this->chid;
     include "lib/pagination.class.php";
     $adminConfig = admin::adminConfig();
     $pagination = new pagination("?chid=" . $this->chid . "&", $this->page, $adminConfig["recPerPage"], '', "news", "id");
     $res = $db->query("select id, time, title from news order by id desc " . $pagination->limit());
     $page = $this->page ? "&page=" . $this->page : "";
     while ($data = $db->fetch_array($res)) {
         $data["date"] = $data["time"] ? @date("d.m.Y", $data["time"]) : "";
         eval('$newsTR.="' . admin::template("newsTR") . '";');
     }
     $pageBar = $pagination->bar();
     eval('$content="' . admin::template("newsMain") . '";');
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:18,代码来源:news.class.php

示例4: sql

 function show_AllUsers()
 {
     $db = new sql();
     $db->connect();
     $chid = $this->chid;
     include "lib/pagination.class.php";
     include "lib/orderby.class.php";
     $adminConfig = admin::adminConfig();
     $orderBy = new orderBy("?chid=" . $this->chid . "&action=show_AllUsers&", array("id" => "№", "name" => "Имя", "email" => "E-mail"), array("name" => ""), $this->field, $this->order);
     $pagination = new pagination($orderBy->urlForPage(), $this->page, $adminConfig["recPerPage"], '', "subs_users", "id");
     $res = $db->query("select * from subs_users" . $orderBy->orderByQuery() . " " . $pagination->limit());
     if ($this->field) {
         $page = "&field={$this->field}";
     }
     if ($this->order) {
         $page .= "&order={$this->order}";
     }
     if ($this->page) {
         $page .= "&page={$this->page}";
     }
     while ($data = $db->fetch_array($res)) {
         $i++;
         eval('$subscribeAllUsersTR.="' . admin::template("subscribeAllUsersTR") . '";');
     }
     $th = $orderBy->bar();
     $pageBar = $pagination->bar();
     eval('$content="' . admin::template("subscribeAllUsersMain") . '";');
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:29,代码来源:subscribe.class.php


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