Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 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());
 }