|
|
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
|
|
|
<%@page import="util.Info"%>
|
|
|
<%@page import="dao.CommDAO"%>
|
|
|
<%@page import="util.PageManager"%>
|
|
|
<html>
|
|
|
<head>
|
|
|
|
|
|
<title>教练</title>
|
|
|
|
|
|
<link rel="stylesheet" href="images/hsgcommon/common.css" type="text/css">
|
|
|
<link rel="stylesheet" href="images/hsgcommon/div.css" type="text/css">
|
|
|
<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" charset="gb2312"></script>
|
|
|
<script type="text/javascript" src="js/popup.js"></script>
|
|
|
|
|
|
</head>
|
|
|
<%
|
|
|
String id="";
|
|
|
|
|
|
|
|
|
%>
|
|
|
<script language="javascript">
|
|
|
|
|
|
function gow()
|
|
|
{
|
|
|
document.location.href="jiaolian_add.jsp?id=<%=id%>";
|
|
|
}
|
|
|
|
|
|
function hsgxia2shxurxu(nstr,nwbk)
|
|
|
{
|
|
|
if (eval("form1."+nwbk).value.indexOf(nstr)>=0)
|
|
|
{
|
|
|
eval("form1."+nwbk).value=eval("form1."+nwbk).value.replace(nstr+";", "");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
eval("form1."+nwbk).value=eval("form1."+nwbk).value+nstr+";";
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<%
|
|
|
HashMap ext = new HashMap();
|
|
|
if(request.getParameter("f")!=null){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new CommDAO().insert(request,response,"jiaolian",ext,true,false,"");
|
|
|
|
|
|
}
|
|
|
|
|
|
%>
|
|
|
|
|
|
<body >
|
|
|
<form action="jiaolian_add.jsp?f=f&id=<%=id%>" method="post" name="form1" onsubmit="return checkform();">
|
|
|
添加教练:
|
|
|
<br><br>
|
|
|
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#cccccc" >
|
|
|
<tr><td width="200">工号:</td><td><input name='gonghao' type='text' id='gonghao' value='' onblur='checkform()' class="form-control" /> *<label id='clabelgonghao' /></td></tr>
|
|
|
<tr><td width="200">密码:</td><td><input name='mima' type='text' id='mima' value='' onblur='checkform()' class="form-control" /> *<label id='clabelmima' /></td></tr>
|
|
|
<tr><td width="200">姓名:</td><td><input name='xingming' type='text' id='xingming' value='' onblur='checkform()' class="form-control" /> *<label id='clabelxingming' /></td></tr>
|
|
|
<tr><td>性别:</td><td><select name='xingbie' id='xingbie' class="form-control2"><option value="男">男</option><option value="女">女</option></select></td></tr>
|
|
|
<tr><td width="200">年龄:</td><td><input name='nianling' type='text' id='nianling' value='' onblur='checkform()' class="form-control" /> <label id='clabelnianling' />必需数字型</td></tr>
|
|
|
<tr><td width="200">照片:</td><td><input name='zhaopian' type='text' id='zhaopian' size='50' value='' onblur='' class="form-control" /><div style="margin-top:16px;"> <input type='button' value='上传' onClick="up('zhaopian')" /></div></td></tr>
|
|
|
<tr><td width="200">专长:</td><td><input name='zhuanchang' type='text' id='zhuanchang' value='' onblur='' class="form-control" style="width:600px;" /></td></tr>
|
|
|
<tr><td width="200">个人简介:</td><td><textarea name='gerenjianjie' id='gerenjianjie' onblur='' class="form-control" style="width:600px;height:80px;" ></textarea></td></tr>
|
|
|
<tr><td width="200">联系方式:</td><td><input name='lianxifangshi' type='text' id='lianxifangshi' value='' onblur='checkform()' class="form-control" /> <label id='clabellianxifangshi' />必需电话格式[7或8位电话,或11位手机]</td></tr>
|
|
|
<tr><td width="200">地址:</td><td><input name='dizhi' type='text' id='dizhi' value='' onblur='' class="form-control" style="width:600px;" /></td></tr>
|
|
|
|
|
|
<tr>
|
|
|
<td> </td>
|
|
|
<td><input type="submit" name="Submit" value="提交" class="btn btn-info btn-small" />
|
|
|
<input type="reset" name="Submit2" value="重置" class="btn btn-info btn-small" /></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</form>
|
|
|
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
<script language=javascript src='js/ajax.js'></script>
|
|
|
|
|
|
<%@page import="java.util.ArrayList"%>
|
|
|
<%@page import="java.util.HashMap"%>
|
|
|
|
|
|
<script language=javascript >
|
|
|
|
|
|
function checkform(){
|
|
|
|
|
|
var gonghaoobj = document.getElementById("gonghao"); if(gonghaoobj.value==""){document.getElementById("clabelgonghao").innerHTML=" <font color=red>请输入工号</font>";return false;}else{document.getElementById("clabelgonghao").innerHTML=" "; }
|
|
|
var gonghaoobj = document.getElementById("gonghao");
|
|
|
if(gonghaoobj.value!=""){
|
|
|
var ajax = new AJAX();
|
|
|
ajax.post("factory/checkno.jsp?table=jiaolian&col=gonghao&value="+gonghaoobj.value+"&checktype=insert&ttime=<%=Info.getDateStr()%>")
|
|
|
var msg = ajax.getValue();
|
|
|
if(msg.indexOf('Y')>-1){
|
|
|
document.getElementById("clabelgonghao").innerHTML=" <font color=red>工号已存在</font>";
|
|
|
return false;
|
|
|
}else{document.getElementById("clabelgonghao").innerHTML=" ";
|
|
|
}
|
|
|
}
|
|
|
var mimaobj = document.getElementById("mima"); if(mimaobj.value==""){document.getElementById("clabelmima").innerHTML=" <font color=red>请输入密码</font>";return false;}else{document.getElementById("clabelmima").innerHTML=" "; }
|
|
|
var xingmingobj = document.getElementById("xingming"); if(xingmingobj.value==""){document.getElementById("clabelxingming").innerHTML=" <font color=red>请输入姓名</font>";return false;}else{document.getElementById("clabelxingming").innerHTML=" "; }
|
|
|
var nianlingobj = document.getElementById("nianling"); if(nianlingobj.value!=""){ if(/^[0-9]+.?[0-9]*$/.test(nianlingobj.value)){document.getElementById("clabelnianling").innerHTML=""; }else{document.getElementById("clabelnianling").innerHTML=" <font color=red>必需数字型</font>"; return false;}}
|
|
|
var lianxifangshiobj = document.getElementById("lianxifangshi"); if(lianxifangshiobj.value!=""){ if(/^(([0\+]\d{2,3}-)?(0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/.test(lianxifangshiobj.value) || /^1[3|4|5|6|7|8|9][0-9]\d{8,8}$/.test(lianxifangshiobj.value)){document.getElementById("clabellianxifangshi").innerHTML=""; }else{document.getElementById("clabellianxifangshi").innerHTML=" <font color=red>必需电话格式[7或8位电话,或11位手机]</font>"; return false;}}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
popheight=450;
|
|
|
</script>
|
|
|
<script src="images/hsgcommon/jq.js"></script>
|
|
|
<script src="images/hsgcommon/common.js"></script>
|
|
|
<script src="images/hsgcommon/bootbox.js"></script>
|