Deal_down.asp
Upload User: pengwei803
Upload Date: 2021-02-10
Package Size: 3311k
Code Size: 7k
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")="del" then
  8. if Trim(Request("ID"))="" then
  9. FoundErr=True
  10. Message=Message & "<li>请您选择要删除的信息!</li>"
  11. else
  12. call Del()
  13. end if
  14. if FoundErr<>True then
  15. Sub Del()
  16. '删除信息
  17. sql = "delete from ku_down where ID in ("& Trim(Request("ID")) &")"
  18. conn.execute (sql)
  19. End Sub
  20. '成功提示    
  21.     response.Write("<script>alert(""删除成功!"");location.href=""down_list.asp"";</script>")
  22. end if
  23. if FoundErr=True then
  24. call ErrMsg(Message)
  25. end if
  26. end if
  27. %>
  28. <%
  29. if request("action")="tisheng" then
  30. if Trim(Request("ID"))="" then
  31. FoundErr=True
  32. Message=Message & "<li>请您选择要操作的信息!</li>"
  33. else
  34. call strPeak()
  35. end if
  36. if FoundErr<>True then
  37. Sub strPeak()
  38. adoSQL="update ku_down set addtime=now() where ID=" & Trim(Request("ID")) & ""
  39. conn.execute(adoSQL)
  40. End Sub
  41. '成功提示    
  42.     response.Write("<script>alert(""提升成功!"");location.href=""down_list.asp"";</script>")
  43. end if
  44. if FoundErr=True then
  45. call ErrMsg(Message)
  46. end if
  47. end if
  48. %>
  49. <%
  50. if request("action")="add" then
  51. name=Checkin(trim(Request.form("name")))
  52.     If name="" Then
  53.     Response.Write "<script>alert(""分类名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  54.     Response.end()
  55.     end if
  56.     set rs=server.createobject("adodb.recordset")
  57.     sql="select * from ku_downkind where name='"&name&"'"
  58.     rs.open sql,conn,1,3
  59.     if (rs.eof and rs.bof) then
  60.     rs.addnew
  61.     rs("name")=name
  62.     rs.update
  63.     rs.close
  64.     response.Write("<script>alert(""添加分类成功!"");location.href=""down_kind.asp"";</script>")
  65.     else
  66.     response.Write("<script>alert(""分类已存在!"");location.href=""down_kind.asp"";</script>")
  67.     end if
  68.     end if 
  69. %>
  70. <%
  71. if request("action")="shenhe" then
  72. id=request("id")
  73.     set rs=server.createobject("adodb.recordset")
  74.     sql="select * from ku_down where id="&id
  75.     rs.open sql,conn,1,3
  76.     rs("shenhe")=1
  77.     rs.update
  78.     rs.close
  79.     response.Write("<script>alert(""审核成功!"");location.href=""down_list.asp"";</script>")
  80.     end if 
  81. %>
  82. <%
  83. if request("action")="edit" then
  84. name=Checkin(trim(Request.form("name")))
  85. id=request("id")
  86.     If name="" Then
  87.     Response.Write "<script>alert(""网站名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  88.     Response.end()
  89.     end if
  90.     set rs=server.createobject("adodb.recordset")
  91.     sql="select * from ku_downkind where id="&id
  92.     rs.open sql,conn,1,3
  93.     
  94.     rs("name")=name
  95.     rs.update
  96.     rs.close
  97.     response.Write("<script>alert(""修改成功!"");location.href=""down_kind.asp"";</script>")
  98.     end if 
  99. %>
  100. <%
  101. if request("action")="adddown" then
  102. name=strLeach(trim(Request.form("name")))
  103. pic=strLeach(trim(Request.form("pic")))
  104. zuozhe=strLeach(trim(Request.form("zuozhe")))
  105. jifen=strLeach(trim(Request.form("jifen")))
  106. http=strLeach(trim(Request.form("http")))
  107. url=strLeach(trim(Request.form("url")))
  108. content=server.HTMLEncode(trim(Request.form("content")))
  109. big=strLeach(trim(Request.form("big")))
  110. yanshi=strLeach(trim(Request.form("http")))
  111. classs=request("class")
  112. jifen=request("jifen")
  113. star=request("star")
  114. vipjf=request("vipjf")
  115.     If name="" Then
  116.     Response.Write "<script>alert(""软件名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  117.     Response.end()
  118.     end if
  119.     if IsNumeric(jifen)=false then
  120.     Response.Write "<script>alert(""积分只能为数字!"");location.href=""javascript:history.back()"";</script>"
  121.     end if
  122.     
  123.     if IsNumeric(vipjf)=false then
  124.     Response.Write "<script>alert(""VIP积分只能为数字!"");location.href=""javascript:history.back()"";</script>"
  125.     end if
  126.     If url="" Then
  127.     Response.Write "<script>alert(""下载地址不能为空!"");location.href=""javascript:history.back()"";</script>"
  128.     Response.end()
  129.     end if
  130.     
  131.     
  132.     If content="" Then
  133.     Response.Write "<script>alert(""软件介绍不能为空!"");location.href=""javascript:history.back()"";</script>"
  134.     Response.end()
  135.     end if
  136.     
  137.     set rsdown=server.createobject("adodb.recordset")
  138.     sqldown="select * from ku_down "
  139.     rsdown.open sqldown,conn,1,3
  140.     rsdown.addnew
  141.     
  142.     rsdown("name")=name
  143.     rsdown("class")=classs
  144.     rsdown("jifen")=jifen
  145.     rsdown("big")=big
  146.     rsdown("addtime")=now()
  147.     rsdown("writer")=zuozhe
  148.     rsdown("pic")=pic
  149.     rsdown("url")=url
  150.     rsdown("content")=content
  151.     rsdown("star")=star
  152.     rsdown("yanshi")=yanshi
  153.     rsdown("shenhe")=1
  154.     if request("tuijian")<>"" then
  155.     rsdown("tuijian")=request("tuijian")
  156.     end if
  157.     if pic<>"" then
  158.         rsdown("yespic")=1    
  159.     end if
  160.     if request("vip")="" then
  161.     rsdown("vip")=0
  162.     else
  163.     rsdown("vip")=1
  164.     end if
  165.     rsdown("vipjf")=vipjf
  166.     
  167.     rsdown.update
  168.     rsdown.close
  169.     response.Write("<script>alert(""添加成功!"");location.href=""down_list.asp"";</script>")
  170. end if
  171. %>
  172. <%
  173. if request("action")="editdown" then
  174. kuid=request("ku_id")
  175. name=strLeach(trim(Request.form("name")))
  176. pic=strLeach(trim(Request.form("pic")))
  177. zuozhe=strLeach(trim(Request.form("zuozhe")))
  178. jifen=strLeach(trim(Request.form("jifen")))
  179. http=strLeach(trim(Request.form("http")))
  180. url=strLeach(trim(Request.form("url")))
  181. content=server.HTMLEncode(Request.form("content"))
  182. big=strLeach(trim(Request.form("big")))
  183. yanshi=strLeach(trim(Request.form("http")))
  184. classs=request("class")
  185. jifen=request("jifen")
  186. vipjf=request("vipjf")
  187. star=request("star")
  188.     If name="" Then
  189.     Response.Write "<script>alert(""软件名称不能为空!"");location.href=""javascript:history.back()"";</script>"
  190.     Response.end()
  191.     end if
  192.     if IsNumeric(jifen)=false then
  193.     Response.Write "<script>alert(""积分只能为数字!"");location.href=""javascript:history.back()"";</script>"
  194.     end if
  195.     if IsNumeric(vipjf)=false then
  196.     Response.Write "<script>alert(""积分只能为数字!"");location.href=""javascript:history.back()"";</script>"
  197.     end if
  198.         
  199.     If url="" Then
  200.     Response.Write "<script>alert(""下载地址不能为空!"");location.href=""javascript:history.back()"";</script>"
  201.     Response.end()
  202.     end if
  203.     
  204.     
  205.     If content="" Then
  206.     Response.Write "<script>alert(""软件介绍不能为空!"");location.href=""javascript:history.back()"";</script>"
  207.     Response.end()
  208.     end if
  209.     
  210.     set rsdownedit=server.createobject("adodb.recordset")
  211.     sqldownedit="select * from ku_down where id="&kuid
  212.     rsdownedit.open sqldownedit,conn,1,3
  213.     
  214.     rsdownedit("name")=name
  215.     rsdownedit("class")=classs
  216.     rsdownedit("jifen")=jifen
  217.     rsdownedit("big")=big
  218.     rsdownedit("addtime")=now()
  219.     rsdownedit("writer")=zuozhe
  220.     rsdownedit("pic")=pic
  221.     rsdownedit("url")=url
  222.     rsdownedit("content")=content
  223.     rsdownedit("star")=star
  224.     rsdownedit("yanshi")=yanshi
  225.     rsdownedit("shenhe")=1
  226.     if request("tuijian")<>"" then
  227.     rsdownedit("tuijian")=request("tuijian")
  228.     end if
  229.     if pic<>"" then
  230.         rsdownedit("yespic")=1    
  231.     end if
  232.     if request("vip")="" then
  233.     rsdownedit("vip")=0
  234.     else
  235.     rsdownedit("vip")=1
  236.     end if
  237.     rsdownedit("vipjf")=vipjf    
  238.     rsdownedit.update
  239.     rsdownedit.close
  240.         set conn=nothing 
  241.     response.Write("<script>alert(""修改成功!"");location.href=""down_list.asp"";</script>")
  242. end if
  243. %>