<%
if UserLogined<>True then
response.write"<SCRIPT language=JavaScript>alert(' 请登陆后操作，谢谢您的支持 ！');"
response.write"JavaScript:window.close()</SCRIPT>"
response.end
end if
dim action:action=Request.QueryString("action")
if action="edit" then start="兜客中心 >> 修改资料"
if action="list" then start="兜客中心 >> 兜客列表"
if action="ulist" then start="兜客中心 >> 查看兜客资料"
if action="friend" then start="兜客中心 >> 我的好友"
if action="collect" then start="兜客中心 >> 音乐收藏"
if action="vip" then start="兜客中心 >> 申请VIP兜客"
if action="myjifen" then start="兜客中心 >> 我的积分"
if action="" then start="兜客中心"
'=================================================
'过程名：content_main
'作  用：显示会员中心内容、表单
'参  数：无
'=================================================
sub content_main()
select case action
case ""
    call hyzx()
case "edit"
    call edit()
case "list"
    call list()
case "ulist"
    call ulist()
case "friend"
    call friend()
case "addfriend"
    call addfriend()
case "delfriend"
    call delfriend()
case "collect"
    call collect()
case "delcollect"
    call delcollect()
case "vip"
    call vip()
case "vipadd"
    call vipadd()
case else
conn.close
set conn=nothing
    response.write "<SCRIPT language=JavaScript>alert('操作错误或服务器出错，请与程序作者联系！');"
    response.write"history.back(1);</SCRIPT>"
    Response.End 
end select
end sub

'=================================================
'过程名：无
'作  用：会员资料修改
'参  数：无
'=================================================
if request.QueryString("hx66")="Modifyinfo" then
if request.form("userpost")<>"ok" then
    Response.Redirect "show_error.asp?eid=传值参数非法!"
    Response.End
end if
if not post_chk() then
    Response.Write("<script language=javascript>alert('你提交的路径有误，禁止从站点外部提交数据请不要乱改参数！');this.location.href='http://www.eove.cn/index.asp';</script>") 
    response.end   
end if
	Password=trim(request.Form("pswpassword"))
	psw=trim(request.Form("psw1"))
	psw2=trim(request.Form("psw2"))
        sex=CheckStr(request.Form("sex"))
	Answer=CheckStr(request.form("Answer"))
        Question=CheckStr(request.form("Question"))
        Homepage=CheckStr(request.form("Homepage"))
        Email=CheckStr(request.Form("Email"))
        QQ=trim(request.Form("QQ"))
        UserPhoto=CheckStr(request.form("UserPhoto"))
        mypic=CheckStr(request.form("mypic"))
        UserSign=CheckStr(request.form("UserSign"))
        hidden=cint(request.form("hidden"))
        whe=CheckStr(request.form("whe"))
        birthday=trim(request.form("b_year"))&"-"&trim(request.form("b_month"))&"-"&trim(request.form("b_day"))
        phone=CheckStr(request.form("phone"))
        address=CheckStr(request.form("address"))
if password="" then
    response.write"<SCRIPT language=JavaScript>alert(' 请输入登陆验证密码。');"
    response.write"javascript:history.go(-1)</SCRIPT>"
    response.end
else
    if not checkname(Password) then
        response.write"<SCRIPT language=JavaScript>alert(' 输入登陆密码中含有非法字符。');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end
    end if
    set rs=server.createobject("adodb.recordset")
    sql="select top 1 password from [User] where userid="&clng(Hx66_uid)&" and Password='"&md5(password)&"'"
    rs.open sql,conn,1,1
    if rs.eof then
      response.write"<SCRIPT language=JavaScript>alert(' 您输入的登陆密码在验证时失败！');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
    end if
    rs.close
end if
if psw<>"" and (strLength(psw)<6 or strLength(psw)>12) then
      response.write"<SCRIPT language=JavaScript>alert(' 输入新密码不能小于6或大于12。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
else
      if not checkname(Password) then
      response.write"<SCRIPT language=JavaScript>alert(' 输入新密码中含有非法字符。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
      end if
end if
if Email="" then
      response.write"<SCRIPT language=JavaScript>alert(' Email不能为空。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
else
      if IsValidEmail(Email)=false then
      response.write"<SCRIPT language=JavaScript>alert(' 您的Email有错误。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
      end if
end if
if QQ<>"" then
      if not isnumeric(QQ) or len(cstr(QQ))>12 then
      response.write"<SCRIPT language=JavaScript>alert(' QQ号码只能是4-11位数字，您可以选择不输入。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
      end if
end if
if Question="" then
      response.write"<SCRIPT language=JavaScript>alert(' 输入提示问题不能为空。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
else
      if strLength(Question)>15 then
          response.write"<SCRIPT language=JavaScript>alert(' 输入提示问题不能大于15字符。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
end if
if answer="" then
      response.write"<SCRIPT language=JavaScript>alert(' 输入提示答案不能为空。');"
      response.write"javascript:history.go(-1)</SCRIPT>"
      response.end
else
      if strLength(answer)>50 then
          response.write"<SCRIPT language=JavaScript>alert(' 输入提示答案不能大于50字符。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
end if
if Homepage<>"" then
      if strLength(Homepage)>100 then
          response.write"<SCRIPT language=JavaScript>alert(' 输入主页地址不能大于100字符。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
end if
if UserPhoto<>"" then
      if strLength(UserPhoto)>100 then
          response.write"<SCRIPT language=JavaScript>alert(' 输入头像不能大于100字符。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
end if
if UserSign<>"" then
      if strLength(UserSign)>200 then
          response.write"<SCRIPT language=JavaScript>alert(' 输入签名不能大于200字符。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
end if
      if not(isdate(birthday)) then
          response.write"<SCRIPT language=JavaScript>alert(' 您选择的不是一个有效的日期格式。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if

if mypic<>"" and strLength(mypic)<=30 then
      myPhoto=mypic
else
      myPhoto=UserPhoto
end if

       	if psw<>"" then
		password=md5(psw)
	else
		password=md5(password)
	end if
	if request("answer")=request("oldanswer") then
		answer=request("answer")
	else
		answer=md5(request("answer"))
	end if
	if psw2<>psw then
		response.write"<SCRIPT language=JavaScript>alert(' 两次输入的新密码不一致， 请返回 ！ ');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end
		end if
		sql="select * from [User] where userid="&clng(Hx66_uid)
  		set rs=server.createobject("adodb.recordset")
  		    rs.open sql,conn,1,3
		    rs("Password")=Password
		    rs("Question")=Question
		    rs("Answer")=Answer
		    rs("Email")=Email
		    rs("sex")=sex
		    rs("Homepage")=Homepage
		    rs("QQ")=QQ
		    rs("UserPhoto")=myPhoto
		    rs("UserSign")=UserSign
		    rs("hidden")=hidden
		    rs("whe")=whe
		    rs("birthday")=birthday
		    rs("phone")=phone
		    rs("address")=address
		    rs.update
		    rs.close
		    set rs=nothing
                    Response.Cookies("HX_USER")("User_Pwd")=Password
                    response.Write"<script language=javascript>alert(' 资料修改成功！');this.location.href='user_main.asp';</script>"
end if
sub hyzx()%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="95%" align="Center" style="border-collapse: collapse">
<%
dim news,snews,art,sart,dj,sdj,down,sdown,pic,spic,cs,scs
news=conn.execute("select count(*) from news where tjuser='"&Hx66_name&"'")(0)
snews=conn.execute("select count(*) from news where passed=1 and tjuser='"&Hx66_name&"'")(0)
art=conn.execute("select count(*) from art where tjuser='"&Hx66_name&"'")(0)
sart=conn.execute("select count(*) from art where passed=1 and tjuser='"&Hx66_name&"'")(0)
dj=conn.execute("select count(*) from dj where tjuser='"&Hx66_name&"'")(0)
sdj=conn.execute("select count(*) from dj where passed=1 and tjuser='"&Hx66_name&"'")(0)
down=conn.execute("select count(*) from soft where tjuser='"&Hx66_name&"'")(0)
sdown=conn.execute("select count(*) from soft where passed=1 and tjuser='"&Hx66_name&"'")(0)
pic=conn.execute("select count(*) from pic where tjuser='"&Hx66_name&"'")(0)
spic=conn.execute("select count(*) from pic where passed=1 and tjuser='"&Hx66_name&"'")(0)
cs=conn.execute("select count(*) from coolsites where tjuser='"&Hx66_name&"'")(0)
scs=conn.execute("select count(*) from coolsites where passed=1 and tjuser='"&Hx66_name&"'")(0)
%>
<tr> 
<td colspan=3 align="Center">欢迎您来到<a href="<%=weburl%>" target=_blank><%=webname%></a>兜客中心，本系统为[<a href="http://www.17vd.com" target=_blank>17vd网兜</a>]2.0美化精装版</td>
</tr>
<tr>
<td width='15%'><img src='img/user_main.gif' border=0>&nbsp;用户名称：</td>
<td width='50%'><b><%=Hx66_Name%></b></td>
<td width='35%' rowspan=5 align=center><%if Hx66_Photo<>"" then%><img src='<%=Hx66_Photo%>' border=0 onload="initimg(this,150,150)" onclick="window.open(this.src,null,'')"><%else%><img src='img/face/36.gif' border=0 width=90 height=90><%end if%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户类型：</td>
<td><%if Hx66_Grade=0 then%>
  普通兜客
<%end if%><%if Hx66_Grade=1 then%><font color=red>VIP兜客</font> 有效期还有 <%=Hx66_vipend-date()%> 天<%end if%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户性别：</td>
<td><%
  if Hx66_Sex="男" then
    response.write "<img border=0 src='img/boy.gif' align=absmiddle>&nbsp;&nbsp;帅哥"
  else
    response.write "<img border=0 src='img/girl.gif' align=absmiddle>&nbsp;&nbsp;美女"
  end if
%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;注册时间：</td>
<td><%=Hx66_RegDate%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;登录次数：</td>
<td><%=Hx66_LoginTimes%>&nbsp;次</td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;您的积分：</td>
<td><%=Hx66_points&moneyname%></td>
<td align=center>您已登陆 <font color=red><% response.write DateDiff("n",Hx66_LastLoginTime,now()) %></font> 分钟</td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;个性签名：</td>
<td colspan=2 align=center><table border=0 width='100%'>
<%if Hx66_Sign<>"" then%>
<tr><td><%=autourl(formatStr(Hx66_Sign))%></td></tr>
<%else%>
<tr><td>暂无</td></tr>
<%end if%>
</table></td>
</tr>
<tr>
<td>≡以下资料≡</td>
<td colspan=2><%if Hx66_hidden=1 then%>好友可见<%else%>公开<%end if%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户 &nbsp;QQ：</td>
<td colspan=2><font color=gray><%=Hx66_QQ%></font></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;E-mail：</td>
<td colspan=2><a href='mailto:<%=Hx66_Email%>'><%=Hx66_Email%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;个人主页：</td>
<td colspan=2><a href='<%=Hx66_Homepage%>'><font color=gray><%=Hx66_Homepage%></font></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;来自哪里：</td>
<td colspan=2><%=Hx66_whe%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;出生年月：</td>
<td colspan=2><%=Hx66_birthday%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系电话：</td>
<td colspan=2><%=Hx66_phone%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系地址：</td>
<td colspan=2><%=FormatStr(Hx66_address)%></a></td>
</tr>          
  <tr> 
     <td colspan=3>&nbsp;&nbsp;<img border=0 src='img/h_review.gif' align=absmiddle>&nbsp;您在本站发布的信息：</td>
  </tr>
  <tr> 
     <td colspan=3>√成功发布新闻：<%=news%> 篇，其中：已通过新闻 <%=news-snews%> 篇，待审新闻：<font color="#FF0000"><%=snews%></font> 篇。<a href=user_corpuslist.asp?act=news><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr> 
     <td colspan=3>√成功添加文章：<%=art%> 篇，其中：已通过文章 <%=art-sart%> 篇，待审文章：<font color="#FF0000"><%=sart%></font> 篇。<a href=user_corpuslist.asp?act=art><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr>
     <td colspan=3>√成功添加音乐：<%=dj%> 首，其中：已通过音乐 <%=dj-sdj%> 首，待审歌曲：<font color="#FF0000"><%=sdj%></font> 首。<a href=user_corpuslist.asp?act=dj><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr>
     <td colspan=3>√成功添加图片：<%=pic%> 张，其中：已通过图片 <%=pic-spic%> 张，待审图片：<font color="#FF0000"><%=spic%></font> 张。<a href=user_corpuslist.asp?act=pic><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr>
     <td colspan=3>√成功添加资源：<%=down%> 个，其中：已通过资源 <%=down-sdown%> 个，待审资源：<font color="#FF0000"><%=sdown%></font> 个。<a href=user_corpuslist.asp?act=down><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr>
     <td height=30 colspan=3>√成功添加酷站：<%=cs%> 个，其中：已通过酷站 <%=cs-scs%> 个，待审酷站：<font color="#FF0000"><%=scs%></font> 个。<a href=user_corpuslist.asp?act=web><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
  </tr>
  <tr> 
     <td colspan=3>√<font color="#FF0000">衷心感谢您对<a href="http://www.17vd.com" target=_blank>『<%=webname%>』</a>的支持！</font></td>
  </tr>
</table>
<%
end sub
sub edit()%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
   <form name="form2" method="post" action="?hx66=Modifyinfo">
          <tr align="center">
            <td colspan="3"><strong>修改用户资料</strong></td>
          </tr>
          <tr>
            <td width="95" align="right">用 户 名：</td>
            <td><%=Hx66_name%></td>
            <td rowspan="5" align="center"><%if Hx66_Photo<>"" then%><img src='<%=Hx66_Photo%>' border=0 onload="initimg(this,150,150)" onclick="window.open(this.src,null,'')" id=idface><%else%><img src='img/face/36.gif' border=0 width=90 height=90 id=idface><%end if%></td>
          </tr>
          <tr>
            <td align="right">登陆密码：</td>
            <td><input type="password" name="pswpassword" size=22 value="" maxlength=13 class="input"> &nbsp;*</td>
          </tr>
          <tr>
            <td align="right">新的密码：</td>
            <td><input type="password" name="psw1" value="" size=22 maxlength=13 class="input">&nbsp;不修改密码请留空</td>
          </tr>
          <tr>
            <td align="right">确认密码：</td>
            <td><input type="password" name="psw2" value="" size=22 maxlength=13 class="input">&nbsp;不修改密码请留空</td>
          </tr>
          <tr>
            <td align="right">提示问题：</td>
            <td><input name="Question" type="text" size=21 class="input" maxlength=15 id="Question2" value="<%=Hx66_Question%>"></td>
          </tr>
          <tr>
            <td align="right">提示答案：</td>
            <td colspan=2>
          <input type=password name="answer" size=22 value="<%=Hx66_answer%>" maxlength=15 class="input">
          <input type=hidden name="oldanswer" value="<%=Hx66_answer%>">
            <span class="style1">答案采用了MD5加密，如要修改可直接填写。</span></td>
          </tr>
          <tr>
            <td align="right">性&nbsp;&nbsp;&nbsp;&nbsp;别：</td>
            <td colspan=2>
            <input type="radio" name="sex" value="男" <%if Hx66_sex="男" then response.Write"checked" end if%>>
      男
      <input name="sex" type="radio" value="女" <%if Hx66_sex="女" then response.Write"checked" end if%>>
      女</td>
          </tr>
          <tr> 
            <td align="right">选择头像：</td>
            <td colspan=2><select name="UserPhoto" size="1" id="select5" onChange="document.all.idface.src=options[selectedIndex].value;">
<option value="img/face/01.gif" <%if Hx66_Photo="img/face/01.gif" then response.Write"selected" end if%>>女生头像—1</option>
<option value="img/face/02.gif" <%if Hx66_Photo="img/face/02.gif" then response.Write"selected" end if%>>女生头像—2</option>
<option value="img/face/03.gif" <%if Hx66_Photo="img/face/03.gif" then response.Write"selected" end if%>>女生头像—3</option>
<option value="img/face/04.gif" <%if Hx66_Photo="img/face/04.gif" then response.Write"selected" end if%>>女生头像—4</option>
<option value="img/face/05.gif" <%if Hx66_Photo="img/face/05.gif" then response.Write"selected" end if%>>女生头像—5</option>
<option value="img/face/06.gif" <%if Hx66_Photo="img/face/06.gif" then response.Write"selected" end if%>>女生头像—6</option>
<option value="img/face/07.gif" <%if Hx66_Photo="img/face/07.gif" then response.Write"selected" end if%>>女生头像—7</option>
<option value="img/face/08.gif" <%if Hx66_Photo="img/face/08.gif" then response.Write"selected" end if%>>女生头像—8</option>
<option value="img/face/09.gif" <%if Hx66_Photo="img/face/09.gif" then response.Write"selected" end if%>>女生头像—9</option>
<option value="img/face/10.gif" <%if Hx66_Photo="img/face/10.gif" then response.Write"selected" end if%>>女生头像—10</option>
<option value="img/face/11.gif" <%if Hx66_Photo="img/face/11.gif" then response.Write"selected" end if%>>女生头像—11</option>
<option value="img/face/12.gif" <%if Hx66_Photo="img/face/12.gif" then response.Write"selected" end if%>>女生头像—12</option>
<option value="img/face/13.gif" <%if Hx66_Photo="img/face/13.gif" then response.Write"selected" end if%>>女生头像—13</option>
<option value="img/face/14.gif" <%if Hx66_Photo="img/face/14.gif" then response.Write"selected" end if%>>女生头像—14</option>
<option value="img/face/15.gif" <%if Hx66_Photo="img/face/15.gif" then response.Write"selected" end if%>>女生头像—15</option>
<option value="img/face/16.gif" <%if Hx66_Photo="img/face/16.gif" then response.Write"selected" end if%>>女生头像—16</option>
<option value="img/face/17.gif" <%if Hx66_Photo="img/face/17.gif" then response.Write"selected" end if%>>女生头像—17</option>
<option value="img/face/18.gif" <%if Hx66_Photo="img/face/18.gif" then response.Write"selected" end if%>>女生头像—18</option>
<option value="img/face/19.gif" <%if Hx66_Photo="img/face/19.gif" then response.Write"selected" end if%>>女生头像—19</option>
<option value="img/face/20.gif" <%if Hx66_Photo="img/face/20.gif" then response.Write"selected" end if%>>女生头像—20</option>
<option value="img/face/21.gif" <%if Hx66_Photo="img/face/21.gif" then response.Write"selected" end if%>>女生头像—21</option>
<option value="img/face/22.gif" <%if Hx66_Photo="img/face/22.gif" then response.Write"selected" end if%>>女生头像—22</option>
<option value="img/face/23.gif" <%if Hx66_Photo="img/face/23.gif" then response.Write"selected" end if%>>女生头像—23</option>
<option value="img/face/24.gif" <%if Hx66_Photo="img/face/24.gif" then response.Write"selected" end if%>>女生头像—24</option>
<option value="img/face/25.gif" <%if Hx66_Photo="img/face/25.gif" then response.Write"selected" end if%>>女生头像—25</option>
<option value="img/face/26.gif" <%if Hx66_Photo="img/face/26.gif" then response.Write"selected" end if%>>女生头像—26</option>
<option value="img/face/27.gif" <%if Hx66_Photo="img/face/27.gif" then response.Write"selected" end if%>>女生头像—27</option>
<option value="img/face/28.gif" <%if Hx66_Photo="img/face/28.gif" then response.Write"selected" end if%>>女生头像—28</option>
<option value="img/face/29.gif" <%if Hx66_Photo="img/face/29.gif" then response.Write"selected" end if%>>女生头像—29</option>
<option value="img/face/30.gif" <%if Hx66_Photo="img/face/30.gif" then response.Write"selected" end if%>>女生头像—30</option>
<option value="img/face/31.gif" <%if Hx66_Photo="img/face/31.gif" then response.Write"selected" end if%>>男生头像—1</option>
<option value="img/face/32.gif" <%if Hx66_Photo="img/face/32.gif" then response.Write"selected" end if%>>男生头像—2</option>
<option value="img/face/33.gif" <%if Hx66_Photo="img/face/33.gif" then response.Write"selected" end if%>>男生头像—3</option>
<option value="img/face/34.gif" <%if Hx66_Photo="img/face/34.gif" then response.Write"selected" end if%>>男生头像—4</option>
<option value="img/face/35.gif" <%if Hx66_Photo="img/face/35.gif" then response.Write"selected" end if%>>男生头像—5</option>
<option value="img/face/36.gif" <%if Hx66_Photo="img/face/36.gif" then response.Write"selected" end if%>>男生头像—6</option>
<option value="img/face/37.gif" <%if Hx66_Photo="img/face/37.gif" then response.Write"selected" end if%>>男生头像—7</option>
<option value="img/face/38.gif" <%if Hx66_Photo="img/face/38.gif" then response.Write"selected" end if%>>男生头像—8</option>
<option value="img/face/39.gif" <%if Hx66_Photo="img/face/39.gif" then response.Write"selected" end if%>>男生头像—9</option>
<option value="img/face/40.gif" <%if Hx66_Photo="img/face/40.gif" then response.Write"selected" end if%>>男生头像—10</option>
<option value="img/face/41.gif" <%if Hx66_Photo="img/face/41.gif" then response.Write"selected" end if%>>男生头像—11</option>
<option value="img/face/42.gif" <%if Hx66_Photo="img/face/42.gif" then response.Write"selected" end if%>>男生头像—12</option>
<option value="img/face/43.gif" <%if Hx66_Photo="img/face/43.gif" then response.Write"selected" end if%>>男生头像—13</option>
<option value="img/face/44.gif" <%if Hx66_Photo="img/face/44.gif" then response.Write"selected" end if%>>男生头像—14</option>
<option value="img/face/45.gif" <%if Hx66_Photo="img/face/45.gif" then response.Write"selected" end if%>>男生头像—15</option>
<option value="img/face/46.gif" <%if Hx66_Photo="img/face/46.gif" then response.Write"selected" end if%>>男生头像—16</option>
<option value="img/face/47.gif" <%if Hx66_Photo="img/face/47.gif" then response.Write"selected" end if%>>男生头像—17</option>
<option value="img/face/48.gif" <%if Hx66_Photo="img/face/48.gif" then response.Write"selected" end if%>>男生头像—18</option>
<option value="img/face/49.gif" <%if Hx66_Photo="img/face/49.gif" then response.Write"selected" end if%>>男生头像—19</option>
<option value="img/face/50.gif" <%if Hx66_Photo="img/face/50.gif" then response.Write"selected" end if%>>男生头像—20</option>
<option value="img/face/51.gif" <%if Hx66_Photo="img/face/51.gif" then response.Write"selected" end if%>>男生头像—21</option>
<option value="img/face/52.gif" <%if Hx66_Photo="img/face/52.gif" then response.Write"selected" end if%>>男生头像—22</option>
<option value="img/face/53.gif" <%if Hx66_Photo="img/face/53.gif" then response.Write"selected" end if%>>男生头像—23</option>
<option value="img/face/54.gif" <%if Hx66_Photo="img/face/54.gif" then response.Write"selected" end if%>>男生头像—24</option>
<option value="img/face/55.gif" <%if Hx66_Photo="img/face/55.gif" then response.Write"selected" end if%>>男生头像—25</option>
<option value="img/face/56.gif" <%if Hx66_Photo="img/face/56.gif" then response.Write"selected" end if%>>男生头像—26</option>
<option value="img/face/57.gif" <%if Hx66_Photo="img/face/57.gif" then response.Write"selected" end if%>>男生头像—27</option>
<option value="img/face/58.gif" <%if Hx66_Photo="img/face/58.gif" then response.Write"selected" end if%>>男生头像—28</option>
<option value="img/face/59.gif" <%if Hx66_Photo="img/face/59.gif" then response.Write"selected" end if%>>男生头像—29</option>
<option value="img/face/60.gif" <%if Hx66_Photo="img/face/60.gif" then response.Write"selected" end if%>>男生头像—30</option></select></td>
          </tr>
          <tr>
            <td align="right">自定头像：</td>
            <td colspan=2><input name="mypic" type="text" class="input" size=22 id="mypic" value="<%=Hx66_Photo%>">&nbsp;用默认头像请留空</td>
          </tr>
          <tr>
            <td align="right">头像上传：</td>
            <td colspan=2><IFRAME name=ad src="user_upload.asp?action=headpic" frameBorder=0 width="100%" scrolling=no height=25></IFRAME></td>
          </tr>
          <tr>
            <td align="right">个人签名：</td>
            <td colspan=2><textarea name="UserSign" cols="40" rows="5" class='input'><%=Hx66_Sign%></textarea>&nbsp;输入签名不能大于200字符。</td>
          </tr>
          <tr>
            <td align="right">≡以下资料≡</td>
            <td colspan=2>
            <input type="radio" name="hidden" value="0" <%if Hx66_hidden="0" then response.Write"checked" end if%>>
      公开
      <input name="hidden" type="radio" value="1" <%if Hx66_hidden="1" then response.Write"checked" end if%>>
      好友可见</td>
          </tr>
          <tr>
            <td align="right">您的&nbsp;&nbsp;QQ：</td>
            <td colspan=2><input name="QQ" type="text" class="input" size=22 id="QQ2" value="<%=Hx66_QQ%>"></td>
          </tr>
          <tr>
            <td align="right">E&nbsp;-&nbsp;mail：</td>
            <td colspan=2><input name="Email" type="text" class="input" size=22 id="Email2" value="<%=Hx66_Email%>"></td>
          </tr>
          <tr>
            <td align="right">个人主页：</td>
            <td colspan=2><input name="Homepage" type="text" class="input" size=22 id="Homepage2" value="<%=Hx66_Homepage%>"></td>
          </tr>
          <tr>
            <td align="right">来自哪里：</td>
            <td colspan=2><input name="whe" type="text" class="input" size=22 id="whe" value="<%=Hx66_whe%>"></td>
          </tr>
          <tr>
            <td align="right">出生年月：</td>
            <td colspan=2>
          <select name=b_year><%
          dim bires,birse
          bires=Hx66_birthday
          if not(isdate(bires)) then
             bires=#1982/6/16#
          end if
          for i=1900 to year(now)
             birse=""
             if int(year(bires))=int(i) then
               birse=" selected"
             end if
             response.write vbcrlf&"<option value='"&i&"'"&birse&">"&i&"</option>"
          next
          response.write vbcrlf&"</select>年 <select name=b_month>"
          for i=1 to 12
             birse=""
             if int(month(bires))=int(i) then
               birse=" selected"
             end if
             response.write vbcrlf&"<option value='"&i&"'"&birse&">"&i&"</option>"
          next
          response.write vbcrlf&"</select>月 <select name=b_day>"
          for i=1 to 31
             birse=""
             if int(day(bires))=int(i) then
               birse=" selected"
             end if
             response.write vbcrlf&"<option value='"&i&"'"&birse&">"&i&"</option>"
          next
          %></select>日<%response.write redx%></td>
          </tr>
          <tr>
            <td align="right">联系电话：</td>
            <td colspan=2><input name="phone" type="text" class="input" size=22 id="phone" value="<%=Hx66_phone%>"></td>
          </tr>
          <tr>
            <td align="right">联系地址：</td>
            <td colspan=2>
            <input name="address" type="text" class="input" size=45 id="address" value="<%=Hx66_address%>"></td>
          </tr>   
          <tr align="center" bgcolor="#FFFFFF"><input type='hidden' name='userpost' value='ok'> 
            <td colspan="3"><input type="submit" name="Submit" value=" 修改 " class="input">
                <input type="reset" name="Submit2" value=" 重填 " class="input"></td>
          </tr></form>
      </table>
<%
end sub
sub list()
Dim CurPage,Url_Add
If Request.QueryString("Page")<>"" Then
   Curpage=Request.QueryString("Page")
   If IsInteger(Curpage)=False Then Curpage=1
Else
   Curpage=1
End If
if request("t")<>"" then
  if not isInteger(request("t")) then
    Response.Write "<script language=javascript>alert('参数非法！');javascript:history.back();</script>"
    Response.End
  end if
end if
Url_Add="?action=list&"
if Request.QueryString("t")=1 then
sql="select * from [User] order by RegDate desc"
Url_Add=Url_Add&"t=1&"
elseif Request.QueryString("t")=2 then
sql="select * from [User] order by points desc"
Url_Add=Url_Add&"t=2&"
else
sql="select * from [User] order by LoginTimes desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
  <tr>
    <td height="25" align="center" colspan="6"><font color=red><B>兜 客 列 表</B></font>→<a href="?action=list">按登录次数排列</a>&nbsp;-&nbsp;<a href="?action=list&t=1">按注册时间排列</a>&nbsp;-&nbsp;<a href="?action=list&t=2">按积分高低排列</a></td>
  </tr>
  <tr align="center">
    <td width="10%" height="23">等级</td>
    <td width="30%" height="23">用户名(点击发短信)</td>
    <td width="10%">性别</td>
    <td width="25%">注册日期</td>
    <td width="10%">状态</td>
    <td width="15%">详细资料</td>
  </tr>
<%if not rs.eof then
   Dim Hx_Nums,MultiPages,i
   Hxperpage=20
   Rs.PageSize=Hxperpage
   Rs.AbsolutePage=CurPage
   Hx_Nums=Rs.RecordCount
   MultiPages="<tr><td colspan=""6"" height='28' align=""center"">"&MultiPage(Hx_Nums,Hxperpage,CurPage,Url_Add)&"</td></tr>"
Do Until Rs.EOF OR i=Hxperpage
Response.Write "<tr align=center bgcolor=#FFFFFF>" & vbCrLf
if rs("UserGrade")=0 then Response.Write "<td height=25>普通</td>" & vbCrLf
if rs("UserGrade")=1 then Response.Write "<td height=25><font color=red>VIP</font></td>" & vbCrLf
%>
    <td><a href="Messager.asp?action=new&touser=<%=rs("UserName")%>" title=点击给<%=rs("UserName")%>发短信><%=rs("UserName")%></a></td>
    <td><%=rs("sex")%></td>
    <td align="left"><%=rs("RegDate")%></td>
<%
if rs("userlock")=0 then Response.Write "<td>正常</td>" & vbCrLf
if rs("userlock")=1 then Response.Write "<td><font color=red>锁定</font></td>" & vbCrLf
Response.Write "<td><a href=?action=ulist&id="&rs("userid")&" title=点击查看"&rs("UserName")&"的详细资料><img src='img/view.gif' width='52' height='18' border='0' align=absmiddle></a></td></tr>" & vbCrLf
i=i+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then
Response.Write "<tr align=center bgcolor=#FFFFFF><td height=21 colspan=6>现在还没有用户！</td></tr>" & vbCrLf
end if
end if
Response.Write(MultiPages)
Response.Write "</table>" & vbCrLf
rs.Close
set rs=nothing
end sub
sub ulist()%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
<%
dim art,sart,dj,sdj,down,sdown,pic,spic,cs,scs,iid
if request.QueryString("id")<>"" then
  if not isInteger(request.QueryString("id")) then
    Response.Write "<script language=javascript>alert(' 参数非法！');javascript:history.back();</script>" & vbCrLf
    Response.End
  end if
end if
if request.QueryString("id")="" then
    response.write "<SCRIPT language=JavaScript>alert(' 参数非法！');javascript:history.back();</script>" & vbCrLf
    response.end
end if
iid=clng(request.QueryString("id"))
sql="select top 1 * from [User] where userid="&iid&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
IF rs.eof or bof Then
Response.Write "<tr><td align=Center><font color=red>Sorry！没有内容，您的操作有误，请返回！</font></td></tr>" & vbCrLf
Else  
art=conn.execute("select count(*) from art where tjuser='"&rs("UserName")&"'")(0)
sart=conn.execute("select count(*) from art where passed=1 and tjuser='"&rs("UserName")&"'")(0)
dj=conn.execute("select count(*) from dj where tjuser='"&rs("UserName")&"'")(0)
sdj=conn.execute("select count(*) from dj where passed=1 and tjuser='"&rs("UserName")&"'")(0)
down=conn.execute("select count(*) from soft where tjuser='"&rs("UserName")&"'")(0)
sdown=conn.execute("select count(*) from soft where passed=1 and tjuser='"&rs("UserName")&"'")(0)
pic=conn.execute("select count(*) from pic where tjuser='"&rs("UserName")&"'")(0)
spic=conn.execute("select count(*) from pic where passed=1 and tjuser='"&rs("UserName")&"'")(0)
cs=conn.execute("select count(*) from coolsites where tjuser='"&rs("UserName")&"'")(0)
scs=conn.execute("select count(*) from coolsites where passed=1 and tjuser='"&rs("UserName")&"'")(0)
%>
<tr> 
<td colspan=3 align="Center">您正在查看 <b><font color=red><%=rs("UserName")%></font></b> 的个人资料</td>
</tr>
<tr height=30>
<td width='15%'><img src='img/user_main.gif' border=0>&nbsp;用户名称：</td>
<td width='50%'><a href="Messager.asp?action=new&touser=<%=rs("UserName")%>" title="给 <%=rs("UserName")%> 发送短消息"><b><%=rs("UserName")%></b></a></td>
<td width='35%' rowspan=5 align=center><%if rs("UserPhoto")<>"" then%><img src='<%=rs("UserPhoto")%>' border=0 width=100><%else%><img src='img/face/36.gif' border=0 width=90 height=90><%end if%></td>
</tr>
<tr height=25>
<td><img src='img/user_main.gif' border=0>&nbsp;用户类型：</td>
<td><%if rs("UserGrade")=0 then%>普通兜客
<%end if%><%if rs("UserGrade")=1 then%><font color=red>VIP兜客</font> 有效期还有<%=rs("vipenddate")-date()%>天<%end if%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户性别：</td>
<td><%
  if rs("Sex")="男" then
    response.write "<img border=0 src='img/boy.gif' align=absmiddle>&nbsp;&nbsp;男孩"
  else
    response.write "<img border=0 src='img/girl.gif' align=absmiddle>&nbsp;&nbsp;女孩"
  end if
%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;注册时间：</td>
<td><%=rs("RegDate")%></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;登录次数：</td>
<td><%=rs("LoginTimes")%>&nbsp;次</td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户积分：</td>
<td><%=rs("points")&moneyname%></td>
<td align=center><a href="User_main.asp?action=friend&touser=<%=rs("UserName")%>">将 <font color=red><%=rs("UserName")%></font> 加为我的好友</a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;个性签名：</td>
<td colspan=2 align=center><table border=0 width='100%'>
<%if rs("UserSign")<>"" then%>
<tr><td><%=autourl(formatStr(rs("UserSign")))%></td></tr>
<%else%>
<tr><td>暂无</td></tr>
<%end if%>
</table></td>
</tr>
<tr>
<td>≡以下联系信息≡</td>
<td colspan=2><%if rs("hidden")=1 then%><font color=red>只有『<%=rs("UserName")%>』的好友可见</font><%else%>公开<%end if%></td>
</td>
</tr>
<%
if rs("hidden")=1 then
IF rs("userfriend")<>"" Then 
Hx66friend=rs("userfriend")
else
Hx66friend="|"
End IF
temp=split(Hx66friend,"|")
for j = 1 to ubound(temp)
if Hx66_name=temp(j) then
'www.vip138.com
%>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户 &nbsp;QQ：</td>
<td colspan=2><font color=gray><%=rs("QQ")%></font></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;E-mail：</td>
<td colspan=2><a href='mailto:<%=rs("Email")%>'><%=rs("Email")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;个人主页：</td>
<td colspan=2><a href='<%=rs("Homepage")%>'><font color=gray><%=rs("Homepage")%></font></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;来自哪里：</td>
<td colspan=2><%=rs("whe")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;出生年月：</td>
<td colspan=2><%=rs("birthday")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系电话：</td>
<td colspan=2><%=rs("phone")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系地址：</td>
<td colspan=2><%=FormatStr(rs("address"))%></a></td>
</tr>  
<%
end if
next
else
%> 
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;用户 &nbsp;QQ：</td>
<td colspan=2><font color=gray><%=rs("QQ")%></font></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;E-mail：</td>
<td colspan=2><a href='mailto:<%=rs("Email")%>'><%=rs("Email")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;个人主页：</td>
<td colspan=2><a href='<%=rs("Homepage")%>'><font color=gray><%=rs("Homepage")%></font></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;来自哪里：</td>
<td colspan=2><%=rs("whe")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;出生年月：</td>
<td colspan=2><%=rs("birthday")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系电话：</td>
<td colspan=2><%=rs("phone")%></a></td>
</tr>
<tr>
<td><img src='img/user_main.gif' border=0>&nbsp;联系地址：</td>
<td colspan=2><%=FormatStr(rs("address"))%></a></td>
</tr> 
<%end if%>   
          <tr> 
            <td colspan=3>&nbsp;&nbsp;</td>
          </tr>    
          <tr> 
            <td colspan=3>&nbsp;&nbsp;<img border=0 src='img/h_review.gif' align=absmiddle>&nbsp;『<%=rs("UserName")%>』在本站发布的信息：&nbsp;&nbsp;<a href="user_corpus.asp?action=<%=rs("UserName")%>"><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle> <%=rs("UserName")%>全部文集</a></td>
          </tr>
          <tr>
            <td colspan=3>√成功添加文章：<%=art%> 篇，其中：已通过文章 <%=art-sart%> 篇，待审文章：<font color="#FF0000"><%=sart%></font> 篇。<a href=user_corpuslist.asp?action=<%=rs("UserName")%>&act=art><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
          </tr>
          <tr>
            <td colspan=3>√成功添加歌曲：<%=dj%> 首，其中：已通过歌曲 <%=dj-sdj%> 首，待审歌曲：<font color="#FF0000"><%=sdj%></font> 首。<a href=user_corpuslist.asp?action=<%=rs("UserName")%>&act=dj><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
          </tr>
          <tr>
            <td colspan=3>√成功添加图片：<%=pic%> 张，其中：已通过图片 <%=pic-spic%> 张，待审图片：<font color="#FF0000"><%=spic%></font> 张。<a href=user_corpuslist.asp?action=<%=rs("UserName")%>&act=pic><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
          </tr>
          <tr>
            <td colspan=3>√成功添加资源：<%=down%> 个，其中：已通过资源 <%=down-sdown%> 个，待审资源：<font color="#FF0000"><%=sdown%></font> 个。<a href=user_corpuslist.asp?action=<%=rs("UserName")%>&act=down><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
          </tr>
          <tr>
            <td height=30 colspan=3>√成功添加酷站：<%=cs%> 个，其中：已通过酷站 <%=cs-scs%> 个，待审酷站：<font color="#FF0000"><%=scs%></font> 个。<a href=user_corpuslist.asp?action=<%=rs("UserName")%>&act=web><img src="img/view.gif" width="52" height="18" border="0" align=absmiddle></a></td>
          </tr>
          <tr> 
            <td colspan=3>√<font color="#FF0000">衷心感谢您对『<%=webname%>』的支持！</font></td>
          </tr>
<%end if
rs.Close
set rs=nothing
%>
</table>
<%end sub
sub friend()
'www.vip138.com
if request("page")<>"" then
  if not isInteger(request("page")) then
    Response.Write "<script language=javascript>alert('参数非法！');javascript:history.back();</script>"
    Response.End
  end if
end if
%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
<form method="post" action="?action=addfriend">
  <tr>
    <td height="25" align="center" colspan="8">添加好友：<input type="text" name="friend" maxlength="12" value="<%=request("touser")%>" class="input"> <input type="submit" name="submit" value="确认添加" class="input">  最多可添加<%=friendsum%>位在您的好友列表中</td></form>
  </tr>
  <tr>
    <td height="25" align="center" colspan="8"><font color=red><B>我的好友列表</B></font></td>
  </tr>
  <tr align="center">
    <td width="7%" height="23">序号</td>
    <td width="7%" height="23">等级</td>
    <td width="23%" height="23">用户名(点击发短信)</td>
    <td width="7%">性别</td>
    <td width="24%">注册时间</td>
    <td width="7%">状态</td>
    <td width="18%">详细资料</td>
    <td width="7%">删除</td>
  </tr>
<%
dim Hx66friend
IF Hx66_friend<>"" Then 
Hx66friend=Hx66_friend
else
Hx66friend="|1234567890123456"
End IF
temp=split(Hx66friend,"|")
totaldiary=ubound(temp)
hyperpage=15
if trim(request("page"))<>"" then
    currentpage=clng(request("page"))
    aaa=hyperpage*(currentpage-1)+1
    if ubound(temp)-hyperpage*currentpage<1 then
    bbb=ubound(temp)
    else
    bbb=hyperpage*currentpage
    end if
else
    currentpage=1
    aaa=1
    if hyperpage-ubound(temp)>=1 then
    bbb=ubound(temp)
    else
    bbb=hyperpage
    end if
end if
if (totaldiary mod hyperpage)=0 then
    totalpages=totaldiary\hyperpage
else
    totalpages=totaldiary\hyperpage+1
end if
for j = aaa to bbb
set rs=server.createobject("adodb.recordset")
sql="select * from [User] where username='"&temp(j)&"'"
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
Response.Write "<tr align=center><td height=21 colspan=8>您目前还没有添加好友！</td></tr>" & vbCrLf
else
Response.Write "<tr align=center bgcolor=#FFFFFF>" & vbCrLf
Response.Write "<td height=25>"&j&"</td>" & vbCrLf
if rs("UserGrade")=0 then Response.Write "<td height=25>普通</td>" & vbCrLf
if rs("UserGrade")=1 then Response.Write "<td height=25><font color=red>VIP</font></td>" & vbCrLf
%>
    <td><a href="Messager.asp?action=new&touser=<%=rs("UserName")%>" title=点击给好友：<%=rs("UserName")%>发短信><%=rs("UserName")%></a></td>
    <td><%=rs("sex")%></td>
    <td align="left"><%=rs("RegDate")%></td>
<%
if rs("userlock")=0 then Response.Write "<td>正常</td>" & vbCrLf
if rs("userlock")=1 then Response.Write "<td><font color=red>锁定</font></td>" & vbCrLf
Response.Write "<td><a href=?action=ulist&id="&rs("userid")&" title=点击查看好友："&rs("UserName")&"的详细资料><img src='img/view.gif' width='52' height='18' border='0' align=absmiddle></a></td>" & vbCrLf
Response.Write "<td><a href='?action=delfriend&friend_id="&j&"'><font color=#FF0000>×</font></td></tr>" & vbCrLf
end if
next
%>
</table>
<table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
  <form name="form2" method="post" action="?action=list">
    <tr>
     <TD align=middle width="200" height="40"><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totaldiary%></font>]个好友　分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
     <TD width="200" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=?action=friend&page=1>首页</a> "
response.write "<a href=?action=friend&page="&CurrentPage-1&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=?action=friend&page="&CurrentPage+1&""
response.write ">下一页</a> <a href=?action=friend&page="&totalpages&">尾页</a>"
end if
%>&nbsp;<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
</tr>
  </form>
</table>
<%
rs.Close
set rs=nothing
end sub
sub addfriend()
dim newfriend:newfriend=trim(request.form("friend"))
if not checkname(newfriend) then
    response.Write"<script language=javascript>alert('要添加的好友用户名称为空或含有非法字符！！');history.back();</script>"
    response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&newfriend&"'"
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
    rs.close
    response.Write"<script language=javascript>alert('要添加的好友用户名称不存在！！');history.back();</script>"
    response.end
end if
rs.close
set rs=nothing
IF Hx66_friend<>"" Then 
Hx66friend=Hx66_friend
else
Hx66friend="|"
End IF
temp=split(Hx66friend,"|")
for j = 1 to ubound(temp)
if newfriend=temp(j) then
    response.Write"<script language=javascript>alert('要添加的好友已在您的好友列表内！！');history.back();</script>"
    response.end
end if
next
if ubound(temp)>=friendsum then
    response.Write"<script language=javascript>alert('您目前的好友已达到系统"&friendsum&"个限定数，请清理后添加！！');history.back();</script>"
    response.end
end if
dim temp1,title,bodyMessage
temp1="|"
temp1=Hx66_friend&""&temp1&""&newfriend
conn.execute"Update [user] set userfriend='"&temp1&"' where username='"&Hx66_name&"'"
title="好友信息通知"
bodyMessage="会员 "&Hx66_name&" 已将您添加为好友！"
sql="insert into Message(sender,incept,title,content,sendtime) values('"&Hx66_name&"','"&newfriend&"','"&title&"','"&bodyMessage&"','"&now()&"')"
conn.execute(sql)
response.Write"<script language=javascript>alert(' 已成功将用户（"&newfriend&"）加入到您的好友列表内！');this.location.href='User_main.asp?action=friend';</script>"
response.end
end sub
sub delfriend() 
dim i
dim temp
dim temp_friend
dim friend_id
friend_id=request("friend_id")
IF Hx66_friend<>"" Then 
Hx66friend=Hx66_friend
else
Hx66friend="|"
End IF
temp=split(Hx66friend,"|")
for i = 1 to ubound(temp)
if int(i)=int(friend_id) then
temp_friend=temp_friend
else
temp_friend=temp_friend&"|"&temp(i)
end if
next
conn.execute"Update [user] set userfriend='"&temp_friend&"' where username='"&Hx66_name&"'"
set temp=nothing
set temp_friend=nothing
response.Write"<script language=javascript>alert(' 已成功删除编号为("&(friend_id)&")的我的好友！');this.location.href='User_main.asp?action=friend';</script>"
response.end
end sub
sub collect()
if request("page")<>"" then
  if not isInteger(request("page")) then
    Response.Write "<script language=javascript>alert('参数非法！');javascript:history.back();</script>"
    Response.End
  end if
end if
%>
<form name="form" onsubmit="javascript:return lbsong();" target="lbsong" action="djplaylist.asp">
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
 <tr>
    <td height="25" align="center" colspan="6">最多可存<%=collectsum%>首在您的音乐收藏盒中</td>
  </tr>
  <tr>
    <td height="25" align="center" colspan="6"><font color=red><B>我的音乐收藏盒</B></font></td>
  </tr>
  <tr align="center">
    <td width="7%" height="23">序号</td>
    <td width="50%" height="23">音乐名称(点击播放)</td>
    <td width="19%" height="23">演唱歌手</td>
    <td width="10%">人气</td>
    <td width="7%">删除</td>
    <td width="7%">连播</td>
  </tr>
<%
dim Hx66collect
IF Hx66_collect<>"" Then 
Hx66collect=Hx66_collect
else
Hx66collect="|10000000000000000"
End IF
temp=split(Hx66collect,"|")
totaldiary=ubound(temp)
hyperpage=15
if trim(request("page"))<>"" then
    currentpage=clng(request("page"))
    aaa=hyperpage*(currentpage-1)+1
    if ubound(temp)-hyperpage*currentpage<1 then
    bbb=ubound(temp)
    else
    bbb=hyperpage*currentpage
    end if
else
    currentpage=1
    aaa=1
    if hyperpage-ubound(temp)>=1 then
    bbb=ubound(temp)
    else
    bbb=hyperpage
    end if
end if
if (totaldiary mod hyperpage)=0 then
    totalpages=totaldiary\hyperpage
else
    totalpages=totaldiary\hyperpage+1
end if
for j = aaa to bbb
set rs=server.createobject("adodb.recordset")
sql="select * from dj where dj_id="&temp(j)&""
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
Response.Write "<tr align=center><td height=21 colspan=6>您目前还没有收藏音乐！</td></tr>" & vbCrLf
else
Response.Write "<tr align=center bgcolor=#FFFFFF>" & vbCrLf
Response.Write "<td height=25>"&j&"</td>" & vbCrLf
%>
    <td align="left"><a href='djplaylist.asp?checked=<%=rs("dj_id")%>&player=+' onclick="HxWindow(this.href,'dj','350','260','no','no','center');return false" Title='歌曲名称：<%=rs("dj_name")%>&#13&#10视听次数：<%=rs("dj_count")%>&#13&#10上传时间：<%=rs("dj_date")%>'><%=rs("dj_name")%></a></td>
    <td><%=rs("dj_user")%></td>
    <td><%=rs("dj_count")%></td>
<%
Response.Write "<td><a href='?action=delcollect&collect_id="&j&"' Title='删除此歌曲收藏'><font color=#FF0000>×</font></td>" & vbCrLf
Response.Write "<td><input type='checkbox' name='checked' value="&rs("dj_id")&"></td></tr>" & vbCrLf
end if
next
%>
<TR bgColor=#FFFFFF><TD colspan=7 align=Center height="26"><div align="center">
        	<input type="button" name="chkall" value="" onclick="CheckAll(this.form)" title="选择显示的所有歌曲" style="width: 62px; height: 23px; background-image: url('img/ly1.gif'); border-style: none; border-width: medium">&nbsp;                          <input type="button" name="chkOthers" value="" onclick="CheckOthers(this.form)" title="反向选择歌曲" style="width: 62px; height: 23px; background-image: url('img/ly2.gif'); border-style: none; border-width: medium">&nbsp;                              <input type="submit" name="player" value=" " title="请先选择你想听的歌曲后再点击播放" style="width: 62px; height: 23px; background-image: url('img/ly3.gif'); border-style: none; border-width: medium">
	</div>
    	 </TD></TR></form>
</table>
<table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
  <form name="form2" method="post" action="?action=list">
    <tr>
     <TD align=middle width="200" height="40"><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totaldiary%></font>]首音乐　分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
     <TD width="200" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=?action=collect&page=1>首页</a> "
response.write "<a href=?action=collect&page="&CurrentPage-1&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=?action=collect&page="&CurrentPage+1&""
response.write ">下一页</a> <a href=?action=collect&page="&totalpages&">尾页</a>"
end if
%>&nbsp;<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
</tr>
  </form>
</table>
<%
rs.Close
set rs=nothing
end sub
sub delcollect() 
dim i
dim temp
dim temp_collect
dim collect_id
collect_id=request("collect_id")
IF Hx66_collect<>"" Then 
Hx66collect=Hx66_collect
else
Hx66collect="|"
End IF
temp=split(Hx66collect,"|")
for i = 1 to ubound(temp)
if int(i)=int(collect_id) then
temp_collect=temp_collect
else
temp_collect=temp_collect&"|"&temp(i)
end if
next
conn.execute"Update [user] set usercollect='"&temp_collect&"' where username='"&Hx66_name&"'"
set temp=nothing
set temp_collect=nothing
response.Write"<script language=javascript>alert(' 已成功删除编号为("&(collect_id)&")的我的收藏歌曲！');this.location.href='User_main.asp?action=collect';</script>"
response.end
end sub
sub vip()%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
  <tr>
    <td height="25" colspan="5" align="Center">亲爱的兜客：<%=Hx66_name%> ，欢迎您升级为<font color=red><b>VIP</b></font>兜客，享受本站更多的服务。</td>
  </tr>
  <tr>
    <td height="25" colspan="5"><font color=red>→本网站系统当前采用的是自动添加VIP兜客模式</font><br>
  →如果您当前的条件满足VIP兜客申请条件，您就可以直接申请成为<%=webname%>的VIP兜客<br>
1、VIP兜客的有效期为 <b><%=viptime%></b> 天<br> 
2、当您的有效期快到期时，我们会以短消息方式通知您<br>
3、谢谢您对《<%=webname%>》的支持<br></td>
  </tr>
  <tr>
    <td height="25" colspan="5" align="Center">欢迎<b><%=Hx66_name%></b>申请VIP兜客</td>
  </tr>
  <tr align="Center">
    <td height="25"><B>所需要条件</B></td>
    <td height="25"><B>申请条件</B></td>
    <td height="25"><B>申请成功后</B></td>
    <td height="25"><B>您当前的条件</B></td>
    <td height="25"><B>是否满足</B></td>
  </tr>
  <tr align="Center">
    <td height="25">兜客积分</td>
    <td height="25">大于<%=zvippoints%></td>
    <td height="25">-<%=zvippoints%></td>
    <td height="25"><%=Hx66_points%></td>
    <td height="25"><%if Hx66_points>zvippoints then%>满足<%else%><font color=red>不满足</font><%end if%></td>
  </tr>
  <tr align="Center">
    <td height="25" colspan="3">
<% 
if Hx66_Grade=1 then
     response.write "<font color=red>您已经是"&webname&"VIP兜客</font><br>"
else
     if zhvip<>"yes" then
         response.write "<font color=red>本站已停止VIP兜客的申请，如你需要可联系管理员</font><br>"
     else
         if Hx66_points<=zvippoints then
             response.write "<font color=red>您的条件不满足，您暂时还无法申请成为"&webname&"VIP兜客</font><br>"
         else
             response.write "<font color=red>您可以申请VIP兜客</font><br>"%>
            <form name="form" method="post" action="User_main.asp?action=vipadd">
             <INPUT name=username size="20" value="<%=Hx66_name%>" type=hidden>
             <INPUT type=submit value=点击申请 name=submit class=input></form>
        <%end if
    end if
end if%></td>
    <td height="25" colspan="2"><%if Hx66_Grade=1 then
response.write "您申请VIP兜客的时间是："&Hx66_vipin&"<br>"
response.write "离您的有效期还有：<b>"&Hx66_vipend-date()&"</b>天"
end if
%></td>
  </tr>
</table>
<%end sub

sub vipadd() 
dim sucmsg
if Hx66_Grade=1 then
founderr=true
response.Write"<script language=javascript>alert('您已经是"&webname&"VIP兜客，请不要重复申请！');this.location.href='User_main.asp?action=vip';</script>"
elseif zhvip<>"yes" then
founderr=true
response.Write"<script language=javascript>alert('本站已停止VIP兜客的申请，如你需要可联系管理员！');this.location.href='User_main.asp?action=vip';</script>"
elseif Hx66_points<=zvippoints then
founderr=true
response.Write"<script language=javascript>alert('您的条件不满足，您暂时还无法申请成为"&webname&"VIP兜客！');this.location.href='User_main.asp?action=vip';</script>"
else
	if founderr=false and Hx66_Grade=0 then
	msgcontent="亲爱的用户"&Hx66_name&"："& chr(10) & webname&"正式接收你为VIP兜客！"& chr(10) & "您的VIP资格有效期为："&viptime&" 天，从"&now()&" 开始生效！"
	conn.Execute("insert into message(incept,sender,title,content,sendtime) values('"&Hx66_name&"','"&webname&"','系统消息--VIP兜客申请成功','"&CheckStr(msgContent)&"',now())")
	sql="update [user] set UserGrade=1,VipinDate=date(),VipendDate=date()+'"&viptime&"',points=points-"&zvippoints&" where username='"&Hx66_name&"'"
	conn.execute sql
        response.Write"<script language=javascript>alert('您申请成功，恭喜您成为"&webname&"的VIP兜客');this.location.href='User_main.asp?action=vip';</script>"
	end if
end if
end sub
%>