⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_index.jsp

📁 计算机技术的快速发展
💻 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 UserType = (String) session.getAttribute("userType");
  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);
    }
  }
  SMSchool sms = null;
  SMClass[] smcl = null;
  SMClass[] smc = null;
  SMMember smm = null;
  //int ClassId = ParamUtils.getIntParameter(request, "classid", 1);
  //int Page = ParamUtils.getIntParameter(request, "page", 1);
  //int PageCount = 0;
  //int RecordNo = 0;
  //int ClassCount = 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"></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);
      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> >
<%=smc_p.getClassName()%>          </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 width=600 border=0 cellPadding=0 cellSpacing=0 class="td_left_up_down_right">
        <TR>
          <TD bgColor=#a8cd13 colSpan=5 height=22>
            <TABLE class=BREAK cellSpacing=0 cellPadding=0 width=435 border=0>
              <TR>
                <TD width=32></TD>
                <TD class=FONT03><%=smc_p.getClassName()%></TD>
              </TR>
            </TABLE>
          </TD>
          <TD bgColor=#a8cd13 height=22>
<SCRIPT>
function confirm_jump(szMesg, szUrl)
{
  if (confirm(szMesg)) {
    window.location=szUrl;
  }
}
</SCRIPT><SCRIPT>
function InviteValidate()
{
  if((FORM1.invitemethod.value)>50 || (FORM1.invitemethod.value)==""){
    alert('请填写正确的email地址');
    FORM1.invitemethod.focus();
    return false;
  }
}
</SCRIPT>
<SCRIPT>
function SetJointype(szJointype)
{
  join.jointype.value=szJointype;
}
function SetJointypeAndSubmit(szJointype)
{
  join.jointype.value=szJointype;
  join.submit();
}
</SCRIPT>
        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <FORM name=join action="class_join.jsp" method="get">
              <INPUT type=hidden value=<%=ClassId%> name=classid>
              <INPUT type=hidden value=4 name=jointype>
              <TR>
                <TD align=center>
                  <INPUT onclick=javascript:SetJointype(4) type=image height=15 width=55 src="Images/bt_mjoin.gif" name=image>
                  <INPUT onclick=javascript:SetJointype(5) type=image height=15 width=55 src="Images/bt_gjoin.gif" name=image>
                </TD>
              </TR>
            </FORM>
            </TABLE>
          </TD>
        </TR>
<%
SMMember smm_p = new SMMember(smc_p.getInitiator(),ClassId);
%>
        <TR>
          <TD width=32 bgColor=#f8f8f8 rowSpan=6>&nbsp;</TD>
          <TD style="LINE-HEIGHT: 140%; PADDING-TOP: 3px" bgColor=#f8f8f8 colSpan=2 height=40>创 建 人:<FONT color=#85a100><a href="../user/show_person_info.jsp?username=<%=smm_p.getUserName()%>" target="_blank"><%=smm_p.getUserInfo().getRealName()%></a></FONT>
            <BR>
            入学年份:<FONT color=#85a100><%=smc_p.getBeginYear()%></FONT>
          </TD>
          <TD style="LINE-HEIGHT: 140%; PADDING-TOP: 3px" bgColor=#f8f8f8 colSpan=2>创建时间:<FONT color=#85a100><%=smc_p.getCreateDate().toString()%></FONT>
            <BR>成 员 数:<FONT color=#85a100><%=smc_p.getSMMemberCount()%></FONT>
          </TD>
          <TD style="PADDING-TOP: 10px" vAlign=top align=center width=165 bgColor=#f8f8f8 rowSpan=6>
            <TABLE height=130 cellSpacing=0 cellPadding=0 width=148 border=0>
              <TR>
                <TD height=22 align=center valign="top" bgColor=#ffffff><TABLE height=43 cellSpacing=0 cellPadding=0 width=122 border=0>
                  <TR>
                    <TD width=36 height=25></TD>
                    <TD align=center><FONT color=#ff6c00>班级宣言</FONT> </TD>
                    <TD width=36></TD>
                  </TR>
                  <tr>
                    <td colspan="3"><%
                      String temp = smc_p.getClassPronunciamento();
                      if(temp==null || temp=="") {
                        out.println("有多少记忆值得重温,有空常来看看……[请管理员在 班级管理 中填写班级宣言]");
                      }else {
                        out.println(temp);
                      }
                      %>
                    </td>
                  </tr>
                </TABLE></TD>
              </TR>
            </TABLE>
          </TD>
        </TR>
        <TR>
          <TD style="LINE-HEIGHT: 180%" vAlign=top bgColor=#f8f8f8 colSpan=4 height=15>管 理 员:<%
SMMember[] smml = smc_p.getClassManager();
for(int i=0;i<smml.length;i++) {
  out.println("<a href=\"../user/show_person_info.jsp?username=" + smml[i].getUserName() + "\" target=\"_blank\">" + smml[i].getUserInfo().getRealName() + "</a>&nbsp;");
}%>
</TD>
        </TR>
        <TR>
          <TD bgColor=#f8f8f8 colSpan=4>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TR>
                <TD width=60 height=15>生 日 榜:</TD>
                <TD>
<%
smml = smc_p.getBirthdayMember();
if(smml!=null) {
  for(int i=0;i<smml.length;i++) {
    out.println("<a href=\"../user/show_person_info.jsp?username=" + smml[i].getUserName() + "\" target=\"_blank\">" + smml[i].getUserInfo().getRealName() + "</a>(" + smml[i].getUserInfo().getBirthday() + ")&nbsp;");
  }
}else {
  out.println("最近没有人过生日!");
}
%>
                </TD>
              </TR>
            </TABLE>
          </TD>
        </TR>
        <TR>
          <TD bgColor=#f8f8f8 colSpan=4>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TR>
                <TD background=myclass.files/bg_pic.gif height=1>                </TD>
              </TR>
            </TABLE>
          </TD>
        </TR>
        <TR>
          <TD bgColor=#f8f8f8 colSpan=4 height=20>您还可以通过电子邮件方式邀请同学加入(每次仅限一个):</TD>
        </TR>
      <FORM name=FORM1 action="send_join_mail.jsp">
        <TR>
          <TD style="PADDING-LEFT: 16px; LINE-HEIGHT: 140%" width=148 bgColor=#f8f8f8 height=44>            输入对方电子邮箱
            <BR>
          </TD>
          <TD width=12 bgColor=#f8f8f8>
            <IMG height=33 src="Images/pic01.gif" width=2>
          </TD>
          <TD width=139 bgColor=#f8f8f8>
            <INPUT maxLength=30 size=17 name=invitemethod>
          </TD>
          <TD width=104 bgColor=#f8f8f8>
            <INPUT type=image height=21 width=49 src="Images/bt_inv.gif" border=0 name=image onClick="return InviteValidate()">
          </TD>
        </TR>
      </FORM>
        <TR bgColor=#f0f0f0>
          <TD colSpan=5 height=22>&nbsp;</TD>
          <TD align=middle height=22>&nbsp;
          </TD>
        </TR>
        <TR>
          <TD bgColor=#dcdcdc colSpan=6 height=2>          </TD>
        </TR>
      </TABLE>
      <TABLE width=600 border=0 cellPadding=0 cellSpacing=0 class="td_left_up_down_right" style="MARGIN-TOP: 8px">
        <TR>
          <TD class=FONT03 width=435 bgColor=#a8cd13 height=22>            &nbsp;&nbsp;&nbsp;&nbsp;
            留言本
</TD>
          <TD align=right width=165 bgColor=#a8cd13>
            <A href="class_message.jsp?classid=<%=ClassId%>#wr"><IMG height=15 src="Images/bt_wt.gif" width=55 align=absMiddle border=0></A>
            <a href="class_message.jsp?classid=<%=ClassId%>"><IMG height=15 hspace=5 src="Images/bt_more.gif" width=34 align=absMiddle border=0></a>&nbsp;&nbsp;&nbsp;
          </TD>
        </TR>
        <TR>
          <TD style="PADDING-BOTTOM: 8px; PADDING-TOP: 8px" bgColor=#f8f8f8 colSpan=2>
<%
SMMessage[] smme_p = new SMClass(ClassId).getSMMeaages();
if(smme_p!=null) {
  for(int i=0;i<10 && i<smme_p.length;i++) {
%>
            <TABLE cellSpacing=0 cellPadding=0 width=594 align=center border=0>
                 <TR bgColor=#f4f4f4>
                  <TD align=center width=34 bgColor=#ffffff height=22><IMG height=9 src="Images/pic05.gif" width=6></TD>
                  <TD width=422 bgColor=#ffffff>
                    <FONT color=#85a100><%=smme_p[i].getModifyTime()%></FONT>&nbsp;<FONT color=#dc5503><%=new UserInfo(smme_p[i].getUserName()).getRealName()%></FONT>
                  </TD>
                  <TD align=center width=138 bgColor=#ffffff></TD>
                </TR>
                <TR>
                  <TD></TD>
                  <TD style="PADDING-BOTTOM: 6px; WORD-BREAK: break-all; PADDING-TOP: 6px" colSpan=2>
                    <%=CheckValue.showClassMessage(smme_p[i].getMessageContent())%></TD>
                </TR>
            </TABLE>
<%}
}else {
  out.println("&nbsp;&nbsp;还没有人留言呢~!");
}
%>
          </TD>
        </TR>
        <TR bgColor=#f0f0f0>
          <TD align=right colSpan=2 height=22>
            <a href="class_message.jsp?classid=<%=ClassId%>#wr"><IMG height=15 src="Images/bt_wt.gif" width=55 align=absMiddle border=0></a>
            <a href="class_message.jsp?classid=<%=ClassId%>"><IMG height=15 hspace=5 src="Images/bt_more.gif" width=34 align=absMiddle border=0></a>&nbsp;&nbsp;&nbsp;
          </TD>
        </TR>
        <TR>
          <TD bgColor=#dcdcdc colSpan=2 height=2>&nbsp;</TD>
        </TR>
      </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">&nbsp;</td>
        </tr>
         <tr>
          <td align="center"><font color="#b1b1b1"> <a href="../about_aoke_cn.htm" target="_blank" class="title">关于沈航</a> </font>   <font color="#b1b1b1">|</font>   <font color="#b1b1b1">服务条款</font>   <font color="#b1b1b1">|</font>   <font color="#b1b1b1">广告服务</font>   <font color="#b1b1b1">|</font>   <font color="#b1b1b1">沈航招聘</font>   <font color="#b1b1b1">|</font>   <font color="#b1b1b1">客服中心</font>   <font color="#b1b1b1">|</font>   <font color="#b1b1b1">联系我们</font> </td>
        </tr>
      </table>
        <font style="font-size: 12px; line-height: 24px;" color="#b2b2b2">  <br>
      沈阳航空工业学院 &nbsp; 版权所有 </font> </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -