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

📄 admin_uppwdself.asp

📁 这个系统是企业管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% Server.ScriptTimeout = 99999 %>

<!--#include file="Check_Sql123.asp" -->

<!--#include file="admin_qx.asp" -->
<%  call islogin() %>
<!--#include file="jm5.asp"-->

<!--#include file="conn_db123.asp" -->
<%
admin_id_log=session("admin_id_log")
if  admin_id_log=""  then
response.Write "<script language=javascript>{window.alert('您尚未登录或登录超时,请重新登录!');window.open('index.asp','_parent'); }</script>"
response.end
end if
sql="select * from admin_123  where admin_id="&admin_id_log&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,2
%>
<%
isupdate=trim(request("isupdate"))

oldpwd=trim(request("oldpwd"))
adminpwd_new=trim(request("adminpwd_new"))
adminpwd2_new=trim(request("adminpwd2_new"))

if isupdate="1"then

 
  if adminpwd_new<>"" or adminpwd2_new <>""then
 
 if adminpwd_new<>adminpwd2_new then
	  response.Write "<script language=javascript>{window.alert('报错:两次输入的密码不相同!\n“新密码”和“确认新密码”只有要需要修改密码的时候填写。\n       如不需要修改密码则不需要填写,此时请让“新密码”和“确认新密码”留空');window.history.go(-1);}</script>"
	  response.end
end if

	if len(adminpwd_new)<5 or len(adminpwd_new)>30 then
response.Write "<script language=JavaScript>{window.alert('报错:密码长度不够,至少要输入五位,最长不超过30位!');window.history.go(-1);}</script>"
response.End()
   end if
   
   end if
				 
if oldpwd="" then 
response.Write "<script language=javascript>{window.alert('报错:在修改新密码前必须输入原密码!');window.history.go(-1);}</script>"
response.End
else     
   if md5(oldpwd)<>rs("adminpwd") then 
	 response.Write "<script language=javascript>{window.alert('报错:您输入的原密码错误,要修改密码必须核实原密码!');window.history.go(-1);}</script>"
	 response.End
end if
end if

'-------
if oldpwd<>"" and adminpwd_new<>"" and adminpwd2_new<>"" then
if adminpwd_new=adminpwd2_new then
if md5(oldpwd)=rs("adminpwd") then
rs("adminpwd")=md5(adminpwd_new)
end if
end if
end if

rs.update
response.Write "<script language=JavaScript>{window.alert('恭喜您,密码修改成功!下次登录时请用新密码!');window.history.go(-1);}</script>"


end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<title>修改密码</title>
<style type="text/css">
<!--
.STYLE5 {color: #000000}
.STYLE15 {font-size: 14; color: #FF0000; }
.STYLE7 {font-size: 12px; color: #0000FF; }
.STYLE17 {color: #006600}
.STYLE4 {font-size: 12px; color: #FF0000; }
.style1 {color: #0000FF}
body {
	SCROLLBAR-FACE-COLOR: #c6ebde;
	SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
	SCROLLBAR-SHADOW-COLOR: #39867b;
	SCROLLBAR-3DLIGHT-COLOR: #39867b;
	SCROLLBAR-ARROW-COLOR: #330000;
	SCROLLBAR-TRACK-COLOR: #e2f3f1;
	SCROLLBAR-DARKSHADOW-COLOR: #ffffff;
	background-image: url();
	background-color: #d6dff7;
}
body,td,th {
	font-size: 13px;
}
.STYLE13 {color: #0000FF; font-size: 14px; }
.STYLE2 {color: #FF0000}
.style3 {color: #FF0000}
-->
</style>
</head>

<body>
<table class=tableBorder width="95%" border=0 align="center" cellpadding=5 cellspacing=1>
    <tbody>
      <tr>
        <th width="100%" height=21 sytle="line-height:150%"><span class="STYLE7">【修改密码】<a href="javascript:window.history.go(-1)" class="STYLE17"></a></span></th>
      </tr>
      <tr>
        <td  class=forumRow>
<form action="admin_uppwdself.asp" method="post" name="form1" target="_self" id="form1">
  <label></label>
  <label>
     <table width="99%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#F3F3F3" style="border-collapse: collapse">
      <tr>
        <td width="251"  class="STYLE5"><div align="right">真实姓名:</div></td>
        <td><%=rs("adminname")%><span class="STYLE7">   --用户名不可以修改,如要修改请联系级管理员--</span></td>
      </tr>
      <tr>
        <td  class="STYLE5"><div align="right">用户名:</div></td>
        <td width="569"><label><%=rs("adminlogin")%>  <span class="STYLE7">--用户名不可以修改,如要修改请联系管理员--</span></label></td>
      </tr>
      
      <tr>
        <td class="STYLE4"><div align="right"><span class="STYLE15">原密码:</span></div></td>
        <td><input name="oldpwd" type="password" id="oldpwd">
        <span class="STYLE7">在修改密码前必须输入原密码</span></td>
      </tr>
      <tr>
        <td class="STYLE4"><div align="right"><span class="STYLE15">新密码:</span></div></td>
        <td><input name="adminpwd_new" type="password" id="adminpwd_new">
        <span class="STYLE7">新密码可以是字母、数字和符号的组合</span></td>
      </tr>
      <tr>
        <td class="STYLE4"><div align="right"><span class="STYLE15">再次输入新密码:</span></div></td>
        <td><input name="adminpwd2_new" type="password" id="adminpwd2_new">
            <span class="STYLE7">新密码确认</span></td>
      </tr>
      <tr>
        <td align="right" class="STYLE4">您有的帐户身份为:</td>
        <td class="STYLE4"><%if rs("admin_shenfen")="0"then response.write "<font color=#ff0000>系统管理员</font>" %>
          <%if rs("admin_shenfen")="1"then response.write "<font color=#009900>一般管理员</font>" %>
          </td>
      </tr>
      <tr>
        <td align="right" class="STYLE4">您有的具体权限为:</td>
        <td class="STYLE4">	<%if rs("admin_shenfen")="0"then 
		response.write "<font color=#ff0000>拥有系统的一切权限,请慎用!</font>" %>
		<%else%>
		<%if  rs("admv_jb")="T"then response.write"查看、"%>
		<%if  rs("adma_jb")="T"then response.write"添加、"%>
		<%if  rs("admu_jb")="T"then response.write"修改、"%>
		<%if  rs("admd_jb")="T"then response.write"删除、"%>

			<%if  rs("admc_jb")="T"then response.write"审核"%>
			<%end if%></td>
      </tr>
    </table>
  <p align="center">
    <input type="submit" name="Submit" value="密码执行修改"style="width:100;background-color: #B7F4D6; color: #000000; border: 1 solid #00CC00">
    <input name="isupdate" type="hidden" id="isupdate" value="1">     
    <a href="javascript:window.history.go(-1)" class="STYLE17"></a><a href="javascript:window.history.go(-1)" class="STYLE17"><u>不修改密码的话可点击此处返回</u></a><br>
  </p>
    </form>
</td>
      </tr>
    </tbody>
</table>

<p><%
sql_logindiary="select * from diary_admin_login where admin_id="&admin_id_log&" order by id desc"
set rs_logindiary=server.CreateObject("adodb.recordset")
rs_logindiary.open sql_logindiary,conn,1,2

PageSize=trim(request("pageSize"))
if PageSize<>""then
session("pageSize")=PageSize
pz=PageSize
end if
if PageSize=""then
 if session("pageSize")<>""then
 pz=session("pageSize")
 else
 pz=10
 end if
 end if
 
rs_logindiary.PageSize=pz
pagecount=rs_logindiary.PageCount 
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs_logindiary.AbsolutePage=page
%></p>
<table width=95% border=1 align="center" cellpadding=0 cellspacing=0 
            bordercolorlight=#6699ff bordercolordark=#ffffff bgcolor="#FFFFFF" style="border-collapse:collapse">
  <col width="166" />
  <tr height="21">
    <td height="22" colspan="5" align="center"  bgcolor="#CCFF00" class="STYLE4">以下显示的是您所有登录本系统的记录,如有登录情况异常,请联系管理员</td>
  </tr>
  <tr height="21">
    <td width="8%" height="22" align="center"  bgcolor="#CCFF00" class="STYLE4">行号</td>
    <td width="13%" align="center" valign="middle"  bgcolor="#CCFF00" class="STYLE2">管理员姓名</td>
    <td width="28%" align="center" valign="middle"  bgcolor="#CCFF00" class="STYLE2">单位</td>
    <td width="28%" align="center" valign="middle"  bgcolor="#CCFF00" class="STYLE2">登录时间</td>
    <td width="23%" align="center" valign="middle"  bgcolor="#CCFF00" class="STYLE2">访问IP</td>
  </tr>
  <%count=0
do while not rs_logindiary.eof and count<rs_logindiary.pagesize %>
  <%if count Mod 2=0 then%>
  <tr bgcolor="#E2EEFC" onMouseOver="this.style.backgroundColor='#F1FFB9'" onMouseOut="this.style.backgroundColor='#E2EEFC'">
    <%end if%>
    <td height="22" align="center" ><%=xuhao2+1%></td>
    <td height="22" align="center" class="STYLE17"><%=rs_logindiary("adminname")%></td>
    <td height="22" align="center" class="STYLE17"><%=rs_logindiary("danwei")%></td>
    <td height="22" align="center" class="STYLE17" ><%=rs_logindiary("logintime")%></td>
    <td height="22" align="center"><span class="STYLE17" style="font-size: 12px"><%=rs_logindiary("loginip")%></span></td>
  </tr>
  <%
  rs_logindiary.movenext
  count=count+1
  xuhao2=xuhao2+1
  loop

  %>
</table>
<p align="center"><span class="style4">共有<%=rs_logindiary.recordcount%>条记录,每页显示<%=rs_logindiary.pagesize%>条 ,第<%=page%>/<%=rs_logindiary.pagecount%>页&nbsp;
    <%if page>1 then%>
    <a href="?Page=<% = 1%>&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>">首页</a><a href="?Page=<% = 1%>"&key=<%=key%>&ziduan=<%=ziduan%>></a> <a href="?Page=<% =page -1 %>&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>">上一页</a><a href="?Page=<% =page -1 %>&key=<%=key%>&ziduan=<%=ziduan%>"></a>
    <%end if %>
    <%if page<>rs_logindiary.pagecount then %>
    <a href="?Page=<% =page + 1%>&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>">下一页</a><a href="?Page=<% =page + 1%>&key=<%=key%>&ziduan=<%=ziduan%>"></a> <a href="?Page=<% = rs_logindiary.PageCount%>&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>">尾页</a><a href="?Page=<% = rs_logindiary.PageCount%>&key=<%=key%>&ziduan=<%=ziduan%>"></a></span>
  <% end if %>
  <select name="select2" id="select" onChange="javascript:window.location.href('?page='+this.options[this.selectedIndex].value+'&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>')">
    <% for i=1 to rs_logindiary.pagecount%>
    <option value="<%=i%>" <%if i=page then response.Write("selected") end if%> ><%=i%> </option>
    <% next%>
  </select>
  <span class="STYLE13">
  <select name="pagesize" id="pagesize" onChange="javascript:window.location.href('?pagesize='+this.options[this.selectedIndex].value+'&key=<%=key%>&ziduan=<%=ziduan%>&by=<%=by%>')">
    <% for iii=10 to 50 step 5%>
    <option value="<%=iii%>" <%if iii=rs_logindiary.pagesize then response.Write("selected") end if%> >每页显示<%=iii%>条记录</option>
    <% next%>
    <% for i=60 to 180 step 20%>
    <option value="<%=i%>" <%if i=rs_logindiary.pagesize then response.Write("selected") end if%> >每页显示<%=i%>条记录</option>
    <% next%>
    <% for ii=200 to 1000 step 200%>
    <option value="<%=ii%>" <%if ii=rs_logindiary.pagesize then response.Write("selected") end if%> >每页显示<%=ii%>条记录</option>
    <% next%>
    <option value="10000" <%if rs_logindiary.pagesize=10000 then response.Write("selected") end if%> >每页显示10000条记录</option>
  </select>
  </span></p>
</body>
</html>


⌨️ 快捷键说明

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