<!--#include file="../Inc/conn.asp"-->
<!--#include file="../Inc/md5.asp"-->
<!--#include file="../Inc.asp"--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="<%=Sitekeywords%>" />
<meta name="description" content="<%=Sitedescription%>" />
<link href="<%=SitePath%>images/css<%=Css%>.css" ID="skin" type=text/css rel=stylesheet>
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=SitePath%>inc/main.asp"></script>
<script language="javascript" type="text/javascript" src="<%=SitePath%>inc/setdate/WdatePicker.js"></script>
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
<title>会员管理 <%=SiteTitle%></title>
<style>
.usermenu {background:#CCCCCC;color:#333333;font-weight:bold;padding:5px;}
</style>
</head>
<body>
<div class="mwall">
<%=Head%>
<%=Menu%><div class="mw">
	<div class="dh">
		<%=search%>您现在的位置：<a href="<%=SitePath%>Index.asp">首页</a> >> 会员控制面板
    </div>
<%
If IsUser<>1 then
Response.Redirect "UserLogin.asp"
else
%>
<script language=javascript>
    function unselectall(thisform){
        if(thisform.chkAll.checked){
            thisform.chkAll.checked = thisform.chkAll.checked&0;
        }   
    }
    function CheckAll(thisform){
        for (var i=0;i<thisform.elements.length;i++){
            var e = thisform.elements[i];
            if (e.Name != "chkAll"&&e.disabled!=true)
                e.checked = thisform.chkAll.checked;
        }
    }
function CheckForm()
{ 
  if (document.myform.Title.value==""){
	alert("请填写标题！");
	document.myform.Title.focus();
	return false;
  }
  if (document.myform.ClassID.value==""){
	alert("请选择分类！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.ClassID.value=="-1"){
	alert("该类别不允许发表！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.Author.value==""){
	alert("请填写作者！");
	document.myform.Author.focus();
	return false;
  }
  if (document.myform.code.value==""){
	alert("请填写验证码！");
	document.myform.code.focus();
	return false;
  }
return true;
}
</script>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top:1px dashed #ccc">
      <tr>
        <td width="20%" height="400" valign="top" style="border-right:1px dashed #ccc">
		<div style="margin-top:20px;line-height:22px;">欢迎您，<font color=red><%=UserName%></font><br>您共发表了 <b><%=Mydb("Select Count([ID]) From ["&tbname&"_Article] Where UserName='"&UserName&"'",1)(0)%></b> 篇文章<br>其中 <font color=red><b><%=Mydb("Select Count([ID]) From ["&tbname&"_Article] Where yn = 1 and UserName='"&UserName&"'",1)(0)%></b></font> 篇文章没通过审核<br><%=moneyname%>：<%=mymoney%></div>
		<table width="100" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:20px;">
          <tr>
            <td class="usermenu"><a href="UserAdd.asp?action=useredit">修改资料</a></td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td class="usermenu"><a href="UserAdd.asp?action=List">我发表的文章</a></td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td class="usermenu"><a href="UserAdd.asp?action=add">发表新文章</a></td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td class="usermenu"><a href="UserLogin.asp?action=logout">退出</a></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table></td>
        <td valign="top">
<%
	if request("action") = "add" then 
		call add()
	elseif request("action")="edit" then
		call edit()
	elseif request("action")="savenew" then
		call savenew()
	elseif request("action")="saveedit" then
		call saveedit()
	elseif request("action")="yn1" then
		call yn1()
	elseif request("action")="yn2" then
		call yn2()
	elseif request("action")="useredit" then
		call useredit()
	elseif request("action")="usersave" then
		call usersave()
	elseif request("action")="del" then
		call del()
	elseif request("action")="delAll" then
		call delAll()
	else
		call List()
	end if
	
sub List()
	dim currentpage,page_count,Pcount
	dim totalrec,endpage
	currentPage=LaoYRequest(request("page"))
	A_Class=LaoYRequest(request("Class"))
	hits=LaoYRequest(request("hits"))
	if hits="" then
	hits=0
	end if
	keyword=CheckStr(request("keyword"))
	if currentpage="" or not IsNumeric(currentpage) then
		currentpage=1
	else
		currentpage=clng(currentpage)
		if err then
			currentpage=1
			err.clear
		end if
	end if
	set rs = server.CreateObject ("adodb.recordset")
	sql="select * from "&tbname&"_Article where UserName= '"& LaoYName &"' order by id desc"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		Response.Write("你还没有发表文章!")
	else
%>
<form name="myform" method="POST" action="?action=delAll">
<table width="100%" border="0"  align=center cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable">
    <tr bgcolor="#f1f3f5" style="font-weight:bold;">
	<td align="center" class="ButtonList" style="display:none;">&nbsp;</td>
    <td align="center" class="ButtonList">文章名称</td>
    <td width="20%" height="30" align="center" class="ButtonList">发布时间</td>
    <td height="30" align="center" class="ButtonList">浏览</td>
    <td height="30" align="center" class="ButtonList">管理</td>    
	</tr>
<%
		rs.PageSize = 15
		rs.AbsolutePage=currentpage
		page_count=0
		totalrec=rs.recordcount
		NoI=0
		while (not rs.eof) and (not page_count = rs.PageSize)
		NoI=NoI+1
%>
    <tr bgcolor="#f1f3f5" onMouseOver="this.style.backgroundColor='#B3CFEE';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''">
	 <td width="4%" style="display:none;"><input type="checkbox" value="<%=rs("ID")%>" name="ID" onClick="unselectall(this.form)" style="border:0;" /></td>
    <td width="43%" style="padding:8px 0;" align="left"><%=NoI%>
    . <a href="<%=SitePath%><%If html=1 then Response.Write("List.asp?ID="&rs("ID")&"") else Response.Write("Html/?"&rs("ID")&".html") end if%>" target="_blank"><%=rs("Title")%></a> <%if rs("IsTop")=1 then Response.Write("<font color=red>[顶]</font>") end if%><%if rs("IsHot")=1 then Response.Write("<font color=green>[荐]</font>") end if%><%if rs("Images")<>"" then Response.Write("<font color=blue>[图]</font>") end if%></td>
    <td align="center"><%=rs("DateAndTime")%></td>
    <td width="8%" align="center"><%=rs("Hits")%></td>
    <td width="25%" align="center"><%If rs("yn")=0 then Response.Write("已审") end if:If rs("yn")=1 then Response.Write("<font color=red>未审</font>") end if:If rs("yn")=2 then Response.Write("<font color=blue>私有</font>") end if%>|<a href="?action=edit&id=<%=rs("ID")%>">编辑</a>|<a href="?action=del&id=<%=rs("ID")%>" onClick="JavaScript:return confirm('确认删除吗？')">删除</a></td>    </tr>
<%
		page_count = page_count + 1
		rs.movenext
		wend
%>
  <tr><td bgcolor="f7f7f7" colspan="6" align="CENTER">分页：
<%Pcount=rs.PageCount
	if currentpage > 4 then
		response.write "<a href=""?page=1"">[1]</a> ..."
	end if
	if Pcount>currentpage+3 then
		endpage=currentpage+3
	else
		endpage=Pcount
	end if
	dim i
	for i=currentpage-3 to endpage
		if not i<1 then
			if i = clng(currentpage) then
        		response.write " <font color=red>["&i&"]</font>"
			else
        		response.write " <a href=""?page="&i&""">["&i&"]</a>"
			end if
		end if
	next
	if currentpage+3 < Pcount then 
	response.write "... <a href=""?page="&Pcount&""">["&Pcount&"]</a>"
	end if
%>
</td></tr></table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub

sub add()
%>
		<form action="?action=savenew" method="post" name="myform" id="myform" onSubmit="return CheckForm();">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
            <tr>
              <td width="15%" height="30">标题：</td>
              <td width="85%" align="left"><input name="Title" type="text" class="borderall" id="Title" size="40" maxlength="30" /></td>
            </tr>
            <tr>
              <td height="30">类别：</td>
              <td align="left">
                <select id="ClassID" name="ClassID">
                  <%call Admin_ShowClass_Option()%>
                </select>
               <span style="color:#cccccc;">您只能选择蓝色字体栏目发表</span></td>
            </tr>
            <tr>
              <td height="30">来源：</td>
              <td align="left"><input name="CopyFrom" type="text" class="borderall" id="CopyFrom" value="原创" size="20" maxlength="20" /></td>
            </tr>
            <tr>
              <td height="30">录入：</td>
              <td align="left"><input name="UserName" type="text" class="borderall" id="UserName" value="<%=UserName%>" size="20" maxlength="20" readOnly /> <span style="color:#cccccc;">此项禁止更改</span></td>
            </tr>
            <tr>
              <td height="30">作者：</td>
              <td align="left"><input name="Author" type="text" class="borderall" id="Author" value="<%=UserName%>" size="20" maxlength="20" /></td>
            </tr>
            <tr>
              <td height="30">内容：</td>
              <td rowspan="2" align="left"><textarea name="Content" cols="80" rows="10" id="Content" style="display:none;"></textarea>
                <IFRAME ID="eWebEditor1" SRC="../editor/ewebeditor.htm?id=Content&style=user" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME></td>
            </tr>
            <tr>
              <td valign="top"><p>
                <input name="myyn" type="checkbox" id="myyn" value="2" />
                只允许自己看 </p>
                <p style="color:#ccc;margin:10px;text-align:left;line-height:22px;">如果选中，您发布的文章将只有自己才能查看，网友将无法查看</p> </td>
            </tr>
            <tr>
              <td height="30" align="center">验证码：</td>
              <td height="35" align="left">
                <input name="code" type="text" id="code" size="8" maxlength="5"/>
                <img src="../Inc/code.asp" border="0" alt="看不清楚请点击刷新验证码" style="cursor : pointer;" onClick="this.src='../Inc/code.asp'"/><span class="b1_1">
                <input type="button" value="插入分页符" onClick="eWebEditor1.insertHTML('[yao_page]')"/>
                </span></td>
              <td height="30" rowspan="2" align="left">&nbsp;</td>
            </tr>
            <tr>
              <td height="30" align="center">&nbsp;</td>
              <td height="15" align="left"><input type="submit" name="Submit" value=" 发 布 " class="borderall" /></td>
            </tr>
          </table>
        </form>
<%
end sub

sub savenew()
	dim Title,Content,ClassID,sqlmoney
	Title = LoseHtml(trim(request.form("Title")))
	ClassID = LaoYRequest(request.form("ClassID"))
	CopyFrom = LoseHtml(trim(request.form("CopyFrom")))
	Author = LoseHtml(trim(request.form("Author")))
	Content = request.form("Content")
	myyn = LaoYRequest(request.form("myyn"))
	mycode = LaoYRequest(request.form("code"))
	if mycode<>Session("getcode") then
	Call Alert("请输入正确的验证码！",-1)
	end if
	If session("postarttime")<>"" then
		posttime8=DateDiff("s",session("postarttime"),Now())
  		if posttime8<yaopostgetime then
		posttime9=yaopostgetime-posttime8
		Call Alert ("话说的太快不好!"&posttime9&"秒后再发表。","-1")
  		end if
	end if
	set rs = server.CreateObject ("adodb.recordset")
	sql="select * from "&tbname&"_Article"
	rs.open sql,conn,1,3
		If ClassID="-1" then
			Call Alert("该大类还有小类别，请选择一个小类！","-1")
		End if
		if Title="" or ClassID="" or Author="" or Content="" then
			Call Alert("请填写完整再提交,红色星号为必填！","-1")
		end if
		If Not Checkpost(True) Then Call Alert("禁止外部提交!","-1")
		rs.AddNew 
		rs("Title")				=Replace(Title,CHR(34),"&quot;")
		rs("ClassID")			=ClassID
		rs("Content")			=Content
		rs("Artdescription")	=left(LoseHtml(Content),250)
		rs("CopyFrom")			=CopyFrom
		rs("Author")			=Author
		rs("UserName")			=LaoYName
		rs("UserID")			=LaoYID
		If UserInfo(LaoyID,0)=1 then
			rs("yn")				=0
		else
			If useraddoff=1 then
			rs("yn")				=0
			End if
			If useraddoff=0 then
			rs("yn")				=1
			end if
			If myyn<>"" then
			rs("yn")				=2
			End if
		End if
		rs.update

			sqlmoney="Update "&tbname&"_User set UserMoney = UserMoney+"&money1&" where ID="&LaoYID&""
			conn.execute(sqlmoney)
		Session("postarttime")=Now()
		Call Alert ("恭喜你,发布成功!","?action=list")
		rs.close
		Set rs = nothing
end sub

sub edit()
id=LaoYRequest(request("id"))
set rs = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_Article where id="& id &" and UserName='"&LaoYName&"'"
rs.open sql,conn,1,1
If rs.bof then
	Call Alert ("这样搞是不好的!","-1")
else
%>
		<form action="?action=saveedit" method="post" name="myform" id="myform" onSubmit="return CheckForm();">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
            <tr>
              <td width="15%" height="30">标题：</td>
              <td width="85%" align="left"><input name="Title" type="text" class="borderall" id="Title" value="<%=rs("Title")%>" size="40" maxlength="30" /></td>
            </tr>
            <tr>
              <td height="30">类别：</td>
              <td align="left">
                <select ID="ClassID" name="ClassID">
   <%
   Set Rsp=server.CreateObject("adodb.recordset") 
   Sqlp ="select * from "&tbname&"_Class Where TopID = 0 And link<>1 order by num"   
   rsp.open sqlp,conn,1,1 
   Response.Write("<option value="""">请选择分类</option>") 
   If Rsp.Eof and Rsp.Bof Then
      Response.Write("<option value="""">请先添加分类</option>")
   Else
      Do while not Rsp.Eof   
         Response.Write("<option value")
		 If Yao_MyID(rsp("ID"))<>"0" then
		 Response.Write("=""-1"" style=""background:#f7f7f7;color:#ccc;""")
		 else
		 Response.Write("=" & """" & Rsp("ID") & """" & " style=""color:#0000ff;""")
		 End if
         If rs("ClassID")=Rsp("ID") Then
            Response.Write(" selected")
         End If
         Response.Write(">|-" & Rsp("ClassName") & "</option>")
		 
		 Sqlpp ="select * from "&tbname&"_Class Where TopID="&Rsp("ID")&" And link<>1 And IsUser=1 order by num"   
   			Set Rspp=server.CreateObject("adodb.recordset")   
   			rspp.open sqlpp,conn,1,1
			Do while not Rspp.Eof 
				Response.Write("<option value=" & """" & Rspp("ID") & """" & "")
				If rs("ClassID")=Rspp("ID") Then
            	Response.Write(" selected")
         		End If
         		Response.Write(" style=""color:#0000ff;"">　|-" & Rspp("ClassName") & "")
				Response.Write("</option>" ) 
			Rspp.Movenext   
      		Loop
			rspp.close
			set rspp=nothing
      Rsp.Movenext   
      Loop   
   End if
   rsp.close
   set rsp=nothing
   %>
  </select> <span style="color:#cccccc;">您只能选择蓝色字体栏目发表</span></td>
            </tr>
            <tr>
              <td height="30">来源：</td>
              <td align="left"><input name="CopyFrom" type="text" class="borderall" id="CopyFrom" value="<%=rs("CopyFrom")%>" size="20" maxlength="20" /></td>
            </tr>
            <tr>
              <td height="30">录入：</td>
              <td align="left"><input name="UserName" type="text" class="borderall" id="UserName" value="<%=UserName%>" size="20" maxlength="20" readonly="readOnly"/></td>
            </tr>
            <tr>
              <td height="30">作者：</td>
              <td align="left"><input name="Author" type="text" class="borderall" id="Author" value="<%=rs("Author")%>" size="20" maxlength="20" /></td>
            </tr>
            <tr>
              <td height="30">内容：</td>
              <td rowspan="2" align="left"><textarea name="Content" cols="80" rows="10" id="Content" style="display:none"><%=server.htmlencode(rs("Content"))%></textarea>
                  <IFRAME ID="eWebEditor1" SRC="../editor/ewebeditor.htm?id=Content&style=user" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME></td>
            </tr>
            <tr>
              <td valign="top"><p>
                <input name="myyn" type="checkbox" id="myyn" value="2" <%If rs("yn")=2 then Response.Write(" checked") end if%>/>
                只允许自己看 </p>
                <p style="color:#ccc;margin:10px;text-align:left;line-height:22px;">如果选中，您发布的文章将只有自己才能查看，网友将无法查看</p></td>
            </tr>
            <tr>
              <td height="30" align="left"><input name="id" type="hidden" id="id" value="<%=ID%>" /></td>
              <td height="30" align="left"><input type="submit" name="Submit3" value=" 修 改 " class="borderall" />
                <span class="b1_1">
                <input type="button" value="插入分页符" onClick="eWebEditor1.insertHTML('[yao_page]')"/>
                </span></td>
              <td height="30" align="left">&nbsp;</td>
            </tr>
          </table>
        </form>
<%
rs.close
set rs=nothing
End if
end sub

sub saveedit()

	dim Title,Content,ClassID
	ID = 		LaoYRequest(trim(request.form("ID")))
	Title = 	LoseHtml(trim(request.form("Title")))
	ClassID = 	LaoYRequest(trim(request.form("ClassID")))
	CopyFrom = 	LoseHtml(trim(request.form("CopyFrom")))
	Author = 	LoseHtml(trim(request.form("Author")))
	Content = 	request.form("Content")
	myyn = 		LaoYRequest(request.form("myyn"))

	set rs = server.CreateObject ("adodb.recordset")
	sql="select * from "&tbname&"_Article where ID="&id&" and UserName='"&LaoYName&"'"
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		Call Alert("这样不对!难道你想改人家的?","?action=list")		
	else
		if Title="" or ClassID="" or Content="" then
			Call Alert("请填写完整再提交！","-1")
		end if
		If Not Checkpost(True) Then Call Alert("禁止外部提交!","-1")
		rs("Title")				=Replace(Title,CHR(34),"&quot;")
		rs("ClassID")			=ClassID
		rs("Content")			=Content
		rs("Artdescription")	=left(LoseHtml(Content),250)
		rs("CopyFrom")			=CopyFrom
		rs("Author")			=Author
		If UserInfo(LaoyID,0)=1 then
			rs("yn")				=0
		else
			If useraddoff=1 then
			rs("yn")				=0
			End if
			If useraddoff=0 then
			rs("yn")				=1
			end if
			If myyn<>"" then
			rs("yn")				=2
			End if
		End if
		rs.update
		Call Alert("恭喜你,修改成功！","?action=list")
	end if
		rs.close
		Set rs = nothing
end sub

sub useredit()
set rs = server.CreateObject ("adodb.recordset")
sql="select * from "&tbname&"_User where UserName='"& UserName &"'"
rs.open sql,conn,1,1
%>
<script language=javascript>
function CheckForm()
{ 
  if (document.UserReg.UserEmail.value==""){
	alert("请输入Email！");
	document.UserReg.UserEmail.focus();
	return false;
  }
  var UserEmailStr = document.UserReg.UserEmail.value;
  if ((UserEmailStr.indexOf("@")==-1)||(UserEmailStr.indexOf(".")==-1)||(UserEmailStr.length<6)){
	alert("Email格式不对！");
	document.UserReg.UserEmail.focus();
	return false;
  }
  if (document.UserReg.province.value==""){
	alert("请选择所在地区！");
	document.UserReg.province.focus();
	return false;
  }
  if (document.UserReg.UserQQ.value==""){
	alert("请输入QQ！");
	document.UserReg.UserQQ.focus();
	return false;
  }
  var filter=/^\s*[0-9]{5,11}\s*$/;
  if (!filter.test(document.UserReg.UserQQ.value)) { 
	alert("QQ填写不正确,请重新填写！"); 
	document.UserReg.UserQQ.focus();
	return false; 
 }  	
}
function writeOption(varFrom,varTo)
{
	for(var i=varFrom;i<=varTo;i++)
	{
		document.write("<option VALUE="+i+">"+i+"</option>");
	}
}
</script>
<script language="javascript" src="images/SetDate.js"></script>
		<form action="?action=usersave" method="post" name="UserReg" onSubmit="return CheckForm();">
		  <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:176px;">
            <tr>
              <td width="24%" height="30" align="left">用户名：</td>
              <td width="53%" align="left"><%=rs("UserName")%></td>
              <td width="23%" rowspan="6" align="center"><img src="<%If rs("UserFace")<>"" then Response.Write(""&SitePath&""&SiteUp&"/UserFace/"&rs("UserFace")&"") else Response.Write(""&SitePath&"images/noface.gif") end if%>" width=100 height=100/></td>
            </tr>
            <tr>
              <td height="30" align="left">密码(至少6位)：<br />              </td>
              <td align="left"><input name="UserPassword" type="password"  class="borderall" size="18" maxlength="12" style="width:140px;" />
                *不修改请留空</td>
              </tr>
            <tr>
              <td height="30" align="left">确认密码(至少6位)：</td>
              <td align="left"><input name="PwdConfirm" type="password"  class="borderall" size="18" maxlength="12" style="width:140px;" /></td>
              </tr>
            <tr>
              <td height="30" align="left">性别：</td>
              <td align="left"><input name="UserSex" type="radio" value="1" <%If rs("sex")=1 then Response.Write("checked") end if%>/>
                男
                <input name="UserSex" type="radio" value="0" <%If rs("sex")=0 then Response.Write("checked") end if%>/>
                女</td>
              </tr>
            <tr>
              <td height="30" align="left">Email地址：</td>
              <td align="left"><input name="UserEmail"  class="borderall" value="<%=rs("Email")%>" size="30" maxlength="50" />
                  <font color="#FF0000">*</font> </td>
              </tr>
            <tr>
              <td height="30" align="left">出生日期：</td>
              <td align="left"><input name='Birthday' type='text' class="borderall" onFocus="WdatePicker({isShowClear:false,readOnly:true,startDate:'1960-01-01',minDate:'1960-01-01',maxDate:'1994-12-31',skin:'whyGreen'})" value="<%=rs("birthday")%>" style="width:140px;"/>              </td>
              </tr>
            <tr>
              <td height="30" align="left">籍贯(省/市)：</td>
              <td colspan="5" align="left"><select onChange="setcity();" name='province' style="width:90px;">
                  <option value=''>请选择省份</option>
                  <option value="广东">广东</option>
                  <option value="北京">北京</option>
                  <option value="重庆">重庆</option>
                  <option value="福建">福建</option>
                  <option value="甘肃">甘肃</option>
                  <option value="广西">广西</option>
                  <option value="贵州">贵州</option>
                  <option value="海南">海南</option>
                  <option value="河北">河北</option>
                  <option value="黑龙江">黑龙江</option>
                  <option value="河南">河南</option>
                  <option value="香港">香港</option>
                  <option value="湖北">湖北</option>
                  <option value="湖南">湖南</option>
                  <option value="江苏">江苏</option>
                  <option value="江西">江西</option>
                  <option value="吉林">吉林</option>
                  <option value="辽宁">辽宁</option>
                  <option value="澳门">澳门</option>
                  <option value="内蒙古">内蒙古</option>
                  <option value="宁夏">宁夏</option>
                  <option value="青海">青海</option>
                  <option value="山东">山东</option>
                  <option value="上海">上海</option>
                  <option value="山西">山西</option>
                  <option value="陕西">陕西</option>
                  <option value="四川">四川</option>
                  <option value="安徽">安徽</option>
                  <option value="台湾">台湾</option>
                  <option value="天津">天津</option>
                  <option value="新疆">新疆</option>
                  <option value="西藏">西藏</option>
                  <option value="云南">云南</option>
                  <option value="浙江">浙江</option>
                  <option value="海外">海外</option>
                </select>
                  <select name='city'  style="width:90px;">
                  </select>
                  <script src="<%=SitePath%>images/getcity.js"></script>
                  <script>initprovcity('<%=rs("province")%>','<%=rs("city")%>');</script>
                  <font color="#FF0000">*</font></td>
            </tr>
            <tr>
              <td height="30" align="left">QQ号码：</td>
              <td colspan="2" align="left"><input name="UserQQ"  class="borderall" value="<%=rs("UserQQ")%>" size="30" maxlength="11" />
                  <font color="#FF0000">*</font></td>
            </tr>
            <tr>
              <td height="30" rowspan="2" align="left">头像：</td>
              <td colspan="2" align="left"><input name="UserFace" type="text" id="UserFace" value="<%=rs("UserFace")%>" style="width:0px;height:0px;border:0"/>
                  <iframe src="upload.asp?action=simg" width="400" height="25" frameborder="0" scrolling="No"></iframe></td>
            </tr>
            <tr>
              <td colspan="2" align="left"><span style="color:#ccc;">注：不管你的头像是多大尺寸，程序都会强制缩小为100X100</span></td>
            </tr>
            <tr>
              <td height="30" align="left">签名：<br />
                  <span style="color:#ccc;">200字内,支持Html</span></td>
              <td colspan="2" align="left"><textarea name="qm" id="qm" cols="40" rows="5" style="font-size:12px;"><%=rs("qm")%></textarea></td>
            </tr>
            <tr align="middle">
              <td height="50" colspan="3"><input id="Action" type="hidden" value="SaveReg1" name="Action2" />
                  <input name="Submit2" type="submit"  class="borderall" value=" 修改 " /></td>
            </tr>
          </table>
		</form>
<%
rs.close
set rs=nothing
end sub

sub usersave()
PassWord1 = trim(request.form("UserPassWord"))
PassWord2 = trim(request.form("PwdConfirm"))
Sex = 		LaoYRequest(request.form("UserSex"))
Email = 	CheckStr(trim(request.form("UserEmail")))
QQ = 		LaoYRequest(trim(request.form("UserQQ")))
TrueName = 	CheckStr(trim(request.form("TrueName")))
Province = 	CheckStr(request.form("Province"))
City = 		CheckStr(request.form("City"))
birthday = 	CheckStr(request.form("birthday"))
qm = 		trim(request.form("qm"))

	If Not Checkpost(True) Then Call Alert("禁止外部提交!","-1")
	set rs = server.CreateObject ("adodb.recordset")
	sql="select * from "&tbname&"_user where UserName='"&UserName&"'"
	rs.open sql,conn,1,3
		if Email="" or City="" then
			Call Alert("请填写完整再提交","-1")
		end if
		If PassWord1<>PassWord2 then
			Call Alert("两次输入的密码不同","-1")
		End if
		
		If PassWord1<>"" then
		rs("PassWord")			=md5(PassWord1,16)
		end if
		rs("Sex")				=Sex
		rs("Email")				=Email
		rs("UserQQ")			=QQ
		rs("Province")			=Province
		rs("City")				=City
		If birthday<>"" then
		rs("birthday")			=birthday
		end if
		rs("qm")				=left(qm,200)
		rs.update
		Response.Write("<script language=javascript>alert('恭喜你,修改成功');this.top.location.href='?action=useredit';</script>")
		rs.close
		Set rs = nothing
end sub

sub del()
	id=LaoYRequest(request("id"))
	set rs=conn.execute("delete from "&tbname&"_Article where UserName='"&UserName&"' and id="&id)
	set rs=conn.execute("Update "&tbname&"_User set UserMoney = UserMoney-"&money2&" where ID="&LaoYID)
	Call Alert ("删除成功！","?action=list")		
end sub
%>	
</td>
      </tr>
  </table>
<%
sub Admin_ShowClass_Option()
   Dim Sqlp,Rsp,TempStr
   Sqlp ="select * from "&tbname&"_Class Where TopID = 0 And link<>1 order by num"   
   Set Rsp=server.CreateObject("adodb.recordset")   
   rsp.open sqlp,conn,1,1 
   Response.Write("<option value="""">请选择分类</option>") 
   If Rsp.Eof and Rsp.Bof Then
      Response.Write("<option value="""">请先添加分类</option>")
   Else
      Do while not Rsp.Eof   
         Response.Write("<option value")
		 If Yao_MyID(rsp("ID"))<>"0" or rsp("IsUser")=0 then
		 Response.Write("=""-1"" style=""background:#f7f7f7;color:#ccc;""")
		 else
		 Response.Write("=" & """" & Rsp("ID") & """" & " style=""color:#0000ff;""")
		 End if
         Response.Write(">|-" & Rsp("ClassName") & "</option>")
		 
		    Sqlpp ="select * from "&tbname&"_Class Where TopID="&Rsp("ID")&" And link<>1 And IsUser=1 order by num"   
   			Set Rspp=server.CreateObject("adodb.recordset")   
   			rspp.open sqlpp,conn,1,1
			Do while not Rspp.Eof 
				Response.Write("<option value=" & """" & Rspp("ID") & """" & "")
         		Response.Write(" style=""color:#0000ff;"">　|-" & Rspp("ClassName") & "")
				Response.Write("</option>" ) 
			Rspp.Movenext   
      		Loop
			rspp.close
			set rspp=nothing
      Rsp.Movenext   
      Loop   
   End if
   rsp.close
   set rsp=nothing
end sub 
End if
%>
<%=Copy%></div>
</div>
</body>
</html>