本文整理汇总了PHP中Pages::browser方法的典型用法代码示例。如果您正苦于以下问题:PHP Pages::browser方法的具体用法?PHP Pages::browser怎么用?PHP Pages::browser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pages
的用法示例。
在下文中一共展示了Pages::browser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acp_tags
public function acp_tags()
{
$sql = new MySQLObject();
$p = new Pages();
$p->per_page = 50;
$p->url = './acp.php?c=blog&section=tag&page=%page';
$p->query = "SELECT `tag`,`header`,COUNT(*) as count\r\nFROM " . $sql->table('blog_tags') . "\r\nGROUP BY `tag`\r\nORDER BY count DESC";
$p->make();
$f_tags = array();
foreach ($p->fetch() as $tag) {
$f_tags[] = array('TAG_HEADER' => $tag->header, 'TAG_TAG' => $tag->tag, 'TAG_LINK_EDIT' => './acp.php?c=blog&section=tag&mode=edit&tag=' . $tag->tag, 'TAG_LINK_DELETE' => './action.php?c=blog&section=tag&mode=delete&tag=' . $tag->tag, 'TAG_COUNT' => $tag->count);
}
global $tpl;
$tpl->assign('BLOG_TAGS', $f_tags, 'foreach');
$tpl->assign('BLOG_TAGS_BROWSER', $p->browser());
}
示例2: userlist
public function userlist()
{
global $q, $tpl;
$p = new Pages();
$p->url = './acp.php?c=users&section=users&mode=userlist&page=%page';
$p->per_page = 25;
$p->query = "SELECT `uid`,`username` FROM " . $q->table('users') . " ORDER BY `uid` ASC";
$f_users = array();
if ($p->make()) {
foreach ($p->fetch() as $user) {
$f_users[] = array('USER_ID' => $user->uid, 'USER_USERNAME' => $user->username, 'USER_LINK_READ' => './acp.php?c=users&section=user&mode=read&uid=' . $user->uid, 'USER_LINK_EDIT' => './acp.php?c=users&section=user&mode=edit&uid=' . $user->uid, 'USER_LINK_DELETE' => './action.php?c=users&section=user&mode=delete&uid=' . $user->uid);
}
}
$tpl->assign('USERS_USERLIST', $f_users, 'foreach');
$tpl->assign('USERS_BROWSER', $p->browser());
}
示例3: groups_getGrouplist
public function groups_getGrouplist()
{
$sql = new SQLObject();
$p = new Pages();
$p->url = './acp.php?c=users&section=groups&page=%page';
$p->per_page = 25;
$p->query = "SELECT group_id,group_name,group_description FROM " . $sql->table('auth_groups') . " ORDER BY group_name ASC";
$f_groups = array();
if ($p->make()) {
foreach ($p->fetch() as $group) {
$f_groups[] = array('GROUP_ID' => $group->group_id, 'GROUP_NAME' => $group->group_name, 'GROUP_DESCRIPTION' => $group->group_description, 'GROUP_ACTION_EDIT' => './acp.php?c=users&section=groups&mode=edit', 'GROUP_ACTION_DELETE' => './action.php?c=users&section=groups&mode=delete&group_id=' . $group->group_id, 'conds' => array('ANONYMOUS' => (int) $group->group_id == -1 ? true : false));
}
}
core::s('tpl')->assignLoop('AUTH_GROUPLIST', $f_groups);
TPL::add('PAGES_GROUPLIST', $p->browser());
}