<{include file="index/header.html"}>
<div class="cnav"><a href="javascript:;" class="back">添加动态</a></div>  
<div class="main"> 
	<form action="?m=news&a=save" method="post">
	<{if $row.id}><input name="id" type="hidden" value="<{$row.id}>"><{/if}> 
	<table width="100%" class="etable"> 
		<tr>
			<td width="100">所属分类</td>
			<td>
				<select name="cid" id="cid">
				<{foreach item=i from=$cats}>		
					<option value="<{$i.cid}>" disabled="disabled"><{$i.name}></option>
					<{foreach item=p from=$i.pcats}>	
						<option value="<{$p.cid}>" <{if $row.cid == $p.cid}>selected="selected"<{/if}>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|- <{$p.name}></option>
					<{/foreach}>
				<{/foreach}>
				</select> 
			</td>
	  	</tr>
		<tr>
			<td>标题</td>
			<td><input name="title" type="text" size="50" value="<{$row.title}>" id="title"></td>
	  	</tr>
		<tr>
			<td>别名</td>
			<td><input name="alias" type="text" size="50" value="<{$row.alias}>" id="title"></td>
	  	</tr>
		<tr>
			<td valign="top" style="padding-top:5px;">内容</td>
			<td><textarea name="content" cols="120" rows="25" id="content"><{$row.content}></textarea></td>
	  	</tr>
		<tr>
			<td>链接</td>
			<td>
				<input name="link" type="text" size="50" value="<{$row.link}>" id="title">
				<label style="padding:10px 0 0 20px;">
					<input type="checkbox" name="link_status" value="1" <{if $row.link_status}>checked="checked"<{/if}>/>
					<em style="font-style:inherit; padding:0 0 0 8px;">跳转到链接</em>
				</label>
			</td>
	  	</tr>
		<tr> 
			<td>状态</td>
			<td>
			<label><input type="radio" value="1" name="status" <{if $row.status == '1' || $smarty.get.a=='add'}>checked="checked"<{/if}>/>开启</label>
			<label><input type="radio" value="0" name="status" <{if $row.status == '0'}>checked="checked"<{/if}>/>关闭</label>
			</td>
	  	</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" value="保存"></td>
	  	</tr> 
	</table> 
	</form> 
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript"> 
editor_content('#content','news');
</script>