<?php
	require_once '../controller/CheckLoginState.php';
?>
<html>
<head>
<title>教师信息登记</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/add_modify.css" rel="stylesheet" type="text/css" />
<script src="../js/util.js" language="JavaScript"></script>
<script src="../js/calendar.js"></script>
<script type="text/javascript">
        function CheckForm() {
            var re = /^[0-9]+.?[0-9]*$/;
            var resc=/^[1-9]+[0-9]*]*$/ ;
            var teacherNumber = document.getElementById("teacherNumber").value;
            if (teacherNumber == "") {
                alert("请输入教师编号...");
                document.getElementById("teacherNumber").focus();
                return false;
            }

            var teacherName = document.getElementById("teacherName").value;
            if (teacherName == "") {
                alert("请输入教师姓名...");
                document.getElementById("teacherName").focus();
                return false;
            }

            var teacherSex = document.getElementById("teacherSex").value;
            if (teacherSex == "") {
                alert("请输入性别...");
                document.getElementById("teacherSex").focus();
                return false;
            }

            var teacherBirthday = document.getElementById("teacherBirthday").value;
            if (teacherBirthday == "") {
                alert("请输入出生日期...");
                document.getElementById("teacherBirthday").focus();
                return false;
            }

            var teacherArriveDate = document.getElementById("teacherArriveDate").value;
            if (teacherArriveDate == "") {
                alert("请输入入职日期...");
                document.getElementById("teacherArriveDate").focus();
                return false;
            }

            document.forms[0].submit();
       } 
    </script>
</head>
<body>
	<div id="container">
		<div id="title">
			<img src="../images/ADD.gif" />教师信息录入 (带*号的为必填项)
		</div>
		<div id="content">
			<form method="post" name="teacherAddForm"
				action="/controller/TeacherAction.php?action=add"
				enctype="multipart/form-data">
				<br />
				<p>
					教师编号: &nbsp;
					<input id="teacherNumber" class="text" type="text" style="width: 200px" value="" name="teacher[teacherNumber]" />
					<font color=red>*</font>
				</p>
				<p>
					教师姓名: &nbsp;
					<input id="teacherName" class="text" type="text" style="width: 120px" value="" name="teacher[teacherName]" />
					<font color=red>*</font>
				</p>
				<p>
					登录密码: &nbsp;
					<input id="teacherPassword" class="text" type="text" style="width: 300px" value="" name="teacher[teacherPassword]" />
				</p>
				<p>
					性别: &nbsp;
					<input id="teacherSex" class="text" type="text" style="width: 20px" value="" name="teacher[teacherSex]" />
					<font color=red>*</font>
				</p>
				<p>

					出生日期:&nbsp; <input id="teacherBirthday" type="text" class="text" readonly id="teacher[teacherBirthday]" name="teacher[teacherBirthday]" onclick="setDay(this);" />
					<font color=red>*</font>
				</p>
				<p>

					入职日期:&nbsp; <input id="teacherArriveDate" type="text" class="text" readonly id="teacher[teacherArriveDate]" name="teacher[teacherArriveDate]" onclick="setDay(this);" />
					<font color=red>*</font>
				</p>
				<p>
					身份证号: &nbsp;
					<input id="teacherCardNumber" class="text" type="text" style="width: 200px" value="" name="teacher[teacherCardNumber]" />
				</p>
				<p>
					联系电话: &nbsp;
					<input id="teacherPhone" class="text" type="text" style="width: 200px" value="" name="teacher[teacherPhone]" />
				</p>
				<p>
					教师照片:&nbsp; <input class="text" type="file" style="width: 200px" value="" name="teacherPhoto" />
				</p>
				<p>
					家庭地址: &nbsp;
					<input id="teacherAddress" class="text" type="text" style="width: 1000px" value="" name="teacher[teacherAddress]" />
				</p>
				<p>
					附加信息: &nbsp;
					<input id="teacherMemo" class="text" type="text" style="width: 1000px" value="" name="teacher[teacherMemo]" />
				</p>
				<p>
					<input type="button" style="cursor: hand;" class="btn" value="添加" onClick="CheckForm();" />
				</p>

			</form>
		</div>
	</div>
</body>
</html>
