www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/admin_xuansave.asp

    <!--#include file="conn.asp"-->
<!--#include file="function.asp"-->
<!--#include file="checkadmin.inc"-->
<%
founderr=false
username=request.form("username")
picurl=request.form("picurl")
xuanqq=request.form("xuanqq")
if username="" or picurl="" then
	response.write "<script language=javascript>window.alert('站内成员名称和相片都不能为空!');history.back(1);</script>"
	Response.End 
end if
set rs=server.CreateObject("ADODB.RecordSet")
if request("act")="edit" and request.QueryString("id")<>"" then
	id=request("id")
	sql="select * from DJxuan where id="& request.QueryString("id")
	rs.open sql,conn,3,2
	if not rs.eof then
		rs("Username")=username
		rs("Picurl")=Picurl
		rs("xuanqq")=xuanqq
        rs.update
	end if
	rs.close
elseif request("act")="add" then
	sql="select * from DJxuan where username='"&username&"'"
	rs.open sql,conn,3,2
	if (rs.eof and rs.bof) then
		rs.addnew
		rs("Username")=UserName
		rs("Picurl")=Picurl
                rs("xuanqq")=xuanqq
		rs.update
	end if
	rs.close
end if
set rs=nothing
conn.close
set conn=nothing
response.redirect "admin_xuanMana.asp"
%>