📄 add.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="2"
MM_authFailedURL="admin/accessfail.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
' *** 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 = "jg"
MM_editRedirectUrl = "ok.asp"
MM_fieldsStr = "name|value|firstxueli|value|xueke|value|birthday|value|firstxlgradufrom|value|mianmao|value|firstxuelidate|value|mianmaotime|value|sex|value|lastxueli|value|workstart|value|mingzu|value|lastxlgradufrom|value|shenfenzheng|value|jiguan|value|lastxldate|value|renshidaili|value|zhuanye|value|zhicheng|value|phone|value|leibie|value|zhichengdate|value|zhiwu|value|zhichpingyongdate|value|renjiaobumen|value|bianzhi|value|bianzhileibie|value|hunyin|value|chengyuan|value|danganhao|value|yibao|value|email|value|chunshen|value|zhuzhi|value|shehui|value|tuxiu|value|biandong|value|teacherzheng|value|jianli|value|gongzu|value|lunwen|value|niankao|value|peixunjl|value|jixujiaoyu|value|jiangcheng|value|beizhu|value"
MM_columnsStr = "name|',none,''|firstxueli|',none,''|xueke|',none,''|birthday|',none,NULL|firstxlgradufrom|',none,''|mianmao|',none,''|firstxuelidate|',none,NULL|mianmaotime|',none,NULL|sex|',none,''|lastxueli|',none,''|workstart|',none,NULL|mingzu|',none,''|lastxlgradufrom|',none,''|shenfenzheng|',none,''|jiguan|',none,''|lastxldate|',none,NULL|renshidaili|',none,''|zhuanye|',none,''|zhicheng|',none,''|phone|',none,''|leibie|',none,''|zhichengdate|',none,NULL|zhiwu|',none,''|zhichpingyongdate|',none,NULL|renjiaobumen|',none,''|bianzhi|',none,''|bianzhileibie|',none,''|hunyin|',none,''|chengyuan|',none,''|danganhao|',none,''|yibao|',none,''|email|',none,''|chushen|',none,''|zhuzhi|',none,''|shehui|',none,''|tuxiu|',none,''|biandong|',none,''|teacherzheng|',none,''|jianli|',none,''|gongzu|',none,''|lunwen|',none,''|niankao|',none,''|peixunjl|',none,''|jixujiaoyu|',none,''|jiangcheng|',none,''|beizhu|',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 Rsjgxx = Server.CreateObject("ADODB.Recordset")
Rsjgxx.ActiveConnection = MM_conn_STRING
Rsjgxx.Source = "SELECT * FROM jg"
Rsjgxx.CursorType = 0
Rsjgxx.CursorLocation = 2
Rsjgxx.LockType = 3
Rsjgxx.Open()
Rsjgxx_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">
<style type="text/css">
<!--
.time { font-size: 12px; color: #FF0000}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" background="admin/bg.jpg">
<div align="center">
<table width="777" border="0" cellspacing="0" cellpadding="0" align="center" height="100%">
<tr>
<td align="center" valign="top" background="admin/file/bgss.gif" class="time"><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"><img src="admin/top.gif" width="777" height="106" usemap="#Map" border="0" align="middle"></span></font></b></font></b></font><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,75,359,105" href="admin/admuserlogin.asp" target="_self">
<area shape="rect" coords="696,76,748,104" href="admin/loginout.asp" target="_self">
<area shape="rect" coords="212,78,303,103" href="view.asp" target="_self">
<area shape="rect" coords="641,77,693,105" href="index.asp" target="_self">
<area shape="rect" coords="691,7,772,45" href="help.htm#add" target="_blank">
</map>
</span></font></b></font></b></font>
<form action="<%=MM_editAction%>" method="POST" name="form1">
<table width="777" border="0" cellspacing="0" cellpadding="0" align="center" class="cssresult">
<tr>
<td width="10%">
<div align="center"><font color="#0000FF">姓名</font></div>
</td>
<td width="17%">
<input type="text" name="name" size="18">
</td>
<td width="18%"><font color="#0000FF"> 第一学历</font></td>
<td width="21%">
<select name="firstxueli">
<option value="专科">专科</option>
<option value="本科">本科</option>
<option value="硕士">硕士</option>
<option value="博士">博士</option>
<option value="初中">初中</option>
<option value="高中">高中</option>
<option value="中等专业">中专</option>
</select>
</td>
<td width="15%"><font color="#0000FF">任教学科</font></td>
<td width="23%">
<select name="xueke">
<option value="语文">语文</option>
<option value="数学">数学</option>
<option value="英语">英语</option>
<option value="物理">物理</option>
<option value="化学">化学</option>
<option value="政治">政治</option>
<option value="历史">历史</option>
<option value="地理">地理</option>
<option value="生物">生物</option>
<option value="计算机">计算机</option>
<option value="体育">体育</option>
<option value="美术">美术</option>
<option value="音乐">音乐</option>
<option value="其他">其他</option>
<option value="无">无</option>
</select>
</td>
</tr>
<tr>
<td width="10%" valign="top" height="56">
<div align="center"><font color="#0000FF"><br>
出生</font></div>
</td>
<td width="17%" valign="top" height="56"> <span class="time"> <br>
<input type="text" name="birthday" size="18">
<br>
</span><font color="#FF0000" class="time"><span class="time">出生请按此时间格式输入(1998-12-6、1998年12月6日、1998/12/6)否则出错</span></font><span class="time"><font color="#FF0000">
</font></span></td>
<td width="18%" height="56"><font color="#0000FF">第一学历毕业学校</font></td>
<td width="21%" height="56">
<input type="text" name="firstxlgradufrom">
</td>
<td width="15%" height="56"><font color="#0000FF">政治面貌</font></td>
<td width="23%" height="56">
<select name="mianmao">
<option value="团员">团员</option>
<option value="中共党员">中共党员</option>
<option value="民盟">民盟</option>
<option value="民进">民进</option>
<option value="民革">民革</option>
<option value="无">无</option>
</select>
</td>
</tr>
<tr>
<td width="10%" height="26">
<div align="center"><font color="#0000FF">年龄</font></div>
</td>
<td width="17%" height="26">系统自动计算</td>
<td width="18%" height="26"><font color="#0000FF">第一学历毕业时间</font></td>
<td width="21%" height="26">
<input type="text" name="firstxuelidate">
<br>
</td>
<td width="15%" height="26"><font color="#0000FF">入团或党时间</font></td>
<td width="23%" height="26" valign="top">
<input type="text" name="mianmaotime">
</td>
</tr>
<tr>
<td width="10%">
<div align="center"><font color="#0000FF">性别</font></div>
</td>
<td width="20%">
<select name="sex">
<option value="男" >男</option>
<option value="女">女</option>
</select>
</td>
<td width="18%"><font color="#0000FF">最后学历</font></td>
<td width="21%">
<select name="lastxueli">
<option value="专科">专科</option>
<option value="本科">本科</option>
<option value="硕士">硕士</option>
<option value="博士">博士</option>
<option value="初中">初中</option>
<option value="高中">高中</option>
<option value="中等专业">中专</option>
</select>
</td>
<td width="15%"><font color="#0000FF">参加工作时间</font></td>
<td width="23%">
<input type="text" name="workstart">
</td>
</tr>
<tr>
<td width="10%">
<div align="center"><font color="#0000FF">民族</font></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -