<%qx="12"%>
<!--#include file="../login/0.asp"-->
<!--#include file="../../mycartconn/conn.asp"-->
<!--#include file="../../mycartconn/my.asp"-->
<!--#include file="../../mycartconn/je.asp"-->
<!--#include file="../../mycartconn/page.asp"-->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="../../mycartconn/admin.css" rel="stylesheet" type="text/css">
<%
Dim abc,huiyuan,huiyuan_new
abc=request("abc")
huiyuan=request("huiyuan")
huiyuan_new=request("huiyuan_new")
If abc="change" Then
	If huiyuan="" Then
		response.write "<script>alert(""请属于原帐号"");history.go(-1);</script>"
		response.end
	End if
	If huiyuan_new="" Then
		response.write "<script>alert(""请属于新帐号"");history.go(-1);</script>"
		response.end
	End if
	sql="select huiyuan from huiyuan where huiyuan='"&huiyuan&"'"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,1
	If Not (rs.bof And rs.eof) Then
	Else
		response.write "<script>alert(""原始帐号不存在！"");history.go(-1);</script>"
		response.end
	End if
	If huiyuan=huiyuan_new Then
		response.write "<script>alert(""原帐号与新帐号相同，无需执行变更！"");history.go(-1);</script>"
		response.end
	End if

	'huiyuan
	tab1=array("bbs","bbs_info","bbs_vip","blog","blog_lb","blog_user","BrightList","cart","classad","contact_list","contact_ml","djcount","fangchan","gq","gqxx","GuangBo","huiyuan","huiyuan_url","HuoDong_BM","Huodong_ping","jing","love","M_list","MyDay","Mylist","online_h","paimai","photo","photo_fav","photo_xc","pinglun","PlayListType","qiuzhi","qy_lm","Reply","shoucang","Story_photo","Story_ping","url_list","url_ml","user_name","video","video_fav","video_ml","Wenda","wenda_fav","xiaofei")

	'huiyuan,huiyuan2
	tab2=array("blog_liuyan","blog_ping","friendrequest","MyGift","MyGoods","photo_ping","Story")

	'huiyuan_1,huiyuan_2
	tab3="je"

	'name1,name2
	tab4="duanxin"

	'name
	tab5=array("online","ping","sh","shangchuan")

	'user_name
	tab6="sh_sj"

	For i=0 To UBound(tab1)
		conn.execute("update "&tab1(i)&" set huiyuan='"&huiyuan_new&"' where huiyuan='"&huiyuan&"'")
	next

	For i=0 To UBound(tab2)
		conn.execute("update "&tab2(i)&" set huiyuan='"&huiyuan_new&"' where huiyuan='"&huiyuan&"'")
		conn.execute("update "&tab2(i)&" set huiyuan2='"&huiyuan_new&"' where huiyuan2='"&huiyuan&"'")
	Next
	
	conn.execute("update "&tab3&" set huiyuan_1='"&huiyuan_new&"' where huiyuan_1='"&huiyuan&"'")
	conn.execute("update "&tab3&" set huiyuan_2='"&huiyuan_new&"' where huiyuan_2='"&huiyuan&"'")

	
	conn.execute("update "&tab4&" set name1='"&huiyuan_new&"' where name1='"&huiyuan&"'")
	conn.execute("update "&tab4&" set name2='"&huiyuan_new&"' where name2='"&huiyuan&"'")

	For i=0 To UBound(tab5)
		conn.execute("update "&tab5(i)&" set name='"&huiyuan_new&"' where name='"&huiyuan&"'")
	Next

	conn.execute("update "&tab6&" set user_name='"&huiyuan_new&"' where user_name='"&huiyuan&"'")

	response.write "<script>alert(""帐号"&huiyuan&"已变更为"&huiyuan_new&"！"");self.location.href='huiyuan_change.asp';</script>"
	response.end
End if
%>
<br><BR><BR><BR>
<table width="350" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#638400">
  <form name="form" method="post" action="?abc=change">
    <tr valign="middle" bgcolor="#99cc00"> 
      <td height="30" colspan="2">&nbsp;<font color="#FFFFFF">&nbsp;-&gt; 会员帐号变更 (小心使用此功能，对数据库变动比较大)</font></td>
    </tr>
    <tr valign="middle" bgcolor="#FFFFFF"> 
      <td width="100" height="30" align="center">会员原账号</td>
      <td height="30">&nbsp; 
        <input name="huiyuan" type="text" class="wenbenkuang" id="huiyuan" size="20" maxlength="16"></td>
    </tr>
    <tr valign="middle" bgcolor="#FFFFFF"> 
      <td width="100" height="30" align="center">会员新账号</td>
      <td height="30">&nbsp; 
        <input name="huiyuan_new" type="text" class="wenbenkuang" id="huiyuan_new" size="20" maxlength="16"></td>
    </tr>
    <tr valign="middle" bgcolor="#FFFFFF"> 
      <td height="30" colspan="2" align="center">
		<input name="Submit3" type="button" class="go-wenbenkuang" value="OK，确认变更" onclick="javascript:if (confirm('您确定要变更该会员的帐号吗？此操作将更新数据库中所有关于改会员的信息！')) this.form.submit();"> 
        <input name="Submit4" type="reset" class="go-wenbenkuang" value="重新填写"></td>
    </tr>
  </form>
</table>
<%
conn.close
set conn=nothing
%>