BiaoQing_CaoZuo.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.BiaoQing()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private Sub b()
- Call OpenData()
- Dim Cn1,Cn2,SQL
- SQL="Select * From BiaoQing Order By Id Desc"
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText=SQL
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Call xkon_Error("表情管理")
- Else
- Dim MingChen,Url,KuaiJie
- MingChen=Cn2("MingChen")
- Url=Cn2("Url")
- KuaiJie=Cn2("KuaiJie")
- End If
- Set Cn1=Nothing
- Set Cn2=Nothing
- Call CloseData()
- c.Write("<form method=""post"" action=""BiaoQing_CaoZuo.Asp?l=b2"">")
- c.Writeln("名称:<input type=""text"" name=""MingChen"" value="""&MingChen&""" />")
- c.Writeln("地址:<input type=""text"" name=""Url"" value="""&Url&""" />")
- c.Writeln("快捷字符:<input type=""text"" name=""KuaiJie"" value="""&KuaiJie&""" />")
- c.Write("<input type=""submit"" value=""编辑"" /></form>")
- End Sub
- Private Sub b2()
- Dim MingChen,Url,KuaiJie
- MingChen=s.Form_Str("MingChen",1,250)
- Url=s.Form_Str("Url",1,250)
- KuaiJie=s.Form_Str("KuaiJie",1,250)
- If MingChen="" Or Url="" Then
- Call xkon_Error("名称和图片URL不能为空")
- Else
- Dim SQL
- SQL="Update BiaoQing Set MingChen='"&MingChen&"',Url='"&Url&"',KuaiJie='"&KuaiJie&"' Where ID="&ID
- Call OpenData()
- Conn.Execute(SQL)
- Call JiLu("编辑表情"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
- Response.End()
- End If
- End Sub
- Private Sub Delete()
- Call OpenData()
- Conn.Execute("Delete From BiaoQing Where ID="&Clng(ID))
- Call JiLu("删除表情"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
- Response.End()
- End Sub
- Private Sub j()
- c.Write("<form method=""post"" action=""BiaoQing_CaoZuo.Asp?l=j2"">")
- c.Writeln("表情名称:<input type=""text"" name=""MingChen"" />")
- c.Writeln("地址:<input type=""text"" name=""Url"" />")
- c.Writeln("快捷字符:<input type=""text"" name=""KuaiJie"" />")
- c.Write("<input type=""submit"" value=""增加"" /></form>")
- End Sub
- Private Sub j2()
- Dim J_ID,MingChen,Url,KuaiJie
- MingChen=s.Form_Str("MingChen",1,250)
- Url=s.Form_Str("Url",1,250)
- KuaiJie=s.Form_Str("KuaiJie",1,250)
- If MingChen="" Or Url="" Or KuaiJie="" Then
- Call xkon_Error("所有填写项不能为空")
- Else
- Dim Cn1,Cn2,SQL
- SQL="Select id From BiaoQing Order By Id Desc"
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText=SQL
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- J_ID=1
- Else
- J_ID=Cn2("ID")+1
- End If
- Set Cn1=Nothing
- Set Cn2=Nothing
- SQL="Insert Into BiaoQing(ID,MingChen,Url,KuaiJie)Values('"&J_ID&"','"&MingChen&"','"&Url&"','"&KuaiJie&"')"
- Conn.Execute(SQL)
- Call JiLu("增加表情"&ID)
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""BiaoQing.Asp"";</script>")
- Response.End()
- End If
- End Sub
- Call H_Title("表情管理")
- Dim l,ID
- l=s.QueryString("l")
- ID=s.QueryString_Long("ID")
- Select Case l
- Case "b"
- Call b()
- Case "b2"
- Call b2()
- Case "s"
- Call Delete()
- Case "j"
- Call j()
- Case "j2"
- Call j2()
- End Select
- c.Write("<a href=""BiaoQing.Asp"">返回表情管理</a>")
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>