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

📄 useredit.asp

📁 目前人力资源管理系统的发展已经相对成熟
💻 ASP
字号:
<!--#include file=DataBase/conn.asp-->
<!--#include file=yan.asp-->
<!--#include file=purview.asp-->
<%
call yonghuguanli
if request("post")<>"" then
'判断字段是否为空
if request("username")="" then
response.Write("<script language=javascript>alert('用户名必须填写');location='javascript:history.go(-1)'</script>")
response.End()
end if
if request("userpwd")="" then
response.Write("<script language=javascript>alert('密码必须填写');location='javascript:history.go(-1)'</script>")
response.End()
end if
if request("userpwd")<>request("userpwd2") then
response.Write("<script language=javascript>alert('两次输入密码不一致');location='javascript:history.go(-1)'</script>")
response.End()
end if

'修改用户
set rsa=server.CreateObject("adodb.recordset")
sqla="select * from tb_User where id="&request("uid")
rsa.open sqla,conn,1,3

rsa("username")=request("username")
rsa("userpwd")=request("userpwd")
rsa("name")=request("nameid")
rsa.update
rsa.close
response.Write("<script language=javascript>alert('修改成功!')</script>")
end if
'用户
set rsy=server.CreateObject("adodb.recordset")
sqly="select * from tb_User where id="&request("uid")
rsy.open sqly,conn,1,1 
'员工
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_Employee where kong=1"
rs.open sql,conn,1,1 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="CSS/css.css" rel="stylesheet" type="text/css">
<script language="javascript">
function more()
{
var id=form1.nameid.value;
      window.open("employeeopen.asp?id="+id,"","width=450,height=450,toolbar=no,location=no,status=no,menubar=no");
}
</script>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style></head>

<body>
<form name="form1" method="post" action="">
  <table width="468" height="150"  border="0" align="center" cellspacing="1">
    <tr align="center">
      <td height="27" colspan="2">修改用户</td>
    </tr>
    <tr>
      <td width="32%" height="28"><div align="right">用户名:</div></td>
      <td width="68%">&nbsp;<input name="username" type="text" class="wenben" id="username" value="<%=rsy("username")%>" readonly="true">
        <input name="post" type="hidden" id="post" value="true"></td>
    </tr>
    <tr>
      <td height="28"><div align="right">密码:</div></td>
      <td>&nbsp;<input name="userpwd" type="password" class="wenben" id="userpwd" value="<%=rsy("userpwd")%>"></td>
    </tr>
    <tr>
      <td height="28" align="right">确认密码:</td>
      <td>&nbsp;<input name="userpwd2" type="password" class="wenben" id="userpwd2" value="<%=rsy("userpwd")%>"></td>
    </tr>
    <tr>
      <td height="26"><div align="right">对应人员:</div></td>
      <td>&nbsp;
        <select name="nameid" id="nameid">
          <%
       do while not rs.eof 
	  %>
          <option value="<%=rs("id")%>" <%if rs("id")=clng(rsy("name")) then%>selected<%end if%> ><%=rs("name")%></option>
          <%
	 rs.movenext
	 loop
	 %>
        </select>
      <input name="Submit3" type="button" class="botton" value=" 详细资料 " onClick="more()"></td>
    </tr>
    <tr align="center">
      <td colspan="2"><input name="Submit" type="submit" class="botton" value="提交">
       
        <input name="Submit2" type="reset" class="botton" value="重置">
         
        <input name="Submit4" type="button" class="botton" onClick="location='userguan.asp'" value="返回"></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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