<!--#include file="conn.asp" -->
<!--#include file="inc/md5.asp" -->
<!--#include file="bbsuser.asp" -->
<%	
'强制浏览器重新访问服务器下载页面，而不是从缓存读取页面
Response.Buffer = True 
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache"
if request("pwd2")<>"" then
   id=request("id")
   userid=request("userid")
   photo_name=trim(request("photo_name"))
   sql="update ftblog_type set sign=2,alumpwd='"&request("pwd1")&"' where id="&id
   conn.execute sql
   sql="update ftbbs_upload set sign=2 where clubuser_id="&userid&" and photo_name='"&photo_name&"'"
   conn.execute sql
   response.redirect "blog_group.asp?nav=a"
end if
%>
<HTML>
<HEAD>
<TITLE>设置相册密码</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="htmledit/editor_dialog.css">
<script language="JavaScript">
function OK(){
  var str1="";
  var strurl=document.form1.pwd1.value;
  if (strurl=="")
  {
  	alert("请先输入密码！");
	document.form1.pwd1.focus();
	return false;
  }
  if (form1.pwd1.value!=form1.pwd2.value)
   {
    alert("密码和确认密码不一致！");
    form1.pwd2.focus();
    return false;
  	}
  else
  { 
    document.form1.submit()
    window.close();
  }
}
</script>
</head>
<BODY bgColor=menu topmargin=15 leftmargin=15 >
<form name="form1" method="post" action="">
<table width=100% border="0" align="center" cellpadding="0" cellspacing="2">
  <tr><td>
<FIELDSET align=left>
        <LEGEND align=left>设置密码</LEGEND>
        <table width="100%" border="0" align=center cellpadding="0" cellspacing="3">
          <tr> 
            <td colspan="2">密    &nbsp;&nbsp;&nbsp;码： 
              <input name="pwd1" type="password" id="url" value='' size=10 maxlength="10"> 
            </td>
          </tr>
          <tr> 
            <td> 确认密码： 
              <input name="pwd2" type="password" id=alttext size=10 maxlength="10"> </td>
          </tr>
        </table>
</fieldset>
</td><td width=80 align="center"><input name="cmdOK" type="button" id="cmdOK" value="  确定  " onClick="OK();">
  <br>
        <input name="id" type="hidden" id="id" value="<%=request("id")%>"><input name="userid" type="hidden" id="userid" value="<%=request("userid")%>">
		<input name="photo_name" type="hidden" id="photo_name" value="<%=request("photo_name")%>"> <br>
<input name="cmdCancel" type=button id="cmdCancel" onclick="window.close();" value='  取消  '></td></tr>
</table>
</form>
</body>
</html>