<{include file="index/header.html"}>
<div class="cnav"><a href="javascript:;" class="back"><{if $smarty.get.cid}>编辑分类<{else}>添加分类<{/if}></a></div> 
<{uqcms m="category" v="cats" c="get_one_list:0"}>
<form action="?m=category&a=save" method="post">
	<{if $row.cid}><input name="cid" type="hidden" value="<{$row.cid}>"/><{/if}>
	<table class="etable"> 
		<tr>
			<td width="100px">父级分类：</td>
			<td><div class="cats_list"></div></td>
			<input type="hidden" name="pcid" value="<{$row.pcid}>" id="cid"/> 
		</tr>
		<tr>
			<td>名称：</td>
			<td><input name="name" type="text" size="51" id="name" value="<{$row.name}>"><i>必填</i></td>
		</tr>
		<tr>
			<td>关键字：</td>
			<td><input name="keywords" type="text" size="51" id="keywords" value="<{$row.keywords}>"/></td>
		</tr>
		<tr>
			<td valign="top" style="padding-top:5px;">描述：</td>
			<td><textarea name="describe" cols="50" rows="2" id="describe"><{$row.describe}></textarea></td>
		</tr>
		<tr>
			<td>分类图标：</td>
			<td>
				<div class="upload_button">
					<input type="text" name="images" value="<{$row.images}>"/>
					<a class="file" href="javascript:;">选择文件<input type="file" name="imgFile" id="imgFile"/></a>
				</div> 
				<div class="upload_tip vtip" data-img="<{if $row.images}><{$__IMG__}><{$row.images|img_size:120x0}><{/if}>"></div>
			 </td>
		</tr> 
		<tr>
			<td>热门：</td>
			<td>
				<label><input name="px_hot" type="radio" value="1" <{if $smarty.get.a == 'add'}>checked="checked"<{/if}><{if $row.px_hot == '1'}>checked="checked"<{/if}>/>是</label> 
				<label><input name="px_hot" type="radio" value="0" <{if $row.px_hot == '0'}>checked="checked"<{/if}>/>否</label> 
			</td>
		</tr>
		<tr>
			<td>首页：</td>
			<td>
				<label><input name="px_index" type="radio" value="1" <{if $smarty.get.a == 'add'}>checked="checked"<{/if}><{if $row.px_index == '1'}>checked="checked"<{/if}>/>是</label> 
				<label><input name="px_index" type="radio" value="0" <{if $row.px_index == '0'}>checked="checked"<{/if}>/>否</label> 
			</td>
		</tr>
		<tr>
			<td>推荐：</td>
			<td>
				<label><input name="px_recommend" type="radio" value="1" <{if $smarty.get.a == 'add'}>checked="checked"<{/if}><{if $row.px_recommend == '1'}>checked="checked"<{/if}>/>是</label> 
				<label><input name="px_recommend" type="radio" value="0" <{if $row.px_recommend == '0'}>checked="checked"<{/if}>/>否</label> 
			</td>
		</tr> 
		<tr>
			<td>排序：</td>
			<td><input name="px_asc" type="text" size="10" value="<{if $row.px_asc != ''}><{$row.px_asc}><{else}>0<{/if}>"></td>
		</tr>  
		<tr>
			<td>状态：</td>
			<td>
				<label><input name="status" type="radio" value="1" <{if $smarty.get.a == 'add'}>checked="checked"<{/if}><{if $row.status == '1'}>checked="checked"<{/if}> class="status"/>开</label> 
				<label><input name="status" type="radio" value="0" <{if $row.status == '0'}>checked="checked"<{/if}> class="status"/>关</label> 
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="保存" class="submit"/></td>
		</tr> 
	</table>
	</form>
<{include file="index/footer.html"}> 
<script type="text/javascript">
<{if $row.cid}>
	category_list('<{$row.pcid}>');	
<{else}>
	category_next('0');	
<{/if}>
upload('images','imgFile');
</script>