<% If Session("User_Account")="" Then Call AlertUrl("请先登陆!","Index.asp") Response.End End if %> <% Dim act act=Request("act") if act="addGroup" Then set rst=conn.execute("Select * from Group_Info where Session_Id='"&Session("User_Account")&"' and Group_Title='"&Request.Form("gname")&"'") if Not rst.eof then set rst=nothing Call AlertUrl("该分类已存在!","FavGroup.asp") Response.End End if set rst=nothing set rs=Server.CreateObject("ADODB.recordset") sql="select * from Group_Info" rs.open sql,conn,1,3 rs.addnew rs("Group_Title")=Trim(Request.Form("gname")) rs("Session_Id")=Session("User_Account") rs.update rs.close set rs=nothing conn.close set conn=nothing Call AlertUrl("添加成功!","FavGroup.asp") Response.End End if if act="editGroup" Then set rs=Server.CreateObject("ADODB.recordset") sql="select * from Group_Info where Session_Id='"&Session("User_Account")&"' and Group_Title='"&Request.Form("gname_old")&"'" rs.open sql,conn,1,3 rs("Group_Title")=Request.Form("gname") rs.update rs.close set rs=nothing conn.close set conn=nothing Call AlertUrl("修改成功!","FavGroup.asp") Response.End End if if act="delGroupOnly" Then set rs=Server.CreateObject("adodb.recordset") rs.open "select * from Group_Info where Session_Id='"&Session("User_Account")&"' and Group_Title='"&Request("group_name")&"'",conn,1,3 rs.delete rs.close Call AlertUrl("删除成功!","FavGroup.asp") Response.End End if %> 用户管理中心 - 网址收藏夹