📄 edit.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<!-- #include virtual="include/File.asp" -->
<!-- #include virtual="include/SelectValue.asp" -->
<!-- #include virtual="include/String.asp" -->
<%
Dim ObjDB,ObjRS,StrSQL
Dim C
Dim StrSelectTrueName,IntParentID,StrName
Dim ObjFile,StrContentType,StrFileName,IntID,StrNodeType
Dim StrExtName,IntSaveRe,IntFileSize
Set C = Server.CreateObject("CMS2003.DBHandle")
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB
C.Init(ObjDB)
IntID = Request.QueryString("ID")
StrSQL = "Select * From t_OA_Private_Data Where ID = " & FixSQL(IntID)
Set ObjRS = C.View(StrSQL)
StrNodeType = ObjRS("NodeType")
Select Case StrNodeType
Case 0
StrName = "文件夹"
Case 1
StrName = "文件"
Case 2
StrName = "文本文件"
Case 3
StrName = "超级链接"
End Select
If Request.Form.Count > 0 Then
Call C.Edit(IntID,"_","t_OA_Private_Data")
%>
<script language=javascript>
parent.doList()
</script>
<%
Response.End
End If
ObjDB.Close
Set ObjDB = Nothing
%>
<%'==================================================================%>
<%Sub Main%>
<%'------------------------------------------------------------------%>
<script language=javascript>
function ShowContent(t){
var theForm = document.forms[0]
Content0.style.display = "none"
Content11.style.display = "none"
Content21.style.display = "none"
Content22.style.display = "none"
Content31.style.display = "none"
Content32.style.display = "none"
theForm._DirName.Check = 0
theForm._Title.Check = 0
theForm._LinkTitle.Check = 0
theForm._LinkURL.Check = 0
if(t==0){
Content0.style.display = ""
theForm._DirName.Check = 1
}
if(t==1){
Content11.style.display = ""
theForm._FileName.Check = 1
}
if(t==2){
Content21.style.display = ""
Content22.style.display = ""
theForm._Title.Check = 1
}
if(t==3){
Content31.style.display = ""
Content32.style.display = ""
theForm._LinkTitle.Check = 1
theForm._LinkURL.Check = 1
}
}
</script>
<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td width="15%">修改<%=StrName%></td>
<td width="85%"> </td>
</tr>
<tr class=Ltr id=Content0 style="display=''">
<td>文件夹名称</td>
<td><input type="text" class=Input Check=0 Show="资料夹名称" name="_DirName" value="<%=ObjRS("DirName")%>"></td>
</tr>
<tr class=Ltr id=Content11 style="display='none'">
<td>文件标题</td>
<td><input type="text" class=Input Check=0 Show="文件标题" name="_FileName" value="<%=ObjRS("FileName")%>"></td>
</tr>
<tr class=Ltr id=Content21 style="display='none'">
<td>标题</td>
<td><input type="text" class=Input size=28 Check=0 Show="标题" name="_Title" value="<%=ObjRS("Title")%>"></td>
</tr>
<tr class=Ltr id=Content22 style="display='none'">
<td valign=top>内容</td>
<td><textarea name="_Body" class=Textarea rows=10 cols=22 Check=0 Show="内容" ><%=ObjRS("Body")%></textarea></td>
</tr>
<tr class=Ltr id=Content31 style="display='none'">
<td>链接标题</td>
<td><input type="text" class=Input Check=0 Show="链接标题" name="_LinkTitle" value="<%=ObjRS("LinkTitle")%>"></td>
</tr>
<tr class=Ltr id=Content32 style="display='none'">
<td>链接地址</td>
<td><input type="text" class=Input Check=0 Show="链接地址" name="_LinkURL" value="<%=ObjRS("LinkURL")%>"></td>
</tr>
<tr class=Ltr id=Content4 style="display=''">
<td>检索关键字</td>
<td><input type="text" class=Input size=28 name="_KeyWord" value="<%=ObjRS("KeyWord")%>"></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="doList()" id=button1 name=button1>
</td>
<td>
</td>
</tr>
</table>
</form>
<script language=javascript>
ShowContent(<%=StrNodeType%>)
</script>
<%'------------------------------------------------------------------%>
<%End Sub%>
<%'==================================================================%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -