📄 edit.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/String.asp" -->
<!-- #include virtual="include/Page.asp" -->
<%
Dim ObjDB
Dim C
Dim IntID,IntParentID
Dim ObjRS,StrSQL
IntID = Request.QueryString("ID")
If IntID ="" Then IntID = 1
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB
Set C = Server.CreateObject ("CMS2003.DBhandle")
C.Init(ObjDB)
If Request.Form.Count > 0 Then
IntID = Request.Form("ID")
Call C.Edit(IntID,"_","t_OA_Public_BBS")
Set ObjRS = C.View ("Select ParentID From t_OA_Public_BBS Where ID="&IntID)
IntParentID = ObjRS("ParentID")
If IntParentID ="0" Then
Response.Redirect "List.asp?BoardID=" & Request.QueryString("BoardID") & "&BoardName=" & Request.QueryString("BoardName")
else
Response.Redirect "View.asp?ID="&ObjRS("ParentID")
End If
End If
StrSQL="Select * From t_OA_Public_BBS Where ID = " & IntID
Set ObjRS = C.View(StrSQL)
ObjDB.Close
Set ObjDB = Nothing
Sub Main
%>
<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
<table class=Ltable cellspacing=1 cellpadding=3>
<input type=hidden name=ID value="<%=IntID%>">
<tr class=Ltr>
<td>文章名称</td>
<td><input type="text" size=40 class=Input Check=1 Show="文章名称" name="_Title" value="<%=ObjRS("Title")%>"></td>
</tr>
<tr class=Ltr>
<td>文章内容</td>
<td><textarea class=textarea cols=29 rows=15 Check=1 Show="文章名称" name="_Body"><%=FixBody(ObjRS("Body"))%></textarea></td>
</tr>
</table>
<table cellspacing=1 cellpadding=3>
<tr>
<td><input type="submit" name="Submit" class=Button value="提 交"></td>
<%If IntParentID = "0" then%>
<td><input type="button" class=Button value="取 消" onclick="doList()"></td>
<%else%>
<td><input type="button" class=Button value="取 消" onclick="doBack()"></td>
<%end if%>
</tr>
</table>
</form>
<%
End Sub
%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -