⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upload_news_img.asp

📁 一个有用的东西 希望大家喜欢 谢谢大家对本站的支持
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
body,td,th {
	font-size: 9pt;
	color: #000000;
}
-->
</style></head>
<%
if session("admin")<>"mfkiqpl" then
response.write("<script>top.location='error.asp?errormsg=<li>您不是管理员,或您没有登录!</li><br><li>您的登录信息已经过期,请重新登录!</li>';</script>")
end if
%>
<!--#include file="system/upload.inc" -->
<%
dim action
action=request("action")
if action="up" then
call uploadstart
else
call dd
end if
sub uploadstart
set upload=new upload_5xsoft
set file=upload.file("textfield")
IDstring="mfkiqpl_news_img"&date & time
IDstring=Replace(IDstring,"-","")
IDstring=Replace(IDstring,":","")
pthString="system/uploadimages/"
FileTpe=Mid(file.filename,Len(file.filename)-2)
if not (ucase(fileTpe)="JPG" or ucase(fileTpe)="BMP" or ucase(fileTpe)="GIF") then
response.write("<script>alert('上传图片格式只能为:JPG,BMP,GIF。');history.back(1);</script>")
else
file.saveAs Server.mappath(pthString & IDstring & "." & FileTpe)
filepath=pthString & IDstring & "." & FileTpe
filepath=replace(filepath,"../","")
if filetpe="swf" then
response.write("<script>top.mfk2.form1.ntext.value+='[align=center][flash]"&filepath&"[/flash][/align]'</script>")
else
response.write("<script>top.mfk2.form1.ntext.value+='[align=center][img]"&filepath&"[/img][/align]'</script>")
end if
set file=nothing
response.write ("<a href=""upload_news_img.asp"">上传成功!点击再次上传!</a>")
end if
end sub
%>
<body>
<%sub dd%>
<script>
function check(){
if(form1.textfield.value==""){
alert("请选择要上传的文件地址!");
return false;
}
}
</script>
<form action="?action=up" method="post" enctype="multipart/form-data" name="form1" onsubmit="return check();">
<input type="file" name="textfield"><input name="buttion" type="submit" value="提交">
</form>
<%end sub%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -