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

📄 head.jsp

📁 这是一个用JAVA语言编写的BBS论坛程序
💻 JSP
📖 第 1 页 / 共 2 页
字号:
    if(edit!=0){
      workDB.PageInfo("select count(reply_id) from user_reply where reply_forum="+forum+" and topic_id="+topic,10,id);
    }else workDB.PageInfo("select count(reply_id)+1 from user_reply where reply_forum="+forum+" and topic_id="+topic,10,id);
    if(id<1||id>workDB.getPageCount())id=1;
  }
  String theme=workDB.queryData("select substring(topic_theme,1,20) from user_topic where topic_id="+topic+" and topic_forum="+forum); 
  if(!workFC.cNULL(action)){
    String tmp=edit==0?"回复主题":"编辑回复";
    guide="<a href='topic.jsp?forum="+forum+"&pageid="+pageid+"'>"+hash.get(String.valueOf(forum))+"</a>&nbsp;→&nbsp;<a href='display.jsp?forum="+forum+"&topic="+topic+"&pageid="+pageid+"&id="+id+"'>"+theme+"</a>&nbsp;→&nbsp;"+tmp;
    doctitle="["+tmp+"]"+workFC.StrtoHtml(theme)+"---暴风论坛";
  }else{
    if(edit!=0){
      guide="<a href='topic.jsp?forum="+forum+"&pageid="+pageid+"'>"+hash.get(String.valueOf(forum))+"</a>&nbsp;→&nbsp;<a href='display.jsp?forum="+forum+"&topic="+topic+"&pageid="+pageid+"&id="+id+"'>"+theme+"</a>&nbsp;→&nbsp;编辑主题";
      doctitle="[编辑主题]"+"---暴风论坛"; 
    }else{
      if(topic!=0&&id!=0){
         guide="<a href='topic.jsp?forum="+forum+"&pageid="+pageid+"'>"+hash.get(String.valueOf(forum))+"</a>&nbsp;→&nbsp;<a href='display.jsp?forum="+forum+"&topic="+topic+"&pageid="+pageid+"&id="+id+"'>"+theme+"</a>&nbsp;→&nbsp;发表新主题";
      }else guide="<a href='topic.jsp?forum="+forum+"&pageid="+pageid+"'>"+hash.get(String.valueOf(forum))+"</a>&nbsp;→&nbsp;发表新主题";
      doctitle="[发表新主题]"+"---暴风论坛";
    }
  }
}
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=doctitle%></title>
<script language="Javascript" src="js.js"></script>
<link href="skins/<%=skins%>.css" rel="stylesheet" type="text/css">
</head>
<body onunload="remove();">

<div id="usercontrol" class="menu1" onMouseOver="this.style.visibility='visible'" onMouseOut="this.style.visibility='hidden'">
  <div id="usercontrol1" class="menu3"><a href="userinfo.jsp?name=<%=workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))%>" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol1').className='menu2'" onMouseOut="document.getElementById('usercontrol1').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查看资料</a></div>
  <div id="usercontrol2" class="menu3"><a href="useredit.jsp" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol2').className='menu2'" onMouseOut="document.getElementById('usercontrol2').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;修改资料</a></div>
  <div id="usercontrol3" class="menu3"><a href="search.jsp?&forum=0&searchlimit=0&searchkey=user_name&search=<%=workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))%>&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol3').className='menu2'" onMouseOut="document.getElementById('usercontrol3').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的贴子</a></div>
  <div id="usercontrol4" class="menu3"><a href="directory.jsp" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol4').className='menu2'" onMouseOut="document.getElementById('usercontrol4').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;好友列表</a></div>
  <div id="usercontrol5" class="menu3"><a href="message.jsp" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol5').className='menu2'" onMouseOut="document.getElementById('usercontrol5').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我的留言</a></div>
  <div id="usercontrol6" class="menu3"><a href="sendmsg.jsp" style="text-decoration:none;" onMouseOver="document.getElementById('usercontrol6').className='menu2'" onMouseOut="document.getElementById('usercontrol6').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发送留言</a></div>
</div>
<div id="skinmenu" class="menu1" onMouseOver="this.style.visibility='visible'" onMouseOut="this.style.visibility='hidden'">
  <div id="skin1" class="menu3"><a href="javascript:changeskins('blue');" style="text-decoration:none;" onMouseOver="document.getElementById('skin1').className='menu2'" onMouseOut="document.getElementById('skin1').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;蓝色风格</a></div>
  <div id="skin2" class="menu3"><a href="javascript:changeskins('shallow');" style="text-decoration:none;" onMouseOver="document.getElementById('skin2').className='menu2'" onMouseOut="document.getElementById('skin2').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;淡雅清新</a></div>
  <div id="skin3" class="menu3"><a href="javascript:changeskins('grey');" style="text-decoration:none;" onMouseOver="document.getElementById('skin3').className='menu2'" onMouseOut="document.getElementById('skin3').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;灰色情调</a></div> 
  <div id="skin4" class="menu3"><a href="javascript:changeskins('yellow');" style="text-decoration:none;" onMouseOver="document.getElementById('skin4').className='menu2'" onMouseOut="document.getElementById('skin4').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;黄金地带</a></div>
</div>
<div id="forummenu" class="menu1" onMouseOut="this.style.visibility='hidden'" onMouseOver="this.style.visibility='visible'">
  <div id="forum1" class="menu3"><a href="topic.jsp?forum=1&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum1').className='menu2'" onMouseOut="document.getElementById('forum1').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网页设计</a></div>
  <div id="forum2" class="menu3"><a href="topic.jsp?forum=2&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum2').className='menu2'" onMouseOut="document.getElementById('forum2').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;平面设计</a></div>
  <div id="forum3" class="menu3"><a href="topic.jsp?forum=3&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum3').className='menu2'" onMouseOut="document.getElementById('forum3').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;动漫前沿</a></div>
  <div id="forum4" class="menu3"><a href="topic.jsp?forum=4&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum4').className='menu2'" onMouseOut="document.getElementById('forum4').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编程开发</a></div>
  <div id="forum5" class="menu3"><a href="topic.jsp?forum=5&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum5').className='menu2'" onMouseOut="document.getElementById('forum5').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电脑网络</a></div>
  <div id="forum6" class="menu3"><a href="topic.jsp?forum=6&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum6').className='menu2'" onMouseOut="document.getElementById('forum6').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;灌水乐园</a></div>
  <div id="forum7" class="menu3"><a href="topic.jsp?forum=7&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum7').className='menu2'" onMouseOut="document.getElementById('forum7').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电视电影</a></div>
  <div id="forum8" class="menu3"><a href="topic.jsp?forum=8&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum8').className='menu2'" onMouseOut="document.getElementById('forum8').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贴图专区</a></div>
  <div id="forum9" class="menu3"><a href="topic.jsp?forum=9&pageid=1" style="text-decoration:none;" onMouseOver="document.getElementById('forum9').className='menu2'" onMouseOut="document.getElementById('forum9').className='menu3'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;论坛事务</a></div>
</div>

<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td width="100%" height="25" valign="middle" class="b1">
    &nbsp;&gt;&gt;&gt;&nbsp;欢迎您访问!&nbsp;&nbsp;[
    <%if(workFC.cNULL(String.valueOf(session.getAttribute("u_name")))){
       out.println("<a href='userinfo.jsp?name="+workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))+"' onMouseOver=showmenu(event,'usercontrol',90,138); onMouseOut=document.getElementById('usercontrol').style.visibility='hidden'>"+workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))+"</a>");
      }else out.println("<a href='userlogin.jsp'>登录</a>");
    %> 
    ]&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:changeskins('grey');" onMouseOver="showmenu(event,'skinmenu',90,93);" onMouseOut="document.getElementById('skinmenu').style.visibility='hidden'">风格</a>
      <%
if(session.getAttribute("u_name")!=""){
  out.println("&nbsp;|&nbsp;&nbsp;<a href='userlist.jsp?pageid=1'>会员</a>");
}else{
  out.println("&nbsp;|&nbsp;&nbsp;<a href='register.jsp'>注册</a>");
}
%>
&nbsp;|&nbsp;&nbsp;<a href="search.jsp?pageid=1">搜索</a> &nbsp;|&nbsp;&nbsp;<a href="help.jsp">帮助</a>
<%
if(session.getAttribute("u_name")!="")
out.println("&nbsp;|&nbsp;&nbsp;<a href='login_out.jsp'>退出</a>");
%>
&nbsp;|&nbsp;&nbsp;<a href="index.jsp" onMouseOver="showmenu(event,'forummenu',90,206);" onMouseOut="document.getElementById('forummenu').style.visibility='hidden'">论坛首页</a>
&nbsp;|&nbsp;&nbsp;<a href="flash/book.jsp">FLASH留言板</a></td>
  </tr>
</table>
<%
int newmsg=workDB.queryCount("select count(msg_id) from user_msg where user_name='"+session.getAttribute("u_name")+"' and msg_type=0");
if(newmsg!=0){
  out.println("<bgsound src='images/msg.wav'>");
  out.println("<table width='96%' border='0' align='center' cellpadding='2' cellspacing='0'><tr><td align='right'>");
  out.println("<a href='message.jsp'><img src='images/newmsg.gif'>您有"+newmsg+"条新留言,请注意查收</a>");
  out.println("</td></tr></table>"); 
}
%>
<br>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="skins/<%=skins%>/logo.gif"></td>
  </tr>
</table>
<br>
<%if(servletpath.equals("/index.jsp")){%>
<%=tabletop%>
<table width=100% border=0 align=center cellpadding=0 cellspacing=1>
  <tr>
    <td height="25" colspan="4" class="b1">&nbsp;</td>
  </tr>
  <tr>
    <td width="38" align="center" valign="middle"><img src="images/btype6.gif"></td>
    <td width="40%">

<%if(!workFC.cNULL(String.valueOf(session.getAttribute("u_name")))){%>
      <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <form method="post" action="login_ok.jsp">
          <tr>
            <td width="258" nowrap>&nbsp;用户:<input type="text" size="20" maxlength="15" name="user_name">&nbsp;<input type="submit" name="login" value="登  录"></td>
            <td width="59" nowrap><a href="lostpass.jsp" style="text-decoration:underline;">忘记密码</a></td>
          </tr>
          <tr>
            <td nowrap>&nbsp;密码:<input type="password" size="20" maxlength="20" name="user_password"><input type="checkbox" name="user_save" value="1">记住密码</td>
            <td nowrap><a href="register.jsp" style="text-decoration:underline;">还没注册</a></td>
          </tr>
        </form>
    </table>

<%}else{%>
   
      <table width="100%" border="0" cellpadding="5" cellspacing="0">
          <tr>
            <td rowspan="3" align="center">
              <img src="<%=workDB.queryData("select user_face from user_info where user_name='"+session.getAttribute("u_name")+"'")%>" name="img_face" id="img_face" onload="javascript:if(this.width>120)this.width=120;if(this.height>120)this.height=120;"></td>
            <td><a href="userinfo.jsp?name=<%=workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))%>">查看资料</a></td>
            <td><a href="useredit.jsp">修改资料</a></td>
          </tr>
          <tr>
            <td><a href="search.jsp?&forum=0&searchlimit=0&searchkey=user_name&search=<%=workFC.UnitoGB(String.valueOf(session.getAttribute("u_name")))%>&pageid=1">我的贴子</a></td>
            <td><a href="directory.jsp">好友列表</a></td>
          </tr>
          <tr>
            <td><a href="message.jsp">我的留言</a></td>
            <td><a href="sendmsg.jsp">发送留言</a></td>
          </tr>
    </table>

<%}%>

</td>
<td width="50%">
  <table width="100%" border="0" cellpadding="5" cellspacing="0">
  <tr><td width="50%">
  <%="注册会员:"+workDB.queryCount("select count(user_id) from user_info")%>
  </td><td>
  <%
   String new_id=workDB.queryData("select max(user_id) from user_info");
   String usernew=workDB.queryData("select user_name from user_info where user_id="+new_id);
   out.println("新进会员:<a href='userinfo.jsp?name="+usernew+"'>"+usernew+"</a>");
  %>
  </td></tr>
  <tr><td>
  <%="总主题数:"+workDB.queryCount("select count(topic_id) from user_topic")%>
  </td><td>
  <%="总贴子数:"+(workDB.queryCount("select count(topic_id) from user_topic")+workDB.queryCount("select count(reply_id) from user_reply"))%>
  </td</tr>
  <tr><td>
  <%="今天发贴:"+(workDB.queryCount("select count(topic_id) from user_topic where TO_DAYS(topic_date)=TO_DAYS(now())")+workDB.queryCount("select count(reply_id) from user_reply where TO_DAYS(reply_date)=TO_DAYS(now())"))%>
  </td><td>
  <%="昨天发贴:"+(workDB.queryCount("select count(topic_id) from user_topic where TO_DAYS(topic_date)=TO_DAYS(now())-1")+workDB.queryCount("select count(reply_id) from user_reply where TO_DAYS(reply_date)=TO_DAYS(now())-1"))%>
  </td></tr>
  </table>
</td>
    <td width="38"><img src="images/btype6.gif" width="38"></td>
  </tr>
</table>
<%=tablebottom%>
<script language="javascript">
<!--
  var objs=document.getElementsByTagName("img");
  for(i in objs){
    if(objs[i].name!=null){
      if(objs[i].name.indexOf("img_face")!=-1){
        if(objs[i].width>120)objs[i].width=120;
        if(objs[i].height>120)objs[i].height=120;
      }
    }
  }
//-->
</script>
<%}else{%>
<table width="96%" border="0" align="center" cellpadding="5" cellspacing="1">
 <tr>
   <td height="20" valign="middle" class="style2"><a href="index.jsp" onMouseOver="showmenu(event,'forummenu',90,206);" onMouseOut="document.getElementById('forummenu').style.visibility='hidden'">论坛首页</a>
    <%="→&nbsp;"+guide%>
   </td>
 </tr>
</table>
<%}%>

⌨️ 快捷键说明

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