[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
| 6 | # Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear |
---|
| 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | if (!defined('DC_RC_PATH')) { return; } |
---|
| 13 | |
---|
[238] | 14 | class adminGenericColumn |
---|
| 15 | { |
---|
| 16 | protected $core; |
---|
| 17 | protected $rs; |
---|
| 18 | protected $id; |
---|
| 19 | protected $title; |
---|
| 20 | protected $callback; |
---|
| 21 | protected $html; |
---|
| 22 | protected $visibility; |
---|
| 23 | |
---|
[276] | 24 | public function __construct($id,$title,$callback,$html = null) |
---|
[238] | 25 | { |
---|
| 26 | if (!is_string($id) || $id === '') { |
---|
| 27 | throw new Exception(__('Invalid column ID')); |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | if (!is_string($title)) { |
---|
| 31 | throw new Exception(__('Invalid column title')); |
---|
| 32 | } |
---|
[242] | 33 | |
---|
[238] | 34 | if (is_null($html) || !is_string($html)) { |
---|
| 35 | $html = ''; |
---|
| 36 | } |
---|
[242] | 37 | if (!empty($html)) { |
---|
| 38 | $html = ' '.$html; |
---|
| 39 | } |
---|
| 40 | |
---|
[238] | 41 | try { |
---|
[242] | 42 | if (!is_array($callback) || count($callback) < 2) { |
---|
| 43 | throw new Exception(__('Callback parameter should be an array')); |
---|
| 44 | } |
---|
[238] | 45 | $r = new ReflectionClass($callback[0]); |
---|
| 46 | $f = $r->getMethod($callback[1]); |
---|
| 47 | $p = $r->getParentClass(); |
---|
| 48 | if (!$p || $p->name != 'adminGenericList') { |
---|
[242] | 49 | throw new Exception(__('Callback class should be inherited of adminGenericList class')); |
---|
[238] | 50 | } |
---|
| 51 | } |
---|
| 52 | catch (Exception $e) { |
---|
[242] | 53 | throw new Exception(sprintf(__('Invalid column callback: %s'),$e->getMessage())); |
---|
[238] | 54 | } |
---|
| 55 | |
---|
| 56 | $this->id = $id; |
---|
| 57 | $this->title = $title; |
---|
| 58 | $this->callback = $callback; |
---|
| 59 | $this->html = $html; |
---|
| 60 | $this->visibility = true; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | public function getInfo($k) |
---|
| 64 | { |
---|
| 65 | return property_exists(get_class($this),$k) ? $this->{$k} : null; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | public function setVisibility($visibility) |
---|
| 69 | { |
---|
| 70 | if (is_bool($visibility)) { |
---|
| 71 | $this->visibility = $visibility; |
---|
| 72 | } |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | public function isVisible() |
---|
| 76 | { |
---|
| 77 | return $this->visibility; |
---|
| 78 | } |
---|
| 79 | } |
---|
| 80 | |
---|
[0] | 81 | class adminGenericList |
---|
| 82 | { |
---|
| 83 | protected $core; |
---|
| 84 | protected $rs; |
---|
| 85 | protected $rs_count; |
---|
[238] | 86 | protected $columns; |
---|
| 87 | |
---|
[0] | 88 | public function __construct($core,$rs,$rs_count) |
---|
| 89 | { |
---|
| 90 | $this->core =& $core; |
---|
| 91 | $this->rs =& $rs; |
---|
| 92 | $this->rs_count = $rs_count; |
---|
[238] | 93 | $this->context = get_class($this); |
---|
| 94 | $this->columns = array(); |
---|
[242] | 95 | $this->form_prefix = 'col_%s'; |
---|
| 96 | $this->form_trigger = 'add_filter'; |
---|
[238] | 97 | |
---|
[0] | 98 | $this->html_prev = __('«prev.'); |
---|
| 99 | $this->html_next = __('next»'); |
---|
[238] | 100 | |
---|
| 101 | # Post columns |
---|
| 102 | $this->addColumn('adminPostList','title',__('Title'),array('adminPostList','getTitle')); |
---|
| 103 | $this->addColumn('adminPostList','date',__('Date'),array('adminPostList','getDate')); |
---|
| 104 | $this->addColumn('adminPostList','category',__('Category'),array('adminPostList','getCategory')); |
---|
| 105 | $this->addColumn('adminPostList','author',__('Author'),array('adminPostList','getAuthor')); |
---|
| 106 | $this->addColumn('adminPostList','comment',__('Comments'),array('adminPostList','getComments')); |
---|
| 107 | $this->addColumn('adminPostList','trackback',__('Trackbacks'),array('adminPostList','getTrackbacks')); |
---|
| 108 | $this->addColumn('adminPostList','status',__('Status'),array('adminPostList','getStatus')); |
---|
| 109 | |
---|
| 110 | # Post (mini list) columns |
---|
| 111 | $this->addColumn('adminPostMiniList','title',__('Title'),array('adminPostList','getTitle')); |
---|
| 112 | $this->addColumn('adminPostMiniList','date',__('Date'),array('adminPostList','getDate')); |
---|
| 113 | $this->addColumn('adminPostMiniList','author',__('Author'),array('adminPostList','getAuthor')); |
---|
| 114 | $this->addColumn('adminPostMiniList','status',__('Status'),array('adminPostList','getStatus')); |
---|
| 115 | |
---|
| 116 | # Comment columns |
---|
| 117 | $this->addColumn('adminCommentList','title',__('Title'),array('adminCommentList','getTitle')); |
---|
| 118 | $this->addColumn('adminCommentList','date',__('Date'),array('adminCommentList','getDate')); |
---|
| 119 | $this->addColumn('adminCommentList','author',__('Author'),array('adminCommentList','getAuthor')); |
---|
| 120 | $this->addColumn('adminCommentList','type',__('Type'),array('adminCommentList','getType')); |
---|
| 121 | $this->addColumn('adminCommentList','status',__('Status'),array('adminCommentList','getStatus')); |
---|
| 122 | $this->addColumn('adminCommentList','edit','',array('adminCommentList','getEdit')); |
---|
| 123 | |
---|
[242] | 124 | # User columns |
---|
[238] | 125 | $this->addColumn('adminUserList','username',__('Username'),array('adminUserList','getUserName')); |
---|
| 126 | $this->addColumn('adminUserList','firstname',__('First name'),array('adminUserList','getFirstName')); |
---|
| 127 | $this->addColumn('adminUserList','lastname',__('Last name'),array('adminUserList','getLastName')); |
---|
| 128 | $this->addColumn('adminUserList','displayname',__('Display name'),array('adminUserList','getDisplayName')); |
---|
| 129 | $this->addColumn('adminUserList','entries',__('Entries'),array('adminUserList','getEntries')); |
---|
| 130 | |
---|
[276] | 131 | $core->callBehavior('adminGenericListConstruct',$this); |
---|
| 132 | |
---|
[238] | 133 | $this->setColumnsVisibility(); |
---|
[0] | 134 | } |
---|
[238] | 135 | |
---|
[276] | 136 | public function addColumn($context,$id,$title,$callback,$html = null) |
---|
[238] | 137 | { |
---|
| 138 | try { |
---|
| 139 | if (!array_key_exists($context,$this->columns)) { |
---|
| 140 | $this->columns[$context] = array(); |
---|
| 141 | } |
---|
| 142 | |
---|
[276] | 143 | $c = new adminGenericColumn($id,$title,$callback,$html); |
---|
[238] | 144 | $this->columns[$context][$c->getInfo('id')] = $c; |
---|
| 145 | } |
---|
| 146 | catch (Exception $e) { |
---|
| 147 | if (DC_DEBUG) { |
---|
| 148 | $this->core->error->add($e->getMessage()); |
---|
| 149 | } |
---|
| 150 | } |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | public function setColumnsVisibility() |
---|
| 154 | { |
---|
[246] | 155 | $ws = $this->core->auth->user_prefs->addWorkspace('lists'); |
---|
| 156 | |
---|
| 157 | $user_pref = !is_null($ws->{$this->context}) ? unserialize($ws->{$this->context}) : array(); |
---|
| 158 | |
---|
| 159 | foreach ($this->columns[$this->context] as $k => $v) { |
---|
| 160 | $visibility = array_key_exists($k,$user_pref) ? $user_pref[$k] : true; |
---|
| 161 | if (array_key_exists($this->form_trigger,$_REQUEST)) { |
---|
| 162 | $key = sprintf($this->form_prefix,$k); |
---|
| 163 | $visibility = !array_key_exists($key,$_REQUEST) ? false : true; |
---|
| 164 | } |
---|
| 165 | $v->setVisibility($visibility); |
---|
| 166 | $user_pref[$k] = $visibility; |
---|
| 167 | } |
---|
| 168 | |
---|
[242] | 169 | if (array_key_exists($this->form_trigger,$_REQUEST)) { |
---|
[246] | 170 | $this->core->auth->user_prefs->lists->put($this->context,serialize($user_pref),'string'); |
---|
[238] | 171 | } |
---|
| 172 | } |
---|
| 173 | |
---|
[242] | 174 | public function getColumnsForm() |
---|
| 175 | { |
---|
| 176 | $block = |
---|
| 177 | '<h3>'.__('Displayed information').'</h3>'. |
---|
| 178 | '<ul>%s</ul>'; |
---|
| 179 | |
---|
| 180 | $list = array(); |
---|
| 181 | |
---|
| 182 | foreach ($this->columns[$this->context] as $k => $v) { |
---|
| 183 | $col_id = sprintf($this->form_prefix,$k); |
---|
| 184 | $col_label = sprintf('<label for="%s">%s</label>',$col_id,$v->getInfo('title')); |
---|
| 185 | $col_html = sprintf('<li class="line">%s</li>',$col_label.form::checkbox($col_id,1,$v->isVisible())); |
---|
| 186 | |
---|
| 187 | array_push($list,$col_html); |
---|
| 188 | } |
---|
| 189 | |
---|
| 190 | return !empty($list) ? sprintf($block,implode('',$list)) : ''; |
---|
| 191 | } |
---|
| 192 | |
---|
[0] | 193 | public function display($page,$nb_per_page,$enclose_block='') |
---|
| 194 | { |
---|
| 195 | if ($this->rs->isEmpty()) |
---|
| 196 | { |
---|
| 197 | echo '<p><strong>'.__('No entry').'</strong></p>'; |
---|
| 198 | } |
---|
| 199 | else |
---|
| 200 | { |
---|
| 201 | $pager = new pager($page,$this->rs_count,$nb_per_page,10); |
---|
| 202 | $pager->html_prev = $this->html_prev; |
---|
| 203 | $pager->html_next = $this->html_next; |
---|
| 204 | $pager->var_page = 'page'; |
---|
| 205 | |
---|
[276] | 206 | $html_block = '<table class="maximal clear"><tr>'; |
---|
[238] | 207 | |
---|
| 208 | foreach ($this->columns[$this->context] as $k => $v) { |
---|
| 209 | if ($v->isVisible()) { |
---|
| 210 | $html_block .= sprintf('<th%s>%s</th>',$v->getInfo('html'),$v->getInfo('title')); |
---|
| 211 | } |
---|
| 212 | } |
---|
| 213 | |
---|
| 214 | $html_block .= '</tr>%s</table>'; |
---|
[0] | 215 | |
---|
| 216 | if ($enclose_block) { |
---|
| 217 | $html_block = sprintf($enclose_block,$html_block); |
---|
| 218 | } |
---|
| 219 | |
---|
| 220 | echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; |
---|
| 221 | |
---|
| 222 | $blocks = explode('%s',$html_block); |
---|
| 223 | |
---|
| 224 | echo $blocks[0]; |
---|
| 225 | |
---|
| 226 | while ($this->rs->fetch()) |
---|
| 227 | { |
---|
[238] | 228 | echo $this->displayLine(); |
---|
[0] | 229 | } |
---|
| 230 | |
---|
| 231 | echo $blocks[1]; |
---|
| 232 | |
---|
| 233 | echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; |
---|
| 234 | } |
---|
| 235 | } |
---|
| 236 | |
---|
[238] | 237 | private function displayLine() |
---|
| 238 | { |
---|
| 239 | $res = ''; |
---|
| 240 | |
---|
| 241 | foreach ($this->columns[$this->context] as $k => $v) { |
---|
| 242 | if ($v->isVisible()) { |
---|
| 243 | $c = $v->getInfo('callback'); |
---|
| 244 | $func = $c[1]; |
---|
| 245 | $res .= $this->{$c[1]}(); |
---|
| 246 | } |
---|
| 247 | } |
---|
| 248 | |
---|
| 249 | return sprintf($this->getDefaultLine(),$res); |
---|
| 250 | } |
---|
| 251 | |
---|
| 252 | protected function getDefaultLine() |
---|
| 253 | { |
---|
| 254 | return '<tr class="line">%s</tr>'; |
---|
| 255 | } |
---|
| 256 | } |
---|
| 257 | |
---|
| 258 | class adminPostList extends adminGenericList |
---|
| 259 | { |
---|
| 260 | protected function getDefaultLine() |
---|
| 261 | { |
---|
| 262 | return |
---|
| 263 | '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. |
---|
| 264 | ' id="p'.$this->rs->post_id.'">%s</tr>'; |
---|
| 265 | } |
---|
| 266 | |
---|
| 267 | protected function getTitle() |
---|
| 268 | { |
---|
| 269 | return |
---|
| 270 | '<td class="maximal">'. |
---|
| 271 | form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).' '. |
---|
| 272 | '<a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. |
---|
| 273 | html::escapeHTML($this->rs->post_title).'</a></td>'; |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | protected function getDate() |
---|
| 277 | { |
---|
| 278 | return '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'; |
---|
| 279 | } |
---|
| 280 | |
---|
| 281 | protected function getCategory() |
---|
[0] | 282 | { |
---|
| 283 | if ($this->core->auth->check('categories',$this->core->blog->id)) { |
---|
| 284 | $cat_link = '<a href="category.php?id=%s">%s</a>'; |
---|
| 285 | } else { |
---|
| 286 | $cat_link = '%2$s'; |
---|
| 287 | } |
---|
| 288 | |
---|
| 289 | if ($this->rs->cat_title) { |
---|
| 290 | $cat_title = sprintf($cat_link,$this->rs->cat_id, |
---|
| 291 | html::escapeHTML($this->rs->cat_title)); |
---|
| 292 | } else { |
---|
| 293 | $cat_title = __('None'); |
---|
| 294 | } |
---|
| 295 | |
---|
[238] | 296 | return '<td class="nowrap">'.$cat_title.'</td>'; |
---|
[0] | 297 | } |
---|
| 298 | |
---|
[238] | 299 | protected function getAuthor() |
---|
| 300 | { |
---|
| 301 | return '<td class="nowrap">'.$this->rs->user_id.'</td>'; |
---|
| 302 | } |
---|
| 303 | |
---|
| 304 | protected function getComments() |
---|
| 305 | { |
---|
| 306 | return '<td class="nowrap">'.$this->rs->nb_comment.'</td>'; |
---|
| 307 | } |
---|
| 308 | |
---|
| 309 | protected function getTrackbacks() |
---|
| 310 | { |
---|
| 311 | return '<td class="nowrap">'.$this->rs->nb_trackback.'</td>'; |
---|
| 312 | } |
---|
| 313 | |
---|
| 314 | protected function getStatus() |
---|
[0] | 315 | { |
---|
| 316 | $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; |
---|
| 317 | switch ($this->rs->post_status) { |
---|
| 318 | case 1: |
---|
| 319 | $img_status = sprintf($img,__('published'),'check-on.png'); |
---|
| 320 | break; |
---|
| 321 | case 0: |
---|
| 322 | $img_status = sprintf($img,__('unpublished'),'check-off.png'); |
---|
| 323 | break; |
---|
| 324 | case -1: |
---|
| 325 | $img_status = sprintf($img,__('scheduled'),'scheduled.png'); |
---|
| 326 | break; |
---|
| 327 | case -2: |
---|
| 328 | $img_status = sprintf($img,__('pending'),'check-wrn.png'); |
---|
| 329 | break; |
---|
| 330 | } |
---|
| 331 | |
---|
| 332 | $protected = ''; |
---|
| 333 | if ($this->rs->post_password) { |
---|
| 334 | $protected = sprintf($img,__('protected'),'locker.png'); |
---|
| 335 | } |
---|
| 336 | |
---|
| 337 | $selected = ''; |
---|
| 338 | if ($this->rs->post_selected) { |
---|
| 339 | $selected = sprintf($img,__('selected'),'selected.png'); |
---|
| 340 | } |
---|
| 341 | |
---|
| 342 | $attach = ''; |
---|
| 343 | $nb_media = $this->rs->countMedia(); |
---|
| 344 | if ($nb_media > 0) { |
---|
| 345 | $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments'); |
---|
| 346 | $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); |
---|
| 347 | } |
---|
| 348 | |
---|
[238] | 349 | return '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'; |
---|
[0] | 350 | } |
---|
| 351 | } |
---|
| 352 | |
---|
[326] | 353 | class adminPostMiniList extends adminPostList |
---|
| 354 | { |
---|
| 355 | protected function getTitle() |
---|
| 356 | { |
---|
| 357 | return |
---|
| 358 | '<td class="maximal">'. |
---|
| 359 | form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).' '. |
---|
| 360 | '<a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. |
---|
| 361 | 'title="'.html::escapeHTML($this->rs->getURL()).'">'. |
---|
| 362 | html::escapeHTML($this->rs->post_title).'</a></td>'; |
---|
| 363 | } |
---|
| 364 | } |
---|
[238] | 365 | |
---|
[0] | 366 | class adminCommentList extends adminGenericList |
---|
| 367 | { |
---|
[238] | 368 | protected function getDefaultLine() |
---|
[0] | 369 | { |
---|
[238] | 370 | return |
---|
| 371 | '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'. |
---|
| 372 | ' id="c'.$this->rs->comment_id.'">%s</tr>'; |
---|
[0] | 373 | } |
---|
| 374 | |
---|
[238] | 375 | protected function getTitle() |
---|
| 376 | { |
---|
| 377 | $post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id); |
---|
| 378 | |
---|
| 379 | return |
---|
[242] | 380 | '<td class="maximal">'. |
---|
| 381 | form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).' '. |
---|
| 382 | '<a href="'.$post_url.'">'. |
---|
[238] | 383 | html::escapeHTML($this->rs->post_title).'</a>'. |
---|
| 384 | ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; |
---|
| 385 | } |
---|
| 386 | |
---|
| 387 | protected function getDate() |
---|
| 388 | { |
---|
| 389 | return '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'; |
---|
| 390 | } |
---|
| 391 | |
---|
| 392 | protected function getAuthor() |
---|
[0] | 393 | { |
---|
| 394 | global $author, $status, $sortby, $order, $nb_per_page; |
---|
| 395 | |
---|
| 396 | $author_url = |
---|
| 397 | 'comments.php?n='.$nb_per_page. |
---|
| 398 | '&status='.$status. |
---|
| 399 | '&sortby='.$sortby. |
---|
| 400 | '&order='.$order. |
---|
| 401 | '&author='.rawurlencode($this->rs->comment_author); |
---|
| 402 | |
---|
[238] | 403 | $comment_author = html::escapeHTML($this->rs->comment_author); |
---|
| 404 | if (mb_strlen($comment_author) > 20) { |
---|
| 405 | $comment_author = mb_strcut($comment_author,0,17).'...'; |
---|
| 406 | } |
---|
[0] | 407 | |
---|
[238] | 408 | return '<td class="nowrap"><a href="'.$author_url.'">'.$comment_author.'</a></td>'; |
---|
| 409 | } |
---|
| 410 | |
---|
| 411 | protected function getType() |
---|
| 412 | { |
---|
| 413 | return '<td class="nowrap">'.($this->rs->comment_trackback ? __('trackback') : __('comment')).'</td>'; |
---|
| 414 | } |
---|
| 415 | |
---|
| 416 | protected function getStatus() |
---|
| 417 | { |
---|
[0] | 418 | $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; |
---|
| 419 | switch ($this->rs->comment_status) { |
---|
| 420 | case 1: |
---|
| 421 | $img_status = sprintf($img,__('published'),'check-on.png'); |
---|
| 422 | break; |
---|
| 423 | case 0: |
---|
| 424 | $img_status = sprintf($img,__('unpublished'),'check-off.png'); |
---|
| 425 | break; |
---|
| 426 | case -1: |
---|
| 427 | $img_status = sprintf($img,__('pending'),'check-wrn.png'); |
---|
| 428 | break; |
---|
| 429 | case -2: |
---|
| 430 | $img_status = sprintf($img,__('junk'),'junk.png'); |
---|
| 431 | break; |
---|
| 432 | } |
---|
| 433 | |
---|
[238] | 434 | return '<td class="nowrap status">'.$img_status.'</td>'; |
---|
| 435 | } |
---|
| 436 | |
---|
| 437 | protected function getEdit() |
---|
| 438 | { |
---|
| 439 | $comment_url = 'comment.php?id='.$this->rs->comment_id; |
---|
[0] | 440 | |
---|
[238] | 441 | return |
---|
[0] | 442 | '<td class="nowrap status"><a href="'.$comment_url.'">'. |
---|
| 443 | '<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'; |
---|
| 444 | } |
---|
| 445 | } |
---|
| 446 | |
---|
| 447 | class adminUserList extends adminGenericList |
---|
| 448 | { |
---|
[238] | 449 | protected function getUserName() |
---|
[0] | 450 | { |
---|
| 451 | $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; |
---|
| 452 | $img_status = ''; |
---|
| 453 | |
---|
| 454 | $p = $this->core->getUserPermissions($this->rs->user_id); |
---|
| 455 | |
---|
| 456 | if (isset($p[$this->core->blog->id]['p']['admin'])) { |
---|
| 457 | $img_status = sprintf($img,__('admin'),'admin.png'); |
---|
| 458 | } |
---|
| 459 | if ($this->rs->user_super) { |
---|
| 460 | $img_status = sprintf($img,__('superadmin'),'superadmin.png'); |
---|
| 461 | } |
---|
[238] | 462 | |
---|
[0] | 463 | return |
---|
[238] | 464 | '<td class="maximal">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). |
---|
[242] | 465 | form::checkbox(array('user_id[]'),$this->rs->user_id).' '. |
---|
[238] | 466 | '<a href="user.php?id='.$this->rs->user_id.'">'. |
---|
| 467 | $this->rs->user_id.'</a> '.$img_status.'</td>'; |
---|
| 468 | } |
---|
| 469 | |
---|
| 470 | protected function getFirstName() |
---|
| 471 | { |
---|
| 472 | return '<td class="nowrap">'.$this->rs->user_firstname.'</td>'; |
---|
| 473 | } |
---|
| 474 | |
---|
| 475 | protected function getLastName() |
---|
| 476 | { |
---|
| 477 | return '<td class="nowrap">'.$this->rs->user_name.'</td>'; |
---|
| 478 | } |
---|
| 479 | |
---|
| 480 | protected function getDisplayName() |
---|
| 481 | { |
---|
| 482 | return '<td class="nowrap">'.$this->rs->user_displayname.'</td>'; |
---|
| 483 | } |
---|
| 484 | |
---|
| 485 | protected function getEntries() |
---|
| 486 | { |
---|
| 487 | return |
---|
[0] | 488 | '<td class="nowrap"><a href="posts.php?user_id='.$this->rs->user_id.'">'. |
---|
[238] | 489 | $this->rs->nb_post.'</a></td>'; |
---|
[0] | 490 | } |
---|
| 491 | } |
---|
[238] | 492 | |
---|
[0] | 493 | ?> |
---|