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

📄 hx_register.asp

📁 一个比较完整的oa系统
💻 ASP
字号:
<!--#INCLUDE FILE="HXINCLUDE/HXINCLUDETOP.ASP"-->
<%action=request("action"):ColumnName="":Tablename="HX_CompanyUser"
'程序编写及设计:徐勇
'QQ号码: 563097256(网络侠客)
'网址:http://www.wsoas.com
'E_mail(MSN):netcst@126.com 
'电话:13856921303   0551-5168961
'以上信息不影响程序运行!
'在使用过程中请保留以上信息,以便出现问题时及时与我取得联系
'注意:免费版程序不得用于商业用途,否则后果自负!!!!
if action="saveinfo" then  Orderby=" where WS_Username='"&WS_s.HX_Replace(request.form("WS_Username"))&"'" else  Orderby=" ORDER BY WS_Uid DESC"
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
  rs.addnew:rs("WS_Code")=WS_s.HX_Replace(request.form("WS_Code")):rs("WS_username")=WS_s.HX_Replace(request.form("WS_username")):rs("WS_password")=MD5(WS_s.HX_Replace(request.form("WS_password")))
  rs("WS_name")=WS_s.HX_Replace(request.form("WS_name")):rs("WS_Appointment")=WS_s.HX_Replace(request.form("WS_Appointment"))  :  rs("WS_sex")=WS_s.HX_Replace(request.form("WS_sex"))
  rs("WS_phone")=WS_s.HX_Replace(request.form("WS_phone")):rs("WS_email")=WS_s.HX_Replace(request.form("WS_email")):rs("WS_department")=WS_s.HX_Replace(request.form("WS_department")):rs("WS_title")=WS_s.HX_Replace(request.form("WS_title"))
  if RegFlag=True then
    rs("WS_leave")=True
    msg="注册成功:\n请等待审核!"
  else
    msg="注册成功!"
  end if
  rs.update
  response.write "<script>alert('"&msg&"');window.close();</script>"
end if
If rs.recordcount>0 then  WS_Code="JB"&(replace(rs("WS_Code"),"JB","")+1) else  WS_Code="JB1000"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>员工自行注册</title>
<link rel=stylesheet type=text/css href="HXinclude/HX_Style.css">
</head>
<body topmargin="10" leftmargin="0" bottommargin="0">
<%
set aprs=WS_S.HX_SetRSD("WS_Aid,WS_AppointmentName,WS_Did","HX_Appointment"," order by WS_OrderBy asc")
if aprs.recordcount>0 then		    %>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not aprs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(aprs("WS_AppointmentName"))%>","<%= aprs("WS_Did")%>","<%= aprs("WS_Aid")%>");
<%
        count = count + 1
        aprs.movenext
        loop
		end if
call WS_S.HX_RSClose(aprs)        
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form1.WS_Appointment.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
             document.form1.WS_Appointment.options[document.form1.WS_Appointment.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<script language="JavaScript">
function amsub(form)
{
if (form.WS_UserName.value=="")
{ alert("请输入用户名!");
  form.WS_UserName.focus();
  return false
}
if ((form.WS_password.value=="")||(form.WS_password.value!=form.repassword.value))
{ alert("密码不能为空或二次密码不一致!");
  form.repassword.focus();
  return false
}
if (form.WS_name.value=="")
{ alert("请输入姓名!");
  form.WS_name.focus();
  return false
}
if (form.WS_Appointment.value=="")
{ alert("请输入职务!");
  form.WS_Appointment.focus();
  return false
}
return true
}
</script>
<table width="400"  border="0" cellspacing="1" cellpadding="0" align=center bgcolor="#115F8F">
  <tr>
    <td width="400" colspan="2" bgcolor=ffffff><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" background="hximages/titleline.gif"><font class="fontmenu">用户注册</font></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="1" cellpadding="3" bgcolor=f1f1f1>
  <form name="form1" method="post" action="" onSubmit="return amsub(this);">
    <tr bgcolor="#FFFFFF">
      <td align="right">员工编号:</td>
      <td><input type="text" name="WS_Code" maxlength="8" size="8" value="<%=WS_Code%>" readonly></td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td width="27%" align="right">用 户 名:</td>
    <td width="73%"><input type="text" name="WS_UserName"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">密  码:</td>
    <td><input type="password" name="WS_password" size=21></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">确认密码:</td>
    <td><input type="password" name="repassword" size=21></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">姓  名:</td>
    <td><input type="text" name="WS_name"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">性  别:</td>
    <td><select name="WS_sex">
                                <option>男</option>
                                <option>女</option>
                           </select>  </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">&nbsp;联系电话:</td>
     <td><input type="text" name="WS_phone" maxlength="50"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">电子信箱:</td>
    <td><input type="text" name="WS_email" maxlength="50"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">所属部门:</td>
    <td>
	  <select name="WS_department" onChange="changelocation(document.form1.WS_department.options[document.form1.WS_department.selectedIndex].value)">
							  <%set ders=WS_S.HX_SetRSD("WS_DepartmentName,WS_Did","HX_Department"," order by WS_OrderBy asc")
							    if ders.recordcount>0 then
								sele=ders(1)
								do until ders.eof
								%>
                                <option value="<%=ders(1)%>"><%=ders(0)%></option>
                                <%
								ders.movenext
								loop
								end if
								call WS_S.HX_RSClose(ders)
								%>
                              </select></label></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">职  务:</td>
    <td><select name="WS_Appointment">
                              <%
							    set aprs=WS_S.HX_SetRSD("WS_Aid,WS_AppointmentName","HX_Appointment"," where WS_Did="&sele&" order by WS_OrderBy asc")
							    if aprs.recordcount>0 then								
								do until aprs.eof
							  %>
                              <option value="<%=aprs(0)%>"><%=aprs(1)%></option>
                              <%
								aprs.movenext
								loop
								end if
							   call WS_S.HX_RSClose(aprs)
								%>
                            </select></label></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right" valign=top>备  注:</td>
    <td><textarea rows="5" name="WS_title" cols="30"  class="input4"></textarea></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td align="right">&nbsp;</td>
    <td><input type="submit" name="Submit" value=" 确定注册 ">
      <input type="reset" name="Submit2" value=" 重 置 ">
	  <input type="hidden" name="action" value="saveinfo">
	  </td>
  </tr></form>
</table></td>
  </tr>
</table>

⌨️ 快捷键说明

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