Deal_bbs.asp
资源名称:pinke2010.rar [点击查看]
上传用户:pengwei803
上传日期:2021-02-10
资源大小:3311k
文件大小:1k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <!--#include file="../Ku_inc/Ku_sql.asp"-->
- <!--#include file="../Ku_inc/Ku_config.asp"-->
- <!--#include file="Ku_conn.asp"-->
- <!--#include file="../Ku_inc/inc.asp"-->
- <!-- #include file="Session.asp"-->
- <%
- if request("action")="add" then
- name=Checkin(trim(Request.form("mingcheng")))
- If name="" Then
- Response.Write "<script>alert(""分类名称不能为空!"");location.href=""javascript:history.back()"";</script>"
- Response.end()
- end if
- set rs=server.createobject("adodb.recordset")
- sql="select * from ku_bbskind where name='"&name&"'"
- rs.open sql,conn,1,3
- if (rs.eof and rs.bof) then
- rs.addnew
- rs("name")=name
- rs.update
- rs.close
- response.Write("<script>alert(""添加成功!"");location.href=""bbs_kind.asp"";</script>")
- else
- response.Write("<script>alert(""分类已存在!"");location.href=""bbs_kind.asp"";</script>")
- end if
- end if
- %>
- <%
- if request("action")="edit" then
- name=Checkin(trim(Request.form("mingcheng")))
- id=request("id")
- If name="" Then
- Response.Write "<script>alert(""分类名称不能为空!"");location.href=""javascript:history.back()"";</script>"
- Response.end()
- end if
- set rs=server.createobject("adodb.recordset")
- sql="select * from ku_bbskind where id="&id
- rs.open sql,conn,1,3
- rs("name")=name
- rs.update
- rs.close
- response.Write("<script>alert(""修改成功!"");location.href=""BBs_kind.asp"";</script>")
- end if
- %>
English
