📄 class_addressbook.jsp
字号:
<%@page contentType="text/html; charset=gb2312" language="java" errorPage="error.jsp"%>
<%@page import="com.suninformation.*,com.suninformation.user.*,com.suninformation.tools.*,com.suninformation.schoolmate.*,java.sql.Date"%>
<%request.setCharacterEncoding("gb2312");%>
<%
String UserName = (String) session.getAttribute("userName");
String LoginIp = (String) session.getAttribute("loginIp");
String LoginCount = (String) session.getAttribute("loginCount");
Date LoginTime = (Date) session.getAttribute("loginTime");
int ClassId = ParamUtils.getIntParameter(request,"classid",-1);
boolean errorLogin = false;
if (UserName == "" || UserName == null) {
errorLogin = true;
}
if(!errorLogin) {
try {
SMMember smm = new SMMember(UserName,ClassId);
if(smm.getLastLoginIp()==null || smm.getLastLoginIp()=="") {
smm.setLastLoginIp(LoginIp);
smm.setLastLoginTime(LoginTime);
smm.setLoginCount(smm.getLoginCount()+1);
smm.save();
}
else if(!smm.getLastLoginIp().equals(LoginIp)) {
smm.setLastLoginIp(LoginIp);
smm.setLastLoginTime(new Date(System.currentTimeMillis()));
smm.setLoginCount(smm.getLoginCount()+1);
smm.save();
}
else if((LoginTime.getTime()-smm.getLastLoginTime().getTime())/(1000*60*60*24)>1) {
smm.setLastLoginIp(LoginIp);
smm.setLastLoginTime(new Date(System.currentTimeMillis()));
smm.setLoginCount(smm.getLoginCount()+1);
smm.save();
}
}catch(Exception e) {
//throw new com.suninformation.user.UnacceptableException(e.getMessage(),e);
}
}
int Page = ParamUtils.getIntParameter(request, "page", 1);
int PageCount = 0;
int RecordNo = 0;
int MemberCount = 0;
%>
<html>
<head>
<title>校友录_通讯录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Includes/im.css" rel="stylesheet" type="text/css">
<link href="Includes/user.css" rel="stylesheet" type="text/css">
<script language="javascript" src="Includes/functionForUser.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
function sure() {
if(confirm("真的确定要删除留言吗?")==true) {
return true;
}
return false
}
function meberstatus(status)
{
switch (status)
{
case 1: //管理员
document.write("<img src='Images/adr_01.gif' border='0'>");
break;
case 2: //成员
document.write("<img src='Images/adr_03.gif' border='0'>");
break;
case 3: //客人
document.write("<img src='Images/adr_02.gif' border='0'>");
break;
case 4: //待批准成员
document.write("<img src='Images/adr_05.gif' border='0'>");
break;
case 5: //待批准客人
document.write("<img src='Images/adr_06.gif' border='0'>");
break;
}
}
//-->
</SCRIPT>
</head>
<body>
<table width="610" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
<br>
<%
SMClass smc_p = new SMClass(ClassId);
SMSchool sms = new SMSchool(smc_p.getSchoolId());
%>
<TABLE class=td_left_up_down_right cellSpacing=0 cellPadding=0 width=600 border=0>
<TR>
<TD align=middle width=43 bgColor=#f4f4f4>
<IMG height=22 src="Images/pic_01.gif" width=18>
</TD>
<TD width=557 bgColor=#f4f4f4>
<A href="sm_main.jsp">校友录首页</A>
>
<a href="class_search.jsp?schoolid=<%=sms.getSchoolId()%>"><%=sms.getSchoolName()%></a> >
<a href="class_index.jsp?classid=<%=ClassId%>"><%=smc_p.getClassName()%></a> > 通讯录</TD>
</TR>
</TABLE>
<TABLE width=600 border=0 cellPadding=0 cellSpacing=0 class="td_left_up_down_right" style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 8px">
<TR>
<TD style="LINE-HEIGHT: 160%" align=center width=80 bgColor=#fff9f0 height=35>
<FONT color=#ff6c00>
<B>班级功能</B>
</FONT>
</TD>
<TD align=center bgColor=#fff9f0><a href="class_message.jsp?classid=<%=ClassId%>">
<IMG height=22 hspace=5 src="Images/fc2.gif" width=76 border=0></a><a href="class_addressbook.jsp?classid=<%=ClassId%>"><IMG height=22 hspace=5 src="Images/fc3.gif" width=76 border=0></a><IMG height=22 hspace=5 src="Images/fc4.gif" width=76 border=0><a href="class_manage.jsp?classid=<%=ClassId%>"><IMG height=22 hspace=5 src="Images/fc5.gif" width=76 border=0></a><IMG height=22 hspace=5 src="Images/fc6.gif" width=76 border=0><IMG height=22 hspace=5 src="Images/fc7.gif" width=76 border=0>
</TD>
</TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=600 border=0>
<TR>
<TD class=FONT03 bgColor=#a8cd13 colSpan=2
height=22> 通讯录</TD>
</TR>
<TR>
<TD colSpan=2 height=14></TD>
</TR>
<TR>
<TD vAlign=top bgColor=#f8f8f8 height=22>
<TABLE cellSpacing=0 cellPadding=0 width=170 border=0>
<TBODY>
<TR>
<TD align=right height=22><IMG height=9 src="Images/pic03.gif" width=5> 待批准加入班级成员:</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD width=430 bgColor=#f8f8f8>
<TABLE width=100% border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD>
<%
SMMember[] smm = smc_p.getSMMembers();
for(int i=0;i<smm.length;i++) {
if(smm[i].getIsPassed()==0 && smm[i].getMemberType()==4) {
out.print(new UserInfo(smm[i].getUserName()).getRealName() + "(" + smm[i].getUserName() + ") [<a href='class_member_add.jsp?mid=" + smm[i].getMemberId() + "&url=" + SunGlobal.getAppHome() + "/sm/class_addressbook.jsp?classid=" + ClassId + "'>批准</a>][<a href='class_member_del.jsp?mid=" + smm[i].getMemberId() + "&url=" + SunGlobal.getAppHome() + "/sm/class_addressbook.jsp?classid=" + ClassId + "'>删除</a>]<br>");
}
}
%>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD colSpan=2 height=10></TD>
</TR>
<TR>
<TD vAlign=top bgColor=#f8f8f8 height=22>
<TABLE cellSpacing=0 cellPadding=0 width=170 border=0>
<TBODY>
<TR>
<TD align=right height=22><IMG height=9 src="Images/pic03.gif" width=5> 待批准加入班级客人:</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD bgColor=#f8f8f8 height=22><TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
<TBODY>
<TR>
<TD>
<%
for(int i=0;i<smm.length;i++) {
if(smm[i].getIsPassed()==0 && smm[i].getMemberType()==5) {
out.print(new UserInfo(smm[i].getUserName()).getRealName() + "(" + smm[i].getUserName() + ") [<a href='class_member_add.jsp?mid=" + smm[i].getMemberId() + "&url=" + SunGlobal.getAppHome() + "/sm/class_addressbook.jsp?classid=" + ClassId + "'>批准</a>][<a href='class_member_del.jsp?mid=" + smm[i].getMemberId() + "&url=" + SunGlobal.getAppHome() + "/sm/class_addressbook.jsp?classid=" + ClassId + "'>删除</a>]<br>");
}
}
%>
</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<TABLE style="MARGIN-TOP: 10px" cellSpacing=0 cellPadding=0 width=600 border=0>
<TBODY>
<TR>
<TD class=FONT02 align=middle width=87 background=Images/bg_pic04.gif height=26>同学通讯录</TD>
<TD align=middle width=89 background=Images/bg_pic05.gif>附加通讯录</TD>
<TD width=425> </TD>
</TR>
<TR>
<TD bgColor=#9cd400 colSpan=3 height=2></TD>
</TR>
<TR>
<TD colSpan=3 height=32> 注:<IMG height=12 src="Images/adr_01.gif" width=11> 管理员 <IMG height=14 src="Images/adr_03.gif" width=11> 班级成员 <IMG height=9 src="Images/adr_02.gif" width=12> 班级客人 <SPAN><IMG height=14 src="Images/adr_05.gif" width=11> 待批准成员 <IMG height=9 src="Images/adr_06.gif" width=12> 待批准客人</SPAN></TD>
</TR>
</TBODY>
</TABLE>
<TABLE width=600 border=0 cellPadding=0 cellSpacing=0 class="td_left_up_down_right" style="MARGIN-TOP: 8px">
<TR>
<TD width=435 bgColor=#a8cd13 height=22> 通讯录列表</TD>
</TR>
<TR>
<TD style="PADDING-BOTTOM: 8px; PADDING-TOP: 8px" bgColor=#f8f8f8><%
SMMember[] smm_p = new SMClass(ClassId).getSMMembers();
if(smm_p!=null) {
MemberCount = smm_p.length;
PageCount = PageCount / 15;
if (Page > PageCount || Page < 1) {
Page = 1;
RecordNo = 1;
}
else {
RecordNo = Page * 15;
}
if(PageCount==0) {
PageCount = 1;
}
%>
<TABLE style="MARGIN-TOP: 1px" cellSpacing=1 cellPadding=0 width=600 border=0>
<TR bgColor=#e4e4e4>
<TD align=middle width=36 height=24><FONT color=#ff6c00>类型</FONT></TD>
<TD align=middle width=31><FONT color=#ff6c00>名片</FONT></TD>
<TD align=middle width=70><FONT color=#ff6c00>真实姓名</FONT></TD>
<TD align=middle width=72><FONT color=#ff6c00>用户名</FONT></TD>
<TD align=middle width=60><FONT color=#ff6c00>QQ号码</FONT></TD>
<TD align=middle width=142 bgColor=#e4e4e4><FONT color=#ff6c00>Email</FONT></TD>
<TD align=middle width=53><FONT color=#ff6c00>访问次数</FONT></TD>
<TD align=middle width=127><FONT color=#ff6c00>上次登录</FONT></TD>
</TR>
<%for(int i=RecordNo-1;i<=RecordNo+14 && i<smm_p.length;i++) {
UserInfo ui = new UserInfo(smm_p[i].getUserName());
%>
<TR>
<TD align=middle bgColor=#ffffff><SCRIPT>meberstatus(<%=smm_p[i].getMemberType()%>)</SCRIPT></TD>
<TD align=middle bgColor=#ffffff><a href="../user/show_person_info.jsp?username=<%=smm_p[i].getUserName()%>" title="点击查看用户资料" target="_blank"><IMG height=12 src="Images/adr_04.gif" width=16 border=0></A></TD>
<TD align=middle width=70 bgColor=#ffffff><%=ui.getRealName()%></TD>
<TD align=middle bgColor=#ffffff><%=smm_p[i].getUserName()%></TD>
<TD align=middle bgColor=#ffffff><%=ui.getQq()==null?"无":ui.getQq()%></TD>
<TD style="PADDING-BOTTOM: 6px; PADDING-TOP: 6px" align=middle width=142 bgColor=#ffffff><a href="mailto:<%=ui.getEmail()%>"><%=ui.getEmail()%></A></TD>
<TD align=middle bgColor=#ffffff><%=smm_p[i].getLoginCount()%></TD>
<TD align=middle bgColor=#ffffff><%=smm_p[i].getLastLoginTime()%></TD>
</TR>
<%}
}
%>
</table></TD>
</TR>
</TABLE>
<br>
<%if (PageCount > 0) { %>
<SCRIPT language=JavaScript type="text/javascript">
<!--//
function page_validate()
{
if(document.InputPageForm.page.value < 0) {
document.InputPageForm.page.value = 0;
return false;
} else if(document.InputPageForm.page.value > <%=PageCount%>) {
document.InputPageForm.page.value = <%=PageCount%>;
return false;
}
return true;
}
function gotoPage(type) {
if(type=="prev") {
document.InputPageForm.page.value = <%=Page-1%>;
}else if(type=="next") {
document.InputPageForm.page.value = <%=Page+1%>;
}
document.InputPageForm.submit();
}
//-->
</SCRIPT>
<TABLE style="MARGIN-TOP: 5px" cellSpacing=0 cellPadding=0 width=100% border=0>
<FORM name=InputPageForm onsubmit="return page_validate();" action="class_addressbook.jsp" method=get>
<TR>
<TD height=24 align=right background=Images/bg_p_01.gif bgcolor="#999999"><a href="javascript:gotoPage('prev')">上一页</a> <a href="javascript:gotoPage('next')">下一页</a> 第<%=Page%>/<%=PageCount%>页 跳到
<INPUT maxLength=4 size=3 name=page>
页 </TD><INPUT type=hidden value=<%=ClassId%> name=classid>
<TD align=center background=Images/bg_p_01.gif bgcolor="#999999" style="PADDING-TOP: 3px"><INPUT type=image height=17 width=23 src="Images/bt_go.gif" border=0 name=image>
</TD>
</TR>
</FORM>
</TABLE>
<%}%>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" height="60" width="610">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" bgcolor="#999999" height="1"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center">
<font color="#b1b1b1">
<a href="../about_aoke_cn.htm" target="_blank" class="title">关于沈航</a>
|服务条款|广告服务|沈航招聘|客服中心|联系我们
</font>
</td>
</tr>
</table>
<font style="font-size: 12px; line-height: 24px;" color="#b2b2b2">
<br>
沈阳航空工业学院
版权所有
</font>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -