setURL(); # Page text $htmlText = ''.sprintf(__('Page %s over %s'),$this->env,$this->nb_pages).''; # Previous page if($this->env != 1) { $htmlPrev = ''; } # Next page if($this->env != $this->nb_pages) { $htmlNext = ''; } # Start if($this->env != 1) { $htmlStart = ''. $htmlStart .= $this->html_start.''; } # End if($this->env != $this->nb_pages) { $htmlEnd = ''. $htmlEnd .= $this->html_end.''; } # Direct acces $htmlDirectAccess = ''.__('Direct access to page').' '. form::field(array('page'),3,3,$this->env).' '. ''. ''; # Hidden fields foreach ($_GET as $k => $v) { if ($k != $this->var_page) { $htmlHidden .= form::hidden(array($k),$v); } } $res = '

'. $htmlStart. $htmlPrev. $htmlText. $htmlNext. $htmlEnd. $htmlDirectAccess. $htmlHidden. '

'; return $this->nb_elements > 0 ? $res : ''; } } /** @ingroup DC_CORE @nosubgrouping @brief Dotclear items column class. Dotclear items column handles each column object use in adminItemsList class. */ class adminItemsColumn { protected $core; /// object dcCore object protected $id; /// string ID of defined column protected $alias; /// string ID of defined column protected $title; /// string Title of defined column protected $callback; /// array Callback calls to display defined column protected $html; /// array Extra HTML for defined column /** Inits Generic column object @param id string Column id @param alias string Column alias for SQL @param title string Column title (for table headers) @param callback array Column callback (used for display) @param html array Extra html (used for table headers) @param sortable boolean Defines if the column can be sorted or not @param listable boolean Defines if the column can be listed or not @param can_hide boolean Defines if the column can be hidden or not */ public function __construct($id,$alias,$title,$callback,$html = null,$sortable = true,$listable = true,$can_hide = true) { if (!is_string($id) || $id === '') { throw new Exception(__('Invalid column ID')); } if (!is_string($title)) { throw new Exception(__('Invalid column title')); } if (is_null($html) || !is_array($html)) { $html = array(); } if (!is_bool($sortable)) { $sortable = true; } if (!is_bool($listable)) { $listable = true; } if (!is_bool($can_hide)) { $can_hide = true; } if (!is_string($alias) && $sortable) { throw new Exception(__('Invalid column alias')); } try { if (!is_array($callback) || count($callback) < 2) { throw new Exception(__('Callback parameter should be an array')); } $r = new ReflectionClass($callback[0]); $f = $r->getMethod($callback[1]); $p = $r->getParentClass(); $find_parent = false; while (!$p) { if ($p->name == 'adminItemsList') { $find_parent = true; } else { $p->getParentClass(); } } if (!$p || !$f) { throw new Exception(__('Callback class should be inherited of adminItemsList class')); } } catch (Exception $e) { throw new Exception(sprintf(__('Invalid column callback: %s'),$e->getMessage())); } $this->id = $id; $this->alias = $alias; $this->title = $title; $this->callback = $callback; $this->html = $html; $this->sortable = $sortable; $this->listable = $listable; $this->can_hide = $can_hide; $this->visibility = true; } /** Gets information of defined column @param info string Column info to retrive @return mixed The information requested, null otherwise */ public function getInfo($info) { return property_exists(get_class($this),$info) ? $this->{$info} : null; } /** Sets visibility of defined column @param visibility boolean Column visibility */ public function setVisibility($visibility) { if (is_bool($visibility) && $this->can_hide) { $this->visibility = $visibility; } else { $this->visibility = true; } } /** Returns visibility status of defined column @return boolean true if column is visible, false otherwise */ public function isVisible() { return $this->visibility; } /** Returns if the defined column can be sorted @return boolean true if column is sortable, false otherwise */ public function isSortable() { return $this->sortable; } /** Returns if the defined column can be listed @return boolean true if column is listable, false otherwise */ public function isListable() { return $this->listable; } /** Returns if the defined column can be hidden @return boolean true if column can be hidden, false otherwise */ public function canHide() { return $this->can_hide; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract items list class. Dotclear items list handles administration lists */ abstract class adminItemsList implements dcFilterExtraInterface { protected $core; protected $rs; protected $rs_count; protected $columns; protected $sortby; protected $order; protected $nb_per_page; protected $page; protected $default_sortby; protected $default_order; /* Sets columns of defined list */ abstract function setColumns(); /** Inits List object @param core dcCore dcCore object */ public function __construct($core) { $this->core = $core; $this->context = get_class($this); $this->columns = new ArrayObject(); $this->form_prefix = 'col_'; $this->html_prev = __('prev'); $this->html_next = __('next'); $this->html_start = __('start'); $this->html_end = __('end'); $this->nb_per_page = 10; $this->page = 1; $this->setColumns(); # --BEHAVIOR-- adminItemsListConstruct $core->callBehavior('adminItemsListConstruct',$this); } public function __clone() { $arr = new ArrayObject(); foreach ($this->columns as $k=>$v) { $arr[$k]= clone $v; } $this->columns = $arr; } /** Apply limit, sortby and order filters to items parameters @param params array Items parameters @return array Items parameters */ public function applyFilters($params) { if (!is_null($this->sortby) && !is_null($this->order)) { if ( isset($this->columns[$this->sortby]) && in_array($this->order,array('asc','desc')) ) { $params['order'] = $this->columns[$this->sortby]->getInfo('alias').' '.$this->order; } } $params['limit'] = array((($this->page-1)*$this->nb_per_page),$this->nb_per_page); return $params; } /** Sets items and items counter @param rs recordSet Items recordSet to display @param rs_count int Total items number */ public function setItems($rs,$rs_count) { $this->rs = $rs; $this->rs_count = $rs_count; } /** Returns HTML code form used to choose which column to display @return string HTML code form */ public function getFormContent() { $block = '

'.__('Displayed information').'

'. ''; $list = array(); $sortby_combo = array(); foreach ($this->columns as $k => $v) { $col_id = $this->form_prefix.$k; $col_label = sprintf('',$col_id,$v->getInfo('title')); $col_html = sprintf('
  • %s
  • ',$col_label.form::checkbox($col_id,1,$v->isVisible(),null,null,!$v->canHide())); if ($v->isListable()) { array_push($list,$col_html); } $sortby_combo[$v->getInfo('title')] = $k; } $order_combo = array( __('Descending') => 'desc', __('Ascending') => 'asc' ); $nb_per_page = !is_null($this->nb_per_page) ? $this->nb_per_page : 10; return sprintf($block,implode('',$list)). '

     '.form::field('nb_per_page',3,3,$nb_per_page). '

    '. '

     '.form::combo('sortby',$sortby_combo,$this->sortby). '

    '. '

     '.form::combo('order',$order_combo,$this->order). '

    '; } public function updateRequestParams($params) { if (!is_null($this->sortby) && isset($this->columns[$this->sortby])) { $params['sortby'] = $this->columns[$this->sortby]->getInfo('alias'); } if (!is_null($this->order)) { $params['order'] = $this->order; } if (!is_null($this->nb_per_page)) { $params['nb_per_page'] = $this->nb_per_page; } if (!is_null($this->page)) { $params['page'] = $this->page; } foreach ($this->columns as $k => $v) { if($v->isVisible()) $params[$this->form_prefix.$k] = 1; } } /** Returns HTML hidden fields for list options @return string HTML hidden fields */ public function getFormFieldsAsHidden() { $res = ''; if (!is_null($this->sortby)) { $res .= form::hidden(array('sortby'),$this->sortby); } if (!is_null($this->order)) { $res .= form::hidden(array('order'),$this->order); } if (!is_null($this->nb_per_page)) { $res .= form::hidden(array('nb_per_page'),$this->nb_per_page); } if (!is_null($this->page)) { $res .= form::hidden(array('page'),$this->page); } return $res; } /** Returns HTML code list to display @param enclose_block string HTML wrapper of defined list @return string HTML code list */ public function display($enclose_block = '') { if ($this->rs->isEmpty()) { echo '

    '.__('No item').'

    '; } else { $pager = new adminItemsPager($this->page,$this->rs_count,$this->nb_per_page,10); $pager->html_prev = $this->html_prev; $pager->html_next = $this->html_next; $pager->html_start = $this->html_start; $pager->html_end = $this->html_end; $pager->var_page = 'page'; $html_block = ''. $this->getCaption($this->page). ''; foreach ($this->columns as $k => $v) { if ($v->isVisible()) { $title = $v->getInfo('title'); if ($v->isSortable()) { $title = sprintf('%1$s',$title,$this->getSortLink($v)); } $html_extra = ''; foreach ($v->getInfo('html') as $i => $j) { $html_extra = $i.'="'.implode(' ',$j).'"'; } $html_extra = !empty($html_extra) ? ' '.$html_extra : ''; $html_block .= sprintf('',$title,$html_extra); } } $html_block .= ''. '%s'. '
    %1$s
    '; if ($enclose_block) { $html_block = sprintf($enclose_block,$html_block); } echo ''; $blocks = explode('%s',$html_block); echo $blocks[0]; while ($this->rs->fetch()) { echo $this->displayLine(); } echo $blocks[1]; echo ''; } } /** Adds column to defined list @param id string Column id @param alias string Column alias for SQL @param title string Column title (for table headers) @param callback array Column callback (used for display) @param html string Extra html (used for table headers) @param sortable boolean Defines if the column can be sorted or not @param listable boolean Defines if the column can be listed or not @param can_hide boolean Defines if the column can be hidden or not */ protected function addColumn($id,$alias,$title,$callback,$html = null,$sortable = true,$listable = true,$can_hide = true) { try { if (is_null($html) || !is_array($html)) { $html = array(); } if ($this->sortby === $alias && !is_null($this->order)) { if (array_key_exists('class',$html)) { array_push($html['class'],$this->order); } else { $html['class'] = array($this->order); } } $c = new adminItemsColumn($id,$alias,$title,$callback,$html,$sortable,$listable,$can_hide); $this->columns[$id] = $c; } catch (Exception $e) { if (DC_DEBUG) { $this->core->error->add(sprintf('[%s] %s',$id,$e->getMessage())); } } } /** Returns default caption text @return string Default caption */ protected function getDefaultCaption() { return; } /** Returns default HTML code line @return string Default HTMl code line */ protected function getDefaultLine() { return '%s'; } /** Loads list from user settings */ public function load() { $ws = $this->core->auth->user_prefs->addWorkspace('lists'); $user_pref = !is_null($ws->{$this->context.'_opts'}) ? unserialize($ws->{$this->context.'_opts'}) : array(); $this->sortby = array_key_exists('sortby',$user_pref) ? $user_pref['sortby'] : $this->default_sortby; $this->order = array_key_exists('order',$user_pref) ? $user_pref['order'] : $this->default_order; $this->nb_per_page = array_key_exists('nb_per_page',$user_pref) ? $user_pref['nb_per_page'] : 10; $user_pref = !is_null($ws->{$this->context.'_col'}) ? unserialize($ws->{$this->context.'_col'}) : array(); foreach ($this->columns as $k => $v) { $visibility = array_key_exists($k,$user_pref) ? $user_pref[$k] : true; $v->setVisibility($visibility); } if ($this->sortby != null && !isset($this->columns[$this->sortby])) { // No alias found $this->sortby=$this->default_sortby; $this->order=$this->default_order; } } /** Saves list to user settings */ public function save() { $ws = $this->core->auth->user_prefs->addWorkspace('lists'); $user_pref = !is_null($ws->{$this->context.'_opts'}) ? unserialize($ws->{$this->context.'_opts'}) : array(); $user_pref['order'] = $this->order; $user_pref['nb_per_page'] = $this->nb_per_page; $user_pref['sortby'] = $this->sortby; $this->core->auth->user_prefs->lists->put($this->context.'_opts',serialize($user_pref),'string'); $user_pref = !is_null($ws->{$this->context.'_col'}) ? unserialize($ws->{$this->context.'_col'}) : array(); foreach ($this->columns as $k => $v) { $user_pref[$k] = $v->isVisible(); } $this->core->auth->user_prefs->lists->put($this->context.'_col',serialize($user_pref),'string'); } /** Set dedicated data from form submission (either $_GET or $_POST depending on the context @param data array Data to retrieve information from */ public function initializeFromData ($data) { $load_from_settings = true; foreach ($data as $k=>$v) { if (strpos($k,$this->form_prefix) === 0) { $load_from_settings = false; } } if ($load_from_settings) { $this->load(); } # Sortby $this->sortby = array_key_exists('sortby',$data) ? $data['sortby'] : $this->sortby; $this->order = array_key_exists('order',$data) ? $data['order'] : $this->order; $this->nb_per_page = array_key_exists('nb_per_page',$data) ? (integer) $data['nb_per_page'] : $this->nb_per_page; # Page $this->page = array_key_exists('page',$data) ? (integer) $data['page'] : 1; if ($load_from_settings) return; foreach ($this->columns as $k => $v) { $key = $this->form_prefix.$k; $visibility = !array_key_exists($key,$data) ? false : true; $v->setVisibility($visibility); } } /** Returns HTML code for each line of defined list @return string HTML code line */ private function displayLine() { $res = ''; foreach ($this->columns as $k => $v) { if ($v->isVisible()) { $c = $v->getInfo('callback'); $res .= $this->{$c[1]}(); } } return sprintf($this->getDefaultLine(),$res); } /** Returns caption of defined list @param page string|int Current page @return string HTML caption tag */ private function getCaption($page) { $caption = $this->getDefaultCaption(); if (!empty($caption)) { $caption = sprintf( '%s - %s', $caption,sprintf(__('Page %s'),$page) ); } return $caption; } /** Returns link to sort the defined column @param c adminGenericColumn Current column @return string HTML link */ private function getSortLink($c) { $order = 'desc'; if (!is_null($this->sortby) && $this->sortby === $c->getInfo('id')) { if (!is_null($this->order) && $this->order === $order) { $order = 'asc'; } } $args = $_GET; $args['sortby'] = $c->getInfo('id'); $args['order'] = $order; array_walk($args,create_function('&$v,$k','$v=$k."=".$v;')); $url = $_SERVER['PHP_SELF']; $url .= '?'.implode('&',$args); return $url; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract posts list class. Handle posts list on admin side */ class adminPostList extends adminItemsList { public function setColumns() { $this->addColumn('title','post_title',__('Title'),array('adminPostList','getTitle'),array('class' => array('maximal')),true,true,false); $this->addColumn('date','post_dt',__('Date'),array('adminPostList','getDate')); $this->addColumn('datetime','post_dt',__('Date and time'),array('adminPostList','getDateTime')); $this->addColumn('category','cat_title',__('Category'),array('adminPostList','getCategory')); $this->addColumn('author','user_id',__('Author'),array('adminPostList','getAuthor')); $this->addColumn('comments','nb_comment',__('Comments'),array('adminPostList','getComments')); $this->addColumn('trackbacks','nb_trackback',__('Trackbacks'),array('adminPostList','getTrackbacks')); $this->addColumn('status','post_status',__('Status'),array('adminPostList','getStatus')); $this->default_sortby = 'datetime'; $this->default_order = 'desc'; } protected function getDefaultCaption() { return __('Entries list'); } protected function getDefaultLine() { return '%s'; } protected function getTitle() { return ''. form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).' '. ''. html::escapeHTML($this->rs->post_title).''; } protected function getDate() { return ''.dt::dt2str(__('%Y-%m-%d'),$this->rs->post_dt).''; } protected function getDateTime() { return ''.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).''; } protected function getCategory() { if ($this->core->auth->check('categories',$this->core->blog->id)) { $cat_link = '%s'; } else { $cat_link = '%2$s'; } if ($this->rs->cat_title) { $cat_title = sprintf($cat_link,$this->rs->cat_id, html::escapeHTML($this->rs->cat_title)); } else { $cat_title = __('None'); } return ''.$cat_title.''; } protected function getAuthor() { return ''.$this->rs->user_id.''; } protected function getComments() { return ''.$this->rs->nb_comment.''; } protected function getTrackbacks() { return ''.$this->rs->nb_trackback.''; } protected function getStatus() { $img = '%1$s'; switch ($this->rs->post_status) { case 1: $img_status = sprintf($img,__('published'),'check-on.png'); break; case 0: $img_status = sprintf($img,__('unpublished'),'check-off.png'); break; case -1: $img_status = sprintf($img,__('scheduled'),'scheduled.png'); break; case -2: $img_status = sprintf($img,__('pending'),'check-wrn.png'); break; } $protected = ''; if ($this->rs->post_password) { $protected = sprintf($img,__('protected'),'locker.png'); } $selected = ''; if ($this->rs->post_selected) { $selected = sprintf($img,__('selected'),'selected.png'); } $attach = ''; $nb_media = $this->rs->countMedia(); if ($nb_media > 0) { $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments'); $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); } return ''.$img_status.' '.$selected.' '.$protected.' '.$attach.''; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract mini posts list class. Handle mini posts list on admin side (used for link popup) */ class adminPostMiniList extends adminPostList { public function setColumns() { $this->addColumn('title','post_title',__('Title'),array('adminPostMiniList','getTitle'),array('class' => array('maximal')),true,true,false); $this->addColumn('date','post_dt',__('Date'),array('adminPostList','getDate')); $this->addColumn('author','user_id',__('Author'),array('adminPostList','getAuthor')); $this->addColumn('status','post_status',__('Status'),array('adminPostList','getStatus')); } protected function getTitle() { return ''. form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).' '. ''. html::escapeHTML($this->rs->post_title).''; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract comments list class. Handle comments list on admin side */ class adminCommentList extends adminItemsList { public function setColumns() { $this->addColumn('title','post_title',__('Title'),array('adminCommentList','getTitle'),array('class' => array('maximal')),true,true,false); $this->addColumn('date','comment_dt',__('Date'),array('adminCommentList','getDate')); $this->addColumn('author','comment_author',__('Author'),array('adminCommentList','getAuthor')); $this->addColumn('type','comment_trackback',__('Type'),array('adminCommentList','getType')); $this->addColumn('status','comment_status',__('Status'),array('adminCommentList','getStatus')); $this->addColumn('edit',null,'',array('adminCommentList','getEdit'),null,false,false,false); $this->default_sortby = 'date'; $this->default_order = 'desc'; } protected function getDefaultCaption() { return __('Comments list'); } protected function getDefaultLine() { return '%s'; } protected function getTitle() { $post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id); return ''. form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).' '. ''. html::escapeHTML($this->rs->post_title).''. ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').''; } protected function getDate() { return ''.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).''; } protected function getAuthor() { global $author, $status, $sortby, $order, $nb_per_page; $author_url = 'comments.php?n='.$nb_per_page. '&status='.$status. '&sortby='.$sortby. '&order='.$order. '&author='.rawurlencode($this->rs->comment_author); $comment_author = html::escapeHTML($this->rs->comment_author); if (mb_strlen($comment_author) > 20) { $comment_author = mb_strcut($comment_author,0,17).'...'; } return ''.$comment_author.''; } protected function getType() { return ''.($this->rs->comment_trackback ? __('trackback') : __('comment')).''; } protected function getStatus() { $img = '%1$s'; switch ($this->rs->comment_status) { case 1: $img_status = sprintf($img,__('published'),'check-on.png'); break; case 0: $img_status = sprintf($img,__('unpublished'),'check-off.png'); break; case -1: $img_status = sprintf($img,__('pending'),'check-wrn.png'); break; case -2: $img_status = sprintf($img,__('junk'),'junk.png'); break; } return ''.$img_status.''; } protected function getEdit() { $comment_url = 'comment.php?id='.$this->rs->comment_id; return ''. ''; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract users list class. Handle users list on admin side */ class adminUserList extends adminItemsList { public function setColumns() { $this->addColumn('username','U.user_id',__('Username'),array('adminUserList','getUserName'),array('class' => array('maximal')),true,true,false); $this->addColumn('firstname','user_firstname',__('First name'),array('adminUserList','getFirstName'),array('class' => array('nowrap'))); $this->addColumn('lastname','user_name',__('Last name'),array('adminUserList','getLastName'),array('class' => array('nowrap'))); $this->addColumn('displayname','user_displayname',__('Display name'),array('adminUserList','getDisplayName'),array('class' => array('nowrap'))); $this->addColumn('entries','nb_post',__('Entries'),array('adminUserList','getEntries'),array('class' => array('nowrap'))); $this->default_sortby='lastname'; $this->default_order='asc'; } protected function getDefaultCaption() { return __('Users list'); } protected function getUserName() { $img = '%1$s'; $img_status = ''; $p = $this->core->getUserPermissions($this->rs->user_id); if (isset($p[$this->core->blog->id]['p']['admin'])) { $img_status = sprintf($img,__('admin'),'admin.png'); } if ($this->rs->user_super) { $img_status = sprintf($img,__('superadmin'),'superadmin.png'); } return ''.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). form::checkbox(array('user_id[]'),$this->rs->user_id).' '. ''. $this->rs->user_id.' '.$img_status.''; } protected function getFirstName() { return ''.$this->rs->user_firstname.''; } protected function getLastName() { return ''.$this->rs->user_name.''; } protected function getDisplayName() { return ''.$this->rs->user_displayname.''; } protected function getEntries() { return ''. $this->rs->nb_post.''; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract blogs list class. Handle blogs list on admin side */ class adminBlogList extends adminItemsList { public function setColumns() { $this->addColumn('blogname','UPPER(blog_name)',__('Blog name'),array('adminBlogList','getBlogName'),array('class' => array('maximal')),true,true,false); $this->addColumn('lastupdate','blog_upddt',__('Last update'),array('adminBlogList','getLastUpdate'),array('class' => array('nowrap'))); $this->addColumn('entries',null,__('Entries'),array('adminBlogList','getEntries'),array('class' => array('nowrap')),false); $this->addColumn('blogid','B.blog_id',__('Blog ID'),array('adminBlogList','getBlogId'),array('class' => array('nowrap'))); $this->addColumn('action',null,'',array('adminBlogList','getAction'),array('class' => array('nowrap')),false); $this->addColumn('status','blog_status',__('status'),array('adminBlogList','getStatus'),array('class' => array('nowrap'))); $this->default_sortby='lastupdate'; $this->default_order='desc'; } protected function getDefaultCaption() { return __('Blogs list'); } protected function getBlogName() { return ''. html::escapeHTML($this->rs->blog_name).''; } protected function getLastUpdate() { $offset = dt::getTimeOffset($this->core->auth->getInfo('user_tz')); $blog_upddt = dt::str(__('%Y-%m-%d %H:%M'),strtotime($this->rs->blog_upddt) + $offset); return ''.$blog_upddt.''; } protected function getEntries() { return ''.$this->core->countBlogPosts($this->rs->blog_id).''; } protected function getBlogId() { return ''.html::escapeHTML($this->rs->blog_id).''; } protected function getAction() { $edit_link = ''; $blog_id = html::escapeHTML($this->rs->blog_id); if ($GLOBALS['core']->auth->isSuperAdmin()) { $edit_link = ''. __('edit').''; } return ''.$edit_link.''; } protected function getStatus() { $img_status = $this->rs->blog_status == 1 ? 'check-on' : 'check-off'; $txt_status = $GLOBALS['core']->getBlogStatus($this->rs->blog_status); $img_status = sprintf('%2$s',$img_status,$txt_status); return ''.$img_status.''; } } /** @ingroup DC_CORE @nosubgrouping @brief abstract blogs permissions list class. Handle blogs permissions list on admin side */ class adminBlogPermissionsList extends adminBlogList { public function setColumns() { $this->addColumn('blogid','B.blog_id',__('Blog ID'),array('adminBlogPermissionsList','getBlogId'),array('class' => array('nowrap')),false,true,false); $this->addColumn('blogname','UPPER(blog_name)',__('Blog name'),array('adminBlogPermissionsList','getBlogName'),array('class' => array('maximal')),false); $this->addColumn('entries',null,__('Entries'),array('adminBlogList','getEntries'),array('class' => array('nowrap')),false); $this->addColumn('status','blog_status',__('status'),array('adminBlogList','getStatus'),array('class' => array('nowrap')),false); } protected function getBlogId() { return ''. form::checkbox(array('blog_id[]'),$this->rs->blog_id,'','','',false,'title="'.__('select').' '.$this->rs->blog_id.'"'). $this->rs->blog_id.''; } protected function getBlogName() { return ''.html::escapeHTML($this->rs->blog_name).''; } } ?>