<!DOCTYPE html>
<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
	<meta charset="utf-8">
	<title>GCMS后台管理</title>
	<meta http-equiv="X-UA-Compatible" content="chrome=1">
	<link rel="stylesheet" href="__PUBLIC__/Css/admincss.css" type="text/css">
	<link rel="stylesheet" href="{echo C('SITE_EDITOR')}/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="{echo C('SITE_EDITOR')}/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="{echo C('SITE_EDITOR')}/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="{echo C('SITE_EDITOR')}/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="{echo C('SITE_EDITOR')}/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor = K.create('textarea[name="gcmscontent"]', {
				cssPath : '{echo C('SITE_EDITOR')}/kindeditor/plugins/code/prettify.css',
				uploadJson : '{echo C('SITE_EDITOR')}/JSON/upload_json.php',
				fileManagerJson : '{echo C('SITE_EDITOR')}/JSON/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=contactform]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=contactform]')[0].submit();
					});
				}
			});
			prettyPrint();
				K('#image1').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#url1').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('a[href="\\#editpic"]').attr('href','/phpimageeditor/editimage.php?imagesrc=..'+url);
								K('#url1').val(url);
								editor.hideDialog();
							}
						});
					});
				});
		});
	</script>

	</head><body>
		<section class="hbox stretch">
			{template /Admin/Index/navli.html}
			<section id="content">
				<section class="vbox">
					{template /Admin/Index/header.html}
					<section class="scrollable bg-light lter">
						<section id="docs">
							<div class="clearfix padder">
								
								
<section class="panel">
	<header class="panel-heading">
		<nav class="m-crumb m-crumb-arr">
		<ul class="f-cb">
			<li><a href="#">GCMS</a></li>
			<li><a href="#">文章管理</a></li>
			<li>{if getGp('a')=='editarticle'}修改{else}添加{/if}文章</li>
    </ul>
    </nav>
  </header>
</section>
	
<section class="panel">
	<header class="panel-heading">◇ {if getGp('a')=='editarticle'}修改{else}添加{/if}文章</header>
	<div class="panel-body">
			<form method="post" action="{echo U('Admin/Article/'.getGp('a').'save')}" id="contactform">__TOKEN__
				<div id="contact-form"><input name="id" type="hidden" value="{$articledata['0']['id']}">
				<label><span class="required"> * </span>选择分类</label>
				<select name="gcmsclass" style="width:200px;">
					{loop $classdata $classlist}
					<option value="{$classlist['id']},{$classlist['classseo']}" {if $classlist['id']==$articledata['0']['gcmsclass']}selected{/if}>{$classlist['classname']}</option>
					{/loop}
					</select>
				<label><span class="required"> * </span>文章标题</label>
				<input name="gcmstitle" type="text" value="{$articledata['0']['gcmstitle']}">
				<label><span class="required"> * </span>文章内容</label>
				<textarea name="gcmscontent" style="width:100%;height:220px;visibility:hidden;">{$articledata['0']['gcmscontent']}</textarea>
				<label><span class="required"></span>文章标签 </label>
				<input name="gcmstags" type="text" value="{$articledata['0']['gcmstags']}">
				<label><span class="required"></span>文章简介</label>
				<textarea name="gcmsdesc" cols="20" rows="3" style="height:80px;">{$articledata['0']['gcmsdesc']}</textarea>
				<label><span class="required"></span>文章图片</label>
				<p style="width:100%"><input name="gcmspic" type="text" id="url1" value="{$articledata['0']['gcmspic']}" style="margin-right:15px; float:left; width:400px;" /> <input class="button" type="button" id="image1" value="选择图片" style="height:34px; float:left; width:100px;" /> <a href="#editpic" class="button button-red" style="height:34px; float:left; margin:0 0 0 10px;padding:6px; 15px; 6px; 15px;" target="_blank"> 修图 </a></p>
				<br /><br />
				<label><span class="required"></span>文章作者</label>
				<input name="gcmsauthor" type="text" value="{$articledata['0']['gcmsauthor']}">
				</div>
				<br/>
					<ul class="formee-list">
					<li><input type="radio" value="0" name="status" {if $articledata['0']['status']==0 }checked{/if} /><label>普通</label></li>
					<li><input type="radio" value="1" name="status" {if $articledata['0']['status']==1 }checked{/if} /><label>推荐</label></li>
					<li><input type="radio" value="2" name="status" {if $articledata['0']['status']==2 }checked{/if} /><label>头条</label></li>
					</ul>
				<br/>
				<div id="contact-form">
								<p>
									<input class="button" type="submit" name="submit" value=" 提 交 ">
								</p>
</div> 
</form>


</div> 
	
	
	</section>

</div></section></section></section></section></section></body></html>

