<include file="../Index/header" />
<link rel="stylesheet" type="text/css" href="{$tpl}/Skins/member.css">

<div id="main">
    <include file="../Member/left" />
    <div id="m_right" class="mrt10">
       <p id="position"><strong>当前位置：</strong><a href="?s=Member/">个人中心</a>发表日记</p>
       <ul id="m_subnav">
          <li><a href="__URL__/mydiary">日记列表</a></li><li><a href="__URL__/add">发表日记</a></li>
          <div class="cl"></div>
       </ul>
<form method='post' id="adddiary" name="adddiary" action="__URL__/insert"  enctype="multipart/form-data">
<table cellpadding=0 cellspacing=1 class="table_form">
<caption>发表新日记</caption>
<tr>
	<td class="tRight" width="10%">分类：</td>
	<td class="tLeft" ><select name="cateid" id="cateid" ><option value="" >选择分类</option>
    <volist name='cateid' id='qy'>
    <option value="{$qy.cateid}" >{$qy.name}</option>
    </volist>
    </select></td>
</tr>
<tr>
	<td class="tRight" width="10%">标题：</td>
	<td class="tLeft" ><input type="text" class="inputtitle" name="diarytitle"></td>
</tr>
<tr>
	<td class="tRight tTop">内容：</td>
	<td class="tLeft"><textarea id="diarytxt" name="diarytxt" style="width:600px;height:300px;"></textarea>	</td>
</tr>
<tr>
	<td></td>
	<td class="center">
	<input type="hidden" name="status" value="1">
    <input type="hidden" name="uid" value="<?php echo $_SESSION[C('USER_AUTH_KEY')] ?>">
    <input type="hidden" name="username" value="<?php echo $_SESSION['loginUserName'] ?>">
	<input type="submit" value="保 存"  class="button small"> <input type="reset" class="button small" onclick="resetEditor()" value="重 置" ></td>
</tr>
</table>
</form>
</div>
</div>
<include file="../Index/footer" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/editor/kindeditor.js"></script>
<script type="text/javascript">
KE.show({
	id : 'diarytxt',
	resizeMode : 1,
	allowPreviewEmoticons : false,
	allowUpload : false,
	items : [
	'source', '|', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
	'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
	'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'unlink']
});
var $diarytxt = $('#diarytxt').val();
document.getElementById("adddiary").onreset = function(){
	KE.html('diarytxt', $diarytxt);
}
</script> 
