special_add_save.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:1k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <!--#include file="security.asp"-->
  3. <!--#include file="../checkpost.asp"-->
  4. <!--#include file="inc/function.asp"-->
  5. <%if session("flag")>1 then
  6.     response.write "<script>alert('您的操作权限不够!');history.back();</script>"
  7.     response.end
  8. end if
  9. %>
  10. <%
  11. 'on error resume next
  12.  dim special
  13.  dim name
  14.  dim pic
  15.  dim hits
  16.  dim best
  17.  dim special_intro
  18.  dim name_intro
  19.  special=trim(request("special"))
  20.  name=trim(request("name"))
  21.  pic=trim(request("pic"))
  22.  hits=trim(request("hits"))
  23.  best=trim(request("best"))
  24.  special_intro=replace(request("special_intro"),"'","’")
  25.  special_intro=replace(special_intro,">",">")
  26.  special_intro=replace(special_intro,"<","<")
  27.  special_intro=replace(special_intro,vbCrLf,"<br>")
  28.  special_intro=replace(special_intro," ","&nbsp;")
  29.  
  30.  name_intro=replace(request("name_intro"),"'","’")
  31.  name_intro=replace(name_intro,">",">")
  32.  name_intro=replace(name_intro,"<","<")
  33.  name_intro=replace(name_intro,vbCrLf,"<br>")
  34.  name_intro=replace(name_intro," ","&nbsp;")
  35.  set rs=server.createobject("adodb.recordset")
  36.  sql="select * from special"
  37.  rs.open sql,conn,3,3
  38.  rs.addnew
  39.  rs("special")=special
  40.  rs("name")=name
  41.  rs("pic")=pic
  42.  rs("hits")=hits
  43.  rs("best")=best
  44.  rs("special_intro")=special_intro
  45.  rs("name_intro")=name_intro
  46.  rs("addtime")=now()
  47.  rs.update
  48.  rs.close
  49.  set rs=nothing
  50.  conn.close
  51.  set conn=nothing
  52.  response.write"<script>alert('添加成功!');history.back();</Script>"
  53. %>