<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在线商城后台管理</title>
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/nav.css" />
<script type="text/javascript" src="editor/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="editor/ckfinder/ckfinder.js"></script>
{literal}
<script type="text/javascript">
//添加文章验证
function checkUpdateContent() {
	var fm = document.update;	
	if (fm.title.value == '') {
		alert('文章标题不得为空！');
		fm.title.focus();
		return false;
	}
	if (fm.title.value.length < 2) {
		alert('文章标题不得小于2位！');
		fm.title.focus();
		return false;
	}
	if(fm.pid.value==0){
		alert('请选择文章所属类别');		
		return false;
	}
	if (fm.keywords.value == '') {
		alert('文章关键字不得为空！');
		fm.keywords.focus();
		return false;
	}
	if (fm.keywords.value.length > 100) {
		alert('文章关键字不得大于100位！');
		fm.keywords.focus();
		return false;
	}
	if (fm.info.value == '') {
		alert('文章摘要不得为空！');
		fm.info.focus();
		return false;
	}
	if (fm.info.value.length > 200) {
		alert('文章摘要不得大于200位！');
		fm.info.focus();
		return false;
	}
	if (CKEDITOR.instances.TextArea1.getData() == '') {
		alert('内容不得为空！');
		CKEDITOR.instances.TextArea1.focus();
		return false;
	}
	return true;
}
</script>
{/literal}
</head>
<body>

<h2><a href="?a=artile">文章列表</a>内容管理 -- 修改文章</h2>

<form method="post" name="update" action="?a=artile&m=update&id={$OneArtile[0]->id}">
	<input type="hidden" name="flag" id="flag" />	
	<div class="add_update">		
		<table cellspacing="0">			
			<tr>
				<td align="right">文章标题：</td>
				<td><input type="text" name="title" class="text" style="width:400px;" value="{$OneArtile[0]->title}"/></td>
			</tr>
			<tr>
				<td align="right">文章所属类别：</td>
				<td>
					<select name="pid" style="width:150px;">
						<option value="0" style="padding:0;">请选择一个文章类别</option>
						{html_options options=$ArtileNav selected=$OneArtile[0]->nav_pid}
					</select>
				</td>
			</tr>	
			<tr>
				<td align="right">关键词：</td>
				<td><input type="text" name="keywords" class="text" style="width:600px;" value="{$OneArtile[0]->keywords}" /><span>  　　说明：填写正确的关键词有助于搜索引擎收录,多个关键词以逗号分割</span></td>
				
			</tr>
			<tr>
				<td align="right">文章摘要：</td>
				<td><textarea name="info" style="width:600px;">{$OneArtile[0]->info}</textarea></td>
			</tr>
			<tr>
				<td align="right">文章来源：</td>
				<td>
					<input type="text" name="source" class="text" style="width:400px;" value="{$OneArtile[0]->source}" />
				</td>
			</tr>
			<tr>
				<td align="right">文章属性：</td>
				<td>
					{$OneArtile[0]->ontop}
					文章置顶 &nbsp;&nbsp;
					{$OneArtile[0]->hot}
					热门推荐 					
				</td>
			</tr>
			<tr>
				<td align="right">标题颜色：</td>
				<td>
					<select name="color">
						<option value="">默认颜色</option>
						<option style="color:red;" value="red">红色</option>
						<option style="color:blue;" value="blue">蓝色</option>
						<option style="color:orange;" value="orange">橙色</option>
					</select>
				</td>
			</tr>			
			
			<tr class="ckeditor">
				<td align="right">文章内容：</td>
				<td><textarea name="content" id="TextArea1">{$OneArtile[0]->content}</textarea>	
				{literal}		
				 <script type="text/javascript">
						CKEDITOR.replace( 'content',
						{
						
							filebrowserBrowseUrl : 'editor/ckfinder/ckfinder.html',
							filebrowserImageBrowseUrl : 'editor/ckfinder/ckfinder.html?Type=Images',
							filebrowserFlashBrowseUrl : 'editor/ckfinder/ckfinder.html?Type=Flash',
							filebrowserUploadUrl : 'editor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
							filebrowserImageUploadUrl : 'editor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
							filebrowserFlashUploadUrl : 'editor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
							
						});
				</script>
				{/literal}		
				</td>
			</tr>		
			<tr><td></td><td><input type="submit" name="send" value="修改文章" class="submit" onclick="return checkUpdateContent();" /></td></tr>
		</table>
	</div>
</form>
</body>
</html>