<%template _header%>
<!--header end-->
<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{config.forumurl}" class="home">{config.forumtitle}</a> <span><a href="usercp.aspx">用户中心</a></span><strong>编辑日志</strong></h2>	</div>
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
</div>
<!--TheCurrent end-->


<!--主体-->
<div class="controlpannel">
   <%template _menu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _spacemenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if page_err==0%>
						<%if ispost%>
							<%template _msgbox%>
						<%else%>
						<form id="postform" name="postpm" method="post" action="">
							<label for="user" class="LabelShort">日志标题:</label>
							<input name="title" type="text" id="title" size="40" value="{spacepostsinfo.Title}" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" maxlength="150"/><br />
							<label for="email" class="LabelShort">日志类别:</label>
							<%if categoryslist.Rows.Count!=0%>
							<%loop rows categoryslist%>
							<input type="checkbox" name="category" value="{rows[categoryid]}"
							<%if {rows[checked]}!="-1"%>
							 checked="checked"
							<%/if%>
							>{rows[title]}&nbsp;
							<%/loop%>
							<%else%>
							 暂无日志类别,<a href="usercpspacecategoryadd.aspx">新建日志类别</a>
							<%/if%>
							<br />
							<label for="comment" class="labelshort">内容:</label>
							
							<textarea id="DataTextarea" cols="80" rows="20" name="DataTextarea">{spacepostsinfo.Content}</textarea>
							<br/>
							<label for="savetosentbox"  class="labelshort">上传文件:</label>
							<iframe  width="80%" height="40px" id="checkveriframe" allowTransparency="true" style="border-width: 0px; margin: 0px;" frameborder="0" scrolling="no" src="{spaceurl}space/manage/uploadfile.aspx"></iframe>
							<div id="postattachfile" style="border: 0px; display: block;"></div><br />
							<label for="user" class="labelshort">发布类型:</label>
							<input type="radio" name="poststatus" value="1"  class="radioinput" 
							<%if {spacepostsinfo.PostStatus}==1%>
								checked="checked"
							<%/if%> />直接发布
							<input type="radio" name="poststatus" value="0"  class="radioinput"  						
							<%if {spacepostsinfo.PostStatus}==0%>
								checked="checked"
							<%/if%> />放入草稿箱
							<input type="radio" name="poststatus" value="2"   class="radioinput" 						
							<%if {spacepostsinfo.PostStatus}==2%>
								checked="checked"
							<%/if%> />私有<br />
							<label for="user" class="labelshort">评论类型:</label>
							<input type="radio" name="commentstatus" value="1" class="radioinput" 
							<%if {spacepostsinfo.CommentStatus}==1%>
								checked="checked"
							<%/if%> />不允许评论
							<input type="radio" name="commentstatus" value="0" class="radioinput" 
							<%if {spacepostsinfo.CommentStatus}==0%>
								checked="checked"
							<%/if%> />允许匿名评论
							<input name="commentstatus" type="radio" value="2"   class="radioinput" 
							<%if {spacepostsinfo.CommentStatus}==2%>
								checked="checked"
							<%/if%> />仅允许注册用户评论	<br />
							<input type="submit" name="Submit" id="postsubmit" value="确定" class="sbutton" onclick="return checkBlog();" />
							[完成后可按Ctrl+Enter提交]
						</form>
						<%/if%>
						</div>
					<%else%>
					<%template _usercperrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="editor/dnteditor.js"></script>
<script type="text/javascript" src="editor/post.js"></script>
<script type="text/javascript">
var dntEditor;

function CreateEditor()
{
	dntEditor = new DNTeditor('DataTextarea', '90%', '250', $('DataTextarea').value);
	dntEditor.Style = "{forumpath}templates/{templatepath}/editor.css";
	dntEditor.BasePath = '{forumpath}';
	dntEditor.ReplaceTextarea();
}

function PrepareSave()
{
	$('DataTextarea').value = dntEditor.GetHtml();
}

function validate(theform)
{
   PrepareSave();
   return true;
}

CreateEditor();
</script>
<script type="text/javascript" src="templates/{templatepath}/spaceblog.js"></script>
<!--编辑器结束-->	
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
