📄 content_modi2.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='image') or (len(number)=4 and show_type='image2') or (len(number)=2) order by number"
Set itemRs=Open_rs(conn,sql)
newsid=trim(Request("id"))
booksql="select * from content where id='"&newsid&"'"
set Rs=open_rs(conn,booksql)
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("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
downdir=Rs("attach")
if not ss="" then
'downdir="doc/"&ss
downdir=ss
end if
if downdir<>"" and rs("attach")="" then
downdir="doc/"&downdir
end if
title=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
apply_time=now
'response.end
conn.execute "update content set title='"&title&"',user_name='"&apply_name&"',type_id='"&depart_number&"',attach='"&downdir&"' where id='"&rs("id")&"'"
Response.Write "<script language=javascript>"
Response.Write "alert('操作成功!!');"
Response.Write "window.location.href='content2.asp?myjoke=1&type="&trim(ff.request("type"))&"&act=search';"
Response.Write "</script>"
Response.End
end if
%>
<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>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"> </td>
<td width="99%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="td1"> </td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21%" valign="top"><!--#include file="../../include/admin_left.inc"--></td>
<td width="2%" valign="top"> </td>
<td width="77%" height=1 valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td background="/images/middle/m-bg.gif" width="70"><img src="/images/wzgl.gif"></td>
<td background="/images/middle/m-bg.gif" align="right"><img src="/images/middle/pacer1.gif" width="3" height="38"></td>
<td background="/images/middle/m-bg.gif" align="right" valign="middle" width="16"><a href=# onClick="more()"><img src="/images/middle/more.gif" width="16" height="16" border=0 alt="更多"></a></td>
<td background="/images/middle/m-bg.gif" align="right" width="8"><img src="/images/middle/pacer.gif" width="8" height="38"></td>
<td background="/images/middle/m-bg.gif" align="right" valign="middle" width="16"><a href=# onClick="help()"><img src="/images/middle/help.gif" width="16" height="16" border=0 alt="栏目帮助"></a></td>
<td width="6" align="right"><img src="/images/middle/M-r.gif" width="16" height="38"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bg-left" width="6"><img src="/images/left/l-l.gif" border=0></td>
<td class="newsborder" width="100%" >
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="170" valign="top">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -