⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix3_usermit.asp

📁 这是ASP的OA
💻 ASP
字号:
<!-- #include file="const.asp" -->
<!-- #include file="convertpw.asp" -->
<%
dim sql,rs,name,action1,level,password,uid,question,answer,touxiang,nickname,signature
dim credit,meili,weiwang,jingyan,money,post,logintimes,level2
uid=trim1(request("uid"))
if not IsNumeric(uid) then
	response.Write("参数必须为数字型!")
	Response.end
end if
action1=trim(request.Form("action1"))
if uid="" then
	response.Redirect("error.asp?id=3")
	response.End()
end if
call opendb()
checkadmin()
if action1="DONE" then
	password=trim(request.Form("password"))
	question=trim(request.Form("question"))
	answer=trim(request.Form("answer"))
	level=cint(request.Form("level"))
	credit=cint(request.Form("credit"))
	meili=cint(request.Form("meili"))
	weiwang=cint(request.Form("weiwang"))
	jingyan=cint(request.Form("jingyan"))
	money=cint(request.Form("money"))
	level2=cint(request.Form("level2"))
	post=cint(request.Form("post"))
	logintimes=cint(request.Form("logintimes"))
	if question="" then
		call msg("请输入提示问题")
	end if
	if answer="" then
		call msg("请输入提示答案")
	end if	
	sql="select * from m3_users where uid="&uid&""
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		response.Redirect("error.asp?id=2")
		response.End()
	else
		if password<>"" then
			if rs("password")<>password then
				rs("password")=convertpw(password)
			end if
		end if
		rs("question")=question
		rs("answer")=answer
		rs("power")=level
		rs("credit")=credit
		rs("meili")=meili
		rs("weiwang")=weiwang
		rs("jingyan")=jingyan
		rs("money")=money
		rs("post")=post
		rs("logintimes")=logintimes
		rs("nickname")		=server.HTMLEncode(left(request.Form("nickname"),30))
		rs("touxiang")		=server.HTMLEncode(left(request.Form("touxiang"),150))
		rs("signature")		=server.HTMLEncode(left(request.Form("signature"),250))
		rs.update
	end if
	rs.close
	set rs=nothing
	call closedb()
	response.write("<script>alert('修改成功 !');location.href='matrix3_userlist.asp';</script>")
	response.End()
else
	sql="select * from m3_users where uid="&uid&""
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.Redirect("error.asp?id=2")
		response.End()
	else
		password=rs("password")
		question=rs("question")
		answer=rs("answer")
		name=rs("name")
		level=rs("power")
		credit=rs("credit")
		meili=rs("meili")
		weiwang=rs("weiwang")
		jingyan=rs("jingyan")
		money=rs("money")
		post=rs("post")
		logintimes=rs("logintimes")
		touxiang=rs("touxiang")
		nickname=rs("nickname")
		signature=rs("signature")
	end if
	rs.close
	set rs=nothing
	call closedb()
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="10" align="center" valign="top"><!-- #include file="topbar.asp" --></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><table width="100%" height="60%" border="0" cellpadding="0" cellspacing="0">
<tr> 
<td width="10" align="center" valign="top" bgcolor="#ECE9D9">

</td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="10">&nbsp;</td>
<td align="center" valign="top"> 
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr> 
                <td width="100%" height="30" class=v8><img src="images/btn_face.gif" width="10" height="7"> 
                  <a href="index.asp"><%=sitename%></a> <FONT face=Webdings color="#660000">8</FONT> <a href="matrix3_admin.asp">BBS管理</a> 
                  <FONT face=Webdings color="#660000">8</FONT> <a href="matrix3_userlist.asp">帐号管理</a> 
                  <font color="#FF0000">></font> 修改帐号信息</td>
</tr>
<tr> 
<td height="1" bgcolor="#ECE9D9"></td>
</tr>
</table>
<br>
<table width="96%" border="0" cellpadding="2" cellspacing="1" bgcolor="#E8BC3C">
<tr background="images/bg4.gif">
<td width="50%" background="images/bg4.gif">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF">
<br>
<form action="" method="post" name="mform" onSubmit="javascript:chkField();return false;">
                    <table width="471" border="0" cellpadding="4" cellspacing="1" bgcolor="#E8E4D0">
                      <tr> 
                        <td bgcolor="#D9D3B4" colspan="2" height="1"></td>
                      </tr>
                      <tr align="center"> 
                        <td height="50" colspan="2" bgcolor="#FFFFFF"><b><font color="#990000">修改帐号信息</font></b></td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>帐号</td>
                        <td width="274" bgcolor="#FFFFFF">&nbsp;<%=name%> </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>昵称</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="nickname" type="text" id="nickname" class="input1" value="<%=nickname%>" size="30" maxlength="30"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>密码</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="password" type="text" class="input1" id="password" value="<%=password%>" size="16" maxlength="16"> 
                          <font color="#666666">( MD5算法加密 ) </font></td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>提示问题</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="question" type="text" class="input1" id="question" value="<%=question%>" size="30" maxlength="100"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>提示答案</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="answer" type="text" class="input1" id="answer" value="<%=answer%>" size="30" maxlength="100"> 
                        </td>
                      </tr>
                      <tr> 
                        <td align="right" bgcolor="#FFFFFF" class=v8b> 身份</td>
                        <td bgcolor="#FFFFFF"><select name="level" id="level" class="input1">
                            <option value="0" <%if level=0 then response.write" selected"%>>锁定</option>
                            <option value="1" <%if level=1 then response.write" selected"%>>普通用户</option>
                            <option value="2" <%if level=2 then response.write" selected"%>>管理员</option>
                          </select> </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>积分</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="credit" type="text" class="input1" id="credit" value="<%=credit%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>威望</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="weiwang" type="text" class="input1" id="weiwang" value="<%=weiwang%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>魅力</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="meili" type="text" class="input1" id="meili" value="<%=meili%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>经验</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="jingyan" type="text" class="input1" id="jingyan" value="<%=jingyan%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>金钱</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="money" type="text" class="input1" id="money" value="<%=money%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>文章</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="post" type="text" class="input1" id="post" value="<%=post%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>登陆次数</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="logintimes" type="text" class="input1" id="logintimes" value="<%=logintimes%>" size="10" maxlength="10"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>自定义头像</td>
                        <td width="274" bgcolor="#FFFFFF"> <input name="touxiang" type="text" id="touxiang" class="input1" value="<%=touxiang%>" size="45" maxlength="150"> 
                        </td>
                      </tr>
                      <tr> 
                        <td width="177" align="right" bgcolor="#FFFFFF" class=v8b>签名档<br>
                          (250字以内)</td>
                        <td width="274" bgcolor="#FFFFFF"> <textarea name="signature" id="signature" class="input1" cols="40" rows="4"><%=signature%></textarea> 
                        </td>
                      </tr>
                      <tr align="center"> 
                        <td height="60" colspan="2" bgcolor="#FFFFFF"> <input name="uid" type="hidden" id="uid" value="<%=uid%>"> 
                          <input name="action1" type="hidden" id="action1" value="DONE"> 
                          <input name="Submit1" type="submit" class="input" id="Submit1" value="更改"> 
                          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <input name="cancel" type="button" id="cancel2" value="取消" class="input" onclick="history.go(-1)"> 
                        </td>
                      </tr>
                      <tr> 
                        <td colspan="2" bgcolor="#D9D3B4" height="1"></td>
                      </tr>
                      <tr> 
                        <td height="10" colspan="2" bgcolor="#FFFFFF"></td>
                      </tr>
                    </table>
                    <br>
                    <SCRIPT language=JavaScript>
function chkField()
{
		if (document.mform.password.value=="")
        {
            alert ('Invalid password ! ');
            document.mform.password.focus();
            return false;
        }
        if (document.mform.question.value.length <6)
        {
            alert ('Invalid question ! (no less than 6 characters)');
            document.mform.question.focus();
            return false;
        }
		if (document.mform.answer.value.length <6)
        {
            alert ('Invalid answer ! (no less than 6 characters)');
            document.mform.answer.focus();
            return false;
        }
       document.mform.submit();
	   document.mform.Submit1.disabled=true;
}
</script>
</form>

<br>
</td>
</tr>
</table>
<br>
</td>
<td width="10">&nbsp;</td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="100" bgcolor="#ECE9D9" valign="top"> <!-- #include file="matrix3_right.asp" --></td>
</tr>
</table></td>
  </tr>
  <tr> 
    <td height="10" align="center" valign="bottom"> 
      <!-- #include file="bottombar.asp" -->
    </td>
  </tr>
</table>
</body>
</html>
<%
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -