本文整理汇总了PHP中Paginate::getNext方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginate::getNext方法的具体用法?PHP Paginate::getNext怎么用?PHP Paginate::getNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paginate
的用法示例。
在下文中一共展示了Paginate::getNext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
//$this->test();
$user_rec = new Usr_Schm();
$user_rec->username = $_POST['username'] ? $_POST['username'] : "";
$user_rec->password = $_POST['password'] ? $_POST['password'] : "";
$user_rec->alias = $_POST['alias'] ? $_POST['alias'] : "";
$user_rec->email = $_POST['email'] ? $_POST['email'] : "";
$usernfo_rec = new Usrnfo_Schm();
$usernfo_rec->im = $_POST['im'] ? $_POST['im'] : "";
$usernfo_rec->name = $_POST['name'] ? $_POST['name'] : "";
$usernfo_rec->url = $_POST['url'] ? $_POST['url'] : "";
if (strlen($_POST['add'])) {
$this->add($user_rec);
}
if (strlen($_POST['edit'])) {
$this->edit($_POST['uid'], $user_rec, $usernfo_rec);
}
if (Util::isal_num($this->get['delete']) && $this->get['delete'] !== "") {
$this->delete($this->get['delete']);
$msg[] = "Record has been deleted with id: {$this->get['delete']}";
}
if (isset($this->get['page'])) {
$offset = ($this->get['page'] - 1) * DISPLAY_NUM;
if ($this->get['page'] <= 0) {
$offset = 0;
}
} else {
$offset = 0;
}
$records = "";
foreach ($this->getRecords(DISPLAY_NUM, $offset) as $row) {
$records .= "<tr>" . "<td>{$row['uid']}</td>" . "<td>{$row['username']}</td>" . "<td>{$row['alias']}</td>" . "<td>{$row['email']}</td>" . "<td>{$row['im']}</td>" . "<td>{$row['name']}</td>" . "<td>{$row['url']}</td>" . "<td><a href=\"/Users/edit/{$row['uid']}\">edit</a></td>" . "<td><a href=\"/Users/delete/{$row['uid']}\">delete</a></td>" . "</tr>\n";
}
$rec = null;
if (Util::isal_num($this->get['edit'])) {
$rec = $this->getRecord($this->get['edit']);
}
$output['content'] = $records;
$paginate = new Paginate();
$paginate->filename("/Users")->bond_id("page")->total($this->getRecordCount())->page_num($this->get['page'] - 1)->total_devisor(DISPLAY_NUM)->query_arg_array($this->get)->build();
$output['paginate'] = array('next' => $paginate->getNext(), 'prev' => $paginate->getPrev(), 'pages' => $paginate->getPages());
if ($this->get['submit'] == "true") {
echo "<pre>Submitting\n" . $this->outputText() . "</pre>";
exit;
}
$controller = Util::tpl_content('public/controller', 'users_tpl.php', array('get' => $this->get, 'output' => $output, 'rec' => $rec, 'msg' => $msg));
$index = Util::tpl_content('public/body', 'index_tpl.php', array('get' => $this->get, 'title' => "Users"));
echo Util::tpl_body($controller, $index);
if (SYSDEBUG) {
echo $this->outputLogHTML();
}
}