📄 content_modi.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 len(number)<=4 and show_type='char' order by number"
Set itemRs=Open_rs(conn,sql)
newsid=trim(Request("id"))
booksql="select * from content where id='"&newsid&"'"
'response.write booksql
'response.end
set Rs=open_rs(conn,booksql)
'response.write rs("title")
'response.end
if newsid<>"" and rs.eof then
%>
<script language="javascript">
<!--
alert("没有相关记录,请重新选择!!");
window.history.back(1);
-->
</script>
<%
end if
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)
if not mystring="" then
arrName=split(Cstr(mystring),chr(34))
Dealname=arrName(1)
else
Dealname=""
end if
end function
function SpaceDeal(initstring)
tempstring=replace(initstring," ",chr(32))
Spacedeal=(tempstring)
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">
<!--
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -