<?php if (!defined('THINK_PATH')) exit();?>﻿<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equtv="Content-Type" content="text/html; charset=utf-8" /><title>网站后台管理</title><link href="__APP__/public/css/Admin_css.css" type=text/css rel=stylesheet><script charset="utf-8" src="__APP__/public/js/editor/kindeditor.js"></script><script>       var editor;
            KindEditor.ready(function(K) {
                editor = K.create('textarea[name="content"]', {
                    allowFileManager : true ,
                   afterBlur:function(){this.sync();}
                });
            });

function CheckForm()
{ 
  if (document.myform.Title.value==""){
	alert("请填写标题！");
	document.myform.title.focus();
	return false;
  }
  if (document.myform.category.value==""){
	alert("请选择分类！");
	document.myform.category.focus();
	return false;
  }
  if (document.myform.hits.value==""){
	alert("请填写浏览次数！");
	document.myform.hits.focus();
	return false;
  }
  var filter=/^\s*[0-9]{1,6}\s*$/;
  if (!filter.test(document.myform.hits.value)) { 
	alert("浏览次数填写不正确,请重新填写！"); 
	document.myform.hits.focus();
	return false; 
  }
}
			function ResumeError()
			{return true;}
			window.onerror = ResumeError;
			$(document).ready(function(){
				$(parent.frames["main"].document).find("#Button1").attr("disabled",false);
			  $('#KeyLinkByTitle').click(function(){
			    GetKeyTags();
			  });
			});
		
</script></head><body><table width="100%" border="0"  align=center cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable"><form onSubmit="return CheckForm();" action="__URL__/addNews" id="myform" name="myform" method="post"><tr><td colspan="2" align=left class="admintitle">添加文章</td></tr><tr><td width="20%" class="b1_1">标题</td><td class="b1_1"><input name="title" type="text" id="title" size="40" maxlength="50" onBlur="CheckName();" onChange="CheckName();">&nbsp;<span class="note">注：最多50个字符</span></td></tr><tr><td class="b1_1">副标题</td><td class="b1_1"><input name="Subtitle" type="text" id="subtitle" size="40" maxlength="50">&nbsp;<span class="note">可以为空</span></td></tr><tr><td class="b1_1">作者</td><td class="b1_1"><input name="author" type="text" id="author" value="admin" size="40" maxlength="200"></td></tr><tr><td class="b1_1">来源</td><td class="b1_1"><span class="td"><input name="orgin" type="text" id="CopyFrom" value="本站" size="40" maxlength="200"></span></td></tr><tr><td class="b1_1">分类</td><td class="b1_1"><select ID="category" name="category"><?php if(is_array($categoryData)): $i = 0; $__LIST__ = $categoryData;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v1): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v1["id"]); ?>"><?php echo ($v1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select>&nbsp;</td></tr><tr><td class="b1_1">浏览次数</td><td class="b1_1"><input name="hits" type="text" id="hits" value="0" size="6" maxlength="10"></td></tr><tr><td valign="top" class="b1_1"><p>内容</p><p>发布时间<br><input name="times" type="text" id="times" value="<?php echo (todate($times,'Y-m-d H:i:s')); ?>"></p></td><td class="b1_1"><textarea name="content" style="width:100%;height:350px;" id="content"></textarea></td></tr><tr><td class="b1_1">附加选项</td><td class="b1_1">固顶
    <input name="top" type="checkbox" class="noborder" id="top" >    推荐
    <input name="tj" type="checkbox" class="noborder" id="tj" >    幻灯
    <input name="flash" type="checkbox" class="noborder" id="flash"></td></tr><tr><td width="20%" class="b1_1"></td><td class="b1_1"><input name="button" type="submit" class="bnt" value="添 加"></td></tr></form></table></body></html>