<%{include file='header.tpl'}%>

<script type="text/javascript" src="plugin/ueditor/editor_config.js"></script>
<script type="text/javascript" src="plugin/ueditor/editor_all_min.js"></script>
<link rel="stylesheet" href="plugin/ueditor/themes/default/ueditor.css">

<div id="main">

    <div class="nav">
    文章内容管理(<%{$t}%>)
    </div> <!-- /nav -->

    <div class="box">
	<form method="post" action="?c=article_content&a=edit&t=<%{$t}%>">

	<div class="box-header">
		<div class="tb-title">
		<a href="javascript:history.back(-1);">&lt;&lt;返回</a>
		<input type="submit" value="确认保存" />
		</div>
	</div> <!-- /box-header -->

	<div class="box-content">
	    <table class="box-table">
		<tr>
		    <th class="w120">归属栏目：</th>
		    <td>
		        <select name="article[cate_id]" class="selectlist">
				<option value='0' >未指定分类</option>
			    <%{foreach from=$article_category item=v key=k}%>
			        <option value='<%{$v.cate_id}%>' <%{if $v.cate_id eq $article.cate_id}%> selected<%{/if}%> ><%{$v.cate_name}%></option>
			    <%{/foreach}%>
			</select>
		    </td>
		</tr>
		<tr>
		    <th>标题：</th>
		    <td>
		        <input type="text" class="textinput auto-w" name="article[title]" value="<%{$article.title}%>" maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/><span class="tips">*</span>
			<%{*
			<br>
		        完整标题：<input type="text" class="textinput auto-w" name="article[com_title]" value="<%{$article.com_title}%>" maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/><br>
		        副 标 题：<input type="text" class="textinput auto-w" name="article[sub_title]" value="<%{$article.sub_title}%>" maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/>
			*}%>
		    </td>
		</tr>
		<tr>
		    <th>作者：</th>
		    <td><input type="text" class="textinput auto-w" name="article[author]" value="<%{$article.author}%>" maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/></td>
		</tr>
		<tr>
		    <th>来源：</th>
		    <td><input type="text" class="textinput auto-w" name="article[copyfrom]" value="<%{$article.copyfrom}%>"  maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/></td>
		</tr>
		<tr>
		    <th>默认图片：</th>
		    <td>
			<input type="text" class="textinput auto-w" id="default_pic" name="article[default_pic]" value="<%{$article.default_pic}%>"  maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/>
			<iframe src="?c=upload&type=images&id=default_pic" name="upfile" width="580" height="30" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
		    </td>
		</tr>
		<tr>
		    <th  style="vertical-align:top;">内容简介：</th>
		    <td><textarea class="textarea auto-w min-h" name="article[intro]" onfocus="inputFocus(this)" onblur="inputBlur(this)"><%{$article.intro}%></textarea></td>
		</tr>
		<tr>
		    <th  style="vertical-align:top;">正文内容：</th>
		    <td>
			<script type="text/plain" id="myEditor" name="article[content]"><%{$article.content}%></script>
			<script type="text/javascript">
			var editor = new baidu.editor.ui.Editor();
			editor.render("myEditor");
			</script>
		    </td>
		</tr>
		<tr>
		    <th>标签：</th>
		    <td><input type="text" class="textinput auto-w" name="article[tags]" value="<%{$article.tags}%>" maxlength="255" onfocus="inputFocus(this)" onblur="inputBlur(this)"/></td>
		</tr>
		<tr>
		    <th>更新时间：</th>
		    <td>
		        <input type="text" class="textinput w240" name="article[update_time]" value="<%{$article.update_time|date_format:$date_format}%>"  onfocus="inputFocus(this)" onblur="inputBlur(this)"/>
		    </td>
		</tr>
		<tr>
		    <th>审核：</th>
		    <td>
		        <input type="checkbox" name="article[passed]" value="1" <%{if $article.passed}%>checked<%{/if}%>  /> 通过
		    </td>
		</tr>
	    </table>
	</div> <!-- /box-content -->

	<div class="box-footer">
	    <div class="tb-submit">
		<a href="javascript:history.back(-1);">&lt;&lt;返回</a>
		<input type="submit" value="确认保存" />
		<input type="hidden" name="article[article_id]" value="<%{$article.article_id}%>" />
	    </div>
	</div> <!-- /box-footer -->

	</form>
    </div><!-- /box -->

</div><!-- /main -->


<%{include file='footer.tpl'}%>
