<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="{-:*__THEME__-}/admin/css/c.css" />
<link rel="stylesheet" type="text/css" href="{-:*__THEME__-}/admin/css/mf.css" />
</head>
<body>
<dl class="atab">
	<dt><strong>{-:@ARCHIVE-}</strong><strong>{-:@OTHER-}</strong></dt>
	<dd>
		<div class="tabCntnt">
		<table class="listTable">
			<tr>
				<td>
					<label>
						<strong>{-:@CHANNEL-}</strong>
						<select id="a_list_cid">
							<option value="">{-:@PAGE_ENVIRONMENT-}</option>
							<option value="all">{-:@NOT_LIMIT-}</option>
							{-:$_ACLStr-}
						</select>
					</label>
					<label>
						<strong>{-:@ROW-}</strong>
						<input id="a_list_row" class="i" type="text" value="10" size="5" />
					</label>
					<span class="btn_l" onclick="build_tag_ac_list();">{-:@BUILD-}{-:@CHANNEL_LIST-}</span>
					<label>
						<input id="ac_list_issub" type="checkbox" />
						<span class="fc_gry">{-:@TAG_AC_LIST_ISSUB_TIP-}</span>
					</label>
				</td>
			</tr>
			<tr>
				<td>
					<label>
						<strong>{-:@FLAG-}</strong>
						<select id="a_list_flag">
							<option value="">{-:@NOT_LIMIT-}</option>
						{-foreach:$_AFL,$f-}
							<option value="{-:$f['af_alias']-}">{-:$f['af_name']-}</option>
						{-:/foreach-}
						</select>
					</label>
					<label>
						<strong>{-:@TITLE_LENGTH-}</strong>
						<input id="a_list_titlelen" class="i" type="text" value="20" size="5" />
						<span class="fc_gry">{-:@TAG_A_LIST_TITLELEN_TIP-}</span>
					</label>
				</td>
			</tr>
			<tr>
				<td>
					<label>
						<strong>{-:@DAYS-}</strong>
						<input id="a_list_days" class="i" type="text" value="" size="5" />
						<span class="fc_gry">{-:@TAG_A_LIST_DAYS_TIP-}</span>
					</label>
					<label>
						<strong>{-:@KEYWORDS-}</strong>
						<input id="a_list_keywords" class="i" type="text" value="" size="10" />
						<span class="fc_gry">{-:@TAG_A_LIST_KEYWORDS_TIP-}</span>
					</label>
				</td>
			</tr>
			<tr>
				<td>
					<label>
						<strong>{-:@ORDER-}</strong>
						<select id="a_list_orderby">
							<option value="">{-:@DISPLAY_ORDER-}</option>
							<option value="archive_id">{-:@ID-}</option>
							<option value="a_edit_time">{-:@EDIT_TIME-}</option>
							<option value="a_rank">{-:@RANK-}</option>
							<option value="a_view_count">{-:@VIEW_COUNT-}</option>
							<option value="a_support_count">{-:@SUPPORT_COUNT-}</option>
						</select>
					</label>
					<label>
						<select id="a_list_order">
							<option value="">{-:@ORDER-}</option>
							<option value="desc">{-:@DESC-}</option>
							<option value="asc">{-:@ASC-}</option>
						</select>
					</label>
				</td>
			</tr>
			<tr>
				<td>
					<label>
						<strong>{-:@LIST_ITEM-}</strong><br />
						<textarea id="a_list_list_item" class="i" style="width:98%;height:50px;">[<a href="{-php:echo '{';-}-:$item['ac_url']-}">{-php:echo '{';-}-:$item['ac_name']-}</a>] <a href="{-php:echo '{';-}-:$item['a_url']-}">{-php:echo '{';-}-:$item['a_title']-}</a><br /></textarea>
						<p class="fc_gry">{-:@TAG_A_LIST_LIST_ITEM_TIP-}</p>
					</label>
				</td>
			</tr>
			<tr>
				<td>
					<span class="btn_b" onclick="build_tag_a_list();">{-:@BUILD-}</span>
					<label>
						<input id="a_list_issub" type="checkbox" />
						<span class="fc_gry">{-:@TAG_A_LIST_ISSUB_TIP-}</span>
					</label>
				</td>
			</tr>
		</table>
		</div><!--/ARCHIVE-->
		<div class="tabCntnt">
		<table class="listTable">
			<tr>
				<td align="right" width="20%" valign="top"><strong>{-:@AD-}</strong></td>
				<td>
					<label>
						<select id="ad_id">
						{-foreach:$_ASL,$as-}
							<option value="{-:$as['ad_space_id']-}">{-:$as['as_name']-}</option>
						{-:/foreach-}
						</select>
					</label>
					<span class="btn_b" onclick="build_tag_ad();">{-:@BUILD-}</span>
				</td>
			</tr>
			<tr>
				<td align="right" valign="top" width="20%"><strong>{-:@MENU-}</strong></td>
				<td>
					<label>
						<select id="menu_alias">
						{-foreach:$_MSL,$ms-}
							<option value="{-:$ms['ms_alias']-}">{-:$ms['ms_name']-}</option>
						{-:/foreach-}
						</select>
					</label>
					<span class="btn_b" onclick="build_tag_menu();">{-:@BUILD-}</span>
				</td>
			</tr>
			<tr>
				<td align="right" valign="top" width="20%"><strong>{-:@FLINK-}</strong></td>
				<td>
					<label>
						<select id="fl_list_cid">
							<option value="">{-:@CATEGORY-}</option>
						{-foreach:$_FCL,$fc-}
							<option value="{-:$fc['flink_category_id']-}">{-:$fc['fc_name']-}</option>
						{-:/foreach-}
						</select>
					</label>
					<label>
						<select id="fl_list_type">
							<option value="">{-:@TYPE-}</option>
							<option value="text">{-:@TEXT_LINK-}</option>
							<option value="logo">{-:@LOGO_LINK-}</option>
						</select>
					</label>
					<label>
						<strong>{-:@ROW-}</strong>
						<input id="fl_list_row" class="i" type="text" value="10" size="5" />
					</label>
					<span class="btn_b" onclick="build_tag_fl_list();">{-:@BUILD-}</span>
				</td>
			</tr>
			<tr>
				<td align="right" valign="top" width="20%"><strong>{-:@GUESTBOOK-}</strong></td>
				<td>
					<label>
						<strong>{-:@ROW-}</strong>
						<input id="gb_list_row" class="i" type="text" value="10" size="5" />
					</label>
					<span class="btn_b" onclick="build_tag_gb_list();">{-:@BUILD-}</span>
				</td>
			</tr>
			<tr>
				<td align="right" valign="top" width="20%"><strong>{-:@SINGLE_PAGE-}</strong></td>
				<td>
					<label>
						<strong>{-:@ROW-}</strong>
						<input id="sp_list_row" class="i" type="text" value="10" size="5" />
					</label>
					<span class="btn_b" onclick="build_tag_sp_list();">{-:@BUILD-}</span>
				</td>
			</tr>
		</table>
		</div><!--/OTHER-->
	</dd>
</dl><!--/.atab-->
<dl class="abox">
	<dt><strong>{-:@GET-}{-:@CODE-}</strong></dt>
	<dd>
		<textarea id="code" class="i" style="width:98%;height:160px;">
		</textarea>
	</dd>
</dl><!--/.abox-->
<script type="text/javascript" src="{-:*__PUBLIC__-}/js/jquery.js"></script>
<script type="text/javascript">
function build_tag_a_list(){
	var cid = $("#a_list_cid option:selected").val(),
		flag = $("#a_list_flag option:selected").val(),
		days = $("#a_list_days").val(),
		keywords = $("#a_list_keywords").val(),
		row = $("#a_list_row").val(),
		titlelen = $("#a_list_titlelen").val(),
		orderby = $("#a_list_orderby option:selected").val(),
		order = $("#a_list_order option:selected").val(),
		code = '{-php:echo '<';-}uwa:a_list';

	if('' != cid){
		code += ' cid="'+cid+'"';
	}
	else if($('#a_list_issub').get(0).checked){
		code += ' issub="yes"';
	}
	if('' != flag){
		code += ' flag="'+flag+'"';
	}
	if('' != days){
		code += ' days="'+days+'"';
	}
	if('' != keywords){
		code += ' keywords="'+keywords+'"';
	}
	if('' != row){
		code += ' row="'+row+'"';
	}
	if('' != titlelen){
		code += ' titlelen="'+titlelen+'"';
	}
	if('' != orderby){
		code += ' orderby="'+orderby+'"';
	}
	if('' != order){
		code += ' order="'+order+'"';
	}
	
	code += '>\r\n';
	code += '\t'+$('#a_list_list_item').val()+'\r\n';
	code += '{-php:echo '<';-}/uwa:a_list>';
	$('#code').val(code);
}

function build_tag_ac_list(){
	var cid = $("#a_list_cid option:selected").val(),
		row = $("#a_list_row").val(),
		code = '{-php:echo '<';-}uwa:ac_list';
	if('' != cid){
		code += ' cid="'+cid+'"';
	}
	else if($('#ac_list_issub').get(0).checked){
		code += ' issub="yes"';
	}
	if('' != row){
		code += ' row="'+row+'"';
	}
	
	code += '>\r\n';
	code += '\t<a href="{-php:echo '{';-}-:$channel[\'ac_url\']-}">{-php:echo '{';-}-:$channel[\'ac_name\']-}</a>\r\n';
	code += '{-php:echo '<';-}/uwa:ac_list>';
	$('#code').val(code);
}

function build_tag_ad(){
	var id = $("#ad_id option:selected").val(),
		code = '{-php:echo '<';-}uwa:ad';
	if('' != id){
		code += ' id="'+id+'"';
	}
	else{
		return false;
	}
	code += '>';
	$('#code').val(code);
}

function build_tag_menu(){
	var alias = $("#menu_alias option:selected").val(),
		code = '{-php:echo '<';-}uwa:menu';
	if('' != alias){
		code += ' alias="'+alias+'">\r\n';
		code += '\t<a href="{-php:echo '{';-}-:$m[\'url\']-}">{-php:echo '{';-}-:$m[\'m_name\']-}</a>\r\n';
		code += '\t{-php:echo '{';-}-if:!empty($m[\'m_sub_menu\'])-}<span>\r\n';
		code += '\t{-php:echo '{';-}-foreach:$m[\'m_sub_menu\'],$ms-}\r\n';
		code += '\t\t<a href="{-php:echo '{';-}-:$ms[\'url\']-}">{-php:echo '{';-}-:$ms[\'m_name\']-}</a>\r\n';
		code += '\t{-php:echo '{';-}-:/foreach-}\r\n';
		code += '\t</span>{-php:echo '{';-}-:/if-}\r\n';
	}
	else{
		return false;
	}
	code += '{-php:echo '<';-}/uwa:menu>';
	$('#code').val(code);
}

function build_tag_fl_list(){
	var cid = $("#fl_list_cid option:selected").val(),
		type = $("#fl_list_type option:selected").val(),
		row = $("#fl_list_row").val(),
		code = '{-php:echo '<';-}uwa:fl_list';

	if('' != cid){
		code += ' cid="'+cid+'"';
	}
	if('' != type){
		code += ' type="'+type+'"';
	}
	if('' != row){
		code += ' row="'+row+'"';
	}

	code += '>\r\n';
	code += '\t[{-php:echo '{';-}-:$item[\'fc_name\']-}] <a href="{-php:echo '{';-}-:$item[\'f_site_url\']-}">{-php:echo '{';-}-:$item[\'f_site_name\']-}</a>\r\n';
	code += '{-php:echo '<';-}/uwa:fl_list>';
	$('#code').val(code);
}

function build_tag_gb_list(){
	var row = $("#gb_list_row").val(),
		code = '{-php:echo '<';-}uwa:gb_list';
	if('' != row){
		code += ' row="'+row+'"';
	}

	code += '>\r\n';
	code += '\t{-php:echo '{';-}-:$item[\'g_author\']-}: {-php:echo '{';-}-:$item[\'g_content\']-} [{-php:echo '{';-}-:$item[\'g_add_time\']|date~\'Y-m-d H:i:s\',@me-}]\r\n';
	code += '{-php:echo '<';-}/uwa:gb_list>';
	$('#code').val(code);
}

function build_tag_sp_list(){
	var row = $("#sp_list_row").val(),
		code = '{-php:echo '<';-}uwa:sp_list';
	if('' != row){
		code += ' row="'+row+'"';
	}

	code += '>\r\n';
	code += '\t<a href="{-php:echo '{';-}-:$item[\'sp_url\']-}">{-php:echo '{';-}-:$item[\'sp_title\']-}</a>\r\n';
	code += '{-php:echo '<';-}/uwa:sp_list>';
	$('#code').val(code);
}
</script>
<script type="text/javascript" src="{-:*__THEME__-}/admin/js/c.js"></script>
</body>
</html>