mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Add a search function.
This commit is contained in:
parent
899e617c87
commit
b6ff330f92
3 changed files with 38 additions and 5 deletions
|
|
@ -12,6 +12,12 @@
|
|||
<condition operation="equal" column="T.remover_srl" default="M.member_srl" notnull="notnull" />
|
||||
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="origin_module" var="originModule" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="T.title" var="s_title" />
|
||||
<condition operation="like" column="M.user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="M.nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like_prefix" column="T.ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="trash_srl" order="desc" />
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ var no_text_comment = '{$lang->no_text_comment}';
|
|||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
||||
|
|
@ -117,7 +115,20 @@ var no_text_comment = '{$lang->no_text_comment}';
|
|||
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form action="./" method="get" class="search center x_input-append x_clearfix">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach($lang->search_target_trash_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" title="{$lang->cmd_search}" />
|
||||
<button type="submit" class="x_btn x_btn-inverse">{$lang->cmd_search}</button>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="x_btn">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
<form ruleset="emptyTrash" id="fo_list" action="./" method="post" class="x_modal">
|
||||
<input type="hidden" name="module" value="trash" />
|
||||
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue