?? index.jsp
字號:
<%@ page language="java"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="blog.*"%>
<%@ page import="java.util.*"%>
<%--
// index.jsp
// 網站首頁
//
--%>
<HTML>
<HEAD>
<TITLE>Java Coffee-Touch The Dream</TITLE>
<LINK rev=stylesheet media=screen href="css/coffee.css" type=text/css
rel=stylesheet>
<LINK rev=stylesheet media=print href="css/print.css" type=text/css
rel=stylesheet>
<SCRIPT language=JavaScript type=text/javascript>
var str00="http://localhost/Blog/";
var str01="名稱或郵箱不能為空";
var str02="名稱或郵箱格式不對";
var str03="留言不能為空或過長";
var str06="顯示UBB表情>>";
var intMaxLen="1000";
</SCRIPT>
</HEAD>
<BODY class=single>
<%
request.setCharacterEncoding("gbk");
ArrayList artList = null;
ArrayList cataList= null;
CArtDAO artDao = CArtDAO.newInstance();
artList = artDao.executeQuery();
int realNum = 0;
CCataDAO cataDao = CCataDAO.newInstance();
cataList= cataDao.executeQuery();
%>
<DIV id=divAll>
<DIV id=divPage>
<DIV id=divMiddle>
<DIV id=divTop>
<H1 id=BlogTitle><A href="index.jsp">Java Coffee</A></H1>
<H2 id=BlogSubTitle>歡迎您訪問我的個人blog!</H2>
</DIV>
<DIV id=divNavBar>
<H3>導航</H3>
<UL>
<LI><A href="index.jsp">Index</A></LI>
<LI><A href="#">Search</A></LI>
<LI><A href="login.jsp">Admin</A></LI>
</UL>
</DIV>
<DIV id=divMain><%
if(artList != null){
realNum = artList.size();
int artNum = 0;
if(artList.size()<=5){
artNum = artList.size();
}else{
artNum = 5;
}
for(int i = 0; i<artNum;i++){
CArticle article = new CArticle();
article = (CArticle)artList.get(i);
out.println("<DIV class=\"post cate1 auth1\">");
out.println("<H4 class=post-date>"+article.getPostYear()+"/"+article.getPostMonth()+"/"+article.getPostDay()+" "+article.getPostTime()+"</H4>");
out.println("<H2 class=post-title><A href=\"viewarticle.jsp?artID="+article.getArtID()+"\">"+article.getArtTitle()+"</A></H2>");
out.println("<DIV class=post-body>"+CStringEncoder.htmlEncoder(article.getArtContent())+"</DIV>");
CUserDAO userDao = CUserDAO.newInstance();
String userName = userDao.queryByID(article.getUserID());
String cataName = cataDao.queryByID(article.getCataID());
out.println("<H6 class=post-footer>發布:"+userName+" | 分類:"+cataName+" | 評論:0 | 引用:0</H6>");
out.println("</DIV>");
}
out.println("<DIV class=\"post pagebar\"><A href=\"contactservlet?jumpPage=1\">瀏覽所有"+artList.size()+"篇日志</A></DIV>");
}else{
out.println("<DIV class=\"post pagebar\">沒有任何已寫的blog日志</DIV>");
}
%></DIV>
<DIV id=divSidebar>
<DIV class=function id=divCalendar>
<H3>日歷</H3>
<%
GregorianCalendar gCal = new GregorianCalendar() ;
CCalendar cal = new CCalendar(gCal);
String strCal = cal.makeCalendar();
out.println(strCal);
%>
</DIV>
<DIV class=function id=divContorPanel>
<H3>控制面板</H3>
<UL>
<LI><A href="login.jsp">[管理登陸]</A> <A
href="#">[查看權限]</A></LI>
</UL>
</DIV>
<DIV class=function id=divCatalog>
<H3>網站目錄</H3>
<UL>
<%
if(cataList != null){
for(int i = 0;i<cataList.size();i++){
CCatalog catalog = new CCatalog();
catalog = (CCatalog)cataList.get(i);
out.println("<LI><A href=\"contactservlet?jumpPage=1&cata="+catalog.getCataID()+"\">"+catalog.getCataName()+"</A>");
}
}
%>
</UL>
</DIV>
<DIV class=function id=divSearchPanel>
<H3>Search</H3>
<UL>
<LI>
<FORM action=# method=post><INPUT
id=edtSearch size=12 name=edtSearch> <INPUT id=btnPost type=submit
value=提交 name=btnPost></FORM>
</LI>
</UL>
</DIV>
<DIV class=function id=divStatistics>
<H3>站點統計</H3>
<UL>
<LI>文章總數:<%=realNum %>
<LI>當前語言:zh-CN</LI>
</UL>
</DIV>
<DIV class=function id=divFavorites>
<H3>網站收藏</H3>
<UL>
<li><a href="http://www.rainbowsoft.org/" target="_blank">RainbowSoft
Studio</a></li>
</UL>
</DIV>
<DIV class=function id=divLinkage>
<H3>友情鏈接</H3>
<UL>
<LI><A href="http://www.rainbowsoft.org/zblog/" target=_blank>布羅格的烘培機</A>
</LI>
</UL>
</DIV>
<DIV class=function id=divMisc>
<H3>圖標匯集</H3>
<UL>
<LI><A href="http://www.apache.org/" target=_blank> <IMG height=15
alt="本站采用apache 服務器" src="images/apache.gif" width=80 border=0></A>
<LI><A href="http://www.mozilla.org/" target=_blank> <IMG height=15
alt="本站為 Mozilla 進行了優化,推薦使用 Mozilla FireFox" src="images/firefox.png"
width=80 border=0></A>
<LI><A href="http://validator.w3.org/check?uri=referer" target=_blank>
<IMG height=15 alt="通過 W3C XHTML 1.0 Transitional 校驗"
src="images/w3c_xhtml.gif" width=69 border=0></A>
<LI><A href="http://jigsaw.w3.org/css-validator/check/referer"
target=_blank> <IMG height=15 alt="通過 W3C CSS 校驗"
src="images/w3c_css.gif" width=56 border=0></A></LI>
</UL>
</DIV>
</DIV>
<DIV id=divBottom>
<H2 id=BlogCopyRight>Copyright 2005-2008 LeToN.com. LeToNRights
Reserved.</H2>
</DIV>
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -