<!doctype html>
<html dir="{-:*_LD_-}">
<head>
<meta charset="utf-8" />
<title>{-:@MANAGE-}</title>
<link rel="stylesheet" type="text/css" href="{-:*__RES__-}fea/css/fea.g.min.css" />
<link rel="stylesheet" type="text/css" href="{-:*__RES__-}css/calendar.css" />
<link rel="stylesheet" type="text/css" href="{-:*__STYLE__-}css/common.css" />
{-if:'rtl'==_LD_-}
<link rel="stylesheet" type="text/css" href="{-:*__RES__-}fea/css/fea.g.rtl.min.css" />
<link rel="stylesheet" type="text/css" href="{-:*__RES__-}css/calendar-rtl.css" />
<link rel="stylesheet" type="text/css" href="{-:*__STYLE__-}css/common-rtl.css" />
{-:/if-}
<script src="{-:*__RES__-}js/calendar/calendar.js"></script>
<script src="{-:*__RES__-}js/calendar/lang/{-:*LANG_NAME-}.js"></script>
<script>
var GV = {
	_LD_ : '{-:*_LD_-}',
	LANG_NAME : '{-:*LANG_NAME-}',
	EDITOR: {
		BASE_PATH: '{-:*__RES__-}js/editor/',
		PLUGIN_PATH: '{-:*__RES__-}js/editor/plugins/',
		UPLOAD_JSON: '{-url:editorjson/upload-}',
		FILE_MANAGER_JSON: '{-url:editorjson/file_manage-}',
		FORM_DATA : {
			'timeKey' : '{-:$_TK["timeKey"]-}',
			'token' : '{-:$_TK["token"]-}'
		}
	},
	URL : {
		GET_CATEGORY_SELECT : '{-url:admin@article_category/_get_category_select-}',
		GET_CATEGORY_DEFAULT : '{-url:admin@article_category/_get_category_default-}'
	}
};
</script>
</head>

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

<form id="formAdd" action="" method="post">
<ul class="subnav subnav-tab" data-switcher="{'connect':'#tabContent'}">
	<li><a href="#">{-:@ADD_ARTICLE-}</a></li>
	<li><a href="#">{-:@ADDON_FIELD-}</a></li>
	<li><a href="#">{-:@ADVANCE-}</a></li>
</ul>
<div id="tabContent" class="switcher">
	<div class="tabCntnt">
		<table class="formTable margin">
			<tr>
				<td class="inputTitle">{-:@TITLE-}</td>
				<td class="inputTitle">{-:@RANK-}</td>
			</tr>
			<tr>
				<td class="inputArea">
					<input id="a_title" type="text" name="a_title" validate="/\S+/" value="" class="control-input input-inline" maxlength="255" size="50"> <span class="text-danger">*</span>
				</td>
				<td class="inputArea">
					<input class="control-input input-inline" type="text" value="50" name="a_rank" maxlength="6" size="6">
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea">
					<label><strong>{-:@KEYWORDS-}</strong> <input type="text" name="a_keywords" value="" class="control-input input-inline" maxlength="255" size="50"></label> <span class="text-muted">{-:@A_KEYWORDS_TIP-}</span>
				</td>
			</tr>
			<tr>
				<td class="inputArea">
					<label><strong>{-:@CATEGORY-}</strong>
					<input id="article_category_id" type="hidden" value="{-:$_AI['article_category_id']-}" name="article_category_id" />
					<span id="article_category_id_category_select" class="category_select" to='#article_category_id' a_field="yes"></span></label>
					<strong>{-:@FLAG-}</strong> {-foreach:$_AFL,$af,$afn-}<label><input type="checkbox" value="{-:$af-}" name="af_alias[]"> {-:$afn|get_itemL-}[{-:$af-}]</label>{-:/foreach-}
				</td>
				<td class="inputTip" rowspan="3">
					<img id="a_thumb_preview" src="{-:*__APP__-}u/site/default_article_thumb.png" width="320" />
				</td>
			</tr>
			<tr>
				<td class="inputTitle">{-:@THUMB-}</td>
			</tr>
			<tr>
				<td class="inputArea">
					<input id="a_thumb" class="control-input input-inline ltr" type="text" value="" name="a_thumb" maxlength="255" size="40">
					<span id="a_thumb_finder" to="#a_thumb" preview="#a_thumb_preview" class="btn finder" thumb="yes">{-:@BROWSE_SERVER-}</span>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputTitle">{-:@PROPERTY-} <span class="btn btn-sm" id="add_property">{-:@ADD_PROPERTY-}</span> <span class="text-muted text-normal">{-:@A_PROPERTY_TIP-}</span></td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea property_set_root">
					<ul id='property_set' class="property_set list-inline"></ul>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputTitle">
					{-:@CONTENT-}
					<span class="text-normal">
						<label><input type="checkbox" name="get_abstract" value="yes" checked="checked"> {-:@GET_ABSTRACT-}</label>
						<label><input type="checkbox" name="delete_external_links" value="yes"> {-:@DELETE_EXTERNAL_LINKS-}</label>
					</span>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea">
					<textarea class="editor" name="a_content" style="height:240px;"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputTitle">{-:@IMAGE-} <span class="btn btn-sm" id="add_image">{-:@ADD_IMAGE-}</span> <span class="text-muted text-normal">{-:@A_IMAGE_TIP-}</span></td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea image_set_root">
					<div id='image_set' class="image_set row"></div>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="inputTitle">{-:@ANNEX-} <span class="btn btn-sm" id="add_annex">{-:@ADD_ANNEX-}</span> <span class="text-muted text-normal">{-:@A_ANNEX_TIP-}</span></td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea annex_set_root">
					<div id='annex_set' class="annex_set row"></div>
				</td>
			</tr>
			<tr>
				<td class="inputTitle">{-:@DESCRIPTION-}</td>
				<td class="inputTitle"></td>
			</tr>
			<tr>
				<td class="inputArea">
					<textarea class="control-input input-inline" name="a_description" style="width:480px;height:70px;" placeholder="{-:@A_DESCRIPTION_TIP-}"></textarea>
				</td>
				<td class="inputTip">
					{-:@A_DESCRIPTION_TIP-}
				</td>
			</tr>
		</table>
	</div>
	<div class="tabCntnt">
		<table id="a_field_set" class="formTable margin">
		{-foreach:$_AI['ac_addon_field'],$acaf-}
			<tr>
				<td class="inputTitle">{-:$acaf['name']-}</td>
				<td class="inputTitle"></td>
			</tr>
			{-if:'string'==$acaf['type']-}
				<tr>
					<td class="inputArea"><input type="text" name="a_addon_field[{-:$acaf['key']-}]" value="{-:$_AI[$acaf['key']]-}" class="control-input input-inline" maxlength="255" size="40"></td>
					<td class="inputTip">{-:$acaf['tips']-}</td>
				</tr>
			{-elseif:'number'==$acaf['type']-}
				<tr>
					<td class="inputArea"><input type="text" name="a_addon_field[{-:$acaf['key']-}]" value="{-:$_AI[$acaf['key']]-}" class="control-input input-inline" maxlength="20" size="10"></td>
					<td class="inputTip">{-:$acaf['tips']-}</td>
				</tr>
			{-elseif:'bool'==$acaf['type']-}
				<tr>
					<td class="inputArea">
						<label><input type="radio" value="1" name="a_addon_field[{-:$acaf['key']-}]"{-if:1 == $_AI[$acaf['key']]-} checked="checked"{-:/if-}> {-:@YES-}</label>
						<label><input type="radio" value="0" name="a_addon_field[{-:$acaf['key']-}]"{-if:0 == $_AI[$acaf['key']]-} checked="checked"{-:/if-}> {-:@NO-}</label>
					</td>
					<td class="inputTip">{-:$acaf['tips']-}</td>
				</tr>
			{-elseif:'multi_text'==$acaf['type']-}
				<tr>
					<td class="inputArea">
						<textarea class="control-input input-inline" name="a_addon_field[{-:$acaf['key']-}]" style="width:480px;height:70px;">{-:$_AI[$acaf['key']]-}</textarea>
					</td>
					<td class="inputTip">{-:$acaf['tips']-}</td>
				</tr>
			{-elseif:'html_text'==$acaf['type']-}
				<tr>
					<td class="inputArea" colspan="2">
						<textarea class="editor" name="a_addon_field[{-:$acaf['key']-}]" style="height:240px;">{-:$_AI[$acaf['key']]-}</textarea>
						<div class="text-muted">{-:$acaf['tips']-}</div>
					</td>
				</tr>
			{-elseif:'file'==$acaf['type']-}
				<tr>
					<td class="inputArea">
						<input id="a_addon_field_{-:$acaf['key']-}" type="text" name="a_addon_field[{-:$acaf['key']-}]" value="{-:$_AI[$acaf['key']]-}" class="control-input input-inline" maxlength="255" size="50">
						<span id="a_addon_field_{-:$acaf['key']-}_finder" to="#a_addon_field_{-:$acaf['key']-}" class="btn finder" finder_type="file">{-:@BROWSE_SERVER-}</span>
					</td>
					<td class="inputTip">{-:$acaf['tips']-}</td>
				</tr>
			{-:/if-}
		{-:/foreach-}
		</table>
	</div>
	<div class="tabCntnt">
		<table class="formTable margin">
			<tr>
				<td colspan="2" class="inputArea">
					<label><strong>{-:@JUMP_URL-}</strong> <input type="text" name="a_url_jump" value="" class="control-input input-inline" maxlength="255" size="50"></label> <span class="text-muted">{-:@A_URL_JUMP_TIP-}</span>
				</td>
			</tr>
			<tr>
				<td class="inputTitle">{-:@STATUS-}</td>
				<td class="inputTitle">{-:@REVIEW_SWITCH-}</td>
			</tr>
			<tr>
				<td class="inputArea">
					<label><input type="radio" value="0" name="a_status"> {-:@NOT_PASSED-}</label>
					<label><input type="radio" value="1" name="a_status" checked="checked"> {-:@PASSED-}</label>
				</td>
				<td class="inputArea">
					<label><input type="radio" value="0" name="a_review_switch"> {-:@OFF-}</label>
					<label><input type="radio" value="1" name="a_review_switch" checked="checked"> {-:@ON-}</label>
				</td>
			</tr>
			<tr>
				<td class="inputTitle">{-:@EDIT_TIME-}</td>
				<td class="inputTitle">{-:@TEMPLATE-}</td>
			</tr>
			<tr>
				<td class="inputArea">
					<input class="control-input input-inline calendar" type="text" value="{-php:echo date(C('APP.TIME_FORMAT'));-}" format="{-:#APP.TIME_FORMAT-}" id="a_edit_time" name="a_edit_time" maxlength="255" size="20">
				</td>
				<td class="inputArea">
					<div class="input-select" data-input-select="{target: 'input'}">
						<input type="text" name="a_tpl" validate="/\S+/" value="{-:$_AI['a_tpl']|default~'show_article.php'-}" class="control-input input-inline" size="30" maxlength="64">
						<select id="a_tpl" class="control-input input-inline">
							{-foreach:$_TPLS,$tpl-}
							<option value="{-:$tpl['file']-}"{-if:$tpl['file']==$_AI['a_tpl']-} selected="selected"{-:/if-}>{-:$tpl['name']-}</option>
							{-:/foreach-}
						</select>
					</div>
				</td>
			</tr>
			<tr>
				<td class="inputTitle">{-:@COUNT-}</td>
				<td class="inputTitle"></td>
			</tr>
			<tr>
				<td colspan="2" class="inputArea">
					<label>{-:@VIEW-} <input type="text" name="a_view_count" validate="/\S+/" value="{-php:echo rand(10,100);-}" class="control-input input-inline" maxlength="20" size="10"></label>
					<label>{-:@REVIEW-} <input type="text" name="a_review_count" validate="/\S+/" value="0" class="control-input input-inline" maxlength="20" size="10"></label>
					<label>{-:@SUPPORT-} <input type="text" name="a_support_count" validate="/\S+/" value="{-php:echo rand(0,10);-}" class="control-input input-inline" maxlength="20" size="10"></label>
					<label>{-:@OPPOSE-} <input type="text" name="a_oppose_count" validate="/\S+/" value="0" class="control-input input-inline" maxlength="20" size="10"></label>
				</td>
			</tr>
		</table>
	</div>
</div>
<div id="operation" class="margin">
	<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
	<input name="token" type="hidden" value="{-:$_TK['token']-}">
	<span class="btn btn-info submit" action="{-url:admin@article/add_article_do-}" to="#formAdd">{-:@SUBMIT-}</span>
	<input class="btn" type="reset" value="{-:@RESET-}">
	<a class="btn" href="{-url:admin@article/list_article-}">{-:@BACK-}</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="{-:*__RES__-}js/editor/editor.js"></script>
<script src="{-:*__RES__-}js/editor/lang/{-:*LANG_NAME-}.js"></script>
<script src="{-:*__STYLE__-}js/common.js"></script>
<script src="{-:*__STYLE__-}js/calendar.js"></script>
<script src="{-:*__STYLE__-}js/admin.js"></script>
<script src="{-:*__STYLE__-}js/editor.js"></script>
<script src="{-:*__STYLE__-}js/article_category.js"></script>
<script src="{-:*__STYLE__-}js/article.js"></script>
</body>
</html>