www.pudn.com > Jsp-Blog.rar > index.jsp, change:2010-05-30,size:18166b


<%@page language="java" contentType="text/html;charset=utf-8"%> 
<jsp:directive.page import="java.util.ArrayList" /> 
<jsp:directive.page import="myblog.entity.Logs" /> 
<jsp:directive.page import="java.util.Iterator" /> 
<% 
Object username = session.getAttribute("username"); 
%> 
<html> 
	<head> 
 
		<title>我的博客</title> 
		<link rel="stylesheet" href="css/index.css" type="text/css"> 
 
		<script type="text/javascript"> 
function showindex(){ 
document.forms[0].action="/myblog/index" 
document.forms[0].submit(); 
} 
function pl(va){ 
document.getElementById(va).style.display=""; 
} 
function sq(vc){ 
document.getElementById(vc).style.display="none"; 
} 
function tijiao(logid){ 
document.forms[0].action="/myblog/AddReviewServlet?logid="+logid; 
document.forms[0].submit(); 
} 
function manage(logid){ 
document.forms[0].action="/myblog/logAdmin?logid="+logid; 
document.forms[0].submit(); 
} 
function favorite(logid){ 
document.forms[0].action="/myblog/favorite?logid="+logid; 
document.forms[0].submit(); 
} 
</script> 
	</head> 
	<% 
	if (username == null) { 
	%> 
	<body onload="showindex()"> 
		<% 
		} else { 
		%> 
	 
	<body> 
		<% 
		} 
		%> 
		<form action="" method="post"> 
			<table width="800" border="0" align="center" cellpadding="0" 
				cellspacing="0"> 
				<tr> 
					<td height="45"> 
						<strong><font color="#FFFFFF">精彩的世界从这里开始,尽情的挥洒吧!</font> </strong> 
					</td> 
				</tr> 
 
			</table> 
			<table width="800" border="0" align="center" cellpadding="0" 
				cellspacing="0"> 
				<tr> 
					<td height="30" valign="top"> 
						<img src="images/menu[1].jpg" width="980" height="36" /> 
					</td> 
				</tr> 
				<tr> 
					<td height="641" valign="top" background="images/wrapper[1].jpg"> 
						<table width="914" height="598" border="0" cellpadding="0" 
							cellspacing="0"> 
							<tr> 
								<td width="56" height="598" valign="top"> 
									  
								</td> 
								<td width="195" valign="top"> 
 
 
									<table width="189" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
 
										<tr> 
											<td align="center" valign="top"> 
												<strong><font color="#FF0000">你好!</font> <font 
													color="green"> <% 
 if (username == null) { %>tourist <% 
 		} else { 
 		out.print(username.toString()); 
 	} 
 %> </font> </strong> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<table width="178" border="0" align="center" cellpadding="0" 
													cellspacing="0"> 
													<tr align="left"> 
 
														<td width="25" valign="top"> 
															<img src="images/23[1].gif" width="16" height="16"> 
														</td> 
														<td width="153" valign="top"> 
															<a href="index.jsp">博客首页</a> 
														</td> 
													</tr> 
													<tr> 
														<td width="25" valign="top" align="right"> 
															<img src="images/19[1].gif" width="16" height="16" /> 
														</td> 
														<td width="153" valign="top"> 
															<a href="http://localhost:7070/myblog/showphoto">  
																    照片</a> 
														</td> 
													</tr> 
													<tr> 
														<td width="25" valign="top" align="right"> 
															<img src="images/19[1].gif" width="16" height="16" /> 
														</td> 
														<td width="153" valign="top"> 
															<a href="http://localhost:7070/myblog/showfavorite">  
																    收藏</a> 
														</td> 
													</tr> 
													<tr> 
														<td width="25" valign="top" align="right"> 
															<img src="images/19[1].gif" width="16" height="16" /> 
														</td> 
														<td width="153" valign="top"> 
															<a href="http://localhost:7070/myblog/users">      博友</a> 
														</td> 
													</tr> 
													<tr> 
														<td width="25" valign="top" align="right" align="right"> 
															<img src="images/19[1].gif" width="16" height="16" /> 
														</td> 
														<td width="153" valign="top"> 
															<a href="http://localhost:7070/myblog/userinfor">      
																资料</a> 
														</td> 
													</tr> 
 
												</table> 
											</td> 
										</tr> 
									</table> 
									<!-- 目录部分--> 
									<table width="189" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
										<tr> 
											<td align="center" valign="top"> 
												<strong><font color="#ff0000">用户菜单</font> </strong> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<table width="178" border="0" align="center" cellpadding="0" 
													cellspacing="0"> 
													<tr> 
														<td width="48" align="center" valign="top"> 
															<img src="images/icon_list[1].gif" width="20" height="11"> 
														</td> 
														<td width="130" valign="top"> 
															<a href="login.jsp">用户登录</a> 
														</td> 
													</tr> 
													<tr> 
														<td width="48" align="center" valign="top"> 
															<img src="images/icon_list[1].gif" width="20" height="11"> 
														</td> 
														<td width="130" valign="top"> 
															<a href="reg.jsp">注册账号</a> 
														</td> 
													</tr> 
												</table> 
											</td> 
										</tr> 
									</table> 
									<!--最新评论--> 
									<table width="189" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
										 
										<tr> 
											<td valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
 
									</table> 
									<!--日历部分--> 
									<table width="189" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
										<tr> 
											<td align="center" valign="top"> 
												<strong><font color="#ff0000">电子日历</font> </strong> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<table width="178" border="0" align="center" cellpadding="0" 
													cellspacing="0"> 
													<tr> 
														<td width="25" height="66" valign="top"> 
															<jsp:include page="calender.jsp" /> 
															<br> 
														</td> 
													</tr> 
 
												</table> 
												<!--用户部分--> 
												<table width="189" border="0" align="center" cellpadding="0" 
													cellspacing="0"> 
 
 
													<tr> 
														<td valign="top"> 
															<table width="183" border="0" align="center" 
																cellpadding="0" cellspacing="0" height="41"> 
															</table> 
															<!--blog信息--> 
															<table width="189" border="0" align="center" 
																cellpadding="0" cellspacing="0"> 
																<tr> 
																	<td align="center" valign="top"> 
																		<strong><font color="#ff0000">信息统计</font> </strong> 
																		<br> 
																	</td> 
																	<td valign="top"> 
																		<br> 
																	</td> 
																</tr> 
																<tr> 
																	<td valign="top"> 
																		<img src="images/h[1].jpg" width="182" height="6"> 
																	</td> 
																	<td valign="top"> 
																		<br> 
																	</td> 
																</tr> 
																<tr> 
																	<td valign="top"> 
																		<table width="178" border="0" align="center" 
																			cellpadding="0" cellspacing="0"> 
																			<tr> 
																				<td valign="top"> 
																					日志总共: 
																					<strong> <% 
 	Object lognumber = session.getAttribute("lognumber"); 
 	if (lognumber != null) { 
 		out.print(lognumber.toString()); 
 	} 
 %> </strong>篇 
																				</td> 
																			</tr> 
																			<tr> 
																				<td valign="top"> 
																					评论总共: 
																					<strong> <% 
 	Object reviewnumber = session.getAttribute("reviewnumber"); 
 	if (reviewnumber != null) { 
 		out.print(reviewnumber.toString()); 
 	} 
 %> </strong> 条 
																				</td> 
																			</tr> 
																			<tr> 
																				<td valign="top"> 
																					总共注册: 
																					<strong> <% 
 	Object usernumber = session.getAttribute("usernumber"); 
 	if (usernumber != null) { 
 		out.print(usernumber.toString()); 
 	} 
 %> </strong> 人 
																				</td> 
																			</tr> 
																			<tr> 
																				<td valign="top"> 
																					访问总计: 
																					<strong> <% 
 	Object clicknumber = session.getAttribute("clicknumber"); 
 	if (clicknumber != null) { 
 		out.print(clicknumber.toString()); 
 	} 
 %> </strong> 次 
																				</td> 
												0							</tr> 
																			<tr> 
																				<td valign="top"> 
																					创建时间:2010/5/12 
																				</td> 
																			</tr> 
																		</table> 
																	</td> 
																	<td valign="top"> 
																		<br> 
																	</td> 
																</tr> 
															</table> 
														</td> 
													</tr> 
												</table> 
											</td> 
										</tr> 
									</table> 
									<!--音乐部分--> 
									<table width="182" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
										<tr> 
											<td align="center" valign="top"> 
												<strong><font color="#ff0000">音乐播放器</font> </strong> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
										<tr> 
											<td align="center" valign="top"> 
												<embed src="D:\workspace\myblog\WebRoot\music\天空之城.mp3" 
													autostart="true" loop="1" width="170" height="25"></embed> 
											</td> 
										</tr> 
									</table> 
									<!--查询部分--> 
										<table width="182" border="0" align="center" cellpadding="0" 
											cellspacing="0"> 
											<tr> 
												<td align="center" valign="top"> 
													<strong><font color="#ff0000">日志搜索</font> </strong> 
												</td> 
											</tr> 
											<tr> 
												<td valign="top"> 
													<img src="images/h[1].jpg" width="182" height="6"> 
												</td> 
											</tr> 
											<tr> 
												<td valign="top"> 
													<input name="key" type="text" id="key" size="15"> 
													<input name="search" type="submit" id="search" value="搜索"> 
												</td> 
											</tr> 
										</table> 
									 
									<!--链接部分--> 
									<table width="182" border="0" align="center" cellpadding="0" 
										cellspacing="0"> 
										<tr> 
											<td colspan="2" align="center" valign="top"> 
												<strong><font color="#ff0000">友情链接</font> </strong> 
											</td> 
										</tr> 
										<tr> 
											<td colspan="2" valign="top"> 
												<img src="images/h[1].jpg" width="182" height="6"> 
											</td> 
										</tr> 
										<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.163.com"><font color="#9400d3">网易</font> </a> 
											</td> 
										</tr> 
									 
										<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.csdn.net"><font color="#9400d3">CSDN</font> </a> 
											</td> 
										</tr> 
										 
										<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.hao123.com"><font color="#9400d3">网址之家</font> </a> 
											</td> 
										</tr> 
										 
										<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.baidu.com"><font color="#9400d3">中文百度</font> </a> 
											</td> 
										</tr> 
										 
										<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.google.com"><font color="#9400d3">Goole搜索</font> </a> 
											</td> 
										</tr> 
											<tr> 
											<td valign="top" colspan="2" align="center"> 
												<a href="http://www.wfu.edu.cn"><font color="#9400d3">母校-潍坊学院</font> </a> 
											</td> 
										</tr> 
										 
									 
										 
										 
									</table> 
 
								</td> 
								<td width="54" valign="top"> 
									  
								</td> 
								<td width="609" valign="top"> 
									<!--右边信息部分--> 
									<table width="588" border="0" align="center" cellpadding="0" 
										cellspacing="0" bgcolor="#87cefa"> 
										<tr> 
 
											<% 
											if (!username.equals("tourist")) { 
											%> 
											<td width="534"> 
												<font size="5" color="#ff4500" style="css/link.css"> 
													<a href="log.jsp">写日志     </a> <a 
													href="addphoto.jsp">上传照片     </a> 
													<a href="http://localhost:7070/myblog/showuserinfor">修改资料     </a> 
													<a href="loginout.jsp">退出系统</a> </font> 
											</td> 
											<% 
											} else { 
											%> 
											<td width="534"> 
												<font size="5" color="#9400d3"> 日 志 首 页 </font> 
											</td> 
											<% 
											} 
											%> 
 
 
										</tr> 
										<% 
											Object loglist = session.getAttribute("loglist"); 
											if (loglist != null) { 
												ArrayList list = (ArrayList) loglist; 
												Iterator ite = list.iterator(); 
												while (ite.hasNext()) { 
													Logs log = (Logs) ite.next(); 
										%> 
										<tr> 
											<td width="534"> 
												创建时间: 
												<%=log.getCreatedate()%> 
												     
												<% 
												if (!username.equals("tourist")) { 
												%> 
												<img src="/myblog/images/admin.gif" alt="日志管理" 
													onclick="manage('<%=log.getLogid()%>')"> 
												          
												<img src="/myblog/images/favorite.gif" alt="点击收藏此文章" 
													onclick="favorite('<%=log.getLogid()%>')"> 
												<% 
												} 
												%> 
											</td> 
										</tr> 
										<tr> 
											<td width="534"> 
												日志标题: 
												<b> <%=log.getLogtitle()%> </b> 
											</td> 
										</tr> 
										<tr> 
											<td width="534"> 
												日志内容: 
												<%=log.getLogcontent()%> 
											</td> 
										</tr> 
										<tr> 
											<td width="534"> 
												<button onclick="pl('<%=log.getLogid()%>')"> 
													<font color="#800080">我要评论</font> 
												</button> 
												<button onclick="sq('<%=log.getLogid()%>')"> 
													<font color="#800080">收起评论</font> 
												</button> 
												<div id="<%=log.getLogid()%>" style="display:none;"> 
													<table> 
														<tr> 
															<td width="534" valign="top"> 
																发表评论: 
																<br> 
																用户名: 
																<input type="text" value="匿名" name="reviewname"> 
															<br><br><br><br><br><br><br></td> 
														</tr> 
														<tr> 
															<td width="534" valign="top"> 
																评论内容: 
																<br> 
																<textarea rows="3" cols="35" name="reviewcontent"></textarea> 
															<br><br><br><br><br><br><br></td> 
														</tr> 
														<tr> 
															<td width="534" valign="top"> 
																<input type="submit" value="提交" 
																	onclick="tijiao('<%=log.getLogid()%>')"> 
																<button type="reset"> 
																	取消 
																</button> 
															<br><br><br><br><br><br><br></td> 
														</tr> 
													</table> 
												</div> 
											</td> 
										</tr> 
										<tr> 
											<td width="534"> 
												<hr color="ff80cc"> 
											</td> 
										</tr> 
										<% 
											} 
											} 
										%> 
									</table> 
									<table width="500" border="0" align="center" cellpadding="4" 
										cellspacing="0"> 
									</table> 
								</td> 
							</tr> 
						</table> 
					</td> 
				</tr> 
				<tr> 
					<td height="100" valign="top" background="images/footer[1].jpg"> 
						<table width="919" border="0" cellspacing="0" cellpadding="0"> 
							<tr> 
								<td width="283" height="94"> 
									  
								</td> 
								<td width="636" valign="top"> 
									<table width="458" height="40" border="0" align="center" 
										cellpadding="0" cellspacing="0"> 
										<tr> 
											<td align="center"> 
												<p> 
													<strong>2010年潍坊学院计算机与通信工程学院毕业设计</strong> 
												</p> 
												<p> 
													<strong>2006级   
														网络工程一班     徐仁强</strong> 
												</p> 
											</td> 
										</tr> 
									</table> 
								</td> 
							</tr> 
						</table> 
					</td> 
				</tr> 
			</table> 
		</form> 
	</body> 
</html>