📄 addattach.asp
字号:
<%option explicit%>
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<%
'----------------------------------------------------------------------
'---------------文件包含部分说明---------------------------------------
'----------------------------------------------------------------------
'--------------- 使用数据库连接包含 DataEnvi.asp ---------------
'--------------- 使用字符串包含 String.asp -----------------------
'--------------- 使用分页操作包含 Page.asp -------------------
'----------------------------------------------------------------------
%>
<!--#include virtual = "Include/DataEnvi.asp"-->
<!--#include virtual = "Include/String.asp"-->
<!--#include virtual = "Include/Page.asp"-->
<%
Dim objDB,objRS,strSQL
Dim ConferenceID
Dim strExistAttach,ConID
Set objDB = server.CreateObject("ADODB.Connection")
Set objRS = server.CreateObject("ADODB.Recordset")
OpenDB objDB
ConferenceID = Request.QueryString("IntID")
StrSQL = "Select * From t_OA_Work_Conference_Attach where IsUpSuccess=1 And ConID = " & ConferenceID
' Response.Write strSQL
objRS.Open strSQL,objDB,1,3
Do while Not objRS.EOF
strExistAttach = strExistAttach & "<tr><td>" & VbCrlf
strExistAttach = strExistAttach & objRS.Fields("AttachName") & "</td><td>" & VbCrlf
strExistAttach = strExistAttach & objRS.Fields("AttachSize") & "<B>Bit</B></td><td>" & VbCrlf
strExistAttach = strExistAttach & "<A href=delAttach.asp?AttachID=" & objRS.Fields("ID") & ">删除</A>" & VbCrlf
strExistAttach = strExistAttach & "</td></tr>" & VbCrlf
objRS.MoveNext()
Loop
%>
<%'==================================================================%>
<%Sub Main%>
<%'------------------------------------------------------------------%>
<html>
<head>
<script language="javascript" src="../../../include/CheckForm.js">
</script>
<script language="javascript">
<!--
function CheckAll()
{
if(!CheckEmpty(thisForm.source, "附件"))return false
if(!CheckEmpty(thisForm.attachName, "附件名称"))return false
return true
}
-->
</script>
</head>
<form name=thisForm method="POST" action="addAttachDO.asp" enctype="multipart/form-data" onsubmit="return(CheckAll())">
</form>
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td width=30%>添加新附件</td>
<td width=70%> </td>
</tr>
<tr class=Ltr>
<td> 请选择附件:</td>
<td><input type=file name="source" size="20"></td>
</tr>
<tr class=Ltr>
<td>附件名称:</td>
<td><input name="attachName" size="20"></td>
</tr>
<tr class=Ltr>
<td></td>
<td align=center><input type=submit value="粘 贴"></td>
</tr>
<input type=hidden name="ConID" value=<%=ConferenceID%>>
</form>
<tr>
<td height=50 colspan=2><hr></td>
</tr>
<tr class=LHtr>
<td colspan=2><B>已有附件</B></td>
</tr>
<tr class=Ltr>
<td colspan=2>
<table border=0 width=100%>
<tr class=Ltr>
<td width=33%>附件名称</td>
<td width=33%>附件大小</td>
<td width=33%>操作</td>
</tr>
<%= strExistAttach %>
</table>
</td>
</tr>
<tr class=Ltr>
<td></td>
<td align=center><input type=button value="完 成" onclick="javaScript:window.close()"></td>
</tr>
</table>
</html>
<%'------------------------------------------------------------------%>
<%End Sub%>
<%'==================================================================%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -