📄 content_edit3.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("picurl"))="" then
if instr(lcase(ff.Request("picurl")),".gif") or instr(lcase(ff.Request("picurl")),".jpg") or instr(lcase(ff.Request("picurl")),".bmp") then
ss=ff.SaveFile("picurl",path,false)
if ss= "0" then
%>
<script language="javascript">
<!--
alert("图片:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss= "3" then
%>
<script language="javascript">
<!--
alert("图片:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss = "" then
%>
<script language="javascript">
<!--
alert("图片:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'----------------------------------------------------deal attach02-----------------------------
if not dealname(ff.Request("picurl2"))="" then
if instr(lcase(ff.Request("picurl2")),".gif") or instr(lcase(ff.Request("picurl2")),".jpg") or instr(lcase(ff.Request("picurl2")),".bmp") then
ss2=ff.SaveFile("picurl2",path,false)
if ss2= "0" then
%>
<script language="javascript">
<!--
alert("图片:文件尺寸不应超过200K,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss2= "3" then
%>
<script language="javascript">
<!--
alert("图片:服务器上已经有同名的文件,请选择文件后重新上传");
window.history.back(1);
-->
</script>
<%
response.end
end if
if ss2 = "" then
%>
<script language="javascript">
<!--
alert("图片:文件上传失败!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
else
%>
<script language="javascript">
<!--
alert("图片:文件必须为.bmp 文件或.jpg 文件或.gif 文件!!");
window.history.back(1);
-->
</script>
<%
response.end
end if
end if
'----------------------------------------------------deal end-----------------------------------
downdir=""
if not ss="" then
'downdir="doc/"&ss
downdir=ss
end if
if downdir<>"" then
downdir="doc/"&downdir
end if
downdir2=""
if not ss2="" then
'downdir="doc/"&ss
downdir2=ss2
end if
if downdir2<>"" then
downdir2="doc/"&downdir2
end if
mytitle=transvalue(ff.request("title"))
apply_name=ff.request("apply_name")
if len(ff.request("type"))=1 then
depart_number="0"&ff.request("type")
else
depart_number=ff.request("type")
end if
'response.write depart_number
'response.end
apply_time=now
conn.execute "insert into content2(title,user_name,type_id,attach,date,user_intro,teacher,photo) values('"&mytitle&"','"&apply_name&"','"&depart_number&"','"&downdir&"','"&now&"','"&transvalue(ff.request("user_intro"))&"','"&transvalue(trim(ff.request("teacher")))&"','"&downdir2&"')"
Response.Write "<script language=javascript>"
Response.Write "alert('操作成功!!');"
Response.Write "window.location.href='content3.asp?myjoke=1&type="&trim(ff.request("type"))&"&act=search';"
Response.Write "</script>"
'Response.End
end if
booksql="select * from content2 where id='"&newsid&"'"
Set rs = Open_Rs(conn,booksql)
'rs.addnew
'rs.cancelupdate
rs.AddNew
%>
<html>
<head>
<title>深圳育才一小欢迎您!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/include/page.css" type="text/css">
</head>
<body >
<table width="1" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="753" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!--#include file="../../include/admin_banner.inc"--></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -