<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="Class_Checkuser.asp" -->
<!--#INCLUDE FILE="Class_Top.asp" -->
<%
locat="快乐网签"
if membername="" Then
  	ErrMsg=ErrMsg+"<br>"+"<li>您还没有<a href=Class_Login.asp><font color=red>登录或注册校友录</font></a>。"
	Call top(1,1)
	Call Error("Information",ErrMsg)
	
else
Call top(1,1)
	response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1><tr><th valign=middle colspan=2 align=center height=20><b>"&membername&" 的快乐网签</b></td><tr><td valign=middle class=tablebody1 height=100>"
	call main()
end if
response.write "</table>"
call footer()
%>
<%
sub main()
	dim group,userid
	set rs=server.createobject("adodb.recordset")
	sql="select * from [scfav] where username='"&membername&"'"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "<div align=center>您还没有在本校友录建立个人快乐网签，马上<a href='n_urlnew.asp'><font color=red>申请</font></a>快乐网签。</div>"
	else
		group=rs("groups")
		userid=clng(rs("id"))
		response.write "<form name=form1 method=post action=n_urlact.asp><td valign=top class=tablebody1 align=left><img src=images/main/fav_add1.gif><b>我的快乐网签</b>[全部]"
		response.write "<table width=100% cellpadding=3 cellspacing=1 align=center class=tableborder1>"
		dim brs
		for i=0 to rs("groupnum")-1
			response.write "<tr><td class=tablebody2 colspan=3><b>["&split(group,"|")(i)&"]</b>"
			set brs=server.createobject("adodb.recordset")
			sql="select * from [scurl] where username='"&membername&"' and grouptype='"&split(group,"|")(i)&"'"
			brs.open sql,conn,1,1
			if brs.eof and brs.bof then
				response.write "<tr><td colspan=3 class=tablebody1>&nbsp;&nbsp;&nbsp;&nbsp;尚未收藏任何网址！"
			else
				brs.movefirst
				do while not brs.eof
					response.write "<tr><td class=tablebody2 align=center><a href=n_urlact.asp?toact=edit&urlid="&brs("id")&"><font color=blue>"&brs("webname")&"：</font></a><td class=tablebody1><a href="&brs("weburl")&" target=_blank><img src=images/main/url.gif border=0>"&brs("weburl")&"</a>"
					if brs("webtext")<>"" then response.write "&nbsp;&nbsp;(说明："&brs("webtext")&")"
					response.write "<td class=tablebody2 align=center><input type=checkbox name=toacter value="&brs("id")&">"
					brs.movenext
				loop
			end if
			brs.close
			set brs=nothing
		next
		response.write "<tr><td class=tablebody2 colspan=2><b><img src=images/main/url.gif><font color=red>网址管理</font></b><td class=tablebody2><input type=checkbox name=chkall value=1>全选"
		response.write "<tr><td cellpadding=3 cellspacing=1 class=tablebody1 colspan=3 valign=middle>&nbsp;&nbsp;<b><a href=n_urlact.asp?toact=add><font color=blue>添加</font></a></b>"
		response.write "&nbsp;&nbsp;<input type=radio name=toact value=del><b>删除</b>"
		response.write "&nbsp;&nbsp;<input type=radio name=toact value=move><b>移动：</b>到组&nbsp;<select name=group>"
		for i=0 to rs("groupnum")-1
			response.write "<option value="&trim(split(group,"|")(i))&">"&trim(split(group,"|")(i))&"</option>"
		next
		response.write "</select>&nbsp;&nbsp;<b>编辑网签: </b>点击网签名进行相关的编辑！<tr><td class=tablebody2 colspan=3 align=center><input type=submit value=确定>"
		response.write "</table></form>"
		response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1 align=center><tr><td width=200 class=tablebody1 valign=top>"
		response.write "<table cellpadding=3 align=center cellspacing=1 class=tableborder1><tr><th>管理区"
		response.write "<tr><td class=tablebody2><b><img src=images/main/ifolder.gif>分组管理</b>&nbsp;&nbsp;<a href=n_urlgroup.asp?toact=add><font color=red>添加新签</a></font>"
		response.write "<tr><td class=tablebody1>"
		for i=0 to rs("groupnum")-1
			response.write "&nbsp;&nbsp;<b>"&i+1&"、</b>"&trim(split(group,"|")(i))&"&nbsp;&nbsp;&nbsp;<a href=n_urlgroup.asp?toact=edit&name="&trim(split(group,"|")(i))&"><font color=red>改名</font></a>&nbsp;<a href=n_urlgroup.asp?toact=del&name="&trim(split(group,"|")(i))&"><font color=red>删除</font></a><br>"
		next
		
		response.write "</select><tr><td cellpadding=3 class=tablebody2><b><a href=n_urlgroup.asp?toact=out><font color=red><img src=images/main/delete.gif border=0>注销网签</font></a></b>"
		response.write "<tr><td cellpadding=3 class=tablebody1>注：删除组将同时删除组里的所有收藏,注销网签将删除个人网签,并同时删除收藏的所有网址，无法恢复！</table></table>"
		
	end if
end sub
%>