?? homeonline.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.lovo.po.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'home.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="stylesheet" rev="stylesheet" href="css/index.css" />
<style type="text/css">
#namemes{
font-size: 15px;
margin-top: 15px;
border-bottom: 1px solid black;
}
#bankuai{
border-bottom: 1px solid black;
font-size: 15px;
margin-top: 15px;
}
#tiezi{
font-size: 15px;
border-bottom: 1px solid black;
padding-top: 15px;
}
#mes{
height: 50px;
}
#newMessage{
font-size: 32px;
color: #F6000C;
}
#glowtext{
filter:glow(color=ff0000,strength=2);
width:100%;
}
</style>
<script type="text/javascript">
var xmlHttp = false;
function createXmlHttp(){
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function checkNewMessage(){
//創建xmlhttprequest
createXmlHttp();
var url = "servlet/NewPersonalInfoDO?time="+new Date()+"&userId="+<%=((UserPO) session.getAttribute("user")).getId()%>;
xmlHttp.onreadystatechange = checkNewMessageCallback;
xmlHttp.open("get",url);
xmlHttp.send(null);
setTimeout("checkNewMessage()",1000);
}
function checkNewMessageCallback(){
if(xmlHttp.readyState==4 && xmlHttp.status==200){
//1.取得服務器響應內容
var msg = xmlHttp.responseText;
if(msg == "") {
document.getElementById("new").innerHTML = "";
return;
}
var msgArr = msg.split("-");
//alert(msgArr[6]);
//alert(msgArr[1]);
//2.動態修改頁面的部份內容
document.getElementById("new").innerHTML = "<div border=1px red solid id='newMessage'>"+msgArr[7]+"</div>";
document.getElementById("pubNum").innerHTML = msgArr[0];
document.getElementById("prestige").innerHTML = msgArr[1];
document.getElementById("level").innerHTML = msgArr[2];
document.getElementById("honor").innerHTML = msgArr[3];
document.getElementById("score").innerHTML = msgArr[4];
document.getElementById("wealth").innerHTML = msgArr[5];
document.getElementById("msgNum").innerHTML = "(" + msgArr[6] + ")";
}
}
</script>
<script language=JavaScript src="js/scroll.js"></script>
</head>
<body onload="checkNewMessage()">
<div id="container">
<div id="header">
<div id="headMenu">
<ul id="headMenuUL">
<li>
<a href="web/login.jsp">登錄</a>
</li>
<li>
<a href="web/regAfterLogin.jsp">注冊</a>
</li>
<li>
<a href="#">友情鏈接</a>
</li>
<li>
<a href="lovo39_5_bbs">Home</a>
</li>
</ul>
</div>
<div id="logo">
<a href="lovo39_5_bbs"><img src="images/logo.gif" height="120px"
border="0" /> </a>
</div>
<div id="menuBar">
<ul id="menuBarUL">
<li>
<a href="web/login.jsp">登錄</a>
</li>
<li>
<a href="web/regAfterLogin.jsp">注冊</a>
</li>
<li>
<a href="servlet/ExitDO">退出</a>
</li>
<li>
<a href="web/jsp/search.jsp" target="showPage">搜索</a>
</li>
<li>
<a href="web/jsp/online.jsp" target="showPage">用戶列表</a>
</li>
<li>
<a href="servlet/WealthSortDO?page=1" target="showPage">財富排名</a>
</li>
<li>
<a href="QueryChatroomsDO" target="showPage">聊天室</a>
</li>
<c:if test="${sessionScope.user.adminFlag == 1}">
<li>
<a href="web/admin/admin.jsp">管理</a>
</li>
</c:if>
<li>
<a href="web/jsp/index.jsp" target="showPage">首頁</a>
</li>
</ul>
</div>
</div>
<div id="wraper">
<div id="leftWraper">
<div id="namemes">
歡迎${sessionScope.user.name}進入論壇:
<br />
<br />
你的登陸時間是:
<br />
<br />
${sessionScope.now}
<br />
</div>
<div id="lefts" width="111">
<br />
<IMG alt=離線 src="images/offline.gif" border=0>
<A href="http://localhost:8888/yhbbs/User.htm?uId=1">${sessionScope.user.name}</A>
<br />
<br />
<IMG src="images/avatars/15.gif" width="48" height="48" border=0>
<br />
威望: <span id="prestige"></span>
<BR>
級別: <span id="level"></span>
<BR>
榮譽: <span id="honor"></span>
<!--<IMG height=16 alt=1027 src="images/level/6.gif" width="111" height="52" border=0>-->
<BR>
積分: <span id="score"></span>
<!--<IMG height=16 alt=5247 src="images/cms/1.gif" width="52" height="16" width=52 border=0>-->
<BR>
現金: <span id="wealth"></span>
<BR>
發帖數: <span id="pubNum"></span> 篇
<BR>
</div>
<div id="new">
</div>
<div id="mes">
<br />
<br />
<a href="servlet/QueryMessagesDO?userId=${sessionScope.user.id}" target="showPage">收信<span id="msgNum"></span>
</a>
<a href="web/jsp/sendMessage.jsp">發信</a>
<a href="web/jsp/modifyInfo.jsp" target="showPage">修改個人信息</a>
</div>
</div>
<div id="rightWraper">
<iframe id="showPage" name="showPage" src="web/jsp/online.jsp"
frameborder="0"></iframe>
</div>
</div>
<div id="footer">
footer
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -