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

📄 view.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%option explicit%>
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<%
	Dim ObjDB,ObjRS,StrSQL
	Dim IntID
	Dim C,ID
	Dim IntRows,i,ParentID

	if session("AccountID")="" then
%>
<script language=javascript>
  	alert("因登录时间过长,会话失效,请退出重新登陆!")
</script>
<%  
   	Response.End
	end if
	
	IntID = Request.QueryString("ID")
	
	Set ObjDB = Server.CreateObject("Adodb.Connection")
	OpenDB ObjDB
	
	StrSQL = "Update t_OA_Public_BBS Set Hit = Hit + 1 Where ID ="&IntID
	ObjDB.Execute StrSQL

	StrSQL = "Select ID, BoardID, TrueName, Title, Body, Hit, ReCount, CreateTime, UpdateTime From v_OA_Public_BBS_TrueName where ID=" & IntID &  " or ParentID=" & IntID & " Order By ID"
	
	Set C = Server.CreateObject ("CMS2003.DBHandle")
	C.Init (ObjDB)
	
	ObjRS = C.List(1,0,StrSQL)
	IntRows = C.GetRows()

	ObjDB.Close 
	Set ObjDB = Nothing

	ParentID=ObjRS(0,0)
	If ParentID = "" Then 
		ParentID = 0
	Else
		ParentID = Cint(ParentID)
	End If

	If Request.Form.Count > 0 Then
		Set ObjDB = Server.CreateObject("ADODB.Connection")
		OpenDB ObjDB
		
		Set C = Server.CreateObject("CMS2003.DBHandle")
		C.Init(ObjDB)
		
		ObjRS = C.AddNew("_","t_OA_Public_BBS")
		
		StrSQL = "Update t_OA_Public_BBS Set ReCount = ReCount + 1 Where ID ="&IntID
		ObjDB.Execute StrSQL
		Response.Redirect "View.asp?ID="&ParentID

		ObjDB.Close
		Set ObjDB = Nothing
	End If
	
%>
<%'==================================================================%>
<%Sub Main%>
<%'------------------------------------------------------------------%>
<%	
	If IntRows >= 0 then 
%>
	<table class=Ltable cellspacing=1 cellpadding=3 >
	<tr class=LHtr>
		<td width=20%>文章标题</td>
		<td width=80%><%=ObjRS(3,0)%></td>
	</tr>
		<tr class=Ltr>
		<td>发表人</td>
		<td><%=ObjRS(2,0)%></td>
	</tr>
		<tr class=Ltr>
		<td>创建时间</td>
		<td><%=ObjRS(7,0)%></td>
	</tr>
		<tr class=Ltr>
		<td>点击次数</td>
		<td><%=ObjRS(5,0)%></td>
	</tr>
		<tr class=Ltr>
		<td>回复次数</td>
		<td><%=ObjRS(6,0)%></td>
	</tr>
	<tr class=Ltr>
		<td>文章内容</td>
		<td><%=ObjRS(4,0)%></td>
	</tr>
	
	</table>
<%
	End If

	For i = 1 To IntRows
%>
	<table class=Ltable width=100% cellspacing=1 cellpadding=3>
		<tr class=LStr>
			<td width=2%><input type=checkbox  id=<%=ObjRS(0,i)%>  name=ITEM></td>
			<td width=98%><%=ObjRS(2,i)%>于<%=ObjRS(8,i)%>回复</td>
		</tr>
		<tr class=LStr>
			<td colspan=2>
				<table cellspacing=1 cellpadding=3 width=100% style="word-wrap:break-word;word-break:break-all">
					<tr class=Ltr>
						<td width=20%>回复标题</td>
						<td width=80%><%=ObjRS(3,i)%></td>
					</tr>
					<tr class=Ltr>
						<td width=20%>回复内容</td>
						<td width=80%><%=ObjRS(4,i)%></td>
					</tr>
				</table>
			</td>
		</tr>
		</table>
<%
	Next
%>
	<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
	<input type=hidden name=_BoardID value=<%=ObjRS(1,0)%>>
	<input type=hidden name=_AccountID value=<%=session("AccountID")%>>
	<input type=hidden name=BoardName value="<%=Request.QueryString("BoardName")%>">
	<input type=hidden name=_ParentID value="<%=ObjRS(0,0)%>">
	<table class=Ltable cellspacing=1 cellpadding=3>
	<tr class=LHtr>
		<td width="20%"></td>
		<td width="80%">回复-<%=ObjRS(3,0)%></td>
	</tr>
	<tr class=Ltr>
		<td>回复标题</td>
		<td><input type="text" size=40 class=Input name="_Title" Check=1 Show="回复标题" ></td>
	</tr>
	<tr class=Ltr>
		<td>回复内容</td>
		<td><textarea  class=textarea cols=29 rows=15 name="_Body" Check=1 Show="回复内容"></textarea></td>
	</tr>
	</table>
	<table cellspacing=1 cellpadding=3>
	<tr>
		<td>
		<input type="submit"  name="Submit" class=Button value="提 交"><input type="button" class=Button value="取 消" onclick="history.go(-1)" id=button1 name=button1></td>
	</tr>
	</table>
	</form>

<%
	If IntRows > 0 Then
%>
<script language=javascript>
parent.frmToolbar.NowLocation="List"
</script>
<input type=hidden name=ITEM id=0>
<%
	Else
%>
<script language=javascript>
parent.frmToolbar.NowLocation="View"
</script>
<%
	End If
%>

<%'------------------------------------------------------------------%>
<%End Sub%>
<%'==================================================================%>
<!-- #include file="Templet.asp" -->


⌨️ 快捷键说明

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