<!doctype html>
<html dir="{-:*_LD_-}">
<head>
<meta charset="utf-8" />
<title>{-:@MANAGE-}</title>
{-include:../meta-}
<script>
var GV = {
	_LD_ : '{-:*_LD_-}',
	LANG_NAME : '{-:*LANG_NAME-}'
};
</script>
</head>

<body>
<div class="container margin">

<form id="formSearch" action="" method="post">
<div class="alert">
	<label><select name="g_private" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('g_private')-} selected="selected"{-:/if-}>{-:@WHETHER_PUBLIC-}</option>
		<option value="y"{-if:'y' == ARequest::get('g_private')-} selected="selected"{-:/if-}>{-:@PRIVATE-}</option>
		<option value="n"{-if:'n' == ARequest::get('g_private')-} selected="selected"{-:/if-}>{-:@PUBLIC-}</option>
	</select></label>
	<label><select name="g_reply" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('g_reply')-} selected="selected"{-:/if-}>{-:@WHETHER_REPLIED-}</option>
		<option value="y"{-if:'y' == ARequest::get('g_reply')-} selected="selected"{-:/if-}>{-:@REPLIED-}</option>
		<option value="n"{-if:'n' == ARequest::get('g_reply')-} selected="selected"{-:/if-}>{-:@NOT_REPLIED-}</option>
	</select></label>

	<label><select name="g_status" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('g_status')-} selected="selected"{-:/if-}>{-:@STATUS-}</option>
		<option value="n"{-if:'n' == ARequest::get('g_status')-} selected="selected"{-:/if-}>{-:@NOT_PASSED-}</option>
		<option value="p"{-if:'p' == ARequest::get('g_status')-} selected="selected"{-:/if-}>{-:@PASSED-}</option>
		<option value="f"{-if:'f' == ARequest::get('g_status')-} selected="selected"{-:/if-}>{-:@FILTER-}</option>
	</select></label>
	<label><select name="order_by" class="control-input input-inline">
		<option value="">{-:@DISPLAY_ORDER-}</option>
		<option value="guestbook_id"{-if:'guestbook_id'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@ID-}</option>
		<option value="g_add_time"{-if:'g_add_time'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@ADD_TIME-}</option>
	</select></label>
	<label><select name="order_turn" class="control-input input-inline">
		<option value="desc"{-if:'desc'==ARequest::get('order_turn')-} selected="selected"{-:/if-}>{-:@DESC-}</option>
		<option value="asc"{-if:'asc'==ARequest::get('order_turn')-} selected="selected"{-:/if-}>{-:@ASC-}</option>
	</select></label>
	<label><select name="page_size" class="control-input input-inline">
		<option value=""{-if:''==ARequest::get('page_size')-} selected="selected"{-:/if-}>{-:@PAGE_SIZE-}</option>
		<option value="10"{-if:'10'==ARequest::get('page_size')-} selected="selected"{-:/if-}>10 {-:@ITEMS-}</option>
		<option value="20"{-if:'20'==ARequest::get('page_size')-} selected="selected"{-:/if-}>20 {-:@ITEMS-}</option>
		<option value="50"{-if:'50'==ARequest::get('page_size')-} selected="selected"{-:/if-}>50 {-:@ITEMS-}</option>
		<option value="100"{-if:'100'==ARequest::get('page_size')-} selected="selected"{-:/if-}>100 {-:@ITEMS-}</option>
	</select></label>
	<label>{-:@KEYWORDS-} <input class="control-input input-inline" type="text" size="10" maxlength="64" name="g_content" value="{-:%g_content-}"></label>
	<label><span class="btn submit" action="{-url:admin@guestbook/list_guestbook-}" to="#formSearch">{-:@SEARCH-}</span></label>
</div>
</form>

<form id="formList" action="" method="post">
<ul class="subnav subnav-tab">
	<li class="active"><a href="#">{-:@GUESTBOOK_LIST-}</a></li>
	<li><a href="{-url:admin@guestbook/edit_option-}">{-:@GUESTBOOK_OPTION-}</a></li>
</ul>
<div id="tabContent">
	{-if:empty($_GL)-}
		<div class="placeholder text-center margin">{-:@LIST_EMPTY-}</div>
	{-else:-}
		<table class="table table-hover">
			{-foreach:$_GL,$g-}
			<tr>
				<th scope="col"><input name="guestbook_id[]" type="checkbox" value="{-:$g['guestbook_id']-}"> {-:@NUMBERING-}: {-:$g['g_no']-}</th>
				<th scope="col">
					<span class="text-muted"><strong>{-:@ADD_TIME-}:</strong> {-:$g['g_add_time']|date~C('APP.TIME_FORMAT'),@me-}</span>
					<span class="text-muted"><strong>{-:@IP-}:</strong> {-:$g['g_add_ip']-}</span>
				</th>
				<th scope="col">
				{-if:empty($g['g_password'])-}
					<span class="badge badge-info">{-:@PUBLIC-}</span>
				{-else:-}
					<span class="badge">{-:@PRIVATE-}</span>
				{-:/if-}
				</th>
				<th scope="col" width="200">{-:@STATUS-}:
				{-if:0 == $g['g_status']-}
					<span class="text-muted">{-:@NOT_PASSED-}</span> <a class="btn btn-sm" href="{-url:admin@guestbook/toggle_guestbook_status_do?guestbook_id={$g['guestbook_id']}&g_status=1&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@TOGGLE-}</a>
				{-elseif:1 == $g['g_status']-}
					<span class="text-success">{-:@PASSED-}</span> <a class="btn btn-sm" href="{-url:admin@guestbook/toggle_guestbook_status_do?guestbook_id={$g['guestbook_id']}&g_status=0&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@TOGGLE-}</a>
				{-elseif:2 == $g['g_status']-}
					<span class="text-danger">{-:@FILTER-}</span> <a class="btn btn-sm" href="{-url:admin@guestbook/toggle_guestbook_status_do?guestbook_id={$g['guestbook_id']}&g_status=1&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@TOGGLE-}</a>
				{-:/if-}
				</th>
			</tr>
			<tr>
				<td colspan="3">
					<table class="listTable" style="width:95%">
						<tr>
							<td>
							<strong class="text-info">{-:$g['g_author']-}
							{-if:!empty($g['g_email'])-}<span class="bg_gry fc_wht p_0_5 fs_11">{-:$g['g_email']-}</span>{-:/if-}
							</strong> {-:$g['g_content']|AString::msubstr~32-}
							</td>
						</tr>
						{-if:!empty($g['g_reply'])-}
						<tr>
							<td>
							<strong class="text-success">{-:@REPLY-}:</strong> {-:$g['g_reply']-}
							<span class="text-muted">{-:$g['g_reply_time']|date~C('APP.TIME_FORMAT'),@me-}</span>
							</td>
						</tr>
						{-:/if-}
					</table>
				</td>
				<td><a href="{-url:admin@guestbook/edit_guestbook?guestbook_id={$g['guestbook_id']}-}">{-:@EDIT-}</a> | <a href="{-url:admin@guestbook/delete_guestbook_do?guestbook_id={$g['guestbook_id']}&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}" class="delete_confirm">{-:@DELETE-}</a></td>
			</tr>
			{-:/foreach-}
		</table>
		{-include:../paging-}
	{-:/if-}
</div>
<div id="operation" class="margin">
	<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
	<input name="token" type="hidden" value="{-:$_TK['token']-}">
	<label class="text-mi"><input type="checkbox" class="select_all" to="guestbook_id"> {-:@SELECT_ALL-}</label>
	<span class="btn submit" action="{-url:admin@guestbook/pass_guestbook_do-}" to="#formList">{-:@PASS_SELECTED-}</span>
	<span class="btn submit" action="{-url:admin@guestbook/delete_same_ip_do-}" to="#formList">{-:@DELETE_SAME_IP-}</span>
	<span class="btn submit" action="{-url:admin@guestbook/delete_guestbook_do-}" to="#formList">{-:@DELETE_SELECTED-}</span>
</div><!--/#operation-->
</form>

</div>
<script src="{-:*__RES__-}js/loga.js"></script>
<script src="{-:*__RES__-}js/jquery.js"></script>
<script src="{-:*__RES__-}fea/js/fea.min.js"></script>
<script src="{-:*__STYLE__-}js/common.js"></script>
<script src="{-:*__STYLE__-}js/admin.js"></script>
</body>
</html>