blog->getPosts($params); $counter = $core->blog->getPosts($params,true); $post_list = new adminPostList($core,$posts,$counter->f(0)); } catch (Exception $e) { $core->error->add($e->getMessage()); } } # Get comments elseif ($qtype == 'c') { $starting_scripts .= dcPage::jsLoad('js/_comments.js'); $params['search'] = $q; $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); $params['no_content'] = true; $params['order'] = 'comment_dt DESC'; try { $comments = $core->blog->getComments($params); $counter = $core->blog->getComments($params,true); $comment_list = new adminCommentList($core,$comments,$counter->f(0)); } catch (Exception $e) { $core->error->add($e->getMessage()); } } } if ($qtype == 'p') { $posts_actions_page = new dcPostsActionsPage($core,$core->adminurl->get("admin.search"),array('q'=>$q,'qtype'=>$qtype)); if ($posts_actions_page->process()) { return; } } else { $comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.search"),array('q'=>$q,'qtype'=>$qtype)); if ($comments_actions_page->process()) { return; } } dcPage::open(__('Search'),$starting_scripts, dcPage::breadcrumb( array( html::escapeHTML($core->blog->name) => '', __('Search') => '' )) ); echo '
'. '

'.__('Search options').'

'. '

'.form::field('q',30,255,$q).'

'. '

'. '

'. '

'. '
'. '
'; if ($q && !$core->error->flag()) { $redir = html::escapeHTML($_SERVER['REQUEST_URI']); # Show posts if ($qtype == 'p') { if ($counter->f(0) > 0) { printf('

'. ($counter->f(0) == 1 ? __('%d entry found') : __('%d entries found')). '

',$counter->f(0)); } $post_list->display($page,$nb_per_page, '
'. '%s'. '
'. '

'. '

'. form::combo(array('action','action1'),$posts_actions_page->getCombo()). '

'. $core->formNonce(). $posts_actions_page->getHiddenFields(). '
'. '
' ); } # Show posts elseif ($qtype == 'c') { # Actions combo box if ($counter->f(0) > 0) { printf('

'. ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')). '

',$counter->f(0)); } $comment_list->display($page,$nb_per_page, '
'. '%s'. '
'. '

'. '

'. form::combo(array('action','action2'),$comments_actions_page->getCombo()). '

'. $core->formNonce(). $comments_actions_page->getHiddenFields(). '
'. '
' ); } } dcPage::helpBlock('core_search'); dcPage::close();