Deal_link.asp
Upload User: pengwei803
Upload Date: 2021-02-10
Package Size: 3311k
Code Size: 2k
Development Platform:

HTML/CSS

  1. <!--#include file="../Ku_inc/Ku_sql.asp"-->
  2. <!--#include file="../Ku_inc/Ku_config.asp"-->
  3. <!--#include file="Ku_conn.asp"-->
  4. <!--#include file="../Ku_inc/inc.asp"-->
  5. <!-- #include file="Session.asp"-->
  6. <%
  7. if request("action")="add" then
  8. name=Checkin(trim(Request.form("name")))
  9.     If name="" Then
  10.     Response.Write "<script>alert(""网站名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  11.     Response.end()
  12.     end if
  13.     set rs=server.createobject("adodb.recordset")
  14.     sql="select * from ku_link where name='"&name&"'"
  15.     rs.open sql,conn,1,3
  16.     if (rs.eof and rs.bof) then
  17.     rs.addnew
  18.     rs("name")=name
  19.     rs("url")=request("url")
  20.     rs("logo")=request("logo")
  21.     if request("biaoji")<>"" then
  22.     rs("biaoji")=1
  23.     end if
  24.     
  25.     if request("logo")<>"" then
  26.     rs("yeslogo")=1
  27.     end if
  28.     rs("shenhe")=1
  29.     rs("addtime")=now()
  30.     rs.update
  31.     rs.close
  32.     response.Write("<script>alert(""添加成功!"");location.href=""ku_link.asp"";</script>")
  33.     else
  34.     response.Write("<script>alert(""网站已存在!"");location.href=""ku_link.asp"";</script>")
  35.     end if
  36.     end if 
  37. %>
  38. <%
  39. if request("action")="shenhe" then
  40. id=request("id")
  41.     set rs=server.createobject("adodb.recordset")
  42.     sql="select * from ku_link where id="&id
  43.     rs.open sql,conn,1,3
  44.     rs("shenhe")=1
  45.     rs.update
  46.     rs.close
  47.     response.Write("<script>alert(""审核成功!"");location.href=""ku_link.asp"";</script>")
  48.     end if 
  49. %>
  50. <%
  51. if request("action")="edit" then
  52. name=Checkin(trim(Request.form("name")))
  53. id=request("id")
  54.     If name="" Then
  55.     Response.Write "<script>alert(""网站名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  56.     Response.end()
  57.     end if
  58.     set rs=server.createobject("adodb.recordset")
  59.     sql="select * from ku_link where id="&id
  60.     rs.open sql,conn,1,3
  61.     
  62.     if request("biaoji")<>"" then
  63.     rs("biaoji")=1
  64.     end if
  65.     rs("name")=name
  66.     rs("url")=request("url")
  67.     rs("logo")=request("logo")
  68.     if request("logo")<>"" then
  69.     rs("yeslogo")=1
  70.     end if
  71.     rs("shenhe")=1
  72.     rs("addtime")=now()
  73.     rs.update
  74.     rs.close
  75.     response.Write("<script>alert(""修改成功!"");location.href=""ku_link.asp"";</script>")
  76.     end if 
  77. %>