📄 addnew.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<!-- #include virtual="include/File.asp" -->
<!-- #include virtual="include/SelectValue.asp" -->
<%
Dim ObjDB,ObjRS,StrSQL
Dim C
Dim StrSelectTrueName,IntParentID
Dim ObjFile,StrContentType,StrFileName,IntID
Dim StrExtName,IntSaveRe,IntFileSize
Dim strDes
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB
IntParentID = Request.QueryString("ParentID")
If Request.Form("IsSubmit")="true" Then
IntParentID = Request("_ParentID")
Set ObjRS = Server.CreateObject("Adodb.Recordset")
StrSQL = "Select Top 1 * From t_OA_Work_Source"
ObjRS.Open StrSQL,ObjDB,1,3
ObjRS.AddNew
ObjRS("ParentID") = Request("_ParentID")
ObjRS("NodeType") = Request("_NodeType")
ObjRS.Fields("SourceTypeName") = Request("_SourceTypeName")
ObjRS("SourceName") = Request("_SourceName")
ObjRS("Des") = Request("_Des")
ObjRS("Keyword") = Request("_KeyWord")
ObjRS.Fields("CreateTime") = Request("_CreateTime")
ObjRS.Update
IntID = ObjRS("ID")
ObjRS.Close
Set ObjRS = Nothing
ObjDB.Close
Set ObjDB = Nothing
Response.Redirect ("List.asp?ParentID=" & IntParentID)
End If
Sub Main
%>
<script language=javascript>
function ShowContent(t)
{
var theForm = document.forms[0]
Content0.style.display = "none"
Content11.style.display = "none"
Content12.style.display = "none"
theForm._SourceTypeName.Check = 0
theForm._Des.Check = 0
if(t==0)
{
Content0.style.display = ""
theForm._SourceTypeName.Check = 1
}
if(t==1)
{
Content11.style.display = ""
Content12.style.display = ""
theForm._SourceName.Check = 1
theForm._Des.Check = 1
}
}
</script>
<form action="" method="post" onsubmit="return(CheckForm(this))">
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td width="15%">新增资源</td>
<td width="85%"> </td>
</tr>
<input Type=hidden name="_AccountID" value=<%=Session("AccountID")%>>
<input Type=hidden name="_ParentID" value=<%=IntParentID%>>
<tr class=Ltr>
<td>新增</td>
<td>
<table border=0>
<tr>
<td><input type=radio name=_NodeType value=0 checked onclick="ShowContent(0)"></td>
<td><img src="../../../images/oa/private/data/folder.gif"></td>
<td>资源类别 </td>
<td><input type=radio name=_NodeType value=1 onclick="ShowContent(1)"></td>
<td><img src="../../../images/oa/private/data/file.gif"></td>
<td>资源 </td>
</tr>
</table>
</td>
</tr>
<tr class=Ltr id=Content0 style="display=''">
<td>资源类别名称</td>
<td><input type="text" size=38 class=Input Check=0 Show="资源类别名称" name="_SourceTypeName"></td>
</tr>
<tr class=Ltr id=Content11 style="display='none'">
<td>资源名称</td>
<td><input type="text" size=38 class=Input Check=0 Show="资源名称" name="_SourceName"></td>
</tr>
<tr class=Ltr id=Content4 style="display=''">
<td>检索关键字</td>
<td><input type="text" size=38 class=Input name="_KeyWord"></td>
</tr>
<tr class=Ltr>
<td>创建时间</td>
<td><input class=Input type="text" size=38 readonly name="_CreateTime" value="<%=Now()%>" ></td>
</tr>
<tr class=Ltr id=Content12 style="display='none'">
<td valign=top>备注</td>
<td><textArea class=Textarea Show="备注" cols=27 rows=10 name="_Des"></textarea></td>
</tr>
</table>
<table cellspacing=1 cellpadding=3>
<tr>
<td>
<input type=hidden name="IsSubmit" value="true">
<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(0)
</script>
<%
End Sub
%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -