Add a search function.

This commit is contained in:
BJRambo 2016-05-19 03:43:51 +09:00
parent 899e617c87
commit b6ff330f92
3 changed files with 38 additions and 5 deletions

View file

@ -33,8 +33,24 @@ class trashAdminView extends trash
$args->page_count = 5; // /< the number of pages that appear in the page navigation
$args->originModule = Context::get('originModule');
$args->search_target = Context::get('search_target'); // /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search
$search_target = Context::get('search_target'); // /< search (title, contents ...)
$search_keyword = Context::get('search_keyword'); // /< keyword to search
switch($search_target)
{
case 'title':
$args->s_title = $search_keyword;
break;
case 'user_id':
$args->s_user_id = $search_keyword;
break;
case 'nick_name':
$args->s_nick_name = $search_keyword;
break;
case 'trash_ipaddress':
$args->s_ipaddress = $search_keyword;
break;
}
$oTrashModel = getModel('trash');
$output = $oTrashModel->getTrashList($args);