<!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="fc_alias" class="control-input input-inline">
		<option value="0">{-:@CATEGORY-}</option>
	{-foreach:$_FCL,$fc-}
		<option value="{-:$fc['fc_alias']-}"{-if:$fc['fc_alias']==ARequest::get('fc_alias')-} selected="selected"{-:/if-}>{-:$fc['fc_name']-}</option>
	{-:/foreach-}
	</select></label>
	<label><select name="f_show_type" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('f_show_type')-} selected="selected"{-:/if-}>{-:@SHOW_TYPE-}</option>
		<option value="t"{-if:'t' == ARequest::get('f_show_type')-} selected="selected"{-:/if-}>{-:@TEXT_LINK-}</option>
		<option value="l"{-if:'l' == ARequest::get('f_show_type')-} selected="selected"{-:/if-}>{-:@LOGO_LINK-}</option>
	</select></label>
	<label><select name="f_status" class="control-input input-inline">
		<option value=""{-if:'' == ARequest::get('f_status')-} selected="selected"{-:/if-}>{-:@STATUS-}</option>
		<option value="n"{-if:'n' == ARequest::get('f_status')-} selected="selected"{-:/if-}>{-:@NOT_PASSED-}</option>
		<option value="p"{-if:'p' == ARequest::get('f_status')-} selected="selected"{-:/if-}>{-:@PASSED-}</option>
	</select></label>
	<label><select name="order_by" class="control-input input-inline">
		<option value="">{-:@DISPLAY_ORDER-}</option>
		<option value="flink_id"{-if:'flink_id'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@ID-}</option>
		<option value="f_display_order"{-if:'f_display_order'==ARequest::get('order_by')-} selected="selected"{-:/if-}>{-:@DISPLAY_ORDER-}</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><span class="btn submit" action="{-url:admin@flink/list_flink-}" to="#formSearch">{-:@SEARCH-}</span></label>
</div>
</form>

<form id="formList" action="" method="post">
<ul class="subnav subnav-tab">
	<li class="active"><a href="#">{-:@FLINK_LIST-}</a></li>
</ul>
<div id="tabContent">
	{-if:empty($_FL)-}
		<div class="placeholder text-center margin">{-:@LIST_EMPTY-}</div>
	{-else:-}
		<table class="table table-hover">
			<tr>
				<th scope="col" width="18"><input type="checkbox" class="select_all" to="flink_id"></th>
				<th scope="col">{-:@DISPLAY_ORDER-}</th>
				<th scope="col">{-:@CATEGORY-}</th>
				<th scope="col">{-:@SITE_NAME-}</th>
				<th scope="col">{-:@SITE_LOGO-}</th>
				<th scope="col">{-:@SHOW_TYPE-}</th>
				<th scope="col">{-:@STATUS-}</th>
				<th scope="col">{-:@MANAGE-}</th>
			</tr>
			{-foreach:$_FL,$f-}
			<tr>
				<td><input type="checkbox" name="flink_id[{-:$f['flink_id']-}]" value="{-:$f['flink_id']-}"></td>
				<td><input type="text" name="f_display_order[{-:$f['flink_id']-}]" validate="/\S+/" value="{-:$f['f_display_order']-}" class="control-input input-inline input-sm" size="4" maxlength="5"></td>
				<td>{-:$f['fc_name']-}</td>
				<td>
					{-:$f['f_site_name']-} <a class="text-muted" href="{-:$f['f_site_url']-}" target="_blank">{-:$f['f_site_url']-}</a>
				</td>
				<td>
				{-if:!empty($f['f_site_logo'])-}<img src="{-:$f['f_site_logo']-}" />{-:/if-}</td>
				<td>{-if:0 == $f['f_show_type']-}{-:@TEXT_LINK-}{-elseif:1 == $f['f_show_type']-}{-:@LOGO_LINK-}{-:/if-}</td>
				<td>
				{-if:1 == $f['f_status']-}
					<span class="text-success">{-:@ON-}</span> <a class="btn btn-sm" href="{-url:admin@flink/toggle_flink_status_do?flink_id={$f['flink_id']}&f_status=0&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@TOGGLE-}</a>
				{-else:-}
					<span class="text-muted">{-:@OFF-}</span> <a class="btn btn-sm" href="{-url:admin@flink/toggle_flink_status_do?flink_id={$f['flink_id']}&f_status=1&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@TOGGLE-}</a>
				{-:/if-}
				</td>
				<td><a href="{-url:admin@flink/edit_flink?flink_id={$f['flink_id']}-}">{-:@EDIT-}</a> | <a href="{-url:admin@flink/delete_flink_do?flink_id={$f['flink_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']-}">
	<a class="btn" href="{-url:admin@flink/add_flink-}">{-:@ADD_FLINK-}</a>
	<span class="btn submit" action="{-url:admin@flink/update_flink_do-}" to="#formList">{-:@UPDATE_SELECTED-}</span>
	<span class="btn submit" action="{-url:admin@flink/delete_flink_do-}" to="#formList">{-:@DELETE_SELECTED-}</span>
	<input class="btn" type="reset" value="{-:@RESET-}">
	<a class="btn" href="{-url:admin@flink_category/list_category-}">{-:@FLINK_CATEGORY_LIST-}</a>
</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>