<!--#include file="conn.asp" -->
<%
'=====================================================================================
'flash饼图投票系统单用户版多选2.0
'flashballot2.0
'作者:毛虫
'网地:www.flashado.com
'email:mc@flashado.com
'如有BUG请尽快向我提出，这样我会尽快更新
'=====================================================================================
if (ChkPost()=false)then
		Session.Contents.Remove("name")
		Session.Contents.Remove("pass")
		Response.Redirect "login.asp"
		Response.end
End if
name=Session("name")
pass=Session("pass")
if(validpersonal(name,pass)=false)then
	Session.Contents.Remove("name")
	Session.Contents.Remove("pass")
	Response.Redirect "login.asp"
	Response.end
end if

If(Request.ServerVariables("REQUEST_METHOD")="POST") Then
	name=request.form("name")
	pass=request.form("pass")
	If(name="" or len(name)>10) Then
		sm=sm &"请填写用户名并小于10位数\n"
	End if
	If(pass="" or len(pass)>10) Then
		sm=sm &"请填写密码并小于10位数\n"
	End if
	If(sm="") Then	
		sql="update admin set name='"& strSql(name) &"',pass='"& strSql(pass) &"'"
		   set rs=conn.execute(sql)
			Session("name")=name
			Session("pass")=pass
			sm=sm &"用户名密码修改成功\n"
	End if
	If(sm<>"") Then
		Response.Write "<SCRIPT language=JavaScript>"
		Response.Write "alert('"& sm &"')"
		Response.Write "</SCRIPT>"
	End if
End if
	sql="select * from admin"
		set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,3,2
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>flashballot1.0</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="760" height="450" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#f2f2f2" class="zw">
      <tr>
        <td height="18" align="center" bgcolor="#99CC00"><strong><font color="#999900">|</font><a href="editpass.asp"><font color="#FFFFFF">修改密码</font></a><font color="#999900">|</font><a href="editballot.asp"><font color="#FFFFFF">修改投票内容</font></a><font color="#999900">|</font><a href="logout.asp"><font color="#FFFFFF">退出</font></a><font color="#999900">|</font></strong></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF"><br>
          <br>
          <br>
          <br>
          <br>
          <form name="form1" method="post">
          <table width="220"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF9900" class="zw">
            <tr>
              <td height="20" align="center" bgcolor="#FFCC00"><strong><font color="#FFFFFF">修改密码</font></strong></td>
            </tr>
            <tr>
              <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF" class="zw">
                  <tr bgcolor="#FFFFFF">
                    <td width="29%">用户名:</td>
                    <td width="71%"><input name="name" type="text" class="kuan1" size="15" maxlength="10" value="<%=strtext(rs("name"))%>"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF">
                    <td>密 码:</td>
                    <td><input name="pass" type="text" class="kuan1" size="15" maxlength="10" value="<%=strtext(rs("pass"))%>"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td height="25" align="center" bgcolor="#FFFFFF"><input name="Submit" type="submit" class="an1" value=" 修 改 "></td>
            </tr>
          </table>
        </form></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF">flashballot2.0 版权所有: <a href="http://www.flashado.com"><font color="#999999">www.flashado.com </font></a>作者：毛虫
          QQ：<font color="#666666">69862476</font> E-mail: <a href="mailto:mc@flashado.com"><font color="#666666">mc@flashado.com </font></a></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<%
set rs=nothing
set conn=nothing
%>