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

📄 register.asp

📁 人事管理始终是一个及其复杂的工作。本系统对学校教职工人事档案管理尤其是对学校年报工作有着极大方便的意义。该系统是ASP程序网络版系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
  Session.Abandon
  MM_logoutRedirectPage = "../index.asp"
  ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
  if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    MM_newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "MM_Logoutnow") Then
        If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
        MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
  End If
  Response.Redirect(MM_logoutRedirectPage)
End If
%>
<!--#include file="../Connections/conn.asp" -->
<%
' *** Edit Operations: declare variables

MM_editAction = CStr(Request("URL"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) <> "") Then

  MM_editConnection = MM_conn_STRING
  MM_editTable = "yonghu"
  MM_editRedirectUrl = "regsucc.asp"
  MM_fieldsStr  = "uname|value|upassword|value|upassword2|value|ubumen|value|uxingming|value|uemail|value|uphone|value|uyongtu|value|uxinxi|value"
  MM_columnsStr = "uname|',none,''|upassword|',none,''|upassword2|',none,''|ubumen|',none,''|uxinming|',none,''|uemail|',none,''|uphone|',none,''|uyongtu|',none,''|uxinxi|',none,''"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    FormVal = MM_fields(i+1)
    MM_typeArray = Split(MM_columns(i+1),",")
    Delim = MM_typeArray(0)
    If (Delim = "none") Then Delim = ""
    AltVal = MM_typeArray(1)
    If (AltVal = "none") Then AltVal = ""
    EmptyVal = MM_typeArray(2)
    If (EmptyVal = "none") Then EmptyVal = ""
    If (FormVal = "") Then
      FormVal = EmptyVal
    Else
      If (AltVal <> "") Then
        FormVal = AltVal
      ElseIf (Delim = "'") Then  ' escape quotes
        FormVal = "'" & Replace(FormVal,"'","''") & "'"
      Else
        FormVal = Delim + FormVal + Delim
      End If
    End If
    If (i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End if
    MM_tableValues = MM_tableValues & MM_columns(i)
    MM_dbValues = MM_dbValues & FormVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
<%
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_conn_STRING
Rs.Source = "SELECT * FROM yonghu"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 3
Rs.Open()
Rs_numRows = 0
%>
<html>
<head>
<title>用户注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="files/cssresult.css" type="text/css">
<link rel="stylesheet" href="../files/cssresult.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../files/bg.jpg" leftmargin="0" topmargin="0">
<div align="center"><a href="../index1.asp" target="_self"><font color="#660000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"><img src="top.gif" width="777" height="106" usemap="#Map" border="0" align="middle"></span></font></b></font></b></font></b></font></b></font><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"> 
  <map name="Map"> 
    <area shape="rect" coords="7,79,59,104" href="../index1.asp" target="_self">
    <area shape="rect" coords="62,79,113,106" href="../search.asp" target="_self">
    <area shape="rect" coords="116,78,208,103" href="../add.asp" target="_self">
    <area shape="rect" coords="307,77,359,103" href="admuserlogin.asp" target="_self">
    <area shape="rect" coords="697,75,749,103" href="loginout.asp" target="_self">
    <area shape="rect" coords="640,75,693,103" href="../index.asp" target="_self">
    <area shape="rect" coords="212,78,303,103" href="../view.asp" target="_self">
    <area shape="rect" coords="685,7,762,39" href="../help.htm">
  </map>
  </span></font></b></font></b></font></b></font></b></font><font color="#0000FF"></font></b></font></b></font></b><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"> 
  </span></font></b></font></b></font></b></font></a><br>
  <font color="#660000"><b class="cssindexda"><font color="#FF0000">用户注册</font></b></font></div>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="formreg">
  <table width="43%" border="0" cellspacing="3" cellpadding="0" align="center" height="188">
    <tr> 
      <td class="cssresult" width="35%">用户名:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="uname" maxlength="20">
        *必填</td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">密码:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="upassword" maxlength="20">
        *必填</td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">确认密码:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="upassword2" maxlength="20">
        *必填</td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">您的真实姓名:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="uxingming">
        *必填 </td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">所属部门:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="ubumen">
      </td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">E-Mail:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="uemail">
      </td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">联系电话:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="uphone">
      </td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">申请用途:</td>
      <td class="cssresult" width="65%"> 
        <input type="text" name="uyongtu">
      </td>
    </tr>
    <tr> 
      <td class="cssresult" width="35%">其他个人信息:</td>
      <td class="cssresult" width="65%"> 
        <textarea name="uxinxi" cols="25" rows="3"></textarea>
      </td>
    </tr>
  </table>
  <div align="center"> <br>
    <input type="submit" name="Submit" value="我要注册">
  </div>
  <input type="hidden" name="MM_insert" value="true">
</form>
</body>
</html>
<%
Rs.Close()
%>

⌨️ 快捷键说明

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