diff --git a/WebContent/YYQDDX.jsp b/WebContent/YYQDDX.jsp index 7441e50..1a96d5e 100644 --- a/WebContent/YYQDDX.jsp +++ b/WebContent/YYQDDX.jsp @@ -1,80 +1,77 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -已邀请学生的导师 - - +宸茬敵璇峰甯堢殑瀛︾敓 - +
-您好, - -导师! +鎮ㄥソ锛 + +瀵煎笀锛

-个人信息 +">涓汉淇℃伅 -系统推荐 +">绯荤粺鎺ㄨ崘 -选择导师 +">閫夋嫨瀛︾敓 -已申请导师 +">宸查個璇 -导师邀请 +">瀛︾敓鐢宠 +
+
+--------------------------------------------------------------------------

- 已经选择完的: + 宸茬粡閫夋嫨瀹岀殑锛 - - - - - - + + + + + + + +
-

-
- -
+ &tname=${tname}&temail=${temail}"> + + +
- 未选择状态的: + 鏈夋嫨鐘舵佺殑锛
-

+ &tname=${tname}&temail=${temail}">
- - - + &tname=${tname}&temail=${temail}"> + &tname=${tname}&temail=${temail}"> + &tname=${tname}&temail=${temail}">
+
\ No newline at end of file diff --git a/WebContent/YYQXDS.jsp b/WebContent/YYQXDS.jsp index 87899ae..e456c6c 100644 --- a/WebContent/YYQXDS.jsp +++ b/WebContent/YYQXDS.jsp @@ -1,36 +1,39 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -已邀请学生的导师 +宸查個璇峰鐢熺殑瀵煎笀 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-个人信息 +涓汉淇℃伅 -系统推荐 +绯荤粺鎺ㄨ崘 -选择导师 +閫夋嫨瀵煎笀 -已申请导师 +宸茬敵璇峰甯 -导师邀请 +瀵煎笀閭璇 +
+
+--------------------------------------------------------------------------

- 已经选择完的: + 宸茬粡閫夋嫨瀹岀殑锛 @@ -51,7 +54,7 @@
- 未选择状态的: + 鏈夋嫨鐘舵佺殑锛 @@ -61,9 +64,9 @@ &sna=${sna}&semail=${semail}"> diff --git a/WebContent/begin.jsp b/WebContent/begin.jsp index 33aad50..7db17ae 100644 --- a/WebContent/begin.jsp +++ b/WebContent/begin.jsp @@ -1,19 +1,27 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - - + +绯荤粺棣栭〉 - +




+
+
+
+
+
+
+
+
diff --git a/WebContent/sapplyerror.jsp b/WebContent/sapplyerror.jsp index 0e8453a..a6eeec8 100644 --- a/WebContent/sapplyerror.jsp +++ b/WebContent/sapplyerror.jsp @@ -1,14 +1,21 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - <%@ taglib prefix="s" uri="/struts-tags" %> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - - + +娉ㄥ唽澶辫触 - +
+
+
+
+
+
+
+
+

diff --git a/WebContent/sapplysuccess.jsp b/WebContent/sapplysuccess.jsp index 79ab8b7..ecc49f0 100644 --- a/WebContent/sapplysuccess.jsp +++ b/WebContent/sapplysuccess.jsp @@ -1,12 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - - + + 娉ㄥ唽鎴愬姛 - +
娉ㄥ唽鎴愬姛锛
diff --git a/WebContent/serror.jsp b/WebContent/serror.jsp index 08aef42..49e885e 100644 --- a/WebContent/serror.jsp +++ b/WebContent/serror.jsp @@ -1,11 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - + + 閿欒椤甸潰 - +
閭鎴栧瘑鐮侀敊璇
diff --git a/WebContent/shaixuan.jsp b/WebContent/shaixuan.jsp deleted file mode 100644 index 7589bd3..0000000 --- a/WebContent/shaixuan.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> -<%@ taglib prefix="s" uri="/struts-tags" %> - - - - -学生信息管理 - - - - -
-
- - -
-
-个人信息 - -系统推荐 - -选择导师 - -已申请导师 - -导师邀请 -
-
--------------------------------------------------------------------------- -
-
-按条件筛选: - - 研究方向: - 姓名: -
-
- 导师年龄下限 : - - -
-
-
--------------------------------------------------------------------------- -
-
-
- &sna=${sna}&semail=${semail}"> - &sna=${sna}&semail=${semail}"> - &sna=${sna}&semail=${semail}"> + &sna=${sna}&semail=${semail}"> + &sna=${sna}&semail=${semail}"> + &sna=${sna}&semail=${semail}">
-您好, - -同学! -
- - - - - -
-

-
-
- - \ No newline at end of file diff --git a/WebContent/student.jsp b/WebContent/student.jsp index 9ca8905..caa0129 100644 --- a/WebContent/student.jsp +++ b/WebContent/student.jsp @@ -1,31 +1,31 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -学生信息管理 +瀛︾敓淇℃伅绠$悊 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-">个人信息 +">涓汉淇℃伅 -">系统推荐 +">绯荤粺鎺ㄨ崘 -">选择导师 +">閫夋嫨瀵煎笀 -">已申请导师 +">宸茬敵璇峰甯 -">导师邀请 +">瀵煎笀閭璇
\ No newline at end of file diff --git a/WebContent/studentapply.jsp b/WebContent/studentapply.jsp index 0eb5860..54b889a 100644 --- a/WebContent/studentapply.jsp +++ b/WebContent/studentapply.jsp @@ -1,18 +1,17 @@ -<%@ page language="java" contentType="text/html;charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + 瀛︾敓娉ㄥ唽 - + - +
閭:
-
瀵嗙爜:
+
瀵嗙爜: (瑕佹眰闀垮害涓嶅皬浜8)

濮撳悕:

骞撮緞:
@@ -27,31 +26,28 @@
鏈涓撲笟(璇峰~鍏ㄧО):

涓撲笟鎺掑悕(濡傚疄濉啓):

鏄惁璇诲崥: - + + - +
-
鐧婚檰瀛︿俊缃戜笂浼犲鍙峰鍚嶅尮閰嶆埅鍥撅紙jpg/png<65k锛夛細
-
-

鎴愭灉:(鑾峰緱杩囩殑濂栭」銆佸仛杩囩殑澶ч」鐩,鑻ユ病鏈夎濉棤)


- -
鏈汉鐢熸椿鐓 锛坖pg/png<65k锛夛細 -
- -
濂栭」/椤圭洰涓锛坖pg/png<65k锛夛細 -
-
濂栭」/椤圭洰浜岋紙jpg/png<65k锛夛細 -
-
濂栭」/椤圭洰涓夛紙jpg/png<65k锛夛細 -
- +
鐧婚檰瀛︿俊缃戜笂浼犲鍙峰鍚嶅尮閰嶆埅鍥撅紙jpg/png<65k锛夛細
+ +
鏈汉鐢熸椿鐓 锛坖pg/png<65k锛夛細
+ +
濂栭」/椤圭洰涓锛坖pg/png<65k锛夛細
+ +
濂栭」/椤圭洰浜岋紙jpg/png<65k锛夛細
+ +
濂栭」/椤圭洰涓夛紙jpg/png<65k锛夛細
+
- + \ No newline at end of file diff --git a/WebContent/studentinfor.jsp b/WebContent/studentinfor.jsp index d5419b7..02e78e4 100644 --- a/WebContent/studentinfor.jsp +++ b/WebContent/studentinfor.jsp @@ -8,26 +8,26 @@ 瀛︾敓淇℃伅 - +
鎮ㄥソ锛 - + 鍚屽锛

-涓汉淇℃伅 +">涓汉淇℃伅 -绯荤粺鎺ㄨ崘 +">绯荤粺鎺ㄨ崘 -閫夋嫨瀵煎笀 +">閫夋嫨瀵煎笀 -宸茬敵璇峰甯 +">宸茬敵璇峰甯 -瀵煎笀閭璇 +">瀵煎笀閭璇

-------------------------------------------------------------------------- @@ -36,26 +36,32 @@ - - + + - - + + - - - + + + - - + + - - + + + + + + + +
name: name: age:sex:鐓х墖sex:鐓х墖>
email:studentnumber:school:email:studentnumber:school:
benkezhuanye:lanking:benkezhuanye:lanking: IfWantToBeMaster:
chengguo:HaveTeacher:HaveTeacher: mima:chengguo:
璇佹槑鐓х墖涓>璇佹槑鐓х墖浜>璇佹槑鐓х墖涓>瀛﹀彿璇佹槑鐓х墖>
diff --git a/WebContent/studentlogin.jsp b/WebContent/studentlogin.jsp index 7f914a8..3e27d37 100644 --- a/WebContent/studentlogin.jsp +++ b/WebContent/studentlogin.jsp @@ -1,5 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> @@ -7,8 +6,18 @@ 瀛︾敓鐧诲綍 - +
+
+
+
+
+
+
+
+
+
+
diff --git a/WebContent/studentshow.jsp b/WebContent/studentshow.jsp index 39bd9ed..7610805 100644 --- a/WebContent/studentshow.jsp +++ b/WebContent/studentshow.jsp @@ -1,19 +1,43 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - - - - + + +瀛︾敓淇℃伅 + + + +
+ + +鎮ㄥソ锛 + +瀵煎笀锛 + + +
+
+ +涓汉淇℃伅 + +绯荤粺鎺ㄨ崘 + +閫夋嫨瀛︾敓 + +宸查個璇峰鐢 + +瀛︾敓鐢宠 +
+
+--------------------------------------------------------------------------

瀛︾敓淇℃伅

- + @@ -26,11 +50,16 @@ - + + + + + + +
name: age: sex:鐓х墖鐓х墖>
email:IfWantToBeMaster:
chengguo: HaveTeacher:chengguo:
璇佹槑鐓х墖涓> 璇佹槑鐓х墖浜> 璇佹槑鐓х墖涓> 瀛﹀彿璇佹槑鐓х墖>
- - 杩斿洖 + \ No newline at end of file diff --git a/WebContent/studenttui.jsp b/WebContent/studenttui.jsp deleted file mode 100644 index d77eb20..0000000 --- a/WebContent/studenttui.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> -<%@ taglib prefix="s" uri="/struts-tags" %> - - - - -学生信息管理 - - - - -
- - -您好, - -同学! - - -
-
-个人信息 - -系统推荐 - -选择导师 - -已申请导师 - -导师邀请 -
-
--------------------------------------------------------------------------- -
-
- - - - - - -
-

-
-
- - \ No newline at end of file diff --git a/WebContent/stuij.jsp b/WebContent/stuij.jsp new file mode 100644 index 0000000..97ceeb4 --- /dev/null +++ b/WebContent/stuij.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +鎺ㄨ崘鐨勫甯 + + +
+ + +鎮ㄥソ锛 + +鍚屽锛 + + +
+
+涓汉淇℃伅 + +绯荤粺鎺ㄨ崘 + +閫夋嫨瀵煎笀 + +宸茬敵璇峰甯 + +瀵煎笀閭璇 +
+
+-------------------------------------------------------------------------- +
+
+ + + + + + +
+ &sna=${sna}&semail=${semail}"> +
+
+ + \ No newline at end of file diff --git a/WebContent/stwoerror.jsp b/WebContent/stwoerror.jsp new file mode 100644 index 0000000..232d3a9 --- /dev/null +++ b/WebContent/stwoerror.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +宸茬敵璇峰甯 + + +
+ + +鎮ㄥソ锛 + +鍚屽锛 + + +
+
+涓汉淇℃伅 + +绯荤粺鎺ㄨ崘 + +閫夋嫨瀵煎笀 + +宸茬敵璇峰甯 + +瀵煎笀閭璇 +

宸茬敵璇疯繃璇ュ甯堬紝涓嶈兘鍐嶆鐢宠銆

+
+ + \ No newline at end of file diff --git a/WebContent/tapplyerror.jsp b/WebContent/tapplyerror.jsp index c3d4549..a4fdb88 100644 --- a/WebContent/tapplyerror.jsp +++ b/WebContent/tapplyerror.jsp @@ -1,24 +1,23 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - - + + 娉ㄥ唽澶辫触 - +
-娉ㄥ唽澶辫触锛
-鏁欒亴宸ュ彿涓庡鍚嶇粡楠岃瘉涓嶅尮閰嶏紱

-鎴栬呮湭杩涜閭楠岃瘉锛

-鎴栬呴偖绠卞凡娉ㄥ唽杩囥

+
+ +

diff --git a/WebContent/tapplysuccess.jsp b/WebContent/tapplysuccess.jsp index b2134f4..a6e8e76 100644 --- a/WebContent/tapplysuccess.jsp +++ b/WebContent/tapplysuccess.jsp @@ -1,12 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - - + + 娉ㄥ唽鎴愬姛 - +
娉ㄥ唽鎴愬姛锛
diff --git a/WebContent/teacher.jsp b/WebContent/teacher.jsp index 933ffb1..fc76d41 100644 --- a/WebContent/teacher.jsp +++ b/WebContent/teacher.jsp @@ -1,5 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> @@ -7,21 +6,23 @@ 瀵煎笀淇℃伅绠$悊 - + +
鎮ㄥソ锛 鑰佸笀锛

-涓汉淇℃伅 +涓汉淇℃伅 -绯荤粺鎺ㄨ崘 +绯荤粺鎺ㄨ崘 -閫夋嫨瀛︾敓 +閫夋嫨瀛︾敓 -宸查個璇峰鐢 +宸查個璇峰鐢 -瀛︾敓鐢宠 +瀛︾敓鐢宠 +
\ No newline at end of file diff --git a/WebContent/teacherapply.jsp b/WebContent/teacherapply.jsp index 655a694..5df3580 100644 --- a/WebContent/teacherapply.jsp +++ b/WebContent/teacherapply.jsp @@ -1,60 +1,64 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" +<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + 瀵煎笀娉ㄥ唽 - - - -
- - - - - - + + + + +
閭:
+
鏄惁鏄剧ず閭: + + - - - - - - - - - - + +
+
瀵嗙爜: (瑕佹眰闀垮害涓嶅皬浜8)
+
濮撳悕:
+
瀛︽牎:
+
骞撮緞:
+
鎬у埆: + - - - - - + +
+
鏁欒亴宸ュ彿:
+ +
鐮旂┒鏂瑰悜:锛堣濉眽瀛楋級
+ +
瑕佹眰瀛︾敓鐨勬湰绉戝鏍(璇峰~鍏ㄧО): (鑻ヤ笉瑕佹眰璇峰~鏃)
+
瑕佹眰瀛︾敓鐨勬湰绉戜笓涓(璇峰~鍏ㄧО): (鑻ヤ笉瑕佹眰璇峰~鏃)
+
鏄惁瑕佹眰瀛︾敓璇诲崥: + + + + +
+
瀵瑰鐢熸帓鍚嶇殑瑕佹眰: (鑻ヤ笉瑕佹眰璇峰~0,涓嶅~榛樿涓0)
+ +
鐮旂┒鎴愭灉:(鑾峰緱杩囩殑濂栭」銆佸仛杩囩殑澶ч」鐩,鑻ユ病鏈夎濉棤)
+

+ +
鏈汉鐢熸椿鐓 锛坖pg/png<65k锛夛細
+ +
濂栭」/椤圭洰涓锛坖pg/png<65k锛夛細
+ +
濂栭」/椤圭洰浜岋紙jpg/png<65k锛夛細
+ +
濂栭」/椤圭洰涓夛紙jpg/png<65k锛夛細
+ + +
-
+ \ No newline at end of file diff --git a/WebContent/teacherinfor.jsp b/WebContent/teacherinfor.jsp index a81eb99..9bda7fa 100644 --- a/WebContent/teacherinfor.jsp +++ b/WebContent/teacherinfor.jsp @@ -1,49 +1,76 @@ -<%@ page contentType="textml; charset=UTF-8" %> -<%@ page import="www.action.SinforAction,www.action.DB_connect" %> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + - - -瀛︾敓淇℃伅 + +瀵煎笀淇℃伅 - +
-------------------------------------------------------------------------------------- -

瀛︾敓淇℃伅

- - + + + +
+
+ +涓汉淇℃伅 + +绯荤粺鎺ㄨ崘 + +閫夋嫨瀛︾敓 + +宸查個璇峰鐢 + +瀛︾敓鐢宠 +
+
+-------------------------------------------------------------------------- +

瀵煎笀淇℃伅

+ +
+鎮ㄥソ锛 + +瀵煎笀锛 +
- + + - - + + - - - + + + - - + - + + + + + - + + + -
name:">name: age:sex:">鐓х墖sex:鐓х墖>
email:">SrudentSchool:">teachernumber:">email:StudentSchool:">teachernumber:
induction:">chengguo:">success:">success: IfShowEmail:">
school:">school: StudentLearn:"> IfStudentToBeMater">
StudentMustBetterThan">chengguo:">SecertNumber:">
璇佹槑鐓х墖涓>璇佹槑鐓х墖浜>璇佹槑鐓х墖涓>
-杩斿洖 + + + + +
- + \ No newline at end of file diff --git a/WebContent/teacherlogin.jsp b/WebContent/teacherlogin.jsp index 372badf..58be887 100644 --- a/WebContent/teacherlogin.jsp +++ b/WebContent/teacherlogin.jsp @@ -1,17 +1,26 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - + 瀵煎笀鐧诲綍 - +
+
+
+
+
+
+
+
+
+
+
- + diff --git a/WebContent/teachers.jsp b/WebContent/teachers.jsp index 8488c8d..991eb7e 100644 --- a/WebContent/teachers.jsp +++ b/WebContent/teachers.jsp @@ -1,19 +1,40 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> - - - - + + +瀵煎笀淇℃伅 + + + +
+ + +鎮ㄥソ锛 + +鍚屽锛 + + +
+
+">涓汉淇℃伅 + +">绯荤粺鎺ㄨ崘 + +">閫夋嫨瀵煎笀 + +">宸茬敵璇峰甯 + +">瀵煎笀閭璇 +--------------------------------------------------------------------------

瀵煎笀淇℃伅

- + - + @@ -22,7 +43,6 @@ - @@ -32,8 +52,13 @@ + + + + + +
name: age: age: sex:鐓х墖鐓х墖>
email:
induction:chengguo: success: IfShowEmail:
IfStudentToBeMater StudentMustBetterThan:
chengguo:璇佹槑鐓х墖涓>璇佹槑鐓х墖浜>璇佹槑鐓х墖涓>
- 杩斿洖 \ No newline at end of file diff --git a/WebContent/terror.jsp b/WebContent/terror.jsp index 9ab0a72..321013e 100644 --- a/WebContent/terror.jsp +++ b/WebContent/terror.jsp @@ -1,11 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> - + + 閿欒椤甸潰 - +
閭鎴栧瘑鐮侀敊璇
diff --git a/WebContent/ttuij.jsp b/WebContent/ttuij.jsp new file mode 100644 index 0000000..719df6a --- /dev/null +++ b/WebContent/ttuij.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +鎺ㄨ崘鐨勫鐢 + + +
+ + +鎮ㄥソ锛 + +鑰佸笀锛 + + +
+
+">涓汉淇℃伅 + +">绯荤粺鎺ㄨ崘 + +">閫夋嫨瀛︾敓 + +">宸查個璇 + +">瀛︾敓鐢宠 +
+
+-------------------------------------------------------------------------- +
+
+ + + + + + +
+ &tname=${tname}&temail=${temail}"> +
+
+ + \ No newline at end of file diff --git a/WebContent/ttwoerror.jsp b/WebContent/ttwoerror.jsp new file mode 100644 index 0000000..b0e6782 --- /dev/null +++ b/WebContent/ttwoerror.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +閲嶅閫夊鐢 + + +
+ + +鎮ㄥソ锛 + +瀵煎笀锛 + + +
+
+">涓汉淇℃伅 + +">绯荤粺鎺ㄨ崘 + +">閫夋嫨瀛︾敓 + +">宸查個璇 + +">瀛︾敓鐢宠 +
+
+

宸查個璇疯繃璇ュ鐢燂紝涓嶈兘鍐嶆閭璇枫

+
+ + \ No newline at end of file diff --git a/WebContent/txuanerror.jsp b/WebContent/txuanerror.jsp new file mode 100644 index 0000000..49417a7 --- /dev/null +++ b/WebContent/txuanerror.jsp @@ -0,0 +1,33 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +閿欒淇敼 + + +
+ + +鎮ㄥソ锛 + +瀵煎笀锛 + + +
+
+">涓汉淇℃伅 + +">绯荤粺鎺ㄨ崘 + +">閫夋嫨瀛︾敓 + +">宸查個璇 + +">瀛︾敓鐢宠 + +

閿欒淇敼

+
+ + \ No newline at end of file diff --git a/WebContent/tyiyaoerror.jsp b/WebContent/tyiyaoerror.jsp index 2b2ad11..cb65817 100644 --- a/WebContent/tyiyaoerror.jsp +++ b/WebContent/tyiyaoerror.jsp @@ -1,32 +1,33 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -重复选学生 +鏃犱汉 - +
-您好, - -导师! +鎮ㄥソ锛 + +瀵煎笀锛

-个人信息 +">涓汉淇℃伅 -系统推荐 +">绯荤粺鎺ㄨ崘 -选择学生 +">閫夋嫨瀛︾敓 -已邀请学生 +">宸查個璇 -学生申请 -

+">瀛︾敓鐢宠 + +

\ No newline at end of file diff --git a/WebContent/tyiyoudaoshierror.jsp b/WebContent/tyiyoudaoshierror.jsp new file mode 100644 index 0000000..9521e48 --- /dev/null +++ b/WebContent/tyiyoudaoshierror.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +瀛︾敓涓嶅彲閫 + + +
+ + +鎮ㄥソ锛 + +瀵煎笀锛 + + +
+
+">涓汉淇℃伅 + +">绯荤粺鎺ㄨ崘 + +">閫夋嫨瀛︾敓 + +">宸查個璇 + +">瀛︾敓鐢宠 +
+
+

璇ュ鐢熷凡鏈夊甯堬紝涓嶅彲鍐嶆閫夋嫨銆

+
+ + \ No newline at end of file diff --git a/WebContent/xuandaoshi.jsp b/WebContent/xuandaoshi.jsp index c692ce3..50b2e4b 100644 --- a/WebContent/xuandaoshi.jsp +++ b/WebContent/xuandaoshi.jsp @@ -1,46 +1,46 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -学生信息管理 +瀛︾敓淇℃伅绠$悊 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-">个人信息 +">涓汉淇℃伅 -">系统推荐 +">绯荤粺鎺ㄨ崘 -">选择导师 +">閫夋嫨瀵煎笀 -">已申请导师 +">宸茬敵璇峰甯 -">导师邀请 +">瀵煎笀閭璇

--------------------------------------------------------------------------

-按条件筛选: +鎸夋潯浠剁瓫閫夛細 - 研究方向: - 姓名: + 鐮旂┒鏂瑰悜: + 濮撳悕:

- 导师年龄下限 : - - + 瀵煎笀骞撮緞涓嬮檺 锛 + +


diff --git a/WebContent/xuanerror.jsp b/WebContent/xuanerror.jsp new file mode 100644 index 0000000..d2b279b --- /dev/null +++ b/WebContent/xuanerror.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + + + +閿欒淇敼 + + +
+ + +鎮ㄥソ锛 + +鍚屽锛 + + +
+
+涓汉淇℃伅 + +绯荤粺鎺ㄨ崘 + +閫夋嫨瀵煎笀 + +宸茬敵璇峰甯 + +瀵煎笀閭璇 +

閿欒淇敼

+
+ + \ No newline at end of file diff --git a/WebContent/xuanxuesheng.jsp b/WebContent/xuanxuesheng.jsp index a98068d..e04d33f 100644 --- a/WebContent/xuanxuesheng.jsp +++ b/WebContent/xuanxuesheng.jsp @@ -1,48 +1,48 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -导师信息管理 +瀵煎笀淇℃伅绠$悊 - +
-您好, - -导师! +鎮ㄥソ锛 + +瀵煎笀锛

-">个人信息 +">涓汉淇℃伅 -">系统推荐 +">绯荤粺鎺ㄨ崘 -">选择学生 +">閫夋嫨瀛︾敓 -">已邀请 +">宸查個璇 -">学生申请 +">瀛︾敓鐢宠

--------------------------------------------------------------------------

-按条件筛选: - - 学校: - 专业: - 姓名: +鎸夋潯浠剁瓫閫夛細 + + 瀛︽牎: + 涓撲笟: + 濮撳悕:

- - 学生排名下限 : - 学生是否读博(若"是"请填1,"不是"请填0): - - + + 瀛︾敓鎺掑悕涓嬮檺 : + 瑕佹眰瀛︾敓鏄惁璇诲崥锛堣嫢鏈夋瑕佹眰璇峰~1锛: + +


@@ -53,7 +53,7 @@ - &tna=${tna}&temail=${temail}"> + &tname=${tname}&temail=${temail}"> diff --git a/WebContent/yiyaoerror.jsp b/WebContent/yiyaoerror.jsp index 3a68615..7872fb5 100644 --- a/WebContent/yiyaoerror.jsp +++ b/WebContent/yiyaoerror.jsp @@ -1,32 +1,32 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -重复选导师 +鏃犱汉 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-个人信息 +涓汉淇℃伅 -系统推荐 +绯荤粺鎺ㄨ崘 -选择导师 +閫夋嫨瀵煎笀 -已申请导师 +宸茬敵璇峰甯 -导师邀请 -

+瀵煎笀閭璇 +

\ No newline at end of file diff --git a/WebContent/yiyoudaoshierror.jsp b/WebContent/yiyoudaoshierror.jsp index 9c21628..fd8f5e9 100644 --- a/WebContent/yiyoudaoshierror.jsp +++ b/WebContent/yiyoudaoshierror.jsp @@ -1,32 +1,32 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -重复选导师 +閲嶅閫夊甯 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-个人信息 +涓汉淇℃伅 -系统推荐 +绯荤粺鎺ㄨ崘 -选择导师 +閫夋嫨瀵煎笀 -已申请导师 +宸茬敵璇峰甯 -导师邀请 -

已经成功与导师互选,禁止再次申请导师

+瀵煎笀閭璇 +

宸茬粡鎴愬姛涓庡甯堜簰閫夛紝绂佹鍐嶆鐢宠瀵煎笀

\ No newline at end of file diff --git a/WebContent/yiyouxueshengerror.jsp b/WebContent/yiyouxueshengerror.jsp deleted file mode 100644 index ad0a2e1..0000000 --- a/WebContent/yiyouxueshengerror.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> -<%@ taglib prefix="s" uri="/struts-tags" %> - - - - -重复选学生 - - -
- - -您好, - -导师! - - -
-
-个人信息 - -系统推荐 - -选择学生 - -已邀请学生 - -学生申请 -

已经成功与学生互选,禁止再次邀请学生

-
- - \ No newline at end of file diff --git a/WebContent/yxds.jsp b/WebContent/yxds.jsp index 6a26c9f..76f70c7 100644 --- a/WebContent/yxds.jsp +++ b/WebContent/yxds.jsp @@ -1,31 +1,31 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -已申请导师 +宸茬敵璇峰甯 - +
-您好, +鎮ㄥソ锛 -同学! +鍚屽锛

-个人信息 +涓汉淇℃伅 -系统推荐 +绯荤粺鎺ㄨ崘 -选择导师 +閫夋嫨瀵煎笀 -已申请导师 +宸茬敵璇峰甯 -导师邀请 +瀵煎笀閭璇

diff --git a/WebContent/yxsd.jsp b/WebContent/yxsd.jsp index 3d2dfbb..e29199e 100644 --- a/WebContent/yxsd.jsp +++ b/WebContent/yxsd.jsp @@ -1,54 +1,49 @@ -<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> -已申请导师 - - +宸查個璇峰鐢 - +


-个人信息 +">涓汉淇℃伅 -系统推荐 +">绯荤粺鎺ㄨ崘 -选择导师 +">閫夋嫨瀛︾敓 -已申请导师 +">宸查個璇 -导师邀请 +">瀛︾敓鐢宠

+
-您好, - -导师! +鎮ㄥソ锛 + +瀵煎笀锛
- - - - - - + + + + + + + + +
-

-
- -
+ &tname=${tname}&temail=${temail}"> + + +
diff --git a/build/classes/struts.xml b/build/classes/struts.xml index a4964d2..9c42506 100644 --- a/build/classes/struts.xml +++ b/build/classes/struts.xml @@ -13,14 +13,34 @@ /teacher.jsp /terror.jsp - + + + + + + image/bmp,image/png,image/gif,image/jpeg,image/jpg + + 2097152 + + + + /sapplysuccess.jsp /sapplyerror.jsp - - /begin.jsp - /begin.jsp + + + + image/bmp,image/png,image/jpeg,image/jpg + + 2097152 + + + + + /tapplysuccess.jsp + /tapplyerror.jsp /studentinfor.jsp @@ -31,19 +51,17 @@ /begin.jsp - /begin.jsp - /begin.jsp + /stuij.jsp - /begin.jsp - /begin.jsp + /ttuij.jsp + /tyiyaoerror.jsp /xuandaoshi.jsp - /begin.jsp - /begin.jsp + /xuanxuesheng.jsp /xuandaoshi.jsp @@ -55,43 +73,49 @@ /yxds.jsp /yiyaoerror.jsp - - /yxsd.jsp - /tyiyaoerror.jsp - /teachers.jsp - /terror.jsp /studentshow.jsp - /serror.jsp /student.jsp /yiyoudaoshierror.jsp + /stwoerror.jsp /teacher.jsp - /yiyouxueshengerror.jsp + /tyiyoudaoshierror.jsp + /ttwoerror.jsp - /YYQXDS.jsp + /yiyaoerror.jsp + + + /YYQDDX.jsp + /tyiyaoerror.jsp + + + /yxsd.jsp + /tyiyaoerror.jsp /YYQXDS.jsp /yiyaoerror.jsp - /YYQDDX.jsp - /terror.jsp + /YYQDDX.jsp + /tyiyaoerror.jsp /studentinfor.jsp + /xuanerror.jsp /teacherinfor.jsp + /txuanerror.jsp \ No newline at end of file diff --git a/build/classes/www/action/CheckdcAction.class b/build/classes/www/action/CheckdcAction.class index 2484e90..9579ef2 100644 Binary files a/build/classes/www/action/CheckdcAction.class and b/build/classes/www/action/CheckdcAction.class differ diff --git a/build/classes/www/action/CheckscAction.class b/build/classes/www/action/CheckscAction.class new file mode 100644 index 0000000..4655e5d Binary files /dev/null and b/build/classes/www/action/CheckscAction.class differ diff --git a/build/classes/www/action/SapplyAction.class b/build/classes/www/action/SapplyAction.class index b5c5b32..dd2dcd2 100644 Binary files a/build/classes/www/action/SapplyAction.class and b/build/classes/www/action/SapplyAction.class differ diff --git a/build/classes/www/action/SapplyteacherAction.class b/build/classes/www/action/SapplyteacherAction.class index ecb459f..f4be56a 100644 Binary files a/build/classes/www/action/SapplyteacherAction.class and b/build/classes/www/action/SapplyteacherAction.class differ diff --git a/build/classes/www/action/SelectAction.class b/build/classes/www/action/SelectAction.class index f3e4ece..fa5bc3d 100644 Binary files a/build/classes/www/action/SelectAction.class and b/build/classes/www/action/SelectAction.class differ diff --git a/build/classes/www/action/SinforAction.class b/build/classes/www/action/SinforAction.class index 944a319..a9cccd7 100644 Binary files a/build/classes/www/action/SinforAction.class and b/build/classes/www/action/SinforAction.class differ diff --git a/build/classes/www/action/StuiAction.class b/build/classes/www/action/StuiAction.class index ef78146..774f4a2 100644 Binary files a/build/classes/www/action/StuiAction.class and b/build/classes/www/action/StuiAction.class differ diff --git a/build/classes/www/action/SyiAction.class b/build/classes/www/action/SyiAction.class index 8c72cf6..f10e1f4 100644 Binary files a/build/classes/www/action/SyiAction.class and b/build/classes/www/action/SyiAction.class differ diff --git a/build/classes/www/action/TSelectAction.class b/build/classes/www/action/TSelectAction.class new file mode 100644 index 0000000..723a9af Binary files /dev/null and b/build/classes/www/action/TSelectAction.class differ diff --git a/build/classes/www/action/TStateAction.class b/build/classes/www/action/TStateAction.class new file mode 100644 index 0000000..202c019 Binary files /dev/null and b/build/classes/www/action/TStateAction.class differ diff --git a/build/classes/www/action/TXiugAction.class b/build/classes/www/action/TXiugAction.class index c7d2008..53cc581 100644 Binary files a/build/classes/www/action/TXiugAction.class and b/build/classes/www/action/TXiugAction.class differ diff --git a/build/classes/www/action/TapplyAction.class b/build/classes/www/action/TapplyAction.class index 40a1efe..39e2b49 100644 Binary files a/build/classes/www/action/TapplyAction.class and b/build/classes/www/action/TapplyAction.class differ diff --git a/build/classes/www/action/TapplystudentAction.class b/build/classes/www/action/TapplystudentAction.class new file mode 100644 index 0000000..e38d623 Binary files /dev/null and b/build/classes/www/action/TapplystudentAction.class differ diff --git a/build/classes/www/action/TchooseAction.class b/build/classes/www/action/TchooseAction.class index be530f0..4d77075 100644 Binary files a/build/classes/www/action/TchooseAction.class and b/build/classes/www/action/TchooseAction.class differ diff --git a/build/classes/www/action/TinforAction.class b/build/classes/www/action/TinforAction.class index 57de1fd..acd48bb 100644 Binary files a/build/classes/www/action/TinforAction.class and b/build/classes/www/action/TinforAction.class differ diff --git a/build/classes/www/action/TloginAction.class b/build/classes/www/action/TloginAction.class index 1898203..205729c 100644 Binary files a/build/classes/www/action/TloginAction.class and b/build/classes/www/action/TloginAction.class differ diff --git a/build/classes/www/action/TtuiAction.class b/build/classes/www/action/TtuiAction.class index fb43af7..478b588 100644 Binary files a/build/classes/www/action/TtuiAction.class and b/build/classes/www/action/TtuiAction.class differ diff --git a/build/classes/www/action/TyaoAction.class b/build/classes/www/action/TyaoAction.class index b8a29e5..65cbb1b 100644 Binary files a/build/classes/www/action/TyaoAction.class and b/build/classes/www/action/TyaoAction.class differ diff --git a/build/classes/www/action/TyiAction.class b/build/classes/www/action/TyiAction.class index 32c336a..2f552e8 100644 Binary files a/build/classes/www/action/TyiAction.class and b/build/classes/www/action/TyiAction.class differ diff --git a/build/classes/www/action/XiugAction.class b/build/classes/www/action/XiugAction.class index 19bb825..347f6cb 100644 Binary files a/build/classes/www/action/XiugAction.class and b/build/classes/www/action/XiugAction.class differ diff --git a/build/classes/www/model/file.class b/build/classes/www/model/file.class new file mode 100644 index 0000000..38927d2 Binary files /dev/null and b/build/classes/www/model/file.class differ diff --git a/build/classes/www/model/file1.class b/build/classes/www/model/file1.class new file mode 100644 index 0000000..8fca744 Binary files /dev/null and b/build/classes/www/model/file1.class differ diff --git a/src/struts.xml b/src/struts.xml index 8bdb518..9c42506 100644 --- a/src/struts.xml +++ b/src/struts.xml @@ -13,40 +13,61 @@ /teacher.jsp /terror.jsp - + + + + + + image/bmp,image/png,image/gif,image/jpeg,image/jpg + + 2097152 + + + + /sapplysuccess.jsp /sapplyerror.jsp - - /begin.jsp - /begin.jsp + + + + image/bmp,image/png,image/jpeg,image/jpg + + 2097152 + + + + + /tapplysuccess.jsp + /tapplyerror.jsp /studentinfor.jsp /begin.jsp - /begin.jsp + /teacherinfor.jsp /begin.jsp - /begin.jsp - /begin.jsp + /stuij.jsp - /begin.jsp - /begin.jsp + /ttuij.jsp + /tyiyaoerror.jsp /xuandaoshi.jsp - /begin.jsp - /begin.jsp + /xuanxuesheng.jsp /xuandaoshi.jsp + + + /xuanxuesheng.jsp /yxds.jsp @@ -54,33 +75,47 @@ /teachers.jsp - /terror.jsp + + + /studentshow.jsp /student.jsp /yiyoudaoshierror.jsp + /stwoerror.jsp + + + /teacher.jsp + /tyiyoudaoshierror.jsp + /ttwoerror.jsp - /YYQXDS.jsp + /yiyaoerror.jsp + + + /YYQDDX.jsp + /tyiyaoerror.jsp /yxsd.jsp - /begin.jsp + /tyiyaoerror.jsp /YYQXDS.jsp /yiyaoerror.jsp - /YYQDDX.jsp - /terror.jsp + /YYQDDX.jsp + /tyiyaoerror.jsp /studentinfor.jsp + /xuanerror.jsp /teacherinfor.jsp + /txuanerror.jsp \ No newline at end of file diff --git a/src/www/action/CheckdcAction.java b/src/www/action/CheckdcAction.java index e7fb240..22fa4d6 100644 --- a/src/www/action/CheckdcAction.java +++ b/src/www/action/CheckdcAction.java @@ -6,12 +6,10 @@ import java.util.ArrayList; //dx点击导师名字,显示导师信息 public class CheckdcAction { - Statement stmt; + private String dx;//姓名 private String semail; private String sna; - - private String dx;//姓名 private int ta;//年龄 private String te;//email private int ts;//性别 @@ -25,6 +23,16 @@ public class CheckdcAction { private int tb;//是否要求学生读博 private int tp;//对学生排名的要求 private String tsshool;//对学生学校的要求 + private String tnumber;//密码 + private String tpone;//三个证明 + private String tptwo; + private String tpthree; + private String tpfour;//生活照 + private String path="/space/uppicture/";//路径 + private String tponepath=null;//三个证明 + private String tptwopath=null; + private String tpthreepath=null; + private String tpfourpath=null;//生活照 //照片 public String getSemail() { @@ -81,6 +89,33 @@ public int getTp(){ public String getTsshool(){ return tsshool; } + public String getTnumber(){ + return tnumber; + } + public String getTpone(){ + return tpone; + } + public String getTptwo(){ + return tptwo; + } + public String getTpthree(){ + return tpthree; + } + public String getTpfour(){ + return tpfour; + } + public String getTponepath(){ + return tponepath; + } + public String getTptwopath(){ + return tptwopath; + } + public String getTpthreepath(){ + return tpthreepath; + } + public String getTpfourpath(){ + return tpfourpath; + } public void setDx(String dx) { this.dx = dx; } @@ -122,6 +157,21 @@ public void setTp(int tp) { } public void setTsshool(String tsshool) { this.tsshool = tsshool; + } + public void setTnumber(String tnumber) { + this.tnumber = tnumber; + } + public void setTpone(String tpone) { + this.tpone = tpone; + } + public void setTptwo(String tptwo) { + this.tptwo = tptwo; + } + public void setTpthree(String tpthree) { + this.tpthree = tpthree; + } + public void setTprove(String tpfour) { + this.tpfour = tpfour; } public String execute() throws Exception { Connection connect = DB_connect.connect(); @@ -131,11 +181,7 @@ public String execute() throws Exception { ResultSet res = stmt.executeQuery(sql); String sql1 = "select * from teacher where tn = '" + dx + "'"; res = stmt.executeQuery(sql1); - if(!res.next()) - { - return "error"; - } - else + while(res.next()) { dx = new String(res.getString("tn")); ta = res.getInt("ta"); @@ -158,10 +204,46 @@ public String execute() throws Exception { tb = res.getInt("tb"); tp = res.getInt("tp"); tsshool = new String(res.getString("tsshool")); - connect.close(); - return "success"; + tnumber = new String(res.getString("tnumber")); + tpone = new String(res.getString("tpone")); + if(tpone.equals("无")) + { + tponepath = path+"无.png"; + } + else + { + tponepath = path+tpone; + } + tptwo = new String(res.getString("tptwo")); + if(tptwo.equals("无")) + { + tptwopath = path+"无.png"; + } + else + { + tptwopath = path+tptwo; + } + tpthree = new String(res.getString("tpthree")); + if(tpthree.equals("无")) + { + tpthreepath = path+"无.png"; + } + else + { + tpthreepath = path+tpthree; + } + tpfour = new String(res.getString("tpfour")); + if(tpfour.equals("无")) + { + tpfourpath = path+"无.png"; + } + else + { + tpfourpath = path+tpfour; + } } - + connect.close(); + return "success"; } } diff --git a/src/www/action/CheckscAction.java b/src/www/action/CheckscAction.java index ed77461..3431bf2 100644 --- a/src/www/action/CheckscAction.java +++ b/src/www/action/CheckscAction.java @@ -8,7 +8,7 @@ public class CheckscAction { Statement stmt; private String temail; - private String tna; + private String tname; private String sx;//姓名 private int sage;//年龄 @@ -22,6 +22,17 @@ public class CheckscAction { private int sb;//是否读博 private String snumber;//密码 private int sd;//是否有导师 + private String photo;//生活照 + private String pone;//三个证明 + private String ptwo; + private String pthree; + private String prove;//学号证明 + private String path="/space/uppicture/";//路径 + private String photopath=null;//生活照 + private String ponepath=null;//三个证明 + private String ptwopath=null; + private String pthreepath=null; + private String provepath=null;//学号证明 //照片 public String getTemail() { @@ -30,11 +41,11 @@ public String getTemail() { public void setTemail(String temail) { this.temail=temail; } - public String getTna() { - return tna; + public String getTname() { + return tname; } - public void setTna(String tna) { - this.tna=tna; + public void setTname(String tname) { + this.tname=tname; } public String getSx(){ return sx; @@ -72,6 +83,36 @@ public String getSnumber(){ public int getSd(){ return sd; } + public String getPhoto(){ + return photo; + } + public String getPone(){ + return pone; + } + public String getPtwo(){ + return ptwo; + } + public String getPthree(){ + return pthree; + } + public String getProve(){ + return prove; + } + public String getPhotopath(){ + return photopath; + } + public String getPonepath(){ + return ponepath; + } + public String getPtwopath(){ + return ptwopath; + } + public String getPthreepath(){ + return pthreepath; + } + public String getProvepath(){ + return provepath; + } public void setSx(String sx) { this.sx = sx; } @@ -108,6 +149,21 @@ public void setSnumber(String snumber) { public void setSd(int sd) { this.sd = sd; } + public void setPhoto(String photo) { + this.photo = photo; + } + public void setPone(String pone) { + this.pone = pone; + } + public void setPtwo(String ptwo) { + this.ptwo = ptwo; + } + public void setPthree(String pthree) { + this.pthree = pthree; + } + public void setProve(String prove) { + this.prove = prove; + } public String execute() throws Exception { Connection ct = DB_connect.connect(); try @@ -117,11 +173,7 @@ public String execute() throws Exception { ResultSet res = stmt.executeQuery(sql); String sql1 = "select * from student where n = '" + sx + "'"; res = stmt.executeQuery(sql1); - if(!res.next()) - { - return "error"; - } - else + while(res.next()) { sx = new String(res.getString("n")); sage = res.getInt("a"); @@ -135,10 +187,56 @@ public String execute() throws Exception { sb = res.getInt("b"); snumber = new String(res.getString("number"));//但是不显示密码 sd = res.getInt("d"); - ct.close(); - return "success"; + photo = new String(res.getString("photo")); + System.out.print("***"+photo); + if(photo.equals("无")) + { + photopath = path+"无.png"; + } + else + { + photopath = path+photo; + } + pone = new String(res.getString("pone")); + if(pone.equals("无")) + { + ponepath = path+"无.png"; + } + else + { + ponepath = path+pone; + } + ptwo = new String(res.getString("ptwo")); + if(ptwo.equals("无")) + { + ptwopath = path+"无.png"; + } + else + { + ptwopath = path+ptwo; + } + pthree = new String(res.getString("pthree")); + if(pthree.equals("无")) + { + pthreepath = path+"无.png"; + } + else + { + pthreepath = path+pthree; + } + prove = new String(res.getString("prove")); + if(prove.equals("无")) + { + provepath = path+"无.png"; + } + else + { + provepath = path+prove; + } } - + System.out.println(sx); + ct.close(); + return "success"; } catch(Exception e) { diff --git a/src/www/action/SapplyAction.java b/src/www/action/SapplyAction.java index 5145267..7db3dae 100644 --- a/src/www/action/SapplyAction.java +++ b/src/www/action/SapplyAction.java @@ -1,17 +1,24 @@ package www.action; import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.Statement; +import java.sql.PreparedStatement; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.io.*; import www.action.DB_connect; +import com.opensymphony.xwork2.ModelDriven; +import www.model.file; -public class SapplyAction { +import com.opensymphony.xwork2.ActionSupport; + +public class SapplyAction extends ActionSupport implements +ModelDriven{ private String snamea;//姓名 private int sagea;//年龄 private String semaila;//email private int ssexa;//性别 + private int sgsexa; private String snuma;//学号 private String schoola;//本科院校 private String smaina;//本科专业 @@ -19,9 +26,16 @@ public class SapplyAction { private String schena;//成果 private int sboa;//是否读博 private String snumbera;//密码 + private String error_message="注册失败!"; + + private file singleFile = new file(); + + public file getModel() + { + return singleFile; + } - //照片 Connection connect_temp = DB_connect.connect(); Connection connect_tempp = DB_connect.connect(); public String getError_message(){ @@ -39,6 +53,9 @@ public String getSemaila() { public int getSsexa(){ return ssexa; } + public int getSgsexa(){ + return sgsexa; + } public String getSnuma(){ return snuma; } @@ -60,7 +77,7 @@ public int getSboa(){ public String getSnumbera(){ return snumbera; } - + public void setError_message(String error_message) { this.error_message = error_message; } @@ -76,6 +93,9 @@ public void setSemaila(String semaila) { public void setSsexa(int ssexa) { this.ssexa = ssexa; } + public void setSgsexa(int sgsexa) { + this.sgsexa = sgsexa; + } public void setSnuma(String snuma) { this.snuma = snuma; } @@ -97,26 +117,20 @@ public void setSboa(int sboa) { public void setSnumbera(String snumbera) { this.snumbera = snumbera; } + public static boolean checkEmail(String email) - {// 验证邮箱的正则表达式 - String format = "\\p{Alpha}\\w{2,15}[@][a-z0-9]{3,}[.]\\p{Lower}{2,}"; - //p{Alpha}:内容是必选的,和字母字符[\p{Lower}\p{Upper}]等价。如:200896@163.com不是合法的。 - //w{2,15}: 2~15个[a-zA-Z_0-9]字符;w{}内容是必选的。 如:dyh@152.com是合法的。 - //[a-z0-9]{3,}:至少三个[a-z0-9]字符,[]内的是必选的;如:dyh200896@16.com是不合法的。 - //[.]:'.'号时必选的; 如:dyh200896@163com是不合法的。 - //p{Lower}{2,}小写字母,两个以上。如:dyh200896@163.c是不合法的。 - if (email.matches(format)) - { - return true;// 邮箱名合法,返回true - } - else - { - return false;// 邮箱名不合法,返回false - } + + {// 验证邮箱的正则表达式 + String check = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; + Pattern regex = Pattern.compile(check); + Matcher matcher = regex.matcher(email); + boolean isMatched = matcher.matches(); + return isMatched; } public static boolean isEmptyString(String s) { if (s == null || s.length()==0) + return false; else return true; @@ -127,6 +141,7 @@ public static boolean isChinese(String str){ else return false; } + public String execute() throws Exception { java.sql.PreparedStatement flag = null; java.sql.ResultSet re1 = null; @@ -136,28 +151,28 @@ public String execute() throws Exception { int em=0; if(SapplyAction.isEmptyString(semaila)) { - System.out.println(i); - //if (SapplyAction.checkEmail(semaila))// 验证邮箱 - //{ + if (SapplyAction.checkEmail(semaila))// 验证邮箱 + + { System.out.println(i); - flag=connect_tempp.prepareStatement("select n,a,e,s,xuehao,school,m,p,c,b,number,d,photo,prove,pone,ptwo,pthere from student where e = ?"); + flag=connect_tempp.prepareStatement("select n,a,e,s,xuehao,school,m,p,c,b,number,d,photo,pone,ptwo,pthree,prove from student where e = ?"); flag.setString(1, semaila); re1=flag.executeQuery(); while(re1.next())//判断email是否重复 { i=1; - System.out.println(i); } if(i==1) error_message+="该email已注册!\n"; - - //} - //else - //{ - // i=1; - // error_message+="邮箱名不符合规范!\n"; - //} - + + } + else + { + i=1; + error_message+="邮箱名不符合规范!\n"; + } + + } else { @@ -167,7 +182,7 @@ public String execute() throws Exception { if(SapplyAction.isEmptyString(snamea)) { flagg=connect_temp.prepareStatement("select n,a,e,s,xuehao,school,m,p,c,b,number,d," - + "photo,prove,pone,ptwo,pthere from student where n = ?"); + + "photo,pone,ptwo,pthree,prove from student where n = ?"); flagg.setString(1, snamea); re11=flagg.executeQuery(); while(re11.next())//判断姓名是否重复 @@ -226,11 +241,43 @@ public String execute() throws Exception { em=1; error_message+="请填写成果,若没有请填无!\n"; } - + + if(sagea==0) + { + em=1; + error_message+="请填写年龄!\n"; + } + if(sagea<12||sagea>=100) + { + em=1; + error_message+="请填写正确的年龄\n"; + } + if(snumbera.length()<8) + { + em=1; + error_message+="请填写长度不少于8的密码\n"; + } + String root = "d:\\uppicture\\"; + File rootFile = new File(root); + if(!rootFile.exists()) + { + rootFile.mkdir(); + } + String filename = root + singleFile.getResumeFileName(); //+snamea+"0" + if(singleFile.getResumeFileName() == null) + { + addFieldError("resume", "请登陆学信网上传学号姓名匹配截图"); + error_message+="请登陆学信网上传学号姓名匹配截图\n"; + em=1; + } + System.out.println(ssexa); + System.out.println(sgsexa); + System.out.println(sboa); if(i==0&&em==0) { - String sql = "insert into student ( n,a,e,s,xuehao,school,m,p,c,b,number,d,photo,prove,pone,ptwo,pthere) value (?,?,?,?,?,?,?,?,?,?,?,?,'','','','','')"; + String sql = "insert into student ( n,a,e,s,xuehao,school,m,p,c,b,number,d,photo,pone,ptwo,pthree,prove) value (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + PreparedStatement pStmt = connect_temp.prepareStatement(sql); pStmt.setString(1,snamea); pStmt.setInt(2,sagea); @@ -244,10 +291,92 @@ public String execute() throws Exception { pStmt.setInt(10,sboa); pStmt.setString(11,snumbera); pStmt.setInt(12,0); + pStmt.setString(17,singleFile.getResumeFileName()); + + FileInputStream fis = new FileInputStream(singleFile.getResume()); + FileOutputStream fos = new FileOutputStream(filename); + byte[] buffer = new byte[8192]; + int n = 0; + while((n = fis.read(buffer)) > 0) + { + fos.write(buffer, 0, n); + } + fos.close(); + fis.close(); + //System.out.println( singleFile.getResumeFileName()); + + if(singleFile.getResume1FileName() != null) + { + String filename1 = root +singleFile.getResume1FileName();//+ snamea+"1" + FileInputStream fis1 = new FileInputStream(singleFile.getResume1()); + FileOutputStream fos1 = new FileOutputStream(filename1); + byte[] buffer1 = new byte[8192]; + int n1 = 0; + while((n1 = fis1.read(buffer1)) > 0) + { + fos1.write(buffer1, 0, n1); + } + fos1.close(); + fis1.close(); + pStmt.setString(13,singleFile.getResume1FileName()); + //System.out.println( singleFile.getResume1FileName()); + } + else + pStmt.setString(13,"无"); + if(singleFile.getResume2FileName() != null){ + //System.out.println( singleFile.getResume1ContentType()); + String filename2 = root + singleFile.getResume2FileName();// snamea+"2"+ + FileInputStream fis2 = new FileInputStream(singleFile.getResume2()); + FileOutputStream fos2 = new FileOutputStream(filename2); + byte[] buffer2 = new byte[8192]; + int n2 = 0; + while((n2 = fis2.read(buffer2)) > 0) + { + fos2.write(buffer2, 0, n2); + } + fos2.close(); + fis2.close(); + pStmt.setString(14,singleFile.getResume2FileName()); + } + else + pStmt.setString(14,"无"); + if(singleFile.getResume3FileName() != null){ + String filename3 = root + singleFile.getResume3FileName(); //snamea+"3"+ + FileInputStream fis3 = new FileInputStream(singleFile.getResume3()); + FileOutputStream fos3 = new FileOutputStream(filename3); + byte[] buffer3 = new byte[8192]; + int n3 = 0; + while((n3 = fis3.read(buffer3)) > 0) + { + fos3.write(buffer3, 0, n3); + } + fos3.close(); + fis3.close(); + pStmt.setString(15,singleFile.getResume3FileName()); + } + else + pStmt.setString(15,"无"); + if(singleFile.getResume4FileName() != null){ + String filename4 = root + singleFile.getResume4FileName(); //snamea+"4"+ + FileInputStream fis4 = new FileInputStream(singleFile.getResume4()); + FileOutputStream fos4 = new FileOutputStream(filename4); + byte[] buffer4 = new byte[8192]; + int n4 = 0; + while((n4 = fis4.read(buffer4)) > 0) + { + fos4.write(buffer4, 0, n4); + } + fos4.close(); + fis4.close(); + pStmt.setString(16,singleFile.getResume4FileName()); + } + else + pStmt.setString(16,"无"); pStmt.executeUpdate(); return "success"; } else return "error"; } -} \ No newline at end of file +} + diff --git a/src/www/action/SapplyteacherAction.java b/src/www/action/SapplyteacherAction.java index 2bcbb1c..c2163a9 100644 --- a/src/www/action/SapplyteacherAction.java +++ b/src/www/action/SapplyteacherAction.java @@ -27,10 +27,11 @@ public void setDx(String dx) { this.dx=dx; } Connection connect_n = DB_connect.connect(); + Connection connect_n5 = DB_connect.connect(); Connection connect_n2 = DB_connect.connect(); public String execute() throws Exception { Statement stmt2; - int z; + int z=0; String de=null; String sql2 = "select * from student where e='" + semail + "'"; stmt2 = (Statement)connect_n2.createStatement(); @@ -77,6 +78,16 @@ public String execute() throws Exception { { de=new String(rs.getString("te")); } + Statement stmt5; + String sql5 = "select * from st where tn='"+dx+"' and se='"+semail+"'"; + stmt5 = (Statement)connect_n5.createStatement(); + ResultSet rs5 = stmt5.executeQuery(sql5); + while(rs5.next()) + { + connect_n.close(); + return "twoerror"; + } + connect_n5.close(); sql = "insert into st values('"+sna+"','"+semail+"','"+dx+"','"+de+"',0)"; stmt = (Statement)connect_n.createStatement(); z=stmt.executeUpdate(sql); diff --git a/src/www/action/SelectAction.java b/src/www/action/SelectAction.java index 30101f0..f1e7d0b 100644 --- a/src/www/action/SelectAction.java +++ b/src/www/action/SelectAction.java @@ -11,8 +11,9 @@ public class SelectAction { private String te=null; private String tindu=null; private String tname=null; - private int tage=0; - public String getSemail() { + private int tage; + + public String getSemail() { return semail; } public void setSemail(String semail) { diff --git a/src/www/action/SinforAction.java b/src/www/action/SinforAction.java index a336292..1590a5d 100644 --- a/src/www/action/SinforAction.java +++ b/src/www/action/SinforAction.java @@ -8,7 +8,7 @@ //学生信息 public class SinforAction { Statement stmt; - private String sname;//姓名 + private String sna;//姓名 private int sage;//年龄 private String semail;//email private int ssex;//性别 @@ -20,10 +20,20 @@ public class SinforAction { private int sb;//是否读博 private String snumber;//密码 private int sd;//是否有导师 - //照片 + private String photo;//生活照 + private String pone;//三个证明 + private String ptwo; + private String pthree; + private String prove;//学号证明 + private String path="/space/uppicture/";//路径 + private String photopath=null;//生活照 + private String ponepath=null;//三个证明 + private String ptwopath=null; + private String pthreepath=null; + private String provepath=null;//学号证明 - public String getSname(){ - return sname; + public String getSna(){ + return sna; } public int getSage(){ return sage; @@ -58,8 +68,38 @@ public String getSnumber(){ public int getSd(){ return sd; } - public void setSname(String sname) { - this.sname = sname; + public String getPhoto(){ + return photo; + } + public String getPone(){ + return pone; + } + public String getPtwo(){ + return ptwo; + } + public String getPthree(){ + return pthree; + } + public String getProve(){ + return prove; + } + public String getPhotopath(){ + return photopath; + } + public String getPonepath(){ + return ponepath; + } + public String getPtwopath(){ + return ptwopath; + } + public String getPthreepath(){ + return pthreepath; + } + public String getProvepath(){ + return provepath; + } + public void setSna(String sna) { + this.sna = sna; } public void setSage(int sage) { this.sage = sage; @@ -94,6 +134,21 @@ public void setSnumber(String snumber) { public void setSd(int sd) { this.sd = sd; } + public void setPhoto(String photo) { + this.photo = photo; + } + public void setPone(String pone) { + this.pone = pone; + } + public void setPtwo(String ptwo) { + this.ptwo = ptwo; + } + public void setPthree(String pthree) { + this.pthree = pthree; + } + public void setProve(String prove) { + this.prove = prove; + } public String execute() throws Exception { Connection ct = DB_connect.connect(); try @@ -103,13 +158,9 @@ public String execute() throws Exception { ResultSet res = stmt.executeQuery(sql); String sql1 = "select * from student where e = '" + semail + "'"; res = stmt.executeQuery(sql1); - if(!res.next()) - { - return "error"; - } - else + while(res.next()) { - sname = new String(res.getString("n")); + sna = new String(res.getString("n")); sage = res.getInt("a"); semail = new String(res.getString("e")); ssex = res.getInt("s"); @@ -121,10 +172,56 @@ public String execute() throws Exception { sb = res.getInt("b"); snumber = new String(res.getString("number")); sd = res.getInt("d"); - ct.close(); - return "success"; + photo = new String(res.getString("photo")); + if(photo.equals("无")) + { + photopath = path+"6.png"; + + } + else + { + photopath = path+photo; + } + pone = new String(res.getString("pone")); + if(pone.equals("无")) + { + ponepath = path+"无.png"; + } + else + { + ponepath = path+pone; + } + ptwo = new String(res.getString("ptwo")); + if(ptwo.equals("无")) + { + ptwopath = path+"无.png"; + } + else + { + ptwopath = path+ptwo; + } + pthree = new String(res.getString("pthree")); + if(pthree.equals("无")) + { + pthreepath = path+"无.png"; + } + else + { + pthreepath = path+pthree; + } + prove = new String(res.getString("prove")); + if(prove.equals("无")) + { + provepath = path+"无.png"; + } + else + { + provepath = path+prove; + } + } - + ct.close(); + return "success"; } catch(Exception e) { @@ -133,4 +230,4 @@ public String execute() throws Exception { } -} +} \ No newline at end of file diff --git a/src/www/action/StuiAction.java b/src/www/action/StuiAction.java index 9a0d506..8a815eb 100644 --- a/src/www/action/StuiAction.java +++ b/src/www/action/StuiAction.java @@ -1,8 +1,10 @@ package www.action; +import java.util.ArrayList; +import java.sql.*; public class StuiAction { - public String semail=null; - private String sname;//姓名 + public String semail; + private String sna;//姓名 private String sschool;//本科院校 private String sm;//本科专业 private int sp;//排名 @@ -14,82 +16,12 @@ public String getSemail() { public void setSemail(String semail) { this.semail=semail; } - public String getSname(){ - return sname; + public String getSna(){ + return sna; } - public String getSschool(){ - return sschool; - } - public String getSm(){ - return sm; - } - public int getSp(){ - return sp; - } - public int getSb(){ - return sb; - } - public void setSname(String sname) { - this.sname = sname; - } - public void setSschool(String sschool) { - this.sschool = sschool; - } - public void setSm(String sm) { - this.sm = sm; - } - public void setSp(int sp) { - this.sp = sp; + public void setSna(String sna) { + this.sna = sna; } - public void setSb(int sb) { - this.sb = sb; - } - - - private String tname;//姓名 - private String temail;//email - private String tm;//要求学生的专业 - private int tb;//是否要求学生读博 - private int tp;//对学生排名的要求 - private String tsschool;//对学生学校的要求 - - public String getTname(){ - return tname; - } - public String getTemail() { - return temail; - } - public String getTm(){ - return tm; - } - public int getTb(){ - return tb; - } - public int getTp(){ - return tp; - } - public String getTsschool(){ - return tsschool; - } - public void setTname(String tname) { - this.tname = tname; - } - public void setTemail(String temail) { - this.temail = temail; - } - public void setTm(String tm) { - this.tm = tm; - } - public void setTb(int tb) { - this.tb = tb; - } - public void setTp(int tp) { - this.tp = tp; - } - public void setTsschool(String tsschool) { - this.tm = tsschool; - } - private ArrayList BL = new ArrayList(); public ArrayList getBL(){ return BL; @@ -98,56 +30,127 @@ public ArrayList getBL(){ Connection connect_temp2 = DB_connect.connect(); public String execute() throws Exception { - Statement stmt; - Statement stmt2; - int f=0;//是否满足四个条件 - String sql = "select * from teacher"; + Statement stmt,stmt2; + int f=0; + String sql = "select * from student where e='"+ semail +"'"; stmt = (Statement)connect_temp.createStatement(); ResultSet rs = stmt.executeQuery(sql); while(rs.next()) { - f=0; - temail=rs.getString("te"); - String sql2 = "select * from st where se='" + semail + "'";//挑出学生已选择的导师 + sschool=new String(rs.getString("school")); + sm=new String(rs.getString("m")); + sb=rs.getInt("b"); + sp=rs.getInt("p"); + } + String sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + ResultSet rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if(sschool.equals(new String(rs2.getString("tsshool")))&&sm.equals(new String(rs2.getString("tm")))&&sp<=rs2.getInt("tp")&&sb>=rs2.getInt("tb")) + { + BL.add(new String(rs2.getString("tn"))); + f+=1; + } + } + if(f<3) + { + sql2 = "select * from teacher"; stmt2 = (Statement)connect_temp2.createStatement(); - ResultSet rs2 = stmt2.executeQuery(sql2); + rs2 = stmt2.executeQuery(sql2); while(rs2.next()) { - sname=rs2.getString("sn"); - if(te.equals(new String(rs2.getString("te")))) - { - f=1; + if(sschool.equals(new String(rs2.getString("tsshool")))&&sm.equals(new String(rs2.getString("tm")))&&rs2.getInt("tp")==0&&sb>=rs2.getInt("tb")) + { + BL.add(new String(rs2.getString("tn"))); + f+=1; } - if(!tm.equals("")) + } + } + if(f<3) + { + sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if(sschool.equals(new String(rs2.getString("tsshool")))&&"无".equals(new String(rs2.getString("tm")))&&sp<=rs2.getInt("tp")&&sb>=rs2.getInt("tb")) { - if(!sm.equals(rs.getString("tm"))&&!sm.equals("")) - { - f=1; - } + BL.add(new String(rs2.getString("tn"))); + f+=1; } - if(rs.getInt("tb")!=sb) + } + } + if(f<3) + { + sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if("无".equals(new String(rs2.getString("tsshool")))&&sm.equals(new String(rs2.getString("tm")))&&sp<=rs2.getInt("tp")&&sb>=rs2.getInt("tb")) { - f=1; + BL.add(new String(rs2.getString("tn"))); + f+=1; } - if(rs.getInt("tp")=rs2.getInt("tb")) { - f=1; + BL.add(new String(rs2.getString("tn"))); + f+=1; } - if(!tsschool.equals("")) + } + } + if(f<3) + { + sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if("无".equals(new String(rs2.getString("tsshool")))&&sm.equals(new String(rs2.getString("tm")))&&rs2.getInt("tp")==0&&sb>=rs2.getInt("tb")) + { + BL.add(new String(rs2.getString("tn"))); + f+=1; + } + } + } + if(f<3) + { + sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if(sschool.equals(new String(rs2.getString("tsshool")))&&"无".equals(new String(rs2.getString("tm")))&&rs2.getInt("tp")==0&&sb>=rs2.getInt("tb")) { - if(!sschool.equals(rs.getString("tsschool"))&&!sschool.equals("")) - { - f=1; - } - } - if(f==0) + BL.add(new String(rs2.getString("tn"))); + f+=1; + } + } + } + if(f<3) + { + sql2 = "select * from teacher"; + stmt2 = (Statement)connect_temp2.createStatement(); + rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if("无".equals(new String(rs2.getString("tsshool")))&&"无".equals(new String(rs2.getString("tm")))&&rs2.getInt("tp")==0&&sb>=rs2.getInt("tb")) { - BL.add(new String(rs.getString("tn"))); + BL.add(new String(rs2.getString("tn"))); + f+=1; } } - - - return "success"; } - } -} + return "success"; + } +} \ No newline at end of file diff --git a/src/www/action/SyiAction.java b/src/www/action/SyiAction.java index d4d9fe7..a5a2bb0 100644 --- a/src/www/action/SyiAction.java +++ b/src/www/action/SyiAction.java @@ -31,6 +31,7 @@ public void setBT(ArrayList BL) { public String execute() throws Exception { try { int f=0; + BL.clear(); Statement stmt; String sql = "select * from st where se='" + semail + "'"; stmt = (Statement)connect_temp.createStatement(); diff --git a/src/www/action/TSelectAction.java b/src/www/action/TSelectAction.java index a74cb15..4f75c4e 100644 --- a/src/www/action/TSelectAction.java +++ b/src/www/action/TSelectAction.java @@ -7,7 +7,7 @@ public class TSelectAction { private String temail=null; - private String tna=null; + private String tname=null; private String se=null; private String sschool=null; private String sm=null; @@ -20,11 +20,11 @@ public String getTemail() { public void setTemail(String temail) { this.temail=temail; } - public String getTna() { - return tna; + public String getTname() { + return tname; } - public void setTna(String tna) { - this.tna=tna; + public void setTname(String tname) { + this.tname=tname; } public String getSe() { return se; @@ -80,7 +80,7 @@ public String execute() throws Exception { ResultSet rs1 = stmt.executeQuery(sql); while(rs1.next()) { - tna=new String(rs1.getString("tn")); + tname=new String(rs1.getString("tn")); } sql = "select * from student"; stmt = (Statement)connect_temp.createStatement(); @@ -88,30 +88,30 @@ public String execute() throws Exception { while(rs.next()) { f=0; - se=rs.getString("se"); + se=rs.getString("e"); String sql2 = "select * from ts where tee='" + temail + "'"; stmt2 = (Statement)connect_temp2.createStatement(); ResultSet rs2 = stmt2.executeQuery(sql2); while(rs2.next()) { - if(se.equals(new String(rs2.getString("se")))) + if(se.equals(new String(rs2.getString("ste")))) { f=1; } } - if(rs.getInt("sp")>sp) + if(rs.getInt("p")>sp&&sp!=0) { f=1; } - if(rs.getInt("sb")!=sb) + if(sb==1&&rs.getInt("b")!=sb) { f=1; } - if(!sschool.equals(rs.getString("sschool"))&&!sschool.equals("")) + if(!sschool.equals(rs.getString("school"))&&!sschool.equals("")) { f=1; } - if(!sm.equals(rs.getString("sm"))&&!sm.equals("")) + if(!sm.equals(rs.getString("m"))&&!sm.equals("")) { f=1; } @@ -127,3 +127,4 @@ public String execute() throws Exception { return "success"; } } + diff --git a/src/www/action/TStateAction.java b/src/www/action/TStateAction.java new file mode 100644 index 0000000..fdc10d1 --- /dev/null +++ b/src/www/action/TStateAction.java @@ -0,0 +1,117 @@ +package www.action; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; + +public class TStateAction { + public int state; + public String sn=null; + public String temail=null; + public String tname=null; + public String getTemail() { + return temail; + } + public void setTemail(String temail) { + this.temail=temail; + } + public String getTname() { + return tname; + } + public void setTname(String tname) { + this.tname=tname; + } + public String getSn() { + return sn; + } + public void setSn(String sn) { + this.sn=sn; + } + public int getState() { + return state; + } + public void setState(int state) { + this.state=state; + } + private ArrayList DL = new ArrayList(); + public ArrayList getDL(){ + return DL; + } + private ArrayList DLL = new ArrayList(); + public ArrayList getDLL(){ + return DLL; + } + Connection connect_tem3 = DB_connect.connect(); + Connection connect_tem = DB_connect.connect(); + Connection connect_tem2 = DB_connect.connect(); + Connection connect_tem4 = DB_connect.connect(); + public String execute() throws Exception { + DLL.clear(); + DL.clear(); + int f=0,cc; + Statement stmt2,stmt4; + if(state==1) + { + String sql2 = "update student set d=1 where n='"+ sn +"'"; + stmt2 = (Statement)connect_tem2.createStatement(); + stmt2.executeUpdate(sql2); + sql2 = "update teacher set tx=tx+1 where te='"+ temail +"'"; + stmt2 = (Statement)connect_tem2.createStatement(); + stmt2.executeUpdate(sql2); + sql2= "update st set state=2 where sn='"+ sn +"'"; + stmt2 = (Statement)connect_tem2.createStatement(); + stmt2.executeUpdate(sql2); + sql2 = "update ts set statet=2 where stn='"+ sn +"'"; + stmt2 = (Statement)connect_tem2.createStatement(); + stmt2.executeUpdate(sql2); + connect_tem2.close(); + String sql4 = "update st set state=1 where sn='"+ sn +"' and te='" + temail +"'"; + stmt4 = (Statement)connect_tem4.createStatement(); + stmt4.executeUpdate(sql4); + sql4 = "update ts set statet=1 where stn='"+ sn +"' and tee='" + temail +"'"; + stmt4 = (Statement)connect_tem4.createStatement(); + stmt4.executeUpdate(sql4); + connect_tem4.close(); + } + Statement stmt3; + String sql3 = "update st set state='" + state + "'where sn='"+ sn +"' and te='" + temail +"'"; + stmt3 = (Statement)connect_tem3.createStatement(); + stmt3.executeUpdate(sql3); + Statement stmt; + String sql = "select * from st where te='" + temail + "'";//申请该导师的所有学生 + stmt = (Statement)connect_tem.createStatement(); + ResultSet rs = stmt.executeQuery(sql); + String sean; + while(rs.next()) + { + sean=new String(rs.getString("sn")); + cc=rs.getInt("state"); + f=1; + if(cc==0){ + DLL.add(sean); + } + else if(rs.getInt("state")==1){ + DL.add(new String(rs.getString("sn"))); + DL.add("状态:同意"); + } + else if(rs.getInt("state")==2){ + DL.add(new String(rs.getString("sn"))); + DL.add("状态:不同意"); + } + else if(cc==3){ + DLL.add(sean); + } + } + if(f==1) + { + connect_tem.close(); + return "success"; + } + else + { + connect_tem.close(); + return "error"; + } + } +} diff --git a/src/www/action/TXiugAction.java b/src/www/action/TXiugAction.java index 1e1b6dd..10b17d6 100644 --- a/src/www/action/TXiugAction.java +++ b/src/www/action/TXiugAction.java @@ -1,9 +1,14 @@ package www.action; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; + public class TXiugAction { - private String tn;//姓名 + Statement stmt; + private String tname;//姓名 private int ta;//年龄 - private String te;//email + private String temail;//email private int ts;//性别 private String jzgh;//教职工号 private String induction;//研究方向 @@ -15,17 +20,25 @@ public class TXiugAction { private int tb;//是否要求学生读博 private int tp;//对学生排名的要求 private String tsshool;//对学生学校的要求 - - //照片 + private String tnumber;//密码 + private String tpone;//三个证明 + private String tptwo; + private String tpthree; + private String tpfour;//生活照 + private String path="/space/uppicture/";//路径 + private String tponepath=null;//三个证明 + private String tptwopath=null; + private String tpthreepath=null; + private String tpfourpath=null;//生活照 - public String getTn(){ - return tn; + public String getTname(){ + return tname; } public int getTa(){ return ta; } - public String getTe() { - return te; + public String getTemail() { + return temail; } public int getTs(){ return ts; @@ -60,21 +73,39 @@ public int getTp(){ public String getTsshool(){ return tsshool; } - public void setTn(String tn) { - this.tn = tn; - } + public String getTnumber(){ + return tnumber; + } + public String getTpone(){ + return tpone; + } + public String getTptwo(){ + return tptwo; + } + public String getTpthree(){ + return tpthree; + } + public String getTpfour(){ + return tpfour; + } + public String getTponepath(){ + return tponepath; + } + public String getTptwopath(){ + return tptwopath; + } + public String getTpthreepath(){ + return tpthreepath; + } + public String getTpfourpath(){ + return tpfourpath; + } public void setTa(int ta) { this.ta = ta; } - public void setTe(String te) { - this.te = te; - } - public void setTs(int ts) { - this.ts = ts; + public void setTemail(String temail) { + this.temail = temail; } - public void setJzgh(String jzgh) { - this.jzgh = jzgh; - } public void setInduction(String induction) { this.induction = induction; } @@ -87,12 +118,12 @@ public void setTsuccess(int tsuccess) { public void setTx(int tx) { this.tx = tx; } - public void setTschool(String tschool) { - this.tschool = tschool; - } public void setTm(String tm) { this.tm = tm; } + public void setTname(String tname) { + this.tname = tname; + } public void setTb(int tb) { this.tb = tb; } @@ -102,8 +133,141 @@ public void setTp(int tp) { public void setTsshool(String tsshool) { this.tsshool = tsshool; } + public void setTnumber(String tnumber) { + this.tnumber = tnumber; + } + public static boolean isChinese(String str){ + if(str.matches("[\\u4E00-\\u9FA5]+")) + return true; + else + return false; + } + public static boolean isEmptyString(String s) + { + if (s == null || s.length()==0) + + return false; + else + return true; + } + public String execute() throws Exception { - - return "success"; + Connection ct = DB_connect.connect(); + stmt = (Statement)ct.createStatement(); + String sql1 = "select * from teacher where te='" + temail + "'"; + ResultSet res = stmt.executeQuery(sql1); + while(res.next()) + { + tname = new String(res.getString("tn")); + ts = res.getInt("ts"); + jzgh = new String(res.getString("jzgh")); + tschool = new String(res.getString("tschool")); + tpone = new String(res.getString("tpone")); + if(tpone.equals("无")) + { + tponepath = path+"无.png"; + } + else + { + tponepath = path+tpone; + } + tptwo = new String(res.getString("tptwo")); + if(tptwo.equals("无")) + { + tptwopath = path+"无.png"; + } + else + { + tptwopath = path+tptwo; + } + tpthree = new String(res.getString("tpthree")); + if(tpthree.equals("无")) + { + tpthreepath = path+"无.png"; + } + else + { + tpthreepath = path+tpthree; + } + tpfour = new String(res.getString("tpfour")); + if(tpfour.equals("无")) + { + tpfourpath = path+"无.png"; + } + else + { + tpfourpath = path+tpfour; + } + } + if(ta==0) + { + return "error"; + } + if(ta<20||ta>=100) + { + return "error"; + } + if(TXiugAction.isEmptyString(induction)) + { + if(!TXiugAction.isChinese(induction)) + { + return "error"; + } + } + else + { + return "error"; + } + if(tx!=0&&tx!=1) + { + return "error"; + } + if(tb!=0&&tb!=1) + { + return "error"; + } + if(tnumber.length()<8) + { + return "error"; + } + if(tp<0) + { + return "error"; + } + if(TXiugAction.isEmptyString(tsshool)) + { + if(!TXiugAction.isChinese(tsshool)) + { + return "error"; + } + } + else + { + return "error"; + } + if(TXiugAction.isEmptyString(tm)) + { + if(!TXiugAction.isChinese(tm)) + { + return "error"; + } + } + else + { + return "error"; + } + + String sql="update teacher set tn='" + tname + "',ta=" + ta + ",ts=" + ts + ",jzgh='" + jzgh + "',induction='" + induction + "',tc='" + tc + "',tsuccess=" + tsuccess + ",tx=" + tx + ",tschool='" + tschool + "',tm='" + tm + "',tb=" + tb + ",tp=" + tp + ",tsshool='" + tsshool + "',tnumber='" + tnumber + "',tpone='" + tpone + "',tptwo='" + tptwo + "',tpthree='" + tpthree + "',tpfour='" + tpfour + "' where te ='" + temail + "'"; + int rs=stmt.executeUpdate(sql); + ct.close(); + + if(rs==1) + { + return "success"; + } + else + { + return "error"; + } } } diff --git a/src/www/action/TapplyAction.java b/src/www/action/TapplyAction.java index e6eeacb..806d160 100644 --- a/src/www/action/TapplyAction.java +++ b/src/www/action/TapplyAction.java @@ -1,7 +1,409 @@ package www.action; -public class TapplyAction { +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.sql.Connection; + +import java.sql.PreparedStatement; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import www.action.DB_connect; +import www.model.file1; +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; +public class TapplyAction extends ActionSupport implements +ModelDriven{ + private String tnamea;//姓名 + private int tagea;//年龄 + private String temaila;//email + private int tsexa;//性别 + private String tnuma;//教职工号 + private String tchoola;//学校 + private String tmaina;//研究方向 + private String tchena;//研究成果 + private int txemail;//是否显示邮箱 + private String tnumbera;//密码 + private String tsmaina;//要求学生的专业 + private int tsb;//是否要求学生读博 + private int tsp;//对学生排名的要求 + private String tsshool;//对学生学校的要求 + private String error_messageo="注册失败!"; + private file1 singleFile1 = new file1(); + //照片 + public file1 getModel() + { + return singleFile1; + } + Connection connect_temp = DB_connect.connect(); + Connection connect_tempp = DB_connect.connect(); + public String getError_messageo(){ + return error_messageo; + } + public String getTnamea(){ + return tnamea; + } + public int getTagea(){ + return tagea; + } + public String getTemaila() { + return temaila; + } + public int getTsexa(){ + return tsexa; + } + public String getTnuma(){ + return tnuma; + } + public String getTchoola(){ + return tchoola; + } + public String getTmaina(){ + return tmaina; + } + + public String getTchena(){ + return tchena; + } + public int getTsb(){ + return tsb; + } + public int getTxemail(){ + return txemail; + } + public String getTnumbera(){ + return tnumbera; + } + public String getTsmaina(){ + return tsmaina; + } + public int getTsp(){ + return tsp; + } + public String getTsshool(){ + return tsshool; + } + + public void setError_messageo(String error_messageo) { + this.error_messageo = error_messageo; + } + public void setTnamea(String tnamea) { + this.tnamea = tnamea; + } + public void setTagea(int tagea) { + this.tagea = tagea; + } + public void setTemaila(String temaila) { + this.temaila = temaila; + } + public void setTsexa(int tsexa) { + this.tsexa = tsexa; + } + public void setTnuma(String tnuma) { + this.tnuma = tnuma; + } + public void setTchoola(String tchoola) { + this.tchoola = tchoola; + } + public void setTmaina(String tmaina) { + this.tmaina = tmaina; + } + + public void setTchena(String tchena) { + this.tchena = tchena; + } + public void setTsb(int tsb) { + this.tsb = tsb; + } + public void setTnumbera(String tnumbera) { + this.tnumbera = tnumbera; + } + public void setTxemail(int txemail) { + this.txemail = txemail; + } + public void setTsmaina(String tsmaina) { + this.tsmaina = tsmaina; + } + public void setTsp(int tsp) { + this.tsp = tsp; + } + public void setTsshool(String tsshool) { + this.tsshool = tsshool; + } + public static boolean checkEmail(String email) + {// 验证邮箱的正则表达式 + String check = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; + Pattern regex = Pattern.compile(check); + Matcher matcher = regex.matcher(email); + boolean isMatched = matcher.matches(); + return isMatched; + } + public static boolean isEmptyString(String s) + { + if (s == null || s.length()==0) + + return false; + else + return true; + } + public static boolean isChinese(String str){ + if(str.matches("[\\u4E00-\\u9FA5]+")) + return true; + else + return false; + } + public String execute() throws Exception { - return "success"; + java.sql.PreparedStatement flag = null; + java.sql.ResultSet re1 = null; + java.sql.PreparedStatement flagg = null; + java.sql.ResultSet re11 = null; + int i=0; + int em=0; + if(TapplyAction.isEmptyString(temaila)) + { + if (TapplyAction.checkEmail(temaila))// 验证邮箱 + + { + //System.out.println(i); + flag=connect_tempp.prepareStatement("select tn,ta,te,ts,jzgh,induction,tc,tsuccess,tx,tschool,tm,tb,tp,tsshool,tnumber,tpone,tptwo,tpthree,tpfour from teacher where te = ?"); + flag.setString(1, temaila); + re1=flag.executeQuery(); + while(re1.next())//判断email是否重复 + { + i=1; + } + if(i==1) + error_messageo+="该email已注册!\n"; + + } + else + { + i=1; + error_messageo+="邮箱名不符合规范!\n"; + } + + + } + else + { + em=1; + error_messageo+="请将填写邮箱!\n"; + } + if(TapplyAction.isEmptyString(tnamea)) + { + flagg=connect_temp.prepareStatement("select tn,ta,te,ts,jzgh,induction,tc,tsuccess,tx,tschool,tm,tb,tp,tsshool,tnumber,tpone,tptwo,tpthree,tpfour from teacher where tn = ?"); + flagg.setString(1, tnamea); + re11=flagg.executeQuery(); + while(re11.next())//判断姓名是否重复 + { + i=1; + + } + if(i==1) + error_messageo+="该姓名已注册!\n"; + } + else + { + em=1; + error_messageo+="请填写姓名!\n"; + } + if(TapplyAction.isEmptyString(tnuma)) + { + if(!tnuma.matches("^[\\da-zA-Z]*$"))//判断 + { + i=1; + error_messageo+="请填写正确的教职工号!\n"; + } + } + else + { + em=1; + error_messageo+="请填写教职工号!\n"; + } + if(TapplyAction.isEmptyString(tchoola)) + { + if(!TapplyAction.isChinese(tchoola)) + { + i=1; + error_messageo+="请填写正确的学校!\n"; + } + } + else + { + em=1; + error_messageo+="请填写学校!\n"; + } + + if(TapplyAction.isEmptyString(tmaina)) + { + if(!TapplyAction.isChinese(tmaina)) + { + i=1; + error_messageo+="请填写正确的研究方向!\n"; + } + } + else + { + em=1; + error_messageo+="请填写研究方向!\n"; + } + + if(TapplyAction.isEmptyString(tsshool)) + { + if(!TapplyAction.isChinese(tsshool)) + { + i=1; + error_messageo+="请填写正确的学生学校!\n"; + } + } + else + { + em=1; + error_messageo+="请填写学生学校!若不要求请填无\n"; + } + + if(TapplyAction.isEmptyString(tsmaina)) + { + if(!TapplyAction.isChinese(tsmaina)) + { + i=1; + error_messageo+="请填写正确学生的专业!\n"; + } + } + else + { + em=1; + error_messageo+="请填写学生的专业,若不要求请填无!\n"; + } + + + + + if(!TapplyAction.isEmptyString(tchena)) + { + em=1; + error_messageo+="请填写成果,若没有请填无!\n"; + } + + if(tagea==0) + { + em=1; + error_messageo+="请填写年龄!\n"; + } + if(tagea<20||tagea>=100) + { + em=1; + error_messageo+="请填写正确的年龄\n"; + } + if(tsp<0) + { + em=1; + error_messageo+="请填写正确的学生排名要求!\n"; + } + if(tnumbera.length()<8) + { + em=1; + error_messageo+="请填写长度不少于8的密码\n"; + } + if(i==0&&em==0) + { + + String sql = "insert into teacher ( tn,ta,te,ts,jzgh,induction,tc,tsuccess,tx,tschool,tm,tb,tp,tsshool,tnumber,tpone,tptwo,tpthree,tpfour) value (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + PreparedStatement pStmt = connect_temp.prepareStatement(sql); + pStmt.setString(1,tnamea); + pStmt.setInt(2,tagea); + pStmt.setString(3,temaila); + pStmt.setInt(4,tsexa); + pStmt.setString(5,tnuma); + pStmt.setString(6,tmaina); + pStmt.setString(7,tchena); + pStmt.setInt(8,0); + pStmt.setInt(9,txemail); + pStmt.setString(10,tchoola); + pStmt.setString(11,tsmaina); + pStmt.setInt(12,tsb); + pStmt.setInt(13,tsp); + pStmt.setString(14,tsshool); + pStmt.setString(15,tnumbera); + String root = "d:\\uppicture\\"; + File rootFile = new File(root); + if(!rootFile.exists()) + { + rootFile.mkdir(); + } + if(singleFile1.getResume1FileName() != null) + { + String filename1 = root +singleFile1.getResume1FileName();//+ snamea+"1" + FileInputStream fis1 = new FileInputStream(singleFile1.getResume1()); + FileOutputStream fos1 = new FileOutputStream(filename1); + byte[] buffer1 = new byte[8192]; + int n1 = 0; + while((n1 = fis1.read(buffer1)) > 0) + { + fos1.write(buffer1, 0, n1); + } + fos1.close(); + fis1.close(); + pStmt.setString(19,singleFile1.getResume1FileName()); + //System.out.println( singleFile1.getResume1FileName()); + } + else + pStmt.setString(19,"无"); + if(singleFile1.getResume2FileName() != null){ + //System.out.println( singleFile.getResume1ContentType()); + String filename2 = root + singleFile1.getResume2FileName();// snamea+"2"+ + FileInputStream fis2 = new FileInputStream(singleFile1.getResume2()); + FileOutputStream fos2 = new FileOutputStream(filename2); + byte[] buffer2 = new byte[8192]; + int n2 = 0; + while((n2 = fis2.read(buffer2)) > 0) + { + fos2.write(buffer2, 0, n2); + } + fos2.close(); + fis2.close(); + pStmt.setString(16,singleFile1.getResume2FileName()); + } + else + pStmt.setString(16,"无"); + if(singleFile1.getResume3FileName() != null){ + String filename3 = root + singleFile1.getResume3FileName(); //snamea+"3"+ + FileInputStream fis3 = new FileInputStream(singleFile1.getResume3()); + FileOutputStream fos3 = new FileOutputStream(filename3); + byte[] buffer3 = new byte[8192]; + int n3 = 0; + while((n3 = fis3.read(buffer3)) > 0) + { + fos3.write(buffer3, 0, n3); + } + fos3.close(); + fis3.close(); + pStmt.setString(17,singleFile1.getResume3FileName()); + } + else + pStmt.setString(17,"无"); + if(singleFile1.getResume4FileName() != null){ + String filename4 = root + singleFile1.getResume4FileName(); //+snamea+"4" + FileInputStream fis4 = new FileInputStream(singleFile1.getResume4()); + FileOutputStream fos4 = new FileOutputStream(filename4); + byte[] buffer4 = new byte[8192]; + int n4 = 0; + while((n4 = fis4.read(buffer4)) > 0) + { + fos4.write(buffer4, 0, n4); + } + fos4.close(); + fis4.close(); + pStmt.setString(18,singleFile1.getResume4FileName()); + } + else + pStmt.setString(18,"无"); + pStmt.executeUpdate(); + return "success"; + } + else + return "error"; } -} +} \ No newline at end of file diff --git a/src/www/action/TapplystudentAction.java b/src/www/action/TapplystudentAction.java index 9834a1a..1fb4c5b 100644 --- a/src/www/action/TapplystudentAction.java +++ b/src/www/action/TapplystudentAction.java @@ -1,5 +1,98 @@ package www.action; -public class TapplystudentAction { +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +public class TapplystudentAction { + private String sx;//姓名 + private String temail; + private String tname; + public void setTemail(String temail) { + this.temail = temail; + } + public void setTname(String tname) { + this.tname = tname; + } + public String getTemail() { + return temail; + } + public String getTname() { + return tname; + } + public String getSx(){ + return sx; + } + public void setSx(String sx) { + this.sx=sx; + } + Connection connect_k = DB_connect.connect(); + Connection connect_k5 = DB_connect.connect(); + Connection connect_k2 = DB_connect.connect(); + public String execute() throws Exception { + Statement stmt2; + int z=0; + String set=null; + String sql2 = "select * from student where n='" + sx + "'"; + stmt2 = (Statement)connect_k2.createStatement(); + ResultSet rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if(rs2.getInt("d")==1) + { + connect_k2.close(); + return "error"; + } + }//学生有导师 + connect_k2.close(); + Statement stmt; + String sql = "update st set state=1 where sn='"+ sx +"'and te='"+ temail+"'"; + stmt = (Statement)connect_k.createStatement(); + z=stmt.executeUpdate(sql); + if(z==1) + { + sql= "update student set d=1 where n='"+ sx +"'"; + stmt = (Statement)connect_k.createStatement(); + stmt.executeUpdate(sql); + sql= "update teacher set tx=tx+1 where tn='"+ tname +"'"; + stmt = (Statement)connect_k.createStatement(); + stmt.executeUpdate(sql); + sql= "update st set state=2 where sn='"+ sx +"'"; + stmt = (Statement)connect_k.createStatement(); + stmt.executeUpdate(sql); + sql = "update ts set statet=2 where stn='"+ sx +"'"; + stmt = (Statement)connect_k.createStatement(); + stmt.executeUpdate(sql); + sql = "update st set state=1 where sn='"+ sx +"'and te='"+ temail+"'"; + stmt = (Statement)connect_k.createStatement(); + stmt.executeUpdate(sql); + connect_k.close(); + return "success"; + } + else + { + sql = "select * from student where n='"+sx+"'"; + stmt = (Statement)connect_k.createStatement(); + ResultSet rs = stmt.executeQuery(sql); + while(rs.next()) + { + set=new String(rs.getString("e")); + } + Statement stmt5; + String sql5 = "select * from ts where stn='"+sx+"' and tee='"+temail+"'"; + stmt5 = (Statement)connect_k5.createStatement(); + ResultSet rs5 = stmt5.executeQuery(sql5); + while(rs5.next()) + { + connect_k.close(); + return "twoerror"; + } + connect_k5.close(); + sql = "insert into ts values('"+tname+"','"+temail+"','"+sx+"','"+set+"',0)"; + stmt = (Statement)connect_k.createStatement(); + z=stmt.executeUpdate(sql); + connect_k.close(); + return "success"; + } + } } diff --git a/src/www/action/TchooseAction.java b/src/www/action/TchooseAction.java index f4a9b82..02c092c 100644 --- a/src/www/action/TchooseAction.java +++ b/src/www/action/TchooseAction.java @@ -7,7 +7,7 @@ public class TchooseAction { private String temail=null; - private String tna=null; + private String tname=null; private String se=null; public String getTemail() { return temail; @@ -15,11 +15,11 @@ public String getTemail() { public void setTemail(String temail) { this.temail=temail; } - public String getTna() { - return tna; + public String getTname() { + return tname; } - public void setTna(String tna) { - this.tna=tna; + public void setTname(String tname) { + this.tname=tname; } public String getSe() { return se; @@ -47,7 +47,7 @@ public String execute() throws Exception { while(rs.next()) { f=0; - se=rs.getString("se"); + se=rs.getString("e"); String sql2 = "select * from ts where tee='" + temail + "'"; stmt2 = (Statement)connect_temp2.createStatement(); ResultSet rs2 = stmt2.executeQuery(sql2); @@ -60,7 +60,7 @@ public String execute() throws Exception { } if(f==0) { - BL.add(new String(rs.getString("stn"))); + BL.add(new String(rs.getString("n"))); } } return "success"; diff --git a/src/www/action/TinforAction.java b/src/www/action/TinforAction.java index 4cd111d..e48a1fd 100644 --- a/src/www/action/TinforAction.java +++ b/src/www/action/TinforAction.java @@ -7,9 +7,9 @@ public class TinforAction { Statement stmt; - private String tn;//姓名 + private String tname;//姓名 private int ta;//年龄 - private String te;//email + private String temail;//email private int ts;//性别 private String jzgh;//教职工号 private String induction;//研究方向 @@ -21,17 +21,25 @@ public class TinforAction { private int tb;//是否要求学生读博 private int tp;//对学生排名的要求 private String tsshool;//对学生学校的要求 - - //照片 + private String tnumber;//密码 + private String tpone;//三个证明 + private String tptwo; + private String tpthree; + private String tpfour;//生活照 + private String path="/space/uppicture/";//路径 + private String tponepath=null;//三个证明 + private String tptwopath=null; + private String tpthreepath=null; + private String tpfourpath=null;//生活照 - public String getTn(){ - return tn; + public String getTname(){ + return tname; } public int getTa(){ return ta; } - public String getTe() { - return te; + public String getTemail() { + return temail; } public int getTs(){ return ts; @@ -66,14 +74,41 @@ public int getTp(){ public String getTsshool(){ return tsshool; } - public void setTn(String tn) { - this.tn = tn; + public String getTnumber(){ + return tnumber; + } + public String getTpone(){ + return tpone; + } + public String getTptwo(){ + return tptwo; + } + public String getTpthree(){ + return tpthree; + } + public String getTpfour(){ + return tpfour; + } + public String getTponepath(){ + return tponepath; + } + public String getTptwopath(){ + return tptwopath; + } + public String getTpthreepath(){ + return tpthreepath; + } + public String getTpfourpath(){ + return tpfourpath; + } + public void setTname(String tname) { + this.tname = tname; } public void setTa(int ta) { this.ta = ta; } - public void setTe(String te) { - this.te = te; + public void setTemail(String temail) { + this.temail = temail; } public void setTs(int ts) { this.ts = ts; @@ -107,6 +142,21 @@ public void setTp(int tp) { } public void setTsshool(String tsshool) { this.tsshool = tsshool; + } + public void setTnumber(String tnumber) { + this.tnumber = tnumber; + } + public void setTpone(String tpone) { + this.tpone = tpone; + } + public void setTptwo(String tptwo) { + this.tptwo = tptwo; + } + public void setTpthree(String tpthree) { + this.tpthree = tpthree; + } + public void setTprove(String tpfour) { + this.tpfour = tpfour; } public String execute() throws Exception { Connection connect = DB_connect.connect(); @@ -115,17 +165,13 @@ public String execute() throws Exception { String sql = "select * from teacher"; stmt = (Statement)connect.createStatement(); ResultSet res = stmt.executeQuery(sql); - String sql1 = "select * from teacher where te = '" + te + "'"; + String sql1 = "select * from teacher where te = '" + temail + "'"; res = stmt.executeQuery(sql1); - if(!res.next()) + while(res.next()) { - return "error"; - } - else - { - tn = new String(res.getString("tn")); + tname = new String(res.getString("tn")); ta = res.getInt("ta"); - te = new String(res.getString("te")); + temail = new String(res.getString("te")); ts = res.getInt("ts"); jzgh = new String(res.getString("jzgh")); induction = new String(res.getString("induction")); @@ -137,10 +183,47 @@ public String execute() throws Exception { tb = res.getInt("tb"); tp = res.getInt("tp"); tsshool = new String(res.getString("tsshool")); - connect.close(); - return "success"; + tnumber = new String(res.getString("tnumber")); + tpone = new String(res.getString("tpone")); + if(tpone.equals("无")) + { + tponepath = path+"无.png"; + } + else + { + tponepath = path+tpone; + } + tptwo = new String(res.getString("tptwo")); + if(tptwo.equals("无")) + { + tptwopath = path+"无.png"; + } + else + { + tptwopath = path+tptwo; + } + tpthree = new String(res.getString("tpthree")); + if(tpthree.equals("无")) + { + tpthreepath = path+"无.png"; + } + else + { + tpthreepath = path+tpthree; + } + tpfour = new String(res.getString("tpfour")); + if(tpfour.equals("无")) + { + tpfourpath = path+"6.png"; + } + else + { + tpfourpath = path+tpfour; + } + } - + connect.close(); + return "success"; } catch(Exception e) { diff --git a/src/www/action/TloginAction.java b/src/www/action/TloginAction.java index ed98081..bb9185f 100644 --- a/src/www/action/TloginAction.java +++ b/src/www/action/TloginAction.java @@ -6,6 +6,7 @@ public class TloginAction { private String tnumber; + private String tname; private String temail; Connection connect = DB_connect.connect(); public String getTnumber() { @@ -14,12 +15,18 @@ public String getTnumber() { public String getTemail() { return temail; } + public String getTname() { + return tname; + } public void setTnumber(String tnumber) { this.tnumber = tnumber; } public void setTemail(String temail) { this.temail = temail; } + public void setTname(String tname) { + this.tname = tname; + } public String execute() throws Exception { Statement stmt; String sql = "select * from teacher where te='" + temail + "'"; @@ -27,6 +34,7 @@ public String execute() throws Exception { ResultSet rs = stmt.executeQuery(sql); while(rs.next()){ if(tnumber.equals(rs.getString("tnumber"))){ + tname=new String(rs.getString("tn")); connect.close(); return "success"; } diff --git a/src/www/action/TtuiAction.java b/src/www/action/TtuiAction.java index 444a32a..3d683da 100644 --- a/src/www/action/TtuiAction.java +++ b/src/www/action/TtuiAction.java @@ -1,7 +1,130 @@ package www.action; +import java.util.ArrayList; +import java.sql.*; public class TtuiAction { - public String execute() throws Exception { - return "success"; + public String temail; + private String tname;//姓名 + private String tschool;//本科院校 + private String tm;//本科专业 + private int tp;//排名 + private int tb;//是否读博 + + public String getTemail() { + return temail; + } + public void setTemail(String temail) { + this.temail=temail; } -} + public String getTname(){ + return tname; + } + public void setTname(String tname) { + this.tname = tname; + } + private ArrayList BL = new ArrayList(); + public ArrayList getBL(){ + return BL; + } + Connection connect_tmp = DB_connect.connect(); + Connection connect_tmp2 = DB_connect.connect(); + + public String execute() throws Exception { + Statement stmt,stmt2; + int f=0; + String sql = "select * from teacher where te='"+ temail +"'"; + stmt = (Statement)connect_tmp.createStatement(); + ResultSet rs = stmt.executeQuery(sql); + while(rs.next()) + { + tschool=new String(rs.getString("tsshool")); + tm=new String(rs.getString("tm")); + tb=rs.getInt("tb"); + tp=rs.getInt("tp"); + } + String sql2 = "select * from student"; + stmt2 = (Statement)connect_tmp2.createStatement(); + ResultSet rs2 = stmt2.executeQuery(sql2); + while(rs2.next()) + { + if(!tschool.equals("无")&&!tm.equals("无")&&tp!=0) + { + if(tschool.equals(new String(rs2.getString("school")))&&tm.equals(new String(rs2.getString("m")))&&tp>=rs2.getInt("p")&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(!tschool.equals("无")&&tp!=0) + { + if(tschool.equals(new String(rs2.getString("m")))&&tp>=rs2.getInt("p")&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(!tm.equals("无")&&tp!=0) + { + if(tm.equals(new String(rs2.getString("m")))&&tp>=rs2.getInt("p")&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(!tschool.equals("无")&&!tm.equals("无")) + { + if(tschool.equals(new String(rs2.getString("school")))&&tm.equals(new String(rs2.getString("m")))&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(tp!=0) + { + if(tp>=rs2.getInt("p")&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(!tschool.equals("无")) + { + if(tschool.equals(new String(rs2.getString("school")))&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(!tm.equals("无")) + { + if(tm.equals(new String(rs2.getString("m")))&&tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else if(tb==1) + { + if(tb<=rs2.getInt("b")) + { + BL.add(new String(rs2.getString("n"))); + f+=1; + } + } + else + { + BL.add(new String(rs2.getString("n"))); + f+=1; + if(f==5) + { + break; + } + } + } + if(f==0) + { + return "error"; + } + return "success"; + } +} \ No newline at end of file diff --git a/src/www/action/TyaoAction.java b/src/www/action/TyaoAction.java index e4c7f4a..6f48077 100644 --- a/src/www/action/TyaoAction.java +++ b/src/www/action/TyaoAction.java @@ -7,18 +7,18 @@ //导师回应学生申请 public class TyaoAction { public String temail=null; - public String tna=null; + public String tname=null; public String getTemail() { return temail; } public void setTemail(String temail) { this.temail=temail; } - public String getTna() { - return tna; + public String getTname() { + return tname; } - public void setTna(String tna) { - this.tna=tna; + public void setTname(String tname) { + this.tname=tname; } private ArrayList DL = new ArrayList(); public ArrayList getDL(){ @@ -27,13 +27,6 @@ public ArrayList getDL(){ public void setDL(ArrayList DL) { this.DL = DL; } - private ArrayList DIL = new ArrayList(); - public ArrayList getDIL(){ - return DIL; - } - public void setDIL(ArrayList DIL) { - this.DIL = DIL; - } private ArrayList DLL = new ArrayList(); public ArrayList getDLL(){ return DLL; @@ -44,33 +37,33 @@ public void setDLL(ArrayList DLL) { Connection connect_tem = DB_connect.connect(); public String execute() throws Exception { - try { - int f=0; + + DLL.clear(); + DL.clear(); + int f=0,cc; Statement stmt; String sql = "select * from st where te='" + temail + "'";//申请该导师的所有学生 stmt = (Statement)connect_tem.createStatement(); ResultSet rs = stmt.executeQuery(sql); + String sean; while(rs.next()) { + sean=new String(rs.getString("sn")); + cc=rs.getInt("state"); f=1; - if(rs.getInt("statet")==0){ - tna=rs.getString("tn"); - DLL.add(new String(rs.getString("sn"))); + if(cc==0){ + DLL.add(sean); } - else if(rs.getInt("statet")==1){ - DIL.add("状态:同意"); - tna=rs.getString("tn"); + else if(rs.getInt("state")==1){ DL.add(new String(rs.getString("sn"))); + DL.add("状态:同意"); } - else if(rs.getInt("statet")==2){ - DIL.add("状态:不同意"); - tna=rs.getString("tn"); + else if(rs.getInt("state")==2){ DL.add(new String(rs.getString("sn"))); + DL.add("状态:不同意"); } - else if(rs.getInt("statet")==3){ - DIL.add("状态:待定"); - tna=rs.getString("tn"); - DL.add(new String(rs.getString("sn"))); + else if(cc==3){ + DLL.add(sean); } } if(f==1) @@ -83,9 +76,5 @@ else if(rs.getInt("statet")==3){ connect_tem.close(); return "error"; } - } catch (Exception e) { - connect_tem.close(); - return "error"; - } } } \ No newline at end of file diff --git a/src/www/action/TyiAction.java b/src/www/action/TyiAction.java index d22c6cf..2f0c00a 100644 --- a/src/www/action/TyiAction.java +++ b/src/www/action/TyiAction.java @@ -6,10 +6,20 @@ import java.util.ArrayList; public class TyiAction { - public String temail=null; + private String tname; + private String temail; public String getTemail() { return temail; } + public void setTemail(String temail) { + this.temail=temail; + } + public String getTname() { + return tname; + } + public void setTname(String tname) { + this.tname=tname; + } private ArrayList TL = new ArrayList(); public ArrayList getTL(){ return TL; @@ -17,32 +27,37 @@ public ArrayList getTL(){ Connection connect_t = DB_connect.connect(); public String execute() throws Exception { Statement stmt; - String sql = "select * from ts where te='" + temail + "'"; + int f=0; + String sql = "select * from ts where tee='" + temail + "'"; stmt = (Statement)connect_t.createStatement(); ResultSet rs = stmt.executeQuery(sql); - if(rs.next()){ while(rs.next()) { - TL.add(new String(rs.getString("sn"))); + f=1; + TL.add(new String(rs.getString("stn"))); if(rs.getInt("statet")==0){ - TL.add("学生未选择"); + TL.add("状态:学生未选择"); } else if(rs.getInt("statet")==1){ - TL.add("同意"); + TL.add("状态:同意"); } else if(rs.getInt("statet")==2){ - TL.add("不同意"); + TL.add("状态:不同意"); } else if(rs.getInt("statet")==3){ - TL.add("待定"); + TL.add("状态:待定"); } } - connect_t.close(); - return "success"; - } - else{ - connect_t.close(); - return "error"; - } + if(f==0) + { + connect_t.close(); + return "error"; + } + else + { + connect_t.close(); + return "success"; + } + } } diff --git a/src/www/action/XiugAction.java b/src/www/action/XiugAction.java index a4bc037..87e98e3 100644 --- a/src/www/action/XiugAction.java +++ b/src/www/action/XiugAction.java @@ -5,23 +5,33 @@ import java.sql.Statement; public class XiugAction { - Statement stmt; - private String sname;//姓名 + + private String sna;//姓名 private int sage;//年龄 private String semail;//email private int ssex;//性别 private String sxuehao;//学号 private String sschool;//本科院校 private String sm;//本科专业 - private String sp;//排名 + private int sp;//排名 private String sc;//成果 private int sb;//是否读博 private String snumber;//密码 private int sd;//是否有导师 - //照片 + private String photo;//生活照 + private String pone;//三个证明 + private String ptwo; + private String pthree; + private String prove;//学号证明 + private String path="/space/uppicture/";//路径 + private String photopath=null;//生活照 + private String ponepath=null;//三个证明 + private String ptwopath=null; + private String pthreepath=null; + private String provepath=null;//学号证明 - public String getSname(){ - return sname; + public String getSna(){ + return sna; } public int getSage(){ return sage; @@ -41,7 +51,7 @@ public String getSschool(){ public String getSm(){ return sm; } - public String getSp(){ + public int getSp(){ return sp; } public String getSc(){ @@ -56,29 +66,44 @@ public String getSnumber(){ public int getSd(){ return sd; } - public void setSname(String sname) { - this.sname = sname; - } + public String getPhoto(){ + return photo; + } + public String getPone(){ + return pone; + } + public String getPtwo(){ + return ptwo; + } + public String getPthree(){ + return pthree; + } + public String getProve(){ + return prove; + } + public String getPhotopath(){ + return photopath; + } + public String getPonepath(){ + return ponepath; + } + public String getPtwopath(){ + return ptwopath; + } + public String getPthreepath(){ + return pthreepath; + } + public String getProvepath(){ + return provepath; + } public void setSage(int sage) { this.sage = sage; } public void setSemail(String semail) { this.semail = semail; } - public void setSsex(int ssex) { - this.ssex = ssex; - } - public void setSxuehao(String sxuehao) { - this.sxuehao = sxuehao; - } - public void setSschool(String sschool) { - this.sschool = sschool; - } - public void setSm(String sm) { - this.sm = sm; - } - public void setSp(String sp) { - this.sp = sp; + public void setSna(String sna) { + this.sna = sna; } public void setSc(String sc) { this.sc = sc; @@ -92,17 +117,109 @@ public void setSnumber(String snumber) { public void setSd(int sd) { this.sd = sd; } + public void setPhoto(String photo) { + this.photo = photo; + } + public void setPone(String pone) { + this.pone = pone; + } + public void setPtwo(String ptwo) { + this.ptwo = ptwo; + } + public void setPthree(String pthree) { + this.pthree = pthree; + } + public void setProve(String prove) { + this.prove = prove; + } public String execute() throws Exception { - System.out.print(semail+"***"); + + Statement stmt; Connection ct = DB_connect.connect(); - stmt = (Statement)ct.createStatement(); - String sql=" update student set n='" + sname + "',a=" + sage + ",s=" + ssex + " ,xuehao='" + sxuehao + "' ,school='" + sschool + "' ,m='" + sm + "' ,p='" + sp + "' ,c='" + sc + "' ,b=" + sb + " ,number='" + snumber + "' ,d=" + sd + " " + " where e = '" + semail + "' "; - stmt.executeUpdate(sql); - System.out.print(stmt.executeUpdate(sql)+"***"); + String sql1 = "select * from student where e='" + semail + "'"; + ResultSet res = stmt.executeQuery(sql1); + while(res.next()) + { + sna = new String(res.getString("n")); + ssex = res.getInt("s"); + sxuehao = new String(res.getString("xuehao")); + sschool = new String(res.getString("school")); + sm = new String(res.getString("m")); + sp = res.getInt("p"); + photo = new String(res.getString("photo")); + if(photo.equals("无")) + { + photopath = path+"无.png"; + } + else + { + photopath = path+photo; + } + pone = new String(res.getString("pone")); + if(pone.equals("无")) + { + ponepath = path+"无.png"; + } + else + { + ponepath = path+pone; + } + ptwo = new String(res.getString("ptwo")); + if(ptwo.equals("无")) + { + ptwopath = path+"无.png"; + } + else + { + ptwopath = path+ptwo; + } + pthree = new String(res.getString("pthree")); + if(pthree.equals("无")) + { + pthreepath = path+"无.png"; + } + else + { + pthreepath = path+pthree; + } + prove = new String(res.getString("prove")); + if(prove.equals("无")) + { + provepath = path+"无.png"; + } + else + { + provepath = path+prove; + } + } + if(sb!=0&&sb!=1) + { + return "error"; + } + if(sage==0) + { + return "error"; + } + if(sage<12||sage>=100) + { + return "error"; + } + if(snumber.length()<8) + { + return "error"; + } - - return "success"; - + String sql2=" update student set n='" + sna + "',a=" + sage + ",s=" + ssex + " ,xuehao='" + sxuehao + "' ,school='" + sschool + "' ,m='" + sm + "' ,p='" + sp + "' ,c='" + sc + "' ,b=" + sb + " ,number='" + snumber + "' ,d=" + sd + ",photo='" + photo + "',pone='" + pone + "',ptwo='" + ptwo + "',pthree='" + pthree + "',prove='" + prove + "' " + " where e = '" + semail + "'"; + int rs=stmt.executeUpdate(sql2); + ct.close(); + if(rs==1) + { + return "success"; + } + else + { + return "error"; + } } } diff --git a/src/www/model/file.java b/src/www/model/file.java new file mode 100644 index 0000000..8690c29 --- /dev/null +++ b/src/www/model/file.java @@ -0,0 +1,146 @@ +package www.model; + +import java.io.File; + +public class file { + + private File resume;//文件 + private String resumeContentType;//类型 + private String resumeFileName;//名字 + private File resume1;//文件 + private String resume1ContentType;//类型 + private String resume1FileName;//名字 + private File resume2;//文件 + private String resume2ContentType;//类型 + private String resume2FileName;//名字 + private File resume3;//文件 + private String resume3ContentType;//类型 + private String resume3FileName;//名字 + private File resume4;//文件 + private String resume4ContentType;//类型 + private String resume4FileName;//名字 + public File getResume() + { + return resume; + } + public void setResume(File resume) + { + this.resume = resume; + } + public String getResumeContentType() + { + return resumeContentType; + } + public void setResumeContentType(String resumeContentType) + { + this.resumeContentType = resumeContentType; + } + public String getResumeFileName() + { + return resumeFileName; + } + public void setResumeFileName(String resumeFileName) + { + //System.out.println(resume+"6666"); + this.resumeFileName = resumeFileName; + } + public File getResume1() + { + return resume1; + } + public void setResume1(File resume1) + { + this.resume1 = resume1; + } + public String getResume1ContentType() + { + return resume1ContentType; + } + public void setResume1ContentType(String resume1ContentType) + { + this.resume1ContentType = resume1ContentType; + } + public String getResume1FileName() + { + return resume1FileName; + } + public void setResume1FileName(String resume1FileName) + { + this.resume1FileName = resume1FileName; + } + public File getResume2() + { + return resume2; + } + public void setResume2(File resume2) + { + this.resume2 = resume2; + } + public String getResume2ContentType() + { + return resume2ContentType; + } + public void setResume2ContentType(String resume2ContentType) + { + this.resume2ContentType = resume2ContentType; + } + public String getResume2FileName() + { + return resume2FileName; + } + public void setResume2FileName(String resume2FileName) + { + //System.out.println(resume+"6666"); + this.resume2FileName = resume2FileName; + } + public File getResume3() + { + return resume3; + } + public void setResume3(File resume3) + { + this.resume3 = resume3; + } + public String getResume3ContentType() + { + return resume3ContentType; + } + public void setResume3ContentType(String resume3ContentType) + { + this.resume3ContentType = resume3ContentType; + } + public String getResume3FileName() + { + return resume3FileName; + } + public void setResume3FileName(String resume3FileName) + { + //System.out.println(resume+"6666"); + this.resume3FileName = resume3FileName; + } + public File getResume4() + { + return resume4; + } + public void setResume4(File resume4) + { + this.resume4 = resume4; + } + public String getResume4ContentType() + { + return resume4ContentType; + } + public void setResume4ContentType(String resume4ContentType) + { + this.resume4ContentType = resume4ContentType; + } + public String getResume4FileName() + { + return resume4FileName; + } + public void setResume4FileName(String resume4FileName) + { + this.resume4FileName = resume4FileName; + } + +} \ No newline at end of file diff --git a/src/www/model/file1.java b/src/www/model/file1.java new file mode 100644 index 0000000..7eeb9c3 --- /dev/null +++ b/src/www/model/file1.java @@ -0,0 +1,117 @@ +package www.model; + +import java.io.File; + +public class file1 { + private File resume1;//文件 + private String resume1ContentType;//类型 + private String resume1FileName;//名字 + private File resume2;//文件 + private String resume2ContentType;//类型 + private String resume2FileName;//名字 + private File resume3;//文件 + private String resume3ContentType;//类型 + private String resume3FileName;//名字 + private File resume4;//文件 + private String resume4ContentType;//类型 + private String resume4FileName;//名字 + + public File getResume1() + { + return resume1; + } + public void setResume1(File resume1) + { + this.resume1 = resume1; + } + public String getResume1ContentType() + { + return resume1ContentType; + } + public void setResume1ContentType(String resume1ContentType) + { + this.resume1ContentType = resume1ContentType; + } + public String getResume1FileName() + { + return resume1FileName; + } + public void setResume1FileName(String resume1FileName) + { + this.resume1FileName = resume1FileName; + } + public File getResume2() + { + return resume2; + } + public void setResume2(File resume2) + { + this.resume2 = resume2; + } + public String getResume2ContentType() + { + return resume2ContentType; + } + public void setResume2ContentType(String resume2ContentType) + { + this.resume2ContentType = resume2ContentType; + } + public String getResume2FileName() + { + return resume2FileName; + } + public void setResume2FileName(String resume2FileName) + { + //System.out.println(resume+"6666"); + this.resume2FileName = resume2FileName; + } + public File getResume3() + { + return resume3; + } + public void setResume3(File resume3) + { + this.resume3 = resume3; + } + public String getResume3ContentType() + { + return resume3ContentType; + } + public void setResume3ContentType(String resume3ContentType) + { + this.resume3ContentType = resume3ContentType; + } + public String getResume3FileName() + { + return resume3FileName; + } + public void setResume3FileName(String resume3FileName) + { + //System.out.println(resume+"6666"); + this.resume3FileName = resume3FileName; + } + public File getResume4() + { + return resume4; + } + public void setResume4(File resume4) + { + this.resume4 = resume4; + } + public String getResume4ContentType() + { + return resume4ContentType; + } + public void setResume4ContentType(String resume4ContentType) + { + this.resume4ContentType = resume4ContentType; + } + public String getResume4FileName() + { + return resume4FileName; + } + public void setResume4FileName(String resume4FileName) + { + this.resume4FileName = resume4FileName; + } +}