📄 uploadimage2.asp
字号:
<!--#include file=conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF
%>
<!--#include file=../include/function.asp -->
<%
NewsID=Request.Form("NewsID")
if NewsID="" then
%>
<script language=javascript>
history.back()
alert("请输入您要上传图片的新闻ID!")
</script>
<%
Response.End
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from News where NewsID=" & NewsID
rs.Open rs.source,conn,1,1
Title=trim(rs("Title"))
image=rs("image")
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="copyright" content="网络精英-ChinaNetboy.com">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=site.css rel=stylesheet>
</head>
<body>
<p> </p><BR>
<form enctype="multipart/form-data" method="post" action="UploadImage3_upload.asp?NewsID=<%=NewsID%>" name="Upload">
<input type="hidden" name="CopyrightInfo" value="http://www.chinaasp.com">
<table border="0" width="80%" align=center cellspacing="1" cellpadding="5" bgcolor="#000000">
<tr>
<td width="100%" height="30" bgcolor="#abb8d6" align="center"><b>上传新闻图片</b></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" align="center">新闻<%=NewsID%>号:<%=title%>
需要
<input type=text value=<%=image%> disabled size=2>
张图片。</td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF"><b>图片格式为:</b>.gif、jpg、bmp、flash<BR>
程序将按照这个顺序检测,如果有检测到图片,就会在下面直接显示文件名,并且用红色的字体表示,如果没有检测到,将按照NewsID-i的格式显示(不显示扩展名)</td>
</tr>
<%
for i=1 to image
if DelectImageFile_Upload(NewsID,i)="" then
Response.Write "<tr><td width=100% bgcolor=#FFFFFF align=center><B>" & NewsID & "-" & i & ":</b><input type=file name=file" & i & " size=50></td></tr>"
else
Response.Write "<tr><td width=100% bgcolor=#FFFFFF align=center><B><font color=red>" &DelectImageFile_Upload(NewsID,i) & ":</font></b><input type=file name=file" & i & " size=50></td></tr>"
end if
next
%>
<tr>
<td width="100%" align=center bgcolor="#abb8d6" height="50">
<input type=submit value=开始上传图片>
</td>
</tr>
</table>
</form>
<p><br><br>
</body>
</html>
<%
rs.Close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -