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

📄 content_modi3.asp

📁 是一个关于小学信息化教育的平台,提供了学校论坛,和聊天室功能!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#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='image3') or (len(number)=2) order by number"
Set itemRs=Open_rs(conn,sql)

newsid=trim(Request("id"))

booksql="select * from content2 where id='"&newsid&"'"
set Rs=open_rs(conn,booksql)

function Deal(initstring)
	tempstring=replace(initstring,chr(39),"’")
	tempstring=Replace(tempstring,"<","&lt;")
	tempstring=Replace(tempstring,">","&gt;")
	tempstring=replace(tempstring,chr(34),"“")
	tempstring=replace(tempstring,chr(32),"&nbsp;")	
	deal=(tempstring)
end function

function Dealname(mystring)
	if not mystring="" then
    arrName=split(Cstr(mystring),chr(34))
	Dealname=arrName(1)
	end if
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=Rs("attach")

if not ss="" then
'downdir="doc/"&ss
downdir=ss
end if

if downdir<>"" and rs("attach")="" then
downdir="doc/"&downdir
end if

downdir2=Rs("photo")

if not ss2="" then
'downdir="doc/"&ss
downdir2=ss2
end if

if downdir2<>"" and rs("photo")="" 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

apply_time=now

conn.execute "update content2 set title='"&mytitle&"',user_name='"&apply_name&"',type_id='"&depart_number&"',attach='"&downdir&"',photo='"&downdir2&"',teacher='"&transvalue(trim(ff.request("teacher")))&"',user_intro='"&transvalue(ff.request("user_intro"))&"' where id='"&rs("id")&"'"

	     	  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>0"

end if

booksql="select * from content2 where id='"&newsid&"'"

Set rs = Open_Rs(conn,booksql)
'rs.addnew
'rs.cancelupdate


%>
<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%">&nbsp;</td>
                <td width="99%"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td id="td1">&nbsp;</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">&nbsp;</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>

⌨️ 快捷键说明

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