<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="com.blogmethods.basic.domain.Article"%>
<%@ include file="/taglib.jsp"%>
<!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><c:out value="${blog.title}"/> - <c:out value="${article.title}"/></title>
<meta name="generator" content="BlogMethods Basic 1.0.0" />
<meta name="description" content="<c:out value="${article.excerpt}" />" />
<meta name="keywords" content="" />
<link rel="stylesheet" href="<c:url value="/themes/${blog.options.theme_dir_name.value}/resources/styles/style.css"/>" type="text/css" media="screen, projection" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<c:url value="/feeds/"/>" />
<link rel="shortcut icon" href="<c:url value="/favicon.ico"/>" type="image/x-icon" />
<script src="<c:url value="/js/blog.js"/>" type="text/javascript" language="JavaScript"></script>
</head>
<body>

<div id="divAll">
<div id="divPage">
<div id="divMiddle">
<c:import url="/include.do">
	<c:param name="path" value="/include_header.jsp" />
</c:import>

<c:import url="/blog.do?method=nav" />

<div id="divMain">

<div class="post">
<h2 class="post-title"><a href="<c:url value="/articles.do?method=article&id=${article.id}"/>"><c:out value="${article.title}" /></a></h2>
<div class="post-body">
<c:out value="${article.content}" escapeXml="false" />
</div>
<h6 class="post-footer">时间:<fmt:formatDate value="${article.createdOn}"
	pattern="${blog.dateFormat} ${blog.timeFormat}" /> | 标签:<c:forEach var="tag" items="${article.tags}">&nbsp;<a href="<c:url value="/articles.do?method=byTag&id=${tag.id}"/>"><c:out value="${tag.title}"/></a></c:forEach></h6>
</div>

<c:if test="${article.allowComment||article.allowTrackback}">
<div class="post">
<c:if test="${article.allowTrackback}">
<p class="posttop"><strong><c_rt:out value="<%=((Article)request.getAttribute("article")).getTrackbacks().size()+""%>" />条引用</strong> | <a href="<c:url value="/articles.do?method=trackback&id=${article.id}"/>" class="more">引用链接</a></p>
<c:forEach var="trackback" items="${article.trackbacks}">
<c:set var="number" value="1" />
<ul class="msg tb">
<li class="tbname"><c:out value="${number}"/>. <c:out value="${trackback.blogName}" /></li>
<li class="msgurl">引用来自<A HREF="<c:out value="${trackback.url}"/>" rel='external nofollow'>《<c:out value="${trackback.title}" />》:</A></li>
<li class="msgarticle"><c:out value="${trackback.excerpt}" escapeXml="false"/></li>
<li class="msgtime"><fmt:formatDate value="${trackback.time}" pattern="${blog.dateFormat} ${blog.timeFormat}" /></li>
</ul>
<c:set var="number" value="${number+1}" />
</c:forEach>
</div>
</c:if>

<c:if test="${article.allowComment}">
<div class="post">
<p class="posttop"><strong><c_rt:out value="<%=((Article)request.getAttribute("article")).getComments().size()+""%>" />条评论</strong> | <a href="#commentform" class="more">我要评论</a></p>
<c:set var="number" value="1" />
<c:forEach var="comment" items="${article.comments}">
<ul class="msg tb">
<li class="tbname"><c:out value="${number}"/>. <c:out value="${comment.author}" /></li>
<li class="msgarticle"><c:out value="${comment.content}" escapeXml="false"/></li>
<li class="msgtime"><fmt:formatDate value="${comment.time}" pattern="${blog.dateFormat} ${blog.timeFormat}" /></li>
</ul>
<c:set var="number" value="${number+1}" />
</c:forEach>
</div>

<div class="post" id="divCommentPost">
<p class="posttop"><strong>发表评论:</strong></p>
<script src="<c:url value="/js/tiny_mce/tiny_mce.js"/>" type="text/javascript" language="JavaScript"></script>
<script type="text/javascript" language="JavaScript"><!--
tinyMCE.init(
			{mode : "exact",
			elements : "content",
			width : "520",
			height: "200",
			editor_css : "<c:url value="/js/tiny_mce/themes/advanced/css/editor_ui2.css"/>",
			language: "zh_cn_utf8",
			theme : "advanced",
			theme_advanced_buttons1 : "bold,italic,underline,bullist,numlist,link,unlink",
			theme_advanced_buttons2 : "",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_resizing : false,
			browsers : "msie,gecko,opera",
			dialog_type : "modal",
			theme_advanced_resize_horizontal : true,
			entity_encoding : "raw",
			relative_urls : false,
			remove_script_host : false,
			force_p_newlines : true,
			force_br_newlines : false,
			convert_newlines_to_brs : false,
			remove_linebreaks : true,
			auto_reset_designmode : true }
		);
//--> </script>
<form id="commentform" name="commentform" method="post" action="<c:url value="/articles.do?method=comment"/>" onsubmit="return validateCommentForm();">
<input type="hidden" name="article_id" value="<c:out value="${article.id}"/>" />
<p><input type="text" name="author" id="author" class="text" value="" size="28" tabindex="1" /> <label for="author">姓名(*)</label></p> <p><input type="text" name="email" id="email" class="text" value="" size="28" tabindex="2" /> <label for="email">Email(*)</label></p>
<p><input type="text" name="url" id="url" class="text" value="" size="28" tabindex="3" /> <label for="url"><acronym title="Please input your website url." lang="en">网站链接</acronym></label></p>
<p><label for="content">正文(*)(留言最长字数:500)</label></p>
<p><textarea name="content" id="content" class="text" cols="50" rows="4" tabindex="4" ></textarea></p>
<p><input name="btnSumbit" type="submit" tabindex="5" value="提交" class="button" /></p>
</form>
</div>
</c:if>
</c:if>
</div>
<div id="divSidebar">
	<div class="function">
	<h3>搜索</h3>
	<ul><li class="none">
	<form name="search" action="<c:url value="/search.do"/>" method="post" onsubmit="return validateSearchForm();">
	<input value="<c:out value="${keyword}"/>" name="s" id="s" /> <input type="submit" value="搜索" id="searchbutton" name="searchbutton" /></form></li></ul>
	</div>
	<fmt:formatDate var="date" value="${article.createdOn}" pattern="yyyy-MM"/>
	<c:import url="/articles.do?method=calendar"><c:param name="date" value="${date}"/></c:import>
	<c:import url="/articles.do?method=recentArticles" />
	<c:import url="/include.do"><c:param name="path" value="/include_feeds.jsp" /></c:import>
</div>

<c:import url="/include.do">
	<c:param name="path" value="/include_footer.jsp" />
</c:import>
</div>
</div>
</div>
</body></html>