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

📄 read.asp

📁 ASp+SQLServer编写的网上办公系统
💻 ASP
字号:
<!--#include file="../../includes/keepHouse.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<script language="JavaScript">
   function validate(ITEM_ID){
     var Content	= document.FormReply.Content.value;
     if (Content==""){
       alert("内容不能为空!");
       return false;
     }
   }
   
   function onDelete(ITEM_ID){
   	 var GO;
     GO=prompt("该操作将删除这条原创留言以及所有对它的回复!\n如果确实需要继续操作,请键入\"GO\"。","CANCLE");
     if (GO=="GO")
     	location.replace("saveCERD.asp?action=Delete&ITEM_ID="+ITEM_ID);
     else
     	return false;
   }
</script>
</head>

<body>
<center>
<table border="0" width="100%" height="40" cellspacing="0" cellpadding="0">
 <tr>
  <td width="100%"></td>
 </tr>
</table>
<%
call insureID()
dim Content
dim action
ITEM_ID=request("ITEM_ID")
if ITEM_ID="" then
	call trigErr()
end if
NickName=request("NickName")
action=request("action")
sql="SELECT * FROM ComBoardItems WHERE (ITEM_ID = "&ITEM_ID&") "
call openDB()
rs.open sql,conn,1,1
if rs.eof then
	call trigErr()
end if
PERSONNEL_ID=rs("PERSONNEL_ID")
ITEM_TITLE=rs("ITEM_TITLE")
ITEM_CONTENT=rs("ITEM_CONTENT")
ITEM_TITLE=replaceBack(ITEM_TITLE)
ITEM_CONTENT=replaceBack(ITEM_CONTENT)
%>
<form method="POST" name="FormReply" action="saveCERD.asp?action=Reply" onSubmit="return validate()">
<table border="0" width="75%" cellspacing="0" cellpadding="0">
 <tr>
  <td width="5%" bgcolor="#0000FF" height="35" align=left><img border="0" src="../../images/back.gif"></td>
  <td width="65%" bgcolor="#0000FF" height="35" align=center><b><font color="#FFFFFF">主题:<%=ITEM_TITLE%></font></b></td>
  <td width="5%" bgcolor="#0000FF" height="35" align=right><img border="0" src="../../images/Close2.gif"></td>
 </tr>
</table>
<table border="1" width="75%" bordercolorlight="#EFEFEF" bordercolordark="#FCFCFC" cellspacing="0" cellpadding="0">
<tr> 
<td bgcolor="#FCFCFC" width="15%" valign="top">
<%
response.write NickName&"发表于&nbsp;"&rs("COMPOSE_DATE")
if PERSONNEL_ID=session("PERSONNEL_ID") then
	response.write "&nbsp;&nbsp;[<a href=""Edit.asp?ITEM_ID="&ITEM_ID&""">编辑</a>]"
end if
%>
</td>
<td bgcolor="#FCFCFC" width="60%">
<%="&nbsp;&nbsp;"&ITEM_CONTENT%>
</td>
</tr>
<tr> 
<td colspan="2" width="75%" align=center>
<hr width="70%" color="#D6E0FA" style="border-style: solid; border-width: 1" >
</td>
</tr>
<%
set rs=nothing
set rs=server.createobject("Adodb.RecordSet")
sql="SELECT ComBoardItems.*, LogIns.NICK_NAME AS Nike_Name " _
	&"FROM ComBoardItems INNER JOIN " _
	&"Personnel ON " _
	&"ComBoardItems.PERSONNEL_ID = Personnel.PERSONNEL_ID INNER JOIN " _
	&"LogIns ON Personnel.PERSONNEL_ID = LogIns.PERSONNEL_ID " _
	&"WHERE (ComBoardItems.ORIGONAL_ID="&ITEM_ID&") "
rs.open sql,conn,1,1
while not rs.eof
	ITEM_TITLE=rs("ITEM_TITLE")
	ITEM_CONTENT=rs("ITEM_CONTENT")
	ITEM_TITLE=replaceBack(ITEM_TITLE)
	ITEM_CONTENT=replaceBack(ITEM_CONTENT)
	%>
	<tr>
	<td colspan="2" width="75%" height="35" bgcolor="#FCFCFC" align=left>
	主题:<font color="#0000FF"><%=ITEM_TITLE%></font>
	</td>
	</tr>
	<tr> 
	<td bgcolor="#FCFCFC" width="15%" valign="top">
	<%=rs("Nike_Name")&"发表于&nbsp;"&rs("COMPOSE_DATE")%>
	</td>
	<td bgcolor="#FCFCFC" width="60%">
	<%="&nbsp;&nbsp;"&ITEM_CONTENT%>
	</td>
	</tr>
	<tr> 
	<td colspan="2" width="75%" align=center>
	<hr width="70%" color="#D6E0FA" style="border-style: solid; border-width: 1" >
	</td>
	</tr>
	<%
	rs.movenext
wend
call closeDB()

'//下面来建立"回复"区 GO->
%>
<tr>
<td width="15%" align="right" valign="top" bgcolor="#FAFAFA">回复:</td>                     
<td width="60%" bgcolor="#FCFCFC">
<textarea rows="7" name="Content" cols="60" wrap="VIRTUAL"></textarea>
</td>
</tr>
<td width="15%" align="right" bgcolor="#FCFCFC">作者:</td>
<td width="60%" align="left" bgcolor="#FCFCFC"><%=session("NICK_NAME")%></td>
<tr>
<td width="75%" height="50" colspan="2" bgcolor="#EFEFEF" align=center>
<INPUT TYPE = "hidden" NAME = "ITEM_ID" VALUE = "<%=ITEM_ID%>">
<INPUT TYPE = "hidden" NAME = "action" VALUE = "Reply">
<input type="submit" value="提 交" name="Submit" class="buttonface">&nbsp;&nbsp;  
<input type="reset" value="清 除" name="Clear" class="buttonface">
<%  
if session("POSITION_ID")=1 then
	response.write "&nbsp;&nbsp;<input type=""button"" value=""删除本条"" " _
	&"name=""Delete"" class=""buttonface"" onClick=""javaScript:return onDelete("&ITEM_ID&")"">"
end if
%>
</td>
</tr>
</table>
</form>
</center>
</body>

⌨️ 快捷键说明

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