SZ_Help_CaoZuo.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.Admin_Help()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private Lei,l,ID
- ID=s.QueryString_Long("ID")
- l=s.QueryString("l")
- Lei=s.QueryString("Lei")
- Private Sub j()
- c.Writeln("<form method=""post"" action=""SZ_Help_CaoZuo.Asp?Lei="&Lei&"&l=j2"">标题:<input name=""Title"" />")
- c.Writeln("内容:<textarea cols=""50"" rows=""10"" name=""neirong""></textarea>")
- c.Write("<input type=""submit"" value=""增加"" /></form>")
- End Sub
- Private Sub j2()
- Dim J_ID,Title,NeiRong,Cn1,Cn2
- Title=s.Form_Str("Title",1,250)
- NeiRong=s.Form_Str("NeiRong",1,100000)
- If Title="" Or NeiRong="" Then
- Call xkon_Error("所有填写项不能为空")
- Else
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select id From Help Order By ID DESC"
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- J_ID=1
- Else
- J_ID=Cn2("ID")+1
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Conn.Execute("Insert Into Help(ID,Lei,TiTle,NeiRong)Values('"&J_ID&"','"&Lei&"','"&Title&"','"&NeiRong&"')")
- Call JiLu("增加帮助"&J_ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
- Response.End()
- End If
- End Sub
- Private Sub b()
- Call OpenData()
- Dim Cn1,Cn2
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select * From Help Where ID="&Clng(ID)
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Call xkon_Error("该内容不存在")
- Response.End()
- Else
- c.Writeln("<form method=""post"" action=""SZ_Help_CaoZuo.Asp?l=b2&Lei="&Lei&"&id="&id&""">标题:<input name=""Title"" value="""&Cn2("Title")&""" />")
- c.Writeln("内容:<textarea cols=""50"" rows=""10"" name=""neirong"">"&Cn2("NeiRong")&"</textarea>")
- c.Write("<input type=""submit"" value=""修改"" /></form>")
- End If
- Set Cn1=Nothing
- Set Cn2=Nothing
- Call CloseData()
- End Sub
- Private Sub b2()
- Dim Title,Neirong
- Title=s.Form_Str("Title",1,250)
- NeiRong=s.Form_Str("NeiRong",1,100000)
- If Title="" Or NeiRong="" Then
- Call xkon_Error("所有填写项不能为空")
- Else
- Call OpenData()
- Conn.Execute("Update Help Set Title='"&Title&"',Neirong='"&NeiRong&"' Where ID="&Clng(ID))
- Call JiLu("编辑帮助"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
- Response.End()
- End If
- End Sub
- Private Sub Delete()
- Call OpenData()
- Conn.Execute("Delete From Help Where ID="&Clng(ID))
- Call JiLu("删除帮助"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""SZ_Help.Asp?Lei="&Lei&""";</script>")
- Response.End()
- End Sub
- Call H_Title("操作")
- Select Case l
- Case "j"
- Call j()
- Case "j2"
- Call j2()
- Case "b"
- Call b()
- Case "b2"
- Call b2()
- Case "s"
- Call Delete()
- End Select
- c.Write("<a href=""SZ_Help.Asp?Lei="&Lei&""">返回列表</a>")
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>