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

📄 content.jsp

📁 电信的网厅的整站代码
💻 JSP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ page import="com.doone.data.*, 
				 com.doone.fj1w.bbs.*, 
				 java.text.*,
				 com.doone.uurm.*"%>
<%
	DacClient db = new DacClient();
	String sContentId = request.getParameter("id");
	String sPurvICode = "BBS";
	TF_Attchment[] attchList = null;
	TF_Content content = null;
	SimpleDateFormat f1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	if ( sContentId != null ) {
		long lContentId = Long.parseLong(sContentId);

		content = new TF_Content(db, lContentId);
		Sys_Purview purview = Sys_Purview.getPurviewByID(db, content.getBoard_ID());
		sPurvICode = purview.getPurviewCode();

		WebAuth auth = WebAuth.getInstance(request);

	    if ( ! auth.IsAuthed() ) {
		    out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
		    return;
	    }
		else if ( ! auth.CheckPurv(sPurvICode) ) {
		    out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
		    return;
		}
		
		attchList = TF_Attchment.getAttchList(db, lContentId, "2");
		BBSFactory.addClickCount(request, response, db, lContentId); // 增加点击数。 
	}
	else {
	    out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
	    return;
	}
	
	if ( attchList == null || content == null ) {
	    out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
	    return;
	}
%>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<title>BBS内容查看</title>
	<style>
		.imgOver { BORDER-RIGHT: #e0e0e0 1px outset; BORDER-TOP: #e0e0e0 1px outset; BORDER-LEFT: #e0e0e0 1px outset; CURSOR: hand; BORDER-BOTTOM: #e0e0e0 1px outset }
		.imgClass { BORDER-RIGHT: #e0e0e0 1px solid; BORDER-TOP: #e0e0e0 1px solid; BORDER-LEFT: #e0e0e0 1px solid; CURSOR: hand; BORDER-BOTTOM: #e0e0e0 1px solid }
	</style>
	<link href="../../common/style/main.css" rel="stylesheet" type="text/css" />
	<script language="JavaScript" src="../../common/script/ChangeStyle.js"></script>
	<script language="JavaScript" src="../../common/mainTool.js"></script>
	<script language="javascript">
		function cltScript_Toolbar()
		{
			var parentElt = parent.document.all.tags("frame");
			for ( i = 0 ; i < parentElt.length; i++ )
			{
				if ( parentElt(i).name == "bottom" )
				{
					if ( parentElt(i).height > 50 )
					{
						divTop.style.width = parentElt(i).width;
						divMain.style.width = parentElt(i).width;
						divMain.style.height = parentElt(i).height - 46;
					}
				}
			}
		}
		
		var oPopup = window.createPopup();
		function fn_AttchmentClick(vthis)
		{
			oPopup.document.body.innerHTML = attchment_List.outerHTML;
			oPopup.document.body.style.border = "2px outset #d0d0d0";
			oPopup.document.body.style.backgroundColor = "#cfcfcf";
			oPopup.document.body.style.padding = "2px";
			var vLeft = vthis.clientWidth - attchment_List.style.pixelWidth - 12;
			var vTop = vthis.clientHeight + 2;
			var vWidth = attchment_List.style.pixelWidth + 14;
			var vHeight = attchment_List.style.pixelHeight + 8;
			
			oPopup.show(vLeft, vTop, vWidth, vHeight, vthis);
		}
		
		function fn_onload()
		{
			cltScript_Toolbar();

			if ( attchment_List.innerHTML == "" )
			{
				var imgs = document.all.tags("img");
				for ( i = 0 ; i < imgs.length; i++ )
				{
					if ( imgs(i).id == "imgIsAttch" )
					{
						imgs(i).style.display = "none";
					}
				}
			}
			
			attchment_List.style.width = attchment_List.clientWidth;
			attchment_List.style.height = attchment_List.clientHeight;
			attchment_List.parentElement.style.display = "none";
		}
	</script>
</head>
<body onload="fn_onload()" onresize="cltScript_Toolbar();" style="margin:0px;">
	<form id="Form1" method="post">
		<div id="divTop" style=" OVERFLOW: hidden">
			<table id="ibtnPanel" bgColor="#e0e0e0" style="PADDING-LEFT: 15px; FONT-SIZE: 9pt; PADDING-BOTTOM: 2px; PADDING-TOP: 5px; BORDER-BOTTOM: #e0e0e0 1px outset"
				cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td vAlign="top" noWrap width="95%">
						<b>发贴人:</b><label id="lblUser_Name"><%= content.getUser_Name()%></label>
						&nbsp;&nbsp;&nbsp;&nbsp; <b>发贴时间:</b><Label ID="lblCreate_Time"><%= f1.format(content.getCreate_Time())%></label>&nbsp;&nbsp;&nbsp;&nbsp;
						<b>问题点数:</b><Label ID="lblCount_Out" ><%= content.getCount_Out()%></label>
					</td>
					<td width="32" rowspan="2" align="center" valign="middle">
						<img id="imgIsAttch" Width="32" Height="32" src="images/Attchment.gif" Class="imgClass"
							onmouseover="this.className='imgOver';" onmouseout="this.className='imgClass';" onclick="fn_AttchmentClick(this);">&nbsp;
					</td>
				</tr>
				<tr>
					<td nowrap>
						<b>主题:</b><Label ID="lblTitle"><%= content.getTitle()%></label>
					</td>
				</tr>
			</table>
		</div>
		<div id="divMain" style="PADDING-LEFT: 5px; FONT-SIZE: 9pt; OVERFLOW: auto; PADDING-TOP: 5px; width: 100%"><%= content.getContent()%></div>
		<div>
		<div id="attchment_List" runat="server" nowrap align="center" style="FONT-SIZE: 9pt; WIDTH: 1px; HEIGHT: 1px;"><%
	if ( content.getExist_Attch().equals("1") ) {
		for ( int i=0; i<attchList.length; i++ ) {%>
			<div align="left"><a href="AttchMap/<%= attchList[i].getAttch_ID()%>/<%= attchList[i].getFile_Name()%>" target="Attchment" onclick="parent.open(this.href, this.target);"><%= attchList[i].getFile_Name()%></a></div><%
		}
	}
		%></div></div>
	</form>
</body>
</html>

⌨️ 快捷键说明

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