📄 bbsleft.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ include file="../inc/conn.jsp"%>
<%String f,str2,fa,openclose,openclosex,treesign,line;%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>论坛导航</title>
<script language=javascript src="../inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
stylecook=1;//默认皮肤
}
else
{
stylecook++;
}
style="style0"+stylecook+".css";
strstyle="<link href=\"../css/"+style+"\" rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<script language="JavaScript">
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
if (ver4) {
with (document) {
write("<STYLE TYPE='text/css'>");
if (NS4) {
write(".parent {position:absolute; visibility:visible}");
write(".child {position:absolute; visibility:visible}");
write(".regular {position:absolute; visibility:visible}")
}else {
write(".child {display:none}")
}
write("</STYLE>");
}}
function getIndex(el) {
ind = null;
for (i=0; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id == el) {
ind = i;
break;
}}
return ind;
}
function arrange() {
nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
for (i=firstInd+1; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.visibility != "hide") {
whichEl.pageY = nextY;
nextY += whichEl.document.height;
}}}
function initIt()
{
if (!ver4) return;
if (NS4)
{
for (i=0; i<document.layers.length; i++)
{
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
arrange();
}
else
{
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++)
{
whichEl = divColl(i);
if (whichEl.className == "child") whichEl.style.display = "none";
}
}
}
function expandIt(el)
{
if (!ver4) return;
if (IE4)
{
whichEl = eval(el + "Child");
if (whichEl.style.display == "none")
{
whichEl.style.display = "block";
document.all("dir"+el.replace("KB","")).src="../images/opentm.gif";
document.all("fold"+el.replace("KB","")).src="../images/openx.gif";
}
else
{
whichEl.style.display = "none";
document.all("dir"+el.replace("KB","")).src="../images/closetm.gif";
document.all("fold"+el.replace("KB","")).src="../images/close.gif";
}
}
else
{
whichEl = eval("document." + el + "Child");
if (whichEl.visibility == "hide")
{
whichEl.visibility = "show";
}
else
{
whichEl.visibility = "hide";
}
arrange();
}
}
onload = initIt;
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="122" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3" class="treetdbg">
<spacer height="3" type="block"></td>
</tr>
<tr>
<td height="50"><div align="center"><img src="../images/tmlogo.gif" width="112" height="50"></div></td>
</tr>
<tr>
<td height="3" class="treetdbg">
<spacer height="3" type="block"></td>
</tr>
<tr>
<td height=6><spacer height="6" type="block"></td>
</tr>
</table>
<table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td><table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<tr align="left" valign="middle">
<td width="15"><img src="../images/opennotopline.gif" width="18" height="18"></td>
<td width="15"><img src="../images/home.gif" width="18" height="18"></td>
<td> <a class=head3 href=main.jsp target=main>论坛首页</a></td>
</tr>
</table></td>
</tr>
</table>
<%
f= request.getParameter("f");
String sql="select bbs_id,BBS_Cate_Name,BBS_Cate_ID,BBS_Cate_PID,BBS_Cate_Qs,treesign from BBS_Cate where BBS_Cate_PID='0' and deleted=0 order by totop asc";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next())
{
if(rs.getString("treesign").equals("1")){
openclose="opentm.gif";
openclosex="openx.gif";
}
else{
openclose="closetm.gif";
openclosex="close.gif";
}
%>
<table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<tr align="left" valign="middle">
<td width="40"> <table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<tr align="left" valign="middle">
<td width="15" ><a href="#" onClick="expandIt('KB<%=rs.getString("bbs_id")%>'); return false" style="cursor: default;"><img id="dir<%=rs.getString("bbs_id")%>" name="dir<%=rs.getString("bbs_id")%>" src="../images/<%=openclose%>" width="18" height="18" border=0></a></td>
<td width="15"><a href="#" onClick="expandIt('KB<%=rs.getString("bbs_id")%>'); return false" style="cursor: default;"><img id="fold<%=rs.getString("bbs_id")%>" name="fold<%=rs.getString("bbs_id")%>" src="../images/<%=openclosex%>" width="16" height="15" border=0></a></td>
<td> <div id="KB<%=rs.getString("bbs_id")%>Parent" class="parent"> <a class=head3 href="#" onClick="parent.frames('main').location.href='main.jsp?layer_1=<%=rs.getString("bbs_cate_id")%>&qs=<%=rs.getString("BBS_Cate_Qs")%>';expandIt('KB<%=rs.getString("bbs_id")%>'); return false"><%=rs.getString("BBS_Cate_Name")%></a>
</div></td>
</tr>
</table></td>
</tr>
<%
String sqlstr="select * from BBS_Cate where BBS_Cate_PID='"+rs.getString("BBS_Cate_ID")+"' and deleted=0 order by totop asc";
Statement stmt0=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs0=stmt0.executeQuery(sqlstr);
rs0.last();
int intRowCount = rs0.getRow();
rs0.close();
stmt0.close();
Statement stmt1=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs1=stmt1.executeQuery(sqlstr);
//if(rs1.next()){
%>
<tr align="left" valign="middle">
<td > <div id="KB<%=rs.getString("bbs_id")%>Child" <%if(rs.getString("treesign").equals("0")){%> class="child" <%}%>>
<table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<%
int i=0;
while(rs1.next())
{
if(i==intRowCount-1){
line="<img src=../images/nodeend.gif width=16 height=18>";
}
else{
line="<img src=../images/node.gif width=16 height=18>";
}
%>
<tr align="left" valign="middle">
<td width="15" class=" "><img src="../images/treeline.gif" width="18" height="18"></td>
<td width="15" align="center" valign="top"><%=line%></td>
<td> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="10"><img src="../images/doc.gif" width="16" height="18"></td>
<td> <a class=head3 href="../bbs/main.jsp?layer_1=<%=rs1.getString("BBS_Cate_PID")%>&layer_2=<%=rs1.getString("BBS_Cate_ID")%>&qs=<%=rs1.getString("BBS_Cate_Qs")%>" target="main">
<%=rs1.getString("BBS_Cate_Name")%></a></td>
</tr>
</table></td>
</tr>
<%
i=i+1;
}
rs1.close();
stmt1.close();
%>
</table>
</div></td>
</tr>
<%//}%>
</table>
<%
}
rs.close();
stmt.close();
conn.close();
%>
<table width="120" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td><table width="121" border="0" cellpadding="0" cellspacing="0" class="text">
<tr align="left" valign="middle">
<td width="18"><div align="right"><img src="../images/nodeend.gif" width="16" height="18"></div></td>
<td width="16"> <div align="center"><img src="../images/openx.gif" width="16" height="15"></div></td>
<td width="85"> <a class=head3 href=help.jsp target=main>论坛指南</a></td>
</tr>
</table></td>
</tr>
</table>
<table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height=10><spacer height="10" type="block"></td>
</tr>
</table>
</center>
<script language="JavaScript">
if (NS4) {
firstEl = "KB-2Parent";
firstInd = getIndex(firstEl);
arrange();
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -