📄 content_edit.asp
字号:
<!--#include file="../../include/db.asp"-->
<!--#include file="../../include/admin_check.asp"-->
<!--#INCLUDE FILE="power.ASP"-->
<%
action=trim(request.querystring("action"))
Set conn = OpenOrGet_Database("sql_conn")
newsid=trim(Request("id"))
'得到项目列表
sql="select number,name from item_type where number='"&trim(request("type"))&"'"
Set itemRs=Open_rs(conn,sql)
function Deal(initstring)
tempstring=replace(initstring,chr(39),"’")
tempstring=Replace(tempstring,"<","<")
tempstring=Replace(tempstring,">",">")
tempstring=replace(tempstring,chr(34),"“")
tempstring=replace(tempstring,chr(32)," ")
deal=(tempstring)
end function
function Dealname(mystring)
arrName=split(Cstr(mystring),chr(34))
Dealname=arrName(1)
end function
if action="add" or action="modi" then
set ff=Server.CreateObject("LyfUpload.UploadFile")
ff.maxsize=200000
path=server.mappath("doc/")
'----------------------------------------deal attach01
if not dealname(ff.Request("picurl01"))="" then
if instr(lcase(ff.Request("picurl01")),".gif") or instr(lcase(ff.Request("picurl01")),".jpg") or instr(lcase(ff.Request("picurl01")),".bmp") then
ss=ff.SaveFile("picurl01",path,false)
if ss= "0" then
%>
<script language="javascript">
<!--
alert("图片1:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss= "3" then
%>
<script language="javascript">
<!--
alert("图片1:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss = "" then
%>
<script language="javascript">
<!--
alert("图片1:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片1:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'-----------------------------------------------------deal attach02
if not dealname(ff.Request("picurl02"))="" then
if instr(lcase(ff.Request("picurl02")),".gif") or instr(lcase(ff.Request("picurl02")),".jpg") or instr(lcase(ff.Request("picurl02")),".bmp") then
ss2=ff.SaveFile("picurl02",path,false)
if ss2= "0" then
%>
<script language="javascript">
<!--
alert("图片2:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss2= "3" then
%>
<script language="javascript">
<!--
alert("图片2:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss2= "" then
%>
<script language="javascript">
<!--
alert("图片2:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片2:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'---------------------------------------deal attach03
if not dealname(ff.Request("picurl03"))="" then
if instr(lcase(ff.Request("picurl03")),".gif") or instr(lcase(ff.Request("picurl03")),".jpg") or instr(lcase(ff.Request("picurl03")),".bmp") then
ss3=ff.SaveFile("picurl03",path,false)
if ss3= "0" then
%>
<script language="javascript">
<!--
alert("图片3:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss3= "3" then
%>
<script language="javascript">
<!--
alert("图片3:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss3 = "" then
%>
<script language="javascript">
<!--
alert("图片3:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片3:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'-----------------------------------------------deal attach04
if not dealname(ff.Request("picurl04"))="" then
if instr(lcase(ff.Request("picurl04")),".gif") or instr(lcase(ff.Request("picurl04")),".jpg") or instr(lcase(ff.Request("picurl04")),".bmp") then
ss4=ff.SaveFile("picurl04",path,false)
if ss4= "0" then
%>
<script language="javascript">
<!--
alert("图片4:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss4= "3" then
%>
<script language="javascript">
<!--
alert("图片4:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss4 = "" then
%>
<script language="javascript">
<!--
alert("图片4:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片4:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'------------------------------------------------------------deal attach05
if not dealname(ff.Request("picurl05"))="" then
if instr(lcase(ff.Request("picurl05")),".gif") or instr(lcase(ff.Request("picurl05")),".jpg") or instr(lcase(ff.Request("picurl05")),".bmp") then
ss5=ff.SaveFile("picurl05",path,false)
if ss5= "0" then
%>
<script language="javascript">
<!--
alert("图片5:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss5= "3" then
%>
<script language="javascript">
<!--
alert("图片5:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss5 = "" then
%>
<script language="javascript">
<!--
alert("图片5:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片5:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'-----------------------------------------------------insert into database
'response.write ff.Request("picurl02")
'response.end
downdir=""
if not ss="" then
'downdir="doc/"&ss
downdir=ss
end if
if not ss2="" then
if downdir<>"" then
downdir=downdir&",doc/"&ss2
else
downdir=ss2
end if
end if
if not ss3="" then
if downdir<>"" then
downdir=downdir&",doc/"&ss3
else
downdir=ss3
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -